This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender
Campbell Barton 0714d28236 python operators (in bpy_opwrapper.*)
This means you can define an operator in python that is called from C or Python - like any other operator.

Python functions for invoke and exec can be registered with an operator name.

keywords are read from the python exec() function, then used to create operator properties. The default python values are used to set the property type and defaults.

def exec(size=2.0, text="blah"): ...

is equivalent to...
prop = RNA_def_property(ot->srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_default(prop, 2.0f);

prop = RNA_def_property(ot->srna, "size", PROP_STRING, PROP_NONE);
RNA_def_property_string_default(prop, "blah");


TODO -
* make use of events
* return OPERATOR_CANCELLED/OPERATOR_FINISHED.. etc
* add support for array args
* more testing
2008-12-27 14:52:49 +00:00
..
2008-12-23 21:20:34 +00:00
2008-12-26 20:38:52 +00:00
2008-12-23 21:20:34 +00:00
2008-12-26 20:38:52 +00:00
2008-12-23 21:20:34 +00:00
2008-12-27 11:44:00 +00:00
2008-12-23 21:20:34 +00:00
2008-12-23 21:20:34 +00:00
2008-12-23 21:20:34 +00:00
2008-12-23 21:20:34 +00:00
2008-12-23 21:20:34 +00:00
2008-12-23 21:20:34 +00:00
2008-12-23 16:07:24 +00:00
2008-11-12 21:16:53 +00:00
2008-11-12 21:16:53 +00:00