Skip to content
Alex Zastrow edited this page Sep 25, 2023 · 1 revision

Annotation macros

Within a macro you can use any of the following string keys to have them replaced on export. For this to happen select include_transform and/or include_parent in your annotation.

$transform

Allows to print the transform of the object your annotation is parented to.

Available Properties

$transform.xyz

Position as [x, y, z]

e.g. [7.686421001143203, 4.140792890676663, 1.2034385204315186]

$transform.position

Position as [x y z]. $transform.position limits the digits behind the digital point

e.g. [7.686421 4.14079289 1.20343852]

$transform.rpy or $transform.rotation

Rotation as [x, y, z]

e.g. [0.0, 0.0, 1.0920987065103218]

$transform.vec

$transform.xyz and $transform.rpy in a single list

e.g. [7.686421001143203, 4.140792890676663, 1.2034385204315186, 0.0, 0.0, 1.0920987065103218]

$transform.quaternion

Quaternion as [x y z w]

e.g. [ 0. 0. -0.17364815 0.98480776]

$transform.quaternion_dict

Quaternion as ['x': x, 'y': y, 'z': z, 'w': w]

e.g. {'x': 0.0, 'y': 0.0, 'z': -0.17364815093563182, 'w': 0.9848077577256569}

$transform.angle_axis

Rotation in angle axis representation as (rotation, axis [x y z])

e.g. (1.0920987065103218, [0. 0. 1.])

$parent

This allows to print the custom properties of the parent object. $parent prints the name of the parent. To get the value of a custom property type $transform.{name}. e.g. $transform.{mass}

Clone this wiki locally