{"id":3764,"date":"2022-10-13T10:59:02","date_gmt":"2022-10-13T10:59:02","guid":{"rendered":"https:\/\/cocoalopez.com\/blog\/?p=3764"},"modified":"2022-10-13T10:59:04","modified_gmt":"2022-10-13T10:59:04","slug":"headless-maya-playblast","status":"publish","type":"post","link":"https:\/\/cocoalopez.com\/blog\/?p=3764","title":{"rendered":"Headless Maya Playblast"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Contrary to popular beliefs, it\u2019s totally possible to do your playblasts in batch mode. It can be very helpful in a lot of workflow: &#8211; create a missing playblast without the hassle of opening Maya UI &#8211; move all playblasts calculation to a remote computer to be able to continue to work at the same time &#8211; update playblasts of all shots at once on a renderfarm to make an up to date montage of the movie All of this is made a lot easier and faster when doing playblasts in batch mode<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Both <strong>mayabatch<\/strong> and <strong>mayapy<\/strong> can do this, the main difference is the background color being different and mayapy being a little finicky.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In a Python module put this simple code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def do_playblast(output):\n    cmds.playblast(f=output, widthHeight=&#91;1980, 1080], percent=100, forceOverwrite=True, viewer=False)\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">And you can call maya with one of those<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># For mayabatch\nmaya -batch -file \"file_to_playblast.ma\" -command 'callPython \"playblast\" \"do_playblast\" {\"output_path.mp4\"}' -noAutoloadPlugins\n# For mayapy\nmayapy -c \"import maya.standalone;maya.standalone.initialize(name='python');import playblast;playblast.do_playblast('output_path.mp4')\" \"filepath_to_playblast.ma\"\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The Maya file to open is directly in the command but you can also put the opening of the Maya file into the script instead. This way it\u2019s possible to do a batch of several scenes on a single node to save time on the initialization of Maya, but it\u2019s not worth it. If it crashes it\u2019s harder to know what happened and which job was processed or not. By deploying one job per scene you can send it to different computers on the renderfarm and see the general progress.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another option would be to simply render with a fast <strong>software\/hardware renderer<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you encounter problems, as a last resort you could launch a Maya GUI and override the default UI with a very small window. This can be done by creating an empty Maya workspace layout, and then setting the environment variable <strong>MAYA_OVERRIDE_UI<\/strong> to a path to this MEL script:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>string $jobWindow = `window -mw -title \"Playblast\" -widthHeight 1 1`;\nworkspaceLayoutManager -setCurrent \"EMPTY\"; \/\/ EMPTY is the name of my empty workspace\nsetParent ..;\nshowWindow $jobWindow;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Taken from:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.regnareb.com\/pro\/2021\/06\/headless-playblasts-batches\/\">https:\/\/www.regnareb.com\/pro\/2021\/06\/headless-playblasts-batches\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Contrary to popular beliefs, it\u2019s totally possible to do your playblasts in batch mode. It can be very helpful in a lot of workflow: &#8211; create a missing playblast without the hassle of opening Maya UI &#8211; move all playblasts calculation to a remote computer to be able to continue to work at the same [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3767,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"tdm_status":"","tdm_grid_status":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1002],"tags":[],"class_list":["post-3764","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-featured"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2022\/10\/headless-maya-playblast.jpg?fit=1280%2C720&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9XJix-YI","jetpack-related-posts":[{"id":2651,"url":"https:\/\/cocoalopez.com\/blog\/?p=2651","url_meta":{"origin":3764,"position":0},"title":"Ocultar la ventana de la Consola en Maya","author":"cgmodeler","date":"April 14, 2018","format":false,"excerpt":"Para ocultar el \"Output window\" al iniciar Maya: Modificar el shortcut de maya y agregar lo siguiente para eliminar el console window. \"C:\\Program Files\\Autodesk\\Maya2013\\bin\\maya.exe\" -hideConsole","rel":"","context":"In &quot;Tips y Tutoriales&quot;","block_context":{"text":"Tips y Tutoriales","link":"https:\/\/cocoalopez.com\/blog\/?cat=31"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2018\/04\/ocultar-la-ventana-de-la-consola-en-maya.jpg?fit=796%2C512&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2018\/04\/ocultar-la-ventana-de-la-consola-en-maya.jpg?fit=796%2C512&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2018\/04\/ocultar-la-ventana-de-la-consola-en-maya.jpg?fit=796%2C512&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2018\/04\/ocultar-la-ventana-de-la-consola-en-maya.jpg?fit=796%2C512&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3760,"url":"https:\/\/cocoalopez.com\/blog\/?p=3760","url_meta":{"origin":3764,"position":1},"title":"IMPROVE MAYA STARTUP AND SHUTDOWN TIMES","author":"cgmodeler","date":"October 13, 2022","format":false,"excerpt":"Since Maya 2016, it launches with a set of at least 3 acwebbrowser.exe process. Besides all the fuss it creates in the task manager and resource hog it can be, it can also slow down Maya startup and shutdown times by more than 200%, up to 30 seconds each time!\u2026","rel":"","context":"In &quot;Featured&quot;","block_context":{"text":"Featured","link":"https:\/\/cocoalopez.com\/blog\/?cat=1002"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2022\/10\/improve-maya-startup-and-shutdown-times.jpg?fit=640%2C394&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2022\/10\/improve-maya-startup-and-shutdown-times.jpg?fit=640%2C394&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2022\/10\/improve-maya-startup-and-shutdown-times.jpg?fit=640%2C394&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3704,"url":"https:\/\/cocoalopez.com\/blog\/?p=3704","url_meta":{"origin":3764,"position":2},"title":"How to Approach Flat Character Design in Maya &#038; Rig Them","author":"cgmodeler","date":"September 27, 2022","format":false,"excerpt":"James Crossley shows some methods for creating flat characters in a 3D world. There is a certain appeal to having characters that look hand-drawn or hand-painted. In a digital world, that means using a 2D animation app like\u00a0Spine,\u00a0ToonBoom, Ae,\u00a0Moho, or others. Some other alternatives work with a hybrid of 2D\u2026","rel":"","context":"In &quot;Featured&quot;","block_context":{"text":"Featured","link":"https:\/\/cocoalopez.com\/blog\/?cat=1002"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2022\/09\/maxresdefault.jpg?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2022\/09\/maxresdefault.jpg?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2022\/09\/maxresdefault.jpg?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2022\/09\/maxresdefault.jpg?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2022\/09\/maxresdefault.jpg?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2716,"url":"https:\/\/cocoalopez.com\/blog\/?p=2716","url_meta":{"origin":3764,"position":3},"title":"glTF 2.0 Exporter \/ Formato Open Source para export de assets en 3D","author":"cgmodeler","date":"June 4, 2018","format":false,"excerpt":"https:\/\/www.khronos.org\/gltf\/ glTF\u2122 (GL Transmission Format) is a royalty-free specification for the efficient transmission and loading of 3D scenes and models by applications. glTF minimizes both the size of 3D assets, and the runtime processing needed to unpack and use those assets. glTF defines an extensible, common publishing format for 3D\u2026","rel":"","context":"In &quot;Featured&quot;","block_context":{"text":"Featured","link":"https:\/\/cocoalopez.com\/blog\/?cat=1002"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2018\/06\/gltf-2-0-exporter-formato-open-source-para-export-de-assets-en-3d.png?fit=640%2C360&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2018\/06\/gltf-2-0-exporter-formato-open-source-para-export-de-assets-en-3d.png?fit=640%2C360&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2018\/06\/gltf-2-0-exporter-formato-open-source-para-export-de-assets-en-3d.png?fit=640%2C360&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":2648,"url":"https:\/\/cocoalopez.com\/blog\/?p=2648","url_meta":{"origin":3764,"position":4},"title":"Resetear la posicion de las ventanas en Maya","author":"cgmodeler","date":"April 14, 2018","format":false,"excerpt":"Si una ventana desaparece de la pantalla en maya, hacer lo siguiente para restaurar las ventanas al \u00e1rea de trabajo. Cerrar maya e ir a: C:\\Users\\Documents\\maya\\2013\\prefs borrar el archivo: windowPrefs.mel Reiniciar maya :) \u00a0","rel":"","context":"In &quot;Tips y Tutoriales&quot;","block_context":{"text":"Tips y Tutoriales","link":"https:\/\/cocoalopez.com\/blog\/?cat=31"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2018\/04\/resetear-la-posicion-de-las-ventanas-en-maya.jpg?fit=623%2C444&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2018\/04\/resetear-la-posicion-de-las-ventanas-en-maya.jpg?fit=623%2C444&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2018\/04\/resetear-la-posicion-de-las-ventanas-en-maya.jpg?fit=623%2C444&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3311,"url":"https:\/\/cocoalopez.com\/blog\/?p=3311","url_meta":{"origin":3764,"position":5},"title":"Maya Playblast Tool (MayaCapture) With GUI","author":"cgmodeler","date":"October 11, 2021","format":false,"excerpt":"Found this nice tool for playblast control in maya, its a GUI for another playblast python script. Playblast Script (MayaCapture): https:\/\/github.com\/abstractfactory\/maya-capture Playblast GUI: https:\/\/github.com\/BigRoy\/maya-capture-gui Make sure to review all the available commands and place both scripts on the same folder.","rel":"","context":"In &quot;Featured&quot;","block_context":{"text":"Featured","link":"https:\/\/cocoalopez.com\/blog\/?cat=1002"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2021\/10\/imagen-7.png?fit=379%2C583&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3764","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3764"}],"version-history":[{"count":1,"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3764\/revisions"}],"predecessor-version":[{"id":3766,"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3764\/revisions\/3766"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/3767"}],"wp:attachment":[{"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3764"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3764"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3764"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}