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]
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:
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]:
...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
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
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
6 matches
Mail list logo