SICreateEmptyPartition

詳細

指定のタイプ(オブジェクトまたはライト)の新しい空のパーティションを作成し、検査します。 このコマンドは、シーン内のすべてを選択解除して Render メニューから[Pass - Partition] > [New]を選択することと同等の機能です。

注: 空のパーティションを作成したらそこに項目を追加することができますが、CreatePartition コマンドと SICreatePartition コマンドは両方の作業を同時に実行します。

パーティションはパスの一部で、グループと同様に振舞います。 パーティションは、パス内でシーン エレメントを編成するために使用します。 パーティションのタイプはオブジェクトおよびライトの 2 つです。 レンダ パスは、シーンの画像レイヤを作成します。作成したレイヤを他のパスと合成し、完全なイメージを作成できます。

注: このコマンドは、出力引数を使用します。C# および一部のスクリプト言語(JScript、PerlScript、Python など)は、リファレンスによって渡される引数をサポートしていません。このため、状況に応じた適切な回避策を実行する必要があります。

スクリプト言語の場合、このコマンドは出力引数を取得するために使用できる ISIVTCollection を戻します。

C# の場合は、XSIApplication.ExecuteCommand メソッドを使用してこのコマンドを呼び出すことができます。ExecuteCommand は、出力引数を C# の System.Object (出力引数の Array を含む)にパック化します(詳細については、「C# からのコマンドの呼び出し」を参照)。

スクリプト構文

SICreateEmptyPartition( [Target], [Name], [Type], [Value] );

パラメータ

パラメータ タイプ 説明
Target 文字列 パーティションを追加するパス。

デフォルト値:選択されているパス(現在のパス)

Name 文字列 新しいパーティションの名前

デフォルト値: 「Partition」

Type siPartitionType 作成するパーティションのタイプ。

デフォルト値: siObjectPartition

Value Group オブジェクトを含む XSICollection 新しいパーティションを戻します。

VBScript の例

'

'	This example demonstrates how to create an empty partition

'	and then add an object to it. It also shows how you can 

'	access partition information from a particular pass.

'

' Create a new scene 

NewScene , false

' Create a cone to add to one of the partitions

Set oCone = GetPrim( "Cone", "MeshSurface" )

' Create a standard (default) pass 

CreatePass , "PassMeBy", oPass

' Print partition info for default pass

getPartInfo oPass

' Now add an empty light partition to the pass and add the light to it

SICreateEmptyPartition oPass, "Sweet_Sorrow", siLightPartition, oLightPart

AddToPartition oLightPart(0), "Light"

' Print new partition info 

getPartInfo oPass

function getPartInfo( in_pass )

	Application.LogMessage "Partitions for " & in_pass & ":"

	Application.LogMessage "--------------------------------"

	' Create an XSICollection with the partition info

	set oParts = CreateObject( "XSI.Collection" )

	oParts.SetAsText in_pass & ".Partitions.*" 

	For Each p In oParts

		Application.LogMessage p

	Next

end function

' Output of the above script:

'INFO : "Partitions for Passes.PassMeBy:"

'INFO : "--------------------------------"

'INFO : "Passes.PassMeBy.Background_Objects_Partition"

'INFO : "Passes.PassMeBy.Background_Lights_Partition"

'

'INFO : "Partitions for Passes.PassMeBy:"

'INFO : "--------------------------------"

'INFO : "Passes.PassMeBy.Background_Objects_Partition"

'INFO : "Passes.PassMeBy.Background_Lights_Partition"

'INFO : "Passes.PassMeBy.Sweet_Sorrow"

関連項目

RenderPasses CreateLayer CreatePartition CreatePass GetCurrentPass SetCurrentPass DeleteCurrentPass SICreateLayer CreateEmptyPartition AddToPartition