Commit Graph

10 Commits

Author SHA1 Message Date
Campbell Barton
5afd084513 replace dynamic_menu.py with Menu classmethods much less complicated.
access append/prepend eg.

bpy.types.INFO_MT_file_import.append(lambda self, context: self.layout.operator("import_some.format"))
2009-12-25 22:16:19 +00:00
Campbell Barton
06f1505a4a bugfix [#20253] Import/Export fails 2009-12-25 20:47:23 +00:00
Campbell Barton
5f4e24d599 operator draw function working again. needed to add layout to the operator to give access to "self.layout" - like panels, headers and manu's have 2009-12-24 21:17:14 +00:00
Campbell Barton
bbe13e7823 * register operators like other classes
* operators now return sets (converted into flags)
* can't remove bpy_operator_wrap.c since macro's still use the custom register funcs
2009-12-24 19:50:43 +00:00
Campbell Barton
7fc4ab2aab add pep8 headers so these scripts spit out errors when running pep8.
made some changes but mostly these scripts will give pep8 warnings.
2009-12-13 14:38:30 +00:00
Campbell Barton
095994796d tabs 2 spaces 2009-12-13 14:00:39 +00:00
Campbell Barton
caab05ec8c rna UI api rename...
note: this aims to follow pep8 however I chose to use 'prop/props' rather then 'property/properties' because it would make function names too long.

itemR() --> prop()
items_enumR() --> props_enum()
item_menu_enumR() --> prop_menu_enum()
item_pointerR() --> prop_pointer()
itemO() --> operator()
item_enumO() --> operator_enum()
items_enumO() --> operator_enums()
item_menu_enumO() --> operator_menu_enum()
item_booleanO() --> operator_boolean()
item_intO() --> operator_int()
item_floatO() --> operator_float()
item_stringO() --> operator_string()
itemL() --> label()
itemM() --> menu()
itemS() --> separator()

batch script used http://www.pasteall.org/9345
2009-11-23 00:27:30 +00:00
Campbell Barton
3119eaf284 - dir() now works for collection functions
- group.objects.link/unlink use exceptions rather then return values
- scene.add_object/remove_object --> scene.objects.link/unlink
2009-11-20 10:00:54 +00:00
Campbell Barton
e61c90e416 operators were copying the properties from the rna operator into the class instance.
however this meant the invoke function could not modify properties for exec to use (unless it called exec directly after)
since the popup for eg would re-instance the python class each time.

now use the operator properties directly through rna without an automatic copy.

now an operator attribute is accessed like this...
self.path --> self.properties.path
2009-11-19 17:12:08 +00:00
Campbell Barton
8af525f860 bpy.ops.import.obj("somepath") is invalid syntax because import is a keyword.
rename import to import_scene, import_anim, future import_sequence_edl, import_model etc..
2009-11-04 17:16:58 +00:00