28static bool rna_Main_use_autopack_get(
PointerRNA * )
37static void rna_Main_use_autopack_set(
PointerRNA * ,
bool value)
43 G.fileflags &= ~G_FILE_AUTOPACK;
50 return (bmain->filepath[0] !=
'\0');
65static void rna_Main_filepath_get(
PointerRNA *
ptr,
char *value)
68 strcpy(value, bmain->filepath);
74 return strlen(bmain->filepath);
78static void rna_Main_filepath_set(
PointerRNA *
ptr,
const char *value)
81 STRNCPY(bmain->filepath, value);
85# define RNA_MAIN_LISTBASE_FUNCS_DEF(_listbase_name) \
86 static void rna_Main_##_listbase_name##_begin(CollectionPropertyIterator *iter, \
89 rna_iterator_listbase_begin(iter, &((Main *)ptr->data)->_listbase_name, nullptr); \
92RNA_MAIN_LISTBASE_FUNCS_DEF(actions)
93RNA_MAIN_LISTBASE_FUNCS_DEF(armatures)
94RNA_MAIN_LISTBASE_FUNCS_DEF(brushes)
95RNA_MAIN_LISTBASE_FUNCS_DEF(cachefiles)
96RNA_MAIN_LISTBASE_FUNCS_DEF(cameras)
97RNA_MAIN_LISTBASE_FUNCS_DEF(collections)
98RNA_MAIN_LISTBASE_FUNCS_DEF(curves)
99RNA_MAIN_LISTBASE_FUNCS_DEF(fonts)
100RNA_MAIN_LISTBASE_FUNCS_DEF(gpencils)
101RNA_MAIN_LISTBASE_FUNCS_DEF(grease_pencils)
102RNA_MAIN_LISTBASE_FUNCS_DEF(hair_curves)
103RNA_MAIN_LISTBASE_FUNCS_DEF(images)
104RNA_MAIN_LISTBASE_FUNCS_DEF(lattices)
105RNA_MAIN_LISTBASE_FUNCS_DEF(libraries)
106RNA_MAIN_LISTBASE_FUNCS_DEF(lightprobes)
107RNA_MAIN_LISTBASE_FUNCS_DEF(lights)
108RNA_MAIN_LISTBASE_FUNCS_DEF(linestyles)
109RNA_MAIN_LISTBASE_FUNCS_DEF(masks)
110RNA_MAIN_LISTBASE_FUNCS_DEF(materials)
111RNA_MAIN_LISTBASE_FUNCS_DEF(meshes)
112RNA_MAIN_LISTBASE_FUNCS_DEF(metaballs)
113RNA_MAIN_LISTBASE_FUNCS_DEF(movieclips)
114RNA_MAIN_LISTBASE_FUNCS_DEF(nodetrees)
115RNA_MAIN_LISTBASE_FUNCS_DEF(objects)
116RNA_MAIN_LISTBASE_FUNCS_DEF(paintcurves)
117RNA_MAIN_LISTBASE_FUNCS_DEF(palettes)
118RNA_MAIN_LISTBASE_FUNCS_DEF(particles)
119RNA_MAIN_LISTBASE_FUNCS_DEF(pointclouds)
120RNA_MAIN_LISTBASE_FUNCS_DEF(scenes)
121RNA_MAIN_LISTBASE_FUNCS_DEF(screens)
122RNA_MAIN_LISTBASE_FUNCS_DEF(shapekeys)
123RNA_MAIN_LISTBASE_FUNCS_DEF(sounds)
124RNA_MAIN_LISTBASE_FUNCS_DEF(speakers)
125RNA_MAIN_LISTBASE_FUNCS_DEF(texts)
126RNA_MAIN_LISTBASE_FUNCS_DEF(textures)
127RNA_MAIN_LISTBASE_FUNCS_DEF(volumes)
128RNA_MAIN_LISTBASE_FUNCS_DEF(wm)
129RNA_MAIN_LISTBASE_FUNCS_DEF(workspaces)
130RNA_MAIN_LISTBASE_FUNCS_DEF(worlds)
132# undef RNA_MAIN_LISTBASE_FUNCS_DEF
137 value[0] = bmain->versionfile / 100;
138 value[1] = bmain->versionfile % 100;
139 value[2] = bmain->subversionfile;
177 "rna_Main_cameras_begin",
179 "Camera data-blocks",
183 "rna_Main_scenes_begin",
189 "rna_Main_objects_begin",
191 "Object data-blocks",
195 "rna_Main_materials_begin",
197 "Material data-blocks",
201 "rna_Main_nodetrees_begin",
203 "Node group data-blocks",
207 "rna_Main_meshes_begin",
213 "rna_Main_lights_begin",
219 "rna_Main_libraries_begin",
221 "Library data-blocks",
225 "rna_Main_screens_begin",
227 "Screen data-blocks",
233 "Window manager data-blocks",
237 "rna_Main_images_begin",
243 "rna_Main_lattices_begin",
245 "Lattice data-blocks",
249 "rna_Main_curves_begin",
255 "rna_Main_metaballs_begin",
257 "Metaball data-blocks",
261 "rna_Main_fonts_begin",
263 "Vector font data-blocks",
267 "rna_Main_textures_begin",
269 "Texture data-blocks",
273 "rna_Main_brushes_begin",
279 "rna_Main_worlds_begin",
285 "rna_Main_collections_begin",
287 "Collection data-blocks",
291 "rna_Main_shapekeys_begin",
293 "Shape Key data-blocks",
295 {
"texts",
"Text",
"rna_Main_texts_begin",
"Texts",
"Text data-blocks",
RNA_def_main_texts},
298 "rna_Main_speakers_begin",
300 "Speaker data-blocks",
304 "rna_Main_sounds_begin",
310 "rna_Main_armatures_begin",
312 "Armature data-blocks",
316 "rna_Main_actions_begin",
318 "Action data-blocks",
322 "rna_Main_particles_begin",
324 "Particle data-blocks",
328 "rna_Main_palettes_begin",
330 "Palette data-blocks",
334 "rna_Main_gpencils_begin",
336 "Annotation data-blocks (legacy Grease Pencil)",
338 {
"grease_pencils_v3",
340 "rna_Main_grease_pencils_begin",
342 "Grease Pencil data-blocks",
346 "rna_Main_movieclips_begin",
348 "Movie Clip data-blocks",
350 {
"masks",
"Mask",
"rna_Main_masks_begin",
"Masks",
"Masks data-blocks",
RNA_def_main_masks},
352 "FreestyleLineStyle",
353 "rna_Main_linestyles_begin",
355 "Line Style data-blocks",
359 "rna_Main_cachefiles_begin",
361 "Cache Files data-blocks",
365 "rna_Main_paintcurves_begin",
367 "Paint Curves data-blocks",
371 "rna_Main_workspaces_begin",
373 "Workspace data-blocks",
377 "rna_Main_lightprobes_begin",
379 "Light Probe data-blocks",
387 "rna_Main_hair_curves_begin",
389 "Hair curve data-blocks",
393 "rna_Main_pointclouds_begin",
395 "Point cloud data-blocks",
399 "rna_Main_volumes_begin",
401 "Volume data-blocks",
403 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
411 "Main data structure representing a .blend file and all its data-blocks");
417 prop,
"rna_Main_filepath_get",
"rna_Main_filepath_length",
nullptr);
425 prop,
"File Has Unsaved Changes",
"Have recent edits been saved to disk");
431 prop,
"File is Saved",
"Has the current session been saved to disk as a .blend file");
436 prop,
"Use Auto-Pack",
"Automatically pack all external data into .blend file");
445 "File format version the .blend file was saved with",
452 for (i = 0; lists[i].
name; i++) {
457 "rna_iterator_listbase_next",
458 "rna_iterator_listbase_end",
459 "rna_iterator_listbase_get",
#define STRNCPY(dst, src)
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_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)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
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)
void RNA_def_main(BlenderRNA *brna)
void(BlenderRNA *brna, PropertyRNA *cprop) CollectionDefFunc