Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-12-17 05:21:49 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-12-17 05:55:06 +0300
commitd72d2d4133ba578ee29e65cc99b01fab0ded0265 (patch)
tree431f413aa00fd1727a888af1f3c55d46bd02b68d /source/blender/blenkernel/intern/object.c
parent9149e8942107343fb31639406124428e6ff1a029 (diff)
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.
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c12
1 files changed, 4 insertions, 8 deletions
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;
}
}