Commit Graph

74 Commits

Author SHA1 Message Date
5dfef1ae35 Reverting to 2_2x BPY
I was careful in selectively rolling back revisions, but if you've committed changes unrelated to BPY mixed with BPY changes, I might have reverted those too, so please double check.
2007-12-17 20:21:06 +00:00
1e32ec2000 minor update, "Draw Handles" wasnt working when disabled everywhere and replaced some magic numbers 2007-12-01 23:25:00 +00:00
b21df550d3 ==Python API==
made it possible to remove curves from python with "del curve[i]"
mesh_edges2curves.py - remove unused function.
2007-11-22 22:07:41 +00:00
Ken Hughes
072c926aab Update Python API to change to curve 'extrude' limit from 5 to 100. 2007-09-03 16:56:09 +00:00
b38e987932 armature weakref fix from stable, Curve.c removed unneeded cruft 2007-08-01 12:57:59 +00:00
a164d91d42 missing include and added a warning to UIBlock 2007-07-27 09:30:54 +00:00
670cf8c5a9 fix from 2.44 for adding new curves. 2007-07-26 14:32:32 +00:00
c924fc542b fix for Curve appendNurb 2007-07-21 03:54:20 +00:00
Ken Hughes
0f692d999a Python API
----------
Remove unused variable declaration which caused gcc warnings.
2007-07-13 14:38:44 +00:00
e192e7e024 remove unneeded checks from the python API 2007-06-29 08:59:26 +00:00
bcc3143119 more memory leak fixes, though only a few are likely to happen 2007-05-27 21:33:48 +00:00
f231bd0d57 Many long standing memory leaks fixed in the BPY api.
Data from Armature.c and logic.c still leaks.

Mostly todo with PyList_Append adding a refcount and the bpython api not decrefing.

Also added some features needed to fix a bug in mesh_clean.py (ob.pinShape and ob.activeShape)
2007-05-25 16:43:25 +00:00
c97be098f7 Python API
made all libdata hashable - use the object type,name and lib for the hash.
added .tag to libdata so we can test if data's been processed without using dictionaries
added libdataseq.tag (write only) setting the tag flag (which can always be dirty)
2007-03-26 02:10:24 +00:00
Ken Hughes
83e72cc813 Fix various gcc warning, unused variables and incorrect type passed to
*printf functions.
2007-03-17 14:46:04 +00:00
52e43441d1 removed unneeded dealloc functions 2007-03-15 01:47:53 +00:00
ee5dc4d0bf removed duplicate functionality, macro's and functions existed to check a PyObjects type, now only use macro's 2007-03-15 01:09:14 +00:00
5c5a80f644 made all python types that can do .__copy__(), also do .copy()
added copy function to lamp, texture and ipo types
2007-03-14 03:01:24 +00:00
e0c77c0f14 made all data adding functions accept a name such as add_mesh or add_curve, previously only some datatypes adding functions accepted a name.
also updated the Bpy.py epydocs
2007-03-11 16:25:17 +00:00
1135434ed1 moved python functions that deal with blender libdata into gen_library.c from gen_utils and BPY_interface
small cleanup, removed unused functions and explicetly cast pointers..
2007-03-11 04:05:45 +00:00
5eaf9f90c1 BPython API
added a function - GenericLib_assignData for assigning blender data, to assign an ipo to a camera or world to a scene for instance.
Using this function removed ~300 lines of code.
also fixes user count error in some places that didnt check.

also made it possible to clear the colorband by setting it to []
2007-03-08 14:37:34 +00:00
Ken Hughes
67e1188eb7 Python API
----------
Forgot to put sentinel at end of Curve_getseters, probably the cause of
crashes on OSX (thanks Stephen!).  Also add doc strings for attributes, add
missing "taperob" attribute to python docs.
2007-03-06 16:50:58 +00:00
Ken Hughes
5dfd59239b Python API
----------
Conversion of Curve module to tp_getseters.
2007-03-05 03:44:48 +00:00
8e306366ef own error, missing braces. 2007-03-01 15:40:13 +00:00
086d51c822 BPython API
* Added data.lib attributes to almost all data types, (except for Text3d and NLA)
  This is None or the path of the library as a string.
* Main was giving a warning, Include Curve.h rather then CurNurb.h
* Added Library.LinkedLibs(), returns a list of externaly linked libs.
2007-02-23 14:51:20 +00:00
Stephen Swaney
d917157f59 bugfix: #5581 Joining python created curves crashes Blender
Curve_appendNurb() was incorrectly appending Nurb to Curve
rather than using BLI_addtail().
2007-01-16 04:08:12 +00:00
Ken Hughes
20a656db1d Python API
----------
Perform better param checking on Curve bevel and taper objects so that an
curve can't use its own object.  Also stick a big warning in the docs for
Curve.setTotcol(), which seems to be an extremely dangerous method.
2006-12-27 05:30:32 +00:00
9afe662c12 renameing datablocks was imposing a name limit on the python side.
This isnt needed because the limit is alredy being set by rename_id()
some other minor changed- use None returning maro
2006-12-27 05:04:20 +00:00
Ken Hughes
576c5b85b6 Python API
----------
Add .materials attribute to BPy Curve API.  Also clean up Mesh.materials
documentation.
2006-12-25 21:15:53 +00:00
Ken Hughes
d66f828c9b Python API
----------
Bugfix #5492: correctly distinguish curves and surfaces in Curve iterator.
2006-12-23 15:30:50 +00:00
Ken Hughes
940e625702 Python API
----------
Bugfix #5447: bug in determining whether a Curve was a CurNurb or SurfNurb.
2006-12-17 05:55:56 +00:00
Ken Hughes
2e133599da Python API:
Bugfix #5075: make curve.update() recalculate bezier curve handles.  This
would/should be called after changing the handles of a BezTriple.
2006-11-13 21:14:48 +00:00
b3a48fe82e removed some unused vars from Curve and matrix
scn.objects.new(None) - adds a new empty
 - new objects are selected by default now

further stripped down the vector struct, the wrapped state was being stored and 2 places.
2006-10-07 11:49:53 +00:00
dda63a9dde added comparison function to many python types so you can do == and =! 2006-10-06 16:48:28 +00:00
Ken Hughes
81d7cd967d ===Python API===
New API for accessing surface data (SurbNurb type).  Right now it's hooked in
through the Curve API, since Curve.Get() doesn't differentiate between curves
and surfaces.  If the curve object is 2D (pntsv > 1), the SurfNurb object is
created.

It is similar to the CurNurb type but not identical.  There are only
attributes and no methods yet, and the only methods which will be added are
the non-getStuff/setStuff kind.  Read the documentation to see how it works
(sorry, no examples yet).

This is a work in progress.  Don't be surprised if the API changes some more.
2006-08-28 04:44:16 +00:00
8e7095a464 Added __copy__ to armature, material, curve, group 2006-08-15 11:24:08 +00:00
Stephen Swaney
342bb99a19 a little spring cleaning to remove some compiler warnings for
implicit declarations, redundant redeclarations, missing initializers,
nested externs and other cruft.

Cleaned up includes and moved extern _Type decls from Types.h into
Types.c since that is the only place where they are needed now.

Did not touch Ipo.[ch] since work is on-going there.
2006-04-16 15:28:50 +00:00
Ken Hughes
0ae3fe59a3 -- Partial bugfix for #3186. curve.getControlPoint() wasn't DECREF-ing
values added to a list, causing a memory leak.
2005-11-29 01:35:45 +00:00
Ken Hughes
3035625992 - force setResolu() to update all NURBS belonging to a curve 2005-10-11 15:51:27 +00:00
Stephen Swaney
c4b8a431bc fix Curve.update() method to use new DAG features. 2005-09-29 07:05:00 +00:00
Stephen Swaney
24ee7278b9 patch #3011 ] update to curnurb.setFlagU doc, added set and get for Taper
Contributed by Toni Alatalo (antont).

Support for Taper Objects for Curves.
Code for curnurb.setFlagU() method not changed as per discussion on
bf-python mail list.
2005-09-12 06:07:19 +00:00
039a8c95f3 BPython:
- Pontus Lidman contributed a new module: Blender.Key + access to key objects from NMesh, Lattice and Curve + docs (thanks and sorry for taking so long to check/commit the patch!)

- Allowing EVENT spacehandlers to call the file selector (scriptlinks in general are not allowed, but this special case should be able to). Requested by Paolo Colombo (thanks!)

- tiny doc update (Ken Hughes pointed an error in the space handlers example)

I didn't have time to update the Key module to follow the current bpython design, will do that later and also test it better than I did.
2005-09-09 01:31:10 +00:00
5afdfc6ac1 - remove some silly array copying code for nurb displist generation
- converted dl->flag to use consistent defines for cyclic U/V
2005-08-11 22:27:53 +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
3929802335 - switch several instances of makeDispList to use more specific version 2005-07-14 18:14:19 +00:00
befc2bbc41 - split makeDispList into makeDispList{Mesh,MBall,CurveTypes}, there is
still a makeDispList that dispatches to the appropriate one.
   makeDispList is on the way out and this makes it easier to track down
   exactly which places use makedispList and for what types of objects.
 - switch calls to makeDispList to appropriate more specific function (if
   the object type is known by caller).
 - added mesh_changed function that invalidates cached mesh data (but does
   not rebuild, mesh data gets rebuilt on access). Most old calls to
   makeDispListMesh use this instead now.
2005-07-14 15:48:01 +00:00
5f5844b95e Some of the setattr functions created a tuple to pass to the set* functions and didn't decref'ed it properly, "leaking" memory.
Commit approved by stivs.
2005-06-17 05:10:14 +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
55cf304e99 bugfix: #2254 Curve.appendPoint() gives segfault in PySequence_Check().
Argument tuple not built correctly for CurNurb_appendPointToNurb().
2005-05-12 05:45:13 +00:00
Stephen Swaney
127abda43d New methods for Curve module: getBevOb() and setBevOb()
Adds ability to set, clear and get bevel object for a Curve.
Contributed by Gergely Erdelyi (dyce).
Thanks!
2005-04-17 13:48:16 +00:00
cbbe236f92 - patch submitted by guitargeek
-includes:
*Text3d accessors - ablity to manipulate FONT objects through python
*update to Object.link - calls text_to_curve upon ob_font link for drawing
*update to constant.h - constant type checking define
*update to curve.c - clamp values on getters/setters
*clean up of Text3d module
2005-03-19 03:24:00 +00:00