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:
-rw-r--r--source/blender/blenkernel/intern/object.c6
-rw-r--r--source/blender/editors/space_node/node_edit.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 5806b269e7d..048e1cd01e3 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -741,12 +741,12 @@ float dof_camera(Object *ob)
if (cam->dof_ob) {
/* too simple, better to return the distance on the view axis only
* return len_v3v3(ob->obmat[3], cam->dof_ob->obmat[3]); */
- float mat[4][4], obmat[4][4];
+ float mat[4][4], imat[4][4], obmat[4][4];
copy_m4_m4(obmat, ob->obmat);
normalize_m4(obmat);
- invert_m4_m4(ob->imat, obmat);
- mul_m4_m4m4(mat, cam->dof_ob->obmat, ob->imat);
+ invert_m4_m4(imat, obmat);
+ mul_m4_m4m4(mat, cam->dof_ob->obmat, imat);
return (float)fabs(mat[3][2]);
}
return cam->YF_dofdist;
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index b42e9e1fac5..ce32c536389 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -1471,7 +1471,7 @@ bNode *node_add_node(SpaceNode *snode, Scene *scene, int type, float locx, float
node_set_active(snode, node);
if(snode->nodetree->type==NTREE_COMPOSIT) {
- if(ELEM(node->type, CMP_NODE_R_LAYERS, CMP_NODE_COMPOSITE))
+ if(ELEM3(node->type, CMP_NODE_R_LAYERS, CMP_NODE_COMPOSITE, CMP_NODE_DEFOCUS))
node->id = &scene->id;
ntreeCompositForceHidden(snode->edittree, scene);