diff options
author | Ton Roosendaal <ton@blender.org> | 2005-12-29 21:08:01 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-12-29 21:08:01 +0300 |
commit | 8d352139909653e881c99205e71f34f689ff6292 (patch) | |
tree | 67422d1dd33125eca2c064a10448f5829af0fc46 /source/blender/src/interface_panel.c | |
parent | fa24217b2c49f293b18d52db1bc7eb6b7c78a54e (diff) |
More node goodies!
First note; this is a WIP project, some commits might change things that
make formerly saved situations not to work identically... like now!
------ New Material integration ------
Until now, the Node system worked on top of the 'current' Material, just
like how the Material Layers worked. That's quite confusing in practice,
especially to see what Material is a Node, or what is the "base material"
Best solution is to completely separate the two. This has been implemented
as follows now;
- The confusing "Input" node has been removed.
- When choosing a Material in Blender, you can define this Material to be
either 'normal' (default) or be the root of a Node tree.
- If a Material is a Node tree, you have to add Nodes in the tree to see
something happen. An empty Node tree doesn't do anything (black).
- If a Material is a Node Tree, the 'data browse' menus show it with an
'N' mark before the name. The 'data block' buttons display it with the
suffix 'NT' (instead of 'MA').
- In a Node Tree, any Material can be inserted, including itself. Only in
that case the Material is being used itself for shading.
UI changes:
Added a new Panel "Links", which shows:
- where the Material is linked to (Object, Mesh, etc)
- if the Material is a NodeTree or not
- the actual active Material in the Tree
The "Node" Panel itself now only shows buttons from the other nodes, when
they are active.
Further the Material Nodes themselves allow browsing and renaming or adding
new Materials now too.
Second half of today's work was cleaning up selection when the Nodes
overlap... it was possible to drag links from invisible sockets, or click
headers for invisible nodes, etc. This because the mouse input code was
not checking for visibility yet.
Works now even for buttons. :)
Diffstat (limited to 'source/blender/src/interface_panel.c')
-rw-r--r-- | source/blender/src/interface_panel.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/source/blender/src/interface_panel.c b/source/blender/src/interface_panel.c index 23f7d4218b1..2bb31032a04 100644 --- a/source/blender/src/interface_panel.c +++ b/source/blender/src/interface_panel.c @@ -467,7 +467,7 @@ void uiSetPanelHandler(int handler) /* return 1 if visible (create buttons!) */ int uiNewPanel(ScrArea *sa, uiBlock *block, char *panelname, char *tabname, int ofsx, int ofsy, int sizex, int sizey) { - Panel *pa, *palign; + Panel *pa; /* check if Panel exists, then use that one */ pa= sa->panels.first; @@ -500,18 +500,6 @@ int uiNewPanel(ScrArea *sa, uiBlock *block, char *panelname, char *tabname, int pa->sizex= sizex; pa->sizey= sizey; - /* pre align, for good sorting later on */ - if(sa->spacetype==SPACE_BUTS && pa->prev) { - SpaceButs *sbuts= sa->spacedata.first; - - palign= pa->prev; - if(sbuts->align==BUT_VERTICAL) { - pa->ofsy= palign->ofsy - pa->sizey - PNL_HEADER; - } - else if(sbuts->align==BUT_HORIZONTAL) { - pa->ofsx= palign->ofsx + palign->sizex; - } - } /* make new Panel tabbed? */ if(panel_tabbed && group_tabbed) { Panel *papar; @@ -1249,7 +1237,7 @@ int uiAlignPanelStep(ScrArea *sa, float fac) for(a=0 ; a<tot-1; a++, ps++) { psnext= ps+1; - + if(sbuts->align==BUT_VERTICAL) { psnext->pa->ofsx = ps->pa->ofsx; psnext->pa->ofsy = get_panel_real_ofsy(ps->pa) - psnext->pa->sizey-PNL_HEADER-PNL_DIST; |