On Jul 15, 2010, at 2:33 AM, Joshua Leung wrote
> On Thu, Jul 15, 2010 at 7:46 AM, David <[email protected]> wrote:
>> Hi all,
>>
>> After playing around with the curve modifiers, I wanted to request a
>> feature: a f-curve modifier that evaluates another f-curve to
>> determine its function, but this seems so obvious that I must be
>> missing something. It could be hard to implement, or, is it already
>> possible to do this differently (I would expect it to be somehow
>> doable with the python modifier)?
>>
>>
> Hi,
>
> Could you explain why you want such functionality? What is it that you're
> trying to achieve, and why are any existing methods not adequate to do so?
Sure, in my (rather technical) use case I want to animate a camshaft that
triggers
a couple of valves. I have the amplitude that the valves travel given as a
function
of the rotation of the camshaft (360 values). My idea was to put this data in
some
f-curve on an empty, and give each valve a driver that takes the rotation of the
camshaft as a variable and has a modifier that would look up the correct
amplitude
in the empty's f-curve. This would allow me to easily animate the rotation of
the
camshaft and have all the valves automatically behave correctly. Also, I felt
this
would be a very natural approach to the problem.
> I just want to verify that this is something that is really necessary, and
> not just something that would be "nice to have" for bragging rights, etc. :)
I have to say it is not strictly necessary, because I managed to get my desired
effect almost as described, but instead of using a modifier, the lookup is
simply
done in a "scripted expression" that looks like this:
bpy.data.actions.get('cold_valve').fcurves[0].evaluate(degrees(var)%360)
(where 'var' is the rotation of the camshaft)
Obviously this is not as nice as a separate modifier, but I would already be
very
satisfied if there was an easier way to get to the f-curve in the python script
(maybe there is and I don't know it yet?).
till then, David.
_______________________________________________
Bf-committers mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-committers