[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36319] trunk/blender/source/blender/ modifiers/intern/MOD_displace.c: Displace Modifier - Optimisation Tweaks for jpbouza and ZanQdo
Joshua Leung
aligorith at gmail.com
Mon Apr 25 08:27:32 CEST 2011
Revision: 36319
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36319
Author: aligorith
Date: 2011-04-25 06:27:32 +0000 (Mon, 25 Apr 2011)
Log Message:
-----------
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
Modified Paths:
--------------
trunk/blender/source/blender/modifiers/intern/MOD_displace.c
Modified: trunk/blender/source/blender/modifiers/intern/MOD_displace.c
===================================================================
--- trunk/blender/source/blender/modifiers/intern/MOD_displace.c 2011-04-25 04:36:59 UTC (rev 36318)
+++ trunk/blender/source/blender/modifiers/intern/MOD_displace.c 2011-04-25 06:27:32 UTC (rev 36319)
@@ -260,6 +260,7 @@
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 @@
break;
}
}
- if(!def_weight) continue;
+ if(!def_weight || def_weight->weight==0.0f) continue;
}
texres.nor = NULL;
More information about the Bf-blender-cvs
mailing list