user: How do I use Modifier(bpy_struct) in Blender? Include parameters, examples, warnings and best practices.

assistant: # Modifier(bpy_struct)

base class — [`bpy_struct`](bpy.types.bpy_struct.html#bpy.types.bpy_struct "bpy.types.bpy_struct")

subclasses —
[`ArmatureModifier`](bpy.types.ArmatureModifier.html#bpy.types.ArmatureModifier "bpy.types.ArmatureModifier"), [`ArrayModifier`](bpy.types.ArrayModifier.html#bpy.types.ArrayModifier "bpy.types.ArrayModifier"), [`BevelModifier`](bpy.types.BevelModifier.html#bpy.types.BevelModifier "bpy.types.BevelModifier"), [`BooleanModifier`](bpy.types.BooleanModifier.html#bpy.types.BooleanModifier "bpy.types.BooleanModifier"), [`BuildModifier`](bpy.types.BuildModifier.html#bpy.types.BuildModifier "bpy.types.BuildModifier"), [`CastModifier`](bpy.types.CastModifier.html#bpy.types.CastModifier "bpy.types.CastModifier"), [`ClothModifier`](bpy.types.ClothModifier.html#bpy.types.ClothModifier "bpy.types.ClothModifier"), [`CollisionModifier`](bpy.types.CollisionModifier.html#bpy.types.CollisionModifier "bpy.types.CollisionModifier"), [`CorrectiveSmoothModifier`](bpy.types.CorrectiveSmoothModifier.html#bpy.types.CorrectiveSmoothModifier "bpy.types.CorrectiveSmoothModifier"), [`CurveModifier`](bpy.types.CurveModifier.html#bpy.types.CurveModifier "bpy.types.CurveModifier"), [`DataTransferModifier`](bpy.types.DataTransferModifier.html#bpy.types.DataTransferModifier "bpy.types.DataTransferModifier"), [`DecimateModifier`](bpy.types.DecimateModifier.html#bpy.types.DecimateModifier "bpy.types.DecimateModifier"), [`DisplaceModifier`](bpy.types.DisplaceModifier.html#bpy.types.DisplaceModifier "bpy.types.DisplaceModifier"), [`DynamicPaintModifier`](bpy.types.DynamicPaintModifier.html#bpy.types.DynamicPaintModifier "bpy.types.DynamicPaintModifier"), [`EdgeSplitModifier`](bpy.types.EdgeSplitModifier.html#bpy.types.EdgeSplitModifier "bpy.types.EdgeSplitModifier"), [`ExplodeModifier`](bpy.types.ExplodeModifier.html#bpy.types.ExplodeModifier "bpy.types.ExplodeModifier"), [`FluidModifier`](bpy.types.FluidModifier.html#bpy.types.FluidModifier "bpy.types.FluidModifier"), [`GreasePencilArmatureModifier`](bpy.types.GreasePencilArmatureModifier.html#bpy.types.GreasePencilArmatureModifier "bpy.types.GreasePencilArmatureModifier"), [`GreasePencilArrayModifier`](bpy.types.GreasePencilArrayModifier.html#bpy.types.GreasePencilArrayModifier "bpy.types.GreasePencilArrayModifier"), [`GreasePencilBuildModifier`](bpy.types.GreasePencilBuildModifier.html#bpy.types.GreasePencilBuildModifier "bpy.types.GreasePencilBuildModifier"), [`GreasePencilColorModifier`](bpy.types.GreasePencilColorModifier.html#bpy.types.GreasePencilColorModifier "bpy.types.GreasePencilColorModifier"), [`GreasePencilDashModifierData`](bpy.types.GreasePencilDashModifierData.html#bpy.types.GreasePencilDashModifierData "bpy.types.GreasePencilDashModifierData"), [`GreasePencilEnvelopeModifier`](bpy.types.GreasePencilEnvelopeModifier.html#bpy.types.GreasePencilEnvelopeModifier "bpy.types.GreasePencilEnvelopeModifier"), [`GreasePencilHookModifier`](bpy.types.GreasePencilHookModifier.html#bpy.types.GreasePencilHookModifier "bpy.types.GreasePencilHookModifier"), [`GreasePencilLatticeModifier`](bpy.types.GreasePencilLatticeModifier.html#bpy.types.GreasePencilLatticeModifier "bpy.types.GreasePencilLatticeModifier"), [`GreasePencilLengthModifier`](bpy.types.GreasePencilLengthModifier.html#bpy.types.GreasePencilLengthModifier "bpy.types.GreasePencilLengthModifier"), [`GreasePencilLineartModifier`](bpy.types.GreasePencilLineartModifier.html#bpy.types.GreasePencilLineartModifier "bpy.types.GreasePencilLineartModifier"), [`GreasePencilMirrorModifier`](bpy.types.GreasePencilMirrorModifier.html#bpy.types.GreasePencilMirrorModifier "bpy.types.GreasePencilMirrorModifier"), [`GreasePencilMultiplyModifier`](bpy.types.GreasePencilMultiplyModifier.html#bpy.types.GreasePencilMultiplyModifier "bpy.types.GreasePencilMultiplyModifier"), [`GreasePencilNoiseModifier`](bpy.types.GreasePencilNoiseModifier.html#bpy.types.GreasePencilNoiseModifier "bpy.types.GreasePencilNoiseModifier"), [`GreasePencilOffsetModifier`](bpy.types.GreasePencilOffsetModifier.html#bpy.types.GreasePencilOffsetModifier "bpy.types.GreasePencilOffsetModifier"), [`GreasePencilOpacityModifier`](bpy.types.GreasePencilOpacityModifier.html#bpy.types.GreasePencilOpacityModifier "bpy.types.GreasePencilOpacityModifier"), [`GreasePencilOutlineModifier`](bpy.types.GreasePencilOutlineModifier.html#bpy.types.GreasePencilOutlineModifier "bpy.types.GreasePencilOutlineModifier"), [`GreasePencilShrinkwrapModifier`](bpy.types.GreasePencilShrinkwrapModifier.html#bpy.types.GreasePencilShrinkwrapModifier "bpy.types.GreasePencilShrinkwrapModifier"), [`GreasePencilSimplifyModifier`](bpy.types.GreasePencilSimplifyModifier.html#bpy.types.GreasePencilSimplifyModifier "bpy.types.GreasePencilSimplifyModifier"), [`GreasePencilSmoothModifier`](bpy.types.GreasePencilSmoothModifier.html#bpy.types.GreasePencilSmoothModifier "bpy.types.GreasePencilSmoothModifier"), [`GreasePencilSubdivModifier`](bpy.types.GreasePencilSubdivModifier.html#bpy.types.GreasePencilSubdivModifier "bpy.types.GreasePencilSubdivModifier"), [`GreasePencilTextureModifier`](bpy.types.GreasePencilTextureModifier.html#bpy.types.GreasePencilTextureModifier "bpy.types.GreasePencilTextureModifier"), [`GreasePencilThickModifierData`](bpy.types.GreasePencilThickModifierData.html#bpy.types.GreasePencilThickModifierData "bpy.types.GreasePencilThickModifierData"), [`GreasePencilTimeModifier`](bpy.types.GreasePencilTimeModifier.html#bpy.types.GreasePencilTimeModifier "bpy.types.GreasePencilTimeModifier"), [`GreasePencilTintModifier`](bpy.types.GreasePencilTintModifier.html#bpy.types.GreasePencilTintModifier "bpy.types.GreasePencilTintModifier"), [`GreasePencilWeightAngleModifier`](bpy.types.GreasePencilWeightAngleModifier.html#bpy.types.GreasePencilWeightAngleModifier "bpy.types.GreasePencilWeightAngleModifier"), [`GreasePencilWeightProximityModifier`](bpy.types.GreasePencilWeightProximityModifier.html#bpy.types.GreasePencilWeightProximityModifier "bpy.types.GreasePencilWeightProximityModifier"), [`HookModifier`](bpy.types.HookModifier.html#bpy.types.HookModifier "bpy.types.HookModifier"), [`LaplacianDeformModifier`](bpy.types.LaplacianDeformModifier.html#bpy.types.LaplacianDeformModifier "bpy.types.LaplacianDeformModifier"), [`LaplacianSmoothModifier`](bpy.types.LaplacianSmoothModifier.html#bpy.types.LaplacianSmoothModifier "bpy.types.LaplacianSmoothModifier"), [`LatticeModifier`](bpy.types.LatticeModifier.html#bpy.types.LatticeModifier "bpy.types.LatticeModifier"), [`MaskModifier`](bpy.types.MaskModifier.html#bpy.types.MaskModifier "bpy.types.MaskModifier"), [`MeshCacheModifier`](bpy.types.MeshCacheModifier.html#bpy.types.MeshCacheModifier "bpy.types.MeshCacheModifier"), [`MeshDeformModifier`](bpy.types.MeshDeformModifier.html#bpy.types.MeshDeformModifier "bpy.types.MeshDeformModifier"), [`MeshSequenceCacheModifier`](bpy.types.MeshSequenceCacheModifier.html#bpy.types.MeshSequenceCacheModifier "bpy.types.MeshSequenceCacheModifier"), [`MeshToVolumeModifier`](bpy.types.MeshToVolumeModifier.html#bpy.types.MeshToVolumeModifier "bpy.types.MeshToVolumeModifier"), [`MirrorModifier`](bpy.types.MirrorModifier.html#bpy.types.MirrorModifier "bpy.types.MirrorModifier"), [`MultiresModifier`](bpy.types.MultiresModifier.html#bpy.types.MultiresModifier "bpy.types.MultiresModifier"), [`NodesModifier`](bpy.types.NodesModifier.html#bpy.types.NodesModifier "bpy.types.NodesModifier"), [`NormalEditModifier`](bpy.types.NormalEditModifier.html#bpy.types.NormalEditModifier "bpy.types.NormalEditModifier"), [`OceanModifier`](bpy.types.OceanModifier.html#bpy.types.OceanModifier "bpy.types.OceanModifier"), [`ParticleInstanceModifier`](bpy.types.ParticleInstanceModifier.html#bpy.types.ParticleInstanceModifier "bpy.types.ParticleInstanceModifier"), [`ParticleSystemModifier`](bpy.types.ParticleSystemModifier.html#bpy.types.ParticleSystemModifier "bpy.types.ParticleSystemModifier"), [`RemeshModifier`](bpy.types.RemeshModifier.html#bpy.types.RemeshModifier "bpy.types.RemeshModifier"), [`ScrewModifier`](bpy.types.ScrewModifier.html#bpy.types.ScrewModifier "bpy.types.ScrewModifier"), [`ShrinkwrapModifier`](bpy.types.ShrinkwrapModifier.html#bpy.types.ShrinkwrapModifier "bpy.types.ShrinkwrapModifier"), [`SimpleDeformModifier`](bpy.types.SimpleDeformModifier.html#bpy.types.SimpleDeformModifier "bpy.types.SimpleDeformModifier"), [`SkinModifier`](bpy.types.SkinModifier.html#bpy.types.SkinModifier "bpy.types.SkinModifier"), [`SmoothModifier`](bpy.types.SmoothModifier.html#bpy.types.SmoothModifier "bpy.types.SmoothModifier"), [`SoftBodyModifier`](bpy.types.SoftBodyModifier.html#bpy.types.SoftBodyModifier "bpy.types.SoftBodyModifier"), [`SolidifyModifier`](bpy.types.SolidifyModifier.html#bpy.types.SolidifyModifier "bpy.types.SolidifyModifier"), [`SubsurfModifier`](bpy.types.SubsurfModifier.html#bpy.types.SubsurfModifier "bpy.types.SubsurfModifier"), [`SurfaceDeformModifier`](bpy.types.SurfaceDeformModifier.html#bpy.types.SurfaceDeformModifier "bpy.types.SurfaceDeformModifier"), [`SurfaceModifier`](bpy.types.SurfaceModifier.html#bpy.types.SurfaceModifier "bpy.types.SurfaceModifier"), [`TriangulateModifier`](bpy.types.TriangulateModifier.html#bpy.types.TriangulateModifier "bpy.types.TriangulateModifier"), [`UVProjectModifier`](bpy.types.UVProjectModifier.html#bpy.types.UVProjectModifier "bpy.types.UVProjectModifier"), [`UVWarpModifier`](bpy.types.UVWarpModifier.html#bpy.types.UVWarpModifier "bpy.types.UVWarpModifier"), [`VertexWeightEditModifier`](bpy.types.VertexWeightEditModifier.html#bpy.types.VertexWeightEditModifier "bpy.types.VertexWeightEditModifier"), [`VertexWeightMixModifier`](bpy.types.VertexWeightMixModifier.html#bpy.types.VertexWeightMixModifier "bpy.types.VertexWeightMixModifier"), [`VertexWeightProximityModifier`](bpy.types.VertexWeightProximityModifier.html#bpy.types.VertexWeightProximityModifier "bpy.types.VertexWeightProximityModifier"), [`VolumeDisplaceModifier`](bpy.types.VolumeDisplaceModifier.html#bpy.types.VolumeDisplaceModifier "bpy.types.VolumeDisplaceModifier"), [`VolumeToMeshModifier`](bpy.types.VolumeToMeshModifier.html#bpy.types.VolumeToMeshModifier "bpy.types.VolumeToMeshModifier"), [`WarpModifier`](bpy.types.WarpModifier.html#bpy.types.WarpModifier "bpy.types.WarpModifier"), [`WaveModifier`](bpy.types.WaveModifier.html#bpy.types.WaveModifier "bpy.types.WaveModifier"), [`WeightedNormalModifier`](bpy.types.WeightedNormalModifier.html#bpy.types.WeightedNormalModifier "bpy.types.WeightedNormalModifier"), [`WeldModifier`](bpy.types.WeldModifier.html#bpy.types.WeldModifier "bpy.types.WeldModifier"), [`WireframeModifier`](bpy.types.WireframeModifier.html#bpy.types.WireframeModifier "bpy.types.WireframeModifier")

*class* bpy.types.Modifier(*bpy_struct*)
:   Modifier affecting the geometry data of an object

    execution_time
    :   Time in seconds that the modifier took to evaluate. This is only set on evaluated objects. If multiple modifiers run in parallel, execution time is not a reliable metric.

        Type:
        :   float in [-inf, inf], default 0.0, (readonly)

    is_active
    :   The active modifier in the list

        Type:
        :   boolean, default False

    is_override_data
    :   In a local override object, whether this modifier comes from the linked reference object, or is local to the override

        Type:
        :   boolean, default False, (readonly)

    name
    :   Modifier name

        Type:
        :   string, default “”, (never None)

    persistent_uid
    :   Uniquely identifies the modifier within the modifier stack that it is part of

        Type:
        :   int in [-inf, inf], default 0, (readonly)

    show_expanded
    :   Set modifier expanded in the user interface

        Type:
        :   boolean, default False

    show_in_editmode
    :   Display modifier in Edit mode

        Type:
        :   boolean, default False

    show_on_cage
    :   Adjust edit cage to modifier result

        Type:
        :   boolean, default False

    show_render
    :   Use modifier during render

        Type:
        :   boolean, default False

    show_viewport
    :   Display modifier in viewport

        Type:
        :   boolean, default False

    type
    :   Type:
        :   enum in [Object Modifier Type Items](bpy_types_enum_items/object_modifier_type_items.html#rna-enum-object-modifier-type-items), default `'GREASE_PENCIL_VERTEX_WEIGHT_PROXIMITY'`, (readonly)

    use_apply_on_spline
    :   Apply this and all preceding deformation modifiers on splines’ points rather than on filled curve/surface

        Type:
        :   boolean, default False

    use_pin_to_last
    :   Keep the modifier at the end of the list

        Type:
        :   boolean, default False

    *classmethod* bl_rna_get_subclass(*id*, *default=None*, */*)
    :   Parameters:
        :   **id** (*str*) – The RNA type identifier.

        Returns:
        :   The RNA type or default when not found.

        Return type:
        :   [`bpy.types.Struct`](bpy.types.Struct.html#bpy.types.Struct "bpy.types.Struct") subclass

    *classmethod* bl_rna_get_subclass_py(*id*, *default=None*, */*)
    :   Parameters:
        :   **id** (*str*) – The RNA type identifier.

        Returns:
        :   The class or default when not found.

        Return type:
        :   [type](#bpy.types.Modifier.type "bpy.types.Modifier.type")