|
Blender
V2.93
|
higher level node drawing for the node editor. More...
#include "MEM_guardedalloc.h"#include "DNA_light_types.h"#include "DNA_linestyle_types.h"#include "DNA_material_types.h"#include "DNA_modifier_types.h"#include "DNA_node_types.h"#include "DNA_screen_types.h"#include "DNA_space_types.h"#include "DNA_texture_types.h"#include "DNA_world_types.h"#include "BLI_blenlib.h"#include "BLI_map.hh"#include "BLI_math.h"#include "BLI_set.hh"#include "BLI_span.hh"#include "BLI_string_ref.hh"#include "BLI_vector.hh"#include "BLT_translation.h"#include "BKE_context.h"#include "BKE_lib_id.h"#include "BKE_main.h"#include "BKE_node.h"#include "BKE_node_ui_storage.hh"#include "BKE_object.h"#include "DEG_depsgraph.h"#include "BLF_api.h"#include "BIF_glutil.h"#include "GPU_framebuffer.h"#include "GPU_immediate.h"#include "GPU_immediate_util.h"#include "GPU_matrix.h"#include "GPU_state.h"#include "GPU_viewport.h"#include "WM_api.h"#include "WM_types.h"#include "ED_gpencil.h"#include "ED_node.h"#include "ED_space_api.h"#include "UI_resources.h"#include "UI_view2d.h"#include "RNA_access.h"#include "node_intern.h"Go to the source code of this file.
Macros | |
| #define | MARKER_SHAPE_DIAMOND 0x1 |
| #define | MARKER_SHAPE_SQUARE 0xC |
| #define | MARKER_SHAPE_CIRCLE 0x2 |
| #define | MARKER_SHAPE_INNER_DOT 0x10 |
| #define | NODE_HEADER_ICON_SIZE (0.8f * U.widget_unit) |
| #define | USE_DRAW_TOT_UPDATE |
Variables | |
| static const float | virtual_node_socket_outline_color [4] = {0.5, 0.5, 0.5, 1.0} |
higher level node drawing for the node editor.
Definition in file node_draw.cc.
| #define MARKER_SHAPE_CIRCLE 0x2 |
Definition at line 717 of file node_draw.cc.
| #define MARKER_SHAPE_DIAMOND 0x1 |
Definition at line 715 of file node_draw.cc.
| #define MARKER_SHAPE_INNER_DOT 0x10 |
Definition at line 718 of file node_draw.cc.
| #define MARKER_SHAPE_SQUARE 0xC |
Definition at line 716 of file node_draw.cc.
| #define NODE_HEADER_ICON_SIZE (0.8f * U.widget_unit) |
Definition at line 1254 of file node_draw.cc.
| #define USE_DRAW_TOT_UPDATE |
Definition at line 1823 of file node_draw.cc.
Definition at line 193 of file node_draw.cc.
References Freestyle::a, bNode::flag, NODE_ACTIVE, NODE_BACKGROUND, NODE_SELECT, and bNode::parent.
Referenced by ED_node_sort().
Definition at line 1769 of file node_draw.cc.
References count, bNodeSocket::flag, if(), SpaceNode_Runtime::linkdrag, bNodeTree::links, LISTBASE_FOREACH, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_default(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add(), node, bNodeTree::nodes, ntree, SpaceNode::runtime, SOCK_MULTI_INPUT, and bNodeLink::tosock.
Referenced by node_update_nodetree().
Definition at line 1918 of file node_draw.cc.
References C, View2D::cur, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, TH_NODE_GROUP, UI_block_begin(), UI_block_bounds_set_explicit(), UI_BLOCK_CLIP_EVENTS, UI_block_end(), UI_block_flag_enable(), UI_CNR_NONE, UI_draw_roundbox_4fv(), UI_draw_roundbox_corner_set(), UI_EMBOSS, UI_GetThemeColorShadeAlpha4fv(), ARegion::v2d, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by node_draw_space().
|
static |
Definition at line 1904 of file node_draw.cc.
References C, CTX_wm_space_node(), node_draw_nodetree(), node_uiblocks_init(), node_update_nodetree(), and ntree.
Referenced by node_draw_space().
|
static |
Definition at line 1881 of file node_draw.cc.
References BLF_default(), BLF_draw_default(), ED_node_tree_path_get_fixedbuf(), TH_TEXT_HI, UI_FontThemeColor(), UI_UNIT_X, and UI_UNIT_Y.
Referenced by node_draw_space().
| float ED_node_grid_size | ( | void | ) |
Definition at line 96 of file node_draw.cc.
Referenced by initSnapSpatial(), and node_draw_space().
| void ED_node_socket_draw | ( | bNodeSocket * | sock, |
| const rcti * | rect, | ||
| const float | color[4], | ||
| float | scale | ||
| ) |
Draw a single node socket at default size.
Definition at line 861 of file node_draw.cc.
References BLI_rcti_cent_x(), BLI_rcti_cent_y(), BLI_rcti_resize(), BLI_rcti_size_y(), bNodeSocket::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_blend_get(), GPU_COMP_F32, GPU_COMP_U32, GPU_FETCH_FLOAT, GPU_FETCH_INT, GPU_PRIM_POINTS, GPU_program_point_size(), GPU_SHADER_KEYFRAME_DIAMOND, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform2f(), immVertexFormat(), node_socket_draw(), node_socket_outline_color_get(), NODE_SOCKSIZE, SELECT, size(), state, and bNodeSocket::type.
| void ED_node_sort | ( | bNodeTree * | ntree | ) |
Sort nodes by selection: unselected nodes first, then selected, then the active node at the very end. Relative order is kept intact.
Definition at line 253 of file node_draw.cc.
References Freestyle::a, BLI_insertlinkbefore(), BLI_listbase_count(), BLI_remlink(), compare_nodes(), ListBase::first, bNode::next, bNodeTree::nodes, and ntree.
Referenced by node_attach_invoke(), node_box_select_exec(), node_copy_color_exec(), node_detach_exec(), node_join_exec(), node_mouse_select(), node_parent_set_exec(), node_select_all_exec(), node_select_grouped_exec(), node_select_linked_from_exec(), node_select_linked_to_exec(), and node_select_single().
| void ED_node_tag_update_id | ( | ID * | id | ) |
Definition at line 124 of file node_draw.cc.
References DEG_id_tag_update(), GS, id, bNodeTree::id, ID_LA, ID_MA, ID_WO, ID::name, NC_LAMP, NC_MATERIAL, NC_OBJECT, NC_SCENE, NC_TEXTURE, NC_WORLD, ND_LIGHTING, ND_MODIFIER, ND_NODES, ND_SHADING, ND_WORLD, node_tree_from_ID(), ntree, NTREE_COMPOSIT, NTREE_GEOMETRY, NTREE_SHADER, NTREE_TEXTURE, bNodeTree::type, and WM_main_add_notifier().
Referenced by ED_node_link_insert(), ED_node_tag_update_nodetree(), node_duplicate_exec(), and texture_changed().
Definition at line 164 of file node_draw.cc.
References ED_node_tag_update_id(), FOREACH_NODETREE_BEGIN, FOREACH_NODETREE_END, node, node_connected_to_output(), ntree, NTREE_TEXTURE, ntreeHasTree(), ntreeTexCheckCyclics(), and bNodeTree::type.
Referenced by ED_node_set_active(), ED_object_assign_active_image(), node_add_collection_exec(), node_add_object_exec(), node_add_texture_exec(), node_property_update_default(), node_socket_add_replace(), node_socket_disconnect(), and node_socket_remove().
| void ED_node_tree_update | ( | const bContext * | C | ) |
Definition at line 101 of file node_draw.cc.
References C, CTX_wm_space_node(), bNodeTree::id, id_us_ensure_real(), SpaceNode::nodetree, and snode_set_context().
|
static |
Definition at line 1256 of file node_draw.cc.
References BKE_node_tree_ui_storage_get_from_context(), C, blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), MEM_mallocN, node, NODE_DY, node_error_highest_priority(), node_error_type_to_icon(), node_errors_tooltip_fn(), NODE_HEADER_ICON_SIZE, ntree, UI_block_emboss_set(), UI_BTYPE_BUT, UI_but_func_tooltip_set(), UI_EMBOSS, UI_EMBOSS_NONE, UI_UNIT_Y, uiDefIconBut(), NodeUIStorage::warnings, and rctf::ymax.
Referenced by node_draw_basis().
|
static |
Definition at line 1811 of file node_draw.cc.
References C, node, and ntree.
Referenced by node_draw_nodetree().
|
static |
Definition at line 1292 of file node_draw.cc.
References BASIS_RAD, BKE_node_instance_hash_lookup(), BLI_rctf_is_empty(), BLI_rctf_isect(), C, CTX_data_pointer_get(), View2D::cur, PointerRNA::data, GPU_line_width(), node, NODE_ACTIVE, NODE_ACTIVE_PREVIEW, node_add_error_message_button(), NODE_CUSTOM, NODE_CUSTOM_COLOR, node_draw_mute_line(), node_draw_preview(), node_draw_shadow(), node_draw_sockets(), NODE_DY, node_get_colorid(), NODE_GROUP, NODE_HEADER_ICON_SIZE, NODE_MARGIN_X, NODE_MUTED, NODE_PREVIEW, node_toggle_button_cb(), nodeLabel(), nodeTypeUndefined(), ntree, NTREE_GEOMETRY, bNodePreview::rect, rgba_float_args_set(), SELECT, TH_ACTIVE, TH_NODE, TH_REDALERT, TH_SELECT, TH_TEXT, bNodeTree::type, UI_block_draw(), UI_block_emboss_set(), UI_block_end(), UI_BTYPE_BUT, UI_BTYPE_BUT_TOGGLE, UI_BTYPE_LABEL, UI_but_flag_enable(), UI_but_func_set(), UI_BUT_INACTIVE, UI_CNR_ALL, UI_CNR_BOTTOM_LEFT, UI_CNR_BOTTOM_RIGHT, UI_CNR_TOP_LEFT, UI_CNR_TOP_RIGHT, UI_draw_icon_tri(), UI_draw_roundbox_aa(), UI_draw_roundbox_corner_set(), UI_EMBOSS, UI_EMBOSS_NONE, UI_GetThemeColor3fv(), UI_GetThemeColor4fv(), UI_GetThemeColorBlendShade4fv(), UI_GetThemeColorShadeAlpha4fv(), UI_UNIT_Y, uiDefBut(), uiDefIconBut(), rctf::xmax, rctf::xmin, bNodePreview::xsize, rctf::ymax, rctf::ymin, and bNodePreview::ysize.
Referenced by node_draw_default().
| void node_draw_default | ( | const bContext * | C, |
| ARegion * | region, | ||
| SpaceNode * | snode, | ||
| bNodeTree * | ntree, | ||
| bNode * | node, | ||
| bNodeInstanceKey | key | ||
| ) |
Definition at line 1746 of file node_draw.cc.
References C, node, node_draw_basis(), node_draw_hidden(), NODE_HIDDEN, ntree, and ARegion::v2d.
Referenced by ED_init_custom_node_type(), and ED_node_init_butfuncs().
|
static |
Definition at line 1552 of file node_draw.cc.
References SpaceNode_Runtime::aspect, BLI_rctf_cent_y(), BLI_rctf_size_x(), BLI_rctf_size_y(), C, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_smooth(), GPU_PRIM_LINES, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformThemeColorShade(), immVertex2f(), immVertexFormat(), node, NODE_ACTIVE, NODE_CUSTOM_COLOR, node_draw_mute_line(), node_draw_shadow(), node_draw_sockets(), NODE_DY, node_get_colorid(), NODE_MARGIN_X, NODE_MUTED, node_toggle_button_cb(), nodeLabel(), ntree, pos, round_fl_to_int(), SpaceNode::runtime, SELECT, TH_ACTIVE, TH_NODE, TH_SELECT, TH_TEXT, UI_block_draw(), UI_block_emboss_set(), UI_block_end(), UI_BTYPE_BUT_TOGGLE, UI_BTYPE_LABEL, UI_but_flag_enable(), UI_but_func_set(), UI_BUT_INACTIVE, UI_draw_icon_tri(), UI_draw_roundbox_3fv_alpha(), UI_draw_roundbox_aa(), UI_EMBOSS, UI_EMBOSS_NONE, UI_GetThemeColor4fv(), UI_GetThemeColorBlendShade4fv(), UI_GetThemeColorShadeAlpha4fv(), UI_view2d_scale_get(), uiDefBut(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by node_draw_default().
|
static |
Definition at line 703 of file node_draw.cc.
References GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, LISTBASE_FOREACH, node, node_draw_link_bezier(), and TH_REDALERT.
Referenced by node_draw_basis(), and node_draw_hidden().
| void node_draw_nodetree | ( | const bContext * | C, |
| ARegion * | region, | ||
| SpaceNode * | snode, | ||
| bNodeTree * | ntree, | ||
| bNodeInstanceKey | parent_key | ||
| ) |
Definition at line 1825 of file node_draw.cc.
References BKE_node_instance_key(), BLI_rctf_init_minmax(), BLI_rctf_union(), C, ListBase::first, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, bNodeTree::links, LISTBASE_FOREACH, node, NODE_BACKGROUND, node_draw(), node_draw_link(), nodelink_batch_end(), nodelink_batch_start(), nodeLinkIsHidden(), bNodeTree::nodes, ntree, View2D::tot, and ARegion::v2d.
Referenced by draw_nodetree().
|
static |
Definition at line 929 of file node_draw.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), float(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_RGBA8, GPU_SHADER_2D_IMAGE_COLOR, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), imm_draw_box_wire_2d(), immBindBuiltinProgram(), immDrawPixelsTex(), immDrawPixelsTexSetup(), immUnbindProgram(), immUniformThemeColorShadeAlpha(), immVertexFormat(), node_draw_preview_background(), pos, bNodePreview::rect, state, TH_BACK, rctf::xmax, rctf::xmin, bNodePreview::xsize, rctf::ymax, rctf::ymin, and bNodePreview::ysize.
Referenced by node_draw_basis().
|
static |
Definition at line 911 of file node_draw.cc.
References GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_SHADER_2D_CHECKER, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immRectf(), immUnbindProgram(), immUniform1i(), immUniform4f(), immVertexFormat(), pos, UI_ALPHA_CHECKER_DARK, UI_ALPHA_CHECKER_LIGHT, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by node_draw_preview().
Definition at line 992 of file node_draw.cc.
References alpha, SpaceNode_Runtime::aspect, node, SpaceNode::runtime, SELECT, UI_CNR_ALL, ui_draw_dropshadow(), and UI_draw_roundbox_corner_set().
Referenced by node_draw_basis(), node_draw_frame(), and node_draw_hidden().
| void node_draw_sockets | ( | const View2D * | v2d, |
| const bContext * | C, | ||
| bNodeTree * | ntree, | ||
| bNode * | node, | ||
| bool | draw_outputs, | ||
| bool | select_all | ||
| ) |
Definition at line 999 of file node_draw.cc.
References BLI_listbase_count(), C, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_COMP_U32, GPU_FETCH_FLOAT, GPU_FETCH_INT, GPU_PRIM_POINTS, GPU_program_point_size(), GPU_SHADER_KEYFRAME_DIAMOND, GPU_vertformat_attr_add(), height, immBegin(), immBeginAtMost(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform2f(), immVertexFormat(), LISTBASE_FOREACH, node, NODE_HIDDEN, node_socket_calculate_height(), node_socket_color_get(), node_socket_draw_multi_input(), node_socket_draw_nested(), node_socket_outline_color_get(), NODE_SOCKSIZE, nodeSocketIsHidden(), ntree, RNA_Node, RNA_pointer_create(), SELECT, SOCK_MULTI_INPUT, UI_view2d_scale_get(), and width.
Referenced by node_draw_basis(), node_draw_hidden(), and node_draw_reroute().
Definition at line 1939 of file node_draw.cc.
References BLI_strncpy(), C, center, copy_v2_v2(), CTX_wm_space_node(), CTX_wm_window(), SpaceNode_Runtime::cursor, bNodeTreePath::display_name, draw_group_overlay(), draw_nodespace_back_pix(), draw_nodetree(), draw_tree_path(), ED_annotation_draw_view2d(), ED_node_grid_size(), ED_region_draw_cb_draw(), SpaceNode::edittree, wmWindow::eventstate, SpaceNode::flag, ARegion::gizmo_map, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_DEPTH_NONE, GPU_depth_test(), GPU_framebuffer_bind_no_srgb(), GPU_line_smooth(), GPU_matrix_identity_set(), GPU_matrix_pop(), GPU_matrix_projection_get, GPU_matrix_projection_set, GPU_matrix_push(), GPU_scissor_test(), GPU_viewport_framebuffer_overlay_get(), bNodeTree::id, SpaceNode::id, ListBase::last, SpaceNode_Runtime::linkdrag, LISTBASE_FOREACH, bNodeTreePath::next, node_draw_link(), NODE_GRID_STEPS, NODE_INSTANCE_KEY_NONE, bNodeTreePath::nodetree, SpaceNode::nodetree, ntree, bNodeTreePath::parent_key, bNodeTreePath::prev, REGION_DRAW_POST_VIEW, REGION_DRAW_PRE_VIEW, SpaceNode::runtime, snode_set_context(), snode_setup_v2d(), SNODE_SHOW_GPENCIL, SPACE_NODE, STREQ, TH_BACK, TH_GRID, TH_NODE_GRID_LEVELS, TH_NODE_GROUP, SpaceNode::treepath, UI_DPI_FAC, UI_GetThemeValueType(), UI_ThemeClearColor(), UI_view2d_center_get(), UI_view2d_multi_grid_draw(), UI_view2d_region_to_view(), UI_view2d_scrollers_draw(), UI_view2d_view_ortho(), UI_view2d_view_restore(), UNLIKELY, ARegion::v2d, bNodeTree::view_center, bNodeTreePath::view_center, ARegion::winrct, ARegion::winx, ARegion::winy, WM_draw_region_get_viewport(), WM_gizmomap_draw(), WM_GIZMOMAP_DRAWSTEP_2D, wmOrtho2_pixelspace(), wmEvent::x, rcti::xmin, wmEvent::y, and rcti::ymin.
Referenced by node_main_region_draw().
|
static |
Definition at line 1218 of file node_draw.cc.
References Info, and node_error_type_priority().
Referenced by node_add_error_message_button().
|
static |
Definition at line 1203 of file node_draw.cc.
References BLI_assert, Error, Info, type, and Warning.
Referenced by node_error_highest_priority().
|
static |
Definition at line 1188 of file node_draw.cc.
References BLI_assert, Error, Info, type, and Warning.
Referenced by node_add_error_message_button().
|
static |
Definition at line 1232 of file node_draw.cc.
References BLI_strdupn(), blender::Span< T >::drop_back(), blender::Span< T >::last(), and NodeUIStorage::warnings.
Referenced by node_add_error_message_button().
Definition at line 340 of file node_draw.cc.
References node, nodeFromView(), UI_DPI_FAC, x, and y.
Referenced by node_draw_frame_prepare().
| int node_get_colorid | ( | bNode * | node | ) |
Definition at line 661 of file node_draw.cc.
References node, NODE_CLASS_ATTRIBUTE, NODE_CLASS_CONVERTOR, NODE_CLASS_DISTORT, NODE_CLASS_GEOMETRY, NODE_CLASS_GROUP, NODE_CLASS_INPUT, NODE_CLASS_INTERFACE, NODE_CLASS_LAYOUT, NODE_CLASS_MATTE, NODE_CLASS_OP_COLOR, NODE_CLASS_OP_FILTER, NODE_CLASS_OP_VECTOR, NODE_CLASS_OUTPUT, NODE_CLASS_PATTERN, NODE_CLASS_SCRIPT, NODE_CLASS_SHADER, NODE_CLASS_TEXTURE, NODE_DO_OUTPUT, TH_NODE, TH_NODE_ATTRIBUTE, TH_NODE_COLOR, TH_NODE_CONVERTOR, TH_NODE_DISTORT, TH_NODE_FILTER, TH_NODE_GEOMETRY, TH_NODE_GROUP, TH_NODE_INPUT, TH_NODE_INTERFACE, TH_NODE_LAYOUT, TH_NODE_MATTE, TH_NODE_OUTPUT, TH_NODE_PATTERN, TH_NODE_SCRIPT, TH_NODE_SHADER, TH_NODE_TEXTURE, and TH_NODE_VECTOR.
Referenced by node_draw_basis(), node_draw_frame_label(), and node_draw_hidden().
| int node_get_resize_cursor | ( | int | directions | ) |
Definition at line 1704 of file node_draw.cc.
References NODE_RESIZE_BOTTOM, NODE_RESIZE_LEFT, NODE_RESIZE_RIGHT, NODE_RESIZE_TOP, WM_CURSOR_DEFAULT, WM_CURSOR_EDIT, WM_CURSOR_X_MOVE, and WM_CURSOR_Y_MOVE.
Referenced by node_resize_init(), and node_set_cursor().
| int node_select_area_default | ( | bNode * | node, |
| int | x, | ||
| int | y | ||
| ) |
Definition at line 651 of file node_draw.cc.
References BLI_rctf_isect_pt(), node, x, and y.
Referenced by ED_init_custom_node_type(), and ED_node_init_butfuncs().
Definition at line 1718 of file node_draw.cc.
References BLI_rctf_isect_pt(), SpaceNode::edittree, ListBase::last, node, node_find_indicated_socket(), node_get_resize_cursor(), bNodeTree::nodes, ntree, SOCK_IN, SOCK_OUT, WM_CURSOR_DEFAULT, and WM_cursor_set().
Referenced by node_cursor().
| void node_socket_color_get | ( | bContext * | C, |
| bNodeTree * | ntree, | ||
| PointerRNA * | node_ptr, | ||
| bNodeSocket * | sock, | ||
| float | r_color[4] | ||
| ) |
Definition at line 810 of file node_draw.cc.
References BLI_assert, C, PointerRNA::data, bNodeSocketType::draw_color, if(), node, NODE_MUTED, ntree, ptr, RNA_Node, RNA_NodeSocket, RNA_pointer_create(), RNA_struct_is_a(), PointerRNA::type, and bNodeSocket::typeinfo.
Referenced by node_draw_sockets(), node_socket_draw_nested(), and uiTemplateNodeLink().
|
static |
Definition at line 720 of file node_draw.cc.
References bNodeSocket::display_shape, ELEM, immAttr1f(), immAttr1u(), immAttr4fv(), immVertex2f(), MARKER_SHAPE_CIRCLE, MARKER_SHAPE_DIAMOND, MARKER_SHAPE_INNER_DOT, MARKER_SHAPE_SQUARE, size(), SOCK_DISPLAY_SHAPE_CIRCLE, SOCK_DISPLAY_SHAPE_CIRCLE_DOT, SOCK_DISPLAY_SHAPE_DIAMOND, SOCK_DISPLAY_SHAPE_DIAMOND_DOT, SOCK_DISPLAY_SHAPE_SQUARE, and SOCK_DISPLAY_SHAPE_SQUARE_DOT.
Referenced by ED_node_socket_draw(), and node_socket_draw_nested().
|
static |
Definition at line 765 of file node_draw.cc.
References height, UI_CNR_ALL, UI_draw_roundbox_4fv_ex(), UI_draw_roundbox_corner_set(), and width.
Referenced by node_draw_sockets().
|
static |
Definition at line 825 of file node_draw.cc.
References C, bNodeSocket::locx, bNodeSocket::locy, node_socket_color_get(), node_socket_draw(), node_socket_outline_color_get(), ntree, size(), and bNodeSocket::type.
Referenced by node_draw_sockets().
|
static |
Definition at line 788 of file node_draw.cc.
References copy_v4_fl(), copy_v4_v4(), SOCK_CUSTOM, TH_TEXT_HI, UI_GetThemeColor4fv(), and virtual_node_socket_outline_color.
Referenced by ED_node_socket_draw(), node_draw_sockets(), and node_socket_draw_nested().
Definition at line 330 of file node_draw.cc.
References node, node_to_view(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by node_link_insert_offset_ntree().
Definition at line 323 of file node_draw.cc.
References node, nodeToView(), UI_DPI_FAC, x, and y.
Referenced by node_draw_frame_prepare(), node_draw_reroute_prepare(), node_to_updated_rect(), node_update_basis(), and node_update_hidden().
|
static |
Definition at line 981 of file node_draw.cc.
References C, node, node_select_single(), WM_OP_INVOKE_DEFAULT, and WM_operator_name_call().
Referenced by node_draw_basis(), and node_draw_hidden().
Definition at line 112 of file node_draw.cc.
References GS, id, ID_NT, ID::name, and ntreeFromID().
Referenced by ED_node_tag_update_id().
| int node_tweak_area_default | ( | bNode * | node, |
| int | x, | ||
| int | y | ||
| ) |
Definition at line 656 of file node_draw.cc.
References BLI_rctf_isect_pt(), node, x, and y.
Referenced by ED_init_custom_node_type(), and ED_node_init_butfuncs().
Definition at line 308 of file node_draw.cc.
References BLI_snprintf(), C, CTX_wm_region(), LISTBASE_FOREACH, node, bNodeTree::nodes, ntree, UI_block_begin(), UI_BLOCK_CLIP_EVENTS, UI_block_flag_enable(), and UI_EMBOSS.
Referenced by draw_nodetree().
Definition at line 1762 of file node_draw.cc.
References C, node, and ntree.
Referenced by node_update_nodetree().
Based on settings and sockets in node, set drawing rect info.
Definition at line 350 of file node_draw.cc.
References C, float(), bNodeTree::id, IFACE_, LISTBASE_FOREACH, min_ff(), min_ii(), node, NODE_DY, NODE_DYS, NODE_MULTI_INPUT_LINK_GAP, NODE_MUTED, NODE_OPTIONS, NODE_PREVIEW, NODE_SOCKDY, NODE_SOCKSIZE, node_to_view(), NODE_WIDTH, nodeSocketIsHidden(), nodeSocketLabel(), ntree, RNA_Node, RNA_NodeSocket, RNA_pointer_create(), SOCK_MULTI_INPUT, SWAP, UI_block_align_end(), UI_block_bounds_set_explicit(), UI_block_layout(), UI_block_layout_resolve(), UI_LAYOUT_ALIGN_RIGHT, UI_LAYOUT_PANEL, UI_LAYOUT_VERTICAL, UI_style_get_dpi(), uiLayoutRow(), uiLayoutSetActive(), uiLayoutSetAlignment(), and uiLayoutSetContextPointer().
Referenced by node_update_default().
Definition at line 641 of file node_draw.cc.
References C, node, NODE_HIDDEN, node_update_basis(), node_update_hidden(), and ntree.
Referenced by ED_init_custom_node_type(), and ED_node_init_butfuncs().
|
static |
Based on settings in node, sets drawing rect info.
Definition at line 578 of file node_draw.cc.
References cosf, float(), HIDDEN_RAD, LISTBASE_FOREACH, M_PI, MAX2, max_ff(), node, NODE_DY, NODE_SOCKSIZE, node_to_view(), NODE_WIDTH, nodeSocketIsHidden(), sinf, and UI_block_bounds_set_explicit().
Referenced by node_update_default().
Definition at line 1797 of file node_draw.cc.
References C, count_mutli_input_socket_links(), CTX_wm_space_node(), LISTBASE_FOREACH_BACKWARD, node, node_update(), bNodeTree::nodes, ntree, and ntreeTagUsedSockets().
Referenced by draw_nodetree().
Definition at line 1891 of file node_draw.cc.
References SpaceNode_Runtime::aspect, BLI_rctf_size_x(), center, View2D::cur, float(), SpaceNode::runtime, UI_view2d_center_set(), UI_view2d_view_ortho(), ARegion::v2d, and ARegion::winx.
Referenced by node_draw_space().
Referenced by node_draw_shadow().
|
static |
Definition at line 786 of file node_draw.cc.
Referenced by node_socket_outline_color_get().