[Bf-taskforce25] Operator PyAPI

Campbell Barton ideasman42 at gmail.com
Tue Dec 2 17:16:56 CET 2008


For auto wrapping the operator api we'd need something similar to RNA,
where operator definitions are stored (docstrings would be nice too)
Just wondering if this is planned.

If the operators revieve (context, IDprop) this means python only
needs a list of function names, so it should not be that big a deal.

Mentioning now since an auto PyAPI for operators relies on this.

from python, keyword args could be converted into ID props by the C api.
  context.transform(scale=(1,1,2), space='LOCAL', filter=mySelFunc)

or if we want it to be more state based...
  from Operators import *
  context.setActive()
  transform(scale=(1,1,2), space='LOCAL', filter=mySelFunc)

Notes
* using ID props to set return values was discussed, maybe this means
we have to use  ID props from python (not convert keyword args)
* a way for the operators to return an exception is needed, again this
could be set in the ID prop thats passed to the function, or it could
share an exception method with RNA which also needs one.

-- 
- Campbell


More information about the Bf-taskforce25 mailing list