TextureLayerPort

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

継承

SIObject

ProjectItem

TextureLayerPort

導入

v4.0

詳細

TextureLayerPort は、どのシェーダおよびマテリアルパラメータがTextureLayerに影響を与えるかを記述するために使用するオブジェクトです。シェーダの接続と同じように、レイヤによって処理されるシェーダポートがどれかを示します。

ポートにはいくつかのプロパティがあり、レイヤが 1 つのシェーディングパラメータにどのように影響するかがわかります。一般にこれらは、たとえば全体的なエフェクトを反転したり倍率を変更したりして、レイヤの設定をポートに合った方法に変更するために使用されます。レイヤをセットアップする目的は、すぐ下にあるレイヤと50%の割合でカラーをブレンドすることです。ただし、レイヤのアンビエントポートエフェクトは 25%だけですが、ディフューズポート処理では 100%に設定できます。

メソッド

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

プロパティ

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

JScript の例

/*
        This example shows creation of texture layer ports,
        plus enumerating and removing them.
*/
oRoot = ActiveProject.ActiveScene.Root;
oSph = oRoot.AddGeometry( "Torus", "MeshSurface" );
oMat = oSph.AddMaterial( "Phong" );
oPhong = oMat.Shaders(0);
// Add a layer at the end.
oLayer = oPhong.CreateTextureLayer( "DirtLayer" );
// Add some texture layer port connections on this layer.
oPorts = new Array(3);
oPorts[0] = oLayer.AddTextureLayerPort( oPhong.parameters( "ambient" ) );
oPorts[1] = oLayer.AddTextureLayerPort( oPhong.parameters( "diffuse" ) );
oPorts[2] = oLayer.AddTextureLayerPort( oPhong.parameters( "specular" ) );
Application.LogMessage( "Created " + oLayer.TextureLayerPorts.count + " ports." );
for ( i = 0; i < oLayer.TextureLayerPorts.count; i++ )
{
        oPort = oLayer.TextureLayerPorts(i);
        Application.LogMessage( (i+1) + ": " + oPort );
}
oLayer.RemoveTextureLayerPort( oPorts[1] );
oLayer.RemoveTextureLayerPort( oLayer.fullname + "." + oPorts[2].name );
count = oLayer.TextureLayerPorts.count;
Application.LogMessage( "Only " + count + " remain(s) after removal." );
for ( i = 0; i < count; i++ )
{
        Application.LogMessage( (i+1) + ": " + oLayer.TextureLayerPorts.item(i) );
}
// This example should log something like:
//INFO : "Created 3 ports."
//INFO : "1: torus.Material.Phong.DirtLayer.ambient"
//INFO : "2: torus.Material.Phong.DirtLayer.diffuse"
//INFO : "3: torus.Material.Phong.DirtLayer.specular"
//INFO : "Only 1 remain(s) after removal."
//INFO : "1: torus.Material.Phong.DirtLayer.ambient"

関連項目

TextureLayer.TextureLayerPorts TextureLayer.AddTextureLayerPort AddTextureLayerPorts