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
path: root/source
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2010-03-18 01:54:55 +0300
committerMatt Ebb <matt@mke3.net>2010-03-18 01:54:55 +0300
commit045d33dae056d4ede4a2dc5d62b1306b01425842 (patch)
tree42b1f742a4206b54fd5958d2b520f0f6203ac860 /source
parent634b750cbbeab549c0b083a382e694c9412ea491 (diff)
Fixed a crash switching to brush texture nodes
Also removed some python code to check for node materials within the material and texture properties. It seems to go fine without it, and this should be handled by context instead.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_node/node_edit.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 473f706f6f8..7a5757e99d2 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -401,11 +401,13 @@ void snode_set_context(SpaceNode *snode, Scene *scene)
snode->from= (ID*)give_current_material(ob, ob->actcol);
/* from is not set fully for material nodes, should be ID + Node then */
+ snode->id= &tx->id;
}
}
else if(snode->texfrom==SNODE_TEX_WORLD) {
tx= give_current_world_texture(scene->world);
snode->from= (ID *)scene->world;
+ snode->id= &tx->id;
}
else {
Brush *brush= NULL;
@@ -415,11 +417,12 @@ void snode_set_context(SpaceNode *snode, Scene *scene)
else
brush= paint_brush(&scene->toolsettings->imapaint.paint);
- snode->from= (ID *)brush;
- tx= give_current_brush_texture(brush);
+ if (brush) {
+ snode->from= (ID *)brush;
+ tx= give_current_brush_texture(brush);
+ snode->id= &tx->id;
+ }
}
-
- snode->id= &tx->id;
}
if(snode->id)