PGCRYPT/OpenBlender_Train huggingface dataset:
user: Show practical ways to work with Header(bpy_struct) in a Blender add-on or script – include code.

assistant: # Header(bpy_struct)

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

*class* bpy.types.Header(*bpy_struct*)
:   Editor header containing UI elements

    bl_idname
    :   If this is set, the header gets a custom ID, otherwise it takes the name of the class used to define the header; for example, if the class name is “OBJECT_HT_hello”, and bl_idname is not set by the script, then bl_idname = “OBJECT_HT_hello”

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

    bl_region_type
    :   The region where the header is going to be used in (defaults to header region)

        Type:
        :   enum in [Region Type Items](bpy_types_enum_items/region_type_items.html#rna-enum-region-type-items), default `'HEADER'`

    bl_space_type
    :   The space where the header is going to be used in

        Type:
        :   enum in [Space Type Items](bpy_types_enum_items/space_type_items.html#rna-enum-space-type-items), default `'EMPTY'`

    layout
    :   Structure of the header in the UI

        Type:
        :   [`UILayout`](bpy.types.UILayout.html#bpy.types.UILayout "bpy.types.UILayout"), (readonly)

    draw(*context*)
    :   Draw UI elements into the header UI layout

    *classmethod* append(*draw_func*)
    :   Append a draw function to this menu,
        takes the same arguments as the menus draw function

    *classmethod* is_extended()

    *classmethod* prepend(*draw_func*)
    :   Prepend a draw function to this menu, takes the same arguments as
        the menus draw function

    *classmethod* remove(*draw_func*)
    :   Remove a draw function that has been added to this menu.

    *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
user: How do I use Interface in Blender? Include parameters, examples, warnings and best practices.

assistant: Name
:   By default, modifiers are named after their function, but this can be changed.

Mute
:   Click the checkbox in a modifier’s header to disable it.

Delete
:   Click the cross in a modifier’s header to delete it.

Influence
:   Lets you blend between the original curve and the modified one.

Restrict Frame Range
:   Start/End
    :   The frame on which the modifier’s effect starts/ends.

    Blend In/Out
    :   The number of frames, relative the start/end values above, it takes the modifier to fade in/out.
user: Show practical ways to work with VIEW3D_AST_pose_library(AssetShelf) in a Blender add-on or script – include code.

assistant: # VIEW3D_AST_pose_library(AssetShelf)

base classes — [`bpy_struct`](bpy.types.bpy_struct.html#bpy.types.bpy_struct "bpy.types.bpy_struct"), [`AssetShelf`](bpy.types.AssetShelf.html#bpy.types.AssetShelf "bpy.types.AssetShelf")

*class* bpy.types.VIEW3D_AST_pose_library(*AssetShelf*)
:   *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
user: How do I use UV Project Modifier in Blender? Include parameters, examples, warnings and best practices.

assistant: # UV Project Modifier

[image reference removed]

Projecting the Blender logo onto Suzanne.

The *UV Project* modifier acts like a slide projector.
It emits a UV map from the negative Z axis of a controller object
(such as an [empty object](../../empties.xhtml)),
and applies it to the object as the “light” hits it.

[Download an example](https://archive.blender.org/wiki/2015/index.php/File:Uvproject.blend).
user: Describe Extrude Mesh Node from the Blender manual or Python API, including usage steps and snippets.

assistant: # Extrude Mesh Node

[image reference removed]

The *Extrude Mesh Node* generates new edges or faces on the selected geometry elements
and moves them by a certain offset.

The operations are similar to the [extrude tools](../../../meshes/editing/mesh/extrude.xhtml)
in mesh edit mode, though there are some differences. Most importantly, the node never keeps the back-faces
of the extrusion in place, they are always removed. Attribute propagation rules may also be different.
user: What is CameraDOFSettings(bpy_struct) and how is it used in Blender Python scripting?

assistant: # CameraDOFSettings(bpy_struct)

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

*class* bpy.types.CameraDOFSettings(*bpy_struct*)
:   Depth of Field settings

    aperture_blades
    :   Number of blades in aperture for polygonal bokeh (at least 3)

        Type:
        :   int in [0, 16], default 0

    aperture_fstop
    :   F-Stop ratio (lower numbers give more defocus, higher numbers give a sharper image)

        Type:
        :   float in [0, inf], default 2.8

    aperture_ratio
    :   Distortion to simulate anamorphic lens bokeh

        Type:
        :   float in [0.01, inf], default 1.0

    aperture_rotation
    :   Rotation of blades in aperture

        Type:
        :   float in [-3.14159, 3.14159], default 0.0

    focus_distance
    :   Distance to the focus point for depth of field

        Type:
        :   float in [0, inf], default 10.0

    focus_object
    :   Use this object to define the depth of field focal point

        Type:
        :   [`Object`](bpy.types.Object.html#bpy.types.Object "bpy.types.Object")

    focus_subtarget
    :   Use this armature bone to define the depth of field focal point

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

    use_dof
    :   Use Depth of Field

        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
user: Provide the full official documentation entry for Properties, preserving all code examples.

assistant: Target
:   Render engine the input shader is used for.
    By default, the shader is shared between Cycles and EEVEE –
    with multiple output nodes, a specialized shader setup can be created for each.
user: What is Edge Length Node and how is it used in Blender Python scripting?

assistant: # Edge Length Node

[image reference removed]

The *Edge Length* node outputs the length of each edge in a mesh.
It calculates the distance between the two vertices that define each edge.

This node can be used for geometric analysis, mesh-based effects, or procedural operations
that depend on edge length (such as adaptive subdivision, weight mapping, or trimming).
user: What is Unicode Problems and how is it used in Blender Python scripting?

assistant: Python supports many different encodings so there is nothing stopping you from
writing a script in `latin1` or `iso-8859-15`.
See [PEP 263](https://www.python.org/dev/peps/pep-0263/).

However, this complicates matters for Blender’s Python API because `.blend` files don’t have an explicit encoding.
To avoid the problem for Python integration and script authors we have decided that all strings in blend-files
**must** be `UTF-8`, `ASCII` compatible.
This means assigning strings with different encodings to an object name, for instance, will raise an error.

Paths are an exception to this rule since the existence of non-UTF-8 paths on the user’s file system cannot be ignored.
This means seemingly harmless expressions can raise errors, e.g:

```
>>> print(bpy.data.filepath)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 10-21: ordinal not in range(128)
```

```
>>> bpy.context.object.name = bpy.data.filepath
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
TypeError: bpy_struct: item.attr= val: Object.name expected a string type, not str
```

Here are two ways around file-system encoding issues:

```
>>> print(repr(bpy.data.filepath))
```

```
>>> import os
>>> filepath_bytes = os.fsencode(bpy.data.filepath)
>>> filepath_utf8 = filepath_bytes.decode('utf-8', "replace")
>>> bpy.context.object.name = filepath_utf8
```

Unicode encoding/decoding is a big topic with comprehensive Python documentation,
to keep it short about encoding problems – here are some suggestions:

- Always use UTF-8 encoding or convert to UTF-8 where the input is unknown.
- Avoid manipulating file paths as strings directly, use `os.path` functions instead.
- Use `os.fsencode()` or `os.fsdecode()` instead of built-in string decoding functions when operating on paths.
- To print paths or to include them in the user interface use `repr(path)` first
  or `"%r" % path` with string formatting.
user: Provide the full official documentation entry for Operator Cheat Sheet, preserving all code examples.

assistant: Creates a text file in the Text Editor that gives a list of all operators
and their default values in Python syntax, along with the generated docs.
This is a good way to get an overview of all Blender’s operators.
user: Show practical ways to work with Bpy.Types.Vertexweightproximitymodifier in a Blender add-on or script – include code.

assistant: tProximityModifier(Modifier) VertexWeightProximityModifier VertexWeightProximityModifier.falloff_type VertexWeightProximityModifier.invert_falloff VertexWeightProximityModifier.invert_mask_vertex_group VertexWeightProximityModifier.map_curve VertexWeightProximityModifier.mask_constant VertexWeightProximityModifier.mask_tex_map_bone VertexWeightProximityModifier.mask_tex_map_object VertexWeightProximityModifier.mask_tex_mapping VertexWeightProximityModifier.mask_tex_use_channel VertexWeightProximityModifier.mask_tex_uv_layer VertexWeightProximityModifier.mask_texture VertexWeightProximityModifier.mask_vertex_group VertexWeightProximityModifier.max_dist VertexWeightProximityModifier.min_dist VertexWeightProximityModifier.normalize VertexWeightProximityModifier.proximity_geometry VertexWeightProximityModifier.proximity_mode VertexWeightProximityModifier.target VertexWeightProximityModifier.vertex_group VertexWeightProximityModifier.bl_rna_get_subclass() VertexWeightProximityModifier.bl_rna_get_subclass_py() Inherited Properties Inherited Functions
user: What is Workflow and how is it used in Blender Python scripting?

assistant: To start using a UDIM workflow, you should unwrap a mesh as you would for any other UV map.
After that you should decide how many textures you want to split your UV map into.
This will be different for every mesh and workflow but a good minimum is 3: one 4k, one 2k, and one 1k image.
Then create the desired textures to match how many textures you want.

After this it is the same process of moving UVs to the appropriate tile
and scaling and managing them like any other UV map.
See [Layout Workflow](layout.xhtml) for information on laying out UVs.

When the UVs are correctly set up across the multiple UV islands it is time to add proper textures the UDIM array.
Currently, existing textures cannot be added to a tile,
to fill a tile with an existing texture you first must:

1. Create the desired tiles.
2. Save the image.
3. Replace the saved image file with the desire texture by deleting the file
   and replacing it with a new image file, keeping the old file name.
   Or by opening the image in another application and modifying the contents of the image.

Other than using a third-party application to edit the UDIM texture it is possible to paint on UDIM textures.
This works for either 2D Painting or [3D Painting](../../../../sculpt_paint/texture_paint/index.xhtml).
user: Explain Texture in complete detail according to the official Blender documentation.

assistant: # Texture

Assigns a texture to the Freestyle stroke.

[[image reference removed]](../../../../_images/render_freestyle_parameter-editor_line-style_texture_tab.png)

Line Style: Texture.

Use Nodes
:   In Cycles textures are defined by means of shader [Nodes](#nodes).

Spacing Along Stroke
:   Allows to set the “pace” of textures mapped along the length of strokes.

Go to Linestyle Textures
:   A shortcut to the line style texture properties in the other *Textures* tab of the Properties.
    Make sure to first enable *Use Nodes*.
user: Give a detailed overview of Selecting Objects: syntax, arguments, return values, common patterns.

assistant: # Selecting Objects

Selection determines which elements will be the target of our actions.
Selections work on the current scene visible objects.
Blender has advanced selection methods. Both in *Object Mode* and in *Edit Mode*.
user: What is Gravity and how is it used in Blender Python scripting?

assistant: # Gravity

Gravity is a global setting that is applied to all physics systems in a scene.
It can be found in the scene tab.
This value is generally fine left at its default, -9.810 on the Z axis,
which is the force of gravity in the real world.
Changing this value would simulate a lower or higher force of gravity.
Gravity denoted g, measurement *m* × *s*-2.

Gravity is applied in the same way to all physics systems.

Gravity is practically the same around the entirety of planet *Earth*.
For rendering scenes on The Moon, use -1.622 *m* × *s*-2 on the Z axis.
Another popular gravity value might be for Mars which
has a gravitation acceleration of -3.69 *m* × *s*-2 on the Z Axis.
user: Provide the full official documentation entry for Python Scripting, preserving all code examples.

assistant: # Python Scripting

The Python Scripting mode offers full programmable line stylizes.
In this control mode, all styling operations are written as Python scripts referred to as
style modules in the Freestyle terminology. The input to a style module is a view map
(i.e. a set of detected feature edges), and the output is a set of stylized strokes.

A style module is composed of successive calls of five basic operators: selection, chaining,
splitting, sorting and stroke creation. The selection operator identifies a subset of input
feature edges based on one or more user-defined selection conditions (predicates).
The selected edges are processed with the chaining,
splitting and sorting operators to build chains of feature edges. These operators are also
controlled by user-supplied predicates and functions in order to determine how to transform
the feature edges into chains. Finally, the chains are transformed into stylized strokes
by the stroke creation operator, which takes a list of user-defined stroke shaders.

Python style modules are stored within blend-files as text data-blocks.
External style module files first need to be loaded in the Text Editor.
Then the select menu within an entry of the style module stack
allows you to select a module from the list of loaded style modules.

[image reference removed]

A screen capture of a style module `cartoon.py` loaded in the Text Editor (left),
as well as Freestyle options in the Python Scripting mode in the View Layers buttons (right).

Freestyle for Blender comes with a number of Python style modules that can serve as a starting
point of your own style module writing. See also the section of the Freestyle Python API in
the Blender Python API reference manual for the full detail of style module constructs.

|  |  |
| --- | --- |
| ../../_images/render_freestyle_python_scripting-mode-example-1.jpg   By T.K. using the Python Scripting mode ([blend-file](https://archive.blender.org/wiki/2015/index.php/File:Turning_Pages.zip), CC0). | ../../_images/render_freestyle_python_scripting-mode-example-2.png   By T.K. using the Python Scripting mode ([blend-file](https://archive.blender.org/wiki/2015/index.php/File:Lily_Broken_Topology.zip), CC0). |
user: How do I use Properties in Blender? Include parameters, examples, warnings and best practices.

assistant: Sky Type
:   Sky model to use.

    Single Scattering
    :   Improved version of the 1993
        [model](https://www.scratchapixel.com/lessons/procedural-generation-virtual-worlds/simulating-sky/simulating-colors-of-the-sky.html)
        by Nishita et al, accounts for single bounces in the atmosphere.
        This is legacy and may be removed in a future version.

    Multiple Scattering
    :   Based on [this](https://fgarlin.com/blog/spectral-sky/) work by Fernando García Liñán, it is the most accurate model as it accounts for multiple bounces of light in the atmosphere.

    Preetham
    :   Based on the 1999 [paper](https://doi.org/10.1145/311535.311545) by Preetham et al.
        This is legacy and will be removed in a future version.

    Hosek/Wilkie
    :   Based on the 2012 [paper](https://cgg.mff.cuni.cz/projects/SkylightModelling/) by Hosek and Wilkie.
        This is legacy and will be removed in a future version.

Sun Direction
:   Sun direction vector.

Turbidity
:   Atmospheric turbidity.

    - 2: Arctic like
    - 3: clear sky
    - 6: warm/moist day
    - 10: hazy day

Ground Albedo
:   Amount of light reflected from the planet surface back into the atmosphere.

Sun Disc Cycles Only
:   Enable/Disable sun disc lighting.

Sun Size
:   Angular diameter of the sun disc (in degrees).

Sun Intensity
:   Multiplier for sun disc lighting.

Sun Elevation
:   Rotation of the sun from the horizon (in degrees).

Sun Rotation
:   Rotation of the sun around the zenith (in degrees).

Altitude
:   The distance from sea level to the location of the camera.
    For example, if the camera is placed on a beach then a value of 0 should be used.
    However, if the camera is in the cockpit of a flying airplane then a value of 10 km will be more suitable.

Air
:   Density of air molecules.
    A value of 1 corresponds roughly to urban city air, while 0 is no air.

Aerosols
:   Density of aerosol particles (water droplets).
    A value of 1 corresponds roughly to urban city aerosols, while 0 is no aerosols.

Ozone
:   Density of ozone molecules; useful to make the sky appear bluer.
    A value of 1 corresponds roughly to urban city ozone, while 0 is no ozone.
user: What is Attribute Domain With Auto Items and how is it used in Blender Python scripting?

assistant: # Attribute Domain With Auto Items

AUTO:
:   Auto.

POINT:
:   Point.

    Attribute on point.

EDGE:
:   Edge.

    Attribute on mesh edge.

FACE:
:   Face.

    Attribute on mesh faces.

CORNER:
:   Face Corner.

    Attribute on mesh face corner.

CURVE:
:   Spline.

    Attribute on spline.

INSTANCE:
:   Instance.

    Attribute on instance.

LAYER:
:   Layer.

    Attribute on Grease Pencil layer.
user: Explain Animating with Grease Pencil in complete detail according to the official Blender documentation.

assistant: The main goal of Grease Pencil is to offer a 2D animation tool full immersed in a 3D environment.

[image reference removed]

Sample animation showing Grease Pencil object keyframes in the Dope Sheet with onion skinning enabled.

In Blender, Grease Pencil objects can be animated in many ways:

Moving as a whole object
:   Changing their position, orientation or size in time;

Drawing frame by frame
:   Drawing one frame at a time (traditional animation).

Deforming them
:   Animating their points;

Inherited animation
:   Causing the object to move based on the movement of another object
    (e.g. its parent, hook, armature, etc.). Useful for cut-out animation for example.

For a complete overview of animation in Blender please refer to
the [Animation & Rigging](../../animation/index.html) chapter.
user: Give a detailed overview of CurveSplines(bpy_struct): syntax, arguments, return values, common patterns.

assistant: # CurveSplines(bpy_struct)

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

*class* bpy.types.CurveSplines(*bpy_struct*)
:   Collection of curve splines

    active
    :   Active curve spline

        Type:
        :   [`Spline`](bpy.types.Spline.html#bpy.types.Spline "bpy.types.Spline")

    new(*type*)
    :   Add a new spline to the curve

        Parameters:
        :   **type** (enum in [`'POLY'`, `'BEZIER'`, `'NURBS'`]) – type for the new spline

        Returns:
        :   The newly created spline

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

    remove(*spline*)
    :   Remove a spline from a curve

        Parameters:
        :   **spline** ([`Spline`](bpy.types.Spline.html#bpy.types.Spline "bpy.types.Spline"), (never None)) – The spline to remove

    clear()
    :   Remove all splines from a curve

    *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
user: What is P and how is it used in Blender Python scripting?

assistant: |  |  |
| --- | --- |
| - [**Panel**](glossary/index.html#term-Panel) - [**Parent**](glossary/index.html#term-Parent) - [**Parenting**](glossary/index.html#term-Parenting) - [**Particle System**](glossary/index.html#term-Particle-System) - [**Phong**](glossary/index.html#term-Phong) - [**Pivot Point**](glossary/index.html#term-Pivot-Point) - [**Pixel**](glossary/index.html#term-Pixel) - [**Pixels Per Inch**](glossary/index.html#term-Pixels-Per-Inch) - [**Point Cloud**](glossary/index.html#term-Point-Cloud) - [**Pole**](glossary/index.html#term-Pole) | - [**Pose Bone**](glossary/index.html#term-Pose-Bone) - [**Pose Mode**](glossary/index.html#term-Pose-Mode) - [**Posing**](glossary/index.html#term-Posing) - [**PPI**](glossary/index.html#term-PPI) - [**Premultiplied Alpha**](glossary/index.html#term-Premultiplied-Alpha) - [**Primaries**](glossary/index.html#term-Primaries) - [**Primitive**](glossary/index.html#term-Primitive) - [**Procedural Texture**](glossary/index.html#term-Procedural-Texture) - [**Projection**](glossary/index.html#term-Projection) - [**Proxy**](glossary/index.html#term-Proxy) |
user: Give a detailed overview of Properties: syntax, arguments, return values, common patterns.

assistant: Movie Clip
:   Used to select a Movie Clip data-block to use, for controls see [Data-Block Menu](../../../interface/controls/templates/data_block.xhtml#ui-data-block).

Tracking Object
:   Camera object to get track information from.

Track
:   The name of the track to get track information from.
user: Show practical ways to work with BlendDataCollections(bpy_struct) in a Blender add-on or script – include code.

assistant: # BlendDataCollections(bpy_struct)

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

*class* bpy.types.BlendDataCollections(*bpy_struct*)
:   Collection of collections

    new(*name*)
    :   Add a new collection to the main database

        Parameters:
        :   **name** (*string**,* *(**never None**)*) – New name for the data-block

        Returns:
        :   New collection data-block

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

    remove(*collection*, *\**, *do_unlink=True*, *do_id_user=True*, *do_ui_user=True*)
    :   Remove a collection from the current blendfile

        Parameters:
        :   - **collection** ([`Collection`](bpy.types.Collection.html#bpy.types.Collection "bpy.types.Collection"), (never None)) – Collection to remove
            - **do_unlink** (*boolean**,* *(**optional**)*) – Unlink all usages of this collection before deleting it
            - **do_id_user** (*boolean**,* *(**optional**)*) – Decrement user counter of all data-blocks used by this collection
            - **do_ui_user** (*boolean**,* *(**optional**)*) – Make sure interface does not reference this collection

    tag(*value*)
    :   tag

        Parameters:
        :   **value** (*boolean*) – Value

    *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
user: How do I use Non-Editable Overrides in Blender? Include parameters, examples, warnings and best practices.

assistant: For technical reasons (how relationships between data-blocks are stored), Blender needs to create
overrides of a lot of data-blocks, even when only one or two of them actually needs to be edited
by the user. To reduce the amount of information and risk of potential unwanted editing, most of
these data-blocks are now marked as non-editable by default. This can be changed once the
override has been created.
user: Show practical ways to work with Connect Vertex Path in a Blender add-on or script – include code.

assistant: # Connect Vertex Path

This tool connects vertices in the order they are selected, splitting the faces between them.
When there are only two vertices selected, a cut will be made across unselected faces,
a bit like the Knife tool; but this is limited to straight cuts across connected faces.

|  |  |
| --- | --- |
| ../../../../_images/modeling_meshes_editing_vertex_connect-vertex-path_pair-before.png   Two disconnected vertices. | ../../../../_images/modeling_meshes_editing_vertex_connect-vertex-path_pair-after.png   Result of connecting. |

Running a second time will connect the first/last endpoints.
When many vertices are selected, faces will be split by their selected vertices.

|  |  |
| --- | --- |
| ../../../../_images/modeling_meshes_editing_vertex_connect-vertex-path_multi-before.png   Before. | ../../../../_images/modeling_meshes_editing_vertex_connect-vertex-path_multi-after.png   After. |

Vertices not connected to any faces will create edges,
so this can be used as a way to quickly connect isolated vertices too.
user: What is TextCharacterFormat(bpy_struct) and how is it used in Blender Python scripting?

assistant: # TextCharacterFormat(bpy_struct)

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

*class* bpy.types.TextCharacterFormat(*bpy_struct*)
:   Text character formatting settings

    kerning
    :   Spacing between characters

        Type:
        :   float in [-inf, inf], default 0.0

    material_index
    :   Material slot index of this character

        Type:
        :   int in [0, inf], default 0

    use_bold
    :   Type:
        :   boolean, default False

    use_italic
    :   Type:
        :   boolean, default False

    use_small_caps
    :   Type:
        :   boolean, default False

    use_underline
    :   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
user: Explain Introduction in complete detail according to the official Blender documentation.

assistant: # Introduction

Particles are lots of items emitted from mesh objects, typically in the thousands.
Each particle can be a point of light or a mesh, and be joined or dynamic.
They may react to many different influences and forces, and have the notion of a lifespan.
Dynamic particles can represent fire, smoke, mist,
and other things such as dust or magic spells.

[Hair](hair/index.html) type particles are a subset of regular particles.
Hair systems form curves that can represent hair, fur, grass and bristles.

You see particles as a Particle Modifier,
but all settings are done in the *Particle tab*.

[[image reference removed]](../../_images/physics_particles_introduction_fur-example.jpg)

Some fur made from particles.

Particles generally flow out from their mesh into space.
Their movement can be affected by many things, including:

- Initial velocity out from the mesh.
- Movement of the emitter (vertex, face or object) itself.
- Movement according to “gravity” or “air resistance”.
- Influence of force fields like wind, vortexes or guided along a curve.
- Interaction with other objects like collisions.
- Partially intelligent members of a flock (herd, school, …),
  that react to other members of their flock, while trying to reach a target or avoid predators.
- Smooth motion with soft body physics (only *Hair* particle systems).
- Or even manual transformation with [Lattices](../../modeling/modifiers/deform/lattice.html).

Particles may be rendered as:

- [Halos](emitter/render.html#particle-halo) (for Flames, Smoke, Clouds).
- Meshes which in turn may be animated (e.g. fish, bees, …).
  In these cases, each particle “carries” another object.
- [Hair curves](hair/shape.html), following the path of the particle.
  These hair curves can be manipulated in the 3D Viewport (combing, adding, cutting, moving, etc.).

Every object may carry many particle systems. Each particle system may contain up to
10,000,000 particles. Certain particle types (*Hair* and *Keyed*)
may have up to 10,000 children for each particle
(children move and emit more or less like their respective parents).
The size of your memory and your patience are your practical boundaries.
user: How do I use References in Blender? Include parameters, examples, warnings and best practices.

assistant: |  |  |
| --- | --- |
| - [`FreestyleLineStyle.texture_slots`](bpy.types.FreestyleLineStyle.html#bpy.types.FreestyleLineStyle.texture_slots "bpy.types.FreestyleLineStyle.texture_slots") - [`LineStyleTextureSlots.add`](bpy.types.LineStyleTextureSlots.html#bpy.types.LineStyleTextureSlots.add "bpy.types.LineStyleTextureSlots.add") | - [`LineStyleTextureSlots.create`](bpy.types.LineStyleTextureSlots.html#bpy.types.LineStyleTextureSlots.create "bpy.types.LineStyleTextureSlots.create") |
user: Describe Spatial Noise from the Blender manual or Python API, including usage steps and snippets.

assistant: # Spatial Noise

The *Spatial Noise* modifier adds some spatial noise to the stroke.
Spatial noise displacements are added in the normal direction
(i.e. the direction perpendicular to the tangent line) evaluated at each stroke vertex.

Amplitude
:   How much the noise distorts the stroke.

Scale
:   How wide the noise is along the stroke.

Octaves
:   The level of detail of the noise.

Smooth
:   When enabled, apply some smoothing over the generated noise.

Pure Random
:   When disabled, the next generated random value depends on the previous one;
    otherwise they are completely independent. Disabling this setting gives a more “consistent” noise along a stroke.
user: How do I use Animation in Blender? Include parameters, examples, warnings and best practices.

assistant: |  |  |
| --- | --- |
| `I` | Insert a [keyframe](../../animation/keyframes/introduction.xhtml). |
| `Alt`-`I` | Clear the keyframe. |
| `Shift`-`Alt`-`I` | Clear all keyframes. |
| `Ctrl`-`D` | Assign a [driver](../../animation/drivers/introduction.xhtml). |
| `Ctrl`-`Alt`-`D` | Clear the driver. |
| `K` | Add the property to the current [keying set](../../animation/keyframes/keying_sets.xhtml). |
| `Alt`-`K` | Remove the property from the current keying set. |
user: Provide the full official documentation entry for Installing Legacy Add-ons, preserving all code examples.

assistant: To install legacy add-ons, click the *Install from Disk* menu item and select the add-on’s
`.py` file (if it has only one such file) or its `.zip` file.

The add-on will not be automatically enabled after installation; click the checkbox to do that.

Refresh
:   Scans the [Add-on Directory](../../advanced/blender_directory_layout.html#blender-directory-layout) for new add-ons.
user: Show practical ways to work with FreestyleModuleSettings(bpy_struct) in a Blender add-on or script – include code.

assistant: # FreestyleModuleSettings(bpy_struct)

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

*class* bpy.types.FreestyleModuleSettings(*bpy_struct*)
:   Style module configuration for specifying a style module

    script
    :   Python script to define a style module

        Type:
        :   [`Text`](bpy.types.Text.html#bpy.types.Text "bpy.types.Text")

    use
    :   Enable or disable this style module during stroke rendering

        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
user: How do I use Properties in Blender? Include parameters, examples, warnings and best practices.

assistant: Mode
:   Whether to consider left and/or right handles.
    When both are selected, the output value is true
    if either of the handles are of the chosen type.

    Left:
    :   Consider the left handle.

    Right:
    :   Consider the right handle.

Handle Type
:   Handle type for which the selection will be true.
    See the [Bézier curves](../../../curves/structure.xhtml#curve-bezier-handle-type) page for more details
    on the different handle types.
user: Explain Example in complete detail according to the official Blender documentation.

assistant: [[image reference removed]](../../../_images/modeling_meshes_tools_spin_glass-profile.png)

Glass profile.

First, create a mesh representing the profile of your object.
If you are modeling a hollow object, it is a good idea to thicken the outline.
Fig. [Glass profile.](#fig-mesh-spin-glass) shows the profile for a wine glass we will model as a demonstration.

We will be rotating the object around the cursor in the top view,
so switch to the top view with `Numpad7`.

[[image reference removed]](../../../_images/modeling_meshes_tools_spin_glass-profile-before.png)

Glass profile, top view in Edit Mode, just before spinning.

Place the cursor along the center of the profile by entering Edit Mode
and selecting one of the vertices along the center, and snapping the 3D cursor to
that location with Mesh ‣ Snap ‣ Cursor to Selection.
(Fig. [Glass profile, top view in Edit Mode, just before spinning.](#fig-mesh-spin-glass-top)) shows the wine glass profile from
top view, with the cursor correctly positioned.

Select all the vertices with `A` and select the *Spin* tool from the Toolbar
and use the Gizmo to spin the vertices. Fig. [Spun profile.](#fig-mesh-spin-profile) shows the result of a successful spin.

### Angle

Spun profile.

|  |  |
| --- | --- |
| <../../../_images/modeling_meshes_tools_spin_spun-profile360.png>   Spun profile using an angle of 360. | <../../../_images/modeling_meshes_tools_spin_spun-profile120.png>   Spun profile using an angle of 120. |

### Duplicate

|  |  |
| --- | --- |
| <../../../_images/modeling_meshes_tools_spin_result.png>   Result of spin operation. | <../../../_images/modeling_meshes_tools_spin_dubli.png>   Result of *Duplicate* enabled. |

### Merge Duplicates

[[image reference removed]](../../../_images/modeling_meshes_tools_spin_dublicate-vertices.png)

Duplicate vertices.

The spin operation leaves duplicate vertices along the profile.
You can select all vertices at the seam with Box select `B`
(shown in Fig. [Duplicate vertices.](#fig-mesh-screw-duplicate)) and perform a *Merge by Distance* operation.

Notice the selected vertex count before and after the *Merge by Distance* operation
`Vertex count after removing doubles`. If all goes well, the final vertex count
(38 in this example) should match the number of the original profile noted in
Mesh data ‣ Vertex and face numbers.
If not, some vertices were missed and you will need to weld them manually.
Or, worse, too many vertices will have been merged.

### Recalculate Normals

All that remains now is to recalculate the normals to the outside by selecting all vertices,
pressing `Alt`-`N` and validating *Recalculate Normals Outside* in the pop-up menu.
user: Provide the full official documentation entry for References, preserving all code examples.

assistant: |  |  |
| --- | --- |
| - [`CurveMap.points`](bpy.types.CurveMap.html#bpy.types.CurveMap.points "bpy.types.CurveMap.points") - [`CurveMapPoints.new`](bpy.types.CurveMapPoints.html#bpy.types.CurveMapPoints.new "bpy.types.CurveMapPoints.new") | - [`CurveMapPoints.remove`](bpy.types.CurveMapPoints.html#bpy.types.CurveMapPoints.remove "bpy.types.CurveMapPoints.remove") |
user: How do I use Camera Operators in Blender? Include parameters, examples, warnings and best practices.

assistant: # Camera Operators

bpy.ops.camera.preset_add(*\**, *name=''*, *remove_name=False*, *remove_active=False*, *use_focal_length=False*)
:   Add or remove a Camera Preset

    Parameters:
    :   - **name** (*string**,* *(**optional**,* *never None**)*) – Name, Name of the preset, used to make the path name
        - **remove_name** (*boolean**,* *(**optional**)*) – remove_name
        - **remove_active** (*boolean**,* *(**optional**)*) – remove_active
        - **use_focal_length** (*boolean**,* *(**optional**)*) – Include Focal Length, Include focal length into the preset

    File:
    :   [startup/bl_operators/presets.py:119](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/presets.py#L119)

bpy.ops.camera.safe_areas_preset_add(*\**, *name=''*, *remove_name=False*, *remove_active=False*)
:   Add or remove a Safe Areas Preset

    Parameters:
    :   - **name** (*string**,* *(**optional**,* *never None**)*) – Name, Name of the preset, used to make the path name
        - **remove_name** (*boolean**,* *(**optional**)*) – remove_name
        - **remove_active** (*boolean**,* *(**optional**)*) – remove_active

    File:
    :   [startup/bl_operators/presets.py:119](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/presets.py#L119)
user: Describe Outputs from the Blender manual or Python API, including usage steps and snippets.

assistant: Grid
:   The resulting grid with the updated background value applied.

    This grid can be passed to other nodes such as
    [Sample Grid Index](../sample/sample_grid_index.html)
    or [Sample Grid](../sample/sample_grid.html)
    to ensure consistent results in areas where the grid has no stored voxels.
user: Explain Extensions Listing HTML in complete detail according to the official Blender documentation.

assistant: The `server-generate` command can optionally create a simple website using the `--html` argument.

```
blender --command extension server-generate --repo-dir=/path/to/packages --html
```

This creates an `index.html` file ready to use, listing extensions which
can be dropped into Blender for installation.

### Download Links

In order to support drag and drop for installing from a remote repository,
there are a few optional ways to prepare the URLs.

The only strict requirement is that the download URL must end in `.zip`.

You can pass different arguments to the URL to give more clues to Blender about what to do with the dropped URL.

> repository:
> :   Link to the JSON file to be used to install the repository in Blender.
>     Supports relative URLs.
>
> platforms:
> :   Comma-separated list of supported platforms.
>     If omitted, the extension will be available in all operating systems.
>
> blender_version_min:
> :   Minimum supported Blender version, e.g., `4.2.0`.
>
> blender_version_max:
> :   Blender version that the extension does not support, earlier versions are supported.

With the exception of the `repository`, all the other parameters can be extracted from the extensions manifest.
Those arguments are to be encoded as part of the URL.

Expected format:
:   `{URL}.zip?repository={repository}&blender_version_min={version_min}&blender_max={version_max_exclusive}&platforms={platform1,platform2}`

Example from self-hosted repository:
:   `http://my-site.com/my-addon.zip?repository=.%2Findex.json&blender_version_min=4.2.0&platforms=windows-x64`

Example from the Extensions Platform:
:   `https://extensions.blender.org/download/sha256:57a6a5f39fa2cc834dc086a27b7b2e572c12fd14f8377fb8bd1c7022df3d7ccb/add-on-amaranth-v1.0.23.zip?repository=%2Fapi%2Fv1%2Fextensions%2F&blender_version_min=4.2.0&platforms=linux-x64%2Cmacos-x64`
user: What is Color Strip and how is it used in Blender Python scripting?

assistant: # Color Strip

This effect generates solid color frames.
By default, when it is created, the Color strip is 25 frames long, but
you can extend it by selecting and moving one of the ends.
Use this strip crossed with your main movie to provide a fade-in or fade-out.
user: What is Outputs and how is it used in Blender Python scripting?

assistant: Is Valid Offset
:   Whether the input control point plus the offset is a valid index of the original curve.
    Any offset in a cyclic curve is always valid.

Point Index
:   The index of the offset curve point.
user: Give a detailed overview of GeometryNodeMeshToVolume(GeometryNode): syntax, arguments, return values, common patterns.

assistant: # GeometryNodeMeshToVolume(GeometryNode)

base classes — [`bpy_struct`](bpy.types.bpy_struct.html#bpy.types.bpy_struct "bpy.types.bpy_struct"), [`Node`](bpy.types.Node.html#bpy.types.Node "bpy.types.Node"), [`NodeInternal`](bpy.types.NodeInternal.html#bpy.types.NodeInternal "bpy.types.NodeInternal"), [`GeometryNode`](bpy.types.GeometryNode.html#bpy.types.GeometryNode "bpy.types.GeometryNode")

*class* bpy.types.GeometryNodeMeshToVolume(*GeometryNode*)
:   Create a fog volume with the shape of the input mesh’s surface

    *classmethod* is_registered_node_type()
    :   True if a registered node type

        Returns:
        :   Result

        Return type:
        :   boolean

    *classmethod* input_template(*index*)
    :   Input socket template

        Parameters:
        :   **index** (*int in* *[**0**,* *inf**]*) – Index

        Returns:
        :   result

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

    *classmethod* output_template(*index*)
    :   Output socket template

        Parameters:
        :   **index** (*int in* *[**0**,* *inf**]*) – Index

        Returns:
        :   result

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

    *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
user: Show practical ways to work with Node Types in a Blender add-on or script – include code.

assistant: Nodes can be separated into two categories: data flow nodes that usually pass geometry,
and field nodes that operate on data per-element. Field nodes can be input nodes that
bring geometry data into the node tree, or function nodes that operate on that data.

### Data Flow Nodes

Nodes with a geometry input and a geometry output will almost always be data flow nodes.
Meaning that they actually change geometry data that will be outputted from the Geometry Nodes modifier.

### Function Nodes

Nodes with diamond socket inputs and outputs are field nodes, and resemble the instructions
that will be evaluated by data flow nodes. Examples of function nodes are the math nodes
and also more complex nodes like the [Geometry Proximity Node](geometry/sample/geometry_proximity.html).

### Input Nodes

Input nodes provide data to the field evaluation process. By themselves, they mean nothing; they
must be evaluated within the context of a data flow node (geometry) to actually output a value.
Examples of input nodes are the built-in attribute input nodes like
[Position](geometry/read/position.html) and
[ID](geometry/read/id.html), but also selection nodes like
[Endpoint Selection](curve/read/endpoint_selection.html).

Field inputs may also come from other nodes that process geometry like
the [Distribute Points on Faces](point/distribute_points_on_faces.html),
in the form of [Anonymous Attributes](attributes_reference.html#anonymous-attributes).
user: Describe References from the Blender manual or Python API, including usage steps and snippets.

assistant: |  |  |
| --- | --- |
| - [`SpaceSpreadsheet.tables`](bpy.types.SpaceSpreadsheet.html#bpy.types.SpaceSpreadsheet.tables "bpy.types.SpaceSpreadsheet.tables") | - [`SpreadsheetTables.active`](bpy.types.SpreadsheetTables.html#bpy.types.SpreadsheetTables.active "bpy.types.SpreadsheetTables.active") |
user: Provide the full official documentation entry for 3D Viewport Keys, preserving all code examples.

assistant: |  |  |
| --- | --- |
| `MMB` | Orbit View |
| `Shift`-`MMB` | Pan View |
| `Ctrl`-`MMB` | Zoom View |
| `Tab` | Toggle Edit mode. |
| `Ctrl`-`Tab` | Toggle Pose mode for armatures, or show a [mode](../../editors/3dview/modes.html) switching pie menu for others. |
| `1` - `3` | In Edit Mode, switch between editing vertices (`1`), edges (`2`), or faces (`3`).  Hold `Shift` to toggle one of these without disabling the others.  Hold `Ctrl` to alter how the selection is transformed from the old mode to the new.  See [Mesh Selection Modes](../../modeling/meshes/selecting/introduction.html) for details. |
| `AccentGrave` | Show 3D Viewport navigation pie menu. |
| `Ctrl`-`AccentGrave` | Toggle gizmos. |
| `Shift`-`AccentGrave` | Start [Fly/Walk Navigation](../../editors/3dview/navigate/walk_fly.html#dview-fly-walk). |