{"id":19473,"date":"2022-07-22T18:55:31","date_gmt":"2022-07-22T18:55:31","guid":{"rendered":"https:\/\/jurn.link\/dazposer\/?p=19473"},"modified":"2022-08-19T16:04:18","modified_gmt":"2022-08-19T16:04:18","slug":"python-script-store-and-restore-render-size-settings","status":"publish","type":"post","link":"https:\/\/jurn.link\/dazposer\/index.php\/2022\/07\/22\/python-script-store-and-restore-render-size-settings\/","title":{"rendered":"Python Script: Store and Restore Render Size Settings"},"content":{"rendered":"<p>It appears that Poser can easily memorize and restore several things using Python scripting commands. Such as lights, camera, figure etc. But not the user&#8217;s current render setting dimensions.  <\/p>\n<p>Here&#8217;s a demo of how to do that in a script. Working in both Poser 11 and Poser 12. <\/p>\n<p>Copy and save as <em>Store_and_Restore_Render_Size_Settings.py<\/em><\/p>\n<hr>\n<pre class=\"height:800 width:550 lang:python decode:true \" ># Restore render settings. A demo Python script for Poser 11 and 12.\r\n# Save the user's current render size settings for their scene,\r\n# do something fab, then restore the user's render size settings.\r\n\r\nimport poser\r\n\r\n# Tell Poser the script expects a scene to be loaded and present.\r\nscene = poser.Scene()\r\n\r\n# Tell Poser what x,y,z co-ordinates mean in this instance.\r\nx = 0.0\r\ny = 0.0\r\nz = 0.0\r\n\r\n# Get the scene's current render size dimensions.\r\nsize = poser.Scene().OutputRes(x,y)\r\n\r\n# Store that current render size as data in our two named variables.\r\nsceneHorX = size[0]\r\nsceneVerY = size[1]\r\n\r\n# Set a new render size for the scene, in pixels.\r\nscene.SetOutputRes(600,400)\r\n\r\n# Do a scene render at that size, with the current render engine.\r\nscene.Render()\r\n\r\n# Set the scene render size back to the stored original size.\r\nscene.SetOutputRes(sceneHorX,sceneVerY)<\/pre>\n<p>A useful basis for making a script that does a quick 600 x 450px test render, without affecting your main render dimension settings.<\/p>\n<p>You could probably tweak this to save\/restore other settings within a scene.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It appears that Poser can easily memorize and restore several things using Python scripting commands. Such as lights, camera, figure etc. But not the user&#8217;s current render setting dimensions. Here&#8217;s a demo of how to do that in a script. Working in both Poser 11 and Poser 12. Copy and save as Store_and_Restore_Render_Size_Settings.py # Restore [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,26,27],"tags":[],"class_list":["post-19473","post","type-post","status-publish","format-standard","hentry","category-poser","category-poser-12","category-python-scripts"],"_links":{"self":[{"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/posts\/19473","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/comments?post=19473"}],"version-history":[{"count":10,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/posts\/19473\/revisions"}],"predecessor-version":[{"id":19725,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/posts\/19473\/revisions\/19725"}],"wp:attachment":[{"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/media?parent=19473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/categories?post=19473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/tags?post=19473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}