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-01-07py/rna api speedup for collection slicing in all cases, rather then having ↵Campbell Barton
an exception for [:]. - avoid looping over the entire collection unless a negative index is used. - dont use the get index function for building the slice list, instead loop over the collection until the stop value.
2011-01-06py/rna optimizations, will help for faster exporting.Campbell Barton
Speedup for getting collection indices, avoid getting the collection length unless a negative index is given. This avoids a loop over the entire collection in many cases. Speedup for getting collection slices by detecting collection[:] and internally calling collection.values(), this gives a big speedup with some collections because each slice item would loop over the list until that index was found. Rough test with 336 objects. - getting index of listbase collection ~ 5.0x faster - getting index of array collection ~ 1.15x faster - getting slices of listbase collections ~ 34.0x faster - getting slices of array collections ~ 1.5x faster
2011-01-05fix for py/rna mesh.materials[:] where empty materials exist, would raise a ↵Campbell Barton
runtime exception. problem was there was no way to tell the difference between getting an empty item from a collection or the item not being found.
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.
2011-01-03fix for crash when some classes didnt register properly (this included ↵Campbell Barton
loading sintel.blend).
2011-01-03fix for own error with mathutils.geometry argument parsing.Campbell Barton
also raise ValueError when the vector size is incorrect rather then type error.
2011-01-02- correct typos in comments.Campbell Barton
- move boxpack struct out of the public header.
2011-01-02python api: rna array slices now return tuples rather then lists (fits with ↵Campbell Barton
recent change made to mathutils). minor improvements/cleanup to exporters.
2010-12-31update python api with changes from Joshua's commit r33917. translate ↵Campbell Barton
reports into python errors.
2010-12-31CMake: use blender_include_dirs("${OPENGL_INCLUDE_DIR}") rather then ↵Campbell Barton
blender_include_dirs(${OPENGL_INCLUDE_DIR}) Apparently this is needed for MSVC in some cases, reported by Tamito Kajiyama r33895.
2010-12-28Drivers Code Cleanups and UI Tweaks:Joshua Leung
- Adding drivers from the UI (not from py-scripts though) will now automatically add a "Transform Channel" driver variable to the newly created drivers. This makes setting up drivers a bit more convenient for the most commonly used case. - Drivers now report their errors using the Reports system instead of writing these directly to the console. - Clarified some comments to be more insightful about the "why's" of some design decisions, and related formatting/cleanup tweaks - Reduced scope of "path" vars to just the scope they're required in - Removed some unused defines from a failed experiment in the original Keying Sets code ("templates" and "template flags") which was superseeded by the more flexible + nicer "Builtin KeyingSets"
2010-12-23rename blenderlib to blender_add_libCampbell Barton
2010-12-23remove reload() from builtins since python3 no longer uses this.Campbell Barton
use imp.reload now. Should use import hooks but for now replace imp.reload with our own reload as the builtin reload was replaced before.
2010-12-18fix [#25262] Keyboard shortcut presets can't be made because of wrong folderCampbell Barton
New create option when getting a user resource for creating paths. bpy.utils.user_resource(type, path, create=False)
2010-12-15BKE_assert(), only prints the error unless cmake define WITH_ASSERT_ABORT is ↵Campbell Barton
enabled and it will call abort(). made this option advanced so people don't enable along with other features.
2010-12-15access bpy.app.debug_value, G.rt internallyCampbell Barton
2010-12-13Expose access to PROP_ENUM_FLAG from bpy.props.EnumProperty(), this is ↵Campbell Barton
exposed as a python set(). The default value is also a python set() so multiple booleans can be used in the 1 property. Also added PROP_ENUM_FLAG support to operator printouts.
2010-12-13exceptions in registering properties were not properly handled, allowing a ↵Campbell Barton
single error stop the main module registration loop. worst case 1 script error could load blender without a UI.
2010-12-09renaming blf_api.h to blf_py_api.hDalai Felinto
In windows this was producing Linking dependence errors because we have BLF_api.h in the /blenfont/ and blf_api.h in /python/generic/. It doesn't produces crash out of the box but I was trying to link both "api" files to the same project (Ketjsi folder). For the linking order was determining what header to use. A workaround is to "include" the file using some ../../ relative folder. But renaming it is less error prone. Probably Ketsji folder shouldn't link to BLF_api.h anyways, but this is something I will look better later before another commit. In the mean time it's not a good idea to have 2 api files with the same name (for non case-sensitive systems).
2010-12-09- internal py/rna ifdef's USE_MATHUTILS was mixed up,Campbell Barton
- updated tooltip for vertex group mirror.
2010-12-08use lowercase for cmake builtin names and macros, remove contents in else() ↵Campbell Barton
and endif() which is no longer needed.
2010-12-08fix for own change r33524, at the moment the context always has to be valid, ↵Campbell Barton
noted with XXX. reported by Doug Hammond.
2010-12-07minor internal python api change - pass the context rather then getting from ↵Campbell Barton
BPy_GetContext() again.
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-12-06include getset's for generating module docs.Campbell Barton
used for bpy.debug/tempdir/driver_namespace which were previously undocumented.
2010-12-06- converted path cleaning on file load to use bPath Iterator functions - ↵Campbell Barton
image & font and sequence paths were being cleaned but not multires, voxel & sound paths. - skip fixing file paths on undo. - simplify bpath alloc and free functions, also pass Main structure so as not to rely on G.main, (needed for file load).
2010-12-06bpath iterator updatesCampbell Barton
- loop over sequencer plugin and texture voxel paths. - fix leak in python bpy.utils.blend_path() and use PyUnicode_DecodeFSDefault() to ensure correct paths with different encodings. - operators to make paths absolute & relative now redraw the view.
2010-12-04disallow setting RNA attributes while drawing, this is bad practice so ↵Campbell Barton
enforcing here has the benifit of making sure people are not manipulating blender scene data in a drawing panel for eg. This is ifdef'd and may be disabled later on, or only enabled in debug mode. This applies to setting any RNA value that has an ID and is not a screen or window-manager datablock. Some addons break this rule and need fixing but from my tests blender UI scripts are ok.
2010-12-03Enabled GCC -Wwrite-strings warning for CMake and replaced many 'char's for ↵Campbell Barton
'const char's,. Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
2010-12-03- added GCC warning -Wstrict-prototypesCampbell Barton
- fixed bug in paste material, exposed by stricter warnings. - removed/renamed various shadowed vars. - removed BGE lamp.colour, only allow lamp.color attribute.
2010-12-03fix for some pedantic warnings.Campbell Barton
2010-11-29fix for error when changing DISBALE_PYTHON -> WITH_PYTHON,Campbell Barton
This define wasn't set in some parts of the BGE causing problems with the view matrix. in CMake define for the entire BGE fixes this.
2010-11-29include headers in cmake source, added a script to check for consistency, ↵Campbell Barton
reporting missing headers & C files. this is important so IDE's using CMake integration always get blender headers. - QtCreator & MSVC for eg, probably others too.
2010-11-28minor changes to the python api.Campbell Barton
- pep8 script was giving an error on non utf8 scons source files. - use PyList_SET_ITEM macro when list type is ensured. - all mathutils types use subtypes to create new types when available. - use defines MAT3_UNITY, MAT4_UNITY to initialize unit matrices.
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-24bugfix [#24884] Loading any preset leads to crashCampbell Barton
caused by own recent commit. update uv operator template too.
2010-11-24bugfix [#23871] OSX panel button bug (Python Namespace issue)Campbell Barton
This is an annoying but which isn't a problem for Python because they don't execute multiple scripts, one after another (there is one __main__ and everything else is a module). So when the __main__ module in sys.modules is overwritten, it decref's the module and clears the dictionary with _PyModule_Clear(), even though the modules dictionary is still in use. Strangely this problem only happens with Python3.1.1 and Python3.2x svn but not 3.1.2 This commit restores the namespace after _PyModule_Clear() sets all its values to None.
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-23use zero initializers instead of memset(), also change PointerRNA_NULL from ↵Campbell Barton
an extern into a define.
2010-11-20- report python script errors to blender report system, or through operators ↵Campbell Barton
reports (when using operator callbacks). - when python operators fail to execute they were returning RUNNING_MODAL, now return CANCELLED now when an operator fails it gives an error popup as well as a message in the terminal.
2010-11-17Keyframing Operators: Improved Error MessagesJoshua Leung
* Keyframing operators now use the reports system for displaying all its error messages. - The benefit of this is that users no longer need to check the console for error messages if keyframing fails. - Unfortunately, reports are not currently viewable in any space/view in Blender, so... * Added a temporary operator (UI_OT_reports_to_textblock), which can be accessed in the UI from the button which appears in place of the icon when more than one report exists. This dumps the current list of reports to a textblock "Recent Reports", from which they can be viewed. This isn't really nice, but at least we now have a way to view these again, which makes debugging some things a pain. * Bugfix #24606 - when trying to add keyframes to F-Curves with F-Modifiers already which alter the curve significantly enough that the keyframes will have no effect, there are now warnings which aim to alleviate any confusion.
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-11-17- move cmake file for python.Campbell Barton
- move bpy_array.c to bpy_rna_array.c - minor syntax changes
2010-11-11fix for building, also use const char in more places.Campbell Barton
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-31own recent commit broke this python import:Campbell Barton
from mathutils.geometry import PolyFill I couldn't find a way for python's inittab to do this so just inserting mathutils.geometry into sys.modules manually.
2010-10-30use PyImport_ExtendInittab for py module initialization rather then adding ↵Campbell Barton
to sys.modules directly, no functional change.
2010-10-27workaround for python bug [#24400] If Script is executed with TEXT Editor, ↵Campbell Barton
it becomes an error. having the blend file as a part of the __file__ variable is not essential, this is fixed in python 3.2 so add an ifdef and don't use the blend file path for py older then 3.2.