Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/drawnode.c
| Show First 20 Lines • Show All 3,291 Lines • ▼ Show 20 Lines | |||||
| static void node_geometry_buts_attribute_sample_texture(uiLayout *layout, | static void node_geometry_buts_attribute_sample_texture(uiLayout *layout, | ||||
| bContext *C, | bContext *C, | ||||
| PointerRNA *ptr) | PointerRNA *ptr) | ||||
| { | { | ||||
| uiTemplateID(layout, C, ptr, "texture", "texture.new", NULL, NULL, 0, ICON_NONE, NULL); | uiTemplateID(layout, C, ptr, "texture", "texture.new", NULL, NULL, 0, ICON_NONE, NULL); | ||||
| } | } | ||||
| static void node_geometry_buts_points_to_volume(uiLayout *layout, | |||||
| bContext *UNUSED(C), | |||||
| PointerRNA *ptr) | |||||
| { | |||||
| uiLayoutSetPropSep(layout, true); | |||||
| uiLayoutSetPropDecorate(layout, false); | |||||
| uiItemR(layout, ptr, "resolution_mode", DEFAULT_FLAGS, IFACE_("Resolution"), ICON_NONE); | |||||
| uiItemR(layout, ptr, "input_type_radius", DEFAULT_FLAGS, IFACE_("Radius"), 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; | ||||
| ▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | case GEO_NODE_POINT_SCALE: | ||||
| ntype->draw_buttons = node_geometry_buts_point_scale; | ntype->draw_buttons = node_geometry_buts_point_scale; | ||||
| break; | break; | ||||
| case GEO_NODE_OBJECT_INFO: | case GEO_NODE_OBJECT_INFO: | ||||
| ntype->draw_buttons = node_geometry_buts_object_info; | ntype->draw_buttons = node_geometry_buts_object_info; | ||||
| break; | break; | ||||
| case GEO_NODE_ATTRIBUTE_SAMPLE_TEXTURE: | case GEO_NODE_ATTRIBUTE_SAMPLE_TEXTURE: | ||||
| ntype->draw_buttons = node_geometry_buts_attribute_sample_texture; | ntype->draw_buttons = node_geometry_buts_attribute_sample_texture; | ||||
| break; | break; | ||||
| case GEO_NODE_POINTS_TO_VOLUME: | |||||
| ntype->draw_buttons = node_geometry_buts_points_to_volume; | |||||
| 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 923 Lines • Show Last 20 Lines | |||||