[Closed] script controller not updating
Hello,
I’ve got a script controller attached to my objects that sets the vertex colour based upon a custom (and animatable) attribute. My problem is that updates aren’t in realtime, if I select an object it updates but I’m likely to have hundreds of these objects in my scene at one time.
The controller is as follows :
meshop.setVertcolor $Box56 0 #{1…8} $Box56.baseObject.ImageGrid.Colour
I’m guessing that the ImageGrid custom attribute isn’t read by max unless I have the object selected.
Anyone have any ideas ?
thanks
ben
Create a variable and link it to $Box56.baseObject.ImageGrid.Colour. This should make the script controller dependent on the “Colour” controller, so it would evaluate whenever the colour changes.
On which track did you apply the script controller?
Martijn
Thanks for the suggestion, however it doesn’t work either.
Unless I have an object selected it’s not dynamically updating the vertex colours. Even if I try a render it doesn’t update till I select the individual objects.
I’ve created a seperate custom attribute on each object that holds the script for that object (as I may end up with 1000’s of objects I need them each to hold their own little script that updates their own vertex colours).
Any ideas why this isn’t updating ?
That is because this is not an animatable parameter and the way that you are using the script controller is really not allowed. The controller needs to be on the track that it is controling, not some other track. What it looks like you are doing is trying to set a value some where else. This will not work, at least not well.
Exactly what I’m doing. Which as you say is why it’s probably not updating correctly.
This whole effort is to allow me to animate vertex colours, as I need a method to pass animating colour data from many objects to one shader (I really don’t want a shader per object … and I doubt I could use enough multisubs or the like).
I’d appreciate any ideas you guys may have !?
I’ve just discovered the UVW xform modifier, which seems to allow me animate vertex colours in an almost mystical manner. So I might have arrived a much simpler solution !
Thanks heaps guys for your advice, will post the finished script once I’m done.
cheers
ben