[Bf-blender-cvs] [c13455e] depsgraph_refactor: Depsgraph: Rename SPaceType->new to SpaceType->alloc

Sergey Sharybin noreply at git.blender.org
Mon Mar 16 15:47:10 CET 2015


Commit: c13455e3328c60fae2deecd7a9d8f0d827715f32
Author: Sergey Sharybin
Date:   Mon Mar 16 19:46:35 2015 +0500
Branches: depsgraph_refactor
https://developer.blender.org/rBc13455e3328c60fae2deecd7a9d8f0d827715f32

Depsgraph: Rename SPaceType->new to SpaceType->alloc

This way it is posible to include BKE_screen.h from C++ file.

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

M	source/blender/blenkernel/BKE_screen.h
M	source/blender/depsgraph/intern/depsgraph_tag.cpp
M	source/blender/editors/screen/area.c
M	source/blender/editors/space_action/space_action.c
M	source/blender/editors/space_api/spacetypes.c
M	source/blender/editors/space_buttons/space_buttons.c
M	source/blender/editors/space_clip/space_clip.c
M	source/blender/editors/space_console/space_console.c
M	source/blender/editors/space_file/space_file.c
M	source/blender/editors/space_graph/space_graph.c
M	source/blender/editors/space_image/space_image.c
M	source/blender/editors/space_info/space_info.c
M	source/blender/editors/space_logic/space_logic.c
M	source/blender/editors/space_nla/space_nla.c
M	source/blender/editors/space_node/space_node.c
M	source/blender/editors/space_outliner/space_outliner.c
M	source/blender/editors/space_script/space_script.c
M	source/blender/editors/space_sequencer/space_sequencer.c
M	source/blender/editors/space_text/space_text.c
M	source/blender/editors/space_time/space_time.c
M	source/blender/editors/space_userpref/space_userpref.c
M	source/blender/editors/space_view3d/space_view3d.c

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

diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h
index 29590c5..79d2761 100644
--- a/source/blender/blenkernel/BKE_screen.h
+++ b/source/blender/blenkernel/BKE_screen.h
@@ -72,7 +72,7 @@ typedef struct SpaceType {
 	int iconid;                                 /* icon lookup for menus */
 	
 	/* initial allocation, after this WM will call init() too */
-	struct SpaceLink    *(*new)(const struct bContext *C);
+	struct SpaceLink    *(*alloc)(const struct bContext *C);
 	/* not free spacelink itself */
 	void (*free)(struct SpaceLink *);
 	
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cpp b/source/blender/depsgraph/intern/depsgraph_tag.cpp
index c780e0d..e84a08e 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cpp
@@ -41,11 +41,9 @@ extern "C" {
 #include "BKE_library.h"
 #include "BKE_main.h"
 #include "BKE_node.h"
+#include "BKE_screen.h"
 
 #include "DEG_depsgraph.h"
-
-/* TODO(sergey): because of bloody "new" in the BKE_screen.h. */
-unsigned int BKE_screen_visible_layers(bScreen *screen, Scene *scene);
 } /* extern "C" */
 
 #include "depsgraph_debug.h"
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index c423d81..6148e22 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1603,7 +1603,7 @@ void ED_area_newspace(bContext *C, ScrArea *sa, int type)
 		else {
 			/* new space */
 			if (st) {
-				sl = st->new(C);
+				sl = st->alloc(C);
 				BLI_addhead(&sa->spacedata, sl);
 				
 				/* swap regions */
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index 5d0b34a..fd6bd7f 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -531,7 +531,7 @@ void ED_spacetype_action(void)
 	st->spaceid = SPACE_ACTION;
 	strncpy(st->name, "Action", BKE_ST_MAXNAME);
 	
-	st->new = action_new;
+	st->alloc = action_new;
 	st->free = action_free;
 	st->init = action_init;
 	st->duplicate = action_duplicate;
diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c
index 01f0d1a..6dc45b4 100644
--- a/source/blender/editors/space_api/spacetypes.c
+++ b/source/blender/editors/space_api/spacetypes.c
@@ -306,7 +306,7 @@ void ED_spacetype_xxx(void)
 	
 	st.spaceid = SPACE_VIEW3D;
 	
-	st.new = xxx_new;
+	st.alloc = xxx_new;
 	st.free = xxx_free;
 	st.init = xxx_init;
 	st.duplicate = xxx_duplicate;
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index a778df4..1e073bf 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -396,7 +396,7 @@ void ED_spacetype_buttons(void)
 	st->spaceid = SPACE_BUTS;
 	strncpy(st->name, "Buttons", BKE_ST_MAXNAME);
 	
-	st->new = buttons_new;
+	st->alloc = buttons_new;
 	st->free = buttons_free;
 	st->init = buttons_init;
 	st->duplicate = buttons_duplicate;
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index fc2c0d3..17adacd 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -1521,7 +1521,7 @@ void ED_spacetype_clip(void)
 	st->spaceid = SPACE_CLIP;
 	strncpy(st->name, "Clip", BKE_ST_MAXNAME);
 
-	st->new = clip_new;
+	st->alloc = clip_new;
 	st->free = clip_free;
 	st->init = clip_init;
 	st->duplicate = clip_duplicate;
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index a592f35..d19408d 100644
--- a/source/blender/editors/space_console/space_console.c
+++ b/source/blender/editors/space_console/space_console.c
@@ -395,7 +395,7 @@ void ED_spacetype_console(void)
 	st->spaceid = SPACE_CONSOLE;
 	strncpy(st->name, "Console", BKE_ST_MAXNAME);
 	
-	st->new = console_new;
+	st->alloc = console_new;
 	st->free = console_free;
 	st->init = console_init;
 	st->duplicate = console_duplicate;
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 782b318..fad5cdb 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -605,7 +605,7 @@ void ED_spacetype_file(void)
 	st->spaceid = SPACE_FILE;
 	strncpy(st->name, "File", BKE_ST_MAXNAME);
 	
-	st->new = file_new;
+	st->alloc = file_new;
 	st->free = file_free;
 	st->init = file_init;
 	st->exit = file_exit;
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index ad6f3ff..e38fb90 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -620,7 +620,7 @@ void ED_spacetype_ipo(void)
 	st->spaceid = SPACE_IPO;
 	strncpy(st->name, "Graph", BKE_ST_MAXNAME);
 	
-	st->new = graph_new;
+	st->alloc = graph_new;
 	st->free = graph_free;
 	st->init = graph_init;
 	st->duplicate = graph_duplicate;
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index bd3d76b..2e4c0bf 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -988,7 +988,7 @@ void ED_spacetype_image(void)
 	st->spaceid = SPACE_IMAGE;
 	strncpy(st->name, "Image", BKE_ST_MAXNAME);
 	
-	st->new = image_new;
+	st->alloc = image_new;
 	st->free = image_free;
 	st->init = image_init;
 	st->duplicate = image_duplicate;
diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c
index befe8c0..5a2c110 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -405,7 +405,7 @@ void ED_spacetype_info(void)
 	st->spaceid = SPACE_INFO;
 	strncpy(st->name, "Info", BKE_ST_MAXNAME);
 	
-	st->new = info_new;
+	st->alloc = info_new;
 	st->free = info_free;
 	st->init = info_init;
 	st->duplicate = info_duplicate;
diff --git a/source/blender/editors/space_logic/space_logic.c b/source/blender/editors/space_logic/space_logic.c
index 733cac7..0d88b68 100644
--- a/source/blender/editors/space_logic/space_logic.c
+++ b/source/blender/editors/space_logic/space_logic.c
@@ -309,7 +309,7 @@ void ED_spacetype_logic(void)
 	st->spaceid = SPACE_LOGIC;
 	strncpy(st->name, "Logic", BKE_ST_MAXNAME);
 	
-	st->new = logic_new;
+	st->alloc = logic_new;
 	st->free = logic_free;
 	st->init = logic_init;
 	st->duplicate = logic_duplicate;
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index ec58452..0c62a7c 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -510,7 +510,7 @@ void ED_spacetype_nla(void)
 	st->spaceid = SPACE_NLA;
 	strncpy(st->name, "NLA", BKE_ST_MAXNAME);
 	
-	st->new = nla_new;
+	st->alloc = nla_new;
 	st->free = nla_free;
 	st->init = nla_init;
 	st->duplicate = nla_duplicate;
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index 62cb0bc..008bc3c 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -832,7 +832,7 @@ void ED_spacetype_node(void)
 	st->spaceid = SPACE_NODE;
 	strncpy(st->name, "Node", BKE_ST_MAXNAME);
 
-	st->new = node_new;
+	st->alloc = node_new;
 	st->free = node_free;
 	st->init = node_init;
 	st->duplicate = node_duplicate;
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index e1aea88..8f6e4fd 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -495,7 +495,7 @@ void ED_spacetype_outliner(void)
 	st->spaceid = SPACE_OUTLINER;
 	strncpy(st->name, "Outliner", BKE_ST_MAXNAME);
 	
-	st->new = outliner_new;
+	st->alloc = outliner_new;
 	st->free = outliner_free;
 	st->init = outliner_init;
 	st->duplicate = outliner_duplicate;
diff --git a/source/blender/editors/space_script/space_script.c b/source/blender/editors/space_script/space_script.c
index 759dcd3..7f12e1f 100644
--- a/source/blender/editors/space_script/space_script.c
+++ b/source/blender/editors/space_script/space_script.c
@@ -192,7 +192,7 @@ void ED_spacetype_script(void)
 	st->spaceid = SPACE_SCRIPT;
 	strncpy(st->name, "Script", BKE_ST_MAXNAME);
 	
-	st->new = script_new;
+	st->alloc = script_new;
 	st->free = script_free;
 	st->init = script_init;
 	st->duplicate = script_duplicate;
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index 7a7f189..569e53d 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -695,7 +695,7 @@ void ED_spacetype_sequencer(void)
 	st->spaceid = SPACE_SEQ;
 	strncpy(st->name, "Sequencer", BKE_ST_MAXNAME);
 
-	st->new = sequencer_new;
+	st->alloc = sequencer_new;
 	st->free = sequencer_free;
 	st->init = sequencer_init;
 	st->duplicate = sequencer_duplicate;
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index d890b9f..e4647db 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -565,7 +565,7 @@ void ED_spacetype_text(void)
 	st->spaceid = SPACE_TEXT;
 	strncpy(st->name, "Text", BKE_ST_MAXNAME);
 	
-	st->new = text_new;
+	st->alloc = text_new;
 	st->free = text_free;
 	st->init = text_init;
 	st->duplicate = text_duplicate;
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c
index 91a0970..fc1c0e9 100644
--- a/source/blender/editors/space_time/space_time.c
+++ b/source/blender/editors/space_time/space_time.c
@@ -719,7 +719,7 @@ void ED_spacetype_time(void)
 	st->spaceid = SPACE_TIME;
 	strncpy(st->name, "Timeline", BKE_ST_MAXNAME);
 	
-	st

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list