Replies: 2 comments 1 reply
-
|
Hi Shuana, Then now that you know the material ID you want to work with, you can set it to a selection of elements by doing as indicated below: Hope that helps |
Beta Was this translation helpful? Give feedback.
-
|
I think material_controller is more to interact with the materials menu but not to apply a material to an element in 3d. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am trying to automate setting a solid color texture for elements based on their material using the Cadwork Python API.
I encountered two issues:
Running material_controller.set_texture_color() does not seem to change the material or texture visually.
Using material_controller.get_texture_color() on beam rectangles of different materials/textures always returns 16777215.
Here is a simplified snippet of my code:
My questions:
What is the int returned by get_texture_color() based on?
Is there a way to automate the menu sequence Modify -> Texture/Transparency -> Modify Texture -> choose color via the Python API?
Thank you in advance for any guidance or examples.
Beta Was this translation helpful? Give feedback.
All reactions