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:
authorLuca Rood <dev@lucarood.com>2017-07-21 12:53:13 +0300
committerLuca Rood <dev@lucarood.com>2017-07-21 15:47:26 +0300
commit1c4c288727214fa0588d66556a1cdf71755d70b4 (patch)
tree1433952be7e88cc7d09e8563831995290e3013ce /source/blender/collada/collada_utils.cpp
parent9edb7e49d7e5e69385f3a0434c568c79fad88cd8 (diff)
Pass EvaluationContext argument everywhere
Note that some little parts of code have been dissabled because eval_ctx was not available there. This should be resolved once DerivedMesh is replaced.
Diffstat (limited to 'source/blender/collada/collada_utils.cpp')
-rw-r--r--source/blender/collada/collada_utils.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp
index 0f39b27316c..b08d529e6ba 100644
--- a/source/blender/collada/collada_utils.cpp
+++ b/source/blender/collada/collada_utils.cpp
@@ -93,6 +93,9 @@ int bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space)
{
Object workob;
Scene *sce = CTX_data_scene(C);
+ EvaluationContext eval_ctx;
+
+ CTX_data_eval_ctx(C, &eval_ctx);
if (!par || bc_test_parent_loop(par, ob))
return false;
@@ -105,7 +108,7 @@ int bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space)
if (is_parent_space) {
float mat[4][4];
// calc par->obmat
- BKE_object_where_is_calc(sce, par);
+ BKE_object_where_is_calc(&eval_ctx, sce, par);
// move child obmat into world space
mul_m4_m4m4(mat, par->obmat, ob->obmat);
@@ -113,10 +116,10 @@ int bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space)
}
// apply child obmat (i.e. decompose it into rot/loc/size)
- BKE_object_apply_mat4(ob, ob->obmat, 0, 0);
+ BKE_object_apply_mat4(&eval_ctx, ob, ob->obmat, 0, 0);
// compute parentinv
- BKE_object_workob_calc_parent(sce, ob, &workob);
+ BKE_object_workob_calc_parent(&eval_ctx, sce, ob, &workob);
invert_m4_m4(ob->parentinv, workob.obmat);
DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA);