Skip to content

v1.2.0

Choose a tag to compare

@PhilsModules PhilsModules released this 15 Jan 11:53
· 31 commits to main since this release
80cf1a0

v1.2.0

New Features & Improvements

  • Dynamic Token Ring Support: Added native support for Foundry VTT's Dynamic Token Ring.

    • Visual Guide: When "Use Dynamic Token Ring" is enabled, the editor displays a dashed ring guide instead of the baked texture, ensuring you see exactly where the engine ring will be applied.
    • Smart Export: The exported image is now generated with a transparent ring area (masked out), allowing Foundry to render its dynamic ring in real-time.
    • Automated Scaling:
      • Subject Scale: Automatically calculated (Dynamic Scale) to ensure your artwork "pops out" correctly relative to the ring size.
      • Global Scale: Now automatically set to match the subject/padding scale, ensuring the token matches the grid size perfectly while preserving the artwork's scale.
    • Export Cleanliness: Fixed an issue where the "Pop-Out Mask" overlay (white semi-transparent paint) specific to the editor was accidentally included in the export. It is now strictly excluded from the final image.
  • State Persistence Improvements:

    • Fixed Save/Load Bug: Resolved an issue where dynamicRingScale and useFoundryRing settings were not correctly restored when reopening a token, causing squashed images or missing rings. These settings are now properly serialized to the actor's flags.
    • Better Buffer Initialization: The editor now correctly resizes its painting buffers immediately upon loading a draft state, preventing "crop" or "squash" artifacts when loading high-padding tokens.

Technical Notes

  • Refactored _onSaveToken update logic to enforce matching global and subject scales for Dynamic Ring compatibility.
  • Updated token-studio.js state management to initialize ring settings at the root level of uiState for consistent serialization.