[Bf-blender-cvs] [8186214] master: Fix T43514: Environment map doesn't update

Sergey Sharybin noreply at git.blender.org
Tue Feb 3 14:52:05 CET 2015


Commit: 8186214c390e91d20dd78fbee345e668c3364c71
Author: Sergey Sharybin
Date:   Tue Feb 3 18:51:38 2015 +0500
Branches: master
https://developer.blender.org/rB8186214c390e91d20dd78fbee345e668c3364c71

Fix T43514: Environment map doesn't update

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

M	source/blender/makesrna/intern/rna_texture.c

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

diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index 3abe4cd..c1882e7 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -440,15 +440,13 @@ static void rna_ImageTexture_mipmap_set(PointerRNA *ptr, int value)
 	else tex->imaflag &= ~TEX_MIPMAP;
 }
 
-static void rna_Envmap_source_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Envmap_update_generic(Main *bmain, Scene *scene, PointerRNA *ptr)
 {
 	Tex *tex = ptr->id.data;
-	
 	if (tex->env) {
 		ED_preview_kill_jobs(bmain->wm.first, bmain);
 		BKE_free_envmapdata(tex->env);
 	}
-	
 	rna_Texture_update(bmain, scene, ptr);
 }
 
@@ -806,7 +804,7 @@ static void rna_def_environment_map(BlenderRNA *brna)
 	RNA_def_property_enum_sdna(prop, NULL, "stype");
 	RNA_def_property_enum_items(prop, prop_source_items);
 	RNA_def_property_ui_text(prop, "Source", "");
-	RNA_def_property_update(prop, 0, "rna_Envmap_source_update");
+	RNA_def_property_update(prop, 0, "rna_Envmap_update_generic");
 
 	prop = RNA_def_property(srna, "viewpoint_object", PROP_POINTER, PROP_NONE);
 	RNA_def_property_pointer_sdna(prop, NULL, "object");
@@ -1394,7 +1392,7 @@ static void rna_def_texture_environment_map(BlenderRNA *brna)
 	RNA_def_property_struct_type(prop, "Image");
 	RNA_def_property_flag(prop, PROP_EDITABLE);
 	RNA_def_property_ui_text(prop, "Image", "Source image file to read the environment map from");
-	RNA_def_property_update(prop, 0, "rna_Texture_update");
+	RNA_def_property_update(prop, 0, "rna_Envmap_update_generic");
 	
 	prop = RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
 	RNA_def_property_pointer_sdna(prop, NULL, "iuser");




More information about the Bf-blender-cvs mailing list