Commit Graph

22 Commits

Author SHA1 Message Date
Ken Hughes
c35e8426fe ===Python API===
Additions to BezTriple API: complete get/set access to all BezTriple settings
(knot and handles points, handle types, tilt/alfa, hide, weight and selection
status).
2006-03-10 21:39:14 +00:00
Ken Hughes
4f916b3081 Removed printfs in setPoints(), add proper exception handling. 2006-01-15 17:14:58 +00:00
5233f73589 *warnings fixes
- fixes a number of warnings in bpy project
2006-01-03 16:27:34 +00:00
Ken Hughes
5029a4444a Bug fix #3671: Blender.Beztriple.New() did not accept sequences as parameters,
even though its error messages suggested it did.  Thanks to Yann for the
patch (I also added the ability to accept parameters without requiring
them to be in a tuple).  Also documented the New() function.
2006-01-01 15:50:53 +00:00
Ken Hughes
f73f226ed7 -- Bugfix #3617; addBezier() was not initializing all the attributes for
a the beztriple, so things like the hidden and handle select states were
   set to random values.  Added a beztriple.hide attribute so that the
   hide attribute can be set/cleared from the BPy API.
2005-12-17 04:57:48 +00:00
Ken Hughes
b2e32f5bd1 -- Bugfix #3458: keyblock.getData() was getting vertex data from keys
incorrectly, including wrapping curve data as BezTriples.  Needed to
   make a change to beztriple module so we could more easily create a
   "thick" BezTriple object similar to Blender.BezTriple.New().

   The change to BezTriple.h pointed out some dead code in the Ipocurve
   module that could be removed.
2005-11-28 05:03:26 +00:00
8b7c690a0b - assorted warning fixes (signedness, float->double)
- added decimate,boolean modifier copydata methods
2005-09-24 16:02:56 +00:00
2cb24cefb2 =bpy beztriple: finally got the mem. management right with the help of khughes. 2005-09-14 13:59:43 +00:00
290ae52d81 Memory management flag to behave better, as hinted by Ken Hughes.
Still not good, i.e. getting these when quitting: Error Totblock: 4
new bpytriple len: 60 0x8889bdc ... 'cause nothing frees them..

Changed the loop that parsed input args to PyArg_ParseTuple to have
support for passing ints from Python too as the floats that are the
coordinates. Didn't find PyInt_AsFloat and figured that this is an ok
way anyhow.

Changed the default handle mode from AUTO to ALIGN, which is the same
as in UI and more useful at least for me.

Little sanifying in CurNurb (this was done with Ton).
2005-09-14 10:53:51 +00:00
c192b80b17 Big commit, had to rework lots of selection stuff so that things
worked properly with modifiers. Needs more testing I am sure.
No, honestly, I wasn't just cleaning for the hell of it, it
was *necessary* (I would never do such a thing). Selection should
work completely with cage options of modifiers now.

 - added DerivedMesh foreach functions to iterate over mapped
   verts/edges/face centers. These replaced some of the drawing
   functions and are more general anyway. Special edge drawing
   functions remain for performance reasons.
 - removed EditFace xs, ys fields
 - added general functions to iterate over screen coordinates of
   mesh/curve/lattice objects
 - removed all calc_*verts* functions that were used for storing
   screen coordinates in objects. they were recalc'd on the fly
   for most situations anyway, so now we just always do that.
   calc_*verts_ext was one of those calls that did dirty things
   deep down in the callstack (changing curarea and poking at
   matrices)
 - rewrote all vertex level selection routines (circle, lasso, bbox)
   and closest vertex routines (rightmouse select) to use the new
   system. This cleaned up the selection code a lot and the structure
   of selection is much easier to see now. This is good for future
   work on allowing modifiers to completely override the selection
   system. It also points out some discrepancies in the way selection
   is handled that might be nice to resolve (mesh vertex selection has
   fancy stuff to try to help with selecting overlapping, but it only
   works w/o bbuf select, and curves/lattices don't have at all).
 - had to remove ton's code to move Manipulator to cage location, this
   is not reliable (can come up with a different method if requested)
 - as it happens BezTriple.s and BPoint.s are basically available to
   be removed, just need to rewrite editipo code that still does
   background calc of screen coordinates
 - MVert.{xs,ys} are still around because they are abused in some places
   for other info (not sure if this is safe actually, since they are
   short's and the mvert limit went up).

And did I mention this commit is comes out to -305 lines? Well it does.
2005-08-09 08:12:36 +00:00
e60291d39c Header file clean up and warning fixes
- Mostly this cleans up the #includes and header files in the python project.
- Warning fixes are mostly casting issues and misc fixes. General warning clean up.
- #include Python.h MUST come as the first include to avoid the POSIX redefine warning in the unix makefiles
- fno-strict-aliasing flag added to makefile to fix a unavoidable type punning warning in types.c
2005-07-18 03:50:37 +00:00
Stephen Swaney
769fa6252d Patch from Martin Poirier.
Misc bpy Curve fixes and updates, includes bugs #1687 and #2637
2005-06-13 19:15:02 +00:00
Stephen Swaney
0fdc0ce297 Another step in the Big Bpy Cleanup.
- move static declarations and data definitions out of headers.
  the BGL module still need cleaning.

- move declarations out of modules.h and into appropriate .h files.
  modules.h still exists as a container for the few modules that
  need to #include almost everything.

- all files now have a $Id tag and have been formatted by indent

there are no changes to executable code.

pre-commit versions are tagged with bpy-cleanup-pre-20041007
for the sake of paranoia.
2004-10-07 19:25:40 +00:00
Stephen Swaney
a509b8adc9 Another round in the Great BPy Cleanup:
Run everything thru indent to cleanup spaces vs tabs.
Clean up some of the comments by hand.
BGL.c was not touched due to all that macro wackyness.

There are no functional changes to the code.
Pre-indent versions of source are tagged with
tag bpy-cleanup-20040925 , just in case.
2004-09-25 20:30:40 +00:00
Stephen Swaney
9cabf31ebc fix for bug #1115
This was a problem with the BezTriple type.
Write access to BezTriple via 'pt' member did not work.

Preferred method to access BPy type members, especially for
write access, is via get*/set* methods.

BezTriple.setPoints() will accept x,y coordinates as either
a tuple or a list.

Updated BezTriple section of Ipo module doc.
2004-04-07 22:42:02 +00:00
Stephen Swaney
c1e33eb1e7 fix for bug 1110.
Updated epydoc.  Function name is BezTriple.getTriple().
Set prototype to NOARGS in source.
2004-04-06 21:13:12 +00:00
Stephen Swaney
f3feb77918 General housekeeping and cleanup. Move static declarations and
data definitions from .h files into corresponding .c files.
Blame zr for this since he's the one who pointed out that our
bpy headers were a mish-mash of stuff that belonged in the .c files!

In a nutshell, the headers should contain the declarations necessary
to use a module or class.  The implementation files ( .c in this case )
should contain statements that allocate storage ( definitions in
the C sense ) and executable code.

When used at file scope, the keyword 'static' means "don't tell
anyone else about this".  Since headers describe a public
interface, static declarations and definitions belong in the
implementation files.

The net result of all this is that after stuff has moved out
into the .c files, the .h files are empty or mostly empty.
I didn't delete them since there seem to be some public
declarations and because I did not want to cause too much
disruption at one time. Time enough for that later!
2004-03-29 08:16:18 +00:00
d24761807d changed a return value for Irix compiler 2003-08-07 13:20:25 +00:00
05187adc2f removed unuseful function calls in BezTriple.[ch]
general cleaning of Ipocurve.c Ipocurve.h Ipo.h Ipo.c
updated doc
2003-08-05 10:19:28 +00:00
ee5461b06a reincorporation in the cvs of modifications which had been lost. 2003-07-21 00:08:30 +00:00
Chris Want
85f961bdb4 Some manipulations of the keyword 'static' to get
blender to compile
2003-07-20 23:06:59 +00:00
d51107b804 Nex modules added to keep a minimal compatibility with 227 api 2003-07-19 08:29:55 +00:00