diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-01-08 20:19:12 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-01-08 20:50:44 +0300 |
commit | ae2af4692009fe2c3fc97783f6d69aaa7cac5123 (patch) | |
tree | 897af6264bd392b92712a4c2e5077be9384297af /source/blender/makesdna/DNA_scene_types.h | |
parent | 54985ab5f569f4623695c693dedda7c000e1e73f (diff) |
Fix inconsistent naming and behavior for base visible/selected/editable.
Fixes T60251.
Diffstat (limited to 'source/blender/makesdna/DNA_scene_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index d227beda275..a1e2afaf055 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1959,34 +1959,22 @@ extern const char *RE_engine_id_CYCLES; #define MINAFRAME -1048574 #define MINAFRAMEF -1048574.0f -/* deprecate this! */ #define BASE_VISIBLE(v3d, base) ( \ - (((v3d)->localvd == NULL) || ((v3d)->local_view_uuid & (base)->local_view_bits)) && \ - (((1 << (base)->object->type) & (v3d)->object_type_exclude_viewport) == 0) && \ - (((base)->flag & BASE_VISIBLE) != 0)) -#define BASE_VISIBLE_BGMODE(v3d, base) ( \ ((v3d == NULL) || ((v3d)->localvd == NULL) || ((v3d)->local_view_uuid & (base)->local_view_bits)) && \ ((v3d == NULL) || (((1 << (base)->object->type) & (v3d)->object_type_exclude_viewport) == 0)) && \ (((base)->flag & BASE_VISIBLE) != 0)) - #define BASE_SELECTABLE(v3d, base) ( \ BASE_VISIBLE(v3d, base) && \ - (((1 << (base)->object->type) & (v3d)->object_type_exclude_select) == 0) && \ - (((base)->flag & BASE_SELECTABLE) != 0)) -#define BASE_SELECTABLE_BGMODE(v3d, base) ( \ - BASE_VISIBLE_BGMODE(v3d, base) && \ ((v3d == NULL) || (((1 << (base)->object->type) & (v3d)->object_type_exclude_select) == 0)) && \ (((base)->flag & BASE_SELECTABLE) != 0)) - -#define TESTBASE(v3d, base) \ +#define BASE_SELECTED(v3d, base) \ (BASE_VISIBLE(v3d, base) && (((base)->flag & BASE_SELECTED) != 0)) -#define TESTBASELIB(v3d, base) \ - (TESTBASE(v3d, base) && ((base)->object->id.lib == NULL)) -#define BASE_EDITABLE_BGMODE(v3d, base) \ - (BASE_VISIBLE_BGMODE(v3d, base) && ((base)->object->id.lib == NULL)) -#define TESTBASELIB_BGMODE(v3d, base) \ - (BASE_EDITABLE_BGMODE(v3d, base) && (((base)->flag & BASE_SELECTED) != 0)) +#define BASE_EDITABLE(v3d, base) \ + (BASE_VISIBLE(v3d, base) && ((base)->object->id.lib == NULL)) +#define BASE_SELECTED_EDITABLE(v3d, base) \ + (BASE_EDITABLE(v3d, base) && (((base)->flag & BASE_SELECTED) != 0)) +/* deprecate this! */ #define FIRSTBASE(_view_layer) ((_view_layer)->object_bases.first) #define LASTBASE(_view_layer) ((_view_layer)->object_bases.last) #define BASACT(_view_layer) ((_view_layer)->basact) |