Skip to content

wip#215

Merged
yuecideng merged 1 commit intoDexForce:yueci/fix-gizmo-issuefrom
WaferLi:yueci/fix-gizmo-issue
Apr 2, 2026
Merged

wip#215
yuecideng merged 1 commit intoDexForce:yueci/fix-gizmo-issuefrom
WaferLi:yueci/fix-gizmo-issue

Conversation

@WaferLi
Copy link
Copy Markdown
Collaborator

@WaferLi WaferLi commented Apr 2, 2026

Summary of Changes

1. Gizmo Callback API Enhancement (C++ & Python Binding)

  • New Interface: Introduced set_flush_localpose_callback which supports direct 4x4 matrix (local_pose) input.
  • Refactoring: Consolidated fragmented translation and rotation handling into a unified pose synchronization, reducing data transformation overhead between C++ and Python.
  • Backward Compatibility: Updated Pybind logic with argument count checks to ensure legacy callback signatures still function while prioritizing the new 4x4 matrix signature.

2. Logic Simplification & Utility Update (gizmo_utils.py)

  • Updated create_gizmo_callback to support the new API.
  • Optimization: Replaced the verbose if flag == TransformMask... conditional branches with a single node.set_transform(local_pose, flag) call, making the callback significantly more concise and readable.

3. Bug Fix in Example Code (gizmo_object.py)

  • Fixed UnboundLocalError in the run_simulation function.
  • Fix: Explicitly initialized gizmo_enabled = True within the function scope to ensure the logic at step_count == 200000 executes correctly without crashing.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which improves an existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (existing functionality will not work without user modification)
  • Documentation update

Checklist

  • I have run the black . command to format the code base.
  • I have made corresponding changes to the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • Dependencies have been updated, if applicable.

@yuecideng yuecideng merged commit 087be6b into DexForce:yueci/fix-gizmo-issue Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants