Skip to content

Bug: Live Preview of Translation and Rotation is Unintuitive #5

@Rakadeja

Description

@Rakadeja

Summary

As noted in the documentation, changing the Translation and Rotation properties does not appear to update the live preview object in a predictable way. While the code to update the transform exists, its effect can be confusing for users.

This task is to investigate why the preview is "wonky" and implement a fix to make it intuitive.

Current Behavior

Changing the Rotation and Translation values in the UI moves the entire object, origin and all. This can be disorienting as the text geometry itself is often offset from the origin, causing it to pivot and move in unexpected ways.

Expected Behavior

Changing the transform properties in the UI should provide a clear and immediate preview of the final position and orientation of the generated meshes.

Suspected Code Regions

The update logic is in __init__.py. The problem likely isn't that the code is broken, but that its method is unintuitive.

# __init__.py -> update_preview_object()

# This code correctly moves the object's origin.
preview_obj.location = self.translation
preview_obj.rotation_euler = (
    math.radians(self.rotation[0]),
    math.radians(self.rotation[1]),
    math.radians(self.rotation[2]),
)

Implementation Plan

A potential solution is to parent the preview object to an empty.

  1. When the Prepare Font operator runs, create an Empty object at the world origin.
  2. Parent the text preview object to this Empty.
  3. The update_preview_object function should then apply the Translation and Rotation to the parent Empty, leaving the text object itself at its default local transform.
  4. This would cause the text to pivot around the world origin, which is a much more predictable behavior for the user.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingui

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions