merge from master
[blender.git] / source / blender / collada / ControllerExporter.cpp
index 4afe71f47ba8a51828095402e84541449749eb5d..ae99e6bafdece1e9d4bdb09827bdff3cbe2a26a2 100644 (file)
@@ -98,17 +98,15 @@ bool ControllerExporter::add_instance_controller(Object *ob)
                write_bone_URLs(ins, ob_arm, bone);
        }
 
-       InstanceWriter::add_material_bindings(ins.getBindMaterial(),
-                   ob, 
-                       this->export_settings->active_uv_only,
-                       this->export_settings->export_texture_type);
+       InstanceWriter::add_material_bindings(ins.getBindMaterial(), ob, this->export_settings->active_uv_only);
                
        ins.add();
        return true;
 }
 
-void ControllerExporter::export_controllers(Scene *sce)
+void ControllerExporter::export_controllers(const struct EvaluationContext *eval_ctx, Scene *sce)
 {
+       this->eval_ctx = eval_ctx;
        scene = sce;
 
        openLibrary();
@@ -200,7 +198,7 @@ void ControllerExporter::export_skin_controller(Object *ob, Object *ob_arm)
        bool use_instantiation = this->export_settings->use_object_instantiation;
        Mesh *me;
 
-       me = bc_get_mesh_copy(scene,
+       me = bc_get_mesh_copy(eval_ctx, scene,
                                ob,
                                this->export_settings->export_mesh_type,
                                this->export_settings->apply_modifiers,
@@ -302,7 +300,7 @@ void ControllerExporter::export_morph_controller(Object *ob, Key *key)
        bool use_instantiation = this->export_settings->use_object_instantiation;
        Mesh *me;
 
-       me = bc_get_mesh_copy(scene,
+       me = bc_get_mesh_copy(eval_ctx, scene,
                                ob,
                                this->export_settings->export_mesh_type,
                                this->export_settings->apply_modifiers,
@@ -497,7 +495,7 @@ std::string ControllerExporter::add_inv_bind_mats_source(Object *ob_arm, ListBas
        // put armature in rest position
        if (!(arm->flag & ARM_RESTPOS)) {
                arm->flag |= ARM_RESTPOS;
-               BKE_pose_where_is(scene, ob_arm);
+               BKE_pose_where_is(eval_ctx, scene, ob_arm);
        }
 
        for (bDeformGroup *def = (bDeformGroup *)defbase->first; def; def = def->next) {
@@ -545,7 +543,7 @@ std::string ControllerExporter::add_inv_bind_mats_source(Object *ob_arm, ListBas
        // back from rest positon
        if (!(flag & ARM_RESTPOS)) {
                arm->flag = flag;
-               BKE_pose_where_is(scene, ob_arm);
+               BKE_pose_where_is(eval_ctx, scene, ob_arm);
        }
 
        source.finish();