-
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! 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 |
|
Hello, I tried to test this branch to see if it was included but since I don't see it in discussion nor am able to compile at this time, and since this seems so close to completion I was wondering if angle snapping was implemented (as in, when rotating the object you can hold down a key / have snapping enabled and you rotate in increments of 5/10/15, whatever, degrees, snapping to the closest one), since that would be a very major use case, thanks. |
That feature is not implemented here as this PR is all about grid and "point" snapping. I also feel that "stepped" rotation would be a nice new feature, but, I should be worked and discussed on another PR. BTW, I'll try this weekend to do a fast mockup and see if it can be implemented 😉 |
It turned to be very easy to implement! at least considering it as a stepped rotation, well, let's see what @rodlie thinks about it, in the meanwhile, if you wait 30-50 minutes from now you will be able to test it with the PR builds #650. |
|
I also added the node tangents snapping to the new feature so at the end we have it all:
No way to edit the angles or modifiers but the feature is there. Adding them into Preferences is the easy thing... but I prefer @rodlie to have a look at it and let him tweak or polish it to softly integrate it into Friction. 😄 Everything is in the same PR #650 |
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 😄