Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/drawnode.c
| Show First 20 Lines • Show All 924 Lines • ▼ Show 20 Lines | else | ||||
| uiItemR(row, ptr, "axis", UI_ITEM_R_EXPAND, NULL, 0); | uiItemR(row, ptr, "axis", UI_ITEM_R_EXPAND, NULL, 0); | ||||
| } | } | ||||
| static void node_shader_buts_glossy(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) | static void node_shader_buts_glossy(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) | ||||
| { | { | ||||
| uiItemR(layout, ptr, "distribution", 0, "", ICON_NONE); | uiItemR(layout, ptr, "distribution", 0, "", ICON_NONE); | ||||
| } | } | ||||
| static void node_shader_buts_anisotropic(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) | |||||
| { | |||||
| uiItemR(layout, ptr, "distribution", 0, "", ICON_NONE); | |||||
| } | |||||
| static void node_shader_buts_subsurface(uiLayout *layout, bContext *C, PointerRNA *ptr) | static void node_shader_buts_subsurface(uiLayout *layout, bContext *C, PointerRNA *ptr) | ||||
| { | { | ||||
| /* SSS does not work on GPU yet */ | /* SSS does not work on GPU yet */ | ||||
| PointerRNA scene = CTX_data_pointer_get(C, "scene"); | PointerRNA scene = CTX_data_pointer_get(C, "scene"); | ||||
| if (scene.data) { | if (scene.data) { | ||||
| PointerRNA cscene = RNA_pointer_get(&scene, "cycles"); | PointerRNA cscene = RNA_pointer_get(&scene, "cycles"); | ||||
| if (cscene.data && (RNA_enum_get(&cscene, "device") == 1 && U.compute_device_type != 0)) | if (cscene.data && (RNA_enum_get(&cscene, "device") == 1 && U.compute_device_type != 0)) | ||||
| uiItemL(layout, IFACE_("SSS not supported on GPU"), ICON_ERROR); | uiItemL(layout, IFACE_("SSS not supported on GPU"), ICON_ERROR); | ||||
| ▲ Show 20 Lines • Show All 150 Lines • ▼ Show 20 Lines | switch (ntype->type) { | ||||
| case SH_NODE_TANGENT: | case SH_NODE_TANGENT: | ||||
| ntype->draw_buttons = node_shader_buts_tangent; | ntype->draw_buttons = node_shader_buts_tangent; | ||||
| break; | break; | ||||
| case SH_NODE_BSDF_GLOSSY: | case SH_NODE_BSDF_GLOSSY: | ||||
| case SH_NODE_BSDF_GLASS: | case SH_NODE_BSDF_GLASS: | ||||
| case SH_NODE_BSDF_REFRACTION: | case SH_NODE_BSDF_REFRACTION: | ||||
| ntype->draw_buttons = node_shader_buts_glossy; | ntype->draw_buttons = node_shader_buts_glossy; | ||||
| break; | break; | ||||
| case SH_NODE_BSDF_ANISOTROPIC: | |||||
| ntype->draw_buttons = node_shader_buts_anisotropic; | |||||
| break; | |||||
| case SH_NODE_SUBSURFACE_SCATTERING: | case SH_NODE_SUBSURFACE_SCATTERING: | ||||
| ntype->draw_buttons = node_shader_buts_subsurface; | ntype->draw_buttons = node_shader_buts_subsurface; | ||||
| break; | break; | ||||
| case SH_NODE_VOLUME_SCATTER: | case SH_NODE_VOLUME_SCATTER: | ||||
| ntype->draw_buttons = node_shader_buts_volume; | ntype->draw_buttons = node_shader_buts_volume; | ||||
| break; | break; | ||||
| case SH_NODE_VOLUME_ABSORPTION: | case SH_NODE_VOLUME_ABSORPTION: | ||||
| ntype->draw_buttons = node_shader_buts_volume; | ntype->draw_buttons = node_shader_buts_volume; | ||||
| ▲ Show 20 Lines • Show All 2,382 Lines • Show Last 20 Lines | |||||