Blender V2.61 - r43446
|
#include <string.h>
#include <stdio.h>
#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_world_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_rand.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "BKE_screen.h"
#include "BKE_node.h"
#include "ED_space_api.h"
#include "ED_render.h"
#include "ED_screen.h"
#include "WM_api.h"
#include "WM_types.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.
Functions | |
ARegion * | node_has_buttons_region (ScrArea *sa) |
static SpaceLink * | node_new (const bContext *UNUSED(C)) |
static void | node_free (SpaceLink *UNUSED(sl)) |
static void | node_init (struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa)) |
static void | node_area_listener (ScrArea *sa, wmNotifier *wmn) |
static void | node_area_refresh (const struct bContext *C, struct ScrArea *sa) |
static SpaceLink * | node_duplicate (SpaceLink *sl) |
static void | node_buttons_area_init (wmWindowManager *wm, ARegion *ar) |
static void | node_buttons_area_draw (const bContext *C, ARegion *ar) |
static void | node_main_area_init (wmWindowManager *wm, ARegion *ar) |
static void | node_main_area_draw (const bContext *C, ARegion *ar) |
static int | node_drop_poll (bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event)) |
static void | node_id_path_drop_copy (wmDrag *drag, wmDropBox *drop) |
static void | node_dropboxes (void) |
static void | node_header_area_init (wmWindowManager *UNUSED(wm), ARegion *ar) |
static void | node_header_area_draw (const bContext *C, ARegion *ar) |
static void | node_region_listener (ARegion *ar, wmNotifier *wmn) |
static int | node_context (const bContext *C, const char *member, bContextDataResult *result) |
void | ED_spacetype_node (void) |
Variables | |
const char * | node_context_dir [] = {"selected_nodes", NULL} |
Definition in file space_node.c.
void ED_spacetype_node | ( | void | ) |
Definition at line 494 of file space_node.c.
References BKE_spacetype_register(), BKE_ST_MAXNAME, BLI_addhead(), SpaceType::context, ARegionType::draw, SpaceType::dropboxes, SpaceType::duplicate, ED_KEYMAP_FRAMES, ED_KEYMAP_GPENCIL, ED_KEYMAP_HEADER, ED_KEYMAP_UI, ED_KEYMAP_VIEW2D, SpaceType::free, HEADERY, ARegionType::init, SpaceType::init, SpaceType::keymap, ARegionType::keymapflag, ARegionType::listener, SpaceType::listener, MEM_callocN(), SpaceType::name, SpaceType::new, node_area_listener(), node_area_refresh(), node_buttons_area_draw(), node_buttons_area_init(), node_buttons_register(), node_context(), node_dropboxes(), node_duplicate(), node_free(), node_header_area_draw(), node_header_area_init(), node_init(), node_keymap(), node_main_area_draw(), node_main_area_init(), node_menus_register(), node_new(), node_operatortypes(), node_region_listener(), SpaceType::operatortypes, ARegionType::prefsizex, ARegionType::prefsizey, SpaceType::refresh, ARegionType::regionid, SpaceType::regiontypes, RGN_TYPE_HEADER, RGN_TYPE_UI, RGN_TYPE_WINDOW, SPACE_NODE, and SpaceType::spaceid.
Referenced by ED_spacetypes_init().
static void node_area_listener | ( | ScrArea * | sa, |
wmNotifier * | wmn | ||
) | [static] |
Definition at line 167 of file space_node.c.
References wmNotifier::action, wmNotifier::category, wmNotifier::data, ED_area_tag_redraw(), ED_area_tag_refresh(), SpaceNode::edittree, ListBase::first, SpaceNode::flag, ID_MA, NA_ADDED, NA_EDITED, NA_SELECTED, NC_IMAGE, NC_MATERIAL, NC_NODE, NC_OBJECT, NC_SCENE, NC_SCREEN, NC_SPACE, NC_TEXT, NC_TEXTURE, NC_WM, ND_ANIMPLAY, ND_COMPO_RESULT, ND_FILEREAD, ND_FRAME, ND_NODES, ND_OB_SHADING, ND_SHADING, ND_SHADING_DRAW, ND_SPACE_NODE, ND_SPACE_NODE_VIEW, ND_TRANSFORM_DONE, nodeSetActiveID(), SpaceNode::nodetree, nodeUpdateID(), NTREE_COMPOSIT, NTREE_SHADER, NTREE_TEXTURE, SpaceNode::recalc, wmNotifier::reference, SNODE_AUTO_RENDER, ScrArea::spacedata, and SpaceNode::treetype.
Referenced by ED_spacetype_node().
Definition at line 262 of file space_node.c.
References CTX_data_scene(), ED_preview_shader_job(), ListBase::first, GS, SpaceNode::id, ID_LA, ID_MA, ID_WO, ID::name, node_render_changed_exec(), SpaceNode::nodetree, NTREE_COMPOSIT, NTREE_SHADER, NTREE_TEXTURE, NULL, PR_NODE_RENDER, SpaceNode::recalc, snode_composite_job(), snode_set_context(), ScrArea::spacedata, SpaceNode::treetype, Tex::use_nodes, Scene::use_nodes, World::use_nodes, Lamp::use_nodes, and Material::use_nodes.
Referenced by ED_spacetype_node().
Definition at line 331 of file space_node.c.
References ED_region_panels(), and NULL.
Referenced by ED_spacetype_node().
static void node_buttons_area_init | ( | wmWindowManager * | wm, |
ARegion * | ar | ||
) | [static] |
Definition at line 321 of file space_node.c.
References wmWindowManager::defaultconf, ED_region_panels_init(), ARegion::handlers, SPACE_NODE, WM_event_add_keymap_handler(), and WM_keymap_find().
Referenced by ED_spacetype_node().
static int node_context | ( | const bContext * | C, |
const char * | member, | ||
bContextDataResult * | result | ||
) | [static] |
Definition at line 454 of file space_node.c.
References CTX_data_dir(), CTX_data_dir_set(), CTX_data_equals(), CTX_data_list_add(), CTX_data_pointer_set(), CTX_DATA_TYPE_COLLECTION, CTX_DATA_TYPE_POINTER, CTX_data_type_set(), CTX_wm_space_node(), SpaceNode::edittree, bNode::flag, bNodeTree::id, ListBase::last, NODE_ACTIVE, NODE_SELECT, bNodeTree::nodes, bNode::prev, and RNA_Node.
Referenced by ED_spacetype_node().
Definition at line 367 of file space_node.c.
References ELEM, GS, wmDrag::icon, ID_IM, ID::name, wmDrag::poin, wmDrag::type, WM_DRAG_ID, and WM_DRAG_PATH.
Referenced by node_dropboxes().
static void node_dropboxes | ( | void | ) | [static] |
Definition at line 394 of file space_node.c.
References node_drop_poll(), node_id_path_drop_copy(), RGN_TYPE_WINDOW, SPACE_NODE, WM_dropbox_add(), and WM_dropboxmap_find().
Referenced by ED_spacetype_node().
Definition at line 308 of file space_node.c.
References ListBase::first, ListBase::last, SpaceNode::linkdrag, MEM_dupallocN(), SpaceNode::nodetree, and NULL.
Referenced by ED_spacetype_node().
static void node_free | ( | SpaceLink * | UNUSEDsl | ) | [static] |
Definition at line 155 of file space_node.c.
Referenced by ED_spacetype_node().
Definition at line 70 of file space_node.c.
References ARegion::alignment, BKE_area_find_region_type(), BLI_insertlinkafter(), ARegion::flag, MEM_callocN(), NULL, ScrArea::regionbase, ARegion::regiontype, RGN_ALIGN_RIGHT, RGN_FLAG_HIDDEN, RGN_TYPE_HEADER, and RGN_TYPE_UI.
Referenced by node_properties().
Definition at line 411 of file space_node.c.
References CTX_data_scene(), CTX_wm_space_node(), ED_region_header(), and snode_set_context().
Referenced by ED_spacetype_node().
static void node_header_area_init | ( | wmWindowManager * | UNUSEDwm, |
ARegion * | ar | ||
) | [static] |
Definition at line 406 of file space_node.c.
References ED_region_header_init().
Referenced by ED_spacetype_node().
Definition at line 381 of file space_node.c.
References ID::name, wmDrag::path, wmDrag::poin, wmDropBox::ptr, and RNA_string_set().
Referenced by node_dropboxes().
static void node_init | ( | struct wmWindowManager * | UNUSEDwm, |
ScrArea * | UNUSEDsa | ||
) | [static] |
Definition at line 162 of file space_node.c.
Referenced by ED_spacetype_node().
Definition at line 357 of file space_node.c.
References drawnodespace(), and ARegion::v2d.
Referenced by ED_spacetype_node().
static void node_main_area_init | ( | wmWindowManager * | wm, |
ARegion * | ar | ||
) | [static] |
Definition at line 337 of file space_node.c.
References wmWindowManager::defaultconf, ARegion::handlers, View2D::mask, RGN_TYPE_WINDOW, SPACE_NODE, UI_view2d_region_reinit(), ARegion::v2d, V2D_COMMONVIEW_CUSTOM, ARegion::winrct, ARegion::winx, ARegion::winy, WM_dropboxmap_find(), WM_event_add_dropbox_handler(), WM_event_add_keymap_handler(), WM_event_add_keymap_handler_bb(), and WM_keymap_find().
Referenced by ED_spacetype_node().
Definition at line 96 of file space_node.c.
References ARegion::alignment, BLI_addtail(), View2D::cur, ARegion::flag, View2D::keeptot, View2D::keepzoom, View2D::max, View2D::maxzoom, MEM_callocN(), View2D::min, View2D::minzoom, SpaceNode::regionbase, ARegion::regiontype, RGN_ALIGN_BOTTOM, RGN_ALIGN_RIGHT, RGN_FLAG_HIDDEN, RGN_TYPE_HEADER, RGN_TYPE_UI, RGN_TYPE_WINDOW, View2D::scroll, SPACE_NODE, SpaceNode::spacetype, View2D::tot, 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().
static void node_region_listener | ( | ARegion * | ar, |
wmNotifier * | wmn | ||
) | [static] |
Definition at line 423 of file space_node.c.
References wmNotifier::action, wmNotifier::category, wmNotifier::data, ED_region_tag_redraw(), NA_RENAME, NC_ID, NC_MATERIAL, NC_NODE, NC_OBJECT, NC_SCENE, NC_SCREEN, NC_SPACE, NC_TEXTURE, ND_GPENCIL, ND_OB_SHADING, and ND_SPACE_NODE.
Referenced by ED_spacetype_node().
const char* node_context_dir[] = {"selected_nodes", NULL} |
Definition at line 452 of file space_node.c.