Age | Commit message (Collapse) | Author |
|
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.
|
|
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
|
|
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.
|
|
- remove unused code.
- BPY_run_python_script() split in 2, BPY_filepath_exec, BPY_text_exec
- renamed funcs.
|
|
loading sintel.blend).
|
|
also raise ValueError when the vector size is incorrect rather then type error.
|
|
- move boxpack struct out of the public header.
|
|
recent change made to mathutils).
minor improvements/cleanup to exporters.
|
|
reports into python errors.
|
|
blender_include_dirs(${OPENGL_INCLUDE_DIR})
Apparently this is needed for MSVC in some cases, reported by Tamito Kajiyama r33895.
|
|
- 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"
|
|
|
|
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.
|
|
New create option when getting a user resource for creating paths.
bpy.utils.user_resource(type, path, create=False)
|
|
enabled and it will call abort().
made this option advanced so people don't enable along with other features.
|
|
|
|
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.
|
|
single error stop the main module registration loop.
worst case 1 script error could load blender without a UI.
|
|
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).
|
|
- updated tooltip for vertex group mirror.
|
|
and endif() which is no longer needed.
|
|
noted with XXX.
reported by Doug Hammond.
|
|
BPy_GetContext() again.
|
|
in all cases except for the render engine.
this allows python to NULL its internal context while scripts are not running.
|
|
used for bpy.debug/tempdir/driver_namespace which were previously undocumented.
|
|
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).
|
|
- 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.
|
|
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.
|
|
'const char's,.
Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
|
|
- fixed bug in paste material, exposed by stricter warnings.
- removed/renamed various shadowed vars.
- removed BGE lamp.colour, only allow lamp.color attribute.
|
|
|
|
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.
|
|
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.
|
|
- 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.
|
|
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.
|
|
caused by own recent commit. update uv operator template too.
|
|
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.
|
|
|
|
- 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).
|
|
an extern into a define.
|
|
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.
|
|
* 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.
|
|
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.
|
|
- move bpy_array.c to bpy_rna_array.c
- minor syntax changes
|
|
|
|
being treated as None.
|
|
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')
|
|
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.
|
|
to sys.modules directly, no functional change.
|
|
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.
|