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>2012-05-05 18:03:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-05 18:03:12 +0400
commita731e130432a98ab8228112027cd3eaa8ed700b1 (patch)
treee71dad8f907ccd4a73b7bbc1ad166eda2dfba9cf /source/blender/collada
parenta30dec8e5968ae6568184cfdc2e1a69bad0e39d6 (diff)
code cleanup: function naming, use BKE_*type* prefix.
Diffstat (limited to 'source/blender/collada')
-rw-r--r--source/blender/collada/AnimationImporter.cpp4
-rw-r--r--source/blender/collada/DocumentImporter.cpp10
-rw-r--r--source/blender/collada/MeshImporter.cpp2
-rw-r--r--source/blender/collada/SkinInfo.cpp4
-rw-r--r--source/blender/collada/TransformWriter.cpp2
-rw-r--r--source/blender/collada/collada_utils.cpp10
6 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp
index a72d51721ce..34f7efa9de0 100644
--- a/source/blender/collada/AnimationImporter.cpp
+++ b/source/blender/collada/AnimationImporter.cpp
@@ -324,7 +324,7 @@ void AnimationImporter::read_node_transform(COLLADAFW::Node *node, Object *ob)
TransformReader::get_node_mat(mat, node, &uid_animated_map, ob);
if (ob) {
copy_m4_m4(ob->obmat, mat);
- object_apply_mat4(ob, ob->obmat, 0, 0);
+ BKE_object_apply_mat4(ob, ob->obmat, 0, 0);
}
}
@@ -1800,7 +1800,7 @@ Object *AnimationImporter::get_joint_object(COLLADAFW::Node *root, COLLADAFW::No
job->parsubstr[0] = 0;
}
- where_is_object(scene, job);
+ BKE_object_where_is_calc(scene, job);
// after parenting and layer change
DAG_scene_sort(CTX_data_main(C), scene);
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp
index 1d315b6ea06..9216d7fa30e 100644
--- a/source/blender/collada/DocumentImporter.cpp
+++ b/source/blender/collada/DocumentImporter.cpp
@@ -230,7 +230,7 @@ void DocumentImporter::finish()
Base *base = object_in_scene(ob, sce);
if (base) {
BLI_remlink(&sce->base, base);
- free_libblock_us(&G.main->object, base->object);
+ BKE_libblock_free_us(&G.main->object, base->object);
if (sce->basact==base)
sce->basact= NULL;
MEM_freeN(base);
@@ -312,7 +312,7 @@ Object* DocumentImporter::create_camera_object(COLLADAFW::InstanceCamera *camera
ob->data = cam;
old_cam->id.us--;
if (old_cam->id.us == 0)
- free_libblock(&G.main->camera, old_cam);
+ BKE_libblock_free(&G.main->camera, old_cam);
return ob;
}
@@ -330,7 +330,7 @@ Object* DocumentImporter::create_lamp_object(COLLADAFW::InstanceLight *lamp, Sce
ob->data = la;
old_lamp->id.us--;
if (old_lamp->id.us == 0)
- free_libblock(&G.main->lamp, old_lamp);
+ BKE_libblock_free(&G.main->lamp, old_lamp);
return ob;
}
@@ -338,7 +338,7 @@ Object* DocumentImporter::create_instance_node(Object *source_ob, COLLADAFW::Nod
{
fprintf(stderr, "create <instance_node> under node id=%s from node id=%s\n", instance_node ? instance_node->getOriginalId().c_str() : NULL, source_node ? source_node->getOriginalId().c_str() : NULL);
- Object *obn = copy_object(source_ob);
+ Object *obn = BKE_object_copy(source_ob);
obn->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
scene_add_base(sce, obn);
@@ -359,7 +359,7 @@ Object* DocumentImporter::create_instance_node(Object *source_ob, COLLADAFW::Nod
}
// calc new matrix and apply
mult_m4_m4m4(obn->obmat, obn->obmat, mat);
- object_apply_mat4(obn, obn->obmat, 0, 0);
+ BKE_object_apply_mat4(obn, obn->obmat, 0, 0);
}
}
else {
diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp
index ba6be75e051..c20975145ac 100644
--- a/source/blender/collada/MeshImporter.cpp
+++ b/source/blender/collada/MeshImporter.cpp
@@ -914,7 +914,7 @@ Object *MeshImporter::create_mesh_object(COLLADAFW::Node *node, COLLADAFW::Insta
set_mesh(ob, uid_mesh_map[*geom_uid]);
- if (old_mesh->id.us == 0) free_libblock(&G.main->mesh, old_mesh);
+ if (old_mesh->id.us == 0) BKE_libblock_free(&G.main->mesh, old_mesh);
char layername[100];
layername[0] = '\0';
diff --git a/source/blender/collada/SkinInfo.cpp b/source/blender/collada/SkinInfo.cpp
index 0727ec21682..d807b049152 100644
--- a/source/blender/collada/SkinInfo.cpp
+++ b/source/blender/collada/SkinInfo.cpp
@@ -221,7 +221,7 @@ void SkinInfo::link_armature(bContext *C, Object *ob, std::map<COLLADAFW::Unique
((ArmatureModifierData *)md)->object = ob_arm;
copy_m4_m4(ob->obmat, bind_shape_matrix);
- object_apply_mat4(ob, ob->obmat, 0, 0);
+ BKE_object_apply_mat4(ob, ob->obmat, 0, 0);
#if 1
bc_set_parent(ob, ob_arm, C);
#else
@@ -229,7 +229,7 @@ void SkinInfo::link_armature(bContext *C, Object *ob, std::map<COLLADAFW::Unique
ob->parent = ob_arm;
ob->partype = PAROBJECT;
- what_does_parent(scene, ob, &workob);
+ BKE_object_workob_calc_parent(scene, ob, &workob);
invert_m4_m4(ob->parentinv, workob.obmat);
ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA;
diff --git a/source/blender/collada/TransformWriter.cpp b/source/blender/collada/TransformWriter.cpp
index 4974566bba1..fbd36cd6613 100644
--- a/source/blender/collada/TransformWriter.cpp
+++ b/source/blender/collada/TransformWriter.cpp
@@ -70,7 +70,7 @@ void TransformWriter::add_node_transform_ob(COLLADASW::Node& node, Object *ob)
copy_v3_v3(scale, ob->size);
ob->size[0] = ob->size[1] = ob->size[2] = 1.0f;
- object_to_mat4(ob, C);
+ BKE_object_to_mat4(ob, C);
copy_v3_v3(ob->size, scale);
mul_serie_m4(tmat, ob->parent->obmat, ob->parentinv, C, NULL, NULL, NULL, NULL, NULL);
diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp
index bd0f82fb0ac..d7ea74b7b04 100644
--- a/source/blender/collada/collada_utils.cpp
+++ b/source/blender/collada/collada_utils.cpp
@@ -88,7 +88,7 @@ int bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space)
if (is_parent_space) {
float mat[4][4];
// calc par->obmat
- where_is_object(sce, par);
+ BKE_object_where_is_calc(sce, par);
// move child obmat into world space
mult_m4_m4m4(mat, par->obmat, ob->obmat);
@@ -96,10 +96,10 @@ int bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space)
}
// apply child obmat (i.e. decompose it into rot/loc/size)
- object_apply_mat4(ob, ob->obmat, 0, 0);
+ BKE_object_apply_mat4(ob, ob->obmat, 0, 0);
// compute parentinv
- what_does_parent(sce, ob, &workob);
+ BKE_object_workob_calc_parent(sce, ob, &workob);
invert_m4_m4(ob->parentinv, workob.obmat);
ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA;
@@ -114,9 +114,9 @@ int bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space)
Object *bc_add_object(Scene *scene, int type, const char *name)
{
- Object *ob = add_only_object(type, name);
+ Object *ob = BKE_object_add_only_object(type, name);
- ob->data= add_obdata_from_type(type);
+ ob->data= BKE_object_obdata_add_from_type(type);
ob->lay= scene->lay;
ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;