Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-03-06 05:41:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-03-06 06:16:38 +0300
commitb15c658801e191e09a4e9e8933a9ac79a3805e1b (patch)
treec840c2b20564898b1c7c528cba964bf485bb83a6 /source/blender/collada
parent07d13be678c6b8d5c5c793f664668831ac265f9e (diff)
Cleanup: keyframe API naming, high level keyframe API
- Split 'verify_fcurve' into two functions: ED_action_fcurve_ensure which adds the f-curve if needed. ED_action_fcurve_find which returns NULL when not found. Callers of ED_action_fcurve_find had unused 'group' argument which has been removed. - Rename verify_adt_action to ED_id_action_ensure It had an argument to add data which was always true, remove this instead of splitting in into a separate function.
Diffstat (limited to 'source/blender/collada')
-rw-r--r--source/blender/collada/AnimationImporter.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp
index 18ca6ae7a0f..715cd9e1a12 100644
--- a/source/blender/collada/AnimationImporter.cpp
+++ b/source/blender/collada/AnimationImporter.cpp
@@ -197,7 +197,7 @@ void AnimationImporter::add_fcurves_to_object(Main *bmain,
bAction *act;
if (!ob->adt || !ob->adt->action) {
- act = verify_adt_action(bmain, (ID *)&ob->id, 1);
+ act = ED_id_action_ensure(bmain, (ID *)&ob->id);
}
else {
act = ob->adt->action;
@@ -941,7 +941,7 @@ void AnimationImporter::apply_matrix_curves(Object *ob,
}
}
Main *bmain = CTX_data_main(mContext);
- verify_adt_action(bmain, (ID *)&ob->id, 1);
+ ED_id_action_ensure(bmain, (ID *)&ob->id);
ListBase *curves = &ob->adt->action->curves;
@@ -1006,7 +1006,7 @@ static ListBase &get_animation_curves(Main *bmain, Material *ma)
{
bAction *act;
if (!ma->adt || !ma->adt->action) {
- act = verify_adt_action(bmain, (ID *)&ma->id, 1);
+ act = ED_id_action_ensure(bmain, (ID *)&ma->id);
}
else {
act = ma->adt->action;
@@ -1052,7 +1052,7 @@ void AnimationImporter::translate_Animations(
}
if (!ob->adt || !ob->adt->action) {
- act = verify_adt_action(bmain, (ID *)&ob->id, 1);
+ act = ED_id_action_ensure(bmain, (ID *)&ob->id);
}
else {
act = ob->adt->action;
@@ -1115,7 +1115,7 @@ void AnimationImporter::translate_Animations(
if ((animType->light) != 0) {
Light *lamp = (Light *)ob->data;
if (!lamp->adt || !lamp->adt->action) {
- act = verify_adt_action(bmain, (ID *)&lamp->id, 1);
+ act = ED_id_action_ensure(bmain, (ID *)&lamp->id);
}
else {
act = lamp->adt->action;
@@ -1153,7 +1153,7 @@ void AnimationImporter::translate_Animations(
Camera *cam = (Camera *)ob->data;
if (!cam->adt || !cam->adt->action) {
- act = verify_adt_action(bmain, (ID *)&cam->id, 1);
+ act = ED_id_action_ensure(bmain, (ID *)&cam->id);
}
else {
act = cam->adt->action;
@@ -1209,7 +1209,7 @@ void AnimationImporter::translate_Animations(
Material *ma = BKE_object_material_get(ob, 1);
if (!ma->adt || !ma->adt->action) {
- act = verify_adt_action(bmain, (ID *)&ma->id, 1);
+ act = ED_id_action_ensure(bmain, (ID *)&ma->id);
}
else {
act = ma->adt->action;
@@ -1390,7 +1390,7 @@ void AnimationImporter::add_bone_animation_sampled(Object *ob,
}
}
Main *bmain = CTX_data_main(mContext);
- verify_adt_action(bmain, (ID *)&ob->id, 1);
+ ED_id_action_ensure(bmain, (ID *)&ob->id);
/* add curves */
for (int i = 0; i < totcu; i++) {
@@ -1823,7 +1823,7 @@ Object *AnimationImporter::translate_animation_OLD(
#endif
}
Main *bmain = CTX_data_main(mContext);
- verify_adt_action(bmain, (ID *)&ob->id, 1);
+ ED_id_action_ensure(bmain, (ID *)&ob->id);
ListBase *curves = &ob->adt->action->curves;
@@ -2129,7 +2129,7 @@ Object *AnimationImporter::get_joint_object(COLLADAFW::Node *root,
mul_v3_fl(job->scale, 0.5f);
DEG_id_tag_update(&job->id, ID_RECALC_TRANSFORM);
- verify_adt_action((ID *)&job->id, 1);
+ ED_id_action_ensure((ID *)&job->id);
job->rotmode = ROT_MODE_QUAT;