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

Enable state was not taken into account when pasting a Block #6575

Merged
merged 3 commits into from
Dec 16, 2021

Conversation

julienamsellem
Copy link
Contributor

Purpose of this PR

https://fogbugz.unity3d.com/f/cases/1315482/

Copy paste or duplicate a block in a context would ignore the disable state.
d6ujZqP904


Testing status

Tested:

  • copy paste disabled block with CTRL+C / CTRL+V
  • copy paste disabled block with context menu commands
  • duplicate with CTRL+D
  • duplicate with context menu commands
  • enabled blocks still works like before

Comments to reviewers

This is one liner fix, very low risk 😀

@github-actions
Copy link

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.
Link to Yamato: https://unity-ci.cds.internal.unity3d.com/project/902/
Search for your PR branch using the search bar at the top, then add the following segment(s) to the end of the URL (you may need multiple tabs depending on how many packages you change)

VFX
/jobDefinition/.yamato%252Fall-vfx.yml%2523PR_VFX_trunk

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.

@VladNeykov VladNeykov requested review from VladNeykov and removed request for a team December 11, 2021 12:34
@VladNeykov
Copy link
Contributor

VladNeykov commented Dec 11, 2021

Thanks for the fix and for the testing status!
Tried a few other bits including undo/redo of the operations you already listed and it's looking good.

I did however find an issue which does not reproduce in master - creating subgraph blocks sets all blocks in the subgraph to be disabled. In master, the issue before was that all blocks are enabled, even if some were disabled when creating the subgraph (maybe that's something we can improve on?)

Here is the all blocks disabled issue particular to this branch:
7FbUiiTB72

This is accompanied with a console error when the block is opened (though the error itself also reproduces in master):
An infinite import loop has been detected. The following Assets were imported multiple times, but no changes to them have been detected. Please check if any custom code is trying to import them: Assets/ccc.vfxblock - (Force Reimport)(modified date 2021-12-11T12:39:35.1240259Z) Assets/New VFX.vfx - (Force Reimport)(modified date 2021-09-10T18:21:23.295811Z)

@julienamsellem
Copy link
Contributor Author

julienamsellem commented Dec 13, 2021

Thanks for the finding, it should be fixed with this commit 5c3ad9b

Copy link
Contributor

@VladNeykov VladNeykov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix; looking solid!

Tested:
Copy/duplicate via right click or keyboard shortcuts on:

  • blocks, subgraph blocks
  • between different contexts, systems, and VFX assets
  • within blocks
  • from blocks (copy) to VFX contexts (paste)
  • copying/duplicating/creating subgraphs from selections containing disabled and enabled blocks
  • undo/redo on all of the above

@julienamsellem julienamsellem marked this pull request as ready for review December 15, 2021 10:26
Copy link
Contributor

@PaulDemeulenaere PaulDemeulenaere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me but you can probably update the change log to track this resolution.
Thanks 🟢

@julienamsellem julienamsellem merged commit b4f512b into master Dec 16, 2021
@julienamsellem julienamsellem deleted the vfx/fix/1315482-copy-paste-enable-state branch December 16, 2021 16:07
julienamsellem added a commit that referenced this pull request Dec 16, 2021
* Enable state was not taken into account when pasting a Block

* Take enabled/disabled state into account when creating subgraphs

* Updated changelog
# Conflicts:
#	com.unity.visualeffectgraph/CHANGELOG.md
julienamsellem added a commit that referenced this pull request Jan 5, 2022
…6639)

* Enable state was not taken into account when pasting a Block

* Take enabled/disabled state into account when creating subgraphs

* Updated changelog
# Conflicts:
#	com.unity.visualeffectgraph/CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants