122 static void rna_idname_validate(
const char *name,
char *r_name)
128 static void rna_Main_ID_remove(
Main *bmain,
139 "%s '%s' is outside of main database and can not be removed from it",
161 "%s '%s' must have zero users to be removed, found %d (try with do_unlink=True parameter)",
168 static Camera *rna_Main_cameras_new(
Main *bmain,
const char *name)
171 rna_idname_validate(name, safe_name);
181 static Scene *rna_Main_scenes_new(
Main *bmain,
const char *name)
184 rna_idname_validate(name, safe_name);
192 static void rna_Main_scenes_remove(
216 rna_Main_ID_remove(bmain, reports, scene_ptr, do_unlink,
true,
true);
221 "Scene '%s' is the last local one, cannot be removed",
231 "Can not create object in main database with an evaluated data data-block");
236 rna_idname_validate(name, safe_name);
266 static Material *rna_Main_materials_new(
Main *bmain,
const char *name)
269 rna_idname_validate(name, safe_name);
302 static struct bNodeTree *rna_Main_nodetree_new(
Main *bmain,
const char *name,
int type)
305 rna_idname_validate(name, safe_name);
319 static Mesh *rna_Main_meshes_new(
Main *bmain,
const char *name)
322 rna_idname_validate(name, safe_name);
333 static Mesh *rna_Main_meshes_new_from_object(
Main *bmain,
336 bool preserve_all_data_layers,
339 switch (object->
type) {
352 bmain,
depsgraph,
object, preserve_all_data_layers);
359 static Light *rna_Main_lights_new(
Main *bmain,
const char *name,
int type)
362 rna_idname_validate(name, safe_name);
373 static Image *rna_Main_images_new(
Main *bmain,
384 rna_idname_validate(name, safe_name);
386 float color[4] = {0.0, 0.0, 0.0, 1.0};
404 static Image *rna_Main_images_load(
Main *bmain,
406 const char *filepath,
412 if (check_existing) {
422 "Cannot read '%s': %s",
424 errno ? strerror(errno) :
TIP_(
"unsupported image format"));
434 static Lattice *rna_Main_lattices_new(
Main *bmain,
const char *name)
437 rna_idname_validate(name, safe_name);
447 static Curve *rna_Main_curves_new(
Main *bmain,
const char *name,
int type)
450 rna_idname_validate(name, safe_name);
460 static MetaBall *rna_Main_metaballs_new(
Main *bmain,
const char *name)
463 rna_idname_validate(name, safe_name);
473 static VFont *rna_Main_fonts_load(
Main *bmain,
475 const char *filepath,
481 if (check_existing) {
491 "Cannot read '%s': %s",
493 errno ? strerror(errno) :
TIP_(
"unsupported font format"));
501 static Tex *rna_Main_textures_new(
Main *bmain,
const char *name,
int type)
504 rna_idname_validate(name, safe_name);
515 static Brush *rna_Main_brushes_new(
Main *bmain,
const char *name,
int mode)
518 rna_idname_validate(name, safe_name);
535 static World *rna_Main_worlds_new(
Main *bmain,
const char *name)
538 rna_idname_validate(name, safe_name);
548 static Collection *rna_Main_collections_new(
Main *bmain,
const char *name)
551 rna_idname_validate(name, safe_name);
560 static Speaker *rna_Main_speakers_new(
Main *bmain,
const char *name)
563 rna_idname_validate(name, safe_name);
573 static bSound *rna_Main_sounds_load(
Main *bmain,
const char *name,
bool check_existing)
577 if (check_existing) {
591 static Text *rna_Main_texts_new(
Main *bmain,
const char *name)
594 rna_idname_validate(name, safe_name);
603 static Text *rna_Main_texts_load(
Main *bmain,
605 const char *filepath,
616 "Cannot read '%s': %s",
618 errno ? strerror(errno) :
TIP_(
"unable to load text"));
626 static bArmature *rna_Main_armatures_new(
Main *bmain,
const char *name)
629 rna_idname_validate(name, safe_name);
639 static bAction *rna_Main_actions_new(
Main *bmain,
const char *name)
642 rna_idname_validate(name, safe_name);
655 rna_idname_validate(name, safe_name);
665 static Palette *rna_Main_palettes_new(
Main *bmain,
const char *name)
668 rna_idname_validate(name, safe_name);
680 const char *filepath,
687 if (check_existing) {
700 "Cannot read '%s': %s",
702 errno ? strerror(errno) :
TIP_(
"unable to load movie clip"));
712 static Mask *rna_Main_mask_new(
Main *bmain,
const char *name)
715 rna_idname_validate(name, safe_name);
727 rna_idname_validate(name, safe_name);
740 rna_idname_validate(name, safe_name);
753 static bGPdata *rna_Main_gpencils_new(
Main *bmain,
const char *name)
756 rna_idname_validate(name, safe_name);
766 # ifdef WITH_HAIR_NODES
767 static Hair *rna_Main_hairs_new(
Main *bmain,
const char *name)
770 rna_idname_validate(name, safe_name);
781 # ifdef WITH_POINT_CLOUD
782 static PointCloud *rna_Main_pointclouds_new(
Main *bmain,
const char *name)
785 rna_idname_validate(name, safe_name);
796 static Volume *rna_Main_volumes_new(
Main *bmain,
const char *name)
799 rna_idname_validate(name, safe_name);
809 # ifdef WITH_GEOMETRY_NODES
810 static Simulation *rna_Main_simulations_new(
Main *bmain,
const char *name)
813 rna_idname_validate(name, safe_name);
825 # define RNA_MAIN_ID_TAG_FUNCS_DEF(_func_name, _listbase_name, _id_type) \
826 static void rna_Main_##_func_name##_tag(Main *bmain, bool value) \
828 BKE_main_id_tag_listbase(&bmain->_listbase_name, LIB_TAG_DOIT, value); \
831 RNA_MAIN_ID_TAG_FUNCS_DEF(cameras, cameras,
ID_CA)
832 RNA_MAIN_ID_TAG_FUNCS_DEF(scenes, scenes,
ID_SCE)
833 RNA_MAIN_ID_TAG_FUNCS_DEF(objects, objects,
ID_OB)
834 RNA_MAIN_ID_TAG_FUNCS_DEF(materials, materials,
ID_MA)
835 RNA_MAIN_ID_TAG_FUNCS_DEF(node_groups, nodetrees,
ID_NT)
836 RNA_MAIN_ID_TAG_FUNCS_DEF(meshes, meshes,
ID_ME)
837 RNA_MAIN_ID_TAG_FUNCS_DEF(lights, lights,
ID_LA)
838 RNA_MAIN_ID_TAG_FUNCS_DEF(libraries, libraries,
ID_LI)
839 RNA_MAIN_ID_TAG_FUNCS_DEF(screens, screens,
ID_SCR)
840 RNA_MAIN_ID_TAG_FUNCS_DEF(window_managers, wm,
ID_WM)
841 RNA_MAIN_ID_TAG_FUNCS_DEF(images, images,
ID_IM)
842 RNA_MAIN_ID_TAG_FUNCS_DEF(lattices, lattices,
ID_LT)
843 RNA_MAIN_ID_TAG_FUNCS_DEF(curves, curves,
ID_CU)
844 RNA_MAIN_ID_TAG_FUNCS_DEF(metaballs, metaballs,
ID_MB)
845 RNA_MAIN_ID_TAG_FUNCS_DEF(fonts, fonts,
ID_VF)
847 RNA_MAIN_ID_TAG_FUNCS_DEF(brushes, brushes,
ID_BR)
848 RNA_MAIN_ID_TAG_FUNCS_DEF(worlds, worlds,
ID_WO)
849 RNA_MAIN_ID_TAG_FUNCS_DEF(collections, collections,
ID_GR)
851 RNA_MAIN_ID_TAG_FUNCS_DEF(texts, texts,
ID_TXT)
852 RNA_MAIN_ID_TAG_FUNCS_DEF(speakers, speakers,
ID_SPK)
853 RNA_MAIN_ID_TAG_FUNCS_DEF(sounds, sounds,
ID_SO)
854 RNA_MAIN_ID_TAG_FUNCS_DEF(armatures, armatures,
ID_AR)
855 RNA_MAIN_ID_TAG_FUNCS_DEF(actions, actions,
ID_AC)
856 RNA_MAIN_ID_TAG_FUNCS_DEF(particles, particles,
ID_PA)
857 RNA_MAIN_ID_TAG_FUNCS_DEF(palettes, palettes,
ID_PAL)
858 RNA_MAIN_ID_TAG_FUNCS_DEF(gpencils, gpencils,
ID_GD)
859 RNA_MAIN_ID_TAG_FUNCS_DEF(movieclips, movieclips,
ID_MC)
860 RNA_MAIN_ID_TAG_FUNCS_DEF(masks, masks,
ID_MSK)
862 RNA_MAIN_ID_TAG_FUNCS_DEF(cachefiles, cachefiles,
ID_CF)
863 RNA_MAIN_ID_TAG_FUNCS_DEF(paintcurves, paintcurves,
ID_PC)
864 RNA_MAIN_ID_TAG_FUNCS_DEF(workspaces, workspaces,
ID_WS)
865 RNA_MAIN_ID_TAG_FUNCS_DEF(lightprobes, lightprobes,
ID_LP)
866 # ifdef WITH_HAIR_NODES
867 RNA_MAIN_ID_TAG_FUNCS_DEF(hairs, hairs,
ID_HA)
869 # ifdef WITH_POINT_CLOUD
870 RNA_MAIN_ID_TAG_FUNCS_DEF(pointclouds, pointclouds,
ID_PT)
872 RNA_MAIN_ID_TAG_FUNCS_DEF(volumes, volumes,
ID_VO)
873 # ifdef WITH_GEOMETRY_NODES
874 RNA_MAIN_ID_TAG_FUNCS_DEF(simulations, simulations,
ID_SIM)
877 # undef RNA_MAIN_ID_TAG_FUNCS_DEF
911 parm =
RNA_def_string(func,
"name",
"Camera", 0,
"",
"New name for the data-block");
914 parm =
RNA_def_pointer(func,
"camera",
"Camera",
"",
"New camera data-block");
920 parm =
RNA_def_pointer(func,
"camera",
"Camera",
"",
"Camera to remove");
927 "Unlink all usages of this camera before deleting it "
928 "(WARNING: will also delete objects instancing that camera data)");
933 "Decrement user counter of all datablocks used by this camera");
935 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this camera");
955 parm =
RNA_def_string(func,
"name",
"Scene", 0,
"",
"New name for the data-block");
958 parm =
RNA_def_pointer(func,
"scene",
"Scene",
"",
"New scene data-block");
968 func,
"do_unlink",
true,
"",
"Unlink all usages of this scene before deleting it");
989 parm =
RNA_def_string(func,
"name",
"Object", 0,
"",
"New name for the data-block");
991 parm =
RNA_def_pointer(func,
"object_data",
"ID",
"",
"Object data or None for an empty object");
995 parm =
RNA_def_pointer(func,
"object",
"Object",
"",
"New object data-block");
1001 parm =
RNA_def_pointer(func,
"object",
"Object",
"",
"Object to remove");
1005 func,
"do_unlink",
true,
"",
"Unlink all usages of this object before deleting it");
1010 "Decrement user counter of all datablocks used by this object");
1012 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this object");
1032 parm =
RNA_def_string(func,
"name",
"Material", 0,
"",
"New name for the data-block");
1035 parm =
RNA_def_pointer(func,
"material",
"Material",
"",
"New material data-block");
1038 func =
RNA_def_function(srna,
"create_gpencil_data",
"rna_Main_materials_gpencil_data");
1043 func =
RNA_def_function(srna,
"remove_gpencil_data",
"rna_Main_materials_gpencil_remove");
1051 parm =
RNA_def_pointer(func,
"material",
"Material",
"",
"Material to remove");
1055 func,
"do_unlink",
true,
"",
"Unlink all usages of this material before deleting it");
1060 "Decrement user counter of all datablocks used by this material");
1062 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this material");
1075 {0,
"DUMMY", 0,
"",
""},
1086 parm =
RNA_def_string(func,
"name",
"NodeGroup", 0,
"",
"New name for the data-block");
1088 parm =
RNA_def_enum(func,
"type", dummy_items, 0,
"Type",
"The type of node_group to add");
1092 parm =
RNA_def_pointer(func,
"tree",
"NodeTree",
"",
"New node tree data-block");
1098 parm =
RNA_def_pointer(func,
"tree",
"NodeTree",
"",
"Node tree to remove");
1102 func,
"do_unlink",
true,
"",
"Unlink all usages of this node tree before deleting it");
1107 "Decrement user counter of all datablocks used by this node tree");
1109 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this node tree");
1128 parm =
RNA_def_string(func,
"name",
"Mesh", 0,
"",
"New name for the data-block");
1131 parm =
RNA_def_pointer(func,
"mesh",
"Mesh",
"",
"New mesh data-block");
1134 func =
RNA_def_function(srna,
"new_from_object",
"rna_Main_meshes_new_from_object");
1137 "Add a new mesh created from given object (undeformed geometry if object is original, and "
1138 "final evaluated geometry, with all modifiers etc., if object is evaluated)");
1140 parm =
RNA_def_pointer(func,
"object",
"Object",
"",
"Object to create mesh from");
1143 "preserve_all_data_layers",
1146 "Preserve all data layers in the mesh, like UV maps and vertex groups. "
1147 "By default Blender only computes the subset of data layers needed for viewport "
1148 "display and rendering, for better performance");
1154 "Evaluated dependency graph which is required when preserve_all_data_layers is true");
1159 "Mesh created from object, remove it if it is only used for export");
1172 "Unlink all usages of this mesh before deleting it "
1173 "(WARNING: will also delete objects instancing that mesh data)");
1178 "Decrement user counter of all datablocks used by this mesh data");
1180 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this mesh data");
1200 parm =
RNA_def_string(func,
"name",
"Light", 0,
"",
"New name for the data-block");
1206 parm =
RNA_def_pointer(func,
"light",
"Light",
"",
"New light data-block");
1212 parm =
RNA_def_pointer(func,
"light",
"Light",
"",
"Light to remove");
1219 "Unlink all usages of this light before deleting it "
1220 "(WARNING: will also delete objects instancing that light data)");
1225 "Decrement user counter of all datablocks used by this light data");
1227 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this light data");
1252 parm =
RNA_def_pointer(func,
"library",
"Library",
"",
"Library to remove");
1256 func,
"do_unlink",
true,
"",
"Unlink all usages of this library before deleting it");
1261 "Decrement user counter of all datablocks used by this library");
1263 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this library");
1310 parm =
RNA_def_string(func,
"name",
"Image", 0,
"",
"New name for the data-block");
1312 parm =
RNA_def_int(func,
"width", 1024, 1, INT_MAX,
"",
"Width of the image", 1, INT_MAX);
1314 parm =
RNA_def_int(func,
"height", 1024, 1, INT_MAX,
"",
"Height of the image", 1, INT_MAX);
1318 func,
"float_buffer", 0,
"Float Buffer",
"Create an image with floating-point color");
1319 RNA_def_boolean(func,
"stereo3d", 0,
"Stereo 3D",
"Create left and right views");
1320 RNA_def_boolean(func,
"is_data", 0,
"Is Data",
"Create image with non-color data color space");
1323 parm =
RNA_def_pointer(func,
"image",
"Image",
"",
"New image data-block");
1330 func,
"filepath",
"File Path", 0,
"",
"Path of the file to load");
1336 "Using existing data-block if this file is already loaded");
1338 parm =
RNA_def_pointer(func,
"image",
"Image",
"",
"New image data-block");
1344 parm =
RNA_def_pointer(func,
"image",
"Image",
"",
"Image to remove");
1348 func,
"do_unlink",
true,
"",
"Unlink all usages of this image before deleting it");
1350 func,
"do_id_user",
true,
"",
"Decrement user counter of all datablocks used by this image");
1352 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this image");
1372 parm =
RNA_def_string(func,
"name",
"Lattice", 0,
"",
"New name for the data-block");
1375 parm =
RNA_def_pointer(func,
"lattice",
"Lattice",
"",
"New lattice data-block");
1381 parm =
RNA_def_pointer(func,
"lattice",
"Lattice",
"",
"Lattice to remove");
1388 "Unlink all usages of this lattice before deleting it "
1389 "(WARNING: will also delete objects instancing that lattice data)");
1394 "Decrement user counter of all datablocks used by this lattice data");
1396 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this lattice data");
1415 parm =
RNA_def_string(func,
"name",
"Curve", 0,
"",
"New name for the data-block");
1421 parm =
RNA_def_pointer(func,
"curve",
"Curve",
"",
"New curve data-block");
1427 parm =
RNA_def_pointer(func,
"curve",
"Curve",
"",
"Curve to remove");
1434 "Unlink all usages of this curve before deleting it "
1435 "(WARNING: will also delete objects instancing that curve data)");
1440 "Decrement user counter of all datablocks used by this curve data");
1442 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this curve data");
1461 parm =
RNA_def_string(func,
"name",
"MetaBall", 0,
"",
"New name for the data-block");
1464 parm =
RNA_def_pointer(func,
"metaball",
"MetaBall",
"",
"New metaball data-block");
1470 parm =
RNA_def_pointer(func,
"metaball",
"MetaBall",
"",
"Metaball to remove");
1477 "Unlink all usages of this metaball before deleting it "
1478 "(WARNING: will also delete objects instancing that metaball data)");
1483 "Decrement user counter of all datablocks used by this metaball data");
1485 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this metaball data");
1506 func,
"filepath",
"File Path", 0,
"",
"path of the font to load");
1512 "Using existing data-block if this file is already loaded");
1514 parm =
RNA_def_pointer(func,
"vfont",
"VectorFont",
"",
"New font data-block");
1520 parm =
RNA_def_pointer(func,
"vfont",
"VectorFont",
"",
"Font to remove");
1524 func,
"do_unlink",
true,
"",
"Unlink all usages of this font before deleting it");
1526 func,
"do_id_user",
true,
"",
"Decrement user counter of all datablocks used by this font");
1528 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this font");
1547 parm =
RNA_def_string(func,
"name",
"Texture", 0,
"",
"New name for the data-block");
1553 parm =
RNA_def_pointer(func,
"texture",
"Texture",
"",
"New texture data-block");
1559 parm =
RNA_def_pointer(func,
"texture",
"Texture",
"",
"Texture to remove");
1563 func,
"do_unlink",
true,
"",
"Unlink all usages of this texture before deleting it");
1568 "Decrement user counter of all datablocks used by this texture");
1570 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this texture");
1589 parm =
RNA_def_string(func,
"name",
"Brush", 0,
"",
"New name for the data-block");
1596 "Paint Mode for the new brush");
1598 parm =
RNA_def_pointer(func,
"brush",
"Brush",
"",
"New brush data-block");
1604 parm =
RNA_def_pointer(func,
"brush",
"Brush",
"",
"Brush to remove");
1608 func,
"do_unlink",
true,
"",
"Unlink all usages of this brush before deleting it");
1610 func,
"do_id_user",
true,
"",
"Decrement user counter of all datablocks used by this brush");
1612 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this brush");
1618 func =
RNA_def_function(srna,
"create_gpencil_data",
"rna_Main_brush_gpencil_data");
1637 parm =
RNA_def_string(func,
"name",
"World", 0,
"",
"New name for the data-block");
1640 parm =
RNA_def_pointer(func,
"world",
"World",
"",
"New world data-block");
1646 parm =
RNA_def_pointer(func,
"world",
"World",
"",
"World to remove");
1650 func,
"do_unlink",
true,
"",
"Unlink all usages of this world before deleting it");
1652 func,
"do_id_user",
true,
"",
"Decrement user counter of all datablocks used by this world");
1654 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this world");
1674 parm =
RNA_def_string(func,
"name",
"Collection", 0,
"",
"New name for the data-block");
1677 parm =
RNA_def_pointer(func,
"collection",
"Collection",
"",
"New collection data-block");
1683 parm =
RNA_def_pointer(func,
"collection",
"Collection",
"",
"Collection to remove");
1687 func,
"do_unlink",
true,
"",
"Unlink all usages of this collection before deleting it");
1692 "Decrement user counter of all datablocks used by this collection");
1694 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this collection");
1714 parm =
RNA_def_string(func,
"name",
"Speaker", 0,
"",
"New name for the data-block");
1717 parm =
RNA_def_pointer(func,
"speaker",
"Speaker",
"",
"New speaker data-block");
1723 parm =
RNA_def_pointer(func,
"speaker",
"Speaker",
"",
"Speaker to remove");
1730 "Unlink all usages of this speaker before deleting it "
1731 "(WARNING: will also delete objects instancing that speaker data)");
1736 "Decrement user counter of all datablocks used by this speaker data");
1738 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this speaker data");
1758 parm =
RNA_def_string(func,
"name",
"Text", 0,
"",
"New name for the data-block");
1761 parm =
RNA_def_pointer(func,
"text",
"Text",
"",
"New text data-block");
1771 func,
"do_unlink",
true,
"",
"Unlink all usages of this text before deleting it");
1773 func,
"do_id_user",
true,
"",
"Decrement user counter of all datablocks used by this text");
1775 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this text");
1782 func,
"filepath",
"Path",
FILE_MAX,
"",
"path for the data-block");
1785 func,
"internal", 0,
"Make internal",
"Make text file internal after loading");
1787 parm =
RNA_def_pointer(func,
"text",
"Text",
"",
"New text data-block");
1810 func,
"filepath",
"Path",
FILE_MAX,
"",
"path for the data-block");
1816 "Using existing data-block if this file is already loaded");
1818 parm =
RNA_def_pointer(func,
"sound",
"Sound",
"",
"New text data-block");
1824 parm =
RNA_def_pointer(func,
"sound",
"Sound",
"",
"Sound to remove");
1828 func,
"do_unlink",
true,
"",
"Unlink all usages of this sound before deleting it");
1830 func,
"do_id_user",
true,
"",
"Decrement user counter of all datablocks used by this sound");
1832 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this sound");
1852 parm =
RNA_def_string(func,
"name",
"Armature", 0,
"",
"New name for the data-block");
1855 parm =
RNA_def_pointer(func,
"armature",
"Armature",
"",
"New armature data-block");
1861 parm =
RNA_def_pointer(func,
"armature",
"Armature",
"",
"Armature to remove");
1868 "Unlink all usages of this armature before deleting it "
1869 "(WARNING: will also delete objects instancing that armature data)");
1874 "Decrement user counter of all datablocks used by this armature data");
1876 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this armature data");
1895 parm =
RNA_def_string(func,
"name",
"Action", 0,
"",
"New name for the data-block");
1898 parm =
RNA_def_pointer(func,
"action",
"Action",
"",
"New action data-block");
1904 parm =
RNA_def_pointer(func,
"action",
"Action",
"",
"Action to remove");
1908 func,
"do_unlink",
true,
"",
"Unlink all usages of this action before deleting it");
1913 "Decrement user counter of all datablocks used by this action");
1915 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this action");
1934 "Add a new particle settings instance to the main database");
1935 parm =
RNA_def_string(func,
"name",
"ParticleSettings", 0,
"",
"New name for the data-block");
1939 func,
"particle",
"ParticleSettings",
"",
"New particle settings data-block");
1945 func,
"Remove a particle settings instance from the current blendfile");
1946 parm =
RNA_def_pointer(func,
"particle",
"ParticleSettings",
"",
"Particle Settings to remove");
1953 "Unlink all usages of those particle settings before deleting them");
1958 "Decrement user counter of all datablocks used by this particle settings");
1963 "Make sure interface does not reference this particle settings");
1983 parm =
RNA_def_string(func,
"name",
"Palette", 0,
"",
"New name for the data-block");
1986 parm =
RNA_def_pointer(func,
"palette",
"Palette",
"",
"New palette data-block");
1992 parm =
RNA_def_pointer(func,
"palette",
"Palette",
"",
"Palette to remove");
1996 func,
"do_unlink",
true,
"",
"Unlink all usages of this palette before deleting it");
2001 "Decrement user counter of all datablocks used by this palette");
2003 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this palette");
2056 parm =
RNA_def_string(func,
"name",
"GreasePencil", 0,
"",
"New name for the data-block");
2060 func,
"grease_pencil",
"GreasePencil",
"",
"New grease pencil data-block");
2066 "Remove a grease pencil instance from the current blendfile");
2067 parm =
RNA_def_pointer(func,
"grease_pencil",
"GreasePencil",
"",
"Grease Pencil to remove");
2071 func,
"do_unlink",
true,
"",
"Unlink all usages of this grease pencil before deleting it");
2076 "Decrement user counter of all datablocks used by this grease pencil");
2078 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this grease pencil");
2099 parm =
RNA_def_pointer(func,
"clip",
"MovieClip",
"",
"Movie clip to remove");
2103 func,
"do_unlink",
true,
"",
"Unlink all usages of this movie clip before deleting it");
2108 "Decrement user counter of all datablocks used by this movie clip");
2110 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this movie clip");
2117 "Add a new movie clip to the main database from a file "
2118 "(while ``check_existing`` is disabled for consistency with other load functions, "
2119 "behavior with multiple movie-clips using the same file may incorrectly generate proxies)");
2121 func,
"filepath",
"Path",
FILE_MAX,
"",
"path for the data-block");
2127 "Using existing data-block if this file is already loaded");
2129 parm =
RNA_def_pointer(func,
"clip",
"MovieClip",
"",
"New movie clip data-block");
2152 func,
"name",
NULL,
MAX_ID_NAME - 2,
"Mask",
"Name of new mask data-block");
2155 parm =
RNA_def_pointer(func,
"mask",
"Mask",
"",
"New mask data-block");
2166 func,
"do_unlink",
true,
"",
"Unlink all usages of this mask before deleting it");
2168 func,
"do_id_user",
true,
"",
"Decrement user counter of all datablocks used by this mask");
2170 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this mask");
2190 parm =
RNA_def_string(func,
"name",
"FreestyleLineStyle", 0,
"",
"New name for the data-block");
2193 parm =
RNA_def_pointer(func,
"linestyle",
"FreestyleLineStyle",
"",
"New line style data-block");
2199 parm =
RNA_def_pointer(func,
"linestyle",
"FreestyleLineStyle",
"",
"Line style to remove");
2203 func,
"do_unlink",
true,
"",
"Unlink all usages of this line style before deleting it");
2208 "Decrement user counter of all datablocks used by this line style");
2210 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this line style");
2242 parm =
RNA_def_string(func,
"name",
"Probe", 0,
"",
"New name for the data-block");
2248 parm =
RNA_def_pointer(func,
"lightprobe",
"LightProbe",
"",
"New light probe data-block");
2254 parm =
RNA_def_pointer(func,
"lightprobe",
"LightProbe",
"",
"Light probe to remove");
2261 "Unlink all usages of this light probe before deleting it "
2262 "(WARNING: will also delete objects instancing that light probe data)");
2267 "Decrement user counter of all datablocks used by this light probe");
2269 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this light probe");
2276 # ifdef WITH_HAIR_NODES
2290 parm =
RNA_def_string(func,
"name",
"Hair", 0,
"",
"New name for the data-block");
2293 parm =
RNA_def_pointer(func,
"hair",
"Hair",
"",
"New hair data-block");
2306 "Unlink all usages of this hair before deleting it "
2307 "(WARNING: will also delete objects instancing that hair data)");
2312 "Decrement user counter of all datablocks used by this hair data");
2314 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this hair data");
2322 # ifdef WITH_POINT_CLOUD
2336 parm =
RNA_def_string(func,
"name",
"PointCloud", 0,
"",
"New name for the data-block");
2339 parm =
RNA_def_pointer(func,
"pointcloud",
"PointCloud",
"",
"New point cloud data-block");
2345 parm =
RNA_def_pointer(func,
"pointcloud",
"PointCloud",
"",
"Point cloud to remove");
2352 "Unlink all usages of this point cloud before deleting it "
2353 "(WARNING: will also delete objects instancing that point cloud data)");
2358 "Decrement user counter of all datablocks used by this point cloud data");
2363 "Make sure interface does not reference this point cloud data");
2384 parm =
RNA_def_string(func,
"name",
"Volume", 0,
"",
"New name for the data-block");
2387 parm =
RNA_def_pointer(func,
"volume",
"Volume",
"",
"New volume data-block");
2393 parm =
RNA_def_pointer(func,
"volume",
"Volume",
"",
"Volume to remove");
2400 "Unlink all usages of this volume before deleting it "
2401 "(WARNING: will also delete objects instancing that volume data)");
2406 "Decrement user counter of all datablocks used by this volume data");
2408 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this volume data");
2415 # ifdef WITH_GEOMETRY_NODES
2429 parm =
RNA_def_string(func,
"name",
"Simulation", 0,
"",
"New name for the data-block");
2432 parm =
RNA_def_pointer(func,
"simulation",
"Simulation",
"",
"New simulation data-block");
2438 parm =
RNA_def_pointer(func,
"simulation",
"Simulation",
"",
"Simulation to remove");
2442 func,
"do_unlink",
true,
"",
"Unlink all usages of this simulation before deleting it");
2447 "Decrement user counter of all datablocks used by this simulation data");
2449 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this simulation data");
Blender kernel action and pose functionality.
struct bAction * BKE_action_add(struct Main *bmain, const char name[])
struct bArmature * BKE_armature_add(struct Main *bmain, const char *name)
void BKE_brush_init_gpencil_settings(struct Brush *brush)
struct Brush * BKE_brush_add(struct Main *bmain, const char *name, const eObjectMode ob_mode)
Camera data-block and utility functions.
void * BKE_camera_add(struct Main *bmain, const char *name)
struct Collection * BKE_collection_add(struct Main *bmain, struct Collection *parent, const char *name)
struct wmWindow * CTX_wm_window(const bContext *C)
struct Curve * BKE_curve_add(struct Main *bmain, const char *name, int type)
display list (or rather multi purpose list) stuff.
struct VFont * BKE_vfont_load_exists(struct Main *bmain, const char *filepath)
struct VFont * BKE_vfont_load(struct Main *bmain, const char *filepath)
struct bGPdata * BKE_gpencil_data_addnew(struct Main *bmain, const char name[])
General operations for hairs.
void * BKE_hair_add(struct Main *bmain, const char *name)
const char * BKE_idtype_idcode_to_name(const short idcode)
struct Image * BKE_image_load_exists(struct Main *bmain, const char *filepath)
struct Image * BKE_image_load(struct Main *bmain, const char *filepath)
struct Image * BKE_image_add_generated(struct Main *bmain, unsigned int width, unsigned int height, const char *name, int depth, int floatbuf, short gen_type, const float color[4], const bool stereo3d, const bool is_data, const bool tiled)
struct Lattice * BKE_lattice_add(struct Main *bmain, const char *name)
void id_us_min(struct ID *id)
@ LIB_ID_FREE_NO_USER_REFCOUNT
void id_us_plus(struct ID *id)
void BKE_id_delete(struct Main *bmain, void *idv) ATTR_NONNULL()
void id_fake_user_clear(struct ID *id)
void BKE_id_free_ex(struct Main *bmain, void *idv, int flag, const bool use_flag_from_idtag)
General operations, lookup, etc. for blender lights.
struct Light * BKE_light_add(struct Main *bmain, const char *name) ATTR_WARN_UNUSED_RESULT
General operations for probes.
void BKE_lightprobe_type_set(struct LightProbe *probe, const short lightprobe_type)
void * BKE_lightprobe_add(struct Main *bmain, const char *name)
Blender kernel freestyle line style functionality.
FreestyleLineStyle * BKE_linestyle_new(struct Main *bmain, const char *name)
const char * BKE_main_blendfile_path(const struct Main *bmain) ATTR_NONNULL()
struct Mask * BKE_mask_new(struct Main *bmain, const char *name)
General operations, lookup, etc. for materials.
void BKE_object_materials_test(struct Main *bmain, struct Object *ob, struct ID *id)
struct Material * BKE_material_add(struct Main *bmain, const char *name)
void BKE_gpencil_material_attr_init(struct Material *ma)
struct MetaBall * BKE_mball_add(struct Main *bmain, const char *name)
struct Mesh * BKE_mesh_new_from_object_to_bmain(struct Main *bmain, struct Depsgraph *depsgraph, struct Object *object, bool preserve_all_data_layers)
struct Mesh * BKE_mesh_add(struct Main *bmain, const char *name)
struct MovieClip * BKE_movieclip_file_add_exists(struct Main *bmain, const char *filepath)
struct MovieClip * BKE_movieclip_file_add(struct Main *bmain, const char *name)
struct bNodeTree * ntreeAddTree(struct Main *bmain, const char *name, const char *idname)
General operations, lookup, etc. for blender objects.
struct Object * BKE_object_add_only_object(struct Main *bmain, int type, const char *name) ATTR_NONNULL(1) ATTR_RETURNS_NONNULL
int BKE_object_obdata_to_type(const struct ID *id) ATTR_NONNULL(1)
struct Palette * BKE_palette_add(struct Main *bmain, const char *name)
struct ParticleSettings * BKE_particlesettings_add(struct Main *bmain, const char *name)
General operations for point-clouds.
void * BKE_pointcloud_add(struct Main *bmain, const char *name)
void BKE_report(ReportList *reports, ReportType type, const char *message)
void BKE_reportf(ReportList *reports, ReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
bool BKE_scene_can_be_removed(const struct Main *bmain, const struct Scene *scene)
struct Scene * BKE_scene_add(struct Main *bmain, const char *name)
void * BKE_simulation_add(struct Main *bmain, const char *name)
struct bSound * BKE_sound_new_file(struct Main *main, const char *filepath)
struct bSound * BKE_sound_new_file_exists(struct Main *bmain, const char *filepath)
General operations for speakers.
void * BKE_speaker_add(struct Main *bmain, const char *name)
struct Text * BKE_text_add(struct Main *bmain, const char *name)
struct Text * BKE_text_load_ex(struct Main *bmain, const char *file, const char *relpath, const bool is_internal)
void BKE_texture_type_set(struct Tex *tex, int type)
struct Tex * BKE_texture_add(struct Main *bmain, const char *name)
void * BKE_volume_add(struct Main *bmain, const char *name)
struct World * BKE_world_add(struct Main *bmain, const char *name)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
int BLI_utf8_invalid_strip(char *str, size_t length) ATTR_NONNULL()
#define BPy_BEGIN_ALLOW_THREADS
#define BPy_END_ALLOW_THREADS
struct Depsgraph Depsgraph
void DEG_relations_tag_update(struct Main *bmain)
ID and Library types, which are fundamental for sdna.
#define ID_REAL_USERS(id)
Object groups, one object can be in many groups at once.
Object is a sort of wrapper for general info.
_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 const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_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
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint * textures
#define RNA_POINTER_INVALIDATE(ptr)
const EnumPropertyItem * rna_node_tree_type_itemf(void *data, bool(*poll)(void *data, struct bNodeTreeType *), bool *r_free)
struct bNodeTreeType * rna_node_tree_type_from_enum(int value)
FreestyleLineStyle linestyle
const Depsgraph * depsgraph
static CCL_NAMESPACE_BEGIN const double alpha
const EnumPropertyItem rna_enum_light_type_items[]
const EnumPropertyItem rna_enum_id_type_items[]
bool RNA_enum_id_from_value(const EnumPropertyItem *item, int value, const char **r_identifier)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
PropertyRNA * RNA_def_string_file_path(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
void RNA_def_function_flag(FunctionRNA *func, int flag)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
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_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_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_api_main(StructRNA *UNUSED(srna))
void RNA_def_main_lights(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_gpencil(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_actions(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_palettes(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_particles(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)
const EnumPropertyItem rna_enum_lightprobes_type_items[]
const EnumPropertyItem rna_enum_object_mode_items[]
const EnumPropertyItem rna_enum_object_type_curve_items[]
const EnumPropertyItem rna_enum_texture_type_items[]
struct MaterialGPencilStyle * gp_style
struct bNodeTreeType * typeinfo
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
void WM_main_add_notifier(unsigned int type, void *reference)
void WM_window_set_active_scene(Main *bmain, bContext *C, wmWindow *win, Scene *scene)
Scene * WM_window_get_active_scene(const wmWindow *win)