Age | Commit message (Collapse) | Author |
|
blocks that were previously missed; and b) greatly increase my
ohloh stats!
|
|
|
|
problem since replacing the string length of int, with Py_ssize_t or long prevented the crash. worked around the problem by removing the PyString_AsStringAndSize command.
wizard_curve2tree - removing id properties didnt work. exit button used a callback it didnt need to.
|
|
segfaults Blender
|
|
scripts running when you open a blend file.
Also scripts will re-run on undo rather then closing.
This is done by saving and loading the name of the script or textblock of the 'Script' datablock, connected to the ScriptSpace. This way when there is a name but the script dosnt run.
Blender runs the script or text block if available.
|
|
* initial values I added in radialcontrol.c might need to be reviewed if they cause problems(I used 200, as it seems many tools were setting that)
* #pragma warnings are the only warnings I still get, so that means we have a clean slate again
|
|
[#8354] Blender or Python25.dll crash on... quit, reported by David B. (myvain)
The BPy_FreeButtonsList() function is also called after we call Py_Finalize(). Calling PyGILState_Ensure()/Release() there crashes Blender. Added a test to prevent this, but note that function still runs Python API code to free a buttons list. Doesn't seem to give problems, though. Thanks, David.
|
|
* Make PyNodes work with threaded renderer. This patch is by Willian. He has worked hard on getting this sorted out - now you should be able to render with PyNodes AND multiple threads.
|
|
|
|
|
|
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.
|
|
often close when dragging a button value (or when using a tablet I am told)
|
|
UIBlock needed to clear the events so tooltips show.
|
|
This commit fixes the Draw module. All buttons/widgets created via the Draw
module in a SpaceScript area are now inserted into a global list attached to
the SpaceScript data. This list is cleared before each draw, when freeing
the space, and when the area is switched to another space.c
This is necessary to prevent Blender's internal UI code from getting invalid
pointers to python data. In addition, it allows storing widget tooltips
inside the python Button objects, which solves that little bit of stupidity.
Note that this reverts the previous weaklist solution. In fact, I had to go
over each previous commit by Campbell after this code originally branched
before the weaklist commit and re-add each commit. So if anything is
missing, just tell me, or feel free to re-add it.
|
|
* incorrect args to Draw.Create() would crash blender because it wasnt deallocating the value properly.
* deallocation of an uninitialized button could also try and free uninitialized memory if the type happened to be a STRING.
* removed the unused tooltip pointer from teh Draw.h's Button struct.
|
|
|
|
|
|
BMAE script needed to display more (as it worked with 2.41) and it seems resionable to add.
|
|
METH_VARARGS everywhere and getting the single args from the tuple.
Use METH_O where applicable.
|
|
group (should have been disabled)
gen_library.c - Own error, hashing did not decref the tuple it created.
Draw.c - callback also missed a decref
|
|
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)
|
|
----------
Draw.c: Fix some gcc warnings
Bone.c: Bone_getAllChildren() was calling EXPP_incr_ret() but not returning
the value
|
|
not offset)
BPyMesh.py - own dumb error, was using dir as an arg (which is a py keyword)
object_drop.py - new script, the first to use UIBlock, it drops objects into terrain, either a group or the active object. on teh Z axis or view axis.
|
|
Bone.c - return an empty list rather then None for bone.children bone.getAllChildren()
Draw.c - per button callbacks are now have (event, value) passed
|
|
restrictive since it uses user defined buttons.
Also added per button callbacks, so each button can have its own python functions.
|
|
curve - added curve_type() to return the curve type
BPyModule & gen_library - works with text3d now, can also make new text3d through bpy.curves.new
Added Draw.Label() so scripts can draw can using freetype.
widgetwizard - use Draw.Label
|
|
passed in general.
|
|
changes to NMesh
|
|
PyObjects type, now only use macro's
|
|
|
|
bug 5612 (not a bug but this makes it work as scripters may expect)
|
|
as the ColorPicker in code and syntax.
|
|
added align to a few scripts where it looks nice.
|
|
Please read:
http://www.blender3d.org/cms/Imaging.834.0.html
Or in short:
- adding MultiLayer Image support
- recoded entire Image API
- better integration of movie/sequence Images
Was a whole load of work... went down for a week to do this. So, will need
a lot of testing! Will be in irc all evening.
|
|
it to a char for all path functions.
made DIRSEP a constant and refer to that directly.
Draw.c's PupBlock limit was 24, made 120 to match blenders internal limit.
|
|
|
|
Bug #4484:
http://projects.blender.org/tracker/?func=detail&aid=4484&group_id=9&atid=125
A recent update to Draw.c made the button attr setter function not exit
where it should for one of the cases, when new and old strings had
same length (code was missing a "return 0;" line in one of the if
cases). Should work fine now, I don't get the error under linux anymore.
Also saw in the same function that a py object could be created but
was not being decref'ed in two other 'if' cases.
Thanks elbarto for reporting the bug.
|
|
Window.py added note about the view offset being flipped.
editview.c Fly mode timed redraws so motion is the same speed erespective of scene complexity.
|
|
larger strings would segfailt blender.
|
|
documented a workaround for python drawinf pixel aligned text in teh 2d view
Added links from Draw.Test to the OpenGL functions that set the location and color.
|
|
- (Click step was zero) Fixed in Draw.c
Added a comment to interface.c on how a1 and a2 are used with float buttons.
Added an example to Draw.py epydocs of a script using a float button.
|
|
Fixes for the bug introduced by my other commit the other day.
Blender.Draw.Create now does proper error checking.
|
|
Blender.Draw.ColorPicker
Enables scripters to use a color picker in there scripts.
See this file for a trivial demo: http://blenderartists.org/~theeth/colorpicker.blend
|
|
Getting teh size of an image with a relative path "//foobar.png" would always fail.
|
|
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.
|
|
PupBlock method. This wraps the "clevernumbut" code to allow scripters to use popup blocks for user input instead of a sequence of multiple different popups.
See the blend file for a comprehensive test and example file.
|
|
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.
|
|
- 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
|
|
This fixes the active object in place when orbiting the view.
Choppy 15fps demo can be seen there: http://www.elysiun.com/~theeth/bf/around_active.html
Image Memory Grabage Collection
This adds memory handling to the image code. An image is tagged each time it is used.
During a collection cycle (frequency of cycles is user defined), if an image is older
than a user defined limit, its buffer gets deallocated. This also applies to gl memory buffers.
Images that are loading in GL memory needs to go through two time outs before being fully deallocated: the first time out deallocated the gl memorry, the second the buffer in ram.
Notes:
Image buffer loaded from python gets tagged as permanent upon load. That tag is removed when python stops using the image.
I might have missed some tagging spots, especially in the rendering pipeline. Someone with more knowledge about this code should check to be careful.
Tagging is done on every access, for rendering, this will probably be a performance hit. A scheme should be developped to only tag when the rendering is completed.
Collecting is called in draw_object, most likely not the best place to do it.
Safe from undo, since using undo deallocates memory anyway (like when loading a blend file with one currently opened)
Userpref DNA changes:
I've changed a couple of flagging variables from short to int. Some because they needed more space, others to keep SDNA happy.
Info window changes:
I've grouped a couple of buttons in aligned blocks and changed the color of mutually exclusive options to make them clearer.
Matt didn't do any changes on that in tuhopuu, so hopefully I'm not stepping on anyone's feet with this.
Also changed double constants into floats with f in a couple of places (mostly space.c) to make compiler happier.
|
|
- Campbell Barton updated his Wavefront obj importer;
- Jean-Michel Soler updated his paths import (eps part).
BPython bug fixes:
- oldie found by Ken Hughes: reference count of two pyobjects not being decremented in slider callback (Draw.c):
http://projects.blender.org/tracker/index.php?func=detail&aid=2727&group_id=9&atid=127
- Gergely Erdelyi found that setText() in Text3d module was not updating str length var, leading to mem corruption and provided a patch:
http://projects.blender.org/tracker/?func=detail&aid=2713&group_id=9&atid=127
- doc updates (suggested by Campbell)
Thanks guys.
|