[Bf-blender-cvs] [690ed63eb55] master: Cleanup: unused region init functions

Campbell Barton noreply at git.blender.org
Thu Apr 18 20:03:19 CEST 2019


Commit: 690ed63eb55d1c52b051d8ce40e76e1b57291f29
Author: Campbell Barton
Date:   Thu Apr 18 20:02:09 2019 +0200
Branches: master
https://developer.blender.org/rB690ed63eb55d1c52b051d8ce40e76e1b57291f29

Cleanup: unused region init functions

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

M	source/blender/editors/space_action/action_intern.h
M	source/blender/editors/space_action/space_action.c
M	source/blender/editors/space_graph/graph_intern.h
M	source/blender/editors/space_graph/space_graph.c
M	source/blender/editors/space_image/image_intern.h
M	source/blender/editors/space_image/space_image.c
M	source/blender/editors/space_nla/nla_intern.h
M	source/blender/editors/space_nla/space_nla.c
M	source/blender/editors/space_node/node_intern.h
M	source/blender/editors/space_node/space_node.c
M	source/blender/editors/space_sequencer/sequencer_intern.h
M	source/blender/editors/space_sequencer/space_sequencer.c
M	source/blender/editors/space_view3d/space_view3d.c
M	source/blender/editors/space_view3d/view3d_intern.h

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

diff --git a/source/blender/editors/space_action/action_intern.h b/source/blender/editors/space_action/action_intern.h
index bf2880dea36..eaca7968a34 100644
--- a/source/blender/editors/space_action/action_intern.h
+++ b/source/blender/editors/space_action/action_intern.h
@@ -40,8 +40,6 @@ struct wmOperatorType;
 /* **************************************** */
 /* space_action.c / action_buttons.c */
 
-struct ARegion *action_has_buttons_region(struct ScrArea *sa);
-
 void action_buttons_register(struct ARegionType *art);
 
 /* ***************************************** */
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index eda8ad4a787..4c133e6a91e 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -56,34 +56,6 @@
 #include "action_intern.h" /* own include */
 #include "GPU_framebuffer.h"
 
-/* ******************** manage regions ********************* */
-
-ARegion *action_has_buttons_region(ScrArea *sa)
-{
-  ARegion *ar, *arnew;
-
-  ar = BKE_area_find_region_type(sa, RGN_TYPE_UI);
-  if (ar)
-    return ar;
-
-  /* add subdiv level; after main */
-  ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
-
-  /* is error! */
-  if (ar == NULL)
-    return NULL;
-
-  arnew = MEM_callocN(sizeof(ARegion), "buttons for action");
-
-  BLI_insertlinkafter(&sa->regionbase, ar, arnew);
-  arnew->regiontype = RGN_TYPE_UI;
-  arnew->alignment = RGN_ALIGN_RIGHT;
-
-  arnew->flag = RGN_FLAG_HIDDEN;
-
-  return arnew;
-}
-
 /* ******************** default callbacks for action space ***************** */
 
 static SpaceLink *action_new(const ScrArea *sa, const Scene *scene)
diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h
index 73dd1ae68f7..606f4bc3fe3 100644
--- a/source/blender/editors/space_graph/graph_intern.h
+++ b/source/blender/editors/space_graph/graph_intern.h
@@ -35,10 +35,6 @@ struct bContext;
 
 /* internal exports only */
 
-/* ***************************************** */
-/* space_graph.c */
-struct ARegion *graph_has_buttons_region(struct ScrArea *sa);
-
 /* ***************************************** */
 /* graph_draw.c */
 void graph_draw_channel_names(struct bContext *C, struct bAnimContext *ac, struct ARegion *ar);
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index 8751fe5199d..8fb5cb1d18a 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -60,34 +60,6 @@
 
 #include "graph_intern.h"  // own include
 
-/* ******************** manage regions ********************* */
-
-ARegion *graph_has_buttons_region(ScrArea *sa)
-{
-  ARegion *ar, *arnew;
-
-  ar = BKE_area_find_region_type(sa, RGN_TYPE_UI);
-  if (ar)
-    return ar;
-
-  /* add subdiv level; after main */
-  ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
-
-  /* is error! */
-  if (ar == NULL)
-    return NULL;
-
-  arnew = MEM_callocN(sizeof(ARegion), "buttons for graph");
-
-  BLI_insertlinkafter(&sa->regionbase, ar, arnew);
-  arnew->regiontype = RGN_TYPE_UI;
-  arnew->alignment = RGN_ALIGN_RIGHT;
-
-  arnew->flag = RGN_FLAG_HIDDEN;
-
-  return arnew;
-}
-
 /* ******************** default callbacks for ipo space ***************** */
 
 static SpaceLink *graph_new(const ScrArea *UNUSED(sa), const Scene *scene)
diff --git a/source/blender/editors/space_image/image_intern.h b/source/blender/editors/space_image/image_intern.h
index 180ad93a33c..a851684f2f3 100644
--- a/source/blender/editors/space_image/image_intern.h
+++ b/source/blender/editors/space_image/image_intern.h
@@ -34,8 +34,6 @@ struct bNodeTree;
 struct wmOperatorType;
 
 /* space_image.c */
-struct ARegion *image_has_buttons_region(struct ScrArea *sa);
-struct ARegion *image_has_tools_region(struct ScrArea *sa);
 
 extern const char *image_context_dir[]; /* doc access */
 
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index f3ed84b3277..ded19b10300 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -115,66 +115,6 @@ static void image_user_refresh_scene(const bContext *C, SpaceImage *sima)
   ED_space_image_auto_set(C, sima);
 }
 
-/* ******************** manage regions ********************* */
-
-ARegion *image_has_buttons_region(ScrArea *sa)
-{
-  ARegion *ar, *arnew;
-
-  ar = BKE_area_find_region_type(sa, RGN_TYPE_UI);
-  if (ar) {
-    return ar;
-  }
-
-  /* add subdiv level; after header */
-  ar = BKE_area_find_region_type(sa, RGN_TYPE_HEADER);
-
-  /* is error! */
-  if (ar == NULL) {
-    return NULL;
-  }
-
-  arnew = MEM_callocN(sizeof(ARegion), "buttons for image");
-
-  BLI_insertlinkafter(&sa->regionbase, ar, arnew);
-  arnew->regiontype = RGN_TYPE_UI;
-  arnew->alignment = RGN_ALIGN_RIGHT;
-
-  arnew->flag = RGN_FLAG_HIDDEN;
-
-  return arnew;
-}
-
-ARegion *image_has_tools_region(ScrArea *sa)
-{
-  ARegion *ar, *arnew;
-
-  ar = BKE_area_find_region_type(sa, RGN_TYPE_TOOLS);
-  if (ar) {
-    return ar;
-  }
-
-  /* add subdiv level; after buttons */
-  ar = BKE_area_find_region_type(sa, RGN_TYPE_UI);
-
-  /* is error! */
-  if (ar == NULL) {
-    return NULL;
-  }
-
-  arnew = MEM_callocN(sizeof(ARegion), "scopes for image");
-
-  BLI_insertlinkafter(&sa->regionbase, ar, arnew);
-  arnew->regiontype = RGN_TYPE_TOOLS;
-  arnew->alignment = RGN_ALIGN_LEFT;
-
-  arnew->flag = RGN_FLAG_HIDDEN;
-
-  image_scopes_tag_refresh(sa);
-
-  return arnew;
-}
-
 /* ******************** default callbacks for image space ***************** */
 
 static SpaceLink *image_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scene))
diff --git a/source/blender/editors/space_nla/nla_intern.h b/source/blender/editors/space_nla/nla_intern.h
index ea067cf4847..2b20ab69fa7 100644
--- a/source/blender/editors/space_nla/nla_intern.h
+++ b/source/blender/editors/space_nla/nla_intern.h
@@ -32,8 +32,6 @@
 /* **************************************** */
 /* space_nla.c / nla_buttons.c */
 
-ARegion *nla_has_buttons_region(ScrArea *sa);
-
 bool nla_panel_context(const bContext *C,
                        PointerRNA *adt_ptr,
                        PointerRNA *nlt_ptr,
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index ccf2e552644..26a7b42efd2 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -53,34 +53,6 @@
 #include "nla_intern.h" /* own include */
 #include "GPU_framebuffer.h"
 
-/* ******************** manage regions ********************* */
-
-ARegion *nla_has_buttons_region(ScrArea *sa)
-{
-  ARegion *ar, *arnew;
-
-  ar = BKE_area_find_region_type(sa, RGN_TYPE_UI);
-  if (ar)
-    return ar;
-
-  /* add subdiv level; after main */
-  ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
-
-  /* is error! */
-  if (ar == NULL)
-    return NULL;
-
-  arnew = MEM_callocN(sizeof(ARegion), "buttons for nla");
-
-  BLI_insertlinkafter(&sa->regionbase, ar, arnew);
-  arnew->regiontype = RGN_TYPE_UI;
-  arnew->alignment = RGN_ALIGN_RIGHT;
-
-  arnew->flag = RGN_FLAG_HIDDEN;
-
-  return arnew;
-}
-
 /* ******************** default callbacks for nla space ***************** */
 
 static SpaceLink *nla_new(const ScrArea *sa, const Scene *scene)
diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h
index ce198d3e85c..cb185d6cef2 100644
--- a/source/blender/editors/space_node/node_intern.h
+++ b/source/blender/editors/space_node/node_intern.h
@@ -54,8 +54,6 @@ typedef struct bNodeLinkDrag {
 } bNodeLinkDrag;
 
 /* space_node.c */
-ARegion *node_has_buttons_region(ScrArea *sa);
-ARegion *node_has_tools_region(ScrArea *sa);
 
 /* transform between View2Ds in the tree path */
 void snode_group_offset(struct SpaceNode *snode, float *x, float *y);
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index 52dab2a44a8..94380814fe8 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -242,64 +242,6 @@ void snode_group_offset(SpaceNode *snode, float *x, float *y)
   }
 }
 
-/* ******************** manage regions ********************* */
-
-ARegion *node_has_buttons_region(ScrArea *sa)
-{
-  ARegion *ar, *arnew;
-
-  ar = BKE_area_find_region_type(sa, RGN_TYPE_UI);
-  if (ar) {
-    return ar;
-  }
-
-  /* add subdiv level; after header */
-  ar = BKE_area_find_region_type(sa, RGN_TYPE_HEADER);
-
-  /* is error! */
-  if (ar == NULL) {
-    return NULL;
-  }
-
-  arnew = MEM_callocN(sizeof(ARegion), "buttons for node");
-
-  BLI_insertlinkafter(&sa->regionbase, ar, arnew);
-  arnew->regiontype = RGN_TYPE_UI;
-  arnew->alignment = RGN_ALIGN_RIGHT;
-
-  arnew->flag = RGN_FLAG_HIDDEN;
-
-  return arnew;
-}
-
-ARegion *node_has_tools_region(ScrArea *sa)
-{
-  ARegion *ar, *arnew;
-
-  ar = BKE_area_find_region_type(sa, RGN_TYPE_TOOLS);
-  if (ar) {
-    return ar;
-  }
-
-  /* add subdiv level; after header */
-  ar = BKE_area_find_region_type(sa, RGN_TYPE_HEADER);
-
-  /* is error! */
-  if (ar == NULL) {
-    return NULL;
-  }
-
-  arnew = MEM_callocN(sizeof(ARegion), "node tools");
-
-  BLI_insertlinkafter(&sa->regionbase, ar, arnew);
-  arnew->regiontype = RGN_TYPE_TOOLS;
-  arnew->alignment = RGN_ALIGN_LEFT;
-
-  arnew->flag = RGN_FLAG_HIDDEN;
-
-  return arnew;
-}
-
 /* ******************** default callbacks for node space ***************** */
 
 static SpaceLink *node_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scene))
diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h
index 88181e4127f..9244bbb3034 100644
--- a/source/blender/editors/space_sequencer/sequencer_intern.h
+++ b/source/blender/editors/space_sequencer/sequencer_intern.h
@@ -42,9 +42,6 @@ struct bContext;
 struct rctf;
 struct wmOperator;
 
-/* space_sequencer.c */
-struct ARegion *sequencer_has_buttons_region(struct ScrArea *sa);
-
 /* s

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list