diff --git a/korman/operators/op_modifier.py b/korman/operators/op_modifier.py index bd774f7..d0cfd59 100644 --- a/korman/operators/op_modifier.py +++ b/korman/operators/op_modifier.py @@ -52,6 +52,13 @@ class ModifierAddOperator(ModifierOperator, bpy.types.Operator): theMod.display_order = plmods.determine_next_id() theMod.created(context.object) + + # Determine if this modifier has any dependencies and make sure they're enabled + deps = getattr(theMod, "pl_depends", set()) + for dep in deps: + depMod = getattr(plmods, dep) + if not depMod.enabled: + bpy.ops.object.plasma_modifier_add(types=dep) return {"FINISHED"} diff --git a/korman/properties/modifiers/anim.py b/korman/properties/modifiers/anim.py index 8475085..328ec0c 100644 --- a/korman/properties/modifiers/anim.py +++ b/korman/properties/modifiers/anim.py @@ -140,6 +140,7 @@ class LoopMarker(bpy.types.PropertyGroup): class PlasmaAnimationLoopModifier(PlasmaModifierProperties): pl_id = "animation_loop" + pl_depends = {"animation"} bl_category = "Animation" bl_label = "Loop Markers"