[Bf-python] Initialization of data and python vars.

Willian Padovani Germano wgermano at ig.com.br
Wed Aug 11 08:32:33 CEST 2004


Campbell Barton wrote:

> I like the first option better since oops data is very simple. oopsloc 
> / oopssel (.sel)
> there is also no need for a getOops() as far as I can see.
> This is available for all datatypes that are viewed in the oops window 
> - Scene, Material
>
Hi, then a check is needed, we should not allow potential crashes.  If 
you add an init function, you can return an error if the space was not 
initialized.  But what you were doing with checks is better, no need for 
an init, if there are few new vars.  Look at Radio.c, you can add a 
simple one-liner check to each function and write check/init in another 
single function that performs the check.

-- 
Willian




More information about the Bf-python mailing list