[Bf-blender-cvs] [22e2225] master: Blender world value viewport update

Thomas Szepe noreply at git.blender.org
Tue Mar 24 00:34:31 CET 2015


Commit: 22e222563a763d488d4943f28104dc452a651e34
Author: Thomas Szepe
Date:   Tue Mar 24 00:31:31 2015 +0100
Branches: master
https://developer.blender.org/rB22e222563a763d488d4943f28104dc452a651e34

Blender world value viewport update

This patch will update the 3D viewport if a word value has changed.

This patch does not depends on an other patch, but should applied after https://developer.blender.org/D151 otherwise the the word value viewport update is be slow.

Reviewers: brecht

Reviewed By: brecht

Subscribers: thelasthope, darkxiv

Differential Revision: https://developer.blender.org/D159

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

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

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

diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index 721cbaf..a206fb2 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -403,13 +403,13 @@ static void rna_def_world_mist(BlenderRNA *brna)
 	prop = RNA_def_property(srna, "use_mist", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_MIST);
 	RNA_def_property_ui_text(prop, "Use Mist", "Occlude objects with the environment color as they are further away");
-	RNA_def_property_update(prop, 0, "rna_World_draw_update");
+	RNA_def_property_update(prop, 0, "rna_World_draw_mist_update");
 
 	prop = RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "misi");
 	RNA_def_property_range(prop, 0, 1);
 	RNA_def_property_ui_text(prop, "Minimum", "Overall minimum intensity of the mist effect");
-	RNA_def_property_update(prop, 0, "rna_World_update");
+	RNA_def_property_update(prop, 0, "rna_World_draw_mist_update");
 
 	prop = RNA_def_property(srna, "start", PROP_FLOAT, PROP_DISTANCE);
 	RNA_def_property_float_sdna(prop, NULL, "miststa");
@@ -435,7 +435,7 @@ static void rna_def_world_mist(BlenderRNA *brna)
 	RNA_def_property_enum_sdna(prop, NULL, "mistype");
 	RNA_def_property_enum_items(prop, falloff_items);
 	RNA_def_property_ui_text(prop, "Falloff", "Type of transition used to fade mist");
-	RNA_def_property_update(prop, 0, "rna_World_update");
+	RNA_def_property_update(prop, 0, "rna_World_draw_mist_update");
 }
 
 void RNA_def_world(BlenderRNA *brna)
@@ -460,8 +460,7 @@ void RNA_def_world(BlenderRNA *brna)
 	RNA_def_property_ui_text(prop, "Horizon Color", "Color at the horizon");
 	/* RNA_def_property_update(prop, 0, "rna_World_update"); */
 	/* render-only uses this */
-	RNA_def_property_update(prop, NC_WORLD | ND_WORLD_DRAW, "rna_World_update");
-
+	RNA_def_property_update(prop, 0, "rna_World_draw_mist_update");
 	
 	prop = RNA_def_property(srna, "zenith_color", PROP_FLOAT, PROP_COLOR);
 	RNA_def_property_float_sdna(prop, NULL, "zenr");
@@ -473,7 +472,7 @@ void RNA_def_world(BlenderRNA *brna)
 	RNA_def_property_float_sdna(prop, NULL, "ambr");
 	RNA_def_property_array(prop, 3);
 	RNA_def_property_ui_text(prop, "Ambient Color", "Ambient color of the world");
-	RNA_def_property_update(prop, 0, "rna_World_update");
+	RNA_def_property_update(prop, 0, "rna_World_draw_mist_update");
 
 	/* exp, range */
 	prop = RNA_def_property(srna, "exposure", PROP_FLOAT, PROP_NONE);




More information about the Bf-blender-cvs mailing list