As some of you are probably aware, I am currently writing a material lister maxscript function that allows comparison of multiple material parameters within the same rollout.
I am trying to add a spinner to control the Translucency Thickness Paramater. The problem is that I can’t assign this parameter a controller, so I am unable to link the spinner value with the T.Thickness parameter.
How do I link the spinner value with a vray material parameter that is ‘not animatable’ ? I appreciate the fact we don’t need the thickness value to be animatable, but I need it to be animatable to be able to assign a spinner to control its value.
I’m not sure how to do this myself, but maybe you can ask on the Autodesk support forum, I’m sure some of the MaxScript guys there would know the answer.
“link” is a bit of a generic term…
I managed to control any vray material parameter through scripting,and withouth any use of controllers,in a project hopefully to be released sometimes soon…
An example of the code, and issue, would help…
mmmh, i wrote a plugin material, hence extending the original Vray one, and had only to declare aliases to the original vray parameters, as such:
parameters main rollout:params
(
col type:#color default:(color 5 5 5) ui:col
on col set val do delegate.Diffuse = val
)
where col is the name of the new UI colorpicker item, and delegate is a pointer to the underlying vray material.
I am not at all familiar (even if i see what you’re doing) with the way you are linking things, especially as you have to generate them on the fly, and that isn’t what i was doing.
Even if slower, can’t you just add something like on MLister.Matindex[MLister.count].translucency_thickness changed do "update my spinner" ?
I may be a zillion years off the mark, so an answer ain’t needed in ALL cases :lol:
Thanks for the suggestion Lele, I’ll try that out, although I have a suspicion that was what I tried initially only to find that the spinner didn’t like being created without being tied to an animatable parameter… I could be wrong though.