[Bf-committers] Re: [Bf-blender-cvs] CVS commit:
blender/source/blender/python/api2_2x Draw.c Draw.h
blender/source/blender/python/api2_2x/doc Draw.py
Martin Poirier
theeth at yahoo.com
Sun May 21 08:41:36 CEST 2006
--- Ken Hughes <khughes at pacific.edu> wrote:
> Campbell Barton wrote:
> > Hey Martin,
> > theres a realy weired problem with this function.
> >
> > Now this raises an error.
> > Draw.Create(0.0)
> > TypeError: argument 1 must be 3-item sequence, not
> int
> >
> >
> > Its odd because even though theres only 1 floatng
> point the line below
> > is running. - did a printf test.
> > Even stranger is that even if this is below the
> other IF's it gets run...
> >
> > but = newbutton();
> > if ( PyArg_ParseTuple( args, "fff",
> but->val.asvec, but->val.asvec+1,
> > but->val.asvec+2 ) ) {
> > but->type = BVECTOR_TYPE;
> > }
>
> I don't think you can use PyArg_ParseTuple() like
> this (in a series of
> "if" statements, as in Method_Create); whenever it
> fails "it returns
> false and raises the appropriate exception", so even
> if the first one
> fails and the second one succeeds, there's an error
> exception set
> somewhere which you need to get rid of.
Yeah, I had clear error calls before but I removed
them (without testing). When I get back home
tomorrow, I'll fix it.
Martin
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Bf-committers
mailing list