XPresso Editor

编辑器

To create a new expression and open the XPresso Editor, in the Object Manager, select any object and choose Tags / Programming Tags / XPresso. You can close the editor at any time and reopen it by double-clicking the XPresso Expression tag.

要创建一个新的表达式并打开 XPresso 编辑器,在对象管理器中,选择任何对象并选择 Tags/Programming Tags/XPresso。您可以随时关闭编辑器,并通过双击 xpressoexpression 标记重新打开编辑器。

Nodes are the building blocks of your XPresso Expressions. Nodes can perform a wide variety of tasks, from reporting the animation’s current frame number to setting an object to a particular position. To build your expression, you create the necessary nodes and connect them to one another by drawing lines, called wires, between the node input and output ports. The nodes are then able to pass values to one another via these ports and wires.

节点是 XPresso 表达式的构建块。节点可以执行各种各样的任务,从报告动画的当前帧数到设置对象到特定的位置。要构建表达式,需要创建必要的节点,并通过在节点输入端口和输出端口之间绘制线(称为连线)将它们相互连接。然后这些节点能够通过这些端口和导线彼此传递值。

The illustration above shows two nodes: one for a cube and another for a cylinder. the two circles, both labeled Rotation, are ports. The ports under the red squares are output ports and send values to XGroups or other nodes. The ports under the blue squares are input ports and receive values from other nodes or XGroups. In this example, the cube’s rotation value is being sent to the cylinder. This will cause the cylinder to point in the same direction as the cube in the viewport.

上图显示了两个节点: 一个节点用于多维数据集,另一个节点用于圆柱体。这两个圆,都标记为旋转,是端口。红色方块下面的端口是输出端口,并向 XGroups 或其他节点发送值。蓝色方块下面的端口是输入端口,从其他节点或 XGroups 接收值。在这个例子中,立方体的旋转值被发送到柱面上。这将导致圆柱面指向与视口中的立方体相同的方向。

To learn XPresso as quickly as possible, we recommend that you work through the tutorials in the Cinema 4D Tutorial manual and, if something is not clear, look it up in this reference for a full description. In addition, you will also find a variety of example expressions on your Cinema 4D CD, each documented with comments. Much can be learnt from these examples by reading the comments and then trying out your own changes.

为了尽可能快地学习 XPresso,我们建议你阅读 Cinema 4D 教程手册中的教程,如果有什么不清楚的地方,可以在这个参考文献中查找完整的描述。此外,你还可以在你的C4D 光盘上找到各种各样的例子表达式,每个都有注释记录。通过阅读评论,然后尝试自己的改变,可以从这些例子中学到很多东西。

XGroups

XGroups are containers for nodes, other XGroups and their wires. Like real containers, XGroups help you to put related items in the same box for better organization. You will then find it easier to understand, navigate and modify the expression. In addition to acting as a container, an XGroup can be connected to nodes and other XGroups. You can save and load XGroups to reuse them in other projects.

XGroups 是节点、其他 XGroups 及其连接的容器。与真正的容器一样,XGroups 可以帮助您将相关项放在同一个框中,以便更好地组织。然后您会发现它更容易理解、导航和修改表达式。除了充当容器之外,XGroup 还可以连接到节点和其他 XGroups。您可以保存和加载 XGroups,以便在其他项目中重用它们。

Use XGroups to organize nodes into groups. 使用 XGroups 将节点组织成组

You can navigate the contents of an XGroup in a similar way to the Cinema 4D viewport. To move or zoom the contents, drag the move or zoom icon in the top right corner of the XGroup. You can also move the contents by pressing the cursor keys. To add ports to the XGroup, choose the desired ports from the XGroup’s inputs menu (blue square) and outputs menu (red square).

你可以用类似于Cinema 4D 视窗的方式来浏览 XGroup 的内容。若要移动或缩放内容,请在 XGroup 的右上角拖动移动或缩放图标。您还可以通过按下光标键来移动内容。要向 XGroup 添加端口,请从 XGroup 的输入菜单(蓝方块)和输出菜单(红方块)中选择所需的端口。

To minimize an XGroup to its title bar, double-click the title bar. To restore an XGroup window to full size, double-click the title bar again. To move an XGroup, drag its title bar. To re-size an XGroup, drag a side or corner.

若要将 XGroup 最小化为其标题栏,请双击标题栏。要将 XGroup 窗口恢复为完整大小,请再次双击标题栏。要移动 XGroup,请拖动其标题栏。若要重新调整 XGroup 的大小,请拖动一侧或一角。

When creating your own expressions, you will often need to select an XGroup to, among other things, load its settings into the Attribute Manager so that you can edit them. To select an XGroup, click the XGroup’s title bar. To select multiple XGroups, drag a marquee over them, or select one of the XGroups then Shift+click the other XGroups that you want to select; selected XGroups have orange borders.

在创建自己的表达式时,您通常需要选择一个 XGroup,以便将其设置加载到 Attribute Manager 中,从而可以对其进行编辑。要选择 XGroup,请单击 XGroup 的标题栏。要选择多个 XGroups,拖动一个字幕到它们上面,或者选择一个 XGroups,然后 Shift + 单击要选择的其他 XGroups; 选择的 XGroups 有橙色边框。

Inputs First

投入第一

On the Attribute Manager’s Node Properties page, you will find an option called Inputs First. If this option is enabled, nodes that are outside the selected XGroup are evaluated first. This is especially important when the XGroup receives values from the nodes, to ensure that the XGroup receives up-to-date values.

在属性管理器的节点属性页面上,您将找到一个名为 Inputs First 的选项。如果启用此选项,则首先计算选定 XGroup 之外的节点。当 XGroup 从节点接收值时,这一点尤其重要,以确保 XGroup 接收最新值。

Double-clicking on the XGroup window’s title bar will reduce the window to the title bar. Double-click again to restore the window. Clicking and holding on the title bar will let you drag the XGroup window and clicking and holding on the XGroup window’s frame (the cursor will change to a scale symbol) will let you scale the window. A simple click on the XGroup window’s title bar will select the XGroup, e.g., for copying and pasting or to access the settings and data types in the Attribute Manager. Multiple XGroups or nodes can be selected by Shift+clicking on them and then, for example, moving then to a single group. Selected groups will be highlighted with an orange outline.

双击 XGroup 窗口的标题栏将把窗口缩小到标题栏。再次双击以恢复窗口。单击并按住标题栏将允许您拖动 XGroup 窗口,单击并按住 XGroup 窗口的框架(光标将变为缩放符号)将允许您缩放窗口。单击 XGroup 窗口的标题栏将选择 XGroup,例如,用于复制和粘贴或访问属性管理器中的设置和数据类型。可以通过 Shift + 单击多个 XGroups 或节点来选择它们,然后,例如,移动到单个组。选定的组将用橙色轮廓突出显示。

Active

活跃

This option allows you to switch the XGroup on (active) or off. The nodes inside the XGroup will only be processed if the XGroup is active. You can also switch the node on by passing a Boolean value of True or the value 1 to its Enable port.

此选项允许您打开(活动)或关闭 XGroup。只有当 XGroup 处于活动状态时,XGroup 中的节点才会被处理。您还可以通过向节点的启用端口传递一个布尔值 True 或值1来打开节点。

Protect

保护环境

You can password protect XGroups using this button, which will hide the contents of the XGroup until the password is entered.

您可以使用此按钮来为 XGroups 设置密码保护,该按钮将隐藏 XGroup 的内容,直到输入密码为止。

To protect an XGroup, first choose View / Locked to lock the XGroup’s contents. In the Attribute Manager, click on the Protect button. In the dialog that opens, enter your password for the XGroup. The XGroup will now be password protected.

要保护 XGroup,首先选择 View/Locked 来锁定 XGroup 的内容。在属性管理器中,点击保护按钮。在打开的对话框中,输入 XGroup 的密码。XGroup 现在有密码保护。

To unprotect an XGroup, you do almost the same as you did to protect it, except in reverse. First, click on the Unprotect button and enter your password into the dialog that appears. To reveal the contents of the XGroup, disable View / Locked from the context menu and choose the desired display mode from the context menu’s View sub-menu.

要取消对 XGroup 的保护,您需要执行与保护它几乎相同的操作,只是方向相反。首先,点击取消保护按钮,在出现的对话框中输入密码。要显示 XGroup 的内容,请从上下文菜单中禁用 View/Locked 并从上下文菜单的 View 子菜单中选择所需的显示模式。

Nodes

节点

Cinema 4D’s nodes work in radians. In other words, nodes use angular values from 0 to 2*Pi rather than degrees from C4D 的节点以弧度工作。换句话说,节点使用从0到2 * Pi 的角值,而不是从0到2 * Pi 的角度0 to 360˚ 360. If you want to work in degrees, use the Degree node to convert from radians to degrees, and vice versa. .如果希望以度为单位工作,可以使用 Degree 节点将弧度转换为度,反之亦然

Nodes are the primary building blocks of expressions and are designed to carry out the most diverse of tasks, from reporting an object’s current position to processing math operations. Depending on the node’s type, you can add various inputs and outputs to the node called ports. As with XGroups, you add these ports using the inputs menu and outputs menu (the blue and red squares respectively in the node’s title bar).

节点是表达式的主要构建块,用于执行最多样化的任务,从报告对象的当前位置到处理数学操作。根据节点的类型,您可以向称为“端口”的节点添加各种输入和输出。与 XGroups 一样,您可以使用输入菜单和输出菜单(节点标题栏中的蓝色和红色方块)添加这些端口。

Four nodes. The Result node shows the value 1 if the cone and cube are at the same height (Y value). 四个节点。如果锥体和立方体位于相同的高度(y 值) ,则 Result 节点显示值1

You can minimize or maximize a node by double-clicking its title bar; to move a node, drag its title bar; to re-size a node, drag a side or corner. Click a node to select it and load its settings into the Attribute Manager. To select multiple nodes, drag a marquee over them or select one of the nodes then Shift-click the other nodes that you want to select; selected nodes have orange borders.

您可以通过双击节点的标题栏来最小化或最大化节点; 要移动节点,可以拖动其标题栏; 要重新调整节点的大小,可以拖动一边或一角。单击一个节点以选择它并将其设置加载到属性管理器中。若要选择多个节点,请拖动一个字幕覆盖它们,或者选择一个节点,然后单击要选择的其他节点; 选定的节点有橙色边框。

You can switch nodes on or off via the Enabled option in the Attribute Manager or the Disable option from the node’s context menu, which is described later in this chapter.

您可以通过属性管理器中的启用选项或节点上下文菜单中的 Disable 选项来开关节点,本章后面将对此进行描述。

To rename a node, select the node and enter its new name on the Attribute Manager’s Basic Properties page. The default name of a node indicates its type. If you rename a node, you can check its type in the Attribute Manager. You can also set the node’s data type in the Attribute Manager; this defines what type of data the node handles, such as integers or strings.

若要重命名节点,请选择该节点并在属性管理器的基本属性页上输入其新名称。节点的默认名称指示其类型。如果重命名一个节点,可以在属性管理器中检查它的类型。还可以在 Attribute Manager 中设置节点的数据类型; 这定义了节点处理的数据类型,如整数或字符串。

You can reassign an Object, Material or tag node to a different object, material or tag. Simply drag and drop the object, material or tag onto the inner part of the node (i.e. into the area where the port names usually appear). The original ports will be preserved if still appropriate for the new object, material or tag. Ports that cannot be preserved will be set to the undefined status.

您可以将 Object、 Material 或 tag 节点重新分配给不同的对象、材质或标记。只需将对象、材质或标签拖放到节点的内部(即通常出现端口名称的区域)。原始端口将被保留,如果仍然适合新的对象,材质或标签。不能保留的端口将被设置为未定义的状态。

Each XPresso node is described later in this chapter.

本章后面将描述每个 XPresso 节点。

Ports

港口

Ports are the inputs and outputs of nodes and XGroups. To add a port, choose the desired port from the inputs menu (blue square) or outputs menu (red square); in these menus, ports that have already been added are ghosted.

端口是节点和 XGroups 的输入和输出。要添加端口,请从输入菜单(蓝方块)或输出菜单(红方块)中选择所需的端口; 在这些菜单中,已经添加的端口将重影。

Add ports using the inputs and outputs menus (the blue and red squares in the node’s top corners). 使用输入和输出菜单(节点顶端的蓝色和红色方块)添加端口 Values are passed via ports. Output ports are under the red and Input port are under the blue squares. 值通过端口传递。输出端口在红色下面,输入端口在蓝色方块下面

Red ports are output ports and send values to other nodes or XGroups. Blue ports are input ports and receive values from other nodes or XGroups. To connect an output port to an input port, drag and drop the circle of one port onto the other. A wire will connect the ports, as illustrated below.

红色端口是输出端口,并将值发送到其他节点或 XGroups。蓝色端口是输入端口,从其他节点或 XGroups 接收值。若要将输出端口连接到输入端口,请将一个端口的圆拖放到另一个端口上。一条线将连接端口,如下图所示。

Various commands that are specific to ports are available from the port’s context menu.

各种特定于端口的命令可以从端口的上下文菜单中获得。

If a node or XGroup is selected and has unconnected ports, these are shown on the Attribute Manager’s Parameter page (does not apply to Object nodes); you can send values to these ports by entering values on this page. This can be especially useful for testing nodes with particular values. The Attribute Manager also enables you to send your own data to nodes (see User Data, below).

如果选择了一个节点或 XGroup 并且具有未连接的端口,则在 Attribute Manager 的 Parameter 页面上显示这些端口(不适用于对象节点) ; 您可以通过在该页面上输入值向这些端口发送值。这对于测试具有特定值的节点尤其有用。属性管理器还允许您将自己的数据发送到节点(请参见下面的用户数据)。

To display a port’s name, hover the mouse pointer over the port and its name will appear in the XPresso Editor’s status bar. (To switch on the status bar, enable the Show Status Bar option on the XPresso Editor’s Layout menu). To display port names, enable the Ports / Show Names option on the context menu.

要显示端口名称,将鼠标指针悬停在端口上方,它的名称将出现在 XPresso Editor 的状态栏中。(要打开状态栏,请在 XPresso Editor’ s Layout 菜单上启用 Show Status Bar 选项)。若要显示端口名称,请在上下文菜单上启用“端口/显示名称”选项。

Double-clicking on a port will disconnect it. If the port is already disconnected, double-clicking on the port will delete it instead. To change a port’s vertical order, Alt+drag the port and drop it in its new position.

双击一个端口将断开连接。如果端口已断开连接,则双击该端口将删除该端口。要更改端口的垂直顺序,Alt + 拖动端口并将其放置在新的位置。

Attribute Manager.>

属性管理器 >

Ports defined for element parameters can also be marked in the Attribute Manager:

为元素参数定义的端口也可以在 Attribute Manager 中标记:

User Data

用户资料

User Data ports enable you to send your own values to nodes via the Attribute Manager.

用户数据端口使您能够通过属性管理器将自己的值发送到节点。

To create a User Data port

创建用户数据端口

Wires

电线

Wires enable you to connect the ports of nodes and XGroups. 连接使您能够连接节点和 XGroups 的端口

To enable nodes and XGroups to pass values to one another, you must first create the necessary ports and connect those ports using wires. To create a wire between two ports, drag the circle of one port and drop it onto the other. A line appears while you drag that snaps to the second port when the mouse pointer is close to it.

要使节点和 XGroups 能够相互传递值,必须首先创建必要的端口并使用连接连接这些端口。若要在两个端口之间创建连接,请拖动一个端口的圆圈并将其放到另一个端口上。当拖动鼠标指针靠近第二端口时,会出现一条线,该线会捕捉到第二端口。

Some connections are not allowed. For example, you cannot connect input ports together or output ports together, nor can you connect ports that have incompatible data types. While you draw the wire, its color changes to indicate whether the connection is allowed (green) or not allowed (dark grey). If the connection is not allowed, the wire will be deleted as soon as you release the mouse button.

有些连接是不允许的。例如,不能将输入端口或输出端口连接在一起,也不能连接具有不兼容数据类型的端口。在绘制连接时,其颜色会发生变化,以指示是否允许连接(绿色)或不允许连接(深灰色)。如果不允许连接,则当您释放鼠标按钮时,连接将被删除。

An output port may be connected to multiple input ports, thus enabling you to pass the same value to several nodes or XGroups. However, an input port may have one connection only.

一个输出端口可以连接到多个输入端口,从而使您能够将相同的值传递给多个节点或 XGroups。但是,输入端口可能只有一个连接。

To connect an output port to an input port of the same node, copy the node (hold down Cmd/Ctrl and drag and drop out a copy) and connect the output port of the first node to the input port of the second node.

要将输出端口连接到同一节点的输入端口,请复制该节点(按住 Cmd/Ctrl 并拖放一个副本) ,并将第一个节点的输出端口连接到第二个节点的输入端口。

If you accidentally connect a wire to the wrong port, you can reconnect it by dragging and dropping the wire onto the correct port. If you drop the wire onto an empty space (i.e. not onto a port), the wire will be deleted as soon as you release the mouse button. You can also delete wires by choosing Remove Wires from the port’s context menu.

如果不小心连接到错误的端口,可以通过拖放导线到正确的端口来重新连接导线。如果你把电线放到一个空白的地方(即不是一个端口) ,一旦你释放鼠标按钮,电线就会被删除。您还可以通过从端口的上下文菜单中选择 Remove Wires 来删除连接。

If the wires in an expression are tangled, reposition the ports by Alt-dragging each port to a new position. You can reposition vertically only. You cannot, for example, Alt-drag an input port from the node’s left edge to the right edge.

如果表达式中的导线缠绕在一起,则通过 alt 将每个端口拖动到一个新位置来重新定位端口。你只能垂直重新定位。例如,您不能将输入端口从节点的左边缘拖动到右边缘。

Wires will convert compatible data types automatically. For example, if you pass a real value, such as 72.163, to a node that works with integers only, the connecting wire will convert the real value to an integer automatically — in this case, to 72.

连线将自动转换兼容的数据类型。例如,如果您将一个实际值(如72.163)传递给一个只使用整数的节点,连接线将自动将实际值转换为整数ー在本例中为72。

Data types

数据类型

Each node and XGroup has a data type that defines the type of value it uses, such as Integer, Vector or Color. If you connect two nodes that use different data types, the wire between the nodes converts the data type automatically if the types are compatible. For example, if a Constant node passes a Real value of 3.45 to a Result node whose data type is set to Integer, the value will be converted to an integer automatically — in this case, to 3.

每个节点和 XGroup 都有一个数据类型,用于定义它所使用的值的类型,如 Integer、 Vector 或 Color。如果连接两个使用不同数据类型的节点,则节点之间的连接将在数据类型兼容的情况下自动转换数据类型。例如,如果 Constant 节点将一个实数值3.45传递给一个数据类型设置为 Integer 的 Result 节点,该值将自动转换为一个整数ー在这种情况下,为3。

Although some nodes have a fixed data type that cannot be changed, you can change the data type of most nodes in the Attribute Manager.

尽管某些节点具有不能更改的固定数据类型,但您可以更改 Attribute Manager 中大多数节点的数据类型。

Color

颜色

This data type consists of the color components red, green and blue. The RGB values can also be interpreted as a vector — so the color R:10, G:75, B:0 would equate to the vector (10;75;0). This enables you, for example, to use a color to control an object’s position or rotation vector.

这种数据类型由红色、绿色和蓝色组成。RGB 值也可以解释为矢量ー因此颜色 r: 10,g: 75,b: 0等于矢量(10; 75; 0)。例如,这使您能够使用颜色来控制对象的位置或旋转向量。

Link

链接

The Link data type contains information on the various elements in a Cinema 4D scene, including information on tags and materials as well as objects. The Link type cannot be converted to other data types. The purpose of the Link data type is to allow you to select a scene element (such as an object, material or tag) for closer examination. For example, you can use the Link data type to add a user data box in the Attribute Manager. You can then assign materials, tags and objects by dragging and dropping them into the box. See also Object, below.

Link 数据类型包含Cinema 4D 场景中各种元素的信息,包括关于标签和材质以及对象的信息。链接类型无法转换为其他数据类型。Link 数据类型的用途是允许您选择场景元素(如对象、材质或标签)以便进行更仔细的检查。例如,可以使用 Link 数据类型在 Attribute Manager 中添加用户数据框。然后,您可以通过将材质、标签和对象拖放到框中来分配它们。参见下面的 Object。

Filename

文件名

This data type allows you to store a file path. For example, the Sound node uses the Filename data type to store the path of the sound file that you want to load.

此数据类型允许您存储文件路径。例如,Sound 节点使用 Filename 数据类型来存储要加载的声音文件的路径。

Texture

纹理

This element contains a reference to a texture, i.e. to an image file or shader. This data type is of use only when used with materials, such as within a material channel.

此元素包含对纹理的引用,即对图像文件或着色器的引用。这种数据类型只有在与材质一起使用时才有用,例如在材质通道内。

Lens Glow

透镜发光

TheLens Glow data type is a container for a complete data set — in this case, all the information required to control lens glow for a light source. This data type cannot be converted to other types.

辉光数据类型是一个完整数据集的容器ーー在这种情况下,是控制光源透镜辉光所需的全部信息。此数据类型不能转换为其他类型。

Boole

布尔

The Bool data type has two possible states: True or False. These states are represented by the numeric values 1 (True) and 0 (False). Although you can use Bool values in math calculations, keep in mind that the Bool data type is able to hold a value of 0 or 1 only. When you want to combine several Bool values, use Logic nodes.

Bool 数据类型有两种可能的状态: True 或 False。这些状态由数值1(True)和0(False)表示。尽管您可以在数学计算中使用 Bool 值,但请记住,Bool 数据类型只能容纳0或1的值。当您想要组合几个 Bool 值时,使用 Logic 节点。

Integer

整数

The Integer data type supports whole numbers (not fractional numbers) that can be negative, zero or positive. Numbers after a decimal point will be ignored; this can lead to inaccurate results if fractions are involved. You can use the Integer data type with all numeric and vector formats.

Integer 数据类型支持整数(不是小数) ,可以是负数、零或正数。小数点后面的数字将被忽略; 如果涉及到分数,这可能导致不准确的结果。您可以使用所有数字和向量格式的 Integer 数据类型。

When converting a vector to an integer or a real, the length of the vector is calculated automatically from the calculation SQRT(V.x*V.x+V.y*V.y+V.z*V.z), where V.x, V.y and V.z are the X, Y and Z components of the vector and SQRT is the square root function. On the other hand, when an integer or a real is converted to a vector, the value is used for the vector’s X, Y and Z components. For example, the real 12.5 is converted to the vector (12.5;12.5;12.5).

当向量转换为整数或实数时,由计算 SQRT (V.x * V.x + V.y * V.y + V.z * V.z)自动计算向量的长度,其中 V.x、 V.y 和 V.z 分量为向量的 x、 y 和 z 分量,SQRT 为平方根函数。另一方面,当一个整数或一个实数转换为一个向量时,该值用于向量的 x、 y 和 z 分量。例如,实际的12.5被转换为矢量(12.5; 12.5; 12.5)。

Real

真的

Unlike integers, reals can be fractional numbers. A typical example of a real is Pi, i.e. 3.141592654. Use the Real type when complex calculations are involved and you want an accurate result. Reals can be converted to vectors or integers. When a real is converted to an integer, all numbers after the decimal point will be lost (i.e. reals are rounded down when converted to integers).

与整数不同,实数可以是小数。实数的一个典型例子是 π,即3.141592654。当涉及到复杂的计算并且希望得到准确的结果时,使用 Real 类型。实数可以转换为向量或整数。当一个实数被转换成一个整数时,小数点后面的所有数字都会丢失(也就是说,当转换成整数时,实数会向下舍入)。

Vector

病媒

The Vector data type is important for manipulating positions and rotations in 3D space. Object positions, HPB angles, colors and point coordinates are all stored as vectors. The values are stored in the vector one by one. For example, positions are stored in the order (X position; Y position; Z position) and rotations in the order (H angle; P angle; B angle). In Cinema 4D, a vector always has three components. If you convert a vector to an integer, the length of the vector is converted rather than the individual components. You can also use vectors with matrices.

Vector 数据类型对于操作3D 空间中的位置和旋转非常重要。对象位置、 HPB 角度、颜色和点坐标都存储为向量。这些值一个一个地存储在向量中。例如,位置按顺序(x 位置; y 位置; z 位置)和旋转(h 角度; p 角度; b 角度)存储。在 Cinema 4D 中,矢量通常有三个分量。如果将向量转换为整数,则转换的是向量的长度,而不是各个分量。还可以将向量与矩阵一起使用。

Normal

正常

A normalized vector is a vector of the same direction, but with a length of 1.

规范化向量是一个方向相同但长度为1的向量。

Matrix

矩阵

A matrix is a group of vectors, such as an object’s global matrix, that contains the object’s position vector and three vectors for each object axis. The axis vectors represent not only the direction of the object, but also its scale (the scale is defined by the length of each axis vector). Therefore the global matrix gives you access to the object’s position, scale and rotation.

矩阵是一组向量,例如一个物体的全局矩阵,它包含物体的位置向量和每个物体轴的三个向量。轴向量不仅表示物体的方向,还表示其尺度(尺度由每个轴向量的长度定义)。因此,全局矩阵使您能够访问对象的位置、比例和旋转。

The four vectors are stored in the following registers of the global matrix: V0 for the position vector (called the Offset vector); V1 (X axis); V2 (Y axis) and V3 (Z axis). Using these registers, you can read or overwrite any vector, such as V2 for the object’s Y axis.

这四个向量存储在全局矩阵的下列寄存器中: 位置向量 V0(称为偏移向量) ; V1(x 轴) ; V2(y 轴)和 V3(z 轴)。使用这些寄存器,您可以读取或覆盖任何向量,例如对象的 y 轴的 V2。

Time

时间

The Time data type gives you access to the animation’s current time. Keep in mind that this value is affected by the frame rate. For example, if the rate is 25 frames per second, the Time value for frame 24 is one second exactly. The Time data type is especially useful for controlling dynamic processes since it enables you to take an animation’s progress into account. For example, you can make a ball bounce once per second or make an object follow another over a particular period of time. See also Date/Time above.

Time 数据类型使您可以访问动画的当前时间。请记住,这个值受帧速率的影响。例如,如果速率是25帧率/秒,那么帧24的时间值正好是1秒。Time 数据类型对于控制动态流程特别有用,因为它使您能够考虑动画的进度。例如,你可以让一个球每秒反弹一次,或者让一个物体在一段特定的时间内跟随另一个物体。参见上面的日期/时间。

String

字符串

The String data type is for text and character strings. A string can hold letters, numbers and special characters. For example, you can use the String data type to allow the user to input a name into a text box. In addition, XPresso wires are able to automatically convert numeric sequences in the string to vectors, matrices or other numeric formats. For example, you can pass the string 12;4;5 to a node instead of the vector (12;4;5).

String 数据类型用于文本和字符串。字符串可以包含字母、数字和特殊字符。例如,可以使用 String 数据类型允许用户将名称输入到文本框中。此外,XPresso 连线能够自动将字符串中的数字序列转换为矢量、矩阵或其他数字格式。例如,可以将字符串12; 4; 5传递给节点,而不是向量(12; 4; 5)。

Object

对象

The Object type is a sub-type of Link and is used for object data only. Among other things, this data type gives you access to an object’s global and local matrices. See also Link, above.

Object 类型是 Link 的子类型,仅用于对象数据。此数据类型还提供了对对象的全局和局部矩阵的访问。参见上面的链接。

Gradient

梯度

The gradient data type consists of a large number of values that represent a gradient. It cannot be converted to other data types. (Although individual colors can be converted to vectors, there is no way to specify the color’s position in the gradient in order to access it).

渐变数据类型由大量表示渐变的值组成。无法将其转换为其他数据类型。(虽然单个颜色可以转换为矢量,但是没有办法指定颜色在渐变中的位置来访问它)。

Include/ Exclude

包含/排除

Using the Include and Exclude lists, lights can be restricted to specific objects. The Include and Exclude lists contain a list of objects. Since this is specifically designed for use with light sources, no conversion is available. Use an object or light instead to read tags, materials or objects, e.g., in a User Data field.

使用包含和排除列表,灯光可以限制在特定的对象。“包含”和“排除”列表包含对象列表。由于这是专门设计用于光源,没有转换是可用的。使用对象或光线来代替阅读标签、材质或对象,例如,在用户数据字段中。

Priority

优先权

The Priority data type contains the XPriority and its numerical value, plus details on the order of evaluation. This data type is used for the priority port of tags.

Priority 数据类型包含 XPriority 及其数值,以及计算顺序的详细信息。此数据类型用于标记的优先级端口。

Font

字体

The Font data type stores information for a chosen font, including whether it should be used as a TrueType or PostScript font. For example, you can use the Font data type to vary the appearance of a text spline. The Font data type cannot be converted to other types.

Font 数据类型存储所选字体的信息,包括是否应该将其用作 TrueType 或 PostScript 字体。例如,可以使用 Font 数据类型改变文本样条的外观。无法将 Font 数据类型转换为其他类型。

Date/Time

日期/时间

In contrast to the Time data type, Date/Time queries your computer’s current system time (in the format hours:minutes:seconds) and system date. For example, you might create a Sun expression that sets a light’s position and color to match the current real time.

与 Time 数据类型不同,date/Time 查询计算机当前系统时间(格式为小时: 分钟: 秒)和系统日期。例如,您可以创建一个 Sun 表达式,该表达式设置光的位置和颜色以匹配当前的实时。

Spline

花键

With the Spline data type, you draw a spline in the Attribute Manager using a graph. The graph runs from the variable extremes Min X to Max X along the horizontal axis and from Min Y to Max Y along the vertical axis.

使用样条数据类型,可以在 Attribute Manager 中使用图形绘制样条。图表沿着水平轴从极值极值极值极值极值极值极值极值极值极值极值极值极值极值极值极值极值极值极值极值极值极值极值极值极值极值极值极值极值极值极值极值。

The XPresso Pool

XPresso Pool

The XPresso Pool provides a quick way to add nodes to the XPresso Editor. The XPresso Pool contains all of the Cinema 4D nodes, to which you can add your own pools, where each node is configured to suit your needs. For example, suppose you often need to create a Math node for integer subtraction (Data Type set to Integer and Function set to Subtract). Rather than change these parameters manually each time you need to create such a node, you can add the configured node to the XPressoPool. The next time you need the node, you can drag it from the pool and drop it into the XPresso Editor, already set up for integer subtraction.

XPresso 池提供了一种向 XPresso 编辑器添加节点的快速方法。XPresso Pool 包含所有 Cinema 4D 节点,您可以向其中添加自己的池,其中每个节点都配置为适合您的需要。例如,假设您经常需要创建一个用于整数减法的 Math 节点(Data Type 设置为 Integer,Function 设置为 dept)。与其在每次需要创建这样的节点时手动更改这些参数,您可以将已配置的节点添加到 xpresspool 中。下次需要该节点时,可以将其从池中拖放到 XPresso 编辑器中,该编辑器已经设置了整数减法。

Clicking on the magnifying glass icon will open a text line filter, which can be used to display only the Nodes for which you are searching without displaying all sub-directories.

点击放大镜图标将打开一个文本行过滤器,它只能用于显示您正在搜索的节点,而不显示所有子目录。

This is a display filter that works in realtime. All you have to do is enter the text that relates to the Nodes you want displayed. Every element that contains this text in part or in whole will be displayed. Capitalization does not affect the results. Clicking on the X button will clear the text field.

这是一个实时工作的显示过滤器。您所要做的就是输入与要显示的节点相关的文本。将显示包含此文本的部分或全部的每个元素。资本化不影响结果。单击 x 按钮将清除文本字段。

To open the XPresso Pool:

打开 XPresso Pool:

Create Pool

创建泳池

Choose this command to create a new pool for your own node configurations. Use the dialog that opens to define a save path for the pool (note that groups are saved to the Library / xnode folder within the user folder); the pool is saved automatically and will be made available each time you restart Cinema 4D. To add your own node configurations to the pool, first configure the nodes as desired in the XPresso Editor then drag and drop the nodes into the pool.

选择此命令为您自己的节点配置创建一个新池。使用打开的对话框为池定义保存路径(注意组保存到用户文件夹中的 Library/xnode 文件夹中) ; 池将自动保存,并且每次重新启动 Cinema 4D 时都可以使用。要将自己的节点配置添加到池中,首先在 XPresso Editor 中按照需要配置节点,然后将节点拖放到池中。

Load Pool

负荷池

This command allows you to load a pool file.

这个命令允许您加载一个池文件。

Remove Preset

删除预置

You cannot remove nodes from the original pool. 无法从原始池中移除节点

Removes the selected preset or folder from the pool.

从池中移除选定的预设置或文件夹。

Rename Preset

重命名预设

Renames the preset. For example, if you have configured a Math node for integer subtraction, you may want to rename it to Subtract Int.

重新命名预置。例如,如果配置了用于整数减法的 Math 节点,则可能希望将其重命名为 decoutionint。

Create Folder

创建文件夹

Creates a new folder. This enables you to arrange your own pool into folders for better organization. Drag and drop the nodes that you want to place within the folder from the XPresso Pool or XPresso Editor into the folder.

创建一个新文件夹。这使您能够将自己的池安排到文件夹中,以便更好地组织。将要放置在文件夹中的节点从 xpressopool 或 xpressoeditor 拖放到该文件夹中。

Menu

菜单

XPresso Context Menus

上下文菜单

XPresso Manager

XPresso Pool