Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_conversions.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 1,319 Lines • ▼ Show 20 Lines | static void createTransPose(TransInfo *t) | ||||
| t->flag |= T_POSE; | t->flag |= T_POSE; | ||||
| /* disable PET, its not usable in pose mode yet [#32444] */ | /* disable PET, its not usable in pose mode yet [#32444] */ | ||||
| t->flag &= ~T_PROP_EDIT_ALL; | t->flag &= ~T_PROP_EDIT_ALL; | ||||
| } | } | ||||
| void restoreBones(TransDataContainer *tc) | void restoreBones(TransDataContainer *tc) | ||||
| { | { | ||||
| bArmature *arm = tc->obedit->data; | bArmature *arm; | ||||
| BoneInitData *bid = tc->custom.type.data; | BoneInitData *bid = tc->custom.type.data; | ||||
| EditBone *ebo; | EditBone *ebo; | ||||
| if (tc->obedit) { | |||||
| arm = tc->obedit->data; | |||||
| } | |||||
| else if (tc->poseobj) { | |||||
| arm = tc->poseobj->data; | |||||
| } | |||||
brecht: This is going to give a compiler warning about `arm` being possibly used uninitialized. Can be… | |||||
| while (bid->bone) { | while (bid->bone) { | ||||
| ebo = bid->bone; | ebo = bid->bone; | ||||
| ebo->dist = bid->dist; | ebo->dist = bid->dist; | ||||
| ebo->rad_tail = bid->rad_tail; | ebo->rad_tail = bid->rad_tail; | ||||
| ebo->roll = bid->roll; | ebo->roll = bid->roll; | ||||
| ebo->xwidth = bid->xwidth; | ebo->xwidth = bid->xwidth; | ||||
| ebo->zwidth = bid->zwidth; | ebo->zwidth = bid->zwidth; | ||||
| ▲ Show 20 Lines • Show All 8,224 Lines • Show Last 20 Lines | |||||
This is going to give a compiler warning about arm being possibly used uninitialized. Can be solved like this:
else { BLI_assert(tc->poseobj != NULL); arm = tc->poseobj->data; }