Commit: 25c918196ce66eff4417d7d2e1d3da8c11d96735
Author: Dalai Felinto
Date:   Wed Aug 22 17:02:37 2018 -0300
Branches: blender2.8
https://developer.blender.org/rB25c918196ce66eff4417d7d2e1d3da8c11d96735

Fix T56500: Origin to geometry crashes on armature

Reviewers: sergey

https://developer.blender.org/D3639

===================================================================

M       source/blender/blenkernel/BKE_object.h
M       source/blender/blenkernel/intern/object_update.c
M       source/blender/editors/object/object_transform.c

===================================================================

diff --git a/source/blender/blenkernel/BKE_object.h 
b/source/blender/blenkernel/BKE_object.h
index 7d795c25a04..90df5a5441a 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -308,6 +308,8 @@ struct MovieClip *BKE_object_movieclip_get(struct Scene 
*scene, struct Object *o
 
 void BKE_object_runtime_reset(struct Object *object);
 
+void BKE_object_batch_cache_dirty(struct Object *ob);
+
 /* this function returns a superset of the scenes selection based on 
relationships */
 
 typedef enum eObRelationTypes {
diff --git a/source/blender/blenkernel/intern/object_update.c 
b/source/blender/blenkernel/intern/object_update.c
index 3641df26496..52e3d4a0803 100644
--- a/source/blender/blenkernel/intern/object_update.c
+++ b/source/blender/blenkernel/intern/object_update.c
@@ -302,14 +302,8 @@ void BKE_object_eval_uber_transform(Depsgraph *depsgraph, 
Object *object)
        BKE_object_eval_proxy_copy(depsgraph, object);
 }
 
-void BKE_object_eval_uber_data(Depsgraph *depsgraph,
-                               Scene *scene,
-                               Object *ob)
+void BKE_object_batch_cache_dirty(Object *ob)
 {
-       DEG_debug_print_eval(depsgraph, __func__, ob->id.name, ob);
-       BLI_assert(ob->type != OB_ARMATURE);
-       BKE_object_handle_data_update(depsgraph, scene, ob);
-
        switch (ob->type) {
                case OB_MESH:
                        BKE_mesh_batch_cache_dirty(ob->data, 
BKE_MESH_BATCH_DIRTY_ALL);
@@ -331,6 +325,16 @@ void BKE_object_eval_uber_data(Depsgraph *depsgraph,
        }
 }
 
+void BKE_object_eval_uber_data(Depsgraph *depsgraph,
+                               Scene *scene,
+                               Object *ob)
+{
+       DEG_debug_print_eval(depsgraph, __func__, ob->id.name, ob);
+       BLI_assert(ob->type != OB_ARMATURE);
+       BKE_object_handle_data_update(depsgraph, scene, ob);
+       BKE_object_batch_cache_dirty(ob);
+}
+
 void BKE_object_eval_cloth(Depsgraph *depsgraph,
                            Scene *scene,
                            Object *object)
diff --git a/source/blender/editors/object/object_transform.c 
b/source/blender/editors/object/object_transform.c
index 96b540251b4..fb54c9ec2c2 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -1216,7 +1216,7 @@ static int object_origin_set_exec(bContext *C, wmOperator 
*op)
 
        for (tob = bmain->object.first; tob; tob = tob->id.next) {
                if (tob->data && (((ID *)tob->data)->tag & LIB_TAG_DOIT)) {
-                       BKE_mesh_batch_cache_dirty(tob->data, 
BKE_MESH_BATCH_DIRTY_ALL);
+                       BKE_object_batch_cache_dirty(tob);
                        DEG_id_tag_update(&tob->id, OB_RECALC_OB | 
OB_RECALC_DATA);
                }
        }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to