Commit Graph

25 Commits

Author SHA1 Message Date
Ken Hughes
1e8033f45c ===Python API===
Patch from jms: adds attributes effect.disp and effect.staticStep.
2006-08-17 21:39:49 +00:00
Ken Hughes
a01a0e6256 ===Python API===
Fix compiler warnings in Sound.c and Effect.c.
2006-08-14 16:29:11 +00:00
49e778ed7f Commiting JMS's patch for particles with modifications. 2006-08-09 01:37:17 +00:00
Ken Hughes
22188fba21 -- previous commit was decrefing a borrowed reference; thanks Ascotan for
tracking this down!
2005-11-30 20:18:54 +00:00
Ken Hughes
b7a4a6c837 -- Bugfix #3186: Fix memory leaks caused by multiple calls to
PyDict_SetItemString() with objects that were not properly decrefed
   afterwards.  Due to the number of places this was used, I added a
   wrapper EXPP_dict_set_item_str() to gen_utils.c to handle it.

   This started as a scriptlink bug, due to how many times scripts were
   being executed I think it just magnified how bad the memory leak in
   BPy was.  Animating the blend attached with this bug report would cause
   memory to grow by about 3MB for every 280 frames.  After the patch,
   memory did not appear to grow at all (or at least not noticably using
   Unix's ps and top utils).

   Since many of the PyDict_SetItemString() calls were in initialization
   modules I think my tests executed most of the changed code, but would
   appreciate script users really giving feedback.
2005-11-30 08:18:06 +00:00
65ce2c2cee * warnings fixes 2005-11-29 05:08:29 +00:00
Ken Hughes
d040d2012c -- removed GetParticlesLoc() function, which was replaced by
getParticlesLoc() method
2005-11-20 15:12:06 +00:00
Ken Hughes
555a3d02c7 -- fix bug which used unitialized pointer in M_Effect_New. 2005-11-19 15:06:20 +00:00
Ken Hughes
43ac5834b6 -- add support for new particle effects 2005-11-17 19:19:05 +00:00
cce655b5e7 - warning fixes
* various warnings the python api is putting out
2005-11-07 19:34:44 +00:00
Ken Hughes
979c28bf06 -- Clean-up of Effect and Particle modules; since particle was the only
remaining effect type, it didn't make much sense to leave things
   implemented in two separate files.  Changes include:
   * two bug fixes (the getChild() and getMat() methods were using floats
   instead of shorts)
   * performing clamping on input values
   * implementing attributes using tp_getset
   * merging Effect and Particle functions: the Particle module exists in
   name only, with the Particle.New() and Particle.Get() functions
   remaining for backward compatibility (they are in fact identical to
   Effect.New() and Effect.Get() functions)
   * update of doc/Effect.py (including remove all old references to wave
   and build effects)
2005-11-07 00:22:05 +00:00
Ken Hughes
a602dcfe5f - JMS's patch which adds GetParticlesLoc() method. I've modified the code
so that it resides in the Effects module instead, with the intent of
  soon merging Effect.c and Particle.c into a single file (and somedat
  removing references to the Effects.Particle submodule)
2005-11-04 20:34:38 +00:00
951a4934b0 - added wave modifier & removed old wave effect
- added decimate modifier & removed old decimate interface
   (currently lacks warning about destroying data, and there needs
   to be a way for modifiers to return errors back to the interface)
 - allow applyModifier to return NULL to indicate error
 - unfortunately new decimate modifier means it does not know exact
   number of faces in mesh (other modifiers may come before) and so
   instead interface uses a percentage. if people need exact face
   count slider then I will have to think of some hack to fit this
   in. note that it does display the output face count so its possible
   to tweak the pct to get what you want regardless.
 - removed python Wave object

If you are bored now how much easier it is to implement something
like decimate as a modifier. Very few changes to interface, very
few entry points.
2005-07-26 02:44:59 +00:00
259c7b6cad - added modifier_dependsOnTime to check if modifier needs updating
based on time change. would be nice if dep graph could handle this.
 - made dep check if modifiers need update on time change
 - fix render crash (access null)
 - added new Build Effect modifier type. compared to old one works as
   a full member of modifier system, means can apply subsurf, etc on
   it, reorder, what have you. and it is all nice and self contained.
 - removed old Build effect, old files convert to new style on load
 - couldn't help myself, added a randomize feature to build effect
 - removed Python BuildEffect support
2005-07-20 04:14:21 +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
13e7525152 BPython -- a few fixes:
-- fixed bug #1689:
http://projects.blender.org/tracker/?func=detail&atid=125&aid=1689&group_id=9

Reported by Tom Musgrove (thanks), the problem was that Window.QHandle was not passing events to windows that had id's below the current active window.  It was a stupid mistake (mine), the code was iterating from curarea instead of from the first area in the areabase list.

-- fixed bug #1568:
http://projects.blender.org/tracker/index.php?func=detail&aid=1568&group_id=9&atid=125

Stephen investigated the problem, reported by Gabriel Beloin, and left hints in the bug report, thanks :).  I also implemented what he suggested, now Effect.Get('objname') returns a list with all objname's effects and as before, Get('objname, position') returns the effect at position 'position'.  Ref doc already updated.

-- Allowed menu registration lines to appear commented out -- Python comments: '#', of course -- (suggested by Michael Reimpell) in scripts:
Some Python doc tools need the doc strings between triple double-quotes, so to avoid conflicts scripts writers can now comment out the registration code, it should work anyway.  Michael also provided a patch for this a few days ago, too (thanks), but to keep changes at a minimum because of proximity to a release I didn't use it.
2004-10-31 04:09:19 +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
a2ea84903e One small part of the Great Bpy Code Cleanup.
Add cvs $Id tag to files
2004-09-18 18:47:03 +00:00
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
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
82e1783dcb Following Willian's proposal,deleted the print function, which caused crashes.
The objects are now printed with the repr function.
2003-07-04 16:06:39 +00:00
eaf1cdd383 - More renaming all around to follow our conventions
- Implemented partially Blender.Sys
- Worked on issues related to sys, path
- Took away most "debug" printfs
2003-06-28 07:38:21 +00:00
dc686139de end of cleanup ; naming conventions, balance between c and h files 2003-06-27 07:46:29 +00:00
53969183fc very last test. 2003-06-21 16:11:50 +00:00
81dae537b1 *** empty log message *** 2003-06-21 11:44:10 +00:00