Age | Commit message (Collapse) | Author |
|
blocks that were previously missed; and b) greatly increase my
ohloh stats!
|
|
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.
|
|
|
|
oops data access need to be done differently.
Blender.sys fix for win32 path bug 6193
|
|
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.
|
|
but for images user counts work differently.
(just noticed this is what blender does so Image.New() now does the same)
Many of the sys functions had maximum path thengths that were too short.
char path[FILE_MAXFILE];
rather then
char path[FILE_MAXDIR + FILE_MAXFILE];
|
|
(although it did this one char too 'friendly'), but still happily copying
the string even if it was too long.
Pythoneerz, please check if this is the correct fix :)
|
|
Blender.c python initialization creates a scene when in background mode and when there is no scene.
Needed to skip redrawing when in background mode because it depended on screen data that wasnt there.
|
|
|
|
https://projects.blender.org/tracker/index.php?func=detail&aid=4021&group_id=9&atid=125
Raise an error instead of crash when python expandpath runs and no scene is loaded.
|
|
|
|
Fixed BLI_exist: In Windows stat doesn't recognize
a dirname ending is a slash, exept when it's
the root dir ("C:\\"), where it is required.
So trailing slashes are only removed when filename
is longer than 3 chars.
Also fixed Python Sys.c that now uses BLI_exist
instead of calling stat directly.
|
|
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
|
|
configure options. This is ongoing work, scripts still have to be updated to use this feature and more tests are needed, though many have been performed. The new Scripts Config Editor script is the main part of this. If anyone wants to check it, only the AC3D importer and exporter have already been updated to use it: simply open them (you can then cancel with ESC) to have the data created, then try the config editor.
Scripts:
- Thanks Jean-Michel Soler (jms) for updated versions of dispaint, fixfromarmature and unweld (also renamed to remove version part).
- Thanks Bart for the upgraded VRML exporter (great doc webpage!). It is available as VRML 97 and the original VRML 2 is for now still there, to help users testing the new version. For the next release the old one should be removed, of course.
- New script: Scripts Config Editor (Scripts win -> Scripts -> System). Scripts with config options (simple data that is to be set according to user needs or preferences) can use this facility instead of providing a gui and writing config files to disk themselves.
- Added new menu: System, available in the Scripts win.
- Updated sys_info.py, help_browse.py and the AC3D importer and exporter.
- Removed use of the Scrollbar and added arrow keys and mouse wheel support instead in Daniel Dunbar's old doc_browser.py. The scrollbar events handling doesn't exist, Ton suggested removing the scrollbar from the API months ago. For now its ref doc is gone and no bundled script uses it, until we get time to implement it properly.
- Added module BPyRegistry.py with functions to handle reading / writing config files automatically to the scripts/bpydata/config dir.
- Removing dir release/bpydata and its contents (moved earlier to release/scripts/bpydata/)
- Bug #2379: made small changes to bevel_center's ui to fix a problem reported by Alexander Ewering (intrr):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2379&group_id=9
BPython:
- Thanks Campbell Barton for new functionality: Blender.Get() now can also return all the paths from the user prefs -> file paths win and there is a new function: Blender.sys.expandpath() to transform Blender paths (those starting with '//' and ending with '#') to absolute paths.
- Added function Blender.ShowHelp(), to open the Scripts Help Browser with a given help page -- just a time saver for scripts.
- Improved function Blender.Run() to also work with gui and file select scripts.
- Found a (new?) crash related to NMesh.PutRaw when creating a new object while in edit mode. Leaving / entering edit mode fixes the problem, so a check for obj created, edit mode and leaving / re-entering it were added to the code for now (gdb didn't help much, no backtrace)
- doc updates, including splitting intro page in two, with bpython related stuff (registering / documenting / configuring scripts and command line mode (thanks Chris Want for "use system variables to pass parameters to scripts" idea).
- Registry: functions have been updated to support writing to / reading from disk, for the config editor -- only simple config data supported, for large amounts coders should write to a file themselves. This is done with a new parameter: Registry.GetKey(keyname, True) will also search for the key on the config dir, if not already loaded; equiv. for Registry.SetKey(keyname, dict, True). Data is only written to / read from disk when needed and only scripts already used (assuming they support this functionality) will have config data saved.
|
|
lot of casts, added prototypes, missing includes and some true errors
|
|
- NMesh: made nmesh.update accept an optional 'vertex_shade' param to init vcols with shading info, like when you enter vpaint mode or press the relevant "make" button for a mesh without vcols. This is still a test, the functionality was requested by Manuel Bastioni for the SSS script they are working on:
http://www.dedalo-3d.com/index.php?filename=SXCOL/makehuman/articles/subsurface_scattering_in_python.html
- sys: made makename() accept files with max FILE_MAXDIR+FILE_MAXFILE name length, should fix #2192. Was only FILE_MAXFILE, a mistake;
- Image: added .setFilename(), contributed by Campbell Barton;
- Camera: added camera.get/setScale for the new param added by Ton for ortho cameras. Requested by Jean-Michel Soler for the Texture Baker script;
- related doc updates.
|
|
- move static declarations and data definitions out of headers.
the BGL module still need cleaning.
- move declarations out of modules.h and into appropriate .h files.
modules.h still exists as a container for the few modules that
need to #include almost everything.
- all files now have a $Id tag and have been formatted by indent
there are no changes to executable code.
pre-commit versions are tagged with bpy-cleanup-pre-20041007
for the sake of paranoia.
|
|
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.
|
|
Add cvs $Id tag to files
|
|
- small additions and fixes to enable the demo mode;
- Added sleep() to Blender.sys and 17 new functions to Blender.Window module:
things to help demo script writing and as a bonus read / write access to Blender's input event queue;
- updates in docs, those interested please check Window.py in python/api2_2x/doc/ to read about the new Blender.Window functions.
----
Demo mode should be working well now for (I) playing rt animation -- aka ALT+A -- and (II) rendering pics and anims and playing anims. I'll still add access to radiosity data and functions.
PS: Joseph Gilbert made (II) possible with the Scene.Render module he added for 2.32. He's been coding great things for bpython, so I'd like to take the chance to point that and thank him here.
|
|
- hotkeys, obdatacopier and renameobjectbyblock, all from Jean-Michel Soler (jms);
- bevel_center by Loic Berthe, suggested for inclusion by jms;
- doc_browser, by Daniel Dunbar (Zr)
Thanks to them for the new contributions!
(I included doc_browser at 'Misc' because only users interested in script writing would actually use it, but it could also be under 'Help'. Opinions?)
BPython related:
- Added scriptlink methods to object, lamp, camera and world.
- Object: added object.makeTrack and object.clearTrack (old track method).
- sys: made sys.exists(path) return 0 for not found; 1 for file, 2 for dir and -1 for neither.
- doc updates and fixes.
- made ONLOAD event work. G.f's SCENESCRIPT bit was being zeroed in set_app_data.
- Blender: updated functions Load and Save to support the builtin importers and exporters besides .blend (dxf, videoscape, vrml 1.0, stl, ...)
- Draw: added mouse wheel events.
- Scene: added scene.play to play back animations (like ALT+A and SHIFT+ALT+A). Makes a good counter, too, when the 'win' attribute is set to a space that doesn't "animate".
The scene.play() addition and the fix to ONLOAD scriptlinks is part of the work for a Blender demo mode. It already works, but I'll still add support for Radiosity calculations and fix a thing in main(): it executes onload scripts too early (BIF_Init), giving funny results in alt+a animations and renderings when firing up Blender. Loading after the program is up has no such problems. When I finish I'll post examples of demo mode scripts.
|
|
- Added KlopUtils by Carlos Lopez and Batch Object Name Edit by Campbell Barton (thanks both!)
BPython:
- Fixed things I recently broke in Blender.sys, added Blender.sys.join(dir, file)
- doc and other minor updates
|
|
Campbell Barton updated his Wavefront OBJ scripts and Ben Omari updated his DirectX 7 and 8 ones (thanks both). The other listed scripts had minor updates to accomodate the menu changes.
- Scripts in menus:
renamed Tools to Object, Generators to Add, and Modifiers to Mesh (Metaball, Curve, Surface can be added later), to integrate better in the interface.
- Fixed a bug in Blender.sys.makename: last letter of file extension was being cut out.
|
|
PupStrInput, a wrapper for the Blender String popup (thanks!)
- Fixed bug #1374 reported by Gabriel Beloin (gabio, thanks too):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=1374&group_id=9
There was a minor mistake in the import menu: vrml called dxf and vice-versa and shortcuts were wrong (removed them).
- Doc updates, minor updates elsewhere.
|
|
Wim Van Hoydonck contributed the famous Knife script (put under Modifiers group) developed by Stefano Selleri and himself (thank to both!)
- Added helper function Blender.sys.makename, updated docs and script ac3d_export to use it (shall update other exporters too):
this function is just a simple helper to format a filename as needed (change extension, strip dirname, it defaults to use G.sce as path).
- Added a test method: Blender.Scene.getScriptlinks(eventName):
just testing, if this path proves useful other functions will be added and made general, for objects, etc.
|
|
- added function Blender.sys.exists(path) to check if a given file exists;
- forgot to mention: in my previous commit the blender.html file was also updated slightly.
|
|
- New module + doc: Blender.Library:
It's like File->Append, loads datablocks from .blend files.
- small updates to fix warnings and accomodate for the new module, in readfile.[ch]
- New Blender.sys module function: time, a wrapper of the PIL get time function.
- Updated original makefile and scons builds.
|
|
- G.f's G_DEBUG flag was being erased in blenkernel/intern/blender.c's
setup_app_data:
G.f= bfd->globalf
// added a line above it to fix this:
if (G.f & G_DEBUG) bfd->globalf |=G_DEBUG;
G.f= bfd->globalf;
BPython:
- debug info now only shown if Blender is started with '-d' option
- added ~/.blender/scripts to modules sys.path
- added two new functions to Blender.sys: basename and splitext
- added doc for Blender.sys, updated other docs
|
|
- add a new space: Space Script
- add a new dna struct: Script
- add these two properly everywhere they are meant to
It's not a tiny commit, but most of it is ground work for what is still to be done.
Right now the benefits should be: freeing the Text Editor to be used in a window even while a script w/ gui in "on" and letting more than one currently running script w/ gui be accessible from each window
Some files are added, so some build systems (not autotools) will need updates
|
|
Thanks Florian Eggenberger for telling us about it. And Greg McBride for
pointing a possible fix.
- Draw.Text and Draw.GetStringWidth updated:
Now they accept an optional second parameter to set font size and Draw.Text
returns the drawn string width.
- Partially fixed the update() and PutRaw() bugs in NMesh:
A total fix will require bigger changes, but what was done (unless buggy)
takes care of the common cases.
|
|
- Implemented partially Blender.Sys
- Worked on issues related to sys, path
- Took away most "debug" printfs
|