|
Blender V4.3
|
#include <cstdlib>#include <cstring>#include <fmt/format.h>#include "BLI_alloca.h"#include "BLI_dynstr.h"#include "BLI_listbase.h"#include "BLI_string.h"#include "BLI_string_ref.hh"#include "BLI_utildefines.h"#include "BKE_idprop.hh"#include "BKE_idtype.hh"#include "BKE_lib_id.hh"#include "DNA_ID.h"#include "MEM_guardedalloc.h"#include "RNA_access.hh"#include "RNA_define.hh"#include "RNA_path.hh"#include "RNA_prototypes.hh"#include "rna_access_internal.hh"#include "rna_internal.hh"Go to the source code of this file.
Classes | |
| struct | IDP_Chain |
Functions | |
| bool | operator== (const RNAPath &left, const RNAPath &right) |
| static char * | rna_path_token (const char **path, char *fixedbuf, int fixedlen) |
| static char * | rna_path_token_in_brackets (const char **path, char *fixedbuf, int fixedlen, bool *r_quoted) |
| static bool | rna_path_parse_collection_key (const char **path, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *r_nextptr) |
| static bool | rna_path_parse_array_index (const char **path, PointerRNA *ptr, PropertyRNA *prop, int *r_index) |
| static bool | rna_path_parse (const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index, PointerRNA *r_item_ptr, ListBase *r_elements, const bool eval_pointer) |
| bool | RNA_path_resolve (const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop) |
| bool | RNA_path_resolve_full (const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index) |
| bool | RNA_path_resolve_full_maybe_null (const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index) |
| bool | RNA_path_resolve_property (const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop) |
| bool | RNA_path_resolve_property_full (const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index) |
| bool | RNA_path_resolve_property_and_item_pointer (const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop, PointerRNA *r_item_ptr) |
| bool | RNA_path_resolve_property_and_item_pointer_full (const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index, PointerRNA *r_item_ptr) |
| bool | RNA_path_resolve_elements (PointerRNA *ptr, const char *path, ListBase *r_elements) |
| char * | RNA_path_append (const char *path, const PointerRNA *, PropertyRNA *prop, int intkey, const char *strkey) |
| static | UNUSED_FUNCTION_WITH_RETURN_TYPE (char *, RNA_path_back)(const char *path) |
| const char * | RNA_path_array_index_token_find (const char *rna_path, const PropertyRNA *array_prop) |
| static char * | rna_idp_path_create (IDP_Chain *child_link) |
| static char * | rna_idp_path (PointerRNA *ptr, const IDProperty *haystack, const IDProperty *needle, IDP_Chain *parent_link) |
| std::optional< std::string > | RNA_path_from_struct_to_idproperty (PointerRNA *ptr, const IDProperty *needle) |
| static std::optional< std::string > | rna_path_from_ID_to_idpgroup (const PointerRNA *ptr) |
| ID * | RNA_find_real_ID_and_path (ID *id, const char **r_path) |
| static std::optional< std::string > | rna_prepend_real_ID_path (Main *, ID *id, const blender::StringRef path, ID **r_real_id) |
| std::optional< std::string > | RNA_path_from_ID_to_struct (const PointerRNA *ptr) |
| std::optional< std::string > | RNA_path_from_real_ID_to_struct (Main *bmain, const PointerRNA *ptr, ID **r_real) |
| static void | rna_path_array_multi_from_flat_index (const int dimsize[RNA_MAX_ARRAY_LENGTH], const int totdims, const int index_dim, int index, int r_index_multi[RNA_MAX_ARRAY_LENGTH]) |
| static void | rna_path_array_multi_string_from_flat_index (const PointerRNA *ptr, PropertyRNA *prop, int index_dim, int index, char *index_str, int index_str_len) |
| static std::string | rna_path_from_ptr_to_property_index_ex (const PointerRNA *ptr, PropertyRNA *prop, int index_dim, int index, const blender::StringRef path_prefix) |
| std::string | RNA_path_from_ptr_to_property_index (const PointerRNA *ptr, PropertyRNA *prop, int index_dim, int index) |
| std::optional< std::string > | RNA_path_from_ID_to_property_index (const PointerRNA *ptr, PropertyRNA *prop, int index_dim, int index) |
| std::optional< std::string > | RNA_path_from_ID_to_property (const PointerRNA *ptr, PropertyRNA *prop) |
| std::optional< std::string > | RNA_path_from_real_ID_to_property_index (Main *bmain, const PointerRNA *ptr, PropertyRNA *prop, int index_dim, int index, ID **r_real_id) |
| std::optional< std::string > | RNA_path_resolve_from_type_to_property (const PointerRNA *ptr, PropertyRNA *prop, const StructRNA *type) |
| std::string | RNA_path_full_ID_py (ID *id) |
| std::optional< std::string > | RNA_path_full_struct_py (const PointerRNA *ptr) |
| std::optional< std::string > | RNA_path_full_property_py_ex (const PointerRNA *ptr, PropertyRNA *prop, int index, bool use_fallback) |
| std::optional< std::string > | RNA_path_full_property_py (const PointerRNA *ptr, PropertyRNA *prop, int index) |
| std::optional< std::string > | RNA_path_struct_property_py (PointerRNA *ptr, PropertyRNA *prop, int index) |
| std::string | RNA_path_property_py (const PointerRNA *ptr, PropertyRNA *prop, int index) |
NOTE: equality is defined in a specific way here to reflect the semantic meaning of RNAPath. Since the key existing indicates a key-based array element, with the index then only serving as a fallback, the index only affects the equality result if neither RNAPath has a key specified. (See the main RNAPath documentation above for the specific semantics of key and index.)
Definition at line 37 of file rna_path.cc.
Find the actual ID pointer and path from it to the given ID.
| id | ID reference to search the global owner for. | |
| [out] | r_path | Path from the real ID to the initial ID. |
Definition at line 947 of file rna_path.cc.
References BKE_id_owner_get(), BLI_assert_msg, GS, ID_FLAG_EMBEDDED_DATA, ID_GR, and ID_NT.
Referenced by RNA_path_full_ID_py(), rna_prepend_real_ID_path(), and rna_property_override_property_real_id_owner().
|
static |
Definition at line 815 of file rna_path.cc.
References BLI_assert, IDProperty::data, ELEM, ListBase::first, PropertyRNA::flag, IDPropertyData::group, IDP_GROUP, IDP_IDPARRAY, IDP_IDPArray, IDP_Chain::index, int, IDProperty::len, IDP_Chain::name, IDProperty::name, IDProperty::next, PROP_COLLECTION, PROP_IDPROPERTY, PROP_POINTER, ptr, rna_idp_path(), rna_idp_path_create(), RNA_pointer_is_null(), RNA_property_collection_lookup_int(), RNA_property_pointer_get(), RNA_struct_find_property(), IDProperty::type, PropertyRNA::type, and IDP_Chain::up.
Referenced by rna_idp_path(), and RNA_path_from_struct_to_idproperty().
|
static |
Definition at line 774 of file rna_path.cc.
References BLI_dynstr_appendf(), BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_new(), IDP_Chain::index, MEM_freeN(), IDP_Chain::name, and IDP_Chain::up.
Referenced by rna_idp_path().
| char * RNA_path_append | ( | const char * | path, |
| const PointerRNA * | ptr, | ||
| PropertyRNA * | prop, | ||
| int | intkey, | ||
| const char * | strkey ) |
Definition at line 606 of file rna_path.cc.
References BLI_array_alloca, BLI_dynstr_append(), BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_new(), BLI_str_escape(), PROP_COLLECTION, result, RNA_property_identifier(), RNA_property_type(), and SNPRINTF.
Referenced by blender::ed::outliner::OverrideRNAPathTreeBuilder::build_path(), and blender::ed::outliner::tree_element_to_path().
| const char * RNA_path_array_index_token_find | ( | const char * | rna_path, |
| const PropertyRNA * | array_prop ) |
Search for the start of the 'rna array index' part of the given rna_path.
Given the root RNA pointer and resolved RNA property, and the RNA path, return the first character in rna_path that is part of the array index for the given property. Return NULL if none can be found, e.g. because the property is not an RNA array.
| array_prop | if not NULL, the PropertyRNA assumed to be the last one from the RNA path. Only used to ensure it is a valid array property. |
Definition at line 715 of file rna_path.cc.
References PropertyRNA::arraydimension, BLI_assert, ELEM, PROP_BOOLEAN, PROP_FLOAT, PROP_INT, PropertyRNA::type, and UNLIKELY.
Referenced by BKE_lib_override_library_property_is_animated().
|
static |
Definition at line 1059 of file rna_path.cc.
References BLI_assert, and RNA_MAX_ARRAY_LENGTH.
Referenced by rna_path_array_multi_string_from_flat_index().
|
static |
Definition at line 1080 of file rna_path.cc.
References BLI_snprintf_rlen(), ptr, RNA_MAX_ARRAY_LENGTH, rna_path_array_multi_from_flat_index(), and RNA_property_array_dimension().
Referenced by rna_path_from_ptr_to_property_index_ex().
|
static |
Definition at line 933 of file rna_path.cc.
References BLI_assert, PointerRNA::data, PointerRNA::owner_id, ptr, RNA_id_pointer_create(), and RNA_path_from_struct_to_idproperty().
Referenced by RNA_path_from_ID_to_struct().
| std::optional< std::string > RNA_path_from_ID_to_property | ( | const PointerRNA * | ptr, |
| PropertyRNA * | prop ) |
Definition at line 1166 of file rna_path.cc.
References ptr, and RNA_path_from_ID_to_property_index().
Referenced by add_driver_button_invoke(), add_driver_button_none(), add_keyingset_button_exec(), ANIM_channel_draw_widgets(), blender::animrig::autokeyframe_property(), BKE_fcurve_find_by_rna_context_ui(), BKE_keyblock_curval_rnapath_get(), clear_key_button_exec(), copy_as_driver_button_poll(), copy_data_path_button_poll(), copy_driver_button_exec(), delete_key_button_exec(), draw_grease_pencil_layer_widgets(), driverdropper_sample(), blender::ed::object::followpath_path_animate_exec(), get_fcurves_of_property(), blender::interface::internal::get_property_drivers(), id_data_find_fcurve(), insert_key_button_exec(), blender::animrig::insert_key_layered_action(), blender::animrig::insert_keyframes(), paste_driver_button_exec(), blender::interface::internal::paste_property_drivers(), pyrna_prop_path_from_id(), pyrna_struct_anim_args_parse_ex(), pyrna_struct_getattro(), pyrna_struct_path_from_id(), remove_driver_button_exec(), remove_keyingset_button_exec(), RNA_path_full_property_py_ex(), RNA_path_resolve_from_type_to_property(), RNA_path_struct_property_py(), RNA_property_overridden(), rna_property_override_property_real_id_owner(), RNA_property_path_from_ID_check(), RNA_struct_override_matches(), ui_but_anim_expression_create(), and UI_context_copy_to_selected_list().
| std::optional< std::string > RNA_path_from_ID_to_property_index | ( | const PointerRNA * | ptr, |
| PropertyRNA * | prop, | ||
| int | index_dim, | ||
| int | index ) |
| index_dim | The dimension to show, 0 disables. 1 for 1d array, 2 for 2d. etc. |
| index | The flattened index to use when `index_dim > 0`, this is expanded when used with multi-dimensional arrays. |
Definition at line 1149 of file rna_path.cc.
References PointerRNA::data, PointerRNA::owner_id, ptr, RNA_path_from_ID_to_struct(), rna_path_from_ptr_to_property_index_ex(), RNA_struct_is_ID(), and PointerRNA::type.
Referenced by copy_data_path_button_exec(), RNA_path_from_ID_to_property(), and RNA_path_from_real_ID_to_property_index().
| std::optional< std::string > RNA_path_from_ID_to_struct | ( | const PointerRNA * | ptr | ) |
Definition at line 1007 of file rna_path.cc.
References PointerRNA::data, StructRNA::nested, PointerRNA::owner_id, StructRNA::path, ptr, RNA_id_pointer_create(), rna_path_from_ID_to_idpgroup(), RNA_property_identifier(), RNA_PropertyGroup, rna_struct_find_nested(), RNA_struct_is_a(), RNA_struct_is_ID(), and PointerRNA::type.
Referenced by DEG_get_evaluated_rna_pointer(), fcurves_to_pchan_links_get(), get_item_transform_flags_and_fcurves(), blender::ed::space_node::node_group_make_insert_selected(), blender::ed::space_node::node_group_separate_selected(), blender::ed::space_node::node_group_ungroup(), pyrna_struct_anim_args_parse_no_resolve(), pyrna_struct_path_from_id(), RNA_path_from_ID_to_property_index(), RNA_path_from_real_ID_to_struct(), RNA_path_full_struct_py(), RNA_path_resolve_from_type_to_property(), WM_context_path_resolve_property_full(), and WM_msg_subscribe_rna_params().
| std::string RNA_path_from_ptr_to_property_index | ( | const PointerRNA * | ptr, |
| PropertyRNA * | prop, | ||
| int | index_dim, | ||
| int | index ) |
Definition at line 1141 of file rna_path.cc.
References ptr, and rna_path_from_ptr_to_property_index_ex().
Referenced by pyrna_struct_getattro(), RNA_path_property_py(), and UI_context_copy_to_selected_list().
|
static |
Definition at line 1099 of file rna_path.cc.
References BLI_str_escape(), blender::StringRefBase::is_empty(), PropertyRNA::magic, MAX_IDPROP_NAME, ptr, RNA_MAGIC, RNA_MAX_ARRAY_LENGTH, rna_path_array_multi_string_from_flat_index(), and RNA_property_identifier().
Referenced by RNA_path_from_ID_to_property_index(), and RNA_path_from_ptr_to_property_index().
| std::optional< std::string > RNA_path_from_real_ID_to_property_index | ( | Main * | bmain, |
| const PointerRNA * | ptr, | ||
| PropertyRNA * | prop, | ||
| int | index_dim, | ||
| int | index, | ||
| ID ** | r_real_id ) |
Definition at line 1171 of file rna_path.cc.
References PointerRNA::owner_id, ptr, RNA_path_from_ID_to_property_index(), and rna_prepend_real_ID_path().
Referenced by copy_as_driver_button_exec(), copy_data_path_button_exec(), and pyrna_prop_repr_ex().
| std::optional< std::string > RNA_path_from_real_ID_to_struct | ( | Main * | bmain, |
| const PointerRNA * | ptr, | ||
| ID ** | r_real ) |
Definition at line 1049 of file rna_path.cc.
References PointerRNA::owner_id, ptr, RNA_path_from_ID_to_struct(), and rna_prepend_real_ID_path().
Referenced by pyrna_struct_repr().
| std::optional< std::string > RNA_path_from_struct_to_idproperty | ( | PointerRNA * | ptr, |
| const IDProperty * | needle ) |
Find the path from the structure referenced by the pointer to the runtime RNA-defined IDProperty object.
| ptr | Reference to the object owning the custom property storage. |
| needle | Custom property object to find. |
Definition at line 913 of file rna_path.cc.
References MEM_freeN(), ptr, rna_idp_path(), and RNA_struct_idprops().
Referenced by rna_path_from_ID_to_idpgroup(), and UI_context_copy_to_selected_list().
| std::string RNA_path_full_ID_py | ( | ID * | id | ) |
Get the ID as a python representation, eg: bpy.data.foo["bar"]
Definition at line 1225 of file rna_path.cc.
References BKE_idtype_idcode_to_name_plural(), BLI_str_escape(), GS, ID_IS_LINKED, and RNA_find_real_ID_and_path().
Referenced by console_drop_id_copy(), RNA_path_full_property_py_ex(), RNA_path_full_struct_py(), rna_pointer_as_string__bldata(), and text_drop_id_copy().
| std::optional< std::string > RNA_path_full_property_py | ( | const PointerRNA * | ptr, |
| PropertyRNA * | prop, | ||
| int | index ) |
Definition at line 1311 of file rna_path.cc.
References ptr, and RNA_path_full_property_py_ex().
Referenced by WM_prop_pystring_assign().
| std::optional< std::string > RNA_path_full_property_py_ex | ( | const PointerRNA * | ptr, |
| PropertyRNA * | prop, | ||
| int | index, | ||
| bool | use_fallback ) |
Get the ID.struct.property as a python representation, eg: bpy.data.foo["bar"].some_struct.some_prop[10]
Definition at line 1276 of file rna_path.cc.
References PointerRNA::owner_id, ptr, RNA_path_from_ID_to_property(), RNA_path_full_ID_py(), RNA_property_array_check(), and RNA_property_identifier().
Referenced by copy_data_path_button_exec(), RNA_path_full_property_py(), and ui_tooltip_data_from_button_or_extra_icon().
| std::optional< std::string > RNA_path_full_struct_py | ( | const PointerRNA * | ptr | ) |
Get the ID.struct as a python representation, eg: bpy.data.foo["bar"].some_struct
Definition at line 1260 of file rna_path.cc.
References PointerRNA::owner_id, ptr, RNA_path_from_ID_to_struct(), and RNA_path_full_ID_py().
Referenced by copy_data_path_button_exec(), rna_pointer_as_string__bldata(), and ui_tooltip_data_from_button_or_extra_icon().
|
static |
Generic rna path parser.
| ptr | The root of given RNA path. |
| path | The RNA path. |
| r_ptr | The final RNA data holding the last property in path. |
| r_prop | The final property of r_ptr, from path. |
| r_index | The final index in the r_prop, if defined by path. |
| r_item_ptr | Only valid for Pointer and Collection, return the actual value of the pointer, or of the collection item. Mutually exclusive with eval_pointer option. |
| r_elements | A list of PropertyElemRNA items(pairs of PointerRNA, PropertyRNA that represent the whole given path). |
| eval_pointer | If true, and path leads to a Pointer property, or an item in a Collection property, r_ptr will be set to the value of that property, and r_prop will be null. Mutually exclusive with r_item_ptr. |
Definition at line 369 of file rna_path.cc.
References BLI_addtail(), BLI_assert, PointerRNA::data, IDP_GetPropertyFromGroup(), PropertyElemRNA::index, MEM_freeN(), PropertyElemRNA::prop, PROP_COLLECTION, PROP_POINTER, PropertyElemRNA::ptr, ptr, rna_path_parse_array_index(), rna_path_parse_collection_key(), rna_path_token(), rna_path_token_in_brackets(), RNA_POINTER_INVALIDATE, RNA_property_pointer_get(), RNA_property_type(), RNA_struct_find_property(), and RNA_struct_idprops().
Referenced by RNA_path_resolve(), RNA_path_resolve_elements(), RNA_path_resolve_full(), RNA_path_resolve_full_maybe_null(), RNA_path_resolve_property(), RNA_path_resolve_property_and_item_pointer(), RNA_path_resolve_property_and_item_pointer_full(), and RNA_path_resolve_property_full().
|
static |
Definition at line 252 of file rna_path.cc.
References len, MEM_freeN(), ptr, RNA_MAX_ARRAY_DIMENSION, rna_path_token(), rna_path_token_in_brackets(), RNA_property_array_dimension(), and RNA_property_array_item_index().
Referenced by rna_path_parse().
|
static |
Definition at line 185 of file rna_path.cc.
References PointerRNA::data, MEM_freeN(), ptr, rna_path_token_in_brackets(), RNA_property_collection_lookup_int(), RNA_property_collection_lookup_string(), and RNA_property_collection_type_get().
Referenced by rna_path_parse().
| std::string RNA_path_property_py | ( | const PointerRNA * | ptr, |
| PropertyRNA * | prop, | ||
| int | index ) |
Get the struct.property as a python representation, eg: some_prop[10]
Definition at line 1345 of file rna_path.cc.
References ptr, RNA_path_from_ptr_to_property_index(), and RNA_property_array_check().
Referenced by ui_but_user_menu_add(), ui_but_user_menu_find(), and WM_context_path_resolve_property_full().
| bool RNA_path_resolve | ( | const PointerRNA * | ptr, |
| const char * | path, | ||
| PointerRNA * | r_ptr, | ||
| PropertyRNA ** | r_prop ) |
Resolve the given RNA Path to find the pointer and/or property indicated by fully resolving the path.
Definition at line 525 of file rna_path.cc.
References PointerRNA::data, ptr, and rna_path_parse().
Referenced by DEG_get_evaluated_rna_pointer(), depthdropper_get_path(), eyedropper_init(), find_rna_property_rgba(), radial_control_get_path(), RNA_property_path_from_ID_check(), UI_pie_menu_invoke_from_rna_enum(), and wm_msg_rna_update_by_id().
| bool RNA_path_resolve_elements | ( | PointerRNA * | ptr, |
| const char * | path, | ||
| ListBase * | r_elements ) |
Resolve the given RNA Path into a linked list of PropertyElemRNA's.
To be used when complex operations over path are needed, like e.g. get relative paths, to avoid too much string operations.
Definition at line 601 of file rna_path.cc.
References ptr, and rna_path_parse().
Referenced by blender::ed::outliner::OverrideRNAPathTreeBuilder::build_path(), and RNA_path_resolve_from_type_to_property().
| std::optional< std::string > RNA_path_resolve_from_type_to_property | ( | const PointerRNA * | ptr, |
| PropertyRNA * | prop, | ||
| const StructRNA * | type ) |
Definition at line 1189 of file rna_path.cc.
References BLI_listbase_clear(), blender::StringRef::drop_prefix(), LISTBASE_FOREACH_BACKWARD, LISTBASE_FOREACH_MUTABLE, PointerRNA::owner_id, ptr, RNA_id_pointer_create(), RNA_path_from_ID_to_property(), RNA_path_from_ID_to_struct(), RNA_path_resolve_elements(), and RNA_struct_is_a().
Referenced by UI_context_copy_to_selected_list().
| bool RNA_path_resolve_full | ( | const PointerRNA * | ptr, |
| const char * | path, | ||
| PointerRNA * | r_ptr, | ||
| PropertyRNA ** | r_prop, | ||
| int * | r_index ) |
Resolve the given RNA Path to find the pointer and/or property + array index indicated by fully resolving the path.
Definition at line 537 of file rna_path.cc.
References PointerRNA::data, ptr, and rna_path_parse().
Referenced by BCAnimationCurve::add_value_from_rna(), blender::deg::DepsgraphRelationBuilder::build_animdata_fcurve_target(), blender::deg::DepsgraphRelationBuilder::build_driver_data(), blender::deg::DepsgraphNodeBuilder::build_driver_id_property(), blender::deg::DepsgraphRelationBuilder::build_driver_id_property(), driver_get_variable_property(), blender::deg::RNAPathKey::RNAPathKey(), blender::deg::RNAPathKey::RNAPathKey(), and screen_user_menu_draw().
| bool RNA_path_resolve_full_maybe_null | ( | const PointerRNA * | ptr, |
| const char * | path, | ||
| PointerRNA * | r_ptr, | ||
| PropertyRNA ** | r_prop, | ||
| int * | r_index ) |
A version of RNA_path_resolve_full doesn't check the value of PointerRNA.data.
Definition at line 547 of file rna_path.cc.
References ptr, and rna_path_parse().
Referenced by pyrna_struct_path_resolve().
| bool RNA_path_resolve_property | ( | const PointerRNA * | ptr, |
| const char * | path, | ||
| PointerRNA * | r_ptr, | ||
| PropertyRNA ** | r_prop ) |
Resolve the given RNA Path to find both the pointer AND property indicated by fully resolving the path.
This is a convenience method to avoid logic errors and ugly syntax.
Definition at line 553 of file rna_path.cc.
References PointerRNA::data, ptr, and rna_path_parse().
Referenced by achannel_setting_slider_cb(), blender::animrig::action_fcurve_ensure(), ANIM_add_driver(), ANIM_add_driver_with_target(), ANIM_channel_draw_widgets(), ANIM_copy_driver(), ANIM_list_elem_update(), ANIM_paste_driver(), ANIM_unit_mapping_get_factor(), BKE_animsys_rna_path_resolve(), blend_to_default_fcurve(), calculate_selection_fcurve_bounds(), check_rna_path_is_valid(), clean_fcurve(), blender::animrig::clear_keyframe(), construct_rna_paths(), blender::animrig::delete_keyframe(), draw_grease_pencil_layer_widgets(), getname_anim_fcurve(), graph_panel_key_properties(), blender::deg::AnimatedPropertyStorage::initializeFromID(), blender::animrig::insert_key_layered_action(), insert_key_to_keying_set_path(), blender::animrig::insert_keyframe_direct(), blender::animrig::insert_keyframes(), lib_override_library_id_reset_do(), nlaevalchan_verify(), override_remove_button_exec(), pastebuf_match_path_property(), blender::animrig::reevaluate_fcurve_errors(), RNA_struct_find_property(), RNA_struct_override_apply(), RNA_struct_override_store(), UI_context_copy_to_selected_check(), UI_context_copy_to_selected_list(), and update_autoflags_fcurve().
| bool RNA_path_resolve_property_and_item_pointer | ( | const PointerRNA * | ptr, |
| const char * | path, | ||
| PointerRNA * | r_ptr, | ||
| PropertyRNA ** | r_prop, | ||
| PointerRNA * | r_item_ptr ) |
Resolve the given RNA Path to find both the pointer AND property indicated by fully resolving the path, and get the value of the Pointer property (or item of the collection).
This is a convenience method to avoid logic errors and ugly syntax, it combines both RNA_path_resolve and RNA_path_resolve_property in a single call.
| r_item_ptr | The final Pointer or Collection item value. You must check for its validity before use! |
Definition at line 575 of file rna_path.cc.
References PointerRNA::data, ptr, and rna_path_parse().
Referenced by RNA_struct_override_apply().
| bool RNA_path_resolve_property_and_item_pointer_full | ( | const PointerRNA * | ptr, |
| const char * | path, | ||
| PointerRNA * | r_ptr, | ||
| PropertyRNA ** | r_prop, | ||
| int * | r_index, | ||
| PointerRNA * | r_item_ptr ) |
Resolve the given RNA Path to find both the pointer AND property (as well as the array index) indicated by fully resolving the path, and get the value of the Pointer property (or item of the collection).
This is a convenience method to avoid logic errors and ugly syntax, it combines both RNA_path_resolve_full and RNA_path_resolve_property_full in a single call.
| r_item_ptr | The final Pointer or Collection item value. You must check for its validity before use! |
Definition at line 588 of file rna_path.cc.
References PointerRNA::data, ptr, and rna_path_parse().
| bool RNA_path_resolve_property_full | ( | const PointerRNA * | ptr, |
| const char * | path, | ||
| PointerRNA * | r_ptr, | ||
| PropertyRNA ** | r_prop, | ||
| int * | r_index ) |
Resolve the given RNA Path to find the pointer AND property (as well as the array index) indicated by fully resolving the path.
This is a convenience method to avoid logic errors and ugly syntax.
Definition at line 565 of file rna_path.cc.
References PointerRNA::data, ptr, and rna_path_parse().
Referenced by BKE_lib_override_rna_property_find(), dtar_get_prop_val(), pyrna_struct_anim_args_parse_ex(), and blender::nodes::inverse_eval::set_rna_property().
| std::optional< std::string > RNA_path_struct_property_py | ( | PointerRNA * | ptr, |
| PropertyRNA * | prop, | ||
| int | index ) |
Get the struct.property as a python representation, eg: some_struct.some_prop[10]
Definition at line 1318 of file rna_path.cc.
References PointerRNA::owner_id, ptr, RNA_path_from_ID_to_property(), RNA_property_array_check(), RNA_property_identifier(), RNA_struct_find_property(), RNA_struct_is_ID(), and PointerRNA::type.
|
static |
Extract the first token from path.
| path | Extract the token from path, step the pointer to the beginning of the next token |
Definition at line 56 of file rna_path.cc.
References ELEM, len, MEM_mallocN, and UNLIKELY.
Referenced by rna_path_parse(), rna_path_parse_array_index(), and UNUSED_FUNCTION_WITH_RETURN_TYPE().
|
static |
Extract the first token in brackets from path (with quoted text support).
[0] -> 0["Some\"Quote"] -> Some"Quote| path | Extract the token from path, step the pointer to the beginning of the next token (past quoted text and brackets). |
Definition at line 96 of file rna_path.cc.
References BLI_assert, BLI_str_escape_find_quote(), BLI_str_unescape(), len, MEM_mallocN, and UNLIKELY.
Referenced by rna_path_parse(), rna_path_parse_array_index(), rna_path_parse_collection_key(), and UNUSED_FUNCTION_WITH_RETURN_TYPE().
|
static |
Definition at line 975 of file rna_path.cc.
References blender::StringRefBase::is_empty(), and RNA_find_real_ID_and_path().
Referenced by RNA_path_from_real_ID_to_property_index(), and RNA_path_from_real_ID_to_struct().
|
static |
Definition at line 657 of file rna_path.cc.
References BLI_strdup(), MEM_freeN(), result, rna_path_token(), and rna_path_token_in_brackets().