[An...] Posted August 14 Share Posted August 14 Hallo allerseits, gibt es die Möglichkeit, in "metainfo.json" eine Farbauswahl zu programmieren, so dass diese in den entsprechenden Add-on Settings in den Voreinstellungen angezeigt wird? In der Dokumentation zu den Add-on Settings ist dazu leider nichts enthalten. Vielen Dank im voraus für eine Info dazu! ------------------------------------------- Hello everyone, Is it possible to program a colour selection in "metainfo.json" so that it is displayed in the corresponding add-on settings in the default settings? Unfortunately, there is nothing in the documentation for the add-on settings. Many thanks in advance for any information on this! ------------------------------------------- Link to comment Share on other sites More sharing options...
[Ma...] Posted August 15 Share Posted August 15 Hello Mr. Gallasch, 'file' is currently the only non-basic type provided. I suggest to store the color settings as a string containing either the hex value or the color name. If you want to use the color in the context of an HTML element, you can use the color string directly if you adhere to the HTML color syntax. If you need a gom.Color object, you can convert a color name to RGBA values (or vice versa) using the Python package 'webcolors'. To convert between RGBA values and gom.Color object: color = gom.color(r, g, b, a) r = color.r g = color.g b = color.b a = color.a Hope this helps! Best regards, Matthias Prinke Link to comment Share on other sites More sharing options...
[An...] Posted August 15 Author Share Posted August 15 Hello Mr. Prinke, Thank you for your reply and for pointing out that the “file” type is currently the only “exotic” type that can be used here. What I actually need is shown in the attached photomontage... Link to comment Share on other sites More sharing options...
[Ma...] Posted August 16 Share Posted August 16 Hello Mr. Gallasch, I already assumed that you had this in mind. A color selection widget is currently not implemented in the Add-on Settings. Please feel free to file a request via Software Support. Best regards, Matthias Prinke Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in