Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_conversions.c
| Context not available. | |||||
| for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { | for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { | ||||
| bone = pchan->bone; | bone = pchan->bone; | ||||
| if (PBONE_VISIBLE(arm, bone)) { | /* pchan->bone may be NULL for duplicated bones, see duplicateEditBoneObjects() comment | ||||
| if ((bone->flag & BONE_SELECTED)) | * Skip in this case too! */ | ||||
| bone->flag |= BONE_TRANSFORM; | if (bone) { | ||||
| else | if (PBONE_VISIBLE(arm, bone)) { | ||||
| bone->flag &= ~BONE_TRANSFORM; | if ((bone->flag & BONE_SELECTED)) | ||||
| bone->flag |= BONE_TRANSFORM; | |||||
| else | |||||
| bone->flag &= ~BONE_TRANSFORM; | |||||
| bone->flag &= ~BONE_HINGE_CHILD_TRANSFORM; | bone->flag &= ~BONE_HINGE_CHILD_TRANSFORM; | ||||
| bone->flag &= ~BONE_TRANSFORM_CHILD; | bone->flag &= ~BONE_TRANSFORM_CHILD; | ||||
| } | |||||
| else { | |||||
| bone->flag &= ~BONE_TRANSFORM; | |||||
| } | |||||
| } | } | ||||
| else | |||||
| bone->flag &= ~BONE_TRANSFORM; | |||||
| } | } | ||||
| /* make sure no bone can be transformed when a parent is transformed */ | /* make sure no bone can be transformed when a parent is transformed */ | ||||
| Context not available. | |||||
| /* now count, and check if we have autoIK or have to switch from translate to rotate */ | /* now count, and check if we have autoIK or have to switch from translate to rotate */ | ||||
| for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { | for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { | ||||
| bone = pchan->bone; | bone = pchan->bone; | ||||
| if (bone->flag & BONE_TRANSFORM) { | /* pchan->bone may be NULL for duplicated bones, see duplicateEditBoneObjects() comment | ||||
| * Skip in this case too! */ | |||||
| if (bone && bone->flag & BONE_TRANSFORM) { | |||||
| total++; | total++; | ||||
| if (has_translate_rotate != NULL) { | if (has_translate_rotate != NULL) { | ||||
| Context not available. | |||||
| flag |= INSERTKEY_MATRIX; | flag |= INSERTKEY_MATRIX; | ||||
| for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) { | for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) { | ||||
| if (pchan->bone->flag & BONE_TRANSFORM) { | /* pchan->bone may be NULL for duplicated bones, see duplicateEditBoneObjects() comment | ||||
| * Skip in this case too! */ | |||||
| if (pchan->bone && pchan->bone->flag & BONE_TRANSFORM) { | |||||
| ListBase dsources = {NULL, NULL}; | ListBase dsources = {NULL, NULL}; | ||||
| /* clear any 'unkeyed' flag it may have */ | /* clear any 'unkeyed' flag it may have */ | ||||
| Context not available. | |||||
| else { | else { | ||||
| /* tag channels that should have unkeyed data */ | /* tag channels that should have unkeyed data */ | ||||
| for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) { | for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) { | ||||
| if (pchan->bone->flag & BONE_TRANSFORM) { | /* pchan->bone may be NULL for duplicated bones, see duplicateEditBoneObjects() comment | ||||
| * Skip in this case too! */ | |||||
| if (pchan->bone && pchan->bone->flag & BONE_TRANSFORM) { | |||||
| /* tag this channel */ | /* tag this channel */ | ||||
| pchan->bone->flag |= BONE_UNKEYED; | pchan->bone->flag |= BONE_UNKEYED; | ||||
| } | } | ||||
| Context not available. | |||||
brecht: Explain why this code is needed in the comment rather than referring to the bug. Something like… | |||||
Not Done Inline ActionsCalling the DEG_id_tag_update() here seems good. brecht: Calling the `DEG_id_tag_update()` here seems good. | |||||
Explain why this code is needed in the comment rather than referring to the bug. Something like: