Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_armature.c
| Show First 20 Lines • Show All 559 Lines • ▼ Show 20 Lines | static void rna_Armature_editbone_transform_update(Main *bmain, Scene *scene, PointerRNA *ptr) | ||||
| /* update our children if necessary */ | /* update our children if necessary */ | ||||
| for (child = arm->edbo->first; child; child = child->next) { | for (child = arm->edbo->first; child; child = child->next) { | ||||
| if (child->parent == ebone && (child->flag & BONE_CONNECTED)) { | if (child->parent == ebone && (child->flag & BONE_CONNECTED)) { | ||||
| copy_v3_v3(child->head, ebone->tail); | copy_v3_v3(child->head, ebone->tail); | ||||
| } | } | ||||
| } | } | ||||
| if (arm->flag & ARM_MIRROR_EDIT) { | if (arm->flag & ARM_MIRROR_EDIT) { | ||||
| eboflip = ED_armature_ebone_get_mirrored(arm->edbo, ebone); | ED_armature_ebone_transform_mirror_update(arm, ebone, false); | ||||
| if (eboflip) { | |||||
| eboflip->roll = -ebone->roll; | |||||
| eboflip->head[0] = -ebone->head[0]; | |||||
| eboflip->tail[0] = -ebone->tail[0]; | |||||
| /* update our parent */ | |||||
| if (eboflip->parent && eboflip->flag & BONE_CONNECTED) { | |||||
| copy_v3_v3(eboflip->parent->tail, eboflip->head); | |||||
| } | |||||
| /* update our children if necessary */ | |||||
| for (child = arm->edbo->first; child; child = child->next) { | |||||
| if (child->parent == eboflip && (child->flag & BONE_CONNECTED)) { | |||||
| copy_v3_v3(child->head, eboflip->tail); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | } | ||||
| rna_Armature_update_data(bmain, scene, ptr); | rna_Armature_update_data(bmain, scene, ptr); | ||||
| } | } | ||||
| static void rna_Armature_bones_next(CollectionPropertyIterator *iter) | static void rna_Armature_bones_next(CollectionPropertyIterator *iter) | ||||
| { | { | ||||
| ListBaseIterator *internal = &iter->internal.listbase; | ListBaseIterator *internal = &iter->internal.listbase; | ||||
| ▲ Show 20 Lines • Show All 850 Lines • Show Last 20 Lines | |||||