Docs: add doc-string for RNA_property_is_set_ex use_ghost argument

This commit is contained in:
Campbell Barton 2022-02-02 13:35:43 +11:00
parent d82372aee3
commit 9b779993f0
1 changed files with 11 additions and 0 deletions

View File

@ -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);