Open Reality Reference Guide
fbfilereference.h
Go to the documentation of this file.
1 #ifndef __FBFILEREFERENCE_H__
2 #define __FBFILEREFERENCE_H__
3 /**************************************************************************
4  Copyright (c) 1994 - 2009 Autodesk, Inc. and/or its licensors.
5  All Rights Reserved.
6 
7  The coded instructions, statements, computer programs, and/or related
8  material (collectively the "Data") in these files contain unpublished
9  information proprietary to Autodesk, Inc. and/or its licensors, which is
10  protected by Canada and United States of America federal copyright law
11  and by international treaties.
12 
13  The Data may not be disclosed or distributed to third parties, in whole
14  or in part, without the prior written consent of Autodesk, Inc.
15  ("Autodesk").
16 
17  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
18  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
19  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR
20  ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES
21  OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
22  PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT
23  WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR
24  FREE.
25 
26  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
27  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR
28  EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE
29  DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS
30  OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR
31  DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF
32  LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT
33  LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE
34  DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS
35  BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
36 
37 **************************************************************************/
38 
43 #include <kaydaradef.h>
44 #ifndef FBSDK_DLL
48  #define FBSDK_DLL K_DLLIMPORT
49 #endif
50 
51 #include <kaydara.h>
52 
53 #include <fbsdk/fbcomponent.h>
54 #include <fbsdk/fbnamespace.h>
55 
56 #ifdef FBSDKUseNamespace
57  namespace FBSDKNamespace {
58 #endif
59 
61 FB_DEFINE_COMPONENT( FBSDK_DLL, FileReference );
62 
64 
65 FB_DEFINE_LIST( FBSDK_DLL, FileReference );
66 
70 {
71 public:
78 };
79 
81 // FBFileReference
83 
87 {
88  //--- Open Reality declaration.
90 
91  void Init();
92 
93 protected:
94 
100  FBFileReference(const char* pMultiLevelNamespace, HIObject pObject);
101 
102 public:
103 
109  FBFileReference(const char* pSingleLevelNamespace, FBNamespace* pParentNSObj);
110 
113 
120  bool BakeRefEditToFile(const char* pFilePath = NULL);
121 
126  void RevertRefEdit(FBPlug* pPlug = NULL, FBPlugModificationFlag pModificationFlag = kFBAllModifiedMask);
127 
131  void ApplyRefEditPyScriptFromFile( const char* pRefEditPyScriptFilePath );
132 
136  void ApplyRefEditPyScriptFromString( const char* pRefEditPyScript );
137 
143  bool DuplicateFileRef(const FBStringList& pDstNameSpaceList, bool pWithRefEdit = false);
144 
149  const char* GetRefEdit(const char* pFilePath = NULL);
150 
155  bool ClearRefEdit(const char* pFilePath);
156 
161 
168  bool SwapReferenceFilePath(const char* pFilePath, bool pApplyAvailableRefEdit = true, bool pMergeCurrentRefEdit = true);
169 
173  void GetRefFileList(FBStringList& pRefFileList) const;
174 
175 };
176 
178 
179 #ifdef FBSDKUseNamespace
180  }
181 #endif
182 
183 
184 #endif /* this must be the last line of this file */
Objects Containing class.
FBPropertyString ReferenceFilePath
Read Write Property: File Reference file path.
bool SwapReferenceFilePath(const char *pFilePath, bool pApplyAvailableRefEdit=true, bool pMergeCurrentRefEdit=true)
Swap the Ref File Path and apply ref edit.
bool BakeRefEditToFile(const char *pFilePath=NULL)
Save the current status of the referenced content back to disk.
FBPropertyBool IsLoaded
Read Write Property: File Reference Load/Unload.
void RevertRefEdit(FBPlug *pPlug=NULL, FBPlugModificationFlag pModificationFlag=kFBAllModifiedMask)
Revert the modification on the referenced object/property to original state.
bool ClearAllRefEdit()
Clear all cached Ref edit.
void GetRefFileList(FBStringList &pRefFileList) const
Return a list of ref file path which has cached Ref Edit.
FBFileReference(const char *pSingleLevelNamespace, FBNamespace *pParentNSObj)
Constructor.
FBFileReference(const char *pMultiLevelNamespace, HIObject pObject)
Constructor.
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.
void ApplyRefEditPyScriptFromString(const char *pRefEditPyScript)
Apply specified reference edits from Python script string.
void ApplyRefEditPyScriptFromFile(const char *pRefEditPyScriptFilePath)
Apply specified reference edits from python script file.
bool ClearRefEdit(const char *pFilePath)
Clear the cached RefEdit for the given ref file path.
Objects Containing class.
Definition: fbnamespace.h:80
Connections Basic Open Reality SDK Element.
Definition: fbplug.h:222
PropertyList: Concrete class for PropertyList of component
Definition: fbcomponent.h:536
FBFileReference * operator[](int pIndex)
Get the FileReference object at pIndex.
Property class: const char * (String).
String list.
Definition: fbstring.h:208
Basic class definitions.
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:131
FB_DEFINE_COMPONENT(K_DLLIMPORT, AnimationNode)
Animation node class.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
FBPlugModificationFlag
Definition: fbplug.h:154
class K_DLLIMPORT FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
#define FB_DEFINE_LIST(DllTag, Type)
Define a component list.
Definition: fbproperties.h:163
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:62
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68