Commit Graph

176 Commits

Author SHA1 Message Date
Stephen Swaney
a703837179 Replace deprecated methods from old api:
PythonReturnErrorObject
  PythonIncRef

Fix some compiler warnings about missing initializers
in method tables.
2004-06-06 22:42:51 +00:00
Stephen Swaney
7bf6864360 In Object.select() make the selected object the active object.
Update by Campbell Barton to his previous patch.
2004-06-04 07:52:06 +00:00
Stephen Swaney
474ec217ae new Object.select() and Object.isSelected() methods to manipulate the
selection state of Objects.
Contributed by Campbell Barton.
2004-06-02 06:19:56 +00:00
Stephen Swaney
2124168e21 removed unused var in Object.getBoundBox()
bugfix: #1212 changing object's layer had no effect.
2004-05-20 06:26:43 +00:00
1ff3066a9a BPython:
-- Added two new functions to the Draw module, to display int and float popup buttons:
    Both contributed by Campbell Barton, thanks!
-- Fixed a couple warnings.
2004-05-19 01:28:12 +00:00
Stephen Swaney
ae20f7a95e bugfix: #1206 Object.getBoundBox() was returning obdata coordinates.
fix memory leak in vector module.  Memory allocated by vector constructor
was not being freed.
2004-05-15 23:10:37 +00:00
23637ccdd7 - bugfix #998 Object matrix incorrect
- object's matrix is not updated until redraw. pymatrix returned is updated to reflect current variables.
2004-05-15 03:09:27 +00:00
Stephen Swaney
e80a814360 bugfix from bpy mail list:
Object.setEuler() was not accepting old style args of 3 floats.
2004-05-12 08:06:15 +00:00
abe8191d70 BPython:
- fixed two warnings, unused var in Object.c and undeclared function in script.c
- updated Blender.Draw doc, it was missing info about Button object
- refactored pytype initialization to try to fix for once platform (and distro!) specific crashes on startup.  This asked for tiny updates in Effect.[ch] (removed static from declaration, moved definitions to the .c file) and modules.h
- fixed error I made trying to fix scripts w/ no [eol] char in menus.  Thanks Michael Velikanje for reporting the problem!
2004-04-23 13:11:48 +00:00
a6a32cf504 -NLA module added
-ability to set poses for the armatures - allows for keyframing armatures
-adds support for actions/actionchannels
-additional checking for addBone and clear parenting
-moved getActionIpos from object module to NLA module
2004-04-19 06:57:41 +00:00
32b0677d96 - added support for adding/parenting bones to armatures
- fixed getArmatureIpo compiling error
2004-04-04 08:34:43 +00:00
141b7673c9 Python API update. Again by Anders Nilsson.
* Addition to the Object module.
  obj.getActionIpos(). This method will return a dict with all ipo keys.
  Only works when the Object is an armature.
2004-04-03 20:24:46 +00:00
7cc4d7525d Python API fixes. Provided by Anders Nilsson (breakin)
* Typo fixed in IpoCurve_getInterpolation.
  'Bonstant' was used, while 'Constant' is what we want.
* IpoCurve.getName now also returns curve names for action-IPOs.

* Update to the Object module:
  Added obj.getTimeOffset() and obj.setTimeOffset() methods

Anders Nilsson has promissed me to provide some updated Python API docs :)
2004-04-02 18:38:38 +00:00
7e5f2c2457 - fixed a few setattr calls to use tuple parsing
- bug reported by Alfredo de Greef
2004-03-11 12:23:53 +00:00
4d1f58ebd0 - set/get Euler works with the real thing now
- ability to set the object's matrix
2004-03-03 00:45:10 +00:00
8f3a9815ba Mathutils library for the python API
- support for quaternions, euler, vector, matrix operations.
- euler supports unique rotation calculation
- new matrix memory construction and internal functions
- quaternion slerp and diff calculation
- 2d, 3d, 4d vector construction and handling
- full conversion support between types
- update to object/window to reflect to matrix type
- update to types/blender/module to reflect new module
2004-02-29 13:20:34 +00:00
259acf5f66 Python bug fix for #724
* Blender.Object.setDrawMode does not work. I had accidentally switched the
  variables for setDrawMode and setDrawType. This implied that _both_
  functions did not work correctly. The functions getDrawMode and getDrawType
  use the correct variables.
2004-01-25 17:58:24 +00:00
8eac9cef15 Python bug fix for #875
* Blender.Object.GetSelected() would crash when no 3d-view has been
  initialized at startup. Fixed.
2004-01-25 17:42:40 +00:00
5d8c7e4537 BPython:
- local tentative fix for BLI_gethome(), which returns '.blender' appended only
    on some Windows systems.  Created bpymenu_gethome() to check and
    add '.blender' if needed.
- changed name: .Bpymenus to Bpymenus as suggested by GSR
- trivial additions:
    Object module: added methods .set/getSize
    Armature/Bone module: bone.set???() methods now accept both n
    floats or a list of n floats: fff or (fff).  All these additions were requested
    by user Carlos Lopez (Klopes).
- New doc: for module Registry.
2004-01-23 02:59:54 +00:00
f3c5206b71 Scripts menus:
-- added re-eval entry to Scripts Win -> Scripts menu
-- added it also as a button at Info Win -> File Paths, Python path
-- updated bpymenus code:
    added 'Blender' tag, for version;
    made a .Bpymenus file be written only if there's actual data to save
    made file->export menu open a scriptspace only if none is available already
-- bug fixes (bugs 866 and 879, related) for linking and sharing mesh data:
http://projects.blender.org/tracker/?func=detail&atid=125&aid=866&group_id=9
http://projects.blender.org/tracker/?func=detail&atid=125&aid=879&group_id=9
2004-01-16 23:40:14 +00:00
fb6133264a -reimplement OB_Surf support for curves 2004-01-16 01:19:36 +00:00
ec4cccef61 -bug fixes for materials updating - BalaGi found these bugs
- NMesh.c added support for materials updating while converting a python NMesh to a Mesh object
- Object.c added support for materials updating in Link() and shareFrom() when two objects share a mesh linked to a material
2004-01-15 12:55:41 +00:00
4a8f52f619 Converted the Userpreference buttons to zr's new ButBit calls.
Also added USER_*  to each define located in DNA_userdef.h.
2004-01-13 14:50:45 +00:00
6653af7914 support for curve objects.(the code was ready, but commented out)
modified functions : New and Object_shareFrom
2003-12-13 17:15:15 +00:00
e3f6c6cfdc BPython: fixing a few warnings 2003-11-13 17:24:47 +00:00
a4aad039aa The new Lattice module for python
- enabled all the Lattice methods in Object.c
- added Lattice types to Types.c
- add Lattice initialization to Blender.c
- updated makefile for new lattice file
- added Lattice.c/Lattice.h
2003-11-13 04:00:59 +00:00
1018943b3d Fixed some problems with makeParent() 2003-11-11 05:37:28 +00:00
c11eb86112 BPython:
- Fixed uninitialized NMFace.mode var in NMesh.c
- Incref'ed a couple Py_None's in Object.c
- Minor update in the docs, changed required version to 2.30
2003-11-08 02:19:09 +00:00
dd6a83d9c0 Exppython:
- Minor tweaks related to ipos and Added Object_setIpo and Object_clearIpo to Object.c
- Updated docs
2003-10-29 01:37:32 +00:00
966ff6840e added getIpo() function. 2003-10-28 23:23:30 +00:00
d423c0828f Exppython:
- Added "Radio" to Material modes
- Fixed bug in bone.getParent (bug report on blender.org py forum)
- Added more types to object.shareFrom (method to share obdata)
- Added nmesh.get/setMaxSmoothAngle and nmesh.get/setSubDivLevels
- Updated NMesh doc
2003-10-26 06:03:18 +00:00
5f26e16c51 Exppython: fixed crash caused by linking to a scene objects with NULL obdata, caused by recent (2.28c) internal changes to avoid unneded creation of obdata. 2003-10-24 17:08:59 +00:00
e33e4addeb Referenced a wrong variable. Stupid typo. 2003-10-05 11:23:49 +00:00
d626f03962 * Made internals of the Python Object module more consistent with other
modules.
* .setLocation(), .setDeltaLocation() and .setEuler() now can accept 3 floats
  or a list of 3 floats.
  This finally makes the following possible:
    obj.setLocation (obj.getLocation())
    obj.loc = obj.loc
  Of course this applies to the other functions as well.
2003-10-05 11:17:14 +00:00
63e7c3e077 Exppython:
- Object.c: forgot to initialize an object->data pointer to NULL in Object_New
2003-09-23 03:02:54 +00:00
c0303d78b4 Exppython:
- Object: implemented getBoundBox and makeDisplayList methods
- NMesh and Object: small internal changes for nicer behavior
- Draw: added function PupMenu
- Docs: updated for the additions above
Auto build tiny fix: added the imbuf include dir to source/creator/Makefile.am
2003-09-20 03:40:16 +00:00
775f006bf1 Exppython:
- Window: implemented .SetCursorPos, .GetViewMatrix, .GetViewVector
- Lamp: .setDist was not in the methods table:
    Fix by new bpython developer Stephen Swaney
- Scene: .frameSettings was crashing Blender (pointed by jms)
- Added site dirs to sys.path (patch by Stephen Swaney)
- NMesh: small internal change (added pointer to parent object)
- Object: function NMesh_FromPyObject has a new arg: pointer to obj
- Docs: added docs for implemented functions, plus some more info
2003-09-18 00:54:43 +00:00
da773eee18 * Fix bug in Object.getEuler() and Object.setEuler() methods
I must have been looking outside when writing those functions :) They
  accessed the dloc values instead of the loc values. Doh
* Minor cleanup in Object.h
2003-09-17 18:15:51 +00:00
bb824b08b7 function PyArgsParse changed for PyArgsParseTuple by Stephen ( not so that sure...) 2003-09-02 20:13:43 +00:00
b64b5d7b63 * Fix crash when linking something illegal to an Object.
Pointed out and fixed by Stephen Swaney
2003-08-27 18:10:59 +00:00
7163867395 * Fix crash in the getParent() and getTracked() methods of the Python API.
This crash was reported by Jean-Michel Soler (jms).
  Problem was that I was trying to be a little too intelligent. I kept a
  reference to created PyObjects which at some point apparently fails. Keeping
  the object references is not necessary. Now we just create a new PyObject
  when necessary and let Python handle the reference counts.
2003-08-10 10:03:37 +00:00
35c4c3222c * Linking a Mesh object to the base object was not possible. Fixed.
* Clean up of some comments.
2003-07-30 21:02:55 +00:00
8a558f2e45 * Fixed crash in Object.getTracked() method
It tried to create a new Object from the tracked variable, when the variable
  was NULL. Ouch.
2003-07-30 18:47:05 +00:00
916f527253 * Fixed problems in with script linking.
I had to update many files to get this to work.
2003-07-27 15:56:32 +00:00
7b324bef33 bug fixes in functions getLocation and similar.
added buildParts() methods, which forces the computation of the partivcle system.
2003-07-25 19:52:51 +00:00
43f8138974 * Fix an ugly crash when retrieving an object and trying to get the ipo from
it. Ouch, I really need to remove those small parts of duplicate code for
  2.29 - too much maintanance which eventually goes wrong.
2003-07-22 18:42:57 +00:00
68c3a6dccd removed the patch for ipo attr, which had side effects 2003-07-22 13:56:41 +00:00
9a5cf3cb66 modified the function getattr, which crashed blender when someone tried to access a NULL field. This function returns now PyNone. 2003-07-21 21:58:13 +00:00
f999426daa * Object_getInverseMatrix now returns a correct matrix.
The problem was that the memory was allocated at the stack, but after the
  Python object was created, the pointer to the memory goes invalid.

  Thanks to Kester Maddoc for providing a patch - almost 2 weeks ago. Ouch,
  I should read my mail a little bit better.
2003-07-10 20:00:51 +00:00
f83cc2f8c5 anged CurveCreatePyObject to Curce_CreatePyObject 2003-07-10 08:27:34 +00:00