Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/node_edit.c
| Show First 20 Lines • Show All 716 Lines • ▼ Show 20 Lines | if (ntree->type == NTREE_SHADER) { | ||||
| /* if active texture changed, free glsl materials */ | /* if active texture changed, free glsl materials */ | ||||
| if ((node->flag & NODE_ACTIVE_TEXTURE) && !was_active_texture) { | if ((node->flag & NODE_ACTIVE_TEXTURE) && !was_active_texture) { | ||||
| LISTBASE_FOREACH (Material *, ma, &bmain->materials) { | LISTBASE_FOREACH (Material *, ma, &bmain->materials) { | ||||
| if (ma->nodetree && ma->use_nodes && ntreeHasTree(ma->nodetree, ntree)) { | if (ma->nodetree && ma->use_nodes && ntreeHasTree(ma->nodetree, ntree)) { | ||||
| GPU_material_free(&ma->gpumaterial); | GPU_material_free(&ma->gpumaterial); | ||||
| } | } | ||||
| } | } | ||||
| LISTBASE_FOREACH (World *, wo, &bmain->materials) { | LISTBASE_FOREACH (World *, wo, &bmain->worlds) { | ||||
| if (wo->nodetree && wo->use_nodes && ntreeHasTree(wo->nodetree, ntree)) { | if (wo->nodetree && wo->use_nodes && ntreeHasTree(wo->nodetree, ntree)) { | ||||
| GPU_material_free(&wo->gpumaterial); | GPU_material_free(&wo->gpumaterial); | ||||
| } | } | ||||
| } | } | ||||
| if (r_active_texture_changed) { | if (r_active_texture_changed) { | ||||
| *r_active_texture_changed = true; | *r_active_texture_changed = true; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 2,078 Lines • Show Last 20 Lines | |||||