Merge branch 'master' into blender2.8
[blender.git] / source / blender / collada / ControllerExporter.cpp
index 5673d33fcbf248abb726dc94dd79bf11ebb2d3dd..6cb1e58db6ed70beaae9eacd2583b418e09f10bb 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(Main *bmain, Scene *sce)
+void ControllerExporter::export_controllers(Main *bmain, Depsgraph *depsgraph, Scene *sce)
 {
+       this->depsgraph = depsgraph;
        m_bmain = bmain;
        scene = sce;
 
@@ -203,6 +201,7 @@ void ControllerExporter::export_skin_controller(Object *ob, Object *ob_arm)
 
        me = bc_get_mesh_copy(
                                m_bmain,
+                               depsgraph,
                                scene,
                                ob,
                                this->export_settings->export_mesh_type,
@@ -307,6 +306,7 @@ void ControllerExporter::export_morph_controller(Object *ob, Key *key)
 
        me = bc_get_mesh_copy(
                                m_bmain,
+                               depsgraph,
                                scene,
                                ob,
                                this->export_settings->export_mesh_type,
@@ -502,7 +502,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(depsgraph, scene, ob_arm);
        }
 
        for (bDeformGroup *def = (bDeformGroup *)defbase->first; def; def = def->next) {
@@ -550,7 +550,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(depsgraph, scene, ob_arm);
        }
 
        source.finish();