Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2013-03-19 14:42:33 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2013-03-19 14:42:33 +0400
commit0f3515d4e2cdb4df68540e1dfd74b1dc9e1e821e (patch)
treea06011e46a85e08357dbee01f16a0868e5669480 /source/blender/nodes/texture
parent4857d62ac6fa0c11def1a16b3f13a5a505e23ca3 (diff)
Fixes for context updates of the node editor:
* If the node tree can be updated from context (tree has get_from_context callback defined), reset the pointers first to clear the editor path if no tree can be found. * Stupid mistake: snode->from != snode->from is always false. * Shader nodes context update: set the 'from' pointer to the active object, even if it doesn't have a material or node tree.
Diffstat (limited to 'source/blender/nodes/texture')
-rw-r--r--source/blender/nodes/texture/node_texture_tree.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/nodes/texture/node_texture_tree.c b/source/blender/nodes/texture/node_texture_tree.c
index e1a29a67446..4d67b36f9cc 100644
--- a/source/blender/nodes/texture/node_texture_tree.c
+++ b/source/blender/nodes/texture/node_texture_tree.c
@@ -83,11 +83,13 @@ static void texture_get_from_context(const bContext *C, bNodeTreeType *UNUSED(tr
}
}
else if (snode->texfrom == SNODE_TEX_WORLD) {
- tx = give_current_world_texture(scene->world);
- if (tx) {
+ if (scene->world) {
*r_from = (ID *)scene->world;
- *r_id = &tx->id;
- *r_ntree = tx->nodetree;
+ tx = give_current_world_texture(scene->world);
+ if (tx) {
+ *r_id = &tx->id;
+ *r_ntree = tx->nodetree;
+ }
}
}
else {