  | | | Getting partitions from passes | Getting partitions from passes 2004-06-16 - By Felix Gebhardt
Back
There is probably a more direct way to get to the Partitions parameter containing the actual Partitioncollection but this might get you going.
var oPassstuff = EnumElements( GetCurrentPass() ) for(i=0; i<oPassstuff .count; i++) { if (oPassstuff(i).name == "Partitions") { var oParts = EnumElements( oPassstuff(i) ); for(p=0; p<oParts.count; p++) { LogMessage(oParts(p)); } } }
Cheers, Felix
Bernard Lebel wrote: > 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
--- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|
 |