Age | Commit message (Collapse) | Author |
|
no functionality change.
|
|
- rename rna collection structs Main prefix to BlendData: eg, MainObjects --> BlendDataObjects
- printing python collection now prints its type (when available)
- renamed shadowed vars in bpy_rna.c.
- when making functions static I also made debugging/test functions static, reverse and add definitions to headers instead.
|
|
python functions.
- use NULL rather then 0 where possible (makes code & function calls more readable IMHO).
- set static variables and functions (exposed some unused vars/funcs).
- use func(void) rather then func() for definitions.
|
|
mostly replace strcpy with BLI_strncpy and multiple strcat's with a BLI_snprintf().
also fix possible crash if CWD isnt available.
|
|
- modifier code was using sizeof() without knowing the sizeof the array when clearing the modifier type array.
- use BLI_snprintf rather then sprintf where the size of the string is known.
- particle drawing code kept a reference to stack float values (not a problem at the moment but would crash if accessed later).
|
|
Synonymous with ('bl_rna' in cls.__dict__)
|
|
- KeyingSetInfo classes are now collected like Panels, Operators etc so bpy.utils.register_module() can be used.
- move bpy.types.register() to bpy.utils.register_class
|
|
matrix__apply_to_copy() and similar.
+ other minor internal changes.
|
|
- python 3.2 does 'import site' on startup which now tries to parse pyconfig.h which isn't copied. so for now just run without importing 'site', alternative would be to copy the header file for posix systems.
- cache PYTHON_VERSION variable so it can be set to 3.2, needed for copying python installation's other then 3.1.
|
|
theres no need for value.negated(), better use -vec / -quat. however -quat didn't exist.
|
|
mathutils updates
|
|
updating and scene.update() executes the update.
|
|
- 'axis' arg was not coerced from a tuple like other args now do.
- 'axis' arg was being modified in-place (VERY BAD).
- also made new function matrix_3x3_as_4x4().
|
|
- made doc generation always sumlink newly built docs to static URL. http://www.blender.org/documentation/250PythonDoc/
|
|
- comparing eulers was ignoring the order.
- printing Euler()'s now prints the order too.
- un-orderable types (all except for Vector's), were not raising an exception when compared with >=, >, <, <=.
|
|
each accept Euler/Quaternion/Matrix types.
eg:
Euler.rotate(Quaternion(axis, angle))
Vector.rotate(Euler((pi/2, 0, 0)))
matrix.resize_4x4() and euler.make_compatible() were still returning an instance of themselves, now return None.
|
|
return new values.
http://wiki.blender.org/index.php/Dev:2.5/Source/Python/Mathutils
This completes the changes proposed.
This will break scripts (fixing coming up next), for full list of changes see mathutils.c comments.
|
|
matching other constructors.
|
|
args. since axis was only allowed when plane was 'R'.
This was already done with Matrix.Rotation().
|
|
- fix for returning empty slices (was returning list rather then tuple).
- report invalid type when mathutils_array_parse_fast() fails.
|
|
http://wiki.blender.org/index.php/Dev:2.5/Source/Python/Mathutils#Coerce_Method_Arguments
|
|
(IDProperties) of a bone causes segfault
though keyframing still doesn't work, it gives an error instead.
also use const char * in more parts of the py/rna api.
|
|
will re-open [#25845] and assign to Brecht.
|
|
functions, so on returning from calling operators the __main__ module could be cleared and imported modules turn into None
calling
bpy.ops.wm.read_factory_settings()
... would clear a scripts namespace if running directly, not in a module.
Fix by backing up and restoring the __main__ module.
Also found BKE_reportf wasnt printing all reports in background mode as BKE_report() was doing.
|
|
a batch script with a double free.
Cant see why this happens but this different fix doesn't crash so using it instead.
|
|
paths as well as strings, support this with blender/rna too.
- bpy.data.*.load() functions were only accepting UTF-8 paths.
- rna functions/properties now accept byte values rather then strings for file paths.
- bpy.path.resolve_ncase now supports byte objects.
|
|
- 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.
|
|
- 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.
|
|
|
|
disable getattr metaclass forwarding attributes from the python class, eg:
bpy.types.Scene.foo != bpy.types.Scene.bl_rna.properties['foo']
... This was convenient but too tricky to properly maintain with attribute assignment and attributes defined within the class.
avoid doubles in dir() by converting to a set and then back to a list.
|
|
|
|
the scale as matrix.decompose()
|
|
*nix with non-standard libjpeg/png/zlib locations was broken.
in the case of python this makes it easier to move to find_package(PythonLibs) when 3.x is supported.
|
|
(would check the same property multiple times)
|
|
- values were added to both the classes __dict__ as well as the internal StructRNA.
- made properties available from the type since this is where the python api assigns them:
>>> bpy.types.Scene.frame_start
<bpy_struct, IntProperty("frame_start")>
- rename RNA_struct_type_properties() -> RNA_struct_type_properties(), added RNA_struct_type_find_property()
|
|
+ other minor changes.
|
|
|
|
long. (related to bug ), found while looking into bug [#25776].
|
|
- multiplying a 2D vector by a 3x3 or 4x4 matrix would use un-initialized memory, now throw an exception.
- use more variable length array BLI_math functions.
|
|
The plane which defined the shear had the factor applied to each axis equally.
This meant that the shear for any 3x3 or 4x4 matrix would be diagonal on the positive values of each axis.
Only being able to create diagonal shear matrices seems stupid, now take a pair of floats for the shear factor corresponding to the plane axis values, so its possible to shear on only one axis of the plane.
|
|
|
|
fix included by Lawrence D'Oliveiro (ldo)
|
|
useful for testing with a predictable environment.
also commented python benchmark prints on exit, can enable when profiling later.
|
|
|
|
add new add function which allocates a number of points instead.
|
|
- invalid dimension type could be passed without raising an error.
- negative dimensions could crash blender, now they raise errors.
- zero length dimension arg was not detected.
- floating point lengths were accepted, now only allow ints.
also comment unused vars.
|
|
|
|
separator can be switched on file load.
|
|
PySequence_Fast(), converting into a tuple every time then back to a float array.
gives approx 6x speedup with eg mathutils.Vector(some_vector).
|
|
|