ValueMap.Set operator

導入

v9.0 (2011)

詳細

指定された名前に一致する値を設定します。この名前に一致するエントリが存在しない場合は、その名前と値の組み合わせが自動で追加されます。その名前に一致するエントリがすでに存在する場合は、値が更新されます。

C#構文

ValueMap.Set( String in_name, Object in_Value );

スクリプト構文

ValueMap.Set( in_name, in_value );

パラメータ

パラメータ タイプ 説明
in_name String 設定する値の名前
in_value Variant 設定する値

1. Python の例

# See the example under the ValueMap.Remove method

2. VBScript の例

'

'	This example demonstrates how to add a new name-value pair

'	to the ValueMap by calling the Set method using a name

'	that is not already defined in the ValueMap.

'

for each oShaderDef in Application.ShaderDefinitions

	if (UBound(oShaderDef.Attributes.Names) > -1) then

		oShaderDef.Attributes.Set "Dirty", True

		aNames = oShaderDef.Attributes.Names

		aValues = oShaderDef.Attributes.Values

		Application.LogMessage oShaderDef.Name & " has " & UBound(aNames)+1 & " attribute(s):"

		for i=0 to UBound(aNames)

			Application.LogMessage vbTab & "- " & aNames(i) & " == '" & _

				oShaderDef.Attributes.Get(aValues(i)) & "'"

		next

		exit for

	end if

next

' INFO : Softimage.soft_light.1.0 has 2 attribute(s):

' INFO : 	- {C535FA4D-E44A-45EB-AEE0-9F9AAEA91745} == ''

' INFO : 	- Dirty == 'True'

関連項目

ValueMap.Get ValueMap.Names ValueMap.Values