diff options
author | Ton Roosendaal <ton@blender.org> | 2005-12-30 14:25:15 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-12-30 14:25:15 +0300 |
commit | d921d6be6f3b06cc49923d3546b4105ec9a247f4 (patch) | |
tree | 338f76791accc95999e2d94e2eabc85406389a59 /source/blender/src/header_buttonswin.c | |
parent | 10d67f254c6ed61b395402294b91ffb3389c41a8 (diff) |
Orange: daily noodle updates;
- Texture Node: now displays 'intensity values' in node too, and has input,
and shows in buttons when activated in Node editor. (no browsing buttons
yet...)
- New: "Normal Node". This uses a new UI button, which allows to quickly
input a normal vector, based on spherical coordinates.
The Normal Node has optional vector input, and delivers a dot product
then. This can be used as a blending factor between nodes, or for fake
extra light in a certain direction.
- New: "Geometry Node". This actually replaces the Input node. It offers
all coordinates (vectors) as being the starting point for shading and
for textures. Note: for preview render this doesn't give much different
results yet... this is the start for real render support!
- http://www.blender.org/bf/rt5.jpg
The two new nodes in action
- Bugfix: the "Block" button (which delivers popups) did not return a
correct event when nothing happened (mouse moved out), which could
cause mouse clicks to be passed on to the queue.
Diffstat (limited to 'source/blender/src/header_buttonswin.c')
-rw-r--r-- | source/blender/src/header_buttonswin.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/source/blender/src/header_buttonswin.c b/source/blender/src/header_buttonswin.c index e6869256402..60099a0f1d9 100644 --- a/source/blender/src/header_buttonswin.c +++ b/source/blender/src/header_buttonswin.c @@ -46,6 +46,7 @@ #include "DNA_armature_types.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_screen_types.h" @@ -67,6 +68,7 @@ #include "BKE_library.h" #include "BKE_main.h" #include "BKE_material.h" +#include "BKE_node.h" #include "BKE_texture.h" #include "BKE_utildefines.h" #include "BSE_drawipo.h" @@ -280,12 +282,22 @@ void buttons_active_id(ID **id, ID **idfrom) if(G.buts->texfrom==0) { if(ob && ob->type<OB_LAMP && ob->type) { + bNode *node= NULL; + ma= give_current_material(ob, ob->actcol); - ma= get_active_matlayer(ma); - *idfrom= (ID *)ma; - if(ma) { - mtex= ma->mtex[ ma->texact ]; - if(mtex) *id= (ID *)mtex->tex; + if(ma && ma->use_nodes) + node= nodeGetActiveID(ma->nodetree, ID_TE); + if(node) { + *idfrom= NULL; + *id= node->id; + } + else { + ma= get_active_matlayer(ma); + *idfrom= (ID *)ma; + if(ma) { + mtex= ma->mtex[ ma->texact ]; + if(mtex) *id= (ID *)mtex->tex; + } } } } |