32static bool rna_Main_use_autopack_get(
PointerRNA * )
41static void rna_Main_use_autopack_set(
PointerRNA * ,
bool value)
54 return (bmain->filepath[0] !=
'\0');
69static void rna_Main_filepath_get(
PointerRNA *
ptr,
char *value)
72 strcpy(value, bmain->filepath);
78 return strlen(bmain->filepath);
82static void rna_Main_filepath_set(
PointerRNA *
ptr,
const char *value)
85 STRNCPY(bmain->filepath, value);
92 return PointerRNA(
nullptr, &RNA_BlendFileColorspace, &bmain->colorspace);
95static int rna_MainColorspace_working_space_get(
PointerRNA *
ptr)
117static void rna_MainColorspace_working_space_interop_id_get(
PointerRNA *
ptr,
char *value)
123 strcpy(value, interop_id.c_str());
126static int rna_MainColorspace_working_space_interop_id_length(
PointerRNA *
ptr)
132 return interop_id.
size();
135static bool rna_MainColorspace_is_missing_opencolorio_config_get(
PointerRNA *
ptr)
141# define RNA_MAIN_LISTBASE_FUNCS_DEF(_listbase_name) \
142 static void rna_Main_##_listbase_name##_begin(CollectionPropertyIterator *iter, \
145 rna_iterator_listbase_begin(iter, ptr, &((Main *)ptr->data)->_listbase_name, nullptr); \
148RNA_MAIN_LISTBASE_FUNCS_DEF(actions)
149RNA_MAIN_LISTBASE_FUNCS_DEF(armatures)
150RNA_MAIN_LISTBASE_FUNCS_DEF(brushes)
151RNA_MAIN_LISTBASE_FUNCS_DEF(cachefiles)
152RNA_MAIN_LISTBASE_FUNCS_DEF(cameras)
153RNA_MAIN_LISTBASE_FUNCS_DEF(collections)
154RNA_MAIN_LISTBASE_FUNCS_DEF(curves)
155RNA_MAIN_LISTBASE_FUNCS_DEF(fonts)
156RNA_MAIN_LISTBASE_FUNCS_DEF(gpencils)
157RNA_MAIN_LISTBASE_FUNCS_DEF(grease_pencils)
158RNA_MAIN_LISTBASE_FUNCS_DEF(hair_curves)
159RNA_MAIN_LISTBASE_FUNCS_DEF(images)
160RNA_MAIN_LISTBASE_FUNCS_DEF(lattices)
161RNA_MAIN_LISTBASE_FUNCS_DEF(libraries)
162RNA_MAIN_LISTBASE_FUNCS_DEF(lightprobes)
163RNA_MAIN_LISTBASE_FUNCS_DEF(lights)
164RNA_MAIN_LISTBASE_FUNCS_DEF(linestyles)
165RNA_MAIN_LISTBASE_FUNCS_DEF(masks)
166RNA_MAIN_LISTBASE_FUNCS_DEF(materials)
167RNA_MAIN_LISTBASE_FUNCS_DEF(meshes)
168RNA_MAIN_LISTBASE_FUNCS_DEF(metaballs)
169RNA_MAIN_LISTBASE_FUNCS_DEF(movieclips)
170RNA_MAIN_LISTBASE_FUNCS_DEF(nodetrees)
171RNA_MAIN_LISTBASE_FUNCS_DEF(objects)
172RNA_MAIN_LISTBASE_FUNCS_DEF(paintcurves)
173RNA_MAIN_LISTBASE_FUNCS_DEF(palettes)
174RNA_MAIN_LISTBASE_FUNCS_DEF(particles)
175RNA_MAIN_LISTBASE_FUNCS_DEF(pointclouds)
176RNA_MAIN_LISTBASE_FUNCS_DEF(scenes)
177RNA_MAIN_LISTBASE_FUNCS_DEF(screens)
178RNA_MAIN_LISTBASE_FUNCS_DEF(shapekeys)
179RNA_MAIN_LISTBASE_FUNCS_DEF(sounds)
180RNA_MAIN_LISTBASE_FUNCS_DEF(speakers)
181RNA_MAIN_LISTBASE_FUNCS_DEF(texts)
182RNA_MAIN_LISTBASE_FUNCS_DEF(textures)
183RNA_MAIN_LISTBASE_FUNCS_DEF(volumes)
184RNA_MAIN_LISTBASE_FUNCS_DEF(wm)
185RNA_MAIN_LISTBASE_FUNCS_DEF(workspaces)
186RNA_MAIN_LISTBASE_FUNCS_DEF(worlds)
188# undef RNA_MAIN_LISTBASE_FUNCS_DEF
193 value[0] = bmain->versionfile / 100;
194 value[1] = bmain->versionfile % 100;
195 value[2] = bmain->subversionfile;
203 ret.type = &RNA_Test;
231 "Blend-File Color Space",
232 "Information about the color space used for data-blocks in a blend file");
240 "Color space used for all scene linear colors in this file, and "
241 "for compositing, shader and geometry nodes processing");
243 "rna_MainColorspace_working_space_get",
245 "rna_MainColorspace_working_space_itemf");
251 "Working Space Interop ID",
252 "Unique identifier for common color spaces, as defined by the Color Interop Forum. May be "
253 "empty if there is no interop ID for the working space. Common values are lin_rec709_scene, "
254 "lin_rec2020_scene and lin_ap1_scene (for ACEScg)");
256 "rna_MainColorspace_working_space_interop_id_get",
257 "rna_MainColorspace_working_space_interop_id_length",
262 prop,
"rna_MainColorspace_is_missing_opencolorio_config_get",
nullptr);
264 "Missing OpenColorIO Configuration",
265 "A color space, view or display was not found, which likely means the "
266 "OpenColorIO config used to create this blend file is missing");
278 "rna_Main_cameras_begin",
280 "Camera data-blocks",
284 "rna_Main_scenes_begin",
290 "rna_Main_objects_begin",
292 "Object data-blocks",
296 "rna_Main_materials_begin",
298 "Material data-blocks",
302 "rna_Main_nodetrees_begin",
304 "Node group data-blocks",
308 "rna_Main_meshes_begin",
314 "rna_Main_lights_begin",
320 "rna_Main_libraries_begin",
322 "Library data-blocks",
326 "rna_Main_screens_begin",
328 "Screen data-blocks",
334 "Window manager data-blocks",
338 "rna_Main_images_begin",
344 "rna_Main_lattices_begin",
346 "Lattice data-blocks",
350 "rna_Main_curves_begin",
356 "rna_Main_metaballs_begin",
358 "Metaball data-blocks",
362 "rna_Main_fonts_begin",
364 "Vector font data-blocks",
368 "rna_Main_textures_begin",
370 "Texture data-blocks",
374 "rna_Main_brushes_begin",
380 "rna_Main_worlds_begin",
386 "rna_Main_collections_begin",
388 "Collection data-blocks",
392 "rna_Main_shapekeys_begin",
394 "Shape Key data-blocks",
396 {
"texts",
"Text",
"rna_Main_texts_begin",
"Texts",
"Text data-blocks",
RNA_def_main_texts},
399 "rna_Main_speakers_begin",
401 "Speaker data-blocks",
405 "rna_Main_sounds_begin",
411 "rna_Main_armatures_begin",
413 "Armature data-blocks",
417 "rna_Main_actions_begin",
419 "Action data-blocks",
423 "rna_Main_particles_begin",
425 "Particle data-blocks",
429 "rna_Main_palettes_begin",
431 "Palette data-blocks",
435 "rna_Main_gpencils_begin",
437 "Annotation data-blocks (legacy Grease Pencil)",
441 "rna_Main_grease_pencils_begin",
443 "Grease Pencil data-blocks",
447 "rna_Main_movieclips_begin",
449 "Movie Clip data-blocks",
451 {
"masks",
"Mask",
"rna_Main_masks_begin",
"Masks",
"Masks data-blocks",
RNA_def_main_masks},
453 "FreestyleLineStyle",
454 "rna_Main_linestyles_begin",
456 "Line Style data-blocks",
460 "rna_Main_cachefiles_begin",
462 "Cache Files data-blocks",
466 "rna_Main_paintcurves_begin",
468 "Paint Curves data-blocks",
472 "rna_Main_workspaces_begin",
474 "Workspace data-blocks",
478 "rna_Main_lightprobes_begin",
480 "Light Probe data-blocks",
488 "rna_Main_hair_curves_begin",
490 "Hair curve data-blocks",
494 "rna_Main_pointclouds_begin",
496 "Point cloud data-blocks",
500 "rna_Main_volumes_begin",
502 "Volume data-blocks",
504 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
512 "Main data structure representing a .blend file and all its data-blocks");
518 prop,
"rna_Main_filepath_get",
"rna_Main_filepath_length",
nullptr);
526 prop,
"File Has Unsaved Changes",
"Have recent edits been saved to disk");
532 prop,
"File is Saved",
"Has the current session been saved to disk as a .blend file");
537 prop,
"Use Auto-Pack",
"Automatically pack all external data into .blend file");
546 "File format version the .blend file was saved with",
553 for (
i = 0; lists[
i].
name;
i++) {
558 "rna_iterator_listbase_next",
559 "rna_iterator_listbase_end",
560 "rna_iterator_listbase_get",
583 "Information about the color space used for data-blocks in a blend file");
blender::ocio::ColorSpace ColorSpace
char * STRNCPY(char(&dst)[N], const char *src)
blender::StringRefNull IMB_colormanagement_space_get_interop_id(const ColorSpace *colorspace)
const ColorSpace * IMB_colormanagement_space_get_named(const char *name)
int IMB_colormanagement_working_space_get_named_index(const char *name)
void IMB_colormanagement_working_space_items_add(EnumPropertyItem **items, int *totitem)
constexpr int64_t size() const
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_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
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_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
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_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_main_window_managers(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_curves(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_cameras(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_worlds(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_textures(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_lightprobes(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_grease_pencil(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_movieclips(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_screens(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_images(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_volumes(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_node_groups(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_meshes(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_hair_curves(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_pointclouds(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_libraries(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_paintcurves(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_texts(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_lights(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_actions(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_palettes(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_api_main(StructRNA *srna)
void RNA_def_main_particles(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_annotations(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_lattices(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_masks(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_cachefiles(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_fonts(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_metaballs(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_speakers(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_scenes(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_collections(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_materials(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_workspaces(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_sounds(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_armatures(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_linestyles(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_brushes(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_objects(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_main_colorspace(BlenderRNA *brna)
void RNA_def_main(BlenderRNA *brna)
void(BlenderRNA *brna, PropertyRNA *cprop) CollectionDefFunc
const EnumPropertyItem rna_enum_dummy_NULL_items[]
char scene_linear_name[64]
bool is_missing_opencolorio_config