Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/drawnode.c
| Show First 20 Lines • Show All 3,202 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| uiItemR(layout, ptr, "blend_type", DEFAULT_FLAGS, "", ICON_NONE); | uiItemR(layout, ptr, "blend_type", DEFAULT_FLAGS, "", 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_a", DEFAULT_FLAGS, IFACE_("A"), 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); | uiItemR(col, ptr, "input_type_b", DEFAULT_FLAGS, IFACE_("B"), ICON_NONE); | ||||
| } | } | ||||
| static void node_geometry_buts_attribute_color_ramp(uiLayout *layout, | |||||
| bContext *UNUSED(C), | |||||
| PointerRNA *ptr) | |||||
| { | |||||
| uiTemplateColorRamp(layout, ptr, "color_ramp", 0); | |||||
| } | |||||
| 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; | ||||
| Show All 11 Lines | case GEO_NODE_POINT_INSTANCE: | ||||
| ntype->draw_buttons = node_geometry_buts_point_instance; | ntype->draw_buttons = node_geometry_buts_point_instance; | ||||
| break; | break; | ||||
| case GEO_NODE_ATTRIBUTE_FILL: | case GEO_NODE_ATTRIBUTE_FILL: | ||||
| ntype->draw_buttons = node_geometry_buts_attribute_fill; | ntype->draw_buttons = node_geometry_buts_attribute_fill; | ||||
| break; | break; | ||||
| case GEO_NODE_ATTRIBUTE_MIX: | case GEO_NODE_ATTRIBUTE_MIX: | ||||
| ntype->draw_buttons = node_geometry_buts_attribute_mix; | ntype->draw_buttons = node_geometry_buts_attribute_mix; | ||||
| break; | break; | ||||
| case GEO_NODE_ATTRIBUTE_COLOR_RAMP: | |||||
| ntype->draw_buttons = node_geometry_buts_attribute_color_ramp; | |||||
| 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 907 Lines • Show Last 20 Lines | |||||