Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/drawnode.c
| Show First 20 Lines • Show All 3,266 Lines • ▼ Show 20 Lines | static void node_geometry_buts_align_rotation_to_vector(uiLayout *layout, | ||||
| bContext *UNUSED(C), | bContext *UNUSED(C), | ||||
| PointerRNA *ptr) | PointerRNA *ptr) | ||||
| { | { | ||||
| uiItemR(layout, ptr, "axis", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE); | uiItemR(layout, ptr, "axis", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE); | ||||
| uiLayout *col = uiLayoutColumn(layout, false); | uiLayout *col = uiLayoutColumn(layout, false); | ||||
| uiItemR(col, ptr, "input_type_factor", DEFAULT_FLAGS, IFACE_("Factor"), ICON_NONE); | uiItemR(col, ptr, "input_type_factor", DEFAULT_FLAGS, IFACE_("Factor"), ICON_NONE); | ||||
| uiItemR(col, ptr, "input_type_vector", DEFAULT_FLAGS, IFACE_("Vector"), ICON_NONE); | uiItemR(col, ptr, "input_type_vector", DEFAULT_FLAGS, IFACE_("Vector"), ICON_NONE); | ||||
| } | } | ||||
| static void node_geometry_buts_point_translate(uiLayout *layout, | |||||
| bContext *UNUSED(C), | |||||
| PointerRNA *ptr) | |||||
| { | |||||
| uiItemR(layout, ptr, "input_type", DEFAULT_FLAGS, IFACE_("Type"), ICON_NONE); | |||||
| } | |||||
| static void node_geometry_buts_point_scale(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) | |||||
| { | |||||
| uiItemR(layout, ptr, "input_type", DEFAULT_FLAGS, IFACE_("Type"), ICON_NONE); | |||||
| } | |||||
| static void node_geometry_set_butfunc(bNodeType *ntype) | static void node_geometry_set_butfunc(bNodeType *ntype) | ||||
| { | { | ||||
| switch (ntype->type) { | switch (ntype->type) { | ||||
| case GEO_NODE_BOOLEAN: | case GEO_NODE_BOOLEAN: | ||||
| ntype->draw_buttons = node_geometry_buts_boolean_math; | ntype->draw_buttons = node_geometry_buts_boolean_math; | ||||
| break; | break; | ||||
| case GEO_NODE_SUBDIVISION_SURFACE: | case GEO_NODE_SUBDIVISION_SURFACE: | ||||
| Show All 30 Lines | case GEO_NODE_ATTRIBUTE_COLOR_RAMP: | ||||
| ntype->draw_buttons = node_geometry_buts_attribute_color_ramp; | ntype->draw_buttons = node_geometry_buts_attribute_color_ramp; | ||||
| break; | break; | ||||
| case GEO_NODE_POINT_ROTATE: | case GEO_NODE_POINT_ROTATE: | ||||
| ntype->draw_buttons = node_geometry_buts_point_rotate; | ntype->draw_buttons = node_geometry_buts_point_rotate; | ||||
| break; | break; | ||||
| case GEO_NODE_ALIGN_ROTATION_TO_VECTOR: | case GEO_NODE_ALIGN_ROTATION_TO_VECTOR: | ||||
| ntype->draw_buttons = node_geometry_buts_align_rotation_to_vector; | ntype->draw_buttons = node_geometry_buts_align_rotation_to_vector; | ||||
| break; | break; | ||||
| case GEO_NODE_POINT_TRANSLATE: | |||||
| ntype->draw_buttons = node_geometry_buts_point_translate; | |||||
| break; | |||||
| case GEO_NODE_POINT_SCALE: | |||||
| ntype->draw_buttons = node_geometry_buts_point_scale; | |||||
| break; | |||||
| } | } | ||||
| } | } | ||||
| /* ****************** BUTTON CALLBACKS FOR FUNCTION NODES ***************** */ | /* ****************** BUTTON CALLBACKS FOR FUNCTION NODES ***************** */ | ||||
| static void node_function_buts_boolean_math(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) | static void node_function_buts_boolean_math(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) | ||||
| { | { | ||||
| uiItemR(layout, ptr, "operation", DEFAULT_FLAGS, "", ICON_NONE); | uiItemR(layout, ptr, "operation", DEFAULT_FLAGS, "", ICON_NONE); | ||||
| ▲ Show 20 Lines • Show All 914 Lines • Show Last 20 Lines | |||||