Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-02-22 14:54:06 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-02-22 14:54:06 +0300
commitdf045206021bdd448482f9d022f73029d28f7fc3 (patch)
treeb2246d23a94c05967811a67a366671254736864b /source/blender/blenkernel/BKE_modifier.h
parent93072e44d11efe9528d2bb7a3a62784331bf0a08 (diff)
Depsgraph: Wrap all arguments foe modifiers relations update into a struct
Makes it easier to add or remove fields needed to update relations.
Diffstat (limited to 'source/blender/blenkernel/BKE_modifier.h')
-rw-r--r--source/blender/blenkernel/BKE_modifier.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h
index 30c47a4b192..c4dc4998e35 100644
--- a/source/blender/blenkernel/BKE_modifier.h
+++ b/source/blender/blenkernel/BKE_modifier.h
@@ -127,6 +127,19 @@ typedef enum ModifierApplyFlag {
} ModifierApplyFlag;
+typedef struct ModifierUpdateDepsgraphContext {
+ struct Main *bmain;
+ struct Scene *scene;
+ struct Object *object;
+
+ /* Old depsgraph node handle. */
+ struct DagForest *forest;
+ struct DagNode *obNode;
+
+ /* new depsgraph node handle. */
+ struct DepsNodeHandle *node;
+} ModifierUpdateDepsgraphContext;
+
typedef struct ModifierTypeInfo {
/* The user visible name for this modifier */
char name[32];
@@ -265,9 +278,8 @@ typedef struct ModifierTypeInfo {
*
* This function is optional.
*/
- void (*updateDepgraph)(struct ModifierData *md, struct DagForest *forest,
- struct Main *bmain, struct Scene *scene,
- struct Object *ob, struct DagNode *obNode);
+ void (*updateDepgraph)(struct ModifierData *md,
+ const ModifierUpdateDepsgraphContext* ctx);
/* Add the appropriate relations to the dependency graph.
*
@@ -275,10 +287,7 @@ typedef struct ModifierTypeInfo {
*/
/* TODO(sergey): Remove once we finally switched to the new depsgraph. */
void (*updateDepsgraph)(struct ModifierData *md,
- struct Main *bmain,
- struct Scene *scene,
- struct Object *ob,
- struct DepsNodeHandle *node);
+ const ModifierUpdateDepsgraphContext* ctx);
/* Should return true if the modifier needs to be recalculated on time
* changes.