Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern/rna_world.c')
-rw-r--r--source/blender/makesrna/intern/rna_world.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index 925bc52d06f..e78355ee426 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -43,10 +43,12 @@
#include "MEM_guardedalloc.h"
#include "BKE_context.h"
-#include "BKE_depsgraph.h"
#include "BKE_main.h"
#include "BKE_texture.h"
+#include "DEG_depsgraph.h"
+#include "DEG_depsgraph_build.h"
+
#include "ED_node.h"
#include "WM_api.h"
@@ -88,7 +90,7 @@ static void rna_World_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR
{
World *wo = ptr->id.data;
- DAG_id_tag_update(&wo->id, 0);
+ DEG_id_tag_update(&wo->id, 0);
WM_main_add_notifier(NC_WORLD | ND_WORLD, wo);
}
@@ -97,7 +99,7 @@ static void rna_World_draw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poi
{
World *wo = ptr->id.data;
- DAG_id_tag_update(&wo->id, 0);
+ DEG_id_tag_update(&wo->id, 0);
WM_main_add_notifier(NC_WORLD | ND_WORLD_DRAW, wo);
}
#endif
@@ -106,7 +108,7 @@ static void rna_World_draw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poi
{
World *wo = ptr->id.data;
- DAG_id_tag_update(&wo->id, 0);
+ DEG_id_tag_update(&wo->id, 0);
WM_main_add_notifier(NC_WORLD | ND_WORLD_DRAW, wo);
WM_main_add_notifier(NC_OBJECT | ND_DRAW, NULL);
}
@@ -114,11 +116,15 @@ static void rna_World_draw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poi
static void rna_World_use_nodes_update(bContext *C, PointerRNA *ptr)
{
World *wrld = (World *)ptr->data;
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
if (wrld->use_nodes && wrld->nodetree == NULL)
ED_node_shader_default(C, &wrld->id);
-
- rna_World_update(CTX_data_main(C), CTX_data_scene(C), ptr);
+
+ DEG_relations_tag_update(bmain);
+ rna_World_update(bmain, scene, ptr);
+ rna_World_draw_update(bmain, scene, ptr);
}
#else
@@ -390,9 +396,9 @@ static void rna_def_world_mist(BlenderRNA *brna)
PropertyRNA *prop;
static const EnumPropertyItem falloff_items[] = {
- {0, "QUADRATIC", 0, "Quadratic", "Use quadratic progression"},
- {1, "LINEAR", 0, "Linear", "Use linear progression"},
- {2, "INVERSE_QUADRATIC", 0, "Inverse Quadratic", "Use inverse quadratic progression"},
+ {WO_MIST_QUADRATIC, "QUADRATIC", 0, "Quadratic", "Use quadratic progression"},
+ {WO_MIST_LINEAR, "LINEAR", 0, "Linear", "Use linear progression"},
+ {WO_MIST_INVERSE_QUADRATIC, "INVERSE_QUADRATIC", 0, "Inverse Quadratic", "Use inverse quadratic progression"},
{0, NULL, 0, NULL, NULL}
};