Blender V5.3
rna_main.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include <cstdlib>
10#include <cstring>
11
12#include "BLI_path_utils.hh"
13#include "BLI_string_ref.hh"
14
15#include "BLT_translation.hh"
16
17#include "RNA_define.hh"
18#include "RNA_enum_types.hh"
19
20#include "rna_internal.hh"
21
23
24namespace blender {
25
28 "BLENDER_OCIO",
29 0,
30 "BLENDER_OCIO environment variable",
31 "The BLENDER_OCIO environment variable"},
33 "OCIO",
34 0,
35 "OCIO environment variable",
36 "The OCIO environment variable"},
38 "PROJECT",
39 0,
40 "Project",
41 "The active project's OpenColorIO configuration setting"},
43 "BLENDER",
44 0,
45 "Blender",
46 "The OpenColorIO configuration bundled with Blender"},
48 "FALLBACK",
49 0,
50 "Fallback",
51 "The built-in fallback configuration, if loading other configurations failed"},
52 {0, nullptr, 0, nullptr, nullptr},
53};
54
55} // namespace blender
56
57#ifdef RNA_RUNTIME
58
60
61# include "BKE_blender_project.hh"
62# include "BKE_global.hh"
63# include "BKE_main.hh"
64# include "BKE_mesh.hh"
65
66namespace blender {
67
68/* all the list begin functions are added manually here, Main is not in SDNA */
69
70static bool rna_Main_use_autopack_get(PointerRNA * /*ptr*/)
71{
72 if (G.fileflags & G_FILE_AUTOPACK) {
73 return 1;
74 }
75
76 return 0;
77}
78
79static void rna_Main_use_autopack_set(PointerRNA * /*ptr*/, bool value)
80{
81 if (value) {
82 G.fileflags |= G_FILE_AUTOPACK;
83 }
84 else {
85 G.fileflags &= ~G_FILE_AUTOPACK;
86 }
87}
88
89static bool rna_Main_is_saved_get(PointerRNA *ptr)
90{
91 const Main *bmain = static_cast<Main *>(ptr->data);
92 return (bmain->filepath[0] != '\0');
93}
94
95static bool rna_Main_is_dirty_get(PointerRNA *ptr)
96{
97 /* XXX, not totally nice to do it this way, should store in main ? */
98 Main *bmain = static_cast<Main *>(ptr->data);
100 if ((wm = bmain->wm.first())) {
101 return !wm->file_saved;
102 }
103
104 return true;
105}
106
107static void rna_Main_filepath_get(PointerRNA *ptr, char *value)
108{
109 Main *bmain = static_cast<Main *>(ptr->data);
110 strcpy(value, bmain->filepath);
111}
112
113static int rna_Main_filepath_length(PointerRNA *ptr)
114{
115 Main *bmain = static_cast<Main *>(ptr->data);
116 return strlen(bmain->filepath);
117}
118
119# if 0
120static void rna_Main_filepath_set(PointerRNA *ptr, const char *value)
121{
122 Main *bmain = (Main *)ptr->data;
123 STRNCPY(bmain->filepath, value);
124}
125# endif
126
127static PointerRNA rna_Main_colorspace_get(PointerRNA *ptr)
128{
129 Main *bmain = static_cast<Main *>(ptr->data);
130 return PointerRNA(nullptr, RNA_BlendFileColorspace, &bmain->colorspace);
131}
132
133static void rna_MainColorspace_ocio_config_path_get(PointerRNA * /*ptr*/, char *value)
134{
135 strcpy(value, IMB_colormanagement_config_path_get().c_str());
136}
137
138static int rna_MainColorspace_ocio_config_path_length(PointerRNA * /*ptr*/)
139{
141}
142
143static int rna_MainColorspace_ocio_config_source_get(PointerRNA * /*ptr*/)
144{
146}
147
148static int rna_MainColorspace_working_space_get(PointerRNA *ptr)
149{
150 MainColorspace *colorspace = ptr->data_as<MainColorspace>();
152}
153
154static const EnumPropertyItem *rna_MainColorspace_working_space_itemf(bContext * /*C*/,
155 PointerRNA * /*ptr*/,
156 PropertyRNA * /*prop*/,
157 bool *r_free)
158{
159 EnumPropertyItem *items = nullptr;
160 int totitem = 0;
161
163 RNA_enum_item_end(&items, &totitem);
164
165 *r_free = true;
166
167 return items;
168}
169
170static void rna_MainColorspace_working_space_interop_id_get(PointerRNA *ptr, char *value)
171{
172 MainColorspace *main_colorspace = ptr->data_as<MainColorspace>();
174 main_colorspace->scene_linear_name);
175 const auto interop_id = (colorspace) ? IMB_colormanagement_space_get_interop_id(colorspace) : "";
176 strcpy(value, interop_id.c_str());
177}
178
179static int rna_MainColorspace_working_space_interop_id_length(PointerRNA *ptr)
180{
181 MainColorspace *main_colorspace = ptr->data_as<MainColorspace>();
183 main_colorspace->scene_linear_name);
184 const auto interop_id = (colorspace) ? IMB_colormanagement_space_get_interop_id(colorspace) : "";
185 return interop_id.size();
186}
187
188static bool rna_MainColorspace_is_missing_opencolorio_config_get(PointerRNA *ptr)
189{
190 MainColorspace *colorspace = ptr->data_as<MainColorspace>();
191 return colorspace->is_missing_opencolorio_config;
192}
193
194static bool rna_MainColorspace_is_failed_opencolorio_config_get(PointerRNA *ptr)
195{
196 MainColorspace *colorspace = ptr->data_as<MainColorspace>();
197 return colorspace->is_failed_opencolorio_config;
198}
199
200static PointerRNA rna_Main_blender_project_get(PointerRNA *ptr)
201{
202 Main *bmain = reinterpret_cast<Main *>(ptr->data);
203
204 /* Needs to be the `write_callback` variant instead of `read_callback` because
205 * `RNA_pointer_create_discrete()` expects a non-const pointer. */
207 return RNA_pointer_create_discrete(nullptr, RNA_BlenderProject, project);
208 });
209}
210
211# define RNA_MAIN_LISTBASE_FUNCS_DEF(_listbase_name) \
212 static void rna_Main_##_listbase_name##_begin(CollectionPropertyIterator *iter, \
213 PointerRNA *ptr) \
214 { \
215 rna_iterator_listbase_begin(iter, ptr, &((Main *)ptr->data)->_listbase_name, nullptr); \
216 }
217
218RNA_MAIN_LISTBASE_FUNCS_DEF(actions)
219RNA_MAIN_LISTBASE_FUNCS_DEF(armatures)
220RNA_MAIN_LISTBASE_FUNCS_DEF(brushes)
221RNA_MAIN_LISTBASE_FUNCS_DEF(cachefiles)
222RNA_MAIN_LISTBASE_FUNCS_DEF(cameras)
223RNA_MAIN_LISTBASE_FUNCS_DEF(collections)
224RNA_MAIN_LISTBASE_FUNCS_DEF(curves)
225RNA_MAIN_LISTBASE_FUNCS_DEF(fonts)
226RNA_MAIN_LISTBASE_FUNCS_DEF(gpencils)
227RNA_MAIN_LISTBASE_FUNCS_DEF(grease_pencils)
228RNA_MAIN_LISTBASE_FUNCS_DEF(hair_curves)
229RNA_MAIN_LISTBASE_FUNCS_DEF(images)
230RNA_MAIN_LISTBASE_FUNCS_DEF(lattices)
231RNA_MAIN_LISTBASE_FUNCS_DEF(libraries)
232RNA_MAIN_LISTBASE_FUNCS_DEF(lightprobes)
233RNA_MAIN_LISTBASE_FUNCS_DEF(lights)
234RNA_MAIN_LISTBASE_FUNCS_DEF(linestyles)
235RNA_MAIN_LISTBASE_FUNCS_DEF(masks)
236RNA_MAIN_LISTBASE_FUNCS_DEF(materials)
237RNA_MAIN_LISTBASE_FUNCS_DEF(meshes)
238RNA_MAIN_LISTBASE_FUNCS_DEF(metaballs)
239RNA_MAIN_LISTBASE_FUNCS_DEF(movieclips)
240RNA_MAIN_LISTBASE_FUNCS_DEF(nodetrees)
241RNA_MAIN_LISTBASE_FUNCS_DEF(objects)
242RNA_MAIN_LISTBASE_FUNCS_DEF(paintcurves)
243RNA_MAIN_LISTBASE_FUNCS_DEF(palettes)
244RNA_MAIN_LISTBASE_FUNCS_DEF(particles)
245RNA_MAIN_LISTBASE_FUNCS_DEF(pointclouds)
246RNA_MAIN_LISTBASE_FUNCS_DEF(scenes)
247RNA_MAIN_LISTBASE_FUNCS_DEF(screens)
248RNA_MAIN_LISTBASE_FUNCS_DEF(shapekeys)
249RNA_MAIN_LISTBASE_FUNCS_DEF(sounds)
250RNA_MAIN_LISTBASE_FUNCS_DEF(speakers)
251RNA_MAIN_LISTBASE_FUNCS_DEF(texts)
252RNA_MAIN_LISTBASE_FUNCS_DEF(textures)
253RNA_MAIN_LISTBASE_FUNCS_DEF(volumes)
254RNA_MAIN_LISTBASE_FUNCS_DEF(wm)
255RNA_MAIN_LISTBASE_FUNCS_DEF(workspaces)
256RNA_MAIN_LISTBASE_FUNCS_DEF(worlds)
257
258# undef RNA_MAIN_LISTBASE_FUNCS_DEF
259
260static void rna_Main_version_get(PointerRNA *ptr, int *value)
261{
262 Main *bmain = static_cast<Main *>(ptr->data);
263 value[0] = bmain->versionfile / 100;
264 value[1] = bmain->versionfile % 100;
265 value[2] = bmain->subversionfile;
266}
267
268static int rna_iterator_BlendData_all_ids_length(PointerRNA *ptr)
269{
270 Main &bmain = *static_cast<Main *>(ptr->data);
271
272 MainAllIDsIterator internal_iter{bmain};
273 return int(internal_iter.size());
274}
275
276static void rna_iterator_BlendData_all_ids_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
277{
278 Main &bmain = *static_cast<Main *>(ptr->data);
279
280 iter->parent = *ptr;
281 MainAllIDsIterator *internal_iter = MEM_new<MainAllIDsIterator>(__func__, bmain);
282 iter->internal.custom = internal_iter;
283 iter->valid = (*internal_iter != internal_iter->end());
284}
285
286static void rna_iterator_BlendData_all_ids_next(CollectionPropertyIterator *iter)
287{
288 MainAllIDsIterator *internal_iter = static_cast<MainAllIDsIterator *>(iter->internal.custom);
289 (*internal_iter)++;
290 iter->valid = (*internal_iter != internal_iter->end());
291}
292
293static void rna_iterator_BlendData_all_ids_end(CollectionPropertyIterator *iter)
294{
295 MainAllIDsIterator *internal_iter = static_cast<MainAllIDsIterator *>(iter->internal.custom);
296 MEM_delete(internal_iter);
297 iter->internal.custom = nullptr;
298}
299
300static PointerRNA rna_iterator_BlendData_all_ids_get(CollectionPropertyIterator *iter)
301{
302 MainAllIDsIterator *internal_iter = static_cast<MainAllIDsIterator *>(iter->internal.custom);
303 ID &id = **internal_iter;
304 return RNA_id_pointer_create(&id);
305}
306
307# ifdef UNIT_TEST
308
309static PointerRNA rna_Test_test_get(PointerRNA *ptr)
310{
311 PointerRNA ret = *ptr;
312 ret.type = RNA_Test;
313
314 return ret;
315}
316
317# endif
318
319} // namespace blender
320
321#else
322
323namespace blender {
324
325/* local convenience types */
326using CollectionDefFunc = void(BlenderRNA *brna, PropertyRNA *cprop);
327
329 const char *identifier;
330 const char *type;
331 const char *iter_begin;
332 const char *name;
333 const char *description;
335};
336
338{
339 StructRNA *srna;
340 PropertyRNA *prop;
341
342 srna = RNA_def_struct(brna, "BlendFileColorspace", nullptr);
344 "Blend-File Color Space",
345 "Information about the color space used for data-blocks in a blend file");
346
347 prop = RNA_def_property(srna, "working_space", PROP_ENUM, PROP_NONE);
352 "Working Space",
353 "Color space used for all scene linear colors in this file, and "
354 "for compositing, shader and geometry nodes processing");
357 "rna_MainColorspace_working_space_get",
358 nullptr,
359 "rna_MainColorspace_working_space_itemf");
360
361 prop = RNA_def_property(srna, "working_space_interop_id", PROP_STRING, PROP_NONE);
364 prop,
365 "Working Space Interop ID",
366 "Unique identifier for common color spaces, as defined by the Color Interop Forum. May be "
367 "empty if there is no interop ID for the working space. Common values are lin_rec709_scene, "
368 "lin_rec2020_scene and lin_ap1_scene (for ACEScg)");
370 "rna_MainColorspace_working_space_interop_id_get",
371 "rna_MainColorspace_working_space_interop_id_length",
372 nullptr);
373 prop = RNA_def_property(srna, "is_missing_opencolorio_config", PROP_BOOLEAN, PROP_NONE);
376 prop, "rna_MainColorspace_is_missing_opencolorio_config_get", nullptr);
378 "Missing OpenColorIO Configuration",
379 "A color space, view or display was not found, which likely means the "
380 "OpenColorIO config used to create this blend file is missing");
381
382 prop = RNA_def_property(srna, "is_failed_opencolorio_config", PROP_BOOLEAN, PROP_NONE);
385 prop, "rna_MainColorspace_is_failed_opencolorio_config_get", nullptr);
387 prop, "Failed OpenColorIO Configuration", "The requested OpenColorIO config failed to load");
388
389 prop = RNA_def_property(srna, "ocio_config_path", PROP_STRING, PROP_FILEPATH);
393 "rna_MainColorspace_ocio_config_path_get",
394 "rna_MainColorspace_ocio_config_path_length",
395 nullptr);
397 "OpenColorIO Configuration",
398 "File path or URI of the OpenColorIO configuration currently in use");
399
400 prop = RNA_def_property(srna, "ocio_config_source", PROP_ENUM, PROP_NONE);
403 RNA_def_property_enum_funcs(prop, "rna_MainColorspace_ocio_config_source_get", nullptr, nullptr);
405 prop, "OpenColorIO Configuration Source", "Where the OpenColorIO configuration came from");
406}
407
409{
410 StructRNA *srna;
411 PropertyRNA *prop;
412
413 /* Plural must match ID-types in `readblenentry.cc`. */
414 MainCollectionDef lists[] = {
415 {"cameras",
416 "Camera",
417 "rna_Main_cameras_begin",
418 "Cameras",
419 "Camera data-blocks",
421 {"scenes",
422 "Scene",
423 "rna_Main_scenes_begin",
424 "Scenes",
425 "Scene data-blocks",
427 {"objects",
428 "Object",
429 "rna_Main_objects_begin",
430 "Objects",
431 "Object data-blocks",
433 {"materials",
434 "Material",
435 "rna_Main_materials_begin",
436 "Materials",
437 "Material data-blocks",
439 {"node_groups",
440 "NodeTree",
441 "rna_Main_nodetrees_begin",
442 "Node Groups",
443 "Node group data-blocks",
445 {"meshes",
446 "Mesh",
447 "rna_Main_meshes_begin",
448 "Meshes",
449 "Mesh data-blocks",
451 {"lights",
452 "Light",
453 "rna_Main_lights_begin",
454 "Lights",
455 "Light data-blocks",
457 {"libraries",
458 "Library",
459 "rna_Main_libraries_begin",
460 "Libraries",
461 "Library data-blocks",
463 {"screens",
464 "Screen",
465 "rna_Main_screens_begin",
466 "Screens",
467 "Screen data-blocks",
469 {"window_managers",
470 "WindowManager",
471 "rna_Main_wm_begin",
472 "Window Managers",
473 "Window manager data-blocks",
475 {"images",
476 "Image",
477 "rna_Main_images_begin",
478 "Images",
479 "Image data-blocks",
481 {"lattices",
482 "Lattice",
483 "rna_Main_lattices_begin",
484 "Lattices",
485 "Lattice data-blocks",
487 {"curves",
488 "Curve",
489 "rna_Main_curves_begin",
490 "Curves",
491 "Curve data-blocks",
493 {"metaballs",
494 "MetaBall",
495 "rna_Main_metaballs_begin",
496 "Metaballs",
497 "Metaball data-blocks",
499 {"fonts",
500 "VectorFont",
501 "rna_Main_fonts_begin",
502 "Vector Fonts",
503 "Vector font data-blocks",
505 {"textures",
506 "Texture",
507 "rna_Main_textures_begin",
508 "Textures",
509 "Texture data-blocks",
511 {"brushes",
512 "Brush",
513 "rna_Main_brushes_begin",
514 "Brushes",
515 "Brush data-blocks",
517 {"worlds",
518 "World",
519 "rna_Main_worlds_begin",
520 "Worlds",
521 "World data-blocks",
523 {"collections",
524 "Collection",
525 "rna_Main_collections_begin",
526 "Collections",
527 "Collection data-blocks",
529 {"shape_keys",
530 "Key",
531 "rna_Main_shapekeys_begin",
532 "Shape Keys",
533 "Shape Key data-blocks",
534 nullptr},
535 {"texts", "Text", "rna_Main_texts_begin", "Texts", "Text data-blocks", RNA_def_main_texts},
536 {"speakers",
537 "Speaker",
538 "rna_Main_speakers_begin",
539 "Speakers",
540 "Speaker data-blocks",
542 {"sounds",
543 "Sound",
544 "rna_Main_sounds_begin",
545 "Sounds",
546 "Sound data-blocks",
548 {"armatures",
549 "Armature",
550 "rna_Main_armatures_begin",
551 "Armatures",
552 "Armature data-blocks",
554 {"actions",
555 "Action",
556 "rna_Main_actions_begin",
557 "Actions",
558 "Action data-blocks",
560 {"particles",
561 "ParticleSettings",
562 "rna_Main_particles_begin",
563 "Particles",
564 "Particle data-blocks",
566 {"palettes",
567 "Palette",
568 "rna_Main_palettes_begin",
569 "Palettes",
570 "Palette data-blocks",
572 {"annotations",
573 "Annotation",
574 "rna_Main_gpencils_begin",
575 "Annotation",
576 "Annotation data-blocks (legacy Grease Pencil)",
578 {"grease_pencils",
579 "GreasePencil",
580 "rna_Main_grease_pencils_begin",
581 "Grease Pencil",
582 "Grease Pencil data-blocks",
584 {"movieclips",
585 "MovieClip",
586 "rna_Main_movieclips_begin",
587 "Movie Clips",
588 "Movie Clip data-blocks",
590 {"masks", "Mask", "rna_Main_masks_begin", "Masks", "Masks data-blocks", RNA_def_main_masks},
591 {"linestyles",
592 "FreestyleLineStyle",
593 "rna_Main_linestyles_begin",
594 "Line Styles",
595 "Line Style data-blocks",
597 {"cache_files",
598 "CacheFile",
599 "rna_Main_cachefiles_begin",
600 "Cache Files",
601 "Cache Files data-blocks",
603 {"paint_curves",
604 "PaintCurve",
605 "rna_Main_paintcurves_begin",
606 "Paint Curves",
607 "Paint Curves data-blocks",
609 {"workspaces",
610 "WorkSpace",
611 "rna_Main_workspaces_begin",
612 "Workspaces",
613 "Workspace data-blocks",
615 {"lightprobes",
616 "LightProbe",
617 "rna_Main_lightprobes_begin",
618 "Light Probes",
619 "Light Probe data-blocks",
625 {"hair_curves",
626 "Curves",
627 "rna_Main_hair_curves_begin",
628 "Hair Curves",
629 "Hair curve data-blocks",
631 {"pointclouds",
632 "PointCloud",
633 "rna_Main_pointclouds_begin",
634 "Point Clouds",
635 "Point cloud data-blocks",
637 {"volumes",
638 "Volume",
639 "rna_Main_volumes_begin",
640 "Volumes",
641 "Volume data-blocks",
643 {nullptr, nullptr, nullptr, nullptr, nullptr, nullptr},
644 };
645
646 int i;
647
648 srna = RNA_def_struct(brna, "BlendData", nullptr);
650 "Blend-File Data",
651 "Main data structure representing a .blend file and all its data-blocks");
652 RNA_def_struct_ui_icon(srna, ICON_BLENDER);
653
654 prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
657 prop, "rna_Main_filepath_get", "rna_Main_filepath_length", nullptr);
659 RNA_def_property_ui_text(prop, "Filename", "Path to the .blend file");
660
661 prop = RNA_def_property(srna, "is_dirty", PROP_BOOLEAN, PROP_NONE);
663 RNA_def_property_boolean_funcs(prop, "rna_Main_is_dirty_get", nullptr);
665 prop, "File Has Unsaved Changes", "Have recent edits been saved to disk");
666
667 prop = RNA_def_property(srna, "is_saved", PROP_BOOLEAN, PROP_NONE);
669 RNA_def_property_boolean_funcs(prop, "rna_Main_is_saved_get", nullptr);
671 prop, "File is Saved", "Has the current session been saved to disk as a .blend file");
672
673 prop = RNA_def_property(srna, "use_autopack", PROP_BOOLEAN, PROP_NONE);
674 RNA_def_property_boolean_funcs(prop, "rna_Main_use_autopack_get", "rna_Main_use_autopack_set");
676 prop, "Use Auto-Pack", "Automatically pack all external data into .blend file");
677
678 prop = RNA_def_int_vector(srna,
679 "version",
680 3,
681 nullptr,
682 0,
683 INT_MAX,
684 "Version",
685 "File format version the .blend file was saved with",
686 0,
687 INT_MAX);
688 RNA_def_property_int_funcs(prop, "rna_Main_version_get", nullptr, nullptr);
691
692 for (i = 0; lists[i].name; i++) {
693 prop = RNA_def_property(srna, lists[i].identifier, PROP_COLLECTION, PROP_NONE);
694 RNA_def_property_struct_type(prop, lists[i].type);
696 lists[i].iter_begin,
697 "rna_iterator_listbase_next",
698 "rna_iterator_listbase_end",
699 "rna_iterator_listbase_get",
700 nullptr,
701 nullptr,
702 nullptr,
703 nullptr);
704 RNA_def_property_ui_text(prop, lists[i].name, lists[i].description);
705
706 /* collection functions */
707 CollectionDefFunc *func = lists[i].func;
708 if (func) {
709 func(brna, prop);
710 }
711 }
712
714
715 prop = RNA_def_property(srna, "colorspace", PROP_POINTER, PROP_NONE);
717 RNA_def_property_struct_type(prop, "BlendFileColorspace");
718 RNA_def_property_pointer_funcs(prop, "rna_Main_colorspace_get", nullptr, nullptr, nullptr);
720 prop,
721 "Color Space",
722 "Information about the color space used for data-blocks in a blend file");
723
724 prop = RNA_def_property(srna, "all_ids", PROP_COLLECTION, PROP_NONE);
729 "rna_iterator_BlendData_all_ids_begin",
730 "rna_iterator_BlendData_all_ids_next",
731 "rna_iterator_BlendData_all_ids_end",
732 "rna_iterator_BlendData_all_ids_get",
733 "rna_iterator_BlendData_all_ids_length",
734 nullptr,
735 nullptr,
736 nullptr);
738 prop,
739 "All Data-Blocks",
740 "Read-only list of all IDs listed in Blender data-base. Warning: Order is not guaranteed "
741 "and should be considered an internal implementation detail");
742
743 prop = RNA_def_property(srna, "project", PROP_POINTER, PROP_NONE);
745 RNA_def_property_struct_type(prop, "BlenderProject");
746 RNA_def_property_pointer_funcs(prop, "rna_Main_blender_project_get", nullptr, nullptr, nullptr);
747 RNA_def_property_ui_text(prop, "Project", "The currently active Blender project, if any");
749
750 RNA_api_main(srna);
751
752# ifdef UNIT_TEST
753
755
756 prop = RNA_def_property(srna, "test", PROP_POINTER, PROP_NONE);
757 RNA_def_property_struct_type(prop, "Test");
758 RNA_def_property_pointer_funcs(prop, "rna_Test_test_get", nullptr, nullptr, nullptr);
759
761
762# endif
763}
764
765} // namespace blender
766
767#endif
#define FILE_MAX
#define BLT_I18NCONTEXT_COLOR_MANAGEMENT
#define BLT_I18NCONTEXT_EDITOR_PREFERENCES
constexpr int64_t size() const
#define INT_MAX
BMesh Iterators.
void RNA_def_main_images(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_cachefiles(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_main_volumes(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_brushes(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_fonts(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_grease_pencil(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_masks(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_objects(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
char * STRNCPY(char(&dst)[N], const char *src)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
void RNA_def_main_scenes(BlenderRNA *brna, PropertyRNA *cprop)
static const EnumPropertyItem rna_enum_ocio_config_source_items[]
Definition rna_main.cc:26
void RNA_def_main_lights(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_sounds(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
PointerRNA RNA_id_pointer_create(ID *id)
void RNA_def_main_speakers(BlenderRNA *brna, PropertyRNA *cprop)
void(BlenderRNA *brna, PropertyRNA *cprop) CollectionDefFunc
Definition rna_main.cc:326
void RNA_def_main_lightprobes(BlenderRNA *brna, PropertyRNA *cprop)
StringRefNull IMB_colormanagement_config_path_get()
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_main_metaballs(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_curves(BlenderRNA *brna, PropertyRNA *cprop)
void IMB_colormanagement_working_space_items_add(EnumPropertyItem **items, int *totitem)
PropertyRNA * RNA_def_int_vector(StructOrFunctionRNA *cont_, const char *identifier, const int len, const int *default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
void RNA_api_main(StructRNA *srna)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_main(BlenderRNA *brna)
Definition rna_main.cc:408
void RNA_def_main_worlds(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_paintcurves(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
void RNA_def_main_movieclips(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_collections(BlenderRNA *brna, PropertyRNA *cprop)
@ PROPOVERRIDE_NO_COMPARISON
Definition RNA_types.hh:596
Global G
Definition blender.cc:57
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier_c_str, int type, int subtype)
void RNA_def_main_palettes(BlenderRNA *brna, PropertyRNA *cprop)
@ G_FILE_AUTOPACK
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
int IMB_colormanagement_working_space_get_named_index(const char *name)
void RNA_def_main_annotations(BlenderRNA *brna, PropertyRNA *cprop)
@ PROP_BOOLEAN
Definition RNA_types.hh:210
@ PROP_POINTER
Definition RNA_types.hh:215
@ PROP_STRING
Definition RNA_types.hh:213
@ PROP_COLLECTION
Definition RNA_types.hh:216
void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
static void rna_def_main_colorspace(BlenderRNA *brna)
Definition rna_main.cc:337
void RNA_def_main_actions(BlenderRNA *brna, PropertyRNA *cprop)
ColorManagedConfigSource IMB_colormanagement_config_source_get()
void RNA_def_main_armatures(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_workspaces(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_materials(BlenderRNA *brna, PropertyRNA *cprop)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
void RNA_def_main_pointclouds(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
void RNA_def_main_hair_curves(BlenderRNA *brna, PropertyRNA *cprop)
const EnumPropertyItem rna_enum_dummy_NULL_items[]
Definition rna_rna.cc:28
void RNA_def_main_lattices(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_node_groups(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_main_window_managers(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_texts(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_particles(BlenderRNA *brna, PropertyRNA *cprop)
StringRefNull IMB_colormanagement_space_get_interop_id(const ColorSpace *colorspace)
void RNA_def_property_override_clear_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void RNA_def_main_cameras(BlenderRNA *brna, PropertyRNA *cprop)
const ColorSpace * IMB_colormanagement_space_get_named(const char *name)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
@ PROP_EDITABLE
Definition RNA_types.hh:376
@ PROP_ENUM_NO_CONTEXT
Definition RNA_types.hh:500
@ PROP_THICK_WRAP
Definition RNA_types.hh:493
@ PROP_NEVER_NULL
Definition RNA_types.hh:447
void RNA_def_main_libraries(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_define_verify_sdna(bool verify)
void RNA_def_main_meshes(BlenderRNA *brna, PropertyRNA *cprop)
@ PROP_FILEPATH
Definition RNA_types.hh:284
void RNA_def_main_linestyles(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_textures(BlenderRNA *brna, PropertyRNA *cprop)
auto BKE_blender_project_write_callback(const Main *bmain, Fn lambda)
ocio::ColorSpace ColorSpace
Definition BLF_api.hh:42
void RNA_def_main_screens(BlenderRNA *brna, PropertyRNA *cprop)
CollectionDefFunc * func
Definition rna_main.cc:334
short versionfile
Definition BKE_main.hh:269