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.
|
|
- rename functions from camel case.
- added docs for undocumented methods.
- minor functional changes with exceptions and accepting 3d/4d vectors where it makes no difference.
Renamed:
- geometry.Intersect -> intersect_ray_tri
- geometry.ClosestPointOnLine -> intersect_point_line
- geometry.PointInTriangle2D -> intersect_point_tri_2d
- geometry.PointInQuad2D -> intersect_point_quad_2d
- geometry.LineIntersect -> intersect_line_line
- geometry.LineIntersect2D -> intersect_line_line_2d
- geometry.BezierInterp -> interpolate_bezier
- geometry.TriangleArea -> area_tri
- geometry.QuadNormal, TriangleNormal -> normal
- geometry.PolyFill -> tesselate_polygon
- geometry.BoxPack2D -> box_pack_2d
- geometry.BarycentricTransform -> barycentric_transform
|
|
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"
|
|
The main advantage with this is that its close to twice as fast to do 'vertex.co[:]' then 'tuple(vertex.co)', this is common for writing a vertex array.
the correct python behavior in this case is to return a copy of the original type, however euler and quats don't support different sizes so we cant do so easily.
|
|
|
|
|
|
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.
|
|
- equals_v2v2
- project_v2_v2v2
- isect_seg_seg_v2_point
which would be necessery for my further multires interpolation commit
M_Geometry_LineIntersect2D now uses isect_seg_seg_v2_point(). Behaviour of this
function was changed a bit -- it haven't returned intersection point in several
cases when two segments are making angle.
|
|
from Luka Bonavita
See:
http://www.blender.org/documentation/250PythonDoc/mathutils.geometry.html
|
|
This is need to properly handle 3d text (dalai work on GE), before
the BLF_aspect only take one argument, and the result was a call to:
glScalef(aspect, aspect, 1.0)
Now the three value are store in the font (x, y and z) and also
need to be enable using BLF_enable(BLF_ASPECT).
By default all the code that don't have BLF_ASPECT enable work with
a scale of 1.0 (so nothing change to the current UI).
I also remove all the call of BLF_aspect(fontid, 1.0) found in
the editors, because is disable by default, so no need any more.
Campbell the only thing to check is the python api, right now
I modify the api to from:
BLF_aspect(fontid, aspect)
to:
BLF_aspect(fontid, aspect, aspect, 1.0)
This is to avoid break the api, but now you need add the BLF_ASPECT
option to the function py_blf_enable and in some point change
py_blf_aspect to take 3 arguments.
|
|
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.
|
|
would return NAN's in simple cases.
now normalize upon conversion, when setting the quat axis/ange, maintain length by scaling back to the original size afterwards.
|
|
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.
|
|
strlen(str), "surrogateescape"), for converting non utf8 names.
this is needed because some UTF8 names didnt resolve on windows when using surrogateescape'd strings.
This meant you couldn't export to models some directories on windows.
|
|
- remove some redundant declarations
- changed VertexTangent and Path structs to avoid compiler alignment padding.
|
|
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.
|
|
the same subclass as the vectors they were derived from.
|
|
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.
|