[Bf-blender-cvs] [a76d45cf72] blender2.8: Layer DNA_scene_types _NEW defines, protect macro parameters
Dalai Felinto
noreply at git.blender.org
Tue Feb 14 18:55:39 CET 2017
Commit: a76d45cf721db03a88583b660fa2926aefd5fdd8
Author: Dalai Felinto
Date: Tue Feb 14 15:54:33 2017 +0100
Branches: blender2.8
https://developer.blender.org/rBa76d45cf721db03a88583b660fa2926aefd5fdd8
Layer DNA_scene_types _NEW defines, protect macro parameters
===================================================================
M source/blender/makesdna/DNA_scene_types.h
===================================================================
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index c7b418f863..085bde1161 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)
More information about the Bf-blender-cvs
mailing list