C# 클래스 HoudiniEngineUnity.HEU_SessionManager

Manages a session for Houdini Engine. Supports all types of sessions.
파일 보기 프로젝트 열기: sideeffects/HoudiniEngineForUnity 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
_createSessionFromTypeDelegate CreateSessionFromTypeDelegate

공개 메소드들

메소드 설명
CheckVersionMatch ( ) : bool

Check that the Unity plugin's Houdini Engine version matches with the linked Houdini Engine API version.

ClearConnectionError ( ) : bool
CloseAllSessions ( ) : void

Close all sessions

CloseDefaultSession ( ) : bool

Close the default session.

ConnectSessionSyncUsingThriftPipe ( string pipeName, bool autoClose, float timeout, bool logError ) : bool
ConnectSessionSyncUsingThriftSocket ( string hostName, int serverPort, bool autoClose, float timeout, bool logError ) : bool
ConnectThriftPipeSession ( string pipeName, bool autoClose, float timeout ) : bool
ConnectThriftSocketSession ( string hostName, int serverPort, bool autoClose, float timeout ) : bool
CreateCustomSession ( ) : bool

Create custom Houdini Engine session.

CreateInProcessSession ( ) : bool

Create in-process Houdini Engine session.

CreateSessionFromType ( System.Type type ) : HEU_SessionBase
CreateSessionObject ( ) : HEU_SessionBase

Create new session if specified.

CreateThriftPipeSession ( string pipeName, bool autoClose, float timeout, bool logError ) : bool

Create pipe session for Houdini Engine.

CreateThriftSocketSession ( string hostName, int serverPort, bool autoClose, float timeout, bool logError ) : bool

Create socket session for Houdini Engine.

GetComposedChildNodeList ( HEU_SessionBase session, HAPI_NodeId parentNodeID, HAPI_NodeTypeBits nodeTypeFilter, HAPI_NodeFlagsBits nodeFlagFilter, bool bRecursive, Array &childNodeIDs, bool bLogIfError = true ) : bool

Get the composed list of child node IDs.

GetComposedObjectListMemorySafe ( HEU_SessionBase session, HAPI_NodeId nodeID, Array objectInfos, int start, int length ) : bool

Fill an array of HAPI_ObjectInfo list. Use for large arrays where marshalling is done in chunks.

GetComposedObjectTransformsMemorySafe ( HEU_SessionBase session, HAPI_NodeId nodeID, HAPI_RSTOrder rstOrder, Array transforms, int start, int length ) : bool

Fill in array of HAPI_Transform list. Use for large arrays where marshalling is done in chunks.

GetConnectionError ( bool clear ) : string
GetCurrentLicense ( bool bLogError ) : HAPI_License

Returns the current license value.

GetDefaultSession ( ) : HEU_SessionBase

Returns the default session in use. Tries to reconnect to a stored session. Does not create a new session.

GetGroupMembership ( HEU_SessionBase session, HAPI_NodeId nodeID, HAPI_PartId partID, HAPI_GroupType groupType, string groupName, Array &membership, bool isInstanced ) : bool

Get group membership

GetGroupNames ( HEU_SessionBase session, HAPI_NodeId nodeID, HAPI_PartId partID, HAPI_GroupType groupType, bool isInstanced ) : string[]

Gets the group names for given group type.

GetHoudiniPathOnMacOS ( string houdiniPath ) : string
GetLastSessionError ( ) : string

Returns last session error.

GetNodeInputName ( HAPI_NodeId nodeID, int inputIndex, string &inputName ) : bool

Get the name of the given node's input.

GetNodeName ( HAPI_NodeId nodeID, HEU_SessionBase session = null ) : string

Returns the name of the specified node.

GetOrCreateDefaultSession ( bool bNotifyUserError = true ) : HEU_SessionBase

Returns a valid session by either reconnecting to an existing session, or creating a new session. Note that this will display error (once) if unable to get a valid session.

GetSessionData ( ) : HEU_SessionData

Return the existing session data.

GetSessionInfo ( ) : string

Return the session info.

GetSessionWithID ( long sessionID ) : HEU_SessionBase

Get the session associated with this session ID. As long as the session was registered, this will return it.

GetString ( int stringHandle, HEU_SessionBase session = null ) : string

Get the string value of the given string handle.

GetStringValuesFromStringIndices ( Array strIndices ) : string[]
GetUniqueMaterialShopName ( HAPI_NodeId assetID, HAPI_NodeId materialID ) : string
InitializeDefaultSession ( ) : bool
IsHARSProcessRunning ( int processID ) : bool
LoadAllSessionData ( ) : void

Load stored session data and recreate the session objects.

LoadSessionFromHIP ( bool bCookNodes, HEU_SessionBase session = null ) : bool

Load a HIP file into given session. The user will be prompted to choose a HIP file via Unity's file dialog.

LoadStoredDefaultSession ( ) : bool

Tries to load a stored default session. This would be after a code refresh or if the Houdini session is still running but Unity hasn't connected to it.

OpenHoudini ( string args ) : bool
OpenSessionInHoudini ( HEU_SessionBase session = null ) : bool

Open given session in a new Houdini instance.

RecreateDefaultSessionData ( ) : void
RegisterSession ( long sessionID, HEU_SessionBase session ) : void

Register the given session so that it can be retrieved via its session ID. This guarantees persistence reconnectiong across code refresh/compiles.

RestartSession ( ) : bool

Close default (if valid) and open a new session.

SaveAllSessionData ( ) : void

Save given list of sessions (HEU_SessionData) into storage for retrieval later. A way to persist current session information through code refresh/compiles.

SaveSessionToHIP ( bool bLockNodes, HEU_SessionBase session = null ) : bool

Save given session to a HIP file. The user will be prompted with Unity's file dialog to choose HIP file location.

UnregisterSession ( long sessionID ) : void

Unregister the session (used when closing).

ValidatePluginSession ( HEU_SessionBase session = null ) : bool

Returns true if the plugin is installed properly, and that a session (new or existing) can be established. Notifies user if either fails. This can be called before each operation into Houdini Engine to establish or reconnect to session.

비공개 메소드들

메소드 설명
CheckAndCloseExistingSession ( ) : void

Closes session if one exists and is valid. Trying to close invalid session might throw error so this bypasses it.

InternalValidateSceneAssets ( ) : void

Goes through all assets in scene, and re-registers them with the scene they were originally created in. If their session is not valid, the asset is invalidated so it will be created again in the default session.

메소드 상세

CheckVersionMatch() 공개 정적인 메소드

Check that the Unity plugin's Houdini Engine version matches with the linked Houdini Engine API version.
public static CheckVersionMatch ( ) : bool
리턴 bool

ClearConnectionError() 공개 정적인 메소드

public static ClearConnectionError ( ) : bool
리턴 bool

CloseAllSessions() 공개 정적인 메소드

Close all sessions
public static CloseAllSessions ( ) : void
리턴 void

CloseDefaultSession() 공개 정적인 메소드

Close the default session.
public static CloseDefaultSession ( ) : bool
리턴 bool

ConnectSessionSyncUsingThriftPipe() 공개 정적인 메소드

public static ConnectSessionSyncUsingThriftPipe ( string pipeName, bool autoClose, float timeout, bool logError ) : bool
pipeName string
autoClose bool
timeout float
logError bool
리턴 bool

ConnectSessionSyncUsingThriftSocket() 공개 정적인 메소드

public static ConnectSessionSyncUsingThriftSocket ( string hostName, int serverPort, bool autoClose, float timeout, bool logError ) : bool
hostName string
serverPort int
autoClose bool
timeout float
logError bool
리턴 bool

ConnectThriftPipeSession() 공개 정적인 메소드

public static ConnectThriftPipeSession ( string pipeName, bool autoClose, float timeout ) : bool
pipeName string
autoClose bool
timeout float
리턴 bool

ConnectThriftSocketSession() 공개 정적인 메소드

public static ConnectThriftSocketSession ( string hostName, int serverPort, bool autoClose, float timeout ) : bool
hostName string
serverPort int
autoClose bool
timeout float
리턴 bool

CreateCustomSession() 공개 정적인 메소드

Create custom Houdini Engine session.
public static CreateCustomSession ( ) : bool
리턴 bool

CreateInProcessSession() 공개 정적인 메소드

Create in-process Houdini Engine session.
public static CreateInProcessSession ( ) : bool
리턴 bool

CreateSessionFromType() 공개 정적인 메소드

public static CreateSessionFromType ( System.Type type ) : HEU_SessionBase
type System.Type
리턴 HEU_SessionBase

CreateSessionObject() 공개 정적인 메소드

Create new session if specified.
public static CreateSessionObject ( ) : HEU_SessionBase
리턴 HEU_SessionBase

CreateThriftPipeSession() 공개 정적인 메소드

Create pipe session for Houdini Engine.
public static CreateThriftPipeSession ( string pipeName, bool autoClose, float timeout, bool logError ) : bool
pipeName string
autoClose bool
timeout float
logError bool
리턴 bool

CreateThriftSocketSession() 공개 정적인 메소드

Create socket session for Houdini Engine.
public static CreateThriftSocketSession ( string hostName, int serverPort, bool autoClose, float timeout, bool logError ) : bool
hostName string Network name of the host.
serverPort int Network port of the host.
autoClose bool
timeout float
logError bool
리턴 bool

GetComposedChildNodeList() 공개 정적인 메소드

Get the composed list of child node IDs.
public static GetComposedChildNodeList ( HEU_SessionBase session, HAPI_NodeId parentNodeID, HAPI_NodeTypeBits nodeTypeFilter, HAPI_NodeFlagsBits nodeFlagFilter, bool bRecursive, Array &childNodeIDs, bool bLogIfError = true ) : bool
session HEU_SessionBase
parentNodeID HAPI_NodeId Parent node ID
nodeTypeFilter HAPI_NodeTypeBits Node type by which to filter the children
nodeFlagFilter HAPI_NodeFlagsBits Node flags by which to filter the children
bRecursive bool Whether or not to compose the list recursively
childNodeIDs Array
bLogIfError bool
리턴 bool

GetComposedObjectListMemorySafe() 공개 정적인 메소드

Fill an array of HAPI_ObjectInfo list. Use for large arrays where marshalling is done in chunks.
public static GetComposedObjectListMemorySafe ( HEU_SessionBase session, HAPI_NodeId nodeID, Array objectInfos, int start, int length ) : bool
session HEU_SessionBase
nodeID HAPI_NodeId The parent node ID
objectInfos Array Array to fill. Should atleast be size of length
start int At least 0 and at most object count returned by ComposeObjectList
length int Object count returned by ComposeObjectList. Should be at least 0 and at most object count - start
리턴 bool

GetComposedObjectTransformsMemorySafe() 공개 정적인 메소드

Fill in array of HAPI_Transform list. Use for large arrays where marshalling is done in chunks.
public static GetComposedObjectTransformsMemorySafe ( HEU_SessionBase session, HAPI_NodeId nodeID, HAPI_RSTOrder rstOrder, Array transforms, int start, int length ) : bool
session HEU_SessionBase
nodeID HAPI_NodeId The parent node ID
rstOrder HAPI_RSTOrder Transform order
transforms Array Array to fill. Should at least be size of length
start int At least 0 and at most object count returned by ComposeObjectList
length int Object count returned by ComposeObjectList. Should be at least 0 and at most object count - start
리턴 bool

GetConnectionError() 공개 정적인 메소드

public static GetConnectionError ( bool clear ) : string
clear bool
리턴 string

GetCurrentLicense() 공개 정적인 메소드

Returns the current license value.
public static GetCurrentLicense ( bool bLogError ) : HAPI_License
bLogError bool
리턴 HAPI_License

GetDefaultSession() 공개 정적인 메소드

Returns the default session in use. Tries to reconnect to a stored session. Does not create a new session.
public static GetDefaultSession ( ) : HEU_SessionBase
리턴 HEU_SessionBase

GetGroupMembership() 공개 정적인 메소드

Get group membership
public static GetGroupMembership ( HEU_SessionBase session, HAPI_NodeId nodeID, HAPI_PartId partID, HAPI_GroupType groupType, string groupName, Array &membership, bool isInstanced ) : bool
session HEU_SessionBase
nodeID HAPI_NodeId
partID HAPI_PartId
groupType HAPI_GroupType
groupName string
membership Array Array of ints representing the membership of this group
isInstanced bool
리턴 bool

GetGroupNames() 공개 정적인 메소드

Gets the group names for given group type.
public static GetGroupNames ( HEU_SessionBase session, HAPI_NodeId nodeID, HAPI_PartId partID, HAPI_GroupType groupType, bool isInstanced ) : string[]
session HEU_SessionBase
nodeID HAPI_NodeId The node ID
partID HAPI_PartId
groupType HAPI_GroupType The group type to query
isInstanced bool
리턴 string[]

GetHoudiniPathOnMacOS() 공개 정적인 메소드

public static GetHoudiniPathOnMacOS ( string houdiniPath ) : string
houdiniPath string
리턴 string

GetLastSessionError() 공개 정적인 메소드

Returns last session error.
public static GetLastSessionError ( ) : string
리턴 string

GetNodeInputName() 공개 정적인 메소드

Get the name of the given node's input.
public static GetNodeInputName ( HAPI_NodeId nodeID, int inputIndex, string &inputName ) : bool
nodeID HAPI_NodeId Node's ID
inputIndex int Index of the input
inputName string Input name string
리턴 bool

GetNodeName() 공개 정적인 메소드

Returns the name of the specified node.
public static GetNodeName ( HAPI_NodeId nodeID, HEU_SessionBase session = null ) : string
nodeID HAPI_NodeId Node ID of the node to find the name of
session HEU_SessionBase Session that the node should be in
리턴 string

GetOrCreateDefaultSession() 공개 정적인 메소드

Returns a valid session by either reconnecting to an existing session, or creating a new session. Note that this will display error (once) if unable to get a valid session.
public static GetOrCreateDefaultSession ( bool bNotifyUserError = true ) : HEU_SessionBase
bNotifyUserError bool
리턴 HEU_SessionBase

GetSessionData() 공개 정적인 메소드

Return the existing session data.
public static GetSessionData ( ) : HEU_SessionData
리턴 HEU_SessionData

GetSessionInfo() 공개 정적인 메소드

Return the session info.
public static GetSessionInfo ( ) : string
리턴 string

GetSessionWithID() 공개 정적인 메소드

Get the session associated with this session ID. As long as the session was registered, this will return it.
public static GetSessionWithID ( long sessionID ) : HEU_SessionBase
sessionID long Session ID to use for matching to session
리턴 HEU_SessionBase

GetString() 공개 정적인 메소드

Get the string value of the given string handle.
public static GetString ( int stringHandle, HEU_SessionBase session = null ) : string
stringHandle int String handle to query.
session HEU_SessionBase
리턴 string

GetStringValuesFromStringIndices() 공개 정적인 메소드

public static GetStringValuesFromStringIndices ( Array strIndices ) : string[]
strIndices Array
리턴 string[]

GetUniqueMaterialShopName() 공개 정적인 메소드

public static GetUniqueMaterialShopName ( HAPI_NodeId assetID, HAPI_NodeId materialID ) : string
assetID HAPI_NodeId
materialID HAPI_NodeId
리턴 string

InitializeDefaultSession() 공개 정적인 메소드

public static InitializeDefaultSession ( ) : bool
리턴 bool

IsHARSProcessRunning() 공개 정적인 메소드

public static IsHARSProcessRunning ( int processID ) : bool
processID int
리턴 bool

LoadAllSessionData() 공개 정적인 메소드

Load stored session data and recreate the session objects.
public static LoadAllSessionData ( ) : void
리턴 void

LoadSessionFromHIP() 공개 정적인 메소드

Load a HIP file into given session. The user will be prompted to choose a HIP file via Unity's file dialog.
public static LoadSessionFromHIP ( bool bCookNodes, HEU_SessionBase session = null ) : bool
bCookNodes bool True if nodes should be cooked on load
session HEU_SessionBase Session to load into. If null, will use default session
리턴 bool

LoadStoredDefaultSession() 공개 정적인 메소드

Tries to load a stored default session. This would be after a code refresh or if the Houdini session is still running but Unity hasn't connected to it.
public static LoadStoredDefaultSession ( ) : bool
리턴 bool

OpenHoudini() 공개 정적인 메소드

public static OpenHoudini ( string args ) : bool
args string
리턴 bool

OpenSessionInHoudini() 공개 정적인 메소드

Open given session in a new Houdini instance.
public static OpenSessionInHoudini ( HEU_SessionBase session = null ) : bool
session HEU_SessionBase Session to open. If null, will use default session.
리턴 bool

RecreateDefaultSessionData() 공개 정적인 메소드

public static RecreateDefaultSessionData ( ) : void
리턴 void

RegisterSession() 공개 정적인 메소드

Register the given session so that it can be retrieved via its session ID. This guarantees persistence reconnectiong across code refresh/compiles.
public static RegisterSession ( long sessionID, HEU_SessionBase session ) : void
sessionID long
session HEU_SessionBase
리턴 void

RestartSession() 공개 정적인 메소드

Close default (if valid) and open a new session.
public static RestartSession ( ) : bool
리턴 bool

SaveAllSessionData() 공개 정적인 메소드

Save given list of sessions (HEU_SessionData) into storage for retrieval later. A way to persist current session information through code refresh/compiles.
public static SaveAllSessionData ( ) : void
리턴 void

SaveSessionToHIP() 공개 정적인 메소드

Save given session to a HIP file. The user will be prompted with Unity's file dialog to choose HIP file location.
public static SaveSessionToHIP ( bool bLockNodes, HEU_SessionBase session = null ) : bool
bLockNodes bool Whether to lock nodes in HIP file so as not to recook them on load
session HEU_SessionBase Session to save out. If null, uses default session.
리턴 bool

UnregisterSession() 공개 정적인 메소드

Unregister the session (used when closing).
public static UnregisterSession ( long sessionID ) : void
sessionID long Session to remove from registry
리턴 void

ValidatePluginSession() 공개 정적인 메소드

Returns true if the plugin is installed properly, and that a session (new or existing) can be established. Notifies user if either fails. This can be called before each operation into Houdini Engine to establish or reconnect to session.
public static ValidatePluginSession ( HEU_SessionBase session = null ) : bool
session HEU_SessionBase
리턴 bool

프로퍼티 상세

_createSessionFromTypeDelegate 공개적으로 정적으로 프로퍼티

public static CreateSessionFromTypeDelegate _createSessionFromTypeDelegate
리턴 CreateSessionFromTypeDelegate