PGCRYPT/OpenBlender_Train huggingface dataset:
user: Show practical ways to work with Asset System Files (.asset.blend Extension) in a Blender add-on or script – include code.

assistant: Some types of assets can be edited without having to open a blend-file inside of an asset library.
Blender saves these assets to libraries in special files using the .asset.blend extension. They
are entirely managed by Blender’s asset system, and only contain a single asset and its
dependencies.

It is still possible to save a normal file with the .asset.blend extension. This will then not
be treated as an asset system file, Blender knows the difference.

Asset system files have one more special characteristic: You can open, but not save them. The
[Save As](../blend/open_save.xhtml#bpy-ops-wm-save-as-mainfile) operator can still be used to create a new file from
them, which will then be just a normal blend-file. Thus contained assets cannot be edited without
opening the file itself. Blender shows some clear warnings to communicate that asset system files
cannot be changed and saved the normal way.

The reason these files are special is that the asset system might need to regenerate them. Any
additional changes done by the user might be lost then. To prevent this data-loss, these files are
protected from user modifications.

Currently, only brush assets support this feature.
user: What is Main Region and how is it used in Blender Python scripting?

assistant: At least one region is always visible.
It is called the Main region and is the most prominent part of the editor.

Each editor has a specific purpose, so the main region and
the availability of additional regions are different between editors.
See specific documentation about each editor in the [Editors](../../editors/index.xhtml) chapter.
user: Show practical ways to work with Color Management in a Blender add-on or script – include code.

assistant: # Color Management

Color management is important to create renders and assets that are physically accurate and look great
on multiple display devices. It is used both to ensure all parts of the pipeline interpret colors correctly,
and to make artistic choices about the look.
user: Describe Options from the Blender manual or Python API, including usage steps and snippets.

assistant: [image reference removed]

Track To constraint.

[Target](../interface/common.xhtml#rigging-constraints-interface-common-target)
:   The object or bone to point towards.

Track Axis
:   The local axis of the owner that should point at the target.
    For bones, this should typically be Y.

    A negative axis will make the owner point away from the target instead.

Up
:   The local axis of the owner that should point upwards in the world.

Target Z
:   Align the owner’s *Up* axis as closely as possible to the target’s Z axis
    instead of the global one.

[Target/Owner](../interface/common.xhtml#rigging-constraints-interface-common-space)
:   The spaces for evaluating the target and owner transforms.

[Influence](../interface/common.xhtml#bpy-types-constraint-influence)
:   How strongly the constraint affects the owner.
user: Give a detailed overview of Image Buffer (imbuf): syntax, arguments, return values, common patterns.

assistant: # Image Buffer (imbuf)

This module provides access to Blender’s image manipulation API.

It provides access to image buffers outside of Blender’s
[`bpy.types.Image`](bpy.types.Image.html#bpy.types.Image "bpy.types.Image") data-block context.

imbuf.load(*filepath*)
:   Load an image from a file.

    Parameters:
    :   **filepath** (*str* *|* *bytes*) – the filepath of the image.

    Returns:
    :   the newly loaded image.

    Return type:
    :   `ImBuf`

imbuf.load_from_buffer(*buffer*)
:   Load an image from a buffer.

    Parameters:
    :   **buffer** (*collections.abc.Buffer*) – A buffer containing the image data.

    Returns:
    :   the newly loaded image.

    Return type:
    :   `ImBuf`

imbuf.new(*size*)
:   Load a new image.

    Parameters:
    :   **size** (*tuple**[**int**,* *int**]*) – The size of the image in pixels.

    Returns:
    :   the newly loaded image.

    Return type:
    :   `ImBuf`

imbuf.write(*image*, *\**, *filepath=image.filepath*)
:   Write an image.

    Parameters:
    :   - **image** (`ImBuf`) – the image to write.
        - **filepath** (*str* *|* *bytes* *|* *None*) – Optional filepath of the image (fallback to the images file path).
user: Describe Properties Editor Sync from the Blender manual or Python API, including usage steps and snippets.

assistant: When clicking the icon (not the name) of an item in the Outliner, the [Properties Editor](../properties_editor.xhtml)
editor will automatically switch to the relevant tab. This feature can be disabled using
the Properties editor’s [Sync with Outliner](../properties_editor.xhtml#bpy-types-spaceproperties-outliner-sync) option.
user: Explain BoolAttribute(Attribute) in complete detail according to the official Blender documentation.

assistant: # BoolAttribute(Attribute)

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

*class* bpy.types.BoolAttribute(*Attribute*)
:   Geometry attribute that stores booleans

    data
    :   Type:
        :   [`bpy_prop_collection`](bpy.types.bpy_prop_collection.html#bpy.types.bpy_prop_collection "bpy.types.bpy_prop_collection") of [`BoolAttributeValue`](bpy.types.BoolAttributeValue.html#bpy.types.BoolAttributeValue "bpy.types.BoolAttributeValue"), (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: Explain Copy/Paste in complete detail according to the official Blender documentation.

assistant: Allows copying and pasting images between Blender and the operating system’s clipboard.

Note, only PNG files are supported for direct clipboard copying and pasting.

Platform specific behavior:

- Windows: Supports pasting images by copying the image’s file path. This method allows all supported image formats.
- Linux: Requires Wayland for clipboard image support.
user: Describe Multiple UV Maps from the Blender manual or Python API, including usage steps and snippets.

assistant: A mesh can have more than one UV map, where each map can assign different UV coordinates
to the same 3D vertex. This is useful if, say, you need one UV map for textures and another
for storing [prebaked lighting](../../editing/uv.xhtml#bpy-ops-uv-lightmap-pack).

You can add and remove UV maps in the [UV Maps panel](../uv_texture_spaces.xhtml#uv-maps-panel).
user: Give a detailed overview of References: syntax, arguments, return values, common patterns.

assistant: |  |  |
| --- | --- |
| - [`bpy.context.active_nla_track`](bpy.context.html#bpy.context.active_nla_track "bpy.context.active_nla_track") - [`AnimData.nla_tracks`](bpy.types.AnimData.html#bpy.types.AnimData.nla_tracks "bpy.types.AnimData.nla_tracks") - [`NlaTracks.active`](bpy.types.NlaTracks.html#bpy.types.NlaTracks.active "bpy.types.NlaTracks.active") | - [`NlaTracks.new`](bpy.types.NlaTracks.html#bpy.types.NlaTracks.new "bpy.types.NlaTracks.new") - [`NlaTracks.new`](bpy.types.NlaTracks.html#bpy.types.NlaTracks.new "bpy.types.NlaTracks.new") - [`NlaTracks.remove`](bpy.types.NlaTracks.html#bpy.types.NlaTracks.remove "bpy.types.NlaTracks.remove") |
user: What is Tool Settings and how is it used in Blender Python scripting?

assistant: Depth
:   The initial depth (from the screen into the scene) used when placing the object.

    Surface:
    :   Start placing on the surface under the mouse cursor.
        If there is no surface, this does the same as *Cursor Plane*.

    Cursor Plane:
    :   Start placing on a plane that goes through the [3D Cursor](../3d_cursor.html)
        and is aligned according to the *Orientation* and *Plane Axis*.

    Cursor View:
    :   Start placing on a plane that goes through the 3D Cursor and is aligned to the view.

Orientation
:   The new object’s orientation – a set of three axes, out of which *Plane Axis* chooses one.

    Surface:
    :   The object uses the normal orientation of the surface under the mouse cursor.
        If there is no surface, this does the same as *Default*.

    Default:
    :   The object uses the default [Transform Orientation](../controls/orientation.html).

Snap To
:   The target to use while [Snapping](../controls/snapping.html).

    Geometry:
    :   Snap to all types of geometry (vertices, edges, and faces).

    Default:
    :   Snap to the target defined in the global snapping options.

Plane Axis
:   Which of the three *Orientation* axes (X, Y or Z) is “up” for the object.
    The object’s base will be perpendicular to this axis.

Auto Axis
:   Rather than using the *Orientation* axis indicated by *Plane Axis*,
    use the one that’s closest to the viewport’s viewing direction
    (when not hovering over a surface).

Base

Origin
:   How the base is defined.

    Edge:
    :   The base is defined from one corner to the opposing corner.

    Center:
    :   The base is defined from the centerpoint to a corner.

Aspect
:   Whether the base has a free or fixed aspect ratio.

    Free:
    :   The width and depth of the base can be chosen independently.

    Fixed:
    :   The width and depth of the base are forced to be equal.

Height

Origin
:   How the height is defined.

    Edge:
    :   The base becomes the bottom, after which you define the top.

    Center:
    :   The base becomes the center, after which you define the top.

Aspect
:   Whether the side of the bounding box has a free or fixed aspect ratio.

    Free:
    :   The height can be chosen independently of the base.

    Fixed:
    :   The height is forced to be equal to the largest side of the base.

Vertices
:   The number of vertices in the base.

Base Fill Type
:   Set how the circle at the base will be filled.

    Triangle Fan:
    :   Fill with triangular faces which share a vertex in the middle.

    N-gon:
    :   Fill with a single [N-gon](../../../glossary/index.html#term-N-gon).

    Nothing:
    :   Do not fill. Creates only the outer ring of vertices.
user: Describe ScriptDirectoryCollection(bpy_struct) from the Blender manual or Python API, including usage steps and snippets.

assistant: # ScriptDirectoryCollection(bpy_struct)

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

*class* bpy.types.ScriptDirectoryCollection(*bpy_struct*)
:   *classmethod* new()
    :   Add a new Python script directory

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

    *classmethod* remove(*script_directory*)
    :   Remove a Python script directory

    *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 NlaStrips(bpy_struct): syntax, arguments, return values, common patterns.

assistant: # NlaStrips(bpy_struct)

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

*class* bpy.types.NlaStrips(*bpy_struct*)
:   Collection of NLA Strips

    new(*name*, *start*, *action*)
    :   Add a new Action-Clip strip to the track

        Parameters:
        :   - **name** (*string**,* *(**never None**)*) – Name for the NLA Strip
            - **start** (*int in* *[**-inf**,* *inf**]*) – Start Frame, Start frame for this strip
            - **action** ([`Action`](bpy.types.Action.html#bpy.types.Action "bpy.types.Action"), (never None)) – Action to assign to this strip

        Returns:
        :   New NLA Strip

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

    remove(*strip*)
    :   Remove a NLA Strip

        Parameters:
        :   **strip** ([`NlaStrip`](bpy.types.NlaStrip.html#bpy.types.NlaStrip "bpy.types.NlaStrip"), (never None)) – NLA Strip to remove

    *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 Source, preserving all code examples.

assistant: Select the type of image to use. For images that come from files,
see [Supported Graphics Formats](../../files/media/image_formats.xhtml).

### Single Image

A single, static image.

### Image Sequence

An animation where each frame is stored in a separate file.
See [Opening an Image Sequence](../../files/media/image_formats.xhtml#image-formats-open-sequence).
For options, see [Movie](#movie) below.

### Movie

A video file. Note that if you want to do motion tracking and video compositing
rather than simply using the video as a texture, you should load it into the
[Movie Clip Editor](../clip/introduction.xhtml) instead.

Frames
:   How many frames of the video to play. Past this point, the video will be paused
    (unless *Cyclic* is enabled).

    Match Movie Length
    :   Sets the *Frames* to the number of frames in the video file.

Start
:   Scene frame at which the video should start playing.

Offset
:   Number of frames to offset the video to an earlier point in time.
    (Put differently: how many frames at the start of the video to skip.)

Cyclic
:   Start over after the last frame to create a continuous loop.

Auto Refresh
:   Play the video in the Image Editor when the scene animation is playing.
    (The mouse cursor should be in the Image Editor or the Timeline when starting playback
    for this to work.)

Deinterlace
:   Apply deinterlacing to interlaced (analog) video.

### Generated

Image generated by Blender.

X, Y
:   The width and height of the image in pixels.

Float Buffer
:   Creates a 32-bit image. This has a larger file size,
    but holds much more color information than the standard 8-bit image.
    For close-ups and large gradients, it may be better to use a 32-bit image.

Type
:   Blank:
    :   Creates a blank image of a single specified color.

    UV Grid:
    :   Creates a checkerboard pattern with a colored cross (+) in each square.

    Color Grid:
    :   Creates a more complex colored grid with letters and numbers denoting locations.
        It could be used to check for stretching or distortion in the UV mapping.

Color
:   The fill color when creating a *Blank* image.
user: How do I use NodeSocketStringFilePath(NodeSocketStandard) in Blender? Include parameters, examples, warnings and best practices.

assistant: # NodeSocketStringFilePath(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.NodeSocketStringFilePath(*NodeSocketStandard*)
:   String socket of a node

    default_value
    :   Input value used for unconnected socket

        Type:
        :   string, default “”, (never None, blend relative `//` prefix supported)

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

assistant: GPU Subdivision
:   Under certain circumstances, the GPU will be used to subdivide a mesh with a
    [Subdivision Surface modifier](../../modeling/modifiers/generate/subdivision_surface.xhtml).
    This typically results in increased subdivision performance.

    This feature is not supported on Qualcomm GPUs on Windows
user: Provide the full official documentation entry for Camera Positioning, preserving all code examples.

assistant: There are several different ways to position the camera in your scene.
Some of them are explained below.

### Align Active Camera to View

Moves and rotates the camera so it perfectly matches your current viewport view.

### Camera Navigation

By enabling [Lock Camera to View](../sidebar.xhtml#bpy-types-spaceview3d-lock-camera) in
Sidebar ‣ View and switching to camera view or toggle the lock navigation gizmo button
when in camera view, the camera will become “glued” to the view and follow it around as you navigate.

### Roll, Pan, Dolly, and Track

To perform these camera moves, the camera must first be selected so transform operations apply to it.
The following actions also assume that you are in camera view.
Having done so, you can now manipulate the camera using the same tools that are used to transform any object:

Roll
:   Press `R` to enter object rotation mode. The default will be to rotate the camera along its local Z axis
    (the axis orthogonal to the camera view), which is the definition of a camera “roll”.

Vertical Pan or Pitch
:   This is just a rotation along the local X axis. Press `R` to enter object rotation mode,
    then `X` twice. (The first press selects the *global* axis, the second the *local* axis.
    This works with any axis; see [Axis Locking](../../../scene_layout/object/editing/transform/control/axis_locking.xhtml)).

Horizontal Pan or Yaw
:   This corresponds to a rotation around the camera’s local Y axis.
    Press `R`, then `Y` twice.

Dolly
:   To dolly the camera, press `G` then `MMB` (or `Z` twice).

Sideways Tracking
:   Press `G` and move the mouse (you can use `X` or `Y` twice
    to get purely horizontal or vertical tracking).
user: Show practical ways to work with Brush Settings in a Blender add-on or script – include code.

assistant: ### General

Only Size and Auto-Masking has an impact on the brush behavior for this brush.

### Unique

Deformation
:   Deformation type that is used by the brush.

    Rotate/Twist:
    :   Rotates the mesh around the pose origin.
        When pressing `Ctrl`, the brush applies a twist rotation
        instead (and disables any IK segments that are used).

    Scale/Translate:
    :   Scale the mesh based on the pose origin.
        While holding `Ctrl` the brush moves the mesh.

    Squash/Stretch:
    :   Works similar to *Scale/Translate* however, it applies different
        scale values along different axes to achieve the stretching effect.

Rotation Origins
:   Method to set the rotation origin for the pose origin or individual IK segments.

    Topology:
    :   Sets the rotation origin automatically using the topology and shape of the mesh.

    Face Sets:
    :   Creates a pose segment per [Face Set](../editing/face_sets.xhtml#sculpting-editing-facesets), starting from the active face set.
        This can lead to the most accurate and desirable results.

    Face Sets FK:
    :   Simulates a [Forward Kinematics](../../../glossary/index.xhtml#term-Forward-Kinematics) deformation using the [Face Set](../editing/face_sets.xhtml#sculpting-editing-facesets)
        under the cursor as control.

Pose Origin Offset
:   Offset of the pose origin in relation to the brush radius.
    This is useful to manipulate areas with a lot of complex shapes like fingers.

Smooth Iterations
:   Controls the smoothness of the falloff of the deformation.

Pose IK Segments
:   Controls how many [IK segments](../../../animation/armatures/posing/bone_constraints/inverse_kinematics/introduction.xhtml#bone-constraints-inverse-kinematics)
    are going to be created for posing.
    This can be seen by a divided white line on the cursor.
    This is also useful for making curved deformations with the pose brush,
    like hair clumps and tails.

Lock Rotation when Scaling
:   When using *Scale/Translate Deformation*, do not rotate the segment; only scaling is applied.

Keep Anchor Point
:   Keeps the position of the last segment in the IK chain fixed.
    If this is disabled, the mesh can be dragged around more freely,
    creating snake like shapes.

Connected Only
:   The brush will only affect topologically connected elements.
    Disabling this will allow deforming multiple disconnected meshes at the same time,
    for example characters with clothing & shoes.

    Disabling this setting can have a big impact on performance,
    as neighboring elements will be merged internally.
    Keeping the *Max Element Distance* as low as possible
    will help counteract the performance impact.

Max Element Distance
:   Maximum distance to search for disconnected loose parts in the mesh.
user: Provide the full official documentation entry for Template Scripts, preserving all code examples.

assistant: While app templates can use Python scripts,
they simply have access to the same APIs available for add-ons and any other scripts.

As noted above, you may optionally have an `__init__.py` in your app template.
This has the following advantages:

- Changes can be made to the startup or preferences, without having to distribute a blend-file.
- Changes can be made dynamically.

  You could for example – configure the template to check the number of processors,
  operating system and memory, then set values based on this.
- You may enable add-ons associated with your template.

On activation a `register` function is called, `unregister` is called when another template is selected.

As these only run once, any changes to defaults must be made via handler.
Two handlers you are likely to use are:

- `bpy.app.handlers.load_factory_preferences_post`
- `bpy.app.handlers.load_factory_startup_post`

These allow you to define your own “factory settings”, which the user may change,
just as Blender has it’s own defaults when first launched.

This is an example `__init__.py` file which defines defaults for an app template to use.

```
import bpy
from bpy.app.handlers import persistent

@persistent
def load_handler_for_preferences(_):
    print("Changing Preference Defaults!")
    from bpy import context

    prefs = context.preferences
    prefs.use_preferences_save = False

    kc = context.window_manager.keyconfigs["blender"]
    kc_prefs = kc.preferences
    if kc_prefs is not None:
        kc_prefs.select_mouse = 'RIGHT'
        kc_prefs.spacebar_action = 'SEARCH'
        kc_prefs.use_pie_click_drag = True

    view = prefs.view
    view.header_align = 'BOTTOM'

@persistent
def load_handler_for_startup(_):
    print("Changing Startup Defaults!")

    # Use smooth faces.
    for mesh in bpy.data.meshes:
        for poly in mesh.polygons:
            poly.use_smooth = True

    # Use material preview shading.
    for screen in bpy.data.screens:
        for area in screen.areas:
            for space in area.spaces:
                if space.type == 'VIEW_3D':
                    space.shading.type = 'MATERIAL'
                    space.shading.use_scene_lights = True

def register():
    print("Registering to Change Defaults")
    bpy.app.handlers.load_factory_preferences_post.append(load_handler_for_preferences)
    bpy.app.handlers.load_factory_startup_post.append(load_handler_for_startup)

def unregister():
    print("Unregistering to Change Defaults")
    bpy.app.handlers.load_factory_preferences_post.remove(load_handler_for_preferences)
    bpy.app.handlers.load_factory_startup_post.remove(load_handler_for_startup)
```
user: Give a detailed overview of Sound to Samples: syntax, arguments, return values, common patterns.

assistant: Creates a sampled curve based on a sound file. Use *Samples to Keys* if you need to edit it.

Lowest Frequency
:   Cutoff frequency of a high-pass filter that is applied to the audio data.

Highest Frequency
:   Cutoff frequency of a low-pass filter that is applied to the audio data.

Attack Time
:   Value for the hull curve calculation that tells how fast the hull curve can rise.
    The lower the value, the steeper it can rise.

Release Time
:   Value for the hull curve calculation that tells how fast the hull curve can fall.
    The lower the value, the steeper it can fall.

Threshold
:   Minimum amplitude value needed to influence the hull curve.

Accumulate
:   Only the positive differences of the hull curve amplitudes are summarized to produce the output.

Additive
:   The amplitudes of the hull curve are summarized. If *Accumulate* is enabled,
    both positive and negative differences are accumulated.

Square
:   Gives the output as a square curve.
    Negative values always result in -1, and positive ones in 1.

    Square Threshold
    :   All values lower than this threshold result in 0.
user: Give a detailed overview of World Environment: syntax, arguments, return values, common patterns.

assistant: # World Environment

[image reference removed]

Lighting with an HDR image.

The world defines the environment that the scene is in.
The surface shader sets the background and environment lighting,
either as a fixed color, sky model or HDRI texture.
With volume shaders the entire scene can be covered in mist or other volumetric effects.
user: Explain Inputs in complete detail according to the official Blender documentation.

assistant: The first three settings simulate the aperture of the camera.

Flaps
:   Sets an integer number of blades for the cameras iris diaphragm.

Angle
:   Gives these blades an angular offset relative to the image plane.

Roundness
:   Sets the curvature of the blades with (0 to 1) from straight to bringing them to a perfect circle.

Catadioptric Size
:   Provides a type of distortion found in mirror lenses and some telescopes.
    This can be useful to produce a visual complex bokeh.

Color Shift
:   Introduces chromatic aberration into the blur such as would be caused by a tilt-shift lens.
user: Show practical ways to work with Snapping in a Blender add-on or script – include code.

assistant: ### Move

[image reference removed]

One unit (default zoom level).

Snapping while moving objects changes the object location in 1 unit increments.
While in an [aligned view](../../../../../editors/3dview/navigate/align.xhtml),
The increment amount is changed based on the [zoom level](../../../../../editors/3dview/navigate/navigation.xhtml#bpy-ops-view3d-zoom).
For example, at a base zoom level objects are moved in increments of 1 unit (i.e. between the two light gray lines).
Zooming in enough to see the next set of gray lines will snap in increments of 1/10 of a unit.
Zooming in further until will snap in increments of 1/100 of a unit and so on until the zoom limit is reached.
Zooming out will have the opposite effect and
cause movement to happen by increments of 10, 100 units, etc.

### Rotation

Holding `Ctrl` will cause rotations of 5 degrees.

### Scale

Holding `Ctrl` will cause size changes in increments of 0.1 units.
user: How do I use Bending Stiffness in Blender? Include parameters, examples, warnings and best practices.

assistant: The second method to stop an object from collapsing is to give it *Bending Stiffness.*
Just like the other settings, this can be combined with *Stiffness* to add bending
resistance to the diagonal springs as well.

We first do the same cube experiment as before, using only *Bending Stiffness*:

Bending Stiffness.

|  |  |  |
| --- | --- | --- |
| <../../../_images/physics_soft-body_forces_interior_quadvstri-sb-001.png>   Frame 1. | <../../../_images/physics_soft-body_forces_interior_quadvstri-sb-bs-036.png>   Frame 36. | <../../../_images/physics_soft-body_forces_interior_quadvstri-sb-bs-401.png>   Frame 401. |

Both cubes keep their shape. Now, we try the same thing with subdivided planes,
again a quad-based one and a triangulated one:

|  |  |  |
| --- | --- | --- |
| <../../../_images/physics_soft-body_forces_interior_quadvstri-bending-001.png>   Two planes falling. | <../../../_images/physics_soft-body_forces_interior_quadvstri-bending-101.png>   No bending stiffness. | <../../../_images/physics_soft-body_forces_interior_quadvstri-bending-high-101.png>   High bending stiffness (10). |

Without any *Bending Stiffness*, the faces can rotate freely as though their edges were hinges.
Enabling *Stiffness* to add diagonal springs would not change this (just as triangulating doesn’t).

With a high *Bending Stiffness*, however, the edges resist this rotation, and the planes
act more like planks than towels.
user: How do I use Inputs in Blender? Include parameters, examples, warnings and best practices.

assistant: Geometry
:   Standard geometry input.

Selection
:   Boolean field indicating which geometry elements to include.

Group ID
:   Integer field indicating which group each element belongs to. Elements with the
    same ID will be moved into the same output instance.
user: Give a detailed overview of Example: syntax, arguments, return values, common patterns.

assistant: |  |  |  |
| --- | --- | --- |
| ../../../_images/modeling_modifiers_deform_curve_example-edit-curve.png   Edit curve. | ../../../_images/modeling_modifiers_deform_curve_example-monkeyoncurve1.png   Monkey on a curve. | ../../../_images/modeling_modifiers_deform_curve_example-monkeyoncurve2.png   Monkey deformations. |
user: Describe Inputs from the Blender manual or Python API, including usage steps and snippets.

assistant: Image
:   Standard color input. If no image is selected, an image filled with the selected color is used.
    You can use and crop this image in combination with another background image.

X
:   The X position of the lower left corner of the crop region.

Y
:   The Y position of the lower left corner of the crop region.

Width
:   The width of the crop region.

Height
:   The height of the crop region.

Alpha Crop
:   Sets the areas outside of the crop region to be transparent instead of actually cropping the size of the image.
user: Describe BrushCapabilitiesImagePaint(bpy_struct) from the Blender manual or Python API, including usage steps and snippets.

assistant: # BrushCapabilitiesImagePaint(bpy_struct)

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

*class* bpy.types.BrushCapabilitiesImagePaint(*bpy_struct*)
:   Read-only indications of supported operations

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

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

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

    has_space_attenuation
    :   Type:
        :   boolean, default False, (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: Show practical ways to work with Usage in a Blender add-on or script – include code.

assistant: ### Selecting a Brush and Material

In the Tool Settings select the brush, material and color type to use with the tool.
The Line tool uses *Draw Brush* types.
See [Brush Settings](../brushes/draw.xhtml#grease-pencil-draw-common-options) for more information.

### Creating Lines

1. Click (`LMB` or the `Pen` tip) and drag the start point.
2. Release on the desired end point.
3. After releasing you can move the start and end point by clicking and dragging on the yellow manipulators.
4. Then confirm (`Return`/`MMB`) or cancel (`Esc`/`RMB`).

While dragging you can use `Shift` to snapping the line to horizontal, vertical or 45° angle
or use `Alt` to create the line from a center point.

`NumpadPlus` and `NumpadMinus` or using the mouse `Wheel`
will increase or decrease the amount of points in the final line.

`F` will adjust the line thickness and `Shift`-`F` will adjust the opacity of the strokes.

|  |  |  |
| --- | --- | --- |
| ../../../../_images/grease-pencil_modes_draw_tools_line_example-01.png   click and dragging the start point. | ../../../../_images/grease-pencil_modes_draw_tools_line_example-02.png   Moving start and end points with manipulators. | ../../../../_images/grease-pencil_modes_draw_tools_line_example-03.png   The line after confirming. |

### Extruding

Before confirming you can use `E` to extrude the end point of the line
to generate multiple connected lines.

|  |  |  |
| --- | --- | --- |
| ../../../../_images/grease-pencil_modes_draw_tools_line_extrude-01.png   End point extruding. | ../../../../_images/grease-pencil_modes_draw_tools_line_extrude-02.png   Moving the end point of the last line with the manipulator. | ../../../../_images/grease-pencil_modes_draw_tools_line_extrude-03.png   The connected lines after confirming. |
user: What is Effects and how is it used in Blender Python scripting?

assistant: [image reference removed]

Effects panel.

This is a special feature for “Paint” type surface.
It generates animated movement on canvas surface.

Effects
:   Spread
    :   Paint slowly spreads to surrounding points eventually filling all connected areas.

    Drip
    :   Paint moves in specific direction specified by Blender force fields,
        gravity and velocity with user-defined influences.

    Shrink
    :   Painted area slowly shrinks until disappears completely.

For spread and drip effects, only “wet paint” is affected, so as the paint dries,
movement becomes slower until it stops.
user: What is Presets and how is it used in Blender Python scripting?

assistant: At the top of the window, you can select and manage presets.

Keymap Presets
:   The selector lets you choose from builtin presets:

    - [Blender](../../interface/keymap/blender_default.html): the default keymap,
      which is the one used throughout this manual.
    - Blender 27x: legacy keymap as used in Blender 2.79 and before.
    - [Industry Compatible](../../interface/keymap/industry_compatible.html): a keymap
      which more closely matches other 3D editing applications.

Add Custom Keymap Configuration
:   Add a custom keymap configuration.

Remove Keymap Configuration
:   Remove a custom keymap configuration.

Import
:   Opens a File Browser to select a `.py` file containing a custom preset.

Export
:   Saves the current keymap configuration as a preset others may use.

    All Keymaps
    :   When disabled, only the shortcut assignments that have been modified will be exported.
        This exported file may be thought of as a “keymap delta” instead of a full export.

        When enabled, the entire keymap is written.
user: Describe Sticky Selection Mode from the Blender manual or Python API, including usage steps and snippets.

assistant: Options for automatically selecting additional UV vertices.
Only available for *Face* select mode or if *Sync Selection* is disabled.

Disabled
:   Each UV vertex can be selected independently of the others.

Shared Location
:   Automatically select UV vertices that correspond to the same mesh vertex and have the same UV coordinates.
    This is the default and gives the illusion that multiple faces in a UV map can share the same vertex;
    in reality, they have separate vertices that overlap.

Shared Vertex
:   Automatically select UV vertices that correspond to the same mesh vertex,
    even if they have different UV coordinates.
    This is also the behavior when *Sync Selection* is enabled.
user: How do I use Navigation Bar in Blender? Include parameters, examples, warnings and best practices.

assistant: Properties are grouped into tabs, shown as a vertical list of icons in the Navigation Bar region of the editor.

The Navigation Bar can be flipped to the left or right of the editor by `RMB` on the region and selecting
Navigation Bar ‣ Flip to Left/Right.

To hide the Navigation Bar, `RMB` on the region and select Navigation Bar ‣ Hide.
Use the region toggle icon as described in [Changing the Size and Hiding Regions](../interface/window_system/regions.html#bpy-ops-screen-region-blend).

### Active Tool and Workspace Settings

This first tab contains settings for the active [tool](3dview/toolbar/index.html) (in the 3D Viewport)
and the current [workspace](../interface/window_system/workspaces.html).

### Scene

Tabs related to the active scene:

- Render: [EEVEE](../render/eevee/index.html),
  [Cycles](../render/cycles/render_settings/index.html), or
  [Workbench](../render/workbench/index.html) settings.
- [Output](../render/output/index.html)
- [View Layer](../render/layers/index.html)
- [Scene](../scene_layout/scene/properties.html)
- [World](../render/lights/world.html)

### Collection

Settings for the active [Collection](../scene_layout/collections/collections.html#scene-layout-collections-collections-tab).

### Object

Tabs related to the active object. Some are only shown for certain object types.

- [Object](../scene_layout/object/properties/index.html)
- [Modifiers](../modeling/modifiers/index.html) (or [Grease Pencil Modifiers](../grease_pencil/modifiers/index.html))
- [Effects](../grease_pencil/visual_effects/index.html)
- [Particles](../physics/particles/index.html)
- [Physics](../physics/index.html)
- [Object Constraints](../animation/constraints/index.html)

### Object Data

The *Object Data* tab name remains constant, but its icon changes depending on the object type.

Geometry Objects

- [Mesh](../modeling/meshes/properties/object_data.html)
- [Curve](../modeling/curves/properties/index.html)
- [Surface](../modeling/surfaces/properties/index.html)
- [Text](../modeling/texts/properties.html)
- [Metaball](../modeling/metas/properties.html)
- [Grease Pencil](../grease_pencil/properties/index.html)

Rigging and Deformation Objects

- [Armature](../animation/armatures/properties/index.html)

  - [Bone](../animation/armatures/bones/properties/index.html)
  - [Bone Constraints](../animation/armatures/posing/bone_constraints/index.html)
- [Lattice](../animation/lattice.html)

Other Object Types

- [Empty](../modeling/empties.html)
- [Speaker](../render/output/audio/speaker.html)
- [Camera](../render/cameras.html)
- [Light](../render/lights/light_object.html)
- [Light Probe](../render/eevee/light_probes/index.html)

### Object Shading

Tabs related to an object’s visual appearance. Shown only when relevant.

- [Material](../render/materials/index.html)
- [Texture](../render/materials/legacy_textures/index.html)

### Strips

Tabs related to video editing strips. Shown only when relevant.

- [Strip Modifiers](../video_editing/edit/montage/strip_modifiers.html)
user: Describe Examples from the Blender manual or Python API, including usage steps and snippets.

assistant: [image reference removed]

Particle Instance modifier example.

The render above shows a single plane mesh object assigned to two different vertex groups
and each of those vertex groups is assigned to a separate and independent particle system,
with each particle system being assigned to a different Particle Instance modifier.
In the case shown the Particle Instance modifiers are added to a sphere and a cube.
See [example blend-file](https://archive.blender.org/wiki/2015/uploads/4/48/Manual_-_Modifiers_-_Particle_Instance_Modifiers_-_Split_Plane.blend).

[image reference removed]

Create Along Path example.

In this example, a single *Keyed* particle travels through four points (green planes),
on an elliptical path. The Particle Instance modifier is added to a cylinder object
and then associated with that *Keyed* particle system.

When the *Create Along Paths* is activated,
instead of the cylinder location just following the position of the particle,
the cylinder mesh is fitted to the shape of the path followed by the particle.
The mesh geometry of the object which is deformed
can have an impact on how well the deformation is carried out.
In the case of the cylinder, it has many loop cuts along its length so
that it can bend at those points to deform along the particle path.

The Particle Instance modifier *Create Along Paths* option works for hair (strand) particles
as well as with keyed particles. In this case, the mesh of the modifier will follow
the length and profile of the hair strands paths.
user: Show practical ways to work with ShaderNodeBackground(ShaderNode) in a Blender add-on or script – include code.

assistant: # ShaderNodeBackground(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.ShaderNodeBackground(*ShaderNode*)
:   Add background light emission.
    Note: This node should only be used for the world surface output

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

assistant: To parent objects, select at least two objects
(select the child objects first, and select the parent object last),
and press `Ctrl`-`P`. The *Set Parent To* menu will pop up allowing
you to select from one of several possible different parenting types.
Selecting one of the entries in *Set Parent To* confirms,
and the child/children to parent relationship is created.
The selected objects will have their ‘parent’ set to the [active object](../selecting.xhtml#object-active),
and as a result will be ‘siblings’.

The *Set Parent To* pop-up menu is context-sensitive, which means
the number of entries it displays can change depending on what objects are selected
when the `Ctrl`-`P` shortcut is used.

Moving, rotating or scaling the parent will also usually transform the child/children.
Yet transforming the child/children of the parent will not affect the parent.
In other words, the direction of influence is from parent to child and not child to parent.

Type
:   Blender supports many different types of parenting, listed below.
    Besides parenting the selected objects, some types add a Modifier or Constraint to the child objects,
    with the parent as the target object or activates a parent property i.e. *Follow Path*.

    - Object
    - [Armature Deform](../../../animation/armatures/skinning/parenting.xhtml)
    - Bone
    - [Curve Deform](../../../modeling/modifiers/deform/curve.xhtml)
    - [Follow Path](../../../modeling/curves/properties/path_animation.xhtml#curve-path-animation)
    - [Path Constraint](../../../animation/constraints/relationship/follow_path.xhtml)
    - [Lattice Deform](../../../modeling/modifiers/deform/lattice.xhtml)
    - [Vertex](../../../modeling/meshes/editing/vertex/make_vertex_parent.xhtml)
    - [Vertex (Triangle)](../../../modeling/meshes/editing/vertex/make_vertex_parent.xhtml)

Keep Transform
:   The object’s current world transform (so its absolute location, rotation and scale in the world) is computed.
    The new parent is set, and then the *Parent Inverse* matrix is computed such that after setting
    the new parent the object is still at its previous world transform.

### Parent Inverse

Blender can assign a parent without moving the child object.
This is achieved via a hidden matrix called the *Parent Inverse* matrix,
which sits between the [transform](../../../glossary/index.xhtml#term-Transform) of the parent and the child.

When objects are parented with `Ctrl`-`P`, Parent Inverse matrix is updated.
Depending on the choice in the Set Parent menu, the object’s local location,
rotation, and scale are also updated. For more details, see [Object Parent](#object-parenting).

The Parent Inverse matrix can be cleared by using [Clear Parent Inverse](#bpy-ops-object-parent-clear).