Origin Adjustment Control
Origin Adjustment Control
Overview
This add-on enhances the ability to precisely manipulate the object origin in Blender. It supports operations such as aligning origins, snapping origins to surfaces, applying transformations, managing presets, and more. The interface includes modal interaction, panel controls, and tool enhancements like Gizmo display and coordinate conversion.
Features and Functions
1. Global Functions
-
get_valid_objects(context)
Retrieves all selected objects of typesMESH
,CURVE
,SURFACE
, orFONT
for origin adjustment. -
apply_origin_transform(obj, new_origin)
Transforms the object’s origin to a specified position in the world space while keeping its geometry intact.
2. Modal Operators
-
ADJUST_ORIGIN_OT_modal
: Adjusts the object origin interactively by mouse movement.
Steps to Use:- Enable the custom origin feature.
- Invoke the operation via the "Adjust Origin Modal" button.
- Use the mouse to reposition the origin; left-click to confirm or right-click to cancel.
3. Actions and Operators
-
APPLY_ORIGIN_OT_apply
: Moves the origin to the object’s geometric center.
Usage: Click "Origin to Center" from the add-on panel. -
ORIGIN_OT_ModeSwitch
: Switches between origin control modes: World, Local, or Custom Reference. -
OBJECT_OT_precise_rotation
: Applies precise rotation values to objects based on input degrees for each axis.
4. Custom Origin Panel (UI)
- Found in the
VIEW_3D > Sidebar > Origin Adjustment
.
Panel Functions:- Enable custom origin positioning with a toggle.
- Manually input precise origin positions.
- Buttons to invoke key origin-related operators.
5. Key Features
5.1. Precise Transformations
- Update the origin’s position or rotation directly using property inputs (
custom_origin
orprecise_rotation
).
5.2. Origin Gizmo
- Enables an intuitive and interactive way to manipulate object origins using a visible 3D widget.
5.3. Keyframe Support
- Add keyframes to record and animate origin transformations using the
ORIGIN_OT_AddKeyframe
operator.
5.4. Snapping System
- Snap the origin to the nearest surface point using the
ORIGIN_OT_SnapToSurface
.
6. Coordinate Conversion
- The
ORIGIN_OT_CoordinateConverter
operator supports transforming coordinates between World, Local, and Custom spaces for flexible origin control.
7. Preset Management
-
Origin Preset System:
- Save current origin position and rotation with custom names (
ORIGIN_OT_PresetManager
). - Load saved presets to apply consistent transformations.
- Manage presets with
Save
,Load
, orDelete
actions.
- Save current origin position and rotation with custom names (
8. Batch Operations
Perform mass transformations on selected objects:
- Align: Align origins of all selected objects to the active object.
- Distribute: Uniformly distribute origins among objects (work in progress).
-
Reset: Reset origins to
(0, 0, 0)
in the world coordinate.
Setup Instructions
Installation:
- Save the Python script (
*.py
) to your computer. - Open Blender and go to
Edit > Preferences > Add-ons > Install
. - Select the script file and enable the add-on by ticking the checkbox.
Registration and Unregistration:
- Register: The add-on is automatically initialized upon enabling.
-
Unregister: Use the disable option in Preferences or manually call the
unregister()
function.
Controls Overview
Tool/Feature | Usage |
---|---|
Adjust Origin Modal | Interactive adjustment using the mouse. |
Apply Origin | Move the origin to the object's geometric center. |
Coordinate Converter | Switch the coordinate space of a given point or object. |
Preset Management | Save and load custom positions and rotations for reuse. |
Origin Gizmo | Visual aid for real-time transformations in the 3D Viewport. |
Keyframe Animation | Record animated origin transformations for time-based effects. |
Batch Operations | Efficiently process multiple objects for origin transformations. |
Custom Properties
The following properties are added to the Scene
object:
-
enable_custom_origin
: Toggles the custom origin mode. -
custom_origin
: Stores the current origin position as a 3D vector. -
last_origin_location
: Tracks the last-used origin position for quick reversion.
Additional properties are linked to object instances, such as origin_keyframes
for animation and origin_presets
for preset management.
Development Notes
- This tool is modular, making it extensible for future updates.
- Use the template structure of
REGISTER/UNREGISTER
blocks for safe property management.
Enjoy seamless control of origins to elevate your modeling, animation, and workflow precision!
Discover more products like this
3d modeling Blender Plugin precision modeling batch operations transform presets transform tools Modeling automation custom origin object manipulation blender addon coordinate conversion origin control geometry center 3d workspace object-origin object control mesh editing origin presets asset management 3d editing physics snapping 3D workflow Workflow Optimization Modeling tools 3d manipulation animation tools precise positioning coordinate system precise control object transformation origin management transform management origin animation technical animation surface snapping object positioning Blender utilities Batch processing modeling assistance blender tools object alignment