107 static void rna_idname_validate(
const char *name,
char *r_name)
113 static void rna_Main_ID_remove(
Main *bmain,
124 "%s '%s' is outside of main database and can not be removed from it",
146 "%s '%s' must have zero users to be removed, found %d (try with do_unlink=True parameter)",
153 static Camera *rna_Main_cameras_new(
Main *bmain,
const char *name)
156 rna_idname_validate(name, safe_name);
166 static Scene *rna_Main_scenes_new(
Main *bmain,
const char *name)
169 rna_idname_validate(name, safe_name);
177 static void rna_Main_scenes_remove(
201 rna_Main_ID_remove(bmain, reports, scene_ptr, do_unlink,
true,
true);
206 "Scene '%s' is the last local one, cannot be removed",
216 "Can not create object in main database with an evaluated data data-block");
221 rna_idname_validate(name, safe_name);
251 static Material *rna_Main_materials_new(
Main *bmain,
const char *name)
254 rna_idname_validate(name, safe_name);
287 static struct bNodeTree *rna_Main_nodetree_new(
Main *bmain,
const char *name,
int type)
290 rna_idname_validate(name, safe_name);
305 static Mesh *rna_Main_meshes_new(
Main *bmain,
const char *name)
308 rna_idname_validate(name, safe_name);
319 static Mesh *rna_Main_meshes_new_from_object(
Main *bmain,
322 bool preserve_all_data_layers,
325 switch (object->
type) {
338 bmain,
depsgraph,
object, preserve_all_data_layers);
345 static Light *rna_Main_lights_new(
Main *bmain,
const char *name,
int type)
348 rna_idname_validate(name, safe_name);
359 static Image *rna_Main_images_new(
Main *bmain,
370 rna_idname_validate(name, safe_name);
372 float color[4] = {0.0, 0.0, 0.0, 1.0};
390 static Image *rna_Main_images_load(
Main *bmain,
392 const char *filepath,
398 if (check_existing) {
408 "Cannot read '%s': %s",
410 errno ? strerror(errno) :
TIP_(
"unsupported image format"));
420 static Lattice *rna_Main_lattices_new(
Main *bmain,
const char *name)
423 rna_idname_validate(name, safe_name);
433 static Curve *rna_Main_curves_new(
Main *bmain,
const char *name,
int type)
436 rna_idname_validate(name, safe_name);
446 static MetaBall *rna_Main_metaballs_new(
Main *bmain,
const char *name)
449 rna_idname_validate(name, safe_name);
459 static VFont *rna_Main_fonts_load(
Main *bmain,
461 const char *filepath,
467 if (check_existing) {
477 "Cannot read '%s': %s",
479 errno ? strerror(errno) :
TIP_(
"unsupported font format"));
487 static Tex *rna_Main_textures_new(
Main *bmain,
const char *name,
int type)
490 rna_idname_validate(name, safe_name);
501 static Brush *rna_Main_brushes_new(
Main *bmain,
const char *name,
int mode)
504 rna_idname_validate(name, safe_name);
521 static World *rna_Main_worlds_new(
Main *bmain,
const char *name)
524 rna_idname_validate(name, safe_name);
534 static Collection *rna_Main_collections_new(
Main *bmain,
const char *name)
537 rna_idname_validate(name, safe_name);
546 static Speaker *rna_Main_speakers_new(
Main *bmain,
const char *name)
549 rna_idname_validate(name, safe_name);
559 static bSound *rna_Main_sounds_load(
Main *bmain,
const char *name,
bool check_existing)
563 if (check_existing) {
577 static Text *rna_Main_texts_new(
Main *bmain,
const char *name)
580 rna_idname_validate(name, safe_name);
589 static Text *rna_Main_texts_load(
Main *bmain,
591 const char *filepath,
602 "Cannot read '%s': %s",
604 errno ? strerror(errno) :
TIP_(
"unable to load text"));
612 static bArmature *rna_Main_armatures_new(
Main *bmain,
const char *name)
615 rna_idname_validate(name, safe_name);
625 static bAction *rna_Main_actions_new(
Main *bmain,
const char *name)
628 rna_idname_validate(name, safe_name);
642 rna_idname_validate(name, safe_name);
652 static Palette *rna_Main_palettes_new(
Main *bmain,
const char *name)
655 rna_idname_validate(name, safe_name);
667 const char *filepath,
674 if (check_existing) {
687 "Cannot read '%s': %s",
689 errno ? strerror(errno) :
TIP_(
"unable to load movie clip"));
699 static Mask *rna_Main_mask_new(
Main *bmain,
const char *name)
702 rna_idname_validate(name, safe_name);
715 rna_idname_validate(name, safe_name);
728 rna_idname_validate(name, safe_name);
741 static bGPdata *rna_Main_gpencils_new(
Main *bmain,
const char *name)
744 rna_idname_validate(name, safe_name);
754 static Curves *rna_Main_hair_curves_new(
Main *bmain,
const char *name)
757 rna_idname_validate(name, safe_name);
767 static PointCloud *rna_Main_pointclouds_new(
Main *bmain,
const char *name)
770 rna_idname_validate(name, safe_name);
780 static Volume *rna_Main_volumes_new(
Main *bmain,
const char *name)
783 rna_idname_validate(name, safe_name);
793 # ifdef WITH_SIMULATION_DATABLOCK
794 static Simulation *rna_Main_simulations_new(
Main *bmain,
const char *name)
797 rna_idname_validate(name, safe_name);
809 # define RNA_MAIN_ID_TAG_FUNCS_DEF(_func_name, _listbase_name, _id_type) \
810 static void rna_Main_##_func_name##_tag(Main *bmain, bool value) \
812 BKE_main_id_tag_listbase(&bmain->_listbase_name, LIB_TAG_DOIT, value); \
815 RNA_MAIN_ID_TAG_FUNCS_DEF(cameras, cameras,
ID_CA)
816 RNA_MAIN_ID_TAG_FUNCS_DEF(scenes, scenes,
ID_SCE)
817 RNA_MAIN_ID_TAG_FUNCS_DEF(objects, objects,
ID_OB)
819 RNA_MAIN_ID_TAG_FUNCS_DEF(node_groups, nodetrees,
ID_NT)
820 RNA_MAIN_ID_TAG_FUNCS_DEF(meshes, meshes,
ID_ME)
821 RNA_MAIN_ID_TAG_FUNCS_DEF(lights, lights,
ID_LA)
822 RNA_MAIN_ID_TAG_FUNCS_DEF(libraries, libraries,
ID_LI)
823 RNA_MAIN_ID_TAG_FUNCS_DEF(screens, screens,
ID_SCR)
824 RNA_MAIN_ID_TAG_FUNCS_DEF(window_managers, wm,
ID_WM)
825 RNA_MAIN_ID_TAG_FUNCS_DEF(images, images,
ID_IM)
826 RNA_MAIN_ID_TAG_FUNCS_DEF(lattices, lattices,
ID_LT)
828 RNA_MAIN_ID_TAG_FUNCS_DEF(metaballs, metaballs,
ID_MB)
829 RNA_MAIN_ID_TAG_FUNCS_DEF(fonts, fonts,
ID_VF)
831 RNA_MAIN_ID_TAG_FUNCS_DEF(brushes, brushes,
ID_BR)
832 RNA_MAIN_ID_TAG_FUNCS_DEF(worlds, worlds,
ID_WO)
833 RNA_MAIN_ID_TAG_FUNCS_DEF(collections, collections,
ID_GR)
835 RNA_MAIN_ID_TAG_FUNCS_DEF(texts, texts,
ID_TXT)
836 RNA_MAIN_ID_TAG_FUNCS_DEF(speakers, speakers,
ID_SPK)
837 RNA_MAIN_ID_TAG_FUNCS_DEF(sounds, sounds,
ID_SO)
838 RNA_MAIN_ID_TAG_FUNCS_DEF(armatures, armatures,
ID_AR)
839 RNA_MAIN_ID_TAG_FUNCS_DEF(actions, actions,
ID_AC)
840 RNA_MAIN_ID_TAG_FUNCS_DEF(particles, particles,
ID_PA)
841 RNA_MAIN_ID_TAG_FUNCS_DEF(palettes, palettes,
ID_PAL)
842 RNA_MAIN_ID_TAG_FUNCS_DEF(gpencils, gpencils,
ID_GD)
843 RNA_MAIN_ID_TAG_FUNCS_DEF(movieclips, movieclips,
ID_MC)
844 RNA_MAIN_ID_TAG_FUNCS_DEF(masks, masks,
ID_MSK)
846 RNA_MAIN_ID_TAG_FUNCS_DEF(cachefiles, cachefiles,
ID_CF)
847 RNA_MAIN_ID_TAG_FUNCS_DEF(paintcurves, paintcurves,
ID_PC)
848 RNA_MAIN_ID_TAG_FUNCS_DEF(workspaces, workspaces,
ID_WS)
849 RNA_MAIN_ID_TAG_FUNCS_DEF(lightprobes, lightprobes,
ID_LP)
850 RNA_MAIN_ID_TAG_FUNCS_DEF(hair_curves, hair_curves,
ID_CV)
851 RNA_MAIN_ID_TAG_FUNCS_DEF(pointclouds, pointclouds,
ID_PT)
852 RNA_MAIN_ID_TAG_FUNCS_DEF(volumes, volumes,
ID_VO)
853 # ifdef WITH_SIMULATION_DATABLOCK
854 RNA_MAIN_ID_TAG_FUNCS_DEF(simulations, simulations,
ID_SIM)
857 # undef RNA_MAIN_ID_TAG_FUNCS_DEF
891 parm =
RNA_def_string(func,
"name",
"Camera", 0,
"",
"New name for the data-block");
894 parm =
RNA_def_pointer(func,
"camera",
"Camera",
"",
"New camera data-block");
900 parm =
RNA_def_pointer(func,
"camera",
"Camera",
"",
"Camera to remove");
907 "Unlink all usages of this camera before deleting it "
908 "(WARNING: will also delete objects instancing that camera data)");
913 "Decrement user counter of all datablocks used by this camera");
915 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this camera");
935 parm =
RNA_def_string(func,
"name",
"Scene", 0,
"",
"New name for the data-block");
938 parm =
RNA_def_pointer(func,
"scene",
"Scene",
"",
"New scene data-block");
948 func,
"do_unlink",
true,
"",
"Unlink all usages of this scene before deleting it");
969 parm =
RNA_def_string(func,
"name",
"Object", 0,
"",
"New name for the data-block");
971 parm =
RNA_def_pointer(func,
"object_data",
"ID",
"",
"Object data or None for an empty object");
975 parm =
RNA_def_pointer(func,
"object",
"Object",
"",
"New object data-block");
981 parm =
RNA_def_pointer(func,
"object",
"Object",
"",
"Object to remove");
985 func,
"do_unlink",
true,
"",
"Unlink all usages of this object before deleting it");
990 "Decrement user counter of all datablocks used by this object");
992 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this object");
1012 parm =
RNA_def_string(func,
"name",
"Material", 0,
"",
"New name for the data-block");
1015 parm =
RNA_def_pointer(func,
"material",
"Material",
"",
"New material data-block");
1018 func =
RNA_def_function(srna,
"create_gpencil_data",
"rna_Main_materials_gpencil_data");
1023 func =
RNA_def_function(srna,
"remove_gpencil_data",
"rna_Main_materials_gpencil_remove");
1031 parm =
RNA_def_pointer(func,
"material",
"Material",
"",
"Material to remove");
1035 func,
"do_unlink",
true,
"",
"Unlink all usages of this material before deleting it");
1040 "Decrement user counter of all datablocks used by this material");
1042 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this material");
1055 {0,
"DUMMY", 0,
"",
""},
1066 parm =
RNA_def_string(func,
"name",
"NodeGroup", 0,
"",
"New name for the data-block");
1068 parm =
RNA_def_enum(func,
"type", dummy_items, 0,
"Type",
"The type of node_group to add");
1072 parm =
RNA_def_pointer(func,
"tree",
"NodeTree",
"",
"New node tree data-block");
1078 parm =
RNA_def_pointer(func,
"tree",
"NodeTree",
"",
"Node tree to remove");
1082 func,
"do_unlink",
true,
"",
"Unlink all usages of this node tree before deleting it");
1087 "Decrement user counter of all datablocks used by this node tree");
1089 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this node tree");
1108 parm =
RNA_def_string(func,
"name",
"Mesh", 0,
"",
"New name for the data-block");
1111 parm =
RNA_def_pointer(func,
"mesh",
"Mesh",
"",
"New mesh data-block");
1114 func =
RNA_def_function(srna,
"new_from_object",
"rna_Main_meshes_new_from_object");
1117 "Add a new mesh created from given object (undeformed geometry if object is original, and "
1118 "final evaluated geometry, with all modifiers etc., if object is evaluated)");
1120 parm =
RNA_def_pointer(func,
"object",
"Object",
"",
"Object to create mesh from");
1123 "preserve_all_data_layers",
1126 "Preserve all data layers in the mesh, like UV maps and vertex groups. "
1127 "By default Blender only computes the subset of data layers needed for viewport "
1128 "display and rendering, for better performance");
1134 "Evaluated dependency graph which is required when preserve_all_data_layers is true");
1139 "Mesh created from object, remove it if it is only used for export");
1152 "Unlink all usages of this mesh before deleting it "
1153 "(WARNING: will also delete objects instancing that mesh data)");
1158 "Decrement user counter of all datablocks used by this mesh data");
1160 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this mesh data");
1180 parm =
RNA_def_string(func,
"name",
"Light", 0,
"",
"New name for the data-block");
1186 parm =
RNA_def_pointer(func,
"light",
"Light",
"",
"New light data-block");
1192 parm =
RNA_def_pointer(func,
"light",
"Light",
"",
"Light to remove");
1199 "Unlink all usages of this light before deleting it "
1200 "(WARNING: will also delete objects instancing that light data)");
1205 "Decrement user counter of all datablocks used by this light data");
1207 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this light data");
1232 parm =
RNA_def_pointer(func,
"library",
"Library",
"",
"Library to remove");
1236 func,
"do_unlink",
true,
"",
"Unlink all usages of this library before deleting it");
1241 "Decrement user counter of all datablocks used by this library");
1243 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this library");
1290 parm =
RNA_def_string(func,
"name",
"Image", 0,
"",
"New name for the data-block");
1292 parm =
RNA_def_int(func,
"width", 1024, 1, INT_MAX,
"",
"Width of the image", 1, INT_MAX);
1294 parm =
RNA_def_int(func,
"height", 1024, 1, INT_MAX,
"",
"Height of the image", 1, INT_MAX);
1298 func,
"float_buffer", 0,
"Float Buffer",
"Create an image with floating-point color");
1299 RNA_def_boolean(func,
"stereo3d", 0,
"Stereo 3D",
"Create left and right views");
1300 RNA_def_boolean(func,
"is_data", 0,
"Is Data",
"Create image with non-color data color space");
1303 parm =
RNA_def_pointer(func,
"image",
"Image",
"",
"New image data-block");
1310 func,
"filepath",
"File Path", 0,
"",
"Path of the file to load");
1316 "Using existing data-block if this file is already loaded");
1318 parm =
RNA_def_pointer(func,
"image",
"Image",
"",
"New image data-block");
1324 parm =
RNA_def_pointer(func,
"image",
"Image",
"",
"Image to remove");
1328 func,
"do_unlink",
true,
"",
"Unlink all usages of this image before deleting it");
1330 func,
"do_id_user",
true,
"",
"Decrement user counter of all datablocks used by this image");
1332 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this image");
1352 parm =
RNA_def_string(func,
"name",
"Lattice", 0,
"",
"New name for the data-block");
1355 parm =
RNA_def_pointer(func,
"lattice",
"Lattice",
"",
"New lattice data-block");
1361 parm =
RNA_def_pointer(func,
"lattice",
"Lattice",
"",
"Lattice to remove");
1368 "Unlink all usages of this lattice before deleting it "
1369 "(WARNING: will also delete objects instancing that lattice data)");
1374 "Decrement user counter of all datablocks used by this lattice data");
1376 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this lattice data");
1395 parm =
RNA_def_string(func,
"name",
"Curve", 0,
"",
"New name for the data-block");
1401 parm =
RNA_def_pointer(func,
"curve",
"Curve",
"",
"New curve data-block");
1407 parm =
RNA_def_pointer(func,
"curve",
"Curve",
"",
"Curve to remove");
1414 "Unlink all usages of this curve before deleting it "
1415 "(WARNING: will also delete objects instancing that curve data)");
1420 "Decrement user counter of all datablocks used by this curve data");
1422 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this curve data");
1441 parm =
RNA_def_string(func,
"name",
"MetaBall", 0,
"",
"New name for the data-block");
1444 parm =
RNA_def_pointer(func,
"metaball",
"MetaBall",
"",
"New metaball data-block");
1450 parm =
RNA_def_pointer(func,
"metaball",
"MetaBall",
"",
"Metaball to remove");
1457 "Unlink all usages of this metaball before deleting it "
1458 "(WARNING: will also delete objects instancing that metaball data)");
1463 "Decrement user counter of all datablocks used by this metaball data");
1465 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this metaball data");
1486 func,
"filepath",
"File Path", 0,
"",
"path of the font to load");
1492 "Using existing data-block if this file is already loaded");
1494 parm =
RNA_def_pointer(func,
"vfont",
"VectorFont",
"",
"New font data-block");
1500 parm =
RNA_def_pointer(func,
"vfont",
"VectorFont",
"",
"Font to remove");
1504 func,
"do_unlink",
true,
"",
"Unlink all usages of this font before deleting it");
1506 func,
"do_id_user",
true,
"",
"Decrement user counter of all datablocks used by this font");
1508 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this font");
1527 parm =
RNA_def_string(func,
"name",
"Texture", 0,
"",
"New name for the data-block");
1533 parm =
RNA_def_pointer(func,
"texture",
"Texture",
"",
"New texture data-block");
1539 parm =
RNA_def_pointer(func,
"texture",
"Texture",
"",
"Texture to remove");
1543 func,
"do_unlink",
true,
"",
"Unlink all usages of this texture before deleting it");
1548 "Decrement user counter of all datablocks used by this texture");
1550 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this texture");
1569 parm =
RNA_def_string(func,
"name",
"Brush", 0,
"",
"New name for the data-block");
1576 "Paint Mode for the new brush");
1578 parm =
RNA_def_pointer(func,
"brush",
"Brush",
"",
"New brush data-block");
1584 parm =
RNA_def_pointer(func,
"brush",
"Brush",
"",
"Brush to remove");
1588 func,
"do_unlink",
true,
"",
"Unlink all usages of this brush before deleting it");
1590 func,
"do_id_user",
true,
"",
"Decrement user counter of all datablocks used by this brush");
1592 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this brush");
1598 func =
RNA_def_function(srna,
"create_gpencil_data",
"rna_Main_brush_gpencil_data");
1617 parm =
RNA_def_string(func,
"name",
"World", 0,
"",
"New name for the data-block");
1620 parm =
RNA_def_pointer(func,
"world",
"World",
"",
"New world data-block");
1626 parm =
RNA_def_pointer(func,
"world",
"World",
"",
"World to remove");
1630 func,
"do_unlink",
true,
"",
"Unlink all usages of this world before deleting it");
1632 func,
"do_id_user",
true,
"",
"Decrement user counter of all datablocks used by this world");
1634 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this world");
1654 parm =
RNA_def_string(func,
"name",
"Collection", 0,
"",
"New name for the data-block");
1657 parm =
RNA_def_pointer(func,
"collection",
"Collection",
"",
"New collection data-block");
1663 parm =
RNA_def_pointer(func,
"collection",
"Collection",
"",
"Collection to remove");
1667 func,
"do_unlink",
true,
"",
"Unlink all usages of this collection before deleting it");
1672 "Decrement user counter of all datablocks used by this collection");
1674 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this collection");
1694 parm =
RNA_def_string(func,
"name",
"Speaker", 0,
"",
"New name for the data-block");
1697 parm =
RNA_def_pointer(func,
"speaker",
"Speaker",
"",
"New speaker data-block");
1703 parm =
RNA_def_pointer(func,
"speaker",
"Speaker",
"",
"Speaker to remove");
1710 "Unlink all usages of this speaker before deleting it "
1711 "(WARNING: will also delete objects instancing that speaker data)");
1716 "Decrement user counter of all datablocks used by this speaker data");
1718 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this speaker data");
1738 parm =
RNA_def_string(func,
"name",
"Text", 0,
"",
"New name for the data-block");
1741 parm =
RNA_def_pointer(func,
"text",
"Text",
"",
"New text data-block");
1751 func,
"do_unlink",
true,
"",
"Unlink all usages of this text before deleting it");
1753 func,
"do_id_user",
true,
"",
"Decrement user counter of all datablocks used by this text");
1755 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this text");
1762 func,
"filepath",
"Path",
FILE_MAX,
"",
"path for the data-block");
1765 func,
"internal", 0,
"Make internal",
"Make text file internal after loading");
1767 parm =
RNA_def_pointer(func,
"text",
"Text",
"",
"New text data-block");
1790 func,
"filepath",
"Path",
FILE_MAX,
"",
"path for the data-block");
1796 "Using existing data-block if this file is already loaded");
1798 parm =
RNA_def_pointer(func,
"sound",
"Sound",
"",
"New text data-block");
1804 parm =
RNA_def_pointer(func,
"sound",
"Sound",
"",
"Sound to remove");
1808 func,
"do_unlink",
true,
"",
"Unlink all usages of this sound before deleting it");
1810 func,
"do_id_user",
true,
"",
"Decrement user counter of all datablocks used by this sound");
1812 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this sound");
1832 parm =
RNA_def_string(func,
"name",
"Armature", 0,
"",
"New name for the data-block");
1835 parm =
RNA_def_pointer(func,
"armature",
"Armature",
"",
"New armature data-block");
1841 parm =
RNA_def_pointer(func,
"armature",
"Armature",
"",
"Armature to remove");
1848 "Unlink all usages of this armature before deleting it "
1849 "(WARNING: will also delete objects instancing that armature data)");
1854 "Decrement user counter of all datablocks used by this armature data");
1856 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this armature data");
1875 parm =
RNA_def_string(func,
"name",
"Action", 0,
"",
"New name for the data-block");
1878 parm =
RNA_def_pointer(func,
"action",
"Action",
"",
"New action data-block");
1884 parm =
RNA_def_pointer(func,
"action",
"Action",
"",
"Action to remove");
1888 func,
"do_unlink",
true,
"",
"Unlink all usages of this action before deleting it");
1893 "Decrement user counter of all datablocks used by this action");
1895 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this action");
1914 "Add a new particle settings instance to the main database");
1915 parm =
RNA_def_string(func,
"name",
"ParticleSettings", 0,
"",
"New name for the data-block");
1919 func,
"particle",
"ParticleSettings",
"",
"New particle settings data-block");
1925 func,
"Remove a particle settings instance from the current blendfile");
1926 parm =
RNA_def_pointer(func,
"particle",
"ParticleSettings",
"",
"Particle Settings to remove");
1933 "Unlink all usages of those particle settings before deleting them");
1938 "Decrement user counter of all datablocks used by this particle settings");
1943 "Make sure interface does not reference this particle settings");
1963 parm =
RNA_def_string(func,
"name",
"Palette", 0,
"",
"New name for the data-block");
1966 parm =
RNA_def_pointer(func,
"palette",
"Palette",
"",
"New palette data-block");
1972 parm =
RNA_def_pointer(func,
"palette",
"Palette",
"",
"Palette to remove");
1976 func,
"do_unlink",
true,
"",
"Unlink all usages of this palette before deleting it");
1981 "Decrement user counter of all datablocks used by this palette");
1983 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this palette");
2036 parm =
RNA_def_string(func,
"name",
"GreasePencil", 0,
"",
"New name for the data-block");
2040 func,
"grease_pencil",
"GreasePencil",
"",
"New grease pencil data-block");
2046 "Remove a grease pencil instance from the current blendfile");
2047 parm =
RNA_def_pointer(func,
"grease_pencil",
"GreasePencil",
"",
"Grease Pencil to remove");
2051 func,
"do_unlink",
true,
"",
"Unlink all usages of this grease pencil before deleting it");
2056 "Decrement user counter of all datablocks used by this grease pencil");
2058 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this grease pencil");
2079 parm =
RNA_def_pointer(func,
"clip",
"MovieClip",
"",
"Movie clip to remove");
2083 func,
"do_unlink",
true,
"",
"Unlink all usages of this movie clip before deleting it");
2088 "Decrement user counter of all datablocks used by this movie clip");
2090 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this movie clip");
2097 "Add a new movie clip to the main database from a file "
2098 "(while ``check_existing`` is disabled for consistency with other load functions, "
2099 "behavior with multiple movie-clips using the same file may incorrectly generate proxies)");
2101 func,
"filepath",
"Path",
FILE_MAX,
"",
"path for the data-block");
2107 "Using existing data-block if this file is already loaded");
2109 parm =
RNA_def_pointer(func,
"clip",
"MovieClip",
"",
"New movie clip data-block");
2132 func,
"name",
NULL,
MAX_ID_NAME - 2,
"Mask",
"Name of new mask data-block");
2135 parm =
RNA_def_pointer(func,
"mask",
"Mask",
"",
"New mask data-block");
2146 func,
"do_unlink",
true,
"",
"Unlink all usages of this mask before deleting it");
2148 func,
"do_id_user",
true,
"",
"Decrement user counter of all datablocks used by this mask");
2150 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this mask");
2170 parm =
RNA_def_string(func,
"name",
"FreestyleLineStyle", 0,
"",
"New name for the data-block");
2173 parm =
RNA_def_pointer(func,
"linestyle",
"FreestyleLineStyle",
"",
"New line style data-block");
2179 parm =
RNA_def_pointer(func,
"linestyle",
"FreestyleLineStyle",
"",
"Line style to remove");
2183 func,
"do_unlink",
true,
"",
"Unlink all usages of this line style before deleting it");
2188 "Decrement user counter of all datablocks used by this line style");
2190 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this line style");
2222 parm =
RNA_def_string(func,
"name",
"Probe", 0,
"",
"New name for the data-block");
2228 parm =
RNA_def_pointer(func,
"lightprobe",
"LightProbe",
"",
"New light probe data-block");
2234 parm =
RNA_def_pointer(func,
"lightprobe",
"LightProbe",
"",
"Light probe to remove");
2241 "Unlink all usages of this light probe before deleting it "
2242 "(WARNING: will also delete objects instancing that light probe data)");
2247 "Decrement user counter of all datablocks used by this light probe");
2249 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this light probe");
2269 parm =
RNA_def_string(func,
"name",
"Curves", 0,
"",
"New name for the data-block");
2272 parm =
RNA_def_pointer(func,
"curves",
"Curves",
"",
"New curves data-block");
2278 parm =
RNA_def_pointer(func,
"curves",
"Curves",
"",
"Curves data-block to remove");
2285 "Unlink all usages of this curves before deleting it "
2286 "(WARNING: will also delete objects instancing that curves data)");
2291 "Decrement user counter of all datablocks used by this curves data");
2293 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this curves data");
2313 parm =
RNA_def_string(func,
"name",
"PointCloud", 0,
"",
"New name for the data-block");
2316 parm =
RNA_def_pointer(func,
"pointcloud",
"PointCloud",
"",
"New point cloud data-block");
2322 parm =
RNA_def_pointer(func,
"pointcloud",
"PointCloud",
"",
"Point cloud to remove");
2329 "Unlink all usages of this point cloud before deleting it "
2330 "(WARNING: will also delete objects instancing that point cloud data)");
2335 "Decrement user counter of all datablocks used by this point cloud data");
2340 "Make sure interface does not reference this point cloud data");
2360 parm =
RNA_def_string(func,
"name",
"Volume", 0,
"",
"New name for the data-block");
2363 parm =
RNA_def_pointer(func,
"volume",
"Volume",
"",
"New volume data-block");
2369 parm =
RNA_def_pointer(func,
"volume",
"Volume",
"",
"Volume to remove");
2376 "Unlink all usages of this volume before deleting it "
2377 "(WARNING: will also delete objects instancing that volume data)");
2382 "Decrement user counter of all datablocks used by this volume data");
2384 func,
"do_ui_user",
true,
"",
"Make sure interface does not reference this volume data");
2391 # ifdef WITH_SIMULATION_DATABLOCK
2405 parm =
RNA_def_string(func,
"name",
"Simulation", 0,
"",
"New name for the data-block");
2408 parm =
RNA_def_pointer(func,
"simulation",
"Simulation",
"",
"New simulation data-block");
2414 parm =
RNA_def_pointer(func,
"simulation",
"Simulation",
"",
"Simulation to remove");
2418 func,
"do_unlink",
true,
"",
"Unlink all usages of this simulation before deleting it");
2423 "Decrement user counter of all datablocks used by this simulation data");
2425 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)
struct Brush * BKE_brush_add(struct Main *bmain, const char *name, eObjectMode ob_mode)
void BKE_brush_init_gpencil_settings(struct Brush *brush)
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)
Low-level operations for curves that cannot be defined in the C++ header yet.
void * BKE_curves_add(struct Main *bmain, const char *name)
display list (or rather multi purpose list) stuff.
struct bGPdata * BKE_gpencil_data_addnew(struct Main *bmain, const char name[])
const char * BKE_idtype_idcode_to_name(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], bool stereo3d, bool is_data, 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_free_ex(struct Main *bmain, void *idv, int flag, bool use_flag_from_idtag)
void BKE_id_delete(struct Main *bmain, void *idv) ATTR_NONNULL()
void id_fake_user_clear(struct ID *id)
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, 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.
int BKE_object_obdata_to_type(const struct ID *id) ATTR_NONNULL(1)
struct Object * BKE_object_add_only_object(struct Main *bmain, int type, const char *name) ATTR_RETURNS_NONNULL
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_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
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 *filepath, const char *relbase, bool is_internal) ATTR_NONNULL(1
void BKE_texture_type_set(struct Tex *tex, int type)
struct Tex * BKE_texture_add(struct Main *bmain, const char *name)
struct VFont * BKE_vfont_load_exists(struct Main *bmain, const char *filepath)
struct VFont * BKE_vfont_load(struct Main *bmain, const char *filepath)
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, size_t maxncpy) ATTR_NONNULL()
int BLI_str_utf8_invalid_strip(char *str, size_t length) ATTR_NONNULL(1)
#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.
void ED_node_tree_propagate_change(const struct bContext *C, struct Main *bmain, struct bNodeTree *ntree)
_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 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 * textures
_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
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to curves
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
#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
depth_tx normal_tx diffuse_light_tx specular_light_tx volume_light_tx environment_tx ambient_occlusion_tx aov_value_tx in_weight_img image(1, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D_ARRAY, "out_weight_img") .image(3
smooth(Type::VEC4, "color_mul") .smooth(Type gpFillTexture gpSceneDepthTexture materials[GPENCIL_MATERIAL_BUFFER_LEN]
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
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_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_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
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)