28 {0,
"DEFAULT", 0,
"Default Colors",
""},
29 {1,
"THEME01", ICON_COLORSET_01_VEC,
"01 - Theme Color Set",
""},
30 {2,
"THEME02", ICON_COLORSET_02_VEC,
"02 - Theme Color Set",
""},
31 {3,
"THEME03", ICON_COLORSET_03_VEC,
"03 - Theme Color Set",
""},
32 {4,
"THEME04", ICON_COLORSET_04_VEC,
"04 - Theme Color Set",
""},
33 {5,
"THEME05", ICON_COLORSET_05_VEC,
"05 - Theme Color Set",
""},
34 {6,
"THEME06", ICON_COLORSET_06_VEC,
"06 - Theme Color Set",
""},
35 {7,
"THEME07", ICON_COLORSET_07_VEC,
"07 - Theme Color Set",
""},
36 {8,
"THEME08", ICON_COLORSET_08_VEC,
"08 - Theme Color Set",
""},
37 {9,
"THEME09", ICON_COLORSET_09_VEC,
"09 - Theme Color Set",
""},
38 {10,
"THEME10", ICON_COLORSET_10_VEC,
"10 - Theme Color Set",
""},
39 {11,
"THEME11", ICON_COLORSET_11_VEC,
"11 - Theme Color Set",
""},
40 {12,
"THEME12", ICON_COLORSET_12_VEC,
"12 - Theme Color Set",
""},
41 {13,
"THEME13", ICON_COLORSET_13_VEC,
"13 - Theme Color Set",
""},
42 {14,
"THEME14", ICON_COLORSET_14_VEC,
"14 - Theme Color Set",
""},
43 {15,
"THEME15", ICON_COLORSET_15_VEC,
"15 - Theme Color Set",
""},
44 {16,
"THEME16", ICON_COLORSET_16_VEC,
"16 - Theme Color Set",
""},
45 {17,
"THEME17", ICON_COLORSET_17_VEC,
"17 - Theme Color Set",
""},
46 {18,
"THEME18", ICON_COLORSET_18_VEC,
"18 - Theme Color Set",
""},
47 {19,
"THEME19", ICON_COLORSET_19_VEC,
"19 - Theme Color Set",
""},
48 {20,
"THEME20", ICON_COLORSET_20_VEC,
"20 - Theme Color Set",
""},
49 {-1,
"CUSTOM", 0,
"Custom Color Set",
""},
50 {0,
nullptr, 0,
nullptr,
nullptr},
53constexpr int COLOR_SETS_MAX_THEMED_INDEX = 20;
58# include <fmt/format.h>
86 ID *
id =
ptr->owner_id;
93 ID *
id =
ptr->owner_id;
102 ID *
id =
ptr->owner_id;
114 if (value.owner_id ==
nullptr && value.data ==
nullptr) {
115 arm->act_bone =
nullptr;
118 if (value.owner_id != &arm->id) {
121 if (
GS(ob->id.name) !=
ID_OB || (ob->data != arm)) {
122 printf(
"ERROR: armature set active bone - new active doesn't come from this armature\n");
127 arm->act_bone =
static_cast<Bone *
>(value.data);
138 if (value.owner_id ==
nullptr && value.data ==
nullptr) {
139 arm->act_edbone =
nullptr;
142 if (value.owner_id != &arm->id) {
146 arm->act_edbone =
static_cast<EditBone *
>(value.data);
154 if (arm->
edbo ==
nullptr) {
157 "Armature '%s' not in edit mode, cannot add an editbone",
164static void rna_Armature_edit_bone_remove(
bArmature *arm,
169 if (arm->
edbo ==
nullptr) {
172 "Armature '%s' not in edit mode, cannot remove an editbone",
180 "Armature '%s' does not contain bone '%s'",
202static int rna_iterator_bone_collections_all_length(
PointerRNA *
ptr)
220static int rna_iterator_bone_collections_roots_length(
PointerRNA *
ptr)
242 arm->collection_array + bcoll->child_index,
248static int rna_iterator_bone_collection_children_length(
PointerRNA *
ptr)
251 return bcoll->child_count;
266 if (parent_index < 0) {
289 if (to_parent_index >= 0) {
291 if (to_parent_index == from_bcoll_index ||
300 armature, from_bcoll_index, -1, from_parent_index, to_parent_index);
305static int rna_BoneCollections_active_index_get(
PointerRNA *
ptr)
308 return arm->runtime.active_collection_index;
311static void rna_BoneCollections_active_index_set(
PointerRNA *
ptr,
const int bone_collection_index)
319static void rna_BoneCollections_active_index_range(
327 *
max =
max_ii(0, arm->collection_array_num - 1);
335 if (parent ==
nullptr) {
342 if (parent_index < 0) {
345 "Bone collection '%s' not found in Armature '%s'",
356static void rna_BoneCollections_active_name_set(
PointerRNA *
ptr,
const char *name)
365 if (from < 0 || from >=
count || to < 0 || to >=
count ||
374static void rna_BoneCollection_name_set(
PointerRNA *
ptr,
const char *name)
382static void rna_BoneCollection_is_visible_set(
PointerRNA *
ptr,
const bool is_visible)
390static bool rna_BoneCollection_is_visible_effectively_get(
PointerRNA *
ptr)
397static void rna_BoneCollection_is_solo_set(
PointerRNA *
ptr,
const bool is_solo)
405static void rna_BoneCollection_is_expanded_set(
PointerRNA *
ptr,
const bool is_expanded)
411static std::optional<std::string> rna_BoneCollection_path(
const PointerRNA *
ptr)
414 char name_esc[
sizeof(bcoll->
name) * 2];
416 return fmt::format(
"collections_all[\"{}\"]", name_esc);
425static void rna_BoneCollectionMemberships_clear(
Bone *bone)
431static bool rna_BoneCollection_is_editable_get(
PointerRNA *
ptr)
445static int rna_BoneCollection_child_number_get(
PointerRNA *
ptr)
451static void rna_BoneCollection_child_number_set(
PointerRNA *
ptr,
const int new_child_number)
486 ListBase bone_collection_refs = bone->runtime.collections;
502 ListBase bone_collection_refs = ebone->bone_collections;
507static bool rna_Armature_collections_override_apply(
Main *bmain,
531 printf(
"Unsupported RNA override operation on armature collections, ignoring\n");
540 arm_dst, arm_src, bcoll_anchor, bcoll_src);
551static std::optional<std::string> rna_BoneColor_path_posebone(
const PointerRNA *
ptr)
564 if (&checkBone->color ==
ptr->data) {
566 "pointer magic to find the pose bone failed (found the wrong bone)");
571 BLI_assert_msg(found,
"pointer magic to find the pose bone failed (did not find the bone)");
574 char name_esc[
sizeof(bone->
name) * 2];
576 return fmt::format(
"pose.bones[\"{}\"].color", name_esc);
579static std::optional<std::string> rna_BoneColor_path_bone(
const PointerRNA *
ptr)
584 const Bone *bone =
reinterpret_cast<const Bone *
>(bone_ptr);
593 if (&checkBone->color == ptr->data) {
594 BLI_assert_msg(checkBone == bone,
595 "pointer magic to find the pose bone failed (found the wrong bone)");
599 BLI_assert_msg(found,
"pointer magic to find the pose bone failed (did not find the bone)");
602 char name_esc[
sizeof(bone->
name) * 2];
604 return fmt::format(
"bones[\"{}\"].color", name_esc);
607static std::optional<std::string> rna_BoneColor_path_editbone(
const PointerRNA *
ptr)
621 if (&checkBone->color ==
ptr->data) {
623 "pointer magic to find the pose bone failed (found the wrong bone)");
628 BLI_assert_msg(found,
"pointer magic to find the pose bone failed (did not find the bone)");
631 char name_esc[
sizeof(bone->
name) * 2];
633 return fmt::format(
"bones[\"{}\"].color", name_esc);
636static std::optional<std::string> rna_BoneColor_path(
const PointerRNA *
ptr)
638 const ID *owner =
ptr->owner_id;
639 BLI_assert_msg(owner,
"expecting all bone colors to have an owner");
641 switch (
GS(owner->
name)) {
643 return rna_BoneColor_path_posebone(
ptr);
646 if (arm->
edbo ==
nullptr) {
647 return rna_BoneColor_path_bone(
ptr);
649 return rna_BoneColor_path_editbone(
ptr);
657void rna_BoneColor_palette_index_set(
PointerRNA *
ptr,
const int new_palette_index)
659 if (new_palette_index < -1 || new_palette_index > COLOR_SETS_MAX_THEMED_INDEX) {
667 ID *
id =
ptr->owner_id;
691 ID *
id =
ptr->owner_id;
729 ID *
id =
ptr->owner_id;
740 ID *
id =
ptr->owner_id;
775static std::optional<std::string> rna_Bone_path(
const PointerRNA *
ptr)
777 const ID *
id =
ptr->owner_id;
779 char name_esc[
sizeof(bone->
name) * 2];
788 return fmt::format(
"pose.bones[\"{}\"].bone", name_esc);
793 return fmt::format(
"bones[\"{}\"]", name_esc);
802static std::optional<std::string> rna_EditBone_path(
const PointerRNA *
ptr)
805 char name_esc[
sizeof(ebone->
name) * 2];
808 return fmt::format(
"edit_bones[\"{}\"]", name_esc);
817static void rna_EditBone_name_set(
PointerRNA *
ptr,
const char *value)
821 char oldname[
sizeof(ebone->name)], newname[
sizeof(ebone->name)];
831static void rna_Bone_name_set(
PointerRNA *
ptr,
const char *value)
835 char oldname[
sizeof(bone->
name)], newname[
sizeof(bone->
name)];
845static void rna_EditBone_connected_check(
EditBone *ebone)
862static void rna_EditBone_connected_set(
PointerRNA *
ptr,
bool value)
873 rna_EditBone_connected_check(ebone);
887 if (parbone ==
nullptr) {
902 if (parbone == ebone) {
906 for (pbone = parbone->parent; pbone; pbone = pbone->parent) {
907 if (pbone == ebone) {
913 rna_EditBone_connected_check(ebone);
917static void rna_EditBone_matrix_get(
PointerRNA *
ptr,
float *values)
923static void rna_EditBone_matrix_set(
PointerRNA *
ptr,
const float *values)
956 for (
Object *obt =
static_cast<Object *
>(bmain->objects.first); obt;
957 obt =
static_cast<Object *
>(obt->id.next))
959 if (obt->data == arm && obt->pose) {
962 if (pchan && pchan->
bone == bone) {
969 rna_Armature_dependency_update(bmain, scene,
ptr);
986 if (hbone ==
nullptr || value.
owner_id ==
ptr->owner_id) {
997 if (hbone ==
nullptr || value.
owner_id ==
ptr->owner_id) {
1016 if (hbone ==
nullptr || value.
owner_id ==
ptr->owner_id) {
1027 if (hbone ==
nullptr || value.
owner_id ==
ptr->owner_id) {
1062 rna_Armature_update_data(bmain, scene,
ptr);
1070 if (bone->childbase.first) {
1073 else if (bone->
next) {
1081 if (bone && bone->
next) {
1088 iter->valid = (
internal->link !=
nullptr);
1108 return (arm->
edbo !=
nullptr);
1111static void rna_Armature_transform(
bArmature *arm,
const float mat[16])
1116static int rna_Armature_relation_line_position_get(
PointerRNA *
ptr)
1123static void rna_Armature_relation_line_position_set(
PointerRNA *
ptr,
const int value)
1167 "A color palette is user-defined, instead of using a theme-defined one");
1175 prop,
"Custom",
"The custom bone colors, used when palette is 'CUSTOM'");
1183# define RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone, is_editbone) \
1185 if (is_posebone) { \
1186 RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update"); \
1188 else if (is_editbone) { \
1189 RNA_def_property_update(prop, 0, "rna_Armature_editbone_transform_update"); \
1192 RNA_def_property_update(prop, 0, "rna_Armature_update_data"); \
1204 prop,
"Roll In",
"Roll offset for the start of the B-Bone, adjusts twist");
1211 prop,
"Roll Out",
"Roll offset for the end of the B-Bone, adjusts twist");
1214 if (is_posebone ==
false) {
1217 prop,
"Inherit End Roll",
"Add Roll Out of the Start Handle bone to the Roll In value");
1228 prop,
"In X",
"X-axis handle offset for start of the B-Bone's curve, adjusts curvature");
1235 prop,
"In Z",
"Z-axis handle offset for start of the B-Bone's curve, adjusts curvature");
1242 prop,
"Out X",
"X-axis handle offset for end of the B-Bone's curve, adjusts curvature");
1249 prop,
"Out Z",
"Z-axis handle offset for end of the B-Bone's curve, adjusts curvature");
1269 if (is_posebone ==
false) {
1272 prop,
"Scale Easing",
"Multiply the final easing values by the Scale In/Out Y factors");
1287 "Scale factors for the start of the B-Bone, adjusts thickness (for tapering effects)");
1299 "Scale factors for the end of the B-Bone, adjusts thickness (for tapering effects)");
1302# undef RNA_DEF_CURVEBONE_UPDATE
1312 "Use connected parent and children to compute the handle"},
1317 "Use the position of the specified bone to compute the handle"},
1322 "Use the offset of the specified bone from rest pose to compute the handle"},
1327 "Use the orientation of the specified bone to compute the handle, ignoring the location"},
1328 {0,
nullptr, 0,
nullptr,
nullptr},
1336 "Fast mapping that is good for most situations, but ignores the rest pose "
1337 "curvature of the B-Bone"},
1342 "Slower mapping that gives better deformation for B-Bones that are sharply "
1343 "curved in rest pose"},
1344 {0,
nullptr, 0,
nullptr,
nullptr},
1353 "Inherit scaling, but remove shearing of the child in the rest orientation"},
1358 "Rotate non-uniform parent scaling to align with the child, applying parent X "
1359 "scale to child X axis, and so forth"},
1364 "Inherit uniform scaling representing the overall change in the volume of the parent"},
1370 "Ignore parent scaling without compensating for parent shear. "
1371 "Replicates the effect of disabling the original Inherit Scale checkbox."},
1372 {0,
nullptr, 0,
nullptr,
nullptr},
1380 "Use display mode from armature (default)"},
1381 {
ARM_DRAW_TYPE_OCTA,
"OCTAHEDRAL", 0,
"Octahedral",
"Display bones as octahedral shape"},
1387 "Display bones as boxes, showing subdivision and B-Splines"},
1392 "Display bones as extruded spheres, showing deformation influence volume"},
1397 "Display bones as thin wires, showing subdivision and B-Splines"},
1398 {0,
nullptr, 0,
nullptr,
nullptr},
1442 prop,
"Connected",
"When bone has a parent, bone's head is stuck to the parent's tail");
1448 prop,
"Inherit Rotation",
"Bone inherits rotation or scale from parent bone");
1455 "Multiply Vertex Group with Envelope",
1456 "When deforming bone, multiply effects of Vertex Group weights with Envelope influence");
1466 prop,
"Inherit Scale",
"Specifies how the bone inherits scaling from the parent bone");
1478 prop,
"Relative Parenting",
"Object children will use relative transform, like deform");
1487 "Bone is always displayed in wireframe regardless of viewport shading mode "
1488 "(useful for non-obstructive custom bone shapes)");
1497 "When bone doesn't have a parent, it receives cyclic offset effects (Deprecated)");
1523 prop,
"Envelope Deform Distance",
"Bone deformation distance (for Envelope deform only)");
1529 prop,
"Envelope Deform Weight",
"Bone deformation weight (for Envelope deform only)");
1544 prop,
"Envelope Head Radius",
"Radius of head of bone (for Envelope deform only)");
1558 prop,
"Envelope Tail Radius",
"Radius of tail of bone (for Envelope deform only)");
1571 prop,
"B-Bone Segments",
"Number of subdivisions of bone (for B-Bones only)");
1579 "B-Bone Vertex Mapping Mode",
1580 "Selects how the vertices are mapped to B-Bone segments based on their position");
1611 prop,
"B-Bone Start Handle Type",
"Selects how the start handle of the B-Bone is computed");
1619 prop,
"rna_EditBone_bbone_prev_get",
"rna_EditBone_bbone_prev_set",
nullptr,
nullptr);
1629 prop,
"B-Bone Start Handle",
"Bone that serves as the start handle for the B-Bone curve");
1634 "Start Handle Scale",
1635 "Multiply B-Bone Scale In channels by the local scale values of the start handle. "
1636 "This is done after the Scale Easing option and isn't affected by it.");
1644 "Start Handle Ease",
1645 "Multiply the B-Bone Ease In channel by the local Y scale value of the start handle. "
1646 "This is done after the Scale Easing option and isn't affected by it.");
1656 prop,
"B-Bone End Handle Type",
"Selects how the end handle of the B-Bone is computed");
1664 prop,
"rna_EditBone_bbone_next_get",
"rna_EditBone_bbone_next_set",
nullptr,
nullptr);
1674 prop,
"B-Bone End Handle",
"Bone that serves as the end handle for the B-Bone curve");
1680 "Multiply B-Bone Scale Out channels by the local scale values of the end handle. "
1681 "This is done after the Scale Easing option and isn't affected by it.");
1690 "Multiply the B-Bone Ease Out channel by the local Y scale value of the end handle. "
1691 "This is done after the Scale Easing option and isn't affected by it.");
1705 srna =
RNA_def_struct(brna,
"BoneCollectionMemberships",
nullptr);
1708 srna,
"Bone Collection Memberships",
"The Bone Collections that contain this Bone");
1711 func =
RNA_def_function(srna,
"clear",
"rna_BoneCollectionMemberships_clear");
1746 "rna_Bone_collections_begin",
1747 "rna_iterator_listbase_next",
1748 "rna_iterator_listbase_end",
1749 "rna_Bone_collections_get",
1770 "Bone is not visible when it is not in Edit Mode (i.e. in Object or Pose Modes)");
1807 "Bone Armature-Relative Matrix",
1809 "4 bone matrix relative to armature");
1816 prop,
"Tail",
"Location of tail end of the bone relative to its parent");
1824 prop,
"Armature-Relative Tail",
"Location of tail end of the bone relative to armature");
1832 prop,
"Head",
"Location of head end of the bone relative to its parent");
1840 prop,
"Armature-Relative Head",
"Location of head end of the bone relative to armature");
1868 "rna_EditBone_collections_begin",
1869 "rna_iterator_listbase_next",
1870 "rna_iterator_listbase_end",
1871 "rna_Bone_collections_get",
1885 prop,
"rna_EditBone_parent_get",
"rna_EditBone_parent_set",
nullptr,
nullptr);
1915 prop,
"rna_EditBone_length_get",
"rna_EditBone_length_set",
nullptr);
1964 "Matrix combining location and rotation of the bone (head position, direction and roll), "
1965 "in armature space (does not include/support bone's length/size)");
1967 prop,
"rna_EditBone_matrix_get",
"rna_EditBone_matrix_set",
nullptr);
2021 prop,
nullptr,
"rna_Armature_act_edit_bone_set",
nullptr,
nullptr);
2030 parm =
RNA_def_string(func,
"name",
"Object", 0,
"",
"New name for the bone");
2033 parm =
RNA_def_pointer(func,
"bone",
"EditBone",
"",
"Newly created edit bone");
2041 parm =
RNA_def_pointer(func,
"bone",
"EditBone",
"",
"EditBone to remove");
2059 srna,
"Armature Bone Collections",
"The Bone Collections of this Armature");
2067 prop,
nullptr,
"rna_BoneCollections_active_set",
nullptr,
nullptr);
2077 "Active Collection Index",
2078 "The index of the Armature's active bone collection; -1 when there "
2079 "is no active collection. Note that this is indexing the underlying array of bone "
2080 "collections, which may not be in the order you expect. Root collections are listed first, "
2081 "and siblings are always sequential. Apart from that, bone collections can be in any order, "
2082 "and thus incrementing or decrementing this index can make the active bone collection jump "
2083 "around in unexpected ways. For a more predictable interface, use ``active`` or "
2084 "``active_name``.");
2086 "rna_BoneCollections_active_index_get",
2087 "rna_BoneCollections_active_index_set",
2088 "rna_BoneCollections_active_index_range");
2097 "Active Collection Name",
2098 "The name of the Armature's active bone collection; empty when there "
2099 "is no active collection");
2108 "Read-only flag that indicates there is at least one bone collection marked as 'solo'");
2120 "Name of the new collection. Blender will ensure it is unique within the "
2121 "collections of the Armature.");
2127 "Parent Collection",
2128 "If not None, the new bone collection becomes a child of this collection");
2131 func,
"bonecollection",
"BoneCollection",
"",
"Newly created bone collection");
2138 "Remove the bone collection from the armature. If this bone collection has any children, "
2139 "they will be reassigned to their grandparent; in other words, the children will take the "
2140 "place of the removed bone collection.");
2145 "The bone collection to remove");
2151 "Move a bone collection to a different position in the "
2152 "collection list. This can only be used to reorder siblings, "
2153 "and not to change parent-child relationships.");
2156 func,
"from_index", -1, INT_MIN, INT_MAX,
"From Index",
"Index to move", 0, 10000);
2158 parm =
RNA_def_int(func,
"to_index", -1, INT_MIN, INT_MAX,
"To Index",
"Target index", 0, 10000);
2175 "Display bones as octahedral shape (default)"},
2181 "Display bones as boxes, showing subdivision and B-Splines"},
2186 "Display bones as extruded spheres, showing deformation influence volume"},
2191 "Display bones as thin wires, showing subdivision and B-Splines"},
2192 {0,
nullptr, 0,
nullptr,
nullptr},
2196 {0,
"POSE", 0,
"Pose Position",
"Show armature in posed state"},
2201 "Show Armature in binding pose state (no posing possible)"},
2202 {0,
nullptr, 0,
nullptr,
nullptr},
2205 {0,
"TAIL", 0,
"Tail",
"Draw the relationship line from the parent tail to the child head"},
2206 {1,
"HEAD", 0,
"Head",
"Draw the relationship line from the parent head to the child head"},
2207 {0,
nullptr, 0,
nullptr,
nullptr},
2214 "Armature data-block containing a hierarchy of bones, usually used for rigging characters");
2220 parm =
RNA_def_float_matrix(func,
"matrix", 4, 4,
nullptr, 0.0f, 0.0f,
"",
"Matrix", 0.0f, 0.0f);
2233 "rna_Armature_bones_next",
2238 "rna_Armature_bones_lookup_string",
2254 "rna_iterator_bone_collections_roots_begin",
2255 "rna_iterator_array_next",
2256 "rna_iterator_array_end",
2257 "rna_iterator_array_dereference_get",
2258 "rna_iterator_bone_collections_roots_length",
2265 prop,
nullptr,
nullptr,
"rna_Armature_collections_override_apply");
2273 "rna_iterator_bone_collections_all_begin",
2274 "rna_iterator_array_next",
2275 "rna_iterator_array_end",
2276 "rna_iterator_array_dereference_get",
2277 "rna_iterator_bone_collections_all_length",
2282 prop,
"Bone Collections (All)",
"List of all bone collections of the armature");
2297 prop,
"Pose Position",
"Show armature in binding pose or final posed state");
2321 "The position for the axes on the bone. Increasing the value moves it "
2322 "closer to the tip; decreasing moves it closer to the root.");
2329 "Relation Line Position",
2330 "The start position of the relation lines from parent to child bones");
2334 "rna_Armature_relation_line_position_get",
2335 "rna_Armature_relation_line_position_set",
2348 prop,
"X-Axis Mirror",
"Apply changes to matching bone on opposite side of X-Axis");
2355 prop,
"Display Custom Bone Shapes",
"Display bones with their custom shapes");
2391 prop,
"Expanded",
"This bone collection is expanded in the bone collections tree view");
2400 prop,
"Visible",
"Bones in this collection will be visible in pose/object mode");
2409 "Ancestors Effectively Visible",
2410 "True when all of the ancestors of this bone collection are marked as "
2411 "visible; always True for root bone collections");
2418 "Effective Visibility",
2419 "Whether this bone collection is effectively visible in the viewport. This is True when "
2420 "this bone collection and all of its ancestors are visible, or when it is marked as "
2427 prop,
"Solo",
"Show only this bone collection, and others also marked as 'solo'");
2437 "Is Local Override",
2438 "This collection was added via a library override in the current blend file");
2445 "This collection is owned by a local Armature, or was added via a "
2446 "library override in the current blend file");
2452 "rna_BoneCollection_bones_begin",
2453 "rna_iterator_listbase_next",
2454 "rna_iterator_listbase_end",
2455 "rna_BoneCollection_bones_get",
2464 "Bones assigned to this bone collection. In armature edit mode this "
2465 "will always return an empty list of bones, as the bone collection "
2466 "memberships are only synchronized when exiting edit mode.");
2471 "rna_iterator_bone_collection_children_begin",
2472 "rna_iterator_array_next",
2473 "rna_iterator_array_end",
2474 "rna_iterator_array_dereference_get",
2475 "rna_iterator_bone_collection_children_length",
2487 prop,
"rna_BoneCollection_parent_get",
"rna_BoneCollection_parent_set",
nullptr,
nullptr);
2490 "Parent bone collection. Note that accessing this requires a scan of "
2491 "all the bone collections to find the parent.");
2500 "Index of this bone collection in the armature.collections_all array. Note that finding "
2501 "this index requires a scan of all the bone collections, so do access this with care.");
2506 prop,
"rna_BoneCollection_child_number_get",
"rna_BoneCollection_child_number_set",
nullptr);
2510 "Index of this collection into its parent's list of children. Note that finding "
2511 "this index requires a scan of all the bone collections, so do access this with care.");
C++ functions to deal with Armature collections (i.e. the successor of bone layers).
void ANIM_armature_bonecoll_active_set(bArmature *armature, BoneCollection *bcoll)
bool ANIM_armature_bonecoll_is_editable(const bArmature *armature, const BoneCollection *bcoll)
BoneCollection * ANIM_armature_bonecoll_insert_copy_after(bArmature *armature_dst, const bArmature *armature_src, const BoneCollection *anchor_in_dst, const BoneCollection *bcoll_to_copy)
void ANIM_armature_bonecoll_is_expanded_set(BoneCollection *bcoll, bool is_expanded)
void ANIM_armature_bonecoll_active_name_set(bArmature *armature, const char *name)
void ANIM_armature_bonecoll_unassign_all(Bone *bone)
bool ANIM_armature_bonecoll_move_to_index(bArmature *armature, int from_index, int to_index)
bool ANIM_armature_bonecoll_is_visible_effectively(const bArmature *armature, const BoneCollection *bcoll)
void ANIM_armature_bonecoll_name_set(bArmature *armature, BoneCollection *bcoll, const char *name)
void ANIM_armature_bonecoll_solo_set(bArmature *armature, BoneCollection *bcoll, bool is_solo)
BoneCollection * ANIM_armature_bonecoll_new(bArmature *armature, const char *name, int parent_index=-1)
void ANIM_armature_bonecoll_is_visible_set(bArmature *armature, BoneCollection *bcoll, bool is_visible)
void ANIM_armature_bonecoll_active_index_set(bArmature *armature, int bone_collection_index)
Blender kernel action and pose functionality.
bPoseChannel * BKE_pose_channel_find_name(const bPose *pose, const char *name)
void BKE_pchan_rebuild_bbone_handles(bPose *pose, bPoseChannel *pchan)
Bone * BKE_armature_find_bone_name(bArmature *arm, const char *name)
bool BKE_id_is_in_global_main(ID *id)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
#define BLI_assert_msg(a, msg)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
MINLINE int max_ii(int a, int b)
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void madd_v3_v3v3fl(float r[3], const float a[3], const float b[3], float f)
MINLINE float normalize_v3(float n[3])
char * STRNCPY(char(&dst)[N], const char *src)
size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
#define STRNCPY_UTF8(dst, src)
#define BLI_STR_UTF8_MULTIPLICATION_SIGN
#define BLT_I18NCONTEXT_ID_ARMATURE
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
@ LIBOVERRIDE_OP_INSERT_AFTER
@ BONE_COLLECTION_VISIBLE
@ BONE_COLLECTION_ANCESTORS_VISIBLE
@ BONE_COLLECTION_EXPANDED
@ BONE_COLLECTION_OVERRIDE_LIBRARY_LOCAL
@ BONE_RELATIVE_PARENTING
@ ARM_DRAW_RELATION_FROM_HEAD
@ ARM_DRAW_TYPE_ARMATURE_DEFINED
@ BBONE_ADD_PARENT_END_ROLL
@ BBONE_HANDLE_SCALE_EASE
@ BONE_INHERIT_SCALE_FULL
@ BONE_INHERIT_SCALE_NONE
@ BONE_INHERIT_SCALE_FIX_SHEAR
@ BONE_INHERIT_SCALE_NONE_LEGACY
@ BONE_INHERIT_SCALE_ALIGNED
@ BONE_INHERIT_SCALE_AVERAGE
#define RNA_TRANSLATION_PREC_DEFAULT
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
@ PROPOVERRIDE_NO_COMPARISON
@ PROPOVERRIDE_LIBRARY_INSERTION
#define ND_BONE_COLLECTION
#define ND_SPACE_OUTLINER
EditBone * ED_armature_ebone_add(bArmature *arm, const char *name)
void ED_armature_transform(bArmature *arm, const float mat[4][4], const bool do_props)
void ED_armature_bone_rename(Main *bmain, bArmature *arm, const char *oldnamep, const char *newnamep)
void ED_armature_ebone_transform_mirror_update(bArmature *arm, EditBone *ebo, bool check_select)
void ED_armature_ebone_to_mat4(EditBone *ebone, float r_mat[4][4])
void ED_armature_ebone_remove(bArmature *arm, EditBone *exBone)
void ED_armature_ebone_from_mat4(EditBone *ebone, const float mat[4][4])
BMesh const char void * data
float length(VecOp< float, D >) RET
#define ID_IS_LINKED(_id)
static void ANIM_armature_foreach_bone(ListBase *bones, CB callback)
int armature_bonecoll_child_number_find(const bArmature *armature, const ::BoneCollection *bcoll)
int armature_bonecoll_find_index(const bArmature *armature, const ::BoneCollection *bcoll)
bool armature_bonecoll_is_descendant_of(const bArmature *armature, int potential_parent_index, int potential_descendant_index)
int armature_bonecoll_find_parent_index(const bArmature *armature, int bcoll_index)
int armature_bonecoll_child_number_set(bArmature *armature, ::BoneCollection *bcoll, int new_child_number)
int armature_bonecoll_move_to_parent(bArmature *armature, int from_bcoll_index, int to_child_num, int from_parent_index, int to_parent_index)
void rna_iterator_array_begin(CollectionPropertyIterator *iter, PointerRNA *ptr, void *data, int itemsize, int length, bool free_ptr, IteratorSkipFunc skip)
const PointerRNA PointerRNA_NULL
void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, PointerRNA *ptr, ListBase *lb, IteratorSkipFunc skip)
void RNA_property_update_main(Main *bmain, Scene *scene, PointerRNA *ptr, PropertyRNA *prop)
void rna_pointer_create_with_ancestors(const PointerRNA &parent, StructRNA *type, void *data, PointerRNA &r_ptr)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
PointerRNA RNA_pointer_create_with_parent(const PointerRNA &parent, StructRNA *type, void *data)
void rna_def_animdata_common(StructRNA *srna)
static void rna_def_armature_collections(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_bone_collection_memberships(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_armature(BlenderRNA *brna)
static void rna_def_bone(BlenderRNA *brna)
static void rna_def_bonecollection(BlenderRNA *brna)
const EnumPropertyItem rna_enum_color_palettes_items[]
#define RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone, is_editbone)
static void rna_def_bone_common(StructRNA *srna, int editbone)
static void rna_def_edit_bone(BlenderRNA *brna)
static void rna_def_armature(BlenderRNA *brna)
static void rna_def_armature_edit_bones(BlenderRNA *brna, PropertyRNA *cprop)
void rna_def_bone_curved_common(StructRNA *srna, bool is_posebone, bool is_editbone)
static void rna_def_armature_bones(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_bonecolor(BlenderRNA *brna)
void RNA_api_armature_edit_bone(StructRNA *srna)
void RNA_api_bone(StructRNA *srna)
void RNA_api_bonecollection(StructRNA *srna)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_struct_name_property(StructRNA *srna, PropertyRNA *prop)
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_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_define_lib_overridable(const bool make_overridable)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_def_property_float_default(PropertyRNA *prop, float value)
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_define_verify_sdna(bool verify)
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)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
PropertyRNA * RNA_def_float_matrix(StructOrFunctionRNA *cont_, const char *identifier, const int rows, const int columns, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
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)
const float rna_default_scale_3d[3]
void RNA_def_property_boolean_bitset_array_sdna(PropertyRNA *prop, const char *structname, const char *propname, const int64_t booleanbit, const int length)
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[])
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
const int rna_matrix_dimsize_4x4[]
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
void RNA_def_property_enum_bitflag_sdna(PropertyRNA *prop, const char *structname, const char *propname)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
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)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
const int rna_matrix_dimsize_3x3[]
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
void RNA_def_struct_idprops_func(StructRNA *srna, const char *idproperties)
void RNA_def_property_override_funcs(PropertyRNA *prop, const char *diff, const char *store, const char *apply)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_float_array_default(PropertyRNA *prop, const float *array)
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 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)
ListBaseIterator listbase
union CollectionPropertyIterator::@277172262001176145116102322066145204253046376362 internal
IDOverrideLibraryPropertyOperation * liboverride_operation
int collection_root_count
struct BoneCollection ** collection_array
void WM_main_add_notifier(uint type, void *reference)