{"id":4017,"date":"2020-03-03T21:28:22","date_gmt":"2020-03-04T05:28:22","guid":{"rendered":"https:\/\/trikingo.com\/?post_type=product&#038;p=4017"},"modified":"2020-03-10T22:20:11","modified_gmt":"2020-03-11T05:20:11","slug":"pyside-snake-tutorial-for-maya","status":"publish","type":"product","link":"https:\/\/trikingo.com\/product\/pyside-snake-tutorial-for-maya\/","title":{"rendered":"Pyside Snake Tutorial for Maya"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">This tutorial will walk you through creating a simple snake game in Maya using Python and Pyside, and creating object procedurally in the viewport.<\/span><\/p>\n<p>Some of the content that you will be learning and real life applications:<\/p>\n<p>1.- Generate widgets and Maya objects based on a coordinate.<br \/>\nThere are so many scenarios where you will want to generate and place an object in a specific position. For instance, if you are creating your own World Space Baker, you will want to create a locator (or any object) in a specific point in space.<\/p>\n<p>2.- Detect widget collisions using Python.<br \/>\nIf you are developing your own Animation Picker and you want to do a \u201cbatch create buttons\u201d from a bunch of selected items, you will want to check if there is a widget in certain space to make sure you don\u2019t create a button on top of an already existing button.<\/p>\n<p>3.- Timer events.<br \/>\nQTimers are very useful to make your script execute certain commands after some time has passed. For example, if you are working on a Render Manager, you may want to check if the image sequence that is being rendered already finished. To do this, you can use a QTimer to check every 1, 5&#8230;10 minutes, and if the image sequence exists, copy it to another location (backup) and run nuke to generate a .mov out of it. Then enable a button in your UI so that the animator can Preview this render.<\/p>\n<p>4.- Keyboard Events<br \/>\nKeyboard events are a must if you want to enable your tool to use shortcuts. Every piece of software has them. Add Ctrl+S to save your picker, Ctrl+O to open it, check if Ctrl is pressed so you can show a different menu when right clicking&#8230; and the list goes on.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial will walk you through creating a simple snake game in Maya using Python and Pyside, and creating object procedurally in the viewport.<\/p>\n<p>The PDF file contains over 36 pages divided in 9 Sections carefully detailing and explaining the whole process, making it easy to understand even if do not have much experience with python.<\/p>\n<p>Included with the PDF, there are 9 different Python files (.py) that can be ran independently to test each stage of the tutorial, with the last one being the full source code of this snake game.<\/p>\n","protected":false},"featured_media":4019,"template":"","meta":{"spay_email":""},"_links":{"self":[{"href":"https:\/\/trikingo.com\/api\/wp\/v2\/product\/4017"}],"collection":[{"href":"https:\/\/trikingo.com\/api\/wp\/v2\/product"}],"about":[{"href":"https:\/\/trikingo.com\/api\/wp\/v2\/types\/product"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/trikingo.com\/api\/wp\/v2\/media\/4019"}],"wp:attachment":[{"href":"https:\/\/trikingo.com\/api\/wp\/v2\/media?parent=4017"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}