ProjectItem.IsLocked operator

Introduced

v4.0

Description

Returns whether an object is locked or not. If there is only one lock level that is set on the object it will be consider locked. If the object is not locked siLockLevelNone is returned.

C# Syntax

Boolean ProjectItem.IsLocked();

Scripting Syntax

oBoolean = ProjectItem.IsLocked();

Return Value

Boolean

Examples

JScript Example

NewScene( null, false );
CreatePrim( "Cone", "MeshSurface" );
var oObj = Application.ActiveSceneRoot.FindChild( "Cone" );
oObj.SetLock( siLockLevelManipulation );
Application.LogMessage( "Is the cone locked?: " + oObj.IsLocked() );
oObj.UnSetLock( siLockLevelManipulation )
Application.LogMessage( "Is the cone still locked?: " + oObj.IsLocked() );
// Expected result:
//INFO : Is the cone locked?: true
//INFO : Is the cone still locked?: true

See Also

ProjectItem.IsLocked ProjectItem.LockType ProjectItem.LockLevel ProjectItem.SetLock ProjectItem.UnSetLock ProjectItem.LockMasters Parameter.IsLocked Lock Unlock