Call the save method on the CustomNodeWorkspaceModel, when the custom node is being saved. #12687
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
This PR is to fix the: https://jira.autodesk.com/browse/DYN-4460.
When a new custom node is created and saved to a local path in a dynamo session, the custom node manager doesn't have the path information for that particular custom node. It will only have the path information after dynamo is restarted because Dynamo tries to load all the definitions from the node package paths. This was happening because when the CN is saved, during the InternalSaveAs method in dynamo view model, the workspace model's save function is always called.
This save method on the CustomNodeWorkspaceModel model is never called: https://github.com/DynamoDS/Dynamo/blob/master/src/DynamoCore/Graph/Workspaces/CustomNodeWorkspaceModel.cs#L298. When the custom node workspace is being saved, this method has to be called and that will make sure that the path information is updated in the custom node manager.
Declarations
Check these if you believe they are true
*.resxfilesRelease Notes
Call the save method on the CustomNodeWorkspaceModel, when the custom node is being saved.
Reviewers
@QilongTang @mjkkirschner @zeusongit