|
Blender
V2.93
|
#include "DNA_gpencil_types.h"#include "DNA_light_types.h"#include "DNA_material_types.h"#include "DNA_node_types.h"#include "DNA_world_types.h"#include "MEM_guardedalloc.h"#include "BLI_blenlib.h"#include "BLI_math.h"#include "BKE_context.h"#include "BKE_lib_id.h"#include "BKE_node.h"#include "BKE_screen.h"#include "ED_node.h"#include "ED_render.h"#include "ED_screen.h"#include "ED_space_api.h"#include "UI_resources.h"#include "UI_view2d.h"#include "RNA_access.h"#include "RNA_define.h"#include "RNA_enum_types.h"#include "WM_api.h"#include "WM_types.h"#include "node_intern.h"Go to the source code of this file.
Variables | |
| const char * | node_context_dir [] |
Definition at line 606 of file space_node.c.
References copy_v2_v2(), SpaceNode_Runtime::cursor, and SpaceNode::runtime.
Definition at line 611 of file space_node.c.
References copy_v2_v2(), SpaceNode_Runtime::cursor, and SpaceNode::runtime.
| void ED_node_set_active_viewer_key | ( | SpaceNode * | snode | ) |
Definition at line 225 of file space_node.c.
References bNodeTree::active_viewer_key, ListBase::last, SpaceNode::nodetree, bNodeTreePath::parent_key, and SpaceNode::treepath.
Referenced by ED_node_tree_pop(), ED_node_tree_push(), ED_node_tree_start(), node_mouse_select(), and node_select_single().
| int ED_node_tree_depth | ( | SpaceNode * | snode | ) |
Definition at line 157 of file space_node.c.
References BLI_listbase_count(), and SpaceNode::treepath.
Definition at line 162 of file space_node.c.
References ListBase::last, bNodeTreePath::nodetree, NULL, bNodeTreePath::prev, and SpaceNode::treepath.
Referenced by node_group_separate_exec().
| void ED_node_tree_path_get | ( | SpaceNode * | snode, |
| char * | value | ||
| ) |
Definition at line 187 of file space_node.c.
References LISTBASE_FOREACH_INDEX, and SpaceNode::treepath.
| void ED_node_tree_path_get_fixedbuf | ( | SpaceNode * | snode, |
| char * | value, | ||
| int | max_length | ||
| ) |
Definition at line 204 of file space_node.c.
References BLI_snprintf_rlen(), BLI_strncpy_rlen(), LISTBASE_FOREACH_INDEX, size(), and SpaceNode::treepath.
Referenced by draw_tree_path().
| int ED_node_tree_path_length | ( | SpaceNode * | snode | ) |
Definition at line 174 of file space_node.c.
References length(), LISTBASE_FOREACH_INDEX, and SpaceNode::treepath.
| void ED_node_tree_pop | ( | SpaceNode * | snode | ) |
Definition at line 135 of file space_node.c.
References BLI_remlink(), ED_node_set_active_viewer_key(), SpaceNode::edittree, ListBase::first, ListBase::last, MEM_freeN, NC_SCENE, ND_NODES, bNodeTreePath::nodetree, NULL, SpaceNode::treepath, and WM_main_add_notifier().
Referenced by node_group_edit_exec(), and node_group_separate_exec().
Definition at line 100 of file space_node.c.
References BKE_node_instance_key(), BLI_addtail(), BLI_strncpy(), copy_v2_v2(), bNodeTreePath::display_name, ED_node_set_active_viewer_key(), SpaceNode::edittree, bNodeTree::id, id_us_ensure_real(), ListBase::last, MEM_callocN, bNode::name, NC_SCENE, ND_NODES, NODE_INSTANCE_KEY_BASE, bNodeTreePath::node_name, bNodeTreePath::nodetree, ntree, NULL, bNodeTreePath::parent_key, SpaceNode::treepath, bNodeTree::view_center, bNodeTreePath::view_center, and WM_main_add_notifier().
Referenced by node_group_edit_exec(), node_group_insert_exec(), and node_group_make_exec().
Definition at line 59 of file space_node.c.
References BLI_addtail(), BLI_listbase_clear(), BLI_strncpy(), copy_v2_v2(), bNodeTreePath::display_name, ED_node_set_active_viewer_key(), SpaceNode::edittree, ListBase::first, from, SpaceNode::from, id, bNodeTree::id, SpaceNode::id, id_us_ensure_real(), MEM_callocN, MEM_freeN, ID::name, NC_SCENE, ND_NODES, bNodeTreePath::next, NODE_INSTANCE_KEY_BASE, bNodeTreePath::nodetree, SpaceNode::nodetree, ntree, NTREE_GEOMETRY, NULL, bNodeTreePath::parent_key, SpaceNode::treepath, bNodeTree::type, bNodeTree::view_center, bNodeTreePath::view_center, and WM_main_add_notifier().
Referenced by snode_set_context().
| void ED_spacetype_node | ( | void | ) |
Definition at line 1037 of file space_node.c.
References BKE_spacetype_register(), BKE_ST_MAXNAME, BLI_addhead(), ARegionType::clip_gizmo_events_by_ui, SpaceType::context, SpaceType::create, ARegionType::cursor, ARegionType::draw, SpaceType::dropboxes, SpaceType::duplicate, ED_area_do_mgs_subscribe_for_tool_ui(), ED_KEYMAP_FRAMES, ED_KEYMAP_GIZMO, ED_KEYMAP_GPENCIL, ED_KEYMAP_HEADER, ED_KEYMAP_TOOL, ED_KEYMAP_UI, ED_KEYMAP_VIEW2D, ED_region_generic_tools_region_message_subscribe(), ED_region_generic_tools_region_snap_size(), ARegionType::event_cursor, SpaceType::free, SpaceType::gizmos, HEADERY, SpaceType::id_remap, ARegionType::init, SpaceType::init, SpaceType::keymap, ARegionType::keymapflag, ARegionType::listener, SpaceType::listener, MEM_callocN, ARegionType::message_subscribe, SpaceType::name, node_area_listener(), node_area_refresh(), node_buttons_region_draw(), node_buttons_region_init(), node_buttons_register(), node_context(), node_create(), node_cursor(), node_dropboxes(), node_duplicate(), node_free(), node_header_region_draw(), node_header_region_init(), node_id_remap(), node_init(), node_keymap(), node_main_region_draw(), node_main_region_init(), node_operatortypes(), node_region_listener(), node_space_subtype_get(), node_space_subtype_item_extend(), node_space_subtype_set(), node_toolbar_region_draw(), node_toolbar_region_init(), node_toolbar_register(), node_widgets(), SpaceType::operatortypes, ARegionType::prefsizex, ARegionType::prefsizey, SpaceType::refresh, ARegionType::regionid, SpaceType::regiontypes, RGN_TYPE_HEADER, RGN_TYPE_TOOLS, RGN_TYPE_UI, RGN_TYPE_WINDOW, ARegionType::snap_size, SPACE_NODE, SpaceType::space_subtype_get, SpaceType::space_subtype_item_extend, SpaceType::space_subtype_set, SpaceType::spaceid, and UI_SIDEBAR_PANEL_WIDTH.
Referenced by ED_spacetypes_init().
|
static |
Definition at line 343 of file space_node.c.
References wmNotifier::action, blender::compositor::area(), BKE_area_find_region_type(), wmNotifier::category, wmNotifier::data, ED_area_tag_redraw(), ED_area_tag_refresh(), ED_node_is_compositor(), ED_node_is_geometry(), ED_node_is_shader(), ED_node_is_texture(), SpaceNode::edittree, ELEM, SpaceNode::flag, SpaceNode::id, ID_MA, ListBase::last, NA_ADDED, NA_EDITED, NA_SELECTED, NC_GPENCIL, NC_IMAGE, NC_LINESTYLE, NC_MASK, NC_MATERIAL, NC_MOVIECLIP, NC_NODE, NC_OBJECT, NC_SCENE, NC_SCREEN, NC_SPACE, NC_TEXTURE, NC_WM, NC_WORLD, ND_ANIMPLAY, ND_COMPO_RESULT, ND_FRAME, ND_LAYER_CONTENT, ND_MODIFIER, ND_NODES, ND_OB_SHADING, ND_SHADING, ND_SHADING_DRAW, ND_SHADING_LINKS, ND_SPACE_NODE, ND_SPACE_NODE_VIEW, ND_TRANSFORM_DONE, ND_UNDO, nodeSetActiveID(), SpaceNode::nodetree, nodeUpdateID(), NTREE_COMPOSIT, NULL, params, SpaceNode_Runtime::recalc, wmNotifier::reference, RGN_TYPE_WINDOW, SpaceNode::runtime, SpaceNode::shaderfrom, SNODE_AUTO_RENDER, SNODE_SHADER_LINESTYLE, SNODE_SHADER_WORLD, SpaceNode::treepath, bNodeTree::type, UI_view2d_center_set(), ARegion::v2d, and bNodeTreePath::view_center.
Referenced by ED_spacetype_node().
Definition at line 504 of file space_node.c.
References blender::compositor::area(), C, ED_node_composite_job(), ED_preview_shader_job(), GS, SpaceNode::id, ID_LA, ID_MA, ID_WO, if(), ID::name, node_render_changed_exec(), SpaceNode::nodetree, NTREE_COMPOSIT, NTREE_SHADER, NTREE_TEXTURE, NULL, PR_NODE_RENDER, SpaceNode_Runtime::recalc, SpaceNode::runtime, scene, snode_set_context(), tex, bNodeTree::type, Light::use_nodes, Material::use_nodes, Scene::use_nodes, Tex::use_nodes, and World::use_nodes.
Referenced by ED_spacetype_node().
Definition at line 585 of file space_node.c.
References C, and ED_region_panels().
Referenced by ED_spacetype_node().
|
static |
Definition at line 575 of file space_node.c.
References wmWindowManager::defaultconf, ED_region_panels_init(), ARegion::handlers, SPACE_NODE, WM_event_add_keymap_handler(), and WM_keymap_ensure().
Referenced by ED_spacetype_node().
|
static |
Definition at line 679 of file space_node.c.
References ID_GR, and WM_drag_is_ID_type().
Referenced by node_dropboxes().
|
static |
Definition at line 872 of file space_node.c.
References C, CTX_data_dir(), CTX_data_dir_set(), CTX_data_equals(), CTX_data_id_pointer_set(), CTX_data_list_add(), CTX_data_pointer_set(), CTX_DATA_TYPE_COLLECTION, CTX_DATA_TYPE_POINTER, CTX_data_type_set(), CTX_RESULT_MEMBER_NOT_FOUND, CTX_RESULT_OK, CTX_wm_space_node(), SpaceNode::edittree, GS, bNodeTree::id, SpaceNode::id, ID_LA, ID_MA, ID_WO, ListBase::last, ID::name, node, node_context_dir, NODE_SELECT, nodeGetActive(), bNodeTree::nodes, SpaceNode::nodetree, bNodeTree::previews, result, RNA_Node, and RNA_NodeInstanceHash.
Referenced by direct_link_area(), ED_spacetype_node(), try_get_socket_to_preview_for_spreadsheet(), and write_area().
Definition at line 250 of file space_node.c.
References ARegion::alignment, BLI_addtail(), View2D::cur, ARegion::flag, SpaceNode::flag, View2D::keeptot, View2D::keepzoom, View2D::max, View2D::maxzoom, MEM_callocN, View2D::min, View2D::minzoom, NODE_TREE_TYPES_BEGIN, NODE_TREE_TYPES_END, SpaceNode::regionbase, ARegion::regiontype, RGN_ALIGN_BOTTOM, RGN_ALIGN_LEFT, RGN_ALIGN_RIGHT, RGN_ALIGN_TOP, RGN_FLAG_HIDDEN, RGN_TYPE_HEADER, RGN_TYPE_TOOLS, RGN_TYPE_UI, RGN_TYPE_WINDOW, View2D::scroll, SNODE_SHOW_GPENCIL, SNODE_USE_ALPHA, SPACE_NODE, SpaceNode::spacetype, View2D::tot, SpaceNode::tree_idname, USER_HEADER_BOTTOM, ARegion::v2d, V2D_KEEPASPECT, V2D_LIMITZOOM, V2D_SCROLL_BOTTOM, V2D_SCROLL_RIGHT, rctf::xmax, rctf::xmin, rctf::ymax, rctf::ymin, and SpaceNode::zoom.
Referenced by ED_spacetype_node().
Definition at line 616 of file space_node.c.
References blender::compositor::area(), SpaceNode_Runtime::cursor, wmWindow::eventstate, node_set_cursor(), SpaceNode::runtime, UI_DPI_FAC, UI_view2d_region_to_view(), ARegion::v2d, ARegion::winrct, wmEvent::x, rcti::xmin, wmEvent::y, and rcti::ymin.
Referenced by ED_spacetype_node().
|
static |
Definition at line 744 of file space_node.c.
References node_collection_drop_poll(), node_group_drop_copy(), node_group_drop_poll(), node_id_drop_copy(), node_id_path_drop_copy(), node_ima_drop_poll(), node_mask_drop_poll(), node_object_drop_poll(), node_texture_drop_poll(), RGN_TYPE_WINDOW, SPACE_NODE, WM_drag_free_imported_drag_ID(), WM_dropbox_add(), and WM_dropboxmap_find().
Referenced by ED_spacetype_node().
Definition at line 554 of file space_node.c.
References BLI_duplicatelist(), BLI_listbase_clear(), SpaceNode_Runtime::linkdrag, MEM_dupallocN, NULL, SpaceNode::runtime, and SpaceNode::treepath.
Referenced by ED_spacetype_node().
|
static |
Definition at line 322 of file space_node.c.
References LISTBASE_FOREACH_MUTABLE, MEM_freeN, MEM_SAFE_FREE, SpaceNode::runtime, and SpaceNode::treepath.
Referenced by ED_spacetype_node().
Definition at line 715 of file space_node.c.
References id, ID::name, wmDropBox::ptr, RNA_string_set(), and WM_drag_get_local_ID_or_import_from_asset().
Referenced by node_dropboxes().
|
static |
Definition at line 663 of file space_node.c.
References ID_NT, and WM_drag_is_ID_type().
Referenced by node_dropboxes().
Definition at line 788 of file space_node.c.
References C, ED_region_header(), and snode_set_context().
Referenced by ED_spacetype_node().
|
static |
Definition at line 783 of file space_node.c.
References ED_region_header_init().
Referenced by ED_spacetype_node().
Definition at line 722 of file space_node.c.
References id, ID::name, wmDropBox::ptr, RNA_string_set(), and WM_drag_get_local_ID_or_import_from_asset().
Referenced by node_dropboxes().
Definition at line 729 of file space_node.c.
References id, ID::name, wmDrag::path, wmDropBox::ptr, RNA_string_set(), RNA_struct_property_unset(), and WM_drag_get_local_ID_or_import_from_asset().
Referenced by node_dropboxes().
|
static |
Definition at line 946 of file space_node.c.
References BLI_freelistN(), BLI_remlink(), SpaceNode::edittree, ListBase::first, SpaceNode::flag, SpaceNode::from, SpaceNode::gpd, GS, SpaceNode::id, ID_GD, ID_NT, ID_OB, id_us_ensure_real(), id_us_min(), id_us_plus(), ListBase::last, MEM_freeN, ID::name, bNodeTreePath::next, bNodeTreePath::nodetree, SpaceNode::nodetree, NULL, SNODE_PIN, and SpaceNode::treepath.
Referenced by ED_spacetype_node().
|
static |
Definition at line 695 of file space_node.c.
References ELEM, wmDrag::icon, ID_IM, wmDrag::type, WM_drag_is_ID_type(), and WM_DRAG_PATH.
Referenced by node_dropboxes().
|
static |
Definition at line 334 of file space_node.c.
References blender::compositor::area(), if(), MEM_callocN, NULL, and SpaceNode::runtime.
Referenced by ED_spacetype_node().
Definition at line 656 of file space_node.c.
References C, and node_draw_space().
Referenced by ED_spacetype_node().
|
static |
Definition at line 636 of file space_node.c.
References wmWindowManager::defaultconf, ARegion::handlers, RGN_TYPE_WINDOW, SPACE_NODE, UI_view2d_region_reinit(), ARegion::v2d, V2D_COMMONVIEW_CUSTOM, ARegion::winx, ARegion::winy, WM_dropboxmap_find(), WM_event_add_dropbox_handler(), WM_event_add_keymap_handler(), WM_event_add_keymap_handler_v2d_mask(), and WM_keymap_ensure().
Referenced by ED_spacetype_node().
|
static |
Definition at line 707 of file space_node.c.
References ID_MSK, and WM_drag_is_ID_type().
Referenced by node_dropboxes().
|
static |
Definition at line 671 of file space_node.c.
References ID_OB, and WM_drag_is_ID_type().
Referenced by node_dropboxes().
|
static |
Definition at line 797 of file space_node.c.
References wmNotifier::action, wmNotifier::category, wmNotifier::data, ED_region_tag_redraw(), ELEM, ARegion::gizmo_map, NA_EDITED, NA_RENAME, NA_SELECTED, NC_GPENCIL, NC_ID, NC_LINESTYLE, NC_MATERIAL, NC_NODE, NC_OBJECT, NC_SCENE, NC_SCREEN, NC_SPACE, NC_TEXTURE, NC_WM, NC_WORLD, ND_ANIMPLAY, ND_GPENCIL_EDITMODE, ND_JOB, ND_LAYER, ND_LAYOUTSET, ND_OB_SHADING, ND_RENDER_RESULT, ND_SPACE_NODE, ND_SPACE_NODE_VIEW, params, and WM_gizmomap_tag_refresh().
Referenced by ED_spacetype_node().
|
static |
Definition at line 1014 of file space_node.c.
References blender::compositor::area(), rna_node_tree_idname_to_enum(), and SpaceNode::tree_idname.
Referenced by ED_spacetype_node().
|
static |
Definition at line 1026 of file space_node.c.
References C, free(), MEM_freeN, RNA_enum_items_add(), and RNA_enum_node_tree_types_itemf_impl().
Referenced by ED_spacetype_node().
|
static |
Definition at line 1020 of file space_node.c.
References blender::compositor::area(), ED_node_set_tree_type(), and rna_node_tree_type_from_enum().
Referenced by ED_spacetype_node().
|
static |
Definition at line 687 of file space_node.c.
References ID_TE, and WM_drag_is_ID_type().
Referenced by node_dropboxes().
Definition at line 601 of file space_node.c.
References C, and ED_region_panels().
Referenced by ED_spacetype_node().
|
static |
Definition at line 591 of file space_node.c.
References wmWindowManager::defaultconf, ED_region_panels_init(), ARegion::handlers, SPACE_NODE, WM_event_add_keymap_handler(), and WM_keymap_ensure().
Referenced by ED_spacetype_node().
|
static |
Definition at line 935 of file space_node.c.
References NODE_GGT_backdrop_corner_pin(), NODE_GGT_backdrop_crop(), NODE_GGT_backdrop_sun_beams(), NODE_GGT_backdrop_transform(), RGN_TYPE_WINDOW, SPACE_NODE, WM_gizmogrouptype_append_and_link(), and WM_gizmomaptype_ensure().
Referenced by ED_spacetype_node().
Definition at line 233 of file space_node.c.
References ListBase::last, bNodeTreePath::prev, sub_v2_v2v2(), SpaceNode::treepath, bNodeTreePath::view_center, x, and y.
Referenced by node_group_separate_exec().
| const char* node_context_dir[] |