
HSV Scriptable?
Moderators: Víctor Paredes, Belgarath, slowtiger
HSV Scriptable?
Not sure if I asked this before, don't remember the answer if I did.
Can anyt scripting guru tell me if the HSV modifier feature can be accessed through scripting? For example can you use script to animate the HSV image? Right now it is static only.

[url=http://burtabreu.animationblogspot.com:2gityfdw]My AnimationBlogSpot[/url:2gityfdw]
There are two member functions to the layer object available:
I haven't tested this script, but it should work, based on the documentation. It removes the HSV image when in frame zero, between frames 1 and 9, inclusive, it uses the HSV image called "first.jpg", after frame 9, it uses the HSV image called "second.jpg".
So, in principle, you can write a layer script to change the HSV image based on the frame number.string HsvImage()
Returns a file path to the layer's HSV modifier image.
Return value (string): file path
void SetHsvImage()
Sets the file path to the layer's HSV modifier image.
Return value: none
path (string): file path
Code: Select all
function LayerScript()
local layer = moho.layer -- the current layer
local frame = moho.frame -- the current frame number
local image = {}
image[1] = "first.jpg"
image[2] = "second.jpg"
if (frame == 0) then
layer:SetHsvImage("")
else
if (frame > 0 and frame < 10) then
layer:SetHsvImage(image[1])
else
layer:SetHsvImage(image[2])
end
end
end
Hey -thanks! When I get some play time I'll see if I can still use the other half of my brain.
I always liked that HSV image modifier. It's cool that , unlike layer blend modes, any layer, in any position in the hiearchy, can share the same image.

[url=http://burtabreu.animationblogspot.com:2gityfdw]My AnimationBlogSpot[/url:2gityfdw]
I know. I wasn't aware of this method of enhancing your imagery, which seems to be a kind of black magic. I know that you've posted about this in the past (see here), and I'm curious how you use the HSV layer feature to enhance your own imagery. Can't wait until you post an example of dynamic HSV animations.
I'm eager myself. Going to try to sneak some time away from work, internships and everything else Sunday night.
I think there is some hidden potential with this, perhaps to fake some global lighting and shadows. I also have a half baked idea it may be suitable for faking some reflections and some other effects.
Thanks so much for doing this. I may be picking your brain this weekend some more.

Thanks so much for doing this. I may be picking your brain this weekend some more.

[url=http://burtabreu.animationblogspot.com:2gityfdw]My AnimationBlogSpot[/url:2gityfdw]