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:
Diffstat (limited to 'source/blender/editors/space_node/drawnode.c')
-rw-r--r--source/blender/editors/space_node/drawnode.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 74ce0d713bf..0933efb1577 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -3319,6 +3319,16 @@ static void node_geometry_buts_rotate_points(uiLayout *layout,
}
}
+static void node_geometry_buts_align_rotation_to_vector(uiLayout *layout,
+ bContext *UNUSED(C),
+ PointerRNA *ptr)
+{
+ uiItemR(layout, ptr, "axis", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
+ uiLayout *col = uiLayoutColumn(layout, false);
+ uiItemR(col, ptr, "input_type_factor", DEFAULT_FLAGS, IFACE_("Factor"), ICON_NONE);
+ uiItemR(col, ptr, "input_type_vector", DEFAULT_FLAGS, IFACE_("Vector"), ICON_NONE);
+}
+
static void node_geometry_set_butfunc(bNodeType *ntype)
{
switch (ntype->type) {
@@ -3361,6 +3371,9 @@ static void node_geometry_set_butfunc(bNodeType *ntype)
case GEO_NODE_ROTATE_POINTS:
ntype->draw_buttons = node_geometry_buts_rotate_points;
break;
+ case GEO_NODE_ALIGN_ROTATION_TO_VECTOR:
+ ntype->draw_buttons = node_geometry_buts_align_rotation_to_vector;
+ break;
}
}