32 {0,
"DEFAULT", 0,
"Default Colors",
""},
33 {1,
"THEME01", ICON_COLORSET_01_VEC,
"01 - Theme Color Set",
""},
34 {2,
"THEME02", ICON_COLORSET_02_VEC,
"02 - Theme Color Set",
""},
35 {3,
"THEME03", ICON_COLORSET_03_VEC,
"03 - Theme Color Set",
""},
36 {4,
"THEME04", ICON_COLORSET_04_VEC,
"04 - Theme Color Set",
""},
37 {5,
"THEME05", ICON_COLORSET_05_VEC,
"05 - Theme Color Set",
""},
38 {6,
"THEME06", ICON_COLORSET_06_VEC,
"06 - Theme Color Set",
""},
39 {7,
"THEME07", ICON_COLORSET_07_VEC,
"07 - Theme Color Set",
""},
40 {8,
"THEME08", ICON_COLORSET_08_VEC,
"08 - Theme Color Set",
""},
41 {9,
"THEME09", ICON_COLORSET_09_VEC,
"09 - Theme Color Set",
""},
42 {10,
"THEME10", ICON_COLORSET_10_VEC,
"10 - Theme Color Set",
""},
43 {11,
"THEME11", ICON_COLORSET_11_VEC,
"11 - Theme Color Set",
""},
44 {12,
"THEME12", ICON_COLORSET_12_VEC,
"12 - Theme Color Set",
""},
45 {13,
"THEME13", ICON_COLORSET_13_VEC,
"13 - Theme Color Set",
""},
46 {14,
"THEME14", ICON_COLORSET_14_VEC,
"14 - Theme Color Set",
""},
47 {15,
"THEME15", ICON_COLORSET_15_VEC,
"15 - Theme Color Set",
""},
48 {16,
"THEME16", ICON_COLORSET_16_VEC,
"16 - Theme Color Set",
""},
49 {17,
"THEME17", ICON_COLORSET_17_VEC,
"17 - Theme Color Set",
""},
50 {18,
"THEME18", ICON_COLORSET_18_VEC,
"18 - Theme Color Set",
""},
51 {19,
"THEME19", ICON_COLORSET_19_VEC,
"19 - Theme Color Set",
""},
52 {20,
"THEME20", ICON_COLORSET_20_VEC,
"20 - Theme Color Set",
""},
53 {-1,
"CUSTOM", 0,
"Custom Color Set",
""},
54 {0,
nullptr, 0,
nullptr,
nullptr},
57constexpr int COLOR_SETS_MAX_THEMED_INDEX = 20;
62# include <fmt/format.h>
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'",
201static int rna_iterator_bone_collections_all_length(
PointerRNA *
ptr)
218static int rna_iterator_bone_collections_roots_length(
PointerRNA *
ptr)
239 arm->collection_array + bcoll->child_index,
245static int rna_iterator_bone_collection_children_length(
PointerRNA *
ptr)
248 return bcoll->child_count;
263 if (parent_index < 0) {
286 if (to_parent_index >= 0) {
288 if (to_parent_index == from_bcoll_index ||
297 armature, from_bcoll_index, -1, from_parent_index, to_parent_index);
302static int rna_BoneCollections_active_index_get(
PointerRNA *
ptr)
305 return arm->runtime.active_collection_index;
308static void rna_BoneCollections_active_index_set(
PointerRNA *
ptr,
const int bone_collection_index)
316static void rna_BoneCollections_active_index_range(
324 *max =
max_ii(0, arm->collection_array_num - 1);
332 if (parent ==
nullptr) {
339 if (parent_index < 0) {
342 "Bone collection '%s' not found in Armature '%s'",
353static void rna_BoneCollections_active_name_set(
PointerRNA *
ptr,
const char *name)
371static void rna_BoneCollection_name_set(
PointerRNA *
ptr,
const char *name)
379static void rna_BoneCollection_is_visible_set(
PointerRNA *
ptr,
const bool is_visible)
387static bool rna_BoneCollection_is_visible_effectively_get(
PointerRNA *
ptr)
394static void rna_BoneCollection_is_solo_set(
PointerRNA *
ptr,
const bool is_solo)
402static void rna_BoneCollection_is_expanded_set(
PointerRNA *
ptr,
const bool is_expanded)
408static std::optional<std::string> rna_BoneCollection_path(
const PointerRNA *
ptr)
411 char name_esc[
sizeof(bcoll->
name) * 2];
413 return fmt::format(
"collections_all[\"{}\"]", name_esc);
422static void rna_BoneCollectionMemberships_clear(
Bone *bone)
428static bool rna_BoneCollection_is_editable_get(
PointerRNA *
ptr)
442static int rna_BoneCollection_child_number_get(
PointerRNA *
ptr)
448static void rna_BoneCollection_child_number_set(
PointerRNA *
ptr,
const int new_child_number)
483 ListBase bone_collection_refs = bone->runtime.collections;
499 ListBase bone_collection_refs = ebone->bone_collections;
504static bool rna_Armature_collections_override_apply(
Main *bmain,
528 printf(
"Unsupported RNA override operation on armature collections, ignoring\n");
537 arm_dst, arm_src, bcoll_anchor, bcoll_src);
548static std::optional<std::string> rna_BoneColor_path_posebone(
const PointerRNA *
ptr)
561 if (&checkBone->color ==
ptr->
data) {
563 "pointer magic to find the pose bone failed (found the wrong bone)");
568 BLI_assert_msg(found,
"pointer magic to find the pose bone failed (did not find the bone)");
571 char name_esc[
sizeof(bone->
name) * 2];
573 return fmt::format(
"pose.bones[\"{}\"].color", name_esc);
576static std::optional<std::string> rna_BoneColor_path_bone(
const PointerRNA *
ptr)
581 const Bone *bone =
reinterpret_cast<const Bone *
>(bone_ptr);
590 if (&checkBone->color == ptr->data) {
591 BLI_assert_msg(checkBone == bone,
592 "pointer magic to find the pose bone failed (found the wrong bone)");
596 BLI_assert_msg(found,
"pointer magic to find the pose bone failed (did not find the bone)");
599 char name_esc[
sizeof(bone->
name) * 2];
601 return fmt::format(
"bones[\"{}\"].color", name_esc);
604static std::optional<std::string> rna_BoneColor_path_editbone(
const PointerRNA *
ptr)
618 if (&checkBone->color ==
ptr->
data) {
620 "pointer magic to find the pose bone failed (found the wrong bone)");
625 BLI_assert_msg(found,
"pointer magic to find the pose bone failed (did not find the bone)");
628 char name_esc[
sizeof(bone->
name) * 2];
630 return fmt::format(
"bones[\"{}\"].color", name_esc);
633static std::optional<std::string> rna_BoneColor_path(
const PointerRNA *
ptr)
636 BLI_assert_msg(owner,
"expecting all bone colors to have an owner");
638 switch (
GS(owner->
name)) {
640 return rna_BoneColor_path_posebone(
ptr);
643 if (arm->
edbo ==
nullptr) {
644 return rna_BoneColor_path_bone(
ptr);
646 return rna_BoneColor_path_editbone(
ptr);
654void rna_BoneColor_palette_index_set(
PointerRNA *
ptr,
const int new_palette_index)
656 if (new_palette_index < -1 || new_palette_index > COLOR_SETS_MAX_THEMED_INDEX) {
753 else if (
GS(id->name) ==
ID_OB) {
771static std::optional<std::string> rna_Bone_path(
const PointerRNA *
ptr)
775 char name_esc[
sizeof(bone->
name) * 2];
784 return fmt::format(
"pose.bones[\"{}\"].bone", name_esc);
789 return fmt::format(
"bones[\"{}\"]", name_esc);
804static void rna_EditBone_name_set(
PointerRNA *
ptr,
const char *value)
808 char oldname[
sizeof(ebone->name)], newname[
sizeof(ebone->name)];
818static void rna_Bone_name_set(
PointerRNA *
ptr,
const char *value)
822 char oldname[
sizeof(bone->
name)], newname[
sizeof(bone->
name)];
832static void rna_EditBone_connected_check(
EditBone *ebone)
849static void rna_EditBone_connected_set(
PointerRNA *
ptr,
bool value)
857 ebone->
flag &= ~BONE_CONNECTED;
860 rna_EditBone_connected_check(ebone);
874 if (parbone ==
nullptr) {
880 ebone->
flag &= ~BONE_CONNECTED;
889 if (parbone == ebone) {
893 for (pbone = parbone->parent; pbone; pbone = pbone->parent) {
894 if (pbone == ebone) {
900 rna_EditBone_connected_check(ebone);
904static void rna_EditBone_matrix_get(
PointerRNA *
ptr,
float *values)
910static void rna_EditBone_matrix_set(
PointerRNA *
ptr,
const float *values)
922static void rna_EditBone_length_set(
PointerRNA *
ptr,
float length)
943 for (
Object *obt =
static_cast<Object *
>(bmain->objects.first); obt;
944 obt =
static_cast<Object *
>(obt->id.next))
946 if (obt->data == arm && obt->pose) {
949 if (pchan && pchan->
bone == bone) {
956 rna_Armature_dependency_update(bmain, scene,
ptr);
973 if (hbone ==
nullptr || value.owner_id ==
ptr->
owner_id) {
984 if (hbone ==
nullptr || value.owner_id ==
ptr->
owner_id) {
1003 if (hbone ==
nullptr || value.owner_id ==
ptr->
owner_id) {
1014 if (hbone ==
nullptr || value.owner_id ==
ptr->
owner_id) {
1047 rna_Armature_update_data(bmain, scene,
ptr);
1055 if (bone->childbase.first) {
1056 internal->link = (
Link *)bone->childbase.first;
1058 else if (bone->
next) {
1059 internal->link = (
Link *)bone->
next;
1062 internal->link =
nullptr;
1066 if (bone && bone->
next) {
1067 internal->link = (
Link *)bone->
next;
1073 iter->valid = (internal->link !=
nullptr);
1093 return (arm->
edbo !=
nullptr);
1096static void rna_Armature_transform(
bArmature *arm,
const float mat[16])
1101static int rna_Armature_relation_line_position_get(
PointerRNA *
ptr)
1108static void rna_Armature_relation_line_position_set(
PointerRNA *
ptr,
const int value)
1115 arm->
flag &= ~ARM_DRAW_RELATION_FROM_HEAD;
1152 "A color palette is user-defined, instead of using a theme-defined one");
1160 prop,
"Custom",
"The custom bone colors, used when palette is 'CUSTOM'");
1168# define RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone, is_editbone) \
1170 if (is_posebone) { \
1171 RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update"); \
1173 else if (is_editbone) { \
1174 RNA_def_property_update(prop, 0, "rna_Armature_editbone_transform_update"); \
1177 RNA_def_property_update(prop, 0, "rna_Armature_update_data"); \
1189 prop,
"Roll In",
"Roll offset for the start of the B-Bone, adjusts twist");
1196 prop,
"Roll Out",
"Roll offset for the end of the B-Bone, adjusts twist");
1199 if (is_posebone ==
false) {
1202 prop,
"Inherit End Roll",
"Add Roll Out of the Start Handle bone to the Roll In value");
1213 prop,
"In X",
"X-axis handle offset for start of the B-Bone's curve, adjusts curvature");
1220 prop,
"In Z",
"Z-axis handle offset for start of the B-Bone's curve, adjusts curvature");
1227 prop,
"Out X",
"X-axis handle offset for end of the B-Bone's curve, adjusts curvature");
1234 prop,
"Out Z",
"Z-axis handle offset for end of the B-Bone's curve, adjusts curvature");
1254 if (is_posebone ==
false) {
1257 prop,
"Scale Easing",
"Multiply the final easing values by the Scale In/Out Y factors");
1272 "Scale factors for the start of the B-Bone, adjusts thickness (for tapering effects)");
1284 "Scale factors for the end of the B-Bone, adjusts thickness (for tapering effects)");
1287# undef RNA_DEF_CURVEBONE_UPDATE
1297 "Use connected parent and children to compute the handle"},
1302 "Use the position of the specified bone to compute the handle"},
1307 "Use the offset of the specified bone from rest pose to compute the handle"},
1312 "Use the orientation of the specified bone to compute the handle, ignoring the location"},
1313 {0,
nullptr, 0,
nullptr,
nullptr},
1321 "Fast mapping that is good for most situations, but ignores the rest pose "
1322 "curvature of the B-Bone"},
1327 "Slower mapping that gives better deformation for B-Bones that are sharply "
1328 "curved in rest pose"},
1329 {0,
nullptr, 0,
nullptr,
nullptr},
1338 "Inherit scaling, but remove shearing of the child in the rest orientation"},
1343 "Rotate non-uniform parent scaling to align with the child, applying parent X "
1344 "scale to child X axis, and so forth"},
1349 "Inherit uniform scaling representing the overall change in the volume of the parent"},
1355 "Ignore parent scaling without compensating for parent shear. "
1356 "Replicates the effect of disabling the original Inherit Scale checkbox."},
1357 {0,
nullptr, 0,
nullptr,
nullptr},
1394 prop,
"Connected",
"When bone has a parent, bone's head is stuck to the parent's tail");
1400 prop,
"Inherit Rotation",
"Bone inherits rotation or scale from parent bone");
1407 "Multiply Vertex Group with Envelope",
1408 "When deforming bone, multiply effects of Vertex Group weights with Envelope influence");
1418 prop,
"Inherit Scale",
"Specifies how the bone inherits scaling from the parent bone");
1430 prop,
"Relative Parenting",
"Object children will use relative transform, like deform");
1439 "Bone is always displayed in wireframe regardless of viewport shading mode "
1440 "(useful for non-obstructive custom bone shapes)");
1449 "When bone doesn't have a parent, it receives cyclic offset effects (Deprecated)");
1475 prop,
"Envelope Deform Distance",
"Bone deformation distance (for Envelope deform only)");
1481 prop,
"Envelope Deform Weight",
"Bone deformation weight (for Envelope deform only)");
1496 prop,
"Envelope Head Radius",
"Radius of head of bone (for Envelope deform only)");
1510 prop,
"Envelope Tail Radius",
"Radius of tail of bone (for Envelope deform only)");
1523 prop,
"B-Bone Segments",
"Number of subdivisions of bone (for B-Bones only)");
1531 "B-Bone Vertex Mapping Mode",
1532 "Selects how the vertices are mapped to B-Bone segments based on their position");
1563 prop,
"B-Bone Start Handle Type",
"Selects how the start handle of the B-Bone is computed");
1571 prop,
"rna_EditBone_bbone_prev_get",
"rna_EditBone_bbone_prev_set",
nullptr,
nullptr);
1581 prop,
"B-Bone Start Handle",
"Bone that serves as the start handle for the B-Bone curve");
1586 "Start Handle Scale",
1587 "Multiply B-Bone Scale In channels by the local scale values of the start handle. "
1588 "This is done after the Scale Easing option and isn't affected by it.");
1596 "Start Handle Ease",
1597 "Multiply the B-Bone Ease In channel by the local Y scale value of the start handle. "
1598 "This is done after the Scale Easing option and isn't affected by it.");
1608 prop,
"B-Bone End Handle Type",
"Selects how the end handle of the B-Bone is computed");
1616 prop,
"rna_EditBone_bbone_next_get",
"rna_EditBone_bbone_next_set",
nullptr,
nullptr);
1626 prop,
"B-Bone End Handle",
"Bone that serves as the end handle for the B-Bone curve");
1632 "Multiply B-Bone Scale Out channels by the local scale values of the end handle. "
1633 "This is done after the Scale Easing option and isn't affected by it.");
1642 "Multiply the B-Bone Ease Out channel by the local Y scale value of the end handle. "
1643 "This is done after the Scale Easing option and isn't affected by it.");
1657 srna =
RNA_def_struct(brna,
"BoneCollectionMemberships",
nullptr);
1660 srna,
"Bone Collection Memberships",
"The Bone Collections that contain this Bone");
1663 func =
RNA_def_function(srna,
"clear",
"rna_BoneCollectionMemberships_clear");
1698 "rna_Bone_collections_begin",
1699 "rna_iterator_listbase_next",
1700 "rna_iterator_listbase_end",
1701 "rna_Bone_collections_get",
1722 "Bone is not visible when it is not in Edit Mode (i.e. in Object or Pose Modes)");
1759 "Bone Armature-Relative Matrix",
1761 "4 bone matrix relative to armature");
1768 prop,
"Tail",
"Location of tail end of the bone relative to its parent");
1776 prop,
"Armature-Relative Tail",
"Location of tail end of the bone relative to armature");
1784 prop,
"Head",
"Location of head end of the bone relative to its parent");
1792 prop,
"Armature-Relative Head",
"Location of head end of the bone relative to armature");
1819 "rna_EditBone_collections_begin",
1820 "rna_iterator_listbase_next",
1821 "rna_iterator_listbase_end",
1822 "rna_Bone_collections_get",
1836 prop,
"rna_EditBone_parent_get",
"rna_EditBone_parent_set",
nullptr,
nullptr);
1866 prop,
"rna_EditBone_length_get",
"rna_EditBone_length_set",
nullptr);
1915 "Matrix combining location and rotation of the bone (head position, direction and roll), "
1916 "in armature space (does not include/support bone's length/size)");
1918 prop,
"rna_EditBone_matrix_get",
"rna_EditBone_matrix_set",
nullptr);
1972 prop,
nullptr,
"rna_Armature_act_edit_bone_set",
nullptr,
nullptr);
1981 parm =
RNA_def_string(func,
"name",
"Object", 0,
"",
"New name for the bone");
1984 parm =
RNA_def_pointer(func,
"bone",
"EditBone",
"",
"Newly created edit bone");
1992 parm =
RNA_def_pointer(func,
"bone",
"EditBone",
"",
"EditBone to remove");
2010 srna,
"Armature Bone Collections",
"The Bone Collections of this Armature");
2018 prop,
nullptr,
"rna_BoneCollections_active_set",
nullptr,
nullptr);
2028 "Active Collection Index",
2029 "The index of the Armature's active bone collection; -1 when there "
2030 "is no active collection. Note that this is indexing the underlying array of bone "
2031 "collections, which may not be in the order you expect. Root collections are listed first, "
2032 "and siblings are always sequential. Apart from that, bone collections can be in any order, "
2033 "and thus incrementing or decrementing this index can make the active bone collection jump "
2034 "around in unexpected ways. For a more predictable interface, use ``active`` or "
2035 "``active_name``.");
2037 "rna_BoneCollections_active_index_get",
2038 "rna_BoneCollections_active_index_set",
2039 "rna_BoneCollections_active_index_range");
2048 "Active Collection Name",
2049 "The name of the Armature's active bone collection; empty when there "
2050 "is no active collection");
2059 "Read-only flag that indicates there is at least one bone collection marked as 'solo'");
2071 "Name of the new collection. Blender will ensure it is unique within the "
2072 "collections of the Armature.");
2078 "Parent Collection",
2079 "If not None, the new bone collection becomes a child of this collection");
2082 func,
"bonecollection",
"BoneCollection",
"",
"Newly created bone collection");
2089 "Remove the bone collection from the armature. If this bone collection has any children, "
2090 "they will be reassigned to their grandparent; in other words, the children will take the "
2091 "place of the removed bone collection.");
2096 "The bone collection to remove");
2102 "Move a bone collection to a different position in the "
2103 "collection list. This can only be used to reorder siblings, "
2104 "and not to change parent-child relationships.");
2107 func,
"from_index", -1, INT_MIN, INT_MAX,
"From Index",
"Index to move", 0, 10000);
2109 parm =
RNA_def_int(func,
"to_index", -1, INT_MIN, INT_MAX,
"To Index",
"Target index", 0, 10000);
2122 {
ARM_OCTA,
"OCTAHEDRAL", 0,
"Octahedral",
"Display bones as octahedral shape (default)"},
2123 {
ARM_LINE,
"STICK", 0,
"Stick",
"Display bones as simple 2D lines with dots"},
2128 "Display bones as boxes, showing subdivision and B-Splines"},
2133 "Display bones as extruded spheres, showing deformation influence volume"},
2138 "Display bones as thin wires, showing subdivision and B-Splines"},
2139 {0,
nullptr, 0,
nullptr,
nullptr},
2142 {0,
"POSE", 0,
"Pose Position",
"Show armature in posed state"},
2147 "Show Armature in binding pose state (no posing possible)"},
2148 {0,
nullptr, 0,
nullptr,
nullptr},
2151 {0,
"TAIL", 0,
"Tail",
"Draw the relationship line from the parent tail to the child head"},
2152 {1,
"HEAD", 0,
"Head",
"Draw the relationship line from the parent head to the child head"},
2153 {0,
nullptr, 0,
nullptr,
nullptr},
2160 "Armature data-block containing a hierarchy of bones, usually used for rigging characters");
2166 parm =
RNA_def_float_matrix(func,
"matrix", 4, 4,
nullptr, 0.0f, 0.0f,
"",
"Matrix", 0.0f, 0.0f);
2179 "rna_Armature_bones_next",
2184 "rna_Armature_bones_lookup_string",
2200 "rna_iterator_bone_collections_roots_begin",
2201 "rna_iterator_array_next",
2202 "rna_iterator_array_end",
2203 "rna_iterator_array_dereference_get",
2204 "rna_iterator_bone_collections_roots_length",
2211 prop,
nullptr,
nullptr,
"rna_Armature_collections_override_apply");
2219 "rna_iterator_bone_collections_all_begin",
2220 "rna_iterator_array_next",
2221 "rna_iterator_array_end",
2222 "rna_iterator_array_dereference_get",
2223 "rna_iterator_bone_collections_all_length",
2228 prop,
"Bone Collections (All)",
"List of all bone collections of the armature");
2243 prop,
"Pose Position",
"Show armature in binding pose or final posed state");
2267 "The position for the axes on the bone. Increasing the value moves it "
2268 "closer to the tip; decreasing moves it closer to the root.");
2275 "Relation Line Position",
2276 "The start position of the relation lines from parent to child bones");
2280 "rna_Armature_relation_line_position_get",
2281 "rna_Armature_relation_line_position_set",
2294 prop,
"X-Axis Mirror",
"Apply changes to matching bone on opposite side of X-Axis");
2301 prop,
"Display Custom Bone Shapes",
"Display bones with their custom shapes");
2337 prop,
"Expanded",
"This bone collection is expanded in the bone collections tree view");
2346 prop,
"Visible",
"Bones in this collection will be visible in pose/object mode");
2355 "Ancestors Effectively Visible",
2356 "True when all of the ancestors of this bone collection are marked as "
2357 "visible; always True for root bone collections");
2364 "Effective Visibility",
2365 "Whether this bone collection is effectively visible in the viewport. This is True when "
2366 "this bone collection and all of its ancestors are visible, or when it is marked as "
2373 prop,
"Solo",
"Show only this bone collection, and others also marked as 'solo'");
2383 "Is Local Override",
2384 "This collection was added via a library override in the current blend file");
2391 "This collection is owned by a local Armature, or was added via a "
2392 "library override in the current blend file");
2398 "rna_BoneCollection_bones_begin",
2399 "rna_iterator_listbase_next",
2400 "rna_iterator_listbase_end",
2401 "rna_BoneCollection_bones_get",
2410 "Bones assigned to this bone collection. In armature edit mode this "
2411 "will always return an empty list of bones, as the bone collection "
2412 "memberships are only synchronized when exiting edit mode.");
2417 "rna_iterator_bone_collection_children_begin",
2418 "rna_iterator_array_next",
2419 "rna_iterator_array_end",
2420 "rna_iterator_array_dereference_get",
2421 "rna_iterator_bone_collection_children_length",
2433 prop,
"rna_BoneCollection_parent_get",
"rna_BoneCollection_parent_set",
nullptr,
nullptr);
2436 "Parent bone collection. Note that accessing this requires a scan of "
2437 "all the bone collections to find the parent.");
2446 "Index of this bone collection in the armature.collections_all array. Note that finding "
2447 "this index requires a scan of all the bone collections, so do access this with care.");
2452 prop,
"rna_BoneCollection_child_number_get",
"rna_BoneCollection_child_number_set",
nullptr);
2456 "Index of this collection into its parent's list of children. Note that finding "
2457 "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)
#define LISTBASE_FOREACH(type, var, list)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
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])
#define STRNCPY(dst, 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)
#define ID_IS_LINKED(_id)
@ 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
@ 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
Object is a sort of wrapper for general info.
#define RNA_POINTER_INVALIDATE(ptr)
#define RNA_TRANSLATION_PREC_DEFAULT
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
@ PROPOVERRIDE_NO_COMPARISON
@ PROPOVERRIDE_LIBRARY_INSERTION
constexpr PointerRNA PointerRNA_NULL
#define ND_BONE_COLLECTION
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])
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_listbase_begin(CollectionPropertyIterator *iter, ListBase *lb, IteratorSkipFunc skip)
void rna_iterator_array_begin(CollectionPropertyIterator *iter, void *ptr, int itemsize, int length, bool free_ptr, IteratorSkipFunc skip)
void RNA_property_update_main(Main *bmain, Scene *scene, PointerRNA *ptr, PropertyRNA *prop)
PointerRNA rna_pointer_inherit_refine(const PointerRNA *ptr, StructRNA *type, void *data)
PointerRNA RNA_pointer_create(ID *id, 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_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_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
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_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::@1329 internal
IDOverrideLibraryPropertyOperation * liboverride_operation
int collection_root_count
struct BoneCollection ** collection_array
void WM_main_add_notifier(uint type, void *reference)