Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/action.c
| Show First 20 Lines • Show All 650 Lines • ▼ Show 20 Lines | bPoseChannel *BKE_pose_channel_ensure(bPose *pose, const char *name) | ||||
| /* If not, create it and add it */ | /* If not, create it and add it */ | ||||
| chan = MEM_callocN(sizeof(bPoseChannel), "verifyPoseChannel"); | chan = MEM_callocN(sizeof(bPoseChannel), "verifyPoseChannel"); | ||||
| BKE_pose_channel_session_uuid_generate(chan); | BKE_pose_channel_session_uuid_generate(chan); | ||||
| BLI_strncpy(chan->name, name, sizeof(chan->name)); | BLI_strncpy(chan->name, name, sizeof(chan->name)); | ||||
| chan->custom_scale = 1.0f; | copy_v3_fl(chan->custom_scale_xyz, 1.0f); | ||||
zeddb: Is there any reason you still set this variable?
It shouldn't be used anymore, so no need to… | |||||
| zero_v3(chan->custom_translation); | |||||
Done Inline ActionsThis is just zero_v3(chan->custom_offset_loc); same below. sybren: This is just `zero_v3(chan->custom_offset_loc)`; same below. | |||||
| zero_v3(chan->custom_rotation_euler); | |||||
Done Inline ActionsThis is just copy_v3_fl(chan->custom_scale_xyz, 1.0f) sybren: This is just `copy_v3_fl(chan->custom_scale_xyz, 1.0f)` | |||||
| /* init vars to prevent math errors */ | /* init vars to prevent math errors */ | ||||
| unit_qt(chan->quat); | unit_qt(chan->quat); | ||||
| unit_axis_angle(chan->rotAxis, &chan->rotAngle); | unit_axis_angle(chan->rotAxis, &chan->rotAngle); | ||||
| chan->size[0] = chan->size[1] = chan->size[2] = 1.0f; | chan->size[0] = chan->size[1] = chan->size[2] = 1.0f; | ||||
| chan->scale_in_x = chan->scale_in_y = 1.0f; | chan->scale_in_x = chan->scale_in_y = 1.0f; | ||||
| chan->scale_out_x = chan->scale_out_y = 1.0f; | chan->scale_out_x = chan->scale_out_y = 1.0f; | ||||
| ▲ Show 20 Lines • Show All 562 Lines • ▼ Show 20 Lines | if (pchan_from->prop) { | ||||
| pchan->prop = IDP_CopyProperty(pchan_from->prop); | pchan->prop = IDP_CopyProperty(pchan_from->prop); | ||||
| } | } | ||||
| /* custom shape */ | /* custom shape */ | ||||
| pchan->custom = pchan_from->custom; | pchan->custom = pchan_from->custom; | ||||
| if (pchan->custom) { | if (pchan->custom) { | ||||
| id_us_plus(&pchan->custom->id); | id_us_plus(&pchan->custom->id); | ||||
| } | } | ||||
| copy_v3_v3(pchan->custom_scale_xyz, pchan_from->custom_scale_xyz); | |||||
| copy_v3_v3(pchan->custom_translation, pchan_from->custom_translation); | |||||
| copy_v3_v3(pchan->custom_rotation_euler, pchan_from->custom_rotation_euler); | |||||
| pchan->custom_scale = pchan_from->custom_scale; | |||||
| pchan->drawflag = pchan_from->drawflag; | pchan->drawflag = pchan_from->drawflag; | ||||
Done Inline ActionsI'm guessing custom_shape_hide should be copied here as well? zeddb: I'm guessing `custom_shape_hide` should be copied here as well? | |||||
Done Inline ActionsI added custom_shape_hide (Python) on the drawflag. shirakawa: I added custom_shape_hide (Python) on the drawflag. | |||||
Done Inline ActionsYou are totally correct! zeddb: You are totally correct!
My bad :) | |||||
| } | } | ||||
| /* checks for IK constraint, Spline IK, and also for Follow-Path constraint. | /* checks for IK constraint, Spline IK, and also for Follow-Path constraint. | ||||
| * can do more constraints flags later | * can do more constraints flags later | ||||
| */ | */ | ||||
| /* pose should be entirely OK */ | /* pose should be entirely OK */ | ||||
| void BKE_pose_update_constraint_flags(bPose *pose) | void BKE_pose_update_constraint_flags(bPose *pose) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 763 Lines • Show Last 20 Lines | |||||
Is there any reason you still set this variable?
It shouldn't be used anymore, so no need to assign it a value.