Fix T56500: Origin to geometry crashes on armature
Reviewers: sergey https://developer.blender.org/D3639
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user