Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5841

Add material with python script

$
0
0

Hello,

I have modified an example found online to add a new PBR material to the scene. If I run this script again, it creates a new material labled …(1), …(2), etc. How can I keep track of the current number lable added? Can I find and delete / use materials added with previous runs of the script?

AssignPBR.py (2.3 KB)

Also I have found this example python - How to replace all pixels of a certain RGB value with another RGB value in OpenCV - Stack Overflow which would help a bit with the preparation (since the metallic part of my .jpgs is always the same color). Can I inbuild this into my script so that I only need to prepare the “main_texture” and have the rhino python script do the rest for me?

Thank you in advance

3 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 5841

Latest Images

Trending Articles



Latest Images