Commit: f05b6afec5245904a1844436755799a8b8ee9ef5
Author: Julian Eisel
Date: Thu Jan 5 23:34:50 2017 +0100
Branches: workspaces
https://developer.blender.org/rBf05b6afec5245904a1844436755799a8b8ee9ef5
More cleanup (renaming, comments, etc), added asserts
===================================================================
M release/scripts/startup/bl_ui/space_userpref.py
M source/blender/blenkernel/intern/library.c
M source/blender/blenkernel/intern/scene.c
M source/blender/blenloader/intern/readfile.c
M source/blender/editors/scene/scene_edit.c
M source/blender/editors/sculpt_paint/paint_image.c
M source/blender/editors/space_outliner/outliner_select.c
M source/blender/editors/space_outliner/outliner_tools.c
M source/blender/editors/util/ed_util.c
M source/blender/editors/workspace/screen_edit.c
M source/blender/makesrna/intern/rna_main_api.c
M source/blender/makesrna/intern/rna_wm.c
M source/blender/windowmanager/WM_api.h
M source/blender/windowmanager/intern/wm_event_system.c
M source/blender/windowmanager/intern/wm_window.c
M source/blenderplayer/bad_level_call_stubs/stubs.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_userpref.py
b/release/scripts/startup/bl_ui/space_userpref.py
index 075a6f8..87167b4 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -156,7 +156,6 @@ class USERPREF_PT_interface(Panel):
col.prop(view, "show_large_cursors")
col.prop(view, "show_view_name", text="View Name")
col.prop(view, "show_playback_fps", text="Playback FPS")
- col.prop(view, "use_global_scene")
col.prop(view, "object_origin_size")
col.separator()
diff --git a/source/blender/blenkernel/intern/library.c
b/source/blender/blenkernel/intern/library.c
index 83142e7..561e735 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -132,7 +132,6 @@
#include "atomic_ops.h"
-
/* GS reads the memory pointed at in a specific ordering.
* only use this definition, makes little and big endian systems
* work fine, in conjunction with MAKE_ID */
diff --git a/source/blender/blenkernel/intern/scene.c
b/source/blender/blenkernel/intern/scene.c
index 7b2f716..b0efe94 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -848,7 +848,7 @@ Base *BKE_scene_base_find(Scene *scene, Object *ob)
/**
* Sets the active scene, mainly used when running in background mode
(``--scene`` command line argument).
* This is also called to set the scene directly, bypassing windowing code.
- * Otherwise #WM_window_set_active_scene is used when changing scenes by the
user.
+ * Otherwise #WM_window_change_active_scene is used when changing scenes by
the user.
*/
void BKE_scene_set_background(Main *bmain, Scene *scene)
{
diff --git a/source/blender/blenloader/intern/readfile.c
b/source/blender/blenloader/intern/readfile.c
index 67f59fe..f505373 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6270,9 +6270,10 @@ static void lib_link_windowmanager(FileData *fd, Main
*main)
for (wm = main->wm.first; wm; wm = wm->id.next) {
if (wm->id.tag & LIB_TAG_NEED_LINK) {
for (win = wm->windows.first; win; win = win->next) {
- win->screen = newlibadr(fd, NULL, win->screen);
win->scene = newlibadr(fd, wm->id.lib,
win->scene);
win->workspace = newlibadr(fd, wm->id.lib,
win->workspace);
+ /* deprecated, but needed for versioning (will
be NULL'ed then) */
+ win->screen = newlibadr(fd, NULL, win->screen);
}
wm->id.tag &= ~LIB_TAG_NEED_LINK;
diff --git a/source/blender/editors/scene/scene_edit.c
b/source/blender/editors/scene/scene_edit.c
index 35cfba2..de43141 100644
--- a/source/blender/editors/scene/scene_edit.c
+++ b/source/blender/editors/scene/scene_edit.c
@@ -68,7 +68,7 @@ Scene *ED_scene_add(Main *bmain, bContext *C, wmWindow *win,
eSceneCopyMethod me
}
}
- WM_window_set_active_scene(bmain, C, win, scene_new);
+ WM_window_change_active_scene(bmain, C, win, scene_new);
WM_event_add_notifier(C, NC_SCENE | ND_SCENEBROWSE, scene_new);
@@ -90,7 +90,7 @@ bool ED_scene_delete(bContext *C, Main *bmain, wmWindow *win,
Scene *scene)
else
return false;
- WM_window_set_active_scene(bmain, C, win, scene_new);
+ WM_window_change_active_scene(bmain, C, win, scene_new);
BKE_libblock_remap(bmain, scene, scene_new,
ID_REMAP_SKIP_INDIRECT_USAGE | ID_REMAP_SKIP_NEVER_NULL_USAGE);
BKE_libblock_free(bmain, scene);
diff --git a/source/blender/editors/sculpt_paint/paint_image.c
b/source/blender/editors/sculpt_paint/paint_image.c
index d39a24d..9ac718f 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -1056,16 +1056,13 @@ static void toggle_paint_cursor(bContext *C, int enable)
void ED_space_image_paint_update(wmWindowManager *wm, Scene *scene)
{
ToolSettings *settings = scene->toolsettings;
- wmWindow *win;
- bScreen *screen;
- ScrArea *sa;
ImagePaintSettings *imapaint = &settings->imapaint;
bool enabled = false;
- for (win = wm->windows.first; win; win = win->next) {
- screen = WM_window_get_active_screen(win);
+ for (wmWindow *win = wm->windows.first; win; win = win->next) {
+ bScreen *screen = WM_window_get_active_screen(win);
- for (sa = screen->areabase.first; sa; sa = sa->next) {
+ for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
if (sa->spacetype == SPACE_IMAGE) {
if (((SpaceImage *)sa->spacedata.first)->mode
== SI_MODE_PAINT) {
enabled = true;
diff --git a/source/blender/editors/space_outliner/outliner_select.c
b/source/blender/editors/space_outliner/outliner_select.c
index 0077448..3719d72 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -159,7 +159,7 @@ static eOLDrawState tree_element_set_active_object(
sce = (Scene *)outliner_search_back(soops, te, ID_SCE);
if (sce && scene != sce) {
- WM_window_set_active_scene(CTX_data_main(C), C,
CTX_wm_window(C), sce);
+ WM_window_change_active_scene(CTX_data_main(C), C,
CTX_wm_window(C), sce);
scene = sce;
}
@@ -391,7 +391,7 @@ static eOLDrawState tree_element_active_world(
if (set != OL_SETSEL_NONE) {
/* make new scene active */
if (sce && scene != sce) {
- WM_window_set_active_scene(CTX_data_main(C), C,
CTX_wm_window(C), sce);
+ WM_window_change_active_scene(CTX_data_main(C), C,
CTX_wm_window(C), sce);
}
}
@@ -857,7 +857,7 @@ static void outliner_item_activate(
/* editmode? */
if (te->idcode == ID_SCE) {
if (scene != (Scene *)tselem->id) {
- WM_window_set_active_scene(CTX_data_main(C), C,
CTX_wm_window(C), (Scene *)tselem->id);
+ WM_window_change_active_scene(CTX_data_main(C),
C, CTX_wm_window(C), (Scene *)tselem->id);
}
}
else if (te->idcode == ID_GR) {
diff --git a/source/blender/editors/space_outliner/outliner_tools.c
b/source/blender/editors/space_outliner/outliner_tools.c
index 13a792a..6a51b84 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -564,7 +564,7 @@ void outliner_do_object_operation_ex(
// when objects selected in other scenes...
dunno if that should be allowed
Scene *scene_owner = (Scene
*)outliner_search_back(soops, te, ID_SCE);
if (scene_owner && scene_act != scene_owner) {
-
WM_window_set_active_scene(CTX_data_main(C), C, CTX_wm_window(C), scene_owner);
+
WM_window_change_active_scene(CTX_data_main(C), C, CTX_wm_window(C),
scene_owner);
}
/* important to use 'scene_owner' not scene_act
else deleting objects can crash.
* only use 'scene_act' when 'scene_owner' is
NULL, which can happen when the
@@ -935,7 +935,7 @@ static int outliner_object_operation_exec(bContext *C,
wmOperator *op)
Scene *sce = scene; // to be able to delete, scenes are set...
outliner_do_object_operation(C, op->reports, scene, soops,
&soops->tree, object_select_cb);
if (scene != sce) {
- WM_window_set_active_scene(bmain, C, win, sce);
+ WM_window_change_active_scene(bmain, C, win, sce);
}
str = "Select Objects";
@@ -945,7 +945,7 @@ static int outliner_object_operation_exec(bContext *C,
wmOperator *op)
Scene *sce = scene; // to be able to delete, scenes are set...
outliner_do_object_operation_ex(C, op->reports, scene, soops,
&soops->tree, object_select_hierarchy_cb, false);
if (scene != sce) {
- WM_window_set_active_scene(bmain, C, win, sce);
+ WM_window_change_active_scene(bmain, C, win, sce);
}
str = "Select Object Hierarchy";
WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
diff --git a/source/blender/editors/util/ed_util.c
b/source/blender/editors/util/ed_util.c
index 7b7b816..482523e 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -305,7 +305,6 @@ void unpack_menu(bContext *C, const char *opname, const
char *id_name, const cha
UI_popup_menu_end(C, pup);
}
-
/* ********************* generic callbacks for drawcall api
*********************** */
/**
diff --git a/source/blender/editors/workspace/screen_edit.c
b/source/blender/editors/workspace/screen_edit.c
index 432a4c1..2abd275 100644
--- a/source/blender/editors/workspace/screen_edit.c
+++ b/source/blender/editors/workspace/screen_edit.c
@@ -540,22 +540,6 @@ void screen_new_activate_prepare(const wmWindow *win,
bScreen *screen_new)
screen_new->do_draw = true;
}
-void screen_changed_update(bContext *C, wmWindow *win, bScreen *sc)
-{
- Scene *scene = WM_window_get_active_scene(win);
-
- CTX_wm_window_set(C, win); /* stores C->wm.screen... hrmf */
-
- ED_screen_refresh(CTX_wm_manager(C), win);
-
- BKE_screen_view3d_scene_sync(sc, scene); /* sync new screen with scene
data */
- WM_event_add_notifier(C, NC_WINDOW, NULL);
- WM_event_add_notifier(C, NC_WORKSPACE | ND_SCREENSET, sc);
-
- /* makes button hilites work */
- WM_event_add_mousemove(C);
-}
-
/* with sa as center, sb is located at: 0=W, 1=N, 2=E, 3=S */
/* -1 = not valid check */
@@ -1207,7 +1191,7 @@ int ED_screen_area_active(const bContext *C)
/* -------------------------------------------------------------------- */
-/* Screen Activation (screen_set_xxx) */
+/* Screen changing */
static bScreen *screen_find_associated_fullscreen(const Main *bmain, bScreen
*screen)
{
@@ -1267,6 +1251,23 @@ bScreen *screen_change_prepare(bScreen *screen_old,
bScreen *screen_new, Main *b
return NULL;
}
+void screen_changed_update(bContext *C, wmWindow *win, bScreen *sc)
+{
+ Scene *scene = WM_window_get_active_scene(win);
+
+ CTX_wm_window_set(C, win); /* stores C->wm.screen... hrmf */
+
+ ED_screen_refresh(CTX_wm_manager(C), win);
+
+ BKE_screen_view3d_scene_sync(sc, scene); /* sync new screen with scene
data */
+ WM_event_add_notifier(C, NC_WINDOW, NULL);
+ WM_event_add_notifier(C, NC_WORKSPACE | ND_SCREENSET, sc);
+
+ /* makes button hilites work */
+ WM_event_add_mousemove(C);
+}
+
+
/**
* \brief Change the active screen.
*
diff --git a/source/blender/makesrna/intern/rna_main_api.c
b/source/blender/makesrna/intern/rna_main_api.c
index f6278e1..cd0fe46 100644
--- a/source/blender/makesrna/
@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs