PGCRYPT/OpenBlender_Train huggingface dataset:
user: What is Vertex Groups Panel and how is it used in Blender Python scripting?

assistant: # Vertex Groups Panel

[image reference removed]

The Vertex Group panel.

Vertex groups are maintained within the *Object Data* Properties, in the *Vertex Groups* panel.

Active Vertex Group
:   A [List view](../../../../interface/controls/templates/list_view.xhtml#ui-list-view).

    Lock
    :   Locks the group from being editable. You can only rename or delete the group.

Add Vertex Group
:   Create an empty vertex group.

Remove Vertex Group
:   Deletes the active vertex group.

Vertex Group Specials
:   Sort by Name
    :   Sorts vertex groups alphabetically.

    Sort by Bone Hierarchy

    Duplicate Vertex Group
    :   Add a copy of the active vertex group as a new group.
        The new group will be named like the original group with “_copy” appended at the end of its name.
        And it will contain associations to exactly the same vertices
        with the exact same weights as in the source vertex group.

    Copy Vertex Group to Selected
    :   Copy all vertex groups to other selected objects provided they have matching indices
        (typically this is true for copies of the mesh which are only deformed and not otherwise edited).

    Mirror Vertex Group
    :   Mirrors weights and/or flips group names.
        See [Mirror Vertex Group](../../../../sculpt_paint/weight_paint/editing.xhtml#bpy-ops-object-vertex-group-mirror) for more information.

    Mirror Vertex Group (Topology)
    :   Performs the *Mirror Vertex Group* with [Topology Mirror](../../tools/tool_settings.xhtml#bpy-types-mesh-use-mirror-topology) enabled.

    Remove from All Groups
    :   Unassigns the selected vertices from all (even locked) groups.
        After this operation has been performed, the vertices will no longer be contained in any vertex group.
        (Not available for locked groups.)

    Clear Active Group
    :   Remove all assigned vertices from the active group. The group is made empty.
        Note that the vertices may still be assigned to other vertex groups of the object.
        (Not available for locked groups.)

    Delete All Unlocked Groups
    :   Remove all vertex groups from the object that are *not* locked.

    Delete All Groups
    :   Remove all vertex groups from the object.

    Lock All
    :   Lock all groups.

    Unlock All
    :   Unlock all groups.

    Lock Invert All
    :   Invert group locks.
user: Describe Trace from the Blender manual or Python API, including usage steps and snippets.

assistant: CPU Only

We support the `trace(point pos, vector dir, ...)` function,
to trace rays from the OSL shader. The “shade” parameter is not supported currently,
but attributes can be retrieved from the object that was hit using the
`getmessage("trace", ..)` function. See the OSL specification for details on how to use this.

This function cannot be used instead of lighting;
the main purpose is to allow shaders to “probe” nearby geometry,
for example to apply a projected texture that can be blocked by geometry,
apply more “wear” to exposed geometry, or make other ambient occlusion-like effects.
user: What is Clay and how is it used in Blender Python scripting?

assistant: # Clay

Similar to the [Draw](draw.html) brush,
but includes settings to adjust the [sculpt plane](../../brush/brush_settings.html#bpy-types-brush-sculpt-plane)
on which the brush acts. That’s because it behaves like a combination of the
[Plane](plane.html) and *Draw* brushes.

This brush is useful for building and removing volumes and shapes like real clay,
because it flattens details as you add/subtract from the surfaces.

If used together with [Dyntopo](../tool_settings/dyntopo.html#bpy-ops-sculpt-dynamic-topology-toggle)
it’s easy to continuously build shapes, even in a single stroke.
user: How do I use References in Blender? Include parameters, examples, warnings and best practices.

assistant: |  |  |
| --- | --- |
| - [`GeometryNodeSimulationOutput.active_item`](bpy.types.GeometryNodeSimulationOutput.html#bpy.types.GeometryNodeSimulationOutput.active_item "bpy.types.GeometryNodeSimulationOutput.active_item") - [`GeometryNodeSimulationOutput.state_items`](bpy.types.GeometryNodeSimulationOutput.html#bpy.types.GeometryNodeSimulationOutput.state_items "bpy.types.GeometryNodeSimulationOutput.state_items") | - [`NodeGeometrySimulationOutputItems.new`](bpy.types.NodeGeometrySimulationOutputItems.html#bpy.types.NodeGeometrySimulationOutputItems.new "bpy.types.NodeGeometrySimulationOutputItems.new") - [`NodeGeometrySimulationOutputItems.remove`](bpy.types.NodeGeometrySimulationOutputItems.html#bpy.types.NodeGeometrySimulationOutputItems.remove "bpy.types.NodeGeometrySimulationOutputItems.remove") |
user: Show practical ways to work with VIEWLAYER_UL_aov(UIList) in a Blender add-on or script – include code.

assistant: # VIEWLAYER_UL_aov(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.VIEWLAYER_UL_aov(*UIList*)
:   draw_item(*_context*, *layout*, *_data*, *item*, *icon*, *_active_data*, *_active_propname*)

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

assistant: [image reference removed]

The Vertex Weight Angle modifier panel.

Vertex Group
:   The vertex group to affect.

    Invert
    :   Inverts the influence of the selected vertex group. The setting reverses the weight values of the group.

Angle
:   Sets the angle for the maximum weights value.

Axis
:   The axis along which the angle affects the weights.

    X, Y, Z

Space
:   Coordinate space to be used.

Minimum
:   Minimum value for vertex weight.

Multiply Weights
:   Multiply the calculated weights with the existing values in the vertex group.

### Influence

See [Influence Filters](../introduction.xhtml#grease-pencil-modifier-influence-filters).
user: Describe Options from the Blender manual or Python API, including usage steps and snippets.

assistant: [image reference removed]

Object Solver constraint.

Active Clip
:   Whether the physical object is in the scene’s [Active Clip](../../../scene_layout/scene/properties.xhtml#bpy-types-scene-active-clip).
    If unchecked, a selector appears for choosing another clip.

Object
:   The physical object whose motion to imitate. See the [Objects Panel](../../../movie_clip/tracking/clip/sidebar/track/objects.xhtml)
    in the Movie Clip Editor’s Sidebar for setting this up.

Camera
:   The Blender camera matching the physical camera that recorded the object.
    If left empty, the scene’s [active camera](../../../scene_layout/scene/properties.xhtml#bpy-types-scene-camera) is used.

    If the physical camera was in motion, the Blender camera should have a
    [Camera Solver Constraint](camera_solver.xhtml). This constraint is useful even if
    the physical camera was stationary, because it makes the tracking markers appear at their
    reconstructed world positions in the 3D Viewport (if the [Motion Tracking](../../../editors/3dview/display/overlays.xhtml#bpy-types-spaceview3d-show-reconstruction)
    overlay is enabled).

Set Inverse
:   Tell the constraint that the current Location of the Blender object (that is, its position with the constraint
    *disabled*) is the correct position for the current frame. Once this information is saved, the object will
    also be in the correct position for the other frames.

    - When initially adding the constraint:

      - Bring the object into position for the current frame.
      - Add the constraint.
      - Click *Set Inverse*.
    - When tweaking the object’s position at a later point:

      - Run [Apply Visual Transform](../../../scene_layout/object/editing/apply.xhtml#bpy-ops-object-visual-transform-apply). (This may move the object
        to a different position.)
      - Disable the constraint. (This will bring the object back to its previous position.)
      - Tweak the object’s position as desired.
      - Click *Set Inverse*.
      - Enable the constraint.

Clear Inverse
:   Resets the relative transformation that was stored by *Set Inverse*.

Constraint to F-Curve
:   Replaces the constraint by a set of equivalent keyframes.

[Influence](../interface/common.xhtml#bpy-types-constraint-influence)
:   How strongly the constraint affects its owner.
user: Provide the full official documentation entry for Inputs, preserving all code examples.

assistant: Closures define their own inputs, which act as parameters for the internal node logic.
These inputs can be created by dragging the blank input socket into another socket or by adding sockets manually in the
node’s properties. Each input defines a parameter that the closure can receive when it is evaluated elsewhere.
user: Give a detailed overview of Curve Guide: syntax, arguments, return values, common patterns.

assistant: # Curve Guide

The *Curve Guide* is used to force particles to follow a certain
path defined by a [Curve Object](../../../../modeling/curves/index.xhtml).
A typical scenario would be to move a red blood cell inside a vein,
or to animate the particle flow in a motor.
You can also use *Curve Guide* to shape certain hair strands.

Since you can animate curves as a soft body or any other usual way,
you may build very complex animations while keeping great control and keeping the simulation time to a minimum.

To make particles point in the direction of the curve, you need to set their *Orientation Axis*
to *Velocity / Hair*, enable *Dynamic*, and set their *Angular Velocity Axis* to *Velocity*,
all in the [Rotation](../../../particles/emitter/rotation.xhtml) settings of the particle system.
The [Follow Path Constraint](../../../../animation/constraints/relationship/follow_path.xhtml) and the curve’s legacy
[Follow](../../../../modeling/curves/properties/path_animation.xhtml#bpy-types-curve-use-path-follow) option won’t work for this.

A *Curve Guide* force affects all particles on the same layer, independently from their distance to the curve.
If you have several guides in a layer,
their fields add up to each other (the way you may have learned it in your physics course).
But you can limit their influence radius by changing the *Minimum Distance* (see below).

A particle follows a *Curve Guide* during its lifetime,
the velocity depends on its lifetime and the length of the path.
user: Provide the full official documentation entry for Bpy.Types.Moviestrip, preserving all code examples.

assistant: eStrip.alpha_mode MovieStrip.animation_offset_end MovieStrip.animation_offset_start MovieStrip.color_multiply MovieStrip.color_saturation MovieStrip.colorspace_settings MovieStrip.crop MovieStrip.elements MovieStrip.filepath MovieStrip.fps MovieStrip.multiply_alpha MovieStrip.proxy MovieStrip.retiming_keys MovieStrip.stereo_3d_format MovieStrip.stream_index MovieStrip.strobe MovieStrip.transform MovieStrip.use_deinterlace MovieStrip.use_flip_x MovieStrip.use_flip_y MovieStrip.use_float MovieStrip.use_multiview MovieStrip.use_proxy MovieStrip.use_reverse_frames MovieStrip.views_format MovieStrip.reload_if_needed() MovieStrip.metadata() MovieStrip.bl_rna_get_subclass() MovieStrip.bl_rna_get_subclass_py() Inherited Properties Inherited Functions
user: What is Bundling Scripts and how is it used in Blender Python scripting?

assistant: Besides extensions, it’s possible to bundle scripts for presets,
application templates, legacy add-ons, as well as scripts run on startup.

Script directories can be manually added in the File Paths preferences.
`$BLENDER_SYSTEM_SCRIPTS` can also be used to add script directories
without modifying the preferences.

Script directories are expected to contain specific subdirectories
like `presets`, `addons` and `startup` for different types of
scripts. See [Path Layout](blender_directory_layout.html#blender-directory-path-layout) for a complete list.

### Startup Scripts

The Blender Python API can be used to customize Blender. This includes
changing preferences, changing the startup file and adding UI elements.

For example, a script can enable add-ons for every user.

```
$BLENDER_SYSTEM_SCRIPTS/startup/enable_addons.py
```

```
def register():
    import addon_utils
    addon_utils.enable("my-addon")

def unregister():
    pass

if __name__ == "__main__":
    register()
```

### Application Templates

[Application Templates](app_templates.html#app-templates) can be used to set up Blender for particular
tasks or projects, separate from the default configuration. When
creating a new file the user can choose the template.

The files are expected to be placed in the system script directories like this:

```
$BLENDER_SYSTEM_SCRIPTS/startup/bl_app_templates_system/MyTemplate/__init__.py
$BLENDER_SYSTEM_SCRIPTS/startup/bl_app_templates_system/MyTemplate/startup.blend
```

### Legacy Add-ons

Add-ons that have not been converted to become an extension yet need
to be placed in the `addons` script directory.

For example, an add-on could be located at:

```
$BLENDER_SYSTEM_SCRIPTS/addons/simple_addon.py
$BLENDER_SYSTEM_SCRIPTS/addons/complex_addon/__init__.py
```
user: What is Noise and how is it used in Blender Python scripting?

assistant: # Noise

The *Noise* modifier uses a pseudo-random number generator to variably distribute the property along the stroke.

Amplitude
:   The maximum value of the noise. A higher amplitude means a less transparent (more solid) stroke.

Period
:   The period of the noise. This means how quickly the property value can change.
    A higher value means a more smoothly changing color along the stroke.

Seed
:   Seed used by the pseudo-random number generator.

Asymmetric Thickness only
:   Allows the thickness to be distributed unevenly at every point.
    Internally, the stroke is represented as a backbone with a thickness to the right and left side.
    All other thickness shaders make sure that the left and right thickness values are equal.
    For the Noise shader however, a meaningful (and good-looking) result
    can be created by assigning different values to either side of the backbone.

[[image reference removed]](../../../../../../_images/render_freestyle_parameter-editor_line-style_modifiers_color_noise_thickness-noise-example.png)

Effect generated with a noise thickness modifier using asymmetric thickness.
user: What is Inputs and how is it used in Blender Python scripting?

assistant: Resolution
:   The number of edges on the curve.

Start, Middle, End
:   Positions of the three control points.
    The generated curve passes through the two end points, and is tangent to the lines between
    the middle point and the two end points.
user: Explain Duplicate Area into New Window in complete detail according to the official Blender documentation.

assistant: Creates a new floating window containing a duplicate of the current editor area.
The new window is fully functional and part of the same Blender instance.

This is especially useful when working with multiple monitors.
user: What is Append and how is it used in Blender Python scripting?

assistant: *Append* copies data-blocks into your blend-file without keeping any reference to the original ones.
You can make further edits to your local copy of the data,
but changes in the external source file will not be reflected in the current one.

In the [File Browser](../../editors/file_browser.xhtml),
navigate to the external source blend-file and select the data-blocks you want to reuse.

### Options

These options are available in the right-hand panel of the File Browser.

Select
:   Select the newly added objects.

Active Collection
:   When enabled, objects and collections will be added to the active collection of the active
    [view layer](../../render/layers/introduction.xhtml).
    Otherwise, they will be added to a new “Appended Data” collection in the active view layer.

Instance Collections
:   When enabled, each appended collection will be added to the scene as an
    [instance collection](../../scene_layout/object/properties/instancing/collection.xhtml)
    (that is, a single object that represents the entire collection).
    You can add more such instances using Add ‣ Collection Instance,
    or replace an instance by the collection contents using [Make Instances Real](../../scene_layout/object/editing/apply.xhtml#bpy-ops-object-duplicates-make-real).

    When disabled, the collections will be added as-is so you can see their content in the
    Outliner.

Instance Object Data
:   When enabled, an object will be created for each directly appended object data.
    Otherwise, no object will be created and the object data will not be visible in
    the scene until you create one yourself (e.g. by dragging the object data from the
    Outliner into the 3D Viewport).

Fake User
:   Marks the appended data-blocks as [Protected](../data_blocks.xhtml#data-system-datablock-fake-user).

Localize All
:   Also copy all indirectly linked data, instead of maintaining the links.
user: Give a detailed overview of Shader Nodes: syntax, arguments, return values, common patterns.

assistant: # Shader Nodes

Cycles applies a number of shader node optimizations both at compile time and run-time.
By exploiting them it is possible to design complicated “Uber Shader”
style node groups that incur minimal render time overhead for unused features.
user: How do I use Inputs in Blender? Include parameters, examples, warnings and best practices.

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

Cumulative Offset
:   When enabled, each point’s offset depends on the displacement of previous points along the curve.
    This results in more natural and continuous bending.

Factor
:   Controls the overall blending strength of the effect.
    A value of 0.0 applies no frizz, while 1.0 applies the full random displacement.

Distance
:   Scales the magnitude of the random displacement applied to the curve points.

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

Seed
:   Defines the random seed used to generate unique displacement patterns.
    Changing this value alters the random variation between curves.

Preserve Length
:   When enabled, maintains the original length of each curve during deformation.
    When disabled, curves may stretch or shrink slightly as a result of the frizz.
user: Provide the full official documentation entry for GeometryNodeCollectionInfo(GeometryNode), preserving all code examples.

assistant: # GeometryNodeCollectionInfo(GeometryNode)

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

*class* bpy.types.GeometryNodeCollectionInfo(*GeometryNode*)
:   Retrieve geometry instances from a collection

    transform_space
    :   The transformation of the instances output. Does not affect the internal geometry

        - `ORIGINAL`
          Original – Output the geometry relative to the collection offset.
        - `RELATIVE`
          Relative – Bring the input collection geometry into the modified object, maintaining the relative position between the objects in the scene.

        Type:
        :   enum in [`'ORIGINAL'`, `'RELATIVE'`], default `'ORIGINAL'`

    *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: Explain Join Group Inputs in complete detail according to the official Blender documentation.

assistant: Merges multiple selected *Group Input* nodes into one consolidated *Group Input* node when possible.
Existing links are preserved, and duplicate inputs are unified to reduce clutter and simplify the node tree.

This operation is useful for cleaning up node groups that have become
disorganized or contain redundant input nodes.
user: Show practical ways to work with Drawing Options in a Blender add-on or script – include code.

assistant: [image reference removed]

General drawing options.

Multiframe
:   Allows to draw on several frames at the same time.

    See [Multiframe](../../multiframe.xhtml) for more information.

Additive Drawing
:   When creating new frames adding strokes with drawing tools,
    the strokes from the previous/active frame are include as a basis for the new one.
    When erasing existing strokes using Additive Drawing a new keyframe will be added.

AutoMerge
:   Joins new strokes with the beginning or end of previously drawn strokes in the active layer.

Add Weight Data
:   When enabled, weight data is added to new strokes according to the current vertex group and weight.
    If there is no vertex group selected, no weight data is added.

    Useful for example in cut-out animation for adding new drawing
    on the same vertex group without the need to creating it afterwards.

    See [Weight Paint Mode](../weight_paint/introduction.xhtml) for more information.

Draw on Back
:   When enabled, new strokes are drawn below of all strokes in the layer.
    For example when you want to paint with a fill material below line strokes on a character and
    they are on the same layer.
user: Show practical ways to work with Delete Geometry Node in a Blender add-on or script – include code.

assistant: # Delete Geometry Node

[image reference removed]

The *Delete Geometry* node removes the selected part of a geometry.
It behaves similarly to the [Delete](../../../meshes/editing/mesh/delete.html#bpy-ops-mesh-delete) tool in Edit Mode.
The type of elements to be deleted can be specified with the domain and mode properties.
user: Explain Properties in complete detail according to the official Blender documentation.

assistant: Type
:   Controls the type of gradient generated.

    Linear:
    :   Directly outputs the input X coordinate.

    Quadratic:
    :   Interpolates the input X coordinate quadratically.

    Easing:
    :   Uses a combination of quadratic and linear interpolation
        to generate a smooth gradient from the input X coordinate.

    Diagonal:
    :   Averages the input X and Y coordinates.

    Spherical:
    :   Creates an inverse gradient using the length of the input vector; the maximum value is at (0, 0, 0).

    Quadratic Sphere:
    :   The same as Spherical, except interpolated quadratically.

    Radial:
    :   Outputs a value based on the angle of the input around the Z axis.
user: What is Footer and how is it used in Blender Python scripting?

assistant: The Text editor footer displays whether the text is saved internally or externally and
if there are unsaved changes to an external file.
For external files, this region also displays the file path to the text file.
user: Describe Tool Settings from the Blender manual or Python API, including usage steps and snippets.

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.xhtml)
        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.xhtml).

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

    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.

Subdivisions
:   Influences how many vertices are used to define the sphere.
    At level 1 the icosphere is an icosahedron, a solid with 20 equilateral triangular faces.
    Each increase in the number of subdivisions splits each triangular face into four.
user: Show practical ways to work with Invoke Function in a Blender add-on or script – include code.

assistant: [`Operator.invoke`](#bpy.types.Operator.invoke "bpy.types.Operator.invoke") is used to initialize the operator from the context
at the moment the operator is called.
invoke() is typically used to assign properties which are then used by
execute().
Some operators don’t have an execute() function, removing the ability to be
repeated from a script or macro.

When an operator is called via [`bpy.ops`](bpy.ops.html#module-bpy.ops "bpy.ops"), the execution context depends
on the argument provided to [`bpy.ops`](bpy.ops.html#module-bpy.ops "bpy.ops"). By default, it uses execute().
When an operator is activated from a button or menu item, it follows
the setting in [`UILayout.operator_context`](bpy.types.UILayout.html#bpy.types.UILayout.operator_context "bpy.types.UILayout.operator_context"). In most cases, invoke() is used.
Running an operator via a key shortcut always uses invoke(),
and this behavior cannot be changed.

This example shows how to define an operator which gets mouse input to
execute a function and that this operator can be invoked or executed from
the Python API.

Also notice this operator defines its own properties, these are different
to typical class properties because Blender registers them with the
operator, to use as arguments when called, saved for operator undo/redo and
automatically added into the user interface.

```
import bpy

class SimpleMouseOperator(bpy.types.Operator):
    """ This operator shows the mouse location,
        this string is used for the tooltip and API docs
    """
    bl_idname = "wm.mouse_position"
    bl_label = "Invoke Mouse Operator"

    x: bpy.props.IntProperty()
    y: bpy.props.IntProperty()

    def execute(self, context):
        # Rather than printing, use the report function,
        # this way the message appears in the header.
        self.report({'INFO'}, "Mouse coords are {:d} {:d}".format(self.x, self.y))
        return {'FINISHED'}

    def invoke(self, context, event):
        self.x = event.mouse_x
        self.y = event.mouse_y
        return self.execute(context)

# Only needed if you want to add into a dynamic menu.
def menu_func(self, context):
    self.layout.operator(SimpleMouseOperator.bl_idname, text="Simple Mouse Operator")

# Register and add to the view menu (required to also use F3 search "Simple Mouse Operator" for quick access).
bpy.utils.register_class(SimpleMouseOperator)
bpy.types.VIEW3D_MT_view.append(menu_func)

# Test call to the newly defined operator.
# Here we call the operator and invoke it,
# meaning that the settings are taken from the mouse.
bpy.ops.wm.mouse_position('INVOKE_DEFAULT')

# Another test call, this time call execute() directly with pre-defined settings.
bpy.ops.wm.mouse_position('EXEC_DEFAULT', x=20, y=66)
```
user: What is Display and how is it used in Blender Python scripting?

assistant: Resolution Scale
:   Adjusts the size of fonts and buttons relative to the automatically detected DPI.
    During typical usage, you may prefer to use zoom which is available in many parts of Blender interface.

Line Width
:   Scale of lines and points in the interface e.g. button outlines, edges and vertex points in the 3D Viewport.

    Thin, Default, Thick

Splash Screen
:   Display the [Splash Screen](../../interface/window_system/splash.xhtml#splash) when starting Blender.

Developer Extras
:   Show settings and menu items which are intended to help developers, this includes:

    - [Operator Search](../../interface/operators.xhtml#bpy-ops-wm-search-operator)
    - [Sequencer Cache Settings](../video_sequencer/sequencer/sidebar/cache.xhtml)

    Button Context Menu
    :   Online Python Reference
        :   To open the Python reference manual.

        Copy Python Command
        :   To copy the expression used when pressing the button.

        Edit Source
        :   To edit Python source code that defines the button.

        Edit Translation
        :   The option to edit UI translations
            (only available when the *Manage UI translations* add-on is also enabled).

    Preferences
    :   Experimental Tab
        :   Work in progress features can be enabled here which are currently being tested.

Tooltips
:   User Tooltips
    :   When enabled, a tooltip will appear when your mouse pointer is over a control.
        This tip explains the function of what is under the pointer,
        shows the associated hotkey (if any).
        When disabled, you can still force the tooltip display by holding `Alt` then hovering the control.

    Python Tooltips
    :   Displays a property’s Python information below the tooltip.

Search – Sort by Most Recent
:   Show most recently selected items at the top of search results,
    otherwise search results are sorted alphabetically.
user: Show practical ways to work with Inherited Properties in a Blender add-on or script – include code.

assistant: |  |  |
| --- | --- |
| - [`bpy_struct.id_data`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.id_data "bpy.types.bpy_struct.id_data") - [`ShaderFx.name`](bpy.types.ShaderFx.html#bpy.types.ShaderFx.name "bpy.types.ShaderFx.name") - [`ShaderFx.type`](bpy.types.ShaderFx.html#bpy.types.ShaderFx.type "bpy.types.ShaderFx.type") - [`ShaderFx.show_viewport`](bpy.types.ShaderFx.html#bpy.types.ShaderFx.show_viewport "bpy.types.ShaderFx.show_viewport") | - [`ShaderFx.show_render`](bpy.types.ShaderFx.html#bpy.types.ShaderFx.show_render "bpy.types.ShaderFx.show_render") - [`ShaderFx.show_in_editmode`](bpy.types.ShaderFx.html#bpy.types.ShaderFx.show_in_editmode "bpy.types.ShaderFx.show_in_editmode") - [`ShaderFx.show_expanded`](bpy.types.ShaderFx.html#bpy.types.ShaderFx.show_expanded "bpy.types.ShaderFx.show_expanded") |
user: Give a detailed overview of Select Loop Inner-Region: syntax, arguments, return values, common patterns.

assistant: *Select Loop Inner-Region* selects all faces that are inside a closed loop of edges.
While it is possible to use this operator in *Vertex* and *Face* selection modes, results may be unexpected.
Note that if the selected loop of edges is not closed,
then all connected edges on the mesh will be considered inside the loop.

[image reference removed]

Loop to Region.

[image reference removed]

This tool handles multiple loops fine, as you can see.

[image reference removed]

This tool handles “holes” just fine as well.
user: How do I use Viewport in Blender? Include parameters, examples, warnings and best practices.

assistant: Before fine-tuning the camera parameters,
you can set the convergence plane in the viewport based in your scene depth layout.
Go outside the camera view and you will instantly see the convergence plane in front of the camera.

You can toggle this and other display settings in the Stereoscopy panel of the 3D Viewport’s Sidebar.
In the following image, the camera’s frustum volumes are also visible.

[image reference removed]

Viewport plane and volume stereo preview.
user: Show practical ways to work with Inputs in a Blender add-on or script – include code.

assistant: Geometry
:   Standard geometry input.

Pattern Mode
:   How the attributes to remove are chosen.

    Exact:
    :   Remove the one attribute with the given name.

    Wildcard:
    :   Remove all attributes that match the pattern which is allowed to contain a single wildcard (\*).

Name
:   The name of the attribute to remove.
user: Describe Hooks from the Blender manual or Python API, including usage steps and snippets.

assistant: # Hooks

Adds a [Hook Modifier](../../../modifiers/deform/hooks.html)
(using either a new empty, or the current selected object) linked to the selection.
Note that even if it appears in the history menu,
this action cannot be undone in *Edit Mode* – because it involves other objects…

When the current object has no hooks associated, only the first two options will appear on the menu.

Hook to New Object
:   Creates a new Hook Modifier for the active object and assigns it to the selected vertices;
    it also creates an empty at the center of those vertices, which are hooked to it.

Hook to Selected Object
:   Does the same as *Hook to New Object*, but instead of hooking the vertices to a new empty,
    it hooks them to the selected object (if it exists).
    There should be only one selected object (besides the mesh being edited).

Hook to Selected Object Bone
:   Does the same as *Hook to New Object*,
    but it sets the last selected bone in the also selected armature as a target.

Assign to Hook
:   The selected vertices are assigned to the chosen hook. For that to happen,
    a list of the hooks associated to the object is displayed.
    All the unselected vertices are removed from it (if they were assigned to that particular hook).
    One vertex can be assigned to more than one hook.

Remove Hook
:   Removes the chosen hook (from the displayed list) from the object.
    Which means that the specific Hook Modifier is removed from its modifier stack.

Select Hook
:   Selects all vertices assigned to the chosen hook (from the hook list).

Reset Hook
:   It’s equivalent to the *Reset* button of the specific Hook Modifier (chosen from the hook list).

Recenter Hook
:   It’s equivalent to the *Recenter* button of the specific Hook Modifier (chosen from the hook list).
user: Give a detailed overview of Main View: syntax, arguments, return values, common patterns.

assistant: When a clip is loaded a Timeline is shown at bottom of the Preview.
It expands over the full area limited by the animation range.
You can move the Playhead by dragging with `LMB`.

The Timeline is composed of the following visual elements:

- Blue line: Playhead
- Yellow: Motion track
- Yellow line: Keyframe
- Orange line: Shape keyframe
- Purple: Prefetched frames
- Light green line: Solve start/end keyframe
user: Show practical ways to work with Instancing in a Blender add-on or script – include code.

assistant: # Instancing

Vertices
:   This creates an instance of all children of this object on each vertex
    (for mesh objects only).

Faces
:   This creates an instance of all children of this object on each face
    (for mesh objects only).

Collection
:   This creates an instance of the collection with the transformation of the object.
    Collection instancers can be animated using actions,
    or can get a [Library Override](../../../../files/linked_libraries/library_overrides.xhtml).
user: How do I use Tool in Blender? Include parameters, examples, warnings and best practices.

assistant: Settings for the active [tool](toolbar.html).

Drag
:   What to do when dragging `LMB` on a place other than the tool’s gizmo.

    Active Tool
    :   Perform the same action as when dragging the gizmo.

    Tweak
    :   Move the image under the mouse cursor.

    Select Box
    :   Drag a selection rectangle and select all the images that are partially
        or completely inside it.
user: Give a detailed overview of Usage: syntax, arguments, return values, common patterns.

assistant: Use the panel in Sidebar of the node editor or press `Shift`-`W` to bring up the quick access menu. You can also
look up the shortcut list in the add-on preferences panel.

[image reference removed]

You can access most functions from the sidebar panel or quick access menu.
user: Give a detailed overview of UV Unwrap Node: syntax, arguments, return values, common patterns.

assistant: # UV Unwrap Node

[image reference removed]

The *UV Unwrap Node* generates a UV map islands based on a selection of seam edges.
The node implicitly performs a [Pack Islands](pack_uv_islands.xhtml)
operation upon completion, because the results may not be generally useful otherwise.
user: Provide the full official documentation entry for FileSelectEntry(bpy_struct), preserving all code examples.

assistant: # FileSelectEntry(bpy_struct)

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

*class* bpy.types.FileSelectEntry(*bpy_struct*)
:   A file viewable in the File Browser

    asset_data
    :   Asset data, valid if the file represents an asset

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

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

    preview_icon_id
    :   Unique integer identifying the preview of this file as an icon (zero means invalid)

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

    relative_path
    :   Path relative to the directory currently displayed in the File Browser (includes the file name)

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

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

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

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

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

        Returns:
        :   The class or default when not found.

        Return type:
        :   type
user: How do I use Custom Shape in Blender? Include parameters, examples, warnings and best practices.

assistant: Apart from custom colors, bones can also have custom shapes (in *Object Mode*
and *Pose Mode*), using another object as a “template.”

[image reference removed]

A bone referencing a cone as its Custom Shape.

You can temporarily disable these shapes by unchecking
*Shapes* in the armature’s Viewport Display panel.

Custom Object
:   Object that defines the custom shape of the selected bone.

Translation X, Y, Z
:   Additional translation to apply to the custom shape.

Rotation X, Y, Z
:   Additional rotation to apply to the custom shape.

Scale X, Y, Z
:   Additional scaling factor to apply to the custom shape.

Override Transform
:   A bone that defines the display transform of the custom shape.
    The shape defined in *Custom Object* will be placed at the location and orientation of that bone.
    This is only visual and does not affect the transform values of this bone.

Affect Gizmo
:   The location and orientation of the *Override Transform* bone will be used for transform
    gizmos and for other transform operators in the 3D Viewport.

Use As Pivot
:   Transform the bone as if it was a child of the *Override Transform* bone.
    This is useful in special cases, where the mesh is deformed away from the bind pose by
    a separate mechanism, for example [Shape Keys](../../../shape_keys/index.xhtml#animation-shape-keys-index).

Scale to Bone Length
:   Whether the custom shape should be scaled by a factor
    equal to the [bone’s length](transform.xhtml#bpy-types-editbone-length).

Wireframe
:   When enabled, the bone is displayed in wireframe mode regardless of the viewport’s shading mode.

Wire Width
:   The line thickness of the wireframe for the custom shape.
user: How do I use FunctionNodeAlignEulerToVector(FunctionNode) in Blender? Include parameters, examples, warnings and best practices.

assistant: # FunctionNodeAlignEulerToVector(FunctionNode)

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

*class* bpy.types.FunctionNodeAlignEulerToVector(*FunctionNode*)
:   Orient an Euler rotation along the given direction

    axis
    :   Axis to align to the vector

        - `X`
          X – Align the X axis with the vector.
        - `Y`
          Y – Align the Y axis with the vector.
        - `Z`
          Z – Align the Z axis with the vector.

        Type:
        :   enum in [`'X'`, `'Y'`, `'Z'`], default `'X'`

    pivot_axis
    :   Axis to rotate around

        - `AUTO`
          Auto – Automatically detect the best rotation axis to rotate towards the vector.
        - `X`
          X – Rotate around the local X axis.
        - `Y`
          Y – Rotate around the local Y axis.
        - `Z`
          Z – Rotate around the local Z axis.

        Type:
        :   enum in [`'AUTO'`, `'X'`, `'Y'`, `'Z'`], default `'AUTO'`

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

        Returns:
        :   Result

        Return type:
        :   boolean

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

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

        Returns:
        :   result

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

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

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

        Returns:
        :   result

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

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

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

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

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

        Returns:
        :   The class or default when not found.

        Return type:
        :   type
user: Show practical ways to work with Inputs in a Blender add-on or script – include code.

assistant: Shader
:   Shaders to mix, such that incoming rays hit either with the specified probability in the *Factor* socket.

Factor
:   Blend weight to use for mixing two shaders;
    at zero it uses the first shader entirely and at one the second shader.
user: What is UserSolidLight(bpy_struct) and how is it used in Blender Python scripting?

assistant: # UserSolidLight(bpy_struct)

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

*class* bpy.types.UserSolidLight(*bpy_struct*)
:   Light used for Studio lighting in solid shading mode

    diffuse_color
    :   Color of the light’s diffuse highlight

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

    direction
    :   Direction that the light is shining

        Type:
        :   [`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 3 items in [-inf, inf], default (0.0, 0.0, 1.0)

    smooth
    :   Smooth the lighting from this light

        Type:
        :   float in [0, 1], default 0.5

    specular_color
    :   Color of the light’s specular highlight

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

    use
    :   Enable this light in solid shading mode

        Type:
        :   boolean, default True

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

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

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

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

        Returns:
        :   The class or default when not found.

        Return type:
        :   type
user: How do I use Array Modifier in Blender? Include parameters, examples, warnings and best practices.

assistant: # Array Modifier

The *Array* modifier creates an array of copies of the base object, with each copy being offset from
the previous one in any of a number of possible ways.

Useful for creating complex repetitive drawings.

Multiple Array modifiers may be active for an object at the same time
(e.g. to create complex three-dimensional constructs).