Age | Commit message (Collapse) | Author |
|
from entire arrays, as for insert keyframe.
Enabled the 'keyframe_delete' method for RNA structs.
|
|
and raising an error if its invalid.
|
|
need to be stored in the operator type or in the module which isnt nice for modal operators.
|
|
related to operators, this means python can now make operators that draw in the 3D viewport interactively.
nicer then 2.4x space handelers because you can register draw handelers to draw pre/post 3d space or in pixel space.
|
|
rename image.save() --> image.save_render() because it uses render settings for saving.
added image.save() which is like pressing save in the image view, saving to the images path and removing the dirty flag.
|
|
flag)
+ improved exception messages.
|
|
|
|
set, also raise an error from python if this is attempted
|
|
Vector callbacks still missing clamp checks
|
|
Examples.
euler = Euler(1, 2, 3)
euler.order = 'ZXY'
euler = matrix.to_euler('XZY')
Still missing rna support. this still wont give the right order, defaulting to XYZ.
eul = object.rotation_euler
|
|
|
|
split PropertyRNA off into 3 types, base type, collection and array, since array and collections needed internal checks inside almost every function its better to have the, as subclassed to the property type. This makes introspection more useful.
Also made printing of structs and properties prettier giveing type and length.
|
|
was freed which made re-registering fail.
now extensions can be enabled and disabled without having to reload them.
|
|
only one script at the moment:
[#20848] Blender Gears for 2.5 (for ideasman42)
from Michel Anders (varkenvarken)
|
|
register() function rather then making import automatically run the register functions (generally considered bad practice by python people)
|
|
|
|
|
|
|
|
[#21053] 2.5alpha0 export obj problem
+ some minor changes.
|
|
from Martin Bürbaum (pontiac)
(with own minor changes)
|
|
|
|
|
|
access Matrix.is_negative
renamed Mathutils attribute wrapped -> is_wrapped
|
|
around incorrectly in r24435 before that. freeptr in BPy_StructRNA
was uninitialized when creating bpy.context.
|
|
OSX 10.5 PPC kept crashing on exit. After blaming bad compiles, bad python libs
and all other reasons (almost was switching to linux!) brecht found the bad line
in python free code. There was code freeing stuff whilst it wasnt allowed to.
Mac PPC gets hug!
|
|
object layers wasnt working from py)
also commented operator subclassing, loosing py property order.
|
|
|
|
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.
|
|
|
|
Fixed and completed support for returning multiple values. This includes support for returning arrays, both fixed and dynamically sized. The way this is achieved is by storing an additional int value next to the dynamic parameter in the ParameterList stack which gets passed to the C function as an additional parameter. In the case of return parameters it is duty of the C function to set this int to the correct length value for the dynamic parameter (which makes sense). Note that for the dynamic output/return parameter it is assumed the function has allocated that memory (which gets freed automatically).
Also, I cleaned the makesrna's bridge function generation code a bit and renamed PROP_RETURN to PROP_OUTPUT, which represents better the reality now that there are multiple returns. The function now to mark multiple returns (outputs) is RNA_def_function_output.
For an example, look at Action.get_frame_range in rna_action_api.c, by the way Aligorith I removed the #ifdef for this function now that there's support for returning arrays, feel free to modify (the function seems to work).
|
|
matches the set that python operators themselves return. eg.
{'MODAL'} or... {'FINISHED'}
|
|
startup time speedup on my system.
|
|
|
|
written from scratch by Daniel Salazar (zanqdo). added own modifications.
New property type
bpy.props.FloatVectorProperty(), only difference with float is it takes a 'size' argument and optional 'default' sequence of floats.
moved bpy.props.* functions out of bpy_rna.c into their own C file.
|
|
blender supports type changing for textures in a way that python doesnt.
add a new general function.
Example usage:
tex = bpy.data.textures.new("Foo")
tex.type = 'IMAGE'
tex = tex.recast_type()
Macro to give the number of users accounting for fake user.
ID_REAL_USERS(id)
Use this so you can remove a datablock if it has a fake users as well as apply transformations to it in the 3D view.
Move api function bpy.data.add_texture() --> bpy.data.textures.new()/remove()
|
|
property if it wasnt found.
this is too arbitrary and could break if roperty order is changed.
store the property in the operator type that is to be used for menu and enum search func's.
python function for searching operator enums on invoke. (just need dynamic python enums now)
wm.invoke_search_popup(self)
|
|
change how data is added. eg.
bpy.data.add_mesh(name) --> bpy.data.meshes.new(name)
bpy.data.remove_lamp(lamp) --> bpy.data.lamps.remove(lamp)
image and texture stil use add_* funcs
|
|
as PROP_THICK_WRAP does this.
- scene.render_data.frame_path(frame=num), returns the output path for rending images of video.
- scene.render_data.file_extension, readonly attribute, gives the extension ".jpg", ".mov" etc
- player support was guessing names, use the above functions to get the actual names used, accounting for #'s replacing numbers.
|
|
|
|
|
|
bugs in RNA
from the report...
# bug 1. UV properties are not raw editable but are reported
# as RAW_TYPE_INT by RNA causing wrong conversion
# internally (bpy_rna.c line 2205)
# bug 2. raw update of UV coordinates crash blender (rna_access.c line 252)
mtfaces.foreach_set("uv", rawuvs)
# workaround:
#for i in range(int(len(faces)/4)):
# mtfaces[i].uv = uvs[i]
# bug 3. raw update of non-array property fails (rna_access.c line 2270)
mfaces.foreach_set("material_index", mats)
# workaround:
# for i in range(int(len(mfaces))):
# mfaces[i].material_index = mats[i]
# bug 4. It is not possible to add a vertex color layer using mesh API.
me.add_vertex_color()
# no workaround...
|
|
- accept any sequence
- disallow deleting & resizing via slices
|
|
returns Mathutils vectors rather then tuples
|
|
RNA_parameter_list_end() in some places, (ok the function does nothing now, but some day it might do)
|
|
- fixed slice assignment.
- fix for slowdown where getting a slice would get the entire array and free it for every item in the array (malloc and free for arrays >32).
- fix for thick wrapped returning an array referencing the original pointer when coercing into a mathutils type failed.
TODO
- slice assignment currently only sypports lists.
- dimensions are ignored for multidimensional arrays.
|
|
returning arrays, (no functions are using this yet).
patch from Elia Sarti, (vekoon) with some modifications mainly for the python api.
- multiple values are returned as a typle in the order that are defined.
- added support for registered types returning multiple arguments (untested).
- renamed func->ret --> func->c_ret, since this only defines what the C function returns.
|
|
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).
|
|
maintain a reference to the original rna property with callbacks.
also needed for functions that return vectors/matrix's
|
|
callbacks (can happen for operator functions used for registration only).
|
|
* operators now return sets (converted into flags)
* can't remove bpy_operator_wrap.c since macro's still use the custom register funcs
|