Merge branch 'master' into blender2.8
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 31 May 2017 13:51:17 +0000 (15:51 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 31 May 2017 13:52:11 +0000 (15:52 +0200)
28 files changed:
1  2 
intern/cycles/blender/blender_mesh.cpp
source/blender/alembic/intern/abc_exporter.cc
source/blender/alembic/intern/abc_exporter.h
source/blender/alembic/intern/alembic_capi.cc
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/armature_update.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenlib/BLI_ghash.h
source/blender/blenlib/BLI_listbase.h
source/blender/depsgraph/CMakeLists.txt
source/blender/depsgraph/intern/builder/deg_builder.cc
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/depsgraph/intern/depsgraph_tag.cc
source/blender/depsgraph/intern/eval/deg_eval.cc
source/blender/depsgraph/intern/eval/deg_eval_flush.cc
source/blender/depsgraph/intern/nodes/deg_node.cc
source/blender/depsgraph/intern/nodes/deg_node_component.cc
source/blender/depsgraph/util/deg_util_foreach.h
source/blender/editors/gpencil/gpencil_edit.c
source/blender/editors/object/object_bake_api.c
source/blender/editors/object/object_relations.c
source/blender/editors/space_outliner/outliner_tools.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_scene_api.c
source/blender/modifiers/intern/MOD_displace.c

index 3831acaafaba5c8809b04bbba72ee6391a8a61fe,f763922a73bbd7309e08eca4e933e6eb3756cb33..15158a9ef51eebf60b55a27403cbb9244cb05708
@@@ -106,19 -103,21 +106,21 @@@ public
  
        void operator()(Main *bmain, float &progress, bool &was_canceled);
  
- private:
-       void getShutterSamples(double step, bool time_relative, std::vector<double> &samples);
+ protected:
+       void getShutterSamples(unsigned int nr_of_samples,
+                              bool time_relative,
+                              std::vector<double> &samples);
+       void getFrameSet(unsigned int nr_of_samples, std::set<double> &frames);
  
+ private:
        Alembic::Abc::TimeSamplingPtr createTimeSampling(double step);
  
-       void getFrameSet(double step, std::set<double> &frames);
        void createTransformWritersHierarchy(EvaluationContext *eval_ctx);
        AbcTransformWriter * createTransformWriter(Object *ob,  Object *parent, Object *dupliObParent);
 -      void exploreTransform(EvaluationContext *eval_ctx, Object *ob, Object *parent, Object *dupliObParent = NULL);
 -      void exploreObject(EvaluationContext *eval_ctx, Object *ob, Object *dupliObParent);
 +      void exploreTransform(EvaluationContext *eval_ctx, Base *ob_base, Object *parent, Object *dupliObParent);
 +      void exploreObject(EvaluationContext *eval_ctx, Base *ob_base, Object *dupliObParent);
        void createShapeWriters(EvaluationContext *eval_ctx);
 -      void createShapeWriter(Object *ob, Object *dupliObParent);
 +      void createShapeWriter(Base *ob_base, Object *dupliObParent);
        void createParticleSystemsWriters(Object *ob, AbcTransformWriter *xform);
  
        AbcTransformWriter *getXForm(const std::string &name);
index cfff13ec77e4a84ef45d1714f9c14781ac9dbc3a,5ac73175e5b73586dfa706e68b6baf9ba1f2589a..3cad132b7be0f15d11c9b771cc81b35bb5328f59
@@@ -332,24 -330,13 +332,24 @@@ bool ABC_export
         * hardcore refactoring. */
        new (&job->settings) ExportSettings();
        job->settings.scene = job->scene;
 +
 +      /* Sybren: for now we only export the active scene layer.
 +       * Later in the 2.8 development process this may be replaced by using
 +       * a specific collection for Alembic I/O, which can then be toggled
 +       * between "real" objects and cached Alembic files. */
 +      job->settings.sl = CTX_data_scene_layer(C);
 +
        job->settings.frame_start = params->frame_start;
        job->settings.frame_end = params->frame_end;
-       job->settings.frame_step_xform = params->frame_step_xform;
-       job->settings.frame_step_shape = params->frame_step_shape;
+       job->settings.frame_samples_xform = params->frame_samples_xform;
+       job->settings.frame_samples_shape = params->frame_samples_shape;
        job->settings.shutter_open = params->shutter_open;
        job->settings.shutter_close = params->shutter_close;
 +
 +      /* Sybren: For now this is ignored, until we can get selection
 +       * detection working through Base pointers (instead of ob->flags). */
        job->settings.selected_only = params->selected_only;
 +
        job->settings.export_face_sets = params->face_sets;
        job->settings.export_normals = params->normals;
        job->settings.export_uvs = params->uvs;
Simple merge
Simple merge
index 8bed13d04993fcb907b3a24b0efacfc78e1bc9bc,54947ddbb5e0c567eab99e916e61f4fbf5d45989..a2bc38a7b5e8b856ad0ad1718c60d3b1a5025247
@@@ -123,7 -126,9 +123,9 @@@ static void deg_task_run_func(TaskPool 
  #endif
        }
  
 -      schedule_children(pool, state->graph, node, state->layers, thread_id);
+       BLI_task_pool_delayed_push_begin(pool, thread_id);
 +      schedule_children(pool, state->graph, node, thread_id);
+       BLI_task_pool_delayed_push_end(pool, thread_id);
  }
  
  typedef struct CalculatePengindData {
index e10f86f6e95456b6f92d22cd20cdf036478c58cf,d64fdd83d39dcff2f92ec80af0536d37e873f837..afcf699425328fc243e57cb3a73523ef43c1d7b7
@@@ -164,14 -164,32 +164,33 @@@ void deg_graph_flush_updates(Main *bmai
                                         * Plus it ensures visibility changes and relations and
                                         * layers visibility update has proper flags to work with.
                                         */
-                                       if (comp_node->type == DEPSNODE_TYPE_ANIMATION) {
-                                               object->recalc |= OB_RECALC_TIME;
-                                       }
-                                       else if (comp_node->type == DEPSNODE_TYPE_TRANSFORM) {
-                                               object->recalc |= OB_RECALC_OB;
-                                       }
-                                       else {
-                                               object->recalc |= OB_RECALC_DATA;
+                                       switch (comp_node->type) {
+                                               case DEPSNODE_TYPE_UNDEFINED:
+                                               case DEPSNODE_TYPE_OPERATION:
+                                               case DEPSNODE_TYPE_ROOT:
+                                               case DEPSNODE_TYPE_TIMESOURCE:
+                                               case DEPSNODE_TYPE_ID_REF:
+                                               case DEPSNODE_TYPE_SUBGRAPH:
+                                               case DEPSNODE_TYPE_PARAMETERS:
+                                               case DEPSNODE_TYPE_SEQUENCER:
++                                              case DEPSNODE_TYPE_LAYER_COLLECTIONS:
+                                                       /* Ignore, does not translate to object component. */
+                                                       break;
+                                               case DEPSNODE_TYPE_ANIMATION:
+                                                       object->recalc |= OB_RECALC_TIME;
+                                                       break;
+                                               case DEPSNODE_TYPE_TRANSFORM:
+                                                       object->recalc |= OB_RECALC_OB;
+                                                       break;
+                                               case DEPSNODE_TYPE_GEOMETRY:
+                                               case DEPSNODE_TYPE_EVAL_POSE:
+                                               case DEPSNODE_TYPE_BONE:
+                                               case DEPSNODE_TYPE_EVAL_PARTICLES:
+                                               case DEPSNODE_TYPE_SHADING:
+                                               case DEPSNODE_TYPE_CACHE:
+                                               case DEPSNODE_TYPE_PROXY:
+                                                       object->recalc |= OB_RECALC_DATA;
+                                                       break;
                                        }
                                }
                        }
index 8c234eae7ded694a67847e2475312014d58e198e,cb7361fc708e4182688a1622daec482971f3bf44..e00aa5dbb5e61709099a4242dc2f68dc3475b503
  #  include <boost/foreach.hpp>
  #  define foreach BOOST_FOREACH
  #else
 -#pragma message("No available foreach() implementation. Using stub instead, disabling new depsgraph")
 -
 -#ifndef WITH_LEGACY_DEPSGRAPH
 -#  error "Unable to build new depsgraph and legacy one is disabled."
 -#endif
 -
 -#define DISABLE_NEW_DEPSGRAPH
 -
 -#  define foreach(x, y) for (x; false; (void)y)
 +#  error "Depsgraph requires either Boost or C++11 for range-based loops."
  #endif
- #define GHASH_FOREACH_BEGIN(type, var, what) \
-       do { \
-               GHashIterator gh_iter##var; \
-               GHASH_ITER(gh_iter##var, what) { \
-                       type var = reinterpret_cast<type>(BLI_ghashIterator_getValue(&gh_iter##var)); \
- #define GHASH_FOREACH_END() \
-               } \
-       } while(0)
- #define GSET_FOREACH_BEGIN(type, var, what) \
-       do { \
-               GSetIterator gh_iter##var; \
-               GSET_ITER(gh_iter##var, what) { \
-                       type var = reinterpret_cast<type>(BLI_gsetIterator_getKey(&gh_iter##var)); \
- #define GSET_FOREACH_END() \
-               } \
-       } while(0)
- #define LINKLIST_FOREACH(type, var, list)          \
-       for (type var = (type)((list)->first);     \
-            var != NULL;                          \
-            var = (type)(((Link*)(var))->next))