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
2011-04-30whitespace edits for bpy api, split some really long lines.Campbell Barton
2011-03-22operators called from python were not getting their reports back into python ↵Campbell Barton
errors. eg: - console calls operator - operator calls report - report went into header rather them back into the console as an error.
2011-03-20fix for crash when running WM_OT_read_factory_settings() from a script and ↵Campbell Barton
then importing.
2011-03-19C, style changes (mostly white space edits), no functional change.Campbell Barton
2011-03-12py/rna: BPy_reports_to_error() now takes the exception type as an argument ↵Campbell Barton
and returns -1 as an error value
2011-03-02move anim functions out of bpy_rna.c, its getting too big.Campbell Barton
2011-02-27doxygen: blender/python tagged.Nathan Letwory
2011-02-18- clear some warningsCampbell Barton
- rename layout.operator_enums -> operator_enum (since we have operator_menu_enum, only called in 4 places)
2011-02-18py api was raising SystemError exception incorrectly, this is intended for ↵Campbell Barton
internal interpreter problems. Replace most with RuntimeError.
2011-02-14python api renaming and added headers for some files which didnt have one, ↵Campbell Barton
no functionality change.
2011-02-01fix for 2 segfaults running in background mode.Campbell Barton
- operators which reload G.main would crash blender if called from python and then accessed bpy.data.* - WM_read_homefile_exec was setting the contexts Scene to NULL as a signal for the event system, this didnt work in background mode, crashing when property update functions expected scene to be set.
2011-02-01workaround [#25845] Empty UI panelsCampbell Barton
- now writing to RNA is disabled when inside render() call. - disallow calling operators when writes are disabled. Rendering runs in a thread so running operators from the thread is not safe unless rendering becomes a blocking operator again.
2011-01-07split BKE_utildefines.h, now it only has blender specific defines like GS() ↵Campbell Barton
MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h. no functional changes.
2010-12-31update python api with changes from Joshua's commit r33917. translate ↵Campbell Barton
reports into python errors.
2010-12-07pass along the context to extension functions, this was already being done ↵Campbell Barton
in all cases except for the render engine. this allows python to NULL its internal context while scripts are not running.
2010-11-23minor edits to exception formatting (remove ... or \n from suffix)Campbell Barton
2010-11-23partial fix for [#23532]Campbell Barton
- Python calling operators didn't run WM_operator_properties_sanitize() so enum functions called from python were given a NULL context. - PROP_ENUM_NO_CONTEXT and PROP_NEVER_NULL used the same value in the enum (possible conflict).
2010-11-07better exception check for calling operators. non dict/None values were ↵Campbell Barton
being treated as None.
2010-11-04fix to allow [#24009] to be fixed.Campbell Barton
WM_operator_poll() could fail in cases WM_operator_name_call() would succeed because calling the operator would setup the context before calling poll. this would result in python raising an invalid error or menu items being greyed out. now python can also check with an operator context: bpy.ops.object.editmode_toggle.poll('INVOKE_SCREEN')
2010-10-30use PyImport_ExtendInittab for py module initialization rather then adding ↵Campbell Barton
to sys.modules directly, no functional change.
2010-10-14UNUSED() macro so -Wunused-parameter can be used with GCC without so many ↵Campbell Barton
warnings. applied to python api and exotic.c, removed some args being passed down which were not needed. keyword args for new mathutils types were being ignored when they should raise an error.
2010-09-27added CTX_wm_operator_poll_msg_get/set so failing poll functions can set ↵Campbell Barton
messages when poll fails, at the moment only python uses this but theres nothing python specific. only added 1 message to a poll function, so messages still need to be set in many more places to be useful.
2010-09-09definition/syntax edits for operators and rna (no functional changes)Campbell Barton
2010-09-01poll function for py api operator accessCampbell Barton
eg: if bpy.ops.object.mode_set.poll(): ...
2010-08-14- PyLineSpit() - used to print the filename and line number for internal ↵Campbell Barton
errors now works when executing class functions in a module. - replaced PySys_GetObject("modules") with PyImport_GetModuleDict() - use defaults for keymap import/export rather then setting the same value every time from the UI scripts.
2010-08-13- remove WM_operatortype_exists since its almost the same as ↵Campbell Barton
WM_operatortype_find - hopefully fix reported problem with MSVC.
2010-03-14remove unused includesCampbell Barton
2010-02-13Calling operators from Python with non-default context was broken (need to ↵Martin Poirier
assign to the right variable).
2010-02-12correct fsf addressCampbell Barton
2010-02-10fix for python not being able to call operators with a executuon context.Campbell Barton
2010-01-26Properties for macro operator call in python.Martin Poirier
Dicts are converted to operator properties like this: bpy.ops.armature.extrude_forked(TRANSFORM_OT_translate={"value":(2,0,1)}) Note that this doesn't work quite well if one operator is twice in the same macro, but that's a problem at the RNA level too. I'll have to deal with that eventually.
2010-01-25make exception a bit nicer (since wiki docs dont make much sense how it was ↵Campbell Barton
before)
2010-01-23when python calls an operator, return a set from the operator flag, this ↵Campbell Barton
matches the set that python operators themselves return. eg. {'MODAL'} or... {'FINISHED'}
2009-12-31remove python api cruft from custom operator registrationCampbell Barton
2009-12-31Macro registration using the normal rna registration methods (like operators).Martin Poirier
bpy.types.register(MacroClass) instead of bpy.ops.add_macro(MacroClass) The rest is unchanged. Also remove some now unused code for the old registration methods (there's still some remaining).
2009-12-24* register operators like other classesCampbell Barton
* operators now return sets (converted into flags) * can't remove bpy_operator_wrap.c since macro's still use the custom register funcs
2009-12-24support for registering operators using the same internal rna api as panels, ↵Campbell Barton
menus, headers & render engines since there was a fair bit of duplicate functionality. will remove the old system and update scripts next.
2009-12-05Support for the C Macro system in Python.Martin Poirier
Basic definition works like a python operator but you derive from "bpy.types.Macro" instead. Operators are added to the macro after it has been added with "bpy.ops.add_macro" through the class method "define" which takes an operator id and returns an OperatorMacroType (new RNA type) for which properties can then be defined to be passed to the operator when run. Example: http://blenderartists.org/~theeth/bf/macro.py Using this system, it should be easy to add an operator to the console that converts selected lines into a macro or even a more generic record macro system.
2009-11-24avoid operator type lookups when its knownCampbell Barton
2009-11-23fixed some error reporting issues with calling operatorsCampbell Barton
2009-11-13F8 reload works again, script errors are printed but dont stop loading every ↵Campbell Barton
other script
2009-11-11Nodes Editor + other warning fixes:Joshua Leung
* Added 'active node' panel for the Nodes Editor. This panel, in the NKEY region, shows the settings for the active node. Included in this panel is a field used for editing the unique-name of the node too. * Fixed a number of uninitialised vars warnings that I missed in previous commit...
2009-10-29Python can now run operators with their own context (data context).Campbell Barton
The aim of this is to avoid having to set the selection each time before running an operator from python. At the moment this is set as a python dictionary with string keys and rna values... eg. C = {} C["active_object"] = bpy.data.objects['SomeOb'] bpy.ops.object.game_property_new(C) # ofcourse this works too.. bpy.ops.object.game_property_new({"active_object":ob}) # or... C = {"main":bpy.data, "scene":bpy.data.scenes[0], "active_object":bpy.data.objects['SomeOb'], "selected_editable_objects":list(bpy.data.objects)} bpy.ops.object.location_apply(C)
2009-10-08menus are now global (like operators), so for eg, the info add menu and the ↵Campbell Barton
3D add menu can be shared.
2009-09-22Changes to allow python to do redraws through the timer operator, a reliable ↵Campbell Barton
way to test the overhead of the python api (printed to the consoel on exit). - rename WM_OT_ten_timer to WM_OT_redraw_timer - added iterations argument to run more then 10 times (10 is default still) - use report api rather then always calling a popup directly. - added a new test that draws every region without swapping. - dont show the info popup when operators are called from python. - operators called from python now print reports, useful with the interactive console. eg. >>> bpy.ops.wm.redraw_timer(type='DRAW_WIN', iterations=300) Info: 300 x Draw Window: 4168.56 ms, average: 13.8952
2009-09-182.5: Python operators now have a working poll() function,Brecht Van Lommel
solved by wrapping all polling in WM_operator_poll and adding a special callback for python.
2009-09-16Operator cheat sheet (from the help menu)Campbell Barton
writes all operators (including PyOperators) and their default values into a textblock. Useful for an overview and checking consistancy. eg. http://www.pasteall.org/7918/python added rna functions text.clear() and text.write(str)
2009-09-14Bugfix with py operator api and modal operators. Modal operators would keep ↵Martin Poirier
a reference to Reports locally allocated in the api functions, which would crash and burn later when the operator would actually stop. This commit introduces a flag at the Reports level that can be used to indicate that it needs to be freed (on top of the flag already existing in the operator, which I guess could be removed). Reports for operators called through python are only persisted if they indicate that they are running modal.
2009-09-04allow execution mode to be given as an argument to operators from python ↵Campbell Barton
(requested by algorith) example. bpy.ops.tfm.rotate('INVOKE_REGION_WIN', pivot=(0,1,2), ......) bpy_array.c - was too strict with types, 0 should be allowed as well as 0.0 in a float array.
2009-08-10remove python2.x supportCampbell Barton