Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/space_node.c
| Show First 20 Lines • Show All 376 Lines • ▼ Show 20 Lines | |||||
| /* spacetype; init callback */ | /* spacetype; init callback */ | ||||
| static void node_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa)) | static void node_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa)) | ||||
| { | { | ||||
| } | } | ||||
| static void node_area_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn, const Scene *scene) | static void node_area_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn, Scene *scene, | ||||
| WorkSpace *workspace) | |||||
| { | { | ||||
| /* note, ED_area_tag_refresh will re-execute compositor */ | /* note, ED_area_tag_refresh will re-execute compositor */ | ||||
| SpaceNode *snode = sa->spacedata.first; | SpaceNode *snode = sa->spacedata.first; | ||||
| ViewRender *view_render = BKE_viewrender_get(scene, workspace); | |||||
| /* shaderfrom is only used for new shading nodes, otherwise all shaders are from objects */ | /* shaderfrom is only used for new shading nodes, otherwise all shaders are from objects */ | ||||
| short shader_type = BKE_scene_use_new_shading_nodes(scene) ? snode->shaderfrom : SNODE_SHADER_OBJECT; | short shader_type = BKE_viewrender_use_new_shading_nodes(view_render) ? snode->shaderfrom : SNODE_SHADER_OBJECT; | ||||
| /* preview renders */ | /* preview renders */ | ||||
| switch (wmn->category) { | switch (wmn->category) { | ||||
| case NC_SCENE: | case NC_SCENE: | ||||
| switch (wmn->data) { | switch (wmn->data) { | ||||
| case ND_NODES: | case ND_NODES: | ||||
| { | { | ||||
| ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); | ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); | ||||
| ▲ Show 20 Lines • Show All 618 Lines • Show Last 20 Lines | |||||