Page 1 of 1

AdvanceColour

Posted: Wed Feb 23, 2005 3:22 am
by sigmasix
So, my first module is in the online library. Please read the description for more information.

Posted: Thu Feb 24, 2005 2:27 am
by boris
Ok cool,
Just a clarifications about the keyword ctrl_layer_pixelFX_saturationOn

Put the value 0 - > saturation is off
Put the value 1 - > saturation is on

And it's the same for all the keywords which finish by "On"
We will make a documentation soon ...

Posted: Thu Feb 24, 2005 3:14 am
by sigmasix
ok cool, thanks. For the fading option I'm completely lost... It's more triky than I thought... I have to get the actual color and fade to the new color... I don't kno if it's possible with a math function...

Posted: Thu Feb 24, 2005 9:27 am
by yves@garagecube
sigma6 wrote:ok cool, thanks. For the fading option I'm completely lost... It's more triky than I thought... I have to get the actual color and fade to the new color... I don't kno if it's possible with a math function...


Try with a simple linear interpolation like that :

For each color component (red, green and blue):

current = dest + (dest-source)*position

Where:
current is the fading color
dest is the target color
source is the initial color
position is the time position in your fade (it should go from 0.0 to 1.0)

Yves.

Posted: Thu Feb 24, 2005 12:43 pm
by sigmasix
that's the solution I thought but the syntax's not correct... for each is not in the documentation... And I don't really understand the explanation for the "for" statement... :oops:
http://www.python.org/dev/doc/devel/ref/for.html

thanx for the support ;) python seems easy like that but there are so many possisbilities... harder than it seems :?

Posted: Thu Feb 24, 2005 1:01 pm
by yves@garagecube
Check this section of the documentation (tutorial), it is easier :

http://www.python.org/dev/doc/devel/tut ... 0000000000

Typically a "for" is used this way:

for i in range(0,10):
print i

By the way to animate the fade you need the "periodical" script. It is called every Modul8 internal cycle. You can use the "elapsed" passed value to know the amount of elapsed time since the last cycle. We'll try to put together more examples when we'll have more time.

Yves.

Posted: Fri Feb 25, 2005 2:37 pm
by sigmasix
Ok, I tried but the problem is that it works for entire number (1,2,3,4,5,6,7,8,9,0) and not fot the numbers between 0.0 and 1.0...
I think I'll leave the module like thant and I'll try again later, when my skills in python will be... hum... better :P