Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-12-26 16:11:04 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-12-26 16:11:04 +0300
commit233509245615d06f0274d04940ad67d8e636d7f0 (patch)
tree4c29f431c3ee2680bb76ff1cc5420f75ad089dbb /source/blender/blenloader/intern/readfile.c
parent7715e45a7adf2cc07856956aef27fc6359af94e1 (diff)
UI: Panels
* API and usage is basically the same still. * Panels were moved to region level. I first thought of keeping them at area level, but having them at region level it's simpler to handle events and do drawing, and also to integrate with view2d. They can still become area level overlapping regions, if we make a floating (or docked) region that can contain panels. * Added back a few panels from the scene buttons for testing. Issues still: * The view2d handling and alignment refresh of panels is not correct yet in the buttons window. * I did not yet bring back the block handlers system. It was basically a system that stored which panel was open and where the events for that panel would go. Just a few functions, but not sure how it fits in 2.5. * There was a case where dragging panels would not properly remove the window level handler, but could not redo anymore even though I don't think I fixed it. * Some text in the panels goes past the end of the button, that is due to the checkmark button drawing, not related to this commit. Other UI code changes: * Renamed interface.h to interface_intern.h for consistency. * Fixed some issues with freeing of blocks when they changed due to context. * uiDrawBlock now takes a context pointer (mostly for block drawextra).
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r--source/blender/blenloader/intern/readfile.c48
1 files changed, 25 insertions, 23 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 2d8d9810b32..c7aa86b2bf5 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -3560,7 +3560,7 @@ static void direct_link_scene(FileData *fd, Scene *sce)
if(sce->sculptdata.cumap)
direct_link_curvemapping(fd, sce->sculptdata.cumap);
else
- ; //XXX sculpt_reset_curve(&sce->sculptdata);
+ sculpt_reset_curve(&sce->sculptdata);
if(sce->ed) {
ListBase *old_seqbasep= &((Editing *)sce->ed)->seqbase;
@@ -4150,6 +4150,17 @@ void lib_link_screen_restore(Main *newmain, Scene *curscene)
static void direct_link_region(FileData *fd, ARegion *ar)
{
+ Panel *pa;
+
+ link_list(fd, &(ar->panels));
+
+ for(pa= ar->panels.first; pa; pa=pa->next) {
+ pa->paneltab= newdataadr(fd, pa->paneltab);
+ pa->active= 0;
+ pa->sortcounter= 0;
+ pa->activedata= NULL;
+ }
+
ar->handlers.first= ar->handlers.last= NULL;
ar->uiblocks.first= ar->uiblocks.last= NULL;
ar->headerstr= NULL;
@@ -4200,16 +4211,13 @@ static void direct_link_screen(FileData *fd, bScreen *sc)
/* areas */
for(sa= sc->areabase.first; sa; sa= sa->next) {
- Panel *pa;
SpaceLink *sl;
ARegion *ar;
link_list(fd, &(sa->spacedata));
- link_list(fd, &(sa->panels));
link_list(fd, &(sa->regionbase));
sa->handlers.first= sa->handlers.last= NULL;
- sa->uiblocks.first= sa->uiblocks.last= NULL;
sa->type= NULL; /* spacetype callbacks */
/* accident can happen when read/save new file with older version */
@@ -4220,12 +4228,6 @@ static void direct_link_screen(FileData *fd, bScreen *sc)
BLI_addtail(&sa->spacedata, sinfo);
}
- for(pa= sa->panels.first; pa; pa=pa->next) {
- pa->paneltab= newdataadr(fd, pa->paneltab);
- pa->active= 0;
- pa->sortcounter= 0;
- }
-
for (sl= sa->spacedata.first; sl; sl= sl->next) {
link_list(fd, &(sl->regionbase));
@@ -4705,19 +4707,19 @@ static void vcol_to_fcol(Mesh *me)
static int map_223_keybd_code_to_224_keybd_code(int code)
{
switch (code) {
-//XXX case 312: return F12KEY;
-//XXX case 159: return PADSLASHKEY;
-//XXX case 161: return PAD0;
-//XXX case 154: return PAD1;
-//XXX case 150: return PAD2;
-//XXX case 155: return PAD3;
-//XXX case 151: return PAD4;
-//XXX case 156: return PAD5;
-//XXX case 152: return PAD6;
-//XXX case 157: return PAD7;
-//XXX case 153: return PAD8;
-//XXX case 158: return PAD9;
- default: return code;
+ case 312: return 311; /* F12KEY */
+ case 159: return 161; /* PADSLASHKEY */
+ case 161: return 150; /* PAD0 */
+ case 154: return 151; /* PAD1 */
+ case 150: return 152; /* PAD2 */
+ case 155: return 153; /* PAD3 */
+ case 151: return 154; /* PAD4 */
+ case 156: return 155; /* PAD5 */
+ case 152: return 156; /* PAD6 */
+ case 157: return 157; /* PAD7 */
+ case 153: return 158; /* PAD8 */
+ case 158: return 159; /* PAD9 */
+ default: return code;
}
}