[Bf-python] Bug in CurNurb.setFlagU() and setFlagV()

Stephen Swaney sswaney at centurytel.net
Thu Sep 8 20:06:08 CEST 2005


On Thu, Sep 08, 2005 at 10:05:08AM -0700, Ken Hughes wrote:
> I caught the tail end of a conversation on IRC between stivs and antont 
> this morning about setFlagU() making curves cyclic when it shouldn't. 
> We looked at the code and found that setFlagU() and setFlagV() are 
> setting the wrong bits:
> 
> flagu and flagv:
>    bit 0:	CU_CYCLIC
>    bits 2-1:	uniform=00, endpoint=01, bezier=10
> 
> See do_curvebuts() in source/blender/src/buttons_editing.c for the code 
> handing the UI buttons for the three curve types.
> 
> So should the BPy documentation be corrected or should the functions be 
> fixed (and setCyclicU() / setCyclicV() be added)?  I can upload a patch 
> to the bug tracker, just need to know which way we should proceed.

We are definitely stepping on the cyclic flag here.

IMHO, best way is to leave doc as-is and fix code.  Also add the
setCyclic() method.

Probably don't need the set*V() methods for curves since they only
go in the U direction.  Blender uses the same Nurb struct for Curves
and Surfaces.  Last time we discussed this, result was to
maintain the distinction between Curves and Surfaces in the BPy 
API also.  Hence, the CurNurb class.

-- 
Stephen Swaney			
sswaney at centurytel.net




More information about the Bf-python mailing list