-
Notifications
You must be signed in to change notification settings - Fork 36
Grid and snapping #628
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
base: main
Are you sure you want to change the base?
Grid and snapping #628
Conversation
Yes, this is what I think 😉 |
This comment was marked as resolved.
This comment was marked as resolved.
|
Ignore my last post, for some reason I was missing several commits 😄 |
|
Would snapping to other objects be doable? When scaling (using gizmo) snapping would be nice, also for rotate if possible (if snap to box is enabled).
After testing I think we need to split out box and pivot. Snap to pivot can be a bit irritating at times :) |
Yes! I'm on it
I can try, but I'm unsure how it would behave...
Hehehe, I agree and I'm introducing "snap to nodes" too when the object is based on them I'll let you know later |
Awesome 👍
We use the bounding box corners of the object, if in snapping range during rotation calc how much added rotation (based on pivot) is needed before we match the snap target, then apply(?). Anyway, not important for v1.0, this is something we can look at for v1.1 (or beyond). |
|
There it is, a step forward. It works pretty well.
It is turning big, at least on available options... I don't know if it still makes sense to place it buried in a menu or we need to think about some buttons/toggles in the main GUI, what do you think? About the scaling I think it won't be able to do it with the current implementation as the gizmos just modify the values of the related parameters, that is, for scaling it just edit the scaling values based on mouse interaction. I guess we should add a shortcut for the global snapping toggle, do you agree? |
That's ok, I will add a new toolbar for grid/snapping with the most relevant options. |
|
Suggestion for buttons in toolbar: friction-snap-2025-10-25_23.57.18.mp4click enable/disable, long-click open menu. |
|
I like it! very simple and faster than menus. Do we need icons for each option or just text? I would bet for no more icons and just checkbox and label Is the "grid" icon going to behave the same?
|
rodlie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some comments. Don't do anything yet.
I'm a bit confused by the usage of both eSettings and AppSupport settings.
Yes the grid will behave the same. I don't think we need more icons, checkbox are good enough. |
…or self pivot translation
|
Ok, don't do any more changes to the settings stuff, and don't give me AI answers ;) (if you don't know just say so) I will rewrite the settings stuff. |
|
OK, I will. It's all yours, I'm not touching the code anymore, in case I find any bug or thing that's should be added I will tell you first, so you can work in this PR |
Ok 👍 |
|
BTW, the settings are supposed to work as the following:
|
That looks ok, I'm not able to test the XML stuff, since development of the XML file format happens in a dedicated branch. I will mark the XML load/save as TODO or something in the code, so that I remember to check/fix it when I continue on that branch.
I understand. Unsure if I have time today, if not I will fix the settings stuff tomorrow. I will probably also move some code around. |
|
Been a bit busy with other things this last week, but I'm working on getting this ready for merging. I had to remove most code related to GridSettings, but I should be done in a day or so (depends on how much free time I get). |
|
Great! Take your time. I knew GridSetting needed some love and adaptation to Friction system but they are great news 👏🏻 |
|
btw, we need on/off icons for grid and gizmo. Similar to the snap icon. (snap_on/snap_off): Screen.Recording.2025-11-09.at.22.54.16.mp4 |
Hi,
I've been developing a grid and snapping system, it started as an experiment with IA, but I think it turned pretty damn good at the end 😅 (and very useful indeed):
grid_v04e.mp4
It features:
View > Grid & snapping- hide/show grid
- snap to grid and/or canvas (independent)
- draw grid at back or on top
It indeed changes Friction document, needed a new version and touches lots of files so feel free to review when you have some spare time.
It works very well and it is so handy (at least for the kind of animations I use to create).
Try it and let me know 😄