Re: CrowdFX - can't set self.materials on "actor copies" mesh

2013-02-15 Thread Fabricio Chamon
brilliant!! thanks Stephen! 2013/2/15 Stephen Blair > o = Selection(0) > > > a = o.ActivePrimitive.Geometry.GetICEAttributeFromName("Materials") > > x = new VBArray( a.DataArray2D ).toArray() > y = new VBArray( x[0] ).toArray() > for ( var i = 0; i < y.length; i++ ) > { > LogMessage( y[i]

Re: CrowdFX - can't set self.materials on "actor copies" mesh

2013-02-15 Thread Stephen Blair
o = Selection(0) a = o.ActivePrimitive.Geometry.GetICEAttributeFromName("Materials") x = new VBArray( a.DataArray2D ).toArray() y = new VBArray( x[0] ).toArray() for ( var i = 0; i < y.length; i++ ) { LogMessage( y[i] ) } On 15/02/2013 4:16 PM, Stephen Blair wrote: Here's the Python way:

Re: CrowdFX - can't set self.materials on "actor copies" mesh

2013-02-15 Thread Stephen Blair
Here's the Python way: Application.SelectObj("Pedestrian_Mesh.Actor_Copies", None, None); o = Application.Selection(0) a = o.ActivePrimitive.Geometry.GetICEAttributeFromName("Materials") print len(a.DataArray2D) print len(a.DataArray2D[0] ) print a.DataArray2D[0][0] for s in a.DataArray2D[0][0]:

Re: CrowdFX - can't set self.materials on "actor copies" mesh

2013-02-15 Thread Fabricio Chamon
...but how to access the string array (values) of this attribute? 2013/2/15 Stephen Blair > Hi > > > > It is a string. > > // Using one of the CrowdFX sample scenes: > > SelectObj("Pedestrian_Mesh.Actor_Copies", null, null); > o = Selection(0) > > > //o.ActivePrimitive.Geometry.GetICEAttribute

Re: CrowdFX - can't set self.materials on "actor copies" mesh

2013-02-15 Thread Stephen Blair
Hi It is a string. // Using one of the CrowdFX sample scenes: SelectObj("Pedestrian_Mesh.Actor_Copies", null, null); o = Selection(0) //o.ActivePrimitive.Geometry.GetICEAttributeFromName("Materials").DataArray.toArray() // WARNING : 3391 - This ICEAttribute doesn't refer to a 1D array: a

Re: CrowdFX - can't set self.materials on "actor copies" mesh

2013-02-15 Thread Fabricio Chamon
thanks guys! I rebuilt the scene and started incremental saving too...Really hard scenario to work on, I hope this will get fixed soon. Another question: it seems really easy, but I can't get the ActorCopies ICE materials array via script. I feel it should be a singleton(which it is), 1D Array. Th