Blender  V3.3
RNA_path.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #pragma once
4 
16 #include "RNA_types.h"
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 struct ListBase;
23 struct IDProperty;
24 
26  const char *path, const PointerRNA *ptr, PropertyRNA *prop, int intkey, const char *strkey);
27 #if 0 /* UNUSED. */
28 char *RNA_path_back(const char *path);
29 #endif
30 
41 const char *RNA_path_array_index_token_find(const char *rna_path, const PropertyRNA *array_prop);
42 
43 /* RNA_path_resolve() variants only ensure that a valid pointer (and optionally property) exist. */
44 
56 bool RNA_path_resolve(const PointerRNA *ptr,
57  const char *path,
58  PointerRNA *r_ptr,
59  PropertyRNA **r_prop);
60 
69  const char *path,
70  PointerRNA *r_ptr,
71  PropertyRNA **r_prop,
72  int *r_index);
80  const char *path,
81  PointerRNA *r_ptr,
82  PropertyRNA **r_prop,
83  int *r_index);
84 
85 /* RNA_path_resolve_property() variants ensure that pointer + property both exist. */
86 
96  const char *path,
97  PointerRNA *r_ptr,
98  PropertyRNA **r_prop);
99 
109  const char *path,
110  PointerRNA *r_ptr,
111  PropertyRNA **r_prop,
112  int *r_index);
113 
114 /* RNA_path_resolve_property_and_item_pointer() variants ensure that pointer + property both exist,
115  * and resolve last Pointer value if possible (Pointer prop or item of a Collection prop). */
116 
130  const char *path,
131  PointerRNA *r_ptr,
132  PropertyRNA **r_prop,
133  PointerRNA *r_item_ptr);
134 
149  const char *path,
150  PointerRNA *r_ptr,
151  PropertyRNA **r_prop,
152  int *r_index,
153  PointerRNA *r_item_ptr);
154 
155 typedef struct PropertyElemRNA PropertyElemRNA;
160  int index;
161 };
171 bool RNA_path_resolve_elements(PointerRNA *ptr, const char *path, struct ListBase *r_elements);
172 
184 
192 struct ID *RNA_find_real_ID_and_path(struct Main *bmain, struct ID *id, const char **r_path);
193 
195 
196 char *RNA_path_from_real_ID_to_struct(struct Main *bmain,
197  const PointerRNA *ptr,
198  struct ID **r_real);
199 
207  PropertyRNA *prop,
208  int index_dim,
209  int index);
210 
212  const PointerRNA *ptr,
213  PropertyRNA *prop,
214  int index_dim,
215  int index,
216  struct ID **r_real_id);
217 
223  PropertyRNA *prop,
224  const struct StructRNA *type);
225 
230 char *RNA_path_full_ID_py(struct Main *bmain, struct ID *id);
235 char *RNA_path_full_struct_py(struct Main *bmain, const PointerRNA *ptr);
241  struct Main *bmain, const PointerRNA *ptr, PropertyRNA *prop, int index, bool use_fallback);
242 char *RNA_path_full_property_py(struct Main *bmain,
243  const PointerRNA *ptr,
244  PropertyRNA *prop,
245  int index);
250 char *RNA_path_struct_property_py(PointerRNA *ptr, PropertyRNA *prop, int index);
255 char *RNA_path_property_py(const PointerRNA *ptr, PropertyRNA *prop, int index);
256 
257 #ifdef __cplusplus
258 }
259 #endif
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
char * RNA_path_full_ID_py(struct Main *bmain, struct ID *id)
Definition: rna_path.cc:1182
char * RNA_path_full_struct_py(struct Main *bmain, const PointerRNA *ptr)
Definition: rna_path.cc:1217
char * RNA_path_property_py(const PointerRNA *ptr, PropertyRNA *prop, int index)
char * RNA_path_from_ID_to_struct(const PointerRNA *ptr)
Definition: rna_path.cc:981
char * RNA_path_struct_property_py(PointerRNA *ptr, PropertyRNA *prop, int index)
Definition: rna_path.cc:1298
bool RNA_path_resolve_full_maybe_null(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index)
Definition: rna_path.cc:525
char * RNA_path_from_ID_to_property_index(const PointerRNA *ptr, PropertyRNA *prop, int index_dim, int index)
Definition: rna_path.cc:1071
struct ID * RNA_find_real_ID_and_path(struct Main *bmain, struct ID *id, const char **r_path)
Definition: rna_path.cc:919
bool RNA_path_resolve_property_and_item_pointer(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop, PointerRNA *r_item_ptr)
Definition: rna_path.cc:553
bool RNA_path_resolve_full(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index)
Definition: rna_path.cc:515
char * RNA_path_resolve_from_type_to_property(const PointerRNA *ptr, PropertyRNA *prop, const struct StructRNA *type)
char * RNA_path_from_struct_to_idproperty(PointerRNA *ptr, struct IDProperty *needle)
Definition: rna_path.cc:893
char * RNA_path_from_ID_to_property(const PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_path.cc:1127
char * RNA_path_from_real_ID_to_struct(struct Main *bmain, const PointerRNA *ptr, struct ID **r_real)
Definition: rna_path.cc:1023
char * RNA_path_append(const char *path, const PointerRNA *ptr, PropertyRNA *prop, int intkey, const char *strkey)
bool RNA_path_resolve_property(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop)
Definition: rna_path.cc:531
char * RNA_path_from_real_ID_to_property_index(struct Main *bmain, const PointerRNA *ptr, PropertyRNA *prop, int index_dim, int index, struct ID **r_real_id)
Definition: rna_path.cc:1132
bool RNA_path_resolve_property_full(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index)
Definition: rna_path.cc:543
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)
Definition: rna_path.cc:566
const char * RNA_path_array_index_token_find(const char *rna_path, const PropertyRNA *array_prop)
Definition: rna_path.cc:693
bool RNA_path_resolve_elements(PointerRNA *ptr, const char *path, struct ListBase *r_elements)
Definition: rna_path.cc:579
bool RNA_path_resolve(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop)
Definition: rna_path.cc:503
char * RNA_path_full_property_py(struct Main *bmain, const PointerRNA *ptr, PropertyRNA *prop, int index)
Definition: rna_path.cc:1293
char * RNA_path_full_property_py_ex(struct Main *bmain, const PointerRNA *ptr, PropertyRNA *prop, int index, bool use_fallback)
Definition: rna_path.cc:1245
Definition: DNA_ID.h:368
Definition: BKE_main.h:121
PropertyElemRNA * next
Definition: RNA_path.h:157
PointerRNA ptr
Definition: RNA_path.h:158
PropertyRNA * prop
Definition: RNA_path.h:159
PropertyElemRNA * prev
Definition: RNA_path.h:157
PointerRNA * ptr
Definition: wm_files.c:3480