Commit: 908b6960c01ffb1665af56ff6f03aaa3eac5366a
Author: Campbell Barton
Date:   Fri Jun 8 08:10:35 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB908b6960c01ffb1665af56ff6f03aaa3eac5366a

Merge branch 'master' into blender2.8

===================================================================



===================================================================

diff --cc source/blender/blenfont/intern/blf_internal_types.h
index 5b9d3f1eb5b,5723f08d44b..d7b526735d1
--- a/source/blender/blenfont/intern/blf_internal_types.h
+++ b/source/blender/blenfont/intern/blf_internal_types.h
@@@ -204,11 -174,9 +204,11 @@@ typedef struct FontBLF 
  
        /* angle in radians. */
        float angle;
-       
+ 
 +#if 0 /* BLF_BLUR_ENABLE */
        /* blur: 3 or 5 large kernel */
        int blur;
 +#endif
  
        /* shadow level. */
        int shadow;
diff --cc source/blender/collada/AnimationExporter.cpp
index fc4bbea108b,bf371332fd0..95298986f5a
--- a/source/blender/collada/AnimationExporter.cpp
+++ b/source/blender/collada/AnimationExporter.cpp
@@@ -728,9 -728,9 +728,9 @@@ void AnimationExporter::sample_and_writ
                dae_baked_animation(fra, ob_arm, bone);
        }
  
-       if (flag & ARM_RESTPOS) 
+       if (flag & ARM_RESTPOS)
                arm->flag = flag;
 -      BKE_pose_where_is(scene, ob_arm);
 +      BKE_pose_where_is(depsgraph, scene, ob_arm);
  }
  
  void AnimationExporter::dae_baked_animation(std::vector<float> &fra, Object 
*ob_arm, Bone *bone)
@@@ -1315,18 -1315,17 +1315,18 @@@ std::string AnimationExporter::create_4
                float frame = *it;
  
                float ctime = BKE_scene_frame_get_from_ctime(scene, frame);
 -              bc_update_scene(scene, ctime);
 +              bc_update_scene(depsgraph, scene, ctime);
                if (is_bone_animation) {
 +
                        if (pchan->flag & POSE_CHAIN) {
                                enable_fcurves(ob->adt->action, NULL);
 -                              BKE_animsys_evaluate_animdata(scene, &ob->id, 
ob->adt, ctime, ADT_RECALC_ALL);
 -                              BKE_pose_where_is(scene, ob);
 +                              BKE_animsys_evaluate_animdata(depsgraph, scene, 
&ob->id, ob->adt, ctime, ADT_RECALC_ALL);
 +                              BKE_pose_where_is(depsgraph, scene, ob);
                        }
                        else {
 -                              BKE_pose_where_is_bone(scene, ob, pchan, ctime, 
1);
 +                              BKE_pose_where_is_bone(depsgraph, scene, ob, 
pchan, ctime, 1);
                        }
-                       
+ 
                        // compute bone local mat
                        if (bone->parent) {
                                invert_m4_m4(ipar, parchan->pose_mat);
@@@ -1842,9 -1841,9 +1842,9 @@@ void AnimationExporter::sample_and_writ
        // exit rest position
        if (flag & ARM_RESTPOS) {
                arm->flag &= ~ARM_RESTPOS;
 -              BKE_pose_where_is(scene, ob_arm);
 +              BKE_pose_where_is(depsgraph, scene, ob_arm);
        }
-       //v array will hold all values which will be exported. 
+       //v array will hold all values which will be exported.
        if (fra.size()) {
                float *values = (float *)MEM_callocN(sizeof(float) * 3 * 
fra.size(), "temp. anim frames");
                sample_animation(values, fra, transform_type, bone, ob_arm, 
pchan);
@@@ -1870,9 -1869,9 +1870,9 @@@
        }
  
        // restore restpos
-       if (flag & ARM_RESTPOS) 
+       if (flag & ARM_RESTPOS)
                arm->flag = flag;
 -      BKE_pose_where_is(scene, ob_arm);
 +      BKE_pose_where_is(depsgraph, scene, ob_arm);
  }
  
  void AnimationExporter::sample_animation(float *v, std::vector<float> 
&frames, int type, Bone *bone, Object *ob_arm, bPoseChannel *pchan)
diff --cc source/blender/collada/AnimationExporter.h
index 2ed0a92d89c,36968d3edef..a50bcaf0ef4
--- a/source/blender/collada/AnimationExporter.h
+++ b/source/blender/collada/AnimationExporter.h
@@@ -99,9 -97,10 +99,9 @@@ public
        }
  
        bool exportAnimations(Scene *sce);
 -
        // called for each exported object
-       void operator() (Object *ob); 
-       
+       void operator() (Object *ob);
+ 
  protected:
        const ExportSettings *export_settings;
  
diff --cc source/blender/collada/ArmatureExporter.cpp
index c50de1ef72e,52f7c5627b9..85b9d3297ca
--- a/source/blender/collada/ArmatureExporter.cpp
+++ b/source/blender/collada/ArmatureExporter.cpp
@@@ -117,8 -117,11 +117,8 @@@ bool ArmatureExporter::add_instance_con
                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;
  }
diff --cc source/blender/collada/ArmatureImporter.cpp
index 6bf6087c054,cfb25f5d117..19f174d4840
--- a/source/blender/collada/ArmatureImporter.cpp
+++ b/source/blender/collada/ArmatureImporter.cpp
@@@ -55,13 -54,12 +55,13 @@@ static const char *bc_get_joint_name(T 
  }
  
  
 -ArmatureImporter::ArmatureImporter(UnitConverter *conv, MeshImporterBase 
*mesh, Scene *sce, const ImportSettings *import_settings) :
 +ArmatureImporter::ArmatureImporter(UnitConverter *conv, MeshImporterBase 
*mesh, Scene *sce, ViewLayer *view_layer, const ImportSettings 
*import_settings) :
        TransformReader(conv),
        scene(sce),
 +      view_layer(view_layer),
        unit_converter(conv),
        import_settings(import_settings),
-       empty(NULL), 
+       empty(NULL),
        mesh_importer(mesh) {
  }
  
@@@ -410,8 -408,8 +410,8 @@@ void ArmatureImporter::set_euler_rotmod
  Object *ArmatureImporter::get_empty_for_leaves()
  {
        if (empty) return empty;
-       
+ 
 -      empty = bc_add_object(scene, OB_EMPTY, NULL);
 +      empty = bc_add_object(scene, view_layer, OB_EMPTY, NULL);
        empty->empty_drawtype = OB_EMPTY_SPHERE;
  
        return empty;
diff --cc source/blender/collada/ControllerExporter.cpp
index f6dbc965b42,c89e0f1ec62..122094e33a6
--- a/source/blender/collada/ControllerExporter.cpp
+++ b/source/blender/collada/ControllerExporter.cpp
@@@ -98,8 -98,11 +98,8 @@@ bool ControllerExporter::add_instance_c
                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;
  }
diff --cc source/blender/collada/DocumentExporter.cpp
index 2e5d1757c4c,f1838b9dbb6..9e78c164dad
--- a/source/blender/collada/DocumentExporter.cpp
+++ b/source/blender/collada/DocumentExporter.cpp
@@@ -292,9 -293,9 +292,9 @@@ int DocumentExporter::exportCurrentScen
        // <library_controllers>
        ArmatureExporter arm_exporter(writer, this->export_settings);
        ControllerExporter controller_exporter(writer, this->export_settings);
-       if (bc_has_object_type(export_set, OB_ARMATURE) || 
this->export_settings->include_shapekeys) 
+       if (bc_has_object_type(export_set, OB_ARMATURE) || 
this->export_settings->include_shapekeys)
        {
 -              controller_exporter.export_controllers(sce);
 +              controller_exporter.export_controllers(depsgraph, sce);
        }
  
        // <library_visual_scenes>
@@@ -303,11 -304,11 +303,11 @@@
  
        if (this->export_settings->include_animations) {
                // <library_animations>
 -              AnimationExporter ae(writer, this->export_settings);
 +              AnimationExporter ae(depsgraph, writer, this->export_settings);
                ae.exportAnimations(sce);
        }
 -      se.exportScene(C, sce);
 +      se.exportScene(C, depsgraph, sce);
-       
+ 
        // <scene>
        std::string scene_name(translate_id(id_name(sce)));
        COLLADASW::Scene scene(writer, 
COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING,
diff --cc source/blender/collada/DocumentImporter.cpp
index 30e32c346ee,4173a024552..ae573fec0d8
--- a/source/blender/collada/DocumentImporter.cpp
+++ b/source/blender/collada/DocumentImporter.cpp
@@@ -270,9 -274,9 +270,9 @@@ void DocumentImporter::finish(
                }
                libnode_ob.clear();
  
 -              DAG_relations_tag_update(bmain);
 +              DEG_relations_tag_update(bmain);
        }
-       
+ 
        bc_match_scale(objects_to_scale, unit_converter, 
!this->import_settings->import_units);
  
        delete objects_to_scale;
@@@ -767,14 -797,10 +767,14 @@@ void DocumentImporter::write_profile_CO
  {
        COLLADAFW::EffectCommon::ShaderType shader = ef->getShaderType();
  
 +      // TODO: add back texture and extended material parameter support
-       
++
        // blinn
        if (shader == COLLADAFW::EffectCommon::SHADER_BLINN) {
 +#if 0
                ma->spec_shader = MA_SPEC_BLINN;
                ma->spec = ef->getShininess().getFloatValue();
 +#endif
        }
        // phong
        else if (shader == COLLADAFW::EffectCommon::SHADER_PHONG) {
@@@ -791,20 -813,19 +791,20 @@@
        }
        // default - lambert
        else {
 +#if 0
                ma->diff_shader = MA_DIFF_LAMBERT;
                fprintf(stderr, "Current shader type is not supported, default 
to lambert.\n");
 +#endif
        }
        // reflectivity
 -      ma->ray_mirror = ef->getReflectivity().getFloatValue();
 +      ma->metallic = ef->getReflectivity().getFloatValue();
        // index of refraction
 +#if 0
        ma->ang = ef->getIndexOfRefraction().getFloatValue();
 +#endif
-       
+ 
 -      int i = 0;
        COLLADAFW::Color col;
-       
 -      MTex *mtex = NULL;
 -      TexIndexTextureArrayMap texindex_texarray_map;
+ 
        // DIFFUSE
        // color
        if (ef->getDiffuse().isColor()) {
@@@ -815,9 -840,13 +815,9 @@@
        }
        // texture
        else if (ef->getDiffuse().isTexture()) {
 +#if 0
-               COLLADAFW::Texture ctex = ef->getDiffuse().getTexture(); 
+               COLLADAFW::Texture ctex = ef->getDiffuse().getTexture();
 -              mtex = create_texture(ef, ctex, ma, i, texindex_texarray_map);
 -              if (mtex != NULL) {
 -                      mtex->mapto = MAP_COL;
 -                      ma->texact = (int)i;
 -                      i++;
 -              }
 +#endif
        }
        // AMBIENT
        // color
@@@ -828,9 -858,12 +828,9 @@@
        }
        // texture
        else if (ef->getAmbient().isTexture()) {
 +#if 0
-               COLLADAFW::Texture ctex = ef->getAmbient().getTexture(); 
+               COLLADAFW::Texture ctex = ef->getAmbient().getTexture();
 -              mtex = create_texture(ef, ctex, ma, i, texindex_texarray_map);
 -              if (mtex != NULL) {
 -                      mtex->mapto = MAP_AMB;
 -                      i++;
 -              }
 +#endif
        }
        // SPECULAR
        // color
@@@ -842,9 -875,12 +842,9 @@@
        }
        // texture
        else if (ef->getSpecular().isTexture()) {
 +#if 0
-               COLLADAFW::Texture ctex = ef->getSpecular().getTexture(); 
+               COLLADAFW::Texture ctex = ef->getSpecular().getTexture();
 -              mtex = create_texture(ef, ctex, ma, i, texindex_texarray_map);
 -              if (mtex != NULL) {
 -                      mtex->mapto = MAP_SPEC;
 -                      i++;
 -              }
 +#endif
        }
        // REFLECTIVE
        // color
@@@ -855,9 -892,12 +855,9 @@@
        }
        // texture
        else if (ef->getReflective().isTexture()) {
 +#if 0
-               COLLADAFW::Texture ctex = ef->getReflective().getTexture(); 
+               COLLADAFW::Texture ctex = ef->getReflective().getTexture();
 -              mtex = create_texture(ef, ctex, ma, i, texindex_texarray_map);
 -              if (mtex != NULL) {
 -                      mtex->mapto = MAP_REF;
 -                      i++;
 -              }
 +#endif
        }
  
        // EMISSION
@@@ -868,9 -908,12 +868,9 @@@
        }
        // texture


@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to