diff options
Diffstat (limited to 'source')
27 files changed, 46 insertions, 64 deletions
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h index 13716ddb5c6..98f52a29b5c 100644 --- a/source/blender/blenkernel/BKE_screen.h +++ b/source/blender/blenkernel/BKE_screen.h @@ -73,7 +73,7 @@ typedef struct SpaceType { /* Initial allocation, after this WM will call init() too. Some editors need * area and scene data (e.g. frame range) to set their initial scrolling. */ - struct SpaceLink *(*new)(const struct ScrArea *area, const struct Scene *scene); + struct SpaceLink *(*create)(const struct ScrArea *area, const struct Scene *scene); /* not free spacelink itself */ void (*free)(struct SpaceLink *sl); diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 8f5ab69caf8..fc3e81a2005 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -190,7 +190,7 @@ static void do_version_workspaces_create_from_screens(Main *bmain) static void do_version_area_change_space_to_space_action(ScrArea *area, const Scene *scene) { SpaceType *stype = BKE_spacetype_from_id(SPACE_ACTION); - SpaceAction *saction = (SpaceAction *)stype->new (area, scene); + SpaceAction *saction = (SpaceAction *)stype->create(area, scene); ARegion *region_channels; /* Properly free current regions */ diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc index 1863a333930..1d8fba21857 100644 --- a/source/blender/depsgraph/intern/depsgraph_tag.cc +++ b/source/blender/depsgraph/intern/depsgraph_tag.cc @@ -48,11 +48,8 @@ #include "BKE_idtype.h" #include "BKE_node.h" #include "BKE_scene.h" -#include "BKE_workspace.h" - -#define new new_ #include "BKE_screen.h" -#undef new +#include "BKE_workspace.h" #include "DEG_depsgraph.h" #include "DEG_depsgraph_debug.h" diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index a9a5393b24d..9616b8114ba 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -2126,7 +2126,7 @@ void ED_area_newspace(bContext *C, ScrArea *area, int type, const bool skip_regi area->spacetype = type; area->type = st; - /* If st->new may be called, don't use context until then. The + /* If st->create may be called, don't use context until then. The * area->type->context() callback has changed but data may be invalid * (e.g. with properties editor) until space-data is properly created */ @@ -2166,7 +2166,7 @@ void ED_area_newspace(bContext *C, ScrArea *area, int type, const bool skip_regi if (st) { /* Don't get scene from context here which may depend on space-data. */ Scene *scene = WM_window_get_active_scene(win); - sl = st->new (area, scene); + sl = st->create(area, scene); BLI_addhead(&area->spacedata, sl); /* swap regions */ diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index ee998e0605a..81afb06ac27 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -897,7 +897,7 @@ static void screen_global_area_refresh(wmWindow *win, else { area = screen_area_create_with_geometry(&win->global_areas, rect, space_type); SpaceType *stype = BKE_spacetype_from_id(space_type); - SpaceLink *slink = stype->new (area, WM_window_get_active_scene(win)); + SpaceLink *slink = stype->create(area, WM_window_get_active_scene(win)); area->regionbase = slink->regionbase; diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c index 079cee290ae..db55eff8284 100644 --- a/source/blender/editors/space_action/space_action.c +++ b/source/blender/editors/space_action/space_action.c @@ -60,7 +60,7 @@ /* ******************** default callbacks for action space ***************** */ -static SpaceLink *action_new(const ScrArea *area, const Scene *scene) +static SpaceLink *action_create(const ScrArea *area, const Scene *scene) { SpaceAction *saction; ARegion *region; @@ -863,7 +863,7 @@ void ED_spacetype_action(void) st->spaceid = SPACE_ACTION; strncpy(st->name, "Action", BKE_ST_MAXNAME); - st->new = action_new; + st->create = action_create; 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 3ae203b563b..1656a76e2d4 100644 --- a/source/blender/editors/space_api/spacetypes.c +++ b/source/blender/editors/space_api/spacetypes.c @@ -280,7 +280,7 @@ void ED_region_draw_cb_draw(const bContext *C, ARegion *region, int type) void ED_spacetype_xxx(void); /* allocate and init some vars */ -static SpaceLink *xxx_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) +static SpaceLink *xxx_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) { return NULL; } @@ -324,7 +324,7 @@ void ED_spacetype_xxx(void) st.spaceid = SPACE_VIEW3D; - st.new = xxx_new; + st.create = xxx_create; 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 67efd8f4b8e..0863cb835e4 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -54,7 +54,7 @@ /* ******************** default callbacks for buttons space ***************** */ -static SpaceLink *buttons_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) +static SpaceLink *buttons_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) { ARegion *region; SpaceProperties *sbuts; @@ -699,7 +699,7 @@ void ED_spacetype_buttons(void) st->spaceid = SPACE_PROPERTIES; strncpy(st->name, "Buttons", BKE_ST_MAXNAME); - st->new = buttons_new; + st->create = buttons_create; 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 0aea7e4b73c..d27b80efd40 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -237,7 +237,7 @@ static void clip_area_sync_frame_from_scene(ScrArea *area, Scene *scene) /* ******************** default callbacks for clip space ***************** */ -static SpaceLink *clip_new(const ScrArea *area, const Scene *scene) +static SpaceLink *clip_create(const ScrArea *area, const Scene *scene) { ARegion *region; SpaceClip *sc; @@ -1351,7 +1351,7 @@ void ED_spacetype_clip(void) st->spaceid = SPACE_CLIP; strncpy(st->name, "Clip", BKE_ST_MAXNAME); - st->new = clip_new; + st->create = clip_create; 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 3c62aeb1759..3a0125356f7 100644 --- a/source/blender/editors/space_console/space_console.c +++ b/source/blender/editors/space_console/space_console.c @@ -46,7 +46,7 @@ /* ******************** default callbacks for console space ***************** */ -static SpaceLink *console_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) +static SpaceLink *console_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) { ARegion *region; SpaceConsole *sconsole; @@ -312,7 +312,7 @@ void ED_spacetype_console(void) st->spaceid = SPACE_CONSOLE; strncpy(st->name, "Console", BKE_ST_MAXNAME); - st->new = console_new; + st->create = console_create; 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 355597cddf1..f520f91b89b 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -91,7 +91,7 @@ static ARegion *file_tool_props_region_ensure(ScrArea *area, ARegion *region_pre /* ******************** default callbacks for file space ***************** */ -static SpaceLink *file_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) +static SpaceLink *file_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) { ARegion *region; SpaceFile *sfile; @@ -693,7 +693,7 @@ void ED_spacetype_file(void) st->spaceid = SPACE_FILE; strncpy(st->name, "File", BKE_ST_MAXNAME); - st->new = file_new; + st->create = file_create; 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 b1d995a7a0b..a4f76384cc6 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -64,7 +64,7 @@ /* ******************** default callbacks for ipo space ***************** */ -static SpaceLink *graph_new(const ScrArea *UNUSED(area), const Scene *scene) +static SpaceLink *graph_create(const ScrArea *UNUSED(area), const Scene *scene) { ARegion *region; SpaceGraph *sipo; @@ -838,7 +838,7 @@ void ED_spacetype_ipo(void) st->spaceid = SPACE_GRAPH; strncpy(st->name, "Graph", BKE_ST_MAXNAME); - st->new = graph_new; + st->create = graph_create; 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 d7d85112497..11af71586a5 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -117,7 +117,7 @@ static void image_user_refresh_scene(const bContext *C, SpaceImage *sima) /* ******************** default callbacks for image space ***************** */ -static SpaceLink *image_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) +static SpaceLink *image_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) { ARegion *region; SpaceImage *simage; @@ -1093,7 +1093,7 @@ void ED_spacetype_image(void) st->spaceid = SPACE_IMAGE; strncpy(st->name, "Image", BKE_ST_MAXNAME); - st->new = image_new; + st->create = image_create; 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 836830916ed..b9153ec0cbd 100644 --- a/source/blender/editors/space_info/space_info.c +++ b/source/blender/editors/space_info/space_info.c @@ -53,7 +53,7 @@ /* ******************** default callbacks for info space ***************** */ -static SpaceLink *info_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) +static SpaceLink *info_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) { ARegion *region; SpaceInfo *sinfo; @@ -287,7 +287,7 @@ void ED_spacetype_info(void) st->spaceid = SPACE_INFO; strncpy(st->name, "Info", BKE_ST_MAXNAME); - st->new = info_new; + st->create = info_create; st->free = info_free; st->init = info_init; st->duplicate = info_duplicate; diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c index b09536e0621..7bbfe451eed 100644 --- a/source/blender/editors/space_nla/space_nla.c +++ b/source/blender/editors/space_nla/space_nla.c @@ -57,7 +57,7 @@ /* ******************** default callbacks for nla space ***************** */ -static SpaceLink *nla_new(const ScrArea *area, const Scene *scene) +static SpaceLink *nla_create(const ScrArea *area, const Scene *scene) { ARegion *region; SpaceNla *snla; @@ -608,7 +608,7 @@ void ED_spacetype_nla(void) st->spaceid = SPACE_NLA; strncpy(st->name, "NLA", BKE_ST_MAXNAME); - st->new = nla_new; + st->create = nla_create; 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 d4adad3fc25..6d570001347 100644 --- a/source/blender/editors/space_node/space_node.c +++ b/source/blender/editors/space_node/space_node.c @@ -244,7 +244,7 @@ void snode_group_offset(SpaceNode *snode, float *x, float *y) /* ******************** default callbacks for node space ***************** */ -static SpaceLink *node_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) +static SpaceLink *node_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) { ARegion *region; SpaceNode *snode; @@ -954,7 +954,7 @@ void ED_spacetype_node(void) st->spaceid = SPACE_NODE; strncpy(st->name, "Node", BKE_ST_MAXNAME); - st->new = node_new; + st->create = node_create; 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 aa1663dff01..8a78211f145 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -294,7 +294,7 @@ static void outliner_header_region_listener(wmWindow *UNUSED(win), /* ******************** default callbacks for outliner space ***************** */ -static SpaceLink *outliner_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) +static SpaceLink *outliner_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) { ARegion *region; SpaceOutliner *soutliner; @@ -407,7 +407,7 @@ void ED_spacetype_outliner(void) st->spaceid = SPACE_OUTLINER; strncpy(st->name, "Outliner", BKE_ST_MAXNAME); - st->new = outliner_new; + st->create = outliner_create; 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 343f35421a4..4d0c2b658c6 100644 --- a/source/blender/editors/space_script/space_script.c +++ b/source/blender/editors/space_script/space_script.c @@ -51,7 +51,7 @@ /* ******************** default callbacks for script space ***************** */ -static SpaceLink *script_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) +static SpaceLink *script_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) { ARegion *region; SpaceScript *sscript; @@ -179,7 +179,7 @@ void ED_spacetype_script(void) st->spaceid = SPACE_SCRIPT; strncpy(st->name, "Script", BKE_ST_MAXNAME); - st->new = script_new; + st->create = script_create; 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 fa5e2ea02ff..b8bb3e4d43b 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -86,7 +86,7 @@ static ARegion *sequencer_find_region(ScrArea *area, short type) /* ******************** default callbacks for sequencer space ***************** */ -static SpaceLink *sequencer_new(const ScrArea *UNUSED(area), const Scene *scene) +static SpaceLink *sequencer_create(const ScrArea *UNUSED(area), const Scene *scene) { ARegion *region; SpaceSeq *sseq; @@ -852,7 +852,7 @@ void ED_spacetype_sequencer(void) st->spaceid = SPACE_SEQ; strncpy(st->name, "Sequencer", BKE_ST_MAXNAME); - st->new = sequencer_new; + st->create = sequencer_create; st->free = sequencer_free; st->init = sequencer_init; st->duplicate = sequencer_duplicate; diff --git a/source/blender/editors/space_statusbar/space_statusbar.c b/source/blender/editors/space_statusbar/space_statusbar.c index 34d7f8b0216..ae56b111360 100644 --- a/source/blender/editors/space_statusbar/space_statusbar.c +++ b/source/blender/editors/space_statusbar/space_statusbar.c @@ -42,7 +42,7 @@ /* ******************** default callbacks for statusbar space ******************** */ -static SpaceLink *statusbar_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) +static SpaceLink *statusbar_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) { ARegion *region; SpaceStatusBar *sstatusbar; @@ -158,7 +158,7 @@ void ED_spacetype_statusbar(void) st->spaceid = SPACE_STATUSBAR; strncpy(st->name, "Status Bar", BKE_ST_MAXNAME); - st->new = statusbar_new; + st->create = statusbar_create; st->free = statusbar_free; st->init = statusbar_init; st->duplicate = statusbar_duplicate; diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c index a2af99ee9f9..f6d00ec94bf 100644 --- a/source/blender/editors/space_text/space_text.c +++ b/source/blender/editors/space_text/space_text.c @@ -53,7 +53,7 @@ /* ******************** default callbacks for text space ***************** */ -static SpaceLink *text_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) +static SpaceLink *text_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) { ARegion *region; SpaceText *stext; @@ -445,7 +445,7 @@ void ED_spacetype_text(void) st->spaceid = SPACE_TEXT; strncpy(st->name, "Text", BKE_ST_MAXNAME); - st->new = text_new; + st->create = text_create; st->free = text_free; st->init = text_init; st->duplicate = text_duplicate; diff --git a/source/blender/editors/space_topbar/space_topbar.c b/source/blender/editors/space_topbar/space_topbar.c index d06c567988d..dc357cdd355 100644 --- a/source/blender/editors/space_topbar/space_topbar.c +++ b/source/blender/editors/space_topbar/space_topbar.c @@ -52,7 +52,7 @@ /* ******************** default callbacks for topbar space ***************** */ -static SpaceLink *topbar_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) +static SpaceLink *topbar_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) { ARegion *region; SpaceTopBar *stopbar; @@ -250,7 +250,7 @@ void ED_spacetype_topbar(void) st->spaceid = SPACE_TOPBAR; strncpy(st->name, "Top Bar", BKE_ST_MAXNAME); - st->new = topbar_new; + st->create = topbar_create; st->free = topbar_free; st->init = topbar_init; st->duplicate = topbar_duplicate; diff --git a/source/blender/editors/space_userpref/space_userpref.c b/source/blender/editors/space_userpref/space_userpref.c index 92f9c187ce5..0242bb4fe24 100644 --- a/source/blender/editors/space_userpref/space_userpref.c +++ b/source/blender/editors/space_userpref/space_userpref.c @@ -45,7 +45,7 @@ /* ******************** default callbacks for userpref space ***************** */ -static SpaceLink *userpref_new(const ScrArea *area, const Scene *UNUSED(scene)) +static SpaceLink *userpref_create(const ScrArea *area, const Scene *UNUSED(scene)) { ARegion *region; SpaceUserPref *spref; @@ -235,7 +235,7 @@ void ED_spacetype_userpref(void) st->spaceid = SPACE_USERPREF; strncpy(st->name, "Userpref", BKE_ST_MAXNAME); - st->new = userpref_new; + st->create = userpref_create; st->free = userpref_free; st->init = userpref_init; st->duplicate = userpref_duplicate; diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index ee42b61d246..e5ba27cef07 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -260,7 +260,7 @@ void ED_view3d_shade_update(Main *bmain, View3D *v3d, ScrArea *area) /* ******************** default callbacks for view3d space ***************** */ -static SpaceLink *view3d_new(const ScrArea *UNUSED(area), const Scene *scene) +static SpaceLink *view3d_create(const ScrArea *UNUSED(area), const Scene *scene) { ARegion *region; View3D *v3d; @@ -1611,7 +1611,7 @@ void ED_spacetype_view3d(void) st->spaceid = SPACE_VIEW3D; strncpy(st->name, "View3D", BKE_ST_MAXNAME); - st->new = view3d_new; + st->create = view3d_create; st->free = view3d_free; st->init = view3d_init; st->listener = space_view3d_listener; diff --git a/source/blender/io/alembic/intern/alembic_capi.cc b/source/blender/io/alembic/intern/alembic_capi.cc index 89eb9ed41a1..eba7f64db02 100644 --- a/source/blender/io/alembic/intern/alembic_capi.cc +++ b/source/blender/io/alembic/intern/alembic_capi.cc @@ -48,18 +48,13 @@ #include "BKE_lib_id.h" #include "BKE_object.h" #include "BKE_scene.h" +#include "BKE_screen.h" #include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" #include "ED_undo.h" -/* SpaceType struct has a member called 'new' which obviously conflicts with C++ - * so temporarily redefining the new keyword to make it compile. */ -#define new extern_new -#include "BKE_screen.h" -#undef new - #include "BLI_compiler_compat.h" #include "BLI_fileops.h" #include "BLI_ghash.h" diff --git a/source/blender/modifiers/intern/MOD_mask.cc b/source/blender/modifiers/intern/MOD_mask.cc index 93fb7749392..7b09d3c470d 100644 --- a/source/blender/modifiers/intern/MOD_mask.cc +++ b/source/blender/modifiers/intern/MOD_mask.cc @@ -44,12 +44,7 @@ #include "BKE_lib_query.h" #include "BKE_mesh.h" #include "BKE_modifier.h" - -/* SpaceType struct has a member called 'new' which obviously conflicts with C++ - * so temporarily redefining the new keyword to make it compile. */ -#define new extern_new #include "BKE_screen.h" -#undef new #include "UI_interface.h" #include "UI_resources.h" diff --git a/source/blender/modifiers/intern/MOD_simulation.cc b/source/blender/modifiers/intern/MOD_simulation.cc index edfcc16af85..92ad02ae34a 100644 --- a/source/blender/modifiers/intern/MOD_simulation.cc +++ b/source/blender/modifiers/intern/MOD_simulation.cc @@ -46,16 +46,11 @@ #include "BKE_mesh.h" #include "BKE_modifier.h" #include "BKE_pointcloud.h" +#include "BKE_screen.h" #include "BKE_simulation.h" #include "BLO_read_write.h" -/* SpaceType struct has a member called 'new' which obviously conflicts with C++ - * so temporarily redefining the new keyword to make it compile. */ -#define new extern_new -#include "BKE_screen.h" -#undef new - #include "UI_interface.h" #include "UI_resources.h" |