forked from bartvdbraak/blender
fix for crash adding empty object
This commit is contained in:
parent
0668ad2d55
commit
00afa59004
@ -326,7 +326,9 @@ Object *ED_object_add_type(bContext *C, int type, float *loc, float *rot, int en
|
|||||||
|
|
||||||
DAG_id_type_tag(bmain, ID_OB);
|
DAG_id_type_tag(bmain, ID_OB);
|
||||||
DAG_scene_sort(bmain, scene);
|
DAG_scene_sort(bmain, scene);
|
||||||
ED_render_id_flush_update(bmain, ob->data);
|
if (ob->data) {
|
||||||
|
ED_render_id_flush_update(bmain, ob->data);
|
||||||
|
}
|
||||||
|
|
||||||
if(enter_editmode)
|
if(enter_editmode)
|
||||||
ED_object_enter_editmode(C, EM_IGNORE_LAYER);
|
ED_object_enter_editmode(C, EM_IGNORE_LAYER);
|
||||||
@ -1809,7 +1811,9 @@ Base *ED_object_add_duplicate(Main *bmain, Scene *scene, Base *base, int dupflag
|
|||||||
set_sca_new_poins_ob(ob);
|
set_sca_new_poins_ob(ob);
|
||||||
|
|
||||||
DAG_scene_sort(bmain, scene);
|
DAG_scene_sort(bmain, scene);
|
||||||
ED_render_id_flush_update(bmain, ob->data);
|
if (ob->data) {
|
||||||
|
ED_render_id_flush_update(bmain, ob->data);
|
||||||
|
}
|
||||||
|
|
||||||
return basen;
|
return basen;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user