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

Improved editing for transformed shapes (again) #134

Merged
merged 7 commits into from
Jan 19, 2024

Conversation

Pizzaandy
Copy link
Collaborator

  • Adjusted mouse delta while editing vertices and control points on shapes where global_transform != identity
  • "Set Pivot" action now works as expected on shapes where global_transform != identity
  • Fixed a small issue where the editor buttons do not disappear after a shape is deselected
  • Test change: ActionSetPivot action no longer takes a Transform2D argument

2b8ed79420edede47fffbfbf9578a445

@limbonaut
Copy link
Collaborator

Very nice PR! Gave it a short testing session: all the actions work as expected, and undo-redo performs without failure.

@limbonaut
Copy link
Collaborator

After more testing, I found a small issue still lurking with cutting a shape into two shapes. I attach video of the issue:

Video_2023-12-18_16-32-30.mp4

@Pizzaandy
Copy link
Collaborator Author

Ah, good find! I think the cut mode still assumes that global_transform = identity. I'll take a look at that this week.

center pivot now uses tessellated points to calculate centroid
@Pizzaandy
Copy link
Collaborator Author

Pizzaandy commented Dec 18, 2023

Fixed the issue: the SS2D_Shape.clone method only copied over the position and scale rather than the entire transform. I also decided to increase the size of some icons and improve the contrast on shape outlines.

image
Pictured: holding shift on edge edit mode

addons/rmsmartshape/actions/action_set_pivot.gd Outdated Show resolved Hide resolved
addons/rmsmartshape/plugin.gd Outdated Show resolved Hide resolved
addons/rmsmartshape/plugin.gd Outdated Show resolved Hide resolved
@limbonaut
Copy link
Collaborator

Tried it in the editor and it's all good! 👍

@Pizzaandy
Copy link
Collaborator Author

Thanks for the feedback - I'll try to get those changes in later today.

@limbonaut
Copy link
Collaborator

LGTM 👍

@limbonaut limbonaut requested a review from mphe January 19, 2024 10:12
@Pizzaandy Pizzaandy merged commit 6d09f86 into SirRamEsq:master Jan 19, 2024
1 check 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.

3 participants