Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-10-19 18:03:02 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-10-19 18:03:02 +0400
commitdd96bf6168b60639701dd0ff512806e3fe1b65d0 (patch)
tree3873125b4f2d05eddfd25cc9e954c6a53149a60b /source/blender/blenkernel/intern/material.c
parent51f11abe45097cbba59626ede06c3832bcc522e2 (diff)
- added xmirror to the weightpaint options
- made texture_slot return the texture slot for the node texture
Diffstat (limited to 'source/blender/blenkernel/intern/material.c')
-rw-r--r--source/blender/blenkernel/intern/material.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index ab700ab283c..c2260e1e761 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -485,6 +485,18 @@ ID *material_from(Object *ob, int act)
else return ob->data;
}
+Material *give_node_material(Material *ma)
+{
+ if(ma && ma->use_nodes && ma->nodetree) {
+ bNode *node= nodeGetActiveID(ma->nodetree, ID_MA);
+
+ if(node)
+ return (Material *)node->id;
+ }
+
+ return NULL;
+}
+
/* GS reads the memory pointed at in a specific ordering. There are,
* however two definitions for it. I have jotted them down here, both,
* but I think the first one is actually used. The thing is that