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:
authorJoshua Leung <aligorith@gmail.com>2011-04-25 10:27:32 +0400
committerJoshua Leung <aligorith@gmail.com>2011-04-25 10:27:32 +0400
commit8fec90e220e3120d944ef2e385de0b0da615102f (patch)
treeafa442b5f4b5004cac7ec6436a24bf2eca8fc835 /source
parentbdbf0abe600b6e2608d93b6c27ec7ff9d474b743 (diff)
Displace Modifier - Optimisation Tweaks for jpbouza and ZanQdo
- When strength is 0, there's no need to perform any of the calculations at all - When the vertexgroup weight for a vert is set to 0, skip evaluating the modifier for that vertex as it should result in no-change to the final result
Diffstat (limited to 'source')
-rw-r--r--source/blender/modifiers/intern/MOD_displace.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c
index d303f3d2516..7f887eb162a 100644
--- a/source/blender/modifiers/intern/MOD_displace.c
+++ b/source/blender/modifiers/intern/MOD_displace.c
@@ -260,6 +260,7 @@ static void displaceModifier_do(
float (*tex_co)[3];
if(!dmd->texture) return;
+ if(dmd->strength == 0.0f) return;
defgrp_index = defgroup_name_index(ob, dmd->defgrp_name);
@@ -284,7 +285,7 @@ static void displaceModifier_do(
break;
}
}
- if(!def_weight) continue;
+ if(!def_weight || def_weight->weight==0.0f) continue;
}
texres.nor = NULL;