Merge branch 'master' into blender2.8

This commit is contained in:
2017-11-29 15:47:00 +01:00
3 changed files with 23 additions and 5 deletions

View File

@@ -205,6 +205,10 @@ void BKE_object_eval_cloth(const struct EvaluationContext *eval_ctx,
struct Scene *scene,
struct Object *object);
void BKE_object_eval_transform_all(struct EvaluationContext *eval_ctx,
struct Scene *scene,
struct Object *object);
void BKE_object_eval_update_shading(const struct EvaluationContext *eval_ctx,
struct Object *object);
void BKE_object_data_select_update(const struct EvaluationContext *eval_ctx,
@@ -226,6 +230,7 @@ void BKE_object_handle_update_ex(
struct Scene *scene, struct Object *ob,
struct RigidBodyWorld *rbw,
const bool do_proxy_update);
void BKE_object_sculpt_modifiers_changed(struct Object *ob);
int BKE_object_obdata_texspace_get(struct Object *ob, short **r_texflag, float **r_loc, float **r_size, float **r_rot);

View File

@@ -391,6 +391,22 @@ void BKE_object_eval_cloth(const EvaluationContext *UNUSED(eval_ctx),
BKE_ptcache_object_reset(scene, object, PTCACHE_RESET_DEPSGRAPH);
}
void BKE_object_eval_transform_all(EvaluationContext *eval_ctx,
Scene *scene,
Object *object)
{
/* This mimics full transform update chain from new depsgraph. */
BKE_object_eval_local_transform(eval_ctx, scene, object);
if (object->parent != NULL) {
BKE_object_eval_parent(eval_ctx, scene, object);
}
if (!BLI_listbase_is_empty(&object->constraints)) {
BKE_object_eval_constraints(eval_ctx, scene, object);
}
BKE_object_eval_uber_transform(eval_ctx, scene, object);
BKE_object_eval_done(eval_ctx, object);
}
void BKE_object_eval_update_shading(const EvaluationContext *UNUSED(eval_ctx),
Object *object)
{

View File

@@ -300,9 +300,7 @@ void applyProject(TransInfo *t)
mul_m4_v3(ob->obmat, iloc);
}
else if (t->flag & T_OBJECT) {
/* TODO(sergey): Ideally force update is not needed here. */
td->ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
BKE_object_handle_update(G.main->eval_ctx, t->scene, td->ob);
BKE_object_eval_transform_all(G.main->eval_ctx, t->scene, td->ob);
copy_v3_v3(iloc, td->ob->obmat[3]);
}
@@ -391,8 +389,7 @@ void applyGridAbsolute(TransInfo *t)
mul_m4_v3(obmat, iloc);
}
else if (t->flag & T_OBJECT) {
td->ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
BKE_object_handle_update(G.main->eval_ctx, t->scene, td->ob);
BKE_object_eval_transform_all(G.main->eval_ctx, t->scene, td->ob);
copy_v3_v3(iloc, td->ob->obmat[3]);
}