Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dalai@blender.org>2021-01-19 19:30:44 +0300
committerDalai Felinto <dalai@blender.org>2021-01-19 19:30:44 +0300
commit8b777ee6d69d4805c64756cf6a33db894160ce29 (patch)
treeb9d8decb26cf0841fbdc6451c1ad337eda6649b0 /source/blender/makesdna
parenta9203e25a2e1f1489b8a3705f8883cdd86f094c7 (diff)
Geometry Nodes - Object Info: option to apply obj transform to the geometry
By design the modified object transformations should still work and affect the geometry nodes results. The current behaviour, however, would make the geometry from the object info to not be affected by the modified object transformations. This patch changes that by default. In a similar fashion the Location, Rotation and Scale sockets outputs should be aware of whether the output should be in the global space or in the space of the nodetree. To solve this, the patch introduces a new transformation space "enum" where users can pick "Original" or "Relative" space. Original -------- Output the geometry relative to the input object transform, and the location, rotation and scale relative to the world origin. Relative -------- Bring the input object geometry, location, rotation and scale into the modified object maintaining the relative position between the two objects in the scene. Relative space violates a bit the design of the nodetree. The geometry in this case is transformed so that moving the modified object doesn't interfere with the geometry. This is particularly useful for the boolean node for instance. "Original" is the default space, but old files are set to "Relative" for backwards compatibility. Differential Revision: https://developer.blender.org/D10124
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_node_types.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index b6904f6ae5b..7d18ff3ed58 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -1167,6 +1167,13 @@ typedef struct NodeGeometryPointTranslate {
char _pad[7];
} NodeGeometryPointTranslate;
+typedef struct NodeGeometryObjectInfo {
+ /* GeometryNodeTransformSpace. */
+ uint8_t transform_space;
+
+ char _pad[7];
+} NodeGeometryObjectInfo;
+
/* script node mode */
#define NODE_SCRIPT_INTERNAL 0
#define NODE_SCRIPT_EXTERNAL 1
@@ -1608,6 +1615,11 @@ typedef enum GeometryNodeAlignRotationToVectorAxis {
GEO_NODE_ALIGN_ROTATION_TO_VECTOR_AXIS_Z = 2,
} GeometryNodeAlignRotationToVectorAxis;
+typedef enum GeometryNodeTransformSpace {
+ GEO_NODE_TRANSFORM_SPACE_ORIGINAL = 0,
+ GEO_NODE_TRANSFORM_SPACE_RELATIVE = 1,
+} GeometryNodeTransformSpace;
+
#ifdef __cplusplus
}
#endif