From 0be9d8db6582e32d7f7f3b097be12b2763524157 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 5 Jun 2018 11:10:05 +0200 Subject: RNA/Override: Move override-related property flags to own variable. We are already running out of available flags in main, generic int, and everytime I work on static override I find new special cases that will need new specific propflag, so... --- source/blender/makesrna/intern/rna_access.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'source/blender/makesrna/intern/rna_access.c') diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 5a0dec28324..df09e5c68b5 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -1005,6 +1005,11 @@ int RNA_property_flag(PropertyRNA *prop) return rna_ensure_property(prop)->flag; } +int RNA_property_override_flag(PropertyRNA *prop) +{ + return rna_ensure_property(prop)->flag_override; +} + /** * Get the tags set for \a prop as int bitfield. * \note Doesn't perform any validity check on the set bits. #RNA_def_property_tags does this @@ -1976,11 +1981,11 @@ bool RNA_property_overridable_get(PointerRNA *ptr, PropertyRNA *prop) } } /* If this is a RNA-defined property (real or 'virtual' IDProp), we want to use RNA prop flag. */ - return !(prop->flag & PROP_NO_COMPARISON) && (prop->flag & PROP_OVERRIDABLE_STATIC); + return !(prop->flag_override & PROPOVERRIDE_NO_COMPARISON) && (prop->flag_override & PROPOVERRIDE_OVERRIDABLE_STATIC); } else { /* If this is a real 'pure' IDProp (aka custom property), we want to use the IDProp flag. */ - return !(prop->flag & PROP_NO_COMPARISON) && (((IDProperty *)prop)->flag & IDP_FLAG_OVERRIDABLE_STATIC); + return !(prop->flag_override & PROPOVERRIDE_NO_COMPARISON) && (((IDProperty *)prop)->flag & IDP_FLAG_OVERRIDABLE_STATIC); } } @@ -2016,7 +2021,7 @@ bool RNA_property_comparable(PointerRNA *UNUSED(ptr), PropertyRNA *prop) { prop = rna_ensure_property(prop); - return !(prop->flag & PROP_NO_COMPARISON); + return !(prop->flag_override & PROPOVERRIDE_NO_COMPARISON); } /* this function is to check if its possible to create a valid path from the ID -- cgit v1.2.3