diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-08-08 20:44:16 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-08-08 20:44:16 +0400 |
commit | bd3ec606517f0ca02d503a1856963b0a2ddc32e1 (patch) | |
tree | 4251dbafb08ca1c88dd1cd5613fa2f623d251dc3 /source/blenderplayer/bad_level_call_stubs | |
parent | a1693168f24c818e3902bd95352aa0c5fb3b7d1c (diff) |
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.
Diffstat (limited to 'source/blenderplayer/bad_level_call_stubs')
-rw-r--r-- | source/blenderplayer/bad_level_call_stubs/stubs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c index 69cb0dc619b..9ae2cb0c353 100644 --- a/source/blenderplayer/bad_level_call_stubs/stubs.c +++ b/source/blenderplayer/bad_level_call_stubs/stubs.c @@ -96,6 +96,7 @@ struct Tex; struct TexResult; struct Text; struct ToolSettings; +struct View2D; struct View3D; struct bAction; struct bArmature; @@ -212,6 +213,9 @@ void *ED_region_draw_cb_activate(struct ARegionType *art, void(*draw)(const stru void *ED_region_draw_cb_customdata(void *handle) {return 0;} /* XXX This one looks wrong also */ void ED_region_draw_cb_exit(struct ARegionType *art, void *handle) {} void ED_area_headerprint(struct ScrArea *sa, char *str) {} +void UI_view2d_region_to_view(struct View2D *v2d, int x, int y, float *viewx, float *viewy) {} +void UI_view2d_view_to_region(struct View2D *v2d, float x, float y, int *regionx, int *regiony) {} +void UI_view2d_to_region_no_clip(struct View2D *v2d, float x, float y, int *regionx, int *region_y) {} struct EditBone *ED_armature_bone_get_mirrored(struct ListBase *edbo, struct EditBone *ebo) {return (struct EditBone *) NULL;} struct EditBone *ED_armature_edit_bone_add(struct bArmature *arm, char *name) {return (struct EditBone*) NULL;} |