diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-02-14 17:54:33 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-02-14 20:21:47 +0300 |
commit | a76d45cf721db03a88583b660fa2926aefd5fdd8 (patch) | |
tree | abf109e8a1454bc93a0e4ae942f13fc5d73e772c /source/blender/makesdna | |
parent | 1ff3d5bc9ab7b296b1c60038d45ef4c030403162 (diff) |
Layer DNA_scene_types _NEW defines, protect macro parameters
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index c7b418f863b..085bde11619 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1981,38 +1981,38 @@ extern const char *RE_engine_id_CYCLES; (((base)->object->restrictflag & OB_RESTRICT_VIEW) == 0)) #define BASE_SELECTABLE(v3d, base) ( \ (v3d != NULL) && \ - (base->object->restrictflag & (OB_RESTRICT_SELECT | OB_RESTRICT_VIEW)) == 0) + ((base)->object->restrictflag & (OB_RESTRICT_SELECT | OB_RESTRICT_VIEW)) == 0) #define BASE_VISIBLE(v3d, base) ( \ - (base->lay & v3d->lay) && \ - (base->object->restrictflag & OB_RESTRICT_VIEW) == 0) + ((base)->lay & v3d->lay) && \ + ((base)->object->restrictflag & OB_RESTRICT_VIEW) == 0) #define BASE_VISIBLE_BGMODE(v3d, scene, base) ( \ - (base->lay & (v3d ? v3d->lay : scene->lay)) && \ - (base->object->restrictflag & OB_RESTRICT_VIEW) == 0) + ((base)->lay & (v3d ? v3d->lay : scene->lay)) && \ + ((base)->object->restrictflag & OB_RESTRICT_VIEW) == 0) #define TESTBASELIB_NEW(base) ( \ - ((base->flag & BASE_SELECTED) != 0) && \ + (((base)->flag & BASE_SELECTED) != 0) && \ ((base)->object->id.lib == NULL) && \ - ((base->flag & BASE_VISIBLED) != 0)) + (((base)->flag & BASE_VISIBLED) != 0)) #define TESTBASELIB_BGMODE_NEW(base) ( \ - ((base->flag & BASE_SELECTED) != 0) && \ - (base->object->id.lib == NULL) && \ - ((base->flag & BASE_VISIBLED) != 0)) + (((base)->flag & BASE_SELECTED) != 0) && \ + ((base)->object->id.lib == NULL) && \ + (((base)->flag & BASE_VISIBLED) != 0)) #define BASE_EDITABLE_BGMODE_NEW(base) ( \ ((base)->object->id.lib == NULL) && \ - ((base->flag & BASE_VISIBLED) != 0)) + (((base)->flag & BASE_VISIBLED) != 0)) #define BASE_SELECTABLE_NEW(base) \ - ((base->flag & BASE_SELECTABLED) != 0) + (((base)->flag & BASE_SELECTABLED) != 0) #define BASE_VISIBLE_NEW(base) ( \ - (base->flag & BASE_VISIBLED) != 0) + ((base)->flag & BASE_VISIBLED) != 0) #define FIRSTBASE scene->base.first #define LASTBASE scene->base.last #define BASACT (scene->basact) #define OBACT (BASACT ? BASACT->object: NULL) -#define FIRSTBASE_NEW sl->object_bases.first -#define LASTBASE_NEW sl->object_bases.last -#define BASACT_NEW (sl->basact) +#define FIRSTBASE_NEW (sl)->object_bases.first +#define LASTBASE_NEW (sl)->object_bases.last +#define BASACT_NEW ((sl)->basact) #define OBACT_NEW (BASACT_NEW ? BASACT_NEW->object: NULL) #define V3D_CAMERA_LOCAL(v3d) ((!(v3d)->scenelock && (v3d)->camera) ? (v3d)->camera : NULL) |