-
首页
-
C4D R23.110 C++ SDK
详细描述
-
由于
-
R17.032
-
另请参阅
-
The
Token System Overview
article.
函数
|
Bool
|
GetAllTokenEntries
(
maxon::BaseArray
<
TokenEntry
> &tokenList)
|
String
|
StringConvertTokens
(const
String
&path, const
RenderPathData
*rpData)
|
Filename
|
FilenameConvertTokens
(const
Filename
&path, const
RenderPathData
*rpData)
|
String
|
StringConvertTokensFilter
(const
String
&path, const
RenderPathData
*rpData, const
maxon::BaseArray
<
String
> &exclude)
|
Filename
|
FilenameConvertTokensFilter
(const
Filename
&path, const
RenderPathData
*rpData, const
maxon::BaseArray
<
String
> &exclude)
|
String
|
StringExtractRoot
(const
String
&path)
|
Filename
|
FilenameExtractRoot
(const
Filename
&path)
|
Bool
|
FilenameSlicePath
(const
Filename
&path,
Filename
&root,
Filename
&fileName)
|
Bool
|
RegisterToken
(const
String
&key, const
String
&help, const
String
&example,
TOKENHOOK
*hook)
|
Bool
|
RegisterHiddenToken
(const
String
&key, const
String
&help, const
String
&example,
TOKENHOOK
*hook)
|
Macro Definition Documentation
◆
ID_TOKEN_LIB
Token library ID.
◆
INVALID_FRAME
Private
.
Typedef Documentation
◆
TOKENHOOK
typedef
String
TOKENHOOK(void *data)
|
Token hook definition. Use
RegisterToken()
to register a custom Token.
Here is an example from the Take Token:
static
String
TakeTokenHook(
void
*data)
{
RenderPathData
* rDataPath = (
RenderPathData
*)data;
if
(!rDataPath)
return
String
();
if
(rDataPath->
_cTake
)
return
rDataPath->
_cTake
->
GetName
();
return
String
();
}
if
(!
RegisterToken
(
String
(
"take"
),
String
(
"Current Take Name"
),
String
(
"MyTake"
), TakeTokenHook))
{
return
false
;
}
-
另请参阅
-
The
Custom Tokens
example.
Function Documentation
◆
GetAllTokenEntries()
Fills a list will all available Token entries.
-
参数
-
[out]
|
tokenList
|
The array to be filled.
|
-
返回
-
true
if successful, otherwise
false
.
◆
StringConvertTokens()
Converts tokenized path
String
to standard
String
by replacing all Tokens with correct values if found.
-
参数
-
[in]
|
path
|
The original path
String
.
|
[in]
|
rpData
|
The data used to extract value for Tokens. The caller owns the pointed
RenderPathData
.
|
-
返回
-
The converted
String
, or the original path if any error.
◆
FilenameConvertTokens()
Converts tokenized path
Filename
into standard
Filename
by replacing all Tokens with correct values if found.
-
参数
-
[in]
|
path
|
The original path
Filename
.
|
[in]
|
rpData
|
The data used to extract value for Tokens. The caller owns the pointed
RenderPathData
.
|
-
返回
-
The converted FileName, or the original path if any error.
◆
StringConvertTokensFilter()
Converts tokenized path
String
to standard
String
by replacing all Tokens with correct values if found. Tokens added to
exclude
array are ignored.
-
参数
-
[in]
|
path
|
The original path
String
.
|
[in]
|
rpData
|
The data used to extract value for the Tokens. The caller owns the pointed
RenderPathData
.
|
[in]
|
exclude
|
A list of Tokens strings to be ignored.
|
-
返回
-
The converted
String
or the original path if any error.
◆
FilenameConvertTokensFilter()
Converts tokenized path
Filename
into standard
Filename
by replacing all Tokens with correct values if found. Tokens added to
exclude
array are ignored.
-
参数
-
[in]
|
path
|
The original path
Filename
.
|
[in]
|
rpData
|
The data used to extract value for Tokens. The caller owns the pointed
RenderPathData
.
|
[in]
|
exclude
|
A list of Tokens strings to be ignored.
|
-
返回
-
The converted FileName or the original path if any error.
◆
StringExtractRoot()
Searches for the first Token in path. If it is found and it is in-between "/.." returns the preceeding directory path
String
.
-
参数
-
[in]
|
path
|
The original path
String
.
|
-
返回
-
The root
String
path, or the original
String
if no Token is found.
◆
FilenameExtractRoot()
Searches for the first Token in path. If it is found and it is in-between "/..", returns the preceeding directory path
Filename
.
-
参数
-
-
返回
-
The root
Filename
path, or the original
Filename
if no Token is found.
◆
FilenameSlicePath()
Splits path in two parts if a Token is found as sub-folders and extracts root and filename path starting at sub-folder.
-
参数
-
[in]
|
path
|
The original path
Filename
.
|
[out]
|
root
|
The root
Filename
path.
|
[out]
|
fileName
|
The sub-folder and filename.
|
-
返回
-
true
if a Token is found, otherwise
false
.
◆
RegisterToken()
Registers a new Token that can be used in a render filename.
-
注意
-
The key is the identifier for the Token and has to be unique. For this reason identify your plugin in the Token key as a prefix.
Example: "myplug.pass" instead of just "pass" as it will collide wit the generic "pass" Token definition.
-
参数
-
[in]
|
key
|
The key string for the Token itself without the "$".
|
[in]
|
help
|
An help string used to show the Token in the menu.
|
[in]
|
example
|
An example string for the use of the Token.
|
[in]
|
hook
|
An implemented
TOKENHOOK
used to define the string to replace the Token.
|
-
返回
-
true
if successful, otherwise
false
.
◆
RegisterHiddenToken()
Registers a new Token that can be used in a render filename but hides it from the render filename menu.
-
注意
-
The key is the identifier for the Token and has to be unique. For this reason identify your plugin in the Token key as a prefix.
Example: "myplug.pass" instead of just "pass" as it will collide wit the generic "pass" Token definition.
-
由于
-
R18
-
参数
-
[in]
|
key
|
The key string for the Token itself without the "$".
|
[in]
|
help
|
An help string used to show the Token in the menu.
|
[in]
|
example
|
An example string for the use of the Token.
|
[in]
|
hook
|
An implemented
TOKENHOOK
used to define the string to replace the Token.
|
-
返回
-
true
if successful, otherwise
false
.
Bool RegisterToken(const String &key, const String &help, const String &example, TOKENHOOK *hook)
BaseTake * _cTake
The BaseTake used for rendering.
定义:
lib_token.h:110
String GetName() const
定义:
c4d_baselist.h:2318
Data structure to collect render information in handling Tokens in render output path.