friction2d / friction

Friction Graphics
https://friction.graphics
GNU General Public License v3.0
178 stars 10 forks source link

Only show usable animators in graph #178

Open rodlie opened 1 month ago

rodlie commented 1 month ago

This is a proposed solution for issue #176.

Introduces a new "isGraphSelected" function for boxes and "prp_isParentBoxGraphSelected" for properties. This function is used by the graph to figure out which animators are usable or not, the state is controlled by the canvas. if "isGraphSelected" is false then the box should be considered removed and the animator connected to the box should be ignored, we do not remove it since that breaks undo.

Binaries: https://sourceforge.net/projects/friction/files/0.9.6-629e18e8/

Fix #176

adambelis commented 1 month ago

edit: i still can replicate same bug . maybe i am testing wrong version ? https://github.com/friction2d/friction/commit/1b2af3b4

rodlie commented 1 month ago

i still can replicate same bug . maybe i am testing wrong version ?

0.9.6-629e18e8

I think you are using wrong build.

adambelis commented 1 month ago

ok finaly rocking correct build. This fixes the problem but introduce new one. If delete object graph disperes but if you undo you can never get it back for any property of that object

rodlie commented 1 month ago

if delete object graph disperes but if you undo you can never get it back for any property of that object

Click on the box.

adambelis commented 1 month ago

https://github.com/friction2d/friction/assets/50795097/26a6a726-52c9-442e-8e2b-91256a5ff12e

rodlie commented 1 month ago

As said, click on the box.

Undo does not change states, so the graph does not update.

adambelis commented 1 month ago

I did clikec the vox it's doing nothing

rodlie commented 1 month ago

You do not click the box (the eclipse object) in the video.

adambelis commented 1 month ago

When you say box you mean small grap icon next to property ? I am clicking it but you cannot see that since that but just does not work if you mean different box not sure which one :D

rodlie commented 1 month ago

Lost in translation ;) I mean the object/box as in the circle/rectangle/path whatever.

https://github.com/friction2d/friction/assets/34516798/d8b60799-020d-4b13-92ca-771d145d1de1

rodlie commented 1 month ago

And before you say it, yes this is not how it worked. But that's because the graph animator was never removed. The undo "update" is a different issue (that I will look into).

adambelis commented 1 month ago

hmm.. honesty i dislike this system now you need to enable cruvs in 3 places (two was already too much) . I think keeping bug is better then this behavior :D

rodlie commented 1 month ago

If you delete a 'box' and undo you have to click it to get the animators back in the graph, not that hard. When I fix the undo state nothing will have changed.

adambelis commented 1 month ago

ah ok i misunderstood this needs to be done for all objects. in that case this is ok soluition

rodlie commented 2 weeks ago

So, will delay this until the next version. It's a workaround, I would rather fix this properly.

Will keep the PR open just as a reminder (or fallback).