[Bf-python] loose ends in Curve

Gilbert, Joseph jgilbert at tigr.ORG
Tue Oct 11 19:17:47 CEST 2005


Window (or blender area) redraws are used sparingly in the api as they
can be unnecessary. Originally I went hog wild adding window redraws but
I remember willian explaining to me that in a script some of these
'forced redraws' are not necessary and in some cases may slow down the
script with unneeded redraws. Example:
Mesh.addThingy(myThing) internally forces a redraw. You then have a
script that does
For x in range(1000000):
...myMesh.addThingy(x)
Which forces a million redraws of the 3dview area. (if you call
allqueue() it forces a million redraws of every open window) The idea
was to have the Window.Redraw() method to allow script users the
flexibility to redraw on their own:
For x in range(1000000):
...myMesh.addThingy(x)
Window.Redraw()
I guess it depends on how your code will be used and wether or not
forced redrawing is acceptable or if it is better that you put a
@warning in the docs that they need to redraw.
(that's my take on it at least) :)

-----Original Message-----
From: bf-python-bounces at projects.blender.org
[mailto:bf-python-bounces at projects.blender.org] On Behalf Of
antont at kyperjokki.fi
Sent: Tuesday, October 11, 2005 11:47 AM
To: Blender Foundation Python list
Subject: Re: [Bf-python] loose ends in Curve

On Tuesday 11 October 2005 07:16, Ken Hughes wrote:
> > - way to set a curve to 3d. trivial i hope..
> bit 0 of curve.setFlag()?

ah forgot about that, thanks, works.

> button; in do_curvebuts() this causes the resolu value to be copied to
> each nurb.  I can commit about a three-line patch to do it (have it
> working here), but your script also needs to do a curve.update() and
> Window.RedrawAll(), or else include an EXPP_allqueue call in
setResolu().

please commit - i guess that's a fix so can do during the freeze .. at
least 
then there'll be a way for this to work!

> (BTW, what's the consensus on using EXPP_allqueue(); is that standard

dunno (what it is, even).

> > unlink_object (ob=0x894690c) at
> >             if(cu->bevobj==ob) {
> The code immediately before this line is "cu= obt->data;" so looks
like
> the object has no data?

oh i thought it might be that cu->bevob, but did not have an idea why.
how 
come does it end up with no data? i'm doing ob.link(curveob) and 
scene.link(ob) after every succesful creation.

> Ken

~Toni
_______________________________________________
Bf-python mailing list
Bf-python at projects.blender.org
http://projects.blender.org/mailman/listinfo/bf-python



More information about the Bf-python mailing list