Maths revision can get pretty boring after a few hours, so I decided to have a little fun looking at View Extensions again. I’ve recently been learning all about WPF and MVVM – which is something like magic at first, then like eating a frozen lemon and then starts to make sense in drips and drabs – that’s my experience at least, your experience may differ.
Either way, while adding a little more features to my Python Snippet Locker I thought I would revisit the Group Colour Manager. This is something I did a while back, but always wanted to have it automatic rather than clicking a button. Thankfully, while on my explorations in WPF/MVVM I realised what the missing piece was –Β PropertyChanged events, which are fundamental in MVVM.
So, here it is in action…
You may notice I got a little sidetracked (the Group Colour Manager didn’t take long) and I may have changed my Dynamo Theme just a tad… π
Again, WPF/MVVM related, I was looking for the Dynamo Theme colours in Dynamos GitHub repos. I found the UI/Themes/Modern repo which had exactly what I was looking for! Great Stuff! But, it also turns out this file is in the Dynamo Core folder too…even greater stuff!
You can see where I am going with this… Dynamo is just soooo grey (but it is sexy) and I couldn’t help myself.. π
C:\Program Files\Dynamo\Dynamo Core\1.3\UI\Themes\Modern
You probably shouldn’t be playing around with this file, but I saved a backup and I can always just reinstall or copy the text back from GitHub should it go nuts – responsible as I am.
This file resides in an Admin Only folder, meaning if you don’t have permissions, you can’t save the edits, meaning no pretty colours for you! But it’s really easy to do if you have Admin Rights to the file and they even recommend a good colour picker (I am naturally rebellious and went with my own favourite of course).
<!-- Node colors in inactive state --> <SolidColorBrush x:Key="headerBackgroundInactive" Color="#95D9FF" /> <SolidColorBrush x:Key="headerForegroundInactive" Color="#898989" /> <SolidColorBrush x:Key="headerBorderInactive" Color="#004167" /> <SolidColorBrush x:Key="outerBorderInactive" Color="#004167" /> <SolidColorBrush x:Key="bodyBackgroundInactive" Color="#CBECFF" />
All you need to do is change the hex colour string (shown in magenta) to whatever you want. My favourite online colour picker I mentioned earlier gives you the hex value (the one that starts with # and followed by numbers/letters), you just copy and paste it in. It’s that simple!
Anyway, I spent way longer today looking at colour swatches than coding, redecorating is always hard work, but I think I have the Colours I want now and a good April Fools prank to look forward to where the everything is very nearly the same shade of grey.
Thanks for reading as always, and I’ll post the extension/code for the Group Colour Manager in a separate post I think.
April 21, 2020 at 11:38 am
Hello!
Thanks for the info.
Is Group Colour Manager free, where i can get it?
Β And where you could change Connectors color? I want darkest possible background in Dynamo, so Connectors and Geometry color (black by default on dark background) are problem now.
Is Python Snippet Locker free? Brilliant idea, i want to use it!
Thanks in advance!
LikeLike
April 21, 2020 at 4:39 pm
Hi Vladimir,
I haven’t officially released the Group Colour Manager as there was a cooler Extension released called Iris, but I may release it (open source) in case anyone wants it or is learning Dynamo View Extensions. You should check Iris out though…
https://forum.dynamobim.com/t/i-is-extension-dynamo-2-graph-colorization-customization/35227
As for the Snippet Locker. I’m midway upgrading it, but been too busy to work on it properly in the past 6 months with work and Uni. Once I have finished up with Uni for summer I will have a proper look and send it out into the wild! And of course, absolutely free, all the stuff I make on here is free to use. π
LikeLike
April 23, 2020 at 2:50 pm
Hello!
Well, waiting for Snippet Locker!
I want to make eye-care dark theme for Dynamo.
Can you share Dynamo config file with bright connectors(or where are the settings placed), like in your Youtube video?
And where can we change wireframe color of geometry?
Thanks in advance!
LikeLike
May 3, 2020 at 10:05 am
Hi Vladimir,
Ha, I will put aside some time over the next few weeks to finalise the Snippet Locker now I have finished up with Uni and now only have work to grapple with.
For the colour settings, there is no way via the .xaml files to change the Edge/Point colours for 3D, even though there are some properties that you can change, this appears to be hard-coded so will require a ViewExtension to modify, but for the connectors you can change this in the DynamoConverters.xaml. I have uploaded some modified files in this link…
https://drive.google.com/drive/folders/1lc5wd7glOhkn13AI1lgcNUMlwWwsiV52?usp=sharing
And they should be placed in here…
C:\Program Files\Dynamo\Dynamo Core\2\UI\Themes\Modern
NOTE: You should make a copy of the original files before you replace with these and place somewhere safe. You also require admin rights to this folder to edit or change them. AND this is for Dynamo 2X, do not use these for other versions of Dynamo as there could be differences that might crash Dynamo.
LikeLike