View Full Version : i need help about ccCrurve
thorsten hartmann 09-19-2009, 08:40 PM Hey Guys,
i have a ccCurve with only two Point Start + End. I want only copy as a integer the Y-Value when the X-Value is for example is 0.325. My Range for x is 0 - 1. I'm too stupid. Can every body help me.
mfg
hot chip
|
|
denisT
09-19-2009, 08:50 PM
Hey Guys,
i have a ccCurve with only two Point Start + End. I want only copy as a integer the Y-Value when the X-Value is for example is 0.325. My Range for x is 0 - 1. I'm too stupid. Can every body help me.
mfg
hot chip
from MXS help
getValue ccCurve <time_value> <float_x> [lookup:<false>]
Returns a Point2 value corresponding to the specified X position along the curve at the specified time.
getValue ccCurve 0f 0.325
thorsten hartmann
09-19-2009, 09:10 PM
ah thank you very much.
thorsten hartmann
09-19-2009, 10:12 PM
Oh Sorry, it will not work,
the error message is: not "getValue" function for #(ccCurve : Reflection Curve)
my code:
.....
global Glossy_Reflection_Curve
...
...
CurveControl cc_ReflSamples ......
...
Glossy_Reflection_Curve = cc_ReflSamples.curves
...
...
... here come the error
zwerg_gloss_RefSamples = getValue Glossy_Reflection_Curve 0f mtl.refl_gloss
mfg
hot chip
denisT
09-19-2009, 10:31 PM
Oh Sorry, it will not work,
the error message is: not "getValue" function for #(ccCurve : Reflection Curve)
my code:
.....
global Glossy_Reflection_Curve
...
...
CurveControl cc_ReflSamples ......
...
Glossy_Reflection_Curve = cc_ReflSamples.curves
...
...
... here come the error
zwerg_gloss_RefSamples = getValue Glossy_Reflection_Curve 0f mtl.refl_gloss
mfg
hot chip
in your code Glossy_Reflection_Curve is an array of cc curves...
you have to call
zwerg_gloss_RefSamples = getValue Glossy_Reflection_Curve[curve_id] 0f mtl.refl_gloss
thorsten hartmann
09-20-2009, 12:29 AM
super that works now,
ähm little last problem ( i can run in the wall)
..
..
spinner ReflSamples pos:[128,498] width:40 height:16 range:[0,512,16] type:#integer
on ReflSamples changed val do ( max_glossy_Reflection_Samples = value )
..
..
max_Refl_Samples = max_glossy_Reflection_Samples
..
zwerg_gloss_ReflSamples = (getValue Glossy_Reflection_Curve[1] 0f mtl.refl_gloss)
..
.. here come the error: Incompatible types: 0.210001, and SpinnerControl:ReflSamples
zwerg_gloss_ReflSamples= zwerg_gloss_ReflSamples * max_Refl_Samples
thank so much at your help.:D
denisT
09-20-2009, 05:14 PM
super that works now,
ähm little last problem ( i can run in the wall)
..
..
spinner ReflSamples pos:[128,498] width:40 height:16 range:[0,512,16] type:#integer
on ReflSamples changed val do ( max_glossy_Reflection_Samples = value )
..
..
max_Refl_Samples = max_glossy_Reflection_Samples
..
zwerg_gloss_ReflSamples = (getValue Glossy_Reflection_Curve[1] 0f mtl.refl_gloss)
..
.. here come the error: Incompatible types: 0.210001, and SpinnerControl:ReflSamples
zwerg_gloss_ReflSamples= zwerg_gloss_ReflSamples * max_Refl_Samples
thank so much at your help.:D
1)
spinner ReflSamples pos:[128,498] width:40 height:16 range:[0,512,16] type:#integer
on ReflSamples changed val do ( max_glossy_Reflection_Samples = val ) -- not value!
2)
zwerg_gloss_ReflSamples = (getValue Glossy_Reflection_Curve[1] 0f mtl.refl_gloss)
-- it's a point2
3)
zwerg_gloss_ReflSamples.value = (zwerg_gloss_ReflSamples * max_Refl_Samples).y
thorsten hartmann
09-20-2009, 09:34 PM
thank you so much!
cheers
hot chip
CGTalk Moderation
09-20-2009, 09:34 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.