I have tested your program on Linux Mint 21.1 and it works like in your video.
I uploaded my own file step of an smd inductor and tried to vary the colors but the interface remained on the resistance mode.
How do I change the colors of any step object?
Thanks for the work done.
PS: Suggest that there are examples of how to edit generic .step files but on github I have not found such examples.
Not sure what you mean by “resistance mode” but, to clarify the changing GUI presentation:
• When either a “Resistor” or, “Select A Part” is selected in the List, the three color bands are available.
• When a “Capacitor”, “Jumper” or “LED” is selected in the List, only a Single color band is available because they are single color parts (as I defined them in code and in the provided STEP files).
Changing any STEP file is Not really doable, as-is.
Near the end of the Second video (posted on Github) I show how to do it by First preparing any STEP file by Changing it’s RGB color value to “1” by using most any other progam/app.
(Note: you may also think you can Text-Edit the value to “1” but, the STEP and my code-hooks use the value After it’s converted to decimal by exporting as STEP (many Drawing Apps that have color selections feature ability to set the values in Decimal, HEX, ARGB… etc. You can do it in FreeCAD, others…BUT, the set values GET Converted to Decimal during STEP Export by Magic. My Mac has Color format selection (screenshot below)
Doing it, in that sense, is no different than doing it in, say FreeCAD/other. Once done, and exported/saved as a STEP file, my Colorizer app will work on it. because it gets converted to Decimal RGB.
Naturally, a User would wonder “why bother, using the Colorizer app if I need to change the STEP in, say FreeCAD”. And, that is a valid point. So, the reason to prepare that STEP file and use the Colorizer app (and use the “Select A Part” feature is Simply to enable user’s ability to change the Color on that STEP file if using it in Kicad. on-the-fly.
The last examples in Second video shows doing it on a ‘Stock’ Kickad supplied STEP file.
You are able to set RGB values to ‘1’ and then are able to change the colors using my App?
(I’m assuming you set those three Faces to ‘1’ in FreeCAD then change them in my App ?). If so, Good job of understanding my confusing info…
I’m not a Linux guy but, in your Path string you show " .local " I’m not sure you should be using the ‘dot’ and, not sure about ’ - ’ dashes in the path… Underscores work.
Best to put the graphic icon file in the same folder as the script (then, there won’t be a need to set the Icon’s path (just set the file’s name). With the icon file in same folder, it should be found (I hope).
Re the List not detected. You call/run the App from some folder. The STEP files Must also be located in the same folder as the App so the App sees them.
I copied the path from the menager file “nemo” is correct…
the '.'refers to hidden directories.
You talk about kicad6 in the videos if I’m not mistaken.
Maybe with kicad7 the plugin is incorrect?
I get it. the .py file must be in the “plugins” directory and not in other subdirectories.
Now it works.
“/home/testructor/.local/share/kicad/7.0/scripting/plugins”
Let’s assume v7 is not the problem. Thus, a ‘Test’ consideration:
Just to see if problem is/isn’t file location and access
• Create a Folder on the Desktop, put the App and some of the listed STEP file in it.
Run the App from there to ensure all is good.
Then, Change the Path in the Plugin and see if plugin runs the App. On my system, it takes about 15 seconds to run after I click the Icon (why, I don’t know)
The Path on my Linux: Unfortunately, I was running Linux (with Kicad v6) in VirtualBox but, yesterday, I deleted Linux from VirtualBox and switched to UTM for running virtual machines and have not yet installed Kicad into Linux on this UTM virtual machine. Thus, cannot answer re the Plugin/Path question on Linux.
But, sounds like it’s not a Plugin or my App issue. Sounds more like a system file access issue…
We can do one simple test: I can post a Dumb Plugin - if you can get it running, that would confirm some aspects of the issue.
I’ll need some time to put it together and post it - should be within the next couple of hours (I have some things to attend to, first… and, more Black Coffee to drink)
Test done ,
if I start the app from the folder on the desktop it works but with the icon inside pcb_New with the modified .py file it does not start. I waited over 15 seconds but it doesn’t start.
• The running App may be hidden behind the Kicad window (probably not but, worth checking)
• There are 3 or 4 different ways to run an External App from Python and a plugin. Using the “subprocess” method is the most-used, reliable way. But, you could try the “OS” approach - (change the necessary Path and App info):
Another Example - running a Java App: subprocess.call([‘/usr/bin/open’,‘/Users/bruce/myJava_Out/Woof_R1.jar’])
Another Example - running a Windows App: subprocess.call([‘/usr/bin/open’,‘/Users/bruce/Library/CopperCAM.exe’])
Another Example - running LibreOffice’s embedded DataBase App subprocess.call([‘/usr/bin/open’,‘/Users/bruce/Documents/aDataBases/Project_Tracking1/Project_Tracking_1FORM.odt’])
Quick - test: Set the Path to Any App that works and try the OS approach (it may cause the App to keep running and/or close Kicad…) Machines/systems are not as smart as we think they should be…
You can Google around to find the others (probably quicker than my digging though stacks of paper)
Excellent! That saves me from digging through stacks of paper and re-loading Kicad into new UTM vm, I was very reluctant to do that because I just fully cleaned my system…)