Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/action.c
| Show First 20 Lines • Show All 588 Lines • ▼ Show 20 Lines | if (copy_constraints) { | ||||
| pchan->mpath = animviz_copy_motionpath(pchan->mpath); | pchan->mpath = animviz_copy_motionpath(pchan->mpath); | ||||
| } | } | ||||
| if (pchan->prop) { | if (pchan->prop) { | ||||
| pchan->prop = IDP_CopyProperty_ex(pchan->prop, flag); | pchan->prop = IDP_CopyProperty_ex(pchan->prop, flag); | ||||
| } | } | ||||
| pchan->draw_data = NULL; /* Drawing cache, no need to copy. */ | pchan->draw_data = NULL; /* Drawing cache, no need to copy. */ | ||||
| /* Runtime data, no need to copy. */ | |||||
| memset(&pchan->runtime, 0, sizeof(pchan->runtime)); | |||||
| } | } | ||||
| /* for now, duplicate Bone Groups too when doing this */ | /* for now, duplicate Bone Groups too when doing this */ | ||||
| if (copy_constraints) { | if (copy_constraints) { | ||||
| BLI_duplicatelist(&outPose->agroups, &src->agroups); | BLI_duplicatelist(&outPose->agroups, &src->agroups); | ||||
| } | } | ||||
| *dst = outPose; | *dst = outPose; | ||||
| ▲ Show 20 Lines • Show All 180 Lines • ▼ Show 20 Lines | void BKE_pose_channel_free_ex(bPoseChannel *pchan, bool do_id_user) | ||||
| if (pchan->prop) { | if (pchan->prop) { | ||||
| IDP_FreeProperty(pchan->prop); | IDP_FreeProperty(pchan->prop); | ||||
| MEM_freeN(pchan->prop); | MEM_freeN(pchan->prop); | ||||
| } | } | ||||
| /* Cached data, for new draw manager rendering code. */ | /* Cached data, for new draw manager rendering code. */ | ||||
| MEM_SAFE_FREE(pchan->draw_data); | MEM_SAFE_FREE(pchan->draw_data); | ||||
| /* Cached B-Bone shape data. */ | |||||
| BKE_pose_channel_free_bbone_cache(pchan); | |||||
| } | |||||
| /** Deallocates runtime cache of a pose channel's B-Bone shape. */ | |||||
| void BKE_pose_channel_free_bbone_cache(bPoseChannel *pchan) | |||||
| { | |||||
| bPoseChannelRuntime *runtime = &pchan->runtime; | |||||
| runtime->bbone_segments = 0; | |||||
| MEM_SAFE_FREE(runtime->bbone_rest_mats); | |||||
| MEM_SAFE_FREE(runtime->bbone_pose_mats); | |||||
| MEM_SAFE_FREE(runtime->bbone_deform_mats); | |||||
| MEM_SAFE_FREE(runtime->bbone_dual_quats); | |||||
| } | } | ||||
| void BKE_pose_channel_free(bPoseChannel *pchan) | void BKE_pose_channel_free(bPoseChannel *pchan) | ||||
| { | { | ||||
| BKE_pose_channel_free_ex(pchan, true); | BKE_pose_channel_free_ex(pchan, true); | ||||
| } | } | ||||
| /** | /** | ||||
| ▲ Show 20 Lines • Show All 664 Lines • Show Last 20 Lines | |||||