Merge branch 'master' into blender2.8
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 22 Aug 2017 14:31:33 +0000 (16:31 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 22 Aug 2017 14:31:33 +0000 (16:31 +0200)
1  2 
source/blender/blenkernel/BKE_curve.h
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/image.c
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/depsgraph/intern/depsgraph_type_defines.cc
source/blender/depsgraph/intern/depsgraph_types.h
source/blender/makesrna/intern/rna_image_api.c

index 1ebb092a93964cc104d3a0897128c5fe50585a81,a900ba434432a892c0a7a1afe166dcdcab4fc91f..06bef63710742cb3de4d337bde245dba7097b5fe
@@@ -215,20 -213,9 +215,16 @@@ void BKE_nurb_handles_test(struct Nurb 
  
  /* **** Depsgraph evaluation **** */
  
 -struct EvaluationContext;
 -
 -void BKE_curve_eval_geometry(struct EvaluationContext *eval_ctx,
 -                             struct Curve *curve);
 +void BKE_curve_eval_geometry(
 +        const struct EvaluationContext *eval_ctx,
 +        struct Curve *curve);
 +
- void BKE_curve_eval_path(
-         const struct EvaluationContext *eval_ctx,
-         struct Curve *curve);
 +/* Draw Cache */
 +enum {
 +      BKE_CURVE_BATCH_DIRTY_ALL = 0,
 +      BKE_CURVE_BATCH_DIRTY_SELECT,
 +};
 +void BKE_curve_batch_cache_dirty(struct Curve *cu, int mode);
 +void BKE_curve_batch_cache_free(struct Curve *cu);
  
  #endif  /* __BKE_CURVE_H__ */
index 351f443cbc96d5fdd061e2b3de45ac2c04f0cde7,795feb58bf6664d5b61f244bf84423ea0a2fe1ef..88077c3bf4e3c5315dfd590c7257378a60a0c8a5
@@@ -4685,31 -4680,3 +4685,20 @@@ void BKE_curve_eval_geometry(const Eval
                BKE_curve_texspace_calc(curve);
        }
  }
- void BKE_curve_eval_path(const EvaluationContext *UNUSED(eval_ctx),
-                          Curve *curve)
- {
-       /* TODO(sergey): This will probably need to be a part of
-        * the modifier stack still.
-        */
-       if (G.debug & G_DEBUG_DEPSGRAPH) {
-               printf("%s on %s\n", __func__, curve->id.name);
-       }
- }
 +
 +/* Draw Engine */
 +void (*BKE_curve_batch_cache_dirty_cb)(Curve *cu, int mode) = NULL;
 +void (*BKE_curve_batch_cache_free_cb)(Curve *cu) = NULL;
 +
 +void BKE_curve_batch_cache_dirty(Curve *cu, int mode)
 +{
 +      if (cu->batch_cache) {
 +              BKE_curve_batch_cache_dirty_cb(cu, mode);
 +      }
 +}
 +void BKE_curve_batch_cache_free(Curve *cu)
 +{
 +      if (cu->batch_cache) {
 +              BKE_curve_batch_cache_free_cb(cu);
 +      }
 +}
index b8aeaac64a1c520b7083f725232cd79ef0a68b32,46ef4841639ada5611e50e020babe57c7239dabb..659b7cefacbf62aa9cf548b1208d8c41066dbab2
@@@ -998,18 -847,7 +998,6 @@@ void DepsgraphNodeBuilder::build_obdata
                                                                   DEG_OPCODE_PLACEHOLDER,
                                                                   "Geometry Eval");
                        op_node->set_as_entry();
-                       /* Calculate curve path - this is used by constraints, etc. */
-                       if (ELEM(ob->type, OB_CURVE, OB_FONT)) {
-                               add_operation_node(obdata,
-                                                  DEG_NODE_TYPE_GEOMETRY,
-                                                  function_bind(BKE_curve_eval_path,
-                                                                _1,
-                                                                (Curve *)obdata_cow),
-                                                  DEG_OPCODE_GEOMETRY_PATH,
-                                                  "Path");
-                       }
--
                        /* Make sure objects used for bevel.taper are in the graph.
                         * NOTE: This objects might be not linked to the scene.
                         */
index 405c8e8733960a7dcfe5a97aae44ce7b69975542,05a144900f979225d1da2fd8444797912ea3059c..969cc21d2c10fda92931c48cf849620cd2c9328c
@@@ -109,16 -102,12 +109,15 @@@ static const char *stringify_opcode(eDe
                STRINGIFY_OPCODE(TRANSFORM_LOCAL);
                STRINGIFY_OPCODE(TRANSFORM_PARENT);
                STRINGIFY_OPCODE(TRANSFORM_CONSTRAINTS);
 +              STRINGIFY_OPCODE(TRANSFORM_FINAL);
 +              STRINGIFY_OPCODE(TRANSFORM_OBJECT_UBEREVAL);
 +              /* Rigid body. */
                STRINGIFY_OPCODE(RIGIDBODY_REBUILD);
                STRINGIFY_OPCODE(RIGIDBODY_SIM);
 -              STRINGIFY_OPCODE(TRANSFORM_RIGIDBODY);
 -              STRINGIFY_OPCODE(TRANSFORM_FINAL);
 -              STRINGIFY_OPCODE(OBJECT_UBEREVAL);
 +              STRINGIFY_OPCODE(RIGIDBODY_TRANSFORM_COPY);
 +              /* Geometry. */
                STRINGIFY_OPCODE(GEOMETRY_UBEREVAL);
-               STRINGIFY_OPCODE(GEOMETRY_PATH);
 +              /* Pose. */
                STRINGIFY_OPCODE(POSE_INIT);
                STRINGIFY_OPCODE(POSE_DONE);
                STRINGIFY_OPCODE(POSE_IK_SOLVER);
index ba776d5ebd51ba0d7c42ad6ed6cf71ec05c454af,6c0e3839b3916d2066c7420ab5a437f0a792a0ff..57a47c4084bdeadb9d661ec643f186b3a2d32099
@@@ -153,36 -146,44 +153,34 @@@ typedef enum eDepsOperation_Code 
        /* Driver */
        DEG_OPCODE_DRIVER,
  
 -      /* Transform --------------------------------------- */
 -
 +      /* Transform. -------------------------------------- */
        /* Transform entry point - local transforms only */
        DEG_OPCODE_TRANSFORM_LOCAL,
 -
        /* Parenting */
        DEG_OPCODE_TRANSFORM_PARENT,
 -
        /* Constraints */
        DEG_OPCODE_TRANSFORM_CONSTRAINTS,
 +      /* Transform exit point */
 +      DEG_OPCODE_TRANSFORM_FINAL,
 +      /* Handle object-level updates, mainly proxies hacks and recalc flags.  */
 +      DEG_OPCODE_TRANSFORM_OBJECT_UBEREVAL,
  
 -      /* Rigidbody Sim - Perform Sim */
 +      /* Rigid body. -------------------------------------- */
 +      /* Perform Simulation */
        DEG_OPCODE_RIGIDBODY_REBUILD,
        DEG_OPCODE_RIGIDBODY_SIM,
 +      /* Copy results to object */
 +      DEG_OPCODE_RIGIDBODY_TRANSFORM_COPY,
  
 -      /* Rigidbody Sim - Copy Results to Object */
 -      DEG_OPCODE_TRANSFORM_RIGIDBODY,
 -
 -      /* Transform exitpoint */
 -      DEG_OPCODE_TRANSFORM_FINAL,
 -
 -      /* XXX: ubereval is for temporary porting purposes only */
 -      DEG_OPCODE_OBJECT_UBEREVAL,
 -
 -      /* Geometry ---------------------------------------- */
 -
 -      /* XXX: Placeholder - UberEval */
 +      /* Geometry. ---------------------------------------- */
 +      /* Evaluate the whole geometry, including modifiers. */
        DEG_OPCODE_GEOMETRY_UBEREVAL,
-       /* Curve Objects - Path Calculation (used for path-following tools, */
-       DEG_OPCODE_GEOMETRY_PATH,
  
 -      /* Pose -------------------------------------------- */
 -
 +      /* Pose. -------------------------------------------- */
        /* Init IK Trees, etc. */
        DEG_OPCODE_POSE_INIT,
 -
        /* Free IK Trees + Compute Deform Matrices */
        DEG_OPCODE_POSE_DONE,
 -
        /* IK/Spline Solvers */
        DEG_OPCODE_POSE_IK_SOLVER,
        DEG_OPCODE_POSE_SPLINE_IK_SOLVER,