forked from bartvdbraak/blender
bugfix [#24231] outliner not refreshed correctly
also made world changes only redraw the 3d view if 'Render Only' option is set.
This commit is contained in:
parent
118e0426f1
commit
9347dd04a3
@ -128,7 +128,7 @@ ENDIF(APPLE)
|
||||
|
||||
|
||||
IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
|
||||
MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")
|
||||
MESSAGE(FATAL_ERROR "WITH_PLAYER needs WITH_GAMEENGINE")
|
||||
ENDIF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
|
||||
|
||||
IF(NOT WITH_INSTALL AND WITH_PYTHON_INSTALL)
|
||||
@ -334,7 +334,7 @@ IF(WIN32)
|
||||
|
||||
# Setup 64bit and 64bit windows systems
|
||||
IF(CMAKE_CL_64)
|
||||
message("64 bit compiler detected.")
|
||||
MESSAGE("64 bit compiler detected.")
|
||||
SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
|
||||
|
@ -104,6 +104,7 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
|
||||
case ND_FRAME:
|
||||
case ND_RENDER_OPTIONS:
|
||||
case ND_LAYER:
|
||||
case ND_WORLD:
|
||||
ED_region_tag_redraw(ar);
|
||||
break;
|
||||
}
|
||||
|
@ -548,22 +548,36 @@ static void view3d_recalc_used_layers(ARegion *ar, wmNotifier *wmn, Scene *scene
|
||||
base= base->next;
|
||||
}
|
||||
|
||||
sa= win->screen->areabase.first;
|
||||
while(sa) {
|
||||
if(sa->spacetype == SPACE_VIEW3D)
|
||||
if(BLI_findindex(&sa->regionbase, ar) >= 0) {
|
||||
for(sa= win->screen->areabase.first; sa; sa= sa->next) {
|
||||
if(sa->spacetype == SPACE_VIEW3D) {
|
||||
if(BLI_findindex(&sa->regionbase, ar) != -1) {
|
||||
View3D *v3d= sa->spacedata.first;
|
||||
v3d->lay_used= lay_used;
|
||||
break;
|
||||
}
|
||||
|
||||
sa= sa->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static View3D *view3d_from_wmn(ARegion *ar, wmNotifier *wmn)
|
||||
{
|
||||
wmWindow *win= wmn->wm->winactive;
|
||||
ScrArea *sa;
|
||||
|
||||
for(sa= win->screen->areabase.first; sa; sa= sa->next) {
|
||||
if(sa->spacetype == SPACE_VIEW3D)
|
||||
if(BLI_findindex(&sa->regionbase, ar) != -1) {
|
||||
return (View3D *)sa->spacedata.first;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn)
|
||||
{
|
||||
bScreen *sc;
|
||||
View3D *v3d;
|
||||
|
||||
/* context changes */
|
||||
switch(wmn->category) {
|
||||
@ -600,6 +614,11 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn)
|
||||
case ND_MODE:
|
||||
ED_region_tag_redraw(ar);
|
||||
break;
|
||||
case ND_WORLD:
|
||||
v3d= view3d_from_wmn(ar, wmn);
|
||||
if(v3d->flag2 & V3D_RENDER_OVERRIDE)
|
||||
ED_region_tag_redraw(ar);
|
||||
break;
|
||||
}
|
||||
if (wmn->action == NA_EDITED)
|
||||
ED_region_tag_redraw(ar);
|
||||
@ -650,6 +669,8 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn)
|
||||
case NC_WORLD:
|
||||
switch(wmn->data) {
|
||||
case ND_WORLD_DRAW:
|
||||
v3d= view3d_from_wmn(ar, wmn);
|
||||
if(v3d->flag2 & V3D_RENDER_OVERRIDE)
|
||||
ED_region_tag_redraw(ar);
|
||||
break;
|
||||
}
|
||||
|
@ -3094,7 +3094,7 @@ void RNA_def_scene(BlenderRNA *brna)
|
||||
prop= RNA_def_property(srna, "world", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_ui_text(prop, "World", "World used for rendering the scene");
|
||||
RNA_def_property_update(prop, NC_SCENE|NC_WORLD, NULL);
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_WORLD, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ_LENGTH);
|
||||
RNA_def_property_float_sdna(prop, NULL, "cursor");
|
||||
|
@ -478,9 +478,8 @@ void RNA_def_world(BlenderRNA *brna)
|
||||
RNA_def_property_array(prop, 3);
|
||||
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, the notifier could be made to be more spesific */
|
||||
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_World_update");
|
||||
|
||||
/* render-only uses this */
|
||||
RNA_def_property_update(prop, NC_WORLD|ND_WORLD_DRAW, "rna_World_update");
|
||||
|
||||
|
||||
prop= RNA_def_property(srna, "zenith_color", PROP_FLOAT, PROP_COLOR);
|
||||
|
@ -191,6 +191,7 @@ typedef struct wmNotifier {
|
||||
#define ND_TOOLSETTINGS (15<<16)
|
||||
#define ND_LAYER (16<<16)
|
||||
#define ND_FRAME_RANGE (17<<16)
|
||||
#define ND_WORLD (92<<16)
|
||||
#define ND_LAYER_CONTENT (101<<16)
|
||||
|
||||
/* NC_OBJECT Object */
|
||||
|
Loading…
Reference in New Issue
Block a user