-
Notifications
You must be signed in to change notification settings - Fork 776
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
Vfx/fix/1359426 shift context on new block #5578
Vfx/fix/1359426 shift context on new block #5578
Conversation
Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed. VFX Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure. |
I changed a bit the behavior so that contexts are not shifted if they are side by side. On edge case I found with the current fix is if two contexts are swapped vertically ( |
…ede itself Also fixed an issue increasing the shift along the contexts
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.
Looking solid! Tested:
- Adding, duplicating, copy-pasting, and moving single or groups of blocks
- Moving blocks to previous or next contexts
- Outputs connected to Update and Outputs connected directly to Initialize
- Multiple outputs (only those under the previous context will move down)
- Smoke-tested subgraph blocks added to contexts, as well as within the subgraph itself
- Different arrangements/placement of contexts when doing the above
- Different default templates
- Undo/Redo
Thanks for the fix! :)
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.
Side note, internal on GrowContext was actually already implicit
Otherwise, the code looks good and it's clear.
Thanks for this improvement. 🟢
* Automatically offset contexts when a new node is inserted * Updated changelog * Do not shift down contexts if they are side by side * Do not shift a context if it's completely above the context that precede itself Also fixed an issue increasing the shift along the contexts * Improved context position shifting when there are multiple outgoing links * Implemented a different approach to shift contexts observing all contexts # Conflicts: # com.unity.visualeffectgraph/CHANGELOG.md
* Automatically offset contexts when a new node is inserted * Updated changelog * Do not shift down contexts if they are side by side * Do not shift a context if it's completely above the context that precede itself Also fixed an issue increasing the shift along the contexts * Improved context position shifting when there are multiple outgoing links * Implemented a different approach to shift contexts observing all contexts # Conflicts: # com.unity.visualeffectgraph/CHANGELOG.md
Has been backported in #6444, updating flag |
Purpose of this PR
https://fogbugz.unity3d.com/f/cases/1359426/
![Before](https://user-images.githubusercontent.com/85612173/132660659-cabc3750-b162-4f50-944f-71a3ecd46749.gif)
When inserting a new node in a context the context could then overlap the context below.
With the fix, each context below is pushed down to avoid overlapping (it's not moved if not needed).
[Before]
[After]
![After](https://user-images.githubusercontent.com/85612173/132661260-0f492a40-db0d-4baf-a8a5-d10a9290cdbc.gif)
Testing status
I tested inserting new nodes with the filter window or with copy/paste an existing node.
I tested
Spawn
,Init
andUpdate
contexts.Comments to reviewers
If the contexts are side by side the behavior is the same even if it's not absolutely required the graph is still more readable if contexts are pushed down.