Blender  V2.93
RNA_enum_types.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
17 #pragma once
18 
23 #include "RNA_types.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 struct ID;
30 struct bNodeSocketType;
31 struct bNodeTreeType;
32 struct bNodeType;
33 
34 /* Types */
35 
36 /* use in cases where only dynamic types are used */
39 
40 /* all others should follow 'rna_enum_*_items' naming */
42 
48 
73 
77 
82 
87 
94 
97 
104 
106 
110 
113 
115 
118 
120 
124 
127 
131 
141 
144 
146 
149 
151 
153 
155 
157 
159 
161 
164 
166 
170 
172 
174 
177 
180 
182 
184 
186 
190 
194 
196 
198 
200 
209 
211 
213 
215 
218 
223 
225 
233 
235 
238 
242 extern const EnumPropertyItem *rna_enum_attribute_domain_itemf(struct ID *id, bool *r_free);
243 
245 
246 /* API calls */
251  bool (*poll)(void *data, struct bNodeTreeType *),
252  bool *r_free);
253 
254 int rna_node_type_to_enum(struct bNodeType *typeinfo);
258  bool (*poll)(void *data, struct bNodeType *),
259  bool *r_free);
260 
265  void *data, bool (*poll)(void *data, struct bNodeSocketType *), bool *r_free);
266 
267 struct PointerRNA;
268 struct PropertyRNA;
269 struct bContext;
270 
272  struct PointerRNA *ptr,
273  struct PropertyRNA *prop,
274  bool *r_free);
275 
276 /* Generic functions, return an enum from library data, index is the position
277  * in the linked list can add more for different types as needed */
279  struct PointerRNA *ptr,
280  struct PropertyRNA *prop,
281  bool *r_free);
282 #if 0
283 EnumPropertyItem *RNA_action_local_itemf(struct bContext *C,
284  struct PointerRNA *ptr,
285  struct PropertyRNA *prop,
286  bool *r_free);
287 #endif
289  struct PointerRNA *ptr,
290  struct PropertyRNA *prop,
291  bool *r_free);
293  struct PointerRNA *ptr,
294  struct PropertyRNA *prop,
295  bool *r_free);
297  struct PointerRNA *ptr,
298  struct PropertyRNA *prop,
299  bool *r_free);
301  struct PointerRNA *ptr,
302  struct PropertyRNA *prop,
303  bool *r_free);
305  struct PointerRNA *ptr,
306  struct PropertyRNA *prop,
307  bool *r_free);
309  struct PointerRNA *ptr,
310  struct PropertyRNA *prop,
311  bool *r_free);
313  struct PointerRNA *ptr,
314  struct PropertyRNA *prop,
315  bool *r_free);
317  struct PointerRNA *ptr,
318  struct PropertyRNA *prop,
319  bool *r_free);
321  struct PointerRNA *ptr,
322  struct PropertyRNA *prop,
323  bool *r_free);
325  struct PointerRNA *ptr,
326  struct PropertyRNA *prop,
327  bool *r_free);
329  struct PointerRNA *ptr,
330  struct PropertyRNA *prop,
331  bool *r_free);
332 
333 /* Non confirming, utility function. */
335 
336 #ifdef __cplusplus
337 }
338 #endif
const EnumPropertyItem rna_enum_bake_pass_type_items[]
Definition: rna_render.c:81
const EnumPropertyItem rna_enum_axis_xy_items[]
Definition: rna_modifier.c:578
const EnumPropertyItem * RNA_collection_local_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
struct bNodeSocketType * rna_node_socket_type_from_enum(int value)
const EnumPropertyItem rna_enum_mesh_select_mode_uv_items[]
Definition: rna_scene.c:150
const EnumPropertyItem rna_enum_operator_context_items[]
Definition: rna_ui.c:44
const EnumPropertyItem rna_enum_dt_method_loop_items[]
Definition: rna_modifier.c:461
const EnumPropertyItem rna_enum_space_type_items[]
Definition: rna_space.c:72
const EnumPropertyItem rna_enum_event_value_all_items[]
Definition: rna_wm.c:376
const EnumPropertyItem rna_enum_preference_section_items[]
Definition: rna_userdef.c:72
const EnumPropertyItem rna_enum_property_type_items[]
Definition: rna_rna.c:56
const EnumPropertyItem rna_enum_object_empty_drawtype_items[]
Definition: rna_object.c:140
const EnumPropertyItem rna_enum_brush_image_tool_items[]
Definition: rna_brush.c:168
const EnumPropertyItem rna_enum_metaelem_type_items[]
Definition: rna_object.c:223
const EnumPropertyItem * rna_node_tree_type_itemf(void *data, bool(*poll)(void *data, struct bNodeTreeType *), bool *r_free)
const EnumPropertyItem rna_enum_controller_type_items[]
const EnumPropertyItem * rna_enum_attribute_domain_itemf(struct ID *id, bool *r_free)
const EnumPropertyItem rna_enum_keying_flag_items_api[]
Definition: rna_animation.c:76
const EnumPropertyItem rna_enum_ramp_blend_items[]
Definition: rna_material.c:37
const EnumPropertyItem rna_enum_image_color_depth_items[]
Definition: rna_scene.c:409
const EnumPropertyItem rna_enum_symmetrize_direction_items[]
const EnumPropertyItem rna_enum_image_type_items[]
Definition: rna_scene.c:366
const EnumPropertyItem rna_enum_keyframe_paste_offset_items[]
struct bNodeTreeType * rna_node_tree_type_from_enum(int value)
const EnumPropertyItem * RNA_mask_local_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
int rna_node_socket_idname_to_enum(const char *idname)
const EnumPropertyItem rna_enum_shading_type_items[]
Definition: rna_space.c:385
const EnumPropertyItem rna_enum_dt_method_edge_items[]
Definition: rna_modifier.c:434
const EnumPropertyItem rna_enum_proportional_falloff_curve_only_items[]
Definition: rna_scene.c:132
const EnumPropertyItem rna_enum_space_sequencer_view_type_items[]
Definition: rna_space.c:177
const EnumPropertyItem rna_enum_linestyle_thickness_modifier_type_items[]
Definition: rna_linestyle.c:78
const EnumPropertyItem rna_enum_uilist_layout_type_items[]
Definition: rna_ui.c:60
int rna_node_socket_type_to_enum(struct bNodeSocketType *typeinfo)
const EnumPropertyItem * RNA_image_local_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
const EnumPropertyItem rna_enum_exr_codec_items[]
const EnumPropertyItem rna_enum_workspace_object_mode_items[]
Definition: rna_object.c:103
const EnumPropertyItem rna_enum_views_format_multilayer_items[]
Definition: rna_scene.c:475
const EnumPropertyItem rna_enum_boidrule_type_items[]
Definition: rna_boid.c:43
const EnumPropertyItem rna_enum_fmodifier_type_items[]
Definition: rna_fcurve.c:45
const EnumPropertyItem rna_enum_event_type_mask_items[]
Definition: rna_wm.c:426
const EnumPropertyItem rna_enum_dt_method_poly_items[]
Definition: rna_modifier.c:492
const EnumPropertyItem rna_enum_mesh_select_mode_items[]
Definition: rna_scene.c:143
const EnumPropertyItem rna_enum_attribute_domain_with_auto_items[]
Definition: rna_attribute.c:65
const EnumPropertyItem rna_enum_snap_target_items[]
Definition: rna_scene.c:107
const EnumPropertyItem * rna_node_type_itemf(void *data, bool(*poll)(void *data, struct bNodeType *), bool *r_free)
const EnumPropertyItem rna_enum_region_type_items[]
Definition: rna_screen.c:35
const EnumPropertyItem rna_enum_sequence_modifier_type_items[]
Definition: rna_sequencer.c:72
const EnumPropertyItem rna_enum_axis_flag_xyz_items[]
Definition: rna_modifier.c:591
const EnumPropertyItem rna_enum_brush_weight_tool_items[]
Definition: rna_brush.c:160
const EnumPropertyItem DummyRNA_DEFAULT_items[]
Definition: rna_rna.c:45
const EnumPropertyItem rna_enum_stereo3d_display_items[]
Definition: rna_scene.c:487
const EnumPropertyItem rna_enum_linestyle_geometry_modifier_type_items[]
Definition: rna_linestyle.c:99
const EnumPropertyItem rna_enum_uv_sculpt_tool_items[]
const EnumPropertyItem rna_enum_object_gpencil_type_items[]
Definition: rna_object.c:159
const EnumPropertyItem rna_enum_object_rotation_mode_items[]
Definition: rna_object.c:286
const EnumPropertyItem * RNA_scene_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
const EnumPropertyItem rna_enum_rigidbody_object_type_items[]
Definition: rna_rigidbody.c:43
const EnumPropertyItem rna_enum_normal_swizzle_items[]
Definition: rna_scene.c:426
const EnumPropertyItem rna_enum_color_sets_items[]
Definition: rna_pose.c:44
const EnumPropertyItem rna_enum_event_value_keymouse_items[]
Definition: rna_wm.c:395
const EnumPropertyItem rna_enum_modifier_triangulate_ngon_method_items[]
Definition: rna_modifier.c:338
const EnumPropertyItem rna_enum_keyframe_paste_merge_items[]
const EnumPropertyItem rna_enum_id_type_items[]
Definition: rna_ID.c:46
const EnumPropertyItem rna_enum_brush_gpencil_sculpt_types_items[]
Definition: rna_brush.c:207
int rna_node_tree_idname_to_enum(const char *idname)
const EnumPropertyItem rna_enum_mapping_type_items[]
Definition: rna_nodetree.c:112
const EnumPropertyItem * RNA_enum_node_tree_types_itemf_impl(struct bContext *C, bool *r_free)
const EnumPropertyItem * RNA_action_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
const EnumPropertyItem * RNA_movieclip_local_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
const EnumPropertyItem rna_enum_render_pass_debug_type_items[]
const EnumPropertyItem rna_enum_motionpath_bake_location_items[]
Definition: rna_animviz.c:40
const EnumPropertyItem rna_enum_beztriple_interpolation_easing_items[]
Definition: rna_fcurve.c:124
int rna_node_type_to_enum(struct bNodeType *typeinfo)
const EnumPropertyItem * RNA_scene_without_active_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
const EnumPropertyItem rna_enum_space_image_mode_items[]
Definition: rna_space.c:294
const EnumPropertyItem rna_enum_rigidbody_object_shape_items[]
Definition: rna_rigidbody.c:58
const EnumPropertyItem rna_enum_object_modifier_type_items[]
Definition: rna_modifier.c:62
const EnumPropertyItem rna_enum_dt_mix_mode_items[]
Definition: rna_modifier.c:513
const EnumPropertyItem rna_enum_particle_edit_hair_brush_items[]
const EnumPropertyItem * RNA_movieclip_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
const EnumPropertyItem rna_enum_property_unit_items[]
Definition: rna_rna.c:111
const EnumPropertyItem rna_enum_brush_sculpt_tool_items[]
Definition: rna_brush.c:105
const EnumPropertyItem rna_enum_keying_flag_items[]
Definition: rna_animation.c:55
const EnumPropertyItem * rna_TransformOrientation_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
const EnumPropertyItem rna_enum_beztriple_interpolation_mode_items[]
Definition: rna_curve.c:82
const EnumPropertyItem rna_enum_brush_vertex_tool_items[]
Definition: rna_brush.c:152
const EnumPropertyItem rna_enum_lightprobes_type_items[]
Definition: rna_object.c:233
const EnumPropertyItem rna_enum_proportional_falloff_items[]
Definition: rna_scene.c:115
const EnumPropertyItem rna_enum_brush_uv_sculpt_tool_items[]
Definition: rna_brush.c:145
const EnumPropertyItem rna_enum_object_mode_items[]
Definition: rna_object.c:65
const EnumPropertyItem rna_enum_nla_mode_blend_items[]
Definition: rna_nla.c:512
const EnumPropertyItem rna_enum_keyingset_path_grouping_items[]
Definition: rna_animation.c:44
const EnumPropertyItem rna_enum_object_shaderfx_type_items[]
Definition: rna_shader_fx.c:47
const EnumPropertyItem rna_enum_curveprofile_preset_items[]
const EnumPropertyItem rna_enum_snap_node_element_items[]
Definition: rna_scene.c:181
const EnumPropertyItem rna_enum_object_axis_items[]
Definition: rna_object.c:302
const EnumPropertyItem rna_enum_dt_layers_select_src_items[]
Definition: rna_modifier.c:551
const EnumPropertyItem rna_enum_unpack_method_items[]
const EnumPropertyItem rna_enum_property_subtype_items[]
Definition: rna_rna.c:68
const EnumPropertyItem rna_enum_object_type_curve_items[]
Definition: rna_object.c:279
const EnumPropertyItem rna_enum_transform_mode_types[]
const EnumPropertyItem rna_enum_event_value_tweak_items[]
Definition: rna_wm.c:407
const EnumPropertyItem rna_enum_node_socket_in_out_items[]
Definition: rna_nodetree.c:65
const EnumPropertyItem rna_enum_light_type_items[]
Definition: object_add.c:134
const EnumPropertyItem rna_enum_space_file_browse_mode_items[]
Definition: rna_space.c:184
const EnumPropertyItem rna_enum_clip_editor_mode_items[]
Definition: rna_space.c:447
const EnumPropertyItem rna_enum_axis_xyz_items[]
Definition: rna_modifier.c:584
const EnumPropertyItem rna_enum_node_math_items[]
Definition: rna_nodetree.c:145
const EnumPropertyItem rna_enum_object_type_items[]
Definition: rna_object.c:254
const EnumPropertyItem rna_enum_brush_gpencil_vertex_types_items[]
Definition: rna_brush.c:198
const EnumPropertyItem rna_enum_icon_items[]
Definition: rna_ui_api.c:46
const EnumPropertyItem rna_enum_beztriple_keyframe_type_items[]
Definition: rna_fcurve.c:95
const EnumPropertyItem rna_enum_event_type_items[]
Definition: rna_wm.c:146
const EnumPropertyItem rna_enum_bake_pass_filter_type_items[]
Definition: rna_scene.c:533
const EnumPropertyItem rna_enum_render_pass_type_items[]
Definition: rna_render.c:50
const EnumPropertyItem rna_enum_fcurve_auto_smoothing_items[]
Definition: rna_fcurve.c:79
const EnumPropertyItem rna_enum_dt_method_vertex_items[]
Definition: rna_modifier.c:402
const EnumPropertyItem rna_enum_snap_element_items[]
Definition: rna_scene.c:158
const EnumPropertyItem rna_enum_modifier_triangulate_quad_method_items[]
Definition: rna_modifier.c:314
const EnumPropertyItem rna_enum_bake_save_mode_items[]
Definition: rna_scene.c:450
const EnumPropertyItem rna_enum_node_vec_math_items[]
Definition: rna_nodetree.c:214
const EnumPropertyItem rna_enum_attribute_domain_items[]
Definition: rna_attribute.c:52
const EnumPropertyItem rna_enum_particle_edit_disconnected_hair_brush_items[]
const EnumPropertyItem rna_enum_operator_property_tags[]
Definition: rna_wm.c:498
const EnumPropertyItem rna_enum_driver_target_rotation_mode_items[]
Definition: rna_fcurve.c:151
const EnumPropertyItem rna_enum_space_image_mode_all_items[]
Definition: rna_space.c:279
const EnumPropertyItem rna_enum_keyframe_handle_type_items[]
Definition: rna_curve.c:53
const EnumPropertyItem * rna_node_socket_type_itemf(void *data, bool(*poll)(void *data, struct bNodeSocketType *), bool *r_free)
const EnumPropertyItem rna_enum_space_graph_mode_items[]
Definition: rna_space.c:167
const EnumPropertyItem rna_enum_rigidbody_constraint_type_items[]
Definition: rna_rigidbody.c:89
const EnumPropertyItem rna_enum_brush_gpencil_weight_types_items[]
Definition: rna_brush.c:251
const EnumPropertyItem rna_enum_transform_pivot_items_full[]
Definition: rna_scene.c:552
const EnumPropertyItem * RNA_collection_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
const EnumPropertyItem rna_enum_window_cursor_items[]
Definition: rna_wm_api.c:45
const EnumPropertyItem rna_enum_bake_target_items[]
Definition: rna_scene.c:436
const EnumPropertyItem rna_enum_node_boolean_math_items[]
Definition: rna_nodetree.c:266
const EnumPropertyItem rna_enum_mesh_delimit_mode_items[]
Definition: rna_mesh.c:49
const EnumPropertyItem rna_enum_wm_report_items[]
Definition: rna_wm.c:508
const EnumPropertyItem rna_enum_context_mode_items[]
Definition: rna_context.c:35
const EnumPropertyItem rna_enum_curve_fit_method_items[]
Definition: rna_scene.c:244
const EnumPropertyItem rna_enum_node_map_range_items[]
Definition: rna_nodetree.c:307
const EnumPropertyItem rna_enum_views_format_items[]
Definition: rna_scene.c:471
const EnumPropertyItem rna_enum_keymap_propvalue_items[]
Definition: rna_wm.c:420
const EnumPropertyItem rna_enum_node_float_compare_items[]
Definition: rna_nodetree.c:273
const EnumPropertyItem DummyRNA_NULL_items[]
Definition: rna_rna.c:40
const EnumPropertyItem rna_enum_fileselect_params_sort_items[]
Definition: rna_space.c:327
const EnumPropertyItem rna_enum_normal_space_items[]
Definition: rna_scene.c:420
struct bNodeType * rna_node_type_from_enum(int value)
const EnumPropertyItem rna_enum_views_format_multiview_items[]
Definition: rna_scene.c:479
const EnumPropertyItem rna_enum_node_filter_items[]
Definition: rna_nodetree.c:349
const EnumPropertyItem * RNA_scene_local_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
const EnumPropertyItem rna_enum_collection_color_items[]
const EnumPropertyItem rna_enum_keyblock_type_items[]
Definition: rna_key.c:803
const EnumPropertyItem rna_enum_transform_orientation_items[]
Definition: rna_scene.c:578
const EnumPropertyItem rna_enum_stereo3d_anaglyph_type_items[]
Definition: rna_scene.c:519
const EnumPropertyItem rna_enum_stereo3d_interlace_type_items[]
Definition: rna_scene.c:526
const EnumPropertyItem rna_enum_nla_mode_extend_items[]
Definition: rna_nla.c:543
int rna_node_idname_to_enum(const char *idname)
const EnumPropertyItem rna_enum_navigation_mode_items[]
Definition: rna_userdef.c:105
const EnumPropertyItem rna_enum_object_greasepencil_modifier_type_items[]
const EnumPropertyItem rna_enum_dt_layers_select_dst_items[]
Definition: rna_modifier.c:567
const EnumPropertyItem rna_enum_operator_type_flag_items[]
Definition: rna_wm.c:449
const EnumPropertyItem rna_enum_operator_return_items[]
Definition: rna_wm.c:476
const EnumPropertyItem rna_enum_node_clamp_items[]
Definition: rna_nodetree.c:331
const EnumPropertyItem rna_enum_brush_gpencil_types_items[]
Definition: rna_brush.c:178
const EnumPropertyItem rna_enum_attribute_type_items[]
Definition: rna_attribute.c:40
const EnumPropertyItem * RNA_mask_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
int rna_node_tree_type_to_enum(struct bNodeTreeType *typeinfo)
const EnumPropertyItem rna_enum_image_color_mode_items[]
Definition: rna_scene.c:388
const EnumPropertyItem rna_enum_image_generated_type_items[]
Definition: rna_image.c:43
const EnumPropertyItem rna_enum_space_action_mode_items[]
Definition: rna_space.c:248
const EnumPropertyItem rna_enum_constraint_type_items[]
const EnumPropertyItem rna_enum_texture_type_items[]
Definition: rna_texture.c:58
const EnumPropertyItem rna_enum_prop_dynamicpaint_type_items[]
const EnumPropertyItem rna_enum_linestyle_color_modifier_type_items[]
Definition: rna_linestyle.c:38
const EnumPropertyItem rna_enum_modifier_shrinkwrap_mode_items[]
Definition: rna_modifier.c:352
const EnumPropertyItem * RNA_image_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
const EnumPropertyItem rna_enum_linestyle_alpha_modifier_type_items[]
Definition: rna_linestyle.c:58
#define C
Definition: RandGen.cpp:39
Definition: DNA_ID.h:273
Defines a socket type.
Definition: BKE_node.h:143
bool(* poll)(const struct bContext *C, struct bNodeTreeType *ntreetype)
Definition: BKE_node.h:393
char idname[64]
Definition: BKE_node.h:381
Defines a node type.
Definition: BKE_node.h:221
bool(* poll)(struct bNodeType *ntype, struct bNodeTree *nodetree, const char **r_disabled_hint)
Definition: BKE_node.h:301
char idname[64]
Definition: BKE_node.h:224
PointerRNA * ptr
Definition: wm_files.c:3157