ParticleSystem(bpy_struct)
==========================

.. currentmodule:: bpy.types

base class --- :class:`bpy_struct`

.. class:: ParticleSystem(bpy_struct)

   Particle system in an object

   .. data:: active_particle_target

      (readonly)

      :type: :class:`ParticleTarget` | None

   .. attribute:: active_particle_target_index

      (in [0, inf], default 0)

      :type: int

   .. data:: child_particles

      Child particles generated by the particle system (default None, readonly)

      :type: :class:`bpy_prop_collection`\ [:class:`ChildParticle`]

   .. attribute:: child_seed

      Offset in the random number table for child particles, to get a different randomized result (in [0, inf], default 0)

      :type: int

   .. data:: cloth

      Cloth dynamics for hair (readonly, never None)

      :type: :class:`ClothModifier`

   .. data:: dt_frac

      The current simulation time step size, as a fraction of a frame (in [0.00990099, 1], default 0.0, readonly)

      :type: float

   .. data:: has_multiple_caches

      Particle system has multiple point caches (default False, readonly)

      :type: bool

   .. attribute:: invert_vertex_group_clump

      Negate the effect of the clump vertex group (default False)

      :type: bool

   .. attribute:: invert_vertex_group_density

      Negate the effect of the density vertex group (default False)

      :type: bool

   .. attribute:: invert_vertex_group_field

      Negate the effect of the field vertex group (default False)

      :type: bool

   .. attribute:: invert_vertex_group_kink

      Negate the effect of the kink vertex group (default False)

      :type: bool

   .. attribute:: invert_vertex_group_length

      Negate the effect of the length vertex group (default False)

      :type: bool

   .. attribute:: invert_vertex_group_rotation

      Negate the effect of the rotation vertex group (default False)

      :type: bool

   .. attribute:: invert_vertex_group_roughness_1

      Negate the effect of the roughness 1 vertex group (default False)

      :type: bool

   .. attribute:: invert_vertex_group_roughness_2

      Negate the effect of the roughness 2 vertex group (default False)

      :type: bool

   .. attribute:: invert_vertex_group_roughness_end

      Negate the effect of the roughness end vertex group (default False)

      :type: bool

   .. attribute:: invert_vertex_group_size

      Negate the effect of the size vertex group (default False)

      :type: bool

   .. attribute:: invert_vertex_group_tangent

      Negate the effect of the tangent vertex group (default False)

      :type: bool

   .. attribute:: invert_vertex_group_twist

      Negate the effect of the twist vertex group (default False)

      :type: bool

   .. attribute:: invert_vertex_group_velocity

      Negate the effect of the velocity vertex group (default False)

      :type: bool

   .. data:: is_editable

      Particle system can be edited in particle mode (default False, readonly)

      :type: bool

   .. data:: is_edited

      Particle system has been edited in particle mode (default False, readonly)

      :type: bool

   .. data:: is_global_hair

      Hair keys are in global coordinate space (default False, readonly)

      :type: bool

   .. attribute:: name

      Particle system name (default "", never None)

      :type: str

   .. attribute:: parent

      Use this object's coordinate system instead of global coordinate system

      :type: :class:`Object` | None

   .. data:: particles

      Particles generated by the particle system (default None, readonly)

      :type: :class:`bpy_prop_collection`\ [:class:`Particle`]

   .. data:: point_cache

      (readonly, never None)

      :type: :class:`PointCache`

   .. attribute:: reactor_target_object

      For reactor systems, the object that has the target particle system (empty if same object)

      :type: :class:`Object` | None

   .. attribute:: reactor_target_particle_system

      For reactor systems, index of particle system on the target object (in [1, 32767], default 0)

      :type: int

   .. attribute:: seed

      Offset in the random number table, to get a different randomized result (in [0, inf], default 0)

      :type: int

   .. attribute:: settings

      Particle system settings (never None)

      :type: :class:`ParticleSettings`

   .. data:: targets

      Target particle systems (default None, readonly)

      :type: :class:`bpy_prop_collection`\ [:class:`ParticleTarget`]

   .. attribute:: use_hair_dynamics

      Enable hair dynamics using cloth simulation (default False)

      :type: bool

   .. attribute:: use_keyed_timing

      Use key times (default False)

      :type: bool

   .. attribute:: vertex_group_clump

      Vertex group to control clump (default "", never None)

      :type: str

   .. attribute:: vertex_group_density

      Vertex group to control density (default "", never None)

      :type: str

   .. attribute:: vertex_group_field

      Vertex group to control field (default "", never None)

      :type: str

   .. attribute:: vertex_group_kink

      Vertex group to control kink (default "", never None)

      :type: str

   .. attribute:: vertex_group_length

      Vertex group to control length (default "", never None)

      :type: str

   .. attribute:: vertex_group_rotation

      Vertex group to control rotation (default "", never None)

      :type: str

   .. attribute:: vertex_group_roughness_1

      Vertex group to control roughness 1 (default "", never None)

      :type: str

   .. attribute:: vertex_group_roughness_2

      Vertex group to control roughness 2 (default "", never None)

      :type: str

   .. attribute:: vertex_group_roughness_end

      Vertex group to control roughness end (default "", never None)

      :type: str

   .. attribute:: vertex_group_size

      Vertex group to control size (default "", never None)

      :type: str

   .. attribute:: vertex_group_tangent

      Vertex group to control tangent (default "", never None)

      :type: str

   .. attribute:: vertex_group_twist

      Vertex group to control twist (default "", never None)

      :type: str

   .. attribute:: vertex_group_velocity

      Vertex group to control velocity (default "", never None)

      :type: str

   .. method:: co_hair(object, *, particle_no=0, step=0)

      Obtain cache hair data

      :param object: Object (never None)
      :type object: :class:`Object` | None
      :param particle_no: Particle no, (in [-inf, inf], optional)
      :type particle_no: int
      :param step: step no, (in [-inf, inf], optional)
      :type step: int
      :return: Co, Exported hairkey location (array of 3 items, in [-inf, inf])
      :rtype: :class:`mathutils.Vector`

   .. method:: uv_on_emitter(modifier, particle, *, particle_no=0, uv_no=0)

      Obtain uv for all particles

      :param modifier: Particle modifier (never None)
      :type modifier: :class:`ParticleSystemModifier` | None
      :param particle: Particle (never None)
      :type particle: :class:`Particle` | None
      :param particle_no: Particle no, (in [-inf, inf], optional)
      :type particle_no: int
      :param uv_no: UV no, (in [-inf, inf], optional)
      :type uv_no: int
      :return: uv, (array of 2 items, in [-inf, inf])
      :rtype: :class:`mathutils.Vector`

   .. method:: mcol_on_emitter(modifier, particle, *, particle_no=0, vcol_no=0)

      Obtain mcol for all particles

      :param modifier: Particle modifier (never None)
      :type modifier: :class:`ParticleSystemModifier` | None
      :param particle: Particle (never None)
      :type particle: :class:`Particle` | None
      :param particle_no: Particle no, (in [-inf, inf], optional)
      :type particle_no: int
      :param vcol_no: vcol no, (in [-inf, inf], optional)
      :type vcol_no: int
      :return: mcol, (array of 3 items, in [0, inf])
      :rtype: :class:`mathutils.Color`

   .. classmethod:: bl_rna_get_subclass(id, default=None, /)
   
      :param id: The RNA type identifier.
      :type id: str
      :param default: The value to return when not found.
      :type default: :class:`bpy.types.Struct` | None
      :return: The RNA type or default when not found.
      :rtype: :class:`bpy.types.Struct`


   .. classmethod:: bl_rna_get_subclass_py(id, default=None, /)
   
      :param id: The RNA type identifier.
      :type id: str
      :param default: The value to return when not found.
      :type default: type | None
      :return: The class or default when not found.
      :rtype: type


Inherited Properties
--------------------

.. hlist::
   :columns: 2

   - :class:`bpy_struct.id_data`

Inherited Functions
-------------------

.. hlist::
   :columns: 2

   - :class:`bpy_struct.as_pointer`
   - :class:`bpy_struct.driver_add`
   - :class:`bpy_struct.driver_remove`
   - :class:`bpy_struct.get`
   - :class:`bpy_struct.id_properties_clear`
   - :class:`bpy_struct.id_properties_ensure`
   - :class:`bpy_struct.id_properties_ui`
   - :class:`bpy_struct.is_property_hidden`
   - :class:`bpy_struct.is_property_overridable_library`
   - :class:`bpy_struct.is_property_readonly`
   - :class:`bpy_struct.is_property_set`
   - :class:`bpy_struct.items`
   - :class:`bpy_struct.keyframe_delete`
   - :class:`bpy_struct.keyframe_insert`
   - :class:`bpy_struct.keys`
   - :class:`bpy_struct.path_from_id`
   - :class:`bpy_struct.path_from_module`
   - :class:`bpy_struct.path_resolve`
   - :class:`bpy_struct.pop`
   - :class:`bpy_struct.property_overridable_library_set`
   - :class:`bpy_struct.property_unset`
   - :class:`bpy_struct.rna_ancestors`
   - :class:`bpy_struct.type_recast`
   - :class:`bpy_struct.values`

References
----------

.. hlist::
   :columns: 2

   - :mod:`bpy.context.particle_system`
   - :mod:`bpy.context.particle_system_editable`
   - :class:`DepsgraphObjectInstance.particle_system`
   - :class:`DynamicPaintBrushSettings.particle_system`
   - :class:`FluidFlowSettings.particle_system`
   - :class:`Object.particle_systems`
   - :class:`ParticleInstanceModifier.particle_system`
   - :class:`ParticleSystemModifier.particle_system`
   - :class:`ParticleSystems.active`

