Commit Graph

1783 Commits

Author SHA1 Message Date
4f6493d1a7 Fix for bug #8629: python object.boundingBox was not in worldspace
anymore for meshes due to a bugfix. The python code assumed ob->bb
was in worldspace while it isn't, also meant metaball bounding boxes
were wrong.
2008-04-01 10:15:39 +00:00
009e5d00cb TimeLine PyType was not getting initialized, causing auto-completion in the interactive console to crash. 2008-03-31 14:29:40 +00:00
d9de141077 == bugfix ==
fix for [#6950] Blender crashes when .blog file top line is 160 characters or more
- made sure BLI_convertstringcode doesn't return more than 240 chars 
- went through all callers and fixed places where string passed to BLI_convertstringcode was too short
- TODO: look into increasing sample->name and sound->name too, I prevented crashes, but filename might get shortened.
2008-03-30 16:18:01 +00:00
68f1f2b08d own typo in py api 2008-03-29 15:20:41 +00:00
8960f53676 some fixes for python baking function
needed to add a small value to the baking distance for it to include faces of that distance (maybe should make this happen from the user interface too)
2008-03-29 14:50:05 +00:00
08bc0efecb made editmode only force smooth shading when vcols are present (as joe suggested)
pythons api's image.unpack() was broken
2008-03-27 11:52:58 +00:00
Ken Hughes
2976a38fd9 Python API
----------
Bugfix #8615: NMesh.update() did not check if faces had less than 3 vertices, so would create bogus faces.  

Also discovered in the process that documentation and error message for Mesh.assignVertsToGroup() was wrong.
2008-03-26 17:29:20 +00:00
662c57d63e fix for [bf-blender-Bug Tracker][8739] image selector never exits.
This fix was made to the file selector weren't applied to the image selector.
Made file and image selector use same python api function.
2008-03-25 09:00:00 +00:00
1930a925c8 Removing some compiler warnings.
(Note to who-ever made all the changes referring to r.scemode:
r.scemode is an int, not a short!)
2008-03-21 23:10:23 +00:00
Ken Hughes
3c7308614a Python API
----------
Bugfix #6543: Blender.Library.Load() could segfault if called more than once
with a library of different endian type.  In the process discovered an
invalid memory reference in other another function calling library_append().
Thanks to Brecht for the pointers on tracking this old bug down.
2008-03-20 04:59:59 +00:00
6222b1ca99 saveRenderedImage dosnt work in backgrond mode, so added a warning in the docs and an exception if called. 2008-03-19 10:37:19 +00:00
66374761e1 added a warning in python api abot ipo curves. minor change to curve.c 2008-03-19 09:26:01 +00:00
f47aec78c9 fix for [#7962] anomalous mem usage with pydrivers.py scripts 2008-03-18 14:49:31 +00:00
b10726a2ad patch from Paul Rotering (pryon)
[#7124] knot vector access for SurfNurb
2008-03-18 13:42:38 +00:00
bc7b18131b Running scripts with Blender.Run() would crash when reloading. 2008-03-17 19:58:11 +00:00
aee5cb7762 - [#8589] Scripts which use file selector not working correctly
Fix for another bug I introduced with persistent python windows.
also removed unused var.
2008-03-17 18:01:59 +00:00
f96064d33c missing header 2008-03-17 16:45:20 +00:00
dae503187c == PyNodes ==
Ongoing updates to the Blender.Node Python API:

- Changed Blender.Node.node to Blender.Node.Scripted to be more specific and conform to bpython API.
- Added a Blender.Node.Socket type to be used to define node sockets in a PyNode script. Also, socket type is inferred from the value(s) passed in, instead of also being defined by the script author.
- Added attr access to input and output sockets in the __call__ method. Ex: an input socket called 'color' can be accessed as self.input.color now.

These changes break existing pynode scripts, which shouldn't be a problem yet, of course, since we're still finishing this feature for 2.46. The wiki page and sample .blends have already been updated:

http://wiki.blender.org/index.php/BlenderDev/PyNodes
http://wiki.blender.org/index.php/BlenderDev/PyNodes/API
2008-03-16 17:24:29 +00:00
26daad49a3 [8559] Python script that uses FIleSelector and has an error in it segfaults Blender
Want completely fixed, check if the script was removed before running the callback.
2008-03-16 14:28:00 +00:00
87c54fb784 Constraints PyAPI:
Added support for Limit Distance constraint
2008-03-16 10:26:13 +00:00
eab07f7322 Constraints Py-Api:
Fixed up Py-API access to PyConstraints. Also updated docs to reflect these changes.
2008-03-16 06:28:40 +00:00
a5d31fc28e fix for [#8559] Python script that uses FIleSelector and has an error in it segfaults Blender 2008-03-15 18:53:42 +00:00
02295c491f forgot to free memory for python api mesh.getTangents() 2008-03-15 17:19:53 +00:00
f70d9ceed0 fix bug in walking through script linked list (thanks VS) 2008-03-15 16:49:22 +00:00
8e126216b0 added mesh.getTangents() to the python api 2008-03-14 18:53:51 +00:00
af93553640 Moved recent addition of get/setPixelF to get/setPixelHDR and kept get/setPixelF limited to 0.0-1.0 range, to prevent existing scripts breaking. 2008-03-12 11:13:57 +00:00
c8d9d60a99 Added python access to TEXFACE_ALPHA 2008-03-12 09:04:07 +00:00
51a8a60d96 Bugfixes:
* Menus could no longer have their items accessed by number (i.e. W-5 didn't run merge tool in EditMode when accessed by keyboard). This was caused by my commit for BUTM (there was some extra code there that isn't really needed, but was causing havok). 
* NumPad can now be used for the above feature too now
* Typo in error message in Constraints PyAPI
2008-03-11 11:22:27 +00:00
294f884a7d fix for cam.setScale(), cam.setClipStart(), cam.setClipEnd() and
cam.setDrawSize(), they would raise errors when setting ints. but used not to.
better tooltips for Uv Stretch
2008-03-11 09:00:09 +00:00
2b42733105 Applied [#7076] Updated Python Image API to use float buffers in getPixelF/setPixelF
and added an image.updateDisplay() function to update imbuf->rect from imbuf->rect_float
also corrected some docstrings and epydocs
2008-03-10 12:17:58 +00:00
d9da14d8a7 fix for uninitialized variables in uv stretch drawing,
[#8428] 'Editmesh_active' theme colour not accessible via Python
bugfix problem where saving a theme would raise and error when ~/.blender didnt exist.
bugfix for file selector staying open (introduced with own undo resistant scripts)
2008-03-09 07:35:12 +00:00
b13cd8226e Bugfix #8478: Constraints PyApi for setting targetspace non-functional
Finishing off some unfinished business (from the multi-target constraints work), it is now possible to get/set target-space for constraints where this is relevant. 

For this to be possible, target-space setting(s) are now always presented as a list of ints, with each int representing the target-space setting for the relevant target. 

Constraints C-API note:
get_targets function now needs to return the number of targets the constraint can have
2008-03-08 02:16:37 +00:00
f13dc2aac1 snap menu order change, as suggested by Theeth, fix for own error with Window.TestBreak() 2008-03-07 09:33:18 +00:00
b4e13ae575 Another big purge of warnings. (Main culprits this time were Campbell and Geoffrey):
* no newline at end of file (2-3)
* uninitialised vars (1)
* unused vars (1-2)
* assigning/comparing pointers and ints (numerous)
* etc.
2008-03-07 03:24:23 +00:00
955e1b7ba0 PyAPI - Window.TestBreak() - True if the user pressed escape. 2008-03-06 22:45:11 +00:00
Ken Hughes
ff63ac4bcd Python API
----------
Bugfix #8472: texture.image setter did not accept None to remove an image, or
set the image type once an image was assigned.
2008-03-06 21:43:22 +00:00
08f306c81c Made python scripts save and load in the blend file so you can have the same 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.
2008-03-06 21:25:15 +00:00
c7d0a2a92a PyAPI: create scene sequence data if its not there when getting scene.sequence 2008-03-03 21:43:31 +00:00
7af9e824bf * Bugfix #8426: certain hooks options segfaulted
This was caused by my previous commit for add_hook.

* Also, removed a compiler warning in the Python code
2008-03-03 03:21:25 +00:00
62584d78eb Py API - rename UndoPush to SaveUndoState 2008-03-02 15:57:19 +00:00
Nathan Letwory
3ee29c00ed * temproary -> temporary topy fxi 2008-03-02 08:49:39 +00:00
d1af95f4bb Fix for bug [#8405] makeParentDeform segfaults Blender
linking armatures to objects didnt make pose data.
2008-03-01 10:59:38 +00:00
a30b582300 Removed warning from py-api code 2008-03-01 03:42:09 +00:00
a577bb9fc8 Wrap UndoPush with python, needed for apricot, so changes made be scripts can have undo's as well, otherwise users undo and loose changes the script made. 2008-02-29 20:45:57 +00:00
cbf278246f Fix for bug: cross platform strand render differences with kink/branch.
This time is was due to different accuracy of floating point computation,
now it uses does a comparison a bit different to avoid this.

Also changed the vectoquat function to be threadsafe.
2008-02-27 14:17:32 +00:00
086e8b9b8f Bugfix [#8328] Python scripts from user defined location doesn't load
http://projects.blender.org/tracker/index.php?func=detail&aid=8328&group_id=9&atid=125

last commit had mistakes but tested this to fix the bug.
- Cam
2008-02-27 10:02:40 +00:00
b226eb925b should fix bug on win32 with user python menu's not loading because stat() didnt like the trailing slash and returned the dir as missing. 2008-02-27 09:48:43 +00:00
2089ac3091 == BPython ==
Another experiment to support threading properly. By default the Python Interpreter releases its lock every 100 instructions so that other threads get a chance to run Python code and API calls. But that is not enough to prevent race conditions causing artifacts (and maybe crashes) during threaded rendering, since all threads will access the same pynodes data.

So I'm disabling this automatic releasing of the lock (the GIL) by the interpreter, which seems to be a better option for how Blender uses Python.
2008-02-26 17:23:56 +00:00
3dd622b2b4 Added PyGILState_Ensure and PyGILState_Release funcs around module reloading.
Without them blender would crash when reloading scripts.
2008-02-25 18:35:35 +00:00
d4fface140 Fix for bug #8081: python script crash writing MFace.uv. 2008-02-25 11:55:51 +00:00