Commit Graph

26 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
f15956356c misc warning fixes and one fix for a big in curve allocation 2007-12-13 15:06:02 +00:00
3d58fc3660 Fix compile warning.
The function newVectorObject is declare in the vector.h.
2007-09-08 00:54:42 +00:00
8aa152df93 =Python Bugfix=
The python wrapper code for shape keys was really bad; whoever wrote it
(mis)read the wrong section of blender's codebase and got the totally wrong
idea.  The code was definitely broken to the point where either it had to be
fixed for 2.45, or else the entire keyblock wrapper would have to be removed
from the stable branch.  The fact that it didn't crash is just sheer luck;
the code assume mesh keys were MVerts, when in fact mesh keys are just
arrays of three-float vectors.

So shapekey data can now be editing directly, and is exposed as Mathutils.Vectors.
Also I updated the epydocs to explain how it all works now.
2007-09-08 00:04:32 +00:00
bfb9603cb4 From stable
Revision: 11237
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11237
Author:   campbellbarton
Date:     2007-07-12 13:05:31 +0200 (Thu, 12 Jul 2007)

Log Message:
-----------
PyObject_IsTrue was missing a check for an error return value in many cases.
2007-07-12 11:51:21 +00:00
0ea4607308 scene.camera was missing from docs
bad bad mistake- key wasnt returning IPO's
2007-05-31 13:48:16 +00:00
deffce3c19 Key.c/h - Removed unneeded functions. and ipo in struct wasnt being used.
Lattice.c - removed warning
Mesh.c - (own error) when running me.update(key="...") didnt update the right keyframe.

mesh_cleanup.py - Bugfix from a report by plumiferos that started uncovering all the memory leaks.
Removing NAN verts didnt work with mesh keyframes.
2007-05-26 12:58:46 +00:00
30dd4fafd1 More memory leaks fixed - in IDProp, Bone.head, tail, matrix, ob.DupObjects (my fault) and in Effect module as well as a few others.
Also stopped using Py_BuildValue for strings, ints and floats.
2007-05-26 04:39:31 +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
Ken Hughes
1e71afc48a Python API
----------
Fix gcc compiler warnings.
2007-03-29 03:47:50 +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
52e43441d1 removed unneeded dealloc functions 2007-03-15 01:47:53 +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
Stephen Swaney
fbfe27761a fix for warning: implicit declaration of function 'id_us_plus'. tsk. 2007-01-16 05:20:39 +00:00
b72bfbd923 replaced id->us++ with id_us_plus(id); so any indirect libdata isnt lost on reload.
added camera.dofDist to the python camera module
2006-12-24 03:25: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
cfdf71bc5c Patches submitted by Michael Reimpell to get/set relative key selection, and
to get the current value of the IPO shape key.  There are still some issues
to discuss as to whether methods/attributes should be used and what they
should be named, but this will (or should) be addressed in the upcoming API
rewrite.
2006-01-17 06:12:53 +00:00
Ken Hughes
427cae9eeb -- Fix bugs caused (by me) by incorrect use of Py_RETURN_NONE macro in
"if" statements.  The macro defined in gen_utils.h expands to two
   statements; putting after an "if" statement without {} means the second
   statement should always be executed.  I'm not sure if just putting
   braces around both statements would cause other compilers to complain.
   But this explains an earlier bug in the Object module which only
   appeared on MacOS/X.
2005-11-28 05:21:25 +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
15707394d1 Adding Key.ipo as access to ipo data both get and set 2005-10-31 15:53:21 +00:00
43ec1ee71a Removed key.getChannelIpo() since it is not proper implementation anymore. 2005-10-31 02:52:14 +00:00
94915fde5f Python API Additions
New
Ipo Drivers access in IpoCurve
key.getChannelIpo(index) returns the ipocurve of a given shape index

Docs included for usage :)
2005-10-26 16:30:50 +00:00
9459f7c1be added getting names of shapes/KeyBlocks to bpy api so mikasaari can continue with his lipsync script (where names of phonemes are as names of shapes/keyblocks). 2005-10-03 14:28:08 +00:00
b6ecdb8c35 Project file update for elbeem
Warning clean up of python project
2005-09-26 14:46:14 +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