Hi,
Don't know if this helps (in VB)
set oPass = Selection(0)
set oPartitionList = CreateObject( "XSI.Collection" )
oPartitionList.SetAsText oPass & ".Partitions.*"
Adam
> -----Original Message-----
> From: owner-xsi(at)Softimage.COM
> [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Nicolas Langlois
> Sent: 14 August 2007 20:49
> To: xsi(at)Softimage.COM
> Subject: Getting all partitions from a pass
>
> Hello list,
>
> I know this has probably been asked before but it seems to
> have changed since 6.0 so I'm requesting you're help. Is
> there any way to get all of the partitions from a pass? I've
> tried NestedObjects, Children, EnumElements, even ClassID,
> and they all seem to only return the
> "Background_Objects_Partition" and the
> "Background_Lights_Partition" and an object called
> "Partitions" that I suspect must contain all the extra
> partitions but that seem unaccessible. Where's the can opener??? :)
>
> This makes it easier to find the Background_Objects_Partition
> and the Background_Lights_Partition but what about the other
> partitions and their members?
>
> Here's a snippet of code to start off, Any help is greatly
> appreciated.
>
> ################
> # Find all the passes in the scene
> oPasses = Application.ActiveProject.ActiveScene.Passes
>
> for oPass in oPasses:
> Application.LogMessage("Pass: %s" % oPass.Name)
> oNestedObjects = oPass.NestedObjects
> oPartitions = []
> for oNestedObject in oNestedObjects:
> # Find all partitions in the scene
> if Application.ClassName(oNestedObject) == "Group":
> oPartitions.append(oNestedObject)
> for oPartition in oPartitions:
> Application.LogMessage(" Partition: %s" % oPartition.Name)
> # Find all objects under partitions
> oObjectsInPartion = oPartition.Members
> for oObjectInPartion in oObjectsInPartion:
> Application.LogMessage(" oObjectInPartion: %s" %
> oObjectInPartion.Name)
> ################
>
> --
>
>
> Nicolas Langlois
> Senior/Lead Rigger/TD
> Buzz Image
>
> ---
> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following
> text in body:
> unsubscribe xsi
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit
> http://www.messagelabs.com/email
> ______________________________________________________________________
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.476 / Virus Database: 269.11.17/951 - Release
> Date: 13/08/2007 10:15
>
>
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.17/951 - Release Date: 13/08/2007 10:15
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi