move SPACE_* (enum) and SPACEICONMAX to DNA_space_types (being the more logical place than DNA_screen_types). SPACEICONMAX gets its value now through this enum, so it is not anymore easy to forget to update it correctly :)

This commit is contained in:
Nathan Letwory 2006-11-07 11:24:11 +00:00
parent a8d1f30807
commit 008d6987d0
19 changed files with 41 additions and 29 deletions

@ -40,7 +40,6 @@ struct SpaceIpo;
struct Ipo;
/* these used to be in blender/src/headerbuttons.c: */
#define SPACEICONMAX 16 /* See release/datafiles/blenderbuttons */
#define XIC 20
#define YIC 20

@ -164,31 +164,5 @@ typedef struct ScrArea {
#define SCREEN_HANDLER_PYTHON 2
#define SCREEN_HANDLER_VERSE 3
/* dunno who thought this below is nice code, but be warned, the values are written in
a file, and cannot be switched or altered. enum here is out of focus (ton) */
enum {
SPACE_EMPTY,
SPACE_VIEW3D,
SPACE_IPO,
SPACE_OOPS,
SPACE_BUTS,
SPACE_FILE,
SPACE_IMAGE,
SPACE_INFO,
SPACE_SEQ,
SPACE_TEXT,
SPACE_IMASEL,
SPACE_SOUND,
SPACE_ACTION,
SPACE_NLA,
SPACE_SCRIPT,
SPACE_TIME,
SPACE_NODE
/* SPACE_LOGIC */
};
/* Adding a new space type? Change SPACEICONMAX in BSE_headerbuttons.h */
/* -- should rather handle this with the above enum... */
#endif

@ -493,6 +493,7 @@ typedef struct SpaceImaSel {
#define ST_SCROLL_SELECT 0x0001 // scrollable
#define ST_CLEAR_NAMESPACE 0x0010 // clear namespace after script
// execution (see BPY_main.c)
/* SpaceOops->type */
#define SO_OOPS 0
#define SO_OUTLINER 1
@ -590,4 +591,27 @@ typedef struct SpaceImaSel {
/* sseq->flag */
#define SEQ_DRAWFRAMES 1
/* space types, moved from DNA_screen_types.h */
enum {
SPACE_EMPTY,
SPACE_VIEW3D,
SPACE_IPO,
SPACE_OOPS,
SPACE_BUTS,
SPACE_FILE,
SPACE_IMAGE,
SPACE_INFO,
SPACE_SEQ,
SPACE_TEXT,
SPACE_IMASEL,
SPACE_SOUND,
SPACE_ACTION,
SPACE_NLA,
SPACE_SCRIPT,
SPACE_TIME,
SPACE_NODE,
SPACEICONMAX = SPACE_NODE
/* SPACE_LOGIC */
};
#endif

@ -37,7 +37,8 @@ struct View3D;
#include "BKE_global.h"
#include "BKE_main.h"
#include "MEM_guardedalloc.h" /* for MEM_callocN */
#include "DNA_screen_types.h" /* SPACE_VIEW3D, SPACE_SEQ */
#include "DNA_space_types.h" /* SPACE_VIEW3D, SPACE_SEQ */
#include "DNA_screen_types.h"
#include "DNA_userdef_types.h" /* U.userdefs */
#include "DNA_object_types.h" /* SceneObSeq_new */
#include "BKE_depsgraph.h"

@ -35,6 +35,7 @@
#include <Python.h>
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_userdef_types.h"
typedef struct {

@ -50,6 +50,7 @@
#include "BLI_blenlib.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_view3d_types.h"
#include "BKE_global.h"

@ -47,6 +47,7 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_userdef_types.h"
#include "DNA_constraint_types.h"
#include "DNA_key_types.h"

@ -58,6 +58,7 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_view3d_types.h"
#include "DNA_userdef_types.h"

@ -42,6 +42,7 @@
#include "BLI_arithb.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_meta_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"

@ -46,6 +46,7 @@
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_space_types.h"
#include "DNA_screen_types.h"
#include "DNA_view3d_types.h"

@ -76,6 +76,7 @@
#include "DNA_object_types.h"
#include "DNA_object_force.h"
#include "DNA_scene_types.h"
#include "DNA_space_types.h"
#include "DNA_screen_types.h"
#include "DNA_texture_types.h"
#include "DNA_property_types.h"

@ -54,6 +54,7 @@
#include "DNA_meshdata_types.h"
#include "DNA_packedFile_types.h"
#include "DNA_scene_types.h"
#include "DNA_space_types.h"
#include "DNA_screen_types.h"
#include "DNA_userdef_types.h"
#include "DNA_space_types.h"

@ -55,6 +55,7 @@
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_scene_types.h"
#include "DNA_sound_types.h"
#include "DNA_packedFile_types.h"

@ -55,6 +55,7 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_view3d_types.h"
#include "DNA_userdef_types.h"

@ -52,6 +52,7 @@
#include "DNA_scene_types.h"
#include "DNA_camera_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_ipo_types.h"
#include "DNA_key_types.h"

@ -63,6 +63,7 @@
#include "BMF_Api.h"
#include "DNA_image_types.h"
#include "DNA_space_types.h"
#include "DNA_screen_types.h"
#include "DNA_scene_types.h"
#include "DNA_view3d_types.h"

@ -39,6 +39,7 @@
#include "BLI_blenlib.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "BIF_gl.h"
#include "BIF_mywindow.h"

@ -34,7 +34,7 @@
#include <math.h>
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_userdef_types.h"
#include "DNA_view3d_types.h"

@ -57,6 +57,7 @@
#include "DNA_object_types.h"
#include "DNA_object_force.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_scene_types.h"
#include "DNA_view3d_types.h"
#include "DNA_userdef_types.h"