diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-10-19 18:32:32 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-10-19 18:32:32 +0400 |
commit | 54abd775d33ef35a217bb26413341c67fc638fed (patch) | |
tree | 9f17dd08e4cb6074c4cc9827087ad90418452204 /source/blender | |
parent | 652ea9ee303143a1bf5a457d1842c0878e36932f (diff) |
Fix #19604: defocus node was not using camera object yet. Could use
a proper fix, but for now this makes things work again.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 2 | ||||
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/CMP_defocus.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 448eb834818..761fc8b079a 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -4119,7 +4119,7 @@ static void composite_patch(bNodeTree *ntree, Scene *scene) bNode *node; for(node= ntree->nodes.first; node; node= node->next) - if(node->id==NULL && ELEM(node->type, CMP_NODE_R_LAYERS, CMP_NODE_COMPOSITE)) + if(node->id==NULL && ELEM3(node->type, CMP_NODE_R_LAYERS, CMP_NODE_COMPOSITE, CMP_NODE_DEFOCUS)) node->id= &scene->id; } diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c b/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c index b9a4f4c0cc5..0b0df4634a0 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c @@ -253,7 +253,8 @@ static void defocus_blur(bNode *node, CompBuf *new, CompBuf *img, CompBuf *zbuf, // get some required params from the current scene camera // (ton) this is wrong, needs fixed - Object* camob = NULL; // XXX G.scene->camera; + Scene *scene= (Scene*)node->id; + Object* camob = (scene)? scene->camera: NULL; if (camob && camob->type==OB_CAMERA) { Camera* cam = (Camera*)camob->data; cam_lens = cam->lens; |