Skip to content

Repository files navigation

Structured Renamer

Build names, not type them.

Structured Renamer is a Blender add-on that implements a structural renaming engine. Instead of plain search/replace, it builds names from reusable elements to apply consistent naming conventions.

Features

Structural Renaming Engine

Compose names from reusable elements:

  • Text Elements: Prefixes, suffixes, descriptive parts
  • Position Elements: Left/Right, symmetry handling
  • Counter Elements: Sequential numbering with padding control
  • Separators: Underscore, dash, dot, space, or camelCase

Conflict Resolution

Avoids Blender's automatic .001 suffix by resolving conflicts using your pattern's counter:

  • Detects naming conflicts in advance
  • Resolves with pattern-defined counter format (e.g., -01, -02)
  • Maintains namespace consistency across batch operations

Pattern Management

  • Pattern creation, validation, and caching
  • JSON import/export with versioning
  • Synchronized with UI properties

Extensibility

  • Element registration via ElementRegistry
  • Target registration via RenameTargetRegistry
  • Currently supports 19 target types: Objects, Bones (Bone / Pose / Edit), Collections, Materials, Meshes, Armatures, Curves, Cameras, Lights, Images, Textures, Actions, Scenes, Nodes, Sequence Strips, Shape Keys, and Files

UI / Operators

  • Panel: View3D > Sidebar > Tool tab > Structured Renamer
  • Main operators (idname examples)
    • stdrenamer.rename (apply Add/Replace/Remove to an element)
    • stdrenamer.rename_manual_counter (manual input for counters)
    • See operators/io.py for preset I/O
  • Settings
    • Toggle Edit Mode (pattern editor) and auto save/backup in Add‑on Preferences

srdemo

Factory Presets

Preset Example output
Character Rigging DEF_Arm-01.L, CTRL_Leg_IK-02.R
UE5 Standard spine_01, foot_r
Unity Humanoid LeftUpperArm, RightThumbProximal
VRM Avatar leftUpperArm, rightThumbProximal
PMX (MMD) 全ての親, 右ひざ
Architecture House_F-02_Bedroom_Wall_Wood.008
Hard Surface Mech_Wheel.R.06 v-Old

How It Works

Pattern & Element Structure

Core class structure for managing naming elements and patterns:

classDiagram
   direction LR
   class NamingPattern {
      +elements: List[INameElement]
      +parse_name(name: str)
      +update_elements(updates: Dict)
      +render_name() str
   }
   class NameElement {
      +id: str
      +order: int
      +enabled: bool
      +separator: str
      +value: str
      +parse(name: str) bool
      +set_value(value: Any)
      +render() tuple[sep: str, value: str]
   }
   class CounterElement{
      +padding: int
      +increment()
   }
   class PositionElement{
      +position_values: List[str]
   }
   class TextElement{
      +items: List[str]
   }

   NamingPattern "1" -- "n" NameElement
   NameElement <|.. TextElement
   NameElement <|.. PositionElement
   NameElement <|.. CounterElement
Loading

Decomposition & Reconstruction

Basic flow of name decomposition, update, and reconstruction:

graph LR
    A[DEF-Arm-01.L] --> B{parse_name}
    B --> |Prefix| C[DEF] 
    B --> |Middle| D[Arm] 
    B --> |Counter| E[01] 
    B --> |Position| F[L]
    G["{'Prefix': 'CTRL', 'Middle': 'Spine'}"] --> |User Input| H{update_elements}
    C & D --> H
    H --> I[CTRL] & J[Spine]
    I & J & E & F --> K{render_name}
    K --> L[CTRL-Spine-01.L]
Loading

License & Resources

About

Build names, not type them.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages