Property

Object Hierarchy | 関連する C++クラス:Property

継承

SIObject

ProjectItem

プロパティ

説明

Property オブジェクトは、SceneItem のプロパティを表します。X3DObjectModelNullXSIProjectGroupSceneCluster などの Property を持つサンプル Softimage オブジェクトです。

注:特定タイプのオブジェクトである Softimage Property と、(メソッドに伴う)スクリプティングオブジェクトの一部であるプロパティを区別することは重要です。同様に、通常はオブジェクトの個々の数値属性である Softimage Parameter オブジェクトと、Softimage Property オブジェクトは異なるので注意してください。以上のような相違点を目でわかるように説明すると、Property はプロパティページで表され、Parameter はプロパティページの各スライダです。

Visibility や Geometry Approximation などのような一部のプロパティは、オブジェクトモデル内に特定のオブジェクトを持たず、Property オブジェクトにより表されます。MaterialClusterPropertyUserDataMapCustomPropertyStaticKinematicState などのその他の Property には、Property から継承される専用のオブジェクトが存在します。

Property オブジェクトはローカルオブジェクトまたは共有オブジェクトです。親オブジェクトのローカル Property のみを検索する場合は、SceneItem.LocalProperties プロパティが有効です。共有 PropertY のローカルコピーを作成する場合は、MakeLocal コマンドを使用します。共有Property内のすべての所有者を検索する場合は、ProjectItem.Ownersプロパティを使用します。共有プロパティには複数の親が存在するため、状況に応じて SIObject.Parent プロパティが異なるオブジェクトを戻すことがあります。

Property オブジェクトはParameterオブジェクトとして表示されることもあります。その他の場合は、ClusterProperty.ElementsMaterial.CurrentImageClip など、オブジェクト上の特定のプロパティとして表示されます。

メソッド

AddCustomOp AddICEAttribute AddScriptedOp AddScriptedOpFromFile
AnimatedParameters2 BelongsToオペレータ EvaluateAt GetICEAttributeFromName
IsA IsAnimated2 IsClassOfオペレータ IsEqualToオペレータ
IsKindOf IsLockedオペレータ IsSelectedオペレータ LockOwners
RemoveICEAttribute SetAsSelectedオペレータ SetCapabilityFlagオペレータ SetLock
TaggedParameters UnSetLock    
       

プロパティ

Application Branchオペレータ BranchFlagオペレータ Capabilitiesオペレータ
Categories EvaluationID Familiesオペレータ FullNameオペレータ
Help HierarchicalEvaluationID ICEAttributes LockLevelオペレータ
LockMastersオペレータ LockTypeオペレータ Model Nameオペレータ
NestedObjects ObjectID Origin OriginPath
Owners PPGLayoutオペレータ Parametersオペレータ Parent
Parent3DObject Selectedオペレータ Singletonオペレータ Typeオペレータ

1. VBScript の例

'VBScript Example demonstrating the creation of a custom property

newscene ,false

set nullObj = Application.ActiveProject.ActiveScene.Root.AddNull

set customProp = nullObj.AddProperty("Custom_parameter_list",, "MyCustomParam")

'You can also access this property by name

set customProp = nullObj.Properties.Item("MyCustomParam")

'Custom Properties allow you to create your own paramters

customProp.AddParameter "DoubleCustomParam", siDouble, , siReadOnly, _

								, , , 0.695, 0.0123, 10.456

LogMessage "Custom Property Name: " & customProp.Name

LogMessage "Custom Property Fullname: " & customProp.FullName

LogMessage "Custom Property Type: " & customProp.Type

'Output of this script:

'INFO : "Custom Property Name: MyCustomParam"

'INFO : "Custom Property Fullname: null.MyCustomParam"

'INFO : "Custom Property Type: customparamset"

2. VBScript の例

'vbscript: Example of Shared and Local Properties in Softimage

newscene , false

'Create a cylinder.  By default it will have several 

'local and inherited properties

set oCyl = ActiveSceneRoot.AddGeometry( "Cylinder", "NurbsSurface" )

PrintPropertyList oCyl.LocalProperties, "LocalProperties of Cylinder"

PrintPropertyList oCyl.Properties, "Properties of Cylinder"

'We can access properties by name

set oKine = oCyl.Properties( "Kinematics" )

set oMaterial = oCyl.Properties( "Scene_Material" )

'However code like the previous line that assumes what the name 

'of the material will be not ideal, because the material could 

'be renamed as follows:

oMaterial.Name = "MyMaterial"

'So this is a safer way to access the material property

set oMaterial = oCyl.Material

logmessage "New material Name: " & oMaterial.Name

'Material is an example of a Shared Property

PrintPropertyList oMaterial.Owners, "Owners of Material "

'Because we accessed the shared object via the Cylinder it will

'say that the cylinder is the parent

logmessage "Parent of Material: " & oMaterial.Parent

'This is still the same Material

logmessage "Another parent of same material: " & _

			 ActiveSceneRoot.Material.Parent

'This will give the cylinder its own copy of the material

MakeLocal oCyl.Material

logmessage "Number of owners after calling MakeLocal: " & _

			 oCyl.Material.Owners.Count

'Little helper routine to print out a collection

sub PrintPropertyList( in_PropCollection, in_strHeading )

	logmessage in_strHeading & " : "

	dim	 oProp

	for each oProp in in_PropCollection

		logmessage "        " & oProp.Name

	next

end sub

関連項目

SceneItem.AddProperty SceneItem.Properties SceneItem.LocalProperties Scene.Properties XSIProject.Properties