PGCRYPT/OpenBlender_Train huggingface dataset:
user: Give a detailed overview of Examples: syntax, arguments, return values, common patterns.

assistant: ### Creating an Alpha Mask

An often overlooked use case of the Color Ramp is to turn a black-and-white image
into a colored image with transparency.

[[image reference removed]](../../../../_images/compositing_types_converter_color-ramp_create-alpha-mask.png)

In the example above, a black-and-white swirl image, which is lacking an alpha channel,
is fed into the Color Ramp node as a *Factor*.

The Color Ramp node is set to a purely transparent color on the left end of the gradient,
and a fully red color on the right. As you can see in the Viewer node,
the Color Ramp node outputs an image that is transparent where the input is black,
and opaque where the input is white.

### Colorizing an Image

In this example, multiple colors are added to the color gradient,
converting a black-and-white image into a flaming swirl.

[[image reference removed]](../../../../_images/compositing_types_converter_color-ramp_colorizing-image.png)

The shades of gray in the input image are mapped to three colors:
blue, yellow, and red, all fully opaque. Where the image is black,
the Color Ramp substitutes blue (the first color stop). Where it is some shade of gray,
the Color Ramp outputs a corresponding color from the gradient (bluish, yellow, to reddish).
Where the image is fully white, the Color Ramp outputs red.
user: Show practical ways to work with Mist Pass in a Blender add-on or script – include code.

assistant: Mist can greatly enhance the illusion of depth in your rendering. To create mist,
Blender generates a render layer with a depth map ranging between 0.0 and 1.0
that can be used in the Compositor to generate a mist effect.

Start
:   The distance from the camera at which the mist starts to fade in.

Depth
:   The distance from *Start* of the mist, that it fades in over.
    Objects further from the camera than *Start + Depth* are completely hidden by the mist.

Falloff
:   The curve function that controls the rate of change of the mist’s strength further and further into the distance.

    Quadratic:
    :   Uses the same calculation as light falloff (\(1\over{x^2}\)) and provides the smoothest
        transition from transparent (0.0) to opaque (1.0).

    Linear:
    :   Has a steeper start than quadratic (\(1\over{x}\)).

    Inverse Quadratic:
    :   Has the steepest start (\(1\over{\sqrt{x}}\)) and approaches 1.0 faster than the other two functions.

[image reference removed]

Mist example
([blend-file](https://archive.blender.org/wiki/2015/index.php/File:25-Manual-World-Mist-Example1.blend)).
user: Provide the full official documentation entry for Adding & Removing Constraints, preserving all code examples.

assistant: To add a constraint, click on *Add Object/Bone Constraint* in the [Properties Editor](../../editors/properties_editor.xhtml)
and choose a constraint type.

To remove a constraint, click its  button.

To move a constraint to a different position in the stack, drag its handle .

The [Constraints](../../scene_layout/object/editing/constraints.xhtml) menu in the 3D Viewport offers further options
such as copying constraints and deleting all constraints in one go.
The [Track](../../scene_layout/object/editing/track.xhtml) menu allows quickly adding a “track” (point at)
constraint.
user: Provide the full official documentation entry for Add Duplicate, preserving all code examples.

assistant: Duplicates the selected control points and creates a new surface based on them.
The new control points are placed in the *Move* mode: move the mouse to bring
them to the desired position, then click `LMB` to confirm. Alternatively,
press `RMB` or `Esc` to keep them at their original position.

Note that the selected control points must form a single, valid sub grid.
If this is not the case, the duplication will fail with an error.
user: What is Set Handle Positions Node and how is it used in Blender Python scripting?

assistant: # Set Handle Positions Node

[image reference removed]

The *Set Handle Positions* node sets the positions for the handles of [Bézier curves](../../../curves/structure.xhtml#curve-bezier).
They can be used to alter the generated shape of the curve.
The input node for this data is the [Curve Handle Positions Node](../read/curve_handle_positions.xhtml).
See the [Bézier curves](../../../curves/structure.xhtml#curve-bezier-handle-type) page for more details.
user: Provide the full official documentation entry for Options, preserving all code examples.

assistant: [image reference removed]

Offset Modifier.

### General

Location X, Y, Z
:   Sets strokes location offset from its object origin.

Rotation X, Y, Z
:   Sets strokes rotation.

Scale X, Y, Z
:   Sets strokes scale.

### Advanced

Mode
:   Random:
    :   Add random values to the individual strokes offset.

    Layer:
    :   Offset by layers.

    Stroke:
    :   Offset by strokes (based on the stroke draw order).

    Material:
    :   Offset by Materials.

Offset X, Y, Z
:   Sets individual element location offset.

Rotation X, Y, Z
:   Sets individual element rotation.

Scale X, Y, Z
:   Sets individual element scale.

Uniform Scale (Random mode)
:   Use the same random *Seed* for each scale axis in the strokes for a uniform scale.

Seed (Random mode)
:   [Seed](../../../glossary/index.html#term-Seed) used by the pseudo-random number generator.

Layer/Stroke/Material Step (For Layer, Stroke and Material mode)
:   The number of elements to be grouped and offset together.

Offset (For Layer, Stroke and Material mode)
:   Offset the element starting point.

### Influence

See [Influence Filters](../introduction.html#grease-pencil-modifier-influence-filters).
user: What is Outputs and how is it used in Blender Python scripting?

assistant: Grid
:   The resulting SDF grid after mean filtering.
    The surface becomes smoother and more uniform, making it useful for
    refining noisy or rough SDFs before further operations such as
    [Grid to Mesh](grid_to_mesh.xhtml).
user: What is Viewport Shading and how is it used in Blender Python scripting?

assistant: # Viewport Shading

Blender offers different shading modes for helping with different tasks.
For example, Solid shading is well-suited for modeling, while Rendered
is useful for setting up lighting.

The radio buttons let you change the shading mode, while the drop-down button
opens a popover with additional options described below.

Pressing `Z` opens a pie menu for changing the shading mode.
Pressing `Shift`-`Z` switches between the current shading mode and Wireframe.
user: How do I use Workspace Settings in Blender? Include parameters, examples, warnings and best practices.

assistant: Pin Scene
:   When enabled, the current workspace will remember the currently selected scene.
    Then, whenever you activate the workspace, it’ll automatically switch back to that scene.

Mode
:   Switch to this [Mode](../../editors/3dview/modes.html) when activating the workspace.

Sequencer Scene
:   The scene containing the edit that is used by the video sequence editor.
    See [Sequencer Scene](../../video_editing/sequencer_scene.html).

Sync Scene Time
:   Sync the active scene and time based on the current [scene strip](../../video_editing/edit/montage/strips/scene.html#bpy-types-scenestrip) in the video sequence editor.
    See [Sequencer Scene](../../video_editing/sequencer_scene.html).

Filter Add-ons
:   Determines which [add-ons](../../addons/index.html) are enabled in the active workspace.
    When unchecked, the global add-ons will be used.
    When checked, you can enable individual add-ons in the list below.
user: Give a detailed overview of Properties: syntax, arguments, return values, common patterns.

assistant: Distribution
:   Microfacet distribution to use.

    GGX:
    :   GGX microfacet distribution.

    Multiscatter GGX:
    :   Takes multiple scattering events between microfacets into account.
        This gives more energy conserving results, which would otherwise be visible as excessive darkening.

    Beckmann:
    :   Cycles Only
        Beckmann microfacet distribution.

Fresnel Type
:   Models for describing the metal’s appearance, by specifying the apparent color or the physical IOR.

    F82 Tint:
    :   Uses the [Adobe F82-Tint formula](https://helpx.adobe.com/content/dam/substance-3d/general-knowledge/asm/Adobe%20Standard%20Material%20-%20Technical%20Documentation%20-%20May2023.pdf)
        for the metallic fresnel. This allows for artist friendly control of the color near the edge of the
        material to simulate a complex IOR.

    Physical Conductor:
    :   Accepts Complex IOR measurements from real world metals to replicate a more accurate rendering
        of metals than the *F82 Tint* Fresnel type.

        Complex IOR values can be found from sources like the
        [Physically Based database for CG artists](https://physicallybased.info/)
        and [Refractive Index nk database](https://refractiveindex.info/).
user: Provide the full official documentation entry for bpy.utils submodule (bpy.utils.previews), preserving all code examples.

assistant: # bpy.utils submodule (bpy.utils.previews)

This module contains utility functions to handle custom previews.

It behaves as a high-level ‘cached’ previews manager.

This allows scripts to generate their own previews, and use them as icons in UI widgets
(‘icon_value’ for UILayout functions).
user: Describe CURVES_UL_attributes(UIList) from the Blender manual or Python API, including usage steps and snippets.

assistant: # CURVES_UL_attributes(UIList)

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

*class* bpy.types.CURVES_UL_attributes(*UIList*)
:   draw_item(*_context*, *layout*, *_data*, *attribute*, *_icon*, *_active_data*, *_active_propname*, *_index*)

    filter_items(*_context*, *data*, *property*)

    *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 IntAttributeValue(bpy_struct) in a Blender add-on or script – include code.

assistant: # IntAttributeValue(bpy_struct)

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

*class* bpy.types.IntAttributeValue(*bpy_struct*)
:   Integer value in geometry attribute

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

    *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: Describe Inputs from the Blender manual or Python API, including usage steps and snippets.

assistant: Color 1/2
:   Color of the bricks.

Mortar
:   The color of the area between bricks.

Scale
:   Overall texture scale.

Mortar Size
:   The size of the filling between the bricks known as “mortar”; 0 means no mortar.

Mortar Smooth
:   Blurs/softens the edge between the mortar and the bricks.
    This can be useful with a texture and displacement textures.

Bias
:   The color variation between *Color 1/2*.
    Values of -1 and 1 only use one of the two colors; values in between mix the colors.

Brick Width
:   The ratio of brick’s width relative to the texture scale.

Row Height
:   The ratio of brick’s row height relative to the texture scale.
user: How do I use MaintainVolumeConstraint(Constraint) in Blender? Include parameters, examples, warnings and best practices.

assistant: # MaintainVolumeConstraint(Constraint)

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

*class* bpy.types.MaintainVolumeConstraint(*Constraint*)
:   Maintain a constant volume along a single scaling axis

    free_axis
    :   The free scaling axis of the object

        Type:
        :   enum in [`'SAMEVOL_X'`, `'SAMEVOL_Y'`, `'SAMEVOL_Z'`], default `'SAMEVOL_X'`

    mode
    :   The way the constraint treats original non-free axis scaling

        - `STRICT`
          Strict – Volume is strictly preserved, overriding the scaling of non-free axes.
        - `UNIFORM`
          Uniform – Volume is preserved when the object is scaled uniformly. Deviations from uniform scale on non-free axes are passed through..
        - `SINGLE_AXIS`
          Single Axis – Volume is preserved when the object is scaled only on the free axis. Non-free axis scaling is passed through..

        Type:
        :   enum in [`'STRICT'`, `'UNIFORM'`, `'SINGLE_AXIS'`], default `'STRICT'`

    volume
    :   Volume of the bone at rest

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

    *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: Give a detailed overview of Inputs: syntax, arguments, return values, common patterns.

assistant: Enable
:   A boolean field controlling whether the connected output socket is visible and active.
    When *False*, the corresponding output socket in the group is hidden.

Value
:   The value to pass to the output when it is enabled.
    This input can be any supported data type depending on the node’s *Data Type* property.
user: Explain Insert a Python Interpreter into your Script in complete detail according to the official Blender documentation.

assistant: In the middle of a script you may want to inspect variables,
run functions and inspect the flow.

```
import code
code.interact(local=locals())
```

If you want to access both global and local variables run this:

```
import code
namespace = globals().copy()
namespace.update(locals())
code.interact(local=namespace)
```

The next example is an equivalent single line version of the script above which is easier to paste into your code:

```
__import__('code').interact(local=dict(globals(), **locals()))
```

`code.interact` can be added at any line in the script
and will pause the script to launch an interactive interpreter in the terminal,
when you’re done you can quit the interpreter and the script will continue execution.

If you have **IPython** installed you can use its `embed()` function which uses the current namespace.
The IPython prompt has auto-complete and some useful features that the standard Python eval-loop doesn’t have.

```
import IPython
IPython.embed()
```

Admittedly this highlights the lack of any Python debugging support built into Blender,
but its still a handy thing to know.
user: Show practical ways to work with Smooth in a Blender add-on or script – include code.

assistant: For Bézier curves, this smoothing operation reduces the distance between
the selected control point(s) and their neighbors,
while keeping the neighbors anchored. Does not effect control point tangents.

[image reference removed]

Original, unsmoothed Curve.

[image reference removed]

Entire curve smoothed over 20 times by holding `Shift`-`R` to repeat last step.

[image reference removed]

Only three control points in the center smoothed over 20 times.
user: Give a detailed overview of NodeLinks(bpy_struct): syntax, arguments, return values, common patterns.

assistant: # NodeLinks(bpy_struct)

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

*class* bpy.types.NodeLinks(*bpy_struct*)
:   Collection of Node Links

    new(*input*, *output*, *\**, *verify_limits=True*, *handle_dynamic_sockets=False*)
    :   Add a node link to this node tree

        Parameters:
        :   - **input** ([`NodeSocket`](bpy.types.NodeSocket.html#bpy.types.NodeSocket "bpy.types.NodeSocket"), (never None)) – The input socket
            - **output** ([`NodeSocket`](bpy.types.NodeSocket.html#bpy.types.NodeSocket "bpy.types.NodeSocket"), (never None)) – The output socket
            - **verify_limits** (*boolean**,* *(**optional**)*) – Verify Limits, Remove existing links if connection limit is exceeded
            - **handle_dynamic_sockets** (*boolean**,* *(**optional**)*) – Handle Dynamic Sockets, Handle node specific features like virtual sockets

        Returns:
        :   New node link

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

    remove(*link*)
    :   remove a node link from the node tree

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

    clear()
    :   remove all node links from the node tree

    *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: Describe Inputs from the Blender manual or Python API, including usage steps and snippets.

assistant: Geometry
:   The input geometry containing the hair curves to be clumped.

Factor
:   Controls the overall strength of the clumping effect.
    A value of 0.0 applies no clumping, while 1.0 fully pulls curves toward their guides.

Shape
:   Defines how the clumping influence changes along the length of each curve.
    A value of 0.0 applies a constant strength, while 0.5 results in a linear falloff from root to tip.

Tip Spread
:   Adds random variation to the positions of curve tips,
    preventing perfect convergence and helping clumps look more natural.

Clump Offset
:   Applies a random directional offset to entire clumps, introducing subtle variation between groups.

Distance Falloff
:   Defines how the influence of each guide curve decreases with distance.
    A value of 0.0 disables distance-based falloff, making all nearby curves equally affected.

Distance Threshold
:   Sets the maximum distance from a guide at which clumping has an effect.
    Curves farther than this threshold will not be influenced by that guide.

Seed
:   Controls the randomization used for offsets and variation.
    Changing this value alters the random distribution of clumping while keeping the same parameters.

Preserve Length
:   When enabled, maintains the original length of each curve during deformation.
    When disabled, curves may stretch or shrink slightly as they are pulled toward guides.

### Guide Map

Guide Index
:   A map that specifies which guide curve acts as the center for each clump.
    If provided, this takes priority over any existing `guide_curve_index` attribute,
    and the *Guide Distance* and *Guide Mask* inputs are ignored.

Guide Distance
:   The minimum distance between selected guide curves when generating a new guide map.
    Larger values produce fewer, larger clumps.

Guide Mask
:   Defines which curves can be used as guides during automatic guide map creation.

Existing Guide Map
:   When enabled, uses the existing guide map attribute if it is already available.
    If disabled and *Guide Index* is not provided, a new
    [guide map](create_guide_index_map.xhtml)
    is generated using *Guide Distance* and *Guide Mask*.
    Creating the guide map separately allows for finer control over guide placement and grouping.
user: What is Properties and how is it used in Blender Python scripting?

assistant: Samples
:   Number of samples to take for each shader evaluation.
    More samples give more accurate results, but are also slower to render.
    The default value of 4 works well for most cases, with any noise resolved by using more AA samples.
user: Explain StudioLight(bpy_struct) in complete detail according to the official Blender documentation.

assistant: # StudioLight(bpy_struct)

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

*class* bpy.types.StudioLight(*bpy_struct*)
:   Studio light

    has_specular_highlight_pass
    :   Studio light image file has separate “diffuse” and “specular” passes

        Type:
        :   boolean, default False, (readonly)

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

    is_user_defined
    :   Type:
        :   boolean, default False, (readonly)

    light_ambient
    :   Color of the ambient light that uniformly lit the scene

        Type:
        :   [`mathutils.Color`](mathutils.html#mathutils.Color "mathutils.Color") of 3 items in [0, inf], default (0.0, 0.0, 0.0), (readonly)

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

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

    solid_lights
    :   Lights used to display objects in solid draw mode

        Type:
        :   [`bpy_prop_collection`](bpy.types.bpy_prop_collection.html#bpy.types.bpy_prop_collection "bpy.types.bpy_prop_collection") of [`UserSolidLight`](bpy.types.UserSolidLight.html#bpy.types.UserSolidLight "bpy.types.UserSolidLight"), (readonly)

    type
    :   Type:
        :   enum in [`'STUDIO'`, `'WORLD'`, `'MATCAP'`], default `'STUDIO'`, (readonly)

    *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.StudioLight.type "bpy.types.StudioLight.type")
user: Give a detailed overview of Combine Bundle Node: syntax, arguments, return values, common patterns.

assistant: # Combine Bundle Node

[image reference removed]

The *Combine Bundle* node creates a new [Bundle](../../../../interface/controls/nodes/types/utilities/bundles/index.html)
from multiple input values.
Each input becomes an element of the bundle, identified by its socket name.
Values can be accessed in other parts of the node tree using the
[Separate Bundle](../../../../interface/controls/nodes/types/utilities/bundles/separate_bundle.html)
user: Give a detailed overview of CustomData Access: syntax, arguments, return values, common patterns.

assistant: BMesh has a unified way to access mesh attributes such as UVs, vertex colors, shape keys, edge crease, etc.
This works by having a **layers** property on BMesh data sequences to access the custom data layers
which can then be used to access the actual data on each vert, edge, face or loop.

Here are some examples:

```
uv_lay = bm.loops.layers.uv.active

for face in bm.faces:
    for loop in face.loops:
        uv = loop[uv_lay].uv
        print("Loop UV: %f, %f" % uv[:])
        vert = loop.vert
        print("Loop Vert: (%f,%f,%f)" % vert.co[:])
```

```
shape_lay = bm.verts.layers.shape["Key.001"]

for vert in bm.verts:
    shape = vert[shape_lay]
    print("Vert Shape: %f, %f, %f" % (shape.x, shape.y, shape.z))
```

```
# In this example the active vertex group index is used,
# this is stored in the object, not the `BMesh`.
group_index = obj.vertex_groups.active_index

# Only ever one deform weight layer.
dvert_lay = bm.verts.layers.deform.active

for vert in bm.verts:
    dvert = vert[dvert_lay]

    if group_index in dvert:
        print("Weight %f" % dvert[group_index])
    else:
        print("Setting Weight")
        dvert[group_index] = 0.5
```
user: Explain Options in complete detail according to the official Blender documentation.

assistant: [image reference removed]

Offset Modifier.

### General

Location X, Y, Z
:   Sets strokes location offset from its object origin.

Rotation X, Y, Z
:   Sets strokes rotation.

Scale X, Y, Z
:   Sets strokes scale.

### Advanced

Mode
:   Random:
    :   Add random values to the individual strokes offset.

    Layer:
    :   Offset by layers.

    Stroke:
    :   Offset by strokes (based on the stroke draw order).

    Material:
    :   Offset by Materials.

Offset X, Y, Z
:   Sets individual element location offset.

Rotation X, Y, Z
:   Sets individual element rotation.

Scale X, Y, Z
:   Sets individual element scale.

Uniform Scale (Random mode)
:   Use the same random *Seed* for each scale axis in the strokes for a uniform scale.

Seed (Random mode)
:   [Seed](../../../glossary/index.xhtml#term-Seed) used by the pseudo-random number generator.

Layer/Stroke/Material Step (For Layer, Stroke and Material mode)
:   The number of elements to be grouped and offset together.

Offset (For Layer, Stroke and Material mode)
:   Offset the element starting point.

### Influence

See [Influence Filters](../introduction.xhtml#grease-pencil-modifier-influence-filters).
user: Show practical ways to work with Bundling Extensions in a Blender add-on or script – include code.

assistant: When working offline or in a more controlled environment, it may be useful
to provide a set of extensions to all users. For this there is a default
read-only System repository. This repository could be located on a
read-only network drive or in a system directory.

[image reference removed]

System repository

The `$BLENDER_SYSTEM_EXTENSIONS`
[environment variable](command_line/arguments.xhtml#command-line-args-environment-variables)
controls the default location. This should point to a directory, within
which a `system` directory should exist.

Extensions packages should be extracted in this `system` directory,
with a resulting path like this:

```
$BLENDER_SYSTEM_EXTENSIONS/system/my-addon/blender_manifest.toml
```

In the Extensions preferences, it’s possible to manually set a custom
directory for the default System repository, or to create multiple
repositories.
user: Give a detailed overview of Bone(bpy_struct): syntax, arguments, return values, common patterns.

assistant: r child in pbone.children:
                    rec(child, matrix)

            # Scan all bone trees from their roots.
            for pbone in obj.pose.bones:
                if not pbone.parent:
                    rec(pbone, None)
        ```

    *classmethod* MatrixFromAxisRoll(*axis*, *roll*)
    :   Convert the axis + roll representation to a matrix

        Parameters:
        :   - **axis** ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 3 items in [-inf, inf], (never None)) – The main axis of the bone (tail - head)
            - **roll** (*float in* *[**-inf**,* *inf**]*) – The roll of the bone

        Returns:
        :   The resulting orientation matrix

        Return type:
        :   [`mathutils.Matrix`](mathutils.html#mathutils.Matrix "mathutils.Matrix") of 3 \* 3 items in [-inf, inf]

    *classmethod* AxisRollFromMatrix(*matrix*, *\**, *axis=(0.0, 0.0, 0.0)*)
    :   Convert a rotational matrix to the axis + roll representation. Note that the resulting value of the roll may not be as expected if the matrix has shear or negative determinant.

        Parameters:
        :   - **matrix** ([`mathutils.Matrix`](mathutils.html#mathutils.Matrix "mathutils.Matrix") of 3 \* 3 items in [-inf, inf], (never None)) – The orientation matrix of the bone
            - **axis** (*float array* *of* *3 items in* *[**-inf**,* *inf**]**,* *(**optional**)*) – The optional override for the axis (finds closest approximation for the matrix)

        Returns:
        :   `result_axis`, The main axis of the bone, [`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 3 items in [-inf, inf]

            `result_roll`, The roll of the bone, float in [-inf, inf]

        Return type:
        :   ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 3 items in [-inf, inf], float in [-inf, inf])

    parent_index(*parent_test*)
    :   The same as ‘bone in other_bone.parent_recursive’
        but saved generating a list.

    translate(*vec*)
    :   Utility function to add *vec* to the head and tail of this bone.

    *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 Controls in complete detail according to the official Blender documentation.

assistant: Flip `F`
:   Changes the side of the line that the tool projects geometry.

Snap `Ctrl`
:   Constrains the rotation of the line to 15 degree intervals.

Move `Ctrl`-`Spacebar`
:   Reposition the line.
user: How do I use ShaderNodeSeparateXYZ(ShaderNode) in Blender? Include parameters, examples, warnings and best practices.

assistant: # ShaderNodeSeparateXYZ(ShaderNode)

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"), [`ShaderNode`](bpy.types.ShaderNode.html#bpy.types.ShaderNode "bpy.types.ShaderNode")

*class* bpy.types.ShaderNodeSeparateXYZ(*ShaderNode*)
:   Split a vector into its X, Y, and Z components

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

assistant: Light Tree
:   Use a light tree to more effectively sample lights in the scene, taking into account
    distance and estimated intensity.
    This can significantly reduce noise, at the cost of a somewhat longer render time per sample.

    Certain lighting properties are not accounted for in the light tree. This includes custom
    falloff, ray visibility, and complex shader node setups including textures.
    This can result in an increase in noise in some scenes that make use of these features.

Light Threshold
:   Probabilistically terminates light samples when the light contribution is below the threshold.
    This avoids wasting time on lights that contribute little to the image.
    Zero disables the test.
user: Show practical ways to work with NodeSocketIntUnsigned(NodeSocketStandard) in a Blender add-on or script – include code.

assistant: # NodeSocketIntUnsigned(NodeSocketStandard)

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

*class* bpy.types.NodeSocketIntUnsigned(*NodeSocketStandard*)
:   Integer number socket of a node

    default_value
    :   Input value used for unconnected socket

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

    links
    :   List of node links from or to this socket.

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

        (readonly)

    *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: Give a detailed overview of Inputs: syntax, arguments, return values, common patterns.

assistant: The inputs are dynamic, they become available if needed depending on the node properties.

Vector
:   Texture coordinate to evaluate the noise at;
    defaults to *Generated* texture coordinates if the socket is left unconnected.

W
:   Texture coordinate to evaluate the noise at.

Scale
:   Scale of the noise.

Detail
:   Number of noise octaves.
    The fractional part of the input is multiplied by the magnitude of the highest octave.
    Higher number of octaves corresponds to a higher evaluation time.

Roughness
:   Blend between a smoother noise pattern, and rougher with sharper peaks.

Lacunarity
:   The difference between the scale of each two consecutive octaves.
    Larger values corresponds to larger scale for higher octaves.

Smoothness
:   The smoothness of the noise.

    |  |  |  |  |
    | --- | --- | --- | --- |
    | ../../../_images/render_shader-nodes_textures_voronoi_smoothness-distance-zero.png   Smoothness: 0.0. | ../../../_images/render_shader-nodes_textures_voronoi_smoothness-distance-quarter.png   Smoothness: 0.25. | ../../../_images/render_shader-nodes_textures_voronoi_smoothness-distance-half.png   Smoothness: 0.5. | ../../../_images/render_shader-nodes_textures_voronoi_smoothness-distance-one.png   Smoothness: 1.0. |
    | ../../../_images/render_shader-nodes_textures_voronoi_smoothness-color-zero.png   Smoothness: 0.0. | ../../../_images/render_shader-nodes_textures_voronoi_smoothness-color-quarter.png   Smoothness: 0.25. | ../../../_images/render_shader-nodes_textures_voronoi_smoothness-color-half.png   Smoothness: 0.5. | ../../../_images/render_shader-nodes_textures_voronoi_smoothness-color-one.png   Smoothness: 1.0. |

Exponent
:   Exponent of the Minkowski distance metric.

    |  |  |  |  |
    | --- | --- | --- | --- |
    | ../../../_images/render_shader-nodes_textures_voronoi_minkowski-half.png   Exponent: 0.5. | ../../../_images/render_shader-nodes_textures_voronoi_minkowski-one.png   Exponent: 1.0. | ../../../_images/render_shader-nodes_textures_voronoi_minkowski-two.png   Exponent: 2.0. | ../../../_images/render_shader-nodes_textures_voronoi_minkowski-32.png   Exponent: 32.0. |

Randomness
:   The randomness of the noise.

    |  |  |  |  |
    | --- | --- | --- | --- |
    | ../../../_images/render_shader-nodes_textures_voronoi_randomness-one.png   Randomness: 1.0. | ../../../_images/render_shader-nodes_textures_voronoi_randomness-half.png   Randomness: 0.5. | ../../../_images/render_shader-nodes_textures_voronoi_randomness-quarter.png   Randomness: 0.25. | ../../../_images/render_shader-nodes_textures_voronoi_randomness-zero.png   Randomness: 0.0. |
user: How do I use Options in Blender? Include parameters, examples, warnings and best practices.

assistant: [image reference removed]

The Mesh Deform modifier.

Object
:   The name of the mesh object to be used as the deforming cage.

Vertex Group
:   An optional vertex group of the object’s mesh to restrict the vertices that
    will be affected by this modifier.
    Vertices not in this group will not be deformed.

    Invert
    :   Inverts the influence of the selected vertex group, meaning that the group
        now represents vertices that will not be deformed by the modifier.

        The setting reverses the weight values of the group.

Precision
:   Controls the accuracy with which the deform mesh cage alters the deformed object,
    when the points on the cage are moved.
    Raising this value higher can greatly increase the time it takes
    to complete the binding calculations,
    but it will get more accurate cage mapping to the deformed object.

    This setting becomes unavailable once a cage has been bound.

Dynamic
:   When activated, other mesh altering features (such as other modifiers and shape keys)
    are taken into account when binding, increasing deformation quality.

    The setting is deactivated by default to save memory and processing time when binding.
    Like with *Precision*, this setting is unavailable once a cage has been bound.

Bind
:   Links the current vertex positions of both the modified geometry and the deforming *Object* chosen together.
    An unbound *Mesh Deform* modifier has no effect,
    it must be bound so that altering the shape of the deform mesh cage
    actually alters the shape of the modified object.

Unbind
:   When a deformed object has been associated to a deform mesh cage,
    it can later be disassociated by clicking the *Unbind* button which replaced the *Bind* one.

    When *Unbind* is clicked, the *deforming mesh cage* will keep its current shape,
    it will not reset itself back to its initial shape.
    If you need this original shape, you will have to save a copy of it before you alter it.

    The deformed object will, however, reset back to its original shape that it had
    before it was bound to the deform mesh cage.
user: Explain Outputs in complete detail according to the official Blender documentation.

assistant: Value
:   The resulting numerical value after conversion.

Length
:   The number of characters successfully parsed as part of the number.
    This indicates where the numeric portion of the string ends, allowing further substring operations.
user: Show practical ways to work with Axis Locking Types in a Blender add-on or script – include code.

assistant: ### Axis Locking

Axis locking limits the transformation to a single axis (or forbids transformations along two axes).
An object, face, vertex or other selectable item will only be able to move,
scale or rotate in a single dimension.

### Plane Locking

[image reference removed]

Plane locking.

Plane locking locks the transformation to *two* axes
(or forbids transformations along one axis),
thus creating a plane in which the element can be moved or scaled freely.
Plane locking only affects translation and scaling.

Note that for rotation, both axis and plane locking have the same effect because a rotation is
always constrained around one axis.
*Trackball* type rotations `R` `R` cannot be locked at all.

### Axis Locking Modes

A single key press constrains movement to the current transform orientation selection.
A second key press of the *same* key constrains movement to the corresponding *Global* axis
(except if the transform orientation is set to *Global*, in which case the *Local* orientation is used).
A third key press of the same key removes constraints.

The orientation can be set
in the [Transform Orientation](../../../../../editors/3dview/controls/orientation.xhtml)
selector of the 3D Viewport header.

For example, if the current transform orientation is set to *Normal*,
pressing `G` to start translation, followed by `Z` will lock translation
in the Z direction relative to the *Normal* orientation, pressing `Z`
again will lock translation to the Z axis relative to the *Global* orientation.
Pressing `Z` again will remove all constraints.
The current mode will be displayed in the left-hand side of the 3D Viewport header.

Axis locking modes.

|  |  |  |  |
| --- | --- | --- | --- |
| ../../../../../_images/scene-layout_object_editing_transform_control_axis-locking_modes-1.png   Z axis locking in Global orientation. | ../../../../../_images/scene-layout_object_editing_transform_control_axis-locking_modes-2.png   Z axis locking in Local orientation. | ../../../../../_images/scene-layout_object_editing_transform_control_axis-locking_modes-3.png   Z axis locking in Global orientation with vertex selection. | ../../../../../_images/scene-layout_object_editing_transform_control_axis-locking_modes-4.png   Z axis locking in Normal orientation with vertex selection. |

As can be seen in the *Axis locking modes* image,
the direction of the transform also takes into account the selection.

Note that using a locked axis does not prevent you from using the keyboard to enter
[numeric transformation](numeric_input.xhtml) values.
user: What is No Physics and how is it used in Blender Python scripting?

assistant: The particles will be given no motion, which makes them belong to no physics system.
At first a physics type that makes the particles to be static could seem a bit strange,
but it can be very useful at times.
None physics make the particles stick to their emitter their whole life time. The initial
velocities here are for example used to give a velocity to particles that are affected
by a harmonic effector with this physics type when the effect of the effector ends.

Moreover, it can be very convenient to have particles at disposal
(whose both Unborn and Died are visible on render)
to groom vegetation and/or ecosystems using *Object* or *Group* types of visualization.
user: Give a detailed overview of Charge: syntax, arguments, return values, common patterns.

assistant: # Charge

A *Charge* force field is similar to a *Force* field except it changes it’s behavior (attract/repulse)
based on the effected particles charge field (negative/positive),
like real particles with a charge.
Which means that this field has only an effect on particles that have also a *Charge* field
(else, they have no “charge”, and hence are unaffected)!

[image reference removed]

UI for a Charge force field.
user: Give a detailed overview of Properties: syntax, arguments, return values, common patterns.

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.html#curve-bezier-handle-type) page for more details
    on the different handle types.
user: Explain Inputs in complete detail according to the official Blender documentation.

assistant: Image/Color
:   Standard color input.

Factor
:   Controls the amount of influence the node exerts on the image.

Black Level Compositor Only
:   Defines the input color that should be mapped to black.

White Level Compositor Only
:   Defines the input color that should be mapped to white.
user: How do I use Text Editor Operators in Blender? Include parameters, examples, warnings and best practices.

assistant: # Text Editor Operators

bpy.ops.text_editor.preset_add(*\**, *name=''*, *remove_name=False*, *remove_active=False*)
:   Add or remove a Text Editor 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: Show practical ways to work with Troubleshooting Windows – Other GPU in a Blender add-on or script – include code.

assistant: # Troubleshooting Windows – Other GPU

Blender uses OpenGL for the 3D Viewport and user interface. The graphics processing unit (GPU) and driver have a big
impact on Blender’s behavior and performance.

This section lists possible solutions for graphics glitches, problems with EEVEE and Cycles, and crashes related to
your GPU.
user: Provide the full official documentation entry for Separate Bones, preserving all code examples.

assistant: # Separate Bones

You can, as with meshes, separate the selected bones in a new armature object
Armature ‣ Separate, `Ctrl`-`Alt`-`P` and of course,
in *Object Mode*, you can join all selected armatures in one
Object ‣ Join Objects, `Ctrl`-`J`.
user: Provide the full official documentation entry for Options, preserving all code examples.

assistant: [image reference removed]

Blur Visual Effect.

Mode
:   Grayscale
    :   Converts to a grayscale image.

    Sepia
    :   Converts to a sepia tone image.

    Duotone
    :   Converts to a posterize image with high contrast and brightness.

        Low Color
        :   Primary color.

        High Color
        :   Secondary color.

    Transparent
    :   Add color transparency.

    Custom
    :   Allows to define a tint custom color.

        Color
        :   Sets the tint color.

Factor
:   Control the mix value.