Commit Graph

8 Commits

Author SHA1 Message Date
Campbell Barton
8a51d235e6 pep8 cleanup 2012-09-26 21:19:51 +00:00
Campbell Barton
b0371f053c style cleanup 2012-08-17 18:36:20 +00:00
Campbell Barton
dac761057d fix for crash showing tooltip for NODE_OT_add_search() 2012-08-17 11:31:54 +00:00
Campbell Barton
27a8487070 style cleanup: pep8 & unfinished comment from own commit. 2012-08-14 18:43:15 +00:00
Lukas Toenne
e83ef85576 Python node operator for combined node collapsing and hiding unused sockets. Socket hide flag is added to RNA as well, but can only be set when the socket is not connected, to avoid dangling links in editor drawing. Currently this operator has no default hotkey, but can be called from the Node menu. 2012-08-14 17:56:33 +00:00
Lukas Toenne
b465039ee7 Extended the search operator for nodes to also support node groups. The basic node group type is not included in the node items list, instead all existing node groups are added to the items list in the callback. A prefix is used to distinguish base node types from node groups. 2012-08-10 07:22:36 +00:00
Campbell Barton
de131177b0 code cleanup: lazy init enum for node search 2012-08-08 17:02:14 +00:00
Lukas Toenne
bd3ec60651 Search option for adding nodes.
The 'Add' menu in the node editor now has an option 'Search' at the top, which opens a separate popup for searching node types by name.

The operator for this is implemented completely in Python (this could also be done for the regular menu-based Add options in the future). There are a few necessary extensions to the RNA as well:

* The View2D struct in regions is now exposed. Currently only contains converter functions for coordinates from the region to the view (i.e. scrolled and zoomed view space). Used for converting mouse location to node space.

* The SpaceNode exposes the existing 'cursor_location' for operators to store mouse position beyond invoke calls. Not used for anything else (transforms) so far.

* The edit_tree in SpaceNode is also exposed, this is needed for operators to work correctly inside node groups.
2012-08-08 16:44:16 +00:00