Merge branch 'master' into blender2.8
authorBastien Montagne <montagne29@wanadoo.fr>
Thu, 7 Jun 2018 09:22:11 +0000 (11:22 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Thu, 7 Jun 2018 09:23:26 +0000 (11:23 +0200)
 Conflicts:
source/blender/collada/ArmatureExporter.cpp
source/blender/collada/ArmatureExporter.h
source/blender/collada/DocumentExporter.cpp
source/blender/collada/DocumentExporter.h
source/blender/collada/SceneExporter.cpp
source/blender/collada/SceneExporter.h
source/blender/collada/collada.cpp
source/blender/collada/collada.h
source/blender/editors/armature/armature_edit.c
source/blender/editors/armature/pose_transform.c
source/blender/editors/include/ED_armature.h
source/blender/editors/include/ED_object.h
source/blender/editors/include/ED_screen.h
source/blender/editors/io/io_collada.c
source/blender/editors/object/object_transform.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/windowmanager/intern/wm.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_window.c
source/blenderplayer/bad_level_call_stubs/stubs.c

1  2 
source/blender/collada/DocumentExporter.cpp
source/blender/collada/collada.h

index c685df84d020e01e3732982e85c6c9b12482c637,472bd326205852bed147d9c0ecec1ede41219e3a..2e5d1757c4cefc9660ad839b56821bd2dd475547
@@@ -71,6 -71,7 +71,6 @@@ extern "C
  #include "DNA_mesh_types.h"
  #include "DNA_image_types.h"
  #include "DNA_material_types.h"
 -#include "DNA_texture_types.h"
  #include "DNA_anim_types.h"
  #include "DNA_action_types.h"
  #include "DNA_curve_types.h"
@@@ -137,7 -138,8 +137,7 @@@ extern bool bc_has_object_type(LinkNod
  char *bc_CustomData_get_layer_name(const struct CustomData *data, int type, int n)
  {
        int layer_index = CustomData_get_layer_index(data, type);
 -      if (layer_index < 0)
 -              return NULL;
 +      if (layer_index < 0) return NULL;
  
        return data->layers[layer_index + n].name;
  }
@@@ -146,14 -148,13 +146,14 @@@ char *bc_CustomData_get_active_layer_na
  {
        /* get the layer index of the active layer of type */
        int layer_index = CustomData_get_active_layer_index(data, type);
 -      if (layer_index < 1)
 -              return NULL;
 +      if (layer_index < 0) return NULL;
  
 -      return bc_CustomData_get_layer_name(data, type, layer_index-1);
 +      return data->layers[layer_index].name;
  }
  
 -DocumentExporter::DocumentExporter(const ExportSettings *export_settings) : export_settings(export_settings) {
 +DocumentExporter::DocumentExporter(Depsgraph *depsgraph, const ExportSettings *export_settings) :
 +      depsgraph(depsgraph),
 +      export_settings(export_settings) {
  }
  
  static COLLADABU::NativeString make_temp_filepath(const char *name, const char *extension)
  // COLLADA allows this through multiple <channel>s in <animation>.
  // For this to work, we need to know objects that use a certain action.
  
 -int DocumentExporter::exportCurrentScene(bContext *C, const EvaluationContext *eval_ctx, Scene *sce)
 +int DocumentExporter::exportCurrentScene(bContext *C, Scene *sce)
  {
        PointerRNA sceneptr, unit_settings;
        PropertyRNA *system; /* unused , *scale; */
        // <library_geometries>
        if (bc_has_object_type(export_set, OB_MESH)) {
                GeometryExporter ge(writer, this->export_settings);
 -              ge.exportGeom(sce);
 +              ge.exportGeom(depsgraph, sce);
        }
  
        // <library_controllers>
        ControllerExporter controller_exporter(writer, this->export_settings);
        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>
  
        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)));
index 822e12f34e0973440aa544678a91c526f5c4a76d,907c94855f7a008a166c5b7463abb0e817823656..a47463b5a7a0e4b16cc2607cb45b47214feb47a0
  extern "C" {
  #endif
  
 -#include "BKE_depsgraph.h"
  #include "BLI_linklist.h"
  #include "BLI_path_util.h"
  #include "RNA_types.h"
  
 -
 -struct EvaluationContext;
  struct bContext;
 +struct Depsgraph;
  struct Scene;
 +struct ViewLayer;
  
  /*
   * both return 1 on success, 0 on error
@@@ -51,9 -52,8 +51,8 @@@
  int collada_import(struct bContext *C,
                                   ImportSettings *import_settings);
  
  int collada_export(struct bContext *C,
 -                   struct EvaluationContext *eval_ctx,
 +                   struct Depsgraph *depsgraph,
                     struct Scene *sce,
                     ExportSettings *export_settings);