Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
Getting partitions from passes

Getting partitions from passes

2004-06-16       - By Bernard Lebel

 Back
Reply:     1     2     3     4     5     6     7     8     9  

Hello,

Sorry for the resend, but didn't get any answer. Is there a way to get ALL the
partitions from the pass? So far my code can collect the backgroup partitions,
but not additional ones under a pass.


// Get all passes
var oPasses = EnumElements( "Passes.List" );

// Enumerate through passes
for( var oPassEnum = new Enumerator( oPasses ); !oPassEnum.atEnd(); oPassEnum
.moveNext() )
{
   // Get pass
   var oPass = getvalue( oPassEnum.item() );

   // Get pass elements, returns collection
   var oPassKids = EnumElements( oPass );

   // Enumerate through children to find partitions
   for( var oPassKidsEnum = new Enumerator( oPassKids ); !oPassKidsEnum.atEnd(
); oPassKidsEnum.moveNext() )
   {
       // Big problem: only the background partitions seem to be accessible.
There is no way to get other partitions.
       logmessage( oPassKidsEnum.item().fullname );
   }
}

When I run this, I get this, even though I have additional partitions:

//INFO : "Passes.Default_Pass.Partitions"
//INFO : "Passes.Default_Pass.Background_Objects_Partition"
//INFO : "Passes.Default_Pass.Background_Lights_Partition"
//INFO : "Passes.Default_Pass.RenderOptions"
//INFO : "Camera"
//INFO : "Passes.Default_Pass.EnvironmentShaderStack"
//INFO : "Passes.Default_Pass.OutputShaderStack"
//INFO : "Passes.Default_Pass.VolumeShaderStack"
//INFO : "Passes.Default_Pass.Name"



I'm wondering what the heck is that Partitions object. I've run some tests to
find what it is, and seems to be a parameter.

var oPartitions = dictionary.getobject( "Passes.Default_Pass.Partitions" );
logmessage( oPartitions.type );
logmessage( classname(oPartitions) );
logmessage( oPartitions.value );

Logs

//INFO : "Partitions"
//INFO : "Parameter"
//INFO : ""



Any suggestion to reliably get all partitions under a pass would be a godsend.

Thanks
Bernard

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#d4d0c8 background="">
<DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Sorry for the resend, but didn't get any answer.
Is
there a way to get ALL the partitions from the pass? So far my code can collect
the backgroup partitions, but not additional ones under a pass.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>
<P><FONT color=#800080><FONT face="Courier New"><FONT color=#008080>// Get all
passes</FONT><BR></FONT><FONT face="Courier New">var oPasses = EnumElements(
"Passes.List" );</FONT></FONT></P>
<P><FONT face="Courier New" color=#800080><FONT color=#008080>// Enumerate
through passes</FONT><BR></FONT><FONT face="Courier New" color=#800080>for( var
oPassEnum = new Enumerator( oPasses ); !oPassEnum.atEnd(); oPassEnum.moveNext()
)<BR></FONT><FONT face="Courier New" color=#800080>{<BR></FONT><FONT
face="Courier New" color=#800080>&nbsp;&nbsp;&nbsp; <FONT color=#008080>// Get
pass<BR></FONT></FONT><FONT face="Courier New" color=#800080>&nbsp;&nbsp;&nbsp;
var oPass = getvalue( oPassEnum.item() );<BR></FONT><FONT
face="Courier New"><BR><FONT color=#800080>&nbsp;&nbsp;&nbsp; <FONT
color=#008080>// Get pass elements, returns
collection</FONT><BR></FONT></FONT><FONT face="Courier New"
color=#800080>&nbsp;&nbsp;&nbsp; var oPassKids = EnumElements( oPass
);<BR></FONT><FONT face="Courier New"><BR><FONT color=#800080>&nbsp;&nbsp;&nbsp
;
<FONT color=#008080>// Enumerate through children to find
partitions</FONT><BR></FONT></FONT><FONT face="Courier New"
color=#800080>&nbsp;&nbsp;&nbsp; for( var oPassKidsEnum = new Enumerator(
oPassKids ); !oPassKidsEnum.atEnd(); oPassKidsEnum.moveNext()
)<BR>&nbsp;&nbsp;&nbsp; </FONT><FONT face="Courier New"
color=#800080>{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT><FONT
face="Courier New" color=#800080><FONT color=#008080>// Big problem: only the
background partitions seem to be accessible. There is no way to get other
partitions.</FONT><BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </FONT><FONT
face="Courier New" color=#800080>logmessage( oPassKidsEnum.item().fullname
);<BR></FONT><FONT color=#800080><FONT face="Courier New">&nbsp;&nbsp;&nbsp;
}<BR></FONT><FONT face="Courier New">}</FONT></FONT></P>
<P><FONT face=Arial>When I run this, I get this, even though I have additional
partitions:</FONT></P><FONT color=#1a4424 size=2>
<P><FONT face="Courier New">//INFO : "Passes.Default_Pass.Partitions"<BR>//INFO
: "Passes.Default_Pass.Background_Objects_Partition"<BR>//INFO :
"Passes.Default_Pass.Background_Lights_Partition"<BR>//INFO :
"Passes.Default_Pass.RenderOptions"<BR>//INFO : "Camera"<BR>//INFO :
"Passes.Default_Pass.EnvironmentShaderStack"<BR>//INFO :
"Passes.Default_Pass.OutputShaderStack"<BR>//INFO :
"Passes.Default_Pass.VolumeShaderStack"<BR>//INFO :
"Passes.Default_Pass.Name"</FONT></P>
<P><FONT face=Arial color=#000000></FONT>&nbsp;</P>
<P><FONT face=Arial color=#000000>I'm wondering what the heck is that
Partitions
object. I've run some tests to find what it is, and seems to be a
parameter.</FONT></P><FONT face="Courier New" color=#000000 size=2>
<P><FONT color=#800080>var oPartitions = dictionary.getobject(
"Passes.Default_Pass.Partitions" );<BR>logmessage( oPartitions.type
);<BR>logmessage( classname(oPartitions) );<BR>logmessage( oPartitions.value
);</FONT></P>
<P><FONT face=Arial>Logs</FONT></P><FONT color=#1a4424 size=2>
<P>//INFO : "Partitions"<BR>//INFO : "Parameter"<BR>//INFO : ""</P>
<P>&nbsp;</P>
<P><FONT face=Arial color=#000000>Any suggestion to reliably get all partitions
under a pass would be a godsend.</FONT></P>
<P><FONT face=Arial
color=#000000>Thanks<BR>Bernard</FONT></P></FONT></FONT></FONT></FONT></DIV><
/BODY></HTML>