Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_convert_armature.c
| Show First 20 Lines • Show All 679 Lines • ▼ Show 20 Lines | if (arm->flag & ARM_RESTPOS) { | ||||
| tc->data_len = 0; | tc->data_len = 0; | ||||
| continue; | continue; | ||||
| } | } | ||||
| } | } | ||||
| if (mirror) { | if (mirror) { | ||||
| int total_mirrored = 0; | int total_mirrored = 0; | ||||
| LISTBASE_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) { | LISTBASE_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) { | ||||
| /* Clear the MIRROR flag from previous runs. */ | |||||
| pchan->bone->flag &= ~BONE_TRANSFORM_MIRROR; | |||||
| if ((pchan->bone->flag & BONE_TRANSFORM) && | if ((pchan->bone->flag & BONE_TRANSFORM) && | ||||
| BKE_pose_channel_get_mirrored(ob->pose, pchan->name)) { | BKE_pose_channel_get_mirrored(ob->pose, pchan->name)) { | ||||
| total_mirrored++; | total_mirrored++; | ||||
| } | } | ||||
| } | } | ||||
| PoseInitData_Mirror *pid = MEM_mallocN((total_mirrored + 1) * sizeof(PoseInitData_Mirror), | PoseInitData_Mirror *pid = MEM_mallocN((total_mirrored + 1) * sizeof(PoseInitData_Mirror), | ||||
| "PoseInitData_Mirror"); | "PoseInitData_Mirror"); | ||||
| ▲ Show 20 Lines • Show All 399 Lines • Show Last 20 Lines | |||||