Hey guys, sorry to ask what is probably a straight forward task, but I can't find anywhere in the docs on how to do this. I want eventually to have an LOD type script for texture resolutions ect...
But my query is how can I assign a shader to a shader via the command line? Like "setAttr nurbsSphere blinn1SG " or something? If it's a fairly straight forward command, can someone please be kind enough to give reply to my post?
Hey Jeff, thanks for your reply, I originally grabbed it from the script editor, although I think that's only applicable to selected objects right? As it applies to the selection??
That's why I'm trying to find out how to apply it to a specific object name ect. oposed to whatevers selected. I guess worst case scenario I could have it select the object first, but that'd get a bit slow in real time.
The example I gave is specific yes, based off your example, but doesn't require nurbSphere to be selected since it is specifically named in the command. The command should work with string variables in place of the shader and object names. For instance...
y'know, if you want to have LOD on your textures, it might be safer to have a script that just changes the texture path (ie the fileTextureName attribute). this way, if you do an optimise scene, you won't obliterate all your LOD materials that are currently un-assigned. this way will probably end up being a little cleaner as well. not so much clutter around. you can also just store all the LOD information along with the file texture node itself, in custom attributes, instead of defining the custom attributes on the object...
oh... i thought he meant to do the LOD thing in the UI, not the render... if its at render time, then yeah, use ramps, or conditions, anything but mel really.
sorry, i thought he meant how to do it interactively in the UI
Hey guys, thanks for the replies! Yeah basically what I'm wanting to do is when a camera is looking at an area, the textures are high res, when it's not, the textures are low res. I'm working on the title sequence for a Disney movie at the moment which is all 3D moving through a jungle, but all 2D/Cel look. So obviously lots and lots of trees which Maya is probably going to choke on is the textures are uber high res
Thanks I'll look into I guess, I'm still fairly new to mel/scripting all togeather so finding even the simplest of strings at times I'm finding difficult.