Changing Defaults 2005-05-23 - By Guillaume Laforge
Back You can use an OnEndNewScene events like this :
//Save this file in C:\ for example as "render_option.js" //-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- function XSIApplication::OnEndNewScene( data, change ) { SetValue("Passes.Default_Pass.RenderOptions.ImageFormat", "{32D3C209-0E3B-11CF-AFA9-00AA00629284}", null); SetValue("Passes.Default_Pass.RenderOptions.PictureStandard", 18, null); logmessage("Image default format is changed !"); } Then run this line : Application.Advise( "OnEndNewScene", "C:\\render_option.js", "", "JScript", "render_option", null, null, true ) ;
Now each time you start a new scene you're render option are set to SGI and the format will be HDTV 1080 ( in my example). The limitation is that when you open xsi, you must create a new scene to run the event :-/
As kim said, duplicating pass is a simple way to keep the settings. I always use this little script who rename the new pass and give it a output file name too :
/* name_pass_and_output.js guillaume.laforge.3d@(protected) - 2005 What this script do : Rename the pass and the image file with the same name. How to use it : Select the pass and run */ if(selection.count==1) { var oSel = Selection(0)
//add a custom property to store the name. var sceneItem = Application.ActiveProject.ActiveScene.Root var oProp = sceneItem.AddCustomProperty ("Name_for_pass_and_file") oProp.addparameter3( "name_shot_is", siString, "", null, null, false, false ) oProp.addparameter3( "name_pass_is", siString, "", null, null, false, false )
InspectObj( oProp, "", "pass_and_file_name", siModal, true ) sName = oProp.parameters( "name_pass_is" ).value sShot = oProp.parameters( "name_shot_is" ).value logmessage (sName) DeleteObj(oProp);
//Set the pass name. SetValue(oSel+".Name", sName, null); //Set the file name. SetValue(oSel+".RenderOptions.ImageFileName", "Render_Pictures\\"+sShot+"_"+sName, null); } else { logmessage (" Please select a pass ") }
Hope this help,
Guillaume Laforge Freelance CG artist www.vol2nuit.fr <http://www.vol2nuit.fr>
2005/5/23, Eric Lampi <ericlampi@(protected)>: > > OK this should be an easy one. > > I rarely render .pic anymore, opting for .sgi since > it's faster to load into Flame. How do I set the > default render format to .sgi? I would also like to > do the same for the resolution and frame rate. > > It's a shame that when you make a new pass it doesn't > look at the previous passes settings. I've had > several occasions where I am rushing to get out some > new elements and I forget to change one of those > settings. Seems to me that it should be set once and > cascade down for every new pass isntead of using the > default. Just my opinion. :) > > Eric > > Freelance 3-D Animator, F/X Artist, Particle Man > --- > Unsubscribe? Mail Majordomo@(protected) with the following text in body: > unsubscribe xsi >
<div>You can use an OnEndNewScene events like this :</div> <div><br>//Save this file in C:\ for example as "render_option.js "</div> <div>//-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---<br><font size="2">function XSIApplication::OnEndNewScene( data, change ) <br >{ </font></div> <div><font size="2">SetValue("Passes.Default_Pass.RenderOptions .ImageFormat", "{32D3C209-0E3B-11CF-AFA9-00AA00629284}", null); <br>SetValue("Passes.Default_Pass.RenderOptions.PictureStandard", 18, null); </font></div> <div><font size="2"><font size="2">logmessage("Image default format is changed !");</font><br>}</font></div> <div><font size="2"></font> </div> <div><font size="2">Then run this line :</font></div> <div><font size="2"><font size="2"> <p>Application.Advise( "OnEndNewScene", "C:\\render_option.js ", "", "JScript", "render_option", null, null , true ) ; </p> <p>Now each time you start a new scene you're render option are set to SGI and the format will be HDTV 1080 ( in my example). The limitation is that when you open xsi, you must create a new scene to run the event :-/</p>
<p>As kim said, duplicating pass is a simple way to keep the settings. I always use this little script who rename the new pass and give it a output file name too :</p><font size="2"> <p>/*<br>name_pass_and_output.js<br><a href="mailto:guillaume.laforge.3d@(protected) .com">guillaume.laforge.3d@(protected)</a> - 2005<br>What this script do :<br >Rename the pass and the image file with the same name.<br>How to use it : <br>Select the pass and run<br>*/<br>if(selection.count==1)<br>{<br>var oSel = Selection(0)<br><br>//add a custom property to store the name.<br>var sceneItem = Application.ActiveProject.ActiveScene.Root<br>var oProp = sceneItem .AddCustomProperty ("Name_for_pass_and_file")<br>oProp.addparameter3( "name_shot _is", siString, "", null, null, false, false )<br>oProp .addparameter3( "name_pass_is", siString, "", null, null, false, false ) <br><br>InspectObj( oProp, "", "pass_and_file_name", siModal, true )<br>sName = oProp.parameters( "name_pass_is" ).value <br>sShot = oProp.parameters( "name_shot_is" ).value<br>logmessage (sName) <br>DeleteObj(oProp);</p> <p>//Set the pass name. <br>SetValue(oSel+".Name", sName, null);<br>/ /Set the file name.<br>SetValue(oSel+".RenderOptions.ImageFileName", "Render_Pictures\\"+sShot+"_"+sName, null); <br>}<br>else <br>{<br>logmessage (" Please select a pass ")<br>}</p> <p>Hope this help,</p> <p>Guillaume Laforge<br>Freelance CG artist<br><a href="http://www.vol2nuit.fr" >www.vol2nuit.fr</a></p></font></font></font></div><br><br> <div><span class="gmail_quote">2005/5/23, Eric Lampi <<a href="mailto :ericlampi@(protected)">ericlampi@(protected)</a>>:</span> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0 .8ex; BORDER-LEFT: #ccc 1px solid">OK this should be an easy one.<br><br>I rarely render .pic anymore, opting for .sgi since<br>it's faster to load into Flame. How do I set the <br>default render format to .sgi? I would also like to<br>do the same for the resolution and frame rate.<br><br>It's a shame that when you make a new pass it doesn't<br>look at the previous passes settings. I've had<br> several occasions where I am rushing to get out some<br>new elements and I forget to change one of those<br>settings. Seems to me that it should be set once and<br>cascade down for every new pass isntead of using the <br> default. Just my opinion. :)<br><br>Eric<br><br>Freelance 3-D Animator, F/X Artist, Particle Man<br>---<br>Unsubscribe? Mail <a href="mailto :Majordomo@(protected)">Majordomo@(protected)</a> with the following text in body: <br>unsubscribe xsi<br></blockquote></div><br>
|
|