User Data
用户资料
Tip: 提示:使用什么用户数据?
Often, complex scenes contain a vast quantity of objects. If such scenes are passed on to other users for modification (e.g., rigged characters that need to be animated) it’s a good idea to create User Data that effect the actual scene objects via XPresso Expressions (don’t panic, these Expressions are really simple … ). Subsequent users will then only be presented with the parameters they need to make the required changes. In most cases, a Null Object can be created and assigned an XPresso tag tag in which the User Data are saved. However, User Data can basically be assigned to any element that can be displayed in the Attribute Manager. User Data are saved with the scene can be copied from one scene to another.
通常,复杂的场景包含大量的物体。如果这些场景被传递给其他用户进行修改(例如,需要动画的虚拟角色) ,那么通过 XPresso Expressions 创建影响实际场景对象的用户数据是一个好主意(不要惊慌,这些表达式真的很简单...)。然后,只向后续用户提供他们进行所需更改所需的参数。在大多数情况下,可以创建一个 Null 对象,并为其分配一个 XPresso 标记标记,其中保存了 User Data。但是,用户数据基本上可以分配给任何可以显示在属性管理器中的元素。用户数据保存与场景可以从一个场景复制到另一个场景。
例子
This User Data in this scene’s Null Object control color, brightness and orientation of three light sources.
这个用户数据在这个场景的空对象控制颜色,亮度和三个光源的方向。
用户数据对话框窗口
This window opens if an object or a tag is selected and one of the commands from the User Data menu is executed. In this window you can create or delete User Data.
如果选择了对象或标记并执行了“用户数据”菜单中的某个命令,则此窗口将打开。在此窗口中,您可以创建或删除用户数据。
The dialog window is made up of two areas:
对话框窗口由两个区域组成:
等级制
The hierarchy displays all User Data (hereinafter called parameter). The User Data can be resorted via drag & drop or grouped (subtabs that can be opened or closed). Existing groups or parameters can be copied using the Ctrl key.
层次结构显示所有用户数据(以下称为参数)。用户数据可以通过拖放或组(子标签,可以打开或关闭)。可以使用 Ctrl 键复制现有的组或参数。
Multiple selections can be made in the usual manner using the Shift and
可以通过使用 Shift 和 Ctrl/Cmd 键以通常的方式进行多重选择。
Parameters can be added to this field using the following methods:
可以使用以下方法向该字段添加参数:
Right-clicking on an element will open a context menu containing the following options:
右键单击一个元素将打开一个包含以下选项的上下文菜单:
收到
Copies the selected parameter.
复制选定的参数。
粘贴
Pastes a copied parameter.
粘贴复制的参数。
移除
Deletes the selected parameter.
删除所选参数。
用户资料属性
In the properties area at the right of the Manage User Data window are the properties of the selected User Data items to the left. These properties define how the parameter settings should be in the Attribute Manager. For example, integer values from 20% to 120% can be defined.
在“管理用户数据”窗口右侧的属性区域中,左侧是所选用户数据项的属性。这些属性定义了属性管理器中参数设置的方式。例如,可以定义从20% 到120% 的整数值。
In addition to the Properties menu, the following are also available for some data types:
除了“属性”菜单之外,以下内容也可用于某些数据类型:
姓名
This name also appears in the Timeline and XPresso nodes. Normally this name is the same as the Short Name. This is why the Short Name parameter is automatically defined in the beginning.
此名称也出现在时间轴和 XPresso 节点中。通常这个名字和短名字是一样的。这就是为什么在开头自动定义 Short Name 参数的原因。
简称
Use this option to enter an abbreviated version of the parameter’s actual name. This comes in Handy if the name happens to be too long to fit in the Attribute Manager.
使用此选项输入参数实际名称的缩写版本。如果名字太长,属性管理器无法容纳,这就派上用场了。
身份证
This is a parameter you normally do not have to modify. However, for the sake of completeness we have included it in the documentation: Each User Data parameter is given an ID for each object. If identical IDs with identical parameter data exist for various elements, these will be displayed in the Attribute Manager if these elements are selected simultaneously.
这是一个通常不需要修改的参数。但是,为了完整起见,我们在文档中包含了它: 为每个对象给每个 User Data 参数一个 ID。如果不同元素存在具有相同参数数据的相同 id,则如果同时选择这些元素,则这些 id 将显示在 Attribute Manager 中。
可动性
If the Animation icon appears next to the parameter it is animatable.
如果动画图标出现在参数旁边,它就是可动画的。
数据类型
Cinema 4D contains numerous data types (e.g., integers, colors, gradations, etc.) that unfortunately do not work in conjunction with every parameter. Sufficient for the most common uses are floating points, integers or color.
Cinema 4D 包含许多数据类型(例如,整数、颜色、层次等) ,但不幸的是,这些数据类型不能与所有参数一起工作。对于最常见的用途来说,浮点数、整数或颜色就足够了。
Button is somewhat different because it is not addressed via XPresso but via Python (e.g., a command can be called up by clicking on this button).
Button 有些不同,因为它不是通过 XPresso 处理的,而是通过 Python (例如,可以通过点击这个按钮调用命令)。
More information regarding data types can be found here.
关于数据类型的更多信息可以在这里找到。
The following parameter differ depending on data type. Below is a description of the most important ones:
下面的参数根据数据类型不同而有所不同。下面是对最重要的参数的描述:
界面
浮动滑块
The Float Slider is probably the most commonly used User Data parameter. It is used to define numeric values (optionally with positions after the decimal point).
浮动滑块可能是最常用的用户数据参数。它用于定义数值(可以选择小数点后的位置)。
Unit: You can select between Real, Percent, Degree and Meter. This can make it easier to calculate angles. Nodes only respond to radian angle values (360° equal 2*pi). Select the Degree option. If you enter a value of 180° the Nodes will interpret this value as pi=3.1549 … . Nodes will calculate a percentage value between 0% and 100% with in a value range of 0 to 1.
单位: 你可以选择真实,百分比,度和米。这使得计算角度变得更加容易。节点只响应弧度角值(360 ° 等于2 * pi)。选择度数选项。如果你输入一个180 ° 的值,节点会将这个值解释为 pi = 3.1549... 。节点将计算0% 到100% 之间的百分比值,其值范围为0到1。
Step: The parameter will be modified in accordance to this step value.
步骤: 参数将根据此步骤值进行修改。
Limit Min / Max: Defines the limits within which the parameter can be defined for a given GUI element. The first Min/Max values define the range covered by numeric inputs; the Slider values only define the minimum and maximum values that can be reached by moving the sliders.
限制最小/最大值: 定义给定 GUI 元素可以定义参数的限制。第一个最小/最大值定义了数值输入覆盖的范围; Slider 值只定义了通过移动滑块可以达到的最小值和最大值。
If values outside of the slider’s value range are used a colored marker will be displayed.
如果使用超出滑块值范围的值,则会显示一个彩色标记。
默认值
This parameter defines the value (or Spline, depending on data type) with which the parameter will initially be displayed in the Attribute Manager or when it is set using the Reset to Default command.
此参数定义参数最初显示在 Attribute Manager 中或使用 Reset to Default 命令设置参数时的值(或样条,具体取决于数据类型)。
Radio Buttons, Selection List, Cycle Button, Quicktab Radio
单选按钮,选择列表,循环按钮,快速选项卡单选
Both are available for the Data TypeInteger option.
两者都可用于 Data TypeInteger 选项。
These modes can be used to create selection options:
这些模式可以用来创建选择选项:
The syntax looks like this:
语法如下:
0;Name1
0; Name1
1;Name2
1; Name2
2;Name3
2; Name3
etc.
等等。
Each line must be followed by a hard return. If you want to separate lines, type -1 into that line.
每一行后面必须有一个硬返回。如果您想要分隔行,请在该行中键入-1。
The selection list and switch buttons also make the program icons available for selection. Its ID can be found in the Customize Commands Manager. Refer to the image below for the correct syntax:
选择列表和开关按钮也使程序图标可供选择。它的 ID 可以在自定义命令管理器中找到。正确的语法请参考下面的图片:
病媒
The Vector data type has two Interface modes: Vector and 2D Vector Field. The 2D Vector Field can also be integrated into the HUD, which lets you quickly modify the vector’s X and Y values.
Vector 数据类型有两种接口模式: Vector 和2D Vector Field。2D 矢量场也可以集成到平视显示器中,这样你就可以快速修改矢量的 x 和 y 值。
花键
The Spline data type has its own Details tab that contains various (self-explanatory) parameters for displaying the Spline element.
Spline 数据类型有自己的 Details 选项卡,其中包含用于显示 Spline 元素的各种(自解释的)参数。
分离器
Separators are used to visually separate parameter groups. If the Separator Line option is enabled these groups will be separated by a line. Otherwise they will be separated by a type of subtab. You can enter a name but this is not a requirement. Omitting names will keep your separated groups visually "cleaner".
分隔符用于直观地分隔参数组。如果启用“分隔线”选项,这些组将用一行分隔。否则,它们将由一种子选项卡分隔。您可以输入一个名称,但这不是一个要求。省略名称将保持您的分离组视觉上“清洁”。
组别参数
默认开放
Defines if the subtab should be open by default.
定义子选项卡是否默认打开。
标题栏
Defines whether or not subordinate parameters should be displayed in a separate tab in the Attribute Manager (the group must lie on the same hierarchical level as the User Data (Default).
定义从属参数是否应该显示在属性管理器的一个单独的选项卡中(组必须位于与用户数据(默认值)相同的层次结构级别上)。
比例高度
If enabled, list text fields will be scaled to the maximum possible height in the Attribute Manager.
如果启用,列表文本字段将缩放到属性管理器中的最大可能高度。
专栏
Lets you arrange parameters in multiple columns.
允许在多列中排列参数。
命令
添加数据
Adds a parameter. To add a sub-parameter to an existing group, select the group and click on the Add Data button.
添加参数。若要向现有组添加子参数,请选择该组并单击 Add Data 按钮。
添加组
Adds a Group Data element, to which subordinate parameters can be added. These groups can be opened or closed in the Attribute Manager:
添加一个 Group Data 元素,可以向该元素添加从属参数。这些组可以在属性管理器中打开或关闭:
If you place a Group (must contain at least one parameter) on the same hierarchical level as User Data (Default) a tab will be added in the Attribute Manager:
如果您将一个 Group (必须包含至少一个参数)放在与 User Data (默认值)相同的层次结构级别上,那么在 Attribute Manager 中将添加一个选项卡:
If the Title Bar option is enabled, Group parameters will be arranged in a separate sub-menu (group name) in the XPresso Node.
如果启用了标题栏选项,那么组参数将被安排在 XPresso 节点中的一个单独的子菜单(组名)中。
粘贴用户数据界面
加载/保存预置
These two commands can be used to save selected user data as presets (or several, which will then be saved in a single preset) and load them - under the currently selected list.
这两个命令可以用来保存选定的用户数据作为预置(或多个,然后将保存在一个单一的预置) ,并加载它们-在当前选定的列表。
These are saved and managed in the Content Browser under Presets/User (in the corresponding folder).
这些都保存和管理在内容浏览器下的预置/用户(在相应的文件夹)。