Blender V2.61 - r43446
|
#include <stdio.h>
#include "BLI_listbase.h"
#include "DNA_node_types.h"
#include "DNA_scene_types.h"
#include "BKE_context.h"
#include "BKE_main.h"
#include "BLI_rect.h"
#include "BLI_utildefines.h"
#include "ED_node.h"
#include "ED_screen.h"
#include "ED_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "WM_api.h"
#include "WM_types.h"
#include "UI_view2d.h"
#include "node_intern.h"
Go to the source code of this file.
Definition in file node_select.c.
Definition at line 73 of file node_select.c.
References bNode::flag, NODE_ACTIVE, NODE_BACKGROUND, NODE_SELECT, and bNode::parent.
Referenced by node_sort().
static int node_border_select_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 398 of file node_select.c.
References CTX_wm_region(), CTX_wm_space_node(), SpaceNode::edittree, wmEvent::mval, node_under_mouse(), OPERATOR_CANCELLED, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_boolean_get(), UI_view2d_region_to_view(), ARegion::v2d, and WM_border_select_invoke().
Referenced by NODE_OT_select_border().
static int node_borderselect_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 361 of file node_select.c.
References BLI_isect_rctf(), CTX_wm_region(), CTX_wm_space_node(), SpaceNode::edittree, ListBase::first, bNode::flag, GESTURE_MODAL_SELECT, NA_SELECTED, NC_NODE, bNode::next, node_sort(), bNodeTree::nodes, NULL, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), RNA_int_get(), SELECT, bNode::totr, UI_view2d_region_to_view(), ARegion::v2d, WM_event_add_notifier(), rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by NODE_OT_select_border().
void node_deselect_all | ( | SpaceNode * | snode | ) |
Definition at line 177 of file node_select.c.
References SpaceNode::edittree, ListBase::first, bNode::flag, bNode::next, bNodeTree::nodes, and SELECT.
Referenced by node_add_file_exec(), node_add_node(), node_mouse_select(), node_select_same_type_np(), and node_select_single().
static bNode* node_mouse_select | ( | Main * | bmain, |
SpaceNode * | snode, | ||
ARegion * | ar, | ||
const int | mval[2], | ||
short | extend | ||
) | [static] |
Definition at line 275 of file node_select.c.
References ED_node_set_active(), SpaceNode::edittree, bNode::flag, node_deselect_all(), node_sort(), node_under_mouse(), SELECT, UI_view2d_region_to_view(), and ARegion::v2d.
Referenced by node_select_exec().
void NODE_OT_select | ( | wmOperatorType * | ot | ) |
Definition at line 339 of file node_select.c.
References wmOperatorType::description, ED_operator_node_active(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, node_select_invoke(), OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), RNA_def_int(), and wmOperatorType::srna.
Referenced by node_operatortypes().
void NODE_OT_select_all | ( | wmOperatorType * | ot | ) |
Definition at line 469 of file node_select.c.
References wmOperatorType::description, ED_operator_node_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, node_select_all_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by node_operatortypes().
void NODE_OT_select_border | ( | wmOperatorType * | ot | ) |
Definition at line 418 of file node_select.c.
References wmOperatorType::cancel, wmOperatorType::description, ED_operator_node_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, node_border_select_invoke(), node_borderselect_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, TRUE, WM_border_select_cancel(), WM_border_select_modal(), and WM_operator_properties_gesture_border().
Referenced by node_operatortypes().
void NODE_OT_select_linked_from | ( | wmOperatorType * | ot | ) |
Definition at line 553 of file node_select.c.
References wmOperatorType::description, ED_operator_node_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, node_select_linked_from_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by node_operatortypes().
void NODE_OT_select_linked_to | ( | wmOperatorType * | ot | ) |
Definition at line 511 of file node_select.c.
References wmOperatorType::description, ED_operator_node_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, node_select_linked_to_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by node_operatortypes().
void NODE_OT_select_same_type | ( | wmOperatorType * | ot | ) |
Definition at line 582 of file node_select.c.
References wmOperatorType::description, ED_operator_node_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, node_select_same_type_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by node_operatortypes().
void NODE_OT_select_same_type_next | ( | wmOperatorType * | ot | ) |
Definition at line 612 of file node_select.c.
References wmOperatorType::description, ED_operator_node_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, node_select_same_type_next_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by node_operatortypes().
void NODE_OT_select_same_type_prev | ( | wmOperatorType * | ot | ) |
Definition at line 639 of file node_select.c.
References wmOperatorType::description, ED_operator_node_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, node_select_same_type_prev_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by node_operatortypes().
static int node_select_all_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 443 of file node_select.c.
References CTX_wm_space_node(), SpaceNode::edittree, ListBase::first, bNode::flag, NA_SELECTED, NC_NODE, bNode::next, NODE_SELECT, node_sort(), bNodeTree::nodes, NULL, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by NODE_OT_select_all().
static int node_select_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 305 of file node_select.c.
References CTX_data_main(), CTX_wm_region(), CTX_wm_space_node(), NA_SELECTED, NC_NODE, node_mouse_select(), NULL, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_boolean_get(), RNA_int_get(), and WM_event_add_notifier().
Referenced by node_select_invoke().
static int node_select_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 330 of file node_select.c.
References wmEvent::mval, node_select_exec(), wmOperator::ptr, and RNA_int_set().
Referenced by NODE_OT_select().
static int node_select_linked_from_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 528 of file node_select.c.
References CTX_wm_space_node(), SpaceNode::edittree, ListBase::first, bNode::flag, bNodeLink::fromnode, link(), bNodeTree::links, NA_SELECTED, NC_NODE, bNodeLink::next, bNode::next, NODE_SELECT, node_sort(), NODE_TEST, bNodeTree::nodes, NULL, OPERATOR_FINISHED, bNodeLink::tonode, and WM_event_add_notifier().
Referenced by NODE_OT_select_linked_from().
static int node_select_linked_to_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 486 of file node_select.c.
References CTX_wm_space_node(), SpaceNode::edittree, ListBase::first, bNode::flag, bNodeLink::fromnode, link(), bNodeTree::links, NA_SELECTED, NC_NODE, bNodeLink::next, bNode::next, NODE_SELECT, node_sort(), NODE_TEST, bNodeTree::nodes, NULL, OPERATOR_FINISHED, bNodeLink::tonode, and WM_event_add_notifier().
Referenced by NODE_OT_select_linked_to().
int node_select_same_type | ( | SpaceNode * | snode | ) |
Definition at line 186 of file node_select.c.
References SpaceNode::edittree, ListBase::first, bNode::flag, bNode::next, bNodeTree::nodes, p, SELECT, and bNode::type.
Referenced by node_select_same_type_exec().
static int node_select_same_type_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 570 of file node_select.c.
References CTX_wm_space_node(), SpaceNode::edittree, NA_SELECTED, NC_NODE, node_select_same_type(), node_sort(), NULL, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by NODE_OT_select_same_type().
static int node_select_same_type_next_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 599 of file node_select.c.
References CTX_wm_space_node(), SpaceNode::edittree, NA_SELECTED, NC_NODE, node_select_same_type_np(), node_sort(), NULL, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by NODE_OT_select_same_type_next().
int node_select_same_type_np | ( | SpaceNode * | snode, |
int | dir | ||
) |
Definition at line 220 of file node_select.c.
References SpaceNode::edittree, ListBase::first, bNode::flag, bNode::next, node_deselect_all(), bNodeTree::nodes, p, bNode::prev, SELECT, and bNode::type.
Referenced by node_select_same_type_next_exec(), and node_select_same_type_prev_exec().
static int node_select_same_type_prev_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 627 of file node_select.c.
References CTX_wm_space_node(), SpaceNode::edittree, NA_SELECTED, NC_NODE, node_select_same_type_np(), node_sort(), NULL, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by NODE_OT_select_same_type_prev().
Definition at line 258 of file node_select.c.
References CTX_data_main(), CTX_wm_space_node(), ED_node_set_active(), SpaceNode::edittree, bNode::flag, NA_SELECTED, NC_NODE, node_deselect_all(), node_sort(), NULL, SELECT, and WM_event_add_notifier().
Referenced by node_toggle_button_cb().
static void node_sort | ( | bNodeTree * | ntree | ) | [static] |
Definition at line 123 of file node_select.c.
References BLI_countlist(), BLI_insertlinkbefore(), BLI_remlink(), compare_nodes(), ListBase::first, bNode::next, bNodeTree::nodes, and NULL.
Referenced by node_borderselect_exec(), node_mouse_select(), node_select_all_exec(), node_select_linked_from_exec(), node_select_linked_to_exec(), node_select_same_type_exec(), node_select_same_type_next_exec(), node_select_same_type_prev_exec(), and node_select_single().
Definition at line 61 of file node_select.c.
References BLI_in_rctf(), ListBase::last, bNodeTree::nodes, NULL, bNode::prev, and bNode::totr.
Referenced by node_border_select_invoke(), and node_mouse_select().