From d72d2d4133ba578ee29e65cc99b01fab0ded0265 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 17 Dec 2018 13:21:49 +1100 Subject: DNA: clear / remove deprecated flags - Clear deprecated flags for ID's: Scene, Sequence, World, Object & Mesh. - Clear deprecated flags for Spaces: outliner, 3D view & image. - Remove unused `Mesh.drawflag` - Remove unused `USER_ALLWINCODECS`, `USER_MMB_PASTE`. - Remove `V3D_SOLID_TEX` & `V3D_ZBUF_SELECT` - used in a few areas. - Flip `Object.empty_image_visibility_flag` (avoids do-version on each new flag) - Rename 'Backside' -> 'Back' in context of drawing - showing 'Back' makes sense. --- source/blender/blenkernel/intern/object.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'source/blender/blenkernel/intern/object.c') diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index cb5cb96acd3..56843899ff6 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -837,10 +837,6 @@ void BKE_object_init(Object *ob) ob->empty_drawtype = OB_PLAINAXES; ob->empty_drawsize = 1.0; ob->empty_image_depth = OB_EMPTY_IMAGE_DEPTH_DEFAULT; - ob->empty_image_visibility_flag = ( - OB_EMPTY_IMAGE_VISIBLE_PERSPECTIVE | - OB_EMPTY_IMAGE_VISIBLE_ORTHOGRAPHIC | - OB_EMPTY_IMAGE_VISIBLE_BACKSIDE); if (ob->type == OB_EMPTY) { copy_v2_fl(ob->ima_ofs, -0.5f); } @@ -2674,19 +2670,19 @@ void BKE_object_empty_draw_type_set(Object *ob, const int value) bool BKE_object_empty_image_is_visible_in_view3d(const Object *ob, const RegionView3D *rv3d) { - int visibility_flag = ob->empty_image_visibility_flag; + char visibility_flag = ob->empty_image_visibility_flag; - if ((visibility_flag & OB_EMPTY_IMAGE_VISIBLE_BACKSIDE) == 0) { + if ((visibility_flag & OB_EMPTY_IMAGE_HIDE_BACK) != 0) { if (dot_v3v3((float *)&ob->obmat[2], (float *)&rv3d->viewinv[2]) < 0.0f) { return false; } } if (rv3d->is_persp) { - return visibility_flag & OB_EMPTY_IMAGE_VISIBLE_PERSPECTIVE; + return (visibility_flag & OB_EMPTY_IMAGE_HIDE_PERSPECTIVE) == 0; } else { - return visibility_flag & OB_EMPTY_IMAGE_VISIBLE_ORTHOGRAPHIC; + return (visibility_flag & OB_EMPTY_IMAGE_HIDE_ORTHOGRAPHIC) == 0; } } -- cgit v1.2.3