34 {
ID_AC,
"ACTION", ICON_ACTION,
"Action",
""},
35 {
ID_AR,
"ARMATURE", ICON_ARMATURE_DATA,
"Armature",
""},
36 {
ID_BR,
"BRUSH", ICON_BRUSH_DATA,
"Brush",
""},
37 {
ID_CF,
"CACHEFILE", ICON_FILE,
"Cache File",
""},
38 {
ID_CA,
"CAMERA", ICON_CAMERA_DATA,
"Camera",
""},
39 {
ID_GR,
"COLLECTION", ICON_OUTLINER_COLLECTION,
"Collection",
""},
41 {
ID_CV,
"CURVES", ICON_CURVES_DATA,
"Curves",
""},
42 {
ID_VF,
"FONT", ICON_FONT_DATA,
"Font",
""},
43 {
ID_GD,
"GREASEPENCIL", ICON_GREASEPENCIL,
"Grease Pencil",
""},
44 {
ID_IM,
"IMAGE", ICON_IMAGE_DATA,
"Image",
""},
45 {
ID_KE,
"KEY", ICON_SHAPEKEY_DATA,
"Key",
""},
46 {
ID_LT,
"LATTICE", ICON_LATTICE_DATA,
"Lattice",
""},
47 {
ID_LI,
"LIBRARY", ICON_LIBRARY_DATA_DIRECT,
"Library",
""},
48 {
ID_LA,
"LIGHT", ICON_LIGHT_DATA,
"Light",
""},
49 {
ID_LP,
"LIGHT_PROBE", ICON_LIGHTPROBE_CUBEMAP,
"Light Probe",
""},
50 {
ID_LS,
"LINESTYLE", ICON_LINE_DATA,
"Line Style",
""},
51 {
ID_MSK,
"MASK", ICON_MOD_MASK,
"Mask",
""},
52 {
ID_MA,
"MATERIAL", ICON_MATERIAL_DATA,
"Material",
""},
53 {
ID_ME,
"MESH", ICON_MESH_DATA,
"Mesh",
""},
54 {
ID_MB,
"META", ICON_META_DATA,
"Metaball",
""},
55 {
ID_MC,
"MOVIECLIP", ICON_TRACKER,
"Movie Clip",
""},
56 {
ID_NT,
"NODETREE", ICON_NODETREE,
"Node Tree",
""},
57 {
ID_OB,
"OBJECT", ICON_OBJECT_DATA,
"Object",
""},
58 {
ID_PC,
"PAINTCURVE", ICON_CURVE_BEZCURVE,
"Paint Curve",
""},
59 {
ID_PAL,
"PALETTE", ICON_COLOR,
"Palette",
""},
60 {
ID_PA,
"PARTICLE", ICON_PARTICLE_DATA,
"Particle",
""},
61 {
ID_PT,
"POINTCLOUD", ICON_POINTCLOUD_DATA,
"Point Cloud",
""},
62 {
ID_SCE,
"SCENE", ICON_SCENE_DATA,
"Scene",
""},
63 {
ID_SIM,
"SIMULATION", ICON_PHYSICS,
"Simulation",
""},
64 {
ID_SO,
"SOUND", ICON_SOUND,
"Sound",
""},
65 {
ID_SPK,
"SPEAKER", ICON_SPEAKER,
"Speaker",
""},
66 {
ID_TXT,
"TEXT", ICON_TEXT,
"Text",
""},
67 {
ID_TE,
"TEXTURE", ICON_TEXTURE_DATA,
"Texture",
""},
68 {
ID_VO,
"VOLUME", ICON_VOLUME_DATA,
"Volume",
""},
69 {
ID_WM,
"WINDOWMANAGER", ICON_WINDOW,
"Window Manager",
""},
70 {
ID_WS,
"WORKSPACE", ICON_WORKSPACE,
"Workspace",
""},
71 {
ID_WO,
"WORLD", ICON_WORLD_DATA,
"World",
""},
80 "Does nothing, prevents adding actual overrides (NOT USED)"},
85 "Replace value of reference by overriding one"},
90 "Stores and apply difference between reference and local value (NOT USED)"},
95 "Stores and apply difference between reference and local value (NOT USED)"},
100 "Stores and apply multiplication factor between reference and local value (NOT USED)"},
105 "Insert a new item into collection after the one referenced in subitem_reference_name or "
111 "Insert a new item into collection after the one referenced in subitem_reference_name or "
112 "_index (NOT USED)"},
121 {
FILTER_ID_AC,
"filter_action", ICON_ACTION,
"Actions",
"Show Action data-blocks"},
126 "Show Armature data-blocks"},
127 {
FILTER_ID_BR,
"filter_brush", ICON_BRUSH_DATA,
"Brushes",
"Show Brushes data-blocks"},
128 {
FILTER_ID_CA,
"filter_camera", ICON_CAMERA_DATA,
"Cameras",
"Show Camera data-blocks"},
129 {
FILTER_ID_CF,
"filter_cachefile", ICON_FILE,
"Cache Files",
"Show Cache File data-blocks"},
130 {
FILTER_ID_CU_LEGACY,
"filter_curve", ICON_CURVE_DATA,
"Curves",
"Show Curve data-blocks"},
132 "filter_grease_pencil",
135 "Show Grease pencil data-blocks"},
138 ICON_OUTLINER_COLLECTION,
140 "Show Collection data-blocks"},
145 "Show/hide Curves data-blocks"},
146 {
FILTER_ID_IM,
"filter_image", ICON_IMAGE_DATA,
"Images",
"Show Image data-blocks"},
147 {
FILTER_ID_LA,
"filter_light", ICON_LIGHT_DATA,
"Lights",
"Show Light data-blocks"},
149 "filter_light_probe",
150 ICON_OUTLINER_DATA_LIGHTPROBE,
152 "Show Light Probe data-blocks"},
156 "Freestyle Linestyles",
157 "Show Freestyle's Line Style data-blocks"},
158 {
FILTER_ID_LT,
"filter_lattice", ICON_LATTICE_DATA,
"Lattices",
"Show Lattice data-blocks"},
163 "Show Material data-blocks"},
164 {
FILTER_ID_MB,
"filter_metaball", ICON_META_DATA,
"Metaballs",
"Show Metaball data-blocks"},
169 "Show Movie Clip data-blocks"},
170 {
FILTER_ID_ME,
"filter_mesh", ICON_MESH_DATA,
"Meshes",
"Show Mesh data-blocks"},
171 {
FILTER_ID_MSK,
"filter_mask", ICON_MOD_MASK,
"Masks",
"Show Mask data-blocks"},
172 {
FILTER_ID_NT,
"filter_node_tree", ICON_NODETREE,
"Node Trees",
"Show Node Tree data-blocks"},
173 {
FILTER_ID_OB,
"filter_object", ICON_OBJECT_DATA,
"Objects",
"Show Object data-blocks"},
175 "filter_particle_settings",
177 "Particles Settings",
178 "Show Particle Settings data-blocks"},
179 {
FILTER_ID_PAL,
"filter_palette", ICON_COLOR,
"Palettes",
"Show Palette data-blocks"},
181 "filter_paint_curve",
184 "Show Paint Curve data-blocks"},
187 ICON_POINTCLOUD_DATA,
189 "Show/hide Point Cloud data-blocks"},
190 {
FILTER_ID_SCE,
"filter_scene", ICON_SCENE_DATA,
"Scenes",
"Show Scene data-blocks"},
195 "Show Simulation data-blocks"},
196 {
FILTER_ID_SPK,
"filter_speaker", ICON_SPEAKER,
"Speakers",
"Show Speaker data-blocks"},
197 {
FILTER_ID_SO,
"filter_sound", ICON_SOUND,
"Sounds",
"Show Sound data-blocks"},
198 {
FILTER_ID_TE,
"filter_texture", ICON_TEXTURE_DATA,
"Textures",
"Show Texture data-blocks"},
199 {
FILTER_ID_TXT,
"filter_text", ICON_TEXT,
"Texts",
"Show Text data-blocks"},
200 {
FILTER_ID_VF,
"filter_font", ICON_FONT_DATA,
"Fonts",
"Show Font data-blocks"},
201 {
FILTER_ID_VO,
"filter_volume", ICON_VOLUME_DATA,
"Volumes",
"Show/hide Volume data-blocks"},
202 {
FILTER_ID_WO,
"filter_world", ICON_WORLD_DATA,
"Worlds",
"Show World data-blocks"},
207 "Show workspace data-blocks"},
241 void rna_ID_override_library_property_operation_refname_get(
PointerRNA *
ptr,
char *value)
247 int rna_ID_override_library_property_operation_refname_length(
PointerRNA *
ptr)
253 void rna_ID_override_library_property_operation_locname_get(
PointerRNA *
ptr,
char *value)
259 int rna_ID_override_library_property_operation_locname_length(
PointerRNA *
ptr)
275 return strlen(
id->
name + 2);
345 if (base_type == &RNA_Action) {
348 if (base_type == &RNA_Armature) {
351 if (base_type == &RNA_Brush) {
354 if (base_type == &RNA_CacheFile) {
357 if (base_type == &RNA_Camera) {
360 if (base_type == &RNA_Curve) {
363 if (base_type == &RNA_GreasePencil) {
366 if (base_type == &RNA_Collection) {
369 if (base_type == &RNA_Image) {
372 if (base_type == &RNA_Key) {
375 if (base_type == &RNA_Light) {
378 if (base_type == &RNA_Library) {
381 if (base_type == &RNA_FreestyleLineStyle) {
384 if (base_type == &RNA_Curves) {
387 if (base_type == &RNA_Lattice) {
390 if (base_type == &RNA_Material) {
393 if (base_type == &RNA_MetaBall) {
396 if (base_type == &RNA_MovieClip) {
399 if (base_type == &RNA_Mesh) {
402 if (base_type == &RNA_Mask) {
405 if (base_type == &RNA_NodeTree) {
408 if (base_type == &RNA_Object) {
411 if (base_type == &RNA_ParticleSettings) {
414 if (base_type == &RNA_Palette) {
417 if (base_type == &RNA_PaintCurve) {
420 if (base_type == &RNA_PointCloud) {
423 if (base_type == &RNA_LightProbe) {
426 if (base_type == &RNA_Scene) {
429 if (base_type == &RNA_Screen) {
432 # ifdef WITH_SIMULATION_DATABLOCK
433 if (base_type == &RNA_Simulation) {
437 if (base_type == &RNA_Sound) {
440 if (base_type == &RNA_Speaker) {
443 if (base_type == &RNA_Texture) {
446 if (base_type == &RNA_Text) {
449 if (base_type == &RNA_VectorFont) {
452 if (base_type == &RNA_Volume) {
455 if (base_type == &RNA_WorkSpace) {
458 if (base_type == &RNA_World) {
461 if (base_type == &RNA_WindowManager) {
476 return &RNA_Armature;
482 return &RNA_CacheFile;
486 return &RNA_GreasePencil;
488 return &RNA_Collection;
500 return &RNA_FreestyleLineStyle;
504 return &RNA_Material;
506 return &RNA_MetaBall;
508 return &RNA_MovieClip;
514 return &RNA_NodeTree;
518 return &RNA_ParticleSettings;
522 return &RNA_PaintCurve;
524 return &RNA_PointCloud;
526 return &RNA_LightProbe;
532 # ifdef WITH_SIMULATION_DATABLOCK
533 return &RNA_Simulation;
546 return &RNA_VectorFont;
550 return &RNA_WindowManager;
554 return &RNA_WorkSpace;
625 if (validate(&dummyptr,
data,
NULL) != 0) {
636 "Registering id property class: '%s' is too long, maximum length is %d",
655 static ID *rna_ID_copy(
ID *
id,
Main *bmain)
668 static void rna_ID_asset_mark(
ID *
id)
676 static void rna_ID_asset_generate_preview(
ID *
id,
bContext *
C)
684 static void rna_ID_asset_clear(
ID *
id)
692 static ID *rna_ID_override_create(
ID *
id,
Main *bmain,
bool remap_local_usages)
698 if (remap_local_usages) {
713 if (remap_local_usages) {
723 static ID *rna_ID_override_hierarchy_create(
732 ID *id_root_override =
NULL;
739 bmain,
scene, view_layer,
NULL,
id,
id, id_instance_hint, &id_root_override,
false);
748 return id_root_override;
751 static void rna_ID_override_template_create(
ID *
id,
ReportList *reports)
753 if (!
U.experimental.use_override_templates) {
758 BKE_report(reports,
RPT_ERROR,
"Unable to create override template for linked data-blocks");
763 reports,
RPT_ERROR,
"Unable to create override template for overridden data-blocks");
771 static void rna_ID_override_library_operations_update(
ID *
id,
791 static void rna_ID_override_library_reset(
ID *
id,
796 bool set_system_override)
813 static void rna_ID_override_library_destroy(
ID *
id,
840 override_library, rna_path, &created);
843 BKE_report(reports,
RPT_DEBUG,
"No new override property created, property already exists");
850 static void rna_ID_override_library_properties_remove(
IDOverrideLibrary *override_library,
868 const char *subitem_refname,
869 const char *subitem_locname,
870 int subitem_refindex,
871 int subitem_locindex)
886 BKE_report(reports,
RPT_DEBUG,
"No new override operation created, operation already exists");
893 static void rna_ID_override_library_property_operations_remove(
913 Curve *cu = ob->data;
914 freedisplist(&cu->disp);
937 allow_flag = OB_RECALC_ALL | PSYS_RECALC;
949 if (
flag & ~allow_flag) {
953 "%s is not compatible with %s 'refresh' options",
955 allow_flag ?
"the specified" :
"any");
963 static void rna_ID_user_clear(
ID *
id)
969 static void rna_ID_user_remap(
ID *
id,
Main *bmain,
ID *new_id)
978 static struct ID *rna_ID_make_local(
struct ID *
self,
Main *bmain,
bool UNUSED(clear_proxy))
987 static AnimData *rna_ID_animation_data_create(
ID *
id,
Main *bmain)
994 static void rna_ID_animation_data_free(
ID *
id,
Main *bmain)
1025 if (totcol && (key >= 0 && key < *totcol)) {
1036 static void rna_IDMaterials_append_id(
ID *
id,
Main *bmain,
Material *ma)
1048 const short totcol_orig = *totcol;
1050 index_i += (*totcol);
1053 if ((index_i < 0) || (index_i >= (*totcol))) {
1060 if (*totcol == totcol_orig) {
1072 static void rna_IDMaterials_clear_id(
ID *
id,
Main *bmain)
1081 static void rna_Library_filepath_set(
PointerRNA *
ptr,
const char *value)
1127 values[0] = prv_img->
w[
size];
1128 values[1] = prv_img->
h[
size];
1142 if (values[0] && values[1]) {
1143 prv_img->
rect[
size] =
MEM_callocN(values[0] * values[1] *
sizeof(
unsigned int),
"prv_rect");
1145 prv_img->
w[
size] = values[0];
1146 prv_img->
h[
size] = values[1];
1152 static int rna_ImagePreview_pixels_get_length(
const PointerRNA *
ptr,
1181 memcpy(values, prv_img->
rect[
size], prv_img->
w[
size] * prv_img->
h[
size] *
sizeof(
unsigned int));
1193 memcpy(prv_img->
rect[
size], values, prv_img->
w[
size] * prv_img->
h[
size] *
sizeof(
unsigned int));
1197 static int rna_ImagePreview_pixels_float_get_length(
const PointerRNA *
ptr,
1222 unsigned char *
data = (
unsigned char *)prv_img->
rect[
size];
1234 for (i = 0; i <
len; i++) {
1235 values[i] =
data[i] * (1.0f / 255.0f);
1239 static void rna_ImagePreview_pixels_float_set(
PointerRNA *
ptr,
1240 const float *values,
1246 unsigned char *
data = (
unsigned char *)prv_img->
rect[
size];
1256 for (i = 0; i <
len; i++) {
1262 static void rna_ImagePreview_is_image_custom_set(
PointerRNA *
ptr,
bool value)
1267 static void rna_ImagePreview_image_size_get(
PointerRNA *
ptr,
int *values)
1272 static void rna_ImagePreview_image_size_set(
PointerRNA *
ptr,
const int *values)
1277 static int rna_ImagePreview_image_pixels_get_length(
const PointerRNA *
ptr,
1283 static void rna_ImagePreview_image_pixels_get(
PointerRNA *
ptr,
int *values)
1288 static void rna_ImagePreview_image_pixels_set(
PointerRNA *
ptr,
const int *values)
1293 static int rna_ImagePreview_image_pixels_float_get_length(
const PointerRNA *
ptr,
1299 static void rna_ImagePreview_image_pixels_float_get(
PointerRNA *
ptr,
float *values)
1304 static void rna_ImagePreview_image_pixels_float_set(
PointerRNA *
ptr,
const float *values)
1309 static void rna_ImagePreview_is_icon_custom_set(
PointerRNA *
ptr,
bool value)
1314 static void rna_ImagePreview_icon_size_get(
PointerRNA *
ptr,
int *values)
1319 static void rna_ImagePreview_icon_size_set(
PointerRNA *
ptr,
const int *values)
1324 static int rna_ImagePreview_icon_pixels_get_length(
const PointerRNA *
ptr,
1330 static void rna_ImagePreview_icon_pixels_get(
PointerRNA *
ptr,
int *values)
1335 static void rna_ImagePreview_icon_pixels_set(
PointerRNA *
ptr,
const int *values)
1340 static int rna_ImagePreview_icon_pixels_float_get_length(
const PointerRNA *
ptr,
1346 static void rna_ImagePreview_icon_pixels_float_get(
PointerRNA *
ptr,
float *values)
1351 static void rna_ImagePreview_icon_pixels_float_set(
PointerRNA *
ptr,
const float *values)
1362 static void rna_ImagePreview_icon_reload(
PreviewImage *prv)
1387 static void rna_Library_version_get(
PointerRNA *
ptr,
int *value)
1390 value[0] =
lib->versionfile / 100;
1391 value[1] =
lib->versionfile % 100;
1392 value[2] =
lib->subversionfile;
1420 srna,
"ID Property",
"Property that stores arbitrary, user defined properties");
1463 "rna_IDPArray_begin",
1464 "rna_iterator_array_next",
1465 "rna_iterator_array_end",
1466 "rna_iterator_array_get",
1467 "rna_IDPArray_length",
1495 srna,
"rna_PropertyGroup_register",
"rna_PropertyGroup_unregister",
NULL);
1522 parm =
RNA_def_pointer(func,
"material",
"Material",
"",
"Material to add");
1530 parm =
RNA_def_pointer(func,
"material",
"Material",
"",
"Material to remove");
1553 "True if this preview image has been modified by py script,"
1554 "and is no more auto-generated by Blender");
1557 srna,
"image_size", 2,
NULL, 0, 0,
"Image Size",
"Width and height in pixels", 0, 0);
1560 prop,
"rna_ImagePreview_image_size_get",
"rna_ImagePreview_image_size_set",
NULL);
1568 prop,
"rna_ImagePreview_image_pixels_get",
"rna_ImagePreview_image_pixels_set",
NULL);
1574 prop,
"Float Image Pixels",
"Image pixels components, as floats (RGBA concatenated values)");
1577 "rna_ImagePreview_image_pixels_float_get",
1578 "rna_ImagePreview_image_pixels_float_set",
1586 "True if this preview icon has been modified by py script,"
1587 "and is no more auto-generated by Blender");
1590 srna,
"icon_size", 2,
NULL, 0, 0,
"Icon Size",
"Width and height in pixels", 0, 0);
1593 prop,
"rna_ImagePreview_icon_size_get",
"rna_ImagePreview_icon_size_set",
NULL);
1601 prop,
"rna_ImagePreview_icon_pixels_get",
"rna_ImagePreview_icon_pixels_set",
NULL);
1607 prop,
"Float Icon Pixels",
"Icon pixels components, as floats (RGBA concatenated values)");
1610 "rna_ImagePreview_icon_pixels_float_get",
1611 "rna_ImagePreview_icon_pixels_float_set",
1620 "Unique integer identifying this preview as an icon (zero means invalid)",
1640 "For templates, prevents the user from removing predefined operation (NOT USED)"},
1645 "Prevents the user from modifying that override operation (NOT USED)"},
1651 "ID Library Override Property Operation",
1652 "Description of an override operation over an overridden property");
1659 "What override operation is performed");
1663 srna,
"flag", override_library_property_flag_items, 0,
"Flags",
"Optional flags (NOT USED)");
1667 "subitem_reference_name",
1670 "Subitem Reference Name",
1671 "Used to handle insertions into collection");
1674 "rna_ID_override_library_property_operation_refname_get",
1675 "rna_ID_override_library_property_operation_refname_length",
1679 "subitem_local_name",
1682 "Subitem Local Name",
1683 "Used to handle insertions into collection");
1686 "rna_ID_override_library_property_operation_locname_get",
1687 "rna_ID_override_library_property_operation_locname_length",
1691 "subitem_reference_index",
1695 "Subitem Reference Index",
1696 "Used to handle insertions into collection",
1702 "subitem_local_index",
1706 "Subitem Local Index",
1707 "Used to handle insertions into collection",
1725 func =
RNA_def_function(srna,
"add",
"rna_ID_override_library_property_operations_add");
1733 "What override operation is performed");
1736 "subitem_reference_name",
1739 "Subitem Reference Name",
1740 "Used to handle insertions into collection");
1742 "subitem_local_name",
1745 "Subitem Local Name",
1746 "Used to handle insertions into collection");
1748 "subitem_reference_index",
1752 "Subitem Reference Index",
1753 "Used to handle insertions into collection",
1757 "subitem_local_index",
1761 "Subitem Local Index",
1762 "Used to handle insertions into collection",
1767 "IDOverrideLibraryPropertyOperation",
1769 "Created operation");
1772 func =
RNA_def_function(srna,
"remove",
"rna_ID_override_library_property_operations_remove");
1777 "IDOverrideLibraryPropertyOperation",
1779 "Override operation to be deleted");
1790 srna,
"ID Library Override Property",
"Description of an overridden property");
1799 "RNA path leading to that property, from owning ID");
1804 "IDOverrideLibraryPropertyOperation",
1806 "List of overriding operations for a property");
1825 func =
RNA_def_function(srna,
"add",
"rna_ID_override_library_properties_add");
1827 func,
"Add a property to the override library when it doesn't exist yet");
1831 "IDOverrideLibraryProperty",
1833 "Newly created override property or existing one");
1836 func,
"rna_path",
NULL, 256,
"RNA Path",
"RNA-Path of the property to add");
1839 func =
RNA_def_function(srna,
"remove",
"rna_ID_override_library_properties_remove");
1844 "IDOverrideLibraryProperty",
1846 "Override property to be deleted");
1858 srna,
"ID Library Override",
"Struct gathering all data needed by overridden linked IDs");
1861 srna,
"reference",
"ID",
"Reference ID",
"Linked ID used as reference by this override");
1868 "Hierarchy Root ID",
1869 "Library override ID used as root of the override hierarchy this ID is a member of");
1875 "Whether this library override is defined as part of a library "
1876 "hierarchy, or as a single, isolated and autonomous override");
1882 "is_system_override",
1884 "Is System Override",
1885 "Whether this library override exists only for the override hierarchy, "
1886 "or if it is actually editable by the user");
1893 "IDOverrideLibraryProperty",
1895 "List of overridden properties");
1900 func =
RNA_def_function(srna,
"operations_update",
"rna_ID_override_library_operations_update");
1903 "Update the library override operations based on the "
1904 "differences between this override ID and its reference");
1908 "Reset this override to match again its linked reference ID");
1915 "Also reset all the dependencies of this override to match their reference linked IDs");
1917 "set_system_override",
1920 "Reset all user-editable overrides as (non-editable) system overrides");
1922 func =
RNA_def_function(srna,
"destroy",
"rna_ID_override_library_destroy");
1924 func,
"Delete this override ID and remap its usages to its linked reference ID instead");
1930 "Also delete all the dependencies of this override and remap their usages to "
1931 "their reference linked IDs");
1953 "Base type for data-blocks, defining a unique name, linking from other libraries "
1954 "and garbage collection");
1970 prop,
"Full Name",
"Unique data-block ID name, including library one is any");
1979 "Whether this ID is runtime-only, evaluated data-block, or actual data from .blend file");
1988 "Actual data-block from .blend file (Main database) that generated that evaluated one");
2010 "Indicates whether an extra user is set or not (mainly for internal/debug usages)");
2019 "This data-block is not an independent one, but is actually a sub-data of another ID "
2020 "(typical example: root node trees or master collections)");
2027 "Tools can use this to tag data for their own purposes "
2028 "(initial state is undefined)");
2042 "library_weak_reference",
2043 "LibraryWeakReference",
2044 "Library Weak Reference",
2045 "Weak reference to a data-block in another library .blend file (used to "
2046 "re-use already appended data instead of appending new copies)");
2056 srna,
"override_library",
"IDOverrideLibrary",
"Library Override",
"Library override data");
2065 "Preview image and icon of this data-block (always None if not supported "
2066 "for this type of data)");
2074 func,
"Get corresponding evaluated ID from the given dependency graph");
2076 func,
"depsgraph",
"Depsgraph",
"",
"Dependency graph to perform lookup in");
2083 func,
"Create a copy of this data-block (not supported for all data-blocks)");
2091 "Enable easier reuse of the data-block through the Asset Browser, with the help of "
2092 "customizable metadata (like previews, descriptions and tags)");
2097 "Delete all asset metadata and turn the asset data-block back into a normal data-block");
2099 func =
RNA_def_function(srna,
"asset_generate_preview",
"rna_ID_asset_generate_preview");
2101 func,
"Generate preview image (might be scheduled in a background thread)");
2104 func =
RNA_def_function(srna,
"override_create",
"rna_ID_override_create");
2106 "Create an overridden local copy of this linked data-block (not "
2107 "supported for all data-blocks)");
2109 parm =
RNA_def_pointer(func,
"id",
"ID",
"",
"New overridden local copy of the ID");
2112 "remap_local_usages",
2115 "Whether local usages of the linked ID should be remapped to the new "
2116 "library override of it");
2118 func =
RNA_def_function(srna,
"override_hierarchy_create",
"rna_ID_override_hierarchy_create");
2121 "Create an overridden local copy of this linked data-block, and most of its dependencies "
2122 "when it is a Collection or and Object");
2124 parm =
RNA_def_pointer(func,
"id",
"ID",
"",
"New overridden local copy of the root ID");
2127 func,
"scene",
"Scene",
"",
"In which scene the new overrides should be instantiated");
2133 "In which view layer the new overrides should be instantiated");
2139 "Another ID (usually an Object or Collection) used as a hint to decide where to "
2140 "instantiate the new overrides");
2142 func =
RNA_def_function(srna,
"override_template_create",
"rna_ID_override_template_create");
2148 "Clear the user count of a data-block so its not saved, "
2149 "on reload the data will be removed");
2153 func,
"Replace all usage in the .blend file of this ID by new given one");
2161 "Make this datablock local, return local one "
2162 "(may be a copy of the original, in case it is also indirectly used)");
2164 parm =
RNA_def_boolean(func,
"clear_proxy",
true,
"",
"Deprecated, has no effect");
2165 parm =
RNA_def_pointer(func,
"id",
"ID",
"",
"This ID, or the new ID if it was copied");
2170 "Count the number of times that ID uses/references given one");
2179 "Number of usages/references of given id by current data-block",
2184 func =
RNA_def_function(srna,
"animation_data_create",
"rna_ID_animation_data_create");
2187 func,
"Create animation data to this ID, note that not all ID types support this");
2188 parm =
RNA_def_pointer(func,
"anim_data",
"AnimData",
"",
"New animation data or NULL");
2191 func =
RNA_def_function(srna,
"animation_data_clear",
"rna_ID_animation_data_free");
2198 "Tag the ID to update its display data, "
2199 "e.g. when calling :class:`bpy.types.Scene.update`");
2200 RNA_def_enum_flag(func,
"refresh", update_flag_items, 0,
"",
"Type of updates to perform");
2202 func =
RNA_def_function(srna,
"preview_ensure",
"BKE_previewimg_id_ensure");
2204 "Ensure that this ID has preview data (if ID type supports it)");
2206 func,
"preview_image",
"ImagePreview",
"",
"The existing or created preview");
2245 "Version of Blender the library .blend was saved with",
2265 "LibraryWeakReference",
2266 "Read-only external reference to a linked data-block and its library file");
2279 "Full ID name in the library .blend file (including the two leading 'id type' chars)");
2302 srna,
"Unknown Type",
"Stub RNA type used for pointers to unknown or internal data");
void BKE_animdata_free(struct ID *id, bool do_id_user)
bool id_can_have_animdata(const struct ID *id)
struct AnimData * BKE_animdata_ensure_id(struct ID *id)
struct PreviewImage * BKE_previewimg_id_ensure(struct ID *id)
void BKE_previewimg_ensure(struct PreviewImage *prv, int size)
void BKE_previewimg_clear(struct PreviewImage *prv)
void BKE_previewimg_clear_single(struct PreviewImage *prv, enum eIconSizes size)
struct PreviewImage * BKE_previewimg_id_get(const struct ID *id)
int BKE_icon_preview_ensure(struct ID *id, struct PreviewImage *preview)
#define IDP_IDPArray(prop)
struct ID * BKE_id_copy(struct Main *bmain, const struct ID *id)
void BKE_id_newptr_and_tag_clear(struct ID *id)
void BKE_main_id_tag_all(struct Main *mainvar, int tag, bool value)
void id_us_min(struct ID *id)
void id_fake_user_set(struct ID *id)
void id_us_ensure_real(struct ID *id)
void id_us_clear_real(struct ID *id)
bool BKE_id_is_in_global_main(struct ID *id)
void BKE_id_full_name_get(char name[MAX_ID_FULL_NAME], const struct ID *id, char separator_char)
bool BKE_lib_id_make_local(struct Main *bmain, struct ID *id, int flags)
void BKE_id_delete(struct Main *bmain, void *idv) ATTR_NONNULL()
void BLI_libblock_ensure_unique_name(struct Main *bmain, const char *name) ATTR_NONNULL()
void id_fake_user_clear(struct ID *id)
struct IDOverrideLibraryProperty * BKE_lib_override_library_property_get(struct IDOverrideLibrary *override, const char *rna_path, bool *r_created)
bool BKE_lib_override_library_template_create(struct ID *id)
bool BKE_lib_override_library_create(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, struct Library *owner_library, struct ID *id_root_reference, struct ID *id_hierarchy_root_reference, struct ID *id_instance_hint, struct ID **r_id_root_override, const bool do_fully_editable)
void BKE_lib_override_library_id_hierarchy_reset(struct Main *bmain, struct ID *id_root, bool do_reset_system_override)
struct IDOverrideLibraryPropertyOperation * BKE_lib_override_library_property_operation_get(struct IDOverrideLibraryProperty *override_property, short operation, const char *subitem_refname, const char *subitem_locname, int subitem_refindex, int subitem_locindex, bool strict, bool *r_strict, bool *r_created)
void BKE_lib_override_library_delete(struct Main *bmain, struct ID *id_root)
void BKE_lib_override_library_property_operation_delete(struct IDOverrideLibraryProperty *override_property, struct IDOverrideLibraryPropertyOperation *override_property_operation)
void BKE_lib_override_library_id_reset(struct Main *bmain, struct ID *id_root, bool do_reset_system_override)
struct ID * BKE_lib_override_library_create_from_id(struct Main *bmain, struct ID *reference_id, bool do_tagged_remap)
void BKE_lib_override_library_property_delete(struct IDOverrideLibrary *override, struct IDOverrideLibraryProperty *override_property)
bool BKE_lib_override_library_operations_create(struct Main *bmain, struct ID *local)
@ ID_REMAP_SKIP_NEVER_NULL_USAGE
@ ID_REMAP_SKIP_INDIRECT_USAGE
void void BKE_libblock_remap(struct Main *bmain, void *old_idv, void *new_idv, short remap_flags) ATTR_NONNULL(1
void BKE_library_filepath_set(struct Main *bmain, struct Library *lib, const char *filepath)
void BKE_main_namemap_remove_name(struct Main *bmain, struct ID *id, const char *name) ATTR_NONNULL()
General operations, lookup, etc. for materials.
void BKE_id_material_assign(struct Main *bmain, struct ID *id, struct Material *ma, short act)
void BKE_id_material_append(struct Main *bmain, struct ID *id, struct Material *ma)
short * BKE_id_material_len_p(struct ID *id)
struct Material * BKE_id_material_pop(struct Main *bmain, struct ID *id, int index)
void BKE_id_material_clear(struct Main *bmain, struct ID *id)
General operations, lookup, etc. for blender objects.
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_vfont_to_curve(struct Object *ob, int mode)
bool BKE_vfont_is_builtin(const struct VFont *vfont)
void BLI_kdtree_nd_() free(KDTree *tree)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
size_t BLI_strnlen(const char *str, size_t maxlen) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL(1
#define BPy_BEGIN_ALLOW_THREADS
#define BPy_END_ALLOW_THREADS
struct Depsgraph Depsgraph
void DEG_id_tag_update_ex(struct Main *bmain, struct ID *id, int flag)
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
struct ID * DEG_get_evaluated_id(const struct Depsgraph *depsgraph, struct ID *id)
struct ID * DEG_get_original_id(struct ID *id)
ID and Library types, which are fundamental for sdna.
@ IDOVERRIDE_LIBRARY_FLAG_LOCKED
@ IDOVERRIDE_LIBRARY_FLAG_MANDATORY
#define ID_IS_OVERRIDE_LIBRARY_REAL(_id)
#define ID_IS_OVERRIDABLE_LIBRARY(_id)
#define FILTER_ID_CU_LEGACY
#define ID_IS_LINKED(_id)
@ IDOVERRIDE_LIBRARY_OP_MULTIPLY
@ IDOVERRIDE_LIBRARY_OP_INSERT_AFTER
@ IDOVERRIDE_LIBRARY_OP_NOOP
@ IDOVERRIDE_LIBRARY_OP_SUBTRACT
@ IDOVERRIDE_LIBRARY_OP_ADD
@ IDOVERRIDE_LIBRARY_OP_INSERT_BEFORE
@ IDOVERRIDE_LIBRARY_OP_REPLACE
#define ID_IS_OVERRIDE_LIBRARY(_id)
struct IDProperty IDProperty
@ IDOVERRIDE_LIBRARY_FLAG_NO_HIERARCHY
@ IDOVERRIDE_LIBRARY_FLAG_SYSTEM_DEFINED
Object is a sort of wrapper for general info.
bool ED_asset_clear_id(struct ID *id)
bool ED_asset_mark_id(struct ID *id)
void ED_asset_generate_preview(const struct bContext *C, struct ID *id)
_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
short RNA_type_to_ID_code(const StructRNA *type)
StructRNA * ID_code_to_RNA_type(short idcode)
#define RNA_MAX_ARRAY_DIMENSION
void(* StructFreeFunc)(void *data)
int(* StructValidateFunc)(struct PointerRNA *ptr, void *data, int *have_function)
@ STRUCT_NO_DATABLOCK_IDPROPERTIES
int(* StructCallbackFunc)(struct bContext *C, struct PointerRNA *ptr, struct FunctionRNA *func, ParameterList *list)
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
@ PROPOVERRIDE_NO_COMPARISON
#define ND_LIB_OVERRIDE_CHANGED
return(oflags[bm->toolflag_index].f &oflag) !=0
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
const Depsgraph * depsgraph
void *(* MEM_callocN)(size_t len, const char *str)
MINLINE unsigned char unit_float_to_uchar_clamp(float val)
T length(const vec_base< T, Size > &a)
static void rna_def_ID_override_library(BlenderRNA *brna)
static const EnumPropertyItem rna_enum_override_library_property_operation_items[]
static void rna_def_ID_override_library_property_operation(BlenderRNA *brna)
static void rna_def_ID_override_library_property(BlenderRNA *brna)
const EnumPropertyItem rna_enum_id_type_items[]
static void rna_def_ID_override_library_properties(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_ID(BlenderRNA *brna)
const struct IDFilterEnumPropertyItem rna_enum_id_type_filter_items[]
static void rna_def_ID(BlenderRNA *brna)
static void rna_def_library_weak_reference(BlenderRNA *brna)
static void rna_def_ID_properties(BlenderRNA *brna)
static void rna_def_idproperty_wrap_ptr(BlenderRNA *brna)
static void rna_def_image_preview(BlenderRNA *brna)
static void rna_def_library(BlenderRNA *brna)
static void rna_def_ID_override_library_property_operations(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_ID_materials(BlenderRNA *brna)
const char * RNA_struct_identifier(const StructRNA *type)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
void rna_iterator_array_begin(CollectionPropertyIterator *iter, void *ptr, int itemsize, int length, bool free_ptr, IteratorSkipFunc skip)
PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *data)
const StructRNA * RNA_struct_base_child_of(const StructRNA *type, const StructRNA *parent_type)
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_enum_flag(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int 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_struct_flag(StructRNA *srna, int flag)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
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_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)
void RNA_def_struct_register_funcs(StructRNA *srna, const char *reg, const char *unreg, const char *instance)
void RNA_def_property_dynamic_array_funcs(PropertyRNA *prop, const char *getlength)
void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[])
StructRNA * RNA_def_struct_ptr(BlenderRNA *brna, const char *identifier, StructRNA *srnafrom)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
PropertyRNA * RNA_def_int_vector(StructOrFunctionRNA *cont_, const char *identifier, int len, const int *default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
void RNA_def_struct_name_property(struct StructRNA *srna, struct PropertyRNA *prop)
void RNA_def_function_flag(FunctionRNA *func, int flag)
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)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
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_struct_free(BlenderRNA *brna, StructRNA *srna)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_struct_idprops_func(StructRNA *srna, const char *idproperties)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
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)
void RNA_def_property_subtype(PropertyRNA *prop, PropertySubType subtype)
PropertyRNA * RNA_def_collection(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
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_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void rna_PropertyGroup_unregister(struct Main *bmain, struct StructRNA *type)
void rna_ID_name_set(struct PointerRNA *ptr, const char *value)
int rna_ID_name_length(struct PointerRNA *ptr)
struct StructRNA * rna_PropertyGroup_register(struct Main *bmain, struct ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
int rna_IDMaterials_assign_int(struct PointerRNA *ptr, int key, const struct PointerRNA *assign_ptr)
struct StructRNA * rna_ID_refine(struct PointerRNA *ptr)
struct IDProperty ** rna_PropertyGroup_idprops(struct PointerRNA *ptr)
struct StructRNA * rna_PropertyGroup_refine(struct PointerRNA *ptr)
StructRNA RNA_PropertyGroup
void rna_ID_name_get(struct PointerRNA *ptr, char *value)
void rna_ID_fake_user_set(struct PointerRNA *ptr, bool value)
struct IDProperty ** rna_ID_idprops(struct PointerRNA *ptr)
void ** rna_ID_instance(PointerRNA *ptr)
char * subitem_local_name
char * subitem_reference_name
IDOverrideLibrary * override_library
void WM_main_add_notifier(unsigned int type, void *reference)
void WM_lib_reload(Library *lib, bContext *C, ReportList *reports)