Skip to content

Repository files navigation

BlendBits

A collection of Blender scripts, from one-liners to panels.

Script runner

File: script_runner.py

./images/other-script-runner.png

This add-on lets you organize and run custom Python scripts directly inside Blender. Scripts are grouped into categories (subfolders), making it easier to manage large script collections.

  • Set Script Folder Opens a folder picker to select the root folder containing your scripts. This folder must contain at least one subfolder with scripts. You can name the subfolder however you like, for example main.

Example of a root folder with subfolders as categories:

scripts/
    main/
        useful_script.py
    modeling/
        bevel_tools.py
        cleanup.py
    rendering/
        setup_cycles.py
        render_preset.py
    other/
        ...

By default, Script Runner looks for a scripts folder in the same directory as the current Blender file.

Tip! If you do not want to edit the Script Runner code to define a custom folder, simply select your scripts folder once and then save the Blender startup file. After that, Blender will always start with Script Runner pointing to your chosen folder.

  • Refresh Use this button when you add a new subfolder or script. It rescans the root folder and updates the available categories and scripts.
  • Script Category Dropdown for selecting the subfolder containing your scripts.
  • Script Select Dropdown for selecting the script you want to run.
  • Run Executes the currently selected script.

Similar Blender extensions:

Collection scripts

Collection name from selection

File: collection_name_from_selection.py

./images/col-collection_name_from_selection.gif

This script renames the first (primary) collection of each selected object to match the object’s own name. It is handy when you want the collection hierarchy to mirror object names for easier organization.

Item name from collection

File: item_name_from_collection.py

./images/col-item_name_from_collection.gif

This Blender script renames selected objects to match the name of their parent (first linked) collection.

Move selected to collections with suffix

File: move_selected_to_collections_suffix.py

./images/col-move_selected_to_collections_suffix.gif

This Blender script moves each selected object into a new or existing collection whose name is the object’s name plus a configurable suffix. If the object is already in the correct collection, it is skipped to avoid unnecessary unlink/relink operations.

Selected to collection parented empty

File: selected_to_collection_parented_empty.py

./images/col-selected_to_collection_parented_empty.gif

This Blender script processes each selected mesh object by:

  1. Creating an Empty object with the same name, if it does not already exist.
  2. Matching the Empty’s location, rotation, and scale to the mesh.
  3. Parenting the mesh to the Empty without altering world transforms, if it is not already parented.
  4. Creating or reusing a collection named after the mesh.
  5. Moving both the mesh and the Empty into that collection and unlinking them from all others.

Selected to collection

File: selected_to_collection.py

./images/col-selected_to_collection.gif

This Blender script moves each selected object into its own new collection named after the object. The object is unlinked from any collections it currently belongs to, then linked exclusively to the newly created collection.

Material scripts

Delete all materials

File: delete_all_materials.py

./images/mat-delete_all_materials.gif

Delete all materials from selected objects.

Use case: sometimes when you import svg files, Blender creates materials you do not need. This script helps delete those materials.

Remove material duplicates

File: remove_material_duplicates.py

Remove duplicate materials in a Blender file.

It finds materials that share the same base name and have a numerical suffix, for example .001, .002, and merges them into one.

Example:

  • Dark_Wood
  • Dark_Wood.001
  • Dark_Wood.002

will be merged into Dark_Wood

Create material palette from selected

File: create_material_palette_from_selected.py

./images/mat-create_material_palette_from_selected.gif

Use case:

When you import models from external sources, you may want to quickly check how many materials they use and what their names are. This script makes it easier to visualize materials by creating one UV sphere per material and naming it after that material.

Features:

  • Automatically generates a UV sphere for each unique material.
  • Arranges the spheres in a row or in a grid with multiple rows.
  • Lets you set a custom name prefix for the spheres.
  • Provides customizable sphere geometry (segments, rings, radius) and spacing.

Resize texture nodes

File: resize_texture_nodes.py

./images/mat-resize_texture_nodes.gif

Enlarges the visual width of all Image Texture (TEX_IMAGE) nodes in the node trees of selected objects’ materials, making them easier to locate in the Shader Editor.

It is useful if you want all Image Texture nodes to be the same size or larger, making texture names easier to read.

Swap material slots

File: swap_material_slots.py

./images/mat-swap_material_slots.gif

Swaps the first and second material slots of all selected mesh objects and updates polygon assignments so materials remain correctly mapped.

Modifier scripts

Modifier tools

File: modifier_tools.py

./images/mod-modifier-tools.png

Creates a panel in the Tools tab.

Lets you remove and toggle modifiers on selected objects. The script shows only modifiers on selected objects, so if the selected objects do not have any modifiers, the dropdown will show none.

Cleanup scripts

A collection of scripts used to clean up meshes.

Loop checker dissolve

File: loops_checker_dissolve.py

./images/cleanup-loops_checker_dissolve.gif

Dissolve every second edge.

Loop dissolve

File: loops_dissolve.py

./images/cleanup-loops_dissolve.gif

Dissolve loops of selected edges.

Loop ring dissolve

File: loops_ring_dissolve.py

./images/cleanup-loops_ring_dissolve.gif

Dissolve loops of selected edges and the edges in between.

Miscellaneous scripts

These are utility scripts.

Find heavy meshes in scene

File: find_heavy_meshes_in_scene.py

./images/other-find_heavy_meshes_in_scene.gif

This script scans all objects in the current Blender scene and automatically selects mesh objects whose polygon count exceeds a specified threshold (default: 1,000 polygons).

I use it when I import a lot of meshes into a Blender file or want to find large or unoptimized meshes in the scene.

Find non latin characters

File: find_non_latin_characters.py

This script scans a .blend file for any datablocks whose names contain non-Latin characters. It checks:

  • Objects
  • Object data (meshes, curves, armatures, lattices, metaballs, grease pencils)
  • Materials, textures, images, collections, node groups
  • Nodes inside materials and node groups
  • Text datablocks

For example, the Cyrillic letters р, о, с, х, е look identical to the Latin letters p, o, c, x, e, which can cause confusion or other issues.

Save file size report

File: save_file_size_repport.py

./images/other-save_file_size_repport.gif

This script was inspired by Jake O’Neal in the video How I recreated Hoover Dam in 3D.

TL;DR: shows how file size changes after saving.

This script adds two handlers that monitor the size of the current .blend file before and after each save operation. When a file is saved, the script compares the new file size to the previous size and displays a popup showing the change in megabytes.

Switch curve direction

File: switch_curve_direction.py

./images/other-switch_curve_direction.gif

Flips the direction of all selected curve objects in Blender.

Matcap name copy to clipboard

File: matcap_name_copy_to_clipboard.py

Copies the active MatCap ID (the ID of the studio light used in 3D viewport shading) to the system clipboard so it can be pasted elsewhere.

This script is useful if you use MatCaps from this MatCaps Git repository which have complex names like 4F4F4F_9C9C9C_121212_7C7C7C and you need to know the name of the current MatCap.

Copy name of selected collections

File: copy_name_of_selected_collections.py

./images/misc-copy_name_of_selected_collections.gif

Adds an option to the Outliner collections context menu to copy the names of selected collections.

Tip: If you use it often, you may want to install it as a plugin.

Copy name of selected objects

File: copy_name_of_selected_objects.py

./images/misc-copy_name_of_selected_objects.gif

Adds an option to the Outliner objects context menu to copy the names of selected objects.

Tip: If you use it often, you may want to install it as a plugin.

About

Collection of blender scripts. Frome one-liners to panels.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages