[Bf-committers] [Fwd: Re: Keyblocks and IpoCurves]

Johnny Matthews johnny.matthews at gmail.com
Sat Oct 22 18:10:11 CEST 2005

Here is a little exchange between Ton and I about how shape keys relate 
to IPO curves if you are interested...


The keyblocks are in struct Key, there's the Ipo too. You can enforce a 
creation (or return existing) of ipoCurve with the call

IpoCurve *verify_ipocurve(ID *from, short blocktype, char *actname, char 
*constname, int adrcode)

The four arguments denote the full 'context', so it will go fine in all 
current new methods, this call also creates an Ipo, if not already exists.

In your case, for shapes, the arguments should be

icu= verify_ipocurve(&key->id, ID_KE, NULL, NULL, channel_nr)

key= is the Key pointer
ID_KE = is the type of Ipo (can differ from type of ID, for actions)
channel_nr = is an index to the current shape you want to control. Zero 
is the first channel (unused for relative Shape keys)

I will add Actions for shapes too, in that case you have to make the 
first argument to become the pointer to the Action struct ID, and give 
the call an action channel name.


On 21 Oct, 2005, at 18:39, Johnny Matthews wrote:

> Ton,
> I am working on adding IpoDriver support to the python API and have 
> run into some confusion. It is actually a side issue to drivers, but 
> is related. How are KeyBlocks (for the Shape Keys) associated with a 
> given IpoCurve? Basically if I have a given KeyBlock how do I find the 
> IpoCurve that controls it?
> The main reason behind this is to facilitate this script 
> http://guitargeek.superihost.com/widgetmaker/
> Johnny
> (guitargeek)
Ton Roosendaal  Blender Foundation ton at blender.org http://www.blender.org
-------------- next part --------------
An embedded message was scrubbed...
From: Johnny Matthews <johnnymatthews at bradfordbank.com>
Subject: [Fwd: Re: Keyblocks and IpoCurves]
Date: Sat, 22 Oct 2005 08:17:09 -0500
Size: 5407
Url: http://projects.blender.org/pipermail/bf-committers/attachments/20051022/33caf9c9/KeyblocksandIpoCurves.mht

More information about the Bf-committers mailing list