[Bf-blender-cvs] [9b779993f02] master: Docs: add doc-string for RNA_property_is_set_ex use_ghost argument

Campbell Barton noreply at git.blender.org
Wed Feb 2 03:56:41 CET 2022


Commit: 9b779993f02811da681fe795651153abe737a501
Author: Campbell Barton
Date:   Wed Feb 2 13:35:43 2022 +1100
Branches: master
https://developer.blender.org/rB9b779993f02811da681fe795651153abe737a501

Docs: add doc-string for RNA_property_is_set_ex use_ghost argument

===================================================================

M	source/blender/makesrna/RNA_access.h

===================================================================

diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index a0d45ee4247..130402a31db 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -1514,10 +1514,21 @@ void RNA_collection_clear(PointerRNA *ptr, const char *name);
 
 /**
  * Check if the #IDproperty exists, for operators.
+ *
+ * \param use_ghost: Internally an #IDProperty may exist,
+ * without the RNA considering it to be "set", see #IDP_FLAG_GHOST.
+ * This is used for operators, where executing an operator that has run previously
+ * will re-use the last value (unless #PROP_SKIP_SAVE property is set).
+ * In this case, the presence of the an existing value shouldn't prevent it being initialized
+ * from the context. Even though the this value will be returned if it's requested,
+ * it's not considered to be set (as it would if the menu item or key-map defined it's value).
+ * Set `use_ghost` to true for default behavior, otherwise false to check if there is a value
+ * exists internally and would be returned on request.
  */
 bool RNA_property_is_set_ex(PointerRNA *ptr, PropertyRNA *prop, bool use_ghost);
 bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop);
 void RNA_property_unset(PointerRNA *ptr, PropertyRNA *prop);
+/** See #RNA_property_is_set_ex documentation.  */
 bool RNA_struct_property_is_set_ex(PointerRNA *ptr, const char *identifier, bool use_ghost);
 bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier);
 bool RNA_property_is_idprop(const PropertyRNA *prop);



More information about the Bf-blender-cvs mailing list