Fix T59174: Missing particles update
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 11 Dec 2018 10:15:12 +0000 (11:15 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 11 Dec 2018 10:15:12 +0000 (11:15 +0100)
source/blender/depsgraph/intern/depsgraph_tag.cc

index a1083cbfe0a35a9f14352193e5c5f16a7ef67a4b..26a12f42bfc5ecc2c4a84473cbcbae94141b9bd4 100644 (file)
@@ -142,6 +142,14 @@ void depsgraph_base_flags_tag_to_component_opcode(
        }
 }
 
+eDepsOperation_Code psysTagToOperationCode(IDRecalcFlag tag)
+{
+       if (tag == ID_RECALC_PSYS_RESET) {
+               return DEG_OPCODE_PARTICLE_SETTINGS_RESET;
+       }
+       return DEG_OPCODE_OPERATION;
+}
+
 void depsgraph_tag_to_component_opcode(const ID *id,
                                        IDRecalcFlag tag,
                                        eDepsNode_Type *component_type,
@@ -177,7 +185,8 @@ void depsgraph_tag_to_component_opcode(const ID *id,
                                 *   but we can survive for now with single exception here.
                                 *   Particles needs reconsideration anyway,
                                 */
-                               *component_type = DEG_NODE_TYPE_PARTICLE_SYSTEM;
+                               *component_type = DEG_NODE_TYPE_PARTICLE_SETTINGS;
+                               *operation_code = psysTagToOperationCode(tag);
                        }
                        else {
                                *component_type = DEG_NODE_TYPE_PARTICLE_SYSTEM;