Public Member Functions | Public Attributes | Protected Member Functions

FBFileReference Class Reference

This reference page is linked to from the following overview topics: MotionBuilder 2014.


Search for all occurrences

Detailed Description

Objects Containing class.

This class is an interface to manipulate object's containing in the scene.

Definition at line 86 of file fbfilereference.h.

#include <fbfilereference.h>

Inheritance diagram for FBFileReference:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 FBFileReference (const char *pSingleLevelNamespace, FBNamespace *pParentNSObj)
 Constructor.
bool BakeRefEditToFile (const char *pFilePath=NULL)
 Save the current status of the referenced content back to disk.
void RevertRefEdit (FBPlug *pPlug=NULL, FBPlugModificationFlag pModificationFlag=kFBAllModifiedMask)
 Revert the modification on the referenced object/property to original state.
void ApplyRefEditPyScriptFromFile (const char *pRefEditPyScriptFilePath)
 Apply specified reference edits from python script file.
void ApplyRefEditPyScriptFromString (const char *pRefEditPyScript)
 Apply specified reference edits from Python script string.
bool DuplicateFileRef (const FBStringList &pDstNameSpaceList, bool pWithRefEdit=false)
 Duplicate/Clone the FileRef object and its referenced content (with/without refEdit).
const char * GetRefEdit (const char *pFilePath=NULL)
 Return the RefEdit for given RefFile Path.
bool ClearRefEdit (const char *pFilePath)
 Clear the cached RefEdit for the given ref file path.
bool ClearAllRefEdit ()
 Clear all cached Ref edit.
bool SwapReferenceFilePath (const char *pFilePath, bool pApplyAvailableRefEdit=true, bool pMergeCurrentRefEdit=true)
 Swap the Ref File Path and apply ref edit.
void GetRefFileList (FBStringList &pRefFileList) const
 Return a list of ref file path which has cached Ref Edit.

Public Attributes

FBPropertyString ReferenceFilePath
 Read Write Property: File Reference file path.
FBPropertyBool IsLoaded
 Read Write Property: File Reference Load/Unload.

Protected Member Functions

 FBFileReference (const char *pMultiLevelNamespace, HIObject pObject)
 Constructor.

Constructor & Destructor Documentation

FBFileReference ( const char *  pMultiLevelNamespace,
HIObject  pObject 
) [protected]

Constructor.

For internal use only.

Parameters:
pMultiLevelNamespaceFileReference name. This name will be used as namespace itself. it should follow such pattern "NS1[:NS2[:NS3]]]", where content inside [] is optional
pObjectFor internal use only.
FBFileReference ( const char *  pSingleLevelNamespace,
FBNamespace pParentNSObj 
)

Constructor.

Create a new direct children FileReference object

Parameters:
pSingleLevelNamespaceFileReference name. This name will be used as namespace itself. this name string shouldn't contain namespace string separator ":".
pParentNSObjthe parent namespace object. if NULl means to create top level namespace.

Member Function Documentation

bool BakeRefEditToFile ( const char *  pFilePath = NULL)

Save the current status of the referenced content back to disk.

If pFilePath is ReferenceFilePath, we're saving all the modification back to the original referenced file. Otherwise, we will export the referenced file plus modification to another file.

Parameters:
pFilePathFile path to export.
Returns:
true if successful.
void RevertRefEdit ( FBPlug pPlug = NULL,
FBPlugModificationFlag  pModificationFlag = kFBAllModifiedMask 
)

Revert the modification on the referenced object/property to original state.

Parameters:
pPlugthe plug to revert, revert all if NULL.
pModificationFlagthe modification type to revert.
void ApplyRefEditPyScriptFromFile ( const char *  pRefEditPyScriptFilePath)

Apply specified reference edits from python script file.

Parameters:
pRefEditPyScriptFilePathReference edits Python script file path.
void ApplyRefEditPyScriptFromString ( const char *  pRefEditPyScript)

Apply specified reference edits from Python script string.

Parameters:
pRefEditPyScriptReference edits Python script.
bool DuplicateFileRef ( const FBStringList pDstNameSpaceList,
bool  pWithRefEdit = false 
)

Duplicate/Clone the FileRef object and its referenced content (with/without refEdit).

Parameters:
pDstNameSpaceListthe list of target new namespace(s) for duplication. These new namespace(s) must be residing in editable scene segments.
pWithRefEditfalse by default, duplication won't include the existing ref edit. otherwise ref edit will be applied on the instantiated FileRef in someway.
Returns:
true if successful, false is fail.
const char* GetRefEdit ( const char *  pFilePath = NULL)

Return the RefEdit for given RefFile Path.

Parameters:
pFilePathThe Ref File Path to query against, default to be current Ref File.
Returns:
RefEdit as string
bool ClearRefEdit ( const char *  pFilePath)

Clear the cached RefEdit for the given ref file path.

Parameters:
pFilePathThe Ref File Path to query against, default to be current Ref File.
Returns:
True if the RefEdit for the given Ref File Path is cached and cleared properly.
bool ClearAllRefEdit ( )

Clear all cached Ref edit.

Returns:
True if the RefEdits are cleared properly.
bool SwapReferenceFilePath ( const char *  pFilePath,
bool  pApplyAvailableRefEdit = true,
bool  pMergeCurrentRefEdit = true 
)

Swap the Ref File Path and apply ref edit.

Parameters:
pFilePathThe new Ref File path to be used
pApplyAvailableRefEditApply the cached Ref Edit (if exist) for the Ref File to be used if True.
pMergeCurrentRefEditMerge the current RefEdit to if True if the reference items' name are matching.
Returns:
True if swap successfully.
void GetRefFileList ( FBStringList pRefFileList) const

Return a list of ref file path which has cached Ref Edit.

Parameters:
pRefFileListthe output parameter to collect the Ref File Path.

Member Data Documentation

Read Write Property: File Reference file path.

Definition at line 111 of file fbfilereference.h.

Read Write Property: File Reference Load/Unload.

Definition at line 112 of file fbfilereference.h.


The documentation for this class was generated from the following file:

FBFileReference FBFileReference FBFileReference FBFileReference FBFileReference FBFileReference FBFileReference FBFileReference FBFileReference FBFileReference
FBFileReference FBFileReference FBFileReference FBFileReference FBFileReference FBFileReference FBFileReference FBFileReference FBFileReference FBFileReference