Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/armature_update.c
| Show First 20 Lines • Show All 824 Lines • ▼ Show 20 Lines | void BKE_pose_splineik_evaluate(struct Depsgraph *depsgraph, | ||||
| BLI_assert(object->type == OB_ARMATURE); | BLI_assert(object->type == OB_ARMATURE); | ||||
| const float ctime = BKE_scene_frame_get(scene); /* not accurate... */ | const float ctime = BKE_scene_frame_get(scene); /* not accurate... */ | ||||
| if (armature->flag & ARM_RESTPOS) { | if (armature->flag & ARM_RESTPOS) { | ||||
| return; | return; | ||||
| } | } | ||||
| BKE_splineik_execute_tree(depsgraph, scene, object, rootchan, ctime); | BKE_splineik_execute_tree(depsgraph, scene, object, rootchan, ctime); | ||||
| } | } | ||||
| /* Common part for both original and proxy armatrues. */ | |||||
| static void pose_eval_done_common(struct Depsgraph *depsgraph, Object *object) | |||||
| { | |||||
| const bArmature *armature = (bArmature *)object->data; | |||||
| if (armature->edbo != NULL) { | |||||
| return; | |||||
| } | |||||
| bPose *pose = object->pose; | |||||
| UNUSED_VARS_NDEBUG(pose); | |||||
| BLI_assert(pose != NULL); | |||||
| BKE_object_eval_boundbox(depsgraph, object); | |||||
| } | |||||
| static void pose_eval_cleanup_common(Object *object) | static void pose_eval_cleanup_common(Object *object) | ||||
| { | { | ||||
| bPose *pose = object->pose; | bPose *pose = object->pose; | ||||
| BLI_assert(pose != NULL); | BLI_assert(pose != NULL); | ||||
| BLI_assert(pose->chan_array != NULL || BLI_listbase_is_empty(&pose->chanbase)); | BLI_assert(pose->chan_array != NULL || BLI_listbase_is_empty(&pose->chanbase)); | ||||
| UNUSED_VARS_NDEBUG(pose); | UNUSED_VARS_NDEBUG(pose); | ||||
| } | } | ||||
| void BKE_pose_eval_done(struct Depsgraph *depsgraph, Object *object) | void BKE_pose_eval_done(struct Depsgraph *depsgraph, Object *object) | ||||
| { | { | ||||
| bPose *pose = object->pose; | bPose *pose = object->pose; | ||||
| BLI_assert(pose != NULL); | BLI_assert(pose != NULL); | ||||
| UNUSED_VARS_NDEBUG(pose); | UNUSED_VARS_NDEBUG(pose); | ||||
| DEG_debug_print_eval(depsgraph, __func__, object->id.name, object); | DEG_debug_print_eval(depsgraph, __func__, object->id.name, object); | ||||
| BLI_assert(object->type == OB_ARMATURE); | BLI_assert(object->type == OB_ARMATURE); | ||||
| pose_eval_done_common(depsgraph, object); | |||||
| } | } | ||||
| void BKE_pose_eval_cleanup(struct Depsgraph *depsgraph, Scene *scene, Object *object) | void BKE_pose_eval_cleanup(struct Depsgraph *depsgraph, Scene *scene, Object *object) | ||||
| { | { | ||||
| bPose *pose = object->pose; | bPose *pose = object->pose; | ||||
| BLI_assert(pose != NULL); | BLI_assert(pose != NULL); | ||||
| UNUSED_VARS_NDEBUG(pose); | UNUSED_VARS_NDEBUG(pose); | ||||
| const float ctime = BKE_scene_frame_get(scene); /* not accurate... */ | const float ctime = BKE_scene_frame_get(scene); /* not accurate... */ | ||||
| Show All 11 Lines | void BKE_pose_eval_proxy_init(struct Depsgraph *depsgraph, Object *object) | ||||
| BLI_assert(object->pose->chan_array != NULL || BLI_listbase_is_empty(&object->pose->chanbase)); | BLI_assert(object->pose->chan_array != NULL || BLI_listbase_is_empty(&object->pose->chanbase)); | ||||
| } | } | ||||
| void BKE_pose_eval_proxy_done(struct Depsgraph *depsgraph, Object *object) | void BKE_pose_eval_proxy_done(struct Depsgraph *depsgraph, Object *object) | ||||
| { | { | ||||
| BLI_assert(ID_IS_LINKED(object) && object->proxy_from != NULL); | BLI_assert(ID_IS_LINKED(object) && object->proxy_from != NULL); | ||||
| DEG_debug_print_eval(depsgraph, __func__, object->id.name, object); | DEG_debug_print_eval(depsgraph, __func__, object->id.name, object); | ||||
| pose_eval_done_common(depsgraph, object); | |||||
| } | } | ||||
| void BKE_pose_eval_proxy_cleanup(struct Depsgraph *depsgraph, Object *object) | void BKE_pose_eval_proxy_cleanup(struct Depsgraph *depsgraph, Object *object) | ||||
| { | { | ||||
| BLI_assert(ID_IS_LINKED(object) && object->proxy_from != NULL); | BLI_assert(ID_IS_LINKED(object) && object->proxy_from != NULL); | ||||
| DEG_debug_print_eval(depsgraph, __func__, object->id.name, object); | DEG_debug_print_eval(depsgraph, __func__, object->id.name, object); | ||||
| pose_eval_cleanup_common(object); | pose_eval_cleanup_common(object); | ||||
| } | } | ||||
| Show All 33 Lines | |||||