v7.0
シェーダ コンテナ(コンパウンドまたはマテリアル)のシェーダをネスト解除します。
UnnestShaders( InputObjs, ShaderContainer ); |
| パラメータ | タイプ | 説明 |
|---|---|---|
| InputObjs | 文字列 |
ネスト解除対象のシェーダ。 デフォルト値:指定されていない場合は、選択するよう求められます。 |
| ShaderContainer | 文字列 |
ネストを解除するシェーダを含むコンテナ。 デフォルト値: "" |
#
# This example demonstrates how to use the UnnestShaders command.
#
null = None
true = 1
false = 0
app = Application
app.NewScene(null, false)
app.CreatePrim("Sphere", "MeshSurface", null, null)
# Create a Shader Compound Containing Phong
app.CreateShaderCompound("Sources.Materials.DefaultLib.Scene_Material.Phong", null)
# Create 2 shaders under the material
app.CreateShaderFromPreset("Shaders\\Texture\\Cell.Preset", "Sources.Materials.DefaultLib.Scene_Material", null)
app.CreateShaderFromPreset("Shaders\\Texture\\Checkerboard.Preset", "Sources.Materials.DefaultLib.Scene_Material", null)
# Nest both shaders under the shader compound
shadersToNest = "Sources.Materials.DefaultLib.Scene_Material.Cell,Sources.Materials.DefaultLib.Scene_Material.CheckerBoard"
app.NestShaders( shadersToNest, "Sources.Materials.DefaultLib.Scene_Material.ShaderCompound" )
# Unnest one shader from the shader compound. A this point the shader does not
# have a parent, you should always renest it under a container.
shadersToUnnest = "Sources.Materials.DefaultLib.Scene_Material.ShaderCompound.Cell"
app.UnnestShaders( shadersToUnnest , "Sources.Materials.DefaultLib.Scene_Material" )
# Renesting under the material.
app.NestShaders( shadersToUnnest , "Sources.Materials.DefaultLib.Scene_Material" ) |
CreateShaderFromPreset CreateShadersFromMaterialPreset CreateShaderFromCLSID CreateShaderFromProgID CreateShaderCompound NestShaders AddShaderCompoundPort RemoveShaderCompoundPort MoveShaderCompoundPort RenameShaderCompoundPort ExportShaderCompound ImportShaderCompound ExplodeShaderCompound SetShaderCompoundPropertiesEx GetShaderCompoundProperties EditShaderCompoundPPGLogic