Fix #19604: defocus node was not using camera object yet. Could use

a proper fix, but for now this makes things work again.
This commit is contained in:
Brecht Van Lommel
2009-10-19 14:32:32 +00:00
parent 652ea9ee30
commit 54abd775d3
2 changed files with 3 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -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;