-
Notifications
You must be signed in to change notification settings - Fork 0
Bug: Live Preview of Translation and Rotation is Unintuitive #5
Description
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.
- When the
Prepare Fontoperator runs, create an Empty object at the world origin. - Parent the text preview object to this Empty.
- The
update_preview_objectfunction should then apply theTranslationandRotationto the parent Empty, leaving the text object itself at its default local transform. - This would cause the text to pivot around the world origin, which is a much more predictable behavior for the user.