#include
<kfbxref.h>
Definition at line 55 of file kfbxref.h.
Predefined Project Types |
|
static const char * | sTemporaryFileProject |
This project represents an URL for storing
temporary files. |
|
static const char * | sConfigurationProject |
This project represents an URL for
configuration files. |
|
static const char * | sLocalizationProject |
This project represents an URL for storing
localization files (that is not part of the asset library).
|
|
static const char * | sEmbeddedFileProject |
This project is used for creating the ".fbm"
folders that are used for storing embedded resources in FBX files.
|
|
XRef URL properties |
|
bool | GetResolvedUrl (KFbxProperty const &pProperty, int pIndex, KString &pResolvedPath) const |
Tries to resolve the URL stored in the
property at the given index. |
|
bool | GetResolvedUrl (char const *pUrl, KFbxDocument *pDoc, KString &pResolvedPath) const |
Tries to resolve the specified URL. |
|
static int | GetUrlCount (KFbxProperty const &pProperty) |
Returns the number of URLs that are stored
in a property. |
|
static int | GetUrlCount (fbxString const &pUrl) |
Returns the number of URLs that are stored
in a string. |
|
static bool | IsRelativeUrl (KFbxProperty const &pProperty, int pIndex) |
Checks whether the URL at the given index
stored in the property is relative or not. |
|
static KString | GetUrl (KFbxProperty const &pProperty, int pIndex) |
Returns the URL stored in the property at
the given index. |
|
XRef Resolve URL and Projects |
|
bool | AddXRefProject (const char *pName, const char *pUrl) |
Adds an XRef Project. |
|
bool | AddXRefProject (const char *pName, const char *pExtension, const char *pUrl) |
Adds an XRef Project. |
|
bool | AddXRefProject (KFbxDocument *pDoc) |
Adds an XRef project based on the document's
EmbeddedUrl property if set, if EmbeddedUrl is not set, based on
its current URL property. |
|
bool | RemoveXRefProject (const char *pName) |
Removes an XRef Projects. |
|
bool | RemoveAllXRefProjects () |
Removes all XRef Projects. |
|
int | GetXRefProjectCount () const |
Returns the number of XRef Projects.
|
|
const char * | GetXRefProjectName (int pIndex) const |
Returns the name of the XRef project at the
specified index. |
|
const char * | GetXRefProjectUrl (const char *pName) |
Returns the base URL for the given project.
|
|
const char * | GetXRefProjectUrl (const char *pName) const |
Returns the base URL for the given project.
|
|
const char * | GetXRefProjectUrl (int pIndex) const |
Returns the base URL for the given project.
|
|
bool | HasXRefProject (const char *pName) |
Checks if a project with the given name is
defined in this manager. |
|
bool | GetResolvedUrl (char const *pUrl, KString &pResolvePath) const |
Tries to resolve an relative URL. |
|
Public Member Functions |
|
KFbxXRefManager () | |
Default constructor. |
|
virtual | ~KFbxXRefManager () |
Destructor. |
|
bool | GetFirstMatchingUrl (char const *pPrefix, char const *pOptExt, const KFbxDocument *pDoc, KString &pResolvedPath) const |
Looks for the first file that matches a
specified "pattern", which is built as:. |
KFbxXRefManager | ( | ) |
Default constructor.
virtual ~KFbxXRefManager | ( | ) | [virtual] |
Destructor.
static int GetUrlCount | ( | KFbxProperty const & | pProperty | ) | [static] |
Returns the number of URLs that are stored in a property.
pProperty | The property. |
Returns the number of URLs that are stored in a string.
pUrl | The string. |
static bool IsRelativeUrl | ( | KFbxProperty const & | pProperty, | |
int | pIndex | |||
) | [static] |
Checks whether the URL at the given index stored in the property is relative or not.
pProperty | The property. | |
pIndex | The URL index. |
True
if the URL is relative, false
if
the URL is not relative.static KString GetUrl | ( | KFbxProperty const & | pProperty, | |
int | pIndex | |||
) | [static] |
Returns the URL stored in the property at the given index.
pProperty | The property. | |
pIndex | The URL index. |
bool GetResolvedUrl | ( | KFbxProperty const & | pProperty, | |
int | pIndex, | |||
KString & | pResolvedPath | |||
) | const |
Tries to resolve the URL stored in the property at the given index.
pProperty | The property. | |
pIndex | The URL index. | |
pResolvedPath | Filled with the resolved path. |
True
if the URL is resolved, return
false
if the URL is not resolved.bool GetResolvedUrl | ( | char const * | pUrl, | |
KFbxDocument * | pDoc, | |||
KString & | pResolvedPath | |||
) | const |
Tries to resolve the specified URL.
pUrl | The specified URL. | |
pDoc | The document whose ".fbm" folder is used to resolve the URL. | |
pResolvedPath | Filled with the resolved path. |
True
if the URL is resolved, return
false
if the URL is not resolved.bool GetFirstMatchingUrl | ( | char const * | pPrefix, | |
char const * | pOptExt, | |||
const KFbxDocument * | pDoc, | |||
KString & | pResolvedPath | |||
) | const |
Looks for the first file that matches a specified "pattern", which is built as:.
if pOptExt is given: prefix*.ext If pOptExt is NULL: prefix* if pOptExt is "" or ".": prefix*.
Returns the URL of the first matching files. This function cannot be used to resolve folders, only files.
If a document is given, we start by looking at the document's ".fbm" folder.
pPrefix | The prefix of the pattern. | |
pOptExt | The extension of the pattern. | |
pDoc | The given document. | |
pResolvedPath | Filled with the first matching URL. |
True
if one matching file is found, returns
false
if no matching file is found.bool AddXRefProject | ( | const char * | pName, | |
const char * | pUrl | |||
) |
Adds an XRef Project.
Note:Only one URL is associated with a project. Calling this on an existing project replaces the project's existing URL.
pName | The name of the project | |
pUrl | The URL to be associated with the project. |
True
if the project is added successfully,
false
if no project is added.bool AddXRefProject | ( | const char * | pName, | |
const char * | pExtension, | |||
const char * | pUrl | |||
) |
Adds an XRef Project.
Note:Only one URL is associated with a project. Calling this on an existing project replaces the project's existing URL.
pName | The name of the project | |
pExtension | The extension of the project. | |
pUrl | The URL to be associated with the project. |
True
if the project is added successfully, returns
false
if no project is added.bool AddXRefProject | ( | KFbxDocument * | pDoc | ) |
Adds an XRef project based on the document's EmbeddedUrl property if set, if EmbeddedUrl is not set, based on its current URL property.
pDoc | The document used to name the project and to specify the URL. |
True
if the project is added successfully, returns
false
if no project is added.bool RemoveXRefProject | ( | const char * | pName | ) |
Removes an XRef Projects.
pName | The name of the project to be removed. |
True
if the project is removed successfully,
returns false
if the project with the name does not
exist.bool RemoveAllXRefProjects | ( | ) |
Removes all XRef Projects.
True
always.int GetXRefProjectCount | ( | ) | const |
Returns the number of XRef Projects.
const char* GetXRefProjectName | ( | int | pIndex | ) | const |
Returns the name of the XRef project at the specified index.
pIndex | The XRef project index. |
const char* GetXRefProjectUrl | ( | const char * | pName | ) |
Returns the base URL for the given project.
pName | The name of the given project |
const char* GetXRefProjectUrl | ( | const char * | pName | ) | const |
Returns the base URL for the given project.
pName | The name of the given project |
const char* GetXRefProjectUrl | ( | int | pIndex | ) | const |
Returns the base URL for the given project.
pIndex | The index of the project. |
bool HasXRefProject | ( | const char * | pName | ) | [inline] |
bool GetResolvedUrl | ( | char const * | pUrl, | |
KString & | pResolvePath | |||
) | const |
Tries to resolve an relative URL.
pUrl | The relative URL to be resolved. | |
pResolvePath | Filled with the resolved path. |
True
if the URL is resolved, returns
false
if the URL is not resolved.const char* sTemporaryFileProject
[static] |
const char* sConfigurationProject
[static] |
const char* sLocalizationProject
[static] |
const char* sEmbeddedFileProject
[static] |
This project is used for creating the ".fbm" folders that are used for storing embedded resources in FBX files.
When not set, or if the folder is not writable, the ".fbm" folder is created alongside the FBX file.
If we cannot write in that folder, we look at the sTemporaryFileProject location. If no folder is set in the sTemporaryFileProject location, or it is not writable, the operating system's Temp folder becomes the location.