PGCRYPT/OpenBlender_Train huggingface dataset:
user: What is Dialog Box and how is it used in Blender Python scripting?

assistant: This operator uses its [`Operator.invoke`](#bpy.types.Operator.invoke "bpy.types.Operator.invoke") function to call a popup.

```
import bpy

class DialogOperator(bpy.types.Operator):
    bl_idname = "object.dialog_operator"
    bl_label = "Simple Dialog Operator"

    my_float: bpy.props.FloatProperty(name="Some Floating Point")
    my_bool: bpy.props.BoolProperty(name="Toggle Option")
    my_string: bpy.props.StringProperty(name="String Value")

    def execute(self, context):
        message = "Popup Values: {:f}, {:d}, '{:s}'".format(
            self.my_float, self.my_bool, self.my_string,
        )
        self.report({'INFO'}, message)
        return {'FINISHED'}

    def invoke(self, context, event):
        wm = context.window_manager
        return wm.invoke_props_dialog(self)

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

# Register and add to the object menu (required to also use F3 search "Dialog Operator" for quick access).
bpy.utils.register_class(DialogOperator)
bpy.types.VIEW3D_MT_object.append(menu_func)

# Test call.
bpy.ops.object.dialog_operator('INVOKE_DEFAULT')
```
user: Provide the full official documentation entry for Object Rotation Mode Items, preserving all code examples.

assistant: # Object Rotation Mode Items

QUATERNION:
:   Quaternion (WXYZ).

    No Gimbal Lock.

XYZ:
:   XYZ Euler.

    XYZ Rotation Order - prone to Gimbal Lock (default).

XZY:
:   XZY Euler.

    XZY Rotation Order - prone to Gimbal Lock.

YXZ:
:   YXZ Euler.

    YXZ Rotation Order - prone to Gimbal Lock.

YZX:
:   YZX Euler.

    YZX Rotation Order - prone to Gimbal Lock.

ZXY:
:   ZXY Euler.

    ZXY Rotation Order - prone to Gimbal Lock.

ZYX:
:   ZYX Euler.

    ZYX Rotation Order - prone to Gimbal Lock.

AXIS_ANGLE:
:   Axis Angle.

    Axis Angle (W+XYZ), defines a rotation around some axis defined by 3D-Vector.
user: Describe Laplacian Smooth from the Blender manual or Python API, including usage steps and snippets.

assistant: # Laplacian Smooth

See the [Laplacian Smooth Modifier](../../../modifiers/deform/laplacian_smooth.xhtml) for details.

Laplacian smooth uses an alternative smoothing algorithm that better preserves larger details and
this way the overall shape of the mesh. Laplacian smooth exists as a mesh operation and
as a non-destructive modifier.
user: Give a detailed overview of Realize Instances Node: syntax, arguments, return values, common patterns.

assistant: # Realize Instances Node

[image reference removed]

The *Realize Instances* node makes any instances (efficient duplicates of the same geometry)
into real geometry data. This makes it possible to affect each instance individually,
whereas without this node, the exact same changes are applied to every instance of
the same geometry. However, performance can become much worse when the input
contains many instances of complex geometry, which is a fundamental limitation
when procedurally processing geometry.
user: What is Outputs and how is it used in Blender Python scripting?

assistant: Mean
:   The average value of all data.

Median
:   The median value of all data.

Sum
:   The sum value of all data.

Min
:   The min value of all data.

Max
:   The max value of all data.

Range
:   The difference between the max and min value.

Standard Deviation
:   How much values differ from the mean.
    A low standard deviation indicates that the values are grouped tightly together at the mean.
    A high standard deviation indicates that the values are spread out over a large range.

Variance
:   The variance of all data, defined as the square of the standard deviation.
user: Show practical ways to work with DampedTrackConstraint(Constraint) in a Blender add-on or script – include code.

assistant: # DampedTrackConstraint(Constraint)

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

*class* bpy.types.DampedTrackConstraint(*Constraint*)
:   Point toward target by taking the shortest rotation path

    head_tail
    :   Target along length of bone: Head is 0, Tail is 1

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

    subtarget
    :   Armature bone, mesh or lattice vertex group, …

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

    target
    :   Target object

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

    track_axis
    :   Axis that points to the target object

        Type:
        :   enum in [`'TRACK_X'`, `'TRACK_Y'`, `'TRACK_Z'`, `'TRACK_NEGATIVE_X'`, `'TRACK_NEGATIVE_Y'`, `'TRACK_NEGATIVE_Z'`], default `'TRACK_X'`

    use_bbone_shape
    :   Follow shape of B-Bone segments when calculating Head/Tail position

        Type:
        :   boolean, default False

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

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

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

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

        Returns:
        :   The class or default when not found.

        Return type:
        :   type
user: How do I use GPencilSculptGuide(bpy_struct) in Blender? Include parameters, examples, warnings and best practices.

assistant: # GPencilSculptGuide(bpy_struct)

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

*class* bpy.types.GPencilSculptGuide(*bpy_struct*)
:   Guides for drawing

    angle
    :   Direction of lines

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

    angle_snap
    :   Angle snapping

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

    location
    :   Custom reference point for guides

        Type:
        :   float array of 3 items in [-inf, inf], default (0.0, 0.0, 0.0)

    reference_object
    :   Object used for reference point

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

    reference_point
    :   Type of speed guide

        - `CURSOR`
          Cursor – Use cursor as reference point.
        - `CUSTOM`
          Custom – Use custom reference point.
        - `OBJECT`
          Object – Use object as reference point.

        Type:
        :   enum in [`'CURSOR'`, `'CUSTOM'`, `'OBJECT'`], default `'CURSOR'`

    spacing
    :   Guide spacing

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

    type
    :   Type of speed guide

        - `CIRCULAR`
          Circular – Use single point to create rings.
        - `RADIAL`
          Radial – Use single point as direction.
        - `PARALLEL`
          Parallel – Parallel lines.
        - `GRID`
          Grid – Grid allows horizontal and vertical lines.
        - `ISO`
          Isometric – Grid allows isometric and vertical lines.

        Type:
        :   enum in [`'CIRCULAR'`, `'RADIAL'`, `'PARALLEL'`, `'GRID'`, `'ISO'`], default `'CIRCULAR'`

    use_guide
    :   Enable speed guides

        Type:
        :   boolean, default False

    use_snapping
    :   Enable snapping to guides angle or spacing options

        Type:
        :   boolean, default False

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

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

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

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

        Returns:
        :   The class or default when not found.

        Return type:
        :   [type](#bpy.types.GPencilSculptGuide.type "bpy.types.GPencilSculptGuide.type")
user: Describe FunctionNodeIntegerMath(FunctionNode) from the Blender manual or Python API, including usage steps and snippets.

assistant: # FunctionNodeIntegerMath(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.FunctionNodeIntegerMath(*FunctionNode*)
:   Perform various math operations on the given integer inputs

    operation
    :   Type:
        :   enum in [Node Integer Math Items](bpy_types_enum_items/node_integer_math_items.html#rna-enum-node-integer-math-items), default `'ADD'`

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

        Returns:
        :   Result

        Return type:
        :   boolean

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

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

        Returns:
        :   result

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

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

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

        Returns:
        :   result

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

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

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

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

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

        Returns:
        :   The class or default when not found.

        Return type:
        :   type
user: Provide the full official documentation entry for Example, preserving all code examples.

assistant: [[image reference removed]](../../../../_images/compositing_types_filter_bilateral-blur_example-1.png)

Bilateral smoothed Ambient Occlusion.
[blend-file example](https://archive.blender.org/wiki/2015/uploads/2/2a/Bilateral_blur_example_01.blend)

|  |  |
| --- | --- |
| <../../../../_images/compositing_types_filter_bilateral-blur_example-1-render.jpg>   Render result. | <../../../../_images/compositing_types_filter_bilateral-blur_example-1-composite.jpg>   Composite. |
user: What is ShaderNodeTexBrick(ShaderNode) and how is it used in Blender Python scripting?

assistant: # ShaderNodeTexBrick(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.ShaderNodeTexBrick(*ShaderNode*)
:   Generate a procedural texture producing bricks

    color_mapping
    :   Color mapping settings

        Type:
        :   [`ColorMapping`](bpy.types.ColorMapping.html#bpy.types.ColorMapping "bpy.types.ColorMapping"), (readonly, never None)

    offset
    :   Determines the brick offset of the various rows

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

    offset_frequency
    :   How often rows are offset. A value of 2 gives an even/uneven pattern of rows.

        Type:
        :   int in [1, 99], default 2

    squash
    :   Factor to adjust the brick’s width for particular rows determined by the Offset Frequency

        Type:
        :   float in [0, 99], default 1.0

    squash_frequency
    :   How often rows consist of “squished” bricks

        Type:
        :   int in [1, 99], default 2

    texture_mapping
    :   Texture coordinate mapping settings

        Type:
        :   [`TexMapping`](bpy.types.TexMapping.html#bpy.types.TexMapping "bpy.types.TexMapping"), (readonly, never None)

    *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: What is GeometryNodeAttributeStatistic(GeometryNode) and how is it used in Blender Python scripting?

assistant: # GeometryNodeAttributeStatistic(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.GeometryNodeAttributeStatistic(*GeometryNode*)
:   Calculate statistics about a data set from a field evaluated on a geometry

    data_type
    :   The data type the attribute is converted to before calculating the results

        Type:
        :   enum in [Attribute Type Items](bpy_types_enum_items/attribute_type_items.html#rna-enum-attribute-type-items), default `'FLOAT'`

    domain
    :   Which domain to read the data from

        Type:
        :   enum in [Attribute Domain Items](bpy_types_enum_items/attribute_domain_items.html#rna-enum-attribute-domain-items), default `'POINT'`

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

assistant: |  |  |
| --- | --- |
| - [`Node.insert_link`](bpy.types.Node.html#bpy.types.Node.insert_link "bpy.types.Node.insert_link") - [`Node.internal_links`](bpy.types.Node.html#bpy.types.Node.internal_links "bpy.types.Node.internal_links") - [`NodeLink.swap_multi_input_sort_id`](#bpy.types.NodeLink.swap_multi_input_sort_id "bpy.types.NodeLink.swap_multi_input_sort_id") | - [`NodeLinks.new`](bpy.types.NodeLinks.html#bpy.types.NodeLinks.new "bpy.types.NodeLinks.new") - [`NodeLinks.remove`](bpy.types.NodeLinks.html#bpy.types.NodeLinks.remove "bpy.types.NodeLinks.remove") - [`NodeTree.links`](bpy.types.NodeTree.html#bpy.types.NodeTree.links "bpy.types.NodeTree.links") |
user: How do I use ShaderFxFlip(ShaderFx) in Blender? Include parameters, examples, warnings and best practices.

assistant: # ShaderFxFlip(ShaderFx)

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

*class* bpy.types.ShaderFxFlip(*ShaderFx*)
:   Flip effect

    use_flip_x
    :   Flip image horizontally

        Type:
        :   boolean, default False

    use_flip_y
    :   Flip image vertically

        Type:
        :   boolean, default False

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

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

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

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

        Returns:
        :   The class or default when not found.

        Return type:
        :   type
user: How do I use MaterialLineArt(bpy_struct) in Blender? Include parameters, examples, warnings and best practices.

assistant: # MaterialLineArt(bpy_struct)

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

*class* bpy.types.MaterialLineArt(*bpy_struct*)
:   intersection_priority
    :   The intersection line will be included into the object with the higher intersection priority value

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

    mat_occlusion
    :   Faces with this material will behave as if it has set number of layers in occlusion

        Type:
        :   int in [0, 255], default 1

    use_intersection_priority_override
    :   Override object and collection intersection priority value

        Type:
        :   boolean, default False

    use_material_mask
    :   Use material masks to filter out occluded strokes

        Type:
        :   boolean, default False

    use_material_mask_bits
    :   Type:
        :   boolean array of 8 items, default (False, False, False, False, False, False, False, False)

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

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

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

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

        Returns:
        :   The class or default when not found.

        Return type:
        :   type
user: What is Smear Multires Displacement and how is it used in Blender Python scripting?

assistant: # Smear Multires Displacement

This tool deforms displacement information of
the [Multires Modifier](../../../modeling/modifiers/generate/multiresolution.xhtml),
moving the displaced vertices without affecting the base mesh.

Smearing effect can be used multiple times
over the same area without generating any artifacts in the topology.
user: Explain Display in complete detail according to the official Blender documentation.

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

assistant: # ShaderNodeObjectInfo(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.ShaderNodeObjectInfo(*ShaderNode*)
:   Retrieve information about the object instance

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

assistant: # Defocus Node

[image reference removed]

The *Defocus Node* blurs areas of an image based on a Z depth map or mask input.

It is typically used to emulate depth of field ([DOF](../../../../glossary/index.xhtml#term-DOF)) using a post-processing method with a Z-buffer input.
But also allows to blur images that are not based on Z depth too.
user: Give a detailed overview of Usage: syntax, arguments, return values, common patterns.

assistant: ### Selecting a Brush, Color & Mode

In the Tool Settings select the brush, color and mode to use with the tool.

You can configure the brush main settings included in the Tool Settings for convenience.
For the vertex paint brushes configuration and settings see
[Vertex Paint Brush](../../vertex_paint/tool_settings/brush.html).

`Ctrl`-`LMB` erase the Color Attribute.

### Painting

Click and hold `LMB` or use the pen tip to paint onto the stroke points.

Vertex painting stroke points.

|  |  |  |
| --- | --- | --- |
| <../../../../_images/grease-pencil_modes_draw_tools_tint_paint-01.png> | <../../../../_images/grease-pencil_modes_draw_tools_tint_paint-02.png> | <../../../../_images/grease-pencil_modes_draw_tools_tint_paint-03.png> |
user: What is Backward Compatibility and how is it used in Blender Python scripting?

assistant: Opening older files and converting them for the current version of Blender is usually straight-forward.
It is expected to give very good and usable results.

There can be major feature changes, for which the backward compatibility will only be ensured for
a limited amount of time. For example the changes to the animation system that happened during the
Blender 2.5x project. This will never be less than a full major release cycle (i.e. two years at least).
user: What is Outputs and how is it used in Blender Python scripting?

assistant: Value
:   The data retrieved and interpolated from the *Source* geometry, mapped based on the node’s settings and inputs.

Is Valid
:   Whether the sampling was successful. It can fail when the sampled group is empty.
user: Describe Flip Names from the Blender manual or Python API, including usage steps and snippets.

assistant: You can flip left/right markers (see above) in selected bone names.
This can be useful if you have constructed half of a symmetrical rig
(marked for a left or right side) and duplicated and mirrored it,
and want to update the names for the new side.
Blender will swap text in bone names according to the above naming conventions,
and remove number extensions if possible.
user: Describe IDMaterials(bpy_struct) from the Blender manual or Python API, including usage steps and snippets.

assistant: # IDMaterials(bpy_struct)

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

*class* bpy.types.IDMaterials(*bpy_struct*)
:   Collection of materials

    append(*material*)
    :   Add a new material to the data-block

        Parameters:
        :   **material** ([`Material`](bpy.types.Material.html#bpy.types.Material "bpy.types.Material")) – Material to add

    pop(*\**, *index=-1*)
    :   Remove a material from the data-block

        Parameters:
        :   **index** (*int in* *[**-32766**,* *32766**]**,* *(**optional**)*) – Index of material to remove

        Returns:
        :   Material to remove

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

    clear()
    :   Remove all materials from the data-block

    *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 AnimDataDrivers(bpy_struct), preserving all code examples.

assistant: # AnimDataDrivers(bpy_struct)

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

*class* bpy.types.AnimDataDrivers(*bpy_struct*)
:   Collection of Driver F-Curves

    new(*data_path*, *\**, *index=0*)
    :   new

        Parameters:
        :   - **data_path** (*string**,* *(**never None**)*) – Data Path, F-Curve data path to use
            - **index** (*int in* *[**0**,* *inf**]**,* *(**optional**)*) – Index, Array index

        Returns:
        :   Newly Driver F-Curve

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

    remove(*driver*)
    :   remove

    from_existing(*\**, *src_driver=None*)
    :   Add a new driver given an existing one

        Parameters:
        :   **src_driver** ([`FCurve`](bpy.types.FCurve.html#bpy.types.FCurve "bpy.types.FCurve"), (optional)) – Existing Driver F-Curve to use as template for a new one

        Returns:
        :   New Driver F-Curve

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

    find(*data_path*, *\**, *index=0*)
    :   Find a driver F-Curve. Note that this function performs a linear scan of all driver F-Curves.

        Parameters:
        :   - **data_path** (*string**,* *(**never None**)*) – Data Path, F-Curve data path
            - **index** (*int in* *[**0**,* *inf**]**,* *(**optional**)*) – Index, Array index

        Returns:
        :   The found F-Curve, or None if it doesn’t exist

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

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

assistant: Image
:   Standard color input.

Size
:   The optional Size input will be multiplied with the X and Y blur radius values.
    It also accepts a value image, to control the blur radius with a mask.
    The values should be mapped between (0 to 1) for an optimal effect.

Type
:   The difference between the types is in the way they handle sharp edges,
    smooth gradients and preserve the highs and the lows.

    Flat:
    :   Simply blurs everything uniformly.

    Tent:
    :   Preserves the high and the lows better by making a linear falloff.

    Quadratic:
    :   Looks similar to *Gaussian* but can be a little faster but slightly worse looking.

    Cubic:
    :   Preserve the highs, but give an almost out-of-focus blur while smoothing sharp edges.

    Gaussian:
    :   Gives the best looking results but tends to be the slowest.

    Fast Gaussian:
    :   An approximation of the Gaussian.

    Catmull-Rom:
    :   Catmull-Rom keeps sharp contrast edges crisp.

    Mitch:
    :   Preserve the highs, but give an almost out-of-focus blur while smoothing sharp edges.

Extend Bounds
:   Allows the image, that is being blurred, to extend past its original dimension.

Separable
:   Use faster approximation by blurring along the horizontal and vertical directions independently.
user: How do I use Normal Edit Modifier in Blender? Include parameters, examples, warnings and best practices.

assistant: # Normal Edit Modifier

The *Normal Edit* modifier affects (or generates) custom normals. It uses a few simple parametric methods
to compute them (quite useful in game development and architecture areas), and mixes back those generated normals
with existing ones.
user: Show practical ways to work with Tips in a Blender add-on or script – include code.

assistant: - To get the patch file, add .patch to the end of the URL of the pull request. Example:

  ```
  https://projects.blender.org/blender/blender-manual/pulls/104892.patch
  ```
- Checkout a pull request into a detached head (not leaving behind a branch). Example:

  ```
  git fetch -q origin +refs/pull/104892/head: ; git checkout -qf FETCH_HEAD
  ```
user: Explain Usage in complete detail according to the official Blender documentation.

assistant: Here are some common steps for using the *Measure* tool:

1. Activate the *Measure* tool from the Toolbar.
2. Click and drag in the viewport to define the initial start and end point for the ruler.
   You can add multiple rulers in the viewport.
3. Drag either end of the ruler to move it.

   - Holding `Ctrl` while moving enables snapping to edges and vertices.
   - Holding `Shift` while moving lets you measure the distance between faces.
     This only works well with parallel faces, e.g. walls.

   You can always navigate (pan, zoom, …)
   or change the view (orthogonal, perspective) in the viewport to have better access to the ruler.
4. Click on the midpoint of a created ruler to convert it to a protractor.
   The midpoint can then be dragged just like the endpoints.
5. A selected ruler can be deleted with `Delete` or `X`.
   To delete all measurements, delete the “RulerData3D” layer in
   the Sidebar ‣ View ‣ Annotations panel (see image above).

All measurements are hidden when another tool is selected.
They are shown when the *Measure* tool is selected again.
However, you can do editing operations while the ruler is active.
For example, you can edit the rotation or scale of the selected object in the Sidebar.

Measurements do not appear in the Render output.

Unit settings and scale from the scene are used for displaying dimensions.
Changing the unit system (metric, imperial), or the units of length (cm, m, …)
or angle (degrees, radians) will update the measurements.
user: Give a detailed overview of Inputs: syntax, arguments, return values, common patterns.

assistant: The node can contain an arbitrary number of input sockets.
Each socket can be given a custom name and type. Supported types include (but not limited to):

- Geometry
- Objects
- Values (e.g. float, integer, boolean, vector, color)
- Fields
- Nested Bundles
user: Describe Inputs from the Blender manual or Python API, including usage steps and snippets.

assistant: The inputs of the node are dynamic. Some inputs are only available for certain operations.
For instance, the *Addend* input is only available for the *Multiply Add* operator.

Value
:   Input Value. Trigonometric functions read this value as radians.

Addend
:   Input Addend.

Base
:   Input Base.

Exponent
:   Input Exponent.

Epsilon
:   Input Epsilon.

Distance
:   Input Distance.

Min
:   Input Minimum.

Max
:   Input Maximum.

Increment
:   Input Increment.

Scale
:   Input Scale.

Degrees
:   Input Degrees.

Radians
:   Input Radians.
user: Provide the full official documentation entry for Hinge Constraint, preserving all code examples.

assistant: # Hinge Constraint

The hinge permits one degree of freedom between two objects. Translation is completely constrained.
Rotation is permitted about the Z axis of the object hosting the Physics constraint
(usually an [Empty](../../../../glossary/index.html#term-Empty), distinct from the two objects that are being linked).
Adjusting the position and rotation of the object hosting the constraint allows you to
control the anchor and axis of the hinge.

The Hinge is the only single-axis rotational constraint that uses the Z axis instead of the X axis.
If something is wrong with your hinge, check your other constraints to see if this might be the problem.

[image reference removed]

*Hinge* constraint options.
user: Provide the full official documentation entry for Named Attributes, preserving all code examples.

assistant: Named attributes are created and used in other areas of Blender like shaders, painting, and UV mapping.
In the [modifier panel](../modifiers/geometry_nodes.xhtml), a named attribute can
be used for input by clicking the icon to the right of the value button.
The string input allows you to search and choose existing attributes from the modifier’s input geometry.

[image reference removed]

Attribute Search.

The attribute search gives a bit of context about each attribute.
To the left of the menu, the attribute domain is shown followed by the attribute name.
To the right of the menu, the attribute data type is shown.
user: Show practical ways to work with Smooth Vertices in a Blender add-on or script – include code.

assistant: # Smooth Vertices

This operator smooths the selected vertices by averaging the angles between the faces.

Smoothing
:   Smoothing factor.

Repeat
:   The number of smoothing iterations.

Axes
:   Limit the effect to certain axes.

|  |  |  |
| --- | --- | --- |
| <../../../../_images/modeling_modifiers_deform_smooth_mesh-before.png>   Mesh before smoothing. | <../../../../_images/modeling_modifiers_deform_smooth_mesh-one-iteration.png>   Mesh after one smoothing iteration. | <../../../../_images/modeling_modifiers_deform_smooth_mesh-ten-iterations.png>   Mesh after ten smoothing iterations. |
user: How do I use BlendDataScreens(bpy_struct) in Blender? Include parameters, examples, warnings and best practices.

assistant: # BlendDataScreens(bpy_struct)

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

*class* bpy.types.BlendDataScreens(*bpy_struct*)
:   Collection of screens

    tag(*value*)
    :   tag

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

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

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

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

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

        Returns:
        :   The class or default when not found.

        Return type:
        :   type
user: Explain ClothSolverResult(bpy_struct) in complete detail according to the official Blender documentation.

assistant: # ClothSolverResult(bpy_struct)

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

*class* bpy.types.ClothSolverResult(*bpy_struct*)
:   Result of cloth solver iteration

    avg_error
    :   Average error during substeps

        Type:
        :   float in [-inf, inf], default 0.0, (readonly)

    avg_iterations
    :   Average iterations during substeps

        Type:
        :   float in [-inf, inf], default 0.0, (readonly)

    max_error
    :   Maximum error during substeps

        Type:
        :   float in [-inf, inf], default 0.0, (readonly)

    max_iterations
    :   Maximum iterations during substeps

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

    min_error
    :   Minimum error during substeps

        Type:
        :   float in [-inf, inf], default 0.0, (readonly)

    min_iterations
    :   Minimum iterations during substeps

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

    status
    :   Status of the solver iteration

        - `SUCCESS`
          Success – Computation was successful.
        - `NUMERICAL_ISSUE`
          Numerical Issue – The provided data did not satisfy the prerequisites.
        - `NO_CONVERGENCE`
          No Convergence – Iterative procedure did not converge.
        - `INVALID_INPUT`
          Invalid Input – The inputs are invalid, or the algorithm has been improperly called.

        Type:
        :   enum set in {`'SUCCESS'`, `'NUMERICAL_ISSUE'`, `'NO_CONVERGENCE'`, `'INVALID_INPUT'`}, default set(), (readonly)

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

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

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

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

        Returns:
        :   The class or default when not found.

        Return type:
        :   type
user: Give a detailed overview of Interior Faces: syntax, arguments, return values, common patterns.

assistant: Selects faces that may have been accidentally created inside the mesh instead of
on the mesh’s surface. Specifically, it selects faces with “abnormal” neighbors
(multiple neighbors connected to the same edge), as well as any “normal” neighbors
of those faces.
user: Provide the full official documentation entry for Properties, preserving all code examples.

assistant: Data Type
:   The type of data being converted.

    Float:
    :   A single float value.

    Vector:
    :   A vector (e.g. 2D) value.

Reference Dimension
:   Defines which part of the image’s dimensions the relative value refers to.

    Per Dimension:
    :   Each axis (X and Y) is scaled independently by the image width and height.

    X:
    :   The value is scaled relative to the image width.

    Y:
    :   The value is scaled relative to the image height.

    Greater:
    :   The value is scaled relative to the larger of the image dimensions.

    Smaller:
    :   The value is scaled relative to the smaller of the image dimensions.

    Diagonal:
    :   The value is scaled relative to the diagonal length of the image.
user: How do I use Mix Vector Node in Blender? Include parameters, examples, warnings and best practices.

assistant: # Mix Vector Node

The *Mix Node* mixes values, colors and vectors inputs
using a factor to control the amount of interpolation.
The *Color* mode has additional blending modes.

[image reference removed]
user: Provide the full official documentation entry for NodeTreeInterfaceSocketVectorDirection2D(NodeTreeInterfaceSocket), preserving all code examples.

assistant: # NodeTreeInterfaceSocketVectorDirection2D(NodeTreeInterfaceSocket)

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

*class* bpy.types.NodeTreeInterfaceSocketVectorDirection2D(*NodeTreeInterfaceSocket*)
:   3D vector socket of a node

    default_value
    :   Input value used for unconnected socket

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

    dimensions
    :   Dimensions of the vector socket

        Type:
        :   int in [2, 4], default 0

    max_value
    :   Maximum value

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

    min_value
    :   Minimum value

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

    subtype
    :   Subtype of the default value

        Type:
        :   enum in [`'DEFAULT'`], default `'DEFAULT'`

    draw(*context*, *layout*)
    :   Draw interface socket settings

        Parameters:
        :   **layout** ([`UILayout`](bpy.types.UILayout.html#bpy.types.UILayout "bpy.types.UILayout"), (never None)) – Layout, Layout in the UI

    init_socket(*node*, *socket*, *data_path*)
    :   Initialize a node socket instance

        Parameters:
        :   - **node** ([`Node`](bpy.types.Node.html#bpy.types.Node "bpy.types.Node"), (never None)) – Node, Node of the socket to initialize
            - **socket** ([`NodeSocket`](bpy.types.NodeSocket.html#bpy.types.NodeSocket "bpy.types.NodeSocket"), (never None)) – Socket, Socket to initialize
            - **data_path** (*string**,* *(**never None**)*) – Data Path, Path to specialized socket data

    from_socket(*node*, *socket*)
    :   Setup template parameters from an existing socket

        Parameters:
        :   - **node** ([`Node`](bpy.types.Node.html#bpy.types.Node "bpy.types.Node"), (never None)) – Node, Node of the original socket
            - **socket** ([`NodeSocket`](bpy.types.NodeSocket.html#bpy.types.NodeSocket "bpy.types.NodeSocket"), (never None)) – Socket, Original socket

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

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

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

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

        Returns:
        :   The class or default when not found.

        Return type:
        :   type
user: What is Sorting and how is it used in Blender Python scripting?

assistant: You can sort the order of your strokes, allowing the lines to stack in the order given.

Sort Key
:   A sort key is used to determine the stacking order of lines.

    Distance from Camera:
    :   Lines closer to the camera lie on top of further lines.

    2D Length:
    :   Longer lines lie on top of shorter lines.

    Projected X/Y:
    :   Sort by the projected X or Y value in the image coordinate system.

Integration Type
:   Use in tandem with the Sort Key to determine the range for sorting.
    Since the distance of a line from the camera may vary over vertices,
    this option computes the sort key for a line from the values computed at
    individual vertices. The value computed for the line is:

    Mean:
    :   The mean of the values obtained for the vertices.

    Min:
    :   The minimum of the values obtained for the vertices.

    Max:
    :   The maximum of the values obtained for the vertices.

    First:
    :   The value obtained for the first vertex.

    Last:
    :   The value obtained for the last vertex.

Sort Order
:   With the given result you can choose to “Reverse” the sort order.
user: Explain Examples in complete detail according to the official Blender documentation.

assistant: ### Open 2D Curve

An open (non-cyclic) curve with beveling applied becomes a tube.

[image reference removed]

### Closed 2D Curve

A closed (cyclic) curve with beveling applied becomes a torus by default.
If the curve is 2D and you set the [Fill Mode](shape.xhtml#bpy-types-curve-fill-mode) to *Both*,
the top and bottom holes will be filled with flat discs, and you’ll get a cylinder
with rounded edges instead.

[image reference removed]

This doesn’t work with 3D curves.

### Taper

By selecting a 2D curve as the *Taper Object* of another (2D or 3D) curve,
you can let the radius of the latter curve’s geometry vary over the curve’s
length without having to create additional control points.

[image reference removed]

### Tilt

You can use the [Tilt](../editing/control_points.xhtml#modeling-curve-tilt) tool to rotate a control point around
its tangent axis, creating a twist in the curve. The example below also uses
a custom profile (cross section).

[image reference removed]