Hey there, down here 👋
Want to hear something cool?? We figured out how to quickly attach an icon per custom node in your Dynamo Package. (How-to video at the end of the post)
As you might already know, in the past, the package.customization.dll was able to attach an image called DefaultCustomNode.Small.png to all the custom nodes in the package... and now no more, it goes node by node, providing an image with its id in the name.
«Seriously???» you might say, and you'd be right because, for extensive packages with dozens of nodes, one image per node is quite a work!! It's also on the Dynamo Wishlist...
Step By Step
here you can find a detailed guide on how to use VisualStudio to build the .dll file.
"All splendid but...We'd just need something to automatize the images creation" said the poor user
Here is a solution entirely made in Python to create all the needed images, which will then be drag-and-dropped to VisualStudio to complete the operation as per the below video.
What the above gentleman actually does is
open each of the .dyn files.
read the first 100 characters (that for sure contain the custom node Id)
create a new 'file path', similar to the single copy of the provided image (line 8), but with the name containing the custom node id.
make a copy of the image named with the above-defined path.
print the new path; this is just for fun!
Maybe more practical a video? Here we go, an illustrative video showing the whole process:
As usual, we hope you found it all enjoyable and worthier.
Read you next time!! :)
Bình luận