Commit Graph

15 Commits

Author SHA1 Message Date
09aa799e53 PyAPI: Use annotations for RNA definitions
- Logical use of fields since they define type information.
- Avoids using ordered-dict metaclass.

Properties using regular assignments will print a warning and load,
however the order is undefined.
2018-07-11 22:18:09 +02:00
28b2f1c305 Manipulator: Python API
Initial support for Python/Manipulator integration
from 'custom-manipulators' branch.

Supports:

- Registering custom manipulators & manipulator-groups.
- Modifying RNA properties, custom values via get/set callbacks,
  or invoking an operator.
- Drawing shape presets for Python defined manipulators (arrow, circle, face-maps)

Limitations:

- Only float properties supported.
- Drawing only supported via shape presets.
  (we'll likely want a way to define custom geometry or draw directly).
- When to refresh, recalculate manipulators will likely need
  integration with notifier system.

Development will be continued in the 2.8 branch
2017-06-26 16:38:04 +10:00
5b51dcacbc PyAPI: add intern strings
Avoid string conversion on each use.
2017-06-21 12:43:19 +10:00
55f481d052 Py-Driver: use intern strings
Avoids managing strings inline
2016-07-31 11:46:36 +10:00
f2a0062042 Use ARRAY_SIZE to replace (sizeof(a) / sizeof(*a)) 2014-06-17 02:47:57 +10:00
a696a0ff1e Python API: create args for meta-classes directly (a little faster).
Also add some new interned strings.
2014-01-20 18:09:00 +11:00
a8601a5702 fix [#34113] operator_menu_enum() - Tooltip not showing descriptions
Python wasn't able to set 'OperatorType.prop', which is used by uiButGetStrInfo().

add 'bl_property' to python operators which is assigned to OperatorType.prop when registering.

(api docs coming next)
2013-02-05 04:41:11 +00:00
93ad97c131 avoid string -> unicode conversion when registering classes, also avoid unlikely but possible crash if the py-class returns new instances of PyObjects it doesnt own when registering the class. 2012-11-22 08:45:32 +00:00
e17fd46c71 formatting edits only to use more consisted style 2011-12-26 12:26:11 +00:00
2b939904ab documentation - brief descriptions for bpy api files. 2011-11-05 08:21:12 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
471c005137 typo fix: end of lines ;; --> ; 2011-08-31 01:07:55 +00:00
fa2ba5fbf5 - use static vars and functions where possible.
- use NULL rather than 0 when used as pointers.
2011-08-28 05:06:30 +00:00
31093223cd SVN maintenance. 2011-06-18 23:22:55 +00:00
82216030e9 py-api: store frequently used strings as unicode PyObject's to avoid creating/distroying every time.
also fix for cmake warning
2011-06-18 08:45:45 +00:00