Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/drawnode.c
| Show First 20 Lines • Show All 3,176 Lines • ▼ Show 20 Lines | static void node_geometry_buts_attribute_math(uiLayout *layout, | ||||
| bContext *UNUSED(C), | bContext *UNUSED(C), | ||||
| PointerRNA *ptr) | PointerRNA *ptr) | ||||
| { | { | ||||
| uiItemR(layout, ptr, "operation", DEFAULT_FLAGS, "", ICON_NONE); | uiItemR(layout, ptr, "operation", DEFAULT_FLAGS, "", ICON_NONE); | ||||
| uiItemR(layout, ptr, "input_type_a", DEFAULT_FLAGS, IFACE_("Type A"), ICON_NONE); | uiItemR(layout, ptr, "input_type_a", DEFAULT_FLAGS, IFACE_("Type A"), ICON_NONE); | ||||
| uiItemR(layout, ptr, "input_type_b", DEFAULT_FLAGS, IFACE_("Type B"), ICON_NONE); | uiItemR(layout, ptr, "input_type_b", DEFAULT_FLAGS, IFACE_("Type B"), ICON_NONE); | ||||
| } | } | ||||
| static void node_geometry_buts_attribute_mix(uiLayout *layout, | |||||
| bContext *UNUSED(C), | |||||
| PointerRNA *ptr) | |||||
| { | |||||
| uiItemR(layout, ptr, "blend_type", DEFAULT_FLAGS, "", ICON_NONE); | |||||
| uiLayout *col = uiLayoutColumn(layout, false); | |||||
| uiItemR(col, ptr, "input_type_factor", DEFAULT_FLAGS, IFACE_("Factor"), ICON_NONE); | |||||
| uiItemR(col, ptr, "input_type_a", DEFAULT_FLAGS, IFACE_("A"), ICON_NONE); | |||||
| uiItemR(col, ptr, "input_type_b", DEFAULT_FLAGS, IFACE_("B"), 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: | ||||
| ntype->draw_buttons = node_geometry_buts_subdivision_surface; | ntype->draw_buttons = node_geometry_buts_subdivision_surface; | ||||
| break; | break; | ||||
| case GEO_NODE_TRIANGULATE: | case GEO_NODE_TRIANGULATE: | ||||
| ntype->draw_buttons = node_geometry_buts_triangulate; | ntype->draw_buttons = node_geometry_buts_triangulate; | ||||
| break; | break; | ||||
| case GEO_NODE_RANDOM_ATTRIBUTE: | case GEO_NODE_RANDOM_ATTRIBUTE: | ||||
| ntype->draw_buttons = node_geometry_buts_random_attribute; | ntype->draw_buttons = node_geometry_buts_random_attribute; | ||||
| break; | break; | ||||
| case GEO_NODE_ATTRIBUTE_MATH: | case GEO_NODE_ATTRIBUTE_MATH: | ||||
| ntype->draw_buttons = node_geometry_buts_attribute_math; | ntype->draw_buttons = node_geometry_buts_attribute_math; | ||||
| break; | break; | ||||
| case GEO_NODE_ATTRIBUTE_MIX: | |||||
| ntype->draw_buttons = node_geometry_buts_attribute_mix; | |||||
| 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 902 Lines • Show Last 20 Lines | |||||