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
2012-05-09Python/context: python could get invalid bpy.data in scene update handler afterBrecht Van Lommel
undo. The way this got updated from the context is a bit unreliable, and for handlers the update couldn't happen because there is no context passed in. Now it's updated from setup_app_data, which is where the change actually happens. I left in the other updates to be sure but they should not be needed anymore.
2012-02-17unify include guard defines, __$FILENAME__Campbell Barton
without the underscores these clogged up the namespace for autocompleation which was annoying.
2011-11-17pydrivers: 'frame' is now in the driver namespace,Campbell Barton
- no need to link to scenes when using a frame from the pydriver, this made linking rigs for eg, quite messy. - advantage that we get subframe values (where scenes from was fixed to a whole number).
2011-11-03ability to have permanent callbacks that stay active when new blend files ↵Campbell Barton
are loaded. this works by tagging functions, eg: def my_func(scene): pass bpy.app.handlers.permanent_tag(my_func, True) # <-- important bit bpy.app.handlers.frame_change_pre.append(my_func)
2011-10-31use_verify option to defvert_sync_mapped and defvert_sync was flipped, also ↵Campbell Barton
minor edits to defvert_verify_index() - no functional change.
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-10-21Code cleanup: don't use btempdir/bprogdir/bprogname globals anymore, but wrapBrecht Van Lommel
in BLI_ functions.
2011-06-24own patch [#27752] Python Callback (Scriptlink functionality)Campbell Barton
Python: * adds bpy.app.handlers which contains lists, each for an event type: render_pre, render_post, load_pre, load_post, save_pre, save_post * each list item needs to be a callable object which takes 1 argument (the ID). * callbacks are cleared on file load. Example: def MyFunc(scene): print("Callback:", data) bpy.app.handlers.render_post.append(MyFunc) C: * This patch adds a generic C callback api which is currently only used by python. * Unlike python callbacks these are not cleared on file load.
2011-06-02mathutils support for color arithmetic, also some minor whitespace edits. Campbell Barton
2011-04-17change unit evaluation only to do try the units replacements if evaluating ↵Campbell Barton
with python fails, in rare cases its possible a valid python expression could get units applied to it.
2011-03-01Py/RNA API test code to prevent crashing blender when python references ↵Campbell Barton
freed ID's. This uses pythons GC so its no overhead during runtime but makes removing ID's slower. Commented definition 'USE_PYRNA_INVALIDATE_GC' for now, so no functional change.
2011-02-26fix for 'live edit', running python scripts as you typeCampbell Barton
- errors would jump to the line which gets in the way. - the window wouldn't always redraw.
2011-02-21doxygen: entry for gpu, modifiers, nodes, python and renderNathan Letwory
2011-02-19set main() argv functions to be const char *Campbell Barton
also set minimum cmake version to 2.8
2011-01-05edits for BPY_extern.h functions, no functional changesCampbell Barton
- remove unused code. - BPY_run_python_script() split in 2, BPY_filepath_exec, BPY_text_exec - renamed funcs.
2010-12-07minor internal python api change - pass the context rather then getting from ↵Campbell Barton
BPy_GetContext() again.
2010-12-04Maintenance, Campbell Barton
- remove some redundant declarations - changed VertexTangent and Path structs to avoid compiler alignment padding.
2010-11-27python access to driver namespace, rather then have a textblock defined for ↵Campbell Barton
drivers allow scripts to add functions directly. - bpy.app.driver_namespace, read-only dictionary, edit in-place. - reset on file load and new file. - on errors the namespace used to be reset, this should not be needed. simple example. def driverFunc(val): return val * val bpy.app.driver_namespace['driverFunc'] = driverFunc ... now all drivers can access this function.
2010-11-17use 'const char *' by default with RNA functions except when the value is ↵Campbell Barton
flagged as PROP_THICK_WRAP. Also use const char in many other parts of blenders code. Currently this gives warnings for setting operator id, label and description since these are an exception and allocated beforehand.
2010-05-30- Python console argument '--python-console', option so you can start ↵Campbell Barton
blender and drop into a python console, (useful for debugging some problems on a renderfarm over ssh) - Also made it so sys.stdin isnt overwritten anymore, instead the interactive consoel overwrites while it executes and restores after. - removed hope folder from sphinx patch path
2010-03-22spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text)Campbell Barton
2010-02-12correct fsf addressCampbell Barton
2009-12-26fixes for errors/warnings found with cppcheckCampbell Barton
2009-12-08compile python driver expressions for faster re-evaluation.Campbell Barton
approx 15-25x speedup
2009-11-20option to have scripts run on startup for per blendfile UI'sCampbell Barton
2009-11-13changes python initializationCampbell Barton
- bpy is now a python package, this makes it easier to add utility modules and adjust python startup which was previously using verbose Py/C api. Access should not be any slower since both C and Python modules use dictionary access. - loop over scripts and load via python (currently F8 reload isnt working, will add back shortly) - the C module is kept but renamed to _bpy and not meant for direct access from anything but the bpy package. - bpy_types.py is an exception since it runs before the bpy package is initialized.
2009-11-10Function declaration for BPY_context_getMartin Poirier
2009-08-10adding back button evaluation so you can do 1/60, 90*0.1 etc as well as ↵Campbell Barton
dimension conversion 1km-10cm+4ft Note... - Python3.1 you don't need to add the .0 for divisions anymore (was esp annoying for button eval) - Simple dimension input, imperial mi/yd/ft/in, metric km/m/cm/mm, Later could display these values and have a pref for scene scale, atm it assumes 1BU == 1m.
2009-07-22remove scriptlinks,Campbell Barton
they were not working and we have plans for better script integration in 2.5
2009-07-092.5Ton Roosendaal
Monthly cleaning round to make it compile warning free. Mostly it was const stuff (strings, Context), but also a couple useful fixes, like wrong use of temp pointers. Only Mathutils callback struct I left alone... design issue.
2009-06-23SVN maintenance.Guillermo S. Romero
2009-06-222.5: warning fixesBrecht Van Lommel
Mostly harmless ones, except for one about "gzopen64" being undeclared. This needs some defines in BLI_storage.h to be set before <unistd.h> is included. Might fix a crash in compressed file reading, though I'm not sure since it's hard to repeat the crash consistently.
2009-06-14Blender/Python APICampbell Barton
Send the full python stack trace to the reporting api, added BPY_exception_buffer which temporarily overrides sys.stdout and sys.stderr to get the output (uses the io module in py3 StringIO in py2 to avoid writing into a real file), pity the Py/C api has no function to do this. fix for crash when showing menu's that have no items.
2009-04-23F8Key reloads all python scripts and redraws for quick testingCampbell Barton
F7 runs test.py also for testing
2009-04-20Drivers: "Scripted Expression" drivers (i.e. PyDrivers) work againJoshua Leung
Now it is possible to write a Python Expression using the variable names for driver targets (see mockup from initial commit) to substitute the appropriate values into the expression. In the __global__ namespace for PyDriver evaluation, the following modules are available: * __builtins__ - i.e. the builtin Python functions * bpy - new Python API * math or m - math module For example: Consider a driver with three targets, named: A, B, C Now, you could write an expression like: C if A < 5 else B or even: 2*C if A < 5 or A > 20 else m.PI*B Of course, you don't have to have three targets, the above was just an example. TODO: * Bring back way to load pydrivers.py * Blender.Noise equivalent would be nice to have P.S. I hope I haven't made any terrible Python API coding errors here (i.e. mem leaks, etc.)
2009-04-11Added back importing UI scripts rather then running,Campbell Barton
The bug was todo with bpy.data and bpy.types becoming invalid, temporary fix is to re-assign them to the bpy module before running python operators or panels. will look into a nicer way to get this working.
2009-04-11undo previous commit, changing running the script to importing it somehow ↵Campbell Barton
made it crash when running the class functions. will look into this further.
2009-04-11Changed the script UI registration to import rather then run each python script,Campbell Barton
this means it caches the compiled pyc files after importing fro the first time. My times for importing 501 buttons_objects.py files were. - running each as a script 1.9sec - importing for the first time 1.8sec - importing a second time (using pyc files) 0.57sec Also added "bpy" to sys.modules so it can be imported.
2009-04-11UI:Brecht Van Lommel
* Added very basic loading of .py files on startup to define panels. It now executes all .py files in .blender/ui on startup. Right now this contains the object buttons, the C code for it is commented out. These files should get embedded in the blender executable as well eventually, that's a bit more complicated so this works for now. * For scons and cmake it seems to copy & find the files OK, for make only "make release" works (same with scripts/ folder it seems). * Added BLI_gethome_folder function in BLI_util.h. This is adapted from bpy_gethome, and gives the path to a folder in .blender like scripts or ui. There's plenty of things to figure out here about paths, embedding, caching, user configs ...
2009-04-01Python Panels WIPCampbell Barton
- Register python panels - Added a generic class checking function BPY_class_validate() for panels/operators. - No button drawing yet Brecht, Added RNA_enum_value_from_id() and RNA_enum_id_from_value() to rna_access.c to do lookups between identifiers and values of EnumPropertyItem's, Not sure if these should go here.
2009-03-04run script in the text editor is back. UI scripts dont work yet.Campbell Barton
2009-02-28Python experimental UI APICampbell Barton
Can draw panels in the scripts space containing RNA and operator buttons. * Added bpyui.register() so scripts can draw buttons and panels into the scripts space type. * wrapped drawBlock, drawPanels and matchPanelsView2d * Operator buttons take a python dictionary used to set the button defaults. * BPY_getFileAndNum utility function to get the filename and line number python is currently running.
2009-02-162.5Joshua Leung
Added RNA wrapping for F-Curve colour settings
2008-12-212.5 - Compiling 'hacks' for pyJoshua Leung
* Unicode calls in bpy_idprop.c were causing linking errors here. Probably Py-libs for windows would need recompiling with unicode before we can enable this. For now, commented out the offending calls.
2008-12-21wip operator py-apiCampbell Barton
"operator.ED_VIEW3D_OT_viewhome(center=1)" calls the operator, converting keyword args to properties. Need a way to run scripts in the UI for useful testing. Still need to deal with operator exceptions and verifying args against operator options. Added temporary WM_operatortype_first() to allow python to return a list if available operators, can replace this with something better later (operator iterator?)
2008-11-13Merge of trunk into blender 2.5:Brecht Van Lommel
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r12987:17416 Issues: * GHOST/X11 had conflicting changes. Some code was added in 2.5, which was later added in trunk also, but reverted partially, specifically revision 16683. I have left out this reversion in the 2.5 branch since I think it is needed there. http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16683 * Scons had various conflicting changes, I decided to go with trunk version for everything except priorities and some library renaming. * In creator.c, there were various fixes and fixes for fixes related to the -w -W and -p options. In 2.5 -w and -W is not coded yet, and -p is done differently. Since this is changed so much, and I don't think those fixes would be needed in 2.5, I've left them out. * Also in creator.c: there was code for a python bugfix where the screen was not initialized when running with -P. The code that initializes the screen there I had to disable, that can't work in 2.5 anymore but left it commented as a reminder. Further I had to disable some new function calls. using src/ and python/, as was done already in this branch, disabled function calls: * bpath.c: error reporting * BME_conversions.c: editmesh conversion functions. * SHD_dynamic: disabled almost completely, there is no python/. * KX_PythonInit.cpp and Ketsji/ build files: Mathutils is not there, disabled. * text.c: clipboard copy call. * object.c: OB_SUPPORT_MATERIAL. * DerivedMesh.c and subsurf_ccg, stipple_quarttone. Still to be done: * Go over files and functions that were moved to a different location but could still use changes that were done in trunk.
2008-09-19== Python Space Handlers ==Willian Padovani Germano
Patch #9673: "Short patch to make spacehandler event scripts work more like normal python gui script handlers" by Steven Truppe: http://projects.blender.org/tracker/?func=detail&atid=127&aid=9673&group_id=9 This patch adds the Blender.eventValue variable available for space handlers, holding the event value (aka 1 for button and key presses, X or Y coordinate for mousex / mousey movement). Thanks, Steven. PS: this doesn't break existing scripts.
2008-09-19== Python Script Links ==Willian Padovani Germano
Bug #17599: Summary: Python constraints, good in 2.46 not working anymore in 2.47 http://projects.blender.org/tracker/?func=detail&atid=125&aid=17599&group_id=9 Improved my old hack to avoid frame changed scriptlinks from running when rendering stills, should fix this bug. It also causes REDRAW scriptlinks to be executed during renders, but that conforms to how FRAMECHANGED ones work. BTW: this can still be improved. The current system meant to disable all Python functionality at once needs imo to be replaced by one that allows to enable / disable per feature (scriptlinks, pyconstraints, pynodes, etc.). A better way to inform scriptlinks about what is going on (render, anim, render anim, etc.) would also help. Will discuss with others.
2008-09-15added BLI_convertstringcwd, used so command line blendfiles and python ↵Campbell Barton
scripts can be relative to the current path. - was alredy doing this for blendfiles, but better to have in its own function. header_text.c - renamed PATH_MAX, was defined by system includes.
2008-08-12Rolled back on rev. 16039. Had problems with display, messages being blank ↵Ian Thompson
and scripts not being recompiled in some cases. Needs more thought before committing.