Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_scale_elements.cc
| Show All 25 Lines | static void node_declare(NodeDeclarationBuilder &b) | ||||
| b.add_input<decl::Vector>(N_("Center")) | b.add_input<decl::Vector>(N_("Center")) | ||||
| .subtype(PROP_TRANSLATION) | .subtype(PROP_TRANSLATION) | ||||
| .implicit_field() | .implicit_field() | ||||
| .description(N_("Origin of the scaling for each element. If multiple elements are " | .description(N_("Origin of the scaling for each element. If multiple elements are " | ||||
| "connected, their center is averaged")); | "connected, their center is averaged")); | ||||
| b.add_input<decl::Vector>(N_("Axis")) | b.add_input<decl::Vector>(N_("Axis")) | ||||
| .default_value({1.0f, 0.0f, 0.0f}) | .default_value({1.0f, 0.0f, 0.0f}) | ||||
| .supports_field() | .supports_field() | ||||
| .description(N_("Direction in which to scale the element")); | .description(N_("Direction in which to scale the element")) | ||||
| .make_available([](bNode &node) { node.custom2 = GEO_NODE_SCALE_ELEMENTS_SINGLE_AXIS; }); | |||||
| b.add_output<decl::Geometry>(N_("Geometry")); | b.add_output<decl::Geometry>(N_("Geometry")); | ||||
| }; | }; | ||||
| static void node_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) | static void node_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) | ||||
| { | { | ||||
| uiItemR(layout, ptr, "domain", 0, "", ICON_NONE); | uiItemR(layout, ptr, "domain", 0, "", ICON_NONE); | ||||
| uiItemR(layout, ptr, "scale_mode", 0, "", ICON_NONE); | uiItemR(layout, ptr, "scale_mode", 0, "", ICON_NONE); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 429 Lines • Show Last 20 Lines | |||||