-
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
Add and update icons and Update icon automation (debug mode) #14942
Conversation
UI Smoke TestsTest: success. 2 passed, 0 failed. |
Nice automation, just curious did you use the 100 subfolder or the 400 subfolder? |
400 for all |
@Jingyi-Wen I think we were talking about integrating 100 ones but curious if 400 ones would bring any benefit? e.g. would resolution be better when zoomed in? @zeusongit If you dont mind, would you make a comparison using one of the node I updated previously v.s. the one updated by you, because I used 100 ones |
In comparison, the 400 icons do look sharper than the 100 ones. |
src/DynamoUtilities/DebugModes.cs
Outdated
@@ -55,6 +55,7 @@ private static void RegisterDebugModes() | |||
// Register app wide new debug modes here. | |||
AddDebugMode("DumpByteCode", "Dumps bytecode to a log file in a folder called ByteCodeLogs located in the current working dirrectory.", false); | |||
AddDebugMode("CrashOnNewNodeModel", "Crash when creating a new NodeModel. Works only on Debug builds", false); | |||
AddDebugMode("UpdateNodeIcons", "This debug mode enables an automation that can be used to update node icons. https://wiki.autodesk.com/x/OACkf", true); |
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.
Do we really need this? Regular builds do not have debug menu enabled right?
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.
I started with this being hidden behind the debug mode, removed now
BitmapImage bi = new BitmapImage(); | ||
|
||
bi.BeginInit(); | ||
bi.StreamSource = new MemoryStream(System.Convert.FromBase64String(s)); |
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.
@zeusongit I think you need to carefully examine if this code leaks. You never dispose this stream.
namespace Dynamo.Wpf.Views.Debug | ||
{ | ||
/// <summary> | ||
/// Interaction logic for DebugModesWindow.xaml |
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.
comment incorrect.
@zeusongit this PR brings in lots of new public methods that need to be added to the unshipped.txt file. |
Purpose
The PR adds and updates node icons shared internally.
Total 600 icons are updated and 312 icons are added.
The size difference between old and new icons is ~9MB as we are using 400dpi icons now.
Before:
After:
Before:
After:
Better resolution:
The new automation is under DebugMode : UpdateNodeIcons
It requires the path to new icons and will do everything else, given that:
There is a review step that will scan the directory for icons, and load them with old icons for easy comparison, logs are generated and stored as well for troubleshooting.
The second step is to update icons after the result from first review step seems satisfactory.
A backup file is also generated for the updated resx files, just in case.
Declarations
Check these if you believe they are true
*.resx
filesRelease Notes
Reviewers
@DynamoDS/dynamo