UVProperty
 
 
 

UVProperty

Object Hierarchy

Inheritance

SIObject

ProjectItem

Property

ClusterProperty

UVProperty

Introduced

v10.0 (2012)

Description

UVProperty is a kind of ClusterProperty used for storing and accessing the UV information of a cluster.

UVProperty supports a special API for pinning and unpinning UV components. Pinning acts like a lock. When UV components are pinned, they are not affected by operations performed on them. For instance, pinned UVs cannot be rotated or scaled in the Texture Editor.

Methods

AddCustomOp AddICEAttribute AddScriptedOp AddScriptedOpFromFile
AnimatedParameters2 BelongsTo operator EvaluateAt GetICEAttributeFromName
IsA IsAnimated2 IsClassOf operator IsEqualTo operator
IsKindOf IsLocked operator IsSelected operator LockOwners
PinAllComponents PinComponents RemoveICEAttribute SetAsSelected operator
SetCapabilityFlag operator SetLock TaggedParameters UnPinAllComponents
UnPinComponents UnSetLock    
       

Properties

Application Branch operator BranchFlag operator Capabilities operator
Categories Elements operator EvaluationID Families operator
FullName operator Help HierarchicalEvaluationID ICEAttributes
LockLevel operator LockMasters operator LockType operator Model
Name operator NestedObjects ObjectID Origin
OriginPath Owners PPGLayout operator Parameters operator
Parent Parent3DObject PinComponentArray Selected operator
Singleton operator Type operator    
       

Examples

Python Example

#
# Script to demonstrate how to pin and unpin UV components
#
from sipyutils import *
si = si()
# Create some UV components
root = si.ActiveSceneRoot
cube = root.AddGeometry( "Cube", "MeshSurface" )
si.BlendInPresets( "Image", cube, 1, False )
si.CreateTextureSupport( cube, C.siTxtUV, C.siTxtDefaultSpherical, "Texture_Support" )
si.SetInstanceDataValue( None, cube.FullName + ".Material.UV", "Texture_Support" )
uvprop = disp(cube.Material.CurrentUV)
clsIndices = uvprop.Parent.Elements.Array
# Pin components 
toPin = clsIndices[5:-8]
uvprop.PinComponents( toPin )
uvsamples = uvprop.PinComponentArray
log( 'Pinned components = %s' % str(uvsamples) )
# INFO : Pinned components = (5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
# Unpin last 6 components 
toUnPin = uvsamples[5:]
uvprop.UnPinComponents( toUnPin )
uvsamples = uvprop.PinComponentArray
log( 'Pinned components = %s' % str(uvsamples) )
# INFO : Pinned components = (5, 6, 7, 8, 9, 10)

See Also

Cluster Texture