[Bf-python] Effects module, prop 1, Curve module, updated.

Michel Selten michel.s at home.nl
Sun May 18 22:10:54 CEST 2003


On Sun, 2003-05-18 at 14:41, guignot wrote:
> Hi!
> 
> Here are :
>     the 1st proposal for the Effects Module, and the new Curves Mod, 
> with some minor fixes by Willian and I. (tks, Willian!)

Wow, great work. Since Willian did update cvs with the previous version
of Curve, he can do it this time again :) To be honest, I didn't look at
the changes. Ah, so nice to ask someone else a favour (again?) :)

> The effects mod should be, imho, a submodule of Object. (Effects are 
> attached to Objects). Won't be so that difficult.

True, not a problem at all.

> The Eff mod is long, but it allows user to access ALL (except one...) 
> the properties of an effect (even props the user should not access, for 
> instance the type value. But maybe some crazy hacker will find an 
> utility for it...)
> If you try to read/write a property of an effect, and the effect is not 
> the good type, an error is raised.

Ok, some suggestions/questions:

1. How about providing an argument to the Effect.New function? That
   creates a new instance of an effect of the type provided as the
   argument?
2. The Effect_setType does not check for values out of range.
   The types 0, 1 and 2 are only allowed, but no checking is done for 
   that. Maybe some other functions need to have the value checks too.
3. Please implement the EffectGetAttr and EffectSetAttr.
   Not all of the variables should be accessed through here, but at 
   least the most obvious ones.

> P.S. No, I didn't write all the code for this module. Used a quick and 
> dirty home made code generator.  ;-)

I guessed as much by looking at the code :)

> PPS A quick way for testing these mods without making changes to the 
> source tree is simply to #include"Mod.c"  in Blender.c and recompile.

Yes, you can test compilation that way, but you can't test execution of
the module. For that you'll need to update some more files though.

Can you write down the api of this module on a user level? I mean, what
are inputs for each function/method, what are the exceptions given to
the user? This is very important information for the user. Also, it's a
good document for us to give comment on an API level, in stead of
looking through the code searching for the accepted inputs of each
function. You can take a look at the 2.25 documentation on blender.org.

Anyway, this is a great start! Keep up the good work!

With regards,
	Michel





More information about the Bf-python mailing list