-
Notifications
You must be signed in to change notification settings - Fork 635
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
DYN-4224 / DYN-4225 Watch3d Updates (Persistent camera and node size between saves / Ignore Node preview state) #12150
Conversation
src/Libraries/Watch3DNodeModelsWpf/HelixWatch3DNodeViewModel.cs
Outdated
Show resolved
Hide resolved
src/Libraries/Watch3DNodeModelsWpf/HelixWatch3DNodeViewModel.cs
Outdated
Show resolved
Hide resolved
src/Libraries/Watch3DNodeModelsWpf/HelixWatch3DNodeViewModel.cs
Outdated
Show resolved
Hide resolved
src/Libraries/Watch3DNodeModelsWpf/HelixWatch3DNodeViewModel.cs
Outdated
Show resolved
Hide resolved
src/Libraries/Watch3DNodeModelsWpf/HelixWatch3DNodeViewModel.cs
Outdated
Show resolved
Hide resolved
var connected = watchModel.InPorts.SelectMany(p => p.Connectors.Select(c => c.Start.Owner)); | ||
if (!connected.Contains(node)) | ||
{ | ||
return; |
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.
when would this occur?
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.
The DefaultWatch is wired up to every node.PropertyChanged event in the graph. In the case of the background preview you want all of them. For the Watch3D we want to only react to changes that are for the node that is directly connected
protected override void PortDisconnectedHandler(PortModel obj) | ||
{ | ||
OnClear(); | ||
if (obj.PortType == PortType.Input && watchModel == obj.Owner) |
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.
when could it occur that obj is not a portModel of this node?
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.
In this case the PortConnected and PortDisconnected Handler are registered in the DefaultWatchViewModel as well. So we need to filter out port events unrelated to this node.
@saintentropy this PR needs tests. |
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.
a few questions and a request for at least the following tests:
- calling
RequestVisualUpdateAsync
with ignoreIsVisible works correctly with true and with false inputs - deserialization test for watch3d node camera sets some properties correctly.
@@ -610,7 +611,8 @@ protected virtual void OnRenderPackagesUpdated(NodeModel node, RenderPackageCach | |||
// If there is no attached model update for all render packages | |||
if (watchModel == null) | |||
{ | |||
if(node.IsVisible == false) | |||
//When Watch3D nodes are in canvis we need to ignore this even under certain situations. |
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.
spelling (canvas) - also comment is not super clear to me?
ignore this even under certain situations
whats this,
what situations?
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.
@mjkkirschner Does this make more sence now?
@mjkkirschner I believe this is ready to go, but have a look at the added tests when you get a chance. |
Also, can we still cherry-pick this into 2.17? I notice the PR isn't marked 2.17, though the corresponding Jira task is. |
@twastvedt yes, please cherry pick the squash commit. |
@twastvedt while this looks good, there are 2 failing tests, please check them out before merging! I actually think this is 1 test just listed incorrectly as 2 by jenkins. |
Ah, sorry about that. Ok, passing now! |
…between saves / Ignore Node preview state) (#12150) * Use exisitng width, height, and camera during deserialization * Allow Watch3D to tessellate directly connected nodes independent of preview state * One more change for directly connected * Fix bug with port connection and disconnect events * pr comments * Ignore certain cases * PR comments * update comments * Update DefaultWatch3DViewModel.cs * Added deserialization test for HelixWatch3D node * Added the dyn file for the HelixWatch3D node deserialization test * Added testing for Width deserialization * Renamed test dyn file * Added test for ignoring IsVisible parameter by Watch3d node * Fixed wrong test geometry in dyn file * Added another Assert to the IgnoreIsVisible test * Fixed Assert statements * Simplified a test * Remove node_modules. * Fix test. * Simplify Co-authored-by: Craig Long <[email protected]> Co-authored-by: Long Nguyen <[email protected]> Co-authored-by: Trygve Wastvedt <[email protected]> (cherry picked from commit 903ca10)
…between saves / Ignore Node preview state) (#12150) (#13534) * Use exisitng width, height, and camera during deserialization * Allow Watch3D to tessellate directly connected nodes independent of preview state * One more change for directly connected * Fix bug with port connection and disconnect events * pr comments * Ignore certain cases * PR comments * update comments * Update DefaultWatch3DViewModel.cs * Added deserialization test for HelixWatch3D node * Added the dyn file for the HelixWatch3D node deserialization test * Added testing for Width deserialization * Renamed test dyn file * Added test for ignoring IsVisible parameter by Watch3d node * Fixed wrong test geometry in dyn file * Added another Assert to the IgnoreIsVisible test * Fixed Assert statements * Simplified a test * Remove node_modules. * Fix test. * Simplify Co-authored-by: Craig Long <[email protected]> Co-authored-by: Long Nguyen <[email protected]> Co-authored-by: Trygve Wastvedt <[email protected]> (cherry picked from commit 903ca10) Co-authored-by: Craig Long <[email protected]>
Purpose
This PR covers https://jira.autodesk.com/browse/DYN-4224 and https://jira.autodesk.com/browse/DYN-4225
This PR updates the behavior of the Watch3d node in three ways.
Declarations
Check these if you believe they are true
*.resx
filesReviewers
TBD
FYIs