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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-07-25 19:30:26 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-07-25 19:30:26 +0300
commit9a40690242dff4153a48c1da0f0f87a71a020e64 (patch)
tree8e4f32e9db97724877b888b26dfae86654e12b07 /source/blender/makesrna/intern/rna_object_api.c
parentbd326d0d1fedf2bcedbb72fb8f14847991e6cce6 (diff)
Fix for holdout / indirect only with collection instances.
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 44709db9d94..8f8f3176096 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -129,10 +129,10 @@ static bool rna_Object_select_get(Object *ob, bContext *C, ReportList *reports)
if (!base) {
BKE_reportf(reports, RPT_ERROR, "Object '%s' not in View Layer '%s'!", ob->id.name + 2, view_layer->name);
- return -1;
+ return false;
}
- return ((base->flag & BASE_SELECTED) != 0) ? 1 : 0;
+ return ((base->flag & BASE_SELECTED) != 0);
}
static bool rna_Object_visible_get(Object *ob, bContext *C, ReportList *reports)
@@ -142,10 +142,10 @@ static bool rna_Object_visible_get(Object *ob, bContext *C, ReportList *reports)
if (!base) {
BKE_reportf(reports, RPT_ERROR, "Object '%s' not in View Layer '%s'!", ob->id.name + 2, view_layer->name);
- return -1;
+ return false;
}
- return ((base->flag & BASE_VISIBLE) != 0) ? 1 : 0;
+ return ((base->flag & BASE_VISIBLE) != 0);
}
static bool rna_Object_holdout_get(Object *ob, ReportList *reports, ViewLayer *view_layer)
@@ -154,10 +154,10 @@ static bool rna_Object_holdout_get(Object *ob, ReportList *reports, ViewLayer *v
if (!base) {
BKE_reportf(reports, RPT_ERROR, "Object '%s' not in View Layer '%s'!", ob->id.name + 2, view_layer->name);
- return -1;
+ return false;
}
- return ((base->flag & BASE_HOLDOUT) != 0) ? 1 : 0;
+ return ((base->flag & BASE_HOLDOUT) != 0);
}
static bool rna_Object_indirect_only_get(Object *ob, ReportList *reports, ViewLayer *view_layer)
@@ -166,10 +166,10 @@ static bool rna_Object_indirect_only_get(Object *ob, ReportList *reports, ViewLa
if (!base) {
BKE_reportf(reports, RPT_ERROR, "Object '%s' not in View Layer '%s'!", ob->id.name + 2, view_layer->name);
- return -1;
+ return false;
}
- return ((base->flag & BASE_INDIRECT_ONLY) != 0) ? 1 : 0;
+ return ((base->flag & BASE_INDIRECT_ONLY) != 0);
}
/* Convert a given matrix from a space to another (using the object and/or a bone as reference). */