[Bf-python] IPO modules changes (on wiki and patch tracker)
Stephen Swaney
sswaney at centurytel.net
Sun Jun 12 16:38:35 CEST 2005
On Sun, Jun 05, 2005 at 01:27:18PM -0700, Ken Hughes wrote:
> Ken Hughes wrote:
>
> I've put more comments on the wiki (should have waited until I thought
> more about this), but just a patch to api2_2/MTex.c will suffice; the
> only way I can think of doing implementing "myMaterial.texture[0].ipo"
> is with a new IPO type (or fake IPO wrapper) "MTex" and would involve
> many more changes than the four new Ipo and Ipocurve methods I'd suggested.
> Of course, since the issue is ease-of-use and intuitive representation
> to the Python users, if an "MTex" IPO type is the way to go I can code
> up a demo.
MTex is just an object ot link Materials and Texturs together.
There is no Ipo associated with it directly.
The way to access the Ipo is
ob.obdata.material.mtex[i].tex.ipo.curves[i]
The more I think about this, the more I think a bottom-up approach
is the wrong direction. Basically, there are two reasons:
1) The structure of the Blender database. Fundamental issue here is
that a texture ipo may be linked to multiple textures, in the same
way a texture may be linked to multiple material channels
2) We already have methods and members that let us access the specific
textures channels of a material along with a specific Texture's Ipo.
They are not fully documented and as you point out, the getIpo()
method is not implemented. ( it should be a convenience for calling
tex.getIpo() ). We do need to add access for some types,
I have more detailed notes and an example .blend I will put up on
the wiki later today.
Saw your page on Ipo vs Curve, btw. Thanks.
--
Stephen Swaney
sswaney at centurytel.net
More information about the Bf-python
mailing list