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
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesdna/DNA_texture_types.h1
-rw-r--r--source/blender/render/intern/source/texture.c5
-rw-r--r--source/blender/src/buttons_shading.c3
3 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h
index bc2b0521d4f..fbf838b0e12 100644
--- a/source/blender/makesdna/DNA_texture_types.h
+++ b/source/blender/makesdna/DNA_texture_types.h
@@ -353,6 +353,7 @@ typedef struct TexMapping {
#define MTEX_ALPHAMIX 8
#define MTEX_VIEWSPACE 16
#define MTEX_DUPLI_MAPTO 32
+#define MTEX_OB_DUPLI_ORIG 64
/* blendtype */
#define MTEX_BLEND 0
diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c
index 6af3b711028..737b1d2d747 100644
--- a/source/blender/render/intern/source/texture.c
+++ b/source/blender/render/intern/source/texture.c
@@ -1468,8 +1468,9 @@ void do_material_tex(ShadeInput *shi)
dx= dxt;
dy= dyt;
VECCOPY(tempvec, shi->co);
- if(shi->obi && shi->obi->duplitexmat)
- MTC_Mat4MulVecfl(shi->obi->duplitexmat, tempvec);
+ if(mtex->texflag & MTEX_OB_DUPLI_ORIG)
+ if(shi->obi && shi->obi->duplitexmat)
+ MTC_Mat4MulVecfl(shi->obi->duplitexmat, tempvec);
MTC_Mat4MulVecfl(ob->imat, tempvec);
if(shi->osatex) {
VECCOPY(dxt, shi->dxco);
diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c
index 4ff6ff7b7d9..880076de162 100644
--- a/source/blender/src/buttons_shading.c
+++ b/source/blender/src/buttons_shading.c
@@ -3429,6 +3429,9 @@ static void material_panel_map_input(Object *ob, Material *ma)
if(ELEM(mtex->texco, TEXCO_UV, TEXCO_ORCO))
uiDefButBitS(block, TOG, MTEX_DUPLI_MAPTO, B_MATPRV, "From Dupli", 820,140,88,18, &(mtex->texflag), 0, 0, 0, 0, "If object is duplicated by vertices, faces or particles, inherit texture coordinate from parent object");
+ else if(mtex->texco == TEXCO_OBJECT)
+ uiDefButBitS(block, TOG, MTEX_OB_DUPLI_ORIG, B_MATPRV, "From Original", 820,140,88,18, &(mtex->texflag), 0, 0, 0, 0, "If object is duplicated, use object coordinates as if the object was in its original position");
+
/* COORDS */
uiBlockBeginAlign(block);