40 {
OB_MODE_OBJECT,
"OBJECT", ICON_OBJECT_DATAMODE,
"Object Mode",
""},
41 {
OB_MODE_EDIT,
"EDIT", ICON_EDITMODE_HLT,
"Edit Mode",
""},
43 {
OB_MODE_SCULPT,
"SCULPT", ICON_SCULPTMODE_HLT,
"Sculpt Mode",
""},
52 "Edit Grease Pencil Strokes"},
54 "SCULPT_GREASE_PENCIL",
57 "Sculpt Grease Pencil Strokes"},
59 "PAINT_GREASE_PENCIL",
62 "Paint Grease Pencil Strokes"},
64 "WEIGHT_GREASE_PENCIL",
67 "Grease Pencil Weight Paint Strokes"},
69 "VERTEX_GREASE_PENCIL",
72 "Grease Pencil Vertex Paint Strokes"},
74 {0,
nullptr, 0,
nullptr,
nullptr},
78 {
OB_MODE_OBJECT,
"OBJECT", ICON_OBJECT_DATAMODE,
"Object Mode",
""},
79 {
OB_MODE_EDIT,
"EDIT", ICON_EDITMODE_HLT,
"Edit Mode",
""},
81 {
OB_MODE_SCULPT,
"SCULPT", ICON_SCULPTMODE_HLT,
"Sculpt Mode",
""},
89 "Grease Pencil Edit Mode",
90 "Edit Grease Pencil Strokes"},
92 "SCULPT_GREASE_PENCIL",
94 "Grease Pencil Sculpt Mode",
95 "Sculpt Grease Pencil Strokes"},
97 "PAINT_GREASE_PENCIL",
100 "Paint Grease Pencil Strokes"},
102 "VERTEX_GREASE_PENCIL",
104 "Grease Pencil Vertex Paint",
105 "Grease Pencil Vertex Paint Strokes"},
107 "WEIGHT_GREASE_PENCIL",
109 "Grease Pencil Weight Paint",
110 "Grease Pencil Weight Paint Strokes"},
111 {0,
nullptr, 0,
nullptr,
nullptr},
115 {
OB_PLAINAXES,
"PLAIN_AXES", ICON_EMPTY_AXIS,
"Plain Axes",
""},
116 {
OB_ARROWS,
"ARROWS", ICON_EMPTY_ARROWS,
"Arrows",
""},
117 {
OB_SINGLE_ARROW,
"SINGLE_ARROW", ICON_EMPTY_SINGLE_ARROW,
"Single Arrow",
""},
118 {
OB_CIRCLE,
"CIRCLE", ICON_MESH_CIRCLE,
"Circle",
""},
119 {
OB_CUBE,
"CUBE", ICON_CUBE,
"Cube",
""},
123 {0,
nullptr, 0,
nullptr,
nullptr},
130 {0,
nullptr, 0,
nullptr,
nullptr},
134 {
GP_EMPTY,
"EMPTY", ICON_EMPTY_AXIS,
"Blank",
"Create an empty Grease Pencil object"},
135 {
GP_STROKE,
"STROKE", ICON_STROKE,
"Stroke",
"Create a simple stroke with basic colors"},
136 {
GP_MONKEY,
"MONKEY", ICON_MONKEY,
"Monkey",
"Construct a Suzanne Grease Pencil object"},
142 "Quickly set up Line Art for the entire scene"},
144 "LINEART_COLLECTION",
145 ICON_OUTLINER_COLLECTION,
146 "Collection Line Art",
147 "Quickly set up Line Art for the active collection"},
152 "Quickly set up Line Art for the active object"},
153 {0,
nullptr, 0,
nullptr,
nullptr}};
156 {
PAROBJECT,
"OBJECT", 0,
"Object",
"The object is parented to an object"},
157 {
PARSKEL,
"ARMATURE", 0,
"Armature",
""},
159 {
PARSKEL,
"LATTICE", 0,
"Lattice",
"The object is parented to a lattice"},
160 {
PARVERT1,
"VERTEX", 0,
"Vertex",
"The object is parented to a vertex"},
161 {
PARVERT3,
"VERTEX_3", 0,
"3 Vertices",
""},
162 {
PARBONE,
"BONE", 0,
"Bone",
"The object is parented to a bone"},
163 {0,
nullptr, 0,
nullptr,
nullptr},
166#define INSTANCE_ITEMS_SHARED \
167 {0, "NONE", 0, "None", ""}, \
168 {OB_DUPLIVERTS, "VERTS", 0, "Vertices", "Instantiate child objects on all vertices"}, \
169 {OB_DUPLIFACES, "FACES", 0, "Faces", "Instantiate child objects on all faces"}
171#define INSTANCE_ITEM_COLLECTION \
172 {OB_DUPLICOLLECTION, "COLLECTION", 0, "Collection", "Enable collection instancing"}
176 {0,
nullptr, 0,
nullptr,
nullptr},
179static EnumPropertyItem instance_items_nogroup[] = {
181 {0,
nullptr, 0,
nullptr,
nullptr},
185 {0,
"NONE", 0,
"None",
""},
187 {0,
nullptr, 0,
nullptr,
nullptr},
191 {0,
"NONE", 0,
"None",
""},
192 {
OB_DUPLIVERTS,
"VERTS", 0,
"Vertices",
"Use Object Font on characters"},
193 {0,
nullptr, 0,
nullptr,
nullptr},
196#undef INSTANCE_ITEMS_SHARED
197#undef INSTANCE_ITEM_COLLECTION
200 {
MB_BALL,
"BALL", ICON_META_BALL,
"Ball",
""},
201 {
MB_TUBE,
"CAPSULE", ICON_META_CAPSULE,
"Capsule",
""},
202 {
MB_PLANE,
"PLANE", ICON_META_PLANE,
"Plane",
""},
204 {
MB_ELLIPSOID,
"ELLIPSOID", ICON_META_ELLIPSOID,
"Ellipsoid",
""},
205 {
MB_CUBE,
"CUBE", ICON_META_CUBE,
"Cube",
""},
206 {0,
nullptr, 0,
nullptr,
nullptr},
213 {0,
nullptr, 0,
nullptr,
nullptr},
217#define OBTYPE_CU_CURVE {OB_CURVES_LEGACY, "CURVE", ICON_OUTLINER_OB_CURVE, "Curve", ""}
218#define OBTYPE_CU_SURF {OB_SURF, "SURFACE", ICON_OUTLINER_OB_SURFACE, "Surface", ""}
219#define OBTYPE_CU_FONT {OB_FONT, "FONT", ICON_OUTLINER_OB_FONT, "Text", ""}
222 {
OB_MESH,
"MESH", ICON_OUTLINER_OB_MESH,
"Mesh",
""},
225 {
OB_MBALL,
"META", ICON_OUTLINER_OB_META,
"Metaball",
""},
227 {
OB_CURVES,
"CURVES", ICON_OUTLINER_OB_CURVES,
"Hair Curves",
""},
228 {
OB_POINTCLOUD,
"POINTCLOUD", ICON_OUTLINER_OB_POINTCLOUD,
"Point Cloud",
""},
229 {
OB_VOLUME,
"VOLUME", ICON_OUTLINER_OB_VOLUME,
"Volume",
""},
230 {
OB_GREASE_PENCIL,
"GREASEPENCIL", ICON_OUTLINER_OB_GREASEPENCIL,
"Grease Pencil",
""},
232 {
OB_ARMATURE,
"ARMATURE", ICON_OUTLINER_OB_ARMATURE,
"Armature",
""},
233 {
OB_LATTICE,
"LATTICE", ICON_OUTLINER_OB_LATTICE,
"Lattice",
""},
235 {
OB_EMPTY,
"EMPTY", ICON_OUTLINER_OB_EMPTY,
"Empty",
""},
237 {
OB_LAMP,
"LIGHT", ICON_OUTLINER_OB_LIGHT,
"Light",
""},
238 {
OB_LIGHTPROBE,
"LIGHT_PROBE", ICON_OUTLINER_OB_LIGHTPROBE,
"Light Probe",
""},
240 {
OB_CAMERA,
"CAMERA", ICON_OUTLINER_OB_CAMERA,
"Camera",
""},
242 {
OB_SPEAKER,
"SPEAKER", ICON_OUTLINER_OB_SPEAKER,
"Speaker",
""},
243 {0,
nullptr, 0,
nullptr,
nullptr},
250 {0,
nullptr, 0,
nullptr,
nullptr},
254 {
ROT_MODE_QUAT,
"QUATERNION", 0,
"Quaternion (WXYZ)",
"No Gimbal Lock"},
255 {
ROT_MODE_XYZ,
"XYZ", 0,
"XYZ Euler",
"XYZ Rotation Order - prone to Gimbal Lock (default)"},
256 {
ROT_MODE_XZY,
"XZY", 0,
"XZY Euler",
"XZY Rotation Order - prone to Gimbal Lock"},
257 {
ROT_MODE_YXZ,
"YXZ", 0,
"YXZ Euler",
"YXZ Rotation Order - prone to Gimbal Lock"},
258 {
ROT_MODE_YZX,
"YZX", 0,
"YZX Euler",
"YZX Rotation Order - prone to Gimbal Lock"},
259 {
ROT_MODE_ZXY,
"ZXY", 0,
"ZXY Euler",
"ZXY Rotation Order - prone to Gimbal Lock"},
260 {
ROT_MODE_ZYX,
"ZYX", 0,
"ZYX Euler",
"ZYX Rotation Order - prone to Gimbal Lock"},
265 "Axis Angle (W+XYZ), defines a rotation around some axis defined by 3D-Vector"},
266 {0,
nullptr, 0,
nullptr,
nullptr},
270 {
OB_POSX,
"POS_X", 0,
"+X",
""},
271 {
OB_POSY,
"POS_Y", 0,
"+Y",
""},
272 {
OB_POSZ,
"POS_Z", 0,
"+Z",
""},
273 {
OB_NEGX,
"NEG_X", 0,
"-X",
""},
274 {
OB_NEGY,
"NEG_Y", 0,
"-Y",
""},
275 {
OB_NEGZ,
"NEG_Z", 0,
"-Z",
""},
276 {0,
nullptr, 0,
nullptr,
nullptr},
280 {
OB_POSX,
"POS_X", 0,
"-X to +X",
""},
281 {
OB_POSY,
"POS_Y", 0,
"-Y to +Y",
""},
282 {
OB_POSZ,
"POS_Z", 0,
"-Z to +Z",
""},
283 {
OB_NEGX,
"NEG_X", 0,
"+X to -X",
""},
284 {
OB_NEGY,
"NEG_Y", 0,
"+Y to -Y",
""},
285 {
OB_NEGZ,
"NEG_Z", 0,
"+Z to -Z",
""},
286 {0,
nullptr, 0,
nullptr,
nullptr},
295# include <fmt/format.h>
370 rna_Object_internal_update(bmain, scene, ptr);
382static void rna_Object_duplicator_visibility_flag_update(
Main * ,
394 GreasePencil *grease_pencil = id_cast<GreasePencil *>(ob->data);
400static void rna_Object_matrix_world_get(
PointerRNA *ptr,
float *values)
403 std::copy_n(ob->object_to_world().base_ptr(), 16, values);
406static void rna_Object_matrix_world_set(
PointerRNA *ptr,
const float *values)
409 ob->runtime->object_to_world =
float4x4(values);
412static void rna_Object_matrix_local_get(
PointerRNA *ptr,
float values[16])
418static void rna_Object_matrix_local_set(
PointerRNA *ptr,
const float values[16])
421 float local_mat[4][4];
429 mul_m4_m4m4(local_mat, invmat,
reinterpret_cast<float (*)[4]
>(
const_cast<float *
>(values)));
432 copy_m4_m4(local_mat,
reinterpret_cast<float (*)[4]
>(
const_cast<float *
>(values)));
440static void rna_Object_matrix_basis_get(
PointerRNA *ptr,
float values[16])
446static void rna_Object_matrix_basis_set(
PointerRNA *ptr,
const float values[16])
450 ob,
reinterpret_cast<float (*)[4]
>(
const_cast<float *
>(values)),
false,
false);
453void rna_Object_internal_update_data_impl(
PointerRNA *ptr)
461 rna_Object_internal_update_data_impl(ptr);
467 rna_Object_internal_update_data_impl(ptr);
478 Mesh *
mesh = id_cast<Mesh *>(ob->data);
480 int select_mode = em->selectmode;
483 em =
mesh->runtime->edit_mesh.get();
505 rna_Object_internal_update_data_impl(ptr);
510 Object *ob = id_cast<Object *>(ptr->owner_id);
520 rna_Object_internal_update_data_dependency(bmain, scene, ptr);
527 Mesh *
mesh = id_cast<Mesh *>(ob->data);
537 ID *
id =
static_cast<ID *
>(value.data);
551 "Can only assign evaluated data to evaluated object, or original data to "
620 return RNA_LightProbe;
622 return RNA_Annotation;
624 return RNA_GreasePencil;
628 return RNA_PointCloud;
646static bool rna_Object_parent_override_apply(
Main *bmain,
651 PointerRNA *ptr_storage = &rnaapply_ctx.ptr_storage;
654 const int len_dst = rnaapply_ctx.len_src;
655 const int len_src = rnaapply_ctx.len_src;
656 const int len_storage = rnaapply_ctx.len_storage;
659 BLI_assert(len_dst == len_src && (!ptr_storage || len_dst == len_storage) && len_dst == 0);
661 "Unsupported RNA override operation on object parent pointer");
670 if (parent_src == parent_dst) {
674 if (parent_src ==
nullptr) {
679 ob->parent = parent_src;
685static void rna_Object_parent_type_set(
PointerRNA *ptr,
int value)
698static bool rna_Object_parent_type_override_apply(
Main *bmain,
703 PointerRNA *ptr_storage = &rnaapply_ctx.ptr_storage;
706 const int len_dst = rnaapply_ctx.len_src;
707 const int len_src = rnaapply_ctx.len_src;
708 const int len_storage = rnaapply_ctx.len_storage;
711 BLI_assert(len_dst == len_src && (!ptr_storage || len_dst == len_storage) && len_dst == 0);
713 "Unsupported RNA override operation on object parent pointer");
722 if (parent_type_dst == parent_type_src) {
767static void rna_Object_empty_display_type_set(
PointerRNA *ptr,
int value)
774static void rna_Object_parent_bone_set(
PointerRNA *ptr,
const char *value)
781static bool rna_Object_parent_bone_override_apply(
Main *bmain,
786 PointerRNA *ptr_storage = &rnaapply_ctx.ptr_storage;
789 const int len_dst = rnaapply_ctx.len_src;
790 const int len_src = rnaapply_ctx.len_src;
791 const int len_storage = rnaapply_ctx.len_storage;
794 BLI_assert(len_dst == len_src && (!ptr_storage || len_dst == len_storage) && len_dst == 0);
796 "Unsupported RNA override operation on object parent bone property");
807 if (
STREQ(parent_bone_src, parent_bone_dst)) {
811 STRNCPY(ob->parsubstr, parent_bone_src);
825 item = instance_items_empty;
828 item = instance_items_font;
831 item = instance_items_nogroup;
837static void rna_Object_dup_collection_set(
PointerRNA *ptr,
848 id_us_min(id_cast<ID *>(ob->instance_collection));
849 ob->instance_collection = grp;
859 "Cannot set instance-collection as object belongs (directly or indirectly) in "
860 "collection being instanced, thus causing a dependency cycle");
868 rna_Object_internal_update_data_impl(ptr);
880 iter->valid = defbase !=
nullptr;
885static void rna_VertexGroup_name_set(
PointerRNA *ptr,
const char *value)
896static int rna_VertexGroup_index_get(
PointerRNA *ptr)
920static void rna_Object_active_vertex_group_set(
PointerRNA *ptr,
935 "VertexGroup '%s' not found in object '%s'",
944static int rna_Object_active_vertex_group_index_get(
PointerRNA *ptr)
954static void rna_Object_active_vertex_group_index_set(
PointerRNA *ptr,
int value)
964static void rna_Object_active_vertex_group_index_range(
990 strcpy(value, dg->name);
1006 return (dg) ? strlen(dg->name) : 0;
1011 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1025 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1046 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1050 mesh = id_cast<Mesh *>(ob->data);
1052 if (
mesh->uv_map_names().contains(value)) {
1066 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1072 mesh = id_cast<Mesh *>(ob->data);
1074 for (a = 0; a <
mesh->fdata_legacy.totlayer; a++) {
1087static int rna_Object_active_material_index_get(
PointerRNA *ptr)
1089 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1090 return std::max<int>(ob->actcol - 1, 0);
1093static void rna_Object_active_material_index_set(
PointerRNA *ptr,
int value)
1095 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1097 value = std::max(std::min(value, ob->totcol - 1), 0);
1098 ob->actcol = value + 1;
1101 Mesh *
mesh = id_cast<Mesh *>(ob->data);
1103 if (
mesh->runtime->edit_mesh) {
1104 mesh->runtime->edit_mesh->mat_nr = value;
1109static void rna_Object_active_material_index_range(
1112 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1120 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1127static void rna_Object_active_material_set(
PointerRNA *ptr,
1131 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1140static int rna_Object_active_material_editable(
const PointerRNA *ptr,
const char ** )
1142 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1145 if ((ob->matbits ==
nullptr) || (ob->actcol == 0) || ob->matbits[ob->actcol - 1]) {
1155static void rna_Object_active_particle_system_index_range(
1158 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1160 *
max =
max_ii(0, ob->particlesystem.count() - 1);
1163static int rna_Object_active_particle_system_index_get(
PointerRNA *ptr)
1165 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1169static void rna_Object_active_particle_system_index_set(
PointerRNA *ptr,
int value)
1171 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1179 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1188static void rna_Object_rotation_axis_angle_get(
PointerRNA *ptr,
float *value)
1193 value[0] = ob->rotAngle;
1198static void rna_Object_rotation_axis_angle_set(
PointerRNA *ptr,
const float *value)
1203 ob->rotAngle = value[0];
1209static void rna_Object_rotation_mode_set(
PointerRNA *ptr,
int value)
1225static void rna_Object_convert_rotation_mode(
Object *ob,
1227 const short rotation_mode,
1230 if (rotation_mode < ROT_MODE_MIN || rotation_mode >
ROT_MODE_MAX) {
1238static void rna_Object_dimensions_get(
PointerRNA *ptr,
float *value)
1244static void rna_Object_dimensions_set(
PointerRNA *ptr,
const float *value)
1250static int rna_Object_location_editable(
const PointerRNA *ptr,
int index)
1288static int rna_Object_rotation_euler_editable(
const PointerRNA *ptr,
int index)
1307static int rna_Object_rotation_4d_editable(
const PointerRNA *ptr,
int index)
1331static int rna_MaterialSlot_index(
const PointerRNA *ptr)
1337static int rna_MaterialSlot_index_get(
PointerRNA *ptr)
1339 return rna_MaterialSlot_index(ptr);
1342static int rna_MaterialSlot_material_editable(
const PointerRNA *ptr,
const char ** )
1344 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1345 const int index = rna_MaterialSlot_index(ptr);
1348 if ((ob->matbits ==
nullptr) || ob->matbits[
index]) {
1360 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1362 const int index = rna_MaterialSlot_index(ptr);
1373static void rna_MaterialSlot_material_set(
PointerRNA *ptr,
1377 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1378 int index = rna_MaterialSlot_index(ptr);
1388 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1393 return (ma->gp_style !=
nullptr);
1397 return (ma->gp_style ==
nullptr);
1401static int rna_MaterialSlot_link_get(
PointerRNA *ptr)
1403 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1404 int index = rna_MaterialSlot_index(ptr);
1405 if (index < ob->totcol) {
1406 return ob->matbits[
index] != 0;
1411static void rna_MaterialSlot_link_set(
PointerRNA *ptr,
int value)
1413 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1414 int index = rna_MaterialSlot_index(ptr);
1417 ob->matbits[
index] = 1;
1422 ob->matbits[
index] = 0;
1428static int rna_MaterialSlot_name_length(
PointerRNA *ptr)
1430 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1432 int index = rna_MaterialSlot_index(ptr);
1437 return strlen(ma->id.name + 2);
1443static void rna_MaterialSlot_name_get(
PointerRNA *ptr,
char *value)
1445 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1447 int index = rna_MaterialSlot_index(ptr);
1452 strcpy(value, ma->id.name + 2);
1461 rna_Object_internal_update(bmain, scene, ptr);
1468static std::optional<std::string> rna_MaterialSlot_path(
const PointerRNA *ptr)
1470 int index = rna_MaterialSlot_index(ptr);
1471 return fmt::format(
"material_slots[{}]",
index);
1474static int rna_Object_material_slots_length(
PointerRNA *ptr)
1476 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1487 const int length = rna_Object_material_slots_length(ptr);
1488 iter->parent = *ptr;
1489 iter->internal.count.item = 0;
1490 iter->internal.count.ptr = ptr->owner_id;
1491 iter->valid =
length > 0;
1496 const int length = rna_Object_material_slots_length(&iter->ptr);
1497 iter->internal.count.item++;
1498 iter->valid = iter->internal.count.item <
length;
1503 ID *
id =
static_cast<ID *
>(iter->internal.count.ptr);
1508 (
void *)(iter->internal.count.item +
uintptr_t(
id)));
1519static std::optional<std::string> rna_ObjectDisplay_path(
const PointerRNA * )
1526 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1531static void rna_Object_active_shape_key_index_range(
1534 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1539 *
max = key->block.count() - 1;
1549static int rna_Object_active_shape_key_index_get(
PointerRNA *ptr)
1551 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1553 return std::max<int>(ob->shapenr - 1, 0);
1556static void rna_Object_active_shape_key_index_set(
PointerRNA *ptr,
int value)
1558 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1560 ob->shapenr = value + 1;
1565 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1569 if (key ==
nullptr) {
1580 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1587 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1598 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1603static void rna_Object_active_constraint_set(
PointerRNA *ptr,
1607 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1627static void rna_Object_constraints_remove(
Object *
object,
1636 "Constraint '%s' not found in object '%s'",
1643 con_ptr->invalidate();
1650static void rna_Object_constraints_clear(
Object *
object,
Main *bmain)
1660static void rna_Object_constraints_move(
1668 BKE_reportf(reports,
RPT_ERROR,
"Could not move constraint from index '%d' to '%d'", from, to);
1688bool rna_Object_constraints_override_apply(
Main *bmain,
1697 "Unsupported RNA override operation on constraints collection");
1699 Object *ob_dst =
reinterpret_cast<Object *
>(ptr_dst->owner_id);
1700 Object *ob_src =
reinterpret_cast<Object *
>(ptr_src->owner_id);
1708 opop->subitem_reference_name,
1710 opop->subitem_reference_index));
1714 &ob_src->constraints, opop->subitem_local_name, name_offset, opop->subitem_local_index));
1716 if (con_src ==
nullptr) {
1746static void rna_Object_modifier_remove(
Object *
object,
1759 md_ptr->invalidate();
1771static void rna_Object_modifier_move(
Object *
object,
ReportList *reports,
int from,
int to)
1785 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1792 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1804 reports,
RPT_ERROR,
"Modifier \"%s\" is not in the object's modifier list", md->name);
1811bool rna_Object_modifiers_override_apply(
Main *bmain,
1820 "Unsupported RNA override operation on modifiers collection");
1822 Object *ob_dst =
reinterpret_cast<Object *
>(ptr_dst->owner_id);
1823 Object *ob_src =
reinterpret_cast<Object *
>(ptr_src->owner_id);
1831 opop->subitem_reference_name,
1833 opop->subitem_reference_index));
1837 &ob_src->modifiers, opop->subitem_local_name, name_offset, opop->subitem_local_index));
1839 if (mod_src ==
nullptr) {
1848 nullptr, bmain,
nullptr, ob_dst, mod_src->name, mod_src->type);
1850 if (mod_dst ==
nullptr) {
1862 if (mod_dst ==
nullptr) {
1877 const int persistent_uid = mod_dst->persistent_uid;
1879 mod_dst->persistent_uid = persistent_uid;
1902static void rna_Object_shaderfx_remove(
Object *
object,
1913 gmd_ptr->invalidate();
1924static void rna_Object_boundbox_get(
PointerRNA *ptr,
float *values)
1926 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
1931 std::fill_n(values, 8 * 3, 0.0f);
1935static bool check_object_vgroup_support_and_warn(
const Object *ob,
1936 const char *op_name,
1940 const char *ob_type_name =
"Unknown";
1942 BKE_reportf(reports,
RPT_ERROR,
"%s is not supported for '%s' objects", op_name, ob_type_name);
1953 if (!check_object_vgroup_support_and_warn(ob,
"VertexGroups.new()", reports)) {
1965static void rna_Object_vgroup_remove(
Object *ob,
1970 if (!check_object_vgroup_support_and_warn(ob,
"VertexGroups.remove()", reports)) {
1980 "DeformGroup '%s' not in object '%s'",
1987 defgroup_ptr->invalidate();
1997 if (!check_object_vgroup_support_and_warn(ob,
"VertexGroups.clear()", reports)) {
2009static void rna_VertexGroup_vertex_add(
ID *
id,
2021 reports,
RPT_ERROR,
"VertexGroup.add(): cannot be called while object is in edit mode");
2025 while (index_num--) {
2034static void rna_VertexGroup_vertex_remove(
2041 reports,
RPT_ERROR,
"VertexGroup.remove(): cannot be called while object is in edit mode");
2045 while (index_num--) {
2081 return (
reinterpret_cast<Object *
>(value.owner_id))->type ==
OB_MESH;
2086 return (
reinterpret_cast<Object *
>(value.owner_id))->type ==
OB_CAMERA;
2091 return (
reinterpret_cast<Object *
>(value.owner_id))->type ==
OB_LAMP;
2094bool rna_Object_use_dynamic_topology_sculpting_get(
PointerRNA *ptr)
2105static std::optional<std::string> rna_ObjectLineArt_path(
const PointerRNA * )
2112 const Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
2117 const Mesh *
mesh = id_cast<Mesh *>(ob->data);
2121static bool rna_Object_mesh_symmetry_x_get(
PointerRNA *ptr)
2126static bool rna_Object_mesh_symmetry_y_get(
PointerRNA *ptr)
2131static bool rna_Object_mesh_symmetry_z_get(
PointerRNA *ptr)
2136static void mesh_symmetry_set_common(
PointerRNA *ptr,
2140 Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
2145 Mesh *
mesh = id_cast<Mesh *>(ob->data);
2150 mesh->symmetry &= ~sym;
2154static void rna_Object_mesh_symmetry_x_set(
PointerRNA *ptr,
bool value)
2159static void rna_Object_mesh_symmetry_y_set(
PointerRNA *ptr,
bool value)
2164static void rna_Object_mesh_symmetry_z_set(
PointerRNA *ptr,
bool value)
2169static int rna_Object_mesh_symmetry_yz_editable(
const PointerRNA *ptr,
const char ** )
2171 const Object *ob =
reinterpret_cast<Object *
>(ptr->owner_id);
2176 const Mesh *
mesh = id_cast<Mesh *>(ob->data);
2185void rna_Object_lightgroup_get(
PointerRNA *ptr,
char *value)
2188 char value_buf[
sizeof(lgm->name)];
2190 memcpy(value, value_buf,
len + 1);
2193int rna_Object_lightgroup_length(
PointerRNA *ptr)
2199void rna_Object_lightgroup_set(
PointerRNA *ptr,
const char *value)
2209static std::optional<std::string> rna_ObjectLightLinking_path(
const PointerRNA * )
2211 return "light_linking";
2214bool rna_Object_light_linking_override_apply(
Main *bmain,
2226 PointerRNA *ptr_storage = &rnaapply_ctx.ptr_storage;
2227 const int len_dst = rnaapply_ctx.len_src;
2228 const int len_src = rnaapply_ctx.len_src;
2229 const int len_storage = rnaapply_ctx.len_storage;
2232 BLI_assert(len_dst == len_src && (!ptr_storage || len_dst == len_storage) && len_dst == 0);
2234 "Unsupported RNA override operation on object light linking pointer");
2240 Object *ob_dst = id_cast<Object *>(ptr_dst->owner_id);
2241 Object *ob_src = id_cast<Object *>(ptr_src->owner_id);
2243 if (ob_dst->light_linking ==
nullptr && ob_src->light_linking ==
nullptr) {
2248 if (ob_dst->light_linking ==
nullptr && ob_src->light_linking !=
nullptr) {
2253 else if (ob_dst->light_linking !=
nullptr && ob_src->light_linking ==
nullptr) {
2259 BLI_assert(ob_dst->light_linking !=
nullptr && ob_src->light_linking !=
nullptr);
2271 if (ob_src->light_linking->receiver_collection !=
nullptr) {
2272 id_us_min(id_cast<ID *>(ob_dst->light_linking->receiver_collection));
2273 ob_dst->light_linking->receiver_collection = ob_src->light_linking->receiver_collection;
2274 id_us_plus(id_cast<ID *>(ob_dst->light_linking->receiver_collection));
2276 if (ob_src->light_linking->blocker_collection !=
nullptr) {
2277 id_us_min(id_cast<ID *>(ob_dst->light_linking->blocker_collection));
2278 ob_dst->light_linking->blocker_collection = ob_src->light_linking->blocker_collection;
2279 id_us_plus(id_cast<ID *>(ob_dst->light_linking->blocker_collection));
2295 Object *
object =
reinterpret_cast<Object *
>(ptr->owner_id);
2298 return collection_ptr;
2301static void rna_LightLinking_receiver_collection_set(
PointerRNA *ptr,
2305 Object *
object =
reinterpret_cast<Object *
>(ptr->owner_id);
2313 Object *
object =
reinterpret_cast<Object *
>(ptr->owner_id);
2316 return collection_ptr;
2319static void rna_LightLinking_blocker_collection_set(
PointerRNA *ptr,
2323 Object *
object =
reinterpret_cast<Object *
>(ptr->owner_id);
2354 {0,
nullptr, 0,
nullptr,
nullptr},
2360 srna,
"Vertex Group",
"Group of vertices, used for armature deform and other purposes");
2386 parm =
RNA_def_int_array(func,
"index", 1,
nullptr, 0, 0,
"",
"List of indices", 0, 0);
2388 parm =
RNA_def_float(func,
"weight", 0, 0.0f, 1.0f,
"",
"Vertex weight", 0.0f, 1.0f);
2390 parm =
RNA_def_enum(func,
"type", assign_mode_items, 0,
"",
"Vertex assign mode");
2397 parm =
RNA_def_int_array(func,
"index", 1,
nullptr, 0, 0,
"",
"List of indices", 0, 0);
2405 parm =
RNA_def_float(func,
"weight", 0, 0.0f, 1.0f,
"",
"Vertex weight", 0.0f, 1.0f);
2415 {1,
"OBJECT", ICON_OBJECT_DATAMODE,
"Object",
""},
2416 {0,
"DATA", ICON_MESH_DATA,
"Data",
""},
2417 {0,
nullptr, 0,
nullptr,
nullptr},
2436 prop,
"rna_MaterialSlot_link_get",
"rna_MaterialSlot_link_set",
nullptr);
2445 "rna_MaterialSlot_material_get",
2446 "rna_MaterialSlot_material_set",
2448 "rna_MaterialSlot_material_poll");
2458 prop,
"rna_MaterialSlot_name_get",
"rna_MaterialSlot_name_length",
nullptr);
2487 "rna_Object_active_constraint_get",
2488 "rna_Object_active_constraint_set",
2507 "Name of the new constraint. If empty, the name of the constraint type is used");
2509 parm =
RNA_def_pointer(func,
"constraint",
"Constraint",
"",
"New constraint");
2517 parm =
RNA_def_pointer(func,
"constraint",
"Constraint",
"",
"Removed constraint");
2529 func,
"from_index", -1, INT_MIN,
INT_MAX,
"From Index",
"Index to move", 0, 10000);
2531 parm =
RNA_def_int(func,
"to_index", -1, INT_MIN,
INT_MAX,
"To Index",
"Target index", 0, 10000);
2542 "Constraint to copy - may belong to a different object");
2546 parm =
RNA_def_pointer(func,
"new_constraint",
"Constraint",
"",
"New constraint");
2573 prop,
nullptr,
"rna_Armature_act_edit_bone_set",
nullptr,
nullptr);
2583 parm =
RNA_def_string(func,
"name",
"Name", 0,
"",
"New name for the modifier");
2590 parm =
RNA_def_pointer(func,
"modifier",
"Modifier",
"",
"Newly created modifier");
2598 parm =
RNA_def_pointer(func,
"modifier",
"Modifier",
"",
"Modifier to remove");
2612 func,
"from_index", -1, INT_MIN,
INT_MAX,
"From Index",
"Index to move", 0, 10000);
2614 parm =
RNA_def_int(func,
"to_index", -1, INT_MIN,
INT_MAX,
"To Index",
"Target index", 0, 10000);
2621 prop,
"rna_Object_active_modifier_get",
"rna_Object_active_modifier_set",
nullptr,
nullptr);
2646 parm =
RNA_def_string(func,
"name",
"Name", 0,
"",
"New name for the effect");
2653 parm =
RNA_def_pointer(func,
"shader_fx",
"ShaderFx",
"",
"Newly created effect");
2661 parm =
RNA_def_pointer(func,
"shader_fx",
"ShaderFx",
"",
"Effect to remove");
2689 prop,
"rna_Object_active_particle_system_get",
nullptr,
nullptr,
nullptr);
2691 prop,
"Active Particle System",
"Active particle system being displayed");
2697 "rna_Object_active_particle_system_index_get",
2698 "rna_Object_active_particle_system_index_set",
2699 "rna_Object_active_particle_system_index_range");
2701 prop,
"Active Particle System Index",
"Index of active particle system slot");
2723 "rna_Object_active_vertex_group_get",
2724 "rna_Object_active_vertex_group_set",
2734 "rna_Object_active_vertex_group_index_get",
2735 "rna_Object_active_vertex_group_index_set",
2736 "rna_Object_active_vertex_group_index_range");
2738 prop,
"Active Vertex Group Index",
"Active index in vertex group array");
2745 RNA_def_string(func,
"name",
"Group", 0,
"",
"Vertex group name");
2746 parm =
RNA_def_pointer(func,
"group",
"VertexGroup",
"",
"New vertex group");
2753 parm =
RNA_def_pointer(func,
"group",
"VertexGroup",
"",
"Vertex group to remove");
2789 {
OBJECT_LRT_INHERIT,
"INHERIT", 0,
"Inherit",
"Use settings from the parent collection"},
2794 "Generate feature lines for this object's data"},
2799 "Only use the object data to produce occlusion"},
2804 "Don't use this object for Line Art rendering"},
2806 "INTERSECTION_ONLY",
2808 "Intersection Only",
2809 "Only generate intersection lines for this collection"},
2814 "Include this object but do not generate intersection lines"},
2816 "FORCE_INTERSECTION",
2818 "Force Intersection",
2819 "Generate intersection lines even with objects that disabled intersection"},
2820 {0,
nullptr, 0,
nullptr,
nullptr},
2838 prop,
"Use Crease",
"Use this object's crease setting to overwrite scene global");
2851 "Use Intersection Priority",
2852 "Use this object's intersection priority to override collection setting");
2858 "Intersection Priority",
2859 "The intersection line will be included into the object with the "
2860 "higher intersection priority value");
2898 prop,
"Disable in Spherical Light Probes",
"Globally disable in spherical light probes");
2904 prop,
"Disable in Planar Light Probes",
"Globally disable in planar light probes");
2911 "Disable in Surface Picking",
2912 "Disable surface influence during selection, snapping and depth-picking operators. "
2913 "Usually used to avoid semi-transparent objects to affect scene navigation");
2921 prop,
NC_OBJECT |
ND_DRAW,
"rna_Object_duplicator_visibility_flag_update");
2928 prop,
NC_OBJECT |
ND_DRAW,
"rna_Object_duplicator_visibility_flag_update");
2950 prop,
"Transmission Visibility",
"Object visibility to transmission rays");
2956 prop,
"Volume Scatter Visibility",
"Object visibility to volume scattering rays");
2970 "Render objects as a holdout or matte, creating a hole in the image with zero alpha, to "
2971 "fill out in compositing with real footage or another render");
2980 "Only render shadows and reflections on this object, for compositing renders into real "
2981 "footage. Objects with this setting are considered to already exist in the footage, "
2982 "objects without it are synthetic objects being composited into it.");
2989 "Raycast Visibility",
2990 "Object visibility to raycast rays. Implicitly false for Blended materials in EEVEE.");
3003 {0,
nullptr, 0,
nullptr,
nullptr},
3007 {
OB_BOUNDBOX,
"BOUNDS", 0,
"Bounds",
"Display the bounds of the object"},
3008 {
OB_WIRE,
"WIRE", 0,
"Wire",
"Display the object as a wireframe"},
3013 "Display the object as a solid (if solid drawing is enabled in the viewport)"},
3018 "Display the object with textures (if textures are enabled in the viewport)"},
3019 {0,
nullptr, 0,
nullptr,
nullptr},
3023 {
OB_BOUND_BOX,
"BOX", 0,
"Box",
"Display bounds as box"},
3026 {
OB_BOUND_CONE,
"CONE", 0,
"Cone",
"Display bounds as cone"},
3028 {0,
nullptr, 0,
nullptr,
nullptr},
3031 static int boundbox_dimsize[] = {8, 3};
3043 prop,
"rna_Object_data_get",
"rna_Object_data_set",
"rna_Object_data_typef",
nullptr);
3072 "Object's bounding box in object-space coordinates, all values are -1.0 when "
3087 prop,
nullptr,
"rna_Object_parent_type_set",
"rna_Object_parent_type_itemf");
3096 prop,
"Parent Vertices",
"Indices of vertices in case of a vertex parenting relation");
3104 prop,
"Parent Bone",
"Name of parent bone in case of a bone parenting relation");
3118 "Use Final Indices",
3119 "Use the final evaluated indices rather than the original mesh indices");
3126 "Camera Parent Lock",
3127 "View Lock 3D viewport camera transformation affects the object's "
3140 "Axis that points in the 'forward' direction (applies to Instance Vertices when "
3141 "Align to Vertex Normal is enabled)");
3150 "Axis that points in the upward direction (applies to Instance Vertices when "
3151 "Align to Vertex Normal is enabled)");
3160 "rna_Object_material_slots_begin",
3161 "rna_Object_material_slots_next",
3162 "rna_Object_material_slots_end",
3163 "rna_Object_material_slots_get",
3164 "rna_Object_material_slots_length",
3173 "rna_Object_active_material_get",
3174 "rna_Object_active_material_set",
3176 "rna_MaterialSlot_material_poll");
3187 "rna_Object_active_material_index_get",
3188 "rna_Object_active_material_index_set",
3189 "rna_Object_active_material_index_range");
3213 prop,
"rna_Object_rotation_axis_angle_get",
"rna_Object_rotation_axis_angle_set",
nullptr);
3217 prop,
"Axis-Angle Rotation",
"Angle of Rotation for Axis-Angle rotation representation");
3235 "The kind of rotation to apply, values from other rotation modes are not used");
3239 srna,
"convert_rotation_mode",
"rna_Object_convert_rotation_mode");
3241 func,
"Changes the rotation mode and converts all animation to match that new mode");
3248 "The rotation mode to change to");
3254 "Insert a key on every frame to ensure interpolation is preserved");
3270 prop,
"rna_Object_dimensions_get",
"rna_Object_dimensions_set",
nullptr);
3274 "Absolute bounding box dimensions of the object.\n"
3275 "Warning: Assigning to it or its members multiple consecutive times "
3276 "will not work correctly, as this needs up-to-date evaluated data");
3283 prop,
"Delta Location",
"Extra translation added to the location of the object");
3291 "Delta Rotation (Euler)",
3292 "Extra rotation added to the rotation of the object (when using Euler rotations)");
3300 "Delta Rotation (Quaternion)",
3301 "Extra rotation added to the rotation of the object (when using Quaternion rotations)");
3311 "Delta Rotation (Axis Angle)",
3312 "Extra rotation added to the rotation of the object (when using Axis-Angle rotations)");
3343 "Lock Rotation (4D Angle)",
3344 "Lock editing of 'angle' component of four-component rotations when transforming");
3350 "Lock Rotations (4D)",
3351 "Lock editing of four component rotations by components (instead of as Eulers)");
3366 prop,
"rna_Object_matrix_world_get",
"rna_Object_matrix_world_set",
nullptr);
3378 "Parent relative transformation matrix.\n"
3379 "Warning: Only takes into account object parenting, so e.g. in case of bone parenting "
3380 "you get a matrix relative to the Armature object, not to the actual parent bone");
3382 prop,
"rna_Object_matrix_local_get",
"rna_Object_matrix_local_set",
nullptr);
3392 "Matrix access to location, rotation and scale (including deltas), "
3393 "before constraints and parenting are applied");
3395 prop,
"rna_Object_matrix_basis_get",
"rna_Object_matrix_basis_set",
nullptr);
3403 prop,
"Parent Inverse Matrix",
"Inverse of object's parent matrix at time of parenting");
3410 prop,
"Modifiers",
"Modifiers affecting the geometric data of the object");
3429 prop,
"Constraints",
"Constraints affecting the transformation of the object");
3441 "constraints__remove");
3448 "rna_Object_vertex_groups_begin",
3449 "rna_iterator_listbase_next",
3450 "rna_iterator_listbase_end",
3451 "rna_iterator_listbase_get",
3474 prop,
"Empty Display Size",
"Size of display for empties in the viewport");
3489 "Parameters defining which layer, pass and frame of the image is displayed");
3495 prop,
"Empty Image Depth",
"Determine which other objects will occlude the image");
3502 prop,
"Display in Perspective Mode",
"Display image in perspective mode");
3509 prop,
"Display in Orthographic Mode",
"Display image in orthographic mode");
3516 "Display Only Axis Aligned",
3517 "Only display the image when it is aligned with the view axis");
3525 "Use alpha blending instead of alpha test (can produce sorting artifacts)");
3529 {0,
"DOUBLE_SIDED", 0,
"Both",
""},
3532 {0,
nullptr, 0,
nullptr,
nullptr},
3545 "Add Rest Position",
3546 "Add a \"rest_position\" attribute that is a copy of the position "
3547 "attribute before shape keys and modifiers are evaluated");
3554 prop,
"Pass Index",
"Index number for the \"Object Index\" render pass");
3559 prop,
"Color",
"Object color and alpha, used when the Object Color mode is enabled");
3568 prop,
"Field Settings",
"Settings for using the object as a field in physics simulation");
3575 "Collision Settings",
3576 "Settings for using the object as a collider in physics simulation");
3602 prop,
"Use Simulation Cache",
"Cache frames during simulation nodes playback");
3619 prop,
"Orient with Normals",
"Rotate instance according to vertex normal");
3683 prop,
"Display Wire",
"Display the object's wireframe over solid shading");
3700 prop,
"Display Transparent",
"Display material transparency in the object");
3718 prop,
"Solo Active Shape Key",
"Only show the active shape key at full value");
3725 prop,
"Shape Key Edit Mode",
"Display shape keys in edit mode (for meshes only)");
3734 prop,
"rna_Object_active_shape_key_get",
nullptr,
nullptr,
nullptr);
3741 "rna_Object_active_shape_key_index_get",
3742 "rna_Object_active_shape_key_index_set",
3743 "rna_Object_active_shape_key_index_range");
3784 prop,
"rna_Object_mesh_symmetry_x_get",
"rna_Object_mesh_symmetry_x_set");
3791 prop,
"rna_Object_mesh_symmetry_y_get",
"rna_Object_mesh_symmetry_y_set");
3799 prop,
"rna_Object_mesh_symmetry_z_get",
"rna_Object_mesh_symmetry_z_set");
3808 "rna_Object_lightgroup_get",
3809 "rna_Object_lightgroup_length",
3810 "rna_Object_lightgroup_set");
3822 prop,
nullptr,
nullptr,
"rna_Object_light_linking_override_apply");
3831 "Shadow Terminator Normal Offset",
3832 "Offset rays from the surface to reduce shadow terminator artifact on low poly geometry. "
3833 "Only affect triangles that are affected by the geometry offset");
3841 "Shadow Terminator Geometry Offset",
3842 "Offset rays from the surface to reduce shadow terminator artifact on "
3843 "low poly geometry. Only affects triangles at grazing angles to light");
3851 "Shadow Terminator Shading Offset",
3852 "Push the shadow terminator towards the light to hide artifacts on low poly geometry");
3883 "rna_LightLinking_receiver_collection_get",
3884 "rna_LightLinking_receiver_collection_set",
3888 "Receiver Collection",
3889 "Collection which defines light linking relation of this emitter");
3896 "rna_LightLinking_blocker_collection_get",
3897 "rna_LightLinking_blocker_collection_set",
3901 "Blocker Collection",
3902 "Collection which defines objects which block light from this emitter");
Functions and classes to work with Actions.
Functionality to iterate an Action in various ways.
Camera data-block and utility functions.
General operations, lookup, etc. for materials.
General operations, lookup, etc. for blender objects.
#define BLT_I18NCONTEXT_ID_IMAGE
#define BLT_I18NCONTEXT_ID_ID
ID and Library types, which are fundamental for SDNA.
#define ID_IS_EDITABLE(_id)
Object is a sort of wrapper for general info.
#define OB_DATA_SUPPORT_ID(_id_type)
#define OB_TYPE_SUPPORT_PARVERT(_type)
#define RNA_ENUM_ITEM_SEPR
#define RNA_TRANSLATION_PREC_DEFAULT
#define UNUSED_VARS_NDEBUG(...)
#define BLI_assert_msg(a, msg)
SIMD_FORCE_INLINE btScalar length() const
Return the length of the vector.
ccl_device_inline dual1 len(const ccl_private dual< T > &a)
std::array< VecBase< T, 3 >, 8 > corners(const Bounds< VecBase< T, 3 > > &bounds)
ModifierData * modifier_add(ReportList *reports, Main *bmain, Scene *scene, Object *ob, const char *name, int type)
void constraint_active_set(Object *ob, bConstraint *con)
void shaderfx_clear(Main *bmain, Object *ob)
void constraint_update(Main *bmain, Object *ob)
ShaderFxData * shaderfx_add(ReportList *reports, Main *bmain, Scene *scene, Object *ob, const char *name, int type)
float vgroup_vert_weight(Object *ob, bDeformGroup *dg, int vertnum)
void constraint_tag_update(Main *bmain, Object *ob, bConstraint *con)
bool parent_set(ReportList *reports, const bContext *C, Scene *scene, Object *const ob, Object *const par, int partype, bool xmirror, bool keep_transform, const int vert_par[3])
bool modifier_move_to_index(ReportList *reports, eReportType error_type, Object *ob, ModifierData *md, int index, bool allow_partial)
bool shaderfx_remove(ReportList *reports, Main *bmain, Object *ob, ShaderFxData *fx)
void vgroup_vert_add(Object *ob, bDeformGroup *dg, int vertnum, float weight, int assignmode)
void vgroup_vert_remove(Object *ob, bDeformGroup *dg, int vertnum)
void modifiers_clear(Main *bmain, Scene *scene, Object *ob)
bool modifier_remove(ReportList *reports, Main *bmain, Scene *scene, Object *ob, ModifierData *md)
SymEdge< T > * sym(const SymEdge< T > *se)
void WM_main_add_notifier(uint type, void *reference)
void BKE_constraints_free(ListBaseT< bConstraint > *list)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
bool rna_Light_object_poll(PointerRNA *ptr, PointerRNA value)
const EnumPropertyItem rna_enum_object_modifier_type_items[]
void BKE_modifier_copydata(const ModifierData *md, ModifierData *target)
void RNA_api_object(StructRNA *srna)
void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable)
int BKE_object_material_count_eval(const Object *ob)
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
bool BKE_object_is_in_editmode_vgroup(const Object *ob)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
static void rna_def_object_constraints(BlenderRNA *brna, PropertyRNA *cprop)
char * STRNCPY(char(&dst)[N], const char *src)
ListBaseT< bDeformGroup > * BKE_object_defgroup_list_mutable(Object *ob)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
void BKE_object_empty_draw_type_set(Object *ob, int value)
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void BKE_editlattice_load(struct Object *obedit)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_property_boolean_bitset_array_sdna(PropertyRNA *prop, const char *structname, const char *propname, const int64_t booleanbit, const int length)
void BKE_pose_rebuild(Main *bmain, Object *ob, bArmature *arm, bool do_id_user)
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
bool BKE_collection_has_object_recursive_instanced(Collection *collection, Object *ob)
const ListBaseT< bDeformGroup > * BKE_object_defgroup_list(const Object *ob)
void ED_curve_editnurb_load(Main *bmain, Object *obedit)
void RNA_def_property_override_funcs(PropertyRNA *prop, const char *diff, const char *store, const char *apply)
static const EnumPropertyItem parent_type_items[]
const EnumPropertyItem rna_enum_object_axis_flip_items[]
static void rna_def_object(BlenderRNA *brna)
BMesh * BKE_editmesh_bmesh_get_for_write(Mesh *mesh)
void BKE_light_linking_copy(struct Object *object_dst, const struct Object *object_src, const int copy_flags)
bool BKE_object_sculpt_use_dyntopo(const Object *object)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void RNA_def_object(BlenderRNA *brna)
const EnumPropertyItem rna_enum_constraint_type_items[]
const EnumPropertyItem rna_enum_object_type_items[]
static void rna_def_object_display(BlenderRNA *brna)
void RNA_property_update_main(Main *bmain, Scene *scene, PointerRNA *ptr, PropertyRNA *prop)
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
struct ParticleSystem * psys_get_current(struct Object *ob)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
bDeformGroup * BKE_object_defgroup_find_name(const Object *ob, StringRef name)
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
PointerRNA RNA_id_pointer_create(ID *id)
void rna_Object_internal_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
void convert_to_rotation_mode(bContext &C, ed::AnimTransformable &transformable, const eRotationModes to_mode, const bool bake)
void BKE_curve_type_test(Object *ob, bool dimension_update)
Material * BKE_object_material_get(Object *ob, short act)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[])
bool rna_Armature_object_poll(PointerRNA *ptr, PointerRNA value)
@ OB_FLAG_USE_SIMULATION_CACHE
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void BKE_editlattice_make(struct Object *obedit)
struct bConstraint * BKE_constraint_copy_for_object(struct Object *ob, struct bConstraint *src)
const EnumPropertyItem rna_enum_object_rotation_mode_items[]
bool invert_m4_m4(float inverse[4][4], const float mat[4][4])
@ eModifierType_ParticleSystem
const EnumPropertyItem rna_enum_lightprobes_type_items[]
void RNA_define_lib_overridable(const bool make_overridable)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
int BKE_lightgroup_membership_get(const LightgroupMembership *lgm, char *name)
void PE_current_changed(Depsgraph *depsgraph, Scene *scene, Object *ob)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void BKE_light_linking_delete(struct Object *object, const int delete_flags)
const EnumPropertyItem rna_enum_metaelem_type_items[]
std::string RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop)
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
static void rna_def_object_lineart(BlenderRNA *brna)
MINLINE int max_ii(int a, int b)
void BKE_object_material_assign(Main *bmain, Object *ob, Material *ma, short act, int assign_type)
@ OBJECT_LRT_OWN_INTERSECTION_PRIORITY
void BKE_lightgroup_membership_set(LightgroupMembership **lgm, const char *name)
void BKE_object_defgroup_active_index_set(Object *ob, int new_index)
MatBase< float, 4, 4 > float4x4
struct bConstraint * BKE_constraint_add_for_object(struct Object *ob, const char *name, eBConstraint_Types type)
void RNA_def_struct_nested(BlenderRNA *brna, StructRNA *srna, const char *structname)
@ LIBOVERRIDE_OP_INSERT_AFTER
const EnumPropertyItem rna_enum_object_type_curve_items[]
void RNA_def_property_enum_bitflag_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_define_animate_sdna(bool animate)
void rna_def_animviz_common(StructRNA *srna)
@ OB_MODIFIER_FLAG_ADD_REST_POSITION
void BKE_object_apply_mat4(Object *ob, const float mat[4][4], bool use_compat, bool use_parent)
const float rna_default_axis_angle[4]
void RNA_def_property_float_array_default(PropertyRNA *prop, const float *array)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
@ PROPOVERRIDE_NO_PROP_NAME
@ PROPOVERRIDE_LIBRARY_INSERTION
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
@ PROPOVERRIDE_NO_COMPARISON
int rna_object_vgroup_name_index_length(PointerRNA *ptr, int index)
ModifierData * BKE_object_active_modifier(const Object *ob)
void rna_def_animdata_common(StructRNA *srna)
@ GREASE_PENCIL_LINEART_OBJECT
@ GREASE_PENCIL_LINEART_COLLECTION
@ GREASE_PENCIL_LINEART_SCENE
const EnumPropertyItem rna_enum_object_empty_drawtype_items[]
void BKE_light_linking_collection_assign_only(struct Object *object, struct Collection *new_collection, LightLinkingType link_type)
void BKE_object_defgroup_remove_all(struct Object *ob)
bool BKE_main_collection_sync_remap(const Main *bmain)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier_c_str, int type, int subtype)
@ OBJECT_LRT_OCCLUSION_ONLY
@ OBJECT_LRT_INTERSECTION_ONLY
@ OBJECT_LRT_FORCE_INTERSECTION
@ OBJECT_LRT_NO_INTERSECTION
static void rna_def_object_particle_systems(BlenderRNA *brna, PropertyRNA *cprop)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BKE_constraint_unique_name(struct bConstraint *con, ListBaseT< bConstraint > *list)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
bool BKE_object_supports_vertex_groups(const Object *ob)
static void rna_def_vertex_group(BlenderRNA *brna)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
bool RNA_enum_name_from_value(const EnumPropertyItem *item, int value, const char **r_name)
@ ME_EDIT_MIRROR_VERTEX_GROUPS
bool rna_Lattice_object_poll(PointerRNA *ptr, PointerRNA value)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void BKE_collection_object_parented_sort_index_reset(Main &bmain, Object &ob)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
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_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void BKE_object_to_mat4(const Object *ob, float r_mat[4][4])
void DEG_id_tag_update(ID *id, unsigned int flags)
void BKE_report(ReportList *reports, eReportType type, const char *message)
@ OB_MODE_VERTEX_GREASE_PENCIL
@ OB_MODE_SCULPT_GREASE_PENCIL
@ OB_MODE_EDIT_GPENCIL_LEGACY
@ OB_MODE_WEIGHT_GREASE_PENCIL
@ OB_MODE_PAINT_GREASE_PENCIL
void BLI_insertlinkafter(ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void BKE_object_materials_sync_length(Main *bmain, Object *ob, ID *id)
struct Collection * BKE_light_linking_collection_get(const struct Object *object, LightLinkingType link_type)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void rna_object_uvlayer_name_set(PointerRNA *ptr, const char *value, char *result, int result_maxncpy)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
const EnumPropertyItem rna_enum_object_axis_items[]
bool BLI_listbase_move_index(ListBase *listbase, int from, int to) ATTR_NONNULL()
void BKE_object_matrix_local_get(Object *ob, float r_mat[4][4])
@ BKE_MAT_ASSIGN_EXISTING
static void rna_def_object_shaderfxs(BlenderRNA *brna, PropertyRNA *cprop)
struct bConstraint * BKE_constraint_duplicate_ex(struct bConstraint *src, int flag, bool do_extern)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
static const EnumPropertyItem instance_items[]
int BKE_object_defgroup_name_index(const Object *ob, StringRef name)
void BKE_editmesh_looptris_and_normals_calc(BMEditMesh *em, BMesh *bm)
struct bDeformGroup * BKE_object_defgroup_add_name(struct Object *ob, const char *name)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
bool BKE_constraint_remove_ex(ListBaseT< bConstraint > *list, struct Object *ob, struct bConstraint *con)
void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item, int value)
void RNA_def_struct_clear_flag(StructRNA *srna, StructFlag flag)
struct bConstraint * BKE_constraints_active_get(ListBaseT< bConstraint > *list)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
const EnumPropertyItem rna_enum_workspace_object_mode_items[]
void BKE_object_defgroup_set_name(bDeformGroup *dg, Object *ob, const char *new_name)
static void rna_def_object_modifiers(BlenderRNA *brna, PropertyRNA *cprop)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier_c_str, const char *call)
@ eModifierTypeFlag_Single
void EDBM_mesh_load(Main *bmain, Object *ob)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
const EnumPropertyItem rna_enum_object_mode_items[]
_W64 unsigned int uintptr_t
void RNA_def_property_boolean_default(PropertyRNA *prop, bool value)
@ OB_TRANSFORM_ADJUST_ROOT_PARENT_FOR_VIEW_LOCK
@ OB_PARENT_USE_FINAL_INDICES
short psys_get_current_num(struct Object *ob)
@ OB_EMPTY_IMAGE_USE_ALPHA_BLEND
bool rna_Camera_object_poll(PointerRNA *ptr, PointerRNA value)
const EnumPropertyItem rna_enum_object_gpencil_type_items[]
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void BKE_rotMode_change_values(float quat[4], float eul[3], float axis[3], float *angle, eRotationModes oldMode, eRotationModes newMode)
bool BKE_object_is_in_editmode(const Object *ob)
ModifierData * BKE_modifiers_findby_type(const Object *ob, ModifierType type)
void RNA_def_function_flag(FunctionRNA *func, FunctionFlag flag)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void psys_set_current_num(struct Object *ob, int index)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
void void * BLI_listbase_string_or_index_find(const ListBase *listbase, const char *string, size_t string_offset, int index) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void rna_object_vgroup_name_index_set(PointerRNA *ptr, const char *value, short *index)
void EDBM_mesh_make(Object *ob, int select_mode, bool add_key_index)
@ OB_EMPTY_IMAGE_DEPTH_DEFAULT
@ OB_EMPTY_IMAGE_DEPTH_BACK
@ OB_EMPTY_IMAGE_DEPTH_FRONT
Main * CTX_data_main(const bContext *C)
void RNA_def_property_override_clear_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void RNA_def_property_editable_array_func(PropertyRNA *prop, const char *editable)
static void rna_def_object_visibility(StructRNA *srna)
void BKE_mesh_assign_object(Main *bmain, Object *ob, Mesh *mesh)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
Material * BKE_object_material_get_eval(Object *ob, short act)
ID_Type GS(const char *name)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
std::optional< Bounds< float3 > > BKE_object_boundbox_eval_cached_get(const Object *ob)
@ OB_EMPTY_IMAGE_HIDE_FRONT
@ OB_EMPTY_IMAGE_HIDE_BACK
@ OB_EMPTY_IMAGE_HIDE_ORTHOGRAPHIC
@ OB_EMPTY_IMAGE_HIDE_PERSPECTIVE
@ OB_EMPTY_IMAGE_HIDE_NON_AXIS_ALIGNED
void BKE_constraints_active_set(ListBaseT< bConstraint > *list, struct bConstraint *con)
void rna_object_vcollayer_name_set(PointerRNA *ptr, const char *value, char *result, int result_maxncpy)
void ED_curve_editnurb_make(Object *obedit)
PropertyRNA * RNA_def_int_array(StructOrFunctionRNA *cont_, const char *identifier, const int len, const int *default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
bool rna_Curve_object_poll(PointerRNA *ptr, PointerRNA value)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
PointerRNA RNA_pointer_create_with_parent(const PointerRNA &parent, StructRNA *type, void *data)
void DEG_relations_tag_update(Main *bmain)
Scene * CTX_data_scene(const bContext *C)
void BKE_object_defgroup_remove(struct Object *ob, struct bDeformGroup *defgroup)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void rna_object_vgroup_name_set(PointerRNA *ptr, const char *value, char *result, int result_maxncpy)
void rna_def_motionpath_common(StructRNA *srna)
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void BKE_object_dimensions_set(Object *ob, const float value[3], int axis_mask)
static void rna_def_object_light_linking(BlenderRNA *brna)
Key * BKE_key_from_object(Object *ob)
void BKE_object_modifier_set_active(Object *ob, ModifierData *md)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
static void rna_def_material_slot(BlenderRNA *brna)
bool DEG_is_evaluated(const T *id)
void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, PointerRNA *ptr, ListBase *lb, IteratorSkipFunc skip)
void BKE_object_dimensions_eval_cached_get(const Object *ob, float r_vec[3])
void RNA_def_struct_name_property(StructRNA *srna, PropertyRNA *prop, const bool allow_replace)
static const EnumPropertyItem rna_enum_object_empty_image_depth_items[]
MINLINE int clamp_i(int value, int min, int max)
bool BKE_id_is_in_global_main(ID *id)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
Mesh * BKE_mesh_wrapper_ensure_subdivision(Mesh *mesh)
const ModifierTypeInfo * BKE_modifier_get_info(ModifierType type)
void RNA_def_property_array(PropertyRNA *prop, int length)
const int rna_matrix_dimsize_4x4[]
void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
const EnumPropertyItem rna_enum_object_shaderfx_type_items[]
@ CONSTRAINT_OVERRIDE_LIBRARY_LOCAL
bool rna_Mesh_object_poll(PointerRNA *ptr, PointerRNA value)
static void rna_def_object_vertex_groups(BlenderRNA *brna, PropertyRNA *cprop)
void rna_object_vgroup_name_index_get(PointerRNA *ptr, char *value, int index)
int BKE_object_defgroup_active_index_get(const Object *ob)
int BKE_lightgroup_membership_length(const LightgroupMembership *lgm)
#define INSTANCE_ITEM_COLLECTION
#define INSTANCE_ITEMS_SHARED