v9.0 (2011)


Returns the 3D object's active Primitive for a given frame.

Note: Although the scene root is a kind of Model it does not support primitives. In this case this function will return Nothing.

This method has the added convenienence of allowing sequential evaluation of simulation objects without risking a simulation restart because the scene time and given time don't match.

Scripting Syntax

oReturn = X3DObject.GetActivePrimitive2( [Time] );

Return Value



Parameter Type Description
Time Double Time (in frames) at which to get the primitive

Default Value: Current time in frames


Python Example

#       This example illustrates how to get the active primitive object from an 
#       X3DObject object and how to detect if the object supports primitives.
from win32com.client import constants
Application.NewScene( None, False )
cube = Application.ActiveSceneRoot.AddGeometry( "Cube", "MeshSurface" )
twist = Application.ApplyOp("Twist", cube, 3, "siPersistentOperation", None, 0)[ 0 ]
twist.angle.AddFcurve( None, constants.siLinearInterpolation, None, [ 1.0, 0.0, 10.0, 180.0 ] )
Application.LogMessage( cube.ActivePrimitive.Geometry.Points[ 5 ].Position.Y )
Application.LogMessage( cube.GetActivePrimitive2(5).Geometry.Points[ 5 ].Position.Y )
# Expected results:
# INFO : -4.0
# INFO : 3.24463830138

See Also