[Bf-blender-cvs] [3f2bde5a398] blender2.8: Workbench: Materials Texture hash
Jeroen Bakker
noreply at git.blender.org
Thu Jun 28 11:01:24 CEST 2018
Commit: 3f2bde5a398657b3a9965447ab34c4132acc8556
Author: Jeroen Bakker
Date: Thu Jun 28 10:34:38 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB3f2bde5a398657b3a9965447ab34c4132acc8556
Workbench: Materials Texture hash
only hash the texture if it exists. Really minor improvement
===================================================================
M source/blender/draw/engines/workbench/workbench_materials.c
===================================================================
diff --git a/source/blender/draw/engines/workbench/workbench_materials.c b/source/blender/draw/engines/workbench/workbench_materials.c
index 9fdafc87fa4..d7d1505b2d0 100644
--- a/source/blender/draw/engines/workbench/workbench_materials.c
+++ b/source/blender/draw/engines/workbench/workbench_materials.c
@@ -124,7 +124,10 @@ uint workbench_material_get_hash(WORKBENCH_MaterialData *material_template)
result += BLI_ghashutil_uinthash_v4_murmur(input);
/* add texture reference */
- result += BLI_ghashutil_inthash_p_murmur(material_template->ima);
+ if (material_template->ima)
+ {
+ result += BLI_ghashutil_inthash_p_murmur(material_template->ima);
+ }
return result;
}
More information about the Bf-blender-cvs
mailing list