Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference Image Improvements #961

Merged
merged 36 commits into from
Dec 31, 2023
Merged

Reference Image Improvements #961

merged 36 commits into from
Dec 31, 2023

Conversation

TheLsbt
Copy link
Contributor

@TheLsbt TheLsbt commented Dec 15, 2023

This pull request aims to improve the useability of reference images by adding features such as:

  • Undo/Redo support
  • Simple way for moving, rotating and scaling the image directly on the canvas
  • Improved UI
  • More options to display your Reference Images (monochrome) and a way to color clamp of some parts of the image
  • Keybinds are added to "quickly select a image" "cancel the transform" and to "change the mode of transform"
  • Added Translations for ui that relates to References Panel

Fixed static typing in "src\UI
\ReferenceImages\ReferenceEditPanel.gd"
Changed "ri == null" to "!ri" in "src\UI\Canvas\ReferenceImages.gd"
Removed lambda functions for the confirmation dialog.
Removed irrelevant print statement.
I think its fixed now
Added the ability to drag and drop Reference Images similar to dragging and dropping layers. These can be dragged or used with buttons (similar to the buttons that move frames). With full undo/redo support.

Added tool buttons these should help people who draw on tablets that cannot use keyboard shortcuts (icons still need to be created)

Renamed ReferenceEditPanel.gd to ReferenceEdit.gd (because it is no longer the script of a panel) and changed the base class of the Reference Panel.

Added some more translations.

Remade ReferenceImageButton.tscn to allow for drag and drop

Added drag highlight
Added icons for the tools of the Reference Images
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asset file names should be in snake_case (all lowercase, underscores instead of spaces) as per CONTRIBUTING.md. If Godot complains while renaming, it's because Windows is not case sensitive. As a workaround, you can first rename it to something like "move_.png", and then "move.png". Same for the rest of the files.

src/UI/Canvas/Canvas.gd Show resolved Hide resolved
src/UI/ReferenceImages/ReferencesPanel.tscn Outdated Show resolved Hide resolved
src/UI/ReferenceImages/ReferencesPanel.tscn Outdated Show resolved Hide resolved
src/UI/ReferenceImages/ReferencesPanel.tscn Outdated Show resolved Hide resolved
src/UI/ReferenceImages/ReferencesPanel.tscn Outdated Show resolved Hide resolved
src/UI/ReferenceImages/ReferencesPanel.tscn Outdated Show resolved Hide resolved
@OverloadedOrama OverloadedOrama changed the title Reference Image Improvments Reference Image Improvements Dec 27, 2023
@OverloadedOrama
Copy link
Member

I found a bug where, if you import a reference image and then create a new project, that reference image is still visible even when switching projects. The reference images panel also doesn't seem to be updating when switching projects, it always displays the reference images of the project that the last reference image was imported to. Apart from that, I think it looks good.

Also fixed visual bugs related to highlighting the current reference image.

Made it so the reference image that was selected in a project get selected again when the project opens instead of going back to -1 (nothing)
@TheLsbt
Copy link
Contributor Author

TheLsbt commented Dec 27, 2023

I found a bug where, if you import a reference image and then create a new project, that reference image is still visible even when switching projects. The reference images panel also doesn't seem to be updating when switching projects, it always displays the reference images of the project that the last reference image was imported to.

The logic for switching reference images and updating the UI is implemented but I believe I accidently removed the code in Project.gd that calls the updateing code was deleted (by me) on accident. The bug should be fixed now.

Copy link
Member

@OverloadedOrama OverloadedOrama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you!

@OverloadedOrama OverloadedOrama merged commit c8f3794 into Orama-Interactive:master Dec 31, 2023
4 checks passed
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