v5.0
Returns the X3DObject object to
which the parameter belongs. The Parent3DObject property can be
very useful when dealing with cluster properties and other objects
that are buried deep in a 3dobject hierarchy.
Note: This property cannot be used within the _Update function of a
CustomOperator.
// get accessor X3DObject rtn = Parameter.Parent3DObject; |
/* The Parent3DObject property can be very useful when dealing with custom property or other objects that are nested under the 3dobject. */ NewScene( null, false ); var oModel = Application.ActiveSceneRoot.AddModel(); var oNull = oModel.AddNull(); var obj = oNull.AddGeometry( "Cube", "MeshSurface" ); var oPSet = obj.AddCustomProperty( "Controls" ); var x = oPSet.AddParameter3 ( "ControlX", siDouble, 10.0, 0.0, 100.0 ); var y = oPSet.AddParameter3 ( "ControlY", siDouble, 10.0, 0.0, 100.0 ); var z = oPSet.AddParameter3 ( "ControlZ", siDouble, 10.0, 0.0, 100.0 ); x.AddFCurve(); // Find all animated objects var oParamCol = obj.AnimatedParameters(); // Find the 3dobject of each animated parameter. for ( var i = 0; i < oParamCol.Count; i++ ) { var oParam = oParamCol(i); Application.LogMessage( oParam.Name + " belongs on object " + oParam.Parent3DObject.Name ); } // Expected Result: //INFO : "ControlX belongs on object Cube" |