v4.0
Returns a collection of X3DObject objects for all parameters and objects locked at a specific level. This function can return local and nested parameters.
CXSICollection ProjectItem.LockOwners( siLockLevel, Boolean ); |
oReturn = ProjectItem.LockOwners( [Level], [Local] ); |
Parameter | Type | Description |
---|---|---|
Level | siLockLevel | One or more lock levels to check. If any of the levels is set
on an object or parameter, the object or parameter is added to the
return list.
Default Value: siLockLevelAll |
Local | Boolean | Specifies whether the lock to check is local to the object. If
true then all locked parameters that come from propagated
properties or from intermediate nodes are ignored (referenced
parameters). Intermediate nodes are nested under the object but are
not necessary owned by the object itself. For instance, the camera
object nested under a Texture_Projection_Def property is not
considered unless the target object is the projection property
itself. When the argument is set to false (default), all parameters
and objects are considered.
Default Value: False |
/* This example shows how to list all the lock owners from an object */ NewScene (null, null); CreatePrim( "Cone", "MeshSurface" ); CreatePrim( "Cube", "MeshSurface" ); CopyPaste( "cube", null, "cone", 1 ); var oGeom = GetValue( "Cone.polymsh.geom" ) var oParam1 = oGeom.Parameters("subdivu") var oParam2 = oGeom.Parameters("subdivv") var oCone = GetValue( "cone" ) var oCube = GetValue( "cube" ) // Set the lock on a child object oCube.SetLock( siLockLevelConstruction ) // Set the Locks on parameters oParam1.SetLock( siLockLevelAnimation ); oParam2.SetLock( siLockLevelManipulation ); // Get the parameters with siTag2 (subdivu) var oList = oCone.LockOwners( siLockLevelAll ); for ( i=0; i<oList.count; i++ ) { Application.LogMessage (oList.Item(i)); } |