samboosa Posted April 25, 2013 Share Posted April 25, 2013 (edited) Hello! If I have say 100 objects and want to randomly assign them a texture from a selection of 5, I would attach 5 UVquickshade nodes (with path to jpeg) to a switch and write an expression (very basic setup) to choose a random UVquickshade node from the available inputs. I have written a python script/function so that a button can automatically duplicate the original quickshade node which is fed into the existing switch node - the problem is that the duplicates do not maintain their connection to the switch. What would be a good way to add more available material-textures to the selection without having to create and delete the node manually? I basically want to be able to add and remove available textures from one interface (in combination with multiparm). Any help would be greatly appreciated! - Samboosa. Edited April 25, 2013 by samboosa Quote Link to comment Share on other sites More sharing options...
samboosa Posted April 25, 2013 Author Share Posted April 25, 2013 Another idea - could there be an automated way to connect all the inputs (materials e.g.) going to a digital asset to a switch inside? This way I would still achieve what I want and it would be neat enough... Quote Link to comment Share on other sites More sharing options...
anim Posted April 25, 2013 Share Posted April 25, 2013 you can just override texture path per primitive with simple Attribute Create SOP if you create string attribute with the same name as texture parameter on material, containing path to the texture, it will automatically override the parameter with per primitive value no scripting necessary, just simple expression varying the path Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.