Skip to main content
Version: 1.0.0

Setup

Author: Vincenzo Mossuto Creation Date: 29/09/2025
Last Reviewer: Sara Altomare/Rossana Mazza

What it is

This document describes the New model Setup section included in the Spaarkly Scripts add-on for Blender:

  • Setup

Running this scripts immediately after importing a new eyewear model ensures that the scene is clean, correctly aligned, and ready for subsequent pipeline steps.

Specifically the setup scripts streamlines the workflow by:

  • Removing unnecessary objects such as duplicates and empties.
  • Normalizing origins and transforms, ensuring components are properly placed.
  • Aligning the model to Blender’s world axes for consistency across projects.
  • Preparing glasses for downstream tasks like naming, shading, rigging, and animation.

Setup

What it does

This operator prepares a freshly imported glasses model (typically in FBX format) by cleaning unnecessary objects, resetting transforms, and orienting it correctly in the scene.
It ensures that the model is ready for subsequent modeling, rigging, and shading tasks without redundant data or misalignment.

Prerequisite

  • All the objects should be selected.
  • There should be no important objects above Z = 0.07 or below Z = 0

Steps

  1. Import the glasses model (FBX) into Blender.

    • Start by loading the eyewear FBX into your scene.
  2. Select all parts of the imported model.

    • The script will only run if at least one object is selected.
  3. Open the Spaarkly Scripts panel → Setup.

    • Locate the Setup New Model operator.
  4. Click Setup New Model.

    • The script will automatically:
      • Clear parent relationships while keeping transforms intact.
      • Reset origins of all selected objects to their geometry (median).
      • Filter and remove unnecessary objects:
        • Deletes all EMPTY objects.
        • Removes any objects above the height threshold (Z > 0.07), typically duplicate models with closed temples.
      • Apply transforms by normalizing scale (keeping location and rotation).
      • Snap the 3D cursor to the scene center and set the pivot to 3D Cursor.
      • Rotate the model by 90° on the Z axis to achieve correct orientation.
      • Reset the pivot back to Median Point for normal operation.
  5. Verify results.

    • Check in Front and Top views to confirm alignment.
    • Ensure all essential parts remain below Z = 0.07 and that duplicates/empties have been removed.
Workflow setup step 1Workflow setup step 2

Troubleshooting

  • Nothing happens → Ensure at least one object is selected before running the script.
  • Important parts removed → If valid geometry is placed above Z = 0.07, lower it before running the script or adjust the threshold in the code.
  • Useless parts not removed → If useless geometry is placed under the main model it will not be removed automatically, removing it manually is the easiest way to do it.
  • Model orientation incorrect → Double-check if multiple rotations were applied; you may need to undo and re-run.