-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Problems using custom solder mask colors #36
Comments
Even better, I can just use Blenders builtin |
Yes, this seems to be ok. But isn't enough to solve the problems. After applying it I'm getting:
|
Ah yeah okay, I see I messed up there, should also be fixed now 🤞 |
Hi @30350n ! Close, I had to also change: --- materials.py 2023-10-18 13:01:04.874202150 -0300
+++ /tmp/materials.py 2023-10-18 13:39:41.123547271 -0300
@@ -239,7 +239,6 @@
bl_width_default = 180
def update_props(self, context):
- light_color, dark_color = MASK_COLOR_MAP[self.soldermask]
match self.soldermask:
case "WHITE":
roughness = 0.15
@@ -249,6 +248,7 @@
roughness = 0.25
if self.soldermask != "CUSTOM":
+ light_color, dark_color = MASK_COLOR_MAP[self.soldermask]
self.inputs["Light Color"].default_value = (*srgb2lin(light_color), 1.0)
self.inputs["Dark Color"].default_value = (*srgb2lin(dark_color), 1.0)
self.inputs["Roughness"].default_value = roughness |
To fix the custom colors support See 30350n/pcb2blender#36
Should now actually be fixed. Didn't really have time to properly test this yet until now, sorry. I've added a test file now and everything passes, so this should be fine now. |
Perfect, I tried the last code and it works. I defined some "pink" color for the @mundodisco8 snow flake board (the one that triggered upgrading to 2.7 to get correct solder mask color) and got: |
Damn! now I want to make a run with pink soldermask 🤣
…On Thu, 19 Oct 2023 at 14:17, Salvador E. Tropea ***@***.***> wrote:
Closed #36 <#36> as completed.
—
Reply to this email directly, view it on GitHub
<#36 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACADOE3THT3VXA7IGSNIBDTYAER6RAVCNFSM6AAAAAA54DGOVWVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQG4YTCOJQHE3DKNI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I'm having problems testing the case where a color is defined using its hexadecimal representatio, the following code:
pcb2blender/pcb2blender_importer/materials.py
Line 87 in 05d53b9
Produces TypeError: can't multiply sequence by non-int of type 'float'
Which is consistent with what I get in the interpreter:
Perhaps you can use something like:
The text was updated successfully, but these errors were encountered: