[Bf-blender-cvs] [93189c4e086] soc-2020-outliner: Cleanup: Move functions

Nathan Craddock noreply at git.blender.org
Sat Jun 20 22:43:00 CEST 2020


Commit: 93189c4e086a0c2f424fa16beebe9d0617123750
Author: Nathan Craddock
Date:   Fri Jun 19 22:02:10 2020 -0600
Branches: soc-2020-outliner
https://developer.blender.org/rB93189c4e086a0c2f424fa16beebe9d0617123750

Cleanup: Move functions

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

M	source/blender/editors/space_buttons/buttons_context.c

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

diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 07af9784225..a29c28382d4 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -760,6 +760,31 @@ void buttons_context_compute(const bContext *C, SpaceProperties *sbuts)
   sbuts->pathflag = flag;
 }
 
+void ED_buttons_set_context(const bContext *C, const short context)
+{
+  bScreen *screen = CTX_wm_screen(C);
+  Object *obact = CTX_data_active_object(C);
+  ID *active_id;
+  if (obact) {
+    active_id = &obact->id;
+  }
+
+  LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
+    /* Only update for properties editors that are visible */
+    SpaceLink *sl = area->spacedata.first;
+
+    if (sl->spacetype == SPACE_PROPERTIES) {
+      SpaceProperties *sbuts = (SpaceProperties *)sl;
+
+      ButsContextPath path;
+      if (buttons_context_path(C, sbuts, &path, context, 0)) {
+        sbuts->mainbuser = context;
+        sbuts->mainb = sbuts->mainbuser;
+      }
+    }
+  }
+}
+
 /************************* Context Callback ************************/
 
 const char *buttons_context_dir[] = {
@@ -1292,28 +1317,3 @@ ID *buttons_context_id_path(const bContext *C)
 
   return NULL;
 }
-
-void ED_buttons_set_context(const bContext *C, const short context)
-{
-  bScreen *screen = CTX_wm_screen(C);
-  Object *obact = CTX_data_active_object(C);
-  ID *active_id;
-  if (obact) {
-    active_id = &obact->id;
-  }
-
-  LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
-    /* Only update for properties editors that are visible */
-    SpaceLink *sl = area->spacedata.first;
-
-    if (sl->spacetype == SPACE_PROPERTIES) {
-      SpaceProperties *sbuts = (SpaceProperties *)sl;
-
-      ButsContextPath path;
-      if (buttons_context_path(C, sbuts, &path, context, 0)) {
-        sbuts->mainbuser = context;
-        sbuts->mainb = sbuts->mainbuser;
-      }
-    }
-  }
-}



More information about the Bf-blender-cvs mailing list