Re: Scripting : How to find the partitions in a pass ?

Date : Wed, 05 Oct 2005 16:47:05 +0000
To : XSI(at)Softimage.COM
From : "brad" <brad(at)cg-soup.com>
Subject : Re: Scripting : How to find the partitions in a pass ?
// Get a collection of partitions from a pass
var partColl = new ActiveXObject('XSI.Collection');
partColl.Items = passname + '.partitions.*';

I think most of us try to get OM pointers by first selecting something and seeing what address gets logged in the command history. A handful of XSI pointers don't easily fit this model, and partitions are one of them. These hidden objects, what I like to call "the jungle", can make working in the OM frustrating.

I think we need a section in the Wiki to expose these hidden addresses once we find them.

-Brad

>  -------Original Message-------
>  Thanks a lot Stephen.
>  Works like a charm.
>  --
>  guy rabiller | 3d technical director (at) LaMaison
>  
>  
>  
>  Stephen Blair wrote:
>  
>  >The NestedObjects for a Pass will include a Parameter object named "Partitions".
>  >
>  >The NestedObjects for this Parameter object are the partitions (Group objects).
>  >
>  >-----Original Message-----
>  >From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM]On Behalf
>  >Of Guy Rabiller
>  >Sent: Wed 05 October 2005 10:52 AM
>  >To: XSI(at)Softimage.COM
>  >Subject: Re: Scripting : How to find the partitions in a pass ?
>  >
>  >
>  >
>  >Correction,
>  >
>  >there seems to be a bug here in v5:
>  >
>  >On my side - on linux - I only get the 2 original partitions. Added
>  >Partitions dont show up in either NestedObjects nor EnumElements.
>  >
>  >Could someone confirm this ?
>  >
>  >--
>  >guy rabiller | 3d technical director (at) LaMaison
>  >
>  >
>  >
>  >
>  >
>  >Guy Rabiller wrote:
>  >
>  >  
>  >
>  >>Hi Guillaume,
>  >>
>  >>you can get those through NestedObjects Property. Filter the result to
>  >>get only Objects of Type '#Group' or ClassName 'Group'.
>  >>
>  >>We are still waiting for a Pass.Partitions or Pass.Groups Property
>  >>though..
>  >>
>  >>Interrestingly, Passes are kind of Groups, Partitions too, so we are
>  >>dealing with Groups in Groups here, and in 3d scene there are still
>  >>issues with Groups in Groups, so I assume there is room for
>  >>improvement in this area.
>  >>
>  >>Hope this helps.
>  >>
>  >>--
>  >>guy rabiller | 3d technical director (at) LaMaison
>  >>
>  >>
>  >>guillaume laforge wrote:
>  >>
>  >>    
>  >>
>  >>>Sorry for the basic question but I can't find an easy way to collect
>  >>>all the partitions in a pass ?
>  >>>
>  >>>Something like this :
>  >>>
>  >>>var oPasses = ActiveProject.ActiveScene.Passes
>  >>>
>  >>>for( var e = new Enumerator( oPasses ); !e.atEnd(); e.moveNext() )
>  >>>{
>  >>>   oPasse = e.item();
>  >>>
>  >>>   //Is it possible to do something like this ?
>  >>>   oPartitions = oPasse.PartitionCollection;
>  >>>   for( var PartColl = new Enumerator( oPartitions );
>  >>>!PartColl.atEnd(); e.moveNext() )
>  >>>   {
>  >>>      logmessage(PartColl.item().Name);
>  >>>   }
>  >>>}
>  >>>
>  >>>Is there a similar way ?
>  >>>
>  >>>Cheers,
>  >>>
>  >>>Guillaume Laforge
>  >>>Cg artist / Jr Td
>  >>>      
>  >>>
>  >>    
>  >>
>  
>  ---
>  Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
>  unsubscribe xsi
>  

---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.