[Bf-blender-cvs] [02b1dbe] master: Fix T39653 crash on drawing modified UVs

Antony Riakiotakis noreply at git.blender.org
Wed May 7 01:53:08 CEST 2014


Commit: 02b1dbef8cff6427bae9dc9e0da6d502a07d035c
Author: Antony Riakiotakis
Date:   Wed May 7 02:52:08 2014 +0300
https://developer.blender.org/rB02b1dbef8cff6427bae9dc9e0da6d502a07d035c

Fix T39653 crash on drawing modified UVs

Just a case of uninitialized material array.
Make sure object materials are initialized properly when drawing UVs.

This might look strange since we do not really need materials here.
However, the same GPU object may be used in a 3D viewport and if we try
to avoid initializing the materials somehow this will break.

Also, this breaks on full screen UV editor as is apparent from this
report.

===================================================================

M	source/blender/editors/uvedit/uvedit_draw.c

===================================================================

diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c
index 2291418..ce4b97e 100644
--- a/source/blender/editors/uvedit/uvedit_draw.c
+++ b/source/blender/editors/uvedit/uvedit_draw.c
@@ -485,6 +485,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
 	/* 1. draw shadow mesh */
 	
 	if (sima->flag & SI_DRAWSHADOW) {
+		DM_update_materials(em->derivedFinal, obedit);
 		/* first try existing derivedmesh */
 		if (!draw_uvs_dm_shadow(em->derivedFinal)) {
 			/* create one if it does not exist */




More information about the Bf-blender-cvs mailing list