Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-06-05added checks for zero length strings when checking for the last characterCampbell Barton
2008-06-05* python sys.cleanpath() used strstr incorrectly, resulting in paths ↵Campbell Barton
containing a slash, always returning a path that ends with a slash. * python Blender.GetPaths() - absolute=0 wasnt working * BLI_cleanup_file and BLI_cleanup_file were treating the // prefix as a duplicate path, now ignores // * BLI_convertstringcode was removing the trailing slash from a path (tested these path functions didnt mess up with some of the peach files and with pointcache)
2008-05-06made python add mesh module respect blenders user settings for editmode and ↵Campbell Barton
view align. added sys.cleanpath() was a patch in the tracker but blender's internal path cleaning is now more general and can be used from python.
2008-05-04Changed frame numbering to only alter hashes if they are in the filename ↵Campbell Barton
(not the directory name) to fix bug [#10566] File Open Dialog replaces '#' with '0' in directory names. removed frame numbering from BLI_convertstringcode into its own function (BLI_convertstringframe), many uses of BLI_convertstringcode were passing dummy frames values anyway. in cases where adding the current frame number to a filename is needed run BLI_convertstringframe(...) after BLI_convertstringcode(...) There are some cases Im not sure BLI_convertstringframe is needed, these have been commented as todo, but at least have the same functionality they used to.
2008-04-17Patch from GSR that a) fixes a whole bunch of GPL/BL licenseChris Want
blocks that were previously missed; and b) greatly increase my ohloh stats!
2007-12-17Reverting to 2_2x BPYMartin Poirier
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.
2007-06-16Python API, more METH_VARARGS to METH_OCampbell Barton
2007-03-10removed python oops access, (was unreliable and nobody used it)Campbell Barton
oops data access need to be done differently. Blender.sys fix for win32 path bug 6193
2006-12-16Sys.c was getting the path seperator out of the python dict and converting ↵Campbell Barton
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.
2006-09-16New images were being initialized with zero users (normal for other data types),Campbell Barton
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];
2006-05-17Fix a buffer overflow in Blender.sys.splitext. It was checking for boundsAlexander Ewering
(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 :)
2006-03-24Made blender python work in background mode without a blend file loading.Campbell Barton
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.
2006-03-22oops, typoCampbell Barton
2006-03-22Fix for bug,Campbell Barton
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.
2006-03-19Fix various gcc warnings.Ken Hughes
2006-03-19=== bugfix win32 - python ===Andrea Weikert
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.
2005-11-30-- Bugfix #3186: Fix memory leaks caused by multiple calls toKen Hughes
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-07-18Header file clean up and warning fixesJoseph Gilbert
- 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-04-16Note: this commit includes new functionality to save and restore scripts ↵Willian Padovani Germano
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.
2005-03-09big warning hunt commitJean-Luc Peurière
lot of casts, added prototypes, missing includes and some true errors
2005-02-09BPython:Willian Padovani Germano
- 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.
2004-10-07Another step in the Big Bpy Cleanup.Stephen Swaney
- 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.
2004-09-26Another round in the Great BPy Cleanup:Stephen Swaney
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-18One small part of the Great Bpy Code Cleanup.Stephen Swaney
Add cvs $Id tag to files
2004-07-16Demo mode and BPython:Willian Padovani Germano
- 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.
2004-07-03New scripts:Willian Padovani Germano
- 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.
2004-06-24Scripts:Willian Padovani Germano
- 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
2004-06-21- Scripts:Willian Padovani Germano
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.
2004-06-16- New Blender.Draw method by Campbell Barton (Cam / ideasman):Willian Padovani Germano
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.
2004-06-15- New script:Willian Padovani Germano
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.
2004-06-10- small updates to scripts and bpython docs, also fixed two warnings;Willian Padovani Germano
- 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.
2004-04-25BPython:Willian Padovani Germano
- 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.
2004-01-23Blender's debug mode only worked on startup:Willian Padovani Germano
- 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
2003-12-14BPython - first step for better integration of Python in Blender:Willian Padovani Germano
- 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
2003-07-01- small fix in Sys.c to compile on Windows:Willian Padovani Germano
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.
2003-06-28- More renaming all around to follow our conventionsWillian Padovani Germano
- Implemented partially Blender.Sys - Worked on issues related to sys, path - Took away most "debug" printfs