Commit Graph

269 Commits

Author SHA1 Message Date
6bb55fd93e py/rna, euler objects order is now wrapped correctly...
eg:
 eul = bpy.context.object.rotation_euler
 eul.order = 'XZY' # will update the objects setting.
2010-04-26 21:04:42 +00:00
4fc4fb9bfb rna/python mathutils module
- return euler rotation values from rna now have correct rotation order.
- mathutils.Euler stored rotation order off by 1. (didnt work at all)
- Euler/Quat/Color sliceing working again.
2010-04-25 23:33:09 +00:00
64359c9abc hash function for property-rna. eg. hash(bpy.context.object.modifiers) 2010-04-25 21:13:42 +00:00
61eb217294 [#22151] Modifier UI crash
own error when editing context return values. r28401
2010-04-25 19:56:43 +00:00
4bd3163ea6 py api: fix for context returning None for an empty list such as 'context.selected_objects', now returns [] 2010-04-24 19:26:05 +00:00
4d39e04102 change mathutils 'repr' functions to closer match input 2010-04-19 22:02:53 +00:00
454470e0bd setting array slices wasnt running rna update
eg:
 scene.visible_layers[:] = obj.layers
2010-04-19 13:37:44 +00:00
67cfc427ee PyAPI
- added new mathutils.Color() type, use with rna so we can do for eg:
 material.diffuse_color.r = 1.0
 # also has hsv access
 material.diffuse_color.s = 0.6

 - made Mathutils and Geometry module names lowercase.
2010-04-11 14:22:27 +00:00
fe9a22a018 py api file rename
- prefix mathutils api.
- 2 blf.c files (annoying for debugging)
- py api docs ignore keying sets as with operators.
2010-04-11 12:05:27 +00:00
ee0a217be3 python function to remove drivers.
eg:
 bpy.context.object.driver_remove("location")

ANIM_remove_driver now accepts -1 as an index for removing all drivers from one path.
2010-04-11 09:13:37 +00:00
6e3920e8fa rna/py/reference doc improvements..
- vectors now respect min/max settings.
- keyframing and adding drivers raises an error in an index is set on a non array, keyframing raises an error if it fails.

reference docs...
- added docstrings for remaining python bpy_struct functions
- added fake class for docs, bpy_struct, which is the base class of everything in bpy.types
- improved inherictance references for struct classes, include bpy_struct members.
2010-04-10 18:35:50 +00:00
40273931a6 Fix, python changes to array properties were not yet calling update
and notifiers like other properties.
2010-04-06 09:11:33 +00:00
bad41fcff5 - new docstrings for bpy.type.Struct methods & some corrections.
- struct.path_to_id() --> path_from_id().
2010-04-06 07:49:10 +00:00
56b67d41aa Bugfix #21916: Baking NLA strips doesn't group transforms
- Added an optional string arg to struct.keyframe_insert() and struct.keyframe_delete() for the name of the group to add the keyframes to (for newly created F-Curves), instead of doing this as post process.

- Added error prints to the RNA function for setting an F-Curve's group. The old way of setting the groups afterwards couldn't be used anymore, since there was no way to find the action the F-Curve belonged to. This is necessary if the F-Curve list is to be kept in a valid state, since adding to any random group that may not be in the same Action does not work well. There were other issues with the list being iterated over changing while it was still being iterated over too...

TODO: 
Find a way to allow the iterator there to still work ok?
2010-04-06 04:25:48 +00:00
e302f33be7 document bpy.types.Struct methods C methods, currently only keyframe_delete() and keyframe_insert() have useful docstrings.
http://www.blender.org/documentation/250PythonDoc/bpy.types.Struct.html?highlight=bpy.types.struct#bpy.types.Struct.keyframe_insert
2010-04-05 22:37:09 +00:00
cb6d2685bd rna/py-api fix.
C functions and python used different argument order, this relied on mapping non-keyword arguments to 'REQUIRED' arguments but meant that you could not have an optional, non-keyword argument.

next commit will make order of arguments consistant (currently only changed order that rna wrapped).
(commit 27674 by Campbell from render25 branch)
2010-03-23 15:25:33 +00:00
d87e7393e3 report an error parsing args, will try fix properly but this involves many changes so do this for now.
(commit 27671 by Campbell from render25 branch)
2010-03-23 15:21:08 +00:00
5bc2d53507 fix for parsing python args to rna functions, was using allocated size as argument count.
(commit 27670 by Campbell from render25 branch)
2010-03-23 15:04:06 +00:00
5fad6edcb0 getting an item from a collection wasnt being checked correctly.
(commit 27665 by Campbell from render25 branch)
2010-03-23 14:48:32 +00:00
1e9bf0cfdb spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text) 2010-03-22 09:30:00 +00:00
391cc2d004 merge own commits into render branch into trunk since 27560
27562, 27570, 27571, 27574, 27576, 27577, 27579, 27590, 27591, 27594, 27595, 27596, 27599, 27605, 27611, 27612, 27613, 27614, 27623
2010-03-20 16:41:01 +00:00
9a986d194c fix for nasty bug where registering properties would register them in the parent classes SRNA, made for confusing rigify args turning up in add sequencer adding collection.
(commit 27433 by Campbell from render25 branch)
2010-03-16 17:20:15 +00:00
46ed51ce26 made argument conversion for much more verbose, wasnt giving enough info with bad operator args.
(commit 27432 by Campbell from render25 branch)
2010-03-16 17:19:42 +00:00
431db9d478 remove unused includes 2010-03-14 16:06:43 +00:00
15f0907563 PyAPI Bugfix - Fix for crash on struct.path_to_id() 2010-03-14 11:44:24 +00:00
969b4673c7 Python/RNA: added collection.move(from, to) for python defined
collection properties.
2010-03-10 20:54:14 +00:00
a53ef075ae python api function for rna objects: object.as_pointer()
This means we can write low level apis in pyton or C where blender data is passed to external C modules without having to have blender support this directly.

Example use case is to get an image pointer then use ctypes to get the image buffer and pass it to a C image processing function.
2010-03-06 12:37:29 +00:00
c0984d59cc Delete keyframe API method now takes array_index = -1 to delete keyframes from entire arrays, as for insert keyframe.
Enabled the 'keyframe_delete' method for RNA structs.
2010-03-01 10:43:02 +00:00
c76b6fcb06 utility function pyrna_enum_value_from_id for getting the enum from a string and raising an error if its invalid. 2010-02-27 15:28:34 +00:00
ddacff06f2 hold the python operator instance in the operator, otherwise the handelers need to be stored in the operator type or in the module which isnt nice for modal operators. 2010-02-27 14:44:46 +00:00
b6acf0bb48 python support for defining region drawing callbacks, while not directly 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.
2010-02-27 13:27:06 +00:00
bbf6dde277 rna/py api
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.
2010-02-26 12:28:44 +00:00
ca5e7113d3 allow python api to set values of library liked data (still checks editable flag)
+ improved exception messages.
2010-02-23 11:19:55 +00:00
4ef1fd1078 game engine support for recording animation back & some other minor changes. 2010-02-22 12:25:58 +00:00
e31d0198e6 exclude self references from the ID search list when PROP_ID_SELF_CHECK is set, also raise an error from python if this is attempted 2010-02-22 08:27:45 +00:00
6589038350 python rna api now clamps values, (was fun to see the spot_size go backwards)
Vector callbacks still missing clamp checks
2010-02-21 14:48:28 +00:00
02e7871149 Mathutils API: Euler support for rotation order.
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
2010-02-20 19:49:04 +00:00
0b3dfc441e pyrna, adding back foreach functions from collections. they are needed! 2010-02-16 19:27:38 +00:00
d8ce09ce53 bugfix [#21173] Autocompleate raises an error
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.
2010-02-15 23:43:51 +00:00
882af97b4b classes were having their dictionary cleared when the blender extension data was freed which made re-registering fail.
now extensions can be enabled and disabled without having to reload them.
2010-02-15 11:24:43 +00:00
677386e53a initial support for extensions in the user preferences
only one script at the moment:
 [#20848] Blender Gears for 2.5 (for ideasman42)
 from Michel Anders (varkenvarken)
2010-02-14 23:33:18 +00:00
39c04315e2 change python scripts so modules which register with blender have a register() function rather then making import automatically run the register functions (generally considered bad practice by python people) 2010-02-14 11:21:21 +00:00
533ed7cdaa Python deprcated PyCObject, use PyCapsule instead. 2010-02-12 21:14:01 +00:00
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
c2b2ccde45 fix for python not being able to call operators with a executuon context. 2010-02-10 11:10:38 +00:00
52b1c37645 [#21039] OBJ import Clamp Scale limited to .01 as lowest Value. Used to be Zero
[#21053] 2.5alpha0 export obj problem
+ some minor changes.
2010-02-09 19:22:57 +00:00
fc123a40d3 patch [#20889] Support "unit"s for FloatProperty
from Martin Bürbaum (pontiac)
(with own minor changes)
2010-02-02 23:03:56 +00:00
039d087171 subtype support for properties in bpy.props. 2010-02-01 22:04:33 +00:00
53f8bbd798 bpy.props.IntVectorProperty & BoolVectorProperty 2010-02-01 10:51:34 +00:00
ec48cbd267 utility functions is_negative_m3 & is_negative_m4, added python Mathutils access Matrix.is_negative
renamed Mathutils attribute wrapped -> is_wrapped
2010-01-30 13:15:39 +00:00