Variable Path and File Names ("Tokens")
变量路径和文件名(“令牌”)
Variable path and file names (Tokens) can be used in the following locations when saving renderings:
保存渲染时,可以在以下位置使用变量路径和文件名(令牌) :
What is a Token used for? Tokens are simple text variables used in path and file names. When rendered or displayed in the Picture Viewer they will be replaced by project attributes such as project name, camera currently being used, which take, etc.
令牌用作甚么用途?标记是路径和文件名中使用的简单文本变量。当渲染或显示在图片查看器中时,它们将被项目属性所替代,如项目名称、当前使用的相机、采取等等。
例子
The following example should shed some light on how this works:
下面的例子可以说明这是如何工作的:
Note the file path in the above image: Results/$take/$rs. The variables $take and $rs (a list with all available Tokens can be found below) are Tokens. A file path’s last Token (here $rs for the render setting name) is always the file name and preceding Tokens (in this example $take for the take name) represent directory names. These do not have to be pre-existing directories! Cinema 4D will create them if they do not already exist.
注意上图中的文件路径: Results/$take/$rs。变量 $take 和 $rs (下面是一个包含所有可用 token 的列表)是 token。文件路径的最后一个 Token (这里的 $rs 表示呈现设置名称)始终是文件名,前面的 Token (在本例中的 $take 表示采用名称)表示目录名称。这些不必是预先存在的目录!C4D将会创造它们,如果它们还没有存在的话。
On the right side of the above image, 12 takes are marked in the Attribute Manager window that have various names and different render settings (which are marked on the left (Small Resolution, Normal Resolution and Large Resolution). If all 12 takes are rendered, each directory name ($take) would be replaced by the take name (e.g., Analog) and the rendered image saved at that location. The image’s file name ($rs) will also be replaced by the name of the respective render setting.
在上面图片的右边,在属性管理器窗口中标记了12个镜头,这些镜头有不同的名称和不同的渲染设置(左边标记为小分辨率、普通分辨率和大分辨率)。如果所有12个 take 都被渲染,每个目录名称($take)将被 take name (例如,Analog)和在该位置保存的渲染图像所替换。图像的文件名($rs)也将被相应渲染设置的名称所替换。
代币
The following Tokens can be used:
可以使用下列令牌:
Object channel refers to the Compositing tag’s Object Channels that are used to render Alpha channels of specific objects as separate Multi-Passes.
对象通道指的是合成标记的对象通道,这些通道用于将特定对象的 Alpha 通道作为单独的多重通道呈现。
These Tokens, which can also be used in combination with any series of characters (e.g., Camera_$cameraXY1), can be used to create complex directory structures. Especially in combination with the Take function (see Take Manager), which makes various project states at the point of rendering available, ,procedural’ file and path names can be generated, which, for example, generate directories named in accordance with the file name. Subsequent re-rendering will not overwrite existing paths/files, which is a handy feature when working with complex projects (of course the Token system also works with multi-passes).
这些令牌也可以与任何一系列字符组合使用(例如 Camera _ $cameraXY1) ,可用于创建复杂的目录结构。特别是结合 Take 函数(参见 Take Manager) ,它使得各种项目状态在呈现时可用,可以生成过程化的文件和路径名,例如,生成根据文件名命名的目录。后续的重新呈现不会覆盖现有的路径/文件,这在处理复杂项目时是一个很方便的特性(当然 Token 系统也可以处理多重通道)。
Note that multi-pass file names already contain their own names, which causes numerous seemingly superfluous Tokens such as $pass or $userpass to appear. However, these can also be used to name directories.
请注意,multi-pass 文件名已经包含它们自己的名称,这将导致出现大量看似多余的 token,如 $pass 或 $userpass。但是,这些也可以用来命名目录。