diff options
author | Joseph Eagar <joeedh@gmail.com> | 2009-05-23 07:24:15 +0400 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2009-05-23 07:24:15 +0400 |
commit | f026266e185f90543138a856898f50b2295a12fc (patch) | |
tree | f674a1a1b328a423ec4bdcdc4a11f35e56669e7a /source/blender/editors | |
parent | b7fe3258b66698f62f630d0b18431b54b65101ed (diff) |
merge with 2.5 at r20307. note there were some python hacking necassary for this to work, so um hopefully there's not too much cruft from that.
[[Split portion of a mixed commit.]]
Diffstat (limited to 'source/blender/editors')
218 files changed, 19625 insertions, 17784 deletions
diff --git a/source/blender/editors/CMakeLists.txt b/source/blender/editors/CMakeLists.txt index 06b0fb4ab41..914fdaa4bc6 100644 --- a/source/blender/editors/CMakeLists.txt +++ b/source/blender/editors/CMakeLists.txt @@ -30,7 +30,7 @@ SET(INC ../windowmanager ../editors/include ../../../intern/guardedalloc ../../../intern/memutil ../blenlib ../makesdna ../makesrna ../blenkernel - ../include ../../../intern/bmfont ../imbuf ../render/extern/include + ../include ../imbuf ../render/extern/include ../../../intern/bsp/extern ../radiosity/extern/include ../../../intern/decimation/extern ../blenloader ../python ../../kernel/gen_system ../../../intern/SoundSystem ../readstreamglue @@ -43,9 +43,7 @@ SET(INC ../windowmanager ) IF(WITH_INTERNATIONAL) - SET(INC ${INC} ../ftfont) ADD_DEFINITIONS(-DINTERNATIONAL) - ADD_DEFINITIONS(-DFTGL_STATIC_LIBRARY) ENDIF(WITH_INTERNATIONAL) IF(WITH_OPENEXR) diff --git a/source/blender/editors/animation/anim_channels.c b/source/blender/editors/animation/anim_channels.c index ff9876bf715..9e0e50a8de5 100644 --- a/source/blender/editors/animation/anim_channels.c +++ b/source/blender/editors/animation/anim_channels.c @@ -100,6 +100,18 @@ else if (smode == ACHANNEL_SETFLAG_ADD) (channel)->flag |= (sflag); \ else (channel)->flag &= ~(sflag); \ } + +/* set/clear/toggle macro, where the flag is negative + * - channel - channel with a 'flag' member that we're setting + * - smode - 0=clear, 1=set, 2=toggle + * - sflag - bitflag to set + */ +#define ACHANNEL_SET_FLAG_NEG(channel, smode, sflag) \ + { \ + if (smode == ACHANNEL_SETFLAG_TOGGLE) (channel)->flag ^= (sflag); \ + else if (smode == ACHANNEL_SETFLAG_ADD) (channel)->flag &= ~(sflag); \ + else (channel)->flag |= (sflag); \ + } /* -------------------------- Exposed API ----------------------------------- */ @@ -108,7 +120,6 @@ void ANIM_set_active_channel (void *data, short datatype, int filter, void *chan { ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; - short smode; /* try to build list of filtered items */ // XXX we don't need/supply animcontext for now, since in this case, there's nothing really essential there that isn't already covered @@ -120,15 +131,7 @@ void ANIM_set_active_channel (void *data, short datatype, int filter, void *chan for (ale= anim_data.first; ale; ale= ale->next) { /* skip if types don't match */ if (channel_type != ale->type) - continue; - - /* flag setting mode - * - depends on whether the provided channel is encountered - */ - if (ale->data == channel_data) - smode= ACHANNEL_SETFLAG_ADD; - else - smode= ACHANNEL_SETFLAG_CLEAR; + continue; /* flag to set depends on type */ switch (ale->type) { @@ -136,14 +139,32 @@ void ANIM_set_active_channel (void *data, short datatype, int filter, void *chan { bActionGroup *agrp= (bActionGroup *)ale->data; - ACHANNEL_SET_FLAG(agrp, smode, AGRP_ACTIVE); + ACHANNEL_SET_FLAG(agrp, ACHANNEL_SETFLAG_CLEAR, AGRP_ACTIVE); } break; case ANIMTYPE_FCURVE: { FCurve *fcu= (FCurve *)ale->data; - ACHANNEL_SET_FLAG(fcu, smode, FCURVE_ACTIVE); + ACHANNEL_SET_FLAG(fcu, ACHANNEL_SETFLAG_CLEAR, FCURVE_ACTIVE); + } + break; + } + } + + /* set active flag */ + if (channel_data) { + switch (channel_type) { + case ANIMTYPE_GROUP: + { + bActionGroup *agrp= (bActionGroup *)channel_data; + agrp->flag |= AGRP_ACTIVE; + } + break; + case ANIMTYPE_FCURVE: + { + FCurve *fcu= (FCurve *)channel_data; + fcu->flag |= FCURVE_ACTIVE; } break; } @@ -695,6 +716,7 @@ enum { ACHANNEL_SETTING_PROTECT = 1, ACHANNEL_SETTING_MUTE, ACHANNEL_SETTING_VISIBLE, + ACHANNEL_SETTING_EXPAND, } eAnimChannel_Settings; /* defines for setting animation-channel flags */ @@ -715,30 +737,158 @@ EnumPropertyItem prop_animchannel_settings_types[] = { /* ------------------- */ +/* macro to be used in setflag_anim_channels */ +#define ASUBCHANNEL_SEL_OK(ale) ( (onlysel == 0) || \ + ((ale->id) && (GS(ale->id->name)==ID_OB) && (((Object *)ale->id)->flag & SELECT)) ) + /* Set/clear a particular flag (setting) for all selected + visible channels * setting: the setting to modify * mode: eAnimChannels_SetFlag + * onlysel: only selected channels get the flag set */ -static void setflag_anim_channels (bAnimContext *ac, short setting, short mode) +static void setflag_anim_channels (bAnimContext *ac, short setting, short mode, short onlysel) { ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; int filter; /* filter data */ - filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CHANNELS | ANIMFILTER_SEL); + filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CHANNELS); + if (onlysel) filter |= ANIMFILTER_SEL; ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); /* affect selected channels */ for (ale= anim_data.first; ale; ale= ale->next) { switch (ale->type) { + case ANIMTYPE_OBJECT: + { + Base *base= (Base *)ale->data; + Object *ob= base->object; + + if (setting == ACHANNEL_SETTING_EXPAND) { + // XXX - settings should really be moved out of ob->nlaflag + if (mode == ACHANNEL_SETFLAG_TOGGLE) ob->nlaflag ^= OB_ADS_COLLAPSED; + else if (mode == ACHANNEL_SETFLAG_ADD) ob->nlaflag &= ~OB_ADS_COLLAPSED; + else ob->nlaflag |= OB_ADS_COLLAPSED; + } + } + break; + + case ANIMTYPE_FILLACTD: + { + bAction *act= (bAction *)ale->data; + + if (ASUBCHANNEL_SEL_OK(ale)) { + if (setting == ACHANNEL_SETTING_EXPAND) { + ACHANNEL_SET_FLAG_NEG(act, mode, ACT_COLLAPSED); + } + } + } + break; + case ANIMTYPE_FILLDRIVERS: + { + AnimData *adt= (AnimData *)ale->data; + + if (ASUBCHANNEL_SEL_OK(ale)) { + if (setting == ACHANNEL_SETTING_EXPAND) { + ACHANNEL_SET_FLAG_NEG(adt, mode, ADT_DRIVERS_COLLAPSED); + } + } + } + break; + case ANIMTYPE_FILLMATD: + { + Object *ob= (Object *)ale->data; + + // XXX - settings should really be moved out of ob->nlaflag + if ((onlysel == 0) || (ob->flag & SELECT)) { + if (setting == ACHANNEL_SETTING_EXPAND) { + if (mode == ACHANNEL_SETFLAG_TOGGLE) ob->nlaflag ^= OB_ADS_SHOWMATS; + else if (mode == ACHANNEL_SETFLAG_ADD) ob->nlaflag |= OB_ADS_SHOWMATS; + else ob->nlaflag &= ~OB_ADS_SHOWMATS; + } + } + } + break; + + case ANIMTYPE_DSMAT: + { + Material *ma= (Material *)ale->data; + + if (ASUBCHANNEL_SEL_OK(ale)) { + if (setting == ACHANNEL_SETTING_EXPAND) { + ACHANNEL_SET_FLAG(ma, mode, MA_DS_EXPAND); + } + } + } + break; + case ANIMTYPE_DSLAM: + { + Lamp *la= (Lamp *)ale->data; + + if (ASUBCHANNEL_SEL_OK(ale)) { + if (setting == ACHANNEL_SETTING_EXPAND) { + ACHANNEL_SET_FLAG(la, mode, LA_DS_EXPAND); + } + } + } + break; + case ANIMTYPE_DSCAM: + { + Camera *ca= (Camera *)ale->data; + + if (ASUBCHANNEL_SEL_OK(ale)) { + if (setting == ACHANNEL_SETTING_EXPAND) { + ACHANNEL_SET_FLAG(ca, mode, CAM_DS_EXPAND); + } + } + } + break; + case ANIMTYPE_DSCUR: + { + Curve *cu= (Curve *)ale->data; + + if (ASUBCHANNEL_SEL_OK(ale)) { + if (setting == ACHANNEL_SETTING_EXPAND) { + ACHANNEL_SET_FLAG(cu, mode, CU_DS_EXPAND); + } + } + } + break; + case ANIMTYPE_DSSKEY: + { + Key *key= (Key *)ale->data; + + if (ASUBCHANNEL_SEL_OK(ale)) { + if (setting == ACHANNEL_SETTING_EXPAND) { + ACHANNEL_SET_FLAG(key, mode, KEYBLOCK_DS_EXPAND); + } + } + } + break; + case ANIMTYPE_DSWOR: + { + World *wo= (World *)ale->data; + + if (ASUBCHANNEL_SEL_OK(ale)) { + if (setting == ACHANNEL_SETTING_EXPAND) { + ACHANNEL_SET_FLAG(wo, mode, WO_DS_EXPAND); + } + } + } + break; + case ANIMTYPE_GROUP: { bActionGroup *agrp= (bActionGroup *)ale->data; - /* only 'protect' is available */ - if (setting == ACHANNEL_SETTING_PROTECT) { - ACHANNEL_SET_FLAG(agrp, mode, AGRP_PROTECTED); + switch (setting) { + case ACHANNEL_SETTING_PROTECT: + ACHANNEL_SET_FLAG(agrp, mode, AGRP_PROTECTED); + break; + case ACHANNEL_SETTING_EXPAND: + ACHANNEL_SET_FLAG(agrp, mode, AGRP_EXPANDED); + break; } } break; @@ -746,15 +896,16 @@ static void setflag_anim_channels (bAnimContext *ac, short setting, short mode) { FCurve *fcu= (FCurve *)ale->data; - /* mute */ - if (setting == ACHANNEL_SETTING_MUTE) { - ACHANNEL_SET_FLAG(fcu, mode, FCURVE_MUTED); - } - else if (setting == ACHANNEL_SETTING_PROTECT) { - ACHANNEL_SET_FLAG(fcu, mode, FCURVE_PROTECTED); - } - else if (setting == ACHANNEL_SETTING_VISIBLE) { - ACHANNEL_SET_FLAG(fcu, mode, FCURVE_VISIBLE); + switch (setting) { + case ACHANNEL_SETTING_MUTE: + ACHANNEL_SET_FLAG(fcu, mode, FCURVE_MUTED); + break; + case ACHANNEL_SETTING_PROTECT: + ACHANNEL_SET_FLAG(fcu, mode, FCURVE_PROTECTED); + break; + case ACHANNEL_SETTING_VISIBLE: + ACHANNEL_SET_FLAG(fcu, mode, FCURVE_VISIBLE); + break; } } break; @@ -762,14 +913,13 @@ static void setflag_anim_channels (bAnimContext *ac, short setting, short mode) { bGPDlayer *gpl= (bGPDlayer *)ale->data; - /* 'protect' and 'mute' */ - if (setting == ACHANNEL_SETTING_MUTE) { - /* mute */ - ACHANNEL_SET_FLAG(gpl, mode, GP_LAYER_HIDE); - } - else if (setting == ACHANNEL_SETTING_PROTECT) { - /* protected */ - ACHANNEL_SET_FLAG(gpl, mode, GP_LAYER_LOCKED); + switch (setting) { + case ACHANNEL_SETTING_MUTE: + ACHANNEL_SET_FLAG(gpl, mode, GP_LAYER_HIDE); + break; + case ACHANNEL_SETTING_PROTECT: + ACHANNEL_SET_FLAG(gpl, mode, GP_LAYER_LOCKED); + break; } } break; @@ -795,7 +945,7 @@ static int animchannels_setflag_exec(bContext *C, wmOperator *op) setting= RNA_enum_get(op->ptr, "type"); /* modify setting */ - setflag_anim_channels(&ac, setting, mode); + setflag_anim_channels(&ac, setting, mode, 1); /* set notifier tha things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_CHANNELS); @@ -888,6 +1038,88 @@ void ANIM_OT_channels_editable_toggle (wmOperatorType *ot) RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, ACHANNEL_SETTING_PROTECT, "Type", ""); } +/* ********************** Expand Channels Operator *********************** */ + +static int animchannels_expand_exec (bContext *C, wmOperator *op) +{ + bAnimContext ac; + short onlysel= 1; + + /* get editor data */ + if (ANIM_animdata_get_context(C, &ac) == 0) + return OPERATOR_CANCELLED; + + /* only affect selected channels? */ + if (RNA_boolean_get(op->ptr, "all")) + onlysel= 0; + + /* modify setting */ + setflag_anim_channels(&ac, ACHANNEL_SETTING_EXPAND, ACHANNEL_SETFLAG_ADD, onlysel); + + /* set notifier that things have changed */ + ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_CHANNELS); + + return OPERATOR_FINISHED; +} + +void ANIM_OT_channels_expand (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Expand Channels"; + ot->idname= "ANIM_OT_channels_expand"; + + /* api callbacks */ + ot->exec= animchannels_expand_exec; + ot->poll= ED_operator_areaactive; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* props */ + RNA_def_boolean(ot->srna, "all", 0, "All", "Expand all channels (not just selected ones)"); +} + +/* ********************** Collapse Channels Operator *********************** */ + +static int animchannels_collapse_exec (bContext *C, wmOperator *op) +{ + bAnimContext ac; + short onlysel= 1; + + /* get editor data */ + if (ANIM_animdata_get_context(C, &ac) == 0) + return OPERATOR_CANCELLED; + + /* only affect selected channels? */ + if (RNA_boolean_get(op->ptr, "all")) + onlysel= 0; + + /* modify setting */ + setflag_anim_channels(&ac, ACHANNEL_SETTING_EXPAND, ACHANNEL_SETFLAG_CLEAR, onlysel); + + /* set notifier that things have changed */ + ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_CHANNELS); + + return OPERATOR_FINISHED; +} + +void ANIM_OT_channels_collapse (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Collapse Channels"; + ot->idname= "ANIM_OT_channels_collapse"; + + /* api callbacks */ + ot->exec= animchannels_collapse_exec; + ot->poll= ED_operator_areaactive; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* props */ + RNA_def_boolean(ot->srna, "all", 0, "All", "Collapse all channels (not just selected ones)"); +} + /* ********************** Select All Operator *********************** */ static int animchannels_deselectall_exec(bContext *C, wmOperator *op) @@ -1262,8 +1494,9 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s offset = 0; if (x >= (ACHANNEL_NAMEWIDTH-ACHANNEL_BUTTON_WIDTH)) { - /* toggle protection */ - fcu->flag ^= FCURVE_PROTECTED; + /* toggle protection (only if there's a toggle there) */ + if (fcu->bezt) + fcu->flag ^= FCURVE_PROTECTED; } else if (x >= (ACHANNEL_NAMEWIDTH-2*ACHANNEL_BUTTON_WIDTH)) { /* toggle mute */ @@ -1389,11 +1622,11 @@ static int animchannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent * return OPERATOR_FINISHED; } -void ANIM_OT_channels_mouseclick (wmOperatorType *ot) +void ANIM_OT_channels_click (wmOperatorType *ot) { /* identifiers */ ot->name= "Mouse Click on Channels"; - ot->idname= "ANIM_OT_channels_mouseclick"; + ot->idname= "ANIM_OT_channels_click"; /* api callbacks */ ot->invoke= animchannels_mouseclick_invoke; @@ -1414,7 +1647,7 @@ void ED_operatortypes_animchannels(void) { WM_operatortype_append(ANIM_OT_channels_select_all_toggle); WM_operatortype_append(ANIM_OT_channels_select_border); - WM_operatortype_append(ANIM_OT_channels_mouseclick); + WM_operatortype_append(ANIM_OT_channels_click); WM_operatortype_append(ANIM_OT_channels_setting_enable); WM_operatortype_append(ANIM_OT_channels_setting_disable); @@ -1429,6 +1662,9 @@ void ED_operatortypes_animchannels(void) //WM_operatortype_append(ANIM_OT_channels_move_top); //WM_operatortype_append(ANIM_OT_channels_move_bottom); + WM_operatortype_append(ANIM_OT_channels_expand); + WM_operatortype_append(ANIM_OT_channels_collapse); + WM_operatortype_append(ANIM_OT_channels_visibility_toggle); } @@ -1439,9 +1675,9 @@ void ED_keymap_animchannels(wmWindowManager *wm) /* selection */ /* click-select */ // XXX for now, only leftmouse.... - WM_keymap_add_item(keymap, "ANIM_OT_channels_mouseclick", LEFTMOUSE, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_mouseclick", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1); - RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_mouseclick", LEFTMOUSE, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "children_only", 1); + WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, 0, 0); + RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1); + RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "children_only", 1); /* deselect all */ WM_keymap_add_item(keymap, "ANIM_OT_channels_select_all_toggle", AKEY, KM_PRESS, 0, 0); @@ -1458,6 +1694,13 @@ void ED_keymap_animchannels(wmWindowManager *wm) /* settings - specialised hotkeys */ WM_keymap_add_item(keymap, "ANIM_OT_channels_editable_toggle", TABKEY, KM_PRESS, 0, 0); + /* expand/collapse */ + WM_keymap_add_item(keymap, "ANIM_OT_channels_expand", PADPLUSKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "ANIM_OT_channels_collapse", PADMINUS, KM_PRESS, 0, 0); + + RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_expand", PADPLUSKEY, KM_PRESS, KM_CTRL, 0)->ptr, "all", 1); + RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_collapse", PADMINUS, KM_PRESS, KM_CTRL, 0)->ptr, "all", 1); + /* rearranging - actions only */ //WM_keymap_add_item(keymap, "ANIM_OT_channels_move_up", PAGEUPKEY, KM_PRESS, KM_SHIFT, 0); //WM_keymap_add_item(keymap, "ANIM_OT_channels_move_down", PAGEDOWNKEY, KM_PRESS, KM_SHIFT, 0); diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index e0962eadfca..7f07de80754 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -62,7 +62,6 @@ #include "UI_interface.h" #include "UI_resources.h" -#include "UI_text.h" #include "UI_view2d.h" /* XXX */ @@ -86,7 +85,7 @@ static void draw_cfra_number (Scene *scene, View2D *v2d, float cfra, short time) sprintf(str, " %.2f", FRA2TIME(CFRA)); else sprintf(str, " %d", CFRA); - slen= (short)UI_GetStringWidth(G.font, str, 0) - 1; + slen= (short)UI_GetStringWidth(str) - 1; /* get starting coordinates for drawing */ x= cfra * xscale; @@ -98,8 +97,7 @@ static void draw_cfra_number (Scene *scene, View2D *v2d, float cfra, short time) /* draw current frame number - black text */ UI_ThemeColor(TH_TEXT); - ui_rasterpos_safe(x-5, y+3, 1.0f); - UI_DrawString(G.fonts, str, 0); // XXX may need to be updated for font stuff + UI_DrawString(x-5, y+3, str); // XXX may need to be updated for font stuff /* restore view transform */ glScalef(xscale, 1.0, 1.0); diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index ea30fe83f35..afad396607b 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -291,7 +291,10 @@ short ANIM_animdata_get_context (const bContext *C, bAnimContext *ac) /* get useful default context settings from context */ ac->scene= scene; - ac->obact= (scene && scene->basact)? scene->basact->object : NULL; + if (scene) { + ac->markers= &scene->markers; + ac->obact= (scene->basact)? scene->basact->object : NULL; + } ac->sa= sa; ac->ar= ar; ac->spacetype= (sa) ? sa->spacetype : 0; @@ -563,7 +566,7 @@ static int animdata_filter_action (ListBase *anim_data, bAction *act, int filter lastchan= agrp->channels.last; - /* there are some situations, where only the channels of the animive group should get considered */ + /* there are some situations, where only the channels of the action group should get considered */ if (!(filter_mode & ANIMFILTER_ACTGROUPED) || (agrp->flag & AGRP_ACTIVE)) { /* filters here are a bit convoulted... * - groups show a "summary" of keyframes beside their name which must accessable for tools which handle keyframes @@ -574,8 +577,9 @@ static int animdata_filter_action (ListBase *anim_data, bAction *act, int filter * - group is expanded * - we're interested in keyframes, but not if they appear in selected channels */ + // XXX what was the selection check here for again? if ( (!(filter_mode & ANIMFILTER_VISIBLE) || EXPANDED_AGRP(agrp)) || - ( ANIMCHANNEL_SELOK(SEL_AGRP(agrp)) && (filter_mode & ANIMFILTER_CURVESONLY) ) ) + ( /*ANIMCHANNEL_SELOK(SEL_AGRP(agrp)) &&*/ (filter_mode & ANIMFILTER_CURVESONLY) ) ) { if (!(filter_mode & ANIMFILTER_FOREDIT) || EDITABLE_AGRP(agrp)) { // XXX the 'owner' info here needs review... @@ -750,7 +754,17 @@ static int animdata_filter_dopesheet_mats (ListBase *anim_data, bDopeSheet *ads, Material *ma= give_current_material(ob, a); /* for now, if no material returned, skip (this shouldn't confuse the user I hope) */ - if (ELEM3(NULL, ma, ma->adt, ma->adt->action)) continue; + if (ELEM(NULL, ma, ma->adt)) + continue; + + if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS)==0) { + if (ANIMDATA_HAS_KEYS(ma) == 0) + continue; + } + else { + if (ANIMDATA_HAS_DRIVERS(ma) == 0) + continue; + } /* make a temp list elem for this */ ld= MEM_callocN(sizeof(LinkData), "DopeSheet-MaterialCache"); @@ -787,10 +801,16 @@ static int animdata_filter_dopesheet_mats (ListBase *anim_data, bDopeSheet *ads, } } - /* add material's F-Curve channels? */ + /* add material's F-Curve or Driver channels? */ if (FILTER_MAT_OBJD(ma) || (filter_mode & ANIMFILTER_CURVESONLY)) { + if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS)==0) { // XXX the 'owner' info here is still subject to improvement - items += animdata_filter_action(anim_data, ma->adt->action, filter_mode, ma, ANIMTYPE_DSMAT, (ID *)ma); + items += animdata_filter_action(anim_data, ma->adt->action, filter_mode, ma, ANIMTYPE_DSMAT, (ID *)ma); + } + else { + // need to make the ownertype normal object here... (maybe type should be a separate one for clarity?) + items += animdata_filter_fcurves(anim_data, ma->adt->drivers.first, NULL, ma, ANIMTYPE_DSMAT, filter_mode, (ID *)ma); + } } } } @@ -869,7 +889,6 @@ static int animdata_filter_dopesheet_obdata (ListBase *anim_data, bDopeSheet *ad static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, Base *base, int filter_mode) { bAnimListElem *ale=NULL; - Scene *sce= (Scene *)ads->source; Object *ob= base->object; Key *key= ob_get_key(ob); int items = 0; @@ -877,7 +896,7 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B /* add this object as a channel first */ if ((filter_mode & ANIMFILTER_CURVESONLY) == 0) { /* check if filtering by selection */ - if (ANIMCHANNEL_SELOK( ((base->flag & SELECT) || (base == sce->basact)) )) { + if ANIMCHANNEL_SELOK((base->flag & SELECT)) { ale= make_new_animlistelem(base, ANIMTYPE_OBJECT, NULL, ANIMTYPE_NONE, NULL); if (ale) { BLI_addtail(anim_data, ale); @@ -1195,7 +1214,7 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int if (base->object) { Object *ob= base->object; Key *key= ob_get_key(ob); - short actOk, keyOk, dataOk, matOk; + short actOk=1, keyOk=1, dataOk=1, matOk=1; /* firstly, check if object can be included, by the following fanimors: * - if only visible, must check for layer and also viewport visibility @@ -1204,8 +1223,8 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int */ // TODO: if cache is implemented, just check name here, and then if (filter_mode & ANIMFILTER_VISIBLE) { - /* layer visibility */ - if ((ob->lay & sce->lay)==0) continue; + /* layer visibility - we check both object and base, since these may not be in sync yet */ + if ((sce->lay & (ob->lay|base->lay))==0) continue; /* outliner restrict-flag */ if (ob->restrictflag & OB_RESTRICT_VIEW) continue; diff --git a/source/blender/editors/animation/anim_intern.h b/source/blender/editors/animation/anim_intern.h new file mode 100644 index 00000000000..e903007fbc0 --- /dev/null +++ b/source/blender/editors/animation/anim_intern.h @@ -0,0 +1,18 @@ +/* Testing code for 2.5 animation system + * Copyright 2009, Joshua Leung + */ + +#ifndef ANIM_INTERN_H +#define ANIM_INTERN_H + + +/* KeyingSets/Keyframing Interface ------------- */ + +/* list of builtin KeyingSets (defined in keyingsets.c) */ +extern ListBase builtin_keyingsets; + +short keyingset_context_ok_poll(bContext *C, KeyingSet *ks); + +short modifykey_get_context_data (bContext *C, ListBase *dsources, KeyingSet *ks); + +#endif // ANIM_INTERN_H diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c index ae0b8435635..c2a1199f6c6 100644 --- a/source/blender/editors/animation/anim_ipo_utils.c +++ b/source/blender/editors/animation/anim_ipo_utils.c @@ -135,31 +135,25 @@ void getname_anim_fcurve(char *name, ID *id, FCurve *fcu) /* for structname, we use a custom name if one is available */ // xxx we might want an icon from types? // xxx it is hard to differentiate between object and bone channels then, if ob + bone motion occur together... - nameprop= RNA_struct_name_property(&ptr); + nameprop= RNA_struct_name_property(ptr.type); if (nameprop) { /* this gets a string which will need to be freed */ structname= RNA_property_string_get_alloc(&ptr, nameprop, NULL, 0); } else - structname= (char *)RNA_struct_ui_name(&ptr); + structname= (char *)RNA_struct_ui_name(ptr.type); /* Property Name is straightforward */ - propname= (char *)RNA_property_ui_name(&ptr, prop); + propname= (char *)RNA_property_ui_name(prop); /* Array Index - only if applicable */ - if (RNA_property_array_length(&ptr, prop)) { - // XXX the format of these is not final... we don't know how this will go yet - // format 1 style - //static char *vectoritem[4]= {".X", ".Y", ".Z", ".W"}; - //static char *quatitem[4]= {".W", ".X", ".Y", ".Z"}; - //static char *coloritem[4]= {".R", ".G", ".B", ".A"}; - // format 2 style + if (RNA_property_array_length(prop)) { static char *vectoritem[4]= {"X ", "Y ", "Z ", "W "}; static char *quatitem[4]= {"W ", "X ", "Y ", "Z "}; static char *coloritem[4]= {"R ", "G ", "B ", "A "}; - int tot= RNA_property_array_length(&ptr, prop); - int propsubtype= RNA_property_subtype(&ptr, prop); + int tot= RNA_property_array_length(prop); + int propsubtype= RNA_property_subtype(prop); /* get string to use for array index */ if ((tot == 4) && (propsubtype == PROP_ROTATION)) @@ -181,8 +175,7 @@ void getname_anim_fcurve(char *name, ID *id, FCurve *fcu) /* putting this all together into the buffer */ // XXX we need to check for invalid names... - //BLI_snprintf(name, 128, "%s.%s%s", structname, propname, arrayname); // format 1 - BLI_snprintf(name, 128, "%s%s (%s)", arrayname, propname, structname); // format 2 + BLI_snprintf(name, 128, "%s%s (%s)", arrayname, propname, structname); /* free temp name if nameprop is set */ if (nameprop) @@ -197,6 +190,7 @@ void getname_anim_fcurve(char *name, ID *id, FCurve *fcu) /* ------------------------------- Color Codes for F-Curve Channels ---------------------------- */ +#if 0 /* used for FCURVE_COLOR_AUTO_RAINBOW */ // XXX this still doesn't work too great when there are more than 32 curves (which happens most of the time) void ipo_rainbow (int cur, int tot, float *out) @@ -206,14 +200,60 @@ void ipo_rainbow (int cur, int tot, float *out) dfac= (float)(1.0/( (float)tot+1.0)); /* this calculation makes 2 or 4 different cycles of rainbow colors */ + // 2 different cycles - for hue if(cur< tot/2) fac= (float)(cur*2.0f*dfac); else fac= (float)((cur-tot/2)*2.0f*dfac +dfac); + + // third cycle with altered hue if(tot > 32) fac= fac*1.95f; + // clamping for excessive ranges if(fac>1.0f) fac-= 1.0f; + // saturation adjustments for more visible range if(fac>0.5f && fac<0.8f) sat= 0.5f; else sat= 0.6f; - //return hsv_to_cpack(fac, sat, 1.0f); hsv_to_rgb(fac, sat, 1.0f, out, out+1, out+2); } +#endif + +/* step between the major distinguishable color bands of the primary colors */ +#define HSV_BANDWIDTH 0.3f + +/* testbed for FCURVE_COLOR_AUTO_RAINBOW determination methods */ +//void fcurve_rainbow (unsigned int cur, unsigned int tot, float *out) +void ipo_rainbow (int cur, int tot, float *out) +{ + float hue, val, sat, fac; + int grouping; + + /* we try to divide the colours into groupings of n colors, + * where n is: + * 3 - for 'odd' numbers of curves - there should be a majority of triplets of curves + * 4 - for 'even' numbers of curves - there should be a majority of quartets of curves + * so the base color is simply one of the three primary colors + */ + grouping= (4 - (tot % 2)); + hue= HSV_BANDWIDTH * (float)(cur % grouping); + + /* 'Value' (i.e. darkness) needs to vary so that larger sets of three will be + * 'darker' (i.e. smaller value), so that they don't look that similar to previous ones. + * However, only a range of 0.3 to 1.0 is really usable to avoid clashing + * with some other stuff + */ + fac = ((float)cur / (float)tot) * 0.7f; + + /* the base color can get offset a bit so that the colors aren't so identical */ + hue += fac * HSV_BANDWIDTH; + if (hue > 1.0f) hue= fmod(hue, 1.0f); + + /* saturation adjustments for more visible range */ + if ((hue > 0.5f) && (hue < 0.8f)) sat= 0.5f; + else sat= 0.6f; + + /* value is fixed at 1.0f, otherwise we cannot clearly see the curves... */ + val= 1.0f; + + /* finally, conver this to RGB colors */ + hsv_to_rgb(hue, sat, val, out, out+1, out+2); +} diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index fc52d9c4511..2abec6b831c 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -31,6 +31,7 @@ #include "MEM_guardedalloc.h" +#include "DNA_action_types.h" #include "DNA_scene_types.h" #include "DNA_screen_types.h" #include "DNA_space_types.h" @@ -45,6 +46,7 @@ #include "BKE_context.h" #include "BKE_global.h" +#include "BKE_fcurve.h" #include "BKE_utildefines.h" #include "WM_api.h" @@ -57,7 +59,6 @@ #include "UI_interface_icons.h" #include "UI_view2d.h" #include "UI_resources.h" -#include "UI_text.h" #include "ED_markers.h" #include "ED_screen.h" @@ -83,10 +84,142 @@ static ListBase *context_get_markers(const bContext *C) return &CTX_data_scene(C)->markers; } -/* ************* Marker Drawing ************ */ +/* Get the marker that is closest to this point */ +TimeMarker *ED_markers_find_nearest_marker (ListBase *markers, float x) +{ + TimeMarker *marker, *nearest=NULL; + float dist, min_dist= 1000000; + + if (markers) { + for (marker= markers->first; marker; marker= marker->next) { + dist = ABS((float)marker->frame - x); + + if (dist < min_dist) { + min_dist= dist; + nearest= marker; + } + } + } + + return nearest; +} + +/* Return the time of the marker that occurs on a frame closest to the given time */ +int ED_markers_find_nearest_marker_time (ListBase *markers, float x) +{ + TimeMarker *nearest= ED_markers_find_nearest_marker(markers, x); + return (nearest) ? (nearest->frame) : (int)floor(x + 0.5f); +} + + +void ED_markers_get_minmax (ListBase *markers, short sel, float *first, float *last) +{ + TimeMarker *marker; + float min, max; + int selcount = 0; + + /* sanity check */ + printf("markers = %p - %p, %p \n", markers, markers->first, markers->last); + if (markers == NULL) { + *first = 0.0f; + *last = 0.0f; + return; + } + + if (markers->first && markers->last) { + TimeMarker *fm= markers->first; + TimeMarker *lm= markers->last; + + min= (float)fm->frame; + max= (float)lm->frame; + } + else { + *first = 0.0f; + *last = 0.0f; + return; + } + + /* count how many markers are usable - see later */ + if (sel) { + for (marker= markers->first; marker; marker= marker->next) { + if (marker->flag & SELECT) + selcount++; + } + } + else + selcount= BLI_countlist(markers); + + /* if only selected are to be considered, only consider the selected ones + * (optimisation for not searching list) + */ + if (selcount > 1) { + for (marker= markers->first; marker; marker= marker->next) { + if (sel) { + if (marker->flag & SELECT) { + if (marker->frame < min) + min= (float)marker->frame; + if (marker->frame > max) + max= (float)marker->frame; + } + } + else { + if (marker->frame < min) + min= (float)marker->frame; + if (marker->frame > max) + max= (float)marker->frame; + } + } + } + + /* set the min/max values */ + *first= min; + *last= max; +} + +/* Adds a marker to list of cfra elems */ +void add_marker_to_cfra_elem(ListBase *lb, TimeMarker *marker, short only_sel) +{ + CfraElem *ce, *cen; + + /* should this one only be considered if it is selected? */ + if ((only_sel) && ((marker->flag & SELECT)==0)) + return; + + /* insertion sort - try to find a previous cfra elem */ + for (ce= lb->first; ce; ce= ce->next) { + if (ce->cfra == marker->frame) { + /* do because of double keys */ + if (marker->flag & SELECT) + ce->sel= marker->flag; + return; + } + else if (ce->cfra > marker->frame) break; + } + + cen= MEM_callocN(sizeof(CfraElem), "add_to_cfra_elem"); + if (ce) BLI_insertlinkbefore(lb, ce, cen); + else BLI_addtail(lb, cen); -/* XXX */ -extern void ui_rasterpos_safe(float x, float y, float aspect); + cen->cfra= marker->frame; + cen->sel= marker->flag; +} + +/* This function makes a list of all the markers. The only_sel + * argument is used to specify whether only the selected markers + * are added. + */ +void ED_markers_make_cfra_list(ListBase *markers, ListBase *lb, short only_sel) +{ + TimeMarker *marker; + + if (markers == NULL) + return; + + for (marker= markers->first; marker; marker= marker->next) + add_marker_to_cfra_elem(lb, marker, only_sel); +} + +/* ************* Marker Drawing ************ */ /* function to draw markers */ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag) @@ -100,12 +233,13 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag) ypixels= v2d->mask.ymax-v2d->mask.ymin; UI_view2d_getscale(v2d, &xscale, &yscale); - glScalef(1.0/xscale, 1.0, 1.0); + glScalef(1.0f/xscale, 1.0f, 1.0f); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); /* vertical line - dotted */ + // NOTE: currently only used for sequencer if (flag & DRAW_MARKERS_LINES) { setlinestyle(3); @@ -115,8 +249,8 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag) glColor4ub(0, 0, 0, 96); glBegin(GL_LINES); - glVertex2f((xpos*xscale)+0.5, 12); - glVertex2f((xpos*xscale)+0.5, 34*yscale); /* a bit lazy but we know it cant be greater then 34 strips high*/ + glVertex2f((xpos*xscale)+0.5f, 12.0f); + glVertex2f((xpos*xscale)+0.5f, 34.0f*yscale); /* a bit lazy but we know it cant be greater then 34 strips high */ glEnd(); setlinestyle(0); @@ -133,27 +267,35 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag) ICON_MARKER; } - UI_icon_draw(xpos*xscale-5.0, 16.0, icon_id); + UI_icon_draw(xpos*xscale-5.0f, 16.0f, icon_id); glBlendFunc(GL_ONE, GL_ZERO); glDisable(GL_BLEND); /* and the marker name too, shifted slightly to the top-right */ if (marker->name && marker->name[0]) { - if(marker->flag & SELECT) { + float x, y; + + if (marker->flag & SELECT) { UI_ThemeColor(TH_TEXT_HI); - ui_rasterpos_safe(xpos*xscale+4.0, (ypixels<=39.0)?(ypixels-10.0):29.0, 1.0); + x= xpos*xscale + 4.0f; + y= (ypixels <= 39.0f)? (ypixels-10.0f) : 29.0f; } else { UI_ThemeColor(TH_TEXT); - if((marker->frame <= cfra) && (marker->frame+5 > cfra)) - ui_rasterpos_safe(xpos*xscale+4.0, (ypixels<=39.0)?(ypixels-10.0):29.0, 1.0); - else - ui_rasterpos_safe(xpos*xscale+4.0, 17.0, 1.0); + if((marker->frame <= cfra) && (marker->frame+5 > cfra)) { + x= xpos*xscale + 4.0f; + y= (ypixels <= 39.0f)? (ypixels - 10.0f) : 29.0f; + } + else { + x= xpos*xscale + 4.0f; + y= 17.0f; + } } - UI_DrawString(G.font, marker->name, 0); + UI_DrawString(x, y, marker->name); } - glScalef(xscale, 1.0, 1.0); + + glScalef(xscale, 1.0f, 1.0f); } /* Draw Scene-Markers in time window */ @@ -163,22 +305,22 @@ void draw_markers_time(const bContext *C, int flag) View2D *v2d= UI_view2d_fromcontext(C); TimeMarker *marker; - if(markers == NULL) + if (markers == NULL) return; /* unselected markers are drawn at the first time */ for (marker= markers->first; marker; marker= marker->next) { - if (!(marker->flag & SELECT)) draw_marker(v2d, marker, CTX_data_scene(C)->r.cfra, flag); + if ((marker->flag & SELECT) == 0) + draw_marker(v2d, marker, CTX_data_scene(C)->r.cfra, flag); } /* selected markers are drawn later */ for (marker= markers->first; marker; marker= marker->next) { - if (marker->flag & SELECT) draw_marker(v2d, marker, CTX_data_scene(C)->r.cfra, flag); + if (marker->flag & SELECT) + draw_marker(v2d, marker, CTX_data_scene(C)->r.cfra, flag); } } - - /* ************************** add markers *************************** */ /* add TimeMarker at curent frame */ @@ -188,13 +330,14 @@ static int ed_marker_add(bContext *C, wmOperator *op) TimeMarker *marker; int frame= CTX_data_scene(C)->r.cfra; - if(markers == NULL) + if (markers == NULL) return OPERATOR_CANCELLED; /* two markers can't be at the same place */ - for(marker= markers->first; marker; marker= marker->next) - if(marker->frame == frame) + for (marker= markers->first; marker; marker= marker->next) { + if (marker->frame == frame) return OPERATOR_CANCELLED; + } /* deselect all */ for(marker= markers->first; marker; marker= marker->next) @@ -295,9 +438,13 @@ static void ed_marker_move_exit(bContext *C, wmOperator *op) { MarkerMove *mm= op->customdata; + /* free data */ MEM_freeN(mm->oldframe); MEM_freeN(op->customdata); op->customdata= NULL; + + /* clear custom header prints */ + ED_area_headerprint(CTX_wm_area(C), NULL); } static int ed_marker_move_invoke(bContext *C, wmOperator *op, wmEvent *evt) @@ -362,7 +509,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt) case ESCKEY: ed_marker_move_cancel(C, op); return OPERATOR_CANCELLED; - + case LEFTMOUSE: case MIDDLEMOUSE: case RIGHTMOUSE: @@ -374,7 +521,6 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt) break; case MOUSEMOVE: - dx= v2d->mask.xmax-v2d->mask.xmin; dx= (v2d->cur.xmax-v2d->cur.xmin)/dx; @@ -412,12 +558,11 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt) sprintf(str, "Marker %.2f offset %.2f", FRA2TIME(selmarker->frame), FRA2TIME(offs)); } else if (mm->slink->spacetype == SPACE_ACTION) { -#if 0 -XXX if (saction->flag & SACTION_DRAWTIME) + SpaceAction *saction= (SpaceAction *)mm->slink; + if (saction->flag & SACTION_DRAWTIME) sprintf(str, "Marker %.2f offset %.2f", FRA2TIME(selmarker->frame), FRA2TIME(offs)); else sprintf(str, "Marker %.2f offset %.2f", (double)(selmarker->frame), (double)(offs)); -#endif } else { sprintf(str, "Marker %.2f offset %.2f", (double)(selmarker->frame), (double)(offs)); @@ -432,21 +577,20 @@ XXX if (saction->flag & SACTION_DRAWTIME) else sprintf(str, "Marker offset %.2f ", FRA2TIME(offs)); } -#if 0 -XXX else if (mm->slink->spacetype == SPACE_ACTION) { + else if (mm->slink->spacetype == SPACE_ACTION) { + SpaceAction *saction= (SpaceAction *)mm->slink; if (saction->flag & SACTION_DRAWTIME) sprintf(str, "Marker offset %.2f ", FRA2TIME(offs)); else sprintf(str, "Marker offset %.2f ", (double)(offs)); } -#endif else { sprintf(str, "Marker offset %.2f ", (double)(offs)); } } WM_event_add_notifier(C, NC_SCENE|ND_MARKERS, NULL); - // headerprint(str); XXX + ED_area_headerprint(CTX_wm_area(C), str); } } @@ -508,19 +652,23 @@ static void ed_marker_duplicate_apply(bContext *C, wmOperator *op) ListBase *markers= context_get_markers(C); TimeMarker *marker, *newmarker; - if(markers == NULL) return; + if (markers == NULL) + return; /* go through the list of markers, duplicate selected markers and add duplicated copies - * to the begining of the list (unselect original markers) */ - for(marker= markers->first; marker; marker= marker->next) { - if(marker->flag & SELECT){ + * to the begining of the list (unselect original markers) + */ + for (marker= markers->first; marker; marker= marker->next) { + if (marker->flag & SELECT) { /* unselect selected marker */ marker->flag &= ~SELECT; + /* create and set up new marker */ newmarker = MEM_callocN(sizeof(TimeMarker), "TimeMarker"); newmarker->flag= SELECT; newmarker->frame= marker->frame; BLI_strncpy(newmarker->name, marker->name, sizeof(marker->name)); + /* new marker is added to the begining of list */ BLI_addhead(markers, newmarker); } @@ -569,12 +717,13 @@ static void select_timeline_marker_frame(ListBase *markers, int frame, unsigned TimeMarker *marker; int select=0; - for(marker= markers->first; marker; marker= marker->next) { + for (marker= markers->first; marker; marker= marker->next) { /* if Shift is not set, then deselect Markers */ - if(!shift) marker->flag &= ~SELECT; + if (!shift) marker->flag &= ~SELECT; + /* this way a not-shift select will allways give 1 selected marker */ - if((marker->frame == frame) && (!select)) { - if(marker->flag & SELECT) + if ((marker->frame == frame) && (!select)) { + if (marker->flag & SELECT) marker->flag &= ~SELECT; else marker->flag |= SELECT; @@ -583,24 +732,6 @@ static void select_timeline_marker_frame(ListBase *markers, int frame, unsigned } } -int find_nearest_marker_time(ListBase *markers, float dx) -{ - TimeMarker *marker, *nearest= NULL; - float dist, min_dist= 1000000; - - for(marker= markers->first; marker; marker= marker->next) { - dist = ABS((float)marker->frame - dx); - if(dist < min_dist){ - min_dist= dist; - nearest= marker; - } - } - - if(nearest) return nearest->frame; - else return (int)floor(dx); /* hrmf? */ -} - - static int ed_marker_select(bContext *C, wmEvent *evt, int extend) { ListBase *markers= context_get_markers(C); @@ -616,7 +747,7 @@ static int ed_marker_select(bContext *C, wmEvent *evt, int extend) UI_view2d_region_to_view(v2d, x, y, &viewx, NULL); - cfra= find_nearest_marker_time(markers, viewx); + cfra= ED_markers_find_nearest_marker_time(markers, viewx); if (extend) select_timeline_marker_frame(markers, cfra, 1); @@ -819,9 +950,9 @@ static int ed_marker_delete_exec(bContext *C, wmOperator *op) } } - if(changed) { + if (changed) WM_event_add_notifier(C, NC_SCENE|ND_MARKERS, NULL); - } + return OPERATOR_FINISHED; } diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index f8c7cc909ae..e899cc1d520 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -327,7 +327,7 @@ static int toggle_time_exec(bContext *C, wmOperator *op) saction->flag ^= SACTION_DRAWTIME; } break; - case SPACE_IPO: /* IPO Editor */ + case SPACE_IPO: /* Graph Editor */ { SpaceIpo *sipo= (SpaceIpo *)CTX_wm_space_data(C); sipo->flag ^= SIPO_DRAWTIME; @@ -380,8 +380,14 @@ void ED_operatortypes_anim(void) // XXX this is used all over... maybe for screen instead? WM_operatortype_append(ANIM_OT_insert_keyframe); WM_operatortype_append(ANIM_OT_delete_keyframe); - WM_operatortype_append(ANIM_OT_insert_keyframe_old); - WM_operatortype_append(ANIM_OT_delete_keyframe_old); + WM_operatortype_append(ANIM_OT_insert_keyframe_menu); + //WM_operatortype_append(ANIM_OT_delete_keyframe_menu); + WM_operatortype_append(ANIM_OT_insert_keyframe_button); + WM_operatortype_append(ANIM_OT_delete_keyframe_button); + WM_operatortype_append(ANIM_OT_delete_keyframe_old); // xxx remove? + + WM_operatortype_append(ANIM_OT_add_driver_button); + WM_operatortype_append(ANIM_OT_remove_driver_button); WM_operatortype_append(ANIM_OT_keyingset_add_new); WM_operatortype_append(ANIM_OT_keyingset_add_destination); diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c new file mode 100644 index 00000000000..9c401289011 --- /dev/null +++ b/source/blender/editors/animation/drivers.c @@ -0,0 +1,292 @@ +/* Testing code for 2.5 animation system + * Copyright 2009, Joshua Leung + */ + +#include <stdio.h> +#include <stddef.h> +#include <string.h> +#include <math.h> +#include <float.h> + +#include "MEM_guardedalloc.h" + +#include "BLI_blenlib.h" +#include "BLI_arithb.h" +#include "BLI_dynstr.h" + +#include "DNA_anim_types.h" +#include "DNA_action_types.h" +#include "DNA_armature_types.h" +#include "DNA_constraint_types.h" +#include "DNA_key_types.h" +#include "DNA_object_types.h" +#include "DNA_material_types.h" +#include "DNA_scene_types.h" +#include "DNA_userdef_types.h" +#include "DNA_windowmanager_types.h" + +#include "BKE_animsys.h" +#include "BKE_action.h" +#include "BKE_constraint.h" +#include "BKE_fcurve.h" +#include "BKE_utildefines.h" +#include "BKE_context.h" +#include "BKE_report.h" +#include "BKE_key.h" +#include "BKE_material.h" + +#include "ED_anim_api.h" +#include "ED_keyframing.h" +#include "ED_keyframes_edit.h" +#include "ED_screen.h" +#include "ED_util.h" + +#include "UI_interface.h" + +#include "WM_api.h" +#include "WM_types.h" + +#include "RNA_access.h" +#include "RNA_define.h" +#include "RNA_types.h" + +/* ************************************************** */ +/* Animation Data Validation */ + +/* Get (or add relevant data to be able to do so) F-Curve from the driver stack, + * for the given Animation Data block. This assumes that all the destinations are valid. + */ +FCurve *verify_driver_fcurve (ID *id, const char rna_path[], const int array_index, short add) +{ + AnimData *adt; + FCurve *fcu; + + /* sanity checks */ + if ELEM(NULL, id, rna_path) + return NULL; + + /* init animdata if none available yet */ + adt= BKE_animdata_from_id(id); + if ((adt == NULL) && (add)) + adt= BKE_id_add_animdata(id); + if (adt == NULL) { + /* if still none (as not allowed to add, or ID doesn't have animdata for some reason) */ + return NULL; + } + + /* try to find f-curve matching for this setting + * - add if not found and allowed to add one + * TODO: add auto-grouping support? how this works will need to be resolved + */ + fcu= list_find_fcurve(&adt->drivers, rna_path, array_index); + + if ((fcu == NULL) && (add)) { + /* use default settings to make a F-Curve */ + fcu= MEM_callocN(sizeof(FCurve), "FCurve"); + + fcu->flag = (FCURVE_VISIBLE|FCURVE_AUTO_HANDLES|FCURVE_SELECTED); + + /* store path - make copy, and store that */ + fcu->rna_path= BLI_strdupn(rna_path, strlen(rna_path)); + fcu->array_index= array_index; + + /* add some new driver data */ + fcu->driver= MEM_callocN(sizeof(ChannelDriver), "ChannelDriver"); + + /* add simple generator modifier for driver so that there is some visible representation */ + fcurve_add_modifier(fcu, FMODIFIER_TYPE_GENERATOR); + + /* just add F-Curve to end of driver list */ + BLI_addtail(&adt->drivers, fcu); + } + + /* return the F-Curve */ + return fcu; +} + +/* ************************************************** */ +/* Driver Management API */ + +/* Main Driver Management API calls: + * Add a new driver for the specified property on the given ID block + */ +short ANIM_add_driver (ID *id, const char rna_path[], int array_index, short flag) +{ + PointerRNA id_ptr, ptr; + PropertyRNA *prop; + FCurve *fcu; + + /* validate pointer first - exit if failure */ + RNA_id_pointer_create(id, &id_ptr); + if ((RNA_path_resolve(&id_ptr, rna_path, &ptr, &prop) == 0) || (prop == NULL)) { + printf("Insert Key: Could not add Driver, as RNA Path is invalid for the given ID (ID = %s, Path = %s)\n", id->name, rna_path); + return 0; + } + + /* create F-Curve with Driver */ + fcu= verify_driver_fcurve(id, rna_path, array_index, 1); + + /* done */ + return (fcu != NULL); +} + +/* Main Driver Management API calls: + * Remove the driver for the specified property on the given ID block (if available) + */ +short ANIM_remove_driver (struct ID *id, const char rna_path[], int array_index, short flag) +{ + AnimData *adt; + FCurve *fcu; + + /* get F-Curve + * Note: here is one of the places where we don't want new F-Curve + Driver added! + * so 'add' var must be 0 + */ + /* we don't check the validity of the path here yet, but it should be ok... */ + fcu= verify_driver_fcurve(id, rna_path, array_index, 0); + adt= BKE_animdata_from_id(id); + + /* only continue if we have an driver to remove */ + if (adt && fcu) { + /* remove F-Curve from driver stack, then free it */ + BLI_remlink(&adt->drivers, fcu); + free_fcurve(fcu); + + /* done successfully */ + return 1; + } + + /* failed */ + return 0; +} + + +/* ************************************************** */ +/* UI-Button Interface */ + +/* Add Driver Button Operator ------------------------ */ + +static int add_driver_button_exec (bContext *C, wmOperator *op) +{ + PointerRNA ptr; + PropertyRNA *prop= NULL; + char *path; + short success= 0; + int a, index, length, all= RNA_boolean_get(op->ptr, "all"); + + /* try to insert keyframe using property retrieved from UI */ + memset(&ptr, 0, sizeof(PointerRNA)); + uiAnimContextProperty(C, &ptr, &prop, &index); + + if (ptr.data && prop && RNA_property_animateable(ptr.data, prop)) { + path= RNA_path_from_ID_to_property(&ptr, prop); + + if (path) { + if (all) { + length= RNA_property_array_length(prop); + + if (length) index= 0; + else length= 1; + } + else + length= 1; + + for (a=0; a<length; a++) + success+= ANIM_add_driver(ptr.id.data, path, index+a, 0); + + MEM_freeN(path); + } + } + + if (success) { + /* send updates */ + ED_anim_dag_flush_update(C); + + /* for now, only send ND_KEYS for KeyingSets */ + WM_event_add_notifier(C, ND_KEYS, NULL); // XXX + } + + return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED; +} + +void ANIM_OT_add_driver_button (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Add Driver"; + ot->idname= "ANIM_OT_add_driver_button"; + + /* callbacks */ + ot->exec= add_driver_button_exec; + //op->poll= ??? + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_boolean(ot->srna, "all", 1, "All", "Insert a keyframe for all element of the array."); +} + +/* Remove Driver Button Operator ------------------------ */ + +static int remove_driver_button_exec (bContext *C, wmOperator *op) +{ + PointerRNA ptr; + PropertyRNA *prop= NULL; + char *path; + short success= 0; + int a, index, length, all= RNA_boolean_get(op->ptr, "all"); + + /* try to insert keyframe using property retrieved from UI */ + memset(&ptr, 0, sizeof(PointerRNA)); + uiAnimContextProperty(C, &ptr, &prop, &index); + + if (ptr.data && prop) { + path= RNA_path_from_ID_to_property(&ptr, prop); + + if (path) { + if (all) { + length= RNA_property_array_length(prop); + + if(length) index= 0; + else length= 1; + } + else + length= 1; + + for (a=0; a<length; a++) + success+= ANIM_remove_driver(ptr.id.data, path, index+a, 0); + + MEM_freeN(path); + } + } + + + if (success) { + /* send updates */ + ED_anim_dag_flush_update(C); + + /* for now, only send ND_KEYS for KeyingSets */ + WM_event_add_notifier(C, ND_KEYS, NULL); // XXX + } + + return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED; +} + +void ANIM_OT_remove_driver_button (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Remove Driver"; + ot->idname= "ANIM_OT_remove_driver_button"; + + /* callbacks */ + ot->exec= remove_driver_button_exec; + //op->poll= ??? + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_boolean(ot->srna, "all", 1, "All", "Delete keyfames from all elements of the array."); +} + +/* ************************************************** */ diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index d67a40518e3..cfbd6d2bced 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -83,7 +83,6 @@ #include "UI_interface.h" #include "UI_interface_icons.h" #include "UI_resources.h" -#include "UI_text.h" #include "UI_view2d.h" #include "ED_anim_api.h" @@ -449,8 +448,6 @@ void ob_to_keylist(Object *ob, ListBase *keys, ListBase *blocks, ActKeysInc *aki /* get filterflag */ if (ads) filterflag= ads->filterflag; - else if ((aki) && (aki->actmode == -1)) /* only set like this by NLA */ - filterflag= ADS_FILTER_NLADUMMY; else filterflag= 0; diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index 44814812c76..8243629b4a6 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -36,12 +36,12 @@ #include "DNA_anim_types.h" #include "DNA_action_types.h" -#include "DNA_constraint_types.h" #include "DNA_curve_types.h" #include "DNA_key_types.h" #include "DNA_object_types.h" #include "DNA_space_types.h" #include "DNA_scene_types.h" +#include "DNA_world_types.h" #include "BKE_action.h" #include "BKE_fcurve.h" @@ -71,7 +71,7 @@ */ /* ************************************************************************** */ -/* IPO Editing Loops - Exposed API */ +/* Keyframe Editing Loops - Exposed API */ /* --------------------------- Base Functions ------------------------------------ */ @@ -121,14 +121,14 @@ short ANIM_fcurve_keys_bezier_loop(BeztEditData *bed, FCurve *fcu, BeztEditFunc return 0; } -/* -------------------------------- Further Abstracted ----------------------------- */ +/* -------------------------------- Further Abstracted (Not Exposed Directly) ----------------------------- */ /* This function is used to loop over the keyframe data in an Action Group */ static short agrp_keys_bezier_loop(BeztEditData *bed, bActionGroup *agrp, BeztEditFunc bezt_ok, BeztEditFunc bezt_cb, FcuEditFunc fcu_cb) { FCurve *fcu; - /* only iterate over the action-channels and their sub-channels that are in this group */ + /* only iterate over the F-Curves that are in this group */ for (fcu= agrp->channels.first; fcu && fcu->grp==agrp; fcu= fcu->next) { if (ANIM_fcurve_keys_bezier_loop(bed, fcu, bezt_ok, bezt_cb, fcu_cb)) return 1; @@ -144,17 +144,73 @@ static short act_keys_bezier_loop(BeztEditData *bed, bAction *act, BeztEditFunc /* just loop through all F-Curves */ for (fcu= act->curves.first; fcu; fcu= fcu->next) { - ANIM_fcurve_keys_bezier_loop(bed, fcu, bezt_ok, bezt_cb, fcu_cb); + if (ANIM_fcurve_keys_bezier_loop(bed, fcu, bezt_ok, bezt_cb, fcu_cb)) + return 1; } return 0; } -/* --- */ +/* This function is used to loop over the keyframe data of an AnimData block */ +static short adt_keys_bezier_loop(BeztEditData *bed, AnimData *adt, BeztEditFunc bezt_ok, BeztEditFunc bezt_cb, FcuEditFunc fcu_cb, int filterflag) +{ + /* drivers or actions? */ + if (filterflag & ADS_FILTER_ONLYDRIVERS) { + FCurve *fcu; + + /* just loop through all F-Curves acting as Drivers */ + for (fcu= adt->drivers.first; fcu; fcu= fcu->next) { + if (ANIM_fcurve_keys_bezier_loop(bed, fcu, bezt_ok, bezt_cb, fcu_cb)) + return 1; + } + } + else if (adt->action) { + /* call the function for actions */ + if (act_keys_bezier_loop(bed, adt->action, bezt_ok, bezt_cb, fcu_cb)) + return 1; + } + + return 0; +} +/* This function is used to loop over the keyframe data in an Object */ +static short ob_keys_bezier_loop(BeztEditData *bed, Object *ob, BeztEditFunc bezt_ok, BeztEditFunc bezt_cb, FcuEditFunc fcu_cb, int filterflag) +{ + Key *key= ob_get_key(ob); + + /* firstly, Object's own AnimData */ + if (ob->adt) + adt_keys_bezier_loop(bed, ob->adt, bezt_ok, bezt_cb, fcu_cb, filterflag); + + /* shapekeys */ + if ((key && key->adt) && !(filterflag & ADS_FILTER_NOSHAPEKEYS)) + adt_keys_bezier_loop(bed, key->adt, bezt_ok, bezt_cb, fcu_cb, filterflag); + + // FIXME: add materials, etc. (but drawing code doesn't do it yet too! :) + + return 0; +} + +/* This function is used to loop over the keyframe data in a Scene */ +static short scene_keys_bezier_loop(BeztEditData *bed, Scene *sce, BeztEditFunc bezt_ok, BeztEditFunc bezt_cb, FcuEditFunc fcu_cb, int filterflag) +{ + World *wo= sce->world; + + /* Scene's own animation */ + if (sce->adt) + adt_keys_bezier_loop(bed, sce->adt, bezt_ok, bezt_cb, fcu_cb, filterflag); + + /* World */ + if (wo && wo->adt) + adt_keys_bezier_loop(bed, wo->adt, bezt_ok, bezt_cb, fcu_cb, filterflag); + + return 0; +} + +/* --- */ /* This function is used to apply operation to all keyframes, regardless of the type */ -short ANIM_animchannel_keys_bezier_loop(BeztEditData *bed, bAnimListElem *ale, BeztEditFunc bezt_ok, BeztEditFunc bezt_cb, FcuEditFunc fcu_cb) +short ANIM_animchannel_keys_bezier_loop(BeztEditData *bed, bAnimListElem *ale, BeztEditFunc bezt_ok, BeztEditFunc bezt_cb, FcuEditFunc fcu_cb, int filterflag) { /* sanity checks */ if (ale == NULL) @@ -173,6 +229,41 @@ short ANIM_animchannel_keys_bezier_loop(BeztEditData *bed, bAnimListElem *ale, B return agrp_keys_bezier_loop(bed, (bActionGroup *)ale->data, bezt_ok, bezt_cb, fcu_cb); case ALE_ACT: /* action */ return act_keys_bezier_loop(bed, (bAction *)ale->data, bezt_ok, bezt_cb, fcu_cb); + + case ALE_OB: /* object */ + return ob_keys_bezier_loop(bed, (Object *)ale->data, bezt_ok, bezt_cb, fcu_cb, filterflag); + case ALE_SCE: /* scene */ + return scene_keys_bezier_loop(bed, (Scene *)ale->data, bezt_ok, bezt_cb, fcu_cb, filterflag); + } + + return 0; +} + +/* This function is used to apply operation to all keyframes, regardless of the type without needed an AnimListElem wrapper */ +short ANIM_animchanneldata_keys_bezier_loop(BeztEditData *bed, void *data, int keytype, BeztEditFunc bezt_ok, BeztEditFunc bezt_cb, FcuEditFunc fcu_cb, int filterflag) +{ + /* sanity checks */ + if (data == NULL) + return 0; + + /* method to use depends on the type of keyframe data */ + switch (keytype) { + /* direct keyframe data (these loops are exposed) */ + case ALE_FCURVE: /* F-Curve */ + return ANIM_fcurve_keys_bezier_loop(bed, data, bezt_ok, bezt_cb, fcu_cb); + + /* indirect 'summaries' (these are not exposed directly) + * NOTE: must keep this code in sync with the drawing code and also the filtering code! + */ + case ALE_GROUP: /* action group */ + return agrp_keys_bezier_loop(bed, (bActionGroup *)data, bezt_ok, bezt_cb, fcu_cb); + case ALE_ACT: /* action */ + return act_keys_bezier_loop(bed, (bAction *)data, bezt_ok, bezt_cb, fcu_cb); + + case ALE_OB: /* object */ + return ob_keys_bezier_loop(bed, (Object *)data, bezt_ok, bezt_cb, fcu_cb, filterflag); + case ALE_SCE: /* scene */ + return scene_keys_bezier_loop(bed, (Scene *)data, bezt_ok, bezt_cb, fcu_cb, filterflag); } return 0; @@ -274,6 +365,38 @@ BeztEditFunc ANIM_editkeyframes_ok(short mode) } /* ******************************************* */ +/* Assorted Utility Functions */ + +/* helper callback for <animeditor>_cfrasnap_exec() -> used to help get the average time of all selected beztriples */ +short bezt_calc_average(BeztEditData *bed, BezTriple *bezt) +{ + /* only if selected */ + if (bezt->f2 & SELECT) { + /* store average time in float (only do rounding at last step */ + bed->f1 += bezt->vec[1][0]; + + /* increment number of items */ + bed->i1++; + } + + return 0; +} + +/* helper callback for columnselect_<animeditor>_keys() -> populate list CfraElems with frame numbers from selected beztriples */ +short bezt_to_cfraelem(BeztEditData *bed, BezTriple *bezt) +{ + /* only if selected */ + if (bezt->f2 & SELECT) { + CfraElem *ce= MEM_callocN(sizeof(CfraElem), "cfraElem"); + BLI_addtail(&bed->list, ce); + + ce->cfra= bezt->vec[1][0]; + } + + return 0; +} + +/* ******************************************* */ /* Transform */ static short snap_bezier_nearest(BeztEditData *bed, BezTriple *bezt) @@ -303,22 +426,22 @@ static short snap_bezier_cframe(BeztEditData *bed, BezTriple *bezt) static short snap_bezier_nearmarker(BeztEditData *bed, BezTriple *bezt) { - //if (bezt->f2 & SELECT) - // bezt->vec[1][0]= (float)find_nearest_marker_time(bezt->vec[1][0]); // XXX missing function! + if (bezt->f2 & SELECT) + bezt->vec[1][0]= (float)ED_markers_find_nearest_marker_time(&bed->list, bezt->vec[1][0]); return 0; } static short snap_bezier_horizontal(BeztEditData *bed, BezTriple *bezt) { if (bezt->f2 & SELECT) { - bezt->vec[0][1]= bezt->vec[2][1]= bezt->vec[1][1]; + bezt->vec[0][1]= bezt->vec[2][1]= (float)floor(bezt->vec[1][1] + 0.5f); if ((bezt->h1==HD_AUTO) || (bezt->h1==HD_VECT)) bezt->h1= HD_ALIGN; if ((bezt->h2==HD_AUTO) || (bezt->h2==HD_VECT)) bezt->h2= HD_ALIGN; } return 0; } -// calchandles_ipocurve + BeztEditFunc ANIM_editkeyframes_snap(short type) { /* eEditKeyframes_Snap */ diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index b04eaa0c378..9a40fb44f47 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -29,6 +29,7 @@ #include "BKE_action.h" #include "BKE_constraint.h" #include "BKE_fcurve.h" +#include "BKE_global.h" #include "BKE_utildefines.h" #include "BKE_context.h" #include "BKE_report.h" @@ -50,39 +51,17 @@ #include "RNA_define.h" #include "RNA_types.h" -/* ************************************************** */ -/* LOCAL TYPES AND DEFINES */ - -/* ----------- Common KeyData Sources ------------ */ - -/* temporary struct to gather data combos to keyframe */ -typedef struct bCommonKeySrc { - struct bCommonKeySrc *next, *prev; - - /* general data/destination-source settings */ - ID *id; /* id-block this comes from */ - char *rna_path; /* base path to use */ // xxx.... maybe we don't need this? - - /* specific cases */ - bPoseChannel *pchan; /* only needed when doing recalcs... */ -} bCommonKeySrc; +#include "anim_intern.h" /* ******************************************* */ /* Animation Data Validation */ -/* Get (or add relevant data to be able to do so) F-Curve from the Active Action, - * for the given Animation Data block. This assumes that all the destinations are valid. +/* Get (or add relevant data to be able to do so) the Active Action for the given + * Animation Data block, given an ID block where the Animation Data should reside. */ -FCurve *verify_fcurve (ID *id, const char group[], const char rna_path[], const int array_index, short add) +bAction *verify_adt_action (ID *id, short add) { AnimData *adt; - bAction *act; - bActionGroup *grp; - FCurve *fcu; - - /* sanity checks */ - if ELEM(NULL, id, rna_path) - return NULL; /* init animdata if none available yet */ adt= BKE_animdata_from_id(id); @@ -90,6 +69,7 @@ FCurve *verify_fcurve (ID *id, const char group[], const char rna_path[], const adt= BKE_id_add_animdata(id); if (adt == NULL) { /* if still none (as not allowed to add, or ID doesn't have animdata for some reason) */ + printf("ERROR: Couldn't add AnimData (ID = %s) \n", (id) ? (id->name) : "<None>"); return NULL; } @@ -97,7 +77,22 @@ FCurve *verify_fcurve (ID *id, const char group[], const char rna_path[], const // TODO: need some wizardry to handle NLA stuff correct if ((adt->action == NULL) && (add)) adt->action= add_empty_action("Action"); - act= adt->action; + + /* return the action */ + return adt->action; +} + +/* Get (or add relevant data to be able to do so) F-Curve from the Active Action, + * for the given Animation Data block. This assumes that all the destinations are valid. + */ +FCurve *verify_fcurve (bAction *act, const char group[], const char rna_path[], const int array_index, short add) +{ + bActionGroup *grp; + FCurve *fcu; + + /* sanity checks */ + if ELEM(NULL, act, rna_path) + return NULL; /* try to find f-curve matching for this setting * - add if not found and allowed to add one @@ -134,7 +129,7 @@ FCurve *verify_fcurve (ID *id, const char group[], const char rna_path[], const BLI_snprintf(grp->name, 64, group); BLI_addtail(&act->groups, grp); - BLI_uniquename(&act->groups, grp, "Group", offsetof(bActionGroup, name), 64); + BLI_uniquename(&act->groups, grp, "Group", '.', offsetof(bActionGroup, name), 64); } /* add F-Curve to group */ @@ -480,21 +475,21 @@ static float setting_get_rna_value (PointerRNA *ptr, PropertyRNA *prop, int inde { float value= 0.0f; - switch (RNA_property_type(ptr, prop)) { + switch (RNA_property_type(prop)) { case PROP_BOOLEAN: - if (RNA_property_array_length(ptr, prop)) + if (RNA_property_array_length(prop)) value= (float)RNA_property_boolean_get_index(ptr, prop, index); else value= (float)RNA_property_boolean_get(ptr, prop); break; case PROP_INT: - if (RNA_property_array_length(ptr, prop)) + if (RNA_property_array_length(prop)) value= (float)RNA_property_int_get_index(ptr, prop, index); else value= (float)RNA_property_int_get(ptr, prop); break; case PROP_FLOAT: - if (RNA_property_array_length(ptr, prop)) + if (RNA_property_array_length(prop)) value= RNA_property_float_get_index(ptr, prop, index); else value= RNA_property_float_get(ptr, prop); @@ -545,14 +540,14 @@ static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop) Object *ob= (Object *)ptr->data; con= ob->constraints.first; - identifier= (char *)RNA_property_identifier(ptr, prop); + identifier= (char *)RNA_property_identifier(prop); } else if (ptr->type == &RNA_PoseChannel) { /* Pose Channel */ bPoseChannel *pchan= (bPoseChannel *)ptr->data; con= pchan->constraints.first; - identifier= (char *)RNA_property_identifier(ptr, prop); + identifier= (char *)RNA_property_identifier(prop); } /* check if any data to search using */ @@ -631,7 +626,7 @@ static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop) */ static float visualkey_get_value (PointerRNA *ptr, PropertyRNA *prop, int array_index) { - char *identifier= (char *)RNA_property_identifier(ptr, prop); + char *identifier= (char *)RNA_property_identifier(prop); /* handle for Objects or PoseChannels only * - constraints can be on either Objects or PoseChannels, so we only check if the @@ -710,28 +705,30 @@ static float visualkey_get_value (PointerRNA *ptr, PropertyRNA *prop, int array_ * the keyframe insertion. These include the 'visual' keyframing modes, quick refresh, * and extra keyframe filtering. */ -short insertkey (ID *id, const char group[], const char rna_path[], int array_index, float cfra, short flag) +short insert_keyframe (ID *id, bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short flag) { PointerRNA id_ptr, ptr; PropertyRNA *prop; FCurve *fcu; - /* validate pointer first - exit if failure*/ + /* validate pointer first - exit if failure */ RNA_id_pointer_create(id, &id_ptr); - if (RNA_path_resolve(&id_ptr, rna_path, &ptr, &prop) == 0 || prop == NULL) { - printf("Insert Key: Could not insert keyframe, as RNA Path is invalid for the given ID (%s)\n", rna_path); + if ((RNA_path_resolve(&id_ptr, rna_path, &ptr, &prop) == 0) || (prop == NULL)) { + printf("Insert Key: Could not insert keyframe, as RNA Path is invalid for the given ID (ID = %s, Path = %s)\n", id->name, rna_path); return 0; } - /* get F-Curve */ - fcu= verify_fcurve(id, group, rna_path, array_index, 1); + /* get F-Curve - if no action is provided, keyframe to the default one attached to this ID-block */ + if (act == NULL) + act= verify_adt_action(id, 1); + fcu= verify_fcurve(act, group, rna_path, array_index, 1); /* only continue if we have an F-Curve to add keyframe to */ if (fcu) { float curval= 0.0f; /* set additional flags for the F-Curve (i.e. only integer values) */ - if (RNA_property_type(&ptr, prop) != PROP_FLOAT) + if (RNA_property_type(prop) != PROP_FLOAT) fcu->flag |= FCURVE_INT_VALUES; /* apply special time tweaking */ @@ -798,6 +795,9 @@ short insertkey (ID *id, const char group[], const char rna_path[], int array_in } } + /* no F-Curve to add keyframes to */ + printf("ERROR: no F-Curve to add keyframes to \n"); + /* return failure */ return 0; } @@ -812,22 +812,24 @@ short insertkey (ID *id, const char group[], const char rna_path[], int array_in * The flag argument is used for special settings that alter the behaviour of * the keyframe deletion. These include the quick refresh options. */ -short deletekey (ID *id, const char group[], const char rna_path[], int array_index, float cfra, short flag) +short delete_keyframe (ID *id, bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short flag) { - AnimData *adt; - FCurve *fcu; + FCurve *fcu = NULL; /* get F-Curve * Note: here is one of the places where we don't want new Action + F-Curve added! * so 'add' var must be 0 */ + if (act == NULL) { + /* if no action is provided, use the default one attached to this ID-block */ + AnimData *adt= BKE_animdata_from_id(id); + act= adt->action; + } /* we don't check the validity of the path here yet, but it should be ok... */ - fcu= verify_fcurve(id, group, rna_path, array_index, 0); - adt= BKE_animdata_from_id(id); + fcu= verify_fcurve(act, group, rna_path, array_index, 0); - /* only continue if we have an ipo-curve to remove keyframes from */ - if (adt && adt->action && fcu) { - bAction *act= adt->action; + /* only continue if we have an F-Curve to remove keyframes from */ + if (act && fcu) { short found = -1; int i; @@ -867,183 +869,6 @@ short deletekey (ID *id, const char group[], const char rna_path[], int array_in } /* ******************************************* */ -/* KEYINGSETS */ - -/* Operators ------------------------------------------- */ - -/* These operators are only provided for scripting/macro usage, not for direct - * calling from the UI since they wrap some of the data-access API code for these - * (defined in blenkernel) which have quite a few properties. - */ - -/* ----- */ - -static int keyingset_add_destination_exec (bContext *C, wmOperator *op) -{ - PointerRNA ptr; - KeyingSet *ks= NULL; - ID *id= NULL; - char rna_path[256], group_name[64]; // xxx - short groupmode=0, flag=0; - int array_index=0; - - /* get settings from operator properties */ - ptr = RNA_pointer_get(op->ptr, "keyingset"); - if (ptr.data) - ks= (KeyingSet *)ptr.data; - - ptr = RNA_pointer_get(op->ptr, "id"); - if (ptr.data) - id= (ID *)ptr.data; - - groupmode= RNA_enum_get(op->ptr, "grouping_method"); - RNA_string_get(op->ptr, "group_name", group_name); - - RNA_string_get(op->ptr, "rna_path", rna_path); - array_index= RNA_int_get(op->ptr, "array_index"); - - if (RNA_boolean_get(op->ptr, "entire_array")) - flag |= KSP_FLAG_WHOLE_ARRAY; - - /* if enough args are provided, call API method */ - if (ks) { - BKE_keyingset_add_destination(ks, id, group_name, rna_path, array_index, flag, groupmode); - return OPERATOR_FINISHED; - } - else { - BKE_report(op->reports, RPT_ERROR, "Keying Set could not be added."); - return OPERATOR_CANCELLED; - } -} - -void ANIM_OT_keyingset_add_destination (wmOperatorType *ot) -{ - // XXX: this is also defined in rna_animation.c - static EnumPropertyItem prop_mode_grouping_items[] = { - {KSP_GROUP_NAMED, "NAMED", "Named Group", ""}, - {KSP_GROUP_NONE, "NONE", "None", ""}, - {KSP_GROUP_KSNAME, "KEYINGSET", "Keying Set Name", ""}, - {0, NULL, NULL, NULL}}; - - /* identifiers */ - ot->name= "Add Keying Set Destination"; - ot->idname= "ANIM_OT_keyingset_add_destination"; - - /* callbacks */ - ot->exec= keyingset_add_destination_exec; - ot->poll= ED_operator_scene_editable; - - /* props */ - /* pointers */ // xxx - do we want to directly expose these? - RNA_def_pointer_runtime(ot->srna, "keyingset", &RNA_KeyingSet, "Keying Set", "Keying Set to add destination to."); - RNA_def_pointer_runtime(ot->srna, "id", &RNA_ID, "ID", "ID-block for the destination."); - /* grouping */ - RNA_def_enum(ot->srna, "grouping_method", prop_mode_grouping_items, KSP_GROUP_NAMED, "Grouping Method", "Method used to define which Group-name to use."); - RNA_def_string(ot->srna, "group_name", "", 64, "Group Name", "Name of Action Group to assign destination to (only if grouping mode is to use this name)."); - /* rna-path */ - RNA_def_string(ot->srna, "rna_path", "", 256, "RNA-Path", "RNA-Path to destination property."); // xxx hopefully this is long enough - RNA_def_int(ot->srna, "array_index", 0, 0, INT_MAX, "Array Index", "If applicable, the index ", 0, INT_MAX); - /* flags */ - RNA_def_boolean(ot->srna, "entire_array", 1, "Entire Array", "hen an 'array/vector' type is chosen (Location, Rotation, Color, etc.), entire array is to be used."); - -} - -/* ----- */ - -static int keyingset_add_new_exec (bContext *C, wmOperator *op) -{ - Scene *sce= CTX_data_scene(C); - KeyingSet *ks= NULL; - short flag=0, keyingflag=0; - char name[64]; - - /* get settings from operator properties */ - RNA_string_get(op->ptr, "name", name); - - if (RNA_boolean_get(op->ptr, "absolute")) - flag |= KEYINGSET_ABSOLUTE; - if (RNA_boolean_get(op->ptr, "insertkey_needed")) - keyingflag |= INSERTKEY_NEEDED; - if (RNA_boolean_get(op->ptr, "insertkey_visual")) - keyingflag |= INSERTKEY_MATRIX; - - /* call the API func, and set the active keyingset index */ - ks= BKE_keyingset_add(&sce->keyingsets, name, flag, keyingflag); - - if (ks) { - sce->active_keyingset= BLI_countlist(&sce->keyingsets); - return OPERATOR_FINISHED; - } - else { - BKE_report(op->reports, RPT_ERROR, "Keying Set could not be added."); - return OPERATOR_CANCELLED; - } -} - -void ANIM_OT_keyingset_add_new (wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Add Keying Set"; - ot->idname= "ANIM_OT_keyingset_add_new"; - - /* callbacks */ - ot->exec= keyingset_add_new_exec; - ot->poll= ED_operator_scene_editable; - - /* props */ - /* name */ - RNA_def_string(ot->srna, "name", "KeyingSet", 64, "Name", "Name of Keying Set"); - /* flags */ - RNA_def_boolean(ot->srna, "absolute", 1, "Absolute", "Keying Set defines specific paths/settings to be keyframed (i.e. is not reliant on context info)"); - /* keying flags */ - RNA_def_boolean(ot->srna, "insertkey_needed", 0, "Insert Keyframes - Only Needed", "Only insert keyframes where they're needed in the relevant F-Curves."); - RNA_def_boolean(ot->srna, "insertkey_visual", 0, "Insert Keyframes - Visual", "Insert keyframes based on 'visual transforms'."); -} - -/* UI API --------------------------------------------- */ - -/* Build menu-string of available keying-sets (allocates memory for string) - * NOTE: mode must not be longer than 64 chars - */ -char *ANIM_build_keyingsets_menu (ListBase *list, short for_edit) -{ - DynStr *pupds= BLI_dynstr_new(); - KeyingSet *ks; - char buf[64]; - char *str; - int i; - - /* add title first */ - BLI_dynstr_append(pupds, "Keying Sets%t|"); - - /* add dummy entries for none-active */ - if (for_edit) { - BLI_dynstr_append(pupds, "Add New%x-1|"); - BLI_dynstr_append(pupds, " %x0|"); - } - else - BLI_dynstr_append(pupds, "<No Keying Set Active>%x0|"); - - /* loop through keyingsets, adding them */ - for (ks=list->first, i=1; ks; ks=ks->next, i++) { - if (for_edit == 0) - BLI_dynstr_append(pupds, "KS: "); - - BLI_dynstr_append(pupds, ks->name); - BLI_snprintf( buf, 64, "%%x%d%s", i, ((ks->next)?"|":"") ); - BLI_dynstr_append(pupds, buf); - } - - /* convert to normal MEM_malloc'd string */ - str= BLI_dynstr_get_cstring(pupds); - BLI_dynstr_free(pupds); - - return str; -} - - - -/* ******************************************* */ /* KEYFRAME MODIFICATION */ /* mode for commonkey_modifykey */ @@ -1052,829 +877,6 @@ enum { COMMONKEY_MODE_DELETE, } eCommonModifyKey_Modes; -#if 0 // XXX old keyingsets code based on adrcodes... to be restored in due course - -/* --------- KeyingSet Adrcode Getters ------------ */ - -/* initialise a channel-getter storage */ -static void ks_adrcodegetter_init (bKS_AdrcodeGetter *kag, bKeyingSet *ks, bCommonKeySrc *cks) -{ - /* error checking */ - if (kag == NULL) - return; - - if (ELEM(NULL, ks, cks)) { - /* set invalid settings that won't cause harm */ - kag->ks= NULL; - kag->cks= NULL; - kag->index= -2; - kag->tot= 0; - } - else { - /* store settings */ - kag->ks= ks; - kag->cks= cks; - - /* - index is -1, as that allows iterators to return first element - * - tot is chan_num by default, but may get overriden if -1 is encountered (for extension-type getters) - */ - kag->index= -1; - kag->tot= ks->chan_num; - } -} - -/* 'default' channel-getter that will be used when iterating through keyingset's channels - * - iteration will stop when adrcode <= 0 is encountered, so we use that as escape - */ -static short ks_getnextadrcode_default (bKS_AdrcodeGetter *kag) -{ - bKeyingSet *ks= (kag)? kag->ks : NULL; - - /* error checking */ - if (ELEM(NULL, kag, ks)) return 0; - if (kag->tot <= 0) return 0; - - kag->index++; - if ((kag->index < 0) || (kag->index >= kag->tot)) return 0; - - /* return the adrcode stored at index then */ - return ks->adrcodes[kag->index]; -} - -/* add map flag (for MTex channels, as certain ones need special offset) */ -static short ks_getnextadrcode_addmap (bKS_AdrcodeGetter *kag) -{ - short adrcode= ks_getnextadrcode_default(kag); - - /* if there was an adrcode returned, assume that kag stuff is set ok */ - if (adrcode) { - bCommonKeySrc *cks= kag->cks; - bKeyingSet *ks= kag->ks; - - if (ELEM3(ks->blocktype, ID_MA, ID_LA, ID_WO)) { - switch (adrcode) { - case MAP_OFS_X: case MAP_OFS_Y: case MAP_OFS_Z: - case MAP_SIZE_X: case MAP_SIZE_Y: case MAP_SIZE_Z: - case MAP_R: case MAP_G: case MAP_B: case MAP_DVAR: - case MAP_COLF: case MAP_NORF: case MAP_VARF: case MAP_DISP: - adrcode += cks->map; - break; - } - } - } - - /* adrcode must be returned! */ - return adrcode; -} - -/* extend posechannel keyingsets with rotation info (when KAG_CHAN_EXTEND is encountered) - * - iteration will stop when adrcode <= 0 is encountered, so we use that as escape - * - when we encounter KAG_CHAN_EXTEND as adrcode, start returning our own - */ -static short ks_getnextadrcode_pchanrot (bKS_AdrcodeGetter *kag) -{ - /* hardcoded adrcode channels used here only - * - length is keyed-channels + 1 (last item must be 0 to escape) - */ - static short quat_adrcodes[5] = {AC_QUAT_W, AC_QUAT_X, AC_QUAT_Y, AC_QUAT_Z, 0}; - static short eul_adrcodes[4] = {AC_EUL_X, AC_EUL_Y, AC_EUL_Z, 0}; - - /* useful variables */ - bKeyingSet *ks= (kag)? kag->ks : NULL; - bCommonKeySrc *cks= (kag) ? kag->cks : NULL; - short index, adrcode; - - /* error checking */ - if (ELEM3(NULL, kag, ks, cks)) return 0; - if (ks->chan_num <= 0) return 0; - - /* get index - * - if past the last item (kag->tot), return stuff from our static arrays - * - otherwise, just keep returning stuff from the keyingset (but check out for -1!) - */ - kag->index++; - if (kag->index < 0) - return 0; - - /* normal (static stuff) */ - if (kag->index < kag->tot) { - /* get adrcode, and return if not KAG_CHAN_EXTEND (i.e. point for start of iteration) */ - adrcode= ks->adrcodes[kag->index]; - - if (adrcode != KAG_CHAN_EXTEND) - return adrcode; - else - kag->tot= kag->index; - } - - /* based on current rotation-mode - * - index can be at most 5, if we are to prevent segfaults - */ - index= kag->index - kag->tot; - if ((index < 0) || (index > 5)) - return 0; - - if (cks->pchan && cks->pchan->rotmode) - return eul_adrcodes[index]; - else - return quat_adrcodes[index]; -} - -/* ------------- KeyingSet Defines ------------ */ -/* Note: these must all be named with the defks_* prefix, otherwise the template macro will not work! */ - -/* macro for defining keyingset contexts */ -#define KSC_TEMPLATE(ctx_name) {&defks_##ctx_name[0], NULL, sizeof(defks_##ctx_name)/sizeof(bKeyingSet)} - -/* --- */ - -/* check if option not available for deleting keys */ -static short incl_non_del_keys (bKeyingSet *ks, const char mode[]) -{ - /* as optimisation, assume that it is sufficient to check only first letter - * of mode (int comparison should be faster than string!) - */ - //if (strcmp(mode, "Delete")==0) - if (mode && mode[0]=='D') - return 0; - - return 1; -} - -/* Object KeyingSets ------ */ - -/* check if include shapekey entry */ -static short incl_v3d_ob_shapekey (bKeyingSet *ks, const char mode[]) -{ - //Object *ob= (G.obedit)? (G.obedit) : (OBACT); // XXX - Object *ob= NULL; - char *newname= NULL; - - if(ob==NULL) - return 0; - - /* not available for delete mode */ - if (strcmp(mode, "Delete")==0) - return 0; - - /* check if is geom object that can get shapekeys */ - switch (ob->type) { - /* geometry? */ - case OB_MESH: newname= "Mesh"; break; - case OB_CURVE: newname= "Curve"; break; - case OB_SURF: newname= "Surface"; break; - case OB_LATTICE: newname= "Lattice"; break; - - /* not geometry! */ - default: - return 0; - } - - /* if ks is shapekey entry (this could be callled for separator before too!) */ - if (ks->flag == -3) - BLI_strncpy(ks->name, newname, sizeof(ks->name)); - - /* if it gets here, it's ok */ - return 1; -} - -/* array for object keyingset defines */ -bKeyingSet defks_v3d_object[] = -{ - /* include_cb, adrcode-getter, name, blocktype, flag, chan_num, adrcodes */ - {NULL, "Loc", ID_OB, 0, 3, {OB_LOC_X,OB_LOC_Y,OB_LOC_Z}}, - {NULL, "Rot", ID_OB, 0, 3, {OB_ROT_X,OB_ROT_Y,OB_ROT_Z}}, - {NULL, "Scale", ID_OB, 0, 3, {OB_SIZE_X,OB_SIZE_Y,OB_SIZE_Z}}, - - {NULL, "%l", 0, -1, 0, {0}}, // separator - - {NULL, "LocRot", ID_OB, 0, 6, - {OB_LOC_X,OB_LOC_Y,OB_LOC_Z, - OB_ROT_X,OB_ROT_Y,OB_ROT_Z}}, - - {NULL, "LocScale", ID_OB, 0, 6, - {OB_LOC_X,OB_LOC_Y,OB_LOC_Z, - OB_SIZE_X,OB_SIZE_Y,OB_SIZE_Z}}, - - {NULL, "LocRotScale", ID_OB, 0, 9, - {OB_LOC_X,OB_LOC_Y,OB_LOC_Z, - OB_ROT_X,OB_ROT_Y,OB_ROT_Z, - OB_SIZE_X,OB_SIZE_Y,OB_SIZE_Z}}, - - {NULL, "RotScale", ID_OB, 0, 6, - {OB_ROT_X,OB_ROT_Y,OB_ROT_Z, - OB_SIZE_X,OB_SIZE_Y,OB_SIZE_Z}}, - - {incl_non_del_keys, "%l", 0, -1, 0, {0}}, // separator - - {incl_non_del_keys, "VisualLoc", ID_OB, INSERTKEY_MATRIX, 3, {OB_LOC_X,OB_LOC_Y,OB_LOC_Z}}, - {incl_non_del_keys, "VisualRot", ID_OB, INSERTKEY_MATRIX, 3, {OB_ROT_X,OB_ROT_Y,OB_ROT_Z}}, - - {incl_non_del_keys, "VisualLocRot", ID_OB, INSERTKEY_MATRIX, 6, - {OB_LOC_X,OB_LOC_Y,OB_LOC_Z, - OB_ROT_X,OB_ROT_Y,OB_ROT_Z}}, - - {NULL, "%l", 0, -1, 0, {0}}, // separator - - {NULL, "Layer", ID_OB, 0, 1, {OB_LAY}}, // icky option... - {NULL, "Available", ID_OB, -2, 0, {0}}, - - {incl_v3d_ob_shapekey, "%l%l", 0, -1, 0, {0}}, // separator (linked to shapekey entry) - {incl_v3d_ob_shapekey, "<ShapeKey>", ID_OB, -3, 0, {0}} -}; - -/* PoseChannel KeyingSets ------ */ - -/* array for posechannel keyingset defines */ -bKeyingSet defks_v3d_pchan[] = -{ - /* include_cb, name, blocktype, flag, chan_num, adrcodes */ - {NULL, "Loc", ID_PO, 0, 3, {AC_LOC_X,AC_LOC_Y,AC_LOC_Z}}, - {NULL, "Rot", ID_PO, COMMONKEY_PCHANROT, 1, {KAG_CHAN_EXTEND}}, - {NULL, "Scale", ID_PO, 0, 3, {AC_SIZE_X,AC_SIZE_Y,AC_SIZE_Z}}, - - {NULL, "%l", 0, -1, 0, {0}}, // separator - - {NULL, "LocRot", ID_PO, COMMONKEY_PCHANROT, 4, - {AC_LOC_X,AC_LOC_Y,AC_LOC_Z, - KAG_CHAN_EXTEND}}, - - {NULL, "LocScale", ID_PO, 0, 6, - {AC_LOC_X,AC_LOC_Y,AC_LOC_Z, - AC_SIZE_X,AC_SIZE_Y,AC_SIZE_Z}}, - - {NULL, "LocRotScale", ID_PO, COMMONKEY_PCHANROT, 7, - {AC_LOC_X,AC_LOC_Y,AC_LOC_Z,AC_SIZE_X,AC_SIZE_Y,AC_SIZE_Z, - KAG_CHAN_EXTEND}}, - - {NULL, "RotScale", ID_PO, 0, 4, - {AC_SIZE_X,AC_SIZE_Y,AC_SIZE_Z, - KAG_CHAN_EXTEND}}, - - {incl_non_del_keys, "%l", 0, -1, 0, {0}}, // separator - - {incl_non_del_keys, "VisualLoc", ID_PO, INSERTKEY_MATRIX, 3, {AC_LOC_X,AC_LOC_Y,AC_LOC_Z}}, - {incl_non_del_keys, "VisualRot", ID_PO, INSERTKEY_MATRIX|COMMONKEY_PCHANROT, 1, {KAG_CHAN_EXTEND}}, - - {incl_non_del_keys, "VisualLocRot", ID_PO, INSERTKEY_MATRIX|COMMONKEY_PCHANROT, 4, - {AC_LOC_X,AC_LOC_Y,AC_LOC_Z, KAG_CHAN_EXTEND}}, - - {NULL, "%l", 0, -1, 0, {0}}, // separator - - {NULL, "Available", ID_PO, -2, 0, {0}} -}; - -/* Material KeyingSets ------ */ - -/* array for material keyingset defines */ -bKeyingSet defks_buts_shading_mat[] = -{ - /* include_cb, name, blocktype, flag, chan_num, adrcodes */ - {NULL, "RGB", ID_MA, 0, 3, {MA_COL_R,MA_COL_G,MA_COL_B}}, - {NULL, "Alpha", ID_MA, 0, 1, {MA_ALPHA}}, - {NULL, "Halo Size", ID_MA, 0, 1, {MA_HASIZE}}, - {NULL, "Mode", ID_MA, 0, 1, {MA_MODE}}, // evil bitflags - - {NULL, "%l", 0, -1, 0, {0}}, // separator - - {NULL, "All Color", ID_MA, 0, 18, - {MA_COL_R,MA_COL_G,MA_COL_B, - MA_ALPHA,MA_HASIZE, MA_MODE, - MA_SPEC_R,MA_SPEC_G,MA_SPEC_B, - MA_REF,MA_EMIT,MA_AMB,MA_SPEC,MA_HARD, - MA_MODE,MA_TRANSLU,MA_ADD}}, - - {NULL, "All Mirror", ID_MA, 0, 5, - {MA_RAYM,MA_FRESMIR,MA_FRESMIRI, - MA_FRESTRA,MA_FRESTRAI}}, - - {NULL, "%l", 0, -1, 0, {0}}, // separator - - {NULL, "Ofs", ID_MA, COMMONKEY_ADDMAP, 3, {MAP_OFS_X,MAP_OFS_Y,MAP_OFS_Z}}, - {NULL, "Size", ID_MA, COMMONKEY_ADDMAP, 3, {MAP_SIZE_X,MAP_SIZE_Y,MAP_SIZE_Z}}, - - {NULL, "All Mapping", ID_MA, COMMONKEY_ADDMAP, 14, - {MAP_OFS_X,MAP_OFS_Y,MAP_OFS_Z, - MAP_SIZE_X,MAP_SIZE_Y,MAP_SIZE_Z, - MAP_R,MAP_G,MAP_B,MAP_DVAR, - MAP_COLF,MAP_NORF,MAP_VARF,MAP_DISP}}, - - {NULL, "%l", 0, -1, 0, {0}}, // separator - - {NULL, "Available", ID_MA, -2, 0, {0}} -}; - -/* World KeyingSets ------ */ - -/* array for world keyingset defines */ -bKeyingSet defks_buts_shading_wo[] = -{ - /* include_cb, name, blocktype, flag, chan_num, adrcodes */ - {NULL, "Zenith RGB", ID_WO, 0, 3, {WO_ZEN_R,WO_ZEN_G,WO_ZEN_B}}, - {NULL, "Horizon RGB", ID_WO, 0, 3, {WO_HOR_R,WO_HOR_G,WO_HOR_B}}, - - {NULL, "%l", 0, -1, 0, {0}}, // separator - - {NULL, "Mist", ID_WO, 0, 4, {WO_MISI,WO_MISTDI,WO_MISTSTA,WO_MISTHI}}, - {NULL, "Stars", ID_WO, 0, 5, {WO_STAR_R,WO_STAR_G,WO_STAR_B,WO_STARDIST,WO_STARSIZE}}, - - - {NULL, "%l", 0, -1, 0, {0}}, // separator - - {NULL, "Ofs", ID_WO, COMMONKEY_ADDMAP, 3, {MAP_OFS_X,MAP_OFS_Y,MAP_OFS_Z}}, - {NULL, "Size", ID_WO, COMMONKEY_ADDMAP, 3, {MAP_SIZE_X,MAP_SIZE_Y,MAP_SIZE_Z}}, - - {NULL, "All Mapping", ID_WO, COMMONKEY_ADDMAP, 14, - {MAP_OFS_X,MAP_OFS_Y,MAP_OFS_Z, - MAP_SIZE_X,MAP_SIZE_Y,MAP_SIZE_Z, - MAP_R,MAP_G,MAP_B,MAP_DVAR, - MAP_COLF,MAP_NORF,MAP_VARF,MAP_DISP}}, - - {NULL, "%l", 0, -1, 0, {0}}, // separator - - {NULL, "Available", ID_WO, -2, 0, {0}} -}; - -/* Lamp KeyingSets ------ */ - -/* array for lamp keyingset defines */ -bKeyingSet defks_buts_shading_la[] = -{ - /* include_cb, name, blocktype, flag, chan_num, adrcodes */ - {NULL, "RGB", ID_LA, 0, 3, {LA_COL_R,LA_COL_G,LA_COL_B}}, - {NULL, "Energy", ID_LA, 0, 1, {LA_ENERGY}}, - {NULL, "Spot Size", ID_LA, 0, 1, {LA_SPOTSI}}, - - {NULL, "%l", 0, -1, 0, {0}}, // separator - - {NULL, "Ofs", ID_LA, COMMONKEY_ADDMAP, 3, {MAP_OFS_X,MAP_OFS_Y,MAP_OFS_Z}}, - {NULL, "Size", ID_LA, COMMONKEY_ADDMAP, 3, {MAP_SIZE_X,MAP_SIZE_Y,MAP_SIZE_Z}}, - - {NULL, "All Mapping", ID_LA, COMMONKEY_ADDMAP, 14, - {MAP_OFS_X,MAP_OFS_Y,MAP_OFS_Z, - MAP_SIZE_X,MAP_SIZE_Y,MAP_SIZE_Z, - MAP_R,MAP_G,MAP_B,MAP_DVAR, - MAP_COLF,MAP_NORF,MAP_VARF,MAP_DISP}}, - - {NULL, "%l", 0, -1, 0, {0}}, // separator - - {NULL, "Available", ID_LA, -2, 0, {0}} -}; - -/* Texture KeyingSets ------ */ - -/* array for texture keyingset defines */ -bKeyingSet defks_buts_shading_tex[] = -{ - /* include_cb, name, blocktype, flag, chan_num, adrcodes */ - {NULL, "Clouds", ID_TE, 0, 5, - {TE_NSIZE,TE_NDEPTH,TE_NTYPE, - TE_MG_TYP,TE_N_BAS1}}, - - {NULL, "Marble", ID_TE, 0, 7, - {TE_NSIZE,TE_NDEPTH,TE_NTYPE, - TE_TURB,TE_MG_TYP,TE_N_BAS1,TE_N_BAS2}}, - - {NULL, "Stucci", ID_TE, 0, 5, - {TE_NSIZE,TE_NTYPE,TE_TURB, - TE_MG_TYP,TE_N_BAS1}}, - - {NULL, "Wood", ID_TE, 0, 6, - {TE_NSIZE,TE_NTYPE,TE_TURB, - TE_MG_TYP,TE_N_BAS1,TE_N_BAS2}}, - - {NULL, "Magic", ID_TE, 0, 2, {TE_NDEPTH,TE_TURB}}, - - {NULL, "Blend", ID_TE, 0, 1, {TE_MG_TYP}}, - - {NULL, "Musgrave", ID_TE, 0, 6, - {TE_MG_TYP,TE_MGH,TE_MG_LAC, - TE_MG_OCT,TE_MG_OFF,TE_MG_GAIN}}, - - {NULL, "Voronoi", ID_TE, 0, 9, - {TE_VNW1,TE_VNW2,TE_VNW3,TE_VNW4, - TE_VNMEXP,TE_VN_DISTM,TE_VN_COLT, - TE_ISCA,TE_NSIZE}}, - - {NULL, "Distorted Noise", ID_TE, 0, 4, - {TE_MG_OCT,TE_MG_OFF,TE_MG_GAIN,TE_DISTA}}, - - {NULL, "Color Filter", ID_TE, 0, 5, - {TE_COL_R,TE_COL_G,TE_COL_B,TE_BRIGHT,TE_CONTRA}}, - - {NULL, "%l", 0, -1, 0, {0}}, // separator - - {NULL, "Available", ID_TE, -2, 0, {0}} -}; - -/* Object Buttons KeyingSets ------ */ - -/* check if include particles entry */ -static short incl_buts_ob (bKeyingSet *ks, const char mode[]) -{ - //Object *ob= OBACT; // xxx - Object *ob= NULL; - /* only if object is mesh type */ - - if(ob==NULL) return 0; - return (ob->type == OB_MESH); -} - -/* array for texture keyingset defines */ -bKeyingSet defks_buts_object[] = -{ - /* include_cb, name, blocktype, flag, chan_num, adrcodes */ - {incl_buts_ob, "Surface Damping", ID_OB, 0, 1, {OB_PD_SDAMP}}, - {incl_buts_ob, "Random Damping", ID_OB, 0, 1, {OB_PD_RDAMP}}, - {incl_buts_ob, "Permeability", ID_OB, 0, 1, {OB_PD_PERM}}, - - {NULL, "%l", 0, -1, 0, {0}}, // separator - - {NULL, "Force Strength", ID_OB, 0, 1, {OB_PD_FSTR}}, - {NULL, "Force Falloff", ID_OB, 0, 1, {OB_PD_FFALL}}, - - {NULL, "%l", 0, -1, 0, {0}}, // separator - - {NULL, "Available", ID_OB, -2, 0, {0}} // this will include ob-transforms too! -}; - -/* Camera Buttons KeyingSets ------ */ - -/* check if include internal-renderer entry */ -static short incl_buts_cam1 (bKeyingSet *ks, const char mode[]) -{ - Scene *scene= NULL; // FIXME this will cause a crash, but we need an extra arg first! - /* only if renderer is internal renderer */ - return (scene->r.renderer==R_INTERN); -} - -/* check if include external-renderer entry */ -static short incl_buts_cam2 (bKeyingSet *ks, const char mode[]) -{ - Scene *scene= NULL; // FIXME this will cause a crash, but we need an extra arg first! - /* only if renderer is internal renderer */ - return (scene->r.renderer!=R_INTERN); -} - -/* array for camera keyingset defines */ -bKeyingSet defks_buts_cam[] = -{ - /* include_cb, name, blocktype, flag, chan_num, adrcodes */ - {NULL, "Lens", ID_CA, 0, 1, {CAM_LENS}}, - {NULL, "Clipping", ID_CA, 0, 2, {CAM_STA,CAM_END}}, - {NULL, "Focal Distance", ID_CA, 0, 1, {CAM_YF_FDIST}}, - - {NULL, "%l", 0, -1, 0, {0}}, // separator - - - {incl_buts_cam2, "Aperture", ID_CA, 0, 1, {CAM_YF_APERT}}, - {incl_buts_cam1, "Viewplane Shift", ID_CA, 0, 2, {CAM_SHIFT_X,CAM_SHIFT_Y}}, - - {NULL, "%l", 0, -1, 0, {0}}, // separator - - {NULL, "Available", ID_CA, -2, 0, {0}} -}; - -/* --- */ - -/* Keying Context Defines - Must keep in sync with enumeration (eKS_Contexts) */ -bKeyingContext ks_contexts[] = -{ - KSC_TEMPLATE(v3d_object), - KSC_TEMPLATE(v3d_pchan), - - KSC_TEMPLATE(buts_shading_mat), - KSC_TEMPLATE(buts_shading_wo), - KSC_TEMPLATE(buts_shading_la), - KSC_TEMPLATE(buts_shading_tex), - - KSC_TEMPLATE(buts_object), - KSC_TEMPLATE(buts_cam) -}; - -/* Keying Context Enumeration - Must keep in sync with definitions*/ -typedef enum eKS_Contexts { - KSC_V3D_OBJECT = 0, - KSC_V3D_PCHAN, - - KSC_BUTS_MAT, - KSC_BUTS_WO, - KSC_BUTS_LA, - KSC_BUTS_TEX, - - KSC_BUTS_OB, - KSC_BUTS_CAM, - - /* make sure this last one remains untouched! */ - KSC_TOT_TYPES -} eKS_Contexts; - - -/* ---------------- KeyingSet Tools ------------------- */ - -/* helper for commonkey_context_get() - get keyingsets for 3d-view */ -static void commonkey_context_getv3d (const bContext *C, ListBase *sources, bKeyingContext **ksc) -{ - Scene *scene= CTX_data_scene(C); - Object *ob; - IpoCurve *icu; - - if ((OBACT) && (OBACT->flag & OB_POSEMODE)) { - bPoseChannel *pchan; - - /* pose-level */ - ob= OBACT; - *ksc= &ks_contexts[KSC_V3D_PCHAN]; - // XXX - //set_pose_keys(ob); /* sets pchan->flag to POSE_KEY if bone selected, and clears if not */ - - /* loop through posechannels */ - for (pchan=ob->pose->chanbase.first; pchan; pchan=pchan->next) { - if (pchan->flag & POSE_KEY) { - bCommonKeySrc *cks; - - /* add new keyframing destination */ - cks= MEM_callocN(sizeof(bCommonKeySrc), "bCommonKeySrc"); - BLI_addtail(sources, cks); - - /* set id-block to key to, and action */ - cks->id= (ID *)ob; - cks->act= ob->action; - - /* set pchan */ - cks->pchan= pchan; - cks->actname= pchan->name; - } - } - } - else { - /* object-level */ - *ksc= &ks_contexts[KSC_V3D_OBJECT]; - - /* loop through bases */ - // XXX but we're only supposed to do this on editable ones, not just selected ones! - CTX_DATA_BEGIN(C, Base*, base, selected_bases) { - bCommonKeySrc *cks; - - /* add new keyframing destination */ - cks= MEM_callocN(sizeof(bCommonKeySrc), "bCommonKeySrc"); - BLI_addtail(sources, cks); - - /* set id-block to key to */ - ob= base->object; - cks->id= (ID *)ob; - } - CTX_DATA_END; - } -} - -/* helper for commonkey_context_get() - get keyingsets for buttons window */ -static void commonkey_context_getsbuts (const bContext *C, ListBase *sources, bKeyingContext **ksc) -{ -#if 0 // XXX dunno what's the future of this stuff... - bCommonKeySrc *cks; - - /* check on tab-type */ - switch (G.buts->mainb) { - case CONTEXT_SHADING: /* ------------- Shading buttons ---------------- */ - /* subtabs include "Material", "Texture", "Lamp", "World"*/ - switch (G.buts->tab[CONTEXT_SHADING]) { - case TAB_SHADING_MAT: /* >------------- Material Tab -------------< */ - { - Material *ma= editnode_get_active_material(G.buts->lockpoin); - - if (ma) { - /* add new keyframing destination */ - cks= MEM_callocN(sizeof(bCommonKeySrc), "bCommonKeySrc"); - BLI_addtail(sources, cks); - - /* set data */ - cks->id= (ID *)ma; - cks->ipo= ma->ipo; - cks->map= texchannel_to_adrcode(ma->texact); - - /* set keyingsets */ - *ksc= &ks_contexts[KSC_BUTS_MAT]; - return; - } - } - break; - case TAB_SHADING_WORLD: /* >------------- World Tab -------------< */ - { - World *wo= G.buts->lockpoin; - - if (wo) { - /* add new keyframing destination */ - cks= MEM_callocN(sizeof(bCommonKeySrc), "bCommonKeySrc"); - BLI_addtail(sources, cks); - - /* set data */ - cks->id= (ID *)wo; - cks->ipo= wo->ipo; - cks->map= texchannel_to_adrcode(wo->texact); - - /* set keyingsets */ - *ksc= &ks_contexts[KSC_BUTS_WO]; - return; - } - } - break; - case TAB_SHADING_LAMP: /* >------------- Lamp Tab -------------< */ - { - Lamp *la= G.buts->lockpoin; - - if (la) { - /* add new keyframing destination */ - cks= MEM_callocN(sizeof(bCommonKeySrc), "bCommonKeySrc"); - BLI_addtail(sources, cks); - - /* set data */ - cks->id= (ID *)la; - cks->ipo= la->ipo; - cks->map= texchannel_to_adrcode(la->texact); - - /* set keyingsets */ - *ksc= &ks_contexts[KSC_BUTS_LA]; - return; - } - } - break; - case TAB_SHADING_TEX: /* >------------- Texture Tab -------------< */ - { - Tex *tex= G.buts->lockpoin; - - if (tex) { - /* add new keyframing destination */ - cks= MEM_callocN(sizeof(bCommonKeySrc), "bCommonKeySrc"); - BLI_addtail(sources, cks); - - /* set data */ - cks->id= (ID *)tex; - cks->ipo= tex->ipo; - - /* set keyingsets */ - *ksc= &ks_contexts[KSC_BUTS_TEX]; - return; - } - } - break; - } - break; - - case CONTEXT_OBJECT: /* ------------- Object buttons ---------------- */ - { - Object *ob= OBACT; - - if (ob) { - /* add new keyframing destination */ - cks= MEM_callocN(sizeof(bCommonKeySrc), "bCommonKeySrc"); - BLI_addtail(sources, cks); - - /* set id-block to key to */ - cks->id= (ID *)ob; - cks->ipo= ob->ipo; - - /* set keyingsets */ - *ksc= &ks_contexts[KSC_BUTS_OB]; - return; - } - } - break; - - case CONTEXT_EDITING: /* ------------- Editing buttons ---------------- */ - { - Object *ob= OBACT; - - if ((ob) && (ob->type==OB_CAMERA) && (G.buts->lockpoin)) { /* >---------------- camera buttons ---------------< */ - Camera *ca= G.buts->lockpoin; - - /* add new keyframing destination */ - cks= MEM_callocN(sizeof(bCommonKeySrc), "bCommonKeySrc"); - BLI_addtail(sources, cks); - - /* set id-block to key to */ - cks->id= (ID *)ca; - cks->ipo= ca->ipo; - - /* set keyingsets */ - *ksc= &ks_contexts[KSC_BUTS_CAM]; - return; - } - } - break; - } -#endif // XXX end of buttons stuff to port... - - /* if nothing happened... */ - *ksc= NULL; -} - -#endif // XXX old keyingsets code based on adrcodes... to be restored in due course - -#if 0 // XXX new relative keyingsets code - -/* Check if context data is suitable for the given absolute Keying Set */ -static short keyingset_context_ok_poll (bContext *C, KeyingSet *ks) -{ - - return 1; -} - -/* Get list of data-sources from context for inserting keyframes using the given relative Keying Set */ -static short commonkey_get_context_data (bContext *C, ListBase *dsources, KeyingSet *ks) -{ - -} - -#endif // XXX new relative keyingsets code - -/* Given a KeyingSet and context info (if required), modify keyframes for the channels specified - * by the KeyingSet. This takes into account many of the different combinations of using KeyingSets. - * Returns the number of channels that keyframes were added to - */ -static int commonkey_modifykey (ListBase *dsources, KeyingSet *ks, short mode, float cfra) -{ - KS_Path *ksp; - int kflag=0, success= 0; - char *groupname= NULL; - - /* get flags to use */ - if (mode == COMMONKEY_MODE_INSERT) { - /* use KeyingSet's flags as base */ - kflag= ks->keyingflag; - - /* suppliment with info from the context */ - if (IS_AUTOKEY_FLAG(AUTOMATKEY)) kflag |= INSERTKEY_MATRIX; - if (IS_AUTOKEY_FLAG(INSERTNEEDED)) kflag |= INSERTKEY_NEEDED; - // if (IS_AUTOKEY_MODE(EDITKEYS)) flag |= INSERTKEY_REPLACE; - } - else if (mode == COMMONKEY_MODE_DELETE) - kflag= 0; - - /* check if the KeyingSet is absolute or not (i.e. does it requires sources info) */ - if (ks->flag & KEYINGSET_ABSOLUTE) { - /* Absolute KeyingSets are simpler to use, as all the destination info has already been - * provided by the user, and is stored, ready to use, in the KeyingSet paths. - */ - for (ksp= ks->paths.first; ksp; ksp= ksp->next) { - int arraylen, i; - - /* get pointer to name of group to add channels to */ - if (ksp->groupmode == KSP_GROUP_NONE) - groupname= NULL; - else if (ksp->groupmode == KSP_GROUP_KSNAME) - groupname= ks->name; - else - groupname= ksp->group; - - /* init arraylen and i - arraylen should be greater than i so that - * normal non-array entries get keyframed correctly - */ - i= ksp->array_index; - arraylen= i+1; - - /* get length of array if whole array option is enabled */ - if (ksp->flag & KSP_FLAG_WHOLE_ARRAY) { - PointerRNA id_ptr, ptr; - PropertyRNA *prop; - - RNA_id_pointer_create(ksp->id, &id_ptr); - if (RNA_path_resolve(&id_ptr, ksp->rna_path, &ptr, &prop) && prop) - arraylen= RNA_property_array_length(&ptr, prop); - } - - /* for each possible index, perform operation - * - assume that arraylen is greater than index - */ - for (; i < arraylen; i++) { - /* action to take depends on mode */ - if (mode == COMMONKEY_MODE_INSERT) - success+= insertkey(ksp->id, groupname, ksp->rna_path, i, cfra, kflag); - else if (mode == COMMONKEY_MODE_DELETE) - success+= deletekey(ksp->id, groupname, ksp->rna_path, i, cfra, kflag); - } - - // TODO: set recalc tags on the ID? - } - } -#if 0 // XXX still need to figure out how to get such keyingsets working - else if (dsources) { - /* for each one of the 'sources', resolve the template markers and expand arrays, then insert keyframes */ - bCommonKeySrc *cks; - char *path = NULL; - int index=0, tot=0; - - /* for each 'source' for keyframe data, resolve each of the paths from the KeyingSet */ - for (cks= dsources->first; cks; cks= cks->next) { - - } - } -#endif // XXX still need to figure out how to get such - - return success; -} - - /* Polling callback for use with ANIM_*_keyframe() operators * This is based on the standard ED_operator_areaactive callback, * except that it does special checks for a few spacetypes too... @@ -1904,38 +906,56 @@ static int modify_key_op_poll(bContext *C) /* Insert Key Operator ------------------------ */ -/* NOTE: - * This is one of the 'simpler new-style' Insert Keyframe operators which relies on Keying Sets. - * For now, these are absolute Keying Sets only, so there is very little context info involved. - * - * -- Joshua Leung, Feb 2009 - */ - static int insert_key_exec (bContext *C, wmOperator *op) { ListBase dsources = {NULL, NULL}; Scene *scene= CTX_data_scene(C); KeyingSet *ks= NULL; + int type= RNA_int_get(op->ptr, "type"); float cfra= (float)CFRA; // XXX for now, don't bother about all the yucky offset crap short success; - /* try to get KeyingSet */ - if (scene->active_keyingset > 0) + /* type is the Keying Set the user specified to use when calling the operator: + * - type == 0: use scene's active Keying Set + * - type > 0: use a user-defined Keying Set from the active scene + * - type < 0: use a builtin Keying Set + */ + if (type == 0) + type= scene->active_keyingset; + if (type > 0) ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1); - /* report failure */ + else + ks= BLI_findlink(&builtin_keyingsets, -type-1); + + /* report failures */ if (ks == NULL) { BKE_report(op->reports, RPT_ERROR, "No active Keying Set"); return OPERATOR_CANCELLED; } + /* get context info for relative Keying Sets */ + if ((ks->flag & KEYINGSET_ABSOLUTE) == 0) { + /* exit if no suitable data obtained */ + if (modifykey_get_context_data(C, &dsources, ks) == 0) { + BKE_report(op->reports, RPT_ERROR, "No suitable context info for active Keying Set"); + return OPERATOR_CANCELLED; + } + } + /* try to insert keyframes for the channels specified by KeyingSet */ - success= commonkey_modifykey(&dsources, ks, COMMONKEY_MODE_INSERT, cfra); + success= modify_keyframes(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra); printf("KeyingSet '%s' - Successfully added %d Keyframes \n", ks->name, success); /* report failure? */ if (success == 0) BKE_report(op->reports, RPT_WARNING, "Keying Set failed to insert any keyframes"); + /* free temp context-data if available */ + if (dsources.first) { + /* we assume that there is no extra data that needs to be freed from here... */ + BLI_freelistN(&dsources); + } + /* send updates */ ED_anim_dag_flush_update(C); @@ -1957,42 +977,130 @@ void ANIM_OT_insert_keyframe (wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* settings */ + RNA_def_int(ot->srna, "type", 0, INT_MIN, INT_MAX, "Keying Set Number", "Index (determined internally) of the Keying Set to use", 0, 1); } -/* Delete Key Operator ------------------------ */ +/* Insert Key Operator (With Menu) ------------------------ */ -/* NOTE: - * This is one of the 'simpler new-style' Insert Keyframe operators which relies on Keying Sets. - * For now, these are absolute Keying Sets only, so there is very little context info involved. - * - * -- Joshua Leung, Feb 2009 +/* XXX + * This operator pops up a menu which sets gets the index of the keyingset to use, + * setting the global settings, and calling the insert-keyframe operator using these + * settings */ + +static int insert_key_menu_invoke (bContext *C, wmOperator *op, wmEvent *event) +{ + Scene *scene= CTX_data_scene(C); + KeyingSet *ks; + uiPopupMenu *pup; + uiLayout *layout; + int i = 0; + + pup= uiPupMenuBegin(C, "Insert Keyframe", 0); + layout= uiPupMenuLayout(pup); + + /* active Keying Set */ + uiItemIntO(layout, "Active Keying Set", 0, "ANIM_OT_insert_keyframe_menu", "type", i++); + uiItemS(layout); + + /* user-defined Keying Sets + * - these are listed in the order in which they were defined for the active scene + */ + if (scene->keyingsets.first) { + for (ks= scene->keyingsets.first; ks; ks= ks->next) + uiItemIntO(layout, ks->name, 0, "ANIM_OT_insert_keyframe_menu", "type", i++); + uiItemS(layout); + } + + /* builtin Keying Sets */ + // XXX polling the entire list may lag + i= -1; + for (ks= builtin_keyingsets.first; ks; ks= ks->next) { + /* only show KeyingSet if context is suitable */ + if (keyingset_context_ok_poll(C, ks)) { + uiItemIntO(layout, ks->name, 0, "ANIM_OT_insert_keyframe_menu", "type", i--); + } + } + + uiPupMenuEnd(C, pup); + + return OPERATOR_CANCELLED; +} +void ANIM_OT_insert_keyframe_menu (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Insert Keyframe"; + ot->idname= "ANIM_OT_insert_keyframe_menu"; + + /* callbacks */ + ot->invoke= insert_key_menu_invoke; + ot->exec= insert_key_exec; + ot->poll= ED_operator_areaactive; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties + * - NOTE: here the type is int not enum, since many of the indicies here are determined dynamically + */ + RNA_def_int(ot->srna, "type", 0, INT_MIN, INT_MAX, "Keying Set Number", "Index (determined internally) of the Keying Set to use", 0, 1); +} + +/* Delete Key Operator ------------------------ */ + static int delete_key_exec (bContext *C, wmOperator *op) { ListBase dsources = {NULL, NULL}; Scene *scene= CTX_data_scene(C); - KeyingSet *ks= NULL; + KeyingSet *ks= NULL; + int type= RNA_int_get(op->ptr, "type"); float cfra= (float)CFRA; // XXX for now, don't bother about all the yucky offset crap short success; - /* try to get KeyingSet */ - if (scene->active_keyingset > 0) + /* type is the Keying Set the user specified to use when calling the operator: + * - type == 0: use scene's active Keying Set + * - type > 0: use a user-defined Keying Set from the active scene + * - type < 0: use a builtin Keying Set + */ + if (type == 0) + type= scene->active_keyingset; + if (type > 0) ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1); + else + ks= BLI_findlink(&builtin_keyingsets, -type-1); + /* report failure */ if (ks == NULL) { BKE_report(op->reports, RPT_ERROR, "No active Keying Set"); return OPERATOR_CANCELLED; } + /* get context info for relative Keying Sets */ + if ((ks->flag & KEYINGSET_ABSOLUTE) == 0) { + /* exit if no suitable data obtained */ + if (modifykey_get_context_data(C, &dsources, ks) == 0) { + BKE_report(op->reports, RPT_ERROR, "No suitable context info for active Keying Set"); + return OPERATOR_CANCELLED; + } + } + /* try to insert keyframes for the channels specified by KeyingSet */ - success= commonkey_modifykey(&dsources, ks, COMMONKEY_MODE_DELETE, cfra); + success= modify_keyframes(C, &dsources, NULL, ks, MODIFYKEY_MODE_DELETE, cfra); printf("KeyingSet '%s' - Successfully removed %d Keyframes \n", ks->name, success); /* report failure? */ if (success == 0) BKE_report(op->reports, RPT_WARNING, "Keying Set failed to remove any keyframes"); + /* free temp context-data if available */ + if (dsources.first) { + /* we assume that there is no extra data that needs to be freed from here... */ + BLI_freelistN(&dsources); + } + /* send updates */ ED_anim_dag_flush_update(C); @@ -2014,276 +1122,217 @@ void ANIM_OT_delete_keyframe (wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties + * - NOTE: here the type is int not enum, since many of the indicies here are determined dynamically + */ + RNA_def_int(ot->srna, "type", 0, INT_MIN, INT_MAX, "Keying Set Number", "Index (determined internally) of the Keying Set to use", 0, 1); } -/* Insert Key Operator ------------------------ */ +/* Delete Key Operator ------------------------ */ /* XXX WARNING: - * This is currently just a basic operator, which work in 3d-view context on objects/bones only - * and will insert keyframes for a few settings only. This is until it becomes clear how - * to separate (or not) the process for RNA-path creation between context + keyingsets. - * + * This is currently just a basic operator, which work in 3d-view context on objects only. + * Should this be kept? It does have advantages over a version which requires selecting a keyingset to use... * -- Joshua Leung, Jan 2009 */ - -/* defines for basic insert-key testing operator */ - // XXX this will definitely be replaced -EnumPropertyItem prop_insertkey_types[] = { - {0, "KEYINGSET", "Active KeyingSet", ""}, - {1, "OBLOC", "Object Location", ""}, - {2, "OBROT", "Object Rotation", ""}, - {3, "OBSCALE", "Object Scale", ""}, - {4, "MAT_COL", "Active Material - Color", ""}, - {5, "PCHANLOC", "Pose-Channel Location", ""}, - {6, "PCHANROT", "Pose-Channel Rotation", ""}, - {7, "PCHANSCALE", "Pose-Channel Scale", ""}, - {0, NULL, NULL, NULL} -}; - -static int insert_key_old_invoke (bContext *C, wmOperator *op, wmEvent *event) + +static int delete_key_old_exec (bContext *C, wmOperator *op) { - Object *ob= CTX_data_active_object(C); - uiMenuItem *head; + Scene *scene= CTX_data_scene(C); + float cfra= (float)CFRA; // XXX for now, don't bother about all the yucky offset crap - if (ob == NULL) - return OPERATOR_CANCELLED; + // XXX more comprehensive tests will be needed + CTX_DATA_BEGIN(C, Base*, base, selected_bases) + { + Object *ob= base->object; + ID *id= (ID *)ob; + FCurve *fcu, *fcn; + short success= 0; - head= uiPupMenuBegin("Insert Keyframe", 0); + /* loop through all curves in animdata and delete keys on this frame */ + if (ob->adt) { + AnimData *adt= ob->adt; + bAction *act= adt->action; + + for (fcu= act->curves.first; fcu; fcu= fcn) { + fcn= fcu->next; + success+= delete_keyframe(id, NULL, NULL, fcu->rna_path, fcu->array_index, cfra, 0); + } + } + + printf("Ob '%s' - Successfully removed %d keyframes \n", id->name+2, success); + + ob->recalc |= OB_RECALC_OB; + } + CTX_DATA_END; - /* active keyingset */ - uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe_old", "type", 0); + /* send updates */ + ED_anim_dag_flush_update(C); - /* selective inclusion */ - if ((ob->pose) && (ob->flag & OB_POSEMODE)) { - /* bone types */ - uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe_old", "type", 5); - uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe_old", "type", 6); - uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe_old", "type", 7); - } - else { - /* object types */ - uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe_old", "type", 1); - uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe_old", "type", 2); - uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe_old", "type", 3); - uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe_old", "type", 4); - } + WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, NULL); + + return OPERATOR_FINISHED; +} + +void ANIM_OT_delete_keyframe_old (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Delete Keyframe"; + ot->idname= "ANIM_OT_delete_keyframe_old"; - uiPupMenuEnd(C, head); + /* callbacks */ + ot->invoke= WM_operator_confirm; + ot->exec= delete_key_old_exec; - return OPERATOR_CANCELLED; + ot->poll= ED_operator_areaactive; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } - -static int insert_key_old_exec (bContext *C, wmOperator *op) + + +/* Insert Key Button Operator ------------------------ */ + +static int insert_key_button_exec (bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); - short mode= RNA_enum_get(op->ptr, "type"); + PointerRNA ptr; + PropertyRNA *prop= NULL; + char *path; float cfra= (float)CFRA; // XXX for now, don't bother about all the yucky offset crap + short success= 0; + int a, index, length, all= RNA_boolean_get(op->ptr, "all"); - /* for now, handle 'active keyingset' one separately */ - if (mode == 0) { - ListBase dsources = {NULL, NULL}; - KeyingSet *ks= NULL; - short success; - - /* try to get KeyingSet */ - if (scene->active_keyingset > 0) - ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1); - /* report failure */ - if (ks == NULL) { - BKE_report(op->reports, RPT_ERROR, "No active Keying Set"); - return OPERATOR_CANCELLED; - } - - /* try to insert keyframes for the channels specified by KeyingSet */ - success= commonkey_modifykey(&dsources, ks, COMMONKEY_MODE_INSERT, cfra); - printf("KeyingSet '%s' - Successfully added %d Keyframes \n", ks->name, success); + /* try to insert keyframe using property retrieved from UI */ + memset(&ptr, 0, sizeof(PointerRNA)); + uiAnimContextProperty(C, &ptr, &prop, &index); + + if ((ptr.data && prop) && RNA_property_animateable(&ptr, prop)) { + path= RNA_path_from_ID_to_property(&ptr, prop); - /* report failure? */ - if (success == 0) - BKE_report(op->reports, RPT_WARNING, "Keying Set failed to insert any keyframes"); - } - else { - // more comprehensive tests will be needed - CTX_DATA_BEGIN(C, Base*, base, selected_bases) - { - Object *ob= base->object; - ID *id= (ID *)ob; - short success= 0; - - /* check which keyframing mode chosen for this object */ - if (mode < 4) { - /* object-based keyframes */ - switch (mode) { - case 4: /* color of active material (only for geometry...) */ - // NOTE: this is just a demo... but ideally we'd go through materials instead of active one only so reference stays same - // XXX no group for now - success+= insertkey(id, NULL, "active_material.diffuse_color", 0, cfra, 0); - success+= insertkey(id, NULL, "active_material.diffuse_color", 1, cfra, 0); - success+= insertkey(id, NULL, "active_material.diffuse_color", 2, cfra, 0); - break; - case 3: /* object scale */ - success+= insertkey(id, "Object Transforms", "scale", 0, cfra, 0); - success+= insertkey(id, "Object Transforms", "scale", 1, cfra, 0); - success+= insertkey(id, "Object Transforms", "scale", 2, cfra, 0); - break; - case 2: /* object rotation */ - success+= insertkey(id, "Object Transforms", "rotation", 0, cfra, 0); - success+= insertkey(id, "Object Transforms", "rotation", 1, cfra, 0); - success+= insertkey(id, "Object Transforms", "rotation", 2, cfra, 0); - break; - default: /* object location */ - success+= insertkey(id, "Object Transforms", "location", 0, cfra, 0); - success+= insertkey(id, "Object Transforms", "location", 1, cfra, 0); - success+= insertkey(id, "Object Transforms", "location", 2, cfra, 0); - break; - } + if (path) { + if (all) { + length= RNA_property_array_length(prop); - ob->recalc |= OB_RECALC_OB; - } - else if ((ob->pose) && (ob->flag & OB_POSEMODE)) { - /* PoseChannel based keyframes */ - bPoseChannel *pchan; - - for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { - /* only if selected */ - if ((pchan->bone) && (pchan->bone->flag & BONE_SELECTED)) { - char buf[512]; - - switch (mode) { - case 7: /* pchan scale */ - sprintf(buf, "pose.pose_channels[\"%s\"].scale", pchan->name); - success+= insertkey(id, pchan->name, buf, 0, cfra, 0); - success+= insertkey(id, pchan->name, buf, 1, cfra, 0); - success+= insertkey(id, pchan->name, buf, 2, cfra, 0); - break; - case 6: /* pchan rotation */ - if (pchan->rotmode == PCHAN_ROT_QUAT) { - sprintf(buf, "pose.pose_channels[\"%s\"].rotation", pchan->name); - success+= insertkey(id, pchan->name, buf, 0, cfra, 0); - success+= insertkey(id, pchan->name, buf, 1, cfra, 0); - success+= insertkey(id, pchan->name, buf, 2, cfra, 0); - success+= insertkey(id, pchan->name, buf, 3, cfra, 0); - } - else { - sprintf(buf, "pose.pose_channels[\"%s\"].euler_rotation", pchan->name); - success+= insertkey(id, pchan->name, buf, 0, cfra, 0); - success+= insertkey(id, pchan->name, buf, 1, cfra, 0); - success+= insertkey(id, pchan->name, buf, 2, cfra, 0); - } - break; - default: /* pchan location */ - sprintf(buf, "pose.pose_channels[\"%s\"].location", pchan->name); - success+= insertkey(id, pchan->name, buf, 0, cfra, 0); - success+= insertkey(id, pchan->name, buf, 1, cfra, 0); - success+= insertkey(id, pchan->name, buf, 2, cfra, 0); - break; - } - } - } - - ob->recalc |= OB_RECALC_OB; + if(length) index= 0; + else length= 1; } + else + length= 1; - printf("Ob '%s' - Successfully added %d Keyframes \n", id->name+2, success); + for (a=0; a<length; a++) + success+= insert_keyframe(ptr.id.data, NULL, NULL, path, index+a, cfra, 0); + + MEM_freeN(path); + } + else { + if (G.f & G_DEBUG) + printf("Button Insert-Key: no path to property \n"); + BKE_report(op->reports, RPT_WARNING, "Failed to resolve path to property. Try using a Keying Set instead."); } - CTX_DATA_END; + } + else if (G.f & G_DEBUG) { + printf("ptr.data = %p, prop = %p,", ptr.data, prop); + printf("animateable = %d \n", RNA_property_animateable(&ptr, prop)); } - /* send updates */ - ED_anim_dag_flush_update(C); - - if (mode == 0) /* for now, only send ND_KEYS for KeyingSets */ + if (success) { + /* send updates */ + ED_anim_dag_flush_update(C); + + /* for now, only send ND_KEYS for KeyingSets */ WM_event_add_notifier(C, ND_KEYS, NULL); - else if (mode == 4) /* material color requires different notifiers */ - WM_event_add_notifier(C, NC_MATERIAL|ND_KEYS, NULL); - else - WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, NULL); + } - return OPERATOR_FINISHED; + return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED; } -void ANIM_OT_insert_keyframe_old (wmOperatorType *ot) +void ANIM_OT_insert_keyframe_button (wmOperatorType *ot) { - PropertyRNA *prop; - /* identifiers */ ot->name= "Insert Keyframe"; - ot->idname= "ANIM_OT_insert_keyframe_old"; + ot->idname= "ANIM_OT_insert_keyframe_button"; /* callbacks */ - ot->invoke= insert_key_old_invoke; - ot->exec= insert_key_old_exec; - ot->poll= ED_operator_areaactive; + ot->exec= insert_key_button_exec; + ot->poll= modify_key_op_poll; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - + /* properties */ - // XXX update this for the latest RNA stuff styles... - prop= RNA_def_property(ot->srna, "type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, prop_insertkey_types); + RNA_def_boolean(ot->srna, "all", 1, "All", "Insert a keyframe for all element of the array."); } -/* Delete Key Operator ------------------------ */ +/* Delete Key Button Operator ------------------------ */ -/* XXX WARNING: - * This is currently just a basic operator, which work in 3d-view context on objects only. - * -- Joshua Leung, Jan 2009 - */ - -static int delete_key_old_exec (bContext *C, wmOperator *op) +static int delete_key_button_exec (bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); + PointerRNA ptr; + PropertyRNA *prop= NULL; + char *path; float cfra= (float)CFRA; // XXX for now, don't bother about all the yucky offset crap + short success= 0; + int a, index, length, all= RNA_boolean_get(op->ptr, "all"); - // XXX more comprehensive tests will be needed - CTX_DATA_BEGIN(C, Base*, base, selected_bases) - { - Object *ob= base->object; - ID *id= (ID *)ob; - FCurve *fcu, *fcn; - short success= 0; + /* try to insert keyframe using property retrieved from UI */ + memset(&ptr, 0, sizeof(PointerRNA)); + uiAnimContextProperty(C, &ptr, &prop, &index); + + if (ptr.data && prop) { + path= RNA_path_from_ID_to_property(&ptr, prop); - /* loop through all curves in animdata and delete keys on this frame */ - if (ob->adt) { - AnimData *adt= ob->adt; - bAction *act= adt->action; - - for (fcu= act->curves.first; fcu; fcu= fcn) { - fcn= fcu->next; - success+= deletekey(id, NULL, fcu->rna_path, fcu->array_index, cfra, 0); + if (path) { + if (all) { + length= RNA_property_array_length(prop); + + if(length) index= 0; + else length= 1; } + else + length= 1; + + for (a=0; a<length; a++) + success+= delete_keyframe(ptr.id.data, NULL, NULL, path, index+a, cfra, 0); + + MEM_freeN(path); } - - printf("Ob '%s' - Successfully removed %d keyframes \n", id->name+2, success); - - ob->recalc |= OB_RECALC_OB; + else if (G.f & G_DEBUG) + printf("Button Delete-Key: no path to property \n"); + } + else if (G.f & G_DEBUG) { + printf("ptr.data = %p, prop = %p \n", ptr.data, prop); } - CTX_DATA_END; - /* send updates */ - ED_anim_dag_flush_update(C); - // XXX what if it was a material keyframe? - WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, NULL); + if(success) { + /* send updates */ + ED_anim_dag_flush_update(C); + + /* for now, only send ND_KEYS for KeyingSets */ + WM_event_add_notifier(C, ND_KEYS, NULL); + } - return OPERATOR_FINISHED; + return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED; } -void ANIM_OT_delete_keyframe_old (wmOperatorType *ot) +void ANIM_OT_delete_keyframe_button (wmOperatorType *ot) { /* identifiers */ ot->name= "Delete Keyframe"; - ot->idname= "ANIM_OT_delete_keyframe_old"; + ot->idname= "ANIM_OT_delete_keyframe_button"; /* callbacks */ - ot->invoke= WM_operator_confirm; // XXX we will need our own one eventually, to cope with the dynamic menus... - ot->exec= delete_key_old_exec; - - ot->poll= ED_operator_areaactive; + ot->exec= delete_key_button_exec; + ot->poll= modify_key_op_poll; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_boolean(ot->srna, "all", 1, "All", "Delete keyfames from all elements of the array."); } /* ******************************************* */ @@ -2291,7 +1340,7 @@ void ANIM_OT_delete_keyframe_old (wmOperatorType *ot) /* --------------- API/Per-Datablock Handling ------------------- */ -/* Checks whether an IPO-block has a keyframe for a given frame +/* Checks whether an Action has a keyframe for a given frame * Since we're only concerned whether a keyframe exists, we can simply loop until a match is found... */ short action_frame_has_keyframe (bAction *act, float frame, short filter) diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c new file mode 100644 index 00000000000..0f5cef51bdb --- /dev/null +++ b/source/blender/editors/animation/keyingsets.c @@ -0,0 +1,1178 @@ +/* Testing code for 2.5 animation system + * Copyright 2009, Joshua Leung + */ + +#include <stdio.h> +#include <stddef.h> +#include <string.h> +#include <math.h> +#include <float.h> + +#include "MEM_guardedalloc.h" + +#include "BLI_blenlib.h" +#include "BLI_arithb.h" +#include "BLI_dynstr.h" + +#include "DNA_anim_types.h" +#include "DNA_action_types.h" +#include "DNA_armature_types.h" +#include "DNA_constraint_types.h" +#include "DNA_key_types.h" +#include "DNA_object_types.h" +#include "DNA_material_types.h" +#include "DNA_scene_types.h" +#include "DNA_userdef_types.h" +#include "DNA_windowmanager_types.h" + +#include "BKE_animsys.h" +#include "BKE_action.h" +#include "BKE_constraint.h" +#include "BKE_fcurve.h" +#include "BKE_utildefines.h" +#include "BKE_context.h" +#include "BKE_report.h" +#include "BKE_key.h" +#include "BKE_material.h" + +#include "ED_anim_api.h" +#include "ED_keyframing.h" +#include "ED_keyframes_edit.h" +#include "ED_screen.h" +#include "ED_util.h" + +#include "UI_interface.h" + +#include "WM_api.h" +#include "WM_types.h" + +#include "RNA_access.h" +#include "RNA_define.h" +#include "RNA_types.h" + +#include "anim_intern.h" + +/* ************************************************** */ +/* KEYING SETS - EDITING API */ + +/* Operators ------------------------------------------- */ + +/* These operators are only provided for scripting/macro usage, not for direct + * calling from the UI since they wrap some of the data-access API code for these + * (defined in blenkernel) which have quite a few properties. + */ + +/* ----- */ + +static int keyingset_add_destination_exec (bContext *C, wmOperator *op) +{ + PointerRNA ptr; + KeyingSet *ks= NULL; + ID *id= NULL; + char rna_path[256], group_name[64]; // xxx + short groupmode=0, flag=0; + int array_index=0; + + /* get settings from operator properties */ + ptr = RNA_pointer_get(op->ptr, "keyingset"); + if (ptr.data) + ks= (KeyingSet *)ptr.data; + + ptr = RNA_pointer_get(op->ptr, "id"); + if (ptr.data) + id= (ID *)ptr.data; + + groupmode= RNA_enum_get(op->ptr, "grouping_method"); + RNA_string_get(op->ptr, "group_name", group_name); + + RNA_string_get(op->ptr, "rna_path", rna_path); + array_index= RNA_int_get(op->ptr, "array_index"); + + if (RNA_boolean_get(op->ptr, "entire_array")) + flag |= KSP_FLAG_WHOLE_ARRAY; + + /* if enough args are provided, call API method */ + if (ks) { + BKE_keyingset_add_destination(ks, id, group_name, rna_path, array_index, flag, groupmode); + return OPERATOR_FINISHED; + } + else { + BKE_report(op->reports, RPT_ERROR, "Keying Set could not be added."); + return OPERATOR_CANCELLED; + } +} + +void ANIM_OT_keyingset_add_destination (wmOperatorType *ot) +{ + // XXX: this is also defined in rna_animation.c + static EnumPropertyItem prop_mode_grouping_items[] = { + {KSP_GROUP_NAMED, "NAMED", "Named Group", ""}, + {KSP_GROUP_NONE, "NONE", "None", ""}, + {KSP_GROUP_KSNAME, "KEYINGSET", "Keying Set Name", ""}, + {0, NULL, NULL, NULL}}; + + /* identifiers */ + ot->name= "Add Keying Set Destination"; + ot->idname= "ANIM_OT_keyingset_add_destination"; + + /* callbacks */ + ot->exec= keyingset_add_destination_exec; + ot->poll= ED_operator_scene_editable; + + /* props */ + /* pointers */ // xxx - do we want to directly expose these? + RNA_def_pointer_runtime(ot->srna, "keyingset", &RNA_KeyingSet, "Keying Set", "Keying Set to add destination to."); + RNA_def_pointer_runtime(ot->srna, "id", &RNA_ID, "ID", "ID-block for the destination."); + /* grouping */ + RNA_def_enum(ot->srna, "grouping_method", prop_mode_grouping_items, KSP_GROUP_NAMED, "Grouping Method", "Method used to define which Group-name to use."); + RNA_def_string(ot->srna, "group_name", "", 64, "Group Name", "Name of Action Group to assign destination to (only if grouping mode is to use this name)."); + /* rna-path */ + RNA_def_string(ot->srna, "rna_path", "", 256, "RNA-Path", "RNA-Path to destination property."); // xxx hopefully this is long enough + RNA_def_int(ot->srna, "array_index", 0, 0, INT_MAX, "Array Index", "If applicable, the index ", 0, INT_MAX); + /* flags */ + RNA_def_boolean(ot->srna, "entire_array", 1, "Entire Array", "hen an 'array/vector' type is chosen (Location, Rotation, Color, etc.), entire array is to be used."); + +} + +/* ----- */ + +static int keyingset_add_new_exec (bContext *C, wmOperator *op) +{ + Scene *sce= CTX_data_scene(C); + KeyingSet *ks= NULL; + short flag=0, keyingflag=0; + char name[64]; + + /* get settings from operator properties */ + RNA_string_get(op->ptr, "name", name); + + if (RNA_boolean_get(op->ptr, "absolute")) + flag |= KEYINGSET_ABSOLUTE; + if (RNA_boolean_get(op->ptr, "insertkey_needed")) + keyingflag |= INSERTKEY_NEEDED; + if (RNA_boolean_get(op->ptr, "insertkey_visual")) + keyingflag |= INSERTKEY_MATRIX; + + /* call the API func, and set the active keyingset index */ + ks= BKE_keyingset_add(&sce->keyingsets, name, flag, keyingflag); + + if (ks) { + sce->active_keyingset= BLI_countlist(&sce->keyingsets); + return OPERATOR_FINISHED; + } + else { + BKE_report(op->reports, RPT_ERROR, "Keying Set could not be added."); + return OPERATOR_CANCELLED; + } +} + +void ANIM_OT_keyingset_add_new (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Add Keying Set"; + ot->idname= "ANIM_OT_keyingset_add_new"; + + /* callbacks */ + ot->exec= keyingset_add_new_exec; + ot->poll= ED_operator_scene_editable; + + /* props */ + /* name */ + RNA_def_string(ot->srna, "name", "KeyingSet", 64, "Name", "Name of Keying Set"); + /* flags */ + RNA_def_boolean(ot->srna, "absolute", 1, "Absolute", "Keying Set defines specific paths/settings to be keyframed (i.e. is not reliant on context info)"); + /* keying flags */ + RNA_def_boolean(ot->srna, "insertkey_needed", 0, "Insert Keyframes - Only Needed", "Only insert keyframes where they're needed in the relevant F-Curves."); + RNA_def_boolean(ot->srna, "insertkey_visual", 0, "Insert Keyframes - Visual", "Insert keyframes based on 'visual transforms'."); +} + +/* UI API --------------------------------------------- */ + +/* Build menu-string of available keying-sets (allocates memory for string) + * NOTE: mode must not be longer than 64 chars + */ +char *ANIM_build_keyingsets_menu (ListBase *list, short for_edit) +{ + DynStr *pupds= BLI_dynstr_new(); + KeyingSet *ks; + char buf[64]; + char *str; + int i; + + /* add title first */ + BLI_dynstr_append(pupds, "Keying Sets%t|"); + + /* add dummy entries for none-active */ + if (for_edit) { + BLI_dynstr_append(pupds, "Add New%x-1|"); + BLI_dynstr_append(pupds, " %x0|"); + } + else + BLI_dynstr_append(pupds, "<No Keying Set Active>%x0|"); + + /* loop through keyingsets, adding them */ + for (ks=list->first, i=1; ks; ks=ks->next, i++) { + if (for_edit == 0) + BLI_dynstr_append(pupds, "KS: "); + + BLI_dynstr_append(pupds, ks->name); + BLI_snprintf( buf, 64, "%%x%d%s", i, ((ks->next)?"|":"") ); + BLI_dynstr_append(pupds, buf); + } + + /* convert to normal MEM_malloc'd string */ + str= BLI_dynstr_get_cstring(pupds); + BLI_dynstr_free(pupds); + + return str; +} + + +/* ******************************************* */ +/* KEYING SETS - BUILTIN */ + +#if 0 // XXX old keyingsets code based on adrcodes... to be restored in due course + +/* ------------- KeyingSet Defines ------------ */ +/* Note: these must all be named with the defks_* prefix, otherwise the template macro will not work! */ + +/* macro for defining keyingset contexts */ +#define KSC_TEMPLATE(ctx_name) {&defks_##ctx_name[0], NULL, sizeof(defks_##ctx_name)/sizeof(bKeyingSet)} + +/* --- */ + +/* check if option not available for deleting keys */ +static short incl_non_del_keys (bKeyingSet *ks, const char mode[]) +{ + /* as optimisation, assume that it is sufficient to check only first letter + * of mode (int comparison should be faster than string!) + */ + //if (strcmp(mode, "Delete")==0) + if (mode && mode[0]=='D') + return 0; + + return 1; +} + +/* Object KeyingSets ------ */ + +/* check if include shapekey entry */ +static short incl_v3d_ob_shapekey (bKeyingSet *ks, const char mode[]) +{ + //Object *ob= (G.obedit)? (G.obedit) : (OBACT); // XXX + Object *ob= NULL; + char *newname= NULL; + + if(ob==NULL) + return 0; + + /* not available for delete mode */ + if (strcmp(mode, "Delete")==0) + return 0; + + /* check if is geom object that can get shapekeys */ + switch (ob->type) { + /* geometry? */ + case OB_MESH: newname= "Mesh"; break; + case OB_CURVE: newname= "Curve"; break; + case OB_SURF: newname= "Surface"; break; + case OB_LATTICE: newname= "Lattice"; break; + + /* not geometry! */ + default: + return 0; + } + + /* if ks is shapekey entry (this could be callled for separator before too!) */ + if (ks->flag == -3) + BLI_strncpy(ks->name, newname, sizeof(ks->name)); + + /* if it gets here, it's ok */ + return 1; +} + +/* array for object keyingset defines */ +bKeyingSet defks_v3d_object[] = +{ + /* include_cb, adrcode-getter, name, blocktype, flag, chan_num, adrcodes */ + {NULL, "Loc", ID_OB, 0, 3, {OB_LOC_X,OB_LOC_Y,OB_LOC_Z}}, + {NULL, "Rot", ID_OB, 0, 3, {OB_ROT_X,OB_ROT_Y,OB_ROT_Z}}, + {NULL, "Scale", ID_OB, 0, 3, {OB_SIZE_X,OB_SIZE_Y,OB_SIZE_Z}}, + + {NULL, "%l", 0, -1, 0, {0}}, // separator + + {NULL, "LocRot", ID_OB, 0, 6, + {OB_LOC_X,OB_LOC_Y,OB_LOC_Z, + OB_ROT_X,OB_ROT_Y,OB_ROT_Z}}, + + {NULL, "LocScale", ID_OB, 0, 6, + {OB_LOC_X,OB_LOC_Y,OB_LOC_Z, + OB_SIZE_X,OB_SIZE_Y,OB_SIZE_Z}}, + + {NULL, "LocRotScale", ID_OB, 0, 9, + {OB_LOC_X,OB_LOC_Y,OB_LOC_Z, + OB_ROT_X,OB_ROT_Y,OB_ROT_Z, + OB_SIZE_X,OB_SIZE_Y,OB_SIZE_Z}}, + + {NULL, "RotScale", ID_OB, 0, 6, + {OB_ROT_X,OB_ROT_Y,OB_ROT_Z, + OB_SIZE_X,OB_SIZE_Y,OB_SIZE_Z}}, + + {incl_non_del_keys, "%l", 0, -1, 0, {0}}, // separator + + {incl_non_del_keys, "VisualLoc", ID_OB, INSERTKEY_MATRIX, 3, {OB_LOC_X,OB_LOC_Y,OB_LOC_Z}}, + {incl_non_del_keys, "VisualRot", ID_OB, INSERTKEY_MATRIX, 3, {OB_ROT_X,OB_ROT_Y,OB_ROT_Z}}, + + {incl_non_del_keys, "VisualLocRot", ID_OB, INSERTKEY_MATRIX, 6, + {OB_LOC_X,OB_LOC_Y,OB_LOC_Z, + OB_ROT_X,OB_ROT_Y,OB_ROT_Z}}, + + {NULL, "%l", 0, -1, 0, {0}}, // separator + + {NULL, "Layer", ID_OB, 0, 1, {OB_LAY}}, // icky option... + {NULL, "Available", ID_OB, -2, 0, {0}}, + + {incl_v3d_ob_shapekey, "%l%l", 0, -1, 0, {0}}, // separator (linked to shapekey entry) + {incl_v3d_ob_shapekey, "<ShapeKey>", ID_OB, -3, 0, {0}} +}; + +/* PoseChannel KeyingSets ------ */ + +/* array for posechannel keyingset defines */ +bKeyingSet defks_v3d_pchan[] = +{ + /* include_cb, name, blocktype, flag, chan_num, adrcodes */ + {NULL, "Loc", ID_PO, 0, 3, {AC_LOC_X,AC_LOC_Y,AC_LOC_Z}}, + {NULL, "Rot", ID_PO, COMMONKEY_PCHANROT, 1, {KAG_CHAN_EXTEND}}, + {NULL, "Scale", ID_PO, 0, 3, {AC_SIZE_X,AC_SIZE_Y,AC_SIZE_Z}}, + + {NULL, "%l", 0, -1, 0, {0}}, // separator + + {NULL, "LocRot", ID_PO, COMMONKEY_PCHANROT, 4, + {AC_LOC_X,AC_LOC_Y,AC_LOC_Z, + KAG_CHAN_EXTEND}}, + + {NULL, "LocScale", ID_PO, 0, 6, + {AC_LOC_X,AC_LOC_Y,AC_LOC_Z, + AC_SIZE_X,AC_SIZE_Y,AC_SIZE_Z}}, + + {NULL, "LocRotScale", ID_PO, COMMONKEY_PCHANROT, 7, + {AC_LOC_X,AC_LOC_Y,AC_LOC_Z,AC_SIZE_X,AC_SIZE_Y,AC_SIZE_Z, + KAG_CHAN_EXTEND}}, + + {NULL, "RotScale", ID_PO, 0, 4, + {AC_SIZE_X,AC_SIZE_Y,AC_SIZE_Z, + KAG_CHAN_EXTEND}}, + + {incl_non_del_keys, "%l", 0, -1, 0, {0}}, // separator + + {incl_non_del_keys, "VisualLoc", ID_PO, INSERTKEY_MATRIX, 3, {AC_LOC_X,AC_LOC_Y,AC_LOC_Z}}, + {incl_non_del_keys, "VisualRot", ID_PO, INSERTKEY_MATRIX|COMMONKEY_PCHANROT, 1, {KAG_CHAN_EXTEND}}, + + {incl_non_del_keys, "VisualLocRot", ID_PO, INSERTKEY_MATRIX|COMMONKEY_PCHANROT, 4, + {AC_LOC_X,AC_LOC_Y,AC_LOC_Z, KAG_CHAN_EXTEND}}, + + {NULL, "%l", 0, -1, 0, {0}}, // separator + + {NULL, "Available", ID_PO, -2, 0, {0}} +}; + +/* Material KeyingSets ------ */ + +/* array for material keyingset defines */ +bKeyingSet defks_buts_shading_mat[] = +{ + /* include_cb, name, blocktype, flag, chan_num, adrcodes */ + {NULL, "RGB", ID_MA, 0, 3, {MA_COL_R,MA_COL_G,MA_COL_B}}, + {NULL, "Alpha", ID_MA, 0, 1, {MA_ALPHA}}, + {NULL, "Halo Size", ID_MA, 0, 1, {MA_HASIZE}}, + {NULL, "Mode", ID_MA, 0, 1, {MA_MODE}}, // evil bitflags + + {NULL, "%l", 0, -1, 0, {0}}, // separator + + {NULL, "All Color", ID_MA, 0, 18, + {MA_COL_R,MA_COL_G,MA_COL_B, + MA_ALPHA,MA_HASIZE, MA_MODE, + MA_SPEC_R,MA_SPEC_G,MA_SPEC_B, + MA_REF,MA_EMIT,MA_AMB,MA_SPEC,MA_HARD, + MA_MODE,MA_TRANSLU,MA_ADD}}, + + {NULL, "All Mirror", ID_MA, 0, 5, + {MA_RAYM,MA_FRESMIR,MA_FRESMIRI, + MA_FRESTRA,MA_FRESTRAI}}, + + {NULL, "%l", 0, -1, 0, {0}}, // separator + + {NULL, "Ofs", ID_MA, COMMONKEY_ADDMAP, 3, {MAP_OFS_X,MAP_OFS_Y,MAP_OFS_Z}}, + {NULL, "Size", ID_MA, COMMONKEY_ADDMAP, 3, {MAP_SIZE_X,MAP_SIZE_Y,MAP_SIZE_Z}}, + + {NULL, "All Mapping", ID_MA, COMMONKEY_ADDMAP, 14, + {MAP_OFS_X,MAP_OFS_Y,MAP_OFS_Z, + MAP_SIZE_X,MAP_SIZE_Y,MAP_SIZE_Z, + MAP_R,MAP_G,MAP_B,MAP_DVAR, + MAP_COLF,MAP_NORF,MAP_VARF,MAP_DISP}}, + + {NULL, "%l", 0, -1, 0, {0}}, // separator + + {NULL, "Available", ID_MA, -2, 0, {0}} +}; + +/* World KeyingSets ------ */ + +/* array for world keyingset defines */ +bKeyingSet defks_buts_shading_wo[] = +{ + /* include_cb, name, blocktype, flag, chan_num, adrcodes */ + {NULL, "Zenith RGB", ID_WO, 0, 3, {WO_ZEN_R,WO_ZEN_G,WO_ZEN_B}}, + {NULL, "Horizon RGB", ID_WO, 0, 3, {WO_HOR_R,WO_HOR_G,WO_HOR_B}}, + + {NULL, "%l", 0, -1, 0, {0}}, // separator + + {NULL, "Mist", ID_WO, 0, 4, {WO_MISI,WO_MISTDI,WO_MISTSTA,WO_MISTHI}}, + {NULL, "Stars", ID_WO, 0, 5, {WO_STAR_R,WO_STAR_G,WO_STAR_B,WO_STARDIST,WO_STARSIZE}}, + + + {NULL, "%l", 0, -1, 0, {0}}, // separator + + {NULL, "Ofs", ID_WO, COMMONKEY_ADDMAP, 3, {MAP_OFS_X,MAP_OFS_Y,MAP_OFS_Z}}, + {NULL, "Size", ID_WO, COMMONKEY_ADDMAP, 3, {MAP_SIZE_X,MAP_SIZE_Y,MAP_SIZE_Z}}, + + {NULL, "All Mapping", ID_WO, COMMONKEY_ADDMAP, 14, + {MAP_OFS_X,MAP_OFS_Y,MAP_OFS_Z, + MAP_SIZE_X,MAP_SIZE_Y,MAP_SIZE_Z, + MAP_R,MAP_G,MAP_B,MAP_DVAR, + MAP_COLF,MAP_NORF,MAP_VARF,MAP_DISP}}, + + {NULL, "%l", 0, -1, 0, {0}}, // separator + + {NULL, "Available", ID_WO, -2, 0, {0}} +}; + +/* Lamp KeyingSets ------ */ + +/* array for lamp keyingset defines */ +bKeyingSet defks_buts_shading_la[] = +{ + /* include_cb, name, blocktype, flag, chan_num, adrcodes */ + {NULL, "RGB", ID_LA, 0, 3, {LA_COL_R,LA_COL_G,LA_COL_B}}, + {NULL, "Energy", ID_LA, 0, 1, {LA_ENERGY}}, + {NULL, "Spot Size", ID_LA, 0, 1, {LA_SPOTSI}}, + + {NULL, "%l", 0, -1, 0, {0}}, // separator + + {NULL, "Ofs", ID_LA, COMMONKEY_ADDMAP, 3, {MAP_OFS_X,MAP_OFS_Y,MAP_OFS_Z}}, + {NULL, "Size", ID_LA, COMMONKEY_ADDMAP, 3, {MAP_SIZE_X,MAP_SIZE_Y,MAP_SIZE_Z}}, + + {NULL, "All Mapping", ID_LA, COMMONKEY_ADDMAP, 14, + {MAP_OFS_X,MAP_OFS_Y,MAP_OFS_Z, + MAP_SIZE_X,MAP_SIZE_Y,MAP_SIZE_Z, + MAP_R,MAP_G,MAP_B,MAP_DVAR, + MAP_COLF,MAP_NORF,MAP_VARF,MAP_DISP}}, + + {NULL, "%l", 0, -1, 0, {0}}, // separator + + {NULL, "Available", ID_LA, -2, 0, {0}} +}; + +/* Texture KeyingSets ------ */ + +/* array for texture keyingset defines */ +bKeyingSet defks_buts_shading_tex[] = +{ + /* include_cb, name, blocktype, flag, chan_num, adrcodes */ + {NULL, "Clouds", ID_TE, 0, 5, + {TE_NSIZE,TE_NDEPTH,TE_NTYPE, + TE_MG_TYP,TE_N_BAS1}}, + + {NULL, "Marble", ID_TE, 0, 7, + {TE_NSIZE,TE_NDEPTH,TE_NTYPE, + TE_TURB,TE_MG_TYP,TE_N_BAS1,TE_N_BAS2}}, + + {NULL, "Stucci", ID_TE, 0, 5, + {TE_NSIZE,TE_NTYPE,TE_TURB, + TE_MG_TYP,TE_N_BAS1}}, + + {NULL, "Wood", ID_TE, 0, 6, + {TE_NSIZE,TE_NTYPE,TE_TURB, + TE_MG_TYP,TE_N_BAS1,TE_N_BAS2}}, + + {NULL, "Magic", ID_TE, 0, 2, {TE_NDEPTH,TE_TURB}}, + + {NULL, "Blend", ID_TE, 0, 1, {TE_MG_TYP}}, + + {NULL, "Musgrave", ID_TE, 0, 6, + {TE_MG_TYP,TE_MGH,TE_MG_LAC, + TE_MG_OCT,TE_MG_OFF,TE_MG_GAIN}}, + + {NULL, "Voronoi", ID_TE, 0, 9, + {TE_VNW1,TE_VNW2,TE_VNW3,TE_VNW4, + TE_VNMEXP,TE_VN_DISTM,TE_VN_COLT, + TE_ISCA,TE_NSIZE}}, + + {NULL, "Distorted Noise", ID_TE, 0, 4, + {TE_MG_OCT,TE_MG_OFF,TE_MG_GAIN,TE_DISTA}}, + + {NULL, "Color Filter", ID_TE, 0, 5, + {TE_COL_R,TE_COL_G,TE_COL_B,TE_BRIGHT,TE_CONTRA}}, + + {NULL, "%l", 0, -1, 0, {0}}, // separator + + {NULL, "Available", ID_TE, -2, 0, {0}} +}; + +/* Object Buttons KeyingSets ------ */ + +/* check if include particles entry */ +static short incl_buts_ob (bKeyingSet *ks, const char mode[]) +{ + //Object *ob= OBACT; // xxx + Object *ob= NULL; + /* only if object is mesh type */ + + if(ob==NULL) return 0; + return (ob->type == OB_MESH); +} + +/* array for texture keyingset defines */ +bKeyingSet defks_buts_object[] = +{ + /* include_cb, name, blocktype, flag, chan_num, adrcodes */ + {incl_buts_ob, "Surface Damping", ID_OB, 0, 1, {OB_PD_SDAMP}}, + {incl_buts_ob, "Random Damping", ID_OB, 0, 1, {OB_PD_RDAMP}}, + {incl_buts_ob, "Permeability", ID_OB, 0, 1, {OB_PD_PERM}}, + + {NULL, "%l", 0, -1, 0, {0}}, // separator + + {NULL, "Force Strength", ID_OB, 0, 1, {OB_PD_FSTR}}, + {NULL, "Force Falloff", ID_OB, 0, 1, {OB_PD_FFALL}}, + + {NULL, "%l", 0, -1, 0, {0}}, // separator + + {NULL, "Available", ID_OB, -2, 0, {0}} // this will include ob-transforms too! +}; + +/* Camera Buttons KeyingSets ------ */ + +/* check if include internal-renderer entry */ +static short incl_buts_cam1 (bKeyingSet *ks, const char mode[]) +{ + Scene *scene= NULL; // FIXME this will cause a crash, but we need an extra arg first! + /* only if renderer is internal renderer */ + return (scene->r.renderer==R_INTERN); +} + +/* check if include external-renderer entry */ +static short incl_buts_cam2 (bKeyingSet *ks, const char mode[]) +{ + Scene *scene= NULL; // FIXME this will cause a crash, but we need an extra arg first! + /* only if renderer is internal renderer */ + return (scene->r.renderer!=R_INTERN); +} + +/* array for camera keyingset defines */ +bKeyingSet defks_buts_cam[] = +{ + /* include_cb, name, blocktype, flag, chan_num, adrcodes */ + {NULL, "Lens", ID_CA, 0, 1, {CAM_LENS}}, + {NULL, "Clipping", ID_CA, 0, 2, {CAM_STA,CAM_END}}, + {NULL, "Focal Distance", ID_CA, 0, 1, {CAM_YF_FDIST}}, + + {NULL, "%l", 0, -1, 0, {0}}, // separator + + + {incl_buts_cam2, "Aperture", ID_CA, 0, 1, {CAM_YF_APERT}}, + {incl_buts_cam1, "Viewplane Shift", ID_CA, 0, 2, {CAM_SHIFT_X,CAM_SHIFT_Y}}, + + {NULL, "%l", 0, -1, 0, {0}}, // separator + + {NULL, "Available", ID_CA, -2, 0, {0}} +}; + +/* --- */ + +/* Keying Context Defines - Must keep in sync with enumeration (eKS_Contexts) */ +bKeyingContext ks_contexts[] = +{ + KSC_TEMPLATE(v3d_object), + KSC_TEMPLATE(v3d_pchan), + + KSC_TEMPLATE(buts_shading_mat), + KSC_TEMPLATE(buts_shading_wo), + KSC_TEMPLATE(buts_shading_la), + KSC_TEMPLATE(buts_shading_tex), + + KSC_TEMPLATE(buts_object), + KSC_TEMPLATE(buts_cam) +}; + +/* Keying Context Enumeration - Must keep in sync with definitions*/ +typedef enum eKS_Contexts { + KSC_V3D_OBJECT = 0, + KSC_V3D_PCHAN, + + KSC_BUTS_MAT, + KSC_BUTS_WO, + KSC_BUTS_LA, + KSC_BUTS_TEX, + + KSC_BUTS_OB, + KSC_BUTS_CAM, + + /* make sure this last one remains untouched! */ + KSC_TOT_TYPES +} eKS_Contexts; + + +#endif // XXX old keyingsets code based on adrcodes... to be restored in due course + +/* Macros for Declaring KeyingSets ------------------- */ + +/* A note about this system for declaring built-in Keying Sets: + * One may ask, "What is the purpose of all of these macros and static arrays?" and + * "Why not call the KeyingSets API defined in BKE_animsys.h?". The answer is two-fold. + * + * 1) Firstly, we use static arrays of struct definitions instead of function calls, as + * it reduces the start-up overhead and allocated-memory footprint of Blender. If we called + * the KeyingSets API to build these sets, the overhead of checking for unique names, allocating + * memory for each and every path and KeyingSet, scattered around in RAM, all of which would increase + * the startup time (which is totally unacceptable) and could lead to fragmentation+slower access times. + * 2) Since we aren't using function calls, we need a nice way of defining these KeyingSets in a way which + * is easily readable and less prone to breakage from changes to the underlying struct definitions. Further, + * adding additional entries SHOULD NOT require custom code to be written to access these new entries/sets. + * Therefore, here we have a system with nice, human-readable statements via macros, and static arrays which + * are linked together using more special macros + struct definitions, allowing for such a generic + simple + * initialisation function (init_builtin_keyingsets()) compared with that of something like the Nodes system. + * + * -- Joshua Leung, April 2009 + */ + +/* Struct type for declaring builtin KeyingSets in as entries in static arrays*/ +typedef struct bBuiltinKeyingSet { + KeyingSet ks; /* the KeyingSet to build */ + int tot; /* the total number of paths defined */ + KS_Path paths[64]; /* the paths for the KeyingSet to use */ +} bBuiltinKeyingSet; + + /* WARNING: the following macros must be kept in sync with the + * struct definitions in DNA_anim_types.h! + */ + +/* macro for defining a builtin KeyingSet */ +#define BI_KS_DEFINE_BEGIN(name, keyingflag) \ + {{NULL, NULL, {NULL, NULL}, name, KEYINGSET_BUILTIN, keyingflag}, + +/* macro to finish defining a builtin KeyingSet */ +#define BI_KS_DEFINE_END \ + } + +/* macro to start defining paths for a builtin KeyingSet */ +#define BI_KS_PATHS_BEGIN(tot) \ + tot, { + +/* macro to finish defining paths for a builtin KeyingSet */ +#define BI_KS_PATHS_END \ + } + +/* macro for defining a builtin KeyingSet's path */ +#define BI_KSP_DEFINE(id_type, templates, prop_path, array_index, flag, groupflag) \ + {NULL, NULL, NULL, "", id_type, templates, prop_path, array_index, flag, groupflag} + +/* macro for defining a builtin KeyingSet with no paths (use in place of BI_KS_PAHTS_BEGIN/END block) */ +#define BI_KS_PATHS_NONE \ + 0, {0} + +/* ---- */ + +/* Struct type for finding all the arrays of builtin KeyingSets */ +typedef struct bBuiltinKSContext { + bBuiltinKeyingSet *bks; /* array of KeyingSet definitions */ + int tot; /* number of KeyingSets in this array */ +} bBuiltinKSContext; + +/* macro for defining builtin KeyingSet sets + * NOTE: all the arrays of sets must follow this naming convention! + */ +#define BKSC_TEMPLATE(ctx_name) {&def_builtin_keyingsets_##ctx_name[0], sizeof(def_builtin_keyingsets_##ctx_name)/sizeof(bBuiltinKeyingSet)} + + +/* 3D-View Builtin KeyingSets ------------------------ */ + +static bBuiltinKeyingSet def_builtin_keyingsets_v3d[] = +{ + /* Simple Keying Sets ************************************* */ + /* Keying Set - "Location" ---------- */ + BI_KS_DEFINE_BEGIN("Location", 0) + BI_KS_PATHS_BEGIN(1) + BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "location", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM) + BI_KS_PATHS_END + BI_KS_DEFINE_END, + + /* Keying Set - "Rotation" ---------- */ + BI_KS_DEFINE_BEGIN("Rotation", 0) + BI_KS_PATHS_BEGIN(1) + BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM) + BI_KS_PATHS_END + BI_KS_DEFINE_END, + + /* Keying Set - "Scaling" ---------- */ + BI_KS_DEFINE_BEGIN("Scaling", 0) + BI_KS_PATHS_BEGIN(1) + BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "scale", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM) + BI_KS_PATHS_END + BI_KS_DEFINE_END, + + /* Compound Keying Sets *********************************** */ + /* Keying Set - "LocRot" ---------- */ + BI_KS_DEFINE_BEGIN("LocRot", 0) + BI_KS_PATHS_BEGIN(2) + BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "location", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM), + BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM) + BI_KS_PATHS_END + BI_KS_DEFINE_END, + + /* Keying Set - "LocRotScale" ---------- */ + BI_KS_DEFINE_BEGIN("LocRotScale", 0) + BI_KS_PATHS_BEGIN(3) + BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "location", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM), + BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM), + BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "scale", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM) + BI_KS_PATHS_END + BI_KS_DEFINE_END, + + /* Keying Sets with Keying Flags ************************* */ + /* Keying Set - "VisualLoc" ---------- */ + BI_KS_DEFINE_BEGIN("VisualLoc", 0) + BI_KS_PATHS_BEGIN(1) + BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "location", INSERTKEY_MATRIX, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM) + BI_KS_PATHS_END + BI_KS_DEFINE_END, + + /* Keying Set - "Rotation" ---------- */ + BI_KS_DEFINE_BEGIN("VisualRot", 0) + BI_KS_PATHS_BEGIN(1) + BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "rotation", INSERTKEY_MATRIX, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM) + BI_KS_PATHS_END + BI_KS_DEFINE_END, + + /* Keying Set - "VisualLocRot" ---------- */ + BI_KS_DEFINE_BEGIN("VisualLocRot", 0) + BI_KS_PATHS_BEGIN(2) + BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "location", INSERTKEY_MATRIX, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM), + BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "rotation", INSERTKEY_MATRIX, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM) + BI_KS_PATHS_END + BI_KS_DEFINE_END +}; + +/* All Builtin KeyingSets ------------------------ */ + +/* total number of builtin KeyingSet contexts */ +#define MAX_BKSC_TYPES 1 + +/* array containing all the available builtin KeyingSets definition sets + * - size of this is MAX_BKSC_TYPES+1 so that we don't smash the stack + */ +static bBuiltinKSContext def_builtin_keyingsets[MAX_BKSC_TYPES+1] = +{ + BKSC_TEMPLATE(v3d) + /* add more contexts above this line... */ +}; + + +/* ListBase of these KeyingSets chained up ready for usage + * NOTE: this is exported to keyframing.c for use... + */ +ListBase builtin_keyingsets = {NULL, NULL}; + +/* Utility API ------------------------ */ + +/* Link up all of the builtin Keying Sets when starting up Blender + * This is called from WM_init() in wm_init_exit.c + */ +void init_builtin_keyingsets (void) +{ + bBuiltinKSContext *bksc; + bBuiltinKeyingSet *bks; + int bksc_i, bks_i; + + /* loop over all the sets of KeyingSets, setting them up, and chaining them to the builtins list */ + for (bksc_i= 0, bksc= &def_builtin_keyingsets[0]; bksc_i < MAX_BKSC_TYPES; bksc_i++, bksc++) + { + /* for each set definitions for a builtin KeyingSet, chain the paths to that KeyingSet and add */ + for (bks_i= 0, bks= bksc->bks; bks_i < bksc->tot; bks_i++, bks++) + { + KeyingSet *ks= &bks->ks; + KS_Path *ksp; + int pIndex; + + /* loop over paths, linking them to the KeyingSet and each other */ + for (pIndex= 0, ksp= &bks->paths[0]; pIndex < bks->tot; pIndex++, ksp++) + BLI_addtail(&ks->paths, ksp); + + /* add KeyingSet to builtin sets list */ + BLI_addtail(&builtin_keyingsets, ks); + } + } +} + + +/* Get the first builtin KeyingSet with the given name, which occurs after the given one (or start of list if none given) */ +KeyingSet *ANIM_builtin_keyingset_get_named (KeyingSet *prevKS, char name[]) +{ + KeyingSet *ks, *first=NULL; + + /* sanity checks - any name to check? */ + if (name[0] == 0) + return NULL; + + /* get first KeyingSet to use */ + if (prevKS && prevKS->next) + first= prevKS->next; + else + first= builtin_keyingsets.first; + + /* loop over KeyingSets checking names */ + for (ks= first; ks; ks= ks->next) { + if (strcmp(name, ks->name) == 0) + return ks; + } + + /* no matches found */ + return NULL; +} + +/* ******************************************* */ +/* KEYFRAME MODIFICATION */ + +/* KeyingSet Menu Helpers ------------ */ + +/* Extract the maximum set of requirements from the KeyingSet */ +static int keyingset_relative_get_templates (KeyingSet *ks) +{ + KS_Path *ksp; + int templates= 0; + + /* loop over the paths (could be slow to do for a number of KeyingSets)? */ + for (ksp= ks->paths.first; ksp; ksp= ksp->next) { + /* add the destination's templates to the set of templates required for the set */ + templates |= ksp->templates; + } + + return templates; +} + +/* Check if context data is suitable for the given absolute Keying Set */ +short keyingset_context_ok_poll (bContext *C, KeyingSet *ks) +{ + ScrArea *sa= CTX_wm_area(C); + + /* data retrieved from context depends on active editor */ + if (sa == NULL) return 0; + + switch (sa->spacetype) { + case SPACE_VIEW3D: + { + Object *obact= CTX_data_active_object(C); + + /* if in posemode, check if 'pose-channels' requested for in KeyingSet */ + if ((obact && obact->pose) && (obact->flag & OB_POSEMODE)) { + /* check for posechannels */ + + } + else { + /* check for selected object */ + + } + } + break; + } + + + return 1; +} + +/* KeyingSet Context Operations ------------ */ + +/* Get list of data-sources from context (in 3D-View) for inserting keyframes using the given relative Keying Set */ +static short modifykey_get_context_v3d_data (bContext *C, ListBase *dsources, KeyingSet *ks) +{ + bCommonKeySrc *cks; + Object *obact= CTX_data_active_object(C); + int templates; + short ok= 0; + + /* get the templates in use in this KeyingSet which we should supply data for */ + templates = keyingset_relative_get_templates(ks); + + /* check if the active object is in PoseMode (i.e. only deal with bones) */ + // TODO: check with the templates to see what we really need to store + if ((obact && obact->pose) && (obact->flag & OB_POSEMODE)) { + /* Pose Mode: Selected bones */ +#if 0 + //set_pose_keys(ob); /* sets pchan->flag to POSE_KEY if bone selected, and clears if not */ + + /* loop through posechannels */ + //for (pchan=ob->pose->chanbase.first; pchan; pchan=pchan->next) { + // if (pchan->flag & POSE_KEY) { + // } + //} +#endif + + CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pchans) + { + /* add a new keying-source */ + cks= MEM_callocN(sizeof(bCommonKeySrc), "bCommonKeySrc"); + BLI_addtail(dsources, cks); + + /* set necessary info */ + cks->id= &obact->id; + cks->pchan= pchan; + + if (templates & KSP_TEMPLATE_CONSTRAINT) + cks->con= constraints_get_active(&pchan->constraints); + + ok= 1; + } + CTX_DATA_END; + } + else { + /* Object Mode: Selected objects */ + CTX_DATA_BEGIN(C, Base*, base, selected_bases) + { + Object *ob= base->object; + + /* add a new keying-source */ + cks= MEM_callocN(sizeof(bCommonKeySrc), "bCommonKeySrc"); + BLI_addtail(dsources, cks); + + /* set necessary info */ + cks->id= &ob->id; + + if (templates & KSP_TEMPLATE_CONSTRAINT) + cks->con= constraints_get_active(&ob->constraints); + + ok= 1; + } + CTX_DATA_END; + } + + /* return whether any data was extracted */ + return ok; +} + +/* Get list of data-sources from context for inserting keyframes using the given relative Keying Set */ +short modifykey_get_context_data (bContext *C, ListBase *dsources, KeyingSet *ks) +{ + ScrArea *sa= CTX_wm_area(C); + + /* for now, the active area is used to determine what set of contexts apply */ + if (sa == NULL) + return 0; + + switch (sa->spacetype) { + case SPACE_VIEW3D: /* 3D-View: Selected Objects or Bones */ + return modifykey_get_context_v3d_data(C, dsources, ks); + } + + /* nothing happened */ + return 0; +} + +/* KeyingSet Operations (Insert/Delete Keyframes) ------------ */ + +/* Given a KeyingSet and context info (if required), modify keyframes for the channels specified + * by the KeyingSet. This takes into account many of the different combinations of using KeyingSets. + * Returns the number of channels that keyframes were added to + */ +int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet *ks, short mode, float cfra) +{ + KS_Path *ksp; + int kflag=0, success= 0; + char *groupname= NULL; + + /* get flags to use */ + if (mode == MODIFYKEY_MODE_INSERT) { + /* use KeyingSet's flags as base */ + kflag= ks->keyingflag; + + /* suppliment with info from the context */ + if (IS_AUTOKEY_FLAG(AUTOMATKEY)) kflag |= INSERTKEY_MATRIX; + if (IS_AUTOKEY_FLAG(INSERTNEEDED)) kflag |= INSERTKEY_NEEDED; + // if (IS_AUTOKEY_MODE(EDITKEYS)) flag |= INSERTKEY_REPLACE; + } + else if (mode == MODIFYKEY_MODE_DELETE) + kflag= 0; + + /* check if the KeyingSet is absolute or not (i.e. does it requires sources info) */ + if (ks->flag & KEYINGSET_ABSOLUTE) { + /* Absolute KeyingSets are simpler to use, as all the destination info has already been + * provided by the user, and is stored, ready to use, in the KeyingSet paths. + */ + for (ksp= ks->paths.first; ksp; ksp= ksp->next) { + int arraylen, i; + + /* get pointer to name of group to add channels to */ + if (ksp->groupmode == KSP_GROUP_NONE) + groupname= NULL; + else if (ksp->groupmode == KSP_GROUP_KSNAME) + groupname= ks->name; + else + groupname= ksp->group; + + /* init arraylen and i - arraylen should be greater than i so that + * normal non-array entries get keyframed correctly + */ + i= ksp->array_index; + arraylen= i+1; + + /* get length of array if whole array option is enabled */ + if (ksp->flag & KSP_FLAG_WHOLE_ARRAY) { + PointerRNA id_ptr, ptr; + PropertyRNA *prop; + + RNA_id_pointer_create(ksp->id, &id_ptr); + if (RNA_path_resolve(&id_ptr, ksp->rna_path, &ptr, &prop) && prop) + arraylen= RNA_property_array_length(prop); + } + + /* for each possible index, perform operation + * - assume that arraylen is greater than index + */ + for (; i < arraylen; i++) { + /* action to take depends on mode */ + if (mode == MODIFYKEY_MODE_INSERT) + success+= insert_keyframe(ksp->id, act, groupname, ksp->rna_path, i, cfra, kflag); + else if (mode == MODIFYKEY_MODE_DELETE) + success+= delete_keyframe(ksp->id, act, groupname, ksp->rna_path, i, cfra, kflag); + } + + /* send notifiers and set recalc-flags */ + // TODO: hopefully this doesn't result in execessive flooding of the notifier stack + if (C && ksp->id) { + switch (GS(ksp->id->name)) { + case ID_OB: /* Object (or Object-Related) Keyframes */ + { + Object *ob= (Object *)ksp->id; + + ob->recalc |= OB_RECALC; + WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, ksp->id); + } + break; + case ID_MA: /* Material Keyframes */ + WM_event_add_notifier(C, NC_MATERIAL|ND_KEYS, ksp->id); + break; + } + } + } + } + else if (dsources && dsources->first) { + /* for each one of the 'sources', resolve the template markers and expand arrays, then insert keyframes */ + bCommonKeySrc *cks; + + /* for each 'source' for keyframe data, resolve each of the paths from the KeyingSet */ + for (cks= dsources->first; cks; cks= cks->next) { + /* for each path in KeyingSet, construct a path using the templates */ + for (ksp= ks->paths.first; ksp; ksp= ksp->next) { + DynStr *pathds= BLI_dynstr_new(); + char *path = NULL; + int arraylen, i; + + /* set initial group name */ + groupname= (cks->id) ? cks->id->name+2 : NULL; + + /* construct the path */ + // FIXME: this currently only works with a few hardcoded cases + if ((ksp->templates & KSP_TEMPLATE_PCHAN) && (cks->pchan)) { + /* add basic pose-channel path access */ + BLI_dynstr_append(pathds, "pose.pose_channels[\""); + BLI_dynstr_append(pathds, cks->pchan->name); + BLI_dynstr_append(pathds, "\"]"); + + /* override default group name */ + groupname= cks->pchan->name; + } + if ((ksp->templates & KSP_TEMPLATE_CONSTRAINT) && (cks->con)) { + /* add basic constraint path access */ + BLI_dynstr_append(pathds, "constraints[\""); + BLI_dynstr_append(pathds, cks->con->name); + BLI_dynstr_append(pathds, "\"]"); + + /* override default group name */ + groupname= cks->con->name; + } + { + /* add property stored in KeyingSet Path */ + if (BLI_dynstr_get_len(pathds)) + BLI_dynstr_append(pathds, "."); + BLI_dynstr_append(pathds, ksp->rna_path); + + /* convert to C-string */ + path= BLI_dynstr_get_cstring(pathds); + BLI_dynstr_free(pathds); + } + + /* get pointer to name of group to add channels to + * - KSP_GROUP_TEMPLATE_ITEM is handled above while constructing the paths + */ + if (ksp->groupmode == KSP_GROUP_NONE) + groupname= NULL; + else if (ksp->groupmode == KSP_GROUP_KSNAME) + groupname= ks->name; + else if (ksp->groupmode == KSP_GROUP_NAMED) + groupname= ksp->group; + + /* init arraylen and i - arraylen should be greater than i so that + * normal non-array entries get keyframed correctly + */ + i= ksp->array_index; + arraylen= i+1; + + /* get length of array if whole array option is enabled */ + if (ksp->flag & KSP_FLAG_WHOLE_ARRAY) { + PointerRNA id_ptr, ptr; + PropertyRNA *prop; + + RNA_id_pointer_create(cks->id, &id_ptr); + if (RNA_path_resolve(&id_ptr, path, &ptr, &prop) && prop) + arraylen= RNA_property_array_length(prop); + } + + /* for each possible index, perform operation + * - assume that arraylen is greater than index + */ + for (; i < arraylen; i++) { + /* action to take depends on mode */ + if (mode == MODIFYKEY_MODE_INSERT) + success+= insert_keyframe(cks->id, act, groupname, path, i, cfra, kflag); + else if (mode == MODIFYKEY_MODE_DELETE) + success+= delete_keyframe(cks->id, act, groupname, path, i, cfra, kflag); + } + + /* free the path */ + MEM_freeN(path); + } + + /* send notifiers and set recalc-flags */ + // TODO: hopefully this doesn't result in execessive flooding of the notifier stack + if (C && cks->id) { + switch (GS(cks->id->name)) { + case ID_OB: /* Object (or Object-Related) Keyframes */ + { + Object *ob= (Object *)cks->id; + + ob->recalc |= OB_RECALC; + WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, cks->id); + } + break; + case ID_MA: /* Material Keyframes */ + WM_event_add_notifier(C, NC_MATERIAL|ND_KEYS, cks->id); + break; + } + } + } + } + + /* return the number of channels successfully affected */ + return success; +} + +/* ************************************************** */ diff --git a/source/blender/editors/armature/BIF_generate.h b/source/blender/editors/armature/BIF_generate.h index bc655a4cdff..bde079c45fb 100644 --- a/source/blender/editors/armature/BIF_generate.h +++ b/source/blender/editors/armature/BIF_generate.h @@ -1,5 +1,5 @@ /** - * $Id: $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/editors/armature/BIF_retarget.h b/source/blender/editors/armature/BIF_retarget.h index 049ddf5baa5..c39f410424a 100644 --- a/source/blender/editors/armature/BIF_retarget.h +++ b/source/blender/editors/armature/BIF_retarget.h @@ -1,5 +1,5 @@ /** - * $Id: $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/editors/armature/Makefile b/source/blender/editors/armature/Makefile index f8cbb5ab37e..6c7ce81a8a1 100644 --- a/source/blender/editors/armature/Makefile +++ b/source/blender/editors/armature/Makefile @@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS) CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(OPENGL_HEADERS) -CPPFLAGS += -I$(NAN_BMFONT)/include CPPFLAGS += -I$(NAN_OPENNL)/include # not very neat.... diff --git a/source/blender/editors/armature/SConscript b/source/blender/editors/armature/SConscript index e4e42a27b36..f96d25b0fe0 100644 --- a/source/blender/editors/armature/SConscript +++ b/source/blender/editors/armature/SConscript @@ -5,7 +5,7 @@ sources = env.Glob('*.c') incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' -incs += ' ../../render/extern/include #/intern/guardedalloc #intern/bmfont' +incs += ' ../../render/extern/include #/intern/guardedalloc' incs += ' ../../gpu ../../makesrna #/intern/opennl/extern' env.BlenderLib ( 'bf_editors_armature', sources, Split(incs), [], libtype=['core'], priority=[44] ) diff --git a/source/blender/editors/armature/armature_intern.h b/source/blender/editors/armature/armature_intern.h index 8142189b61b..646c75f50bf 100644 --- a/source/blender/editors/armature/armature_intern.h +++ b/source/blender/editors/armature/armature_intern.h @@ -33,7 +33,7 @@ struct wmOperatorType; /* editarmature.c operators */ void ARMATURE_OT_bone_primitive_add(struct wmOperatorType *ot); -void ARMATURE_OT_align_bones(struct wmOperatorType *ot); +void ARMATURE_OT_bones_align(struct wmOperatorType *ot); void ARMATURE_OT_calculate_roll(struct wmOperatorType *ot); void ARMATURE_OT_switch_direction(struct wmOperatorType *ot); void ARMATURE_OT_subdivs(struct wmOperatorType *ot); @@ -69,14 +69,20 @@ void SKETCH_OT_finish_stroke(struct wmOperatorType *ot); void SKETCH_OT_cancel_stroke(struct wmOperatorType *ot); void SKETCH_OT_select(struct wmOperatorType *ot); +/* PoseLib */ +void POSELIB_OT_pose_add(struct wmOperatorType *ot); +void POSELIB_OT_pose_remove(struct wmOperatorType *ot); +void POSELIB_OT_pose_rename(struct wmOperatorType *ot); +void POSELIB_OT_browse_interactive(struct wmOperatorType *ot); + /* editarmature.c */ struct bArmature; struct EditBone; struct ListBase; void make_boneList(struct ListBase *edbo, struct ListBase *bones, struct EditBone *parent); - struct EditBone *addEditBone(struct bArmature *arm, char *name); +void BIF_sk_selectStroke(struct bContext *C, short mval[2], short extend); /* duplicate method */ void preEditBoneDuplicate(struct ListBase *editbones); diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c index bc171acfac7..5c31883834c 100644 --- a/source/blender/editors/armature/armature_ops.c +++ b/source/blender/editors/armature/armature_ops.c @@ -110,7 +110,7 @@ void ED_operatortypes_armature(void) /* EDIT ARMATURE */ WM_operatortype_append(ARMATURE_OT_bone_primitive_add); - WM_operatortype_append(ARMATURE_OT_align_bones); + WM_operatortype_append(ARMATURE_OT_bones_align); WM_operatortype_append(ARMATURE_OT_calculate_roll); WM_operatortype_append(ARMATURE_OT_switch_direction); WM_operatortype_append(ARMATURE_OT_subdivs); @@ -154,6 +154,14 @@ void ED_operatortypes_armature(void) WM_operatortype_append(POSE_OT_select_hierarchy); WM_operatortype_append(POSE_OT_select_linked); + /* POSELIB */ + WM_operatortype_append(POSELIB_OT_browse_interactive); + + WM_operatortype_append(POSELIB_OT_pose_add); + WM_operatortype_append(POSELIB_OT_pose_remove); + WM_operatortype_append(POSELIB_OT_pose_rename); + + /* TESTS */ WM_operatortype_append(ARMATURE_OT_test); // XXX temp test for context iterators... to be removed } @@ -167,7 +175,7 @@ void ED_keymap_armature(wmWindowManager *wm) /* only set in editmode armature, by space_view3d listener */ // WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "ARMATURE_OT_align_bones", AKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); + WM_keymap_add_item(keymap, "ARMATURE_OT_bones_align", AKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); WM_keymap_add_item(keymap, "ARMATURE_OT_calculate_roll", NKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "ARMATURE_OT_switch_direction", FKEY, KM_PRESS, KM_ALT, 0); @@ -185,28 +193,28 @@ void ED_keymap_armature(wmWindowManager *wm) WM_keymap_add_item(keymap, "ARMATURE_OT_test", TKEY, KM_PRESS, 0, 0); // XXX temp test for context iterators... to be removed kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0); - RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); - RNA_boolean_set(kmi->ptr, "extend", 0); + RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); + RNA_boolean_set(kmi->ptr, "extend", 0); kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); - RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); - RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); + RNA_boolean_set(kmi->ptr, "extend", 1); kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0); - RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); - RNA_boolean_set(kmi->ptr, "extend", 0); + RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); + RNA_boolean_set(kmi->ptr, "extend", 0); kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); - RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); - RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); + RNA_boolean_set(kmi->ptr, "extend", 1); WM_keymap_add_item(keymap, "ARMATURE_OT_select_linked", LKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "ARMATURE_OT_delete", XKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "ARMATURE_OT_duplicate_selected", DKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "ARMATURE_OT_extrude", EKEY, KM_PRESS, 0, 0); kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_extrude", EKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "forked", 1); + RNA_boolean_set(kmi->ptr, "forked", 1); WM_keymap_add_item(keymap, "ARMATURE_OT_click_extrude", LEFTMOUSE, KM_PRESS, KM_CTRL, 0); - /* Armature ------------------------ */ + /* Armature -> Etch-A-Ton ------------------------ */ WM_keymap_add_item(keymap, "SKETCH_OT_delete", XKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "SKETCH_OT_finish_stroke", SELECTMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "SKETCH_OT_cancel_stroke", ESCKEY, KM_PRESS, 0, 0); @@ -231,19 +239,31 @@ void ED_keymap_armature(wmWindowManager *wm) WM_keymap_add_item(keymap, "POSE_OT_select_parent", PKEY, KM_PRESS, KM_SHIFT, 0); kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0); - RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); - RNA_boolean_set(kmi->ptr, "extend", 0); + RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); + RNA_boolean_set(kmi->ptr, "extend", 0); kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); - RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); - RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); + RNA_boolean_set(kmi->ptr, "extend", 1); kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0); - RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); - RNA_boolean_set(kmi->ptr, "extend", 0); + RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); + RNA_boolean_set(kmi->ptr, "extend", 0); kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); - RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); - RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); + RNA_boolean_set(kmi->ptr, "extend", 1); WM_keymap_add_item(keymap, "POSE_OT_select_linked", LKEY, KM_PRESS, 0, 0); + + // XXX this should probably be in screen instead... here for testing purposes in the meantime... - Aligorith + WM_keymap_verify_item(keymap, "ANIM_OT_insert_keyframe_menu", IKEY, KM_PRESS, 0, 0); + WM_keymap_verify_item(keymap, "ANIM_OT_delete_keyframe_old", IKEY, KM_PRESS, KM_ALT, 0); + + /* Pose -> PoseLib ------------- */ + /* only set in posemode, by space_view3d listener */ + WM_keymap_add_item(keymap, "POSELIB_OT_browse_interactive", LKEY, KM_PRESS, KM_CTRL, 0); + + WM_keymap_add_item(keymap, "POSELIB_OT_pose_add", LKEY, KM_PRESS, KM_SHIFT, 0); + WM_keymap_add_item(keymap, "POSELIB_OT_pose_remove", LKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_add_item(keymap, "POSELIB_OT_pose_rename", LKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0); } diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 659cd586902..1c113c25720 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -33,8 +33,6 @@ #include "MEM_guardedalloc.h" -#include "BMF_Api.h" - #include "DNA_action_types.h" #include "DNA_armature_types.h" #include "DNA_constraint_types.h" @@ -3460,11 +3458,13 @@ void ARMATURE_OT_subdivide_multi(wmOperatorType *ot) static int armature_subdivs_invoke(bContext *C, wmOperator *op, wmEvent *event) { - uiMenuItem *head; + uiPopupMenu *pup; + uiLayout *layout; - head= uiPupMenuBegin("Subdivision Type", 0); - uiMenuItemsEnumO(head, "ARMATURE_OT_subdivs", "type"); - uiPupMenuEnd(C, head); + pup= uiPupMenuBegin(C, "Subdivision Type", 0); + layout= uiPupMenuLayout(pup); + uiItemsEnumO(layout, "ARMATURE_OT_subdivs", "type"); + uiPupMenuEnd(C, pup); return OPERATOR_CANCELLED; } @@ -3744,7 +3744,8 @@ static int armature_parent_set_exec(bContext *C, wmOperator *op) static int armature_parent_set_invoke(bContext *C, wmOperator *op, wmEvent *event) { EditBone *actbone = CTX_data_active_bone(C); - uiMenuItem *head= uiPupMenuBegin("Make Parent ", 0); + uiPopupMenu *pup= uiPupMenuBegin(C, "Make Parent ", 0); + uiLayout *layout= uiPupMenuLayout(pup); int allchildbones = 0; CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones) { @@ -3754,13 +3755,13 @@ static int armature_parent_set_invoke(bContext *C, wmOperator *op, wmEvent *even } CTX_DATA_END; - uiMenuItemEnumO(head, "", 0, "ARMATURE_OT_parent_set", "type", ARM_PAR_CONNECT); + uiItemEnumO(layout, NULL, 0, "ARMATURE_OT_parent_set", "type", ARM_PAR_CONNECT); /* ob becomes parent, make the associated menus */ if (allchildbones) - uiMenuItemEnumO(head, "", 0, "ARMATURE_OT_parent_set", "type", ARM_PAR_OFFSET); + uiItemEnumO(layout, NULL, 0, "ARMATURE_OT_parent_set", "type", ARM_PAR_OFFSET); - uiPupMenuEnd(C, head); + uiPupMenuEnd(C, pup); return OPERATOR_CANCELLED; } @@ -4112,11 +4113,11 @@ static int armature_align_bones_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ARMATURE_OT_align_bones(wmOperatorType *ot) +void ARMATURE_OT_bones_align(wmOperatorType *ot) { /* identifiers */ ot->name= "Align Bones"; - ot->idname= "ARMATURE_OT_align_bones"; + ot->idname= "ARMATURE_OT_bones_align"; /* api callbacks */ ot->invoke = WM_operator_confirm; diff --git a/source/blender/editors/armature/editarmature_generate.c b/source/blender/editors/armature/editarmature_generate.c index a1990814a02..6d271375c64 100644 --- a/source/blender/editors/armature/editarmature_generate.c +++ b/source/blender/editors/armature/editarmature_generate.c @@ -1,5 +1,5 @@ /** - * $Id: editarmature_generate.c $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -53,14 +53,14 @@ void setBoneRollFromNormal(EditBone *bone, float *no, float invmat[][4], float t { if (no != NULL && !VecIsNull(no)) { - float tangent[3], cotangent[3], normal[3]; + float tangent[3], vec[3], normal[3]; VECCOPY(normal, no); Mat3MulVecfl(tmat, normal); VecSubf(tangent, bone->tail, bone->head); - Crossf(cotangent, tangent, normal); - Crossf(normal, cotangent, tangent); + Projf(vec, tangent, normal); + VecSubf(normal, normal, vec); Normalize(normal); diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index 5fc8d52ffef..68e8b45e7d2 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -64,9 +64,9 @@ #include "BKE_context.h" #include "ED_armature.h" +#include "ED_util.h" + #include "BIF_retarget.h" -//#include "BIF_space.h" -//#include "BIF_toolbox.h" #include "PIL_time.h" @@ -206,12 +206,12 @@ float rollBoneByQuatAligned(EditBone *bone, float old_up_axis[3], float qrot[4], } } -float rollBoneByQuatJoint(RigEdge *edge, RigEdge *previous, float qrot[4], float qroll[4]) +float rollBoneByQuatJoint(RigEdge *edge, RigEdge *previous, float qrot[4], float qroll[4], float up_axis[3]) { if (previous == NULL) { - QuatOne(qroll); - return rollBoneByQuat(edge->bone, edge->up_axis, qrot); + /* default to up_axis if no previous */ + return rollBoneByQuatAligned(edge->bone, edge->up_axis, qrot, qroll, up_axis); } else { @@ -228,9 +228,8 @@ float rollBoneByQuatJoint(RigEdge *edge, RigEdge *previous, float qrot[4], float } else { - /* SHOULDN'T BE HERE */ - QuatOne(qroll); - return rollBoneByQuat(edge->bone, edge->up_axis, qrot); + /* default to up_axis if first bone in the chain is an offset */ + return rollBoneByQuatAligned(edge->bone, edge->up_axis, qrot, qroll, up_axis); } VecSubf(vec_second, edge->bone->tail, edge->bone->head); @@ -1645,6 +1644,7 @@ RigGraph *armatureSelectedToGraph(bContext *C, Object *ob, bArmature *arm) } /************************************ GENERATING *****************************************************/ +#if 0 static EditBone *add_editbonetolist(char *name, ListBase *list) { EditBone *bone= MEM_callocN(sizeof(EditBone), "eBone"); @@ -1668,6 +1668,7 @@ static EditBone *add_editbonetolist(char *name, ListBase *list) return bone; } +#endif void generateMissingArcsFromNode(RigGraph *rigg, ReebNode *node, int multi_level_limit) { @@ -1857,7 +1858,7 @@ static void repositionBone(bContext *C, RigGraph *rigg, RigEdge *edge, float vec } else if (scene->toolsettings->skgen_retarget_roll == SK_RETARGET_ROLL_JOINT) { - bone->roll = rollBoneByQuatJoint(edge, edge->next, qrot, qroll); + bone->roll = rollBoneByQuatJoint(edge, edge->prev, qrot, qroll, up_axis); } else { @@ -2733,7 +2734,7 @@ static void adjustGraphs(bContext *C, RigGraph *rigg) arm->edbo = rigg->editbones; ED_armature_from_edit(scene, rigg->ob); - ED_undo_push("Retarget Skeleton"); + ED_undo_push(C, "Retarget Skeleton"); } static void retargetGraphs(bContext *C, RigGraph *rigg) @@ -2890,7 +2891,7 @@ void BIF_retargetArmature(bContext *C) printf("retarget: \t%.3f (%.1f%%)\n", retarget_time, retarget_time / total_time * 100); printf("-----------\n"); - ED_undo_push("Retarget Skeleton"); + ED_undo_push(C, "Retarget Skeleton"); // XXX // allqueue(REDRAWVIEW3D, 0); diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c index 5d0b954046c..45605ad472d 100644 --- a/source/blender/editors/armature/editarmature_sketch.c +++ b/source/blender/editors/armature/editarmature_sketch.c @@ -1,5 +1,5 @@ /** - * $Id: $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -293,7 +293,7 @@ char *BIF_listTemplates(bContext *C) while (!BLI_ghashIterator_isDone(&ghi)) { Object *ob = BLI_ghashIterator_getValue(&ghi); - int key = (int)BLI_ghashIterator_getKey(&ghi); + int key = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(&ghi)); p += sprintf(p, "|%s%%x%i", ob->id.name+2, key); @@ -314,7 +314,7 @@ int BIF_currentTemplate(bContext *C) while (!BLI_ghashIterator_isDone(&ghi)) { Object *ob = BLI_ghashIterator_getValue(&ghi); - int key = (int)BLI_ghashIterator_getKey(&ghi); + int key = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(&ghi)); if (ob == scene->toolsettings->skgen_template) { @@ -1035,7 +1035,22 @@ void sk_drawStroke(SK_Stroke *stk, int id, float color[3], int start, int end) } glEnd(); - + +#if 0 + glColor3f(0, 0, 1); + glBegin(GL_LINES); + + for (i = 0; i < stk->nb_points; i++) + { + float *p = stk->points[i].p; + float *no = stk->points[i].no; + glVertex3fv(p); + glVertex3f(p[0] + no[0], p[1] + no[1], p[2] + no[2]); + } + + glEnd(); +#endif + glColor3f(0, 0, 0); glBegin(GL_POINTS); @@ -1998,7 +2013,7 @@ void sk_convertStroke(bContext *C, SK_Stroke *stk) Mat4MulVecfl(invmat, bone->head); Mat4MulVecfl(invmat, bone->tail); - setBoneRollFromNormal(bone, pt->no, invmat, tmat); + setBoneRollFromNormal(bone, head->no, invmat, tmat); } new_parent = bone; diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index 8e6f118118a..dec4847f125 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -39,6 +39,7 @@ #include "BLI_dynstr.h" #include "DNA_listBase.h" +#include "DNA_anim_types.h" #include "DNA_action_types.h" #include "DNA_armature_types.h" #include "DNA_curve_types.h" @@ -48,25 +49,36 @@ #include "DNA_scene_types.h" #include "DNA_userdef_types.h" +#include "BKE_animsys.h" #include "BKE_action.h" #include "BKE_armature.h" #include "BKE_depsgraph.h" -#include "BKE_ipo.h" #include "BKE_modifier.h" #include "BKE_object.h" #include "BKE_global.h" +#include "BKE_context.h" +#include "BKE_report.h" #include "BKE_utildefines.h" #include "PIL_time.h" /* sleep */ +#include "RNA_access.h" +#include "RNA_define.h" +#include "RNA_types.h" + +#include "WM_api.h" #include "WM_types.h" +#include "UI_interface.h" +#include "UI_resources.h" + #include "ED_anim_api.h" #include "ED_armature.h" #include "ED_keyframes_draw.h" #include "ED_keyframing.h" #include "ED_keyframes_edit.h" +#include "ED_screen.h" #include "armature_intern.h" @@ -74,20 +86,8 @@ static void BIF_undo_push() {} static void error() {} -static int qtest() {return 0;} -static int sbutton() {return 0;} -static int pupmenu() {return 0;} -static int pupmenu_col() {return 0;} -static int extern_qread_ext() {return 0;} -static void persptoetsen() {} -static void headerprint() {} - -static void remake_action_ipos() {} // xxx depreceated -//static void verify_pchan2achan_grouping() {} // xxx depreceated -static void action_set_activemarker() {} - -/* ******* XXX ********** */ +static void action_set_activemarker() {} /* ************************************************************* */ /* == POSE-LIBRARY TOOL FOR BLENDER == @@ -193,8 +193,7 @@ bAction *poselib_init_new (Object *ob) /* init object's poselib action (unlink old one if there) */ if (ob->poselib) ob->poselib->id.us--; - // XXX old anim stuff - // ob->poselib= add_empty_action("PoseLib"); + ob->poselib= add_empty_action("PoseLib"); return ob->poselib; } @@ -214,6 +213,7 @@ bAction *poselib_validate (Object *ob) /* This tool automagically generates/validates poselib data so that it corresponds to the data * in the action. This is for use in making existing actions usable as poselibs. */ +// TODO: operatorfy me! void poselib_validate_act (bAction *act) { ListBase keys = {NULL, NULL}; @@ -273,147 +273,145 @@ void poselib_validate_act (bAction *act) } /* ************************************************************* */ -#if 0 // XXX old animation system -/* This function adds an ipo-curve of the right type where it's needed */ -static IpoCurve *poselib_verify_icu (Ipo *ipo, int adrcode) +/* Pointers to the builtin KeyingSets that we want to use */ +static KeyingSet *poselib_ks_locrotscale = NULL; /* quaternion rotations */ +static KeyingSet *poselib_ks_locrotscale2 = NULL; /* euler rotations */ // XXX FIXME... +static short poselib_ks_need_init= 1; /* have the above been obtained yet? */ + +/* Make sure the builtin KeyingSets are initialised properly + * (only gets called on first run of poselib_add_current_pose). + */ +static void poselib_get_builtin_keyingsets (void) { - IpoCurve *icu; - - for (icu= ipo->curve.first; icu; icu= icu->next) { - if (icu->adrcode==adrcode) break; - } - if (icu==NULL) { - icu= MEM_callocN(sizeof(IpoCurve), "ipocurve"); + /* only if we haven't got these yet */ + // FIXME: this assumes that we will always get the builtin sets... + if (poselib_ks_need_init) { + /* LocRotScale (quaternions) */ + poselib_ks_locrotscale= ANIM_builtin_keyingset_get_named(NULL, "LocRotScale"); - icu->flag |= IPO_VISIBLE|IPO_AUTO_HORIZ; - if (ipo->curve.first==NULL) icu->flag |= IPO_ACTIVE; /* first one added active */ + /* LocRotScale (euler) */ + //ks_locrotscale2= ANIM_builtin_keyingset_get_named(ks_locrotscale, "LocRotScale"); + poselib_ks_locrotscale2= poselib_ks_locrotscale; // FIXME: for now, just use the same one... - icu->blocktype= ID_PO; - icu->adrcode= adrcode; - - set_icu_vars(icu); + /* clear flag requesting init */ + poselib_ks_need_init= 0; + } +} + +/* ----- */ + +static void poselib_add_menu_invoke__replacemenu (bContext *C, uiLayout *layout, void *arg) +{ + Object *ob= CTX_data_active_object(C); + bAction *act= ob->poselib; + TimeMarker *marker; + + /* add each marker to this menu */ + for (marker= act->markers.first; marker; marker= marker->next) + uiItemIntO(layout, marker->name, ICON_ARMATURE_DATA, "POSELIB_OT_pose_add", "frame", marker->frame); +} + +static int poselib_add_menu_invoke (bContext *C, wmOperator *op, wmEvent *evt) +{ + Scene *scene= CTX_data_scene(C); + Object *ob= CTX_data_active_object(C); + bArmature *arm= (ob) ? ob->data : NULL; + bPose *pose= (ob) ? ob->pose : NULL; + uiPopupMenu *pup; + uiLayout *layout; + + /* sanity check */ + if (ELEM3(NULL, ob, arm, pose)) + return OPERATOR_CANCELLED; + + /* start building */ + pup= uiPupMenuBegin(C, op->type->name, 0); + layout= uiPupMenuLayout(pup); + uiLayoutContext(layout, WM_OP_EXEC_DEFAULT); + + /* add new (adds to the first unoccupied frame) */ + uiItemIntO(layout, "Add New", 0, "POSELIB_OT_pose_add", "frame", poselib_get_free_index(ob->poselib)); + + /* check if we have any choices to add a new pose in any other way */ + if ((ob->poselib) && (ob->poselib->markers.first)) { + /* add new (on current frame) */ + uiItemIntO(layout, "Add New (Current Frame)", 0, "POSELIB_OT_pose_add", "frame", CFRA); - BLI_addtail(&ipo->curve, icu); + /* replace existing - submenu */ + uiItemMenuF(layout, "Replace Existing...", 0, poselib_add_menu_invoke__replacemenu); } - return icu; + uiPupMenuEnd(C, pup); + + /* this operator is only for a menu, not used further */ + return OPERATOR_CANCELLED; } -#endif // XXX old animation system -/* This tool adds the current pose to the poselib - * Note: Standard insertkey cannot be used for this due to its limitations - */ -void poselib_add_current_pose (Scene *scene, Object *ob, int val) + +static int poselib_add_exec (bContext *C, wmOperator *op) { + Object *ob= CTX_data_active_object(C); + bAction *act = poselib_validate(ob); bArmature *arm= (ob) ? ob->data : NULL; bPose *pose= (ob) ? ob->pose : NULL; bPoseChannel *pchan; TimeMarker *marker; - bAction *act; - // bActionChannel *achan; - // IpoCurve *icu; - int frame; + int frame= RNA_int_get(op->ptr, "frame"); char name[64]; - /* sanity check */ + bCommonKeySrc cks; + ListBase dsources = {&cks, &cks}; + + /* sanity check (invoke should have checked this anyway) */ if (ELEM3(NULL, ob, arm, pose)) - return; + return OPERATOR_CANCELLED; - /* mode - add new or replace existing */ - if (val == 0) { - if ((ob->poselib) && (ob->poselib->markers.first)) { - val= pupmenu("PoseLib Add Current Pose%t|Add New%x1|Add New (Current Frame)%x3|Replace Existing%x2"); - if (val <= 0) return; + /* get name to give to pose */ + RNA_string_get(op->ptr, "name", name); + + /* add pose to poselib - replaces any existing pose there + * - for the 'replace' option, this should end up finding the appropriate marker, + * so no new one will be added + */ + for (marker= act->markers.first; marker; marker= marker->next) { + if (marker->frame == frame) { + BLI_strncpy(marker->name, name, sizeof(marker->name)); + break; } - else - val= 1; } - - if ((ob->poselib) && (val == 2)) { - char *menustr; - - /* get poselib */ - act= ob->poselib; - - /* get the pose to replace */ - menustr= poselib_build_poses_menu(act, "Replace PoseLib Pose"); - val= pupmenu_col(menustr, 20); - if (menustr) MEM_freeN(menustr); + if (marker == NULL) { + marker= MEM_callocN(sizeof(TimeMarker), "ActionMarker"); - if (val <= 0) return; - marker= BLI_findlink(&act->markers, val-1); - if (marker == NULL) return; + BLI_strncpy(marker->name, name, sizeof(marker->name)); + marker->frame= frame; - /* get the frame from the poselib */ - frame= marker->frame; + BLI_addtail(&act->markers, marker); } - else { - /* get name of pose */ - sprintf(name, "Pose"); - if (sbutton(name, 0, sizeof(name)-1, "Name: ") == 0) - return; - - /* get/initialise poselib */ - act= poselib_validate(ob); - - /* get frame */ - if (val == 3) - frame= CFRA; - else /* if (val == 1) */ - frame= poselib_get_free_index(act); - - /* add pose to poselib - replaces any existing pose there */ - for (marker= act->markers.first; marker; marker= marker->next) { - if (marker->frame == frame) { - BLI_strncpy(marker->name, name, sizeof(marker->name)); - break; - } - } - if (marker == NULL) { - marker= MEM_callocN(sizeof(TimeMarker), "ActionMarker"); - - BLI_strncpy(marker->name, name, sizeof(marker->name)); - marker->frame= frame; - - BLI_addtail(&act->markers, marker); - } - - /* validate name */ - BLI_uniquename(&act->markers, marker, "Pose", offsetof(TimeMarker, name), 64); - } + + /* validate name */ + BLI_uniquename(&act->markers, marker, "Pose", '.', offsetof(TimeMarker, name), 64); + + /* make sure we've got KeyingSets to use */ + poselib_get_builtin_keyingsets(); + + /* init common-key-source for use by KeyingSets */ + memset(&cks, 0, sizeof(bCommonKeySrc)); + cks.id= &ob->id; /* loop through selected posechannels, keying their pose to the action */ for (pchan= pose->chanbase.first; pchan; pchan= pchan->next) { /* check if available */ if ((pchan->bone) && (arm->layer & pchan->bone->layer)) { if (pchan->bone->flag & (BONE_SELECTED|BONE_ACTIVE)) { -#if 0 // XXX old animation system - /* make action-channel if needed (action groups are also created) */ - achan= verify_action_channel(act, pchan->name); - verify_pchan2achan_grouping(act, pose, pchan->name); + /* init cks for this PoseChannel, then use the relative KeyingSets to keyframe it */ + cks.pchan= pchan; - /* make ipo if needed... */ - if (achan->ipo == NULL) - achan->ipo= add_ipo(scene, achan->name, ID_PO); - - /* add missing ipo-curves and insert keys */ - #define INSERT_KEY_ICU(adrcode, data) {\ - icu= poselib_verify_icu(achan->ipo, adrcode); \ - insert_vert_icu(icu, (float)frame, data, 1); \ - } - - INSERT_KEY_ICU(AC_LOC_X, pchan->loc[0]) - INSERT_KEY_ICU(AC_LOC_Y, pchan->loc[1]) - INSERT_KEY_ICU(AC_LOC_Z, pchan->loc[2]) - INSERT_KEY_ICU(AC_SIZE_X, pchan->size[0]) - INSERT_KEY_ICU(AC_SIZE_Y, pchan->size[1]) - INSERT_KEY_ICU(AC_SIZE_Z, pchan->size[2]) - INSERT_KEY_ICU(AC_QUAT_W, pchan->quat[0]) - INSERT_KEY_ICU(AC_QUAT_X, pchan->quat[1]) - INSERT_KEY_ICU(AC_QUAT_Y, pchan->quat[2]) - INSERT_KEY_ICU(AC_QUAT_Z, pchan->quat[3]) -#endif // XXX old animation system + /* KeyingSet to use depends on rotation mode */ + if (pchan->rotmode) + modify_keyframes(C, &dsources, act, poselib_ks_locrotscale2, MODIFYKEY_MODE_INSERT, (float)frame); + else + modify_keyframes(C, &dsources, act, poselib_ks_locrotscale, MODIFYKEY_MODE_INSERT, (float)frame); } } } @@ -421,64 +419,97 @@ void poselib_add_current_pose (Scene *scene, Object *ob, int val) /* store new 'active' pose number */ act->active_marker= BLI_countlist(&act->markers); - BIF_undo_push("PoseLib Add Pose"); + /* done */ + return OPERATOR_FINISHED; } -/* This tool removes the pose that the user selected from the poselib (or the provided pose) */ -void poselib_remove_pose (Object *ob, TimeMarker *marker) +void POSELIB_OT_pose_add (wmOperatorType *ot) { - bPose *pose= (ob) ? ob->pose : NULL; + /* identifiers */ + ot->name= "PoseLib Add Pose"; + ot->idname= "POSELIB_OT_pose_add"; + ot->description= "Add the current Pose to the active Pose Library"; + + /* api callbacks */ + ot->invoke= poselib_add_menu_invoke; + ot->exec= poselib_add_exec; + ot->poll= ED_operator_posemode; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_int(ot->srna, "frame", 1, 0, INT_MAX, "Frame", "Frame to store pose on", 0, INT_MAX); + RNA_def_string(ot->srna, "name", "Pose", 64, "Pose Name", "Name of newly added Pose"); +} + +/* ----- */ + +static int poselib_stored_pose_menu_invoke (bContext *C, wmOperator *op, wmEvent *evt) +{ + Object *ob= CTX_data_active_object(C); bAction *act= (ob) ? ob->poselib : NULL; - // bActionChannel *achan; - char *menustr; - int val; + TimeMarker *marker; + uiPopupMenu *pup; + uiLayout *layout; + int i; + + /* sanity check */ + if (ELEM(NULL, ob, act)) + return OPERATOR_CANCELLED; + + /* start building */ + pup= uiPupMenuBegin(C, op->type->name, 0); + layout= uiPupMenuLayout(pup); + uiLayoutContext(layout, WM_OP_EXEC_DEFAULT); + + /* add each marker to this menu */ + for (marker=act->markers.first, i=0; marker; marker= marker->next, i++) + uiItemIntO(layout, marker->name, ICON_ARMATURE_DATA, op->idname, "index", i); + + uiPupMenuEnd(C, pup); + + /* this operator is only for a menu, not used further */ + return OPERATOR_CANCELLED; +} + + + +static int poselib_remove_exec (bContext *C, wmOperator *op) +{ + Object *ob= CTX_data_active_object(C); + bAction *act= (ob) ? ob->poselib : NULL; + TimeMarker *marker; + FCurve *fcu; /* check if valid poselib */ - if (ELEM(NULL, ob, pose)) { - error("PoseLib is only for Armatures in PoseMode"); - return; - } if (act == NULL) { - error("Object doesn't have PoseLib data"); - return; + BKE_report(op->reports, RPT_ERROR, "Object doesn't have PoseLib data"); + return OPERATOR_CANCELLED; } /* get index (and pointer) of pose to remove */ + marker= BLI_findlink(&act->markers, RNA_int_get(op->ptr, "index")); if (marker == NULL) { - menustr= poselib_build_poses_menu(act, "Remove PoseLib Pose"); - val= pupmenu_col(menustr, 20); - if (menustr) MEM_freeN(menustr); - - if (val <= 0) return; - marker= BLI_findlink(&act->markers, val-1); - if (marker == NULL) return; - } - else { - /* only continue if pose belongs to poselib */ - if (BLI_findindex(&act->markers, marker) == -1) - return; + BKE_report(op->reports, RPT_ERROR, "Invalid index for Pose"); } /* remove relevant keyframes */ -#if 0 // XXX old animation system - for (achan= act->chanbase.first; achan; achan= achan->next) { - Ipo *ipo= achan->ipo; - IpoCurve *icu; + for (fcu= act->curves.first; fcu; fcu= fcu->next) { BezTriple *bezt; int i; - for (icu= ipo->curve.first; icu; icu= icu->next) { - for (i=0, bezt=icu->bezt; i < icu->totvert; i++, bezt++) { - /* check if remove... */ + if (fcu->bezt) { + for (i=0, bezt=fcu->bezt; i < fcu->totvert; i++, bezt++) { + /* check if remove */ if (IS_EQ(bezt->vec[1][0], marker->frame)) { - delete_icu_key(icu, i, 1); + delete_fcurve_key(fcu, i, 1); break; } - } + } } } -#endif // XXX old animation system /* remove poselib from list */ BLI_freelinkN(&act->markers, marker); @@ -486,52 +517,80 @@ void poselib_remove_pose (Object *ob, TimeMarker *marker) /* fix active pose number */ act->active_marker= 0; - /* undo + redraw */ - BIF_undo_push("PoseLib Remove Pose"); + /* done */ + return OPERATOR_FINISHED; +} + +void POSELIB_OT_pose_remove (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "PoseLib Remove Pose"; + ot->idname= "POSELIB_OT_pose_remove"; + ot->description= "Remove nth pose from the active Pose Library"; + + /* api callbacks */ + ot->invoke= poselib_stored_pose_menu_invoke; + ot->exec= poselib_remove_exec; + ot->poll= ED_operator_posemode; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "The index of the pose to remove", 0, INT_MAX); } -/* This tool renames the pose that the user selected from the poselib */ -void poselib_rename_pose (Object *ob) + +static int poselib_rename_exec (bContext *C, wmOperator *op) { - bPose *pose= (ob) ? ob->pose : NULL; + Object *ob= CTX_data_active_object(C); bAction *act= (ob) ? ob->poselib : NULL; TimeMarker *marker; - char *menustr, name[64]; - int val; + char newname[64]; /* check if valid poselib */ - if (ELEM(NULL, ob, pose)) { - error("PoseLib is only for Armatures in PoseMode"); - return; - } if (act == NULL) { - error("Object doesn't have a valid PoseLib"); - return; + BKE_report(op->reports, RPT_ERROR, "Object doesn't have PoseLib data"); + return OPERATOR_CANCELLED; } - /* get index of pose to remove */ - menustr= poselib_build_poses_menu(act, "Rename PoseLib Pose"); - val= pupmenu_col(menustr, 20); - if (menustr) MEM_freeN(menustr); - - if (val <= 0) return; - marker= BLI_findlink(&act->markers, val-1); - if (marker == NULL) return; + /* get index (and pointer) of pose to remove */ + marker= BLI_findlink(&act->markers, RNA_int_get(op->ptr, "index")); + if (marker == NULL) { + BKE_report(op->reports, RPT_ERROR, "Invalid index for Pose"); + } - /* get name of pose */ - strncpy(name, marker->name, sizeof(name)); - if (sbutton(name, 0, sizeof(name)-1, "Name: ") == 0) - return; + /* get new name */ + RNA_string_get(op->ptr, "name", newname); /* copy name and validate it */ - BLI_strncpy(marker->name, name, sizeof(marker->name)); - BLI_uniquename(&act->markers, marker, "Pose", offsetof(TimeMarker, name), 64); + BLI_strncpy(marker->name, newname, sizeof(marker->name)); + BLI_uniquename(&act->markers, marker, "Pose", '.', offsetof(TimeMarker, name), 64); - /* undo and update */ - BIF_undo_push("PoseLib Rename Pose"); + /* done */ + return OPERATOR_FINISHED; } +void POSELIB_OT_pose_rename (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "PoseLib Rename Pose"; + ot->idname= "POSELIB_OT_pose_rename"; + ot->description= "Rename nth pose from the active Pose Library"; + + /* api callbacks */ + ot->invoke= poselib_stored_pose_menu_invoke; + ot->exec= poselib_rename_exec; + ot->poll= ED_operator_posemode; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "The index of the pose to remove", 0, INT_MAX); + RNA_def_string(ot->srna, "name", "RenamedPose", 64, "New Pose Name", "New name for pose"); +} /* ************************************************************* */ @@ -540,6 +599,10 @@ typedef struct tPoseLib_PreviewData { ListBase backups; /* tPoseLib_Backup structs for restoring poses */ ListBase searchp; /* LinkData structs storing list of poses which match the current search-string */ + Scene *scene; /* active scene */ + ScrArea *sa; /* active area */ + + PointerRNA rna_ptr; /* RNA-Pointer to Object 'ob' */ Object *ob; /* object to work on */ bArmature *arm; /* object's armature data */ bPose *pose; /* object's pose */ @@ -595,13 +658,13 @@ typedef struct tPoseLib_Backup { /* Makes a copy of the current pose for restoration purposes - doesn't do constraints currently */ static void poselib_backup_posecopy (tPoseLib_PreviewData *pld) { - bActionChannel *achan; + bActionGroup *agrp; bPoseChannel *pchan; /* for each posechannel that has an actionchannel in */ - for (achan= pld->act->chanbase.first; achan; achan= achan->next) { + for (agrp= pld->act->groups.first; agrp; agrp= agrp->next) { /* try to find posechannel */ - pchan= get_pose_channel(pld->pose, achan->name); + pchan= get_pose_channel(pld->pose, agrp->name); /* backup data if available */ if (pchan) { @@ -642,74 +705,58 @@ static void poselib_backup_restore (tPoseLib_PreviewData *pld) */ static void poselib_apply_pose (tPoseLib_PreviewData *pld) { + PointerRNA *ptr= &pld->rna_ptr; + bArmature *arm= pld->arm; bPose *pose= pld->pose; bPoseChannel *pchan; bAction *act= pld->act; - bActionChannel *achan; - IpoCurve *icu; - int frame; + bActionGroup *agrp; + + BeztEditData bed; + BeztEditFunc group_ok_cb; + int frame= 1; + /* get the frame */ if (pld->marker) frame= pld->marker->frame; else return; + + /* init settings for testing groups for keyframes */ + group_ok_cb= ANIM_editkeyframes_ok(BEZT_OK_FRAMERANGE); + memset(&bed, 0, sizeof(BeztEditData)); + bed.f1= ((float)frame) - 0.5f; + bed.f2= ((float)frame) + 0.5f; + + /* start applying - only those channels which have a key at this point in time! */ - for (achan= act->chanbase.first; achan; achan= achan->next) { - short found= 0; - - /* apply this achan? */ - if (achan->ipo) { - /* find a keyframe at this frame - users may not have defined the pose on every channel, so this is necessary */ - // TODO: this may be bad for user-defined poses... - for (icu= achan->ipo->curve.first; icu; icu= icu->next) { - BezTriple *bezt; - int i; - - for (i=0, bezt=icu->bezt; i < icu->totvert; i++, bezt++) { - if (IN_RANGE(bezt->vec[1][0], (frame-0.5f), (frame+0.5f))) { - found= 1; - break; - } - } - - if (found) break; - } + for (agrp= act->groups.first; agrp; agrp= agrp->next) { + /* check if group has any keyframes */ + if (ANIM_animchanneldata_keys_bezier_loop(&bed, agrp, ALE_GROUP, NULL, group_ok_cb, NULL, 0)) { + /* has keyframe on this frame, so try to get a PoseChannel with this name */ + pchan= get_pose_channel(pose, agrp->name); - /* apply pose - only if posechannel selected? */ - if (found) { - pchan= get_pose_channel(pose, achan->name); + if (pchan) { + short ok= 0; - if (pchan) { - short ok= 0; - - if (pchan->bone) { - if ( (pchan->bone->flag & (BONE_SELECTED|BONE_ACTIVE)) && - (pchan->bone->flag & BONE_HIDDEN_P)==0 ) - ok = 1; - else if (pld->selcount == 0) - ok= 1; - } - else if (pld->selcount == 0) - ok= 1; - - if (ok) { -#if 0 // XXX old animation system - /* Evaluates and sets the internal ipo values */ - calc_ipo(achan->ipo, (float)frame); - /* This call also sets the pchan flags */ - execute_action_ipo(achan, pchan); -#endif // XXX old animation system - } + /* check if this bone should get any animation applied */ + if (pld->selcount == 0) { + /* if no bones are selected, then any bone is ok */ + ok= 1; + } + else if (pchan->bone) { + /* only ok if bone is visible and selected */ + if ( (pchan->bone->flag & (BONE_SELECTED|BONE_ACTIVE)) && + (pchan->bone->flag & BONE_HIDDEN_P)==0 && + (pchan->bone->layer & arm->layer) ) + ok = 1; } + + if (ok) + animsys_evaluate_action_group(ptr, act, agrp, NULL, (float)frame); } } - - /* tag achan as having been used or not... */ - if (found) - achan->flag |= ACHAN_SELECTED; - else - achan->flag &= ~ACHAN_SELECTED; } } @@ -719,13 +766,13 @@ static void poselib_keytag_pose (Scene *scene, tPoseLib_PreviewData *pld) bPose *pose= pld->pose; bPoseChannel *pchan; bAction *act= pld->act; - bActionChannel *achan; + bActionGroup *agrp; /* start tagging/keying */ - for (achan= act->chanbase.first; achan; achan= achan->next) { + for (agrp= act->groups.first; agrp; agrp= agrp->next) { /* only for selected action channels */ - if (achan->flag & ACHAN_SELECTED) { - pchan= get_pose_channel(pose, achan->name); + if (agrp->flag & AGRP_SELECTED) { + pchan= get_pose_channel(pose, agrp->name); if (pchan) { #if 0 // XXX old animation system @@ -761,11 +808,86 @@ static void poselib_keytag_pose (Scene *scene, tPoseLib_PreviewData *pld) pchan->bone->flag |= BONE_UNKEYED; } #endif // XXX old animation system + } } } } +/* Apply the relevant changes to the pose */ +static void poselib_preview_apply (bContext *C, wmOperator *op) +{ + tPoseLib_PreviewData *pld= (tPoseLib_PreviewData *)op->customdata; + + /* only recalc pose (and its dependencies) if pose has changed */ + if (pld->redraw == PL_PREVIEW_REDRAWALL) { + /* don't clear pose if firsttime */ + if ((pld->flag & PL_PREVIEW_FIRSTTIME)==0) + poselib_backup_restore(pld); + else + pld->flag &= ~PL_PREVIEW_FIRSTTIME; + + /* pose should be the right one to draw (unless we're temporarily not showing it) */ + if ((pld->flag & PL_PREVIEW_SHOWORIGINAL)==0) { + RNA_int_set(op->ptr, "pose_index", BLI_findindex(&pld->act->markers, pld->marker)); + poselib_apply_pose(pld); + } + else + RNA_int_set(op->ptr, "pose_index", -2); /* -2 means don't apply any pose */ + + /* old optimize trick... this enforces to bypass the depgraph + * - note: code copied from transform_generics.c -> recalcData() + */ + // FIXME: shouldn't this use the builtin stuff? + if ((pld->arm->flag & ARM_DELAYDEFORM)==0) + DAG_object_flush_update(pld->scene, pld->ob, OB_RECALC_DATA); /* sets recalc flags */ + else + where_is_pose(pld->scene, pld->ob); + } + + /* do header print - if interactively previewing */ + if (pld->state == PL_PREVIEW_RUNNING) { + if (pld->flag & PL_PREVIEW_SHOWORIGINAL) { + sprintf(pld->headerstr, "PoseLib Previewing Pose: [Showing Original Pose] | Use Tab to start previewing poses again"); + ED_area_headerprint(pld->sa, pld->headerstr); + } + else if (pld->searchstr[0]) { + char tempstr[65]; + char markern[64]; + short index; + + /* get search-string */ + index= pld->search_cursor; + + if (IN_RANGE(index, 0, 64)) { + memcpy(&tempstr[0], &pld->searchstr[0], index); + tempstr[index]= '|'; + memcpy(&tempstr[index+1], &pld->searchstr[index], 64-index); + } + else { + strncpy(tempstr, pld->searchstr, 64); + } + + /* get marker name */ + if (pld->marker) + strcpy(markern, pld->marker->name); + else + strcpy(markern, "No Matches"); + + sprintf(pld->headerstr, "PoseLib Previewing Pose: Filter - [%s] | Current Pose - \"%s\" | Use ScrollWheel or PageUp/Down to change", tempstr, markern); + ED_area_headerprint(pld->sa, pld->headerstr); + } + else { + sprintf(pld->headerstr, "PoseLib Previewing Pose: \"%s\" | Use ScrollWheel or PageUp/Down to change", pld->marker->name); + ED_area_headerprint(pld->sa, pld->headerstr); + } + } + + /* request drawing of view + clear redraw flag */ + WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM|ND_POSE, pld->ob); + pld->redraw= PL_PREVIEW_NOREDRAW; +} + /* ---------------------------- */ /* This helper function is called during poselib_preview_poses to find the @@ -864,6 +986,43 @@ static void poselib_preview_get_next (tPoseLib_PreviewData *pld, int step) /* specially handle events for searching */ static void poselib_preview_handle_search (tPoseLib_PreviewData *pld, unsigned short event, char ascii) { + /* try doing some form of string manipulation first */ + switch (event) { + case BACKSPACEKEY: + if (pld->searchstr[0] && pld->search_cursor) { + short len= strlen(pld->searchstr); + short index= pld->search_cursor; + short i; + + for (i = index; i <= len; i++) + pld->searchstr[i-1] = pld->searchstr[i]; + + pld->search_cursor--; + + poselib_preview_get_next(pld, 1); + pld->redraw = PL_PREVIEW_REDRAWALL; + return; + } + break; + + case DELKEY: + if (pld->searchstr[0] && pld->searchstr[1]) { + short len= strlen(pld->searchstr); + short index= pld->search_cursor; + int i; + + if (index < len) { + for (i = index; i < len; i++) + pld->searchstr[i] = pld->searchstr[i+1]; + + poselib_preview_get_next(pld, 1); + pld->redraw = PL_PREVIEW_REDRAWALL; + return; + } + } + break; + } + if (ascii) { /* character to add to the string */ short index= pld->search_cursor; @@ -883,47 +1042,14 @@ static void poselib_preview_handle_search (tPoseLib_PreviewData *pld, unsigned s poselib_preview_get_next(pld, 1); pld->redraw = PL_PREVIEW_REDRAWALL; } - else { - /* some form of string manipulation */ - switch (event) { - case BACKSPACEKEY: - if (pld->searchstr[0] && pld->search_cursor) { - short len= strlen(pld->searchstr); - short index= pld->search_cursor; - short i; - - for (i = index; i <= len; i++) - pld->searchstr[i-1] = pld->searchstr[i]; - - pld->search_cursor--; - - poselib_preview_get_next(pld, 1); - pld->redraw = PL_PREVIEW_REDRAWALL; - } - break; - - case DELKEY: - if (pld->searchstr[0] && pld->searchstr[1]) { - short len= strlen(pld->searchstr); - short index= pld->search_cursor; - int i; - - if (index < len) { - for (i = index; i < len; i++) - pld->searchstr[i] = pld->searchstr[i+1]; - - poselib_preview_get_next(pld, 1); - pld->redraw = PL_PREVIEW_REDRAWALL; - } - } - break; - } - } } /* handle events for poselib_preview_poses */ -static void poselib_preview_handle_event (tPoseLib_PreviewData *pld, unsigned short event, char ascii) +static int poselib_preview_handle_event (bContext *C, wmOperator *op, wmEvent *event) { + tPoseLib_PreviewData *pld= op->customdata; + int ret = OPERATOR_RUNNING_MODAL; + /* backup stuff that needs to occur before every operation * - make a copy of searchstr, so that we know if cache needs to be rebuilt */ @@ -931,7 +1057,7 @@ static void poselib_preview_handle_event (tPoseLib_PreviewData *pld, unsigned sh /* if we're currently showing the original pose, only certain events are handled */ if (pld->flag & PL_PREVIEW_SHOWORIGINAL) { - switch (event) { + switch (event->type) { /* exit - cancel */ case ESCKEY: case RIGHTMOUSE: @@ -947,33 +1073,33 @@ static void poselib_preview_handle_event (tPoseLib_PreviewData *pld, unsigned sh break; /* view manipulation */ - case MIDDLEMOUSE: - // there's a little bug here that causes the normal header to get drawn while view is manipulated - // XXX handle_view_middlemouse(); - pld->redraw= PL_PREVIEW_REDRAWHEADER; - break; - - /* view manipulation, or searching */ + /* we add pass through here, so that the operators responsible for these can still run, + * even though we still maintain control (as RUNNING_MODAL flag is still set too) + */ case PAD0: case PAD1: case PAD2: case PAD3: case PAD4: case PAD5: case PAD6: case PAD7: case PAD8: case PAD9: - case PADPLUSKEY: case PADMINUS: - //persptoetsen(event); - pld->redraw= PL_PREVIEW_REDRAWHEADER; + case PADPLUSKEY: case PADMINUS: case MIDDLEMOUSE: + //pld->redraw= PL_PREVIEW_REDRAWHEADER; + ret |= OPERATOR_PASS_THROUGH; break; + /* quicky compare to original */ case TABKEY: - pld->flag &= ~PL_PREVIEW_SHOWORIGINAL; - pld->redraw= PL_PREVIEW_REDRAWALL; + /* only respond to one event */ + if (event->val == 0) { + pld->flag &= ~PL_PREVIEW_SHOWORIGINAL; + pld->redraw= PL_PREVIEW_REDRAWALL; + } break; } /* EXITS HERE... */ - return; + return ret; } /* NORMAL EVENT HANDLING... */ /* searching takes priority over normal activity */ - switch (event) { + switch (event->type) { /* exit - cancel */ case ESCKEY: case RIGHTMOUSE: @@ -990,8 +1116,11 @@ static void poselib_preview_handle_event (tPoseLib_PreviewData *pld, unsigned sh /* toggle between original pose and poselib pose*/ case TABKEY: - pld->flag |= PL_PREVIEW_SHOWORIGINAL; - pld->redraw= PL_PREVIEW_REDRAWALL; + /* only respond to one event */ + if (event->val == 0) { + pld->flag |= PL_PREVIEW_SHOWORIGINAL; + pld->redraw= PL_PREVIEW_REDRAWALL; + } break; /* change to previous pose (cyclic) */ @@ -1079,12 +1208,14 @@ static void poselib_preview_handle_event (tPoseLib_PreviewData *pld, unsigned sh pld->redraw= PL_PREVIEW_REDRAWALL; } break; - + /* view manipulation */ + /* we add pass through here, so that the operators responsible for these can still run, + * even though we still maintain control (as RUNNING_MODAL flag is still set too) + */ case MIDDLEMOUSE: - // there's a little bug here that causes the normal header to get drawn while view is manipulated - // XXX handle_view_middlemouse(); - pld->redraw= PL_PREVIEW_REDRAWHEADER; + //pld->redraw= PL_PREVIEW_REDRAWHEADER; + ret |= OPERATOR_PASS_THROUGH; break; /* view manipulation, or searching */ @@ -1092,67 +1223,88 @@ static void poselib_preview_handle_event (tPoseLib_PreviewData *pld, unsigned sh case PAD5: case PAD6: case PAD7: case PAD8: case PAD9: case PADPLUSKEY: case PADMINUS: if (pld->searchstr[0]) { - poselib_preview_handle_search(pld, event, ascii); + /* searching... */ + poselib_preview_handle_search(pld, event->type, event->ascii); } else { - persptoetsen(event); - pld->redraw= PL_PREVIEW_REDRAWHEADER; + /* view manipulation (see above) */ + //pld->redraw= PL_PREVIEW_REDRAWHEADER; + ret |= OPERATOR_PASS_THROUGH; } break; /* otherwise, assume that searching might be able to handle it */ default: - poselib_preview_handle_search(pld, event, ascii); + poselib_preview_handle_search(pld, event->type, event->ascii); break; } + + return ret; } /* ---------------------------- */ /* Init PoseLib Previewing data */ -static void poselib_preview_init_data (tPoseLib_PreviewData *pld, Object *ob, short apply_active) +static void poselib_preview_init_data (bContext *C, wmOperator *op) { - /* clear pld first as it resides on the stack */ - memset(pld, 0, sizeof(tPoseLib_PreviewData)); + tPoseLib_PreviewData *pld; + Object *ob= CTX_data_active_object(C); + int pose_index = RNA_int_get(op->ptr, "pose_index"); + + /* set up preview state info */ + op->customdata= pld= MEM_callocN(sizeof(tPoseLib_PreviewData), "PoseLib Preview Data"); /* get basic data */ pld->ob= ob; pld->arm= (ob) ? (ob->data) : NULL; pld->pose= (ob) ? (ob->pose) : NULL; pld->act= (ob) ? (ob->poselib) : NULL; - pld->marker= poselib_get_active_pose(pld->act); + + pld->scene= CTX_data_scene(C); + pld->sa= CTX_wm_area(C); + + /* get starting pose based on RNA-props for this operator */ + if (pose_index == -1) + pld->marker= poselib_get_active_pose(pld->act); + else if (pose_index == -2) + pld->flag |= PL_PREVIEW_SHOWORIGINAL; + else + pld->marker= (pld->act) ? BLI_findlink(&pld->act->markers, pose_index) : NULL; /* check if valid poselib */ if (ELEM3(NULL, pld->ob, pld->pose, pld->arm)) { - error("PoseLib is only for Armatures in PoseMode"); + BKE_report(op->reports, RPT_ERROR, "PoseLib is only for Armatures in PoseMode"); pld->state= PL_PREVIEW_ERROR; return; } if (pld->act == NULL) { - error("Object doesn't have a valid PoseLib"); + BKE_report(op->reports, RPT_ERROR, "Object doesn't have a valid PoseLib"); pld->state= PL_PREVIEW_ERROR; return; } if (pld->marker == NULL) { - if ((apply_active==0) && (pld->act->markers.first)) { + if (pld->act->markers.first) { /* just use first one then... */ pld->marker= pld->act->markers.first; - printf("PoseLib had no active pose\n"); + if (pose_index > -2) printf("PoseLib had no active pose\n"); } else { - error("PoseLib has no poses to preview/apply"); + BKE_report(op->reports, RPT_ERROR, "PoseLib has no poses to preview/apply"); pld->state= PL_PREVIEW_ERROR; return; } } + /* get ID pointer for applying poses */ + RNA_id_pointer_create(&ob->id, &pld->rna_ptr); + /* make backups for restoring pose */ poselib_backup_posecopy(pld); /* set flags for running */ - pld->state= (apply_active) ? PL_PREVIEW_RUNONCE : PL_PREVIEW_RUNNING; + pld->state= PL_PREVIEW_RUNNING; pld->redraw= PL_PREVIEW_REDRAWALL; - pld->flag= PL_PREVIEW_FIRSTTIME; + pld->flag |= PL_PREVIEW_FIRSTTIME; /* set depsgraph flags */ /* make sure the lock is set OK, unlock can be accidentally saved? */ @@ -1167,14 +1319,19 @@ static void poselib_preview_init_data (tPoseLib_PreviewData *pld, Object *ob, sh } /* After previewing poses */ -static void poselib_preview_cleanup (Scene *scene, tPoseLib_PreviewData *pld) +static void poselib_preview_cleanup (bContext *C, wmOperator *op) { + tPoseLib_PreviewData *pld= (tPoseLib_PreviewData *)op->customdata; + Scene *scene= pld->scene; Object *ob= pld->ob; bPose *pose= pld->pose; bArmature *arm= pld->arm; bAction *act= pld->act; TimeMarker *marker= pld->marker; + /* redraw the header so that it doesn't show any of our stuff anymore */ + ED_area_headerprint(pld->sa, NULL); + /* this signal does one recalc on pose, then unlocks, so ESC or edit will work */ pose->flag |= POSE_DO_UNLOCK; @@ -1204,8 +1361,7 @@ static void poselib_preview_cleanup (Scene *scene, tPoseLib_PreviewData *pld) /* updates */ if (IS_AUTOKEY_MODE(scene, NORMAL)) { - remake_action_ipos(ob->action); - + //remake_action_ipos(ob->action); } else { /* need to trick depgraph, action is not allowed to execute on pose */ @@ -1217,117 +1373,124 @@ static void poselib_preview_cleanup (Scene *scene, tPoseLib_PreviewData *pld) /* free memory used for backups */ BLI_freelistN(&pld->backups); BLI_freelistN(&pld->searchp); + + /* free temp data for operator */ + MEM_freeN(pld); + op->customdata= NULL; } +/* End previewing operation */ +static int poselib_preview_exit (bContext *C, wmOperator *op) +{ + tPoseLib_PreviewData *pld= op->customdata; + + /* finish up */ + poselib_preview_cleanup(C, op); + + if (ELEM(pld->state, PL_PREVIEW_CANCEL, PL_PREVIEW_ERROR)) + return OPERATOR_CANCELLED; + else + return OPERATOR_FINISHED; +} +/* Cancel previewing operation (called when exiting Blender) */ +static int poselib_preview_cancel (bContext *C, wmOperator *op) +{ + poselib_preview_exit(C, op); + return OPERATOR_CANCELLED; +} -/* This tool allows users to preview the pose from the pose-lib using the mouse-scrollwheel/pageupdown - * It is also used to apply the active poselib pose only - */ -void poselib_preview_poses (Scene *scene, Object *ob, short apply_active) +/* main modal status check */ +static int poselib_preview_modal (bContext *C, wmOperator *op, wmEvent *event) { - tPoseLib_PreviewData pld; + tPoseLib_PreviewData *pld= op->customdata; + int ret; - unsigned short event; - short val=0; - char ascii; + /* 1) check state to see if we're still running */ + if (pld->state != PL_PREVIEW_RUNNING) + return poselib_preview_exit(C, op); - /* check if valid poselib */ - poselib_preview_init_data(&pld, ob, apply_active); - if (pld.state == PL_PREVIEW_ERROR) - return; - - /* start preview loop */ - while (ELEM(pld.state, PL_PREVIEW_RUNNING, PL_PREVIEW_RUNONCE)) { - /* preview a pose */ - if (pld.redraw) { - /* only recalc pose (and its dependencies) if pose has changed */ - if (pld.redraw == PL_PREVIEW_REDRAWALL) { - /* don't clear pose if firsttime */ - if ((pld.flag & PL_PREVIEW_FIRSTTIME)==0) - poselib_backup_restore(&pld); - else - pld.flag &= ~PL_PREVIEW_FIRSTTIME; - - /* pose should be the right one to draw (unless we're temporarily not showing it) */ - if ((pld.flag & PL_PREVIEW_SHOWORIGINAL)==0) - poselib_apply_pose(&pld); - - /* old optimize trick... this enforces to bypass the depgraph - * - note: code copied from transform_generics.c -> recalcData() - */ - if ((pld.arm->flag & ARM_DELAYDEFORM)==0) - DAG_object_flush_update(scene, ob, OB_RECALC_DATA); /* sets recalc flags */ - else - where_is_pose(scene, ob); - } - - /* do header print - if interactively previewing */ - if (pld.state == PL_PREVIEW_RUNNING) { - if (pld.flag & PL_PREVIEW_SHOWORIGINAL) { - sprintf(pld.headerstr, "PoseLib Previewing Pose: [Showing Original Pose] | Use Tab to start previewing poses again"); - headerprint(pld.headerstr); - } - else if (pld.searchstr[0]) { - char tempstr[65]; - char markern[64]; - short index; - - /* get search-string */ - index= pld.search_cursor; - - if (IN_RANGE(index, 0, 64)) { - memcpy(&tempstr[0], &pld.searchstr[0], index); - tempstr[index]= '|'; - memcpy(&tempstr[index+1], &pld.searchstr[index], 64-index); - } - else { - strncpy(tempstr, pld.searchstr, 64); - } - - /* get marker name */ - if (pld.marker) - strcpy(markern, pld.marker->name); - else - strcpy(markern, "No Matches"); - - sprintf(pld.headerstr, "PoseLib Previewing Pose: Filter - [%s] | Current Pose - \"%s\" | Use ScrollWheel or PageUp/Down to change", tempstr, markern); - headerprint(pld.headerstr); - } - else { - sprintf(pld.headerstr, "PoseLib Previewing Pose: \"%s\" | Use ScrollWheel or PageUp/Down to change", pld.marker->name); - headerprint(pld.headerstr); - } - } - - /* force drawing of view + clear redraw flag */ - // XXX force_draw(0); - pld.redraw= PL_PREVIEW_NOREDRAW; - } - - /* stop now if only running once */ - if (pld.state == PL_PREVIEW_RUNONCE) { - pld.state = PL_PREVIEW_CONFIRM; - break; - } - - /* essential for idling subloop */ - if (qtest() == 0) - PIL_sleep_ms(2); - - /* emptying queue and reading events */ - while ( qtest() ) { - event= extern_qread_ext(&val, &ascii); - - /* event processing */ - if (val) { - poselib_preview_handle_event(&pld, event, ascii); - } - } + /* 2) handle events */ + ret= poselib_preview_handle_event(C, op, event); + + /* 3) apply changes and redraw, otherwise, confirming goes wrong */ + if (pld->redraw) + poselib_preview_apply(C, op); + + return ret; +} + +/* Modal Operator init */ +static int poselib_preview_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + tPoseLib_PreviewData *pld; + + /* check if everything is ok, and init settings for modal operator */ + poselib_preview_init_data(C, op); + pld= (tPoseLib_PreviewData *)op->customdata; + + if (pld->state == PL_PREVIEW_ERROR) { + /* an error occurred, so free temp mem used */ + poselib_preview_cleanup(C, op); + return OPERATOR_CANCELLED; } - /* finish up */ - poselib_preview_cleanup(scene, &pld); + /* do initial apply to have something to look at */ + poselib_preview_apply(C, op); + + /* add temp handler if we're running as a modal operator */ + WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + + return OPERATOR_RUNNING_MODAL; +} + +/* Repeat operator */ +static int poselib_preview_exec (bContext *C, wmOperator *op) +{ + tPoseLib_PreviewData *pld; + + /* check if everything is ok, and init settings for modal operator */ + poselib_preview_init_data(C, op); + pld= (tPoseLib_PreviewData *)op->customdata; + + if (pld->state == PL_PREVIEW_ERROR) { + /* an error occurred, so free temp mem used */ + poselib_preview_cleanup(C, op); + return OPERATOR_CANCELLED; + } + + /* the exec() callback is effectively a 'run-once' scenario, so set the state to that + * so that everything draws correctly + */ + pld->state = PL_PREVIEW_RUNONCE; + + /* apply the active pose */ + poselib_preview_apply(C, op); + + /* now, set the status to exit */ + pld->state = PL_PREVIEW_CONFIRM; + + /* cleanup */ + return poselib_preview_exit(C, op); +} + +void POSELIB_OT_browse_interactive (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "PoseLib Browse Poses"; + ot->idname= "POSELIB_OT_browse_interactive"; + ot->description= "Interactively browse poses in 3D-View"; + + /* api callbacks */ + ot->invoke= poselib_preview_invoke; + ot->modal= poselib_preview_modal; + ot->cancel= poselib_preview_cancel; + ot->exec= poselib_preview_exec; + ot->poll= ED_operator_posemode; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - BIF_undo_push("PoseLib Apply Pose"); + /* properties */ + RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, "Pose", "Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)", 0, INT_MAX); } diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index ae82c063435..3d8d446c579 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -970,7 +970,7 @@ void pose_add_posegroup (Scene *scene) grp= MEM_callocN(sizeof(bActionGroup), "PoseGroup"); strcpy(grp->name, "Group"); BLI_addtail(&pose->agroups, grp); - BLI_uniquename(&pose->agroups, grp, "Group", offsetof(bActionGroup, name), 32); + BLI_uniquename(&pose->agroups, grp, "Group", '.', offsetof(bActionGroup, name), 32); pose->active_group= BLI_countlist(&pose->agroups); @@ -1237,7 +1237,6 @@ static short pose_select_same_layer (Object *ob) return changed; } - void pose_select_grouped (Scene *scene, short nr) { short changed = 0; @@ -1669,9 +1668,7 @@ void pose_special_editmenu(Scene *scene) pose_clear_paths(ob); } else if(nr==5) { - rest_pose(ob->pose); - DAG_object_flush_update(scene, ob, OB_RECALC_DATA); - BIF_undo_push("Clear User Transform Pose"); + pose_clear_user_transforms(scene, ob); } else if(nr==6) { pose_relax(); @@ -1682,3 +1679,29 @@ void pose_special_editmenu(Scene *scene) #endif } +/* Restore selected pose-bones to 'action'-defined pose */ +void pose_clear_user_transforms(Scene *scene, Object *ob) +{ + bArmature *arm= ob->data; + bPoseChannel *pchan; + + if (ob->pose == NULL) + return; + + /* find selected bones */ + for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { + if (pchan->bone && (pchan->bone->flag & BONE_SELECTED) && (pchan->bone->layer & arm->layer)) { + /* just clear the BONE_UNKEYED flag, allowing this bone to get overwritten by actions again */ + pchan->bone->flag &= ~BONE_UNKEYED; + } + } + + /* clear pose locking flag + * - this will only clear the user-defined pose in the selected bones, where BONE_UNKEYED has been cleared + */ + ob->pose->flag |= POSE_DO_UNLOCK; + + DAG_object_flush_update(scene, ob, OB_RECALC_DATA); + BIF_undo_push("Clear User Transform"); +} + diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c index a197172fff8..f8c17f80391 100644 --- a/source/blender/editors/armature/reeb.c +++ b/source/blender/editors/armature/reeb.c @@ -53,8 +53,6 @@ //#include "BDR_editobject.h" -#include "BMF_Api.h" - #include "ED_mesh.h" #include "ED_armature.h" //#include "BIF_interface.h" @@ -1740,10 +1738,10 @@ int filterCyclesReebGraph(ReebGraph *rg, float distance_threshold) int filterSmartReebGraph(ReebGraph *rg, float threshold) { - ReebArc *arc = NULL, *nextArc = NULL; int value = 0; +#if 0 //XXX + ReebArc *arc = NULL, *nextArc = NULL; - #if 0 //XXX BLI_sortlist(&rg->arcs, compareArcs); #ifdef DEBUG_REEB @@ -3403,7 +3401,7 @@ ReebGraph *BIF_ReebGraphMultiFromEditMesh(bContext *C) if (weightFromDistance(em, &indexed_edges) == 0) { - error("No selected vertex\n"); + // XXX error("No selected vertex\n"); freeEdgeIndex(&indexed_edges); return NULL; } diff --git a/source/blender/editors/curve/Makefile b/source/blender/editors/curve/Makefile index b27749ce6fd..6b1f628f231 100644 --- a/source/blender/editors/curve/Makefile +++ b/source/blender/editors/curve/Makefile @@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS) CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(OPENGL_HEADERS) -CPPFLAGS += -I$(NAN_BMFONT)/include CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include CPPFLAGS += -I$(NAN_ELBEEM)/include diff --git a/source/blender/editors/curve/SConscript b/source/blender/editors/curve/SConscript index 92c982db611..3a1930899d3 100644 --- a/source/blender/editors/curve/SConscript +++ b/source/blender/editors/curve/SConscript @@ -5,7 +5,7 @@ sources = env.Glob('*.c') incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' -incs += ' #/intern/guardedalloc #intern/bmfont ../../gpu' +incs += ' #/intern/guardedalloc ../../gpu' incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern' env.BlenderLib ( 'bf_editors_curve', sources, Split(incs), [], libtype=['core'], priority=[45] ) diff --git a/source/blender/editors/curve/curve_intern.h b/source/blender/editors/curve/curve_intern.h index 71684ceae7a..a73a54323ee 100644 --- a/source/blender/editors/curve/curve_intern.h +++ b/source/blender/editors/curve/curve_intern.h @@ -41,7 +41,7 @@ enum { CASE_LOWER, CASE_UPPER }; enum { LINE_BEGIN, LINE_END, PREV_CHAR, NEXT_CHAR, PREV_WORD, NEXT_WORD, PREV_LINE, NEXT_LINE, PREV_PAGE, NEXT_PAGE }; -void FONT_OT_insert_text(struct wmOperatorType *ot); +void FONT_OT_text_insert(struct wmOperatorType *ot); void FONT_OT_line_break(struct wmOperatorType *ot); void FONT_OT_insert_lorem(struct wmOperatorType *ot); @@ -51,11 +51,11 @@ void FONT_OT_style_toggle(struct wmOperatorType *ot); void FONT_OT_style_set(struct wmOperatorType *ot); void FONT_OT_material_set(struct wmOperatorType *ot); -void FONT_OT_copy_text(struct wmOperatorType *ot); -void FONT_OT_cut_text(struct wmOperatorType *ot); -void FONT_OT_paste_text(struct wmOperatorType *ot); -void FONT_OT_paste_file(struct wmOperatorType *ot); -void FONT_OT_paste_buffer(struct wmOperatorType *ot); +void FONT_OT_text_copy(struct wmOperatorType *ot); +void FONT_OT_text_cut(struct wmOperatorType *ot); +void FONT_OT_text_paste(struct wmOperatorType *ot); +void FONT_OT_file_paste(struct wmOperatorType *ot); +void FONT_OT_buffer_paste(struct wmOperatorType *ot); void FONT_OT_move(struct wmOperatorType *ot); void FONT_OT_move_select(struct wmOperatorType *ot); @@ -99,7 +99,7 @@ void CURVE_OT_switch_direction(struct wmOperatorType *ot); void CURVE_OT_subdivide(struct wmOperatorType *ot); void CURVE_OT_make_segment(struct wmOperatorType *ot); void CURVE_OT_spin(struct wmOperatorType *ot); -void CURVE_OT_add_vertex(struct wmOperatorType *ot); +void CURVE_OT_vertex_add(struct wmOperatorType *ot); void CURVE_OT_extrude(struct wmOperatorType *ot); void CURVE_OT_cyclic_toggle(struct wmOperatorType *ot); diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c index a0390fe1084..5292d86d3c9 100644 --- a/source/blender/editors/curve/curve_ops.c +++ b/source/blender/editors/curve/curve_ops.c @@ -67,16 +67,18 @@ static int specials_menu_invoke(bContext *C, wmOperator *op, wmEvent *event) { - uiMenuItem *head; - - head= uiPupMenuBegin("Specials", 0); - uiMenuItemO(head, 0, "CURVE_OT_subdivide"); - uiMenuItemO(head, 0, "CURVE_OT_switch_direction"); - uiMenuItemO(head, 0, "CURVE_OT_spline_weight_set"); - uiMenuItemO(head, 0, "CURVE_OT_radius_set"); - uiMenuItemO(head, 0, "CURVE_OT_smooth"); - uiMenuItemO(head, 0, "CURVE_OT_smooth_radius"); - uiPupMenuEnd(C, head); + uiPopupMenu *pup; + uiLayout *layout; + + pup= uiPupMenuBegin(C, "Specials", 0); + layout= uiPupMenuLayout(pup); + uiItemO(layout, NULL, 0, "CURVE_OT_subdivide"); + uiItemO(layout, NULL, 0, "CURVE_OT_switch_direction"); + uiItemO(layout, NULL, 0, "CURVE_OT_spline_weight_set"); + uiItemO(layout, NULL, 0, "CURVE_OT_radius_set"); + uiItemO(layout, NULL, 0, "CURVE_OT_smooth"); + uiItemO(layout, NULL, 0, "CURVE_OT_smooth_radius"); + uiPupMenuEnd(C, pup); return OPERATOR_CANCELLED; } @@ -96,7 +98,7 @@ void CURVE_OT_specials_menu(wmOperatorType *ot) void ED_operatortypes_curve(void) { - WM_operatortype_append(FONT_OT_insert_text); + WM_operatortype_append(FONT_OT_text_insert); WM_operatortype_append(FONT_OT_line_break); WM_operatortype_append(FONT_OT_insert_lorem); @@ -106,11 +108,11 @@ void ED_operatortypes_curve(void) WM_operatortype_append(FONT_OT_style_set); WM_operatortype_append(FONT_OT_material_set); - WM_operatortype_append(FONT_OT_copy_text); - WM_operatortype_append(FONT_OT_cut_text); - WM_operatortype_append(FONT_OT_paste_text); - WM_operatortype_append(FONT_OT_paste_file); - WM_operatortype_append(FONT_OT_paste_buffer); + WM_operatortype_append(FONT_OT_text_copy); + WM_operatortype_append(FONT_OT_text_cut); + WM_operatortype_append(FONT_OT_text_paste); + WM_operatortype_append(FONT_OT_file_paste); + WM_operatortype_append(FONT_OT_buffer_paste); WM_operatortype_append(FONT_OT_move); WM_operatortype_append(FONT_OT_move_select); @@ -153,7 +155,7 @@ void ED_operatortypes_curve(void) WM_operatortype_append(CURVE_OT_subdivide); WM_operatortype_append(CURVE_OT_make_segment); WM_operatortype_append(CURVE_OT_spin); - WM_operatortype_append(CURVE_OT_add_vertex); + WM_operatortype_append(CURVE_OT_vertex_add); WM_operatortype_append(CURVE_OT_extrude); WM_operatortype_append(CURVE_OT_cyclic_toggle); @@ -200,18 +202,18 @@ void ED_keymap_curve(wmWindowManager *wm) RNA_int_set(WM_keymap_add_item(keymap, "FONT_OT_change_character", UPARROWKEY, KM_PRESS, KM_ALT, 0)->ptr, "delta", 1); RNA_int_set(WM_keymap_add_item(keymap, "FONT_OT_change_character", DOWNARROWKEY, KM_PRESS, KM_ALT, 0)->ptr, "delta", -1); - WM_keymap_add_item(keymap, "FONT_OT_copy_text", CKEY, KM_PRESS, KM_CTRL, 0); - WM_keymap_add_item(keymap, "FONT_OT_cut_text", XKEY, KM_PRESS, KM_CTRL, 0); - WM_keymap_add_item(keymap, "FONT_OT_paste_text", PKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "FONT_OT_text_copy", CKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "FONT_OT_text_cut", XKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "FONT_OT_text_paste", PKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "FONT_OT_line_break", RETKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "FONT_OT_insert_text", KM_TEXTINPUT, KM_ANY, KM_ANY, 0); // last! + WM_keymap_add_item(keymap, "FONT_OT_text_insert", KM_TEXTINPUT, KM_ANY, KM_ANY, 0); // last! /* only set in editmode curve, by space_view3d listener */ keymap= WM_keymap_listbase(wm, "Curve", 0, 0); WM_keymap_add_item(keymap, "OBJECT_OT_curve_add", AKEY, KM_PRESS, KM_SHIFT, 0); - WM_keymap_add_item(keymap, "CURVE_OT_add_vertex", ACTIONMOUSE, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "CURVE_OT_vertex_add", ACTIONMOUSE, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "CURVE_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "CURVE_OT_select_row", RKEY, KM_PRESS, KM_SHIFT, 0); diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index ce639e4bfc1..45b9a589bd5 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -38,8 +38,6 @@ #include <stdlib.h> #include "MEM_guardedalloc.h" -#include "BMF_Api.h" - #include "BLI_blenlib.h" #include "BLI_arithb.h" #include "BLI_dynstr.h" @@ -652,7 +650,7 @@ static int deleteflagNurb(bContext *C, wmOperator *op, int flag) nu->bp= newbp; clamp_nurb_order_v(nu); - makeknots(nu, 2, nu->flagv>>1); + makeknots(nu, 2); } else { /* is the nurb in V direction selected */ @@ -698,7 +696,7 @@ static int deleteflagNurb(bContext *C, wmOperator *op, int flag) nu->pntsu= newu; clamp_nurb_order_u(nu); } - makeknots(nu, 1, nu->flagu>>1); + makeknots(nu, 1); } } } @@ -746,7 +744,7 @@ static short extrudeflagNurb(ListBase *editnurb, int flag) nu->pntsv= 2; nu->orderv= 2; - makeknots(nu, 2, nu->flagv>>1); + makeknots(nu, 2); } } else { @@ -789,7 +787,7 @@ static short extrudeflagNurb(ListBase *editnurb, int flag) MEM_freeN(nu->bp); nu->bp= newbp; nu->pntsv++; - makeknots(nu, 2, nu->flagv>>1); + makeknots(nu, 2); } else if(v==0 || v== nu->pntsu-1) { /* collumn in v-direction selected */ ok= 1; @@ -816,7 +814,7 @@ static short extrudeflagNurb(ListBase *editnurb, int flag) MEM_freeN(nu->bp); nu->bp= newbp; nu->pntsu++; - makeknots(nu, 1, nu->flagu>>1); + makeknots(nu, 1); } } } @@ -911,7 +909,7 @@ static void adduplicateflagNurb(Object *obedit, short flag) /* knots */ newnu->knotsu= NULL; - makeknots(newnu, 1, newnu->flagu>>1); + makeknots(newnu, 1); } bp++; } @@ -975,14 +973,14 @@ static void adduplicateflagNurb(Object *obedit, short flag) if(nu->pntsu==newnu->pntsu && nu->knotsu) { newnu->knotsu= MEM_dupallocN( nu->knotsu ); } else { - makeknots(newnu, 1, newnu->flagu>>1); + makeknots(newnu, 1); } } if (check_valid_nurb_v(newnu)) { if(nu->pntsv==newnu->pntsv && nu->knotsv) { newnu->knotsv= MEM_dupallocN( nu->knotsv ); } else { - makeknots(newnu, 2, newnu->flagv>>1); + makeknots(newnu, 2); } } } @@ -1069,10 +1067,9 @@ void CURVE_OT_spline_weight_set(wmOperatorType *ot) /* api callbacks */ ot->exec= set_weight_exec; + ot->invoke= WM_operator_redo; ot->poll= ED_operator_editsurfcurve; - // XXX invoke popup? - /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1121,10 +1118,9 @@ void CURVE_OT_radius_set(wmOperatorType *ot) /* api callbacks */ ot->exec= set_radius_exec; + ot->invoke= WM_operator_redo; ot->poll= ED_operator_editsurfcurve; - // XXX invoke popup? - /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1964,8 +1960,8 @@ static int subdivide_exec(bContext *C, wmOperator *op) nu->bp= bpnew; nu->pntsu+= amount; - if(nu->type & 4) { - makeknots(nu, 1, nu->flagu>>1); + if(nu->type & CU_NURBS) { + makeknots(nu, 1); } } } /* End of 'else if(nu->pntsv==1)' */ @@ -2076,8 +2072,8 @@ static int subdivide_exec(bContext *C, wmOperator *op) nu->bp= bpnew; nu->pntsu= 2*nu->pntsu-1; nu->pntsv= 2*nu->pntsv-1; - makeknots(nu, 1, nu->flagu>>1); - makeknots(nu, 2, nu->flagv>>1); + makeknots(nu, 1); + makeknots(nu, 2); } /* End of 'if(sel== nu->pntsu*nu->pntsv)' (subdivide entire NURB) */ else { /* subdivide in v direction? */ @@ -2120,7 +2116,7 @@ static int subdivide_exec(bContext *C, wmOperator *op) MEM_freeN(nu->bp); nu->bp= bpnew; nu->pntsv+= sel; - makeknots(nu, 2, nu->flagv>>1); + makeknots(nu, 2); } else { /* or in u direction? */ @@ -2160,7 +2156,7 @@ static int subdivide_exec(bContext *C, wmOperator *op) MEM_freeN(nu->bp); nu->bp= bpnew; nu->pntsu+= sel; - makeknots(nu, 1, nu->flagu>>1); /* shift knots + makeknots(nu, 1); /* shift knots forward */ } } @@ -2318,7 +2314,7 @@ static int convertspline(short type, Nurb *nu) BPoint *bp; int a, c, nr; - if((nu->type & 7)==0) { /* Poly */ + if((nu->type & 7)==CU_POLY) { if(type==CU_BEZIER) { /* to Bezier with vecthandles */ nr= nu->pntsu; bezt = @@ -2339,16 +2335,16 @@ static int convertspline(short type, Nurb *nu) nu->bp= 0; nu->pntsu= nr; nu->type &= ~7; - nu->type |= 1; + nu->type |= CU_BEZIER; calchandlesNurb(nu); } else if(type==CU_NURBS) { nu->type &= ~7; - nu->type+= 4; + nu->type |= CU_NURBS; nu->orderu= 4; nu->flagu &= CU_CYCLIC; /* disable all flags except for cyclic */ nu->flagu += 4; - makeknots(nu, 1, nu->flagu>>1); + makeknots(nu, 1); a= nu->pntsu*nu->pntsv; bp= nu->bp; while(a--) { @@ -2402,7 +2398,7 @@ static int convertspline(short type, Nurb *nu) if(type== 4) { nu->flagu &= CU_CYCLIC; /* disable all flags except for cyclic */ nu->flagu += 4; - makeknots(nu, 1, nu->flagu>>1); + makeknots(nu, 1); } } } @@ -2444,7 +2440,7 @@ static int convertspline(short type, Nurb *nu) nu->knotsu= NULL; nu->pntsu= nr; nu->type &= ~7; - nu->type+= 1; + nu->type |= CU_BEZIER; } } } @@ -2805,12 +2801,12 @@ static void merge_2_nurb(wmOperator *op, ListBase *editnurb, Nurb *nu1, Nurb *nu } } - if((nu1->type & 7)==4) { + if((nu1->type & 7)==CU_NURBS) { /* merge knots */ - makeknots(nu1, 1, nu1->flagu>>1); + makeknots(nu1, 1); /* make knots, for merged curved for example */ - makeknots(nu1, 2, nu1->flagv>>1); + makeknots(nu1, 2); } MEM_freeN(temp); @@ -2993,9 +2989,9 @@ static int make_segment_exec(bContext *C, wmOperator *op) BLI_remlink(editnurb, nu2); /* now join the knots */ - if((nu1->type & 7)==4) { + if((nu1->type & 7)==CU_NURBS) { if(nu1->knotsu==NULL) { - makeknots(nu1, 1, nu1->flagu>>1); + makeknots(nu1, 1); } else { fp= MEM_mallocN(sizeof(float)*KNOTSU(nu1), "addsegment3"); @@ -3218,7 +3214,7 @@ static int spin_nurb(bContext *C, Scene *scene, Object *obedit, float *dvec, sho if(isNurbsel(nu)) { nu->orderv= 4; nu->flagv |= CU_CYCLIC; - makeknots(nu, 2, nu->flagv>>1); + makeknots(nu, 2); } } } @@ -3354,7 +3350,7 @@ static int addvert_Nurb(bContext *C, short mode, float location[3]) if(bp) { nu->pntsu++; - makeknots(nu, 1, nu->flagu>>1); + makeknots(nu, 1); if(mode=='e') { VECCOPY(newbp->vec, bp->vec); @@ -3406,11 +3402,11 @@ static int add_vertex_invoke(bContext *C, wmOperator *op, wmEvent *event) return add_vertex_exec(C, op); } -void CURVE_OT_add_vertex(wmOperatorType *ot) +void CURVE_OT_vertex_add(wmOperatorType *ot) { /* identifiers */ ot->name= "Add Vertex"; - ot->idname= "CURVE_OT_add_vertex"; + ot->idname= "CURVE_OT_vertex_add"; /* api callbacks */ ot->exec= add_vertex_exec; @@ -3494,7 +3490,7 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op) for(nu= editnurb->first; nu; nu= nu->next) { if( nu->pntsu>1 || nu->pntsv>1) { - if( (nu->type & 7)==0 ) { + if( (nu->type & 7)==CU_POLY ) { a= nu->pntsu; bp= nu->bp; while(a--) { @@ -3524,7 +3520,7 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op) while(a--) { if( bp->f1 & SELECT ) { nu->flagu ^= CU_CYCLIC; - makeknots(nu, 1, nu->flagu>>1); /* 1==u type is ignored for cyclic curves */ + makeknots(nu, 1); /* 1==u type is ignored for cyclic curves */ break; } bp++; @@ -3539,11 +3535,11 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op) if( bp->f1 & SELECT) { if(direction==0 && nu->pntsu>1) { nu->flagu ^= CU_CYCLIC; - makeknots(nu, 1, nu->flagu>>1); /* 1==u type is ignored for cyclic curves */ + makeknots(nu, 1); /* 1==u type is ignored for cyclic curves */ } if(direction==1 && nu->pntsv>1) { nu->flagv ^= CU_CYCLIC; - makeknots(nu, 2, nu->flagv>>1); /* 2==v type is ignored for cyclic curves */ + makeknots(nu, 2); /* 2==v type is ignored for cyclic curves */ } break; } @@ -3564,15 +3560,17 @@ static int toggle_cyclic_invoke(bContext *C, wmOperator *op, wmEvent *event) { Object *obedit= CTX_data_edit_object(C); ListBase *editnurb= curve_get_editcurve(obedit); - uiMenuItem *head; + uiPopupMenu *pup; + uiLayout *layout; Nurb *nu; for(nu= editnurb->first; nu; nu= nu->next) { if(nu->pntsu>1 || nu->pntsv>1) { if(nu->type==CU_NURBS) { - head= uiPupMenuBegin("Direction", 0); - uiMenuItemsEnumO(head, op->type->idname, "direction"); - uiPupMenuEnd(C, head); + pup= uiPupMenuBegin(C, "Direction", 0); + layout= uiPupMenuLayout(pup); + uiItemsEnumO(layout, op->type->idname, "direction"); + uiPupMenuEnd(C, pup); return OPERATOR_CANCELLED; } } @@ -4147,9 +4145,8 @@ void CURVE_OT_select_random(wmOperatorType *ot) /* api callbacks */ ot->exec= select_random_exec; + ot->invoke= WM_operator_redo; ot->poll= ED_operator_editsurfcurve; - - // XXX invoke popup? /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -4182,9 +4179,8 @@ void CURVE_OT_select_every_nth(wmOperatorType *ot) /* api callbacks */ ot->exec= select_every_nth_exec; + ot->invoke= WM_operator_redo; ot->poll= ED_operator_editsurfcurve; - - // XXX invoke popup? /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -4353,7 +4349,7 @@ static int delete_exec(bContext *C, wmOperator *op) clamp_nurb_order_u(nu); }*/ } - makeknots(nu, 1, nu->flagu>>1); + makeknots(nu, 1); } nu= next; } @@ -4511,18 +4507,21 @@ static int delete_exec(bContext *C, wmOperator *op) static int delete_invoke(bContext *C, wmOperator *op, wmEvent *event) { Object *obedit= CTX_data_edit_object(C); - uiMenuItem *head; + uiPopupMenu *pup; + uiLayout *layout; if(obedit->type==OB_SURF) { - head= uiPupMenuBegin("Delete", 0); - uiMenuItemEnumO(head, "", 0, op->type->idname, "type", 0); - uiMenuItemEnumO(head, "", 0, op->type->idname, "type", 2); - uiPupMenuEnd(C, head); + pup= uiPupMenuBegin(C, "Delete", 0); + layout= uiPupMenuLayout(pup); + uiItemEnumO(layout, NULL, 0, op->type->idname, "type", 0); + uiItemEnumO(layout, NULL, 0, op->type->idname, "type", 2); + uiPupMenuEnd(C, pup); } else { - head= uiPupMenuBegin("Delete", 0); - uiMenuItemsEnumO(head, op->type->idname, "type"); - uiPupMenuEnd(C, head); + pup= uiPupMenuBegin(C, "Delete", 0); + layout= uiPupMenuLayout(pup); + uiItemsEnumO(layout, op->type->idname, "type"); + uiPupMenuEnd(C, pup); } return OPERATOR_CANCELLED; @@ -4814,7 +4813,7 @@ Nurb *add_nurbs_primitive(bContext *C, int type, int newname) if(cutype==CU_NURBS) { nu->knotsu= 0; /* makeknots allocates */ - makeknots(nu, 1, nu->flagu>>1); + makeknots(nu, 1); } } @@ -4849,7 +4848,7 @@ Nurb *add_nurbs_primitive(bContext *C, int type, int newname) if(cutype==CU_NURBS) { nu->knotsu= 0; /* makeknots allocates */ - makeknots(nu, 1, nu->flagu>>1); + makeknots(nu, 1); } break; @@ -4934,7 +4933,7 @@ Nurb *add_nurbs_primitive(bContext *C, int type, int newname) bp++; } - makeknots(nu, 1, nu->flagu>>1); + makeknots(nu, 1); } break; case CU_PRIM_PATCH: /* 4x4 patch */ @@ -4971,8 +4970,8 @@ Nurb *add_nurbs_primitive(bContext *C, int type, int newname) } } - makeknots(nu, 1, nu->flagu>>1); - makeknots(nu, 2, nu->flagv>>1); + makeknots(nu, 1); + makeknots(nu, 2); } break; case CU_PRIM_TUBE: /* tube */ @@ -5034,7 +5033,7 @@ Nurb *add_nurbs_primitive(bContext *C, int type, int newname) bp++; } nu->flagu= 4; - makeknots(nu, 1, nu->flagu>>1); + makeknots(nu, 1); BLI_addtail(editnurb, nu); /* temporal for spin */ if(newname && (U.flag & USER_ADD_VIEWALIGNED) == 0) @@ -5042,7 +5041,7 @@ Nurb *add_nurbs_primitive(bContext *C, int type, int newname) else spin_nurb(C, scene, obedit, 0, 0); - makeknots(nu, 2, nu->flagv>>1); + makeknots(nu, 2); a= nu->pntsu*nu->pntsv; bp= nu->bp; diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index e6992009056..ec4e79a7e5a 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -401,11 +401,11 @@ static int paste_file_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_RUNNING_MODAL; } -void FONT_OT_paste_file(wmOperatorType *ot) +void FONT_OT_file_paste(wmOperatorType *ot) { /* identifiers */ ot->name= "Paste File"; - ot->idname= "FONT_OT_paste_file"; + ot->idname= "FONT_OT_file_paste"; /* api callbacks */ ot->exec= paste_file_exec; @@ -449,11 +449,11 @@ static int paste_buffer_exec(bContext *C, wmOperator *op) return paste_file(C, NULL, filename); } -void FONT_OT_paste_buffer(wmOperatorType *ot) +void FONT_OT_buffer_paste(wmOperatorType *ot) { /* identifiers */ ot->name= "Paste Buffer"; - ot->idname= "FONT_OT_paste_buffer"; + ot->idname= "FONT_OT_buffer_paste"; /* api callbacks */ ot->exec= paste_buffer_exec; @@ -769,11 +769,11 @@ static int copy_text_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void FONT_OT_copy_text(wmOperatorType *ot) +void FONT_OT_text_copy(wmOperatorType *ot) { /* identifiers */ ot->name= "Copy Text"; - ot->idname= "FONT_OT_copy_text"; + ot->idname= "FONT_OT_text_copy"; /* api callbacks */ ot->exec= copy_text_exec; @@ -799,11 +799,11 @@ static int cut_text_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void FONT_OT_cut_text(wmOperatorType *ot) +void FONT_OT_text_cut(wmOperatorType *ot) { /* identifiers */ ot->name= "Cut Text"; - ot->idname= "FONT_OT_cut_text"; + ot->idname= "FONT_OT_text_cut"; /* api callbacks */ ot->exec= cut_text_exec; @@ -856,11 +856,11 @@ static int paste_text_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void FONT_OT_paste_text(wmOperatorType *ot) +void FONT_OT_text_paste(wmOperatorType *ot) { /* identifiers */ ot->name= "Paste Text"; - ot->idname= "FONT_OT_paste_text"; + ot->idname= "FONT_OT_text_paste"; /* api callbacks */ ot->exec= paste_text_exec; @@ -1374,11 +1374,11 @@ static int insert_text_invoke(bContext *C, wmOperator *op, wmEvent *evt) return OPERATOR_FINISHED; } -void FONT_OT_insert_text(wmOperatorType *ot) +void FONT_OT_text_insert(wmOperatorType *ot) { /* identifiers */ ot->name= "Insert Text"; - ot->idname= "FONT_OT_insert_text"; + ot->idname= "FONT_OT_text_insert"; /* api callbacks */ ot->exec= insert_text_exec; diff --git a/source/blender/editors/datafiles/blenderbuttons.c b/source/blender/editors/datafiles/blenderbuttons.c index c29137ab74c..e3fdee554f7 100644 --- a/source/blender/editors/datafiles/blenderbuttons.c +++ b/source/blender/editors/datafiles/blenderbuttons.c @@ -1,4103 +1,4571 @@ /* DataToC output of file <blenderbuttons> */ -int datatoc_blenderbuttons_size= 131097; +int datatoc_blenderbuttons_size= 146052; char datatoc_blenderbuttons[]= { -137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 2, 88, 0, 0, 2, 0, 8, - 6, 0, 0, 0, 94,187, 18, 70, 0, 0, 1, 57,105, 67, 67, 80, 80,104,111,116,111,115,104,111,112, 32, 73, 67, 67, 32,112,114, -111,102,105,108,101, 0, 0,120,218,173,145,177, 74,195, 80, 20,134,191, 27, 69,197,161, 86, 8,226,224,112, 39, 81, 80,108,213, -193,140, 73, 91,138, 32, 88,171, 67,146,173, 73, 67,149,210, 36,220,220,170,125, 8, 71,183, 14, 46,238, 62,129,147,163,224,160, -248, 4,190,129,226,212,193, 33, 72,112, 18,193,111,250,206,207,225,112,224, 7,163, 98,215,157,134, 81,134, 65,172, 85,187,233, - 72,215,243,229,236, 19, 51, 76, 1, 64, 39,204, 82,187,213, 58, 0,136,147, 56,226, 39, 2, 62, 95, 17, 0,207,155,118,221,105, -240, 55,230,195, 84,105, 96, 2,108,119,163, 44, 4, 81, 1,250, 23, 58,213, 32,198,128, 25,244, 83, 13,226, 14, 48,213, 73,187, - 6,226, 1, 40,245,114,127, 1, 74, 65,238,111, 64, 73,185,158, 15,226, 3, 48,123,174,231,131, 49, 7,152, 65,238, 43,128,169, -163, 75, 13, 80, 75,210,145, 58,235,157,106, 89,181, 44, 75,218,221, 36,136,228,241, 40,211,209, 32,147,251,113,152,168, 52, 81, - 29, 29,117,129,252, 63, 0, 22,243,197,118,211,145,107, 85,203,218, 91,231,159,113, 61, 95,230,246,126,132, 0,196,210, 99,145, - 21,132, 67,117,254,221,133,177,243,251, 92,220, 24, 47,195,225, 45, 76, 79,138,108,247, 10,110, 54, 96,225,186,200, 86,171, 80, -222,130,251,241, 23,194,179, 79,254, 28, 9,179, 39, 0, 0, 0, 6, 98, 75, 71, 68, 0, 0, 0, 0, 0, 0,249, 67,187,127, 0, - 0, 0, 9,112, 72, 89,115, 0, 0, 13,215, 0, 0, 13,215, 1, 66, 40,155,120, 0, 0, 0, 7,116, 73, 77, 69, 7,217, 3, 11, - 22, 59, 45, 8,130,118, 25, 0, 0, 32, 0, 73, 68, 65, 84,120,218,236, 93,119,120, 84, 85,226, 61,247,181,201,180,132, 20,146, - 64, 40, 65,138, 72, 9, 93,138, 32, 29,130, 16, 84, 64, 84,196, 31,224,234,162,171,162,226,170, 65, 69,176,145,192, 42, 32,184, -148,197, 93, 68, 41, 10, 22, 52, 40, 44, 69,138, 52, 33,184, 2, 34,132, 22, 4, 66, 73, 34,144, 76, 50,153,246,230,254,254,200, -188,231,100,152,242, 6, 38, 8,120,207,247,205, 55, 51,111,222, 59,115,251, 61,247,220,251,238, 35,148, 82, 84, 23, 8, 33,105, -148,210,125,140,147,113, 50, 78,198,201, 56, 25, 39,227,100,156,127, 38,112, 87,144,168, 17, 87,100,132, 16,234,121,245,184,222, - 57,171, 49,238, 52,130,156, 61, 60,156,147,111,144,112,246,184, 94, 57,149,248, 70,146,215, 59, 13, 35,149,158, 94,225,164,145, - 14,103,117,113, 70,186, 94, 70,178,140,250,201,247,201, 55, 72, 56,123, 92,111,156,190,229, 39, 18,188,254,202,228,213,166,167, -159,112,210, 72,135,179,186, 56, 35,221, 95, 70,170,140, 6,201,251,136,245, 77,215, 51,132, 63, 90, 96, 0, 0,165,148,120,241, -147,235,149,211, 59, 29, 20,254, 72,134, 53,130,216, 24,105, 78,159,244,140, 20, 38, 83, 74, 9, 33,100, 19,128, 30,145,140,123, - 36,242,221, 39,174, 17,225,173, 78,113, 21,201,114, 95,221,156,145,170, 75,190,156,145, 40,247,254,242,189, 26,243, 40, 82,225, -140, 72, 93,170,142, 50,239,167,252, 92, 53,175, 47,103, 36,234,146, 47,103, 36,202,253,181,224,140, 68, 93,242,199, 25,137,114, - 31, 40,239,153,131,117,109,132,128,111,197,238,121, 61, 11,161,106,118,177,122,220, 8,156, 17,206,163,201, 30,206, 72,142,102, -122, 70, 42,143,124,203, 78, 36, 70, 93,222,156,145, 42,155,126,194,121,213,249,228,143,243,106,195, 27, 32,156, 17,143,251,213, -150,251,107,197, 25,225, 60,138, 72, 93,242,225,236, 25,225, 65, 64,207, 72,214, 37,111,206, 72,213, 37, 63,225,188,234,124,242, -199,121,181,225, 13, 16,206,136,199, 61,130,142,104,196,121,111, 58, 7,171, 58,197, 85,117,136, 55,101,148, 20,233,142, 44,146, - 34,171,186,156,182, 72,185, 56,126,120, 55, 69,144,110, 99,164,195,233, 9, 31,169, 14, 33, 76, 41,157, 76, 8,153,116, 61, 87, -104, 86,151, 88, 93,186,222,234,146,191,114,115,181,117,169,186, 6,207,222,156,145, 18, 66,126,226,126, 85,117,201,247,218, 72, -212,165, 16,156,164, 58,226, 31,233,250,116, 61,130,187, 94, 2, 82, 13,235,123,104,117,184, 98,213, 24,239, 72,134,179,231,141, - 16,247,234, 8, 39, 33,100,114, 53,197,253, 70, 73, 83, 86,151, 88, 93,186,238,234,146, 79,153,236, 25, 41,103, 40,210, 3, 41, - 95,206, 72,174, 67,138,100, 25,173,238,184, 71,178, 46, 85, 71,222,223, 40, 8,219,193,170,174,209,241,141,192, 89, 29,220,213, - 20,247, 77,213, 49, 58,168,134,117, 93, 17, 15, 39,165,116, 50, 34, 56,229,168,196, 57,146, 97,173,206,105,194,234, 40,155,213, - 89,222, 35,185,206,163,154,226,126,163,228,123,196,195, 25,169,186,228, 39,207,175, 58,172,254,210, 47,210, 83,216,145, 44,155, -213,201, 25, 9,238,234, 8,103,117,229,253,141, 4, 82,157,219, 52, 48, 48, 48, 48, 48, 48, 48, 48,252, 25,225,215,193, 74, 75, - 75,219,208,177, 99,199,166, 63,254,248,163,131, 82, 10, 66, 8, 8, 33,224, 56, 14,132, 16,184,221,238, 51,187,119,239,190,131, - 37, 31, 3, 3,131,166,145, 28, 33, 28,126, 95,146,224,174, 28,204,178,209, 29, 3, 3,195, 77,220,238,249,107,227, 90,183,110, -157,247,227,143, 63,214,249,239,127,255, 11,131,193, 0,147,201, 4,147,201, 4,179,217, 12,147,201,132, 65,131, 6,157,221,178, -101, 75,163,112,255,236,150, 91,110, 57,228,114,185,106,133,165, 0, 5,161, 48, 63, 63,191, 41,165, 84,246,247,123,237,218,181, - 15, 17, 66,234,134,217,216, 23, 23, 20, 20, 52,164,148,186,174, 21,103,199,142, 29,243,101, 89, 78, 12,135, 83,167,211,157,218, -182,109, 91, 83, 86, 76,175, 13,238,184,227,142, 67, 78,167, 51,236,242, 89,167, 78,157,166,203,151, 47,247, 91, 62, 59,117,234, -116,220,237,118, 39,104, 44, 67, 0, 0,142,227,142,239,220,185,179, 77, 32, 1,210,174, 93,187,176,203, 39,128,194,220,220,220, - 6,129,126,108,211,166,205, 33,158,231, 35,202,169,160,125,251,246, 98,237,218,181, 23, 0,184, 47,216,121,162, 40, 22, 95,184, -112,161,225,198,141, 27, 93,172, 52, 50, 48, 48,220,232,240,235, 96,185,221,238,211,143, 63,254,184,105,207,158, 61,129, 28,172, -243, 87,242,103,118,187,189,110,254,186,117, 16,146,147, 65,237,118,184,226,226, 64, 41,133,219,237, 6,159,151, 7,234,112, 0, - 14, 7, 92,109,218, 0, 0,156, 78, 39,218,183,111,159,148,154,154, 42, 2,144, 3,208,214, 26, 55,110, 28,162,163,163, 81, 81, - 81,129,138,138, 10,216,108, 54,216,108, 54,216,237,118,216,237,118, 56, 28, 14, 56, 28, 14, 56,157, 78,216,108, 54,236,217,179, - 39, 54, 53, 53, 85, 0, 16,168, 33,175,245,244,211, 79,195,108, 54,171,124,202,187,194,225,205,103,179,217,240,211, 79, 63, 5, -229,148,101, 57,113,211,166, 77, 48,153, 76,112,187,221,144,101, 25,178, 44,195,237,118,195,237,118, 43,233,238,125, 62,210,211, -211,107,177, 34,122,237, 96,183,219,235,110,121,251,109,240, 53,107,130, 58,157,112, 53,111,174,230,143,248,253,247,128,211, 9, -234,116,194,217,175,159, 90,110,239,190,251,238,164,162,162,162,128,229,211,229,114, 37,109,122,225, 5,112,209,209,160, 21, 21, - 48, 14, 25, 2, 84,218, 55, 40,157, 57, 19,212,233, 4,117, 56, 96,206,204, 4,165, 20, 69, 69, 69,214,180,180,180,253,168, 92, -167, 64, 3, 8,177, 90,235,215,175, 87,203, 12,165, 20,138, 22, 83,234, 41,207,243,234,235,135, 31,126,192,243,207, 63, 31, 84, -220,243, 60, 95,107,244,232,209,112, 56, 28,106,221, 81, 62, 59,157, 78,181,188,187, 92, 46, 56,157, 78,216,237,118,156, 58,117, - 42,228,128, 65, 17, 87,245,234,213, 27, 48,125,250,116,228,228,228,224,150, 91,110,129, 36, 73,106,248,148,240, 62,251,236,179, -177,158, 54,137, 9, 44, 6, 6,134,155, 83, 96,237,219,183,175, 55, 0, 12, 29, 58,116, 67, 90, 90, 90,211, 95,126,249,197,161, - 52,222,158, 87,237,135, 30,122, 40, 95,105,204, 41,165,103, 62,254,248, 99, 77, 83,134, 66,114, 50,242,227,227, 1, 0,151,114, -115,149, 17, 59,162,219,182, 85,207,113,252,242, 11, 56,142, 67, 74, 74,138, 58,170, 15, 6,179,217,140,254,253,251, 67,167,211, -161,125,251,246,144, 36, 9,162, 40, 6,124,105,129,209,104,196,235,175,191,174,184, 20, 48,233,163,240,183, 59, 59, 67, 79,128, -255,252,244, 11,108,178, 27,130, 32, 64, 16, 4,205,156, 38,147, 9,159,126,250, 41, 36, 73,242,251, 90,191,126, 61,238,185,231, - 30, 72,146,132,248,248,120,252,153, 54,100,187, 94,192,215,172,137,211,237,218, 93, 94, 62, 7, 15,190,172,124, 38, 37, 37,105, - 42,159, 92,116, 52,206,222,117, 23, 0,160, 96,243,102,232,116, 58, 72,146,132,152, 55,223, 4, 21, 69,112,146, 4,199, 99,143, -193, 98,177, 88, 71,143, 30,189,221,104, 52,174,253,237,183,223,130,114,202,178,140,157, 59,119, 66,146, 36, 68, 69, 69, 93,246, -210,233,116,136,138,138,194,178,101,203,112,242,228, 73, 77,113,183, 90,173,120,251,237,183, 65, 8,169, 82,135, 2,125,214,224, -200,113, 3, 7, 14,156, 91,183,110,221,126,211,167, 79, 55, 73,146,132, 57,115,230, 64, 16, 4, 12, 26, 52, 8,241,241,241, 88, -187,118, 45, 36, 73,194, 11, 47,188,192, 10, 31, 3, 3,195,205, 47,176,188, 26,200, 58,175,190,250,106,141,197,139, 23, 35, 42, - 42, 10, 6,131, 1, 70,163, 17, 70,163,177,202,231, 87, 94,121, 69,214,250,135,212,110,175,218,249,112, 28, 56,142, 11,120, 76, - 75, 7,102,183,219, 49,124,248,112, 0, 8, 41,174,180,138, 33,155,205, 6, 65, 16,208,168,126, 34, 94, 29,222, 1, 93,121, 10, -107, 49,128,162, 50,140,174, 45,224,127,117,111,197,236, 95,139,113,162,196, 2, 65,208,118, 51,166, 44,203, 1,197,149, 36, 73, -248,248,227,143, 49,124,248,112, 72,146,116, 89,154, 48, 92, 27, 80,167, 51,172,242,169,137,179,162, 66,177,137, 84,113,165,211, -233, 0,157, 14,156, 40,130, 72, 18, 44, 22,139,117,232,208,161,187, 12, 6,195,146,196,196,196,130, 80,162,136, 82,138,168,168, -168,203, 4,150, 78,167, 83,197,213,242,229,203,177,120,241, 98,116,234,212, 73,115,153,151, 36, 9, 79, 61,245,212,101,191,173, - 92,185, 82, 21, 88,130, 32, 64,146,164, 80,226,138, 0,224, 68, 81,188,255, 31,255,248, 7,167,156,159,144,144, 0, 81, 20,145, -150,150, 6,179,217,140,173, 91,183,170,245,130,129,129,129, 33, 8, 68, 0,109, 0, 36,162,114,198,160, 20, 64,172,215,239,133, -158,247, 68,175,239,187,252,240,220,238, 57, 71,249, 93,249,110, 7,160,243,115,188, 24,128,193,243,178, 1,216, 6,160,165,215, -255, 40,215,193,247,127, 5, 79, 99,216, 3,192, 70, 0, 61,189, 55,191,163,148,158,126,235,173,183, 76,126, 28,172, 42,211,134, -148, 82,205, 83,134,114,124,188,234, 12,212,104,223,254,247,198,253,231,159,213,142, 75,236,218, 21,196,104, 4,222,121, 71, 19, -167,221,110,199,249,243,231, 47, 27,121, 95,169,192, 34,132,192,233,116,194, 96,136,194,119,243,187,227,204, 49, 23,222,206, 57, -137,149, 63, 28,135, 32, 8,200,184,173, 9,134,185,128,236,120, 61,198,186,100, 56,220,218,214,234,186, 92, 46,191, 78,128,242, - 34,132, 84,249,204,112,237,225,106,222, 92,115,249, 36, 47,191,172,137,211, 56,100, 8,206,108,217, 2, 73,146,144,208,175, 31, -224,113,173,132, 93,187, 32, 73, 18,202,202,202,172, 15,116,236,248,253, 5,189,126,241,160, 65,131,142,175, 93,187,214, 24, 82, -180, 81, 90, 69, 76,121,187, 86,222,226, 74, 20, 69, 56,125, 68, 99, 48,129, 21,168,126, 40,229, 53, 28, 7, 11, 0,220,110, 55, -253,246,219,111, 49,103,206, 28, 36, 36, 36,160,127,255,254,168, 85,171, 22,150, 47, 95, 14, 74, 41,158,122,234, 41, 24, 12, 6, - 24, 12, 6, 86,230, 25, 24,254,164, 8,164, 65,124,208,125,194,132, 9, 29,178,179,179,167,116,233,210,101,217,182,109,219,150, - 18, 66,114,188,218,196, 12, 15, 87,142,215,247,219,125, 68,150, 8, 32,145, 16,146,163,156,239,253,221,235,120, 95, 0, 58,229, -251,132, 9, 19, 90,102,103,103, 79,201,204,204,124, 57, 43, 43, 75,154, 48, 97, 66,171,236,236,236, 41,202,255,248, 11,135,183, -131,229,119, 23,224,207, 63,255,188,183,111, 12,155, 55,111,190,161,115,231,206, 77,247,236,217,227, 45,186,106,223,126,251,237, -249,148,210,144,119, 23, 42,107,186, 2,185, 2, 28,199,129,152, 76,128,201,164, 53, 99,224,116, 58, 33, 8, 2, 56,142,195,218, -181,107, 97, 48, 24, 48,112,224,192,128, 2, 75,171, 43,166,211, 73, 16, 98, 57,252,223,244,221, 40,186, 80,174, 78, 9,174,203, - 63,137, 31,244,122,188,218,162, 53,204,150,124,148,216,236, 97, 57, 88, 58,157, 78,237,172, 36, 73,194,147, 79, 62, 9,187,221, - 14,142,227,212, 99, 30,225,202,122,156, 63,166,178,107, 42,159, 84,163,139,229,118,187,127,119,173, 36, 9,156, 36,129,120,242, -185,172,172,204, 58,100,200,144, 93, 23,244,250,197,167, 78,157,250, 1,128, 94,171,192, 82, 68,149,194,237, 79, 92, 9,130, 0, -135,195,161,121,160, 18,200, 73, 10, 87, 96,209,202, 6,197, 13,128, 54,104,208, 64,189, 38, 57, 57, 25,177,177,177,234,218, 54, -189, 94, 15,131,193,192, 28, 44, 6,134, 63, 55,180, 60,137, 32, 42, 59, 59,123,138,183,128,241, 21, 52,222,194,201, 71, 68,121, -139,180,150, 33,218,255, 28, 95,209,164,252, 47, 33, 36, 39, 43, 43, 43, 35, 68, 56, 10,125, 5,150,230,109,246,121,158,175, 51, -127,254,252, 26, 95,126,249, 37,204,102, 51, 98, 99, 99, 17, 19, 19,131,216,216, 88, 12, 27, 54, 44,228, 84,161,219,237, 14, 56, -237,194,243,124,165, 96, 51,155, 43, 59, 49,141, 29,152,195,225,128, 40,138,224, 56, 14, 79, 60,241,132,186, 46,234,106,166, 8, -237,118, 59,120,142, 7,162,110, 1,197, 78, 85, 92,169, 47,157, 14,249,245, 91,131,156, 61, 13, 65,208, 54, 67,234,118,187,213, - 78, 79, 20, 69,188,246,218,107,120,247,221,119,171,220, 64, 32,138, 34,218,182,109,139,188,188, 60, 86,229,254, 0,132, 85, 62, - 5, 65,147, 88, 87,220, 38, 73,146,192,233,116, 32, 30,129, 85, 86, 86,102, 29, 49, 98,196,247, 37, 37, 37,139,155, 54,109,122, - 4,149,219, 24,104, 18,213,132, 16,149, 83,175,215, 7, 20, 87,130, 32,104,118,176,148,122,228,141,191,254,245,175, 85,222, 1, -224,169,167,158,210, 90,143, 40, 0,136,162,136,190,125,251,162, 85,171, 86, 88,185,114, 37,220,110, 55,158,124,242, 73, 24, 12, - 6,204,156, 57, 19, 46,151, 11, 83,167, 78,101,133,143,129,225,207, 61,176, 13,165, 65,172,153,153,153, 47, 19, 66,114, 60, 78, -210,254, 32, 66,202, 31,110,247, 17,105,133, 1,218,235, 12,127, 34,203,251,179,130, 9, 19, 38,180,244, 19,142, 93,151, 9, 44, - 47,245, 24,170, 3, 58, 61,118,236, 88,147,178, 71,150, 34, 12,120,158,215,116,119, 33,119,232, 16,204,158, 5,237,246, 3, 7, -126, 23, 22,221,187,131,152, 76, 32, 70, 35,184, 85,171, 42, 59,174,216, 88,224,165,151, 66,166,154,211,233, 84, 5, 86,113,113, -113, 68,214, 96, 57,157, 78,240,146,136, 29,102, 17, 84,228,171,136, 43, 81, 20,193, 9, 34,242, 19,111, 5, 17,254, 11, 65,214, -118,211,147, 34,176,148, 23,199,113,120,246,217,103,213, 52,224, 56, 14, 93,187,118, 85,132, 44,171,113,127, 0,132, 45, 91, 96, -206,200,208, 84, 62, 73,116, 52,240,239,127,135,228, 44,155, 51, 7,209,111,191, 13, 34,138, 16,118,236,128, 78,167,131,197, 98, -177,222,211,182,237, 46, 75,108,236,226, 19, 39, 78,252, 0,128, 27, 62,124,120,141, 14, 29, 58,240, 26, 27, 35,191,211,130, 75, -151, 46,173, 34,174, 4, 65,128,203,165,173,124, 6,115,176,252,185, 89, 26,132, 37,189,251,238,187,193,243, 60,106,212,168,129, -232,232,104,245,238, 75,197,185,114,185, 92,112,185, 92,154,215, 49, 50, 48, 48,220,156,208,160, 65,108, 89, 89, 89,251,179,178, -178, 84, 39,201,215,193, 10,128, 65, 30, 49,149,168,136, 51, 84,174,165,218, 21, 36, 44, 25,129,132,151,247,177,236,236,236, 41, -126,194,161, 78, 75, 6,220,104,180, 83,167, 78, 77,189,183,105,224,121, 30,178, 44,159,249,249,231,159,175,106,131, 81,234, 53, - 93,225, 45,206, 20, 87,128,152, 76, 97, 47, 34, 86,166, 8,121,158, 87,197,203,162, 69,139, 96, 54,155, 49,102,204,152,171, 16, - 88, 60,190,146,242, 0, 73,184,204,193,226, 69, 17,191,214,168, 7, 78, 20, 33,200, 78, 77, 78, 70, 73, 73, 9, 36, 73,194,123, -239,189,135, 87, 94,121, 69, 73, 83,213, 29,241, 22, 90, 12,127, 80, 37,247,114,123, 66,149, 79,158,231,161,105,175, 76,151, 11, -144, 36,192, 51,149,103,177, 88,172, 35, 70,140,248,222, 18, 27,187,184,113,227,198,138,115,197, 25,141, 70,240, 60,175,201,193, -226, 56,206,175,184, 82,234,129, 90, 78,121, 62, 44, 7, 75,146, 36,172, 90,181, 74,173, 43,222,206, 85,184, 2,203, 59,172,155, - 55,111,198,158, 61,123,240,196, 19, 79,192, 96, 48, 96,214,172, 89,112,185, 92,120,227,141, 55, 96, 48, 24, 42,167, 79, 25, 24, - 24, 24, 2, 35, 78, 17, 56, 30,145, 84,197, 89,162,148,102,120,139,160, 64, 83,133, 30,199,105,115,136,255, 90,229, 17,102,126, -161, 56,105, 62,131,222, 28, 95,113, 38, 40,202,209,251,157,227,184, 58,243,230,205,171,177,121,243,102, 24,141, 70,117,163,209, - 17, 35, 70,200, 87,157, 68,138,192,242, 76,183,168,194,194,211,129,113, 94, 29,152,214, 69,175,138,131,229, 45,176, 38, 77,154, - 4, 65, 16,176, 96,193, 2, 0,192,223,255,254,247,176, 4,150,195,225, 0,117, 3,219,228,141, 72,153,211, 26,244, 67, 61,206, -109,254, 5,162, 40,162, 86,199,126,112,119, 24,134, 98, 93, 12, 76,212,173,121,244,125,225,194, 5, 28, 56,112, 0,132, 16,188, -254,250,235, 85,246, 0,242, 94,227, 3, 0,107,215,174, 5,254, 68,207,108,186,238, 4,150,134,242,169, 56, 73, 90, 56,137, 78, - 7,222, 35,174,134, 12, 25,178,171,164,164,100,241,137, 19, 39,118, 1, 32, 35, 71,142,172, 97, 52, 26,177,112,225, 66, 43, 0, -113,197,138, 21, 6, 45,162,197,159,184,242, 39,176,100, 89, 14,171, 30,133, 26,140, 92,137,192, 34,132, 64,150,101,213,185,114, - 58,157,234,247,168,168, 40, 86,240, 24, 24,254,228,238,149,247,123, 0, 20,250,172,115, 34, 62, 78, 83,161, 63, 97,229, 61, 29, -232,245,217,233,135,215,238, 51,117,232,123, 92,121, 47,206,202,202,250, 78,113,174,188,142, 87, 9, 71, 64, 7,139, 82,170,110, - 52,170,116, 34, 28,199, 65,150,229,243, 87,155,144,174, 54,109,224, 60,120, 16, 60,207, 67,234,217,179,114, 45,139,209, 8,110, -229,202,223, 59,174, 73,147, 64, 77, 38,208, 1, 3,180,113,122,238,206,243, 22, 88, 23, 47, 94,132, 40,138,120,235,173,183,192, -113, 28,166, 78,157,138, 58,117,234,224,204,153, 51, 88,189,122,181, 38, 78,206,205, 65, 63, 58, 30,250,177,209,224,158,104,140, -150,131,199,226, 82,105, 3,236,181,155,208,172, 44, 15,113, 27, 38,193, 33,107,159,222,112, 58,157,234,222, 69,148, 82,213,189, - 82,166, 77,100, 89, 86, 55,117,156, 54,109, 26,216,147, 68,174, 61, 28,125,250,104, 46,159,238,158,218, 30, 8,111,120,246, 89, - 56, 70,143,134,197, 98,177, 62,208,165,203,214, 18,189,254,227,230,205,155,171,107,174,140, 70, 35,244,122, 61, 81,156, 44, 45, -156,202, 77, 29,161,196,149,242, 89,107,249,244,222,134, 33, 18, 2, 75,105, 59,198,140, 25,131,218,181,107, 99,246,236,217, 85, -156,171,151, 95,126, 25, 78,167, 19, 51,103,206,100,133,143,129,129, 33, 24,118,133,113,238,237, 94, 98,105,215, 21,242,238,186, -218, 0,251,109,121,247,238,221,219, 59,208, 5,222,211,135, 74, 3, 74, 41, 61,179,103,207,158, 59,252, 52,174,105,148,210,125, -222,199,100, 89,254,125, 81,183,201, 84,233, 12, 24,141, 85, 28, 28,106, 54,131, 51,155, 1, 63,119,252,249,227, 84, 4, 22,199, -113, 85, 70,223,130, 32,224,210,165, 75, 16, 69, 17,179,103,207, 70, 76, 76, 12,108, 54, 27,180,132,211,225,112,128,231,121,148, -159, 40,199,241,137,123, 17,101, 58,130,166,253,162, 17, 45, 30, 69,147, 45, 95,194,229,178, 3, 94, 83,134, 90, 56, 27, 54,108, -136,241,227,199,171,139,147,125, 95,222,113,165,148,226,246,219,111, 15,201,121,181, 96,156, 85, 57,189,239,114, 13, 85, 62, 57, -159, 60, 11, 22, 78,229,110,193, 50,147,233,227, 19,199,142,237, 2,192,141, 28, 57, 50,198,104, 52, 98,254,252,249, 86, 0,220, -155,111,190,105,104,208,160, 1,175, 37,156, 60,207, 95, 38,174,194, 17, 88,129,234,145,239,246, 33,207, 60,243,204,101, 27,141, - 6, 18, 88,129,226,206,243, 60,106,214,172, 9,163,209, 8,151,203,165, 58, 87,122,189, 94,221, 29, 62,208, 96,130,149, 79,198, -201, 56,255, 60,156,127,144, 24,171, 54,132,189,178, 84,153, 62,220,177, 99, 7,162,163,163, 81,163, 70,141,176,166, 14,157, 78, - 39, 18, 19, 19, 65, 41,133,144,157, 13,160,242,201,175,118, 81, 84, 31,249, 33,246,238, 13, 55,199,193, 82, 94, 14,135,195, 17, -114, 26,198,106,181, 86, 89,128,174,136, 43,239,142,193, 98,177,168,155,135,106,129,194,169,184, 98, 68,166, 56,182,110,197,229, -119, 19,134,177,147,187, 44,203, 72, 74, 74,170,178,134, 71,233, 4,253,116,212, 0,155, 34,188,230,112, 58,157,136,243, 60,194, - 73,204,204, 4, 8, 1, 37, 4, 54,143,211,232,114,185, 32,118,233, 2,202,243, 40,177, 90,225,112, 56,160,215,235,131,114, 22, - 23, 23, 91, 31,124,240,193,239, 41,165, 31, 13, 30, 60, 56, 15,149, 11, 44,169,201,100,210,241, 60, 79, 1,252, 6,128,158, 63, -127,190,198,185,115,231,220, 46,151,171, 94,168,112,238,216,177, 3,199,142, 29, 67,187,118,237,212,199,215, 40, 47,229, 17, 76, - 87,226, 96,249,219,163,237, 74,119,114,247,106, 51, 80,163, 70, 13,232,116, 58,188,245,214, 91,144, 36, 9, 6, 67,229, 44,232, -204,153, 51, 43,211, 58, 12, 62, 6, 6, 6,134, 27, 1, 97, 11, 44,101,250,240,199, 31,127,116, 40,141,167,214,141, 70, 37, 73, - 42,108,213,170, 85, 88, 15, 60,150, 36,233,226,137, 19, 39, 92, 65, 84,244,217,141, 27, 55,134,245,144, 90,158,231, 67,114,238, -216,177, 35, 44, 78,142,227,130,114,138,162, 88,152,158,158, 30, 86,220,163,162,162,206,179, 34,122,237, 32,138, 98,225,160, 65, -131,252,231,209,172, 89,129,174,185,136, 32,207,206, 19, 69,241, 88,203,150, 45,127, 49,153, 76,223, 38, 36, 36,252,182,101,203, -150,132,118,237,218, 85,121,248,115,187,118,237,106,249,148, 37, 59, 2, 60,135,208,131,179, 47,190,248, 98,184,229,179, 48,196, -104,244,236,217,179,103,195,173, 71,133, 33, 27, 24, 65, 56, 59,110,220,184,186, 90,235, 58,216,115, 8, 25, 24, 24,254,172, 2, - 43,216,244, 97, 40,228,231,231, 55,136,116, 4, 78,159, 62,221,244, 70,224,220,177, 99, 71, 3, 86,220,174,111, 84, 71, 30,237, -216,177, 35, 45,210,156,185,185,185, 17, 47,159,187,119,239,110, 90, 29,105,250,217,103,159, 53,101, 37,139,129,129,225,207, 8, -182, 31, 0, 3, 3, 3, 3, 3, 3, 3, 3, 19, 88, 12, 12, 12, 12, 12, 12, 12, 12,215, 55, 8, 0,191, 83, 24,225,220, 29, 64, - 8, 9,123, 26, 36, 20, 63,227,100,156,140,147,113, 50, 78,198,201, 56,111, 62,206, 80,220,215,241,221,137,225, 9,172,234,220, -107,137,221,194,202, 56, 25, 39,227,100,156,140,147,113, 50,206, 63, 35,216, 20, 33, 3, 3, 3, 3, 3, 3, 3, 3, 19, 88, 55, - 7,136,214,231, 0, 49, 48, 48, 48, 48, 48, 48,220,112, 8,184, 77, 67,199,142, 29,243,101, 89, 14,107,223, 38, 81, 20, 11,181, -222,234, 78, 8, 17, 82, 82, 82,134, 24, 12,134, 30,162, 40,118, 1, 0,167,211,185,221,106,181,110, 42, 40, 40,248,130, 82,122, - 69,251,225, 36, 39, 39, 55,224, 56,238, 33, 66,200,112, 0,160,148, 46,119,187,221, 75,206,157, 59,151,127,189, 8, 43, 73,146, - 38,222,121,231,157,119, 18, 66, 22, 82, 74,151, 68,144,251,130,191,227,148,210,184, 43,229,172, 95,191,126,172,203,229,234, 0, -160,173,231,208,143,130, 32,236,254,245,215, 95, 47,178,234,115,115,224, 74,234, 58, 80,185,175,221,246,237,219, 27, 68,146, 83, -167,211,157,218,182,109,155,223,173, 29, 58,117,234,116,200,229,114,213,141,100, 56, 59,117,234,148,239,114,185,194, 14,103, 84, - 84,212,169,173, 91,183, 54,141, 36,231,181, 14,103, 32,116,232,208,225,115, 74,105,186,167, 77, 89,179,123,247,238,161,172,150, - 48, 48, 68, 80, 96,201,178,156,184,105,211, 38,152, 76, 38,165,147,134, 44,203,234, 46,209,110,183, 91,125,134,158,178,195,117, -255,254,253, 53, 53, 0,245,234,213,107,209,180,105,211,197, 79, 61,245, 84,189,193,131, 7,235,146,147,147, 65, 8,193,217,179, -103, 27,231,228,228, 60, 48,123,246,236,151,235,213,171, 55,242,228,201,147, 63,107,225, 75, 76, 76, 52, 73,146,116, 47,165,116, -100,235,214,173,239,120,225,133, 23, 72,215,174, 93, 33,203, 50, 54,108,216, 48, 97,250,244,233,153, 41, 41, 41,219, 8, 33,139, - 29, 14,199,151,133,133,133,101,127, 96,154,247, 30, 55,110,220, 3,127,251,219,223,106, 62,250,232,163,255, 7, 96, 73, 4,185, -117, 17, 20,107, 66,237,218,181,199, 3,200,244,229,117,185, 92,246,148,148,148,236, 51,103,206, 76,191, 82, 33,204,112,253,192, -187,174, 43,207,196,116,185, 92,106,221,150,101, 89,125,202,130, 98,188, 82, 74,209,183,111,223,196,112, 56,149,118, 67,225, 5, - 0,183,219,237,125, 13,210,211,211,107, 5,226,116,187,221,181, 20, 78,239,112, 41,124,190,235, 73,149,176,222,121,231,157, 1, -195,233,114,185, 18,191,255,254,123,232,245,122,149,203, 55,140,222,188,202, 67,171,123,245,234, 85, 43, 92, 78,229,179, 63, 78, - 0,232,218,181,235, 53, 13,167,151,120, 75,114,185, 92,179, 8, 33, 58,158,231, 95,160,148,166,175, 94,189, 26,178, 44, 99,208, -160, 65,233,157, 58,117,106, 44,203,242, 63,140, 70,163,219,102,179, 61,177,115,231, 78,182, 1, 50, 3,195,213, 8, 44, 0, 48, -153, 76, 88,186,116,169,250,120, 12,223, 71,209,120,127, 78, 77, 77,213,244,135,181,107,215,110,215,160, 65,131, 53, 95,124,241, -133, 33, 41, 41, 73, 61,238,112, 56, 16, 19, 19,131, 49, 99,198,232,250,246,237,219,120,228,200,145, 27,107,215,174,157,126,230, -204,153, 61,193,248,234,212,169,243,120, 82, 82,210,155,227,199,143, 55,220,125,247,221,136,139,171,106,214,100,100,100, 96,224, -192,129,228,216,177, 99, 93,151, 47, 95,222,245,163,143, 62,122,183, 78,157, 58,175,157, 62,125,122, 94,168,176,214,173, 91, 55, - 78,175,215,191,159,156,156,156,118,252,248,241,109, 58,157,238,197,138,138,138,167,106,215,174, 61,194, 98,177,156,180,217,108, - 79,254,250,235,175,199,195, 17, 45,241,241,241,127, 31, 59,118,108,124,105,105,169,156,155,155,123, 88, 57,174,215,235,159,239, -220,185,115,199,239,190,251,110, 9,165,244,243, 43,113,174, 92, 46,215,238, 96,191,107,117,178, 90,180,104, 33,213,174, 93,123, - 13,128,142,131, 7, 15, 62, 49,121,242,100, 26, 27, 27, 27,205,113, 28, 41, 46, 46,190, 48,109,218, 52,233,211, 79, 63,157, 84, -187,118,237,244, 22, 45, 90,164,255,252,243,207, 14, 86,149,110,108,152, 76, 38,124,242,201, 39, 85, 30,135,227,253,220, 65,223, -199,229,196,199,199, 87, 11, 39,165, 52,232,212,185,193, 96,192,134, 13, 27, 46,123, 52, 86,160,151,217,108, 6, 33, 4,132, 16, - 66, 3,220,209,163,215,235,177,110,221, 58,245, 65,215,161, 56,141, 70, 35, 16, 98,121, 69,184,156,102,179, 57,100,122, 94, 97, - 56, 67, 46, 69,112,185, 92,179,166, 77,155, 54, 40, 58, 58, 26, 47,189,244,210,255, 82, 83, 83, 17, 19, 19,131,249,243,231, 35, - 46, 46, 14,178, 44,255,239,157,119,222, 33, 39, 79,158,196,204,153, 51,231, 2, 24,194,106, 12, 3,195, 85, 10, 44, 0, 85, 26, -193, 96, 2,203, 31,124,239, 48,104,208,160, 65,148,217,108, 94,242,213, 87, 95, 25, 18, 18,126,127, 90,136,221,110, 71,105,105, - 41, 44, 22, 11, 74, 75, 75, 97, 50,153, 48,103,206, 28,195, 67, 15, 61,180,164, 65,131, 6,173,243,243,243,109,129, 56, 41,165, -217, 63,253,244,147,232,114,185,160,211,249, 55,112, 56,142, 67,227,198,141,241,204, 51,207,160, 91,183,110,198, 7, 31,124, 48, - 27,192,188, 64,156, 94,194,228,195, 45, 91,182,116, 73, 74, 74,210,127,249,229,151,250, 57,115,230,228, 13, 28, 56,208, 50,106, -212,168,218, 23, 47, 94,172,157,145,145,241, 53,128, 22, 90,226,238,193, 3,227,199,143,111, 17, 23, 23,199, 77,155, 54,237, 98, -105,105,233, 7,158,227, 79,205,156, 57,115, 84,143, 30, 61,106, 62,250,232,163,110, 66,200, 23,254, 58,131, 32,119,108,232, 60, -241, 20,194,117,182,252,113, 94,188,120,241,101, 0, 29, 23, 45, 90,180,175, 79,159, 62,245, 41,165,197, 0,206, 2, 64, 82, 82, -146,126,250,244,233,198, 30, 61,122,252,248,196, 19, 79,116,244,156, 59, 89, 99, 56,175, 24,140,179,122, 57,221,110, 55, 68, 81, -196,176, 97,195, 64, 8,169,242, 28, 67,165,158,111,217,178, 5,253,251,247,135, 40,138,120,244,209, 71, 53,115, 62,248,224,131, -112,185, 92,151,113,174, 95,191,190,138,208,226, 56, 78, 51,167,242,140,208, 80, 47,173,156, 90, 69,203,245,194,217,171, 87, 47, -236,220,185,243,170, 57,149,102,254,167,159,126, 66,235,214,173,177,120,241, 98,194,243, 60,118,238,220, 9,131,193,128,209,163, - 71, 35, 45, 45,141, 24, 12, 6, 28, 59,118, 12, 22,139,133,176,122,196, 56,171,139, 51, 4, 68, 0,109, 0, 36, 2,144, 1,148, - 2,136, 5, 96,247,244,113,197, 0, 12,158,151, 13,128, 5, 64, 77,207,181, 69,158,193,134,247, 99,202, 10, 81,245,161,208,183, -123,184,149, 71,128,121, 59,202,118,159,126, 84,249,238,251, 94,133, 91,240, 8, 9,165, 51,239, 73, 41,221,228,149,128,154,196, -149, 40,138,208,178,102,219,237,118,143,205,204,204, 76,242, 22, 87, 54,155,173,138,184,178, 88, 44, 40, 40, 40, 64,253,250,245, - 49,124,248,240,164, 69,139, 22,141, 5,240, 94,176, 68,231,121, 30, 63,252,240, 3,206,159, 63,143, 86,173, 90,225,150, 91,110, -169,114,194,209,163, 71,241,205, 55,223,224,194,133, 11,104,223,190,189,146, 81,126,145,146,146,146, 16, 27, 27, 59,142,227,184, -251, 59,117,234,148, 82, 88, 88, 72,206,158, 61,139,212,212,212,228, 47,190,248, 2,123,247,238, 53,231,230,230,194,225,112, 72, - 93,186,116,169,223,188,121,243, 19,162, 40,174, 58,119,238,220,187,193,214,121, 17, 66,248,186,117,235,190,252,248,227,143,235, - 10, 10, 10,220, 31,125,244,209,119,148,210,189,132,144,251, 95,121,229,149,199,210,211,211,107,238,217,179,167,116,215,174, 93, - 59,168,198,189, 51,252, 56, 87,130,111,131,108,177, 88,112,226,196,137,221, 37, 37, 37,156,231,124, 59,165,180, 86, 16,215,174, - 17,128,241,247,223,127,255, 97,143,184,250,213, 83,152, 1, 0,178, 44, 59, 75, 75, 75,203,122,244,232, 81,187,111,223,190, 7, -215,173, 91, 55,190,110,221,186,139, 79,157, 58,117,148,141, 87,110, 92,184, 92, 46,136,162,136,111,191,253, 54,168,219,180,117, -235, 86,213,113, 89,177, 98,133, 38,206,175,190,250, 42,164,131, 21, 70, 27,162,138, 7,223,135,174,207,157, 59, 23,227,198,141, -171,114,204,227, 94, 81, 79,227, 74, 3,113, 6, 18, 66,183, 52,108,136,179,103,206, 84,225,228, 56,174,202,212,102, 48,206,143, - 62,250, 8, 25, 25, 25,200,201,201, 9,250,126,215, 93,119,105,138,187, 34,174, 28, 14,135, 26,198, 35, 71,142,248,229,253,231, - 63,255, 9, 45, 77, 9,207,243,227,151, 45, 91,246,211,133, 11, 23,132,220,220, 92,232,245,122, 24, 12, 6,245,253,236,217,179, -176,219,237,248,244,211, 79, 93, 28,199, 61,207,106, 11, 67,164, 17, 72,131,248,160,251,132, 9, 19, 58,100,103,103, 79,233,210, -165,203,178,109,219,182, 45, 37,132,228, 80, 74, 51,148,247, 9, 19, 38,180,204,206,206,158,146,153,153,249,114, 86, 86,214,126, - 66, 72, 14, 0,248,126,247,232,155, 12, 31,241,150,168,240,120,194, 84,229, 92,127,223,125,223,125,185, 5,175, 3,196,171, 33, - 82, 58, 83,205, 2,203,223,104,201, 23,209,209,209, 3, 6, 12, 24, 32, 5, 19, 87,165,165,165, 40, 45, 45,197,161, 67,135,144, -150,150, 38, 69, 71, 71, 15, 8, 33,176, 42,149,133, 32, 32, 37, 37, 5, 69, 69, 69,216,183,111, 31, 82, 83, 83,225,116, 58,177, -102,205, 26, 92,188,120, 81,109,216,237,118,123, 80,158,164,164,164,217, 15, 61,244,208,192,177, 99,199,242,255,253,239,127,209, -172, 89, 51,220,114,203, 45,216,182,109, 27, 28, 14, 7,234,213,171,135, 46, 93,186, 96,197,138, 21,104,211,166, 13,247,215,191, -254,181,230,254,253,251, 71,207,154, 53,171, 51,128,118, 65,168,219, 12, 29, 58,180,102,116,116, 52,198,141, 27, 71,237,118,251, - 12, 66, 72,218,176, 97,195, 38, 63,253,244,211, 9,249,249,249,142,199, 30,123,108,187,221,110,159, 31, 70,185, 12,232, 92,185, - 92, 46, 88, 44, 22,148,148,148,160,180,180, 84, 40, 41, 41,225,160, 97,141,150,219,237,190, 19, 0, 63,113,226, 68, 80, 74,127, -243, 22, 87,118,187, 29, 22,139, 5, 22,139,197, 45,203,242,165,177, 99,199, 90,215,173, 91,199,123,174, 97, 2,235, 6,134, 82, -215,135, 14, 29, 90,197, 29, 90,191,126, 61, 50, 50, 50, 46,155,230,211, 34, 8, 20,206, 7, 30,120, 64, 21, 70, 74,155,177,122, -245,106, 77,142, 75, 32,145,225,207,193,226, 56,206,239,177, 80, 34, 67,225,244,247, 2,112, 25,167, 86, 33, 40, 8, 2,198,142, - 29, 11, 81, 20,241,220,115,207, 65, 20, 69,164,165,165, 65, 20, 69,116,234,212, 9,162, 40,162, 87,175, 94, 97,115,110,222,188, - 25,157, 59,119, 86,195,152,150,150,134,118,237,218, 65, 20, 69,116,235,214, 13,162, 40,162,127,255,254,154, 56,149, 5,237,105, -105,105,120,226,137, 39,240,197, 23, 95, 96,209,162, 69,234,239,195,134, 13,195,208,161, 67, 97,177, 88,144,156,156, 44, 20, 20, - 20,236,239,208,161, 3, 91,248,206, 16,113,248,211, 32, 62,136,202,206,206,158,226, 35,140,170, 64,249,157, 16,146,147,149,149, -149,225, 45,134,188,191,123,185, 76,222,226,173,165,183, 3,229, 45,158, 2,136, 50,223,240,123,159, 95, 88, 69, 96,121, 34,214, -211, 95, 3, 41, 73,146,218,160, 5, 18, 90, 90, 80, 81, 81,209, 74,113,175, 42, 42, 42,170, 8, 42, 79,199,173,126,182,219,237, -104,216,176, 33, 42, 42, 42, 90,133,169,132, 81,187,118,109, 56, 28, 14, 44, 88,176, 64, 21, 86, 10, 28, 14, 71,168, 76,174,221, -187,119,111, 62, 63, 63, 31,167, 79,159,134,219,237,198,246,237,219, 33,138, 34,172, 86, 43,108, 54, 27, 86,172, 88, 1,158,231, -113,244,232, 81,232,245,122,180,110,221,154,200,178, 28, 27, 34,104, 61,122,247,238, 13, 66, 8, 86,175, 94,125,156, 82,154,103, - 52, 26, 23, 78,153, 50, 37,206,102,179,185, 71,141, 26,117,252,183,223,126,123, 25,128, 75,175,215, 79,236,209,163, 71,215,117, -235,214,125,236,114,185, 22,135, 91, 80,109, 54, 91,149,180, 44, 41, 41,193,165, 75,151,180, 94,222, 22, 0, 98, 98, 98,106, 2, - 56,163, 28, 44, 47, 47, 71,121,121, 57, 74, 74, 74, 80, 94, 94, 14,171,213,234, 48, 26,141, 58,175,107,254,195,154,136, 27, 95, - 96,173, 94,189,186,138,203, 36,138, 34, 54,108,216,112,153, 3,165,211,233,176,106,213, 42, 77,110,211,215, 95,127, 29,212,185, -242,110, 99, 66,173,193,242, 22, 67, 31,124, 80, 57,195,254,204, 51,207,248,157, 54,244, 94,186,112,223,125,247,145, 80,225, 20, - 69, 17,105,111,114, 0,100,252,250,142, 65,109,215,124, 57,181,184, 66, 10,231,252,249,243, 53, 57, 88, 3, 7, 14,212,204,233, - 27,174,125,251,246,249,229,157, 59,119,110,200,244, 84, 22,180,199,196,196,168,211,130, 0,144,145,145,241,188,217,108,238, 86, - 81, 81,113, 79, 78, 78, 14, 46, 94,188,136,134, 13, 27, 34, 41, 41, 9, 59,119,238, 76,103, 53,134,161,154, 92,172,158, 65, 78, -177,102,102,102,190, 76, 8,201, 81, 28, 41, 95,167,201,223,119, 63,255,163,136, 32,101,122,240,118, 31,241,166, 76, 29, 14, 10, -114,173,221, 71, 80,249, 78, 17,238, 10,233, 96, 41,115,254,222, 13, 87, 32,129,165,101,244, 73, 41,229, 9, 33, 85, 4, 64, 32, - 7,203,233,116,162,184,184, 24,148, 82, 62,146,153, 24, 74, 96, 21, 23, 23,191,240,212, 83, 79,173,156, 49, 99, 70,204, 3, 15, - 60,128,239,191,255, 30,205,155, 55,135,205,102, 67, 66, 66, 2,142, 31, 63, 14,158,231,145,151,151,135,212,212, 84,152, 76, 38, -188,246,218,107, 22,171,213,250, 90, 48, 94, 73,146,122,118,239,222, 29,185,185,185,184,112,225,194,122, 66, 72,227,199, 30,123, -236,174,186,117,235,114,111,191,253,182,237,240,225,195,211, 0, 92, 52,155,205,239,125,244,209, 71,253,218,181,107,103, 26, 53, -106, 20, 37,132, 44,163,148,202, 90,227, 87, 86, 86,118,153,184, 82,190,107, 28, 69,136,132, 16, 74, 8, 81,231, 64, 20,241,171, -188, 74, 74, 74, 96,179,217,168,211,233,228, 42, 47,161, 34,107, 30,110,108, 40,157,247,240,225,195, 47,155, 46,147, 36, 9,107, -214,172,193,208,161, 67,161,211,233, 32, 73,146, 50,213, 30,170, 44, 65, 20, 69,140, 24, 49, 66, 21, 4, 95,125,245,149, 95,113, -165,184, 82, 90, 57,121,158,199,211, 79, 63, 13, 81, 20, 49,103,206, 28, 60,251,236,179,224, 56, 14,211,167, 79, 7,207,243,152, - 56,113,162,191,233,135,160,156,162, 40,226,104, 86,229,123,253,191, 91, 80, 52,167,242, 38,156,152, 26, 53, 42,207, 11, 49, 45, -232,143,211,159,115, 37, 8, 2,122,246,236, 9, 81, 20, 53, 9, 43,127,225, 60,112,224,128,250,185, 83,167, 78,232,218,181, 43, - 68, 81, 68,191,126,253, 84, 94,173, 79,233,144,101, 25,243,231,207, 87,167, 5, 61,121,213,121,252,248,241,247,248, 59,191, 69, -139, 22,172,194, 48,252, 17, 14,150, 45, 43, 43,107,127, 86, 86,150, 95,135,202,215, 73, 10,230, 52,121, 9,171, 93,240, 76, 13, -102,102,102,190,140,202,181, 91,187, 52, 92,171,243,157, 34,244,119,190,175,131,245,122,160,209, 98, 48,129,165,172, 75, 8, 5, -163,209,184,191,168,168,168, 83, 84, 84,148,218,241,251, 19, 39, 80,170,230, 0, 0, 32, 0, 73, 68, 65, 84, 87, 22,139, 5, 60, -207,227,252,249,243, 48, 26,141,251, 35,153,137,161,166, 8, 79,157, 58,181,171,110,221,186,143,252,245,175,127, 29,111,183,219, - 91, 10,130, 32,217,108, 54,221,215, 95,127, 77,214,172, 89,131, 90,181,106,225,153,103,158,161, 22,139,197, 65, 8,177,139,162, -120,188,172,172,108,222,241,227,199,131, 58, 77,141, 27, 55,190,213,100, 50, 97,235,214,173, 0,176, 3,192,195, 79, 60,241, 4, -231,116, 58, 49,119,238,220,115, 0,182,198,198,198,126,188,124,249,242, 14,173, 91,183,214,173, 93,187,214,178,115,231,206,117, - 90,197,149,178,222,202, 59, 13,189,211,184,164,164, 68, 83,250,112, 28,247, 63, 74,233,200,242,242,242, 18,131,193,160, 47, 41, - 41,113,120, 59,140, 22,139, 5,101,101,101,144,101, 89, 56,119,238,220, 41, 0,205, 56,142,251, 31,107, 30,110, 14,129,181,106, -213,170,128,110,147,226,110, 41, 3,170, 53,107,214,104,114,197, 86,174, 92,121,153, 43,230,235, 10,105,157, 38,163,148, 86, 89, -115, 5, 64, 29, 0,114, 28,135,204,204, 76,232,245,122,188,245,214, 91,200,204,204, 84, 93,172,162,162, 34,162,133,179,209, 4, -155,167,141,133,122,173,195,110,175, 12, 31,199,105, 22, 89,222,156,190, 47,239,184,135,217, 1, 85,225,136, 4, 39,128, 85,131, - 6, 13, 26, 20, 23, 23,135,209,163, 71,195,104, 52, 98,200,144, 33,168,168,168, 24, 6, 0,217,217,217,152, 48, 97, 2, 0, 96, -210,164, 73,152, 60,121, 50,202,203,203,109,172,198, 48, 84,147,131,245,122,144, 83,226,188,215, 84,133,193,155,227,125,190,194, -225, 43,138, 60,142,216,230, 80, 92,254,174, 13, 4, 65, 81,142,193, 42,116, 40,247, 74, 25, 81,106,112, 87, 54,110,220,184,177, -253,189,247,222, 43,120,119,252,190, 66,203, 51,223,143,163, 71,143,186,202,202,202, 54,106, 25,129, 69,202,193,242,136,172, 53, - 0,212,222, 35, 33, 33, 97,137,197, 98, 25,152,148,148, 36,218,237,118, 92,186,116,233,232,145, 35, 71, 90,135, 83,120, 76, 38, -147, 30, 0, 46, 94,188, 8, 0, 23, 1, 52,185,245,214, 91,145,155,155,139,223,126,251, 45, 7, 64,191,201,147, 39,119,236,220, -185,179,184,108,217, 50,235,147, 79, 62,249,169,195,225,152,165, 53, 78,254, 28,193,178,178, 50, 92,186,116, 9,229,229,229,154, -167, 8, 9, 33,219, 40,165,152, 50,101, 74,201,228,201,147, 27,148,148,148,148, 93,186,116, 73,246,118,198,202,203,203,137,209, -104, 20,150, 46, 93, 26,173, 92,195,154,135,155, 67, 96, 93,233, 29,111,161, 28, 44,111,183, 74, 17, 90, 58,157, 14,203,151, 47, -247, 93, 43, 21, 82,101, 41,174,213, 51,207, 60, 3,189, 94,143,247,222,123, 79,109,131,252,221,209, 76, 8,241,123,247,155,111, - 56, 27,191,108, 71,193,204, 88,136,162,136,196, 39, 11,171, 76,197,249,171, 42, 90,194,249,143,127,252, 35, 98, 83,132,106, 56, - 27, 55, 6, 0,204,159, 63, 31,195,135, 15,199,214,173, 91, 3, 78, 17,134, 10,103,110,110,238,253,237,218,181,107,228,114,185, -246,180,106,213, 74, 56,123,246, 44,134, 14, 29,138,229,203,151,195,211,145, 33, 51, 51,179,202, 53, 22,139,133, 9, 44,134,136, -187, 87, 26, 78, 43,244, 89, 63, 69,188,167,235,130,188,251,158, 15,175, 99,222,188,133, 0,156,126,254,175,208,143,168,242,253, - 15,239,115, 10, 47,115,176,180, 52,186,193,196,150, 22,129, 69, 8,153, 61,105,210,164,177,221,186,117,139,139,137,137, 65, 65, - 65,129, 95, 7, 43, 38, 38, 6, 14,135, 3, 27, 55,110, 44, 37,132,204, 14, 65,235,114, 58,157, 66, 82, 82, 18,138,138,138, 2, -222,221,195,113, 28, 12, 6, 3, 44, 22, 11, 0,132,187, 57,166,189,180,180,212, 57, 98,196, 8,113,246,236,217,176, 90,173, 97, - 53, 48,132, 16,174,103,207,158, 18, 80,185,150, 9, 64, 89,157, 58,117, 26,233,245,122,228,231,231, 3,192,113, 0,189, 6, 12, - 24, 32, 20, 23, 23,211,177, 99,199,174,119,187,221,175, 80, 74, 67, 13,151,227, 1, 32, 58, 58,250, 12, 0,108,223,190,253, 23, -127,235,218, 94,126,249,229,102,158,206, 43, 30, 1,238,164,242, 18,151,251, 83, 82, 82, 62, 92,180,104,209,232, 30, 61,122,108, -111,211,166, 77,195, 11, 23, 46, 92,178, 88, 44,246,242,242,114, 74, 41, 21,140, 70,163,184,101,203,150,188,188,188,188, 12, 0, - 31,158, 58,117,106, 63,107, 34,110,124, 68, 82, 92,121, 11, 2, 95, 7,203,247, 61, 28, 78, 37,156,227,199,143,199,251,239,191, - 15, 74,169, 42,172, 56,142,195,148, 41, 83, 0, 0,175,188,242, 74,192,237, 99, 2,113, 22,204, 52, 32,229,217,139, 85,142, 1, - 0,241,132,239, 74,166, 8, 39, 77,154, 4, 81, 20,171, 76,225, 9,130,160, 10,170,112,166, 8,213,112, 22, 20, 84,138,192,196, - 68, 60,244,208, 67,232,215,175, 31,238,186,235, 46, 16, 66,170,240,106,157, 34,228, 56,238,157,169, 83,167, 10,122,189, 30,118, -187, 29,229,229,229, 40, 46, 46, 70, 32, 7,203,106,181, 70,177,218,194,240, 7, 96,215, 53,230,189,234,255, 19,180, 52, 18, 87, -186, 77,131,239,211,182,143, 29, 59, 86,146,146,146, 50,102,196,136, 17,203,230,204,153, 99,104,212,168, 17, 14, 30, 60,136, 11, - 23, 46,192,225,112, 64,146, 36,164,164,164,192, 98,177,224,179,207, 62, 43,183, 90,173, 99, 10, 10, 10, 74,130,113, 18, 66,222, - 24, 48, 96,192,164,137, 19, 39,242, 45, 90,180,192,133, 11, 23, 96,177, 88,212,198,133, 16,130,152,152, 24, 24,141, 70,236,219, -183, 15, 59,118,236,144, 9, 33,111, 4,227,244,211,168,157, 60,126,252,184,123,214,172, 89,168,168,168,176,185, 92,174, 83, 26, - 68,149, 55,167,193,179,233, 31,202,202,202, 0,192, 86,191,126,253, 20, 79,154, 0,192,175,141, 27, 55,126,181, 81,163, 70,228, -227,143, 63,166,110,183,123,157, 63,113,229, 27, 78, 74,169,205,115, 92,167,184, 99,190,107,218, 74, 74, 74, 32,203,178,206,251, -252, 80,113,119, 58,157, 47,137,162,216,109,204,152, 49, 93, 6, 13, 26,244,211,200,145, 35, 43, 98, 99, 99, 19,120,158,183, 30, - 61,122,244,183,229,203,151, 71, 29, 57,114, 36, 3,192, 49,167,211,249,146, 22,206, 8,216,199,140,179, 26, 57,149,186, 30,108, -223,166, 80,131,168, 64,156,163, 70,141, 82, 5,150,242, 82,156, 43, 95, 78, 63,187,177, 95, 22,119,101, 90,236,197, 23, 95,172, - 18,190, 87, 95,125, 53, 96,216,108, 54, 27,209,194,121, 97,126,237,170, 11,218, 3,136, 42,173,225,124,253,245,215,175,216,193, - 10, 22,206,222,189,123,195, 98,177, 64, 16, 4,172, 93,187, 54,216, 34,119, 45,101,169, 98,245,234,213,208,235,245,248,236,179, -207, 92,201,201,201, 66,108,108,108, 64, 7,171,162,162, 34,138,213, 35,198, 89, 29,156, 55, 27,130, 10, 44,151,203,133,122,245, -234,169,226,137,227, 56,101, 95, 25,240, 60, 15,142,227,192,243, 60,194,121,110,113, 65, 65,193,250,148,148,148, 17, 67,134, 12, -249,207,232,209,163,205,205,154, 53, 19, 83, 83, 83, 97,181, 90,145,159,159,143,252,252,124,215,134, 13, 27, 74,173, 86,235, 35, - 5, 5, 5,235, 67,241,157, 62,125,250,221,148,148,148, 85, 15, 63,252,240,155,109,218,180, 25, 56,126,252,120, 52,108,216, 16, -151, 46, 93, 66, 92, 92, 28,146,146,146,112,252,248,113,172, 88,177, 2,151, 46, 93,250, 6,192,196,130,130,130,188,112, 18,201, - 96, 48,204,152, 58,117,106,247,228,228,228,102,197,197,197,167, 36, 73,122, 57,220,132,118, 56, 28, 50, 0,190,168,168, 8, 0, -172, 6,131,129, 0,192,145, 35, 71, 0,224,215,250,245,235,199, 0,192,250,245,235, 9,128,157, 97,210,199, 3,192,128, 1, 3, -126,243,109,252,189,156, 43,205, 40, 44, 44, 44,107,220,184,113, 87,171,213,154,181,106,213,170,209, 1,238, 22,251,208, 96, 48, - 76, 56,114,228, 72, 25,171, 70, 55, 73, 99, 32, 8,208,233,116, 87, 36,174,130,113,126,246,217,103,126,157, 43, 95, 78,173,237, -136,175, 8, 84,246,187, 10, 54, 80, 12,209, 81,248,141,115, 32, 78, 45,225, 84, 56,179,179,179, 33,138, 34,250,246,237, 91,101, - 81,251,149, 56, 88, 10,167,242, 4, 12,179,217, 12, 89,150, 49,112,224,192,171,226,165,148, 62,157,147,147,227,162,148, 26, 57, -142,251,123, 65, 65,193,126,197, 85,244,231, 96, 49, 48, 48, 92,165,192, 18, 69,177, 80,235,179, 5, 21,232,116,186, 66,141, 34, -107, 93,227,198,141,155, 47, 88,176,224, 73,179,217,220,203,106,181,166,121,132,204, 62,139,197,242,157, 32, 8,255, 44, 40, 40, - 40,213,250,191, 30,193, 52, 60, 37, 37,165,203,195, 15, 63,252,230, 29,119,220,209,233,177,199, 30,131, 32, 8,248,244,211, 79, -113,250,244,233,157, 30, 97,181,253, 74, 18,233,216,177, 99, 37, 8,126,251,104,168, 6,172, 76, 20,197,121,221,186,117,123,108, -219,182,109, 31, 80, 74,207,232,245,250,127,247,236,217,115,212,247,223,127,255, 31, 74,233, 73, 81, 20, 63,232,218,181,235,152, -157, 59,119,126, 76, 41, 61, 17, 38,191, 45, 88,195,239,207,185, 10,133, 35, 71,142,148, 2,120,178,118,237,218,239,243, 60,223, - 85,150,229,182, 0,192,243,252,143,178, 44,111, 61,115,230,204, 65, 86,125,110, 30,184,221,110, 36, 38, 38, 86, 25, 52, 41, 83, -111, 87, 42,174,220,110, 55,146,146,146,192,113,156,202,171,108, 16, 26,100, 90,144, 4, 19, 24,110,183, 27,209,209,209, 42,167, - 50,232, 11, 81, 63,168,221,110, 15,186, 6, 43, 92, 78,132, 88,219,116,133,156,208,194,105,183,219, 35, 22, 78, 0,200,205,205, - 45, 6,240,176,242,189,125,251,246,171, 14, 30, 60, 56, 40,144,131,197,192,192,112,149, 2,107,199,142, 29, 13,170,243,143, 61, - 29,120,150,231, 21, 17,120, 4, 84,239,148,148,148,140,109,219,182, 41, 83, 87, 83, 11, 10, 10,114,254,232,132,118, 58,157,147, - 9, 33,111, 83, 74,157, 0, 80, 81, 81,241, 10, 33,100,146,242,176,100,167,211, 57,145, 16,242,250,213, 60, 60,153, 82,106,140, -116,184, 61, 66,138,137,169,155, 24,162, 40, 22, 14, 24, 48, 32, 49,220,235,130, 13,168, 68, 81, 44, 76, 79, 79, 15,155, 51, 42, - 42,234,124, 16,206,179,189,122,245,170,123, 5,225,188, 88,167, 78, 29,191,119,194, 72,146, 84,216,189,123,247,136,134,243, 74, - 57,131,165,103,117,132, 51,136,224,186, 63, 37, 37,101, 91, 66, 66, 66, 35,155,205, 38, 89,173, 86,201,219, 5, 52, 24, 12, 69, -172,214, 48, 48, 92,133,192,186,145,225, 17, 84, 57,215, 91,184, 20,113,229,245,221, 21,236, 59, 3,195,181, 64,117, 12,166,170, -131,115,235,214,173, 77, 35,205,185,125,251,246, 6,127, 86,206, 16,109,232, 29,172,102, 48, 48, 92, 29, 56,150, 4, 12, 12, 12, - 12, 12, 12, 12, 12,145, 5, 1,144,230,239,135,112,238, 14, 32,132,164,133,251,199,161,248, 25, 39,227,100,156,140,147,113, 50, - 78,198,121,243,113,134,226,190, 89,238, 78, 36, 90,247, 74,185, 34,114,118, 11, 43,227,100,156,140,147,113, 50, 78,198,201, 56, -255,132, 96, 83,132, 12, 12, 12, 12, 12, 12, 12, 12, 76, 96, 49, 48, 48, 48, 48, 48, 48, 48, 48,129,197,192,192,192,192,192,192, -192,192, 4, 22, 3, 3, 3, 3, 3, 3, 3, 3, 3, 19, 88, 12, 12, 12, 12, 12, 12, 12, 12,215, 13,170,245, 46, 66, 6, 6, 6, - 6, 6, 6, 6,134, 63, 35, 84, 7,139, 16,178,137, 16,178,137, 37, 9, 3, 3, 3, 3, 3, 3,195,181,196,205,168, 65, 4, 79, -196, 40,174,226, 97,198, 12, 12, 12, 12, 12, 12, 12, 12, 87, 40,174,110, 74, 13, 66, 40,165, 32,132, 80, 74, 41, 97,217,204,192, -192,192,192,192,192,112,173, 5,214,205,168, 65,216, 34,119, 6, 6, 6, 6, 6, 6, 6,134,106, 18, 88,175,179, 53, 88, 12, 12, - 12, 12, 12, 12, 12,127, 0,110, 74, 13,162,222, 69, 72, 8,233, 1, 0,148, 82, 38,178, 24, 24, 24, 24, 24, 24, 24,174,157, 24, -185, 9, 53, 8,219,166,129,129,129,129,129,129,129,129, 33,194,168,214, 53, 88,132,144, 52,198,201, 56, 25, 39,227,100,156,140, -147,113, 50, 78, 38,176, 24, 24, 24, 24, 24, 24, 24, 24, 24,152,192, 98, 96, 96, 96, 96, 96, 96, 96, 96, 2,139,129,129,129,129, -129,129,129,129, 9, 44, 6, 6, 6, 6, 6, 6, 6, 6, 6, 38,176, 24, 24, 24, 24, 24, 24, 24, 24,254, 32, 16, 0,126,239, 4, -160,148,238,211, 76,114, 5,119, 19,132,226,103,156,140,147,113, 50, 78,198,201, 56, 25,231,205,199, 25,138, 59, 28,253,113, 93, - 11, 44, 45,251, 96, 17,207,131,130,194, 38, 39, 36, 45,210, 9,197, 56, 25, 39,227,100,156,140,179,122, 56,175,164,173,247,199, - 73, 8, 33, 94,131,120, 0,160,158,142,147, 94, 79,225,188, 81,242,168, 58,210,179,186,243,136, 1, 16, 66, 36, 32,135,202,105, - 68, 66, 8,113, 3,112,211, 8,236, 76,234,201, 88, 46, 82,124, 12,213,160,188, 43,243,136,252, 62,160, 96,249,196,192,112, 19, -215,247,136,181,245, 94,109, 7,175,112, 2,144, 1,200,132, 16, 92, 77, 91, 82, 29,125,146, 55, 39,128,106,139,251,149,182,163, -213,145,158,213,153, 71, 12, 33, 4, 22, 33,132, 52,111,222, 92,236,218,181,235, 15,177,177,177, 77,188,127, 27, 60,120, 48, 0, - 64,150,101,249,155,111,190,137, 14,231,207,122,246,236, 41, 8,130,240, 85, 70, 70, 70, 15, 95, 62, 79, 47, 46,231,228,228, 68, - 95,207, 9, 54,108,216,176, 82,135,195,193,251, 30,151, 36, 73,254,236,179,207,162,111,134, 66, 65, 8, 17,154, 52,105, 50,204, -104, 52, 26,148, 99,109,219,182,245,254,157,238,217,179,103,161, 22,174,215, 95,127,157, 91,180,104,209, 86,163,209,104,228, 56, - 14,130, 32, 64, 16, 4,148,149,149, 21, 13, 31, 62,188, 31, 0, 44, 89,159,191, 54,202,104, 72,128, 27,112,187, 41,168,155,162, -188,162,172,120, 76,122,227,126,147, 38, 77,114,179,106,122,121, 61, 10, 53, 56,242, 3,215,198,141, 27, 93, 44,245, 52,215, 1, -165, 77,186,242,139,171, 54,180, 3,100,224, 65,207,215, 10, 14, 40, 38, 64, 94, 2,240,217, 57,192, 90,229,228,107,216,185, 41, - 29,109,221,186,117,223, 75, 78, 78, 30, 83, 90, 90, 90,206,243, 60, 8, 33,180,101,203,150,151, 69,135, 16, 2,183,219,125,106, -255,254,253, 29, 66,116,220, 98,253,250,245,167, 39, 38, 38,142, 42, 47, 47, 47, 39,132,128, 16, 66, 9, 33, 72, 75, 75, 83, 57, -149,119,183,219,125,106,223,190,125, 29,174, 85, 56,255,200,184, 43, 92, 90,226,238,205, 89,183,110,221,233,201,201,201,163, 44, - 22, 75, 57,199,113, 42,103,203,150, 45,175, 56,156,145,226,100, 8, 67, 96, 53,106,212, 72, 74, 76, 76,220,156,154,154,218,120, -193,130, 5,200,203,203, 67,179,102,205, 32,203, 50,220,110, 55, 40,165, 24, 54,108, 24, 31,110,167, 32,138,226,170, 58,117,234, -220,177, 96,193, 2,228,228,228,224,246,219,111, 7, 33, 4,178, 44, 67,150,101, 60,253,244,211,252, 85, 54, 22, 38, 65, 16,158, -214,233,116,119,186, 92,174,219, 60,194,231, 96, 69, 69,197, 22,151,203, 53,155, 82, 90,118,181, 9,230,112, 56,248,175,191,254, -218,159,240, 10, 26,246, 78,157, 58, 29,114,185, 92,117,195,249, 47,157, 78,119,106,219,182,109, 77, 3,253,222,165, 75,151, 67, - 14,135, 35, 44,206,168,168,168, 83, 91,183,110,109, 26, 76, 92, 53,110,220,248,190,150, 45, 91,234, 63,253,244, 83,156, 62,125, - 26, 6,131, 1,110,183, 27,178, 44,195,233,116,226,222,123,239, 37,225,252,167,209,104, 52,110,219,182,173, 81,116,116, 52,202, -202,202,112,225,194, 5, 60,240,192, 3,106,103, 31,165, 55, 36,204,204,154,216,216,233,116,225,183, 18, 43,206, 95,176, 98,222, -220,185, 55,124,229,234,210,165,203, 6,187,221, 30,175,124, 23, 69,241,183,157, 59,119,246,190, 90, 94,171,213,122,140, 82, 26, -171,177,111, 7, 0,240, 60,127, 17, 64,253, 16,245, 39, 21,192, 64, 65, 16, 26, 9,130,208,148, 82, 90,223,229,114, 37,121,202, -226,121,158,231,127,117, 56, 28,135,236,118,251, 81, 0,223, 80, 74, 79,220,164,226,170, 62, 0, 87, 74, 74, 74,129,103, 52,127, -213,156, 50,240, 32,165,180, 6, 0, 92,186,116,169,198,201,147, 39,107,125,253,245,215, 45,167, 76,153,210, 91, 87, 81, 49,205, - 14, 28, 8,118,125,211,166, 77,119,139,162,152,234,213, 14,157,200,203,203,139, 68,103,199,213,169, 83,231,189,187,238,186,235, -225,121,243,230, 25,119,238,220,105,108,213,170, 21, 42, 59, 91,168,237, 61,165, 84, 45, 91,157, 59,119, 1,249,221,221,190, 44, -249, 0, 8, 41, 41, 41, 51, 7, 12, 24, 48, 98,238,220,185,198,125,251,246, 25,155, 52,105,162,114,122,167,167,167, 83, 71,251, -246, 29, 64, 0, 66, 61,211, 84,145, 10,103,117,196,189, 69,139, 22,248,249,231,159,131,198, 61, 61, 61,125,196,188,121,243,140, -123,247,238, 53,222,122,235,173,126,227,174,196,191, 67,135,219,131, 22, 71,239,244,156, 63,127,190, 49, 55, 55,215,216,188,121, -115,143, 72,131, 26,198, 48,226, 94, 29,156, 12, 90, 4, 22, 33,132,235,217,179,231, 55,245,235,215,111,177, 96,193, 2,194,243, - 60,114,115,115, 81, 92, 92,140, 58,117,234,192,108, 54, 67,175,215,135,255, 71,130,240,149, 71, 92,113, 60,207, 99,195,189,247, -194, 10, 96,152,221, 14, 73,146,112,228,200,145,171,109, 20,187, 69, 71, 71, 47, 88,178,100, 73,108,151, 46, 93,184,147, 39, 79, - 34, 45, 45, 13, 69, 69, 69,237, 55,110,220,216,118,236,216,177,163, 8, 33,143, 81, 74,191,143,196,200,246,155,111,190,129,201, -100,130,209,104,132,201,100,130,195,225, 8,122,157,219,237,174,181, 97,195, 6, 68, 71, 71, 67,150,101, 80, 74,171, 84, 96,223, -138,231,114,185,208,183,111,223, 90, 65, 45, 9,151,171,214,230,205,155, 85, 1,228,205, 37,203, 50,116, 58, 29, 56,142, 83, 28, - 71, 56, 28, 14,244,232,209,163, 86,176, 17, 93,147, 38, 77,134, 41,226,138,231,121, 44, 91,182, 12,201,201,201, 72, 74, 74,130, -217,108,134,209,104,188,146,188, 71,116,116, 52,190,250,234, 43,196,197,197,161, 65,131, 6, 16,132,223,139,158,236,114,163,220, -106, 71,198, 45,139, 48,122,109, 39,196,155, 37,184, 92,242, 13, 95,185,236,118,123,252,158, 61,123,212,239,189,123,247, 54,183, -107,215,238,167, 64,231,107, 21, 96,178, 44, 39,108,217,178, 5, 6,131, 65, 91,231, 46,203,232,216,177, 99, 66,136,114,157,158, -144,144,176,164, 75,151, 46, 98, 98, 98, 34,111, 48, 24, 96, 50,153, 16, 27, 27, 11,189, 94, 15,183,219, 93,223,229,114,213,183, -217,108,119,158, 63,127, 94,254,226,139, 47,222, 32,132, 60, 68, 41, 93,115,147,137,171, 91, 82, 82, 82,254, 1, 0, 5, 5, 5, - 47, 24, 12,134,227,145, 18, 89, 10,106,212,168,129, 26, 53,106, 32, 45, 45, 13, 67,135, 14,141,109,219,182,237,223, 27,216,108, -143,231, 3,246,128, 74,128,227,234,238,223,191, 63,193,107,192,198,223,122,235,173,231,252, 25, 94,158, 54,224,212,209,163, 71, - 59,132,136, 43, 87,171, 86,173,119, 6, 12, 24,112,255,188,121,243,162, 1,224,223,255,254, 55, 6, 14, 28,136, 90,181,106,193, - 96, 48, 64,146, 36, 72,146, 4, 81, 20,213,119,175, 78,218,175,150,175, 85,171,214,180,129, 3, 7,222, 55,119,238,220,104, 0, -248,232,163,143,144,158,158,142,132,132, 4, 68, 71, 71, 35, 42, 42, 10, 58,157,174, 10,183, 23, 39,213, 18,206,233,157, 59,163, - 55, 0,241,223,255, 70,108,108, 44, 82, 71,142,132, 94,146,192,239,218,133,152,152, 24,111, 78,205,113,207,205,205,197,185,115, -231,252,198,157,231,121, 68, 69, 69, 85,218,143, 21, 21,129, 92, 33, 53,238, 10,231,162, 69,139,212,184,155,205,102, 63,113,231, - 66,185,139,124,173, 90,181,166,165,167,167,223, 55,127,254,124,149,179, 79,159, 62,136,143,143, 71,116,116, 52, 36, 73,130, 78, -167,243,151, 71,215,132,147, 65,163,192, 82,214, 70,153, 76,166,206, 31,124,240, 1,120,158, 87, 59,200,168,168, 40,181,112,232, -116,186,176,109,232,140,140,140, 30, 11, 22, 44, 80, 57,109, 62,231, 92,137,104,243,226,239,117,231,157,119, 46, 90,181,106, 85, -148, 32, 8,184,116,233, 18, 54,111,222,140,216,216, 88, 24, 12, 6, 12, 27, 54,140,235,213,171, 87,124,175, 94,189,150, 16, 66, - 70, 83, 74,191,187,154, 68,163,148,170, 98,195,100, 50,193,100, 50,105,117,114,176,114,229, 74, 8,130, 80,165,224,122, 87,100, -229,123, 98, 98,162, 86, 71, 10,219,182,109, 3,199,113,234,245,162, 40, 98,213,170, 85,120,254,249,231,113,238,220, 57,245, 55, - 13,225, 36, 70,163,209,160,136, 43,143, 3,168, 52, 54, 68, 16, 4,226, 57, 78,195, 89,100, 42, 8, 2, 46, 94,188,136,154, 53, -107, 34, 46, 46, 14, 81, 81, 81, 85, 42,172,211,229, 70, 65, 81, 41,134,127,219, 6,101,214, 18,148,148, 18, 56,156,206,155,174, -178,125,240,193, 7,146, 44,203,138,224, 86, 93, 65,143, 43,133,199, 31,127, 60, 94, 43,151,193, 96,192,154, 53,107,212,178,164, -116, 2, 74,163,232,125,188,110,221,186, 90,202,209,171,203,151, 47,143, 90,186,116,169, 58,216,209,233,116, 48,153, 76,136,137, -137, 65,108,108, 44,226,227,227,145,144,144,128,182,109,219,242,143, 62,250, 40,223,173, 91,183, 87, 1,220, 52, 2,139, 16, 18, - 99, 48, 24, 38, 46, 95,190, 92, 2,128,190,125,251, 78,180, 90,173,207, 2, 40,185, 90,145,197, 3,203, 8, 33, 15,122,242, 78, -223,175, 95, 63,221, 63,255,249, 79,220,118,219,109, 24, 55,110, 92,252,187,211,166, 13, 6,176, 34, 88,155,227,141, 89,179,102, -197, 42,101, 72, 25,172, 41,175,178,178, 50, 60,247,220,115, 33,219,100, 0, 92, 74, 74,202, 95,254,245,175,127,153,149,227,241, -241,241,151,181, 69,190,239,129, 92, 82, 47, 87,232,145,249,243,231,171,156, 9, 9, 9,106, 27,167,188,126, 61,248, 19, 54, 44, -158, 1, 83,124, 45,140,124, 97,106,216,225,236, 8,160, 35,199,193,221,186, 53, 12, 6, 3, 18,140, 70, 64,146,224,246,136, 43, - 45,225,244,229,228,121, 94,141, 39,165, 20, 21, 21, 21, 40, 45, 45,133, 44,203,176,219,237,104,223,190, 61, 8, 33,184,229,150, - 91, 2,185, 66,151,197,189,102,205,154,151,197,221,187,157,246, 30,104, 6,226, 76, 73, 73,121,228,131, 15, 62,240,155,158,130, - 32, 64,146, 36, 44, 90,180, 72,147,147, 29, 14,103,152,249,206,160,197,193, 82, 70, 38,121,121,121,216,189,123, 55, 68, 81, 68, - 82, 82, 18, 58,118,236,168, 88,211, 16, 4, 1, 28,199, 97,240,224,193,229,190, 23, 75,146, 84,248,217,103,159, 53,240, 52, 10, -202, 29, 6, 28, 0,172, 95,191, 30,171,210,211, 97, 3,208, 48, 43, 11,173, 50, 50,112, 72,167, 3, 15, 32,169,168, 8, 60,207, -251,229,244, 94,155,229,231, 78, 8,179,201,100,154,151,147,147, 19, 37,203, 50,138,138,138, 0, 0, 25, 25, 25,224,121, 30,191, -252,242, 11, 38, 79,158,140, 47,190,248, 2,171, 87,175,214, 55,107,214,108, 30, 33,164, 29,165,212,226,197, 95,133,243,158,123, -238,201,115,187,221,117,252, 37,152, 36, 73, 0,128,232,232,104,232,245,122,152,205,102,191,194,197,223,221, 21,178, 44, 99,200, -144, 33, 32,132,128,231,121,117, 61,146,119,101, 83, 62,239,221,187, 87, 19,167,219,237, 70,183,110,221, 0, 0, 38,147, 9,102, -179, 25,223,125,247,187,126,108,215,174, 29,236,118, 59, 18, 19, 19,177,111,223, 62, 77,156,103,206,156,193,146, 37, 75, 32, 73, - 18,226,226,226, 32,138,162,180,126,253,250,215,140, 70, 99, 12,207,243,136,139,139, 67, 70, 70,198, 44,101,253,156,219,237,150, - 87,173, 90, 21, 29,136, 83, 16, 4, 88,173, 86, 85, 96,197,197,197, 85,117,226,220, 46,156, 58,119, 17,105,173,108,232,221, 67, - 66,206,234, 50,236,216,224, 14, 25,206,171,197,181,224, 60,113,226, 4,142, 28, 57,162, 78,175, 42,211,225,223,175, 95, 18,119, - 52,111,151, 73,233, 56, 41,165,208,185, 46,161, 75, 43,178, 19,110,124,182,125, 63,125, 39, 84, 56, 5, 65,128, 44,203, 88,189, -122, 53,142, 31, 63,142,245,235,215,163,162,162, 2, 53,107,214, 68,108,108, 44, 58,119,238,140, 71, 30,121,196,175,192,242,229, -148,101,121, 9, 33,164,245,200,145, 35,201, 55,223,124,131,162,162, 34,148,150,150,194,225,112,192,225,112, 64, 20, 69,117, 64, -145,146,146, 2,142,227,104, 69, 69,197,146,155, 33,143, 60,237,136, 0, 96,194,251,239,191,159,208,190,125,123, 0,192,251,239, -191,159,240,200, 35,143, 76, 0,240, 42, 0,215,149,132,211, 0,212, 65,229,197,171, 81,249,194,235, 86, 43,121,115,229,202, 33, - 0, 70,125,249,229,151, 24, 49, 98, 4,222,153, 54,173,149,175,192,242,230,116,187,221,216,181,107, 23,118,238,220, 9,151,203, - 5, 89,150,213,119,239,207,202,123, 32, 49,232, 19, 78, 98,177, 88, 42,118,238,220,105, 94,184,112, 33,226,227,227,209,160, 65, - 3,213,101,242, 21, 3,202, 43, 84,220, 45, 22, 75,197,190,125,251,204, 75,150, 44, 65,124,124, 60,234,215,175, 15,163,209,168, -114, 74,146,132, 61,223,173,194, 19,163,238, 65,225,209,159, 48,235,217, 7, 52,135,115,122,231,206,232, 12,192, 52,111, 30,202, -154, 55, 71,195, 62,125, 32, 72, 18,108, 63,254, 88, 25,190,222,189, 65,117, 58,136,219,183,107,230,220,181,107, 23, 40,165, 72, - 77, 77,133,213,106, 69, 76, 76,140, 26,214,117,235,214,225,238,187,239,198,226,197,139,209,185,115,103, 77,113,223,187,119,175, - 26,247,122,245,234, 93, 22,119, 69,196, 52,108,216, 16, 23, 47, 94, 68,163, 70,141,130,114,150,149,149, 85,228,230,230,154, 23, - 47, 94,140,248,248,120,212,173, 91, 23, 70,163,177,138, 19,246,250,235,175, 87,225,104,221,186,245, 85,115,134,155,239,215, 0, -183, 3,240,118, 30,236, 0,116, 94,239,133, 0,118,249, 57, 79, 57, 46, 2,104,227,249, 77, 6, 80, 10, 32,214, 15, 95, 32,158, - 34,143,195,154,232,115,190,239,255, 84, 21, 88,132, 16,165, 54,246, 4,240, 61, 0, 52,107,214, 12,197,197,197,136,138,138, 66, -199,142, 29, 81, 88, 88,168, 90,135,110,183, 27,183,221,118, 27,222,126,251,109,112, 28, 7,167,211, 9, 74, 41,120,158,199,189, -247,222,235,207,122,113, 3,192, 29,119,220,129,223, 60, 7, 90,101,100,160,110,221,186, 56,233,229,196,164,165,165, 97,210,164, - 73,234,180, 22,165, 20, 86,171, 21, 15, 62,248, 32, 31,196, 29,121,234,163,143, 62,138,145, 36, 9,103,206,156,129, 50,210,148, - 36, 9,199,142, 29,195,204,153, 51,241,200, 35,143,224,248,241,227,168, 95,191, 62, 38, 78,156,104,158, 56,113,226, 83, 0,178, -130, 52,150,201,159,127,254,185, 90,168,236,118, 59, 74, 75, 75, 81, 90, 90,138,197,139, 23, 3, 64, 21, 7, 75,235,180,153,219, -237,198,234,213,171,253,142, 14,125, 71, 12, 90, 71, 11,110,183, 27, 59,119,238, 84,197,153, 32, 8,170,251, 68, 8,193,254,253, -251,193,113,156, 42, 12, 67,245, 61, 74,220,146,147,147, 97, 48, 24, 32,138,162,244,195, 15, 63, 76,174, 85,171,150,105,212,168, - 81, 40, 45, 45, 69, 74, 74, 10,250,247,239, 15,183,219, 13,135,195, 17,114,237,156, 32, 8, 32,132,160,102,205,154,136,137,137, -241, 51,213, 41, 99,208,144,139, 0, 42,195,152, 49,192,132,255,204,186, 57, 70, 48, 78,167, 19, 21, 21, 21, 85,196,213,246, 77, -159,198,237,248,254,155,184,220, 93,155, 42, 51,249,208,221,191,119,199, 48,180,108,251,240,111,169,173,110, 37, 63,236,205, 11, - 62,157,205,243, 60,198,143, 31,143,204,204, 76, 12, 31, 62, 28,235,215,175,199, 75, 47,189,132, 71, 30,121, 68,235, 8,217, 59, -156,255,121,248,225,135,255,178,124,249,242, 91,199,143, 31,207, 41,117,210,104, 52,130, 16, 2,155,205, 6,171,213,138,138,138, - 10, 28, 60,120,208,253,232,163,143, 30,182,219,237,255,185,137, 6,155,143, 63,247,220,115,205, 31,122,232, 33,245,192, 67, 15, - 61,132,253,251,247, 55,159, 49, 99,198,227,253,250,245,123, 63, 92, 23,203, 0,212,173, 81,171,214, 12, 0, 48,156, 61,251,156, - 21, 56, 5, 0,111, 2,233, 50,112,247,218,181,107, 1, 0,245,235,215,135, 27,104, 78,128,143,120, 96,153, 11,248,214,159,131, -229,114,185, 80, 81, 81,113,153,152,242,247, 30, 42,156,148, 82, 74, 8,113,243, 60,143,180,180, 52,164,167,167, 67,167,211,193, -108, 54,171,237,188,111,155, 20,168,163,245,109,146,120,158, 71,147, 38, 77,208,167, 79, 31, 72,146, 4,147,201,164, 14, 72, 21, -135,181,117,183,190, 88,182,248, 29, 60,156,222, 18,255,215, 61, 25,159,237, 45,210, 20,206, 59, 57, 14, 93, 37, 9,150,102,205, - 16, 29, 29, 13,206, 96, 0,241,154,202,162, 70, 35, 56, 31,135, 60, 88, 56,211,210,210,112,246,236, 89,228,231,231, 35, 63, 63, - 31, 28,199,161,107,215,174,208,233,116, 16, 4, 1,121,121,121,120,227,141, 55, 96,183,219, 67,113, 82, 0,110,142,227,208,164, - 73, 19,244,238,221, 27, 58,157, 14, 70,163,241,178,169, 65, 81, 20, 81, 90, 90,138,198,141, 27, 99,229,202,149,184,243,206, 59, - 67,114, 54,111,222, 28, 61,123,246, 84,103, 20,148,165, 58, 74,122,122,196,157,154, 14,222, 55, 37,105,225, 92,254,131, 13,175, -255,247, 44,202,237,133,248,173,220, 93,101, 6,184, 94, 77, 61, 78, 44, 25, 88,221,238,177,170, 65, 40,165,155, 2,156,150, 72, - 8,201,241, 42, 27, 25,132,144, 28,239,247, 64,231,121, 62,118,159, 48, 97, 66,135,236,236,236, 41, 93,186,116, 89,182,109,219, -182,165,129,248, 2,241, 76,152, 48,161,101,118,118,246, 20,239,243,253,252,207,229, 14, 86,101, 57, 38, 20, 94,187,187,215,169, - 83, 71,157,119, 54,155,205, 85, 58,105,151,203,133,255,252,231, 63, 72, 74, 74, 82,215,232, 36, 39, 39, 7,172, 36,138,219,113, -159,103,173,210, 65, 73,194, 73, 0, 45, 60, 13,129,203,229,130,195,225,192,138, 21, 43, 16, 29, 29,173, 86,116,179,217, 28, 52, - 99,116, 58, 93,247, 59,238,184,131, 43, 45, 45, 85, 69,137, 40,138, 56,118,236, 24,222,125,247, 93, 60,244,208, 67,104,220,184, - 49,100, 89, 70, 73, 73, 9,122,246,236, 41, 24,141,198,238,193, 4,150,226, 76,127,254,249,231,234,212,165,210,120, 41, 80, 4, -150,214,117, 48,138, 24, 26, 50,100, 8,120,158,247,235, 90,121, 55,104, 91,182,108,209,204,217,185,115,103, 24,141, 70, 53,189, -190,253,246,247,246,185, 99,199,142,160,148, 34, 49, 49, 17,223,127,255,125,200, 70,183,109,219,182,112,187,221, 72, 74, 74,130, - 36, 73,100,253,250,245,175,121,196, 21, 17, 69, 17, 63,254,248, 35,246,239,223,143,196,196, 68,152, 76, 38, 77, 83,187,165,165, -165, 69, 35, 70,140,112, 41,194, 15, 0, 74, 74, 74,206,252,222,185,219,139,239, 29,240,153, 79, 88, 28,197, 55, 67,175,237,112, - 56, 80, 94, 94,142,195,135, 15,195,106,181, 66,150,101, 28, 61,178, 79, 55,229,141,113,228,245,231,187, 2, 0, 94,155,125, 6, -214,173,181,213,107,118,124,249, 87,115,175, 7, 22,125, 12, 32, 53, 24,183,213,106,133,195,225, 64,106,106, 42,114,115,115, 81, - 86, 86,134, 62,125,250, 92,230,144,106,116,117,236,132,144,222,131, 7, 15,222, 50,125,250,244,134, 45, 90,180, 32,101,101,101, - 40, 43, 43, 67,121,121, 57,148,207,251,246,237,163, 75,151, 46, 61, 94, 94, 94,222,139, 82,106,191, 73,166, 6, 7,246,235,215, -175,255,219,111,191,125,217,111,111,191,253, 54, 14, 28, 56,208,127,237,218,181,249,183,222,122,235, 55, 90, 69, 86, 3, 64,231, - 18,197,151, 62,253,244, 83, 9, 0,122,247,238,253, 82, 3,167,243,249,124,192,222,162, 85,171,251,182,109,219, 86, 67, 25,152, -213,168, 81, 3,148, 82,190,188,188,188,198, 29,119,220,113, 31, 2, 8, 44,167,211, 9,171,213,170,254,191,247, 20,161,247, 98, -100,142,227, 96, 54,155,227,110,189,245, 86,155,103,224, 91,118,240,224, 65,127,107,240,220,149,119,141, 1,181,106,213,130, 40, -138,208,235,245, 85,214,223,132,114, 49,252, 64,174,236, 71,168, 58,237,244,243,247,171,113,241,200, 15,144, 8,133, 91,118,194, -237,114, 64,118, 58,192,195,141, 3, 71, 79,163, 69, 74,200, 54, 68, 13, 39, 55,123, 54,228,142, 29,209,104,208, 32,112,162, 8, -199,142, 29,149,142,208,192,129,128, 78, 7,227,230,205, 90,195, 89, 37,238,185,185,185, 24, 55,110, 28,166, 78,157, 10,131,193, -160, 14, 84, 15, 30, 60,136, 79, 62,249, 4,253,250,245,211, 28,119, 66, 42,167, 90,149, 52,156, 48, 97, 2, 10, 10, 10, 48, 99, -198, 12,116,232,208, 1,162, 40,226,226,197,139,184,227,142, 59,112,238,220, 57, 77,156,148,186, 17, 31, 31, 15, 81, 20, 17, 21, - 21,117,217, 26, 49,165,223, 11, 39,143,188, 57,159,189, 55, 10, 31,110, 61, 8,192,141,115, 75,186, 87,233,143,166,124,114,228, -154,212, 67, 47, 13, 66, 66,156,151,161,145, 79, 57, 79, 73,228,168,236,236,236, 41,190,215,135,226,243,254,221,231,122,187,143, - 40, 59, 23,114,138, 80, 17, 67,110,183, 27,102,179, 89, 93,111,229,219,145, 42,191,121,143,110, 66, 53,230,110,183, 91, 45, 0, -188,159,209,248,129, 3, 7,112,224, 64,213,155,105, 62,248,224,131,160,156, 46,151,235,182,184,184, 56,156, 61,123,214,187,113, -193,107, 19, 39,226,255, 70,141, 82,197,149, 78,167, 67,102,102, 38,238,186,235, 46,216,108,182,219, 52, 52,186,234,186, 51,183, -219,173, 58,117, 58,157, 14,111,188,241, 6,246,239,223, 95,101, 97,187, 78,167,147, 53,100, 56,214,172, 89, 19,210,193,146, 36, - 73,117,241,180,112,238,217,179,231,178,181, 56, 74, 99,251,191,255,253, 79,237,108,181,186, 98,178, 44,195,104, 52, 18, 73,146, -136,209,104,140, 25, 53,106, 84,149, 53, 62,146, 36, 65,175,215,171,233, 19, 10, 67,134, 12, 9,218, 58, 61, 62,248,182,126,184, - 73,225,114,185, 96,179,217,112,233,210, 37, 76,158, 60,217,115,116,226, 89, 0,232,216,247, 53, 60,254,112,167,122, 62, 54,179, - 82, 2, 67,182,148,241,241,241, 88,188,120, 49, 68, 81, 68, 78, 78, 14, 98, 98, 98, 48,116,232, 80,196,196,196,224,197, 23, 95, -196, 3, 15, 60, 16,214,226, 84, 74,105, 9, 33,164,207,115,207, 61,183,101,218,180,105,245,234,215,175, 15,135,195, 1,187,221, - 14,135,195,129,163, 71,143, 98,217,178,101,167,202,203,203,251, 80, 74, 75,110, 18,113, 85,247,214, 91,111,253,235,226,197,139, -225, 61, 0,240,110,151, 22, 47, 94,140,110,221,186,253, 53, 47, 47,239, 23, 0,249, 90,120, 79, 2,143,191, 51,117,106, 61,101, -250,126,234,212,169,245,254, 62,126,252,227, 0,222, 59,176,119,239,199, 99,198,140,121,110,249,242,229, 85,174, 25, 51,102, 12, - 14,236,221,251,113,160,122,174,184,161, 60,207,227,217,103,159, 13, 21, 4, 17, 0,108, 54, 27,250,244,233, 19,112, 64,213,162, - 69, 11,200,178,172,184,213,151, 45,108,246,110,223, 53,182, 31,202,102,149,234,160,252,196,174, 53, 24,255,196,112, 64,118, 1, -142, 50,192, 81, 14,234, 40, 7,181,151,129,232, 12,160,206,138,144, 3, 63, 37,156, 49, 49, 49,149, 2, 72,175, 7,188,250, 31, - 98, 52,130,120,156, 43, 45,225,244,141,251,137, 19, 39,240,228,147, 79,194,110,183, 99,232,208,161,168,168,168,128,205,102, 67, - 69, 69, 5, 26, 54,108, 8,171,213,170,197, 17, 84,182, 51, 80, 93,192,231,158,123, 14, 29, 58,116,192, 27,111,188,129, 23, 95, -124, 17, 13, 27, 54,196,227,143, 63,142,101,203,150,161,101,203,150, 40, 47, 47, 15,201,169,244,157,102,179, 25,130, 32,168,109, -176,119, 94, 41, 2, 43, 84,220,131,113,130, 84,110,135,229,155,239,147,255,175,249,245, 86,103,115,180,136, 44,175,243,114,149, - 49,105,102,102,230,203,132,144,156,204,204,204,151,179,178,178,246,107,225, 11,240,251, 42,207,251, 32,175, 99,185, 33, 5,150, -119,133, 86, 70, 51, 74,102, 40, 2, 70, 17, 88, 57, 57, 57, 88,177, 98, 69, 21, 1, 21, 74, 96, 29,240,100,110,115,207, 40, 76, -249,222,204,237, 70,143, 30, 61,208,186,117,235, 42,238, 85, 40,135,136, 82,138, 3, 7, 14, 96,203,150, 45,184,235,174,187, 80, - 94, 94, 14,167,221,142,103,127,250, 9, 45, 70,142,132,221, 51,165, 25, 21, 21,133,119,223,125, 87,115,135,163,196, 63, 42, 42, - 74,181,231, 69, 81, 68,219,182,109, 33, 8, 2,126,252,241, 71,124,253,245,215, 97,221, 82,231,118,187,113,223,125,247, 85, 17, - 67,190, 2, 75,169, 60,171, 86,173,210, 28,206, 30, 61,122,192,108, 54,171,233,246,197, 23, 95,168,191,119,239,222, 29,132, 16, - 36, 37, 37, 33, 39, 39, 71,115, 56, 21,241,196,243, 60,202,202,202,144,155,155, 11,157, 78,167,174,207,208,235,245,106,250, 48, - 4, 23, 88,229,229,229,176,219, 43,205,158, 99,199,142, 85,249,221,238,184,114, 19, 72, 41, 71, 22,139, 5, 27, 55,110,196, 39, -159,124,162,142,144,189,197,118,152,163,200, 34, 66, 72,223, 23, 95,124,113,227,155,111,190, 89, 59, 33, 33, 1, 74,181, 76, 0, - 0, 32, 0, 73, 68, 65, 84, 1, 14,135, 3, 39, 78,156,192,194,133, 11,207,148,149,149,245,165,148, 22,221, 68, 89, 68,243,242, -242,138, 19, 19, 19, 21,123, 62,198,110,183, 19,207,160,137, 2, 80,132,100, 25, 0,135, 22,247, 74, 4,122, 14,189,239,190,222, -222, 11,205,159,123,238, 57,236,216,177,163,183,184, 98,197, 62, 39,176,145, 95,177, 34,109,198,140, 25,234, 57, 51,102,204,192, -231, 43, 86,108,144,129,141,193,202,146,213,106, 85,219,176,221,187,119,107,110, 35,130, 13, 36,149, 37, 21,129,214, 92,133,179, -100,129, 82, 74,211,210,210, 42,215, 20,122,218,178,219,238,188, 7,211,223,251, 0, 81, 28,197,189, 61,154, 32,201, 44,128, 24, -227, 33,245,200, 4,137,245,152,180,147,219,132, 28,240, 82, 74, 81,231,133, 23, 16,111, 52,194,230,113,170,164, 33, 67, 0,157, - 14,134,181,107, 33,138, 34,172, 35, 71, 2,146, 4,227,194,208,219,244,121,199,253,200,145, 35,216,186,117, 43,154, 53,107,134, -195,135, 15,171,251, 84,113, 28,167, 14,176,181,198,221, 83,118, 32, 73, 18,206,158, 61,139,140,140, 12, 72,146,132, 15, 63,252, - 16,155, 54,109,194,139, 47,190,136, 49, 99,198,160, 87,175, 94,151, 25, 10,254, 56, 91,182,108, 89, 37,143, 2,173,143, 10, 39, -143,252,113, 42,198,209,149,228,251, 53,173,176,191,187, 69,254,166,204, 6,249,113,158,110, 71,229,218, 40, 91, 86, 86,214,254, -172,172,172, 12, 66, 72, 78, 86, 86, 86, 70, 16, 7,107, 80, 8,135,107, 16, 42,215, 92, 5,111,163,189, 10, 27, 69,229, 26, 44, - 21,193,110,207, 52,155,205,248,203, 95,254,130,151, 94,122, 9, 9, 9, 9, 72, 77, 77,213, 84,160,131, 97,211,166, 77,216,180, -105, 83,149, 99, 43, 87,174, 12,122,141, 36, 73, 7,147,147,147,219, 61,240,192, 3,184,120,241, 34, 10, 10, 10, 16, 19, 19,131, - 22,239,188,131,189,127,251, 27,218,204,155, 7,174,119,229,157,239, 81, 81, 81,200,203,203, 67, 84, 84,212,193, 80, 65, 85, 92, - 59,101,171, 3,197,142, 87,210,133, 42,126,102, 24,139, 50, 40,165, 88,181,106, 85,208,181, 87,222,119,177,104,229,220,190,125, -251,101, 14,150,146,222,202,111,202,130,104,173, 48, 24, 12, 84, 17, 88, 70,163, 17,241,241,241, 85,132, 85, 56, 14,214,207,217, -217,107,121,131, 33, 65, 20, 69, 72,162, 8, 65, 20,225,176, 88,138, 83,159,122,170, 31, 0, 44, 92,184,112,171,201,100, 82, 55, - 34, 21, 69, 17,229,229,229, 69,247,221,119,223, 13,239,108,217,237,118,117,237, 82,152,141, 72,200,115, 28, 14, 7, 36, 73,194, - 87, 95,125,133,219,111,191, 29,237,219,183, 87,243, 90,153,226,208, 58, 69,232,243,223,167, 9, 33, 3,102,205,154,181,105,250, -244,233,177, 22,139, 5, 11, 23, 46, 44, 41, 45, 45, 29, 64, 41, 61,125, 51, 9, 96, 79,124,254,226,213, 70,125, 12,160,134,231, -107, 9,128,135,195,189,123,176,121,171, 86, 15, 47,244,211,193, 47, 92,184, 16,135, 15, 31,126, 24,123,247,110,172, 7,204,123, -233,165,151, 26,183,111,223,190, 30, 0,188,244,210, 75, 39,235, 1,243,130,149, 7,197,193, 10, 53,144,245, 55, 96,210, 50,179, - 16,232,206,193, 43,237,100, 21,145,209,123,216,104,156,255,245, 8, 90,152,127, 67,114,156, 25,238,178,243,144,250, 76,198,222, -223,140,152, 57,111, 77, 88,241,208, 69, 69,129,120,220, 54, 73,146, 0,131, 1,188, 94,255,123, 56, 61,107,178,194,225, 20, 69, - 17, 7, 15, 30,132,209,104,132, 44,203,151,137, 41,173,179, 9,222,121,165,184, 75,211,167, 79,199, 11, 47,188,128, 15, 63,252, - 16,123,247,238, 69,155, 54,109,208,183,111, 95,156, 63,127, 30, 63,253,244, 19,108, 54,155,230,112,122,247, 23, 7, 14, 28,192, -186,117,235,112,232,208, 33,156, 60,121,242,138,242,199,151,211,183,223, 95,180,238, 87,140,238,151,122,205,234,162, 63, 13, 18, - 4,185, 62,238, 17,148,245, 80,138, 32,242,253, 14, 32, 78, 57,150,153,153,249,178,214,235,188,191, 43, 14, 88, 16,225,117,185, -192,162,148, 18,127, 98, 72, 73,116,239, 10,170,124, 86,220, 18,147,201,132,212,212, 84, 77,149,158,231,121,212,183, 88, 20,129, -162, 58, 87, 10,134, 15, 31,142,180,180,180, 42,107,176, 66, 85,110,155,205,182,229,187,239,190,107, 51,100,200, 16, 46, 47, 47, - 15,146, 36, 85,222, 86,219,165, 11,218,204,155,135,125,227,199,163,199,177, 99,168,112, 58,149, 91,219,157,229,229,229, 91, 52, -100,182,186, 48, 81, 17, 17,202, 66,126,165, 50, 79,158, 60,217,239,190, 45,193, 42, 94,160, 17,162,247,139,227, 56,205, 98,200, -237,118,171, 29, 41,207,243,234,139, 16,162,142,118,195,117, 49, 20,219, 92,225,229, 56, 14, 53,106,212, 80, 43,163,178, 6, 64, -171,192, 18, 12,134,132, 89,195,135, 55,118, 78,156,136,232,185,115,225,122,254,121,188,222,181,171,250,187,201,100, 50,110,219, -182,173,145,193, 96, 0,165, 20,133,133,133,184,255,254,251,111,138, 93,199,101, 89, 86, 23,136, 71, 26,159,126,250, 41,142, 29, - 59, 6,135,195,129,183,222,122,171,138,184,242,126, 93,161,240, 56,218,174, 93, 59,247,128, 1, 3,176,125,251,118,232,245,122, - 39,165,244, 40,243, 36, 67,227,231,189,123, 87,152, 76,166, 7, 1,152, 47, 94,188,200,215,168, 81, 3, 70,163, 17, 86,171,245, - 18,239,185, 83, 48, 31,176, 27,156,206,169,247,223,127,255, 12, 0, 16,156,206,169,193,246,193,186, 26,129, 21,202,193,242,238, - 84,175,212,185,242,199, 41,138, 34, 4,158,199,178,233,175,162,133,185, 24,237,110, 49,161,162, 40, 31, 81, 49, 53, 65, 98, 27, - 96,230,188, 53, 56,144,255, 91, 88,156,220, 39,159, 64,174, 87, 15,226,131, 15,130, 68, 69, 65,159,147, 3, 73,146, 96,253,203, - 95, 64,116, 58, 24, 23, 44,184,162,112,150,151,151, 7,116,170,180, 58, 88,190,156,146, 36,161, 93,187,118,104,210,164, 9, 54, -110,220,136,118,237,218,225,240,225,195, 56,124,248, 48,242,243,243,177,119,239, 94, 92,184,112, 65, 51,167,146, 71,159,124,242, - 9, 10, 11, 11, 33, 73, 18, 74, 74, 74,112,252,248,241,128,235,159,195,201,119, 5, 81,131, 42, 55,210,174,159,104,184,102, 2, -203,159, 6,241,131, 34,159,181, 78,202,119,187,143,216,241,253,238,123, 62, 0,156, 7,192,135,184,206,247,123, 81, 86, 86,214, - 70,197,249,242,240,242,129,214, 95, 85,113,176,124,251,133,123,238,185,231,178, 94, 57, 42, 42, 10,247,220,115, 15,120,158, 71, -108,108, 44,106,212,168,129,166, 77,155,134,220,100,211, 35,174,228, 17, 35, 70, 92,198,169,215,235,113,239,189,247, 98,233,210, -165, 0, 0,223,117, 9, 95,125,245, 85,168, 41,152,217,127,249,203, 95, 70,247,233,211, 39, 54, 37, 37, 5,103,206,156, 81,239, -116, 36,189,122,161,251,209,163,176,203, 50, 76, 38, 19,142, 30, 61,138,217,179,103,151, 57, 28,142,217,161, 50,219, 91, 96, 41, -110, 13, 33, 68,237,176, 8, 33,244,192,129, 3, 97,183, 62, 90,196, 85,184, 80, 68,149,183,200,122,226,137, 39,212,239,225, 52, -146,146, 36,209, 65,131, 6,169,207, 32,140,139,139, 67, 66, 66, 2,206,157, 59,167, 54, 26, 38,147, 73, 21, 87, 90, 4,150,168, -211,193,245,218,107, 16, 26, 52,192,175,123,246,160, 97,124, 60,248,230,205,171,140, 16, 45, 22, 11,210,211,211, 33, 8, 2,230, -206,157,123,197,194,224,122,131,114,247, 96,106,106,106, 68, 55,171,116, 56, 28,120,236,177,199,252,174,127, 84, 22, 61,187,221, -110, 56,157, 78,173,119,144, 94,145,139,118,179, 35, 53, 53, 53, 96,253, 9,148, 62,202,150, 12, 60,240,230,175,191,254,218,170, - 70,141, 26,232,223,191, 63,190,254,242,203,175, 38,122,237, 27,102, 5, 78, 25,206,158,125,214,243,249,116,168,188, 80,238, 34, -140,124, 62,146,203,220,171,171,157, 30, 34,164,242,206,229,111, 23,189,135, 22,166, 66,180,169, 31,133,173, 59,126, 66,167,122, - 20,212, 38, 93, 41, 43,204,102,115,101, 59,105, 50,169,119, 15, 18, 66, 64, 12, 6, 32,204,253, 25, 21, 78,165,126, 40,109,239, -213, 58, 88, 74,220,149,116,124,244,209, 71,241,210, 75, 47,161,127,255,254, 56,124,248, 48, 54,111,222,140,188,188, 60,140, 27, - 55, 14, 45, 91,182, 68,122,122,186,166,112, 42,124, 95,124,241, 5, 46, 93,186,164, 14, 70, 43, 42, 42,240,218,107,175, 93, 81, -220,189,243, 93, 21,148,107,135, 1, 0, 62, 92,123,226,122,171,142, 63,132,248, 30,238,245,213, 14,191,189,216,215, 95,127,237, -247,153,122,131, 7, 15, 46,191,251,238,187,113,232,208, 33,152, 76, 38, 52,109,218, 20, 54,155, 45, 96,103,232,253,180,237, 47, -191,252, 50, 32,231, 61,247,220,131,134, 13, 27, 86,113,174, 2,109,125,224,251, 4,111, 74,169,133, 16,242, 84,247,238,221, 63, - 88,191,126,189,190,101,203,150, 40, 46, 46,134,219,237,198,132, 9, 19,240,254,251,239,195,100, 50,225,248,241,227, 24, 52,104, -144,213, 98,177, 60,229,189, 7,150, 63, 78,143,112,171, 34, 34,148,233,194, 42,114,186,168,136, 4, 25, 33,248,125,210,248,172, - 89,179, 48,127,235, 86,140,245,114,112,252,225,253,247,223,215,196, 73, 41,197, 59,239,188, 19, 49,206,157, 59,119, 46,244,201, -159,217,233,233,233, 56,121,242,100,149,105,193, 96, 2,203,151, 83, 18, 4, 68,207,153,131, 83, 63,253,132, 70,183,221, 6,201, -237, 6, 90,181,250,189, 16, 10, 2,234,212,169,131,183,222,122, 11, 53,107,214, 68, 82, 82,210,101,101,234, 90, 61,181, 62,146, -156,162, 40,110,126,231,157,119,186,253,235, 95,255,226, 12, 6, 3,118,239,222,141,226,226,226,203,132,146, 42,148, 19, 6, 65, - 46, 94,229,201, 87,185, 44, 88, 56, 43, 42, 42, 48,123,246,108, 77,249, 62,127,254,252, 43,138,187,183, 83,162, 69,108,221,136, -121, 20, 66, 92,197,156, 56,113,194,223,162,243,101,240,185,211,207, 31, 39, 1,246, 45, 93,186,180, 85,171, 86,173,148,186, 55, -106,218,127,255,251,192,100,171,181, 2,168,220,124,212, 35,198, 66,134,147, 82, 74, 12, 6, 3,210,210,210,224,116, 58,195,114, -177,188,207,245, 13,167,178,214,232,106, 6,122,254, 56, 57,142, 3,207,243, 56,186,237,107,100, 12,168,141,109, 59,243,176,254, -148, 9,245,162, 10, 80,187,188, 16,238,194, 95,240,236,125,237, 48,115, 69,229,147, 14,246,238, 14,205, 73, 8,129,249,233,167, - 65,140, 70,232, 87,172,128, 40,138,176, 61,249,100,229, 26, 44, 79,219, 86,241,230,155,128, 78, 7,253,139, 47,106, 10,167,239, - 76,141,178, 28,196, 91, 92, 5,115,176, 2,197, 29,168,220, 54,225,194,133, 11,248,232,163,143,240,200, 35,143,224,252,249,243, - 56,126,252, 56, 14, 29, 58,132,101,203,150,105,238,227,124,243, 40, 51, 51, 19,207, 63,255, 60, 56,142, 67, 90, 90, 26, 38, 79, -158,140, 46, 93,186,132,157, 71,190,249,238,139, 80,238, 85,117,212,205,155, 13, 97,219, 4, 28,199,161,102,205,154,234,230,154, -222, 29,108,184,214,181,183,152, 49, 24, 12, 48, 24, 12, 85,182, 62,184,251,238,187, 67, 58, 88,158,198,103, 45, 33,100, 76,227, -198,141,231,101,103,103,155,251,244,233,195, 39, 39, 39, 99,224,192,129, 56,113,226, 4, 86,173, 90,229,156, 49, 99, 70,185,197, - 98,121,156, 82,186, 65,107,163,228, 45, 34,252,236, 94, 79,155, 52,105,162,121,136, 39,138,226,175, 71,143, 30,109,240,238,187, -239,114,101, 0,102,112,156,218, 8,113,158,207,222,248,238,187,239, 92, 58,157, 46,232, 29, 75, 58,157, 78,229, 44, 39, 4, 51, - 60,149,155,243,226, 14,151, 51, 16,188,167, 75,255,159,189,243, 14,143,162,248,255,248,123,118,175, 39,164, 64, 72,128, 36, 23, - 66, 2,132, 14, 73,104,130, 20, 21, 68, 65,138, 72, 81, 81, 17,148,162, 8, 95, 84,186, 72, 19, 65, 17, 84, 4, 5, 69,137,128, - 52, 11, 8, 34,189, 23, 41, 73, 40, 2, 9, 2, 9,164, 65, 10,169, 87,183,205,239,143,148, 95, 8, 41,119, 73, 20,196,121, 61, -207, 61,151,219,221,188,119,118,103,118,246,189,159, 41, 91,252,156, 56, 82, 17,171,213,106,144,105,211,208,192,221, 29,106, 69, - 1,225, 56,160,224,101,170,133,235,207,159, 63,143,247,223,127, 31,106,181, 26, 63,255,252,243, 67,113,113, 25,141,198,183,111, -222,188,185,190, 95,191,126,141,203,204, 67, 41,179,200, 92,133, 15,248, 13,145, 91,250, 20, 84, 94, 82, 86, 57,121, 17,127,232, -208, 33,227,220,185,115,249,116,142,195,130, 98, 77,195,133,159,226,249,114,224,192, 1,217, 96, 48, 36, 84,229, 88,254, 67,209, - 44,115, 66, 66,130,135,209,104,196,149, 43, 87, 8,254,191, 63, 86,241,235,238,121,148, 50,149, 66, 73,252,129,109, 75,151, 46, -125,122,248,240,225,181,154, 52,105, 82, 56,248, 68, 91,240, 65,193,204,238, 59, 29, 60,255, 91, 63,250,232,163, 87,126,248,225, - 7,109,225,245, 18, 23, 23, 87, 81, 52, 26,171, 87,175,182, 87,116, 19, 44,124,211, 67, 97,212,165, 50, 81,244,178,162,234,225, -253, 70,225,203, 29,223,192,167,213,211, 24,220,247, 81, 28, 93,246, 10,134, 52,179, 64,216,244, 2, 90, 14, 94,139,136,105,249, -209,155, 54,155,167, 57,116,239,209,187,187,131, 47, 24, 45,200,113, 28,224,226, 2, 82, 44,250, 66, 10,102,116,119,230,126, 86, -104, 46,202, 58,110,103,207, 7,207,243, 8, 10, 10, 66,112,112, 48, 58,119,238,140,208,208, 80, 60,246,216, 99, 56,119,238, 28, -206,157, 59,135,241,227,199, 59,253,202,177,226,121,244,228,147, 79,226,169,167,158,170,114, 30,149,204,119,198, 3, 98,176,188, -189,189,161,213,106, 43,109,168, 74, 98,183,219,139,140,149,193, 96, 40, 10, 77, 59, 98,174,138, 85, 64,251, 9, 33,109,223,125, -247,221, 55, 13, 6, 67,215,194,169, 24,116, 58, 93,140,197, 98, 57, 44, 8,194,114, 74,105,182,227, 15,101,228, 46, 67, 81,202, - 6,200,202,202,114,216, 96,201,178,220,227,127,255,251,223,126,155,205, 22,232,200,246, 6,131, 33,201,100, 50,245, 40,111, 27, - 81, 20,123, 76,152, 48,161, 90, 53,203, 72,251, 93,166,170,240,219,209,190, 93,106,141, 6,218,201,147,193, 9, 2, 8,199,129, -150,136, 96,169,213,106,120,122,122, 98,235,214,173,240,242,242,122,104, 46,174,205,155, 55,203, 0,134,148,183,205, 35,173,200, - 73, 0, 45, 30, 25,252, 91,218,197,235, 52, 48, 52,132,196,255,177,117,148,119, 5, 15, 36,143,127,242,201, 39,123, 5, 65, 8, -112, 36, 29, 90,173,246,166, 32, 8, 78,231,187,162, 40, 36, 37, 37, 5,139, 22, 45, 50,101,100,100, 28,255,143,212,137, 43,123, -244,232,241,254,222,189,123, 85, 70,163,177, 74, 66,241,128, 93,107,179,125, 18, 22, 22, 54,121,250,244,233,158,125,251,246,133, -209,104,132,135,135,135,211, 90, 9, 9, 9,163, 1,212,233,218,181,107,239,194, 73, 25, 11,235,223,226,111, 3, 40,252, 46, 24, -127,163,200,178,124,225,214,173, 91,237,202,169,232,138, 30,198,170,203, 92, 21,206,195, 6, 0, 79, 12,122, 21, 79, 12,122,181, - 40, 93,251,126,236,142,200,164,221, 8,231,146, 96,251,250, 81, 16,247,194, 34,204, 85,168,201,113, 28, 12,235,214,221, 53,141, -141,225,147, 79,238,126,248,120,251,109,167,210, 89,252, 65,180,186,250, 96,241, 60,143,244,244,116,196,198,198,226,246,237,219, - 48,155,205,184,116,233, 18,236,118, 59, 50, 51, 51, 81, 56,210,176, 50,233,172,206, 60,170,110, 77, 70, 21, 13,150, 70,163, 73, - 27, 52,104,144,119, 69,219, 56,233,246,229, 87, 95,125,181,220, 59,181,171,171,171, 67, 61,190, 11, 12,212,124, 0,243, 11,222, - 97, 5,171,213,234,244,163,183, 90,173, 78, 29, 52,104,144, 79, 5,199,153,133,252,233,246, 29,226,228,201,147,169, 0,154, 87, -103,230,253, 29,154,165, 92,136,242,232,209,163,203,205,159, 26, 53,106,148,123, 30,236,217,217, 25, 83,142, 28,201, 55, 85, 45, - 90, 0,173, 90, 33,239,206,157,140,194, 41,100,115,115,115,211, 95,122,233, 37,169,120,179, 96,241,137, 72, 31,106, 40,174,135, -181,172,231, 19, 29, 75, 3, 1, 32, 58, 54,223,100,233, 52,184, 94, 65,190,183,252,187,147,150,156,156,124,190, 69,139, 22,127, -101,102,102,126, 74, 41, 77,252, 79,100, 7,165,103, 9, 33,115, 27, 54,108, 56, 26, 64, 89, 97,134, 13,142, 70,244,236,192,165, - 58, 86,235,216,217, 51,103, 62, 55,107,230,204,198, 10,224, 5, 64, 15,228, 55, 17, 58, 25, 65,236, 87,221,199, 43,203,114, 98, -167, 78,157,156,254,159,138,214,151, 51,147, 56,126,128, 17, 56,227,188,230,223,145,206, 66,205, 86,173, 90,161, 77,155, 54, 69, -223,133, 20, 95, 30, 26, 26, 10, 89,150, 19, 37, 73, 42, 87, 51, 44, 44, 12,205,154, 53, 43,115,134,246,146,125,174,238,247,177, - 23, 82,248,114,157,208,208, 15, 43,165,201, 40,229,254,249,119,134,254, 31,182, 62, 25, 76,147,105, 50, 77,166,249, 32,104,146, -138, 66, 62,247,248,248,252,215,149, 85,167,102,177,132, 54,103,121,196, 52, 25, 85,140, 96, 49, 24, 12, 6,227,254, 83,104,152, - 30, 4, 77,194,178,131,193, 40,243,218, 40,181,169,193, 25,103, 74, 8,113,186,185,162, 34,125,166,201, 52,153, 38,211,100,154, - 76,147,105, 62,124,154, 21,105, 63, 44,145, 49,214, 68,200, 52,153, 38,211,100,154, 76,147,105, 50,205,251,174,249,176,193,134, - 14, 48, 24, 12, 6,131,193, 96, 48,131,197, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, 6, 51, 88, 12, 6,131, -193, 96, 48, 24, 12,102,176, 24, 12, 6,131,193, 96, 48, 30, 24,200,127,232, 29, 99, 12, 6,131,193, 96, 48, 24,255, 8, 44,130, -197, 96, 48, 24, 12, 6,131, 81,205,168, 0,160,240,229,161, 0, 64, 41,101, 19,243, 50, 24, 12, 6,131,193,248, 71,120, 88, 61, -136,138, 25, 43, 6,131,193, 96, 48, 24,247,147,135,209,131,112,165, 57, 72, 6,131,193, 96, 48, 24,140,127,138,135,209,131,112, - 15,179,123,100, 48, 24, 12, 6,131,241,224,243,208, 71,176, 88, 20,139,193, 96, 48, 24, 12,198, 63,205,195,232, 65,216, 52, 13, - 12, 6,131,193, 96, 48, 24,213,204,223, 58, 77, 3, 33,164, 37,211,100,154, 76,147,105, 50, 77,166,201, 52,153, 38, 51, 88, 12, - 6,131,193, 96, 48, 24, 12,102,176, 24, 12, 6,131,193, 96, 48,152,193, 98, 48, 24, 12, 6,131,193, 96, 6,139,193, 96, 48, 24, - 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12,198,125,130, 0, 40,117, 36, 0,165,244,130,195, 34,149, 24, 77, 80,145, 62,211, -100,154, 76,147,105, 50, 77,166,201, 52, 31, 62,205,138,180,157,241, 31, 15,180,193,250, 59,231,193, 34,132,180,172,238, 19,197, - 52,153, 38,211,100,154, 76,147,105, 50,205,135, 79,243, 97,131, 53, 17, 50, 24, 12, 6,131,193, 96, 84, 51, 42,118, 10, 24, 12, -199, 8, 15, 15, 55,232,116,186, 39, 14, 28, 56,160,185,116,233, 18, 78,157, 58, 69,215,173, 91, 39,218,108,182,125,145,145,145, - 22,118,134, 30, 14,218,180,105,211,131,231,249,119, 0, 64,150,229,197,103,207,158,221, 91,133,167,124, 18, 28, 28,252,134, 78, -167,235,165, 86,171,235,201,178, 76,108, 54, 91,138,217,108,222,151,156,156,188,148, 82,170, 84, 66, 51,220,203,203,235,181,150, - 45, 91, 54,188,118,237, 90, 98, 66, 66,194, 6, 0,123, 1,244, 48, 26,141,207, 7, 7, 7,251, 95,184,112,225,106, 70, 70,198, - 42, 74,105,228,253, 74, 39,131,193, 12,150, 99, 23, 31,231,238,238,254,152, 90,173, 30,101,177, 88,218,232,245,250, 63, 57,142, - 91,149,158,158,190,139, 93,120, 15, 47,132, 16,190, 94,189,122,143,251,248,248, 76,200,201,201,233,224,233,233,121,230,206,157, - 59,159,221,184,113, 99, 47,165, 84,174,164, 38,231,226,226,210, 93,165, 82,141,180,219,237,225, 58,157,238,188,162, 40,223,230, -230,230,238,185,159,101,169,115,231,206,231,101, 89,246, 43,111, 27,157, 78,167,222,191,127, 63,255,203, 47,191,208, 31,126,248, -225,206,243,207, 63,239, 58, 98,196, 8, 85, 68, 68,196, 74, 0,147, 75,110,223,177, 99,199,120, 81, 20,189, 29,217,191, 90,173, - 78,251,227,143, 63, 2, 89,169,187,255,240, 60,255,206,136,133, 7, 59, 43, 20,136,152,214, 29, 5,230,165, 82,132,133,133,125, -211,191,127,255, 65, 33, 33, 33, 42, 69, 81, 32,138, 34,108, 54, 91,227,168,168,168, 46,187,118,237, 10, 3,240,146,147,215,207, -211, 83,167, 78, 93, 62,119,238,220,218,106,181,154,136,162,216,126,227,198,141, 79,142, 29, 59,246,252, 87, 95,125,213,106,232, -208,161, 53, 10,151,207,154, 53,235, 73, 66,200, 20, 74,233,230,127, 58,157, 12, 6,163, 2,131,229,238,238,222,208, 96, 48,140, -118,115,115,235,213,168, 81,163,164, 17, 35, 70,156, 22, 4,225, 47,158,231,233,154, 53,107,198,219,237,246, 79,252,252,252,246, -216,108,182, 21, 25, 25, 25,177, 78, 86, 20, 13, 1,140, 0,240, 36, 0, 95, 0,183, 0,236, 2,176,154, 82,122,165, 50, 7,227, -239,239,223,194, 96, 48,188,205,243,124, 59,147,201,228,231,226,226,146, 2,224,116,110,110,238,103,201,201,201,103, 43,163,105, - 52, 26,131, 0,140,209,104, 52,157, 37, 73, 10, 84,171,213, 55, 69, 81, 60, 38,203,242,138,196,196,196,171,149,209,236, 84,223, -189, 55,117,117, 91, 32, 16,189,191,201, 38,107, 92,181,188,168,161,182, 68,217,156,253,254,169, 27,185, 91,238,119,161,240,245, -245, 13,169, 91,183,238, 91,141, 26, 53,122,174,126,253,250,154, 97,195,134,105,186,117,235,134, 67,135, 14, 61,186,110,221,186, -246, 26,141, 70,104,223,190,253,207, 73, 73, 73, 75,147,147,147, 29,202,119,157, 78, 23, 92,163, 70,141,215, 93, 92, 92,122, 53, -105,210, 36,101,220,184,113,177, 81, 81, 81, 49,173, 90,181, 74, 88,177, 98,197, 91,177,177,177,139,124,124,124,118, 91,173,214, -111,114,115,115,175,252,211,199,108,179,217,130,143, 30, 61, 10,141, 70, 83,234,122, 69, 81, 48,120,240, 96,104,181, 90,172, 88, -177,130,156, 58,117,106,174,197, 98,153,185,124,249,114,175,136,136,136,103, 75, 51, 88,162, 40,122,255,241,199, 31, 80,171,213, -247,232,201,178, 12, 81, 20, 33, 73, 18,108, 54, 27,122,245,234,229,205,170,163, 7, 3, 74,105, 93, 10, 96,231, 57, 43, 0,120, - 86, 69, 75,175,215,135, 60,251,236,179,170,244,244,116,168, 84, 42, 8,130,128, 91,183,110, 33, 56, 56,152,183,217,108,141,157, -213,107,210,164,201,107, 11, 22, 44,240,222,177, 99,135,176,110,221, 58,123,143, 30, 61,212, 35, 70,140,112,235,214,173, 91, 39, -127,127,127,238,187,239,190,179,237,221,187, 87, 28, 54,108,152,246,195, 15, 63,244,222,185,115,231, 32, 0,155,255,233,116, 50, - 24,140,114, 12,150,139,139,203, 14,173, 86, 27, 48,120,240,224,195, 51,103,206,252,194,203,203, 75, 4,128,245,235,215,251, 14, - 25, 50, 36,229,205, 55,223,140,207,202,202, 82,205,157, 59,183,229,218,181,107,127, 50, 24, 12,183, 45, 22,203, 19, 14, 24, 43, - 2,224, 77,142,227,198,180,107,215,110,135, 44,203, 87, 15, 28, 56,176,240,137, 39,158,232, 15,128,158, 57,115,230, 39, 66,200, -119, 0, 62,119, 52,162, 65, 8,225, 27, 52,104, 48,195,207,207,111,194, 87, 95,125,165,107,208,160, 1, 92, 92, 92,144,155,155, -107,188,114,229,138,255,132, 9, 19,250, 4, 7, 7,127,229,225,225, 49, 39, 50, 50, 82,116, 80,147,248,249,249,141,115,119,119, -127,127,241,226,197,250,144,144, 16,226,234,234,138,164,164,164,230,167, 79,159,110,246,217,103,159,189,108, 52, 26, 63, 76, 76, - 76,116, 56,157,221, 9, 81, 89, 27,214,254,181,102,227,118, 93,191,250,122, 21,169,235,226, 2, 53,199, 65, 20, 4,117,162,201, -212, 96,220, 27, 99,214,118,108, 92,231, 68,158, 58,181,207,197,139, 84,184, 31, 5, 34, 56, 56,248,188,155,155, 91,192,179,207, - 62,171, 30, 60,120, 48,130,131,131,139,214,189,244,210, 75,120,233,165,151, 52,215,174, 93,211,108,222,188,249,149,181,107,215, -190,208,160, 65,131,132,184,184,184,150, 21,152,171,237, 6,131,161,254,232,209,163,207, 78,158, 60,249,176,155,155,155, 0, 32, -249,252,249,243,242,176, 97,195,254, 26, 57,114,100, 98,110,110, 46,102,204,152, 81,127,221,186,117,155,116, 58, 93,170,205,102, -123,242,159, 62,118,189, 94,143,171, 87,175,222, 99,132, 82, 83, 83,145,145,145, 1,139,197,130,172,172, 44, 20, 60,225, 91, 21, - 69, 1,199,113, 64,254,104,220,178, 34, 83,136,141,189,215,131,138,162, 8,139,197, 2, 65, 16, 96, 23, 4,168,180, 58,116,237, -209,243, 47, 66,177, 61,215,106, 94, 26,125,252,248, 77, 86, 61,221, 31, 56,142,187,182,237,240,213, 32, 0, 2,128,152, 42,202, - 41, 0,112,248,240, 97,220,190,125, 27,105,105,105, 72, 75, 75,131,209,104, 68,101, 34,182, 49, 49, 49,203,195,194,194, 72,116, -116,244, 14, 0,171, 55,110,220,216,239,206,157, 59,159, 79,154, 52,169,230,162, 69,139, 50, 39, 79,158, 60, 1,192,175, 27, 55, -110,124,169,117,235,214,189,207,157, 59,183,236,126,164,147,193, 96,148,211,201,157, 82, 90, 47, 32, 32,224,230,154, 53,107,186, -142, 25, 51,166,105, 70, 70,134, 26, 0,188,189,189,109, 0,144,149,149,165,122,253,245,215, 91,124,251,237,183, 93,245,122,125, -162, 44,203,181, 75,209, 40,109,132,193, 88, 23, 23,151,167, 46, 94,188,248,113,195,134, 13,245,243,231,207, 63,232,234,234,138, -101,203,150,237,247,247,247,247,136,141,141,253,208,213,213,181, 11,128, 9,101,164,235, 30,205,192,192,192,233,131, 6, 13,154, -112,236,216, 49, 93,235,214,173,225,230,230, 6,158,231,225,233,233,137, 14, 29, 58,144,195,135, 15,235,250,244,233, 51, 54, 59, - 59,123,190,163,154, 70,163,113,194, 51,207, 60, 51, 43, 50, 50,210,208,169, 83, 39,162, 86,171,145,157,157, 13,141, 70,131, 71, - 30,121,132,108, 88,183,206,208, 54, 52,116,186,209,104,156,233,168,166,173, 81,237,237, 67,198, 76,238,182,253,247, 93,196,199, -199, 7,182,185,115,145,221,162, 5,108, 83,166,160, 78,221,186,216,182, 99, 39,121,230,165, 55, 58,185,137, 62, 59, 28,213,172, -134,167,245,187, 52,173, 86,107,112,104,104, 40,127,252,248,113,219,213,171, 87, 45, 37, 71,153, 82, 74,113,241,226, 69,243,239, -191,255,110,242,242,242,130,221,110, 15,170, 72,147, 82, 90,183, 75,151, 46, 98, 68, 68, 68,167,209,163, 71,171,111,221,186,117, - 2, 64,108,205,154, 53, 19, 1, 36,165,166,166,198,189,240,194, 11,126,107,215,174,125,188,118,237,218,201,148, 82,239,251,113, -236,133,134,170,228,167,112,185,175,175, 47,182,111,223,142, 62,125,250,160, 99,199,142, 31,245,235,215, 79,119,234,212, 41, 74, - 8,249,221,153,116, 42,138, 2,139,197, 2,139,197,130,196,196, 68, 44, 89,186, 12, 39,143, 31,195,198, 53,223,251,142,123, 99, -236,235, 30, 46,110,199, 67, 59,117, 10,248,167,143,157,105, 22,173, 79,202, 55, 87,196, 76, 41,189, 81, 89,205,103,159,125,182, -121, 96, 96,160,207,166, 63,107, 34, 83,211, 4,178,218, 3,138,214, 19,178, 87, 91,252,165,121, 10,190,190,190, 62,129,129,129, - 29,156,209,164,148,238,143,138,138, 26, 64, 41, 93, 69, 41,149, 41,165,191, 76,158, 60,249, 13, 66,200,150,201,147, 39,191, 69, - 41,253,165, 96,121,196,217,179,103, 7, 81, 74, 15,223,143,116,178,178,196, 52,255, 6,218, 1,232, 83,240,105, 15,160, 67,137, -223,218, 18,219,245, 40,227,187, 79,137,223,237, 74,252, 95,187,106, 53, 88,132, 16, 90,248, 41, 22,193, 17, 87,172, 88,241,243, -215, 95,127,189, 34, 45, 45,205, 39, 40, 40,104,226,163,143, 62,218,249,218,181,107, 46, 93,187,118,237,236,235,235,251,118, 84, - 84,148,207,192,129, 3,191,126,249,229,151,127, 36,132, 72, 14, 68,133,130, 56,142,123,243,248,241,227, 27,154, 52,105, 98, 75, - 73, 73,241,236,209,163, 71, 38, 0,132,135,135,231,101,101,101,213,240,246,246,150,183,110,221,250, 19, 33,228, 85, 66, 72,133, -161,105, 63, 63,191,214,181,107,215,158, 48,127,254,124, 29,207,243,101, 69, 80,240,193, 7, 31,232,220,221,221, 95,245,247,247, -111, 95,145,166,175,175,111,136,155,155,219,140, 79, 63,253, 84,111,181, 90, 33, 73, 18,188,189,189,225,226,226,130,140,244,116, -164,222,188,137,172,228, 68, 76,159, 56,193,224,106, 48,140,243,243,243,107, 85,145,230,163, 13,220,158,113,245,109,218,101,252, -132,137,176,142, 28, 9,179, 94, 15,243,219,111,195, 22, 25, 9,243,194,133,176,213,172, 9,235,147, 79, 98,226,196,119,160,245, - 9,238,248, 72, 64,141, 65,247,203,117,191,255,254,251,220,196,137, 19,117,219,183,111,215,119,235,214,205,190,122,245,234, 92, -147,201,132,229,203,151,231,134,135,135, 91, 87,172, 88,161,239,216,177,163,235,227,143, 63,174,118, 48, 34, 32,174, 93,187,246, -252,202,149, 43,231, 95,185,114, 69,221,168, 81,163,185,109,218,180,233,157,155,155,171,238,208,161, 67,159,128,128,128, 5, 81, - 81, 81, 53,159,126,250,233,121, 51,102,204, 88, 15, 64,196, 3, 2,207,243,224,121, 30, 26,141, 6,173, 90,181,194,198,141, 27, -225,231,231,135,111,190,249,198,179, 78,157, 58, 46, 17, 17, 17,217, 89, 89, 89,159, 58,163,105,183,219, 97,179,217, 96, 54,155, -241,199,233, 51,248,253,215, 45, 88,179,238, 7,188,242,218,235,153,146, 36,217,198,142,126,221,205, 77,239, 50,158, 61,255,221, - 31,242,251, 23, 18, 51, 64,243, 8, 33,118, 0,104,216,176,161,214,223,223,191,125,195,134, 13,181,142,234, 88, 44,150, 47,150, - 44, 89,226,199,233, 60,113,212,222, 27, 27,233, 92,236,241, 88,142,180,192,201,168, 99,108,132,167,159,126,218, 27,192,146,106, - 72,239,118, 74,233, 48, 74,233,214,202,252,255,223,157,206,240,240,240,206,225,225,225, 71,195,195,195,175, 23,124,119,174,234, - 49,175,152, 73, 30,251,238,125,237, 95, 95, 77, 35,230,239,222,215,254,181, 98, 38,121,140,149,220,127, 47,165,121,144, 82,240, - 38,132,108, 39,132,108,159, 54,109,218, 99, 0,188, 74,252,238, 84,124, 59, 0,218,210,190, 11, 63,197,150,123, 23, 24, 43,239, - 98,191,171, 5, 85,177,139,180,212,102, 14,163,209,104, 89,180,104,209, 30,147,201,116,224,243,207, 63,111, 55,113,226,196,151, -252,252,252, 14, 15, 26, 52,232, 83,119,119,119,177,180,254, 37,229,240, 74,199,142, 29,127, 54, 26,141, 74, 82, 82,146, 70, 20, - 69,205,245,235,215,117,162, 40, 18,181, 90, 77, 45, 22,139,250,194,133, 11, 26, 81, 20,229, 22, 45, 90,108,186,112,225,194, 8, - 0, 83,202, 19, 52, 24, 12,163,191,254,250,107,125, 89,230, 74,150,101,228,229,229, 65,146, 36,204,153, 51, 71, 63,105,210,164, - 55, 0,156, 42, 79, 83,173, 86,191,177,124,249,114,189, 40,138, 69,253,103, 98, 99, 99,145,157,153, 9, 49, 47, 15, 66, 94, 14, -164,188,108,168,204,238,152,240,210,139,250, 5,223,124, 59, 30,192,200,242, 52, 5,109,141,121,223,127,243, 45, 68, 81,132,125, -195,134, 82,183, 17, 15, 30, 4,236,118,124,240,225, 66,242,206,232, 23,230, 0,248,241, 62,221, 96,192,243, 60, 94,125,245, 85, - 98,183,219,181,219,182,109,211,182,106,213, 74, 14, 13, 13,117,235,223,191, 63, 36, 73, 66,118,118, 54,244,122,189, 51,178,114, -131, 6, 13,204, 95,127,253,245,207, 25, 25, 25,219, 62,250,232,163, 46, 75,151, 46, 29,229,237,237,189, 99,200,144, 33,211,221, -220,220, 4,173, 86, 11, 73,146,220, 31,180,139, 95,163,209,192, 96, 48,192,223,223, 31, 3, 7, 14,196,210,165, 75,193,243,124, - 6,207,243,123,242,242,242, 22, 93,184,112, 33,206, 89,131,101,181, 90, 97,177, 88,112, 61,254, 6, 68, 81, 68,196,218,181, 56, -118,240,192,123,148,210,185,235,215,124,239,178,124,229,202,254, 0,222, 97, 85,239, 63,203,224,193,131,121, 66,136,103,195,186, -122, 19,225,168,249, 4,165, 53, 3, 2, 2, 94,146, 36,233,113,163,209, 88, 59, 33, 33, 33,221,223,223,127,175,221,110,255, 53, - 45, 45,205, 84, 65,164,146, 72,146,132,209,237,179, 48,182, 35, 7, 73,146,144,149,149,133,155, 55,111,226,207, 63,255,196,201, -147,127, 86, 42,141,129,129,129,175, 24, 12,134, 39, 52, 26, 77,125, 74, 41,103, 50,153,110,218,237,246, 3, 73, 73, 73,223,210, - 74, 76,108,248,119,165,179, 24, 11, 6, 14, 28, 88,207,195,195, 3, 81, 81, 81,245,206,157, 59,183, 0,192,163, 85,186, 38,137, -102,197,144, 55, 14,248,186,184,213, 65,106,236, 70,223, 29, 91,231,174, 0,208,136,149,224,127,245,131, 13,169, 96,147, 52, 74, -233, 51, 5,134,108,251,130, 5, 11,158, 41,248,191,103,138,255,118, 96, 63,207,148, 98,240,182,151,182,188,218, 12, 22, 33,132, -150,119,128,174,174,174,210,140, 25, 51, 78, 28, 58,116, 40,188,115,231,206,199,156, 52, 86,133,116,108,220,184,113,228,238,221, -187,189,234,213,171,103, 83, 20,133,184,187,187, 75,110,110,110,114, 65,223, 22, 26, 23, 23,167,142,139,139,171,225,229,229, 37, - 3,232, 88,145,160, 90,173,238, 16, 20, 20, 84,230,141, 44, 47, 47, 15,185,185,185,176,217,108,168, 83,167, 14,225, 56,174,194, -240,159, 74,165,234,212,168, 81, 35,146,155,155,139, 58,117,234,224,220,185,115,176,230,229, 65, 52,229, 66,202,201,133,156,151, - 13,154,147, 5, 83,118, 22,130,124,106, 19,158,231, 43,140,138, 73,188,193,232,235,234, 10,251,212,169, 16,254,250, 11,208,104, -160,169, 95, 31, 16,242,187, 90, 9,241,241,128, 86, 11,110,228, 72, 52,122,237, 53, 72,208,249,222,199,130, 14,187,221, 14,179, -217, 12,141, 70,131,231,158,123, 14,135, 14, 29, 18,218,181,107,167, 79, 76, 76,132,221,110, 7,199,113, 69,205,103, 14, 86,226, - 50,199,113, 20, 0,188,188,188,196, 69,139, 22,237,239,218,181,107,247, 30, 61,122,236,209,106,255, 63, 40, 96,179,217, 20, 0, -244, 65,186,240,117, 58, 29,212,106, 53, 8, 33,168, 81,163, 6,114,115,115,113,249,242,229,250,149,209,146,101, 57,191,223, 85, - 65, 20, 75,150,101,252,113,250, 4,244, 6, 3, 58,116,233, 58, 93, 81, 20,131, 90,165, 2, 95,208,185,139,241,207,209,161, 67, -135, 48, 13,149,230,191,225, 43, 4, 60, 53,208,223,164,119, 81,153, 6,238,176,119, 15,110,216, 97,192,252, 15,230,215, 8, 10, - 10,114,141,142,142,206,155, 63,127,190,223,153, 51,103, 0,224,135,242,244,146,146,146,182, 44, 92,184,176,102,247,238,221, 27, -168,213,106,146,149,149,133,180,180, 52,164,166,166, 34, 33, 33,129,198,197,197, 93, 23, 69,241,103,103,210,216,166, 77,155, 47, -135, 13, 27,246, 66,243,230,205,213,148, 82,136,162, 8,179,217,220,250,228,201,147,125,142, 30, 61,218, 9,192,171,206, 30,119, -114,114,242, 47, 11, 23, 46,116,237,222,189,123, 99,181, 90,205, 85, 71, 58, 75, 80,207,205,205, 13,123,247,238,133,135,135, 7, - 0,212,171,106, 94,217, 69,193,215,197,221, 23,136,255, 20, 62,158, 1,176,139,130, 47, 43,193,255,254, 40, 86, 5, 38,235, 52, -128, 62, 85, 53, 67,127,151,153,170, 84, 4,171,144,219,183,111,235,114,115,115, 85,148, 82, 78,150,101,149,162, 40, 68,167,211, - 57,219,148,211,108,208,160, 65, 63,245,234,213, 43,171, 32, 50, 32,122,121,121, 73,153,153,153,200,206,206,134, 36, 73,178,187, -187,187,185,110,221,186,230,166, 77,155,230, 28, 56,112,160,194, 38, 66,139,197,226, 95, 90, 36,197,108, 54, 35, 47, 47,175,200, - 96,153,205,102,184,187,187,195,100, 50, 85,120,113, 11,130, 16, 96, 48, 24,144,150,150,134,244,244,116, 88,243,114, 32,228,230, - 65,202,203,129,148,147, 13, 37, 55, 27, 52, 47, 23,138, 34,163,166,183, 55,236,118,187,127, 69,154,102,155,172, 85, 3,176,252, -252, 51,240,191,255,149,109,110, 14, 28,128, 75, 72, 8, 44, 22,225,190,205, 81, 86,252, 33, 88, 16, 4, 72,146, 4, 74, 41,181, -219,237,176,219,237,197, 77,147,147,222, 34,223,144,157, 61,123,214, 61, 53, 53, 85, 79, 41,229,243,242,242,116, 38,147,137,171, - 93,187,182, 21, 0,149, 36, 73,126,208, 46,124, 73,146, 32, 8, 2, 4, 65,128,205,102,115,234,184, 75,110, 91, 56,114,176, 96, - 24, 60,236,162, 29,159, 45,253, 18, 91, 54,109,196,165, 75, 23,253,102,206,253, 0,162, 36, 65, 86, 88,191,226,127,138,214,173, - 91,247,228,121,254,179,142, 30,138,219, 4,127, 49,175,182, 86, 49,197, 46,127,203,116,206,104,176, 88, 45,130,239,130,165, 31, -122, 81, 10,204,152, 49,227,246,144, 33, 67,106, 76,156, 56,177,197,208,161, 67,123, 52,111,222,252,199,139, 23, 47, 10,101, 84, -226,154, 17, 35, 70,156,174, 89,179,102,208,218,181,107, 83, 83, 82, 82,106,137,162,104,176,219,237,130,221,110,191,110,183,219, -143,139,162,120, 32, 57, 57, 57,218,153,180,186,186,186,182, 28, 58,116,168, 58, 51, 51,179,104,180, 95, 90, 90, 26,194,194,194, -248,125,251,246, 53,171,204, 93,185,173,144, 0, 0, 32, 0, 73, 68, 65, 84,241, 95,186,116,105,169,159,159,223,225,109,219,182, - 61, 81,163, 70,141, 80,173, 86, 91, 71, 81, 20,217, 98,177,164, 90, 44,150,243,149, 73,103, 9, 82,162,162,162,234,185,187,187, - 35, 49, 49, 17, 0, 82,170,154,103, 90,181, 38, 49,245,202, 70,127, 31,143, 32, 92,187,244, 27,180,106, 77, 34, 43,201, 15,125, - 4,171, 93,241,136, 85, 57, 38,201, 50,117,234,212,233,132,144,237, 83,167, 78,157, 94, 78, 4, 75, 46,190, 93,177,237,109,213, -110,176, 74,195,100, 50,169, 78,159, 62,237,117,251,246,237, 26, 62, 62, 62,166,102,205,154,101, 17, 66, 64, 41, 37, 57, 57, 57, - 46,169,169,169, 46,174,174,174,182,250,245,235,231, 56,184,191,191,254,247,191,255,245,155, 50,101,202,222, 23, 95,124, 49, 5, - 0, 50, 51, 51,113,251,246,109,100,100,100, 64, 16, 4, 36, 37, 37,145, 35, 71,142,212,217,183,111,223,227, 0,226, 43, 18, 52, - 24, 12,137,185,185,185,141, 60, 61, 61,139,204, 65,161,169, 42,254, 45, 8, 2,114,115,115,225,234,234, 90,225,197,173, 86,171, -147,211,210,210,130,237, 54, 27,210, 18, 19,243,141, 85, 94, 46,228,156, 44,200, 57,217, 32,166, 92,104, 68, 17, 58,181, 26,185, -119, 50,160,209,104,110, 87,164,233,162,227,237,118, 73,210,242,125,251, 2,164,236,114, 68, 59,117,194,157, 22, 45,160,223,254, -179,120, 31, 11,122,169,191, 75,154, 5,103,140,198,157, 59,119,184,165, 75,151, 54,139,141,141,173,225,227,227,147,222,163, 71, -143, 56, 66, 8,229, 56, 78, 73, 77, 77,173, 21, 27, 27,219,200,211,211,211,164, 86,171,211,238,167,145, 42,109,153,201,100,130, -205,102,131,213,106, 69, 86, 86, 22, 84, 42, 21,186,118,237,122,192,102,179,253, 66, 8, 89,115,242,228,201,220,178, 52, 69, 81, -188,231, 92,202,178, 92,100,178, 84,132,199, 47,155, 54, 97,217,202,101,248,249,231,109,116,200,160,129,228,208,225, 35, 80, 20, -154,196,170,220,127, 6,158,231, 63, 60, 54,229, 57, 55, 34, 75,121, 89,251, 55,153,151, 37,104, 77,191,157,189,112,204,108,181, -243, 13,130,131,154, 6,214,111,160,158, 57,107, 74,234,185,203,127,196,103,126,149, 89,247,221,119,223,173,223,168, 81,163, 58, -113,113,113,193, 0, 46,151,166,233,230,230, 22, 48,124,248,240,151,179,178,178,212,223,126,251,237,186,132,132,132, 99,148,210, -235, 37, 76, 88, 27, 66,200,135, 5,245,176, 15, 0, 25,192, 62, 74,233,250,242, 60, 59, 33, 4, 7, 15, 30,188,103,180,159, 44, -203,149,118,229,201,201,201, 89, 29, 59,118,108, 25, 27, 27,187, 61, 51, 51,115,227, 61,245,151,139, 75,159, 22, 45, 90, 12, 58, -117,234,212, 60, 74,233, 53,103,180, 57,142,155,242,231,159,127,126, 64, 41, 13, 32,132,220,228, 56,238,189,170,230,153, 64,133, - 55,118,108,153,189,220, 46,216,141, 90,141, 54, 65,160,194,155,172, 36, 63,244, 20,246,145, 66,113,227, 84,138, 49, 58,190, 96, -193, 2,195,194,133, 11,177, 96,193,130, 63, 75,139, 96, 21, 26,173, 5, 11, 22,252, 89,184, 93,177,237, 15, 87,171,193, 42,205, - 57,202,178,172, 95,184,112, 97,167,230,205,155, 39,119,238,220, 57,217,104, 52, 90, 10,111, 16, 42,149, 74,244,241,241,201,150, - 36,201,122,251,246,237,218,135, 15, 31,110, 64, 41,117,164,243,231, 33, 55, 55, 55,205,153, 51,103,234,109,220,184,177,117, 76, - 76, 76, 72,159, 62,125,138,162, 3,137,137,137, 33,159,125,246,153,172,211,233,210,121,158,143, 4, 80, 97, 39, 31, 81, 20, 79, - 94,185,114,165, 97,135, 14, 29,136, 40,138,119,153,170,226,127,107,181, 90, 36, 38, 38, 82, 69, 81, 78, 59, 96, 48, 78,159,139, -142, 14,110,209,164, 73,190,185,202,205,134,156,147, 13, 57, 59, 11,196,156, 7,141, 40,192,213, 69,129, 78,235,130, 63,243,159, -200, 42,156, 45, 89, 37, 89,110,198,231,228, 52,170,191,104, 17, 52,158,158,128, 32, 20, 53, 11, 2, 40,106, 46,164, 41, 41, 56, -115,226, 4, 84,138, 45,249,126, 26,141, 90,181,106, 33, 39, 39, 7, 54,155, 13,148, 82, 80, 74,139, 12,149, 86,171, 69, 65,127, - 41, 71, 67, 87, 30,253,251,247,127,180, 67,135, 14, 49,175,190,250,234,254,102,205,154,221, 40, 44,235, 46, 46, 46, 66,147, 38, - 77,146,109, 54, 91,222,245,235,215, 67,214,174, 93,219, 73, 81,148, 26,247,227,184, 75,154,161,194, 8, 94,161,185, 74, 75, 75, -195,174, 93,187,112,252,248,113, 92,188,120,177,221,201,147, 39, 91,109,217,178,229,221,230,205,155,119,184,120,241,226,109, 71, - 13, 86,225,185,164,148,130,230,143,142,199,214, 95,127, 71,239, 62,221, 72,174, 41, 7,219,119,236, 6,165,180, 30,171, 79,255, - 49, 76,144,100,147,237,208, 6,243,171,151,116, 89,105,118,204,139,142,142, 60,210,167, 79,159,189,193, 13, 26,187, 3,128,221, - 70,107,186,104,188, 12, 42,149, 74, 11, 0, 1, 1, 1,225,148,210,207,145, 63, 18,233, 30, 6, 12, 24,208,177, 78,157, 58,173, -119,238,220,121, 62, 33, 33,225,120, 73,115, 5, 0, 33, 33, 33,239, 93,184,112,225, 73,181, 90, 77,138, 85,254, 20, 64,169, 6, -235,217,103,159,109,100, 52, 26,107,237,184,226,129, 28, 77, 48, 20, 46, 11,148,215, 65,246,108,141, 27,154,230,168, 91,247,114, -173,198,141, 27,183,186,114,229,202,121,103, 14,158, 16, 98, 28, 50,100,200,207,171, 86,173, 10,233,213,171,151, 22,192, 61, 6, -171,105,211,166,253,247,237,219,247,236,216,177, 99, 91, 17, 66, 6, 81, 74, 29,158, 3,240,244,233,211, 39, 0, 84,107, 39,244, - 49,243,232, 1, 0, 77, 88,209,253,207, 68,175,128, 98,125,176, 0,164, 33,255, 93,202,197,127, 23,206,117,105, 47,182,109, 90, -177,168,149,189, 68,212,171,180,117,105,168,198, 65, 86,170,114,110,178, 7, 79,157, 58,213, 38, 60, 60,252, 90,161,185, 42,188, - 30, 11,255,112,117,117,181, 3,160, 49, 49, 49,205,100, 89, 62,238,192,254, 86, 71, 70, 70,238,248,242,203, 47, 63, 14, 8, 8, -176,245,239,223,159,251,224,131, 15,182, 23, 70,177,150, 44, 89, 66,123,247,238,253, 91,108,108, 44,185,116,233,210,123, 0,158, -173, 72,208, 98,177,172,124,243,205, 55, 7, 29, 57,114, 68,111,183,219,145,149,149,117, 87,244, 42, 55, 55, 23,146, 36,129,231, -121,124,249,229,151, 54,147,201,244,101,133, 79, 71,130,240,237, 71, 31,125, 52, 96,253,234,239,244,188,104,135, 53, 43, 19, 74, - 78, 22, 56,179, 9, 42,193, 14,157, 90, 70,189, 70,174,200, 77,213, 96,217,174,131, 22, 81, 20, 87, 86, 24, 21,179,153,166,191, - 49,122,212, 79,123,246, 31,128,250,241,199, 33,238,220,121,239,147, 94,157, 58,176, 10, 2, 22,204,159, 71,137, 37,107,230,253, - 40,232,106,181,250,242,168, 81,163,234,140, 30, 61,186,102,203,150, 45, 33, 8, 2, 68, 81, 44,138,188,120,121,121, 1, 0, 18, - 18, 18, 16, 21, 21,149,205,243,124,133,209, 59, 89,150, 15,221,184,113,163,249,200,145, 35,175, 62,245,212, 83, 62,130, 32,168, - 50, 51, 51, 83, 10,158,140, 85,254,254,254, 6,173, 86, 75, 82, 83, 83,179,238,220,185,227,163, 40,202,241,251,113,236,162, 40, -226,253,247,223, 71, 68,108, 44,134,135,132, 20,153, 77,155,205,150,223,156,103,183, 99,247,238,221, 56,124,248, 48,214,173, 91, -151,241,220,115,207,121,188,248,226,139, 30,235,214,173, 27, 7,224,189,178,204,234,228,201,147,177,237,250,117,244, 45,165,175, - 32,165, 4, 73,201, 73, 16, 69, 17, 63,255,188, 39, 89,173, 82,123, 46,249,120,161, 97,210,244,233,132, 85,187,255, 12,138,162, -204,238,188,120,203, 56,142,115, 17, 0, 44,143,142, 62,115, 28, 0, 12, 6,131,247,226,197,139,181, 0,176,232,227, 69,106, 74, -169, 90,146, 36,216,237,118,204,155, 55, 79, 63,122,244,232, 50, 71, 27,253,248,227,143, 89,115,231,206,173,245,218,107,175,245, - 60,120,240,160,142, 16,178,167,224, 65, 44,163, 32, 82, 85, 27,192,137,218,181,107,215,221,180,105, 83,208,147, 79, 62,233, 90, - 81, 58,173, 86,235, 87, 43, 87,174,172,191,248,176, 27,118,152, 6, 34,129, 14, 1,173, 69, 81, 75,147,139,102, 53,110,162, 91, -189,132,122,235,214,173, 91, 14,192,225, 81,122,132,144,166,207, 61,247,220,198, 85,171, 86, 5,142, 26, 53, 42,233,248,241,227, -137,132,144,210,202,114,198,240,225,195,111, 70, 68, 68, 4, 41,138,178,149, 16,210,223, 25,147,197, 96, 84, 3,167,255,166,109, -255, 54,202, 51, 88,227, 9, 33,205, 22, 45, 90,244,193,183,223,126,219, 97,250,244,233, 7, 59,118,236,152, 89,104,176,110,221, -186, 85,235,200,145, 35,221,205,102,179, 36,203,242,184,210,230,196, 40,249,182,109, 74,233, 77, 66,200,103,157, 59,119,126, 97, -205,154, 53,235, 92, 93, 93, 51,247,238,221, 91,203,215,215,247, 78,100,100,164, 59,199,113,185, 87,174, 92, 81,237,221,187,119, - 40,128,149,165, 93,192, 37, 53,147,146,146,206, 53,104,208,224,243,119,223,125,119,194,204,153, 51,245,133,115, 12,229,230,230, -194,106,181, 66,173, 86,131,231,121,108,216,176,193,102,183,219,191, 75, 76, 76, 60,229,128,230,201,192,192,192, 85,159, 44,250, -100,212, 91, 35, 94,209,114, 57, 89,176,220, 73, 7, 4, 27,116, 42, 14,198,240,154,176,100,242, 88,190,235,168, 61,205, 98,249, - 41, 33, 33,225, 72, 69,154,199,110,228,236,236,216,200,251,192,188, 57,179, 30,155,250,227,143,128, 44,131,188,242, 10,176,111, - 31,208,178, 37,148,228,100, 88, 5, 1, 51,166, 77, 1,111, 73, 61,118,242, 70,222, 47, 21,105, 86, 7, 37, 53,111,222,188,217, - 65,146,164, 97,115,231,206,157, 29, 28, 28,172, 30, 49, 98,132,103, 96, 96, 32, 20, 69,129, 70,163, 65, 82, 82, 18, 78,157, 58, -149,115,231,206, 29,129, 82,250,126,114,114,242, 15, 21,105,202,178, 60,150, 16,210,236,157,119,222,153,247,193, 7, 31,168, 63, -249,228,147, 19, 61,123,246,244, 83,171,213,154,214,173, 91,123, 31, 62,124,216,176,101,203,150, 39, 76, 38, 19, 40,165, 19, 28, - 41, 75,213,125,236, 26,141, 38,237,242,229,203,181, 23, 45, 90, 68,110,101,101, 97,182, 70, 3,161, 96, 0, 66, 97,228,110,214, -172, 89,112,117,117,197,146, 37, 75,112,250,244,233, 37, 25, 25, 25,111, 47, 93,186,212,107,195,134, 13,131, 11, 13, 86,113, 77, -189, 94,127,227,220,185,115,198, 21, 43, 86,112, 9,146,132, 79, 69,241,158,136,214,228, 25,239, 65,176, 11, 32,132, 71,212, 31, -135,231, 63,218,253,137,185, 53, 61, 61, 13,138, 66,233, 63,153,239,255,101,205,179,103,207, 30, 2,112,168,156,167,235,194,135, - 57,164,167,167, 35, 61, 61, 29, 30, 30, 30,133,147, 38,151,170,105,177, 88,206, 79,153, 50, 37,122,197,138, 21, 61,143, 29, 59, -246,220,161, 67,135,158,218,191,127,191, 53, 62, 62, 94, 18, 69,145,214,171, 87, 79,245,232,163,143,234,123,247,238,237,162,211, -233,184, 25, 51,102,100,204,159, 63,223,171,192,128,149,170,169, 40, 10,175, 40, 10,222,238,146,131,201,143,169, 96,179,229, 63, - 80, 38, 39, 39,225,226,197,139, 56,126, 60, 6,132, 16,206,201,243,249,201,186,117,235, 26,104,181, 90,178,126,253,122,227,250, -245,235,223,168,232,252,173, 89,179,166,254,250,245,235, 63, 39,132,244,161,148, 42,172, 44, 49, 77,134,147, 6,171,160, 98,185, - 4, 96, 0, 33,164,211,164, 73,147,230,248,251,251,103,200,178,172,217,182,109,219, 83, 57, 57, 57,181,100, 89,158, 69, 41, 61, -234,100, 40,112, 21, 33, 4, 67,135, 14,157,230,239,239,255,219,159,127,254,249,216,115,207, 61,183,105,219,182,109,143,203,178, -124,227,218,181,107,211, 1,124, 9,224, 43, 71, 53,227,227,227, 63,220,179,103, 15, 57,113,226,196,248,169, 83,167,234,124,124, -124,136,167,167, 39, 44, 22, 11, 18, 18, 18,232,234,213,171,109,118,187,125,133,135,135,199, 28, 71, 53,107,213,170, 53,115,207, -177, 99,218,243, 23, 47,188,244,191,231, 7,235,235,251, 25,225,198, 25,145,123, 39, 3, 71,143, 37,225,243,221, 71,172,233,118, -251, 38,142,227, 28, 30, 74,239,127, 53,189,255,158,205,223,110, 57,124,240,224, 99,243, 22,124, 68,154,188,246, 26, 92, 26, 52, - 64,118,163, 70, 56,117,248, 48, 22,204,159, 71,121, 83,234, 49,233,234,237,103,238, 87,129, 40,120,199,224,247,129,129,129,155, -174, 92,185, 50,122,250,244,233, 83,195,194,194,168,205,102,211,236,216,177,195,148,146,146,162, 40,138,242,177, 90,173, 94, 17, - 31, 31,111,115, 66,247, 18,128,103, 9, 33,157, 70,142, 28, 57,219,207,207, 47, 85,146, 36,213,228,201,147, 31,203,204,204,172, - 67, 41,157,237,108, 89,170, 78, 4, 65,120, 98,210,164, 73, 7, 0,212, 40,222, 28,122,215,197,162, 82,105,114,114,114,136,162, - 40,162,213,106, 77, 43,140,140,150,117, 29,137,162,248,216,204,153, 51, 15, 88,173,214,250,101,237, 87,163, 55,224,232,241, 19, - 24, 54,116,136,172,226,249, 15, 94, 28, 58, 68,123,252,143,147, 50,165,202, 86, 86, 61, 61,152, 80, 74, 81,240, 48, 64,203,217, - 38,129, 16,242,222,153, 51,103,244, 99,198,140, 9, 29, 54,108,152,219,227,143, 63,238, 90, 34,250,174,108,219,182,205,188,114, -229,202,140, 67,135, 14, 69,142, 28, 57,178, 31,242,103,143, 47,149,228,228,228,157,203,150, 45,243,232,214,173, 91, 67, 89,150, -145,158,158, 94,212, 7, 43, 49, 49, 17, 55,110,220,184, 41,203,242,111, 78, 30,206,255, 94,124,241,197, 95, 34, 34, 34, 2, 70, -141, 26,149,180, 97,195,134,223, 0,148,214,167,214,117,224,192,129,125, 34, 34, 34, 2, 70,143, 30,157, 0,224, 29, 54,195, 59, -131, 81, 5,131, 85,172,178, 56, 14,224, 9, 66,200, 51,132, 16, 47,171,213,186,134, 82,186,189, 10, 21,212, 42, 66,200,222,132, -132,132,225, 0,252,190,248,226,139, 47, 0, 36, 2,184, 2,160, 95,105,253, 21, 28, 48, 5,115,253,253,253,183,204,158, 61,187, - 90,222, 69, 88,240, 74,157,137,190,190,190, 63,190,247,245,234, 41,138,162,180, 81, 68,161, 22,120, 85, 22,207,243,231, 68, 81, -252, 40, 33, 33,193, 41, 67,176, 57, 63,157,125, 59,212,119,127,122,202,216, 97,243, 37,222, 16, 96,178, 73, 90, 23,173,202,174, -161,214, 4,206,146, 61,251,100,124,238, 3,113, 99, 45, 48, 79,159, 55,108,216,112,245,169, 83,167,222, 5, 48, 38, 47, 47,111, -165, 94,175,255,228,234,213,171,185, 85,200,251,227, 0,122, 20,148, 37, 31,179,217,188,177, 42,101,169,186,136,140,140,188, 30, - 30, 30, 30, 12,192, 80,214, 54, 60,207, 47,221,185,115,231,179, 61,123,246,180,218,108,182, 69, 61,123,246, 84, 69, 71, 71, 83, - 74,233,129,210,182, 63,121,242,100, 42,128,114, 71,118,133,118,234, 20, 16,177,102,205,241, 17,195,135,187, 45,255,108, 73,205, -211,145, 81,242,119, 17, 17,185, 38,171,117, 41,171,158, 30, 12, 10, 3, 85,106,181, 26, 46, 46, 46,112,119,119, 71, 90, 90, 90, -133,131, 60, 40,165,215, 8, 33, 3, 39, 77,154,212,105,210,164, 73, 79,249,249,249, 53,171, 95,191,190, 63,199,113, 92, 74, 74, - 74,122, 66, 66,194, 77, 65, 16, 14, 0,216, 9, 64, 19, 20, 20,116, 14,192,134,178,244, 46, 94,188,248,145,159,159,223,225, 95, -126,249,229, 41,189, 94,223, 68,163,209,212, 20, 4,129, 51,155,205,153,118,187, 61, 70, 16,132,223,147,146,146,254,112,242,122, -252,139, 16,242,180, 74,165,250,121,213,170, 85, 33, 41, 41, 41,245, 15, 29, 58,116,207, 36,199,225,225,225, 95, 71, 68, 68, 4, -140, 29, 59,246,250,250,245,235, 7,177,230, 65, 6,195,129,186,163, 18,243,210, 57, 83, 49, 61, 84,161,206,192,192, 64,157,163, - 81, 27, 22, 58,126,248, 52, 91,182,108,233, 89,167, 78,157,193,227,199,143,215, 54,105,210, 4, 49, 49, 49, 88,190,124,185, 61, - 57, 57,121,243,133, 11, 23,178, 42,155,206,208, 78,157, 2, 92,245,250,241, 0,121, 6,160,219, 77, 86,235, 93,239, 34,100,121, -116,127, 52,251,247,239,191, 69,167,211, 53,224, 56,142, 80, 74,105,225,171,147, 10, 71,128,218,237,246,184,253,251,247, 15,120, - 24,142,157, 16, 98,108,223,190,253,156,152,152,152,221, 57, 57, 57,247,116,114,215,233,116,125,194,194,194,134,158, 56,113, 98, -118,201, 81,132,172, 44, 49, 77, 70, 21, 34, 88,140,187,162, 58,140,255, 40, 5, 38,170,104, 64, 67, 80, 80, 16,250,244,233, 83, -101,221, 2, 51,245, 14,216,204,237, 15, 20, 91,183,110, 29,240, 95, 57, 86, 74,105, 2,202,153,164,212,102,179,253, 6,224, 55, - 86, 42, 24, 12,199, 97,179, 69, 51, 24, 12, 6,131,193, 96, 84, 51, 4, 64,203, 50,158,104, 28, 14,253, 17, 66, 90, 86,226,137, -233, 2,211,100,154, 76,147,105, 50, 77,166,201, 52,255, 91,154,197,180,231,150,177, 42,169, 64,231,235,127,181,193, 98,125,176, -152, 38,211,100,154, 76,147,105, 50, 77,166,121,191, 53, 75,232,143,250,183, 27, 44,214, 68,200, 96, 48, 24, 12, 6,131,193, 12, - 22,131,193, 96, 48, 24, 12,198,131,141, 67,163, 8,181, 90,109, 51, 0, 47, 3,168, 67, 8,185, 77, 41, 93, 99,183,219, 47,253, -215, 78,150, 86,171,109, 70, 8,121,153, 82, 90, 7,192,109, 0,247,247, 60, 16, 66,230,204,206,159, 89,127,214,108, 80,252,157, -237,189, 12, 6,131,193, 96, 48,170,110,176, 26, 4, 4, 60, 71, 56,124, 34, 74,138,167,167,167, 39,183,108,217, 50,174,111,223, -190,216,182,109, 27,198,191,245,214, 27,254,254,190,138,154, 87,101,129,202,239,198,221, 76,250,201,145,157, 13, 28, 56, 48, 94, - 20,197, 50,223,223,197,243,124,218,150, 45, 91, 2,171,122, 80,126, 97, 67,226, 69, 81, 40,115, 63, 42,149, 58, 45, 57,122,179, - 67,251, 9, 8,240,123,142, 3,249, 68, 82, 20,207,154, 53,107,114, 95,124,241, 69,209,121, 24, 55,110,220, 27, 70,127,127, 69, -173,226,178,168,130,119,227,110,222,252,233, 31,203,185, 98,230, 10, 0,230,204, 6,153, 69, 8, 30, 72,147, 85,144,214, 89,179, - 64, 1,102, 2, 25, 12, 6,131,241, 31, 54, 88,132,208,207,214,175,252,196, 51, 35, 35, 19, 27,182,238, 66,211,166, 77,113,241, -226, 69, 52,109,218, 20,143,182,111,205,245,122,164, 13,199,115,168,253,254, 23,107, 63, 3,224,144,177, 16, 69,209,251,151, 95, -126, 1, 33,164,104,194,190,194, 73,251,114,115,115, 49, 97,194, 4,239,234, 56, 40, 81, 20,188,175,159,254, 25, 42,158, 64,146, - 41, 4,137, 66,148, 20, 8, 50, 69,142, 89,194,227,125, 94,116,120, 63,132,146,207,190,251, 98,145,103, 86,118, 54,126,222,177, -231,174,243,240,120,231,118,220,224,222,221, 57, 23,131,166,246,232, 41, 31, 57,124, 30,170,131,226,230,234, 46,147, 5, 60,112, - 6,166, 48,173,115,230,128, 0,249,211, 98,207,158, 13, 74, 89,196,141,193, 96, 48, 24,255, 53,131,101, 19,101,207, 58,181, 60, -176,250,187,239, 48,121,234, 60, 52,105,210, 4,148, 82, 16, 66, 48,125,230, 92,124, 58,111, 42,134, 62,221, 21,162,164,120,150, -165, 81,198,140,193,136,139,139,131,197, 98,185,235,211,162, 69, 11,135, 18,236,232,168, 5, 21, 79,240, 91, 84, 46, 4, 81,129, - 32, 21,124, 68, 5,143,181,116,115, 74, 83,148, 21, 79, 79,143, 26, 88,181,242, 43, 76,154,187,232,174,243, 48,101,250, 76, 44, - 95,248, 30, 38,142,125, 5, 54, 81,246,172, 76, 58,157,225, 97,210,156, 61, 27,100,206, 28, 66, 28,109,218,100,231,147,105, 50, - 77,166,201, 52, 31,110,205,135,210, 96, 17, 66,186, 1, 56, 88,112,210,138, 34, 35,162,221,138,230, 70, 47,124,181,248, 3, 80, -112, 80, 64, 1, 5,160,138,136, 6,181, 93, 96, 49,155,157,222,161,162, 40, 16, 4, 1,162, 40,226,235,175,191, 70, 94, 94, 30, - 20, 69, 65,211,166, 77, 1, 0,225,225,225,197, 69, 19, 34, 35, 35,155, 84,164,233,221,178,127, 12, 1, 49, 22, 95, 54,107,209, -183, 56, 22,117, 13,148, 2, 58,131, 11, 6, 13, 27, 13, 89,161, 16, 68,231,223, 79,106, 53,153, 81,167,134, 26,159,206,159, 9, - 78,173, 1, 7, 2,142, 35,224,136,130, 38,254, 53, 97,179, 88,254,241,140,155, 53, 27,180,100, 20,107,214,108, 80,204,250,119, - 21,192, 7,186,105,147,193, 96, 48, 24,127, 59,101,121,144,135,194, 96, 1, 56, 88,218, 65,217,173,102,248,215,212,160,110, 13, - 15, 72,146,140, 63,133,122,200, 53, 91, 33, 8, 34,110, 8, 2,174, 70,167,160, 83,167, 78, 24, 48, 96, 64,158,221,110,135, 70, -163,201,217,186,117,171, 95, 69, 6, 75, 20, 69, 8,130, 0,147,201,132,117,235,214, 65,165, 82, 21,189, 56,181,240, 62, 75, 41, - 69,231,206,157,141, 14,101, 14,136,241,234,169,159,224,166,231, 33, 41, 20,146, 68, 33,201,128,164, 80,152,237, 10, 6,142,124, - 15,146,162, 64, 86, 20,216,133,138,239,227,119, 25,182, 90,237,208,127,218, 6, 0, 53,138,214,187,235, 40, 38,119,230,160,209, -234,160,213,240,176, 89,204,255,124,206, 81, 74,103, 17,130,127, 91, 39,247, 89,179,168, 2, 16,146,223, 92, 88,204,100, 61,128, - 77,155, 12, 6,131,193,248, 71, 56,248, 48, 25,171,146, 6,171,200, 69, 82, 74, 15,253,191,193,178, 64, 18,101,136,146, 12, 73, -148,144,157,103,193,199, 31,127, 12,157, 78, 7, 66, 72,145, 89, 82, 20,133, 19, 69, 17,189,123,247,246,172,104,135,178, 44, 23, - 69,176, 40,165,224,121, 30, 29, 58,116,184,103,187, 63,254,112,234,165,240,112,211,243,104,208, 99,218, 61,203, 79,254,244, 1, - 40,165,144,101, 10, 73,166,176, 75,114,149, 13, 91,104,183,193,176,217,197,252,238,218, 20,176,154,205,247, 39,247, 40,165, 69, -198,228, 95, 21,185,162,116,214, 44,208, 57,115, 8,155, 38,132,193, 96, 48, 24,165,122,144,135,202, 96, 33, 63, 68, 87,228, 34, -109, 22, 11, 68, 81,130, 36,201, 16,197,124, 99,100, 48, 24,208,181,107,215,194,251,123,209,247,174, 93,187, 32, 8, 66,133, 59, - 44,236,212, 46, 8, 2, 20, 69, 1,165, 20, 27, 54,108,128, 90,173, 46,250,104, 52, 26,167, 15, 68,146, 41,166, 77,121, 27, 26, - 53, 7, 53,207, 65,163,226,160, 86,241,144, 41, 5,165,128,162, 80,200, 10,133, 77,116, 44, 80, 82,158, 97, 3, 0,193, 38, 0, -148,130,130,194, 98, 50,177, 43,131,193, 96, 48, 24,140,170,113,151, 7,121, 88, 12, 86,119, 66,200, 61,206,195,110, 49, 21, 68, -175,100,136,146, 84,100,160, 22, 47, 94, 12,149, 74, 5,173, 86, 11,149, 74, 85,100,136, 28, 49, 88, 86,171, 21, 65, 65, 65,176, -219,237,104,218,180, 41, 40,165,120,254,249,231,239,217,238,212,169, 83, 78, 29,136, 40, 83, 44,248,104,201, 61,203,143,110,158, -135, 86,205, 26,160, 93, 35, 87, 88, 5, 5, 57,102,169,202,134, 13, 0,172,118, 17, 10,242, 39, 29,176,152,204,236,178, 96, 48, - 24, 12, 6,163,114,148,234, 65, 30, 10,131, 85, 16,146,187,199, 53, 90,205,102, 72,162, 84,100,178,236,118, 59, 20, 69,193, 91, -111,189,117,143,208,190,125,251, 96,183,219,203,223,153, 74,149,246,250,235,175,223, 53, 69, 2,165, 20, 63,253,244, 19,116, 58, -221, 93, 81, 44, 66,156, 51,177,162, 76, 49,251,189,119,161, 85,241, 80,171, 10, 13, 17, 7, 69, 1,182,253,182, 27,219,126,219, - 93,180, 45,207,171,211,170, 98,216, 0,192,110, 23, 0,154, 31,129, 51,229,229,178,203,195, 65, 8, 33,132, 77,207,192, 96, 48, - 24,140, 98, 62,160, 84, 15,242, 80, 24,172,178,176, 90, 76, 16,139,245,193, 18, 4, 1,146, 36,225,235,175,191,190,171, 57, 79, -173, 86,131,227,184, 10, 35, 88,191,252,242,203, 93,147,123,134,135,135,155, 41,165, 24, 52,104, 80, 81,115,227,171,175,190,138, - 81,163, 70, 57,109,176, 36,153, 98,206,252,197, 69, 58,189,123,116, 65,255,167,187, 65, 41,184,149,167, 94,216,226, 82, 93,134, - 13, 0,236,182,252, 62, 88, 20,128, 57,151, 53, 17, 58, 74,209,244, 12,179,168,194,206, 6,131,193, 96, 48, 30, 86,202, 52, 88, -106, 21,151,115,245,198, 45,247,218,174, 6, 72,138, 21,178,146,223,111, 74,150,101,140, 26, 53,170,104,187, 23, 94,120, 1, 47, -191,252,114,169, 6,203,145,183,109, 43,138,130,163, 71,143,130, 16, 2,142,227,138, 62,229, 68, 64, 74,213, 52,217, 20, 28,219, - 52, 23, 10,165, 80, 40,160, 20, 12, 72,176, 73, 21, 7, 75, 74,211,172,200,176,233,220, 60,193, 19, 10, 66,128,171,137,183,161, -226,185, 28,103,143,221, 89,254,173,154,179,103,131,206, 46, 49,165,132,179, 29,220,217,249,100,154, 76,147,105, 50,205,135, 91, -243, 63, 99,176, 8, 37,239,172,216,254,199, 98, 81, 86,220, 11,151, 53,111,222, 28,130, 32, 96,231,206,157, 69,198,131,231,249, -162, 38, 61, 71,250, 96,149, 32,161,107,215,174,229, 77,197,144,224,136, 8, 5, 77,104,251,216, 16, 99,121,235,157, 77, 88, 69, -134,109,213,161, 63,255,255, 36,114, 92, 14, 71,200, 59,172, 56,149,113,254,105,225,120,203,187,167,103, 96, 48, 24, 12, 6,227, - 63,103,176,226, 19, 18, 54, 0,216, 80,124, 89,239,222,189, 83,251,247,239,111,144, 36, 9, 54,155, 13,130, 32,192,110,183, 67, - 16, 4,216,108, 54,232,245,122,167,102,220,116,100, 18, 81, 71, 72,187,176,181, 73,117,158, 20, 71, 12, 91,114,114,114, 19, 86, -124,156,183, 90,249,239, 35,100, 70,139,193, 96, 48, 24,255, 81,131, 85, 26, 22,139,197, 23,128, 42, 41, 41,233,158,117,183,110, -221, 2, 0,233, 97, 56, 41,213,109,216, 24,229, 27,173,127,227, 12,244, 12, 6,131,193, 96, 84,155,193, 58,120,240,160,244,176, -152, 40,198, 3,100,180,152,185, 98, 48, 24, 12,198, 67, 6,155, 73,155,193, 96, 48, 24, 12, 6,163,154, 33, 0, 90,150,182,194, -153,209, 1,132,144,150,206,238,184, 34,125,166,201, 52,153, 38,211,100,154, 76,147,105, 62,124,154, 21,105, 83, 74, 47, 16, 66, - 70, 81, 74,191,254, 87, 27,172,191,115,206, 71, 54,132,149,105, 50, 77,166,201, 52,153, 38,211,100,154,149,208,255,215, 27, 44, -214, 68,200,184,111,132,143,142, 50,176,179,192, 96, 48, 24,140,135, 17,213,131,152,168,240,240,240,186,148,210, 48,142,227,106, - 82, 74,247, 70, 70, 70,222, 98, 89, 85,169, 39, 0, 21,165, 84,122, 16, 53,141, 67, 55,253,172, 83,242,158,244,237,127, 41,161, -147, 70,223, 98,243,230, 65, 50,203, 49, 6,131,193, 96, 48,131, 85, 64,251,246,237, 3,101, 89,126, 17,192, 80, 0,231, 35, 35, - 35, 95,116, 86,227,145, 71, 30,209,139,162, 56, 6, 64,123,112,170,176,198,173,187,214, 11,235,208, 21,153,102, 5,123, 55,125, - 18,215,189,123,247,182, 7, 15, 30,180, 57,163,217,182,109,219,159, 41,165,189,202, 48, 9, 31,158, 57,115,102,190, 51,122,109, -218,180,233,193,243,252, 59, 0, 32,203,242,226,179,103,207,238,125, 16, 51,212,219,219,219,213,221,221,253,189,134, 13, 27,246, -120,241,197, 23,131, 59,119,238,156,145,156,156,124, 90, 20,197,133, 73, 73, 73,231, 43,171,233,233,233,249, 94,139, 22, 45,158, -124,245,213, 87, 27,116,238,220, 57, 35, 41, 41,233,180, 36, 73,149,210,236, 56,241,100,125,106, 74,239,245,203,138, 55, 49,118, -222,134,128,243,146,254, 69, 0,107,156, 54,226,163,127,169,203,169,120,213,233,229,253, 18, 1, 32, 48, 48,176,190, 40,138,221, - 20, 69,105,165, 82,169,206,243, 60,127, 40, 62, 62,254, 70, 85,206,231,191, 69,147,193, 96, 48, 24, 15,129,193,106,222,188,185, -171, 70,163, 25,192,113,220,176, 54,237, 58,119,234, 55,232, 21, 34,114, 6,124,240,246, 11, 78, 71, 54,194,195,195,219,131,240, - 95,191, 60,126, 65,112, 64, 80, 83,232, 92, 60, 96,178, 3,183,179, 21,104,205, 50,140,173,175, 54,184,126,114, 67, 39, 0,251, -157,209,165,148,246,218,180,227, 36, 82,178,100, 16,146,223,155,159,227,128, 60,171,130,233, 35, 30,157, 14,192, 41,131,197,113, -220,180,145, 11, 15,181, 87, 40,240,221,212,174, 26, 0, 15,156,193,242,245,245,125,164, 99,199,142,107,222,126,251,237,186, 94, - 94, 94,112,117,117,133, 90,173,174,147,148,148,212,119,220,184,113, 79,251,249,249, 77, 73, 74, 74, 90,225,172,102,175, 94,189, -214,189,251,238,187, 62,132, 16,168, 84, 42,104, 52,154, 58, 73, 73, 73,125,223,121,231, 29,167, 53, 9, 33, 92,139,199, 71,140, -112,243,233, 10,142, 35,240,112,213, 35, 59,254,252,224,192,192,183, 54,199,199,199, 59,108,162, 67, 71,239,152, 73,161,155,164, - 72,132,180,124, 97,229,206, 59,135,231,222, 12, 9, 9, 33, 35, 70,140,184, 35,203,178, 69, 20, 69,239,136,136,136,113,190,190, -190,148,227,184,131, 54,155,237,104,122,122,122, 94,121, 9,155, 83,240, 58,159, 53,107, 60,107,216,237,134, 71, 41,165, 93,155, - 52,105, 66, 70,142, 28,153, 33,138,162,197,106,181,250,172, 89,179,198,113,205, 98,212,174, 93,187,134, 86,171,237, 66, 41,237, - 86,165,116, 22, 99,112, 15,114,118,243, 94,218,166,178,235, 75, 28,190, 7, 0, 61,165,244,150, 3,219,250, 0,112,161,148,198, -253,211,154,127, 7,126,126,126,217,148, 82,181, 51,255,163,209,104,106, 57, 83, 94, 25, 12, 6, 51, 88,229, 85,128, 36, 52, 52, -180, 51, 33,228,165,192,160,134, 3, 6,190, 56,218, 16,216,168, 37,242, 20,119,196,165, 83, 68, 29,248, 1,132,144,159, 28,213, -107,216,176,161,214,195,195,227,253,128,198,109,199,143,154, 56,155,187,112, 91,143, 67,113, 50, 84,156, 29, 60, 0,187, 57, 13, - 57, 41, 49,184, 29,123,208, 34,203,242,201,202, 28, 92, 82,166,132,195, 49,118,240, 92,190,185,226, 57, 2, 85,229,231, 15,175, - 75, 1,252,126,206, 2, 66, 72,189, 7, 45, 35,141, 70,227,147,125,251,246,221, 60, 97,194, 4,149,217,108,134,213,106, 5,165, - 20,122,189, 30,190,190,190,248,233,167,159, 84, 67,135, 14,253,216,223,223,255,108, 98, 98,226, 41, 71, 53,135, 15, 31,190,249, -205, 55,223, 84,197,196,196, 64, 16, 4, 24, 12, 6,232,245,122,212,170, 85, 11, 17, 17, 17,170,215, 94,123,205, 33,205,166, 77, -155,118,208,233,116,243,218,181,107,215,182, 97,176, 55,159, 94,171, 49, 0, 32, 32,168, 17,220,112,187,235,245, 20,159,180,176, -176,176, 88,179,217, 60, 63, 54, 54,246,215,242,180, 90,190,177,195, 83, 5,242,246,138,183, 59,113, 42,158, 39, 99, 63, 61,218, -123,253,175,135,150,117, 13,111,152, 9,192,180, 99,199, 14,107,239,222,189,237, 35, 71,142, 20, 98, 99, 99,185, 79, 63,253,180, -245,254,253,251,251,249,251,251, 31, 73, 76, 76,252,161, 52,205, 57,179, 65,118,164,252,122, 89, 16, 37,255,154, 93, 69,219,211, -254, 23,191,120,237,181, 81, 57,254,254,254, 98,129,166,173,119,239,222,246,209,163, 71,219,175, 93,187, 70, 22, 47, 94,220,114, -207,158, 61,207, 24,141,198, 35, 9,249,111, 61, 40,147,176,161, 75,119,251,180,121, 94,211,167, 93,205, 99,111,141,125, 61,219, -215,215, 87,170,108, 58, 75,208,168,138,235,139,195, 3,152, 75, 8, 89, 77, 41, 61, 81, 78, 61,208, 6,192, 96, 0,159,222, 39, -205,114, 49, 24, 12,241, 86,171,213, 27, 0,244,122,125,154,197, 98, 9,116,224, 97,140, 44, 93,186, 20, 26,141, 6, 28,199, 65, -150,101,200,178, 12, 69, 81, 64, 41, 45,250, 46, 28, 16, 52,117,234, 84,214,156,205, 96, 48,170,207, 96,133,133,133,253,210,123, -224, 43, 61, 59,118,237, 9, 73, 83, 7, 49,169, 4, 9,113, 20, 42, 94, 2, 7, 5,113,167,183, 82,158,231,127, 40, 81,113, 93, - 40, 43, 2,230,225,225,121, 96,208,232,217,205,130, 90,116,193,246,139, 2, 20,217,142,244,203,191, 35,235,198, 41,152,110, 95, -182,139,182,188,139,132,144,227, 90,173,246,211,243,231,207,155, 43,210, 44,141,252,119, 8, 82, 16, 74, 0, 5, 0, 40,192,145, -210, 42,216, 10, 53, 57,142, 59,191,245,192, 69, 35, 81,187, 2,192, 53, 7, 42,237,106, 31, 93, 81,150,166,159,159, 95,239,113, -227,198,109,236,211,167, 15,151,158,158, 14, 0,216,178,101, 11,206,156, 57, 3,163,209,136,201,147, 39, 35, 32, 32, 0,115,230, -204,225,135, 15, 31,190, 0,192, 99,142,104,190,247,242,203, 27,251,140, 28,201,157, 57,115, 6,146, 36, 97,239,222,189,184,112, -225, 2,234,213,171,135, 9, 19, 38, 32, 32, 32, 0, 51,102,204,224,199,140, 25, 83,174,102,219,182,109, 47, 6, 6, 6, 26, 95, -126,249,101,174,111,223,190, 36, 53, 23, 24,179, 44, 38,191, 0,106,116, 24, 50,248, 57,238,233,143, 94,199,158, 61,123,154,173, - 94,189,122, 77,219,182,109,237,103,206,156,241,118,248,124, 18, 66,107,184,123,101, 0, 72, 5, 0,119,119,119, 87, 0,102, 0, -230,144,144, 16,213,151, 95,126, 41,197,196,196, 92,235,213,171,215, 83, 0,126, 40, 75, 83,146,148,186,223, 78,239,137,145, 31, -238,209,205,154,245,126, 42,199,169, 69, 0, 2, 0,120,122,122, 22,105, 6, 7, 7,171,150, 45, 91, 38,198,196,196,196, 21,104, -110, 40, 47,157,162,218,171, 83,155, 71, 91, 8, 7, 19, 50, 90,102,175,191,122,252,205,103,117,123, 90, 4,213,202,171,108, 58, - 7,247, 32,103, 11,205,211,224, 30,196, 92, 65,148,203, 12,224,175,146,145,172,146,154,148,210, 59,132,144, 85, 0, 54, 16, 66, -134,149,102,136, 8, 33,143, 0, 88, 7, 96, 0,165, 52,173,162,242, 89, 92, 83,167,211,105,236,118,187,103, 73,227,227,172,102, -177,180,152, 35, 35, 35, 17, 30, 30,142,226,223,133, 15, 22, 5,219,120, 59,122, 29,241, 60,143,175,190,250, 10, 28,199, 65,163, -209, 64,173, 86, 67,163,209,220,243,105,211,166, 13, 40,165, 32,132, 56,124,189, 19, 66,248,128,128,128,183, 85, 42,213,112,187, -221,238,167,211,233, 82, 68, 81, 92,231,229,229,245,113,100,100,164,248, 32,212, 33, 76,147,105, 62, 8,154, 21,208, 14, 64,241, -107,218, 14, 64, 91,240,119, 58,242, 27,170,188, 74, 44, 47,190, 93,225,119, 97, 61,227, 93,240,127,180,152,110, 26,128,211,213, -106,176, 8, 33,148, 82, 74, 10,191,203, 56,153,110,137, 22, 79,228,197,121, 67,197, 41, 80,241, 4, 42, 30, 0, 8, 50, 18, 47, -193,154,151,126, 60, 50, 50, 50,222,145,157,234,245,250,121,131,199,206,111, 38,123,181,195,111,231,236, 16,115, 18,144,120,232, - 19,106, 78,187,178,138,231,249,213,178, 44, 95,142,138,138, 18,171,122,112, 10, 5,228,226,198, 74, 1, 8, 42, 61, 45, 69,241, - 23, 70,167, 60, 40, 14,217,215,215,183,223,148, 41, 83,126, 8, 11, 11, 35,107,215,174, 69,203,150, 45,177,106,213, 42,122,229, -202,149,207, 8, 33,159,197,199,199, 63,102, 50,153, 86,255,240,195, 15,232,216,177, 35, 60, 60, 60,218,132,135,135,171,203,171, -216,125,125,125,251,173,121,235,173, 31, 90,117,238, 76, 22,247,232, 1,223,231,159,199,198, 67,135,104, 92, 92,220,103,132,144, -207, 18, 18, 18, 30,179, 90,173,171,191,249,230, 27,180,109,219,182, 66, 77,158,231,253, 55,108,216,192,187,184,184,128,231,121, -212,215, 3, 62,158, 26,124,188, 41, 6,105,217, 86, 76, 26,224, 11,149, 74,133, 30, 61,122,192,207,207, 79, 53,118,236,216,114, - 71,183, 94,248,178,119, 86,232,232, 29, 75,198, 44, 62, 54,133, 35, 28, 13,242, 81, 29,240,224,179, 46, 1,158, 42, 0, 30,222, -222,222, 34, 0,216,237,246,236,223,126,251, 77,138,138,138,170, 21, 20, 20,228,229,204,121,141,142, 62,107,174, 89,211, 43,163, - 65,131, 6, 42, 0, 30, 94, 94, 94, 85,210,124,169,119,107,109,158,197,142,131,103,174, 63, 58,114,193,129,206, 13,124,221,206, -245,111, 87,107, 31, 0,147,179,154,133,102,105,112, 15, 98,222,188,249,120, 26,168, 12, 72,185, 34,132,108, 17,114,182, 8, 33, - 71,130,120, 71, 28, 60, 97, 73,203,205,123,169,139, 19, 21,230, 41, 66,200, 48, 0,235, 74,154,172, 98, 70,104, 24,165,244,188, -179,154,118,187,125,111,161,241,209,235,245,222,132,228, 27, 67,189, 94, 47, 90,173,214,167,157,209, 4,128,200,200, 72,132,133, -133,213, 40,208,164,133,223, 5,134,213,105, 10, 95, 90,207,243, 60,194,194,194,208,183,111, 95,132,132,132, 32, 49, 49, 17, 7, - 15, 30,196,149, 43, 87,138, 34, 92,206, 64, 8,225, 3, 3, 3,247,247,236,217,179,249,248,241,227,245, 1, 1, 1,136,137,137, - 49,126,249,229,151,255, 59,122,244,104,159,240,240,240, 46,229, 93,139, 12,198,127, 1, 71, 60, 8, 0,111, 66,200,246, 98,117, -203, 51,133,191,167, 78,157, 58,125,193,130, 5,127, 18, 66,182, 23, 95, 94,124,187,226,223, 5,251,220, 78, 41,125,102,218,180, -105, 45, 22, 46, 92,248, 97,225,182,247, 37,130,165, 86,171, 95,184,176,243,179, 99,141, 5, 90,207,167, 69,159,130,186,140, 0, -160,184,113,118, 39, 20, 69, 89,231,136, 78,104,104,104, 23, 99,147,142,175,251,134,116,196,142,179, 54,228, 94,221,133, 91, 39, -150, 39, 40,146,125, 76,116,116,244,225,234, 56,168,176,176,176, 1, 53,107,215,131, 77,160, 5, 6,235,110,147,245,176, 16, 16, - 16,240,220,252,249,243, 35,130,131,131,201,230,205,155, 65, 41,197,143, 63,127, 11,148,161, 0, 0, 32, 0, 73, 68, 65, 84,254, - 72,175, 94,189, 58, 54, 37, 37,101,109,225,253, 56, 36, 36,100, 57,207,243, 6,142,227, 96, 52, 26, 53,231,206,157,243, 5,112, -163, 44,205,141, 83,166,124,223, 38, 36, 4, 73,131, 7,227, 81, 73,194,183,107,214,208, 27,138,114,151,102,227,198,141,151,171, - 84, 42, 3,207,243, 8, 8, 8,208,156, 61,123,182, 76, 77, 0, 16, 69, 17,231,206,157,131, 74,165, 66,173, 90,181,240,209,203, -254, 56,121,249, 14, 90, 5,249,192,146,153,136, 77,251,162, 17, 23, 23, 7, 79, 79, 79,199, 12,208,202,222,243,234, 55, 14,107, -186,102,221,166,100, 29,205,188,144,145,145,225,149,145,145, 1,119,119,247,108, 89,150,197,143, 63,254, 88,125,245,234, 85, 15, -189, 94, 15,157, 78, 7, 81, 20,157,114,214,146, 36,113,213,173, 89,211, 77,143,129,143, 55,215, 60,213,169, 49,142,158,189, 17, -254,201, 79,113, 45, 19, 46, 29, 24, 81, 21, 77, 80, 25, 56,209, 37,234,158,229,254,195,189, 43,249, 84,122,162,192,100,237, 32, -132,104, 10, 22,167, 22,124, 15, 43,175,169,175, 2,205,162,223, 54,155,173,120,148, 73, 93, 25,205,240,240,240, 66, 13,165,196, -195, 91, 90, 97,228, 74,175,215,167, 57,170, 39,203, 50,180, 90, 45, 90,180,104,129,119,222,121, 7, 49, 49, 49, 56,122,244, 40, -124,124,124,208,171, 87, 47,168, 84, 42, 36, 36, 36, 56,109,176,252,252,252,222,126,226,137, 39,154, 46, 93,186, 84, 31, 31, 31, -143,152,152, 24,184,187,187, 99,222,188,121,134,169, 83,167, 6, 29, 59,118,108, 26,128,185,236, 22,203, 96, 56, 92,159, 60, 83, -242, 55, 33,100,251,130, 5, 11,158, 41,205, 84,149, 98,230,238, 90,190,112,225,194, 15,139,253,206,172,206,180,114,197, 29,100, -121, 27,138,162,248,136,103,109, 95,239, 81, 47,246,130,162, 0,146, 2, 72, 50,133,217,108,194,173,152,131,102, 65, 16,182, 84, -180,179,230,205,155,187, 18, 94,179,226,213,113, 51,201,142,104, 27,172,119,226,145,114,124,217, 77, 21, 71,219, 87,179,185,138, -152,249,241,183, 56,125,221, 94,208, 76,152, 31,201,146,149,252,191, 31, 6,124,125,125, 67,158,121,230,153,136,160,160, 32,178, -105,211, 38,216,108, 54, 36, 36, 36,208,168,168,168,209, 73, 73, 73,107,139, 85,240,195,159,126,250,105, 3,207,243, 16, 69, 17, -215,175, 95, 55,221,190,125, 59,161, 44,205,145, 93,186, 68,180,242,247, 71,226,139, 47, 66,206,206,198, 57,131,129,158,166,244, - 30,205, 1, 3, 6, 24, 52,154,252,251,239,181,107,215,202,212, 44, 81,176, 97,183,219,145,148,148,132,243, 81, 39, 97, 74, 56, -129,141,107, 86, 98,205,154, 53,136,139,139,131, 74,165,130, 36, 57, 62, 78, 66, 50,167,218,130,125, 13,185,197,151,229,228,228, -120, 68, 69, 69, 41,151, 47, 95,246, 40,188,113, 2,128,162, 40,149,182,214, 37, 53,139, 34,164,149,212, 52,232,212,120,172,109, - 16, 47, 42, 84, 83,229,116,202,185, 66,169,203,133, 59, 98, 21, 42,176, 19, 0, 52,197,250, 29,249, 84,214, 92,149, 48, 62,247, - 52,173, 85,150,200,200,200,194,136,213, 93, 88, 44,150, 64, 74,169, 75,100,100, 36, 28,233,127, 85, 44, 47,161,213,106,209,175, - 95, 63, 92,190,124, 25, 73, 73, 73,224,121, 30, 54,155, 13, 54,155, 13, 97, 97, 97,208,104, 52, 78,167, 95,167,211,189, 48,126, -252,120,151,184,184, 56,100,100,100,128,227, 56, 72,146, 4, 89,150,241,218,107,175,185,232,245,250,161,236,150,201, 96,148,238, - 65, 8, 33,163, 8, 33,163, 74, 26,164,170, 26,180,210, 52,166, 77,155,214, 2,128,238,111,137, 96, 21,134,231,202, 50, 45,158, -181,125, 35,166, 45, 88,165,250,229, 28,143,204,148, 88, 88, 83, 99, 97, 12,235,143,212,216, 99,160,178,240,235,197,139, 23, 77, - 14, 84, 54,111, 15,124,125,118,192,145,120, 29, 44,130, 21,105, 71, 63, 81, 8,149, 70,157, 60, 25,153, 91, 93,230,202,211,171, -110,196,123, 31,125,171,250,245, 79, 53,238, 36,199, 34,102,235, 20,200,130,185,100,166,237,114, 50,227, 73,120,120,120,221, 70, -245, 12,224, 52, 58,252, 65,136,207,224,193,131,249,205,155, 55,223,183,206,174,201,201,201,177,190,190,190, 31,216,237,246,153, - 28,199,225,214,173, 91,244,236,217,179,163, 18, 19, 19,215, 23,110, 99, 52, 26,159,108,223,190,253,103, 83,167, 78, 5, 33, 4, -251,247,239,135,201,100, 58, 70, 41, 85,202,211,172,245,231,159, 51,187,153,205,216,226,229, 69, 87,202,242, 61,154, 61,123,246, -252,108,226,196,137, 32,132,224,200,145, 35,229,106, 22, 39, 46,157,194,100, 3, 2,189, 56,120,122,122,226,224,193,131, 69,253, - 93,178, 68, 55,200,146, 22,190,106, 75,165,207,137,162, 40, 36, 43, 43,139,183, 88, 44,188, 40,138,156, 74,165,162,133, 55, 97, - 81, 20,149,234,210,148,101,185, 74,154, 37, 30, 92,170,150, 78, 49,187,116, 35,101, 79,171,142,102, 39,123,193,183,182, 42,230, -170,208,248, 20,118, 64,215,233,116, 69, 70,197,153, 40, 83, 25, 17,172, 74,173, 47,205, 96,169,213,106, 52,106,212, 8, 39, 78, -156,128,187,187, 59,106,212,168, 1,131,193, 0,157, 78, 7,119,119,119,104,181, 90,112, 28,231,148,201, 18, 4,193,223,223,223, - 31,127,253,245, 23,244,122,125,209, 71,171,213, 34, 36, 36, 4,102,179,217,151,221, 90, 25,140,210, 61, 72,105, 51,185, 87, 71, - 51, 94,105, 38,107,225,194,133, 31, 22,143,130, 85,171,193, 42,215,180,212,246,141,152,250,225, 42,213,230, 40, 14, 89, 41, 49, -184,177,115,186, 36, 11,230, 52, 69, 17,235,101, 94, 59, 10, 69, 81,214, 58,120, 80,143,214, 13,106,133, 99,209, 2,172, 49, 63, -193,158,117,125, 89,100,100,228,177,234, 52, 87,211, 23,126,171,250,249,156, 10,119,146, 99,113,237,183,169,178,100, 55,189, 30, - 21, 21,181,169,178,186, 29, 58,116,104,248, 72,219,208,175, 94,170, 35,116,236, 55, 56, 8, 90,131, 6, 83,174,169,158,184,120, - 60,254, 72,219,182,109, 71,159, 57,115,230,226,125, 52, 89, 11,235,214,173,171, 54, 26,141, 83,146,146,146, 94, 75, 78, 78,222, - 88, 44,202,212,123,224,192,129, 27,199,140, 25,195,185,187,187, 35, 35, 35, 3,179,102,205,178,240, 60, 63,197, 17,205,125, 94, - 94, 83, 78,203,242, 61,154,221,250,143,222, 56,229,127,175,112,106,181, 26,233,233,233,152, 51,103, 78,133,154, 84, 95,143, 60, -255,233, 77,212, 48,168,161,211,232,145,112,204,132, 15, 7,228, 55, 21,105, 52, 26,156,201,105, 9,206, 61, 0, 6,141, 10, 81, -137,153, 16,221, 46,146,240,209, 81,234,200,149, 97, 21,154, 4, 66,136,156,158,158,174,142,139,139,211,219,237,118, 46, 48, 48, -208, 10,228, 55,241,101,102,102,106,180, 90, 45, 8, 33,130, 36, 73, 78,197, 46, 51, 51, 51, 85, 87,175, 94,215,137,162, 88,166, -166, 32, 8, 85,142,135, 86, 53,157, 16,179, 75, 15,249, 9,233, 85, 53, 88, 9,132, 16, 99,225,223,213, 81, 94,173, 86,171,119, -177,166, 65, 80,234,120,255,176, 50, 34, 88,149, 94, 95, 74,221, 4,173, 86,139,171, 87,175,194,219,219, 27,146, 36,193,213,213, - 21, 6,131, 1, 6,131, 1, 22,139, 5, 90,173, 22, 60,207,151,218,201,189, 44,180, 90,109, 98, 76, 76, 76, 35, 79, 79, 79, 40, -138,114,151,201,138,139,139,131,171,171,107, 50,187,181, 50, 24, 78, 5, 60,182, 23, 55, 90,132,144,237, 83,167, 78,157, 94, 89, -189,169, 83,167, 78,175,106, 84,172, 92,131, 85,216,169,172,100,231,178,176,176,176, 1, 30, 94,245, 34, 38,125,240,141,234,135, - 51, 28,178, 83, 46, 35,121,207, 12, 73, 22,204,195,213,106,245,137,155,199, 86,174,227, 56,206,114,246,236,217,163, 14,156, 20, - 46,188, 99,151, 86,188,166, 6, 40,181,192,154,116, 18, 42,149,234,179,234, 52, 87, 83, 23,172, 82,109,142, 86, 33, 51, 37, 6, - 55,126,159, 38,203,130,185,210,230,170,123,247,238,170,188,188,188, 9, 45, 92,229,247,222, 9, 16, 53,126, 90, 5,151,190,154, -130,152, 0,119,180,232,104, 64, 96, 19,185,245,201, 93,182,227,225,225,225,139,109, 54,219,194,139, 23, 47, 10,247,163,176,221, -186,117,107,158,191,191,255,175,201,201,201, 69, 35, 58,124,125,125,251, 13, 27, 54,108, 93,183,110,221,184,245,235,215,163,127, -255,254,120,255,253,247,105,122,122,250, 91,201,201,201,215, 42,171, 57,112,252,234, 31, 6,247,121,132, 12,153,244, 41,102,190, -254, 24,190, 93, 54,191, 66,205, 90,125,214,158, 52,250,246,225, 27,215,178, 96,236,144,206,249, 79, 10, 27, 47,227,202,237,252, -128,167,168,168,144,141, 58,248,106, 68,107,112, 28,193,225, 51, 87,176,250,118, 75,146, 20,127,240, 2, 16,214,164,188,116,202, -178, 76,190,255,254,123,247,212,212, 84, 46, 36, 36,228, 78,235,214,173, 77, 90,173, 86,177, 88, 44,178, 94,175,151, 92, 93, 93, - 21,171,213,170,189,113,227, 70,205,164,164, 36,190,176, 25,206, 17,246,236,217, 83,175, 73,147,102, 25,161,161,161,101,106, 38, - 39, 39,115,206,104,150, 70, 85,211, 89,102, 4, 75,168, 90, 4,139, 82,218,132, 16, 98,174,138, 9,250,187, 40,136,132, 1,128, -169,172,169, 24,156,137, 96, 21,246,171,210,106,181, 56,126,252, 56,158,122,234, 41, 40,138, 2,157, 78, 87, 52, 45,201,169, 83, -167,160,209,104,192,243,188, 83,105, 21, 4, 97,253,178,101,203,222, 93,184,112,161,107, 97, 51,164,139,139, 11,180, 90, 45, 22, - 47, 94,108,178, 88, 44, 27,217, 45,147,193,162, 87,165,123,144, 18,164,149,136, 94,217,139,253, 78, 67,254,187,149,159, 41,248, - 27,165,252,109, 47,101, 89,198,130, 5, 11, 14, 20,139, 92,165, 85,231,113,149, 25,193, 10, 13, 13,125,194,179,182,111,196,187, - 31,124,163, 90,115,146, 71, 86,202, 37,164, 31,120, 79, 82, 68,203,240,168,168,168,194,254, 86, 61, 28,221, 81,120,120,120,195, -250, 77, 58,184,164,230, 42,160,138, 4, 41,251,122,234,153,211, 39, 83,171,122, 0,161,161,161, 79,120,122,213,141,152, 60,127, -149,106,125,164, 10, 89,201,151,145,188,103, 70,149,204, 85,155, 54,109,122,232, 84,220,183,227,253,197, 90,207,212,150, 32, 83, - 96,237, 45, 53, 54, 68,159, 60, 42, 16,197,214,226, 17,125,143,150,157,181,120, 98,168,139,234,218,121, 97,202,153,189,120, 51, - 52, 52,116,120,116,116,244,206,251, 81, 56, 19, 19, 19,139,140,144,191,191,255,192, 17, 35, 70,124,223,189,123,119,178,115,231, - 78, 40,138,130, 69,139, 22,209,115,231,206,141, 47, 30,141,114, 86,115,224,248,213,223, 63,215,175, 39,153,177, 89,196, 29,179, - 11, 38,205,254,148,218,147,207, 87,168,217,220,168,105,254,213,123, 47, 1, 0,254,184,120, 11,251,206,101, 34, 41,221,140,145, -237,129,139, 0, 84, 68, 68, 77,238, 22,102,174, 62,143,214,129, 53, 48,232,177,198,232,218,182, 49,190,248,254,119, 99,237, 94, - 31,214, 77,223, 53,189,204, 73, 42, 21, 69, 73,223,179,103,143,203,204,153, 51,243,234,213,171,167,202,203,203,227,138,247, 97, -210,104, 52,168, 87,175,158,148,149,149, 37,236,217,179,167,129,162, 40,119,202,189, 24, 84,220,173,145, 31,238,241,215,114,138, -117,192,128,129,180,118,237,218, 42,139,197, 82,170,102, 70, 70,134,176,127,255,254, 32, 69, 81,210, 43, 58,151,188,156,155,190, -120,221, 97,207,193, 61, 90,171, 27,248,222,219,137,223,217,116,222,109,176,238,136, 48,190, 82, 27,246, 59, 34,236,105, 18,132, - 12, 17, 66,154, 8,201,244,192, 13,231,168,108, 7,244, 10, 34, 97,222,213, 21,193,210,104, 52, 72, 72, 72,192,190,125,251,208, -190,125,123,184,185,185,193,100, 50,225,196,137, 19,184,117,235, 86, 81, 4,203, 25,110,222,188,185, 68,173, 86,247, 30, 55,110, - 92,147, 49, 99,198,184, 54,109,218, 20,241,241,241, 88,178,100,137,249,252,249,243,113,181,106,213, 90,192,110,175, 12,134, 67, -156,254,183, 37, 88, 85,206, 83,221,164, 71, 6,205, 84, 69,252,161, 66,102,210,159,200, 62,242,126, 73,115,229, 72, 40,175,232, -109,219,178, 44,183,105, 17,250, 8,174,221,150, 32,229,196, 3, 84,142,174,100,120,240,174, 55,120,115, 28,247,110,167, 65, 51, - 85,107, 78,171,144,157,124, 9,105, 7,102, 58,109,174, 74,209,156,122, 96,210,160, 90,144, 36,156,219,177, 17,159, 38,104, 76, -215, 45,100, 74,116,116,212,247,148, 82, 26, 26, 26, 58, 52,241,138,184,164,195,211,122,247,231, 6, 62,143,129, 3, 36,215,137, -175, 70, 76, 6,176,179, 44,205,106, 10,141,150,171,233,235,235, 27,210,172, 89,179,136,222,189,123,147, 45, 91,182, 32, 55, 55, - 23,153,153,153,248,227,143, 63,222, 76, 78, 78,254,190,178,154,245,154,247,141, 24,208,183, 39,153,249,163,140,216,147,155, 80, -195,118, 19,182,148,147, 14,105, 94, 72, 16,206,190, 56,249,187, 80,157,222, 0,217,224,135,119,251,251,162,169, 55,129,197,252, -255, 93,246,218,213,252, 11,121,200,194,209,232,186,248,117,247, 97,240,138, 25, 55, 83,173,137,233,251,254,223, 92,149,150,206, -180,180,180,201, 26,141,166,235,136, 17, 35,158,239,210,165,139,219,168, 81,163, 82,221,221,221, 77, 90,173,150,175, 85,171,150, -150, 82,170,221,189,123,183,239,173, 91,183,106, 2,216,144,150,150,118,184,172,116,206,154, 13,138,217,253,154, 94,186, 4,114, -250,180,111,151,225,251,213, 67,187,116,233, 82, 99,212,168, 81,105,197, 53,101, 89,214,238,222,189,219,239,214,173, 91,158, 0, -214,167,165,165, 29,169,232,124,158,219,144, 26,212,168, 87,226,251,203,239,228,190, 21,236,239,205, 63,219,163,133,186,102,141, -252,247, 92, 59,155, 78,160,196, 60, 88,227, 63,109, 85, 94,153, 41,107, 30,172,251, 81, 62, 45, 22, 75,160,179, 81, 49, 71,210, - 25, 21, 21,101, 46, 57, 31, 86,121, 17,172,178, 52,181, 90, 45, 84, 42, 21,210,210,210,176,103,207,158,187,230,194,210,106,181, - 69,211, 56, 56,163, 73, 41,149, 9, 33,143,203,178,252,246,196,137, 19,135,155,205,102, 63, 23, 23,151, 20,187,221,190,174,102, -205,154,229,206,131,117, 63,242,136,105, 50,205,251,169,249,176, 81, 94, 31, 44,195,209,200, 43,224,117,169,200, 61,249,177,211, -230,170, 52,110,221,177, 34, 81, 47, 65,188, 19, 11, 0,103,171, 41,180,232,118, 36,234, 42,212,250, 12,100,255,241,145,172,136, -150, 42,245,185, 42, 40, 56, 34, 36, 9,246, 67,235, 49,254,138, 62,131,112,124,251,168,168,211,183, 11,215, 71, 71, 71,111, 12, - 13, 13,221,191,107,141,233, 76,143,174, 82,237,243,113,191,130,227, 56,225,126,103,102, 65, 39,245,249, 63,254,248,227, 76,147, -201,132, 59,119,238,208, 83,167, 78,141, 73, 74, 74, 90, 87, 85,205, 79,191, 27, 56,243, 74,108, 54, 12,185, 39,169,237,198,214, -177,197, 71, 21,150, 71,214,111, 47, 61,218,252,181,157,157, 72,214,133,246, 46, 87, 86, 76,252, 53,195,215,211,247,141, 55, 72, -189,122,245, 80,179,102, 77,120,121,121, 33, 47, 47, 15,215,206,252, 78, 45, 41, 41, 54,169, 70,248, 87,246,122,143,239, 73,219, -215,239,168, 3,121, 79, 1, 28, 10, 15, 15, 63,126,240,224,193,167,142, 29, 59,214,239,241,199, 31, 79,237,212,169, 83, 94, 84, - 84, 84,253,184,184, 56, 31, 0,219,124,124,124,118, 86, 56,215, 16,165,116,214,255,143, 74, 59, 24, 30, 30,126,172, 64,179,111, -143, 30, 61,210, 58,118,236,152, 23, 21, 21, 85, 63, 62, 62,222, 91,150,229, 95, 27, 54,108,184,235,224,193,131,146, 99,101,116, -150, 2, 96,118,171, 39, 39, 45,186,156,229,186,228, 90,210,157, 33,173, 26,251, 17, 0,196,233,116,162,196, 60, 88,229,204,115, - 85,209,122, 7,136,252, 27,138,105,149, 53, 75, 70,194,194,194,194, 2, 11,205, 84,201,111, 39,174,121,180,110,221, 26,197, 71, - 58,114, 28,119,215,135,231,121,168, 84,170,202,212, 81, 50,128, 69, 5, 31, 6,131,241, 95, 55, 88, 42,149,106,146, 41,242,243, -185,148, 82,111, 0, 83,163,162,162,118, 85,101, 71, 26,141,230, 88,212,238,111,178,180,126,151, 61,173, 9,135, 77, 28, 33,107, -170,227, 0, 8, 33,147, 77,145,159,207, 5,224,165, 40,202,123,209,209,209,219,170,170, 41,203,242,226, 71,151,108, 5, 96, 32, -178, 44,127,114, 54, 50,234,118,201,109,162,163,163,211,219,180,105,243,250, 59, 35,215, 20,189, 0,250, 65,200,208,194, 78,234, - 65, 65, 65, 83,110,222,188,121,215, 8,192,170,106, 26,234,182,155, 34,166, 71,143, 78, 74, 74,250,193,153,255,191,184,234,169, -227,192, 83,199,129, 41, 75, 66, 66, 66, 6, 79,159, 62,125, 89,179,102,205, 12,181,107,215, 38, 39, 79,158,164,215,174, 93,147, - 76, 38,211, 39, 23, 46, 92,248,160, 82,119,236,124, 83,178,205,215,215,119,223,158, 61,123, 6,236,222,189,187,189,162, 40,167, - 20, 69,153,159,156,156,108,169,170,230,174, 93,187, 6,236,220,185,179, 61,165,244, 4,165,244,215,164,164, 36,107,101, 52,207, -239, 94,244,127,236,157,103,120, 20, 85,195,134,159, 51,179,125, 55,189,145, 70, 9, 9,132, 16, 18, 32,155, 2,129, 64, 64,144, -174,162,160, 84, 1, 41,138, 32, 8,250, 34,189,247, 94, 68,225,149,222, 4, 20, 16, 5,164, 72,111, 9,161, 67, 40,129, 4,210, -123,207,110,182,204,156,239, 7,129, 15,120,129,108, 2, 42,226,185,175,107,174, 77,102,103,238, 61, 83,246,236, 51,103,206,204, -148, 0, 24, 84,239,173,177, 19, 46, 20, 39,175,224,101,214,129,119,239,222,141,125,137,114,222,126,201,247,203, 99,231,159,176, -139,190,180,179, 34,183, 95,176, 48, 0,209,225,195,135, 87,100, 22,254,225, 45, 74, 24, 12, 6,227, 69,149,203,159, 54, 0, 8, -120,252,255,240,240,112,171,250,245,235,191, 19, 16, 16,160,126, 85,206, 63,163,156,111,130,211,195,195, 35,224,117,118,214,169, - 83,103,120, 88, 88, 88, 70,131, 6, 13,190, 3, 32, 97,219,253,245,115, 2,208,252, 9,206, 42,108, 27, 49, 39,115, 50,167, 5, -254,129,127,166,255,175, 24, 36,127,101,152, 59,121,242,100, 17,128, 95, 88,172,253,243,121,188,147,250,235,232,140,141,141, 93, - 4, 96, 17,219, 82,175,245,193, 87,241,159,224, 76,103,107,150,193, 96,252, 27,224,216, 42, 96, 48, 24, 12, 6,131,193,120,181, - 16, 0, 1,207, 57,210,180,184,181,130, 16, 18, 80,137, 35,217, 43,204,201,156,204,201,156,204,201,156,204,249,239,114,150,231, -166,148, 94, 33,132, 12,124,214,157,220,255, 81, 1,171,162, 87,219, 84, 72,206, 46, 97,101, 78,230,100, 78,230,100, 78,230,100, -206,138,251,255,241, 1,139,157, 34,100, 48, 24, 12, 6,131,193,120,197, 72,216, 42, 96, 88,130,135,135,199,148, 70,141, 26, 13, -140,142,142, 94,124,255,254,253, 74,221,125, 58, 36, 36,164,190, 90,173,158,100, 54,155,181,102,179, 89,161, 82,169, 98, 11, 11, - 11,191, 59,119,238,220,150,202,150, 43, 36, 36, 36, 88,173, 86, 79, 48,155,205, 13,202,156,215,242,242,242,150, 93,184,112,225, -167,215,201,201, 96, 48, 24, 12, 22,176, 30,177,104, 44,113,149,149, 66, 50,120, 62, 77, 2,128, 26, 53,106, 84, 55,153, 76,205, - 69, 81, 12,148, 72, 36,151,121,158, 63,154,144,144,112,239,101, 10,240, 79,113,254, 83, 32,132, 84, 81,171,213,189, 9, 33,173, - 41,165,191,151,148,148,108,160,148,190,212, 35,137,170, 84,169,226,220,181,107,215,145,139, 23, 47, 70,191,126,253, 70, 57, 59, - 59, 47,205,204,204,172,208, 21,102, 77,155, 54, 29,172, 82,169, 38,125,254,249, 16, 85,112,112, 48, 81,171,213,184,121,243,102, -208,130, 5,243, 23, 53,111,222,188,203,177, 99,199, 62,160,148, 86,232,241, 46, 17, 17, 17, 95,170, 84,170,177,195,135, 15, 87, - 52,108,216,144,200,100, 50, 92,188,120, 49,120,201,146, 37,203,155, 55,111,222,249,216,177, 99, 61,104, 5,207,129, 63,237, 84, - 42,149,184,114,229, 74,240,252,249,243, 43,229,212, 14, 58, 47,149,169,141, 18, 0, 48,150,200,204, 49, 43,130, 76,150,142, 99, -213, 19,131,193, 96,188,129, 1,107,249,104, 50, 94, 14,124, 13, 25,200,228, 65,242,125, 43,127,115,188,239,235,235, 75,250,245, -235,151, 35, 8,130,206,100, 50, 57,175, 93,187,118,136,187,187, 59,229, 56,238, 72,105,105,233,137,172,172,172, 34, 75, 62,212, -201,201,201, 74, 46,151, 71, 80, 74,155,249,250,250,146,254,253,251,231,152, 76, 38,157, 94,175,119,217,184,113,227, 80,119,119, -119,209, 98, 39, 33,100,242, 36,144,141, 27,237, 53,122,189,178, 41,165,180,249,171, 42,231, 63, 40, 84,201,149, 74,101, 39,169, - 84,250,137,163,163,163, 83,187,118,237, 46, 85,169, 82,229,122,122,122,122,157,189,123,247,238,177,177,177,201, 52,153, 76,171, -245,122,253,110, 74,105,133,239, 56, 47,149, 74,171, 19, 66,144,156,156, 12,169, 84, 42,149,203,229, 53, 0, 92,181,116,254,176, -176,176, 0,153, 76, 54,229,187, 85,155,149,102,222, 26,217,102, 17,217, 5,128,204,201, 23,147,102, 46,210,204,155, 62,174, 73, -227,198,141,135, 3, 88, 80,145, 86, 38,149, 74, 53,118,235,214,173, 74, 23, 23, 23,136,162,136,194,194, 66,248,249,249, 97,218, -180,105,234,153, 51,103,190, 21, 22, 22,246, 41,128,239, 42,235,164,148,194,104, 52,162, 94,189,122,152, 59,119,174,122,210,164, - 73, 21,114,106, 87,158,151,154,140, 55,194,140, 37,194, 40, 0, 32, 82,126,118,228,100,135,115, 38,227,141,224,242,198,105, 87, -226,108,204, 64, 22,178, 24,127, 45,238,238,238,141,189,188,188,126,188,127,255,254, 25,158,231, 63, 78, 72, 72, 40,125, 5,245, -147, 7,128, 26, 0,236,240,224,194,170, 92, 0,247, 40,125,112,224, 94, 25,156,106,181,104, 15,185,186, 23, 64, 3, 9, 0,112, -220,101,106, 42,222,144, 21,123,120,207, 75, 57, 21,154,222,160, 66, 32, 1, 68,112,252, 21, 34, 20,175,201,184,118,120, 63,219, - 51, 24,175, 44, 96,109, 30, 77,236, 64, 49, 98, 96,183,129, 28,207,243,100,197,143, 43,219, 31,248,245,191,203,234, 54,108,151, - 11,160,120,207,158, 61,250,246,237,219, 27, 62,249,228, 19,227,205,155, 55,185,133, 11, 23,214,255,227,143, 63,222,241,244,244, - 60,158,148,148,244,220,187,124,175,156,160,185, 41,152, 74, 60, 39,124,162, 42,205,150, 15, 92, 50,112,224,224, 2,119,119,119, -115,153,179,180,125,251,246,134, 65,131, 6, 25, 30,115,190,235,233,233,121,236, 69,206,201,147, 64,100, 57,234,125,145,245,137, -204,213,183,219,169,254, 3,191, 40,112,119,119, 55,115, 28, 87, 84,217,114,254,147,176,182,182,158,163,209,104, 58, 6, 5, 5, -197,126,249,229,151, 71,223,121,231,157, 76, 0, 88,187,118,173,231,236,217,179, 47, 3, 56,245,203, 47,191, 56, 47, 92,184,176, -219,249,243,231,167, 90, 91, 91,255, 90, 88, 88,248, 31, 11, 43, 70,206,213,213,117, 76,155, 54,109, 70,245,232,209, 3,214,214, -214,232,211,167, 15,244,122,253, 73,119,119,247,169,169,169,169,243, 45,105,205, 81, 40, 20, 99, 63,251,236, 51,133, 40,177,198, -184,117,113,200, 41,122,144, 27,212,114, 14,159,183, 82,160, 75,151,174,234,153, 51,103,124, 83,145,128,165, 86,171, 39, 12, 31, - 62, 92,225,226,226, 2, 0, 40, 42, 42, 66, 81, 81, 17, 10, 11, 11, 81, 90, 90,138,119,222,121, 71,253,253,247,223, 79,168, 72, -192,122,220,121,243,230, 77, 24, 12, 6,232,116, 58,232,245,122, 88, 91, 91,163,115,231,206,234,101,203,150, 89,236,116, 75,131, -244,158, 81, 92, 56,242,179, 15,157, 0, 96,254,119,219, 22, 2,186,230,212,130,113,110,105,136, 0,192, 2,214,139,247, 79, 30, -192, 59, 82,169,244, 29, 31, 31,159,160,184,184,184, 75, 38,147,233, 23, 0,187, 40,165,166,151,116, 71,186,185,185, 77, 74, 77, - 77,253,158, 82,186,229,223,178, 78,189,189,189,183,108,218,180,201, 97,207,158, 61, 29,166, 77,155,246, 62,128, 77, 47,177, 14, -165, 0,194,202,254,189, 89, 22,172, 80, 22,180,124, 9, 33, 94, 0,206, 84,228,160,207,217, 63, 82, 35, 66,181, 46, 60,178, 77, -120,215, 46,157,173,156, 29,108, 81, 92, 42,224, 86, 66, 90,213,253,123,126,142,112, 13,236,112, 70, 16, 74, 62,206,188,118,164, -184,162,206,150,109,223, 9,111,249, 86, 43, 43, 91, 91, 59,100, 23,154,112, 39, 33,169,218,209, 3,187,154, 84, 9,236,112, 2, - 48,245, 79,191,188,191,132,125,235, 24, 21,193,162, 78,238, 4,160, 14,118,234,108, 0,105, 0,138,108,108,108,140, 0, 74, 0, -228,250,250,250,230, 47, 95,190, 60,121,215,174, 93,127, 80, 74,223,122,124,190,167,175, 48, 16,133, 82,215, 79,123, 12,133, 66, - 38,202,198,124, 51, 34,199,221,221, 61,163, 28,231,161,242,156, 0, 96,163,210,133,119,142,180, 11,172,202, 45,255,236,242,193, -254,161, 57,169, 49, 37,128, 80,108, 99,101,101,170, 76, 57, 95, 5,127,149,211, 96, 48,188,107,103,103,151,159,147,147,163, 49, -153, 76,164, 64,103,146,222, 72,210,219,220,215,185,185,222, 72,210,219, 20,232, 76, 82,147,201, 68, 50, 50, 50, 52, 74,165, 50, -191,180,180,244, 93, 75,203,233,230,230, 54, 97,230,204,153,163, 87,175, 94,205,133,132,132,192,218,218, 26,141, 27, 55,198,134, - 13, 27, 36, 19, 39, 78,156,236,230,230,246,181, 37,229,164,148,134,104,181, 90, 34, 2,200, 45, 50,227,240, 76, 45, 78,206, 13, - 65,137, 65, 68,126, 65, 17, 56,142,131, 68, 34, 33, 65, 65, 65,222,150, 46,187,217,108,110,208,176, 97, 67, 2, 0,133,133,133, -101,225,234,193, 80, 84, 84, 12,153, 76, 14, 81, 20,101, 13, 27, 54,116,171,140,211, 96, 48,160, 70,141, 26,168, 94,189, 58, 10, - 11, 11, 81, 80, 80, 0,153, 76, 86, 33,167, 65, 45, 37, 20,212, 69,165, 84, 56,170,148, 10, 71, 10,234, 2, 0,150,140, 51,168, -165,228,239,220, 63, 9, 33, 78, 60,207,127,239,227,227,115,158,231,249,255, 18, 66,170,188,140,147, 16,162, 37,132, 76, 86,171, -213,191,213,173, 91,247,150, 70,163,217, 75, 8,153, 74, 8, 9,171,140,147, 16, 34, 87,171,213,123,102,204,152,177,225,194,133, - 11, 31, 28, 58,116,168,198,165, 75,151,222,155, 51,103,206, 90, 43, 43,171,253,132, 16,213,203,124, 55,189,188,188,190,139,138, -138,210, 54,105,210,100, 57, 33, 68,241, 42,190,239,132, 16,158, 16, 82,159, 60,124,216,225,107, 82,135, 60,196,211,211,211,187, - 97,195,134,142, 60,207, 35, 34, 34, 2,130, 32, 52,121, 73,103, 24,128,116, 74,233, 9, 74,105, 22,165, 84, 40, 27,178, 41,165, - 39, 1, 36, 1, 8,175,136, 83,132,106,221,240, 47,255,211,250,171, 47, 6, 88,157,191, 39,224,191,251, 83,177,245, 68, 38,146, - 11, 21,104,253,238, 39, 54,145,237,122,180,226,121,245,186,138, 58,199,140, 30,221,186,127,159,158, 86, 87, 82, 56,108, 59,153, -133, 19,177, 5, 40, 33,246,136,124,119,160, 93,221,144,118,109, 65,100, 43, 94,135,109,244,166, 59,255, 21, 45, 88,221,103,210, -188,229,163,201,130,239,183,172, 28,197, 17, 66, 53, 14, 1,135,117,212,243,122,217,244,182,206,206,206,166,178, 31,161,252,223, -126,251,205,124,254,252,121,135,154, 53,107, 58, 90,190,101, 64, 46, 93,186,168,115,114,241, 74,247,242,242,122, 37,206, 86,225, - 45,228,250, 82, 29, 46,221,184,210,100,247,202,102,225,246, 46,126,151, 92,234, 12,248, 3, 66,120,177,193,108,206,171, 84, 57, -255, 1,240, 60,175,219,190,125,251,127, 15, 28, 56,224, 54,110,194,148,214, 83,254,123,212,197,166, 94, 55,123,147,104, 99,117, -104,209,133,162,188, 43, 27,115,115,110,236,203,208, 54,168,247, 71,231,206,157, 83,231,205,155,247, 69,121, 78, 79, 79, 79,165, - 68, 34,169,221,161, 67,135,145, 31,127,252, 49, 18, 18, 18,240,213, 87, 95,233, 46, 94,188,152, 19, 28, 28,236, 48,119,238, 92, -213,192,129, 3,113,250,244,233,177, 94, 94, 94,191,152, 76,166,196,164,164,164,231, 62,159, 79, 16, 4,133, 82,169,132,174,172, - 77,193,104,166, 0,196, 71, 45, 79, 28,205,131, 68, 34,129, 40,138,181, 8, 33,119, 45,105, 21, 51,155,205, 10,165, 82,137,226, -226, 98, 20, 21, 21, 33, 57,179, 8,247,210,139, 81, 88, 92, 10,157,206,132,146, 98, 19,164,106, 71,152,205,233,126,132,144,180, -138, 56, 5, 65,128, 78,167, 67,113,113, 49,116, 58, 29,116, 58, 29, 68, 81, 68, 65, 65, 1,164, 82, 41, 53, 24, 12,190, 0, 82, -203,221, 54,114,149, 25,224,230,126,191,118,215,216,178,227,153,185, 86,208,139,217, 22,140,123, 48,239,223,214, 50,164,112,114, -114,218,183,125,251,246, 58,181,106,213, 66,124,124,188,111,215,174, 93,131, 9, 33,225,148,210,146, 10,186,212, 28,199, 77,237, -219,183,239,192,238,221,187,147,218,181,107, 67, 34,145,192,108, 54,123,196,197,197, 53,219,186,117,235, 8,137, 68,178, 70, 16, -132,111, 44,189,115, 60, 33,132, 83, 40, 20,235, 86,172, 88,209, 52, 44, 44, 12,235,214,173,195,217,179,103,197,208,208, 80,174, -119,239,222,168, 94,189,122,232,199, 31,127,188,137, 16,242, 65,217,131,150, 43,186,252,213,122,246,236,233,201,243, 60, 26, 55, -110, 44, 59,121,242,100, 3, 0,103, 94,114,157,106, 60, 60, 60,246,183,104,209,162,254,193,131, 7, 47, 18, 66,218, 84,228, 78, -249,238,238,238, 29,171, 84,169, 50,205,218,218,218,222,210,121,138,138,138, 74, 50, 50, 50,198, 36, 37, 37,237,176,112,150,176, -192,192, 64,152,205,102,216,218,218,194,205,205,173,177,167,167,231, 23, 54, 54, 54,239, 20, 22, 22,126,147,152,152,120,174, 2, -203,235, 14,128,163,148,198,149,253, 95, 29, 64,237,178,183,111, 83, 74, 19, 40,165,241,132, 16, 55, 66,136,167, 37,167, 11,157, -106,181,104,223,164,101,251,240,136,176, 0,110,230,246, 4, 8,162, 8, 9, 4, 72,120, 17, 89,130, 20,132, 16, 84,243, 13,225, -171, 92, 57, 23,234,228,215,170,125, 86,236,193, 61,150, 56,219,117,234,220,196,183,182, 47, 55,127,231,125,228, 37, 95, 17,210, - 99,255,200, 38, 28, 7,175, 6,173, 29,107,248, 54,228,125, 26,182,148,166, 37, 92,105,238,232,219,172, 69,246,205, 99,135, 89, -108, 96, 84, 56, 96, 17, 66, 40,165,244,209,145,213,224,153,116,106,160, 95, 21,191, 45,155,214,164, 20,155, 28,174,100,103,103, - 59,102,103,103,195,198,198, 38, 95, 16, 4,211,156, 57,115,164,113,113,113,182, 74,165, 18, 10,133, 2, 38,147,169, 66,157,137, - 69, 81, 36,175,218,169, 81, 91,161,137, 54, 92, 22, 28,160,197,181,184,235,218,243,135,135, 5,156,190, 80,240,201,173, 91,119, - 42,237,252,167,208,186,117,235,212,218,218, 54,191, 45,253,195,244,159, 69, 67, 66,212, 84, 20, 40,225,120,205,208,197, 34, 9, -173,235,185,202, 65,150,159,199,243,124,185,158,106,213,170, 77,106,209,162,197,112,137, 68, 34, 29, 48, 96, 0, 0, 96,216,176, - 97,133,209,209,209,129,233,233,233,153, 85,171, 86,117, 27, 57,114,228,165,237,219,183,171, 63,249,228, 19,137, 78,167,187, 32, -149, 74,169,155,155,219,204,212,212,212,233,207,114,202,100,178,203,215,175, 95,111,106,227, 17, 0, 39,107, 14,109,198,158, 7, - 0, 88, 41, 41,114,179,210,112,231,254,101, 84,175, 94, 93, 85,173, 90,181, 31,221,220,220,196, 70,141, 26,205,243,244,244,156, -185,109,219,182,231,254, 56,170, 84,170,107, 23, 47, 94, 12,174, 91,183, 46,138,138,138,144,152, 81,140,213,167, 9, 74,244, 42, - 0, 42,112,176,130,149,189,135, 66, 74,117, 91,194,194,194,184,198,141, 27,207,242,240,240, 88, 80,158,243,250,245,235,193,245, -234,213,131,201,100, 66, 76, 76, 12,138,139,139, 97, 48, 24,144,155,155,139,248,248,120,120,123,123, 43, 69, 81,220,213,161, 67, - 7, 33, 59, 59,123, 82, 84, 84,212,146,231,133,183,125, 95,248, 24,155, 79, 58,178,210,160, 43,252, 9, 0, 28, 29, 61,115,127, -157, 20,100,104, 62,169,168,220,113,251,190,240, 49, 98,232,223,182,171,246, 26, 59,118,108, 29, 7, 7, 7,124,250,233,167,152, - 60,121, 50, 38, 76,152,224,243,233,167,159,246, 3,176,180, 2, 63,178, 42, 87, 87,215,227,139, 23, 47,246,109,210,164, 9,246, -236,217,131,205,155, 55,227,238,221,187,102, 47, 47, 47, 73, 88, 88, 24, 38, 78,156,136, 54,109,218,244, 29, 58,116,104,211,178, - 0,103, 73,232,232, 61, 97,194,132,142, 77,155, 54, 69,223,190,125, 75, 15, 31, 62,220, 27,192,161,131, 7, 15, 54, 63,118,236, -216,198, 13, 27, 54,168,166, 79,159,222,122,196,136, 17, 3, 0,124, 95,137,229,239,212,172, 89, 51, 0, 64,211,166, 77, 49,103, -206,156, 86, 47, 19,176, 8, 33,114, 7, 7,135,159,215,175, 95, 95,223,215,215, 23,189,122,245,106,240,225,135, 31,254, 76, 8, -233, 68, 41, 53, 88,226,112,117,117,157,186,114,229, 74,111,149, 74,101,241,231, 26, 12, 6,251, 65,131, 6, 77, 1,176,195,194, - 58,185, 81, 64, 64, 0,142, 28, 57,130, 86,173, 90,161, 94,189,122,222,131, 6, 13,154,217,166, 77, 27,124,249,229,151, 7,221, -221,221,189, 83, 82, 82,178, 45,252,248,106, 0,110,149, 45,127, 85, 0,222, 0, 78,151,189, 23, 66, 8, 1,165, 52,161,108, 26, -223,178,214,172, 23,163,212,244,122,167, 83, 7,171,159, 79,101, 64, 16, 69,248,121, 40, 81,183,154, 13, 18, 50,244,184,151,156, - 13, 41, 49,194, 90,165, 64, 96,120, 7,187,156,244,132, 94, 0,202,239,143, 37, 87,247,122,239,157, 14,154, 29,167, 51,144,151, -124,149, 38, 68,111, 61, 42,148,234, 62, 7,128,235,199, 55, 44,113,179, 87,182,172,221, 64,203,151, 68,188,107,119,100,103,122, - 47, 0, 44, 96,253,121, 7,118, 79,100,144, 55,182, 5,235, 33, 57,133,146, 82, 91,151,192,194,226,228,228, 71,227, 10, 10, 10, -108,111,221,186,149, 17, 27, 27,107, 43,149, 74, 33, 8,194,195, 47,167, 88,217, 66,188,106,167, 92, 38, 71,125,223, 64, 62,230, -242, 57, 89,108,108,172, 45,207,203,232,171, 40,231,235,206,149, 20,161,170, 73,228, 53, 74,153,228,209,166, 21,137, 76, 83, 64, - 92,171, 58, 32, 63,175,188,249,181, 90,173,180,101,203,150,195, 87,173, 90, 37, 77, 77, 77,133,157,157, 29, 76, 38, 19,206,159, - 63,159,156,158,158,158, 9, 0,137,137,137,169,158,158,158,169,130, 32,248,248,249,249, 97,208,160, 65,168, 83,167, 14, 25, 57, -114,228, 8, 66,200,204,103, 93, 9, 88, 80, 80,240,237,252,249,243, 27, 78,158,177, 64,221, 51,140,160,184,196,128,162,162, 34, -164, 36,220,130,194, 76, 49,125,250,116, 40,149, 74, 0,224,179,179,179,249,217,179,103,141,186,120,241,226, 91, 0,154, 63,175, -172,121,121,121,203, 22, 45, 90,180,124,206,156, 57,106,157, 78, 7,157, 94,143, 66,157, 28,103, 23,132, 62, 56, 20, 31, 17,133, - 89,179,231, 32,160,186, 70,149,156,156,140,137, 19, 39,126,117,247,238,221,198, 0,222,123,145,115,238,220,185,203,231,207,159, -175,182,178,178, 2,165, 20,162, 40, 34, 49, 49, 17, 0, 48,117,234, 52,148,253,192,241,169,169,169,252,140, 25,211,167, 41, 20, -138,150, 0, 58, 61,167, 9,157, 2, 40, 37, 4,105, 30, 30, 53,189, 21, 10,110,172,135, 71,233,169, 35, 19,147, 54, 19,130,180, - 7,211,128,186,175,116,255,232,254, 58,121,184,193,128,101,169,169,241,183, 41, 5,197,196,191,239, 56,192,201,201,233,179,119, -223,125, 23,179,102,205,194,238,221,187,191,113,112,112,152, 53,121,242,100,184,185,185, 13, 34,132, 44,171,192, 85,148,211, 23, - 46, 92,232,235,231,231,135,143, 63,254,216,112,240,224,193, 73, 0,118, 3,184,127,252,248,241,170,107,215,174,109,191,117,235, -214, 41,139, 22, 45, 82, 46, 93,186,212,251,131, 15, 62,152, 11,224,179,242,164, 85,170, 84, 25,218,189,123,119,204,155, 55, 15, -135, 15, 31,238, 65, 41,253,189,236,173,253,132,144, 46, 51,102,204,216, 51,110,220, 56, 44, 92,184,240,243,138, 6, 44, 66,136, -198,207,207,239,155,182,109,219,226,248,241,227,136,136,136, 64,120,120,248, 80, 66,200,114, 74,105,118, 37,126, 52, 56,107,107, -235,117,107,215,174,109, 82,163, 70, 13, 76,155, 54, 13, 95,127,253, 53, 86,173, 90,213,164, 87,175, 94,235, 8, 33,221, 45,185, -122,214,198,198,198, 74,165, 82, 97,214,172, 89,244,254,253,251,229,126,151,221,220,220,236,198,143, 31, 79,108,108,108,108, 45, - 40, 35,239,225,225, 97,227,234,234,218,196,213,213, 21,139, 23, 47,134,139,139, 11, 70,140, 24, 1, 71, 71, 71, 20, 23, 23,163, -115,231,206,210, 51,103,206,116, 5,176,220,194, 69,119, 0,240,176,197,171, 14,128,211,148,210,162,178,207,139,194,131, 83,131, - 9,120,208, 47,203,162, 86, 57,142, 82,127,123, 59, 91,164, 92, 78,135, 4,102,248, 85,179,198,185,184, 98, 24, 5, 10,149,198, - 10,197,133,121,104,224,227,140,130, 18, 79,128,138,254,150, 56,101, 60,105, 40, 87,168,144, 81,144,143,180,235,135,114, 76,162, -113,104,222,157, 99, 73, 0,224,224, 19, 57,244, 74,212,222, 19,157,219, 69, 56,103,228, 86, 3,165, 66, 48,139, 65,140,138, 48, -126,107,157, 0, 0, 32, 0, 73, 68, 65, 84, 80,161, 27,141,138,162, 72,114,114,114, 36, 58,157,142, 55,153, 76,220,227,105,211, -100, 50, 85, 42,184,252, 25,206,199,249, 51,156,175, 43,181, 92,184, 84,158,199, 19,167,234, 8,168,222,138,100,165, 90, 50,127, - 76, 76,140,233,216,177, 99,155, 70,143, 30,141, 5, 11, 22,224,206,157, 59,144, 74,165,240,243,243,115,117,118,118,214, 0, 64, -205,154, 53,109, 2, 2, 2, 92,120,158, 71, 92, 92, 28, 54,111,222,140, 73,147, 38,209,152,152,152,117,207,251,161, 56,127,254, -252,175,165,165,165,123,230, 76, 31, 95, 82,154,117, 19,106, 33, 19,180, 32, 30,106, 94,135,190, 3,135,226,110,166,128, 11,241, -133,184, 16, 95,136,148, 98, 5, 62, 31, 49,150,243,242,242, 10, 10, 13, 13,253,228,121,101,189,112,225,194, 79, 37, 37, 37,135, -166, 76,153, 82,114,247,238, 93,232,116, 58, 0,128,209, 44,194,104,126,178, 24, 30, 30, 30,152, 53,107,150, 70,163,209,132,107, -181,218,238, 47,114, 22, 23, 23, 31,154, 48, 97, 66, 73, 92, 92, 28,242,243,243,145,150,150, 6, 66, 8,250, 15, 30,137,187,153, -226,163,114,102, 27,173, 49,252, 63, 19,185,170, 85,171, 54,111,216,176,225,251, 47, 90,175, 30, 30,158,222,126,126,222, 27,206, -156, 57,211,211,219,219,123,224,195, 96, 69, 41, 40, 0, 84,175, 94,189,127, 76, 76, 76,239, 6, 13,252, 54,186,185,185,215,254, -155,143, 34,155,125,244,209, 71,181, 69, 81,196,182,109,219,174, 82, 74,151,238,220,185, 51,166,180,180, 20,221,187,119,175, 1, -160,181,133, 30,109,143, 30, 61, 6, 70, 68, 68, 96,216,176, 97,198,131, 7, 15, 54,161,148, 46,161,148,222,163, 15,184, 79, 41, - 93,126,228,200,145, 70, 67,135, 14, 45, 13, 13, 13, 69,159, 62,125,122, 19, 66,154,148,227,109,212,189,123,119, 95, 81, 20,177, -121,243,230, 43,143,133,171,135,161,246,232,182,109,219,162, 12, 6, 3,122,246,236,233, 69, 8,105, 94,129,101,151, 41,149,202, -141,211,166, 77,179, 77, 78, 78, 70,239,222,189, 75,111,220,184,129,137, 19, 39,170,108,109,109,119, 16, 66, 52, 21, 93,159, 74, -165,114,217,242,229,203, 59, 6, 6, 6,226,179,207, 62, 51, 44, 95,190,252,171,193,131, 7, 27,180, 90, 45,190,253,246,219,142, -114,185,124, 89, 69,124,105,105,105,249, 71,142, 28,241, 44,111, 72, 79, 79,183,232,214, 44, 53,106,212,176,173, 87,175, 94, 84, - 72, 72, 72, 98,253,250,245,107, 2,192,213,171, 87,179,182,109,219, 70, 29, 29, 29,177,111,223, 62,172, 92,185, 18, 77,155, 54, -133,181,181,117,151, 10, 20,149,150, 13,120,236,245,233,247,159,158,174, 92,103,126,137, 25, 18,142,131,148,167,184,151,174,131, - 81,160,144, 73, 57, 72,121, 64,194, 81, 56, 90, 75, 33,149,242, 0, 33, 22, 57, 57, 66,144, 91,108,130,132, 39,144,202,165,132, - 23, 68,229,195,247,120,169,168,148,203,149,196,197, 86, 6,185,132,128, 35, 96, 48, 94, 93, 11, 86, 89,165, 35,100,101,101, 73, -227,227,227,149, 6,131,129,171, 81,163,134, 30, 0,204,102, 51,151,155,155, 43,147,203,229, 32,132, 24,205,102,115,133, 14,185, -115,114,114,165, 9,247,111,189, 82,231,179, 48,155,205, 92, 73, 73,174,252, 85, 58, 95, 71,110,220,184, 97,117, 59, 62, 69, 83, -133,175, 27, 51,116,105, 76, 24, 5,164,132, 82,147, 66,119,227, 76, 86,198, 69, 25,108, 21,106, 79, 79,207,114,251,207,220,189, -123,247,115,119,119,247,217,148, 82, 63, 74,233, 79, 11, 22, 44, 32, 75,150, 44,177, 27, 60,120,240, 85,119,119,247, 20, 95, 95, -223,106, 11, 22, 44,176, 6,128, 13, 27, 54,136,123,247,238,237,164, 80, 40,110, 36, 36, 36,164,191,200,123,244,232,209,190,161, -161,161,159,124,247,221,119, 83,204,102,179,194,217,217, 89,177,126,253,122, 36,231, 25, 48,110,253,255, 95, 89,168, 81,240, 24, -214, 70,131,200,200,150,220,253,251,247,191, 2,176,234,121,206, 99,199,142,245, 8, 11, 11,251,244,219,111,191,157, 0,171,234, - 10, 69,157,126,178,150,163, 31,156,126,116,115, 80, 60,170, 16,243,243,243,145,155,155,139,206,157, 59,171, 55,110,220,248, 25, -128,205,229, 57,151, 46, 93, 58, 65, 16, 4,153,179,179,179, 98,211,166, 77,136,207, 50,224,155,181,113, 40,212, 63, 40,167,149, - 66,130,161,173, 20,104,217,178, 37,159,146,146, 50, 10,192,207,207,242,121,122,122,250,248,249,249,109,216,180,105, 83,157, 69, -139, 22,229,222,186,117,171,196,205,205,109,220, 83,147, 25,102,206,156,153,179,126,253,250, 90,189,123,247,222,232,230,230,214, - 43, 53, 53,245,198,223,177, 31,217,218,218, 78, 29, 52,104, 16,126,252,241, 71,228,230,230, 46, 43, 91,127,203, 54,109,218,180, -182,127,255,254, 88,183,110,221, 84, 66,200, 1, 11, 90,177,222,238,214,173, 27,246,238,221,139, 63,254,248, 99, 10,165, 52,246, - 57,173,124,113,132,144,241,187,118,237,154,219,189,123,119,172, 94,189,186, 53,128,147, 47,240,182,108,211,166, 13,246,236,217, -131,156,156,156,103,118, 60,206,207,207, 95,185,123,247,238,208, 54,109,218, 96,230,204,153,111, 1, 56,106, 65, 61,231,107,107, -107,187, 98,241,226,197,218,192,192, 64,244,232,209, 67,111, 52, 26,223,251,234,171,175,182,111,217,178,197,106,221,186,117, 65, - 3, 6, 12, 56, 70, 8, 25, 76, 41,141,178,100, 93,242, 60, 63,121,233,210,165, 31, 71, 70, 70, 98,228,200,145,230,223,127,255, -189, 43,165,244, 16, 33,228,206,168, 81,163,126,158, 55,111, 30, 63,111,222,188,143,121,158,207, 18, 4, 97,226,223,177,189, 69, - 81,156, 57,127,254,252, 58,254,254,254,208,235,245,184,115,231, 14,210,210,210,126,204,200,200, 56,116,229,202,149,233,169,169, -169, 59, 93, 93, 93,251,142, 24, 49,194, 35, 56, 56, 88, 91,173, 90, 53, 59, 75, 90,208, 30,107,153,202, 4,112, 3, 64,104, 89, -203, 21, 0,132, 0,184, 93,246,183, 29,128, 60,139, 10, 75,184,171,183,226,147,189,236,173,108,144, 43,202, 17,159,156, 13,149, - 70, 3,142,114, 48,235,114, 81,171,186, 11, 68, 10, 20,100, 37,131,227,136, 69,183,145, 49,137,244, 66, 66, 98,186,187,157, 70, -137, 90,218, 14, 14, 23, 15,175, 94,101,231,211,108,136,132, 23,120,137,220,102,105,143,238, 31, 59,154, 5,138,162,220, 84, 16, -158, 63, 7, 6,227, 85, 5, 44, 65, 16,200,186,117,235,108, 50, 50, 50, 56, 95, 95,223,156,250,245,235, 23,203,229,114, 81,167, -211, 9, 74,165,210,172,209,104, 68,189, 94, 47,191,119,239,158,125,114,114, 50,255,240, 52,156, 37, 28, 61,122,220,213,167,118, - 96,198,171,116, 62,231, 8,210,172, 82, 73,132, 87,233,124,157, 16, 69, 81, 62,125,250,244, 70, 14, 14, 14,197,161,161,161,201, -225, 62,206,187, 83,138,113, 98,193,194,255,246,246,175, 91,109,189, 45,159,155, 87, 44,167,210,164,164, 36,215,219,183,111,171, - 41,165,178,242,156, 41, 41, 41,137, 0, 18,221,220,220, 86, 70, 70, 70, 14,234,216,177, 35,142, 28, 57,226, 92, 92, 92,236,172, -209, 60, 56,136,255,233,167,159,176,115,231,206, 37,105,105,105, 71, 44, 45,107, 84, 84,212, 42, 0,171, 26, 54,108,168,181,181, -181, 61, 98, 99, 99,195, 37,230, 23, 63,186,178, 80, 38,225,208,228,235,104,100,231,230, 65,202, 17, 40,149, 74, 15, 66, 8,247, -188,150,177,178, 31,249,239, 0,124, 23,218,174,255,187, 54,247,182,172,154,191, 96,129,226,225,145,105, 21,123, 25,242,242,242, -144,153,153,137,172,172, 44, 72, 36, 18,232,245,122,191, 23, 30, 34, 63,230, 12, 12, 12,108,225,232,232,184, 75,173, 86,243, 52, -171, 24,185, 69,198, 39, 78, 65,230,230,149, 66, 42,149, 66,163,209,248, 60,203,229,228,228,100, 37,147,201, 86,252,240,195, 15, -190,214,214,214,252,128, 1, 3,108, 7, 12, 24,208, 24, 64,227,103, 77,175, 86,171,249,213,171, 87,251, 52,104,208, 96, 69,205, -154, 53, 59,222,189,123,183,224, 47,108,185,226, 1,244,255,234,171,175,130,148, 74, 37,150, 46, 93, 26, 15,224,199,178,183,127, - 94,190,124,249,232,110,221,186,213, 30, 54,108, 88,221,113,227,198, 13, 37,132,124,251,162, 14,228, 50,153,172, 97,221,186,117, -177, 99,199, 14,224,193,105,193, 23,177,227,212,169, 83,115, 59,118,236, 8,149, 74,165, 45,175,209,165,106,213,170,216,181,107, - 23, 0, 92,122,206, 52,151, 98, 99, 99,209,185,115,103,112, 28, 87,221,130,101,239,248,246,219,111,111,156, 57,115,166,196,218, -218, 26,159,124,242,137,225,236,217,179,157, 41,165, 39, 8, 33,109,123,245,234,245,251,134, 13, 27, 52,199,142, 29,243,157, 62, -125,250, 31, 60,207,207, 21, 4, 97,114, 57,206,222,211,166, 77,251,234,189,247,222,195,228,201,147,233,143, 63,254,216,143, 82, -122,168,108, 31, 59, 72, 8,233,111,111,111,191,122,204,152, 49, 36, 63, 63,255, 43, 66, 72, 50,165,244,191,207,243, 21, 21, 21, - 21, 8,130, 80, 69,167,211, 89,212,103,203,210,233,125,124,124,222,246,247,247,199,174, 93,187,208,169, 83, 39, 28, 56,112, 0, - 18,137,100, 95, 82, 82,210, 49, 0,135, 0,192,205,205,205, 38, 46, 46,238,139,102,205,154,113,127,252,241,199,187, 0,214, 88, - 80,132, 4, 0,245, 0,252, 65, 41, 77, 42,187,112,178, 17, 30,220, 7,235, 6,165, 52,177,108, 58,127, 0,119, 45,170,235, 76, - 69,155, 14,237,217,222,188,245, 7,131,109,120,158, 64, 2, 25, 74, 10, 11, 0, 65,128, 79,245, 42, 8,173, 91, 5,151, 18,116, - 56,117, 96, 91,126, 73, 73,177, 69,183,151, 16, 76,197, 27, 14,253,190, 51, 34,164,117, 31, 27,133, 79, 93, 84,173, 50,188,254, -213,168,253,191, 42,229, 50,242,254, 7, 93,109, 91,132,214,194,161,203, 5, 56,125,104, 71,158,174, 56,111, 3,139, 12,140, 74, - 5,172,103,117, 46, 19, 69, 49,235,192,129, 3,234,241,227,199, 23,185,185,185, 73,138,138,138,184,199,251, 48,201,100, 50,184, -185,185,153,243,242,242,140, 7, 14, 28,240, 18, 69, 49,231,133,205,177,188, 34,237,251, 77, 75, 61, 5,162, 54,180,105,215, 73, -244,244,172,241,210, 78, 0,208, 27, 20, 89,219,247,237,176,107, 30,218, 84, 90,197,169,202,179, 42,251, 10, 59,255, 65,164,222, -190,125,219,105,250,244,233,151, 60, 60, 60,244, 0,224,168, 17,210,178,175,253,156,107, 85,163, 99,154, 84,161,128,179,179,115, -169,149,149,149,121,207,158, 61,111, 81, 74,211, 44, 21,219,219,219,127, 51,104,208, 32,238,248,241,227,253,123,245,234, 69,188, -188,188,112,225,194, 5,108,216,176,129,110,219,182,237,219,180,180,180, 74, 29,117, 43, 20,138,120,163,241,201, 91,223, 60,126, -101, 97,110,110, 46,184,194, 44, 8,130, 96,182,244,238,238, 66,230,165,168, 82,149, 10,245,170,253,255, 89,156,220,220, 92,100, -102,101, 61, 10, 88, 25, 25, 25,224,121, 94,111,105, 57,229,114,249, 61,131,193,240, 84, 57,197,199, 91, 74, 32,228,101,193,248, -244,194,148,145,149,149, 85,228,225,225,241,253,210,165, 75,103, 78,153, 50,197,121,225,194,133,185,177,177,177,133, 28,199,233, -159,250,158, 41,189,189,189,173,230,207,159,239,178,100,201,146, 92, 0,223,253,197,225,170, 83, 64, 64,192,202,246,237,219, 91, - 13, 30, 60, 24, 75,150, 44, 65, 90, 90,218, 4, 74,169,185,172,110, 16, 9, 33, 99,151, 47, 95,254,211,168, 81,163, 96, 52, 26, -103,238,217,179,103, 28, 33,228, 11, 74,233,143,207,114, 58, 59, 59,123, 72, 36, 18,196,196,196, 20, 82, 74,239,150, 19,106,211, -125,125,125, 51, 8, 33, 46,174,174,174, 94, 47,154,214,193,193,161,166,181,181, 53,146, 31,244, 11, 77,120,206,100,247, 83, 82, - 82,168, 92, 46, 39,110,110,110, 62,229, 45,191,157,157,221,151, 63,252,240,131,228,240,225,195,152, 56,113, 98,242,189,123,247, - 62, 41,187,141, 0, 40,165, 23, 9, 33,173, 91,180,104,177,118,212,168, 81,181,102,207,158, 77, 98, 99, 99, 7, 0,120, 97,192, -170, 94,189,122,255,126,253,250, 97,233,210,165, 88,177, 98,197, 48, 74,233,207, 79, 45,243, 54, 66,136,189,131,131,195,252, 65, -131, 6, 97,205,154, 53, 31, 1,120,110,192, 74, 75, 75, 27,247,209, 71, 31,141,206,205,205,157,107,201, 54,181,100,122, 15, 15, -143, 14, 61,123,246,116,161,148, 98,201,146, 37,233, 75,151, 46, 45,201,207,207,255, 49, 53, 53,245,216, 83, 45,113,187,246,237, -219,247,197,224,193,131,113,228,200,145, 5, 30, 30, 30, 52, 57, 57,121,109, 57,219, 52,141, 16, 82,147, 16, 82,135, 82,122,163, -236, 42,193,164,167,246,187, 90,101,211, 38, 91,178, 76, 89,177,135,247,184,212,107,127,250, 98,212,145,183,188,234, 69, 72, 93, -236,173,225, 81,219, 9, 14, 26, 25, 40,128, 43,247,116, 56,115,108,191, 41, 35,253,254, 25, 75,174, 32,124,232,116, 13,236,112, - 70,237,120,252,173,154,254,225, 18,175, 90,181,209,186, 73,125, 59, 71, 27, 41, 12, 38,138, 3, 23,243,113,250,216, 94, 83,102, - 70,210, 81,118, 5,225,159,203,155,214,193,189,220, 22,172,204,204,204,255,200,100,178,102,253,250,245,235, 22, 17, 17, 97, 61, -112,224,192, 12, 27, 27,155, 98,185, 92,206, 59, 56, 56,200, 41,165,242,253,251,247,187,167,165,165,217, 3,216,146,153,153,121, -236,169, 47,208, 19, 79,219, 30, 56,165,216,151, 16, 66, 60, 60,236,154, 73,182,124,214, 45, 34, 34, 66,243,178,206, 73,147, 64, - 39, 53,215,251,156,118, 37,227,179,243,246, 12,241,116,117,229,155,133,132, 75,173,212,154,178,144,224, 32, 23, 69,200, 42,226, -124, 69, 63, 90,127,137,211, 96, 48,188,117,231,206,157, 15,123,245,234, 53, 82,171,213, 94, 27, 51,102,204, 89, 59, 59, 59, 83, -217,145, 34, 12, 6,131,244,192,129, 3, 97, 73, 73, 73,254, 38,147,105, 62,128,173,150,150,243,218,181,107, 70, 0,195,221,221, -221,127,203,200,200,248,165, 91,183,110, 88,179,102, 13, 78,157, 58,213, 58, 37, 37,229,116,101,151,253,244,233,211,185,109,219, -182,213,221,184,113, 67,195,107,170,194,213, 94,134,182,227, 47,128,138, 20, 86, 74,138,226,194,124,152,114,114, 80, 82, 82,114, -221, 82,103, 76, 76, 76, 90,211,166, 77,245,119,239,222, 85,212,172, 89,243, 65,184, 42, 11, 86,153,153,153,200,201,201, 65, 65, - 65, 1,149, 74,165, 49,150, 58,163,163,163,227,219,180,105, 35, 36, 36, 36,240, 60,239,140, 42,118, 50,180, 28,253, 96,118,123, - 53, 80, 88,144, 15, 93, 86, 22,116, 58,221,115,157,201,201,201,219, 60, 60, 60, 0, 96,230,132, 9, 19, 28,219,182,109, 27, 23, - 21, 21,213,230,241,207, 9, 14, 14,254,113,202,148, 41,109,167, 79,159,158,189,110,221,186,113, 41, 41, 41, 91,254,202,125,201, -193,193,225,139, 61,123,246, 88, 25,141, 70, 44, 89,178, 4, 11, 22, 44, 88, 71, 41,221,249, 84,229,183,143,231,249, 21, 28,199, - 13, 26, 50,100, 8, 6, 13, 26,164, 14, 14, 14,254,226,177, 86,174, 39,156,201,201,201,147,131,130,130, 70,103,102,102, 90, 20, - 8,110,221,186, 53, 36, 40, 40,104, 84,102,102,230,194, 23, 45,187, 70,163,209, 8,130,128,248,248,248, 60, 74,105,193,115, 42, -106,189,175,175,111,138, 32, 8, 30, 26,141,198,190,188,253, 51, 47, 47,111,174, 86,171, 29,155,145,145,113, 8,192,108, 74,169, -254, 41,223,101, 66, 72,240,176, 97,195, 62,155, 57,115,230, 59,233,233,233,219,203,115,222,187,119,111,110,139, 22, 45,190,185, -121,243,230, 70, 74,233,170,231,148,243,123, 66,136,113,227,198,141, 3,226,227,227,231,189,200,153,148,148,180, 23,192, 94, 75, -183,239,243,166,127,106,187,143, 24, 58,116, 40,246,238,221,139,162,162,162,111,147,147,147, 23, 60,199, 21,229,229,229,245, 91, -227,198,141, 59,204,157, 59, 87,214,190,125,251, 1, 0,214, 90,176,127,158, 5,208,168,172, 31,220, 77, 0, 15, 15,108,237,241, -224,150, 13, 4,207,185, 58,243,121, 78, 74,117,125, 46, 28,223,177, 54,241,246,165, 48,109,100,103,187,252, 18, 79,200, 36, 28, -138,114, 83,113,250,224,207,121, 41,201,119,206, 26,141,197,125, 42,226, 20,132,146,143, 47,157,216,177, 46, 45,225, 90,104, 73, -147,246,118,121,133,213, 33,147, 16,228,101, 37,225,236,145, 93,185,169,137,241, 39, 77, 66,233,160,191,179,158,255,183, 56,255, - 85, 1,171,236,116,201, 81,173, 86,123,234,200,145, 35,109, 79,158, 60,249, 78,203,150, 45, 51,194,195,195,139,206,159, 63, 95, - 61, 62, 62,222, 5,192,110, 23, 23,151,125, 49, 49, 49, 22,221, 57,249, 85, 59,203,124,102,128, 76,154,252,185,211,220,164,203, - 89, 11, 82, 51,182,119,245,169,238, 69, 0,144,152,152, 11,213,227,227,227,157, 43, 90,206,127, 80,234,167, 0,126, 36,132,236, - 56,123,246,236,128,247,223,127,127, 80,203,150, 45,207, 82, 74,201,169, 83,167,180,247,238,221, 11, 19, 4, 97,149, 40,138,131, - 42,243,152,156,135,167, 92,100, 50, 25,245,245,245, 37, 42,149, 10, 10,133,226,250,203,150, 59, 47, 47,111,228,252,249,243,151, - 79,159,179,132,255,252,109, 91,100,101,103, 35, 59, 59, 27,185, 57, 57,144, 65,135,139,215,174, 10, 69, 69, 69, 35, 43,226, 52, - 26,141, 99,198,143, 31, 63,119,222,188,121,154,194,194,194, 71, 1, 43, 39, 39, 7, 58,157, 14, 71,142, 28, 41, 53, 26,141,227, - 42,226, 44, 40, 40,152, 48,119,238,220, 25, 67, 71,142,229, 6, 68, 72,145, 87,160, 67, 94, 94, 30,138, 10, 11,161, 32, 58, 68, - 93,189, 42, 24, 12,134,175, 95,228, 40, 11, 89, 52, 49, 49,113, 92, 97, 97,225,237,103,124, 70,218,144, 33, 67, 82, 79,157, 58, - 53, 53, 41, 41,105,243, 95,189, 15,229,228,228,204,105,212,168,209,236,204,204,204,120,163,209,248, 51,165,244,153,101, 16, 4, - 97, 4, 33,228,236,178,101,203,186, 56, 57, 57,185,164,165,165,205,127,193,126, 89,161, 64, 96,233,244,247,239,223,159,160,213, -106,191,206,200,200,152, 95, 78, 96,251,178,108,186,133, 22,124,246, 62, 0,251,202,153,198,140, 7,183,168, 88,106,225,242,252, - 10,224, 87, 11,166, 91, 13, 96,245,223, 81,119,228,230,230,206,235,216,177,227,248,244,244,244,163,105,105,105,139, 95, 52,173, -201,100,234, 51,104,208,160,241,174,174,174, 97, 25, 25, 25, 75, 44, 92, 7,102, 0, 39,202, 30,149,227, 13,224,225, 85,120,121, - 0, 18, 42,243,168,156,178, 59,180,127,224,228,215,170,253,193,237,139,123, 65, 16, 2, 1, 2, 78,202, 95,214,151, 20,111,176, -180,229,234, 25,206,247,157,252, 90,181,207, 73, 79,232, 45, 10, 66, 32, 71, 32, 18,158,191, 82,170, 47, 94,147,113,237, 32,123, - 84, 14,163,114, 33,180, 34,207,194,117,119,119, 87, 73,165,210,247, 40,165,161,162, 40, 70,137,162,184, 51, 37, 37, 69,247, 50, - 9,247,213, 59, 9,249,178,151,170,138,149, 10,223, 91,169, 16,176,108,135,253,120,179, 89,220,241,178,229,252,167, 28, 49, 16, - 66, 52, 50,153,108,164, 40,138, 61, 68, 81,220, 36,138,226,252, 23,221, 91,200,210,114,214,170, 85,107,121,139, 22, 45,122,253, -254,251,239, 43,239,221,187, 55,242, 85, 44,123, 68, 68,196,154,170, 85,171,190, 31, 25, 25,201, 43,149, 74,164,166,166, 34, 39, - 39, 7, 55,111,222, 52,103,103,103,207, 56,113,226,196,236, 74, 56,255, 43,151,203,223,233,212,169,147, 90, 38,147, 33, 39, 39, - 7,249,249,249,244,196,137, 19, 6,142,227, 70,159, 58,117,106,101, 5,215, 39,137,136,136,248,185,106,213,170,111,133,135,135, -243, 50,153, 12,185,185,185,200,206,206,198,141, 27, 55,132,204,204,204,255,156, 57,115,230,123, 75,156, 62, 62, 62,242,184,184, -184,103,246,137,209,106,181,210,231,133,127,118,148,204,156,204,201,156,255,182, 22, 44, 66,200, 64, 74,233,202, 55,182, 5,235, -105,202, 66,202, 38,188,196,243,169,254,124, 39,165, 11, 55, 32, 13, 32,239, 78,158, 12,114, 63, 81,247,224,130,248,127, 9,101, - 97,106, 50,202,233, 35, 82, 81,110,223,190, 61,216,221,221,253,171, 23, 5,213,138,114,252,248,241,190, 65, 65, 65, 91,147,146, -146,198,169, 84,170, 58,130, 32,152, 13, 6,195, 69,131,193, 48,246,236,217,179,231, 43,233, 28, 16, 20, 20,244,211,206,157, 59, -135, 11,130,224,207,113, 92, 41,165, 52,134, 82, 58,245,212,169, 83,177,149,108, 33,236, 28, 20, 20,212, 57, 57, 57,249,107,133, - 66, 81, 91, 20, 69, 83,105,105,233, 57,131,193,240,159,179,103,207, 90,236,124, 94,184, 2, 30,220, 34,131, 29,239, 49, 24, 12, -198,155,131,228,205, 93, 52, 74, 39, 78, 4,197, 68,182,145, 95,113, 24,126,165,156, 63,127,254,119, 0,191,191, 98,231,126, 0, -251, 95,177,115, 7, 44,188, 35, 54,131,193, 96, 48, 24, 28, 91, 5, 12, 6,131,193, 96, 48, 24,175, 22, 2, 32,224, 89,111, 84, -228,220, 42, 33, 36,160,162, 31,108, 65,223, 23,230,100, 78,230,100, 78,230,100, 78,230,124,195,156,143,185,167, 60,231,173,228, - 50,207, 63,186, 15, 22,249, 51,187, 39,177, 14,128,204,201,156,204,201,156,204,201,156,204,249,111,132,157, 34,100, 48, 24, 12, - 6,131,193, 96, 1,139,193, 96, 48, 24, 12, 6,131, 5, 44, 6,131,193, 96, 48, 24, 12, 22,176, 24, 12, 6,131,193, 96, 48, 24, - 44, 96, 49, 24, 12, 6,131,193, 96,188, 54,144,127,209, 77,206, 25, 12, 6,131,193, 96, 48,254, 18,158,104,193, 34,132,176,180, -197, 96, 48, 24, 12, 6,227, 47,231, 77,203, 32,236, 20, 33,131,193, 96, 48, 24, 12, 6, 11, 88, 12, 6,131,193, 96, 48, 24,255, -128,128,197, 78, 13, 50, 24, 12, 6,131,193,248, 59,120, 83, 51,200,195, 22,172,200,178, 5,140,100,155,154,193, 96, 48, 24, 12, -198, 95,200, 27,153, 65,216, 85,132, 12, 6,131,193, 96, 48, 24,175, 24,214, 7,139,193, 96, 48, 24, 12, 6,227,159, 20,176, 8, - 33, 1,204,201,156,204,201,156,204,201,156,204,201,156, 44, 96, 49, 24, 12, 6,131,193, 96, 48, 88,192, 98, 48, 24, 12, 6,131, -193, 96, 1,139,193, 96, 48, 24, 12, 6,131, 5, 44, 6,131,193, 96, 48, 24, 12, 6, 11, 88, 12, 6,131,193, 96, 48, 24,127, 19, - 4,192, 51,175, 4,160,148, 94,177, 88, 82,137,171, 9,202,243, 51, 39,115, 50, 39,115, 50, 39,115, 50,231,155,231, 44,207, 93, -145,252,241, 90, 7,172, 63,243, 70,163,132,144,128, 87,189,162,152,147, 57,153,147, 57,153,147, 57,153,243,205,115,190,105, 72, -216, 42, 96, 48,254,225,108, 39, 60,156,234,214, 0,161,174, 32,178,116, 28,185,116, 23, 19,169,248,210, 78,215,122,213, 96, 48, -185, 64,165,202,194,129, 11,241, 47,237,100, 48, 24, 12, 22,176, 24, 12,198, 63, 6, 79,255, 90, 48,137, 83, 0,184, 2,134, 59, -104, 22, 48, 15,192,181,151,114,186,248,215,130, 40, 78,132,140,243,128,177,244, 54, 90,212,157, 7, 32,150,173,108, 6,131,193, -176,140,191,165,147,123,112,112,240,201,144,144,144, 9,145,145,145, 10,182, 9, 24,140,151,224, 74,160, 26, 38,211,219,165, 70, -209,125,223,169, 28,231, 98,189, 80, 27,156,177, 13, 98,253, 53, 47,229,228,196, 86,122,163, 80,117,195,193, 98,151, 34,189,185, - 14, 68,225,229,156,101, 52,104,208,192, 54, 52, 52,116,151, 86,171,117,100, 27,143,193, 96,176,128,245,138,161,148, 54,112,113, -113, 25,170,211,233,110, 4, 5, 5,117,248, 55,173,240,176,176,176, 63, 26, 55,110,156, 16, 30, 30,158, 16, 30, 30,126,170,188, -241,111, 42,193,193,193, 13,154, 54,109,186,215,223,255,193,143,118,224,103, 59,157,131,250,239,247, 14,251, 98,159, 7,251, 90, - 86,128, 66,234, 2,240,205, 99,227, 75, 84,233,185,102,151,152, 27,197, 86,160,124, 51,100,139,174, 47,229, 20, 73,243, 11,113, -122,245,233, 59,206, 46, 39,175,150, 90, 3,124,243,151,114,150, 33,145, 72, 6, 0,104,201,243,252, 16,182,241,254,221, 16, 66, -252, 9, 33, 29, 8, 33,218, 87,232,156, 86,183,110,221, 56, 66,200,231,108, 13, 51,254, 49, 1,171,139, 55,105,220,195,155,252, -222,173, 38,201,232,238, 77, 50,122,122,147,131, 93,106,147,166,149,253,224,159,126,250, 73,181,126,253,122,231,128,128,128,181, - 97, 97, 97, 7,195,194,194,124, 42,227, 9, 13, 13,221, 21, 28, 28,252,254,211,227,180, 90,109,151,167,198,157, 11, 13, 13, 77, - 11, 9, 9,185,106,137, 87,171,213, 94,214,106,181,153,193,193,193,151,159, 26,223, 37, 52, 52,116,215, 83, 97,225,253,167,199, - 61, 15,158,231, 61,118,239,222,237,252,219,111,191, 57, 75,165, 82,151,167,199,255,250,235,175, 79,140,175, 40, 33, 33, 33,125, - 67, 66, 66,254,120,124, 92, 80, 80, 80,159,167,199,149,179,236,127, 4, 5, 5,245,121,202,251, 71, 72, 72, 72,223, 87, 20, 50, -131,228,114,249,239, 70,163,177,169, 70,163, 81, 3,128,196,164,178, 22,101,146, 46, 70, 42,105, 24,248,245, 1,103,246,213,180, -128, 88,127, 25, 68,115, 19, 65,164, 78, 87,227,245,206,237, 58,118,145, 92,186,173,115, 50, 9,130, 61, 68, 52,195,209, 26,138, - 74, 57, 5, 67,184, 64, 69,151, 67, 23,164,206,145, 29,134,240,135,175, 72,157, 76,130,224, 0, 65,108, 90, 41,231,255,239, 87, - 82,158,231,191, 24, 56,112, 32, 71, 8,249,212,199,199, 71,254,111,218, 92,141,235, 19,247,183,130, 37,199, 66,234,145,198,175, - 48, 80,212,181,178,178, 58, 65, 8,169,245, 15, 11, 87, 13, 0,168, 41,165,191, 1,112, 33,132, 72, 94,129,115,246,148, 41, 83, -190,188,124,249,178, 91,205,154, 53,199, 17, 66,120, 86, 73, 48, 94,251,128,245,145, 23, 25,235,230,234,241,203,216,133,155,154, -254,247,232, 93,205,183,187,207,107, 70,142,154,209,216,205,214,121, 71, 79,111, 50,245,121,243,189,232, 10, 3,185, 92,142, 59, -119,238, 96,233,210,165,202, 73,147, 38, 53,178,178,178, 58, 27, 22, 22, 54,231, 97,139,134,165, 78, 74,105, 35,153, 76,182, 60, - 44, 44,108,197, 99, 21,118, 35,165, 82,185, 44, 44, 44,108,213,195,211,144, 90,173,182, 70, 84, 84,148, 53, 33,196,197,146,114, -134,134,134,186,198,196,196,168, 9, 33,174, 0, 16, 25, 25,169, 8, 13, 13,253,193,211,211,115, 41,128, 70, 0,224,227,227, 35, - 15, 11, 11, 91, 81,181,106,213,111, 9, 33,141, 44, 89,118,142,227, 96,103,103,135, 77,155, 54,129,227,184,199, 43, 7,216,217, -217, 97,227,198,141, 32,132, 84,120,125,250,251,251,107, 66, 67, 67, 55,185,185,185,205, 17, 69, 49, 12, 0, 2, 3, 3,213,161, -161,161, 27, 61, 61, 61,231, 62, 28,103,161, 51, 76,161, 80,204, 9, 13, 13,221, 24, 24, 24,168, 6, 0, 81, 20,195,164, 82,233, -236,208,208,208, 77, 21,221, 70,205,155, 55, 31,220,168, 81,163,220,144,144,144,194,136,136,136,141, 60,207,239,157, 62,125,186, - 90,169, 84, 26,204,246,213, 53,218, 65,135,170,202,164,114, 51, 37, 92, 41, 21, 48, 69, 90, 40,179,247,249, 98,159,220,210,101, -175, 44,255,120,103, 38,239, 12,130, 22, 55,239,233,148, 94,181,130,213, 46,126, 93,224,108, 39, 85,156,185, 94,108, 5, 9,137, - 4,167,113,170,148, 19,210, 22, 87,239,232, 84, 14,222,237, 84, 33,141,155, 1,234, 90,138,163, 23,139,173, 33,225, 43,231,252, -255,247,223, 11, 15, 15,151,181,106,213, 10,238,238,238,156,141,141,205, 71,111,252, 54,122, 44, 92, 89, 41,228, 71,231, 79,249, - 50,200,213, 65,189,213,146,144,101,193,229,243,117, 93, 92, 92,246, 45, 91,182,172,161,181,181,245, 1, 75, 66,214,235,176, 62, -203,194,149,140, 82, 26,245, 48,214, 3, 8,127, 73,231,236, 73,147, 38, 13, 25, 61,122, 52, 10, 11, 11,209,167, 79, 31,107, 0, - 51, 43,227,236,218,181, 43,223,181,107, 87,254, 95, 81,135,188,102,206,114,144, 3,104, 1,160, 3,128,183, 0,132,150,253, 29, - 82, 54,116, 0,208,234,169,215,144,135,109, 4,101,255,135, 61,199,209,225, 25,243,133, 60, 54,254,241,255,159,254,251,197, 1, -139, 16, 66, 31,127,125, 98,103,243, 33,141,156,220, 60,190,156,181, 35, 90, 37,222,186,136,243,159,180,196,141, 97,239, 65,117, -251, 34, 70, 13,253, 70,101, 99, 99,247,105, 87, 31,210,172, 50,107,235,214,173, 91,216,188,121, 51,156,156,156,200,170, 85,171, - 20, 31,126,248,225, 0, 27, 27,155, 91,193,193,193, 31, 89,234,224, 56, 78, 92,189,122,181,230,221,119,223,237,226,224,224, 16, - 29, 18, 18,226,197,113,156,184,110,221, 58, 77,183,110,221, 58, 27, 12,134,152,176,176, 48,159,243,231,207, 11,209,209,209,224, -121,203, 14,106, 98, 98, 98,132,189,123,247, 62,108,113,241, 1, 16, 51,107,214,172, 46, 59,118,236,176,178,177,177,161, 33, 33, - 33, 94, 85,171, 86,141,158, 51,103,206, 71, 63,253,244,147,149,181,181, 53,181,176, 34,128, 94,175,135, 82,169,124, 34, 72, 61, - 28,175, 80, 40,158, 27,176, 94,208,106, 85,215,209,209,241,252,204,153, 51, 59,238,220,185, 83,101,109,109,141, 70,141, 26,213, -177,179,179,187, 48,119,238,220, 78,187,118,237, 82, 89, 91, 91, 91,236,147,201,100,216,176, 97,131,186, 71,143, 30, 29, 20, 10, -197,249, 70,141, 26,213,145,201,100,216,180,105,147,186, 71,143, 30,237,212,106,117, 76, 72, 72, 72, 93, 75,125,130, 32,140, 90, -184,112,161,124,235,214,173,124,245,234,213, 91, 79,159, 62, 93,173,213,106, 9,165, 20, 84, 94,203,214, 44,161, 93,244,156,217, -131, 55, 24,127,229, 64,210, 5,137,177,167,157,192,179, 86,172, 23,177,157,240, 32,198, 6, 0,241,142,185, 85,226,216, 32,162, -167, 4, 25,191, 32,212,207, 74,114, 56,166,208,133,138,168, 6,193, 28,140,163,145,146, 10, 57,101,166, 64,112,212,231,192, 69, -206, 49,188, 85, 79,201,253,251,247,225, 85, 55,146,223, 29, 13, 23, 74, 81, 3, 68, 8,170,144,243,201,253,106, 76,215,174, 93, - 53, 9, 9, 9, 8, 15, 15, 87, 43, 20,138,209,175,164, 21,239,180, 95, 53, 28,247,139,192, 9, 63,215,202,150,237,207,110,185, -178, 82,200,143,108,218,240,163, 91, 96, 68,127,178,226,203,234,246,142, 86,178,173, 47,211,146, 85, 22,174,246,158, 61,123,214, -225,237,183,223,198,164, 73,147,156,108,108,108, 14,188,238, 45, 89,143,135, 43, 66,136,170,236,244, 96, 10, 0,143,151,112,206, -157, 52,105,210,144, 49, 99,198,224,204,153, 51,152, 51,103, 14,218,181,107, 7, 59, 59,187, 80, 75, 29,193,193,193, 33,205,155, - 55,223,220,188,121,243,212,196,196,196,130,123,247,238, 21, 68, 68, 68,164, 54,111,222,124,115,112,112,112,200,203, 44,114,217, -192,120,241, 54,124,110, 6,121,140,250,163, 71,143, 14, 37,132,252, 58,122,244,232, 96, 0, 78,132,144, 95, 1, 56, 3,112, 46, -251, 91,254,212,171,115, 89,104,122,248,190,227,179, 28, 15,135,167,230,115,126,108,252,227,159,241,244,223,229,183, 96, 17, 66, -154, 3, 56,246,244, 4, 82, 17,227, 7,141,152,170,140, 95,187, 0,169, 27, 22,130,100, 37,131,207, 75, 67,233,177, 95, 96, 58, -254, 11,122, 55, 14, 87,169, 64, 38, 86,102,165, 90, 89, 89, 65, 38,147,225,214,173, 91,184,126,253, 58,218,181,107, 39, 91,178, -100,137,109, 64, 64,192,178, 38, 77,154,156, 9, 11, 11, 11,176, 96,195,160,118,237,218,232,214,173,155,124,216,176, 97, 53,229, -114,249, 41, 74,169,196,203,203, 11, 31,126,248,161,108,212,168, 81,213,229,114,249, 9, 81, 20,101,106,181,218,226,240, 66, 8, -129, 90,173, 6, 0,169,183,183,247,201,205,155, 55,215,104,210,164,137,100,255,254,253, 40, 44, 44,228,107,213,170,117,102,243, -230,205,222,141, 27, 55,150,156, 56,113, 2, 58,157,206,226,128, 85, 92, 92,252,204,128, 85, 84, 84,244, 63,227, 45, 8, 87,125, -107,214,172,121,124,203,150, 45, 30, 77,155, 54,229, 15, 31, 62,140,194,194, 66,120,122,122,158,216,178,101,139, 71,120,120, 56, -127,234,212, 41, 20, 22, 22, 86, 40, 96,149,173, 63,233,200,145, 35, 61,120,158, 63, 46,147,201, 80,189,122,117,124,248,225,135, -178, 17, 35, 70,120,200,100,178,163,150,158, 50, 20, 4, 65,238,236,236, 12, 91, 91, 91,244,239,223, 95, 93,167, 78, 29, 98, 54, -155, 65, 41,133,220, 88,108, 36, 34,173, 77, 8,247, 62,225,121,163, 0,178,145, 80, 62, 66, 52, 75,100,172,218,121, 1, 54, 1, - 14,224, 73,203,123,169,165, 10,165,166,170,149,198,169, 14,144,115, 12, 53, 61, 20, 32,132, 83, 68,197, 22,105,192,147,150, 16, -178, 29, 42,228, 20,208,242,110,114,169,194,168,170,167,113,247,168,134,172,172, 44, 84,245,242,131,158,115,150,159,186, 90,164, - 1,173,160,179, 12,173, 86,219,164,106,213,170,174, 53,106,212, 64, 86, 86, 22,106,213,170, 5, 43, 43, 43,187,134, 13, 27,182, -172,244, 58, 56, 90, 67,129, 2,174, 17, 4,204, 4, 48, 14,224,166,128,100, 53,192,121,173,244,117, 11, 87,155, 55,254,232,238, -232, 86, 7,184,210, 31, 85, 28,228, 88, 53,186,190,189,163,149,162, 82, 33,139, 16, 82,183, 74,149, 42,123,207,158, 61,235,168, - 84, 42, 17, 19, 19, 3,127,127,127, 44, 88,176,192,201,206,206,238,181, 13, 89, 79,133, 43,123, 74,169, 14,128, 8,160, 43, 42, -113,213, 43,121,192,130,169, 83,167, 14, 30, 51,102, 12, 78,159, 62, 13, 15, 15, 15,100,100,100,160, 89,179,102,247,243,242,242, -102, 91,210, 90,213,172, 89,179,111,237,237,237,127, 29, 48, 96, 64,199, 77,155, 54,217,236,220,185,147, 52,111,222,156, 84,171, - 86,205,102,192,128, 1, 29,237,237,237,127,109,214,172,217,183,150,182,106,149, 33, 1,160, 4,160,126, 56,220,185,115, 71,238, -227,227, 35, 39,132, 40,203,194,165,130, 16,194,158,166, 82, 78, 6,121, 12,167, 89,179,102,205,160,148,118,156, 53,107,214,140, -199,230,251,245, 5,206,199, 67, 19, 0,224,105, 7,165,180,227,227,175,143,207, 75, 41,237, 72, 41,237,248,248,252, 47,250,188, -231, 6, 44, 0, 71, 40,165,205,255,167, 25,144, 32,192,181,102, 29,228, 29,216, 6, 21, 79,158, 24,184,187, 87, 80, 85, 41,129, -153,210,186,149, 89,161, 86, 86, 86,143, 6,142,227,144,154,154, 10,158,231, 49, 97,194, 4,229,144, 33, 67,234, 73, 36,146,195, -205,155, 55,159, 82, 94, 96, 1,128,168,168, 40,212,170, 85,139,140, 25, 51,198,186, 89,179,102, 18, 0,184,116,233, 18,124,124, -124,200,180,105,211,172, 58,117,234, 68, 42, 18,176, 56,142,131, 82,169, 68,100,100, 36, 89,179,102,141, 70,161, 80,224,183,223, -126, 67, 86, 86, 22,222,126,251,109,201,154, 53,107, 52, 74,165, 18, 71,143, 30, 69,126,126,126,133,130, 91,105,105, 41,158, 46, -203,243, 90,182, 94, 68,147, 38, 77,190,115,117,117,157,179,126,253,122,133, 74,165,194,225,195,135,145,159,159,143,238,221,187, -155, 55,110,220,168,180,177,177,193,169, 83,167,144,159,159, 95,169, 29,254,177,117,170, 10, 15, 15, 55, 1,192,133, 11, 23,224, -235,235, 75,198,140, 25,163,178,177,177,153, 29, 17, 17,241,157, 5, 77,201, 40, 41, 41,129, 94,175,199,237,219,183,145,147,147, -131,164,164, 36,136,162, 8,130,140, 66, 81, 38,221, 74, 68,225,125, 94,170, 80, 72, 56, 18, 11, 2, 63, 42, 17,101,100,242,100, - 86,249, 60,111, 39,146,149,214,130, 72, 26,156,190, 86,100,223,244,237, 30, 50,100,238, 5,168, 9, 32, 18,180, 8,243,148,252, -114,170,196, 5,148, 4, 64, 69,124, 1, 11,118, 40, 66, 8,164, 6, 31, 80, 18,116, 32,198,236,208,180,205,103,178,164,164, 36, -200,100, 50, 40, 20, 10, 4, 53,254, 64,178,249,136,201, 21, 64, 32,148,164,182, 69,206, 39, 67,251, 55,253,250,245, 83, 39, 39, - 39, 63,114,182,107,215, 78, 99,101,101, 53,166,210,225,138,183, 10,133, 89, 24,114,245,174,174,218,180,245,169,117,226,146,116, -190,224,232, 23, 48, 8,245, 95, 54,100,121,121,121, 69,212,169, 83,231,154,183,183,119,248,203,132, 43,107,133,252,240,150,141, - 63,186, 59,184, 62, 8, 87, 16, 74, 0, 94, 5, 87, 23,123,172,154, 24,105,239,104,173,170, 80,200, 42, 11, 87,123,206,156, 57, -227,168, 84, 42,113,238,220, 57,200,229,114, 40,149, 74, 4, 6, 6, 98,229,202,149, 78,246,246,246,175, 69,200, 34,132,216, 17, - 66, 90, 17, 66, 58, 19, 66,222,123, 44, 92,213, 0, 16, 73, 8,105, 9,160, 10,128, 19,148,210,203, 22, 58,195, 37, 18,201,207, - 13, 26, 52,184, 35,145, 72, 98,102,204,152, 49,104,212,168, 81, 88,188,120, 49, 34, 35, 35,239,126,243,205, 55,184,113,227,134, -185,184,184,184, 43,165,116,111,121,190,148,148,148,113,222,222,222, 93,118,238,220,169,169, 94,189, 58, 87, 92, 92,140, 3, 7, - 14, 96,238,220,185, 40, 45, 45,133,167,167, 39,183,115,231, 78,141,183,183,119,151,148,148,148,113, 22,148,207,201,201,201,169, - 22, 30,156,206, 82, 0, 80, 1, 80, 39, 36, 36,104, 14, 31, 62,108,223,160, 65, 3, 59, 43, 43, 43,245,184,113,227,220,135, 13, - 27,214,177,188, 22,144,127, 25,207,204, 32,207, 9, 77,143,255,190,116,124, 94,232,121,248,222,179,194, 83,101, 11,249,162,207, -123, 81,192,138, 36,132, 28,125,214, 68,198,112,179,214,203, 0, 0, 32, 0, 73, 68, 65, 84,156,116, 40, 32, 64,205, 19,168, 36, -228,193, 43, 79,160, 34, 34, 36,185,233, 21,172,106,159, 12, 88,214,214,214,176,182,182,126, 34,104,233,116, 58, 20, 23, 23, 63, -209, 71,233,121, 60, 60,229,103,111,111,143,194,194, 66,152,205,102, 60, 60, 29,230,224,224,128,210,210, 82, 16, 66,160,209,104, -160,209,104, 42, 28,176, 0,224,244,233,211, 56,121,242, 36, 36, 18, 9, 28, 28, 30, 28,188,159, 59,119, 14,151, 47, 95,134, 92, - 46,135,163,163, 99,133,188, 6,131, 1, 74,165,242,127,250, 96, 25, 12, 6, 40, 20, 10,139, 79, 99,114, 28, 7,189, 94, 79,207, -157, 59,135, 43, 87,174, 64,161, 80,192,217,217, 25, 50,153, 12,137,137,137,136,141,141,133, 92, 46,135,179,115,229,190,195, 54, - 54, 54,200,203,203,131, 40,138, 80,169, 84,143,198, 21, 21, 21,129,227, 56,139,182,207, 67, 46, 92,184,128,211,167, 79, 35, 62, - 62, 30,151, 46, 93,194,141, 27, 55,240,196, 83, 4,104, 89, 51,186, 73, 52, 81,128,227, 77, 60, 55, 9, 19, 89,149,243,204,106, -168,190, 13, 56,201, 91,153,121, 38, 69, 86,145,220,166,138,207, 91, 64,214, 94,128,240,128,212, 14,141, 26,214,196,253, 52, 65, -125, 35,169, 84, 9,163,208, 26,251,235,218, 89,228,148, 72, 90,102,228,153, 20,241,249,206,214,117, 3,180,200,200,200,128, 66, -161,128, 66,161, 64,112,216, 91,184,147, 38,170,174, 38,232,212, 16,197, 86, 22, 57,255,191,245,170,166, 82,169, 12, 13, 10, 10, - 34,233,233,233, 80, 40, 20, 80, 42,149,104,220,184, 49, 56,142,171,167,213,106,125, 43,180,252,119,124,228,144, 89,133, 0,194, -144,235,119, 75,220,118,157,212,213,122,231,157, 15,236, 23,109,207,244,189,158,160,175, 1,179,113, 24, 10, 77, 13, 43, 27,178, -188,188,188,154,170,213,234,159,198,141, 27, 87, 67, 42,149,238,168, 89,179,102,147,202,120,212, 10,126,201,216, 97,221,221,237, - 31,134, 43,115, 49,192,171, 0, 94,253, 32,100, 85,113,194,180, 97,173,236, 85, 82,217,102, 75,157, 42,149,106,237,178,101,203, -156, 30,134, 43,153, 76, 6,165, 82,249,104, 8, 10, 10,194,196,137, 19,157,236,237,237,215,252,205,225,202, 30, 64, 19, 0, 87, - 0,236, 4,112,248,177,112,229, 13, 96, 87, 89,171,213, 69, 74,233,125, 11,157,141,218,182,109,187,247,206,157, 59,109, 46, 94, -188,232,154,150,150,230, 59,114,228, 72, 44, 90,180, 8,163, 70,141,218, 74, 41,109,176,109,219,182,198, 81, 81, 81,161,148,210, -107, 22,214,161,159,244,236,217, 83,173, 82,169,160, 84, 42,177,126,253,122,124,246,217,103, 80, 40, 30, 92,203,161, 86,171,161, - 82,169,208,179,103, 79, 53, 33,164,159, 5,202,156,130,130, 2,171,206,157, 59, 87, 45,107,185,210, 24, 12, 6,171,172,172, 44, - 27,142,227,108,235,213,171,231, 50,113,226, 68,223,162,162,162,250,187,119,239,206, 0,144,197, 42,180,242, 51,200,211, 1,199, -146,113,149,157,222,210,144, 85,161,128, 69, 41, 61, 10,160,217, 51, 38,184,114, 63,250, 40, 28,252,131,158,108,193,146, 16,168, -173,109,112, 55, 57, 17, 82,144,235,149, 40,224, 19, 45, 88, 15,135,212,212, 84,124,243,205, 55, 37, 27, 54,108,184,106, 52, 26, - 91, 28, 61,122,116,130, 37, 45, 88, 46, 46, 46,184,127,255, 62,157, 59,119,110,225,190,125,251,204, 15,199, 37, 38, 38,210,241, -227,199, 23,253,248,227,143,180,162,167, 8, 85, 42, 21,142, 30, 61, 74, 39, 76,152, 80,144,156,156, 76, 29, 28, 28,224,232,232, -136, 67,135, 14,153, 71,143, 30, 93, 16, 23, 23, 71, 29, 28, 28,224,224,224, 80, 33,175, 32, 8, 80,169, 84, 79,204,195,113, 28, - 76, 38,211,255,140,127, 17,199,143, 31,255, 44, 63, 63,127,212,215, 95,127,173,187,118,237, 26,117,118,118,134,179,179, 51,214, -174, 93, 43,233,211,167,143,238,210,165, 75,143,198, 85, 6, 39, 39, 39,220,184,113,131,206,156, 57, 83,119,240,224, 65, 41, 0, - 56, 59, 59,227,198,141, 27,116,234,212,169,186,188,188,188, 81,199,143, 31,255,204,146,109,157,147,147,131,172,172, 44, 36, 37, - 37, 33, 43, 43, 11,217,217,217, 16, 69, 17, 20, 46,214,156,209,244, 33,120,110,135, 96, 42, 45, 53, 73, 72,109,128,222, 21, 68, -163, 97,226, 68,176, 59,135, 63, 11,185, 80, 5,160,141, 79, 92, 46,178,109,221,254, 35, 57, 41,136, 2, 76, 69,128,212, 30,144, -218, 67,162,116, 68,219,150, 13,249, 53,251, 11,170,128, 32, 12,182,242,242,251,183, 72, 69, 23, 80, 49,252,224,121,189, 93,211, -118, 67,229, 57, 57, 57,224, 56,238, 81,192, 82,107, 52,104,213,190, 39,183,250,128,190, 10, 68,218, 8, 42, 98,113,159, 25,153, - 76,246,101,191,126,253,100, 79, 59, 85, 42, 21,222,125,247, 93,133, 70,163, 25,101,241,178,199,250,203,144,161, 10,129, 40, 12, -185,145,160,115,219,121, 74, 87,107,228,196,213,170,122,245,195,240,233, 59,206,170,153, 27, 50,253, 46,222, 41,169, 1,137,121, - 40,138, 76, 65, 88, 89,177,144, 85,179,102,205, 38,106,181,250,231,157, 59,119,170, 91,180,104,129,175,190,250, 74, 35,147,201, -118,120,121,121, 85,248,138,105, 93,161, 48, 98,234,162,245, 25,151,182,182, 5,204,133,101,225,234,255,135,140,124, 17,227,151, - 29, 46, 48, 80,177,143,197, 78,157,110, 64,255,254,253,115,126,250,233,167,255, 9, 87, 74,165, 18,241,241,241,152, 54,109, 90, -110,110,110,238,192,191,121, 47,173, 15,224, 18, 0, 61,128,166, 0,212,101, 87, 10,134,150,133, 45,129, 82,154, 65, 41, 77,179, - 84,200,243,252,136,229,203,151, 75,116, 58, 29, 6, 12, 24,128,196,196, 68,164,164,164, 96,236,216,177, 9,162, 40, 14, 40,115, - 94,166,148,222,180,212, 89, 92, 92,252,233,148, 41, 83,116,201,201,201, 8, 8, 8, 64, 70, 70, 6,218,183,111,143, 14, 29, 58, - 64,173, 86, 35, 48, 48, 16,137,137,137,152, 60,121,178,190,164,164,196,146,186, 78, 52,153, 76,215, 15, 31, 62,172,236,216,177, - 99,237,121,243,230,121, 29, 62,124,216,167,164,164,164, 70,105,105,169, 95,106,106,170,255,238,221,187,171,173, 92,185, 50, 49, - 33, 33, 33,154, 82, 42,176, 10,237,197, 25,228, 21,240,219,203,180, 84, 61,171, 5,204, 82,184, 50, 17,121,252,245,137,214, 43, -130,169,235,182,175,213,203,171,215,134,173, 95, 3,168,149, 74,168, 20,114,168,236, 28,160, 23, 69,252, 16,159, 86, 82, 12, 58, -249,101, 3,150, 40,138, 88,177, 98,133,126,218,180,105,249,169,169,169, 95, 28, 59,118,172,209,217,179,103,203,189, 74,129,227, - 56, 20, 20, 20, 96,219,182,109,186, 53,107,214,220, 45, 45, 45, 13,151, 74,165,102,131,193,128, 77,155, 54,233, 23, 47, 94,124, - 79,175,215, 55,149, 74,165,198,138,156,126,123, 24,176,164, 82,169,169,180,180, 52,124,235,214,173,119,126,253,245, 87,157,141, -141, 13, 36, 18,137, 89,175,215,135,174, 95,191,254,214,150, 45, 91,116, 54, 54, 54, 21,242,138,162,248,204, 62, 88,130, 32, 60, - 58,114,178,148,232,232,232, 53, 38,147,169,249,230,205,155,147,215,172, 89,163,183,177,177, 1, 0, 8,130, 16,177,110,221,186, -228,239,191,255,190,180, 34, 29,220, 1,192,104, 52, 66, 16, 4,172, 91,183,174,116,203,150, 45,201,162, 40, 70, 60, 28,183,122, -245,106,253,250,245,235,147, 77, 38, 83,243,232,232,232, 53, 22,110,107, 67, 74, 74, 10, 82, 83, 83,113,233,210, 37, 67,108,108, - 44,205,202,202, 2,165, 20, 38,137, 70, 66, 57,114, 75,164,116, 59, 21, 4, 25, 79,241, 17, 1, 57, 70,120,222,200,170,156,231, - 80, 4, 53, 8, 81,221, 76,212, 91, 43,101, 38,130,180,159, 1,153,253,163,128, 5,169, 61,220, 61, 60, 17,125,163,196, 10, 4, -114,232, 77,229, 39,236, 18,170, 1, 33,234,171, 9,212, 90, 34, 83,145,244,244,244, 71, 63,218, 15, 3,145,151,183, 63, 46,220, - 42,209,128, 64, 1, 17, 22,223, 74, 68, 20,197,118, 86, 86, 86,146,135,206,135, 62,133, 66,129,154, 53,107,242, 38,147,169,181, -197,203,158, 46,186, 66, 48,127,122,243,158,222,109,231, 9,157,207,136,241,171, 85, 42, 46, 23, 72, 88,140,122,181, 92, 49,226, -227,250,242,177,171,178,234, 70, 95, 47,169, 9, 78,232,143,186,197, 78,150,170,189,189,189,195, 85, 42,213,142,157, 59,119,170, - 53, 26, 13,238,220,185,131,250,245,235, 99,218,180,105,106,149, 74,245,179,151,151, 87, 68, 69, 54,211,169, 88,122,191,164, 72, -104,241,159, 21,137,233,151,226,133, 7,193,138,123, 16,174, 50, 11, 40,250,143,255, 37, 63,183, 72,223,253,204, 69,211,209, 10, -212,155,151,242,243,243, 59,141, 31, 63, 62, 39, 43, 43,235,137,112,117,239,222, 61,116,235,214, 45, 55, 43, 43,171, 13,165,244, -250,223,188,151,106,240,160,243,186,111, 89,139, 85, 32,165,212, 12,160,168,178,161,162,110,221,186, 13,170, 87,175,142,239,190, -251, 14, 63,252,240, 67,222,130, 5, 11, 64, 41, 69,237,218,181,109, 42,235,188,120,241,226, 94,157, 78,247, 77,239,222,189,117, - 27, 55,110, 20,250,244,233,131,144,144, 16,104,181, 90,244,238,221, 27, 63,252,240,131,185, 87,175, 94,122,189, 94, 63,234,226, -197,139,123, 45,220, 70,165, 5, 5, 5, 23,127,251,237,183,203,203,151, 47, 79, 26, 62,124,120,209,192,129, 3,101, 51,102,204, -200,218,182,109,219,197,227,199,143,255,174,215,235,163, 41,165,165,172, 50,123,180,206,158,155, 65, 30, 35,179, 44,232, 24,158, -122,205, 44,231, 61, 75,231,125,230,223, 22, 76,247, 92,202,189,226,102, 91, 28, 61,211,211,155, 44,156,186,250,251,225,189, 2, -235,170,106,120,213,133, 80,148,135,203,105,105, 88,151,154, 95, 98, 20,233,138,109,119,232,177,202, 6, 44,158,231,241,251,239, -191, 11,155, 54,109, 50, 2, 88,157,159,159, 63,229,218,181,107,197, 21,168,188,185,126,253,250, 21,231,228,228,236, 74, 77, 77, -253, 34, 46, 46,206, 16, 17, 17,193,245,232,209,163, 56, 59, 59,251, 55, 66,200,231,103,207,158, 45,109,218,180, 41, 42,242, 96, -107, 66, 8,100, 50, 25, 8, 33,136,138,138, 74,240,247,247, 15, 57,115,230,204,194, 91,183,110,125, 64, 41,229,162,163,163,147, -180, 90,109,216,169, 83,167,230,199,198,198,126, 40,138, 34,103,169,151,227,184,255,105,169, 34,132, 60, 10,117, 21,189,138, 48, - 58, 58,250,186,191,191,191,246,204,153, 51, 43, 6, 14, 28,216, 10,128,250,204,153, 51, 55, 2, 3, 3,131,206,156, 57,179,226, -227,143, 63,110, 93,214, 92,109,113,192,122,239,189,247, 74,242,243,243, 15, 20, 22, 22, 14,186,124,249,114,137, 86,171,197,123, -239,189, 87,146,151,151,119, 48, 47, 47,111, 80, 69,182, 17,165,116,246,137, 19, 39,166, 81, 74, 37, 42,149,106,239,197,139, 23, - 91,149,148,148,168, 41,165, 32,194,221, 2,206, 16,246,147, 64, 36, 28,149,240, 29, 64, 80, 11, 60, 38,200,228,106,214,116,254, - 60, 20,230, 66, 16,146,218,181,165,131, 98,241,178,213,210,190,157,106, 42, 3,252,170, 63, 8, 87, 50,123, 68, 95,207,195,196, - 5,219,196,153, 3,157, 18, 32,210, 36, 24,233,173,114,157, 54,124, 33, 74,197,204,126,109,228,138, 89,255, 29, 94,163, 73,135, -175, 21,117, 3, 66, 31, 5,161,216,107,231,176,104,214, 23,226,204, 1,118, 9, 16,145, 10, 3,110, 86,224, 59,218,115,214,172, - 89, 59,251,246,237,171,169, 87,175,222, 35,103,124,124, 60,230,204,153,163,211,235,245,221, 45,253, 86, 66,234, 87, 95, 48, 83, -231,141, 7,178,125,190, 28,250,169, 90,197,229, 0,119,231, 61, 8, 47, 82, 91, 52,172,231,132, 9,159,187, 74, 71,206,221,237, -119, 98,113,205, 34,136,242, 58, 0, 82, 45, 58,218,228,184,159,103,204,152,161, 86,169, 84,184,117,235, 22, 30,158, 54,210,106, -181, 88,180,104,145,122,200,144, 33, 59, 35, 35, 35, 93,142, 28, 57, 98,174, 72,200, 10,247, 35, 45,254,179, 60,238,240,156, 97, -118, 85,234,215,113, 70, 86, 33,208,127,226,238,188,236, 34,125,207,138,132,171,199, 67, 22, 33,164,211,176, 97,195,118,175, 93, -187,214,161,110,221,186, 72, 76, 76, 68,183,110,221,114,178,178,178,218,190, 6,225, 10, 0,138, 1,184, 3,184,133, 7,125,145, -238, 16, 66,228,120,137,199,179, 93,191,126,253,226,189,123,247, 92, 63,249,228, 19, 20, 20, 20,216,125,244,209, 71,184,115,231, - 14,110,222,188,121,233,101, 10, 26, 21, 21,181,170, 81,163, 70,167,215,172, 89, 51,146,227,184, 38,165,165,165,206, 0,196,253, -251,247,167, 9,130,112, 92,167,211, 45, 57,119,238,220,173, 10,110, 35, 10, 32,187,108,184,197, 42,173, 87, 66,244,223, 52,111, -165,177,104,103,223,120,135, 78,239,226, 77,142,252,112, 38,106,130,145,210, 6, 0, 32,227,200,149, 34, 66,167,108,191, 67, 79, -188, 32, 76,188,240,105,219,241,241,241, 88,188,120,113, 73, 81, 81,209,101,179,217, 60,248,236,217,179,113, 22, 4,148, 39,156, - 18,137,228, 76, 98, 98,226,134,115,231,206,253,252,248,184,164,164,164, 77, 81, 81, 81,219, 31, 27,151,216,162, 69, 11, 15, 66, - 72,182, 37,229, 36,132,164,189,251,238,187, 60,207,243,201, 0,112,237,218, 53, 35,128,207, 67, 66, 66,126,183,178,178,234, 3, - 0, 49, 49, 49, 38, 0, 95,132,134,134, 30,208,104, 52,125, 45, 89,118, 66, 8,120,158,127,102, 11, 22,128, 23,118,114,127,209, -250, 44, 11, 60, 61, 66, 66, 66,250,170,213,234,158, 0,112,249,242,229, 18, 0, 61, 67, 66, 66,250,168,213,234, 94,150, 58,213, -106,245,217,244,244,244, 13,209,209,209,107,159, 26,183,209,146, 86,171,167,157,209,209,209,203, 1, 44,127,248,127, 88, 88, 88, -208,237,219,183,247,138,162,168,146,100,223, 45,185,240, 91,187, 12,237,160,195, 53, 5,142,106, 64,232,120, 51, 71,114, 46, 44, -104,164,175,200,190, 84, 25,254,177, 78, 71,238, 62,178,201, 34, 31,119,229,200,129,157, 28,200,236, 45,119,107, 12,237,233, 42, - 15,106, 96,143,179,215,114,241,213,180,141,226,172, 65,206,119,155,248, 91, 37, 64,196,114, 8,165,153,229, 58,173, 76,247,161, - 55, 45,168, 93, 85, 49,114,228,251, 34,153,176,126,186,151, 82, 57, 77, 22, 28, 22,137,235, 87,163, 48,123,210, 32,113,246, 32, -187,187, 77,234, 90, 39,130,112,223, 66,208,103, 90,186,236,209,209,209,167, 67, 66, 66,222, 91,187,118,237,206, 97,195,134,105, - 2, 3, 3, 17, 31, 31,143, 41, 83,166,232, 74, 74, 74, 62,184,112,225,194, 49,139,151,157, 18, 10, 80,136, 2,132,111, 38,125, -107,208, 25, 4,162, 51, 82,162, 55,128,211,149,138,164,200, 32, 18,147, 73, 36, 30,206,234, 7, 45, 26,220,255, 30,248, 60,175, -156, 28,199,229, 15, 27, 54,204,234,185,185, 86,161, 40,174,204,118,127, 20,178, 22,199, 28, 30,213, 95, 86,101,201,166,115,185, - 89, 5,250, 94,229,133,171, 23, 57, 31,134,172,190,125,251,238,158, 59,119,174,195,232,209,163,179, 51, 50, 50,218,149, 23,174, -254,194,125,254, 18, 30,220,219,234, 44,165,244, 56, 33, 68,131, 7,247, 32,186, 90, 89,167, 32, 8, 11, 62,253,244,211,214, 51, -102,204,144, 76,156, 56, 17,113,113,113,152, 58,117,170, 96, 54,155,231,190,236,119,243,204,153, 51, 55, 0,244,255,215,212, 33, -175,169,243, 77,131, 84,164, 85,231, 85,109, 0,173, 86, 91,210,166, 77, 27,221,209,163, 71,139,245,122,253,208,243,231,207,255, -246,111,217,249, 90,182,108,249, 7,207,243, 94,132, 16, 80, 74, 83, 15, 28, 56, 16, 14, 0, 45, 90,180,248, 67, 34,145,120,149, - 29,241,167, 30, 58,116, 40,252, 77,254,226, 5, 7, 7, 55, 0, 48, 93,175,215,119,189,118,237, 90,113,195, 47,246, 57, 17, 29, -103, 67,120,222, 24,179,226,173, 68, 86,233,148,227,220,231, 35,135, 90, 17, 4,208,145,151,239,148,212, 24,191, 54,219,171, 99, -235,198,210,117,219,143,137,179, 62,125, 20,174, 22,128,234,206,161,121, 66,169,197, 78, 37, 23, 12, 94, 50,242,194,237,146,106, - 95,173,200,245,110,221,177, 63,255,235,207, 43,196,217,131, 28, 30,134,171,249, 16,138,162, 44,118, 62, 70, 72, 72, 72, 99,153, - 76,182,179,123,247,238,154, 45, 91,182,148, 27,174,158,233, 60,229, 95, 21,102, 58, 9,132,150,223, 7,140,114,119, 96,194, 44, -188,117, 45,241,117,216,238,225,126,164,154,202, 74,249, 83,177,209,244,181, 37, 45, 87,150, 56, 9, 33,245,237,236,236, 86,229, -229,229,245,182,164,229,234,175, 92,118, 66,136, 19, 0,109,217,129, 60, 1,112,157, 82,122,247, 37,157,225, 60,207,143,240,241, -241, 9,136,139,139,187, 38, 8,194, 66, 74,233,113, 22, 92, 88,192, 98, 1,171,140,136,136,136,147,162, 40, 30,144, 74,165,115, -142, 28, 57, 82,202,118, 62,230,100,206, 74, 56, 31, 11, 89,231,110, 21,123,205,218,146, 91,245,203, 46,182, 73,229,133,171,114, -157,101, 33, 43,234, 70, 73,245,217, 91, 11,170,142,248,192, 42,169,188,112,101,233,178,135,132,132, 52,150,203,229, 43, 75, 74, - 74, 62, 47, 47, 92, 61,211, 25,235, 47, 67,182,217, 29,148,248,131,210,231, 63,106,135,240, 37, 32,220, 53,100,208, 12,116,185, -102,100,251, 18,115, 50, 39, 11, 88,127, 53,127,203, 93,143,143, 31, 63,222,132,173,122, 6,227, 37,105, 27,103,192, 62,159,243, - 80, 43,230, 7,251,170, 62,253,121,178,186, 4,148, 36, 67,164,223,190, 40, 92, 89,224, 60, 7,165,121,126,104,109,213,231, 59, - 38,169, 75, 0,164, 3,220,210, 23,133, 43, 75,137,142,142, 62, 13,192,191,210, 2,191,107, 70, 0, 9, 0,185,135,201, 47,184, - 67,246, 68, 80,224, 79, 60,122,100, 48, 24,140,215, 49, 96, 49, 24,140, 87, 24,178, 98,253, 99,144, 41, 29, 3,130, 26,144,154, - 18, 81, 96, 74, 71,219, 4,195, 75, 58,163,145,201,223, 3, 69, 45, 72, 76,119, 81,160,127, 57,231, 43,135,210, 7, 33,138,193, - 96, 48, 88,192, 98, 48, 24,127, 6,126,215,140,240, 67, 50,128,228,215,218,201, 96, 48, 24,255, 34, 8,128,128,103, 31, 31, 90, -126,110,149, 16, 18, 80,209, 15,182,160,243, 38,115, 50, 39,115, 50, 39,115, 50, 39,115,190, 97,206,242,220,111, 74,223,174,191, -165,147, 59,115, 50, 39,115, 50, 39,115, 50, 39,115, 50,231,155, 12,123,152, 46,131,193, 96, 48, 24, 12, 6, 11, 88, 12, 6,131, -193, 96, 48, 24, 44, 96, 49, 24, 12, 6,131,193, 96,176,128,197, 96, 48, 24, 12, 6,131,193, 96, 1,139,193, 96, 48, 24, 12, 6, -227,181,225, 79,189,138,144,193, 96, 48, 24, 12, 6,227,223, 8, 7, 0,132, 16,150,178, 24, 12, 6,131,193, 96,252,229,188,169, - 25,132,157, 34,100, 48, 24, 12, 6,131,193, 96, 1,139,193, 96, 48, 24, 12, 6,131, 5, 44, 6,131,193, 96, 48, 24,140,127,103, -192, 34,132, 80,214, 23,139,193, 96, 48, 24, 12,198, 95,205,155,152, 65,216, 85,132, 12, 6,131,193, 96, 48, 24,175, 24,118,138, -144,193, 96, 48, 24, 12, 6,227,159, 20,176, 8, 33, 1,204,201,156,204,201,156,204,201,156,204,201,156, 44, 96, 49, 24, 12, 6, -131,193, 96, 48, 88,192, 98, 48, 24, 12, 6,131,193, 96, 1,139,193, 96, 48, 24, 12, 6,131, 5, 44, 6,131,193, 96, 48, 24, 12, - 6, 11, 88, 12, 6,131,193, 96, 48, 24,127, 19, 4,192, 51,175, 4,160,148, 94,177, 88, 82,137,171, 9,202,243, 51, 39,115, 50, - 39,115, 50, 39,115, 50,231,155,231, 44,207, 93,145,252,241, 90, 7,172, 63,243, 70,163,132,144,128, 87,189,162,152,147, 57,153, -147, 57,153,147, 57,153,243,205,115,190,105,176, 83,132, 12, 6,131,193, 96, 48, 24,175, 24,201,155,182, 64,254,254, 93,101,249, - 82,250,142,189,189,205, 72, 80,138,220,188,194,249,182, 38,242,203,181,107,219,140,127,214,103, 18, 66, 8, 0,208, 55,244,185, - 67,132, 16,101,189,122,245, 66, 0,224,234,213,171,209,148, 82,253,203,174, 47,103,255,206, 35,172,109, 84,189,204, 38,129,234, -117,165,107,210,175,238, 88,242, 42,203,236,236,236,175, 49, 40, 53,211, 0,241,109, 16,112,148,146, 35,146, 34, 97, 84,110,110, - 76,129,165, 14,247,102,163, 70,241, 50, 73, 63,193,104,154,157,114,108,206,106,247,200,201,142,130,185,120,150, 84, 33,143, 16, - 13,198, 57, 41,199,231,252,192,170,144,138, 99,227,223,198, 94, 37,179,230,211, 46,108,203, 98,107,131,193, 96,176,128, 85, 70, -181,128, 30,118,165,196, 56,150,151,240,239, 81, 42, 90,165, 93,216,230,252, 58, 44,136, 75,189,247,106,218,217, 91, 15,173,215, -200,175, 75,143, 15,218, 40, 3,235,249,202, 75,141,102,252,178,231,216,183, 91,127,217, 63,207,183,217,199, 59,243,114, 11,151, -254, 31,123,215, 29, 31, 69,181,182,159, 51,179,125, 55,157,100, 55,217, 77, 0, 9, 36, 64, 18, 32, 84, 19, 66,145,222,155,160, -162,136,160, 2, 74, 19,229, 74, 71,244,162,160,116, 68, 64,138,210, 81,144, 94, 2,210,123, 73,168, 9, 4, 8,164,215, 77, 79, -182,100,203,204,249,254, 72,194,141, 24,200, 6,240,126,247,122,231,209,253,177, 51, 57,231,217,119, 78,125,230, 61, 45, 59,102, -207,163,151, 44, 62,100, 51, 70, 4,116,243,112,146, 73, 9, 33,187, 41,165,246,170,194,105,154,191,125,130,128,188, 82, 22,135, - 1, 97, 0, 2,154,145,118,117,115,120, 21,156, 74, 0,222, 0,146,158,198, 87, 21, 20,218, 96, 95, 9, 35,253,130, 49,226,179, -154, 8,137,103, 60,155,186,126,253,250,225, 1, 1, 1,234,113,227,198,137, 1, 96,241,226,197,141, 26, 52,104,144, 29, 31, 31, -127,129, 82,154,253, 92,121, 21,212,127,234,172, 41, 31,205,236,215, 61, 2,249, 37, 54,124,191,254,215,121,154,144,129,108,214, -237,221, 75, 94, 74,158,104, 91, 40,220,157,156,174,140,255,244, 75, 93,207,142, 45, 68, 5, 70, 59,118, 70, 94,124,107,239,207, -243, 58,184,187,183,104,237, 72,218,232,194,255,241,170,239, 43,190,179, 7,246,239,139,239, 87,173, 27,167,141,152,154, 35,150, -137, 86,133,133,181,119,243,241,173,131, 93, 59,183, 78, 0, 32, 8,172,154,149, 39,151,166, 1,110, 65, 3,154,133,238, 60,119, -223,224,228, 21, 50, 96, 23, 88, 44,213,223,216,115,211, 81, 14,223, 70,225, 23, 68, 12,235,195,241, 92, 90,202,221, 11, 17,127, -133,157, 42, 77,227, 78, 32, 88, 79, 40, 21, 83,208,239, 89,158,236, 42,206,137,123,248,162, 47, 80, 46,190, 65,238, 28,111,237, - 38,101,148,205,172,188,233,154, 72,162, 56, 90,144,120,163,240, 37,165, 45,171,212, 4,190, 35,151, 41, 63,169, 31,216,168, 65, - 66,194,131, 7,134,226,194,229,198,172,251, 27, 41,165,124, 77,184,252, 59, 79,123,131, 3, 63,141,183, 91, 24, 17, 37,223, 62, - 58,179,100,171, 80,122, 5, 8,248,139, 5,150, 87,208, 16, 21, 17,209,171,237,195, 95,245,152, 62,118,160,116,233,150, 51,240, -110,246, 70,124,230,141, 95,235,255,127, 62,132, 79,232,160,218,132,224,214,164,209, 67,241,254, 27, 93, 73, 78,177, 29, 69, 38, - 14, 68, 12, 12,121,189,183,114,208,128, 30,202,111,151,173,255,224, 96,228,201, 15,124, 66, 7, 53,206,184,190, 43,185, 58, 78, -239, 22,111, 31, 1, 72, 64,197, 53,229,236,114,194,138,204, 0,202,197, 17, 3,149,155,250,236,236,145,129,251,231,188, 31, 60, -103, 67,100,210, 74, 0,181, 0,100, 85,217, 0, 50, 34,221,166, 53,139,189,116,181,164, 96, 24, 6, 5, 6, 27,222, 28, 57,137, -171,162,161, 84,173,158, 28,218,255,189,222,117,223,146,117,216, 53,147, 16,114,203,145, 6, 82,165,105, 24, 44,149,187, 28,240, -111,214,197, 45,225,230,177, 32, 39, 77,163, 15, 12,114,243, 67,154,152, 88, 90,211,134, 90,165, 82, 5,184,184,184,180,236,209, -163,135, 98,202,148, 41,226,246,237,219, 63,254,251,168, 81,163,196,103,206,156,209,125,251,237,183, 3,117, 58,157,169,168,168, - 40,202, 96, 48,220,167,148,114,142,254,134,187,187,251,123,131,122,183, 71,159,183,198,130,130,193,228,169,179,112,248, 80,228, -112, 0, 47, 69, 96,185,176,204,204, 81, 19,103,233,218,135, 53, 23, 45,216,157, 12, 59, 79,209, 49,184,169,168,244,141, 79,189, -143,253,186,228, 91, 0, 99,170,227,224, 36,204, 63,123,119,123, 13,224, 44,176,217,173, 94,110,181,220, 54, 15, 30, 56, 64,108, -231, 40,142, 29, 59, 14,222,198,255,228,136, 45,222,205,135,158, 3, 97,116, 21,101,134, 16,128, 33, 0, 1, 1,165,124, 90,202, -149,205, 47, 44, 18, 8, 33,172, 66,211,176, 59, 67,249, 97, 0,192, 19,102,179, 41, 43,238, 72, 77,242, 4, 0, 52, 77, 95, 79, -164, 60,247,167, 23, 38,150, 21,235, 51,110,236,168,251, 2,246,121,246, 8,215,180, 56,253, 67,199, 46, 97,193,238, 33, 63,254, - 94,234,210,162,231,120,164, 21, 96,240,222,221,187, 6,123,133, 12, 56,195,128, 46,206,186,189,247,120,117, 92,114,153, 76,189, -127,255,126,175, 30, 61,122,185,169, 67, 6,236,225, 9, 50, 25,138, 76,194, 51,153,132,216, 51,237, 12,205, 4, 75,178,114,253, -165,217,190,177,233,167, 89,134,213,217,121, 46, 35,245,238,133,112,199, 13,198,250,200, 99,231, 60,205, 54,138,239,126,216, 58, -203, 88,152, 53, 43,241,142,103,146, 82,211,112,138, 49, 43,238, 96, 77,158, 93,225,219, 84, 43,226,205, 61,124,180,245, 94, 31, - 63,241,243,214, 93, 59,181, 23,215,243,211,144, 71, 41, 89,244,247, 19,103,172,129,173,123, 94,202, 72, 75,216,197,219, 68,135, - 13,250,216,172,231, 75,223,142, 34, 39,117,163,159,251,190,241,254,192,126,131,134,194,205,197, 9, 22,107,105,131,147,191, 31, - 90,177,118,197,252, 48, 66,200,168,154,136, 67,142,218,167,173,157, 55,182, 62,192, 99,248,132,185, 51, 8, 33,219,107, 42,210, - 4, 8, 16, 80, 67,129, 69, 88,251,236,176, 54,175,122,124, 50,110,164,116,204,242, 83, 72,190,114,216,244,178,196,149, 74, 29, -172, 22, 73, 68,239, 50, 12,235, 70,192,200,121,142, 75, 41, 36,250,213, 52, 53,181,218,225,168,140,235,187,146,189, 67,251,183, - 90,246,227, 47,179,163,110,196,182, 31, 51,124,160,202, 87,167,101,108,118,138, 11, 81,183,184, 21,107,182, 21,229,229, 23, 93, - 32, 34,250,149, 35,226, 10, 0, 40,133,255,162,133,223,121,233,106,201, 80,104,180, 99,236,167,179,240,237,215, 95, 56,213, 86, -203, 97,182,240, 88, 25,153,170, 15,202, 95, 24, 61,103, 96,240,156,125,231, 51,214,143,156, 27,117, 19,128,241,153, 2,213, 85, -138,241,171,239, 65, 33, 23,193, 85, 41, 1, 75,152, 63,137,171, 85,159,135,246, 27,213,175,222,244,111, 54,222,221, 0, 64, 12, - 64, 10,224,153,105,224,228, 29,212, 81,233, 82,107, 75,207, 17, 95,185, 42, 93, 53,120,103,112,207,160,179, 71,127,251, 61, 37, - 37, 17,126,141, 35,204,118, 59,127,162,184, 40,255,123, 67, 86, 92, 76,117,207, 93,183,110,221,161,189,123,247, 86,125,254,249, -231, 98,157, 78,135, 95,247,157,208,117,126,125, 98,215,180,172, 92,111, 0,208,105,106,101,126, 56,172,239,239,135, 15, 31, 78, - 75, 75, 75,115,153, 55,111, 94,196,174, 93,187,154, 2,216,230,104, 94, 83,202,195,206, 81,112, 60, 5, 79,121,228, 22, 91,158, - 75, 84, 60, 85, 64, 16,244,233,222,161,165,104,233,254, 20,220, 79, 47,203, 18,153,152, 69,139, 22,173, 68,199,119,145,246,213, -138,162,118, 83,123, 53, 13, 14,124,213, 87,171,198,165,168,155,144,138,197,110,111, 13,234, 11,185, 66,129,109,191,238,226,179, -178,210,199,101,158, 93,184,209, 49, 67, 25,221,154,149, 75,188,106, 57, 75,192, 18, 2, 86,196,128,101,128, 18, 51,135,119, 63, -152,240, 66,117, 70,161, 13,246,101,169,109,184,179,182,241,240, 65,131,222,244, 25,250,214, 16,202,178, 12,118,236, 62,208,231, -151,109, 27, 50,157,124, 2, 55,112, 68,188,209,148, 30,147,234, 80,190,240,156,215,254,157, 27, 80,203, 69, 2,134, 0,185,197, - 28, 18,178, 76,152, 48,118,244,115,121,169, 9, 33,110, 31,247,127,165,251,205, 77,157, 59, 4,214,118,174,127,243, 65,193,221, - 17,255,140,254,225,104,106,195, 87,231, 44,104, 4,163,185, 20, 99, 62,157,137,156,244,196,246, 71, 14,237,107, 95,171, 97,247, -251,196, 82,244, 69, 78,194,165, 3, 79,227, 52,155,205, 5, 61,123,244,118,241,246, 86, 43,214,175, 91,211, 53,175,208,132,188, -130, 98,232,243,138,144,147,155,143,140,172, 28,164,165,103, 32, 53, 37,141,207, 99,245,136,140, 60,196,244,237,219,151,171,169, -237, 38, 43,143, 27,143, 74, 80, 39,176, 37, 60,212,190,104,213,109, 68,157, 27,167,183,255,234,228,221,120, 97, 73,230,157, 47, - 28,225,112, 86, 7,126,247,230,219, 35, 62,124,115,240, 64, 81,195,250,190, 76,166,190,128,158,191, 20,157,191,116,241,178, 59, -109, 59,116,108,220,183,103, 23,247,209,239, 13,233, 16, 23,159,218,110,219,206, 61,139,156,188, 26,110, 46,209,199, 77,168,105, - 61, 80,106, 26,174,127,173,223,136,129, 33,109,186, 34, 62, 62, 30, 15, 98,163,208,177,115, 15,244,232, 61, 8,150, 82,243,208, -141,235,150, 70, 3,248,177,202,248, 45, 90,136,221, 10,220, 20,127,104,139,181,129, 34,128,130, 82, 10,187,169, 80,162,210, 52, -243,112,175,215,197, 10, 0, 5,110, 5, 38, 26, 29,109, 19,186, 78, 1, 2, 94,178,192, 98, 88,105,207, 73, 35,123, 73,167,174, -186,136,228, 43,191,152, 50,175,255,234, 89,241, 55,223, 22,111,197,166, 70,111, 15,250, 99, 71, 90,253, 10, 3, 66, 90,136,221, -116,248, 84,237,227, 51,250,157,247,199,179,117,124, 53, 76,137,217,110,207, 74, 79,165,145,251,183,125,236, 90,187,217,119,133, -201, 55,214, 62,141,147,212,239, 41,165,241,135, 45,153,215,247,222, 5,240,166, 58,120,168,250,252,149,219,147,221,221, 92,134, -216, 57, 59,138,139,141, 59, 10, 10,108, 11,179, 99,182,101, 87,106,148, 72,229, 55,186,167,217,233,238, 36,193,167,235,239,195, -108,225, 64, 41,133,151,155, 20,243,127, 75,130,136, 37,250,224,130,133,139,191, 26,104, 29,245,235,121,203,142, 25,187,253,218, - 2, 23,214, 83, 74, 75,158,106, 39, 0,150, 1, 84, 10, 49, 84,114, 17,156, 21, 98,148,205,220,250,151,184,250,225,179,166,253, - 70,247,171, 55, 99,222,150,184,159,103,174,185,115, 1, 64,124,229,249, 78, 85,217,233,226, 19,242,182,187,151,110, 97,255, 81, -115,157, 19,243, 25,136,237,128,167,182, 30,249, 98,206, 92, 23,185,148,129, 66, 76, 93,110,197, 61,122,123,236,216, 79,122, 43, -181,141,122, 27,211,239, 94,127, 86, 30,153, 76, 38,217,176, 97,195,196,102,179,217,250,254,164,249,237, 18, 83,178,186,125,253, -197,100, 89,109,157, 26, 28, 79,113,251, 94, 74,253, 57, 95, 47,242, 61,248,251,165,200, 33,221,155, 28,245,241,241,113, 51,153, - 76,124, 77,242,189,176,176,104,235,150,221,199,166, 44, 91,188, 0,137, 89, 6,108,217,182, 19, 28,199,111,124,182, 40,251, 35, -231,156, 57,115,188, 67, 66, 66, 36, 49, 49, 49, 89,148, 82,211, 19,161, 93,244, 69, 86,216, 56, 30, 4,128,167,155, 12,110, 78, - 82,176, 12, 1, 67, 72,181,249, 14,194,143,232,223,163, 29,164, 98, 22, 9,137,201,104,213,188, 41,188,106,185, 35,238,193, 35, -100,102,101,101, 49,132,121,175, 78,183,217,243,109,165,230,153,233,103, 22,172,127,150,157,132, 1, 60,157, 37,248,102,103, 34, - 20, 82, 17, 20, 82, 22, 10, 89,217,191, 4,196, 65, 65,250,103, 59, 85,222, 13, 63,107, 26,220,108,206, 7, 31,188,207,180, 13, -111, 67, 89, 86,132,172, 66, 27, 97, 8,240,201,216, 49,152,240,241, 40, 77, 98, 82,234,180,149,171,215, 76,113,210, 52,154, 95, -146,117,247,107, 71,242,168,150,179, 4,179,183, 36, 64, 33, 43,179, 51,244, 21, 39,135,219,135, 39, 57,181, 77,123, 29, 58,153, - 45, 14, 44, 62,104,190,242,224,254,245,111,175,222, 74,138,162,148,230,171, 67, 6,192, 98,167, 40, 49,217, 16,147,108, 7,111, - 22, 99, 64,143, 86,104,234,230, 25,176,108,227,201,117,132, 16, 77, 69,253,124,146, 51, 53,238, 98, 75,247, 22, 67, 92,168, 65, -121,107,193,238, 68,207, 58, 26, 23,120,187, 59,195, 75, 91, 11,141, 26, 5,194, 93, 37,134,139,130,133, 66,202, 50, 29,122, 12, - 65,247,238, 61, 77, 28,111,207,174, 73,249, 36,148,140, 28,212,171,253, 70, 2, 72, 24, 86,146,238, 83,167,129, 95,235, 30, 31, -200, 91,118, 29, 1,155,197,252,153,147,119,208,233,146,204,216, 83,213,113,186,121,105,223, 29,249,254, 40, 73, 61,141, 12, 39, - 78, 95,180, 79,159, 49,227,118, 97, 73,254,162,146,140, 7,177,199, 79, 28,245,118,117,247,152, 49,125,214,220,176, 78,225,161, -108,151,222,111, 73, 34, 35,143, 14, 6, 48,161, 58, 59, 9, 33,140, 66,221, 96,100,131, 70, 77, 39,125, 52,235,199, 58,105,185, - 22,184,107, 3,112,235,122, 20, 34,119,124,127,163,180,164,112,217,209,131,191, 77,250,226,155,229, 77,122,247,127, 19, 7,246, -108,159, 64, 8, 89, 67,203,240,152,211,163, 65,135, 46, 77,234,132,172,247,110,168,246,168,204,207, 83, 22,115,230, 47,135,185, - 36, 31,117,181,110,222,206,141,235, 39, 81,134,128,242,128, 94,159,105,241, 12,236, 48, 40,231,222,233, 83, 53,105,231,107, 10, -129,243,127,147,179, 26,180, 2,224, 5, 64, 15,224,234, 19,215, 40,255,142, 42,174,115,202,187,224, 90, 0, 44,229, 78,139, 10, - 84, 92, 63,237,126, 69,252, 88, 0,141,203, 57, 57, 0, 87, 0,228, 87, 43,176,202,181, 6,169, 84,121,255,112,253,199, 55, 92, -155,206, 75,227, 13,142, 38,253,161,107,168,211,122,104,206,196, 81, 67, 20, 62,161,131,245, 25,215,119, 58,252,182,171,240, 13, -208,186,213,118, 57, 52,238,147,207, 93, 63,126,175,175,211,221, 20, 99,113,108,146,177, 8, 10, 10,119,191, 90,162,144,238, 94, - 92,246,175, 11,103,184,234,154, 20, 20,166,221,250,173, 42, 14,181,139, 71,172,239,171,239,231, 91,140,134, 47,115, 98,118, 68, -150,207, 11,250,135,111,216,144,217, 0,144,122,113,199, 99,129,162, 14, 29,248,170, 76,230, 54, 71,219,242,157, 90, 0,154, 87, -103, 95, 94,137, 21, 28, 87,214, 31, 51, 12,129,193,204, 65, 46, 97,114, 2,115, 23, 60, 22, 87,231,233,135,239,217,232,118, 73, -101,113, 85,117,163, 8,228, 21,219,160,146,139,224, 36, 23,193, 73, 33, 2, 83,174,176, 8, 33,170,239, 39, 53,237,251,209,192, -250, 51,230,111,190,183, 97,198,234,216, 11, 0,238, 81, 74, 11,158,197,233,162,105,212, 70,234,234,185,248,131,207,151,168,206, -221, 51, 64,235, 33, 69, 72, 29, 23,184, 42,165, 72,203, 43,155,211,159,158,107,134,217,234,140, 1, 31,206,113, 57,188, 99,197, - 25,119,223,166, 27,243, 83,111,142,171,238,217,119, 29, 60,243,202,163,228,204,110,191,254,180, 80,150,103, 4,146,242,120,228, - 21, 91, 96, 97,221, 49,243,139,175,100, 83,167, 78,233,129,210,220,180, 6,117, 60, 50,106, 92, 49,137,113,209,142,221, 71,255, - 17,210,162, 61,115,234,228, 73,220,140, 58,187, 67,127,123, 79,141,134, 7,107,215,174,109, 95,190,124,185,235,210,165, 75, 59, -184,187,187,167,228,231,231,199,150,167,165,175, 87,157,144,220,125,135, 78,186,180,105, 26, 38, 82,200,196,112,119,146,192,223, - 91,137, 59,215, 78, 89, 24,144,223, 29,176, 80,231,163,174, 5,142, 2,250,156, 60,116,239, 20, 14,169,152, 69, 70, 70, 38, 2, - 3,234,249,116,239,244,154, 15, 15,130,149,107,215,126, 12, 96,253, 51,243, 29, 12, 88,150, 64, 41, 19,225,198,209, 53,133,165, -198, 34, 43, 41, 31, 34,228, 41,151,246,220, 77, 13, 79,222,137,220,187,153,201, 40,176,227,126,102, 41, 73,205, 53,128, 1,133, -151,171, 8, 60, 39, 66, 81, 65, 54,217,186,109, 43,174, 71, 93, 98, 8, 97,222, 3,240,181, 67, 47, 81, 12, 32,151,178,144, 75, - 89, 40, 36, 44, 74, 74,203,180,179, 58,100,192,102, 10, 20,138, 88, 81, 73,198,141,157,211, 29,170,223, 74,183, 38,155,214, 44, -192,209,179,209,237, 78,197,111,108,174, 9,110,178,170,118,200,219, 75, 1,192,106,231, 97, 44, 41,132,202,150,132,118,117,115, - 80, 75,201,225, 94,190, 22, 55, 83, 69,170,234,134,179,242,163,119, 20,105,130,250, 77,184,113,238,208,118, 81,199, 65, 40, 48, -112, 72,146, 89,160,148,137,202, 63, 44,238,220,188,140,204, 34,254,156,179, 69,217, 47, 41,254,112,141, 92,164, 37, 89,177, 39, - 1,248,254,203, 67, 92,223, 51, 99,229,103,107,135, 76,252,190, 75,171,238,239,147,251, 87,127,255, 28,192,169,106, 61, 88,110, - 30,162,135, 89, 28, 18, 18, 31,241,173,219,132,137, 46,157, 59, 17,250,251,201, 11, 27, 55,111,217, 82,218,235,245,247,228,157, -219, 54, 99, 83,114, 45, 88,190,235, 14,141,201,160, 68,170,170, 37,118,192, 99,197,120,213,111,245,211,134, 13, 91, 7, 7, 5, -248, 33,171,192,134,244,124, 43,206, 68, 63,192,198, 53, 83, 11, 11,178, 31,142,132,165,196,192,131, 43, 60,126,116,223,222, 49, -227,167, 34, 40, 36,180, 78, 73,186,193, 25,192, 31,231, 30,242,252,136,175,191,254,206, 67, 84, 73,147,169, 0, 0, 32, 0, 73, - 68, 65, 84,165, 82,253,233,119,244, 89,233, 48,148, 24, 32, 85,186, 64,233, 82, 11,118, 59, 7, 27, 71, 81, 92, 92, 44,157, 54, -254,157, 15, 29,121,126, 1, 2,106,224,137,117, 68,135,120, 17, 66, 14, 80, 74,251, 0,232, 2, 64, 90,233, 26,132,144, 3,229, -194,239, 15,215, 83,167, 78,157, 62,111,222,188,152,138,176, 21,247, 43,194, 62,235,126,165,248,181,166, 77,155, 22, 50,127,254, -252,111,194,194,194,182, 95,184,112,225,145, 67, 2,171,242,195,144, 74,111,247,127, 26, 54,105,214,183, 37,120, 17,235,235,229, -132, 87,234,250,193, 77, 57, 92,161,109,254,166, 94, 36, 98,153,159,151, 78,147, 39, 22, 72, 32, 98, 68,198,154,136, 43, 25,235, -114,116,213,218,141, 78,109,154,188, 34, 91,180, 59, 53, 33, 53,175,212,194,219,109,140,217, 88, 34,201,207,188, 47, 46,202, 78, -116,118,241,110,200,154,139,244, 51, 1, 84, 41,176,164, 82, 41,179,108,193,151, 65,167, 78,159,223,176,223,201,165,208, 39,244, -157,197,172,204,186,177, 66, 88, 17,242, 37,163,105,118,111,160, 84,174,156,210,176, 73, 7, 31,109, 64,107,215,203,135, 55,196, - 59, 32,207,217, 41,211,231, 60, 22, 87, 54, 83, 30,190, 91,179,191,184,179,199,233, 69, 21,226,106,155,126,232,219,221,219, 7, -104, 14,239,151,228, 85, 91,128, 96, 79, 27,246,193, 39, 18,194, 0, 12, 72,217, 60, 46,202,103, 19, 66,148,203, 63,105,214,103, -236,235,254, 51,191,221,114,111,227,244,213, 49, 21,226,170,218,204, 43,102, 21,183, 93, 74, 77, 89,137,241,183,235,140,239,213, - 86, 84,199,219, 21, 10,169, 8, 5, 6, 59, 10,140, 28, 82,245,102, 60,204, 52,224,246, 67, 61, 56, 83, 17,222, 25,251, 79,230, -231,239,198,119,115, 36,127, 14,158,136,238,250,221, 55,211,101,121, 6, 32,167,132, 67,122,158, 25,105, 57, 38,164,230,152,160, -144, 0, 97, 93,223,146,157, 59,244,115,247, 6,117, 60,126,170,105,101,202,186,117,212,168, 14, 25,112, 57, 45, 67, 31, 86, 63, - 32, 8,204,161,189,141,106, 53, 29,162,205,189,185, 35,221, 81,142,195,135, 15,231,248,250,250,170, 87,173, 90,165, 95,188,120, -113, 72,237,218,181, 27,165,164,164,236,243,244,244, 28,254,253,130, 89,199,190, 88,240,147,167,197, 90,234, 18, 28, 26,206,138, -196, 4, 49, 87,142,149, 30,217,245, 99, 6, 45, 50,206,172,142, 91, 42,147,213,146,203,197,176,217,120,176, 44, 11, 95, 31, 53, -108, 28, 69,137,193,128,129,189,187, 33,230,238,125,156,191, 20,101,231,108,246,229,213, 55, 28,128,136, 97,160,148,137, 80,106, - 44,178, 38, 93,218, 88,247, 37,181, 73,148,167, 20,209, 15,141, 48,150,218, 97,181,241,240,215, 72,145,151,157,140,117,223,111, -196,205,107, 87,209,174,115, 31, 44, 88,185, 5,227, 63, 28,226,240,170, 79,134,144,114,113, 37,130, 92,202,162,212, 86,214, 36, - 44,155, 55,149, 13, 14,106,140,142,125,134, 57,236,210,114,118, 82,160,216,100,133,202,205, 7,209,199, 55, 42, 15, 30,191, 50, -249,187,229, 63,125, 82, 90, 76,145,122,239, 34,194,220,115, 81,223,211,130, 43,201,206, 56,154, 92, 7, 1,254,245,192,136,246, - 56, 86,134, 98,247,237, 87, 55, 27,184,175,168,113,104, 63,119,255, 64,200, 36, 44,100, 18, 6, 82, 9,131,135,247, 98,240,203, -230, 13,119,237,114,229,144,248, 91,123, 44, 47,154,208, 37,153,241, 57,114, 77,224,164, 7,215,142,198,182,237,247, 49,220,188, -235, 52,169, 73,252,121,115,103,148,114,118,155,237,237,225, 99,148,125,123,190, 38, 10,107, 27,174,138,186,151,143,111,127, 62, -201,157,139,220,156, 33,145,185, 42,116,225,163, 61, 28, 17, 87, 30,117, 66,215,110,218,252,235,224,122,181,189,241,251,149, 4, - 92,139, 47,128,139,179, 43, 68, 42, 31, 4,118, 24,225,122, 59,114,233, 0, 99, 78,201, 86,177, 88,254, 94,203, 54, 17,160,148, -226,126,108,108,126, 65,129,211,159,218,102, 70,196,172,157, 53,243, 31,221,213, 94,154,202,111,238,240,175, 31,128, 94,253, 6, -227,248,169, 29,120, 20,127, 31, 60,165,224, 41, 64, 41, 69,110,142, 62, 15, 12,243,179, 32, 9, 4,252, 85, 34,235, 89, 58,164, - 66, 56, 61, 41,136,158, 20, 90, 21,223, 43,194,205,155, 55,175,207, 19,222,183, 62, 79,241,202,253, 41, 92, 69,252,249,243,231, -127, 83,233,239, 14,105, 29, 81, 57, 9,121,214,195,169,155,245, 15,147,138,157,246,253,176,240, 19, 38,187,208, 6,133,148,133, -170,118, 61, 52, 24,249,137,242,237,118, 94, 72, 47,117,199,254, 3, 63, 21,219,168,253,176,163,226, 74,202, 56, 29, 89,180,226, - 39, 73,253,186, 90, 50,103, 91, 98,188,217, 86, 54, 77,194, 82,106, 22, 37,221,140, 84,166,198, 30, 55,195,110,219,196, 74,101, - 45, 64,121,245,179,248,234,120,187, 33,188, 67, 23,101,135, 14, 29,148, 71, 79,158,159,123,240,224,193,143, 81,190, 67,189, 79, -139,132,227, 45,218,246, 10,210,250, 55, 81, 22, 91, 8,164, 98,198,209,220,230,190,251,102, 14,106,171,229, 48, 89,120,252,115, -245,161,226, 14, 78,191,127, 83, 89, 92,105,124, 27,248, 74,100,170, 63, 12,245, 61, 13,105, 87,183,118,170,162,160, 40,151,124, - 18,210,119,220, 16,255,153,223,109,185,183,105,218,170,152,243, 0,226, 28, 17, 87, 0, 64,211,163, 77,174,181, 67, 58,236,219, -176,112,230,161,109,203, 58, 50,160, 30,141, 2, 3, 68, 93,187,118,147, 53,107, 21, 46,211, 23, 82,220, 73,208,195, 92,146,143, -206, 97,141, 16,185,123, 51,151,149,153,226,208, 28, 15,125,126,145,119, 29,157, 6, 9, 57, 60,146,245,101,194, 42, 85,111, 68, - 90,174, 9,249, 37, 22,180,170,167,129,193, 96,241,126,238,202, 68,201,129,139, 23, 47,134,189,218,190, 43, 94,127,123,116,208, -129, 93,155,175,104,130, 7,125,150, 21,179,235, 87, 71,226,239,216,177,131,211,106,181,241, 89, 89, 89, 17, 11, 22, 44,208, 7, - 6, 6,250,205,153, 51,103,186, 86,171,245, 24,242,250,235, 41,125,122,247,222,242,209,167,179, 59,172,252,242,167, 87,192,176, - 89,224,237,135,244, 38,110, 46,213,199,154,170,227,118, 82,202, 60,196, 44, 3,134, 16,184, 57,171, 32,147,138,192,218,121,240, - 28, 7, 55, 23, 37, 98, 98,239, 34,251,206,249,209, 5,143,142,236, 0, 22, 86, 43, 88, 88, 22, 80,201, 69,143,203,137,186,233, -235,137,168, 98, 50, 57, 0, 16,150,213,103,221,248,173,174, 3, 9,200,219, 57, 10,179,149, 67,169,149,131,152,165, 40, 46,204, -198, 23,211, 38,225,181, 30, 3, 49,119,216,120, 20,154, 89, 92, 79,182,192,110,179, 17, 71,243, 37, 45,207,130,158,205, 61,144, - 83,108, 71,190,129,131, 68, 84, 86, 95, 14, 94,203, 69,188,161,102, 11,222,120,158,194,211,195, 21,202, 92,160,215,167,187,241, - 90,115, 95,156,220,187, 70,116,254,202, 45,252,243,219,239,161,238,255, 42,214,223,168, 15,153,139, 31,100,174, 50,216,104,205, -182,229,163, 54,209,167,215, 79,239,238, 84,223,127,138, 74, 42,150,148,121, 25, 83, 30, 97,243,134, 31,211,236, 98,244,205,187, -188,165,248,101, 53,254, 98,134,213,185,122,120, 65, 38,102, 64,237, 22, 67, 77,227,103,166,103, 53, 89, 48,119,202,240,179,151, - 6, 78,111,221,115,140,244,212,238,101,165,177, 87, 14,140, 53,100, 56,237,242,143,240,140, 2,224, 81, 77,167, 66, 92,125, 66, -126, 92,189,126,203,155, 62,222,106,236, 62,126, 19, 27,214,253, 0, 93,112,119,196, 95, 59, 10,191, 22,253,225, 84,175, 19,196, -206, 59, 70,170, 24,113,240,168,137, 51,250, 55,111, 25,142,139,231, 78, 32, 91,159,186,142,210,184, 63,173, 70,206,185,119,250, - 20,105,209, 66,237,246, 48,237,241, 28, 44,134,181,250,240, 60,162, 59, 91, 41, 30,197,223,199,205,107,151, 90,240,156,228,177, -151,186,192,173,192, 68, 31, 8,115,176, 4,188,124, 84,167, 67,170,243, 58,213, 80,204, 29,168, 74,100, 61,121,159, 16,114, 96, -234,212,169,211, 1,208,169, 83,167, 78,175,184,158, 55,111,158, 9, 64,181, 14, 1, 81,229,135,171, 42,128,186, 89,255, 48,169, - 72,185,111,195,242, 25,138,109, 87, 56, 44, 56, 28,141,208, 64, 13,196, 98, 22, 42,185, 55,142,199, 20,226,194,153,125, 37,209, - 81,151,205,172,152,155,237,136,184,146, 16,197,161,249, 75, 87, 21, 4, 5,248, 73, 87, 28,202,188, 97,182,241,132, 82, 34, 38, -148,176,148,242, 46,105,177, 39, 26, 23,145,156, 48,154,230,200, 10, 56,194, 91,237, 20,137,217, 22, 16, 2,180,141,232, 32, 63, -122,244,119,197,191, 58, 44,177,123,237,134, 45,148,119,146, 13,144,136, 24,168,221,164,112,116, 57,141,151,155, 20,243,118, 38, - 66, 44, 98,244, 29,156,126, 95, 92, 89, 92,121,251, 54,240,117,118,113, 1,207, 19, 16, 66,158, 39,131,149,139, 39,132,244,153, - 56, 36, 96,230,226,109, 15, 54, 79, 93, 25,115,206, 81,207, 85,101, 20, 38,223, 46, 0,240, 89,197,181,107,237, 16,183,171, 81, -151,187,184,186,171, 23,180,127, 99,102,173,146, 66, 11,186,132,151,137,171,155,103,127,125,203,152,121, 55,210, 81,110,171,157, - 71, 82,150, 17, 9,153,198,199,222,171,212, 28, 19, 20, 82, 22,102, 11,247, 66,149,201,169,180,244,199,200, 67,123,123,218, 56, - 68, 52,110,209, 1,175,143,156,226,118,108,239,134,159, 52, 65,253,204, 89,177,251,246, 59,194,145,158,158,110,242,240,240,184, - 84, 84, 84,212,119,203,150, 45,249,173, 90,181, 98,221,220,220,242, 0,200,174, 95,187, 38, 59,180,243,231,172,162,162,162,241, - 86,171, 53,186,218,188,246, 10, 82,149,138,109,111, 82, 59, 59, 76, 19,210, 83,148, 95, 80, 54,154,146,152,154, 1,147,193, 8, - 27,199, 35, 61, 35, 27,165,165,102, 20, 22, 21,161, 93,235,186,223,159,182, 4,207,112,214, 52,156, 94,156, 21,119,224, 89, 30, - 44, 67, 41, 7,165, 76,244,175,114,194,115, 94,171, 86,175,134,135, 83,217,136, 16,203, 18,228,149,216,144,145,103,197,156,169, -227, 29, 29, 98,167,118, 59, 69,169,149,131,217,202,161,208,198,193,203,183, 22,190, 91,249, 11, 18,245,102,236,141, 42,196,195, - 12, 35, 66,235, 59, 3,188, 99, 5,148,101,197,250,129,111,188,247,167,223,151, 43,157,204, 18, 86, 4,149,188, 76, 0,169, 27, -247, 31, 77, 8, 83,196,138,197,165,233, 55,126,221,251,116, 11, 1,169, 84, 10, 95,111, 15, 88,109, 28,142, 92, 78, 66,239,206, -173,241,106,235, 22, 32, 34, 9,162,138, 66, 33,115,113, 2,101, 9,236, 60,133,197, 86,179, 50,165,143,221,145,229, 29, 50, 96, -202,141,139, 71,127,232,214,123, 16,242,115, 50,176,105,237,138, 34, 27,199,245,206,185,177, 43,243,101, 53,252, 78,154, 38, 94, - 74, 23,215,239, 90,132,119,133,169, 48, 19,250,180,132,189, 53,229, 48,100,221, 40, 0,176,202,110,181, 76,103, 24, 2, 98,183, -192,144,241, 96, 15, 0, 30, 8,173, 54,190,202, 59,112,212,215, 75, 86, 13,245,243,243, 67,228,185, 59,152, 55, 99,204, 13,165, -210,185,174,198,195,213,149, 15,108,134,132,219,191,195,163,110, 1, 92, 53, 1,186,222, 93, 70,234,122,244, 26,136,152,155,209, - 88,190,240,171,203, 6, 70,185,224,169, 89, 84, 54, 97,253,241,208,161,135,127,135,175,194,218,119,133,197,102, 71,235,182, 93, -112, 35,234,242,152,252, 71,199, 38, 10,221,191,128,127,151,200,114, 48, 92,159, 23,252,157, 62, 40,155,171,229,229,168, 7,107, -222,188,121, 49,243,230,205,171,210, 35, 86,173,192,122,150,184,250,121,217,116,197,150,203,118,220, 77, 44, 64,183,150, 62,200, - 72, 79,195,129,109,223,243,160,128, 84, 46,205,178,219,249,163,165, 12,102,228, 95,217, 93, 84,157,184, 18, 83,217,254,185, 11, -150,222, 9,109, 28,192,174,140,204,190, 96,180,112,148,130,136, 8, 32,230, 41, 17,129,145,171,120,222,214, 16,156,135,163,174, - 38,106,231,105,121, 98, 0, 86,142,130,130,255, 67, 38,217,236, 60, 56, 30,224, 41, 80, 17,182,122, 1, 84,182,210, 75, 33, 97, -115, 2,243,202,230, 92,237,172, 16, 87,126, 13,124,157,157, 93, 32,151,176,160,229, 97,107, 40,174, 20,139,199,134,244,249,228, -205,128, 89, 75,126,185,191,101,242,138,219,231,188, 2,123,169, 69,114, 55, 15,109,232,176,242,222, 14, 0,199,155,210,175,111, - 61, 94, 19,238,114,193,181, 67,229, 29, 88, 55, 35, 62,106,118,215, 94,111,225,240,238, 77, 21,226,234,144,163, 60,158,238, 46, -153, 81, 49,137,245,173,212, 13,137,153, 6,164,230,152,144, 85, 80,166,119,189, 92, 37, 72, 77, 73,130, 74, 37,117,184, 19,243, - 14, 25, 56,150, 18,140, 0,197,214,172,219,187,151,196,199, 31,182,144, 22,163,251, 28, 63,188,107,254,163,135,247,199,180,233, - 60, 4,161, 29, 95, 71,228,150, 5, 83, 1,236,119,148, 55, 47, 47,175,216,221,221,253,236,103,159,125,214,111,253,250,245,121, - 0, 68, 69, 69, 69,202,129, 3, 7,250,230,230,230, 78,162,148, 38, 57, 36, 38, 69,248,121,236,152,177, 29, 7,246,239, 75,108, - 68, 98,217,251,251, 37,145,141,227,200,252,127,188,193, 69, 93,187,194,216, 56,142,124, 48,184, 29,127,229,210,121,102,218,168, - 62,220,107,175, 6, 35,250,110,162,247,200,161,131,230, 2,120,250, 91, 20,229,211,222, 30, 57,177,172,140,240,252,227, 57, 87, - 30, 78, 98,140, 93,125, 23,170,199,243,134, 68,232, 18,234, 81,163, 54,194,198,241, 48, 91, 56,152, 45, 28,140, 22, 59, 78,221, -206, 71,124,122, 9, 10,140, 54,148, 90,203,196,138,213,202, 3,112,172,209,170,188, 21,131,186,201,128, 77, 43,230, 77,103, 15, - 92,203,133,132,101,225,172,148,240,114,105,153, 32, 92,185,120,166, 40,176, 81, 99,116,234,241,182,236,217, 30, 44, 30,103,174, -222,199,247, 59,111, 96,233,244, 33, 16, 49, 4,227,230,254,138,119,186, 55, 4,207, 83,100,220,143,130, 79,195, 87, 33,147,202, -203,188,215, 86,222,145,186,211, 10,229, 43,107, 41,165,209,153,183,247,108,240,109,216,254,219, 71,215, 15,168,204,102, 43,111, - 21,169,250,233,111,236,143, 47, 15, 27, 4, 64, 2,160,148, 82,122,183,166,141,176,139,111,144, 59,207,217,135,212,246, 15,250, -252,253,137, 95,169,149,174,158,248,109,227,114, 10, 49,179,173, 70, 25,197, 89, 25,148,205,233, 42,228,203,219, 31,194, 16,148, -219,230,193,115, 86,182, 58,239,149, 95, 72,167, 73, 13, 27, 5,225, 82, 76, 42,190,157,245,209, 13,115,118,194, 8,139,179,251, - 72,107, 73,198,132,198, 33,161,208,104, 60,145,149,145,129, 14,125,187,163, 91,247, 30,136,185, 25,141,175,191,248,236, 50, 99, - 44,237,231,136,215, 22, 0,220, 27,182, 15,110, 18,218,114,100,253, 70, 77,161,207,205, 67,189,192, 38, 8, 12, 9, 29,233,222, -176,253,186,252,184, 51, 49, 16, 32,224, 63, 7, 7, 1,244,126, 82, 8, 61, 41,146, 42,121,160,170,194,213,202, 28, 21,225,159, - 38,224, 42,207,201, 2,224,208,246, 71,162, 39, 21, 99,197,181,186, 89,255, 48,137, 88,177,239,167, 37,211, 20,155, 47,219,113, - 47,169, 16,221, 90,249, 32, 39, 39, 23, 71,118,174, 53, 16,198,222, 59,243,198,254, 40, 71, 83, 67,225, 27,160, 21,113,226,221, - 51,190,250, 42,178, 93,155,150,182, 85, 71, 50,206, 20,219,192,243, 34,145,152, 45,229, 69,132,165, 34,202, 80,177, 76,161, 20, -121,189,210,218, 21, 15, 47,237, 85,169,131, 39, 27,245,181,238, 82,122,234,153,155,109,218, 43,189,248,114, 28, 69,101, 23, 21, - 5, 96,231, 40,104,197,178, 99,187, 99, 2,139, 33,192,166,227, 25,250,224,162,133,143,197,213,150,156, 50,113,229,226,236, 2, -153,164,108, 34, 48,117,120, 45,216,191,196,213,130,177, 33,125, 63,121, 59, 96,214,178, 29,241, 91, 62, 91,126,251, 44,128,251, - 34,185,155,199, 79,235, 22,203,180,181,228, 96, 0, 20, 24, 56,188, 53,252,249, 94, 28,157, 52, 1,111,180,104,215,103,102,167, -222, 67,112,232,183,159,184, 91,231,119,213, 72, 92, 1, 64,159, 78, 45,126,159,247,221, 50,223,207,166,207,150, 73,197, 20,197, - 38, 27,100, 18, 6,106, 87, 41, 60,148, 12,206, 70,238, 42,109, 23,164, 62,226, 8,151, 71,155,119,156,253,107,215,158, 55,109, -198, 52,246,167,181,107,255,169,109,210,239,112,250,173,125,247,105,244,143, 54, 0,159,169, 67, 6, 61,208,249, 94, 93, 92, 59, -184, 61,220, 60,117, 77, 60, 3,251, 57,229,220,219, 87,226,168,173,249,249,249, 41,117,235,214,125,176, 98,197,138, 70,227,198, -141, 43, 29, 55,110,156,175,201,100,218,225,168,184, 2,128, 86, 45,154,134, 78, 24, 55, 90, 44, 21, 49, 16,139, 25,212,243,237, -109,183,218,202,246,254,105,211,164,193,227, 18,246, 58,128,219,143,178, 49,245,251,227, 40, 40, 41,133, 72,196, 74,158,197,155, -124,249, 41,251, 92, 17,252, 65, 92, 57,201, 69, 48,149,214,100,171, 33, 66,173,118, 30, 54, 59,143, 82, 43,135, 82,139, 29, 38, - 11, 15,147,133,127, 92,252, 89,134,192, 86, 86,222,107,236, 98,165, 20, 69,245, 26, 54, 68,253,146, 66, 40,229, 12, 20, 82, 49, - 20,210,178,119,158, 35,215,242,144,104, 41,168,150,131,231,121, 88,203,189, 82,165, 86, 14, 42, 89,217,251,156,197, 86,182, 42, - 55,237,238,169,173, 89,241, 87,222,244, 14,108,205,250, 6,134,163, 84,230,144,153,110,148,210,163,132,144, 46,132,144,206, 0, -104,237,198,109,249,189,187,119,161, 79,239, 62,198,148,155, 7, 20,132,144,118,229, 85, 31,148,210,115,132,144,106,247,192,114, -246,105, 28,193, 83,108, 34,128, 2,148,191,163,241,169,173,108,255, 90,223,134, 17,157,122,177,117,253, 3, 97,177,113,216,188, -110, 41,189,116,114,215,100, 67,198,189,155, 53, 73, 75,109,157,134,200, 72, 73, 26,199, 67,244, 29,202,132, 21,104,217, 41,101, - 6, 39,239, 6,157, 21,238,126,207,244, 90,186,185, 53,119,110,210,170,163,111, 82,142, 21,135, 15, 31,134,177, 40,251, 43,139, -165,216,136, 82,186,225,196,158, 31,223,123, 99,244,151,206,173, 91,182,128,155,139, 10,181,220, 92,112, 45,234, 2, 22,204,157, -126,153, 49,150,246,211,235, 99, 29, 30,206,100, 40,243,207,190, 67, 70, 50,121,185,249, 88,242,205,231, 24, 51,249, 27,116,233, -247, 46,115,255,238,141,127, 2,232, 47,244,233, 2,254, 93,158,171,167,120,178,244,149, 60, 79,127,186,174, 36,138,170,186, 38, -229,215,150,167,112, 88,158, 16, 85,150, 39,238, 91,158,224,187,241, 66, 30, 44, 22,226,253,235, 23, 79,149,239,185,205,226, 81, - 90, 62,186,181,242, 65,182, 94,143,131, 91, 87, 24,108,188,121, 64,118, 13,196, 21, 0,136,108,232, 89,219,215,123,202,199,111, -246, 35, 59,110,229, 70,167, 51, 74, 78, 38, 23, 49,172,168,132, 21,203,141, 76,137, 73,202,138, 40,203, 80,171,149,109,214,101, -210,165,107, 54, 67,211,220,228,216, 25, 78,154,156,186, 46, 62,141,182, 21,101,220, 93, 90, 21, 47,199,217,145,149,147, 7, 31, -119, 37,178, 10,108,176,113,180,138, 48, 20,132, 16, 40,101, 44,140,134, 34,240, 92,245, 83, 8,148,206,154, 3,193, 69, 11, 19, - 42,196,213,214,156,178, 97,193,202,226, 74, 46, 97,193, 16,226,176, 7,139, 16,162,248,110, 92, 80,159,207,134,150,137,171, 73, - 75,111,158, 3,112,159, 82,154,171, 13, 29, 6, 79,103, 9,198,126, 31, 11,149, 74, 2,119,165, 4,162,231, 56,200,200, 73, 19, -240, 70,243,118,125,214,117, 25, 56,134,217,187,225, 59,251,221,155,231,135,214, 68, 92,113, 28, 71,108, 54, 27, 58,181,109,146, -118, 45, 54,241,204,220, 47,102,181,111,221,229, 77, 89,187,134,222, 48, 90,236, 72, 75, 78,193,217, 35, 59, 74,125,220,197,167, - 27,212,241,200,176,217,108,213,118,224,249,126, 86, 99,105,129,217, 44, 18, 73, 84,131, 7,246, 34, 81,209,209, 91, 52,193, 3, -118, 3, 36, 6,132, 15, 2, 65,255,102, 65,254,200, 7,133,165,212,100, 86,139,164, 53,158,152,156,148,148,116, 98,249,242,229, -193, 98,177, 88, 19, 25, 25,201, 27, 12,134,223,106, 18,223,110,183, 83,134, 16, 18, 29, 95, 98,117,115, 18,147,122, 26,153, 72, -161, 98, 96,178,208,199, 66,235,246,163,108,108, 59, 28,131,248,212, 2,104, 60,228,140,143, 59, 3,187,157,203,127,158, 6,133, -101, 24, 40,101, 98,168,228, 44, 84, 50, 17, 20, 50, 17, 44, 54,199, 55, 10, 39,160, 9,103, 47, 94, 11,106,215, 40, 8,209, 15, - 13,184,147, 98,129,217,202,129,130,130,148,123, 25, 93, 21, 98,100,103, 36,129,167, 92, 82, 77,237, 19,177,162,146,238,253,254, - 60,161, 93,169,114,178, 73,101, 12, 84, 18, 73,181, 28, 54,142, 67,219, 22, 13,224,174,169,141,169, 11,119, 1, 0, 86,204,124, - 3,106, 23, 22,219,126,166,200,190,189,119,148, 58,120,192,183, 41,183, 79, 77, 77,189,121,252,141,206,109,188, 89,141, 60,223, -129,106, 68, 6, 0,224, 1, 28,162,148,218,253, 26,133, 63,236,209,189,135,206,206,115, 25,148,210, 51,229,129,164, 0,218, 19, - 66,186,162,154,125,228,202, 26, 99,242, 83,244,213, 43, 94, 86, 59,197,241,243, 55, 90, 71,188, 26, 10,139,141,194, 80,106,197, -181,232, 27,216,251,219,102,227,221,219, 87, 71, 24, 51,239, 57, 92,151,178, 82, 18,143,165, 38,222,239, 61,108,204,116, 89,243, -176,206, 31,238,219,190,234, 13, 90,238,194, 34, 4,168,251,234,176, 43,222, 77, 6, 52, 20, 57,121, 51,176, 22, 80, 67,118,194, -197,170,120, 10, 10,156,140,247, 98,175, 23, 60,202,180,184,137,220, 26, 64, 44,113,122,159,184,250,254,192,202,148,211,117,175, -190,231,124,234,252, 37,196, 94, 63, 7,173,167, 10, 9, 15,239, 27, 99,111, 70,173, 53, 64,242, 13,213,199, 58,188,232,200, 43, -168,163, 38,160, 97,147, 78,206,110, 94,216,181,109, 45, 10,243,115,151,156,136,220, 53,169,115,223,225,240,243, 15,234,228, 21, -212, 81,163,143, 61,149, 5, 1, 2,254,255,112,181,154,235,151,193,249, 82, 33,122,122, 71,107,151,123,122,215,193,111, 31, 15, -199,236,121,223,227, 86, 92, 18, 14,111,255,161, 92, 92,237,189,232,160,160,120,124,218,118,113,214,253,199,123, 89,141, 12,175, -133,145,143,223, 41, 61,171,142, 60, 99,115, 58,128, 67,207,226, 4,128, 82, 67,209,219,147, 62,255,114,101,219, 87, 91,233,218, -117,238,238,108,231,228,160, 79, 12,137, 80, 0, 94, 42,138, 71, 55,143, 21,232, 83,239,222,227, 77,249, 99,159,197, 73, 8,145, -205, 30, 25,120,126,206,192,224, 57, 59,207, 91,118,156,230, 62,120,175,115,120, 3,141, 88,230, 84,222,125,145,178,255, 24, 2, -169,148,173, 82, 93, 84,197, 57,127,108, 80,239,201, 67, 27,206, 94,190, 51,126,107,185,184,186, 71, 41,205,173, 8, 35, 97, 89, -184,168, 36,112, 81, 74,224,174, 18, 87,203,249,167,206,207,187, 81,207,150, 21,226,106,163, 99,226,170, 10, 59,163, 6, 14, 28, - 24,250,209, 71, 31, 73, 63,251,176,207,233,211,151, 98, 31,254, 18,249,107,215,188,220, 34,111,142,227,160, 82, 73, 51,195, 27, -121,254, 30, 80,199, 35,237,214,173, 91,252,241,227,199, 75, 57,142,187,246, 44, 78,186, 99, 7,231,217,100,192,174,168,235,183, -134, 55,111, 22,140,149,223, 47,106,116,255, 97, 98,163,248, 71,201,208,233,116,208,233,116, 40,178, 43,241,240,242,109, 24,139, -115,247, 39,198,238,181,214,244,217,199,142, 29,251, 90, 65, 65,129,100,229,202,149, 61, 59,116,232,176, 71,171,213,190, 54,122, -244,232,139, 63,254,248,163,201,145,103,143,190, 30,179,243,167,141, 91,198,188,241,122,127,137,217,206,112, 87,239, 23,219,228, -108, 41,241,247,117, 97, 47, 68, 39,240, 27, 14,222, 70,129,153,133,191,206,133,105,228, 3,114,237,194, 46,254,244,189,155,151, -121, 17,153, 94, 19, 59, 31,139,206,146,178, 45, 59, 84,229,251, 77,169,100, 34, 88, 57,199,242, 8, 0,196, 86,229,152,137, 99, - 63,124, 20, 28,210, 98,236, 27,239,141,145,180, 14,168,139,171, 15,138,224,225, 36,134,183,187, 20, 57,250, 92, 68,237, 89,108, - 47, 72,189,181,150, 17, 99, 94, 77,211,179,242, 86, 12,234,198, 3,199,172, 92, 60,157, 61,114, 45, 15, 82, 25, 3,149, 84,198, - 43,149,108,181,118,230, 23, 20, 95, 92,184,124,109,216,187,111,245, 71,207,176,186, 56,123, 51, 13, 60, 45, 27,170,231,248, 50, -111,157, 62,118,175,101,194, 91,245,206,143,238, 23,160, 46, 52,233, 27,204, 78,180, 94, 38,132, 48, 21, 59,135,255,169, 44, 81, -122,132, 16,194, 2,104, 13,160, 43, 33,228, 44,165, 52,226, 9, 59,252, 0, 4, 3, 72, 40,127,129,225, 29,120,118, 98,181, 83, - 36,100,153,112,225,194,121,152,141, 69,136,143,127,128,223, 15,239,137, 42, 46,204,221, 32,183,211, 93,198,156,123, 37,142,214, - 35, 0, 48,241, 37,159, 45,156, 57,138,111,209,190,123,247, 94,131, 70, 74,167,124,189,206, 45, 62,254, 1,199,243,128,202,191, -167, 84,231,175,106,204, 80, 43,205,189,187,207,146,124,109,255, 49,142, 97, 38, 87,197, 73,233, 41,187,147,119,195,181,231,207, -159,254, 92,174,109,129, 70,189,167,247, 78,187,177,175,183,119, 80,119,120,214, 15, 71,250,141,189,184,121, 97,219,145,107, 28, - 55, 75,206, 33,165, 68, 31,103,168,137,157, 0,192,151,114,131,131,155, 71, 48, 38,179, 5, 49,215, 46,166, 20, 60, 58, 59,251, -142,202,121,208,171,221,134,250,213,111,252, 42,147,114,239,214, 96, 0,223,215,132,243, 69, 32,112,254,111,114,254,221, 32,122, -250, 27,172,184,244,234,205,123,178, 94,239,127,131,232,152, 4, 28,251,109, 85,141,196,213,191, 11,185,177,187,162, 0,180,212, -132,188,217,239,210,213,232,121, 77,154,183,241,224,249,127, 45, 71,162, 60,207,222,188,122,206,144,155, 24,157,110, 55, 27, 62, -203,188,249,107,181,251,183,140, 30, 80,175,195,156,247,203,118,104,159,178, 91, 23, 98,231,182,177,145, 98,137,158,128,160,252, -127, 16, 66,192, 48,101,223,109,118,155, 35,203,171,188, 63, 25, 28, 56, 98,197,174,248,173,159, 44,185,121,182,194,115,245,135, - 78,215,104,133,139, 82, 2, 23,149, 24, 42, 23, 9,216, 26,166,133, 84, 44,255,176, 83,223,247, 29, 22, 87, 85, 65,175,215,223, - 32,132,220, 93,180,104, 81,171, 53,107,214,212,159, 60,121,114,210,218,175, 71,255, 4, 0, 71,142,148,141, 8,222,187,119, 15, - 43, 86,108, 55,151,150,150, 62, 48, 24, 12,151, 41,165,213,122,156, 56,177,120,218,198,181,171, 27,101,246,121,189,101, 29,255, -134,112,243,110,136, 48, 93, 67, 20, 24,109,136, 73,201,195,195, 7,215,113,251,226,129, 91, 82, 94, 50,185, 38,246, 14, 25, 50, -132, 85,171,213,109, 8, 33,225,205,155, 55,111,220,191,127,255,188,180,180,180,144,132,132, 4, 94, 34,145, 20,205,153, 51,231, -218,156, 57,115,170, 29,123, 43,206,186, 51,205,201, 39, 36,114,201,210, 31,166,126,248,193,123,109,134, 12, 30, 32,182, 51,206, -252,141, 4,179,125,233,206, 88, 18,226,175,102, 66,164, 70,114,241,212, 94, 62,246,198,229, 75, 28,143,111, 75, 50, 99,207, 62, -111,185,205,200,183,160, 75, 51, 15,152, 74, 57,148,218, 40,172, 28, 30, 15,161, 57,130,242,243, 20,103, 42,116, 77, 86,199, 76, -250,112,118, 72,171,136,183,218,245,124,135, 81,212,114,198,233, 3,235,105,194,245,200, 93, 34,194,127,105,200,190,159,240,226, - 13, 41, 10,235, 7, 52, 70,162,165, 0, 46, 50, 9,148,114, 22, 42,185,184,250,178,228, 81,216,227,196,137, 51,239,252,126,252, -204, 87, 93, 94,139,240,152, 61,178, 63,118, 28, 60, 15, 39,133, 4,148,231,240,230,107,117, 6,222,217,214,173,151,159,151, 82, -187,235,116,202,185,113, 75,111, 79, 51, 24,172, 15,170, 59,150,165,124, 7,255,139,132,144, 70, 0,250, 18, 66,236, 0, 20, 0, - 12, 40,219,155, 70, 1,224, 66,117,251,200,253,241, 25,233,136,176,176,214,155, 9,168, 20, 20,235,142,239,197, 33, 30,226,132, -146,172, 91,250,231, 77, 55, 99,202,189, 12, 0,111, 59,251, 52,142,184,121,241,196,156,246, 61, 6,135,182,239, 61, 76,156,152, - 99, 3, 47,114,130,225,225, 57,107, 98,212, 47,183,236, 22,243,156,146,204,184,211,207,226, 50, 48,202, 5,215, 15, 44,104, 23, -208,105, 66,155, 90,245,195,225, 94,167, 5, 0,160, 48, 53, 6, 41, 87,127, 59, 80,148, 46, 30, 70,233,173,231, 94,221, 39,146, -203,135, 54,104,220, 28,113,177, 55, 96, 50, 22,255, 66, 41,229, 61,234,183,255,229, 97,220,205,207,181,254,161, 96,164,242,161, - 79, 19, 88, 2, 4, 8,120, 74,187,242,180, 61,253,212,205,250,135, 49, 84,188,143,231,237, 10,150, 21,153, 56,216,250,213, 84, - 92,253,187, 85, 51, 25, 50,132,213, 36, 72, 71,137, 68,162, 78,169,151,127,126, 29, 0,188, 91,189,247, 51,203,217,206,164, 95, -223,182,241,105, 27, 24, 62,201,217, 63, 66,219,185, 67,104,173, 58,147,150,223,190, 3, 32,182,186, 77, 68, 29,244, 12, 73, 1, - 4, 0,112, 2,240,128, 82,154, 83, 57,188, 54,244,237,206, 44, 43, 86, 84, 12, 11,178, 0,120, 80,211,163, 75, 27,143, 59,154, -158, 78,222, 13,219,179,172,232, 35,187,141, 91,111,200,190,123,236,133,211,147, 16,165, 84, 42, 13,243,246,246,214,206,156, 57, - 83,113,245,234, 85,209,225,195,135,205,197,197,197,105,197,197,197,103, 41,165,198,154,112,146,142, 29, 69,234, 92,247, 65, 96, -105, 87, 15, 47,109, 39, 15, 79,111,207,188,156,140,188, 92,125,230, 9,194,115,199,178, 37,234,157,229,243,178,106, 92,150,198, -141, 27,215,149, 16, 18, 72, 41,173, 67, 8,121,200, 48,204,131,210,210, 82,135, 61, 88,127, 72, 71,159,144,118, 42,133,116,218, -187,195,222,110,221,175, 95, 95,230,226,141, 36,156, 62,113,136,187,114,225,212,149, 82,139,125,126, 73,198,237,179, 47, 82,230, - 53,205, 94, 79,164, 92,213,219, 52,136,196, 98,125,250,181, 63,158,251,231, 8,167,147,119,227,198, 32,152,206, 80,136,237,132, -255,214,152, 17,119,237,101,213, 77,109,179, 55,250,115, 54,219,159, 38,180, 75,100,226,210,148,232,127,173, 34,124, 86,190,107, -242, 92,223,225, 40,190, 10,239,216,203,163,206, 43,245, 17,115,108, 57, 14,253,131, 92,252,253, 90,118,244,103, 75,175,237,141, - 79, 51,223,174,124,106,129,163,118, 18, 66, 52, 0,122, 82, 74,127, 34,132,140, 4,112, 13, 64,204,179, 68,218,255,199,219, 60, - 33,132,168, 52,254,131, 84, 78,234,111, 35,122,189,227,113,242,192,207,197, 22,115,225, 63, 12, 25, 15,118, 62,205,214, 63,181, - 33,154, 38, 74, 21,108, 83, 61,234,181, 30,165,240,240, 83, 25,114, 18,243,243,147,162,150, 26,179, 52,203,170,155,167, 90,157, -157,193,157, 71,166, 13, 31, 55,215,109,247,150,101,136,191,115,173, 89, 78,220,241, 7,158, 13, 59, 55,240,245,111,114,163, 93, -191,143,112,120,211,215,246,248,115, 27, 92,171,106, 67, 5, 47,142,192, 41,224,233,111,131,127,217, 7, 64,200,127, 35, 39,202, - 28, 83, 94, 0,156, 94,182,157, 0, 36,255,109,233, 9,192, 77,161, 80,244,112,117,117,237,135,178, 73,198, 47,197, 78,247,214, -111, 59,255, 39, 63,187,202, 59,184,157,119,189,150,187,213,175, 52,223,173,242, 14,110,247,119, 46,243,255, 14, 78,116,232, 32, -210, 4,247,127,207, 51,184, 95,226, 27, 3, 59,196, 70,132,168, 59, 85, 87,199, 28, 44,159, 67, 0,140, 4, 48,228, 63, 61, 61, -129, 14, 34,165,182, 89, 19,248,248, 40,158,187, 13,105,220, 88,162,244, 10, 82, 3, 29, 68, 47,203, 78,247,122,237, 38, 7, 68, -188,155,233,230,223, 97,126,229,251,110,254,237,167,215,107, 59, 44,213,189, 94,187,201, 66,153, 23, 56,255,106,206,191,219, 71, - 36, 72,204, 42, 69, 39,197,191, 86, 25,188,108,110,235,127, 97,122, 20, 0,136,124,217,188, 47,115, 35,200,191, 2,229,158,170, -179, 66,141,120, 73,229,232,212, 41, 59,128, 13, 0, 54, 84,158,103,245, 18,202,231,142,255,158,186,116,202, 14,224,214, 11,113, -196,198, 90, 1,100,191,212,186,248,240,204, 66, 84,177,107,110,126,252,233,111, 0,124, 35,148, 94, 1, 2,106, 14, 70, 72, 2, - 1, 2, 4,252, 63,136,118, 94, 72, 5, 1, 2, 4,252,157, 65, 80,126,164, 76, 21, 13,160,195, 99,171,132,144,144,231,104, 96, -111, 11,156, 2,167,192, 41,112, 10,156, 2,167,192,249,191,197, 89, 29,247,223,101,110, 23,169,230,224,250, 23, 35, 23, 38, 0, - 10,156, 2,167,192, 41,112, 10,156, 2,167,192,249, 63, 8, 97,136, 80,128,128,234, 27, 18, 53, 33, 68, 45,164,132, 0, 1, 2, - 4, 8,248,143, 21, 88,142,118, 86, 47,210,169, 9, 29,226, 95,146,111, 34, 66,200,167,238,238,238,151,234,213,171,151,237,234, -234,122,137, 16,242, 25, 33, 68,252,188,156, 58,157,174,141, 86,171, 93,225,237,237,189, 74,171,213,134,255,133,182,107, 9, 33, -218,231,140,251, 21, 33,120, 88,246, 33, 95, 9, 37, 65,128, 0, 1, 2, 4, 56,130,167,174, 34,108,215,174,221, 57,145, 72,164, - 19,137, 68,142,158, 99, 70,109, 54, 91,218,169, 83,167, 34,170,233,172, 38,149,127, 95, 66, 41,157,253, 34,225, 28,136,187,130, - 82, 58,237,121, 58,100, 0,160,148,166, 3,128,175,175,175, 63,207,243,237,197, 98,113, 67,155,205, 22,199, 48,204,153,212,212, -212,135,255, 97, 2,136,109,220,184,254, 48,150,144,182, 0,220, 0, 20,216,121,122,193,203, 75,187,249,212, 41,199,246,200,169, - 16, 82, 0, 38,168, 84,170,193, 74,165,242,149,146,146,146, 71, 38,147,105,143, 84, 42,237,180,124,249,114, 93, 88, 88,152,179, - 94,175, 39, 12,195,168, 15, 28, 56,240,246,242,229,203,187, 16, 66,122, 83, 74,237, 53,181,153,227,184, 97,251,246,237, 11, 6, -128, 94,189,122,141, 32,132, 92,162,148,242, 79,166,127, 21, 54, 18, 31, 31,159,112, 0,200,200,200,184, 64, 41,165, 90,173,182, -173, 76, 38, 27, 1, 0,165,165,165, 63,167,167,167,159,127, 9,101, 73, 77, 8, 38, 85,108, 92,203, 48,228, 83,103,103,231,173, -197,197,197,247, 43,254, 94,110,103,182,208,148, 8, 16, 32, 64,128, 0,135, 4, 22,195, 48,186,117,235,214,121, 41, 20, 10,144, -242,195,246, 72,165, 67,247, 8, 33,143,175,109, 54, 27, 76, 38, 19,198,142, 29,107,175, 65,103,245, 89,215,174, 93,187,201,229, -242, 63,108, 44,105, 54,155,197,132, 32,168,226,212,121,134, 33,147, 8, 33, 63, 56,210,137, 85,252,134,197, 82,202,136,197, 82, -176, 44, 51,161, 89,179,102,161,122,189,254, 20,128,117,233,233,233,185, 14,112,252, 2,160, 15, 33, 4, 78, 78, 78, 87,253,253, -253,115, 63,248,224, 3,239,206,157, 59,163,110,221,186,200,200,200,104,115,242,228,201, 17, 45, 91,182,204,204,204,204, 60, 65, - 41, 61,149,158,158,126,255, 5,197,145,151,135,135, 71, 79,137, 68, 34, 97, 24, 38, 63, 61, 61,253, 2,165, 52,179, 38,226, 42, - 36, 40, 96,209,168,209, 99, 26, 13, 28, 56,208, 71,161,116,150, 39, 39,199,167,175, 93,179,218,245,220,217,243,205, 8, 33,147, -202,119,191,118,196, 75,181,255,139, 47,190,208, 70, 68, 68, 56,231,230,230,194,110,183,215,218,179,103,207,168,230,205,155, 59, -235,116, 58,233,166, 77,155, 80, 82, 82, 2,142,227,220,253,253,253,221,135, 14, 29,106,217,180,105,211, 4, 0,139,107,250,220, - 60,207,179,229,255, 18,142,227,196, 0, 88, 66,200,156,234, 4,145, 78,167,107,213,191,127,255,249, 50,153, 12,219,182,109,219, - 1, 96, 57,128, 55,143, 29, 59, 22, 0, 0, 17, 17, 17,111, 2, 56,239,230,230,214,140, 16,124,202,243,101, 71, 39,213,164, 44, - 85,133,222,189,251,128, 16,178,194,219,219,251,124, 78, 78,142,142, 16,188,249, 60,194, 77,128, 0, 1, 2, 4,252, 15, 11, 44, - 0, 80, 40, 20,216,191,127, 63, 40,165, 96, 24, 6, 44,203,150, 31, 17,195, 32,170, 36, 4,102,187, 24, 37, 25, 55, 49,168,185, - 24,205,155, 55,255,131, 0,123, 90, 31, 94, 89,160, 77,156, 56, 17, 26,141,230, 15, 1,178,178,178,112,226,196,241, 42,227, 56, -170, 55, 42, 95,204,157, 59,215, 53, 47, 47,175,247,250,245,235,187,248,248,248,124,153,145,145,113,182, 26,207, 85,159,138,137, -255,221,186,117,107,245,227,143, 63,222, 41, 46, 46,182, 94,190,124,217,186,122,245,234,244,215, 94,123, 77, 59,120,240, 96,201, -132, 9, 19,188, 31, 61,122,244,206,254,253,251,223,113,119,119,223,151,159,159,191,224,121, 50, 64,165, 82,133,244,239,223,191, -203, 79, 63,253, 36, 85, 42,149,120,248,240, 97,173, 97,195,134,105, 8, 33,191, 60,121,148,206,211,208,184,113,253, 97, 31,142, - 26, 21, 56,230,163,113, 45,172, 86,139,241,102,244,169, 19, 34, 9,195,142, 29,251,190,107,110,110,150, 7,207,211, 97, 40,219, -127,168, 58, 76,152, 57,115,166,143,191,191,127,237,173, 91,183,162,164,164, 4, 0,188,234,213,171,135,128,128, 0,238,244,233, -211, 8, 12, 12,132,179,179, 51, 78,159, 62,141,139, 23, 47,162, 69,139, 22, 78, 18,137,228,245,103, 9, 44,157, 78,215, 68,167, -211,205,210,128, 73,109, 7, 0, 0, 32, 0, 73, 68, 65, 84,148,103,118, 69,250,134,134,134, 98,226,196,137, 48,155,205,104,208, -160, 65, 61,133, 66,113,254,244,233, 83,142,136,107,185,167,167, 39,198,140, 25,131,146,146,146, 33, 58,157, 46,129, 82, 42, 42, -183, 23,148, 82,117, 64, 64,192,230,142, 29, 59, 54,216,183,111, 47,121,222,202, 65, 41,205, 38,132, 44,233,219,183,207,167, 0, - 65,167, 78,157,242, 38, 78,156,200,221,185,115,167,221,160, 65, 3, 91,223,187,119,255,165, 8, 55, 1, 2, 4, 8, 16,240, 63, - 36,176, 42, 60, 84,199,142, 29,131,197,242,231,163,230,220, 59, 52,199,228, 65,117, 48, 98,252, 70,108,127, 16,143, 38, 77,154, -224,201, 21,137, 79, 28,210,154,205,178,236, 58,134, 33, 31, 18, 66, 16, 26,218, 60,123,209,162, 69, 85, 29,139, 98, 11, 13,109, -158,205,178,140,154, 82, 10, 66,152,181, 60,207,101, 87,197,249,180, 14, 81, 42,149, 77, 2, 0, 31, 31,109,246,193,131, 7,109, -131, 7, 15,198,194,133, 11,165, 83,166, 76,249, 66,167,211, 13, 79, 75, 75, 75,123,154,157,149,225,231,231,135,184,184, 56,204, -152, 49, 35, 51, 43, 43,107, 93,102,102,102,220,150, 45, 91,234,212,171, 87,111,196,154, 53,107,234,133,135,135, 51, 61,122,244, -192,129, 3, 7,154, 85, 97, 75,117, 75, 95,197, 0, 94,233,216,177, 99,231,157, 59,119, 74,139,138,138,144,148,148, 4,165, 82, -137,217,179,103, 59,127,244,209, 71,237, 1,236,114,132,147, 37,164,109,191,254, 3, 52, 22,139,169,196, 98, 49, 23, 39, 36, 69, -101,164,167,223, 41,104,224,223, 66,221,173,123,152, 71, 92,220,195,182, 79, 19, 88,149, 57,229,114,249,235,109,219,182,117,222, -186,117, 43, 90,182,108, 9, 87, 87, 87,156, 60,121, 18,183,110,221, 66, 94, 94, 30, 67, 41,133,147,147, 19,230,207,159, 15, 63, - 63, 63, 20, 23, 23, 35, 49, 49,177,150, 88, 44,246,124,150,157, 60,207,247,218,184,113,163,198,211,211, 19,118,187, 29,148, 82, -216,237,118,240, 60,143,140,140, 12,148,148,148, 64,165, 82,193,108, 54,227,204,153,211, 85,138,229,202,156,105,105,105,103,214, -172, 89,115,166, 97,195,134,237,167, 76,153, 2,137, 68, 50,181,160,160, 0, 11, 23, 46,132, 82,169,196,220,185,115,189, 67, 67, - 67, 1,192,102,183,219, 43,202, 18,165, 20,223, 87, 22, 65,142,172,128,241,245,245, 61,150,157,173, 15,127,237,181,215,144,159, -159,111,155, 61,123, 54, 66, 67, 67,209,160, 65, 0,170, 75,207,151, 5,129, 83,224, 20, 56, 5,206,255, 5,206,191,165,192, 34, -132, 80, 74,203,134, 81,158,248,142,157, 59,119, 86, 25,241,189,197,177, 16,177,101,253,223,170, 85,171,144,151,151, 87,173,183, -137,227,184, 79, 52, 26,141,105,234,212,169,157, 26, 52,104, 96, 27, 59,118,236,181,196,196,196,137,149,195,212,173, 91,119,217, - 15, 63,252,128, 7, 15, 30,228,204,159, 63,255, 68, 86, 86,214,244, 26,102,250, 44, 66,200, 10, 0, 72, 79, 79,207, 61,112,224, - 64,203,211,167, 79,127,182,100,201, 18,239,113,227,198, 73,199,143, 31,255, 33,128, 47,158, 18, 55,157, 16,178, 69,167,211,189, - 19, 17, 17,129, 1, 3, 6,228,182,109,219,214,122,229,202, 21,239, 75,151, 46,205, 90,177, 98, 5, 63,124,248,112,166, 93,187, -118,208,235,245,248,237,183,223,248,228,228,100, 70, 38,147,153, 28,118,175, 17,210,137,101,217, 79, 25,134, 9, 13, 10, 10,186, - 59,122,244,232,219,121,121,121, 57,169,169,169, 48, 26,141,176, 90,173, 16,137, 68,144, 72, 36, 53,216, 63,131,184, 42,149, 10, -201,197,243,123,142,164,167,198,230,100,100,221, 46,100, 64,153,244,244,168,194,192,192, 78, 30, 40,155,147, 85, 45,156,156,156, -234,233,245,122,148,148,148,192,205,205, 13, 75,150, 44,129, 90,173,134,201,100, 66, 92, 92, 28,245,245,245, 37, 39, 79,158,132, - 78,167, 67,126,126, 62, 44, 22, 11,140, 70, 99,150,197, 98,121,230,243,139,197,226,125,195,135, 15,111,175, 86,171,149, 21, 30, - 44,158,231, 81,191,126,125,140, 27, 55, 14,219,183,111, 71,124,124, 60, 40,165, 54,157,206, 55,155, 97,136, 26, 0,101, 24,118, -139,221,110,207,174, 34,159,168,175,175,239,220, 89,179,102,249,174, 94,189,250,149,137, 19, 39,130,227, 56,240, 60, 15,142,227, -144,157,157,141,125,251,246,225,252,249,243,214,184,184,184,237, 46, 46,174, 49, 38,147, 41,170,180,180,244,145,163, 41,234,235, -235, 43,231,121,254,131,128,128,128,158, 67,135, 14,181, 73, 36, 18,152, 76, 38, 24,141, 70,220,190,125,219,214,179,103,207,188, -190,125,251,120, 28, 60,120,144, 82,138, 37,130,247, 74,128, 0, 1, 2,158, 15, 79,211, 32,127, 27, 15,214,211, 30,234,231,159, -127, 6,165, 20, 44,203,130, 97,152,199, 67,132, 37,233, 60,222, 27,191, 25, 18,150, 71,100,100, 36,154, 53,107,230,208, 15,242, - 60,191, 60, 50, 50, 50, 44, 34, 34, 66,212,165, 75,151,230,117,234,212, 9, 77, 74, 74,186, 14, 0,117,234,212, 9,237,218,181, -107,115,181, 90,141,101,203,150,153,121,158, 95,254,156,202,186,114,103,119,217,207,207,239,203,221,187,119,175, 30, 61,122, 52, -124,124,124,154, 86, 19,119,116,247,238,221,155,125,254,249,231,152, 49, 99,134,117,221,186,117,246, 49, 99,198,136, 58,118,236, -136, 77,155, 54, 49,247,238,221,195,186,117,235,248,221,187,119,103, 18, 66,216,238,221,187,107,106, 80,136, 58,104, 52,154, 95, -118,236,216,193,183,106,213, 74,126,255,254,253, 70,147, 38, 77,210,100,100,100, 28,109,208,160, 65,174,209,104,132,221,110,135, -193, 96, 0, 0,139,163,188, 12, 75,178, 82, 83, 31,169, 75,173, 5,230, 30, 29,195, 39,233, 19,115,224, 85,183, 63,126, 63,189, -115,105, 82, 74, 60, 79, 24, 56, 52,212, 88, 82, 82,242,200,110,183,123, 0, 80, 31, 59,118, 12, 94, 94, 94, 40, 46, 46,134,213, -106,133,201,100,178,186,187,187,203,114,115,115, 81, 90, 90,138,210,210, 82,184,184,184, 32, 58, 58, 58,207,110,183, 31,122, 22, -111,114,114,242, 29, 0,221,158, 16,210, 50,134, 97,142,219,108, 54, 60,124,248, 16,119,239,222,237,156,152,152, 88, 90,158, 78, - 90, 0,176,219,237,233, 79,227, 76, 77, 77, 53,123,121,121,125,254,254,251,239, 79,212,104, 52, 33, 0,224,239,239,239, 50,105, -210, 36, 44, 88,176, 0, 49, 49, 49,179,196, 98,241,165,180,180,180,210,154,150, 31,141, 70, 19,164, 80, 40, 38, 79,152, 48, 65, - 19, 20, 20,132,210,210, 50, 10,103,103,103, 24,141, 70,184,184,184, 32, 44, 44, 44,238,203, 47,191,180, 82,138, 81,148,210, 44, -161,137, 20, 32, 64,128,128,151, 35,178,254, 86, 30,172,114, 97, 65, 8, 33,244,137, 7, 46,235,192, 25,230, 15,226,138,101, 89, - 12,106,201,162,184,129, 63, 24,166,108, 40,209,110,119,108, 17,153, 94,175,207,242,245,245,221, 19, 29, 29, 61,120,200,144, 33, - 56,113,226,196,199, 0, 62, 0, 0,150,101, 63, 30, 50,100, 8,162,163,163,113,247,238,221, 61,122,189,254,165,116, 92, 86,171, -213,104,179,149,141, 70,202,229,114, 73,181,130,133, 97,172, 18, 73, 89,176,251,247,239, 15, 24, 63,126,252,128,238,221,187,143, -236,221,187, 55,246,237,219,135,141, 27, 55,126, 13,224, 68, 68, 68,196,230,154,216,193,178,236,164,237,219,183,219, 35, 34, 34, -156, 41,165, 8, 14, 14,118,158, 60,121,178,117,225,194,133,245,134, 15, 31,158,155,154,154,138,162,162, 34,100,102,102, 90,147, -147,147,227, 29,229,181,115,252,137, 21, 43,126,208,141,250,160,191,102,231,129,245,243,126,219,117,179,233,219,111,102,198,106, -117, 77,188,150,175, 60, 47,183,219,249,189,142,240,152,205,230,223, 14, 30, 60,248,102,157, 58,117,212,183,110,221,130,217,108, - 6,207,243,232,217,179, 39, 0,200, 42,194,197,197,197,153,141, 70, 99,118,108,108,108,113, 82, 82,146, 13,101,147,204, 29,169, - 64,143, 87, 7, 90,173,214,119,122,245,234, 5,142,227,208,163, 71, 15,220,184,113,227, 29, 0,235, 42,254,238,104, 89, 2, 48, - 13, 0,116, 58,157,135,171,171,235,190, 10,239,152, 70,163, 57, 31, 29, 29,109,243,245,245, 29, 42,145, 72,194, 76, 38,211,206, -204,204,204, 51,213,113,106,181,218,240, 6, 13, 26,204, 92,184,112, 1,209,104,188,193,113, 54,216,237,118,100,103,231,160,164, -164, 4, 65, 65, 65,240,243,243,195,252,249,243,193, 48,204,126, 65, 92, 9, 16, 32, 64,192,139,163, 42, 13,242,223, 14,230,201, - 7,172, 78, 92, 85,124,151,136, 88,120,214,114,135,103, 45, 15,184,187,187,131,227, 56, 56,170, 62, 25,134,217,180,117,235, 86, -139,171,171, 43,250,246,237, 27,232,227,227, 19,225,227,227, 19,209,183,111,223, 64, 87, 87, 87,108,221,186,213,194, 48,204,166, -151,164,138, 25,150,101,135, 69, 68, 68, 32, 43, 43, 11,143, 30, 61,186, 92,147,248, 41, 41, 41,197, 25, 25, 25,219, 13, 6, 3, - 68, 34, 17,204,102, 51, 0,156, 2, 80,227,179,212,120,158,111,213,170, 85, 43, 69,197, 92,181,132,132, 4, 56, 59, 59, 59,167, -164,164,168,141, 70, 35, 44, 22, 11, 10, 10, 10,112,237,218, 53, 35,128,116, 71,121, 99, 98,238,239,137,186, 18, 21, 29,121,244, - 44,243,202, 43, 77,189,124,117,202, 34, 79, 47, 95,231, 67,145,183, 20,153, 25,185, 15, 99, 98,226, 29, 61, 12,119,249,238,221, -187,115,163,163,163,239,250,250,250, 38,187,186,186, 82, 0,200,200,200,248,195,231,234,213,171,178,200,200, 72, 99, 82, 82,210, - 62,148, 45, 10,176, 59,144, 15, 95, 17,130,123,132,224, 30,203,178,139,154, 53,107,246,118,120,120, 56, 82, 82, 82, 16, 30, 30, -142,224,224,224,183, 61, 61, 61,189,107,152,183,222,132, 16,109, 80, 80,144, 74,165, 82, 45, 29, 57,114, 36,236,118, 59,186,116, -233, 2,131,193,176, 94,171,213,254,163,123,247,238, 31,255,248,227,143, 77, 53, 26,205, 39, 14,210, 14,125,235,173,183,136, 82, -169,130,205,102,131, 84, 42,133, 74,229,132,122,245,234,161, 83,167, 78,160,148,162, 83,167, 78,252,154, 53,107,246, 41, 20,138, -205, 66,179, 40, 64,128, 0, 1, 47, 79,100,253, 45, 61, 88, 79,233,192,192,113, 28, 8, 33,184, 84, 24, 2,179, 93,132,194,148, - 40, 12,105, 37,125, 44,180, 88,150, 5,203,178,176,217,108,112,244,216,157,228,228,228, 2, 31, 31,159, 95,207,159, 63,255,238, -192,129, 3,113,228,200,145,209, 0, 48,112,224, 64,156, 63,127, 30, 15, 31, 62,252, 53, 35, 35,163,160,134,157,173, 39, 0,182, -178, 71, 65,163,209,188, 82,187,118,237,143, 71,141, 26,213,166, 73,147, 38,216,178,101, 11, 0,156,112,216, 51, 84,230,149, 83, - 3, 40,121,226,217, 36, 0,156,121,158,175,209, 38,155, 12,195, 92, 61,113,226, 68,171,222,189,123, 59, 39, 37, 37, 33, 61, 61, - 29, 59,118,236,200,246,240,240,200,230,121, 30, 30, 30, 30,240,244,244,132,205,102, 83,196,197,197,121, 3,112,120,175, 45,142, - 74,215, 30, 61,114,121,117,235, 22, 61,153, 87,234,168, 10, 1, 11,185, 26,157,166, 18, 73, 68,171,106, 80,184,237,132,144,190, -231,206,157,155,112,241,226,197, 65, 62, 62, 62,228,221,119,223, 69,207,158, 61, 33,149, 74, 97, 50,153,144,159,159,143,131, 7, - 15, 18,187,221, 30, 14, 0, 62, 62, 62,181,235,214,173,251, 51, 33, 36, 45, 33, 33,225,221,167,228,205,147, 91,116,140, 30, 48, - 96,192,157,140,140, 12,219,164, 73,147,176,104,209, 34,140, 24, 49, 66, 28, 27, 27,251, 1,128,127, 58,152,223, 95, 18,130, 79, - 65, 65, 82, 83, 82,238,253,176,114,101,169,143,143, 15,142, 29, 59,134,176,176, 48,212,175, 95,255,149,107,215,174,189,210,174, - 93, 59, 92,190,124, 25,185,185,185, 23,171,227,236,216,177,163,136,101,217,122, 90,173, 22,137,137,137,144,203,229,240,246,246, -134,155,155, 27,188,188,188,176,104,209, 34, 44, 89,178,228,166, 72, 36, 90,151,150,150,246, 80,104, 14, 5, 8, 16, 32, 64,192, - 51, 5, 86,101,213,248,164, 23,235,240,225,195,160,148,194, 41,188, 37,166, 14,169,139, 97, 31,111,196,182,135,113,144,201,100, -255, 34, 17,137,240,209, 71, 31,213,232,135,221,221,221,183,109,219,182,109, 96,219,182,109, 85, 93,186,116,169, 15, 0,114,185, -220,182,109,219, 54,131,187,187,251,182, 26,138,171, 25,132, 96, 10, 40, 24,153, 84,122,204,163, 86,173,227,206,206,206, 45,186, -119,239, 94,191, 71,143, 30,240,247,247,199,142, 29, 59,176, 99,199,142, 19, 25, 25, 25, 23, 28,229,173, 87,175, 30,238,220,185, - 51, 12,192,122, 0, 20,255,154,196,111, 7,208,214,207,207, 79, 94, 19, 59, 57,142, 91, 50,124,248,240,157, 51,102,204,200, 9, - 12, 12, 84,109,223,190, 61,255,216,177, 99,150, 94,189,122, 61,170,232,200, 77, 38, 19, 76, 38,147, 84,167,211, 53,168,137,192, -138,137,137,201,238,209,189,179,215,202,213,231,235,155, 76,156,117,239,225, 99, 86,155, 69,101,186, 19,247, 48,179, 38, 54, 82, - 74,237,190,190,190, 99,120,158,247,178,219,237, 86, 47, 47, 47,201, 47,191,252, 2,185, 92, 14,134, 97, 16, 26, 26, 10,185, 92, -110,209,106,181,133, 0,160, 86,171,109,139, 23, 47, 22,189,255,254,251,146,154,100,153,183,183, 55, 54,111,222, 12,131,193, 48, -111,251,246,237,211, 62,250,232, 35, 4, 6, 6,118,212,106,181,139,210,211,211, 77,213,228,183,123,101,193, 70, 8,105, 40,145, - 72,238, 44, 95,190,220,114,238,220,185,221,145,145,145, 61, 71,140, 24, 33,143,136,136,192,133, 11, 23,176,118,237,218,203,174, -174,174,203,170, 51,234,244,233,211,188,143,143,207,227, 97,112,179,217,140,132,132, 4,132,133,133, 97,221,186,117, 88,190,124, -249,214,204,204, 76,193,107, 37, 64,128, 0, 1,127,145,231,234,239,228,197, 18, 85, 23, 96,251,246,237, 0,128, 15,190,143,131, -197, 82, 54,143,105,213,170, 85,143,247,175,170, 24, 74, 60,115,230, 12, 80,131, 61,171, 98, 99, 99, 13,190,190,190,155,198,143, - 31, 63,247,234,213, 43,106, 0,136,138,138,202,206,204,204,156,153,154,154,106,168,129,184,114, 35, 4, 83,120,158,178,229, 34, -173,235,164, 73,147,180,109,219,182,181,138,197, 98, 36, 39, 39,227,187,239,190,195,249,243,231,183,103,100,100,172,164, 14,184, -217, 18, 19, 19, 47,167,164,164,180, 25, 55,110, 28,218,183,111,223,103,237,218,181,221, 42, 63, 91,104,104,232,134, 94,189,122, -105,100, 50,153,200, 98,177,112,247,239,223,191,238, 96, 33, 58, 77, 8, 25, 58,101,202,148, 9,148,210,102,106,181, 58,185,117, -235,214,177,109,219,182,205,117,113,113,129, 72, 36, 66,118,118, 54,140, 70, 35, 56,142,115,175, 73, 70,250,249,249, 69, 76,152, - 48,161,233,152, 49, 99, 96, 48, 24,176,113,227, 70,172, 92,185, 18,126,126,126, 17, 41, 41, 41,231,106,194,197,243,188,215,254, -253,251, 43, 60,117, 56,126,252, 56,180, 90, 45, 92, 93, 93, 81, 84, 84,132,119,223,125, 87, 58,107,214, 44, 0,192,181,107,215, -196, 10,133,162,186,231,206, 38,132, 44, 97, 24, 50, 9, 0,105,213,170,181,222,197,197,197,118,233,210,165,248,180,180,180, 67, -254,254,254,175, 15, 31, 62,188,126,235,214,173, 37,247,239,223,111, 7,224, 72, 77, 11,114, 94, 94, 30,206,156, 57,115, 38, 35, - 35, 99,137, 90,173,222,246,229,151, 95,126,234,237,237,221, 44, 61, 61,253,146, 70,163,153, 27, 29, 29,109,115, 32,127,120, 31, - 31,159,148,163, 71,143,250, 13, 30, 60, 24, 82,169, 20,249,249,249,112,113,113,193,226,197,139,169,213,106,221, 35, 52,133, 2, - 4, 8, 16, 32,224,165, 8,172,221,187,119,131, 97, 24, 88,178, 45,248,104,202,118, 40,229, 44, 78,158, 60, 9, 15, 15,143, 63, -204,203,170, 24, 50,124, 66,252, 60,243,180,237,188,188,188,115,233,233,105, 94,149, 54,150,244,146,201,228,231,170, 17, 84,207, -228, 36,132,192,106,181, 34, 50, 50, 18,103,207,158,181, 62,120,240,224, 52, 33,100,127,122,122,250, 77, 71, 57, 11, 11, 11,191, - 29, 61,122,244,148,158, 61,123,182, 25, 54,108, 24,150, 47, 95, 46,185,115,231, 14, 40,165,104,222,188, 57,154, 52,105,162,179, -217,108, 52, 38, 38,166,100,223,190,125,145,102,179,121,179,163,118, 82, 74,143, 1, 56, 70, 8,145,100,102,102,190, 82, 88, 88, -216,153,231,121,231,236,236,108, 36, 38, 38, 34, 47, 47, 15, 69, 69, 69,176,219,237,121, 53,121,246,148,148,148,115,173, 90,181, - 2,195, 48, 48,153, 76, 72, 77, 77,133,221,110, 71,122,122,122,141,211,147, 97, 24,125,175, 94,189,188, 74, 75, 75,237,111,189, -245,150, 72,175,215, 35, 48, 48, 16, 0, 80, 92, 92,140,195,135, 15,163, 97,195,134, 21,158, 51, 4, 5, 5, 85,203, 73, 41,157, - 77, 8,249,209,199,199,231,203,111,190,249, 38,240,210,165, 75,176,217,108,145, 0, 96,179,217, 34,163,162,162,234,183,104,209, - 2, 91,182,108,233, 94,149,192,170,204, 73, 41,205, 47, 23,108,159,130,130, 4, 53,110,156, 27, 24, 24,104, 21,139,197,181, 0, - 32, 59, 59, 59, 27,192, 20, 7,196,121, 72, 21,123,118,205,220,181,107,215,251, 23, 47, 94,108,247,233,167,159,146, 78,157, 58, - 1, 0, 12, 6, 3,167,215,235, 13,207,195,249,162, 16, 56, 5, 78,129, 83,224,252, 95,224,252,159, 18, 88,133,133,133,104,221, -186, 53,108, 54, 27, 26, 55,182,161,168,168, 30,108, 54,219,227,201,191, 60,207,195,110,183,131,227, 56, 48, 12,227,240, 28,172, - 10,152,205,102,235,147,155,191,155,205,102,107, 13, 93,139, 5,132,144,239, 24,134, 76, 1, 5, 35,149, 74, 47,175, 92,185,114, - 35,128, 52, 74,233,229,234,134,155,170, 66,102,102,102, 14,128,201,181,107,215,110,126,242,228,201,113,131, 6, 13,170,223,183, -111, 95, 36, 39, 39,195,110,183, 35, 62, 62,222,182,111,223,190,152,130,130,130, 31, 41,165,119,158, 39,225, 41,165, 86, 0,247, -156,157,157,193,243,124,251,176,176, 48, 15,187,221,142,156,156, 28, 92,188,120, 49, 49, 39, 39,231,252,115,120,176, 48,122,244, -104,148,148,148, 96,251,246,237, 56,114,228,200,115,121,176, 82, 83, 83, 27, 0,128, 86,171,205,114,113,113, 17,141, 28, 57, 18, - 54,155, 13, 70,163, 17, 69, 69, 69,200,205,205,181,124,242,201, 39, 82, 0,144, 74,165,182, 30, 61,122,136, 28,124,230,244,240, -240,112, 87,185, 92,142, 51,103,206,240, 60,207, 31, 47, 23, 53,199,207,157, 59, 55,174, 89,179,102,140,167,167,103, 67, 7,185, -190, 32,132,172,118,113,113,209, 54, 14, 10, 90, 74, 41,133,151,151,151,223,139, 86,136,172,172, 44, 61,128,121, 58,157,110,215, -231,159,127,254, 97,155, 54,109,130,191,248,226, 11, 80, 90,230, 33, 21, 32, 64,128, 0, 1, 2, 94, 84, 96, 37,140, 25, 51,198, - 90,217, 51,244,132,151,227, 79,158, 35,158,231,211,106, 40, 50,178, 9, 33,139,203,135,142,240,188, 27, 54, 82, 74,231, 18, 66, -126, 4,192,154, 75, 75, 95,218,178,249,228,228,228,107,132,144,145,155, 54,109,234,178, 99,199,142,201,111,190,249,166, 98,253, -250,245,150,236,236,236, 69, 0,142, 80, 74,249, 23,253,141,226,226,226,123,132,144,140,184,184,184, 87,165, 82,169,130,227, 56, -189, 94,175,143,165,148,150,212,132, 39, 37, 37,229,156, 86,171,197,158, 61,123,224,225,225,129,188,188, 60,135, 60, 88,213,188, -161, 12,216,186,117,235,110,158,231,229, 79,228,125, 81,122,122,122, 3,160,108,146,251,225,195,135,127, 38,132,164, 57,104,231, -246,177, 99,199,190,171,215,235,127, 75, 75, 75,203, 47, 23,116,249,190,190,190, 75,102,204,152, 49, 52, 39, 39,231,151, 26,228, -123, 38, 33, 68,255,232,209,163,226,188,188, 60,103,142,227, 94, 90,197, 72, 75, 75,123, 0,224, 31, 58,157,174, 77,143, 30, 61, -222,161,148,234,133,230, 66,128, 0, 1, 2, 4,188,176,192, 58,121,242,100,167,127,135, 1,229, 67, 71, 63, 84, 8,174, 23,224, -201,249,139,236,163, 0,126, 39,132,156, 88,182,108, 89, 35,163,209,152, 72, 41, 53,188,228,223, 40, 6,112,244, 69,121,210,211, -211,149,132,144, 25, 0,166, 3,248,134, 82,250,245, 11,138,140, 75, 0,158,185,117, 66, 70, 70, 70, 50,128,215, 28,229, 76, 77, - 77,221,133, 39,142, 0, 42,191,191, 7,192,158,231, 72, 59,206,207,207,111,246,164, 73,147,122, 0,216,255,178,243, 63, 45, 45, -237, 50,128,203, 66, 83, 33, 64,128, 0, 1,255,239,104, 5,192,171,252,123,197, 75,175,215, 19,223, 45, 0,164,149,226, 84, 92, -235, 1, 92,173,196, 81,249,126,117,113, 1, 32, 7,192, 77,212,100, 19,240,255,132, 20,163,148,102,255,167, 31, 53, 66, 41,229, - 12, 6, 67,204,203, 22, 87,127,129,157, 95, 83, 74,149, 47, 42,174,254,155,144,146,146, 18,157,150,150,246,207,180,180,180, 91, - 66,251, 35, 64,128, 0, 1,127, 95,113, 69, 8, 57, 64, 8, 57, 80, 46,136,188,170,248, 46,173, 8, 83,249,186,146, 48,243,170, -226,254, 51,227, 18, 66, 14, 76,155, 54,237, 53, 0,225, 53, 49,152, 17,242, 76,128, 0, 1, 2, 4, 8, 16,240, 31, 14, 47, 66, -200, 1, 74,105, 31, 74,105,159,114, 1,244, 52, 71, 67,159,202,255, 62, 11, 85,241, 84,252, 70,229,235,249,243,231,127, 3, 64, - 81, 19,131, 69,132,144,144,167, 24,232,240,234,128,167,113, 60,235,111,213,241, 11,156, 2,167,192, 41,112, 10,156, 2,167,192, -249,247,227,124, 89,241, 95, 6,170, 18,107, 21, 66,174,242,245,212,169, 83,167,163, 6,195,131, 21,228,127,217, 7, 64,136,192, - 41,112, 10,156, 2,167,192, 41,112, 10,156, 2,231, 11,126,122,151, 73, 22,218,187,242,247,170,238, 61,235,123,117,113, 29, 8, -235,176,205, 34, 8, 16, 32, 64,128, 0, 1, 2, 4,252,103, 67, 95,217,219, 84,238, 97,226,166, 78,157, 58,189,226, 94,185,151, -169, 20,128,172, 10,111, 89,229,120,213,121,214, 28, 14,251, 44, 8, 2, 75,128, 67, 32,132,136, 0, 76,112,115,115, 27,226,230, -230, 86, 55, 47, 47, 47,161,168,168,232, 55, 0,203, 41,165,182,231,225, 12,110, 64,186,112,118, 76,230,121,176,172, 8,139,238, - 60,164,145, 66, 74, 11, 16, 32, 64,128,128, 42,112, 21, 64,171, 74,162, 71, 15,224,214,188,121,243,242,231,205,155, 87,249,222, - 13, 0,205,202,195,233,171, 16, 74,150,242,107, 75, 21, 97, 44,142,132,253, 75, 4, 86, 80,109,242, 33,120,204, 0, 1, 5,193, - 55,177,201,116,109, 77,226, 55, 9, 36,175, 73, 25,209, 74, 10,202,154,109,220, 52,194,161,202, 61,154, 40,139, 8,185,152,157, - 71, 64,120, 11,111,255,232,214, 61,122,210,225, 78,187, 33,233, 42,162,204,122,158,167, 98,158,167, 91, 24,224,176,210,130, 75, - 23, 83,169,249,121,115,181,118,109,226, 70,120,244,148,136, 68, 45,173,118,123, 20,101,112, 56, 57,153, 22,252, 39,149,188, 33, - 65, 68, 34,242, 83, 44, 84,201,108, 93, 88,150,115,231,120, 54,223,104, 22, 31,183,165,152, 62,219, 17, 75, 29,222,188,149, 16, - 34, 6, 48, 65,165, 82,189,174, 84, 42, 95, 41, 41, 41,121,100, 50,153,118, 75,165,210,206,203,151, 47,247, 13, 11, 11,115,210, -235,245,228,255,216, 59,239,168, 40,174,191,141, 63,119,182,194,178,244,190,244, 38, 34,162, 8,246,138, 6,107, 80, 99,212, 52, - 99,138,177,164, 89, 82, 94,211,140, 49, 38,198,196, 88, 98, 18, 19,163, 38,209, 88, 18, 27,198, 18, 59, 26, 75, 44, 96, 71, 84, - 80, 1, 97,233, 32,236,194,178,101,102,238,251, 7, 66,208, 8, 44,196, 52,127,247,115,206, 28,216,157,217,103,238,220,153,185, -243,204,247, 54,142,227, 60,126,254,249,231, 49, 95,124,241, 69, 60, 33,228, 65, 74, 41,223,220, 52, 11, 60, 94, 79,219,254,124, -119, 0, 8,138,255,234, 45, 66,200,238,230,142, 45,214, 62,148,180, 17, 4, 76,108,106, 59,137, 4, 75,207,102,180,108, 80,216, - 54,193,228, 43, 2,132,129, 34, 81,194, 97,253,185,171,108, 76, 44, 6,131,193,248,135, 76,214,157,156,176,114,187,191,157,102, - 25, 44, 66, 49,243, 66,250, 13, 39,136,102,180, 13, 15,121, 23, 64,179, 12,150, 66, 34, 89,118,242, 76,190, 39,168, 25,203, 22, -188,176,210,100, 1,120,222, 12,145,183,128,231, 45,224,121, 51, 4,193, 2,145,175,198,204,133, 7, 0, 94,135,142, 29, 90, 45, - 3, 16,108,237, 62,100, 34,183,226,212,209,221,206,132, 47,199,143,223,127,244,124,150, 86,255,252,190, 19,218,146,200, 64,242, -238,197, 44,252, 96,237, 3, 60, 32,128,120, 81,138,161,254, 26,247,145,211, 39, 61,210,101, 96,223,158,156,127, 64, 16,178,179, -174,143,223,149,116, 88,236,213,205,227,120,182,182,104, 35, 33,216,154,149, 69,243,255,204, 73,112,119, 34,237, 29,236,108,191, -146,201, 57, 59,153, 68,146, 94, 84, 86,241,113,126, 9,181,250, 2, 25, 29, 73,228,234, 96,249,177,190, 67,158,114,238,213,239, - 25,193, 86,165,214,229, 92, 75, 49,237,220, 58,191,255, 85,121,218,241,209,145,164,139, 53, 38,139, 16, 34, 37,132,108,155, 57, -115,166, 87,207,158, 61,237, 75, 74, 74,192,243,188,203,166, 77,155, 38,117,234,212, 73,237,227,227,163, 88,181,106, 21,244,122, - 61, 4, 65,112, 14, 9, 9,113,126,244,209, 71,249,213,171, 87, 79, 6,176,160, 49,237,192, 64,162,180, 35,112,184,205, 96,137, -168, 27,192,212,194, 67, 21,162,129,119,219, 32, 98, 1, 0,133, 9,250, 20, 45,109,114, 20,126, 65,192,196,211,201, 73,227,248, -155, 39, 1,193, 12, 10, 11, 32,154, 1,106, 1, 21,205,128,104, 1,165,102,116,125,232, 59, 0,152,220,146,243, 67, 8, 30,216, -183,239,164, 87, 65,126, 94,236,194,133,115, 94,139, 12, 34,187, 57, 9,214, 94,184,138,195,247, 98,176, 89, 6,131,241,207,243, -192, 3, 15,172,208,235,245, 31,159, 56,113, 34,253, 94,105,122,121,121, 69,112, 28,151,213,146, 25, 69,234, 19, 19, 19, 51, 21, -192,211,183, 62,126,127,234,212,169, 69,127, 54,109, 93,186,116,241,161,148,122,222, 42,251, 11,142, 31, 63,158,203,174,130,127, -208, 96, 81, 64, 9, 42, 2, 71, 30, 2, 37,176,105,238,206, 40,133, 13,136, 4,176,232, 49, 60, 33, 30,110,174,222,128, 80, 9, - 8, 6,128,175, 2,132,154,165,184, 40, 11,224, 43,129,162, 95,192, 83,170,108,246, 81, 89,202,129,194,245, 24,208,205, 31, 78, -246, 54,152,242, 88,164,235, 55,137,151,151, 44, 79,188,212, 23,192, 83, 77,253,220,215,151, 44,122, 99,210,240,231, 6,244, 79, - 32,129, 33, 81, 40, 45,202,193,137,147,191,221, 92,248,205,134,139,253,251,116,108, 51,114,196, 35, 78, 19, 39,189,214, 45,235, -234,249,110, 7,246,111, 89,224,175, 33,139,179,181,244,205, 22, 69,199,188,229, 19, 7,196,199,207,254,234,155,239, 85,182,106, - 87, 84,148,102, 7, 61,249,196,136,104, 47, 23,146,144, 95,106, 93,196, 69,230,103, 59, 63, 62,225, 89,151, 81, 79,127,106,111, - 49,235,205,218, 43, 59, 47,218,217,242,220,163,143, 77, 41,255,126,217,187, 94, 87,205,165,243, 1,188,108,133,212,228,153, 51, -103,122,133,132,132,248,175, 89,179, 6,122,189, 30, 0, 60,194,194,194, 16, 22, 22, 38, 28, 60,120, 16,225,225,225,176,183,183, -199,129, 3, 7,112,236,216, 49,116,232,208, 65, 37,151,203, 71, 54,102,176,218,132,146,209, 15,245,237,248, 69,112,128,143,170, -166,241,159, 8, 74, 69,232,245, 70,188, 48, 39, 5,101, 21,213, 24,242, 64, 76,171, 64, 31,251, 43, 28, 68, 80, 10,100,106, 11, -132,136, 96,242, 88,218, 53,186,163,169,200, 84,135, 78,125,187,159, 73,249, 45,220, 92,184, 13,157,135,124,116, 25, 20, 71,127, -119, 71,232,158,114,240,187,112,224,187, 22,221, 32,132, 16, 18, 25, 4, 33,251,183,143,225, 27, 51, 94,178,244,187,157,110,229, - 37,185, 79,108, 90,255,213, 67, 75,150,126,253, 99, 75, 77, 27,131,193,248,215, 49,208,201,201, 41,174,115,231,206, 3,239,149, -201,146,201,100,182,130, 32,180,210,104, 52, 87, 90,106,178,166, 76,153,242, 34, 33,228,195,148,148, 20, 0, 64,108,108,236,135, -177,177,177,119, 29,231,208,193,193,161, 50, 50, 50,242,253,207, 62,251,236,203,198, 52,167, 79,159,238,109,177, 88, 2, 79,157, - 58, 85,107,224, 2, 99, 98, 98, 2,239,182,173,157,157,157,208,165, 75,151,172,143, 63,254, 56,143, 93, 34,127,101, 4, 11,184, -156,127,104,106,180,169,180, 10, 4,184,220,180,161,186,189,171,101,181, 69,248,244,251, 69, 79,205,110, 27,238,140, 10,157, 9, -123, 14,101,194,194,155, 33,242, 60, 4,193, 2,225,214,223,129,221,220,208,157,159,132,197,235, 46,193,194,139,243, 26,211,252, - 67, 68, 3,226,211, 29,250, 60,242,131, 64,169,220,206,134,171, 8,241,119,117,127,237,201,104,110,202, 99,109, 97,168,230, 71, -182, 9, 36, 7, 47,102,210,239, 26,211,108, 27,228,252,236, 11,227,199, 19, 81,213, 22,201,199,118, 96,242,255,189,157, 81, 92, - 82,246, 81, 86, 14, 78,109,221,247,107,128,191,167,235,204, 69,115,222,238, 16, 30, 61, 8,131, 56, 3,126, 61,124,232,105, 0, -111, 54, 39,157,158,158, 68, 37, 26, 49,164, 75,231,142,239,175, 92,183, 77,197,233, 79, 3,217,171,225,228,212, 13, 75, 23,127, -236, 49,108,196,232, 5, 0, 6, 88,163,105,167,180,196,247,122,224,105, 88,204,122,179,197,168, 51, 26,202, 82,205, 66, 85,161, -153,147,113,210, 78,237,219, 20, 22, 20, 36,245,183,230, 28,217,217,217,141,234,222,189,187,122,245,234,213,136,141,141,133,147, -147, 19,246,239,223,143,179,103,207,162,164,164,132,163,148, 66,173, 86, 99,238,220,185,240,243,243, 67, 69, 69, 5,178,178,178, -156,101, 50,153, 75, 99,233, 84, 74,165, 99, 63,253,248, 99, 21,199, 1, 16,121,128,254,190,104,243, 11, 81, 89,105,128,147, 90, - 14,119, 23,219,186,239,121,139, 73,210,113,240,235,147, 0,236,104,236,216,207,102,208,139,109,131,200, 81, 80, 62,156, 10, 6, -128,226,232,133,235,180,206,244,180, 15, 37,109, 98,123, 63, 51, 81, 34,193,210,166,174,207,187, 17, 25,132,193,157, 34,212,118, -182,150,139,200, 73,154,140, 12, 65, 73, 61,219,141,195, 99, 79,188,168, 90,186,108,233, 16, 66,200, 20, 90,111, 18,206,191,162, -123, 49,211,100,154,247,131,230,232,209,163, 37, 0,176,126,253,122,225,223,152, 78,169, 84,106,254,250,235,175, 61, 38, 77,154, -180,203, 90,147,213,228,243,168,102,254,174, 43, 0,172, 54, 89,119,106,102,100,100,124,244,209, 71, 31,225,167,159,126, 2, 0, -172, 89,179, 6,173, 90,181,186,235,111,207,158, 61,107,247,214, 91,111,125, 4,224,203,198, 52,207,159, 63, 31, 52,103,206, 28, -252,248, 99,205,204,100, 63,252,240, 3, 34, 34, 34,238,170,121,250,244,105,201,219,111,191, 29, 4, 32,239,175, 62, 71,247,173, -193, 34,132, 80, 74, 41,105, 98,251,107, 94,246,178,104, 88, 44, 0,112,173,185, 59, 75,205,160, 11, 58,132,203,250,239,221,244, -101, 79, 27, 5,135,247, 22,190,154, 83, 82,162,139,147,112, 16, 1, 64, 16,193, 57,218, 43,146, 62,122, 57,218,175,172,188, 26, - 91, 15,230, 30, 78,189, 70,155, 21, 10, 61,119,133,238, 7,224, 93,247,128, 13, 38, 97, 99,223,222,187,242,199,143, 7, 70, 77, - 27,211, 30,137, 7, 50, 95, 70, 19,225, 12,181, 74, 46, 33,249, 27, 81, 38,156, 69,151, 46, 67,113,226,196,245,208, 51,199, 18, -191, 93,183,110,149,240,212, 99, 35, 37,173, 98, 71,161,170, 36, 13, 89,191,205,129, 46,107, 47, 28, 84, 82,153,181,233,115,119, - 34,237,109,109,109, 95,244,247, 10, 72,152,254,230,116,105, 66,194,163, 54, 92,229,121,208,188,245, 16,205,122,136,149, 55,224, -162,238, 12, 66,224,105,245, 91,146, 66,226,164, 86, 59,153,115, 47,172, 73, 51,235,175,153, 97,200, 23,104,149,150, 16,133,140, -250,122,120, 65,194,241,142,214,232,216,218,218, 6, 21, 22, 22, 66,167,211,193,209,209, 17, 11, 23, 46,132,135,135, 7, 12, 6, - 3, 46, 93,186, 68,125,125,125, 73, 82, 82, 18,124,124,124, 80, 86, 86, 6,147,201,132,170,170,170, 2,147,201,212,104,161, 81, -109,230,191,122,229,181, 87,122, 5,248,122, 74,106, 35, 88,162, 40, 34,186,109, 48,250,245,238,138, 61, 23, 78, 34,241,108, 58, - 68, 42,162,118,125,102, 78,113,165, 89, 20,126,176,186,240, 20,249,154, 72,232, 93, 12, 88, 75,162, 76,237,218, 17,149,160,199, - 27, 93, 34,237,159,122,243, 73,127,181, 90,201,161,218, 70, 64,181,201, 2, 93,218, 18,184,250,181,135,202,198,134,196,196, 24, -164, 0, 44,172, 40, 97, 48,254, 72,199,142, 29, 59,169, 84,170,169, 0,250, 24,141, 70,123, 81, 20,209,171, 87, 47, 29,199,113, - 7,171,170,170, 22, 37, 39, 39,183,180,173, 76,237,179,138,222,203,244, 6, 4, 4,160,185, 38,171, 41,180, 90,173, 65,163,209, - 52,203,100,213,167,168,168, 72, 18, 30, 30, 14,131,193, 0, 81, 20, 81, 89, 89,137,196,196, 68, 84, 84, 84, 64, 20, 69,216,218, -218, 98,209, 94, 35, 42, 47,172,198,234,111, 62, 69, 81, 81,145,196, 10, 77, 18, 17, 17,129,234,234,106,240, 60, 15,163,209,136, -221,187,119,195,104, 52,194, 98,177, 64, 38,147, 97,206,150,155, 48,158, 95,141,239,150,125,130,162,162, 34,242, 87, 95, 43, 86, -122,144,255,158,193,170, 61,176,191,227, 0, 5,145,159,249,205,247,107,147,222,124,249, 49,188, 52,246, 1,223, 89,159,109,238, -123,225, 26, 93, 3, 0,109,130,201, 19, 79, 62, 24,230,231,100, 39,195,172,165,201, 0,161, 51,255,236,254,206, 94,163,233,237, - 90,145,255,219,124, 32,107,215, 91,227, 98, 16,234,235, 16, 26, 26, 74, 20, 25, 25,180,137, 1,195, 40, 94,122,231,115,240,150, - 69,150,215, 38, 61, 44,235,210,247, 41, 68,119,223, 41, 41,189,190, 19,201,155,198,225,187,205,191, 85,201,164,176, 25,219, 91, -102,245,104,248,110,142, 36,166,107,215,110,187,150,126,179,220,198, 83, 19, 74,136,165, 8,168, 56, 8, 62,127, 55,140,134, 98, -152, 12, 58,152, 69,123,148,103,239,135, 82, 65,173,190,177, 45, 38,177,228,102,241, 85, 91,137,120,147, 68,180,113,233,137,178, -253,128,243,104,100,158, 62,114,242,122,161,214, 94, 16,165,165,214,232,232,245,250,107, 22,139,197, 21,128,251,190,125,251,224, -238,238, 14,157, 78, 7,179,217, 12,131,193, 96,113,118,118, 86,148,148,148,192,104, 52,194,104, 52,194,193,193, 1,201,201,201, -122,158,231, 27,157, 67, 48,237, 26,221, 17,171, 33,158,251, 21, 80,215,126, 39,145,192,149, 55,155, 78,246,235,209, 14, 41,103, - 46, 97,253,182,227,157, 4, 1, 37,181,235, 43, 41, 42, 50, 51,169,209,250,215, 83, 30, 84,248,189, 31, 67,109,227,247,150, 52, -110,143, 12, 38, 29,149, 74,217,252,185,111, 61, 24,209, 39, 82, 80,146,234, 60, 16, 0, 42, 27, 41,140, 38, 1,142,222,161,160, - 38, 29, 53, 84, 87,151,159, 63, 15, 30, 12, 6,227, 15,209,170,194,194,194,197,206,206,206, 35,199,142, 29,107,219,167, 79, 31, -142,227, 56, 44, 92,184, 16,249,249,249, 14, 3, 7, 14, 76, 88,181,106, 85,191,222,189,123,111,244,240,240,152,108, 77, 84,171, -222, 51, 75, 6,160,214, 68,208,171, 87,175,242,131, 6, 13,194,213,171, 87,185, 91,198, 75, 4, 96,110,105,251,200,127,163,201, -202,203,203, 67, 81, 81, 17,250, 15, 29,138, 69,115,231,162,119,239,222,136,143,143, 7, 0,236,221,187, 23, 93,212,199,225,146, -208, 27, 23, 47, 90, 95,212,221,184,113, 3, 37, 37, 37, 24, 50,124, 56,150, 45, 89,130,152,152, 24,180,110,221, 26, 0,144,148, -148,132,126, 94,233, 80,135,245, 67, 90, 90,218, 95,126,189,252,157, 30,228, 31,137, 96,253, 93,156, 75,167, 39, 34,131,201, 47, -143, 61,216,121,240,208,126,145, 88,190,110,223,123,145,145,100, 67,141, 1, 81,206, 28,251, 96, 8, 82,175,150, 97,223,113,237, - 47,169,215,232,137,123,177, 79,158,135,159,167,171, 26,224, 20,168, 52,241,188,131, 3,172,190,241,206,101, 22,135, 61, 50,229, -235,241, 83, 31,249,237,173, 41, 79, 68, 97,245,186,211, 88,240, 83,218,235,102, 51, 86,142,236,229,146, 13, 88,223, 22,205, 94, -101,251,252,210,111,150,219,120,185,202, 9,178, 22, 65, 48,228, 64,168, 46,129,217,120, 19, 21,229, 55,145,147, 87,140,178, 42, - 41,178, 10,136, 33, 55,223,180,218, 90,221,242, 42,233,207, 91, 55,204,123,106,212,200,177,174, 87, 78,124,115,108,203,126,131, -251, 99,253,127,169, 84,216, 5, 56, 29, 60,177,215,185,220, 32,253,214, 26,157,234,234,234,141,191,252,242,203,163, 1, 1, 1, -238,231,206,157, 67,117,117, 53, 68, 81,196,224,193,131,129,122, 19, 96,166,165,165, 85, 27, 12,134,194, 11, 23, 46,232,179,179, -179,171, 0, 44,110, 74,251, 86,131,245,186, 66,165, 77, 16, 25, 29, 25,238, 13, 8, 6,180, 9,243,130, 69, 64,223,139,215,233, -231, 45, 62,201,212, 82, 19,193, 34,232,222, 54,136, 44, 6, 65,247,228,253, 11,195, 59,246,155,134,230, 68,176, 34, 67,201,128, -168,112,205,210,133,115,222,116,118,113,247,147, 64, 48,128, 89, 13,222, 77, 0, 0, 32, 0, 73, 68, 65, 84,240, 21, 84, 44, 61, - 6,105,229, 21, 56,248, 62, 8,193,177, 59,150,126, 57,191, 82, 16,232,250,250,213,131, 12, 6,163,206, 80,188, 19, 30, 30, 62, -234,243,207, 63, 87,157, 57,115, 6,149,149,149, 56,126,252, 56,230,205,155,135,145, 35, 71,194,215,215,151, 75, 76, 76,180,123, -249,229,151, 71, 93,190,124,185, 8,192,172, 38, 30,192,110,174,174,174, 78,197,197,197, 90, 0,242, 91, 38,139,100,102,102, 34, - 41, 41,137,139,142,142,166,133,133,133,252,148, 41, 83,156,244,122,125,251,207, 62,251,236, 48,128,130,251, 37,146,181,113,227, - 70,156, 62,125, 26, 51,163,163, 49,205,219, 27,174,174,174, 56,120,240, 32, 40,165,176,179,179, 67,105,105, 41,126,252,241, 71, -196,197,197, 89,157,158,159,127,254, 25, 39, 79,158,196,251, 29, 58,224,101, 27, 27, 56, 58, 58, 34, 41,169,166,195,190, 82,169, - 68, 78, 78, 14,246,239,223,143,222,189,123,179, 11,186,133, 88, 29,125,137, 35, 68, 74, 8, 60, 45, 22, 3,204, 60, 5, 33,240, -142,140, 36,242, 22,185, 58, 14,239, 45,254,118, 27, 85, 74,204, 24, 63, 42,214, 27, 6,140,135, 1,227,199, 13, 15,215,168,148, - 82,124,182, 46,149, 74, 57,188,119, 47, 14,176, 93, 16,105,229,226, 96,243,238,131,113,109,145, 93, 96,192,181, 27, 21,187, 82, - 82,172, 31,183,233,218, 53,148,229,104,177, 72,111,226, 33,145, 72, 81,110,160,200,201,193,183,133,133, 48, 54, 55, 45, 18, 41, - 25,224,169, 9, 37,180, 32, 17,198,155,151, 80,121, 51, 7, 37, 37, 57,208,149,151,160,178, 74, 7,157,174, 10,121,185, 90,236, -252, 77, 91,198, 87, 11,135,173,213,253,105,119,213, 91,167, 78, 29,190,116,226,216,110, 59, 7,247,246,206,145,129, 74,209,206, - 94, 99,127,240,120,170,163,182,176, 58,237,167,157, 85,214,230,229,226,141, 27, 55,150,157, 58,117, 42,205,215,215, 55,219,209, -209,145, 18, 66,144,151,151,119,219,146,156,156,172,220,185,115,103, 85,118,118,246, 22, 0, 9,205, 29,162,161,125, 40,105,211, -175, 91,171,217, 67,226,162, 0,193,128,132,184, 54,232,221, 41,104,118,251, 80,210,166,197,254,138,214, 84, 17, 30, 93,211, 47, -252,232,234,158,227,142,172,236, 18,110,202,253,161,217, 58, 68,196,203,211, 30, 13,116,112,177, 53,113, 68,208,131,200, 28, 1, - 85, 40,225,124,159, 32,178,152,149, 36,187, 42, 64, 24,245,196, 99, 69,203,126,216,246,149,155,136, 69,172, 8, 97, 48,238,242, - 96,225,184,113, 99,198,140, 81,217,218,218,194,198,198, 6,171, 86,173,194,243,207, 63, 15,165,178,166,207,146, 74,165,130,173, -173, 45,198,140, 25,163, 34,132, 60,107,133,100,105, 69, 69,133,122,196,136, 17,126, 0, 84, 0,236, 76, 38,147,186,184,184,216, -129,227, 56,199,182,109,219,122,204,156, 57, 51, 92,175,215,183,223,186,117,107, 33,128,226,150,164,187,188,188, 28, 87,175, 94, -197,142, 29, 59, 48,113,226,196, 74,158,231, 21,106,181,122,250,159,140,206,200, 60, 61, 61, 85, 26,141,198,149, 82,218,154, 82, -202, 81, 74,253, 91,162, 37, 8, 2, 58,118,236,136,189,191,158,196,210,245, 71, 48,255,203,149,200,206,206, 70, 68, 68, 4, 68, -177,229, 29,154, 59,117,234,132,253,251, 15, 97,245,150, 19,152,183,240, 43,228,228,228, 52,216, 38,139,209,204, 8, 86, 83,161, -185,200, 32,210,206, 51, 74,185,252,237, 97, 33, 17,210,182,239,129, 72,109,177,233,187,173,221,222,252,232,235, 83,237,125,201, -184,179, 57,180, 89,245,232,103, 51,232,197,182,193,100,253,153,212,136, 71,134,245,246,195,178,245,170, 55, 0,224,145,254,193, - 56,145, 90,132,227,231, 11,215, 95,184,214,178, 49,139,106,137, 8, 38,161, 28,197, 83,109, 66, 60, 39, 44,156, 49, 74,229,238, -166,194,156,175,146, 33, 2,171,173,191,152, 1, 0,190, 0,202,127,143, 83,144,218,104,142,147, 32,162, 89,161, 76,142,208,221, -249, 89,103, 30,117,229, 92,136,190,162, 24,249,218, 27,208, 85,232,225,228, 32,131,163, 74, 2,141,183, 7, 84,142,190, 16,165, - 69, 78,151,174,233, 59, 3,176,122,224,205, 10,139,252,133, 35, 71,246, 28,238, 17, 61,161,186, 77,144,140,151,202, 36, 54, 39, - 83, 51,149, 58,131,252,101,107, 53, 40,165, 60, 33, 36,225,208,161, 67,147,143, 30, 61, 58,194,219,219,155,140, 29, 59, 22,131, - 6, 13,130, 82,169,132,193, 96, 64, 89, 89, 25,182,111,223, 78,120,158,239, 14, 0,222,222,222,254,129,129,129,223, 17, 66,114, -175, 95,191, 62,214,154,253, 40, 20,138,249,239, 78, 30, 34,227,205,122,204, 90,188, 29,239,190, 20,143,153, 47,197,201, 18, 38, -230,206, 7, 48,176, 69, 39, 92,228, 33, 10,213,232,254,228,175, 53,189, 8, 9,186,159,220,245, 65, 56,112,218,106,137,216, 88, - 34,147, 72, 73,235, 54, 62, 70,153,144,187, 14,196,198,135, 74, 92,251, 0,234,112, 66,213, 81,248,226,179,119, 43,151, 47, 95, -190,151,114,152,147,154, 73,211, 88,241,193, 96,220,157,202,202,202, 73,239,191,255,254,202,208,208, 80,219,168,168, 40, 44, 89, -178, 4, 67,134, 12,169, 51, 87,237,218,181,195,141, 27, 55, 48,107,214,172,234,170,170,170,231,173, 40,155, 68, 66,200,197,164, -164,164,136,132,132, 4,239,222,189,123,147, 54,109,218,200,148, 74,165,104, 52, 26,237,242,242,242,148,105,105,105, 72, 78, 78, -190, 90, 93, 93,125,142, 82, 42,180, 36,221,179,102,205,170,116,115,115,179,155, 58,117, 42, 62,249,228,147,220, 95,127,253, 53, -230,207,230,133,183,183,119, 16,199,113, 98,110,110,238,117, 31, 31, 31,239,156,156,156, 22, 53, 14,175, 13,150,159, 61,123, 22, -135,210, 69, 40,236,156,145,153, 86,129,189, 63,111,193,152, 9, 19,193,243, 45,111,173,112,250,244,105,172,217,157, 6,175,160, - 8, 84,167,157,198,198,141, 27,241,252,243,207,255, 41,205,102, 30, 27,185,111,219, 96,213, 30,224,157, 43, 67, 67,137, 66, 97, -196, 91, 3,187,249, 76, 27,245, 64,168,132,175,202,131, 40,138,144, 0,112,179,231,240,237, 55, 75,131,214,111,254, 37,169,157, -191,100, 9, 76,226,172,115, 5,180,202,106, 87, 47,197, 7, 11,190, 63,242,240, 15,179,251, 72,159, 31, 29,225, 12, 0,114, 25, -135,197,107, 47,240, 68,138, 15,154, 25,165,234, 41,149,113,107, 44,148,218, 82,129,102,251,120, 57,219, 61, 60, 32,214,231,161, - 1, 29,209,190,141, 63, 68,222,140,247,191, 76,196,250, 29,103,191, 76,187,222,120,183,255,219, 76, 90,144, 19, 78,106, 10, 94, -227,164,248,128,212,179, 87,158,158,144,203,165,152,218,202,207, 70,129,102, 52,193,209, 85, 25,190,122,115,250,212,248,183, 95, - 26,230, 98,214,169,200,149,204, 50, 64,168,134,157,173, 26,106,175, 94,112,114, 8, 67,117, 69, 30,228,210, 20,149,167, 91,206, -232,230, 24,172,205, 59,116,233, 47,141,109, 45,121,239,243,147,110,166, 42, 80,222,156,194, 85, 85, 19,186,113, 79, 69, 70, 51, - 47,116,139,175,175,239, 68, 81, 20,221,121,158, 55,187,187,187,203,127,250,233, 39,216,216,216,128,227, 56, 68, 71, 71,195,198, -198,198,164,209,104,202, 1,192,195,195,195,178, 96,193, 2,233,184,113,227,172,138,102, 70, 6, 19,191, 17, 3,218,246,112,117, -144, 96,229,230,163,216,178,247,226,150, 32, 31,187,225,207, 14,111,139,184,206, 62, 61, 34,131,137, 95,234, 53,122,163,249,119, -168, 5,245,123, 17,182, 15, 37,109, 58, 13,120,231,174,189, 7, 27, 34,232, 20,196,203, 33, 20,132, 72, 64, 65,128,234, 92,240, - 57,171, 33, 9,126,153,110, 78,252,192,176,236,155,229, 31,165,102, 82, 22,181, 98, 48,154,224,204,153, 51,191,116,238,220,249, -141,177, 99,199,206, 29, 59,118,172,226,233,167,159,150, 28, 59,118, 12,162, 40,162, 99,199,142, 88,190,124, 57,191,110,221, 58, -139,209,104,156,126,230,204,153, 95,172, 44,155,140,132,144, 51,219,183,111,119,185,120,241,162,139, 76, 38,115, 19, 69,209,169, -170,170,170,216,100, 50,149,148,149,149, 21, 2, 40,107,105,181,125,117,117,181,205,197,139, 23,143,155,205,102,205,212,169, 83, - 91,199,199,199,135,199,198,198,118, 78, 73, 73,105,113, 83, 21,142,227,228,162, 40, 26, 40,165,182,181,187,113,119,119,183, 43, - 42, 42,170,108,137,158, 68, 34, 65, 89, 89, 25,116,185, 25,168, 42, 46, 70,107, 73, 21, 58,184,184,195,222,222, 30, 22, 75,203, -251,218,232,245,122, 40,249, 28, 92, 63,121, 29,197,197,153, 8, 11,234, 0, 59, 59, 59, 24,141,198,191,237,154,185,223,204,213, -109, 6,235, 15, 15, 66,127, 50,222, 89,142, 79,158, 30, 29, 44, 15, 14,244,129,169, 40, 25,167, 51, 42,241,206,138,206,105, 18, -185,189,241,165,167,250,119,232, 27,239,142, 62,113,157, 72, 96,192, 59, 47,206,157,251,213,196, 72, 63,242, 86,234, 13,250,165, - 53, 59, 62,127,133, 94,111, 19, 68,190, 79, 58,153,251,156,175,155, 1, 20, 20, 73,201,121, 56,155, 94,246,253,197,235,244,122, -179, 46, 58, 57,183,234, 84,202, 57, 23,240, 6,228,103,252, 18,238,229, 21, 8, 80, 11, 44, 38, 3,142,157, 58,143,229, 63, 38, -241, 39,207,102,254,223,197, 76,106,213,195, 54, 61,251,230,222,140,156,242,248,247, 39,117,198,224, 30,254, 79,127,180, 34,229, -177,186,206, 42,148, 98, 80, 71,167,139, 99,250,218,171,108,165, 38,240, 80, 32,229, 74,249, 30,107,116,243,138,233, 41,111, 55, -242,240,217,179,103,158,241,241,114,140, 31,220,201,214,205,221, 1,114,123,183, 64, 40,236, 92, 32,242,122, 84,149, 94, 6, 21, -170, 65, 32, 6, 55, 39, 15,252,252,252,122, 78,157, 58,213,102,226,196,137,208,235,245, 88,185,114, 37,150, 44, 89, 2, 63, 63, -191,158, 55,110,220, 56,220, 28, 45, 81, 20,221,183,110,221, 10,212,180,117,192,190,125,251,160,209,104,224,232,232, 8,157, 78, -135,177, 99,199, 42,102,204,152, 1, 0, 56,117,234,148,204,214,214,182, 25, 55, 17, 70, 15,234, 17, 76, 32, 24,176, 97,231,133, - 18,216,224,153, 77,123, 46,245,120,118,104,176,235,224,174,222,100,251,193,235,163, 1,124,218,252,155, 83, 0, 68,195,109, 81, - 82, 52,179,247,224,122, 74,133,200, 96,114,117,221,158, 34,187, 81, 67, 98,108,229, 50,142,208,234, 28,136, 68, 78, 22, 45,249, - 86,111, 39,197,183, 96, 48, 24, 86,113,226,196,137, 21, 93,187,118,253,237,187,239,190,123,149,227,184, 30, 70,163,209, 29,128, -184,123,247,238,124, 65, 16, 14, 25, 12,134,197,201,201,201, 87,154,249, 16,166, 0, 74,110, 45, 87,238,101,122,165, 82,233,143, - 21, 21, 21,179, 5, 65, 24,181,107,215,174,249, 35, 70,140,192,207, 63,255,252, 44,238, 62, 82,184,181,101,105, 69, 94, 94,222, -117, 95, 95, 95,183,128,128, 0,183,202,202,202, 2,165, 82,233, 5, 32,163, 37,122, 74,165, 18,135, 14, 29,194,224,158,189,112, -102,111, 22, 34, 60,253,208,119,204, 83, 72, 76, 74,130, 68, 34,105,233,113,227,208,161, 67,120,120, 72, 95,108,218,180, 9, 65, - 49, 81,120,233,165,151,176,123,247,110, 72,165,108, 54,189,191,196, 96, 17, 17, 51,246,252, 56, 71, 14,209,130, 13,107, 62,193, -222,147, 85,166,180, 28,188,215, 58, 23, 95,110,128, 78, 44, 40,217,248, 92,151,131, 87, 63,124,246,233, 4, 85,191, 62,253,209, -175,119, 95,105,219,232, 62,111,160,222,248, 27,132,144,168,198,198,202,160, 34,230, 46,219,152, 54,110,221,142,203, 4,188, 14, -143, 13,235, 68,169,136,185,141, 70,190, 26,210,228, 13, 64,249,113,108,219,123, 20, 26,207, 92, 92,185,150,133, 77, 59,142,223, - 40,215, 85,253, 64, 8, 86, 95,204,108, 56, 42,114,167,102,137,206,244,226,160,151,183,125,241, 72,255,144,254,211, 30,111,143, - 45, 11, 30, 84, 92,211,150, 67, 16,120,244,111, 79, 65, 34, 20, 42, 17, 2,142,102, 72,233,178,109,185,137,122,147, 48,205,218, -116,230, 21,211, 20, 0, 41,193,206,196,225, 66, 58, 6,143,232,229,241, 97,215, 24,193, 67, 95,144,130,188,236,116,220, 52,216, - 32,167,132, 0, 20, 87,173, 62,118, 0, 55,110,220, 56,220,169, 83, 39, 0,128,193, 96, 64, 78, 78, 14,120,158,135, 86,171, 61, -220,220,252,228, 56,174,104,200,144, 33,238, 70,163,145,127,252,241,199,165,197,197,197, 8, 15, 15,175,137,194,233,116,248,229, -151, 95,234,122,155, 92,184,112, 1,145,145,145, 86,167,211,221,201,118, 76,199, 72, 23, 92,184,156,141, 44,109,197,218,212,107, -212, 28, 25, 76,214,158,189, 84, 48,185,123, 7, 15,184, 56, 40,198,220,205, 96, 53,164,217, 62,148,180, 1, 65,119,136,150,154, - 94,132, 4,221,219,135,146, 54,214,244, 28,188,155,166, 84,138,103,231,255,152, 57,125,253,193,162,132,255,123,174,151,125,143, -110,131, 21, 16, 45, 84, 95,101,180, 92,184, 70,117, 45,209,252,179, 48, 77,166,249, 95,213, 60,118,236,216, 37, 0,207,253, 23, -142,125,255,254,253, 83, 1, 32, 54, 54,118,221,166, 77,155,230,172, 92,185, 82,161, 86,171, 59,253, 25, 77,173, 86,123,249,214, -118, 69, 26,141,166, 77, 73, 73,201,121, 95, 95, 95, 69,115, 52,101, 50, 89, 81,251,246,237,221, 31,122,232, 33,240, 60,143,244, -244,116,100,101,101, 97,232,179,207,192,217,217, 25,199, 83, 83,145,158,158,142,119,223,125, 23, 70,163, 17,215,175, 95, 47,106, - 74, 83, 46,151,155,163,162,162,228,195,134, 13, 3,207,243,200,200,200,192,141, 27, 55,240,242,203, 47,195,209,209, 17,151, 46, - 93, 66, 70, 70, 6,102,204,152, 1,163,209,136,172,172, 44,243,223,113,142,254,103, 12, 22, 37, 16, 32, 90, 80,126,114, 38,190, -222, 6,179, 69, 64,204,133, 28,154, 89,111,147,101, 29,252,200,142,179,231,211, 82, 83,142,247, 83,160,226, 28, 40,208,172,122, -239,180, 44,154,223, 41, 66,170, 7,175,179, 71,209, 47,184,166,213, 85,166,181, 96,218, 25,193, 44,142,237,208,185,235, 90, 17, - 84, 46, 10,116, 61, 15,236,151, 82, 92,187,112, 29,169, 45, 9, 23,231,228, 80, 45,128,135, 2,125, 73,239,173,135, 50,231,142, - 27, 26, 17,245,252,168,182,168,170,212, 65, 70,171,113, 62, 95,129, 47,126, 46, 56, 89,162, 51,189,126,227, 6, 77,105, 73,198, - 95, 43,163, 21, 0,214, 69, 4, 74,169,206,112,225,237,135,251, 6, 4, 17,184,161,160,168, 28, 27,147,242,142,105, 75, 27,239, - 85,211, 64, 4, 11,147, 38, 77,130, 78,167,195,186,117,235,176,107,215,174, 22, 69,176,114,114,114,194, 0, 64,163,209, 20,216, -219,219, 75,159,121,230,153,218,161, 26, 80, 81, 81,129,146,146, 18,211,212,169, 83, 21, 0,160, 80, 40, 44,131, 6, 13,178,250, - 53, 39, 44,192,209, 71, 10, 35, 18,247, 93, 6,164,248,241,214, 85,248,227,150, 3, 89,147,219,183,114, 65,152,191, 67, 72,172, -134,216, 90, 51, 77, 14, 80, 51, 85,206,201,157,179,194,171,175,204, 0,165, 22, 28, 90,226, 28,222,235,249,178,137,104,225, 8, -235,103,175, 80, 45,128,201,145, 65,100,197,148, 15,119,190,209, 49, 42,181,251,107,147,134,219, 83,194, 38, 70,103, 48,254, 23, - 72, 73, 73,169,136,142,142,126,166, 95,191,126,211,244,122,253,130,123,161, 73, 41,229,189,188,188,242,188,188,188,194,205,102, -115,179,230, 50, 53,155,205, 47,127,241,197, 23,159, 91, 44, 22,247,218,239,140, 70, 35,214,172, 89, 3,179,217, 12,185, 92, 14, -149, 74,133,140,140, 12, 72, 36,146, 34,158,231,155,108,119, 43,138,226,213, 47,191,252, 50,196,108, 54,215, 53,237,224,121, 30, -171, 87,175,134,209,104,132, 82,169,132, 90,173, 70,122,122, 58,228,114,185, 89, 20,197,171,236,202,104,129,169,111,200,127, 68, -250,147,241,160,120, 11, 20, 4, 28, 62,108,104, 98,231,186,237, 0,220, 57, 1,180, 53, 14,183, 93, 56,233,171,144, 72, 86, 2, - 64,181, 40,140,187,112,137,238,249, 55,189,217, 16, 66, 72,128, 47, 70,123,187,217, 45,126,109, 76,180,221, 39, 63,156,169,204, - 43,173, 28,151,157, 77,183,223,171,116,250,123,146, 32, 31,103,188,161, 84,192,137,231,145,154, 89,132,213, 55, 10,233,181,230, -106,106, 52,154,170,128,128, 0,184,184,184,160,180,180, 20, 89, 89, 89,208,106,181,170,150,166,211,199,199,167, 43, 33,100,179, - 40,138, 54,119, 70,184,106, 77,152,183,183,183,191, 66,161,184,173,145,123, 99,154,109, 67,201,156,168, 80,231, 73, 23,174,150, -175, 62,159, 46,212,153,160,200, 32,242,126, 76, 27,183, 23,206,165,151, 46, 59,123, 69,120,179, 57, 17,172, 59, 39,123,182,118, -236, 43,171,174,207, 96,210, 79,164,152, 2,130,188, 11,215,232, 36, 22,201, 96,154, 76,147,105, 50, 77, 22,193,178,214, 89,255, -101, 11,128,168,251, 69, 19,128, 52, 48, 16,173, 0, 40,254,229,233,124, 27, 64, 21,128,183,255,173,233,140,137,129,236,127,249, - 90, 98,154, 76,147,105, 50, 77,166,121,255, 47,172,218,163, 25, 33, 94,220,227, 70,149,127, 81, 58, 63, 4,240,225,191, 59, 4, - 79,217,212, 50, 12, 6,131,193,184,175,225, 88, 22, 48, 24, 12, 6,131,193, 96,220, 91, 8,128,168,187,173,104, 78,221, 42, 33, - 36,170,185, 59,110, 74,159,105, 50, 77,166,201, 52,153, 38,211,100,154,247,159,102, 83,218,247, 75,219, 46,242, 87, 78,165,198, - 26, 0, 50, 77,166,201, 52,153, 38,211,100,154, 76,243,127, 17, 86, 69,200, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, - 24, 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193, 96, 48,152,193, 98, 48, 24, 12, 6,131,193,248, -215,240,151,246, 34,100, 48, 24, 12, 6,131,193,248, 95,132, 3, 0, 66, 8,189,181,244, 97, 89,194, 96, 48, 24, 12, 6,227,239, -226,126,245, 32,117, 83,229, 80, 74, 9, 33,132,162,102,240, 81, 6,131,193, 96, 48, 24,140,191,133,251,209,131,112,245, 29, 36, -128, 56,118,154, 25, 12, 6,131,193, 96,252,157,220,143, 30,228,182, 8, 22, 59,197, 12, 6,131,193, 96, 48,254,110,238, 71, 15, -194,122, 17, 50, 24, 12, 6,131,193, 96,220, 99, 88, 47, 66, 6,131,193, 96, 48, 24,140,123, 12,139, 96, 49, 24, 12, 6,131,193, - 96,252,151, 12, 22, 33, 36,138,105, 50, 77,166,201, 52,153, 38,211,100,154, 76,147, 25, 44, 6,131,193, 96, 48, 24, 12, 6, 51, - 88, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193, 96, 48,131,197, 96, 48, 24, 12, 6,131,193, 96, 6,139,193, 96, - 48, 24, 12, 6,227, 31,130, 0,184,107, 79, 0, 74,233,121,171, 69, 90,208,155,160, 41,125,166,201, 52,153, 38,211,100,154, 76, -147,105,222,127,154, 77,105, 55,199,127,252,171, 13,214, 95, 57,208, 40, 33, 36,234, 94,103, 20,211,100,154, 76,147,105, 50, 77, -166,201, 52,239, 63,205,251, 13, 86, 69,200, 96, 48,254,215, 8, 99, 89,192, 96, 48,254,106,164,255,212,142, 9, 33, 92, 61,131, - 39, 2,160,244, 79,134,211,254, 10,205,127, 43, 4,224,218,204,154, 37, 85,230,229, 53,235, 28, 26,189,189,249,139, 51,103,242, -180, 38,127, 24,140,255, 28,233,229,135,234,254,111,229,212,155,212,220, 14, 0, 0,122,229,230,175, 13,222,239, 97,142,189, 88, -230, 49, 24, 13,144,156,156, 92, 21, 16, 16,128,118,237,218, 93,201,207,207,255,138, 82,186,140,229,202,191,200, 96,181,241,180, -237, 28,224,235, 54,104, 71,114,246,123,141,109, 23, 27, 27, 43, 75, 72, 72, 88, 6, 96, 84,253,239,135, 14, 29,122,219,118, 50, -153,172,164,172,172, 44,248,192,129, 3,124, 83,251,142,141,141,149, 37, 12, 29,250, 71,205, 97,195,254,160,153,237,226, 18,114, -106,233, 82,190,222,151,132, 0,132, 2, 20, 0,194,195,195, 15,115, 28,231, 67, 8,105,200,200,213,253,207,113, 53,126, 78, 20, -197,220,212,212,212,158, 77,165, 83,163,209,196, 3,120,213,138,236,156,175,213,106,247, 54,182,129,195,158, 61, 25,148, 82, 39, -137, 68, 98,213,249, 17, 4, 1,242, 11, 23,110, 98,230,204, 64,118,233, 51,254,235,180,114,234,205, 13, 29, 58,180, 31,128,186, -235,249,245,167,230,255, 97, 59,137, 68, 98, 76, 76, 76, 92, 77, 41,101, 47, 21, 12, 70, 3,236,217,179, 7, 19, 38, 76,192,185, -115,231, 90,237,216,177, 99,145, 70,163,153,152,151,151, 55,136, 82, 90,204,114,231, 31, 54, 88,225, 26,251, 86, 30,174,174, 27, - 63,250,224,125, 0,120,175, 49, 35,228,237,237,189,204,207,207,111,208,130, 5, 11,176,109,219, 54, 4, 5, 5, 65, 46,151, 67, - 34,145, 64, 34,145,128,227, 56, 72, 36, 18, 76,157, 58,213,233, 86, 26,249,166,204,149,183,183,247, 50, 95, 63,191, 65,243,231, -207,199,142, 29, 59, 16, 16, 16,112, 87,205,105,211,166, 57, 1,144, 1, 16,234, 4,228,242,218,183, 96,122,203, 52,249,156, 58, -117,202,221,198,198,166,230,181,152, 82,136,162,120,219, 66, 41,173, 91, 4, 65, 64,175, 94, 86,191, 29,191,154,150,150,214,179, -178,178,242, 54,141,218,125,212,254,127, 75,175, 81,131,101, 50,153, 92,147, 79, 28, 6, 49, 95, 3,132, 82, 80,206, 5, 80, 4, - 3,156,242,174,219,151,150,150, 98,224,192,129,174,236,178,103,220, 15,230, 42, 33, 33,225,129,176,176, 48,205,156, 57,115,144, -145,145,129,240,240,112, 8,130, 0, 81, 20,111,251, 59,118,236, 88,197,168, 81,163, 8,203, 53, 6,227,118,252, 71, 44, 91, 68, - 5,203,248,154, 79, 78, 0,190,129, 78,167,195,115,207, 61,135, 45, 91,182,180,238,218,181,235,108, 0,147, 88, 78,253,131, 6, -171,149,175,173, 70,165,176,219,186,244,235, 47,136, 69,151,239,212,208,118,132, 16,110,200,144, 33, 95,249,250,250,246, 95,176, - 96,129,157, 92, 46,199,165,113,227,112,179,186, 26,166, 79, 62,129,147,155, 27,194, 39, 78,132, 43,207,131, 63,115,198,170,125, -215,215,156, 63,127,190,157, 92, 46, 71, 78, 78, 14, 76, 38, 19, 60, 60, 60, 96,107,107, 11,133, 66, 81,183, 88,169, 9, 27, 27, - 27,236,217,179, 7, 82,169,180,110,145, 72, 36,119,253,236,233,233,217,156,236,154,223,186,117,235,118,233,233,233,246,165,165, -165,232,218,181,171,142, 16,114,174,118, 37,165,180,221,185,115,231,236,173, 21, 35,230,107,168,204,254, 26, 98,217, 70,192,233, - 97, 8, 14,143,162, 26,193,119,125,208,136, 34,123,129,103,220, 23,230,138, 12, 25, 50,164,111,104,104,168,247,156, 57,115,100, - 50,153, 12,167, 79,159, 70, 97, 97, 33, 92, 93, 93, 97,107,107, 11,153, 76, 6,137, 68, 2,153, 76,198, 50,140,193,104, 0, 42, - 88,198, 71,119,236, 94,247,121,229,158,197, 48, 58,198, 32,247,189,247,176,104,209, 34,180,106,213,170, 35,203,165,127,208, 96, - 69, 7, 58, 57, 42,168,124,235,138, 37, 11, 20, 48,235,157, 46,157, 60,130,182,131, 39,214,154,133,243,245, 76, 11, 1,192,201, -100,178, 71,230,205,155,199,201,229,114, 0, 64, 71, 65,128,198,108, 70,121,100, 36,108,157,156,224,111, 54, 3,102, 51,140,183, -214,255,225,130,176, 66, 83, 34,145, 64, 46,151, 67, 42,149, 66, 38,147, 65, 46,151, 55,110,176, 42, 43,239,218, 19,162,214, 68, -237,217,179, 7, 22,139, 5,163, 70,141,186,171,217,106, 42,157,245,209,106,181,123, 53, 26,205, 57, 81, 20,123,138,162, 8, 66, -200, 57,173, 86, 59,176,118,189, 70,163,137,111,223,190,253,171, 0,230, 91,165, 41,148, 66, 44, 93, 11,251,110,197,168,248,205, - 13,196, 46, 30, 2, 2,112,244,108, 22, 14,166,100,161,168,180, 2, 81,193,110,120,100, 96,212, 93, 13,214, 95,209, 11,132,105, - 50,205,191, 88,147,200,229,242,192, 57,115,230,144, 90, 3, 85, 27,161,174, 53, 86,181,255,215, 86,225,223,161,185,145,229, 39, -211,100,154, 0,145,200,150,157, 73, 62, 58, 30, 0, 42, 46,110,194,148,199,187, 67,167, 75,199,164, 73, 51,144,155,155,139, 43, - 87,174,156,254, 59,211,121,223, 26, 44, 66, 8,165,148, 54, 43,140,238,235, 75,108,236,121,213,198, 47, 23,125,228, 96,111,175, -114, 75,222,157,136,172,172,252, 70,127, 35,138, 34,253,229,151, 95,112,121,252,120,116,224,121,148,205,155, 7,162,209,160,237, -240,225,144,155,205,168, 56,113, 2,114,181, 26, 10,181, 26, 13,181,129,106, 72, 51, 71,171,133, 84, 42,133, 90,173,134,157,157, - 29,148, 74,101,157,177,146,203,229,144,203,229, 86,107, 82, 74, 33,149, 74,113,254,252,121,100,101,101,193,201,201, 9, 71,142, - 28, 65,124,124,252,109,230, 74, 34,145,128, 16, 98,181,110,125,125, 65, 16,238,106,192,208, 68,213,224,237,103,208, 21,112,121, - 18,186, 99, 26,192,121, 12, 44,212, 9, 34, 21,145,124,169, 0, 95,207,122, 18, 0, 16, 51, 98, 22, 70,245,143,100, 17, 44,198, -125,131, 32, 8,184,124,249, 50, 46, 94,188, 8,137, 68, 2, 7, 7, 7,216,217,217, 65, 38,147,213, 45, 28,199,177, 8, 22,131, -209, 8,217,155,199, 79, 37,132,204,245,247,247,223,245,213,156, 57,161,241,241,241, 0,128,189,123,247,226,187, 39,158,192,123, -192,227,139, 9,201,159, 76,233,187,127,117, 90, 90,226, 65,254, 19, 6,171,246,192,154,115,128,132, 16, 18,234,233,240,195,172, -183, 95, 12, 12, 8, 14,241, 60,190,253, 39, 92,187,150,139,130,130,178,134, 12, 5, 37,132,136, 0,104, 96, 96, 32,202,170,171, -161, 49,153, 32,209,104,160,118,117,133,244, 86,228, 74,102,103, 7,185, 90, 13,121, 3, 17,172,198, 52,171, 77, 38, 40, 20, 10, -168,213,106,168,213,106, 40,149, 74,200,235,153, 43,107, 52,235,153, 54, 72,165, 82,156, 61,123, 22, 61,123,246,132,159,159, 31, -126,252,241, 71, 12, 28, 56,240, 15, 81,172,230,154,171,187, 25,172,122,141,223,155,108,220,126, 27,138, 80,240,246,143,128, 83, - 61, 0, 51,117,128,145,122,215, 84, 9,242, 34, 62,221,116, 13,151,179,139, 33, 8, 98, 93, 53, 33,131,113, 31, 64, 9, 33, 52, - 34, 34,130,148,148,148, 64, 38,147,213,153,171,214,173, 91, 35, 55, 55,183,206, 92,213, 70,180, 24, 12,198,221,145, 72, 36,179, - 19, 19, 19, 67,109,108,108,240,225,135, 31,194,222,222, 30,199,102,207,198,183,114, 57,108, 1,124,101, 54,191, 10,224, 47, 53, - 88, 45,241, 32,255,169, 8, 86,115,241,241,241,249,168,107,207,174, 61,131,219,116, 82, 30,223,185, 9,233, 87,178, 80, 92, 92, - 14, 74, 97,104,172, 96, 4, 0,153, 76,134,170,247,223, 71, 89,187,118,136, 26, 57, 18, 82,179, 25, 21,199,142, 65,174, 86, 67, - 21, 19, 3, 98, 50, 65, 86, 80, 96,117, 97, 91,171,233,238,238, 14,185, 92, 14,165, 82, 9, 27, 27,155,154, 8, 86, 61,115,213, - 92,131, 85, 81, 81,129,235,215,175, 99,194,132, 9, 80,169, 84, 32,132,160,176,176, 16,254,254,254,144, 72, 36,200,205,205,197, -254,253,251, 17, 20, 20, 4,133, 66,209,172,139,162, 94,227,246,118, 26,141,102, 23,165,180,221,169, 83,167,236, 99, 99, 99,209, -172, 8, 22,145,195,136, 0, 8,240,133, 72,127, 55, 82,150,122,102,138, 82,214, 6,139,113,255,112,229,230,175,244,255,158, 94, - 0, 0,112,119,119,175, 51, 82, 33, 33, 33,183, 69,174,152,185, 98, 48,154,166, 85,171, 86, 29,124,124,124, 48,117,234, 84, 84, -175, 93, 11, 61,128, 4, 0,137,102, 51, 0, 64, 13,188,201,114,233,111, 52, 88,126,126,126,147,162,163,163,159, 89,246,253,106, -187,185, 51, 94,215,149,167,158,231,140,213, 38,187,106,139,197,116, 77, 91,250, 85, 99, 17,167, 97,195,134, 65, 34,145, 64,237, -236, 12, 91, 71, 71,200,107, 35, 87, 42, 21,228,106, 53,136,201, 4,106, 50, 65,110,101,104,191,190,166,141,141, 13, 20, 10,197, - 93,141, 85,115, 13,214,205,155, 55,241,211, 79, 63,161,115,231,206, 80,169, 84,144, 72, 36,104,223,190, 61, 82, 83, 83, 17, 28, - 28, 12, 0, 72, 76, 76,196,195, 15, 63,140,244,244,116,180,105,211,198,174,185, 6, 75, 16, 4,236,217,179,199,158, 82,218,147, - 82,138,162,162,162, 22,157, 68, 65, 16, 80, 90, 90,138, 45, 91,182,160,160,160, 0,238,238,238,168,208, 57,162,182, 87,186, 40, -254,222, 11,146,193,184, 95, 16, 69, 17,182,182,182, 72, 73, 73,193,163,143, 62, 10, 0,176, 88, 44,112,115,115, 67,112,112, 48, - 6, 13, 26,132,129, 3, 7,178,140, 98, 48, 26,123, 97,185,114, 37, 57, 43, 43, 43,124,198,140, 25,248,206,199, 7,246,246,246, -120,101,230,204,227, 60,207,247, 99,185,115, 15, 12, 86,115, 66,115,126,126,126,195,188,188,188,102,175, 94,189,218, 86,171,213, -194,167, 85,148,253,182, 13,235,141, 30,106,185, 33,183,236,230,132,179, 57,186,196,166, 52, 56,142, 67,235,105,211, 16,100, 54, -163,228,232, 81, 40,212,106,168, 59,117, 2, 49,153,160,200,204,132, 92,173,134,196,214,182, 89, 7,194,113, 92, 77,149, 96,173, -153,170, 87, 53, 88,107,182,238,214,224,245,110,152,205,102,199,248,248,120, 60,240,192, 3, 24, 57,114,100, 93, 85, 96,135, 14, - 29,176,110,221, 58,140, 24, 49, 2,103,206,156,129, 70,163, 65,235,214,173,209,186,117,107, 36, 37, 37, 53, 43,189,181,195, 50, - 12, 24, 48, 64, 71, 8, 57, 71, 41,109,119,242,228, 73,251,150,156, 68, 81, 20,177,101,203, 22, 60,246,216, 99,104,213,170, 21, -142, 29, 59,134,233, 51, 62,132,163, 71, 0,120,206, 29, 0,101, 85,132,140,251, 14, 65, 16, 26,108,200, 94, 91, 38, 48, 24,140, - 38,239,163, 25,195,135, 15,143,253,240,195, 15, 91,191,242,202, 43, 0, 0,141, 70,211, 69,163,209,164,252, 93,227, 96,221,143, -213,131,117, 6,203,154, 3,236,211,167,207,151,130, 32, 12, 85,169, 84, 78,207, 61,247,156,185,184,184, 24,155, 55,111,198,183, -223,126, 91, 85,105,225, 78,151,151, 10,207,101,228,234,114,173, 53, 67, 54, 60, 15,152,205,144,223,106,115, 5,163, 17,212,108, -134, 76,173,134, 84,165,106,246,129,112, 28,119,215,136,149, 82,161,128,236,214,120, 88,214,162, 80, 40,202, 15, 31, 62,236,158, -147,147,115, 91,131,246,160,160, 32, 0,192,137, 19, 39,112,236,216, 49, 60,246,216, 99,144, 74,165,144,203,229, 56,123,246,172, -190,185,166, 72, 16,132,186, 94,132, 26,141, 38,190,115,231,206,119,237, 61,104,141, 86, 78, 78, 14, 90,181,106, 5,163,209, 8, -123,123,123, 20,231, 93,199,213, 43,233,168, 48,164,194,223, 93,133,194,194, 66, 40,149, 74, 86,154, 48,238, 43, 36, 18, 9,122, -247,238,141,226,226, 98,184,185,185, 65,169, 84,162,188,188,252, 54,227,181, 98,197, 10,150, 81, 12,198, 93,240, 31,177,108,145, -239,208, 47,199, 3,192,171,159,237,195,219,179, 23, 98,204,200,129,120,230,153,103,254,246,113,176,238,251, 54, 88, 13, 29, 88, - 92, 92,220, 24, 23, 23,151,209,207, 62,251,172,237,137, 19, 39,240,193, 7, 31, 72,247,236,217, 99, 62,121,242, 36, 47,138,226, -155, 57, 57, 90,171, 75, 48, 66, 8, 56,142,131,126,251,118,232,188,188,224,208,177, 35,136,217, 92, 19,185,178,183, 71,165,143, - 15, 96, 52,194,177,188, 28,205,213,172, 29,146,161,254,176, 12,178, 91,195, 53,180,164,224,190,219,184, 87,147, 38, 77,194,178, -101,203,208,173, 91, 55,132,133,133, 65, 42,149,130,227,184, 22,245, 34,172, 95,101,215,236,222,131,119,188,201,251,249,249, 33, - 37, 37, 5, 78, 78, 78,248,246,219,111,225,225,238,142, 73,195,195, 97, 50,153, 96,177, 88, 80, 89, 89, 9, 65, 16,112,159,206, - 28,196,248, 31, 68, 20,197,219,218, 92, 21, 23, 23,195,215,215,183,209,168, 22,131,193,168,247, 28,170, 63, 14, 86,199,238, 56, -178,105, 30,214, 93,246, 71,238,236,217,255,200, 56, 88,247, 91, 4,171,201, 82,168, 71,143, 30,234,178,178,178, 79,159,122,234, - 41,219,202,202, 74, 20, 23, 23,163,184,184, 24,199,143, 31,223,111, 50,153, 58,229,228,228,172,104,196,248, 68, 53,100, 94, 92, - 60, 60,160,176,183, 7,169,215,123, 80,166, 82,213, 68,178, 76, 38,160, 1, 35,208,152,102,125,115, 85, 91, 69,104,149,185,178, -179,187, 77,147,227,184,186, 97, 26,238,236, 49,232,231,231,135, 57,115,230, 96,248,240,225,183, 13,211, 96,109, 58, 53, 26, 77, - 60,165,180, 93,237, 3,226, 86, 35,247,120, 43,141,100, 84, 67, 6,107,240,224,193,216,182,109, 27, 94,123,237, 53,100,102,102, - 98,196,136, 17, 32,132,192,209,209, 17, 94, 94, 94,112,118,118,134,141,141,205, 31,210,218,144,230,159,129,105, 50,205,191, 75, -179,126,131,118,181, 90,141,170,170,170, 38,205, 21, 33,100, 36,203, 79,166,201, 52,235,198,193,194,153,228,163, 56,248,253, 43, -120, 49, 33, 8, 35, 2,211, 49, 99, 70,211,227, 96,253, 21,233,188,223,104,210,125, 84, 84, 84,188,219,186,117,107,249,197,139, - 23,145,145,145,129,203,151, 47, 67, 16,132,171, 57, 57, 57, 45, 46,164, 56,142,131,163,163, 35, 20, 10, 5,164,185,185, 53,109, -164,212,106, 0,168,137, 92, 81, 10,210,204,234, 44,142,227, 32,149, 74,127, 31,243,234, 86,161,219, 82, 4, 65,168, 27,161,189, -118,156,171,218,133,227,184,186,165, 5, 67, 52,188,122,252,248,113,251,172,172, 44, 80, 74,177,121,243,102,251,135, 31,126,248, -213,150, 70,175, 10, 11, 11, 97, 54,155, 33,147,201, 48,120,240, 96,116,239,222, 29,122,189,190, 46, 90, 69, 8,129, 84, 42,101, -189, 8, 25,247, 29,181,109,176,234,143,218,206, 34, 87, 12,134,245,100,111, 30, 63, 21,192, 84, 66,200,232,153, 51,103,126,247, -194, 11, 47, 64, 20, 69, 36, 37, 37, 97,201, 27,111,224, 61, 65,120,124, 49, 33, 85,147, 41,157,202,114,235, 30, 26,172,174, 93, -187, 6,232,116,186,101, 60,207,183, 23, 4, 65,113,240,224, 65, 84, 87, 87, 35, 53, 53,213, 32,138,226,230, 22,239, 80, 42,205, -159, 60,121,178,175, 53,219,202,229,242,155,104, 98, 30,194,250,154,212, 10,179, 35,151,203,111, 26,189,189, 27,213, 20, 69, 49, -183,254,220,130,181, 38,234, 46,209,159,250,133,125,174,149, 89, 48,191,107,215,174,127,248,174, 37,121,169, 80, 40,114, 18, 18, - 18,188,154,243, 27,185, 92,158,207, 46,123,198,127, 29,185, 92,110, 24, 59,118,172, 85, 61,119, 37, 18,137,105,195,134, 13,172, -110,156,193,104, 0, 27,185,252,241, 23, 95,124, 17, 63,252,240, 3, 54, 47, 90,132,129, 57, 57, 88, 39,151,195, 86, 46,199, 87, -102,243,120, 0,204, 96,221, 75,131, 85, 94, 94,254, 94,105,105,105,231,138,138, 10,254,234,213,171, 6, 66,136,192,113,156, 65, - 20,197,143, 4, 65, 88,222,210, 29,110,220,184, 49,252, 94, 31, 68,173, 38,177,162,202,211, 26, 82, 83, 83,123,254, 85, 25,254, -103,218, 90,221,201,111, 71,143, 70,176, 75,152,241,191, 70,152, 99, 47,172, 95,223,107, 45,203, 9, 6,227,222,112,250,220,185, -120, 0, 24, 60,120, 48, 12,175,190, 10, 0, 88,121,107, 28, 44,123, 96,217,191, 36,153,157, 0,184,223,250,191, 24,192, 37, 0, -177, 0,108, 1, 24, 1,232, 1,184,213,219,190,228,214,186,218,245,191, 2,176,252,157, 9,110,208,144, 92,186,116,233,233,162, -162, 34,123,147,201,228, 44, 8,130, 27,207,243,158,102,179, 57,136,231,249,101,148,181,148,254,199,161,128,248,103, 22,150,131, - 12, 6,131,193, 0,128,240,240,112,149,155,155,155, 42, 60, 60, 92,245, 14,165,183, 45,255,162,234, 65,119, 66,200, 54, 66,200, -182, 55,223,124,179, 47,128,238,111,190,249,102,231, 91,159, 59, 2,112,171, 93, 79, 8,217, 6,192,245,142,245,209,127,119,130, -239,183, 6, 11,180, 69,139,217, 92,251, 63,131,193, 96, 48, 24,140,127,235, 67,158,210,132,185,115,231,206, 1, 32,153, 59,119, -238,156,122,159, 65, 41, 77,168,255,247,142,245,238,127,119, 90, 9,128,168, 6, 14,194,234,153,178, 91,210,155,160, 41,125,166, -201, 52,153, 38,211,188,131,176, 59, 52, 55, 54,161,217, 88, 71,156,116,150,159, 76,147,105,254, 51,154, 77,105, 55,240,251, 7, - 9, 33,219, 40,165, 9,245,255,214, 55, 94,183, 52,183,213,255,255,142,245,219,255,110, 55,248,151, 45, 0,162,152, 38,211,100, -154, 76,243, 95,166, 57,146,229, 39,211,100,154,255, 62,205, 38,150, 7,107, 44, 75,195,127, 27,250,191,222,119,127,103,122, 27, - 25,166, 97,195, 6,201,141,112, 91,123,165,157, 32, 7, 0, 99,165,196,236,119,217,160,195,168, 81,108,190, 21, 6,131,193, 96, - 48, 24,127, 59,132,144,109,111,188,241,198, 91,255,133,180, 74, 27, 50, 87, 69,177, 10, 87, 27,203,205, 48,158, 71,107, 0,176, - 81,224, 82, 81,172,125,186,251,134, 13, 37,247,218,100, 13, 27, 54, 76,173, 80, 40,100,235,215,175, 47,251, 55,102, 82,187, 80, -226, 35, 88, 48, 20, 18, 12, 2, 0, 8,216, 41,145, 97,235,185, 12,154,219,204, 11,195,227, 86,212,176,240, 94,108,119,175,127, -203,184, 63,208,104, 52,182, 0, 18,164, 82,233, 24,103,103,231,142, 37, 37, 37, 31,230,228,228,124,222,194,194, 76, 10, 96,178, -147,147,211,104, 39, 39,167,192,210,210,210,235, 21, 21, 21, 27, 1, 44,166,148, 54,171, 71, 78,239, 14,100,186, 66, 46,123,182, -218,108,249,248,240,105,250,109, 92, 44,113,229, 69,204,181,145, 75,123, 25, 77,252, 39,135,206,208,229,205,216, 83,195, 58, 0, - 0, 32, 0, 73, 68, 65, 84, 76, 27, 23, 21, 21,101, 35, 8, 2, 81, 42,149,162, 92, 46,167, 10,133,226,206,182,148,252,129, 3, - 7,238, 28,150, 37,253,159, 56, 47,241,241,241,107, 40,165,195,121,158,135, 68, 34, 57,184,127,255,254, 33,127, 86, 51, 46, 46, - 78, 9, 0, 7, 14, 28, 48,254,199, 30,146, 92, 80, 80,144,250,250,245,235,122, 90, 59, 43, 61,163, 73,186,117,235,150,105, 54, -155, 27,109, 75, 36,151,203,139,126,251,237,183,192,251,240,240,139,107,171,254, 0, 20, 2,144,220,250,108,186,245,183,160,222, -119, 5, 13,172,255,231, 13,214,141,112, 91,123, 27,203,205,176,194,252,212, 81,133,218,211, 35, 1,192, 67,211, 97,163,135, 87, -228,134, 27,225, 78,230,174,145,163,213, 18, 91,178, 72,202,201,218, 87, 27,141,174, 50,153,172,196,196,243,103,165, 22, 50, 85, -155,186,254, 70,115, 19, 65, 41,253,137, 16,226, 61,116,232,208, 93,162, 40,174,220,190,125,251,165, 22,221,180,113,113, 82,207, - 50,215,199, 57,153,116, 8, 64,163, 40, 5, 40,145,158,135,217,188,179,192,165,120, 53,253, 99, 65,219, 32,177,177,196,182,186, - 2,241, 16, 49,180, 85,144,103,151,169, 19, 71,186,118,238, 62,208,182,178,202,130, 95,247,111,235,180,124,205,214, 23,219, 6, -147, 19, 2,193, 86, 91, 71,236, 73, 73,161,134, 38, 10,148,247, 9,193,180, 91,255, 47,164,148,190,251,103,182,179,226,183, 95, - 80, 74,223,188,199,133, 98, 91,103,103,231, 47,148, 74,165,157, 68, 34, 73,207,201,201,249,148, 82,122,170,185, 58,126,126,126, -145, 60,207, 15,151,201,100,177, 22,139, 37, 69, 42,149,110,185,113,227, 70,234,159, 72,151,164, 77,155,208, 39, 37,132,244, 0, -224, 4,224,166, 64,233,145,139, 23, 51,126,160,148,182,232,101, 32, 46, 46, 78,106,168,172,124, 92, 42,145, 12,166,148, 70,129, - 82, 2, 66,206,243, 60,191, 83,101,111,191,250,128,149,215, 82,247,238,221, 47, 91, 44,150,102,141, 85, 38,149, 74,139,124,124, -124,194,215,175, 95,223,236,180,251,250,250, 62,236,227,227,243, 85,215,174, 93, 85, 29, 58,116,128, 92, 46,199, 39,159,124, 50, - 25,192,231,214, 24, 41, 59, 59,187, 81, 42,149, 42, 72,175,215, 95, 51, 24, 12,137, 10,133,162,223,226,197,139,125,186,117,235, -102, 95, 84, 84, 68, 56,142,243,216,186,117,235, 19,159,127,254,121, 60, 33,228, 65, 74,169,117,249,208,129,116,109, 29,228,253, -238, 75, 79,244,197,107,115,127,124,169,103, 59, 82,108,107, 39,255,106,100,207, 80,167,200, 16, 39,188,191,244,183,201, 0,172, - 54, 88,145,145,145,242,132,132,132, 85,132,144, 7, 9, 33, 13, 62,160, 57,142,211,199,197,197,249, 55,118,190,130,186, 58, 31, -150, 74,164, 62, 13,173,231, 5, 62,247,250,177,178, 63, 61,116,139, 32, 8,131,150, 47, 95, 14,169, 84,138, 49, 99,198,244,137, -141,141,181, 77, 73, 73, 49, 88, 87, 30,197,186, 2,120, 5, 0,167, 80, 40, 22, 28, 61,122,180, 40, 54, 54,118,187, 92, 46,143, -187,181,254, 64, 74, 74,202,131,119,156, 83,242,103,122,124,199,197,197,189, 35,138,226, 68,133, 66,113,163,172,172,108, 92, 74, - 74,202,229, 63,155, 7,177,177,177,178,130,130,130,201,237,219,183,127,190, 83,167, 78, 94,169,169,169, 5, 62, 62, 62, 75, 60, - 61, 61, 23,167,164,164, 52,105,216, 59,116,232,224,205,113,220,147, 0, 30,191,245, 0,221, 64, 8, 89,157,146,146,114,237,127, -193, 96,153,205,102,247,148, 25, 51, 0,137, 4,134,190,125, 65, 41,133,106,214, 44,160,184, 24,101,243,231,131,231,121, 12, 30, - 60,216,253, 62, 61,252, 19,255,181, 4,223,213, 96, 41,237, 4, 57,207,163,117,161,246,244,200, 46,131, 22, 59, 0,192,241,157, -147, 71,186,120, 71,166, 42,237,132,116,133, 90,190,246,225,161,241,237, 71, 37,244, 33,190,222, 30,200,201, 43,244, 88,177,110, - 87,255,109, 59,147,214, 2,232, 97,101,212,234, 9,139,197, 18,192,113,220, 58,142,227,188, 23, 45, 90, 20,146,145,145, 49,110, -221,186,117,195,134, 14, 29,122, 68, 20,197,239,182,111,223,254,155,181, 7,226,213, 97,120,132, 23,188,214, 12, 31, 49,196,255, -193,254,238,138, 0, 47,119,136,162, 18,151,174, 89,252,246, 28, 58,213,127,199, 47,187,167,122, 70, 13,127,178,224,252,150, 11, - 77,105, 69,132,144, 71, 85, 74,249, 43,111,188,240,160,215,224, 65, 9,246, 46,190, 49, 82,144,154,201,162, 21, 14,192,136, 39, - 95,181, 27,254,196, 20,187,107, 23, 14,251,108,223,177,181,255,234,196, 3,121, 17, 33,100, 65,218, 85,250, 99, 67, 81, 37, 66, - 48, 77, 20, 41, 87, 83,232,147, 87,251,247,239, 63,192,198,198,230,182, 2,165,186,186, 90, 70, 8, 34, 69,145,222,122, 56,144, -105,132,144, 47,173,137, 70,213,238,195,100, 50,114, 50,153, 2, 18, 9, 55, 57, 58, 58,186, 67, 81, 81,209, 1, 0,203,181, 90, -109,201,159,185, 80, 84, 42,213,179,195,135, 15,159,179,114,229, 74,181,173,173, 45,180, 90,109,248,163,143, 62,218,158, 16,242, - 16,165,180,201,130, 87,163,209, 68, 3,120,200,205,205,237,225,113,227,198, 5, 60,240,192, 3, 8, 12, 12,132, 86,171,141, 79, - 74, 74,122, 51, 38, 38, 38,187,160,160, 96, 35,128, 68,173, 86,123,166, 57,230, 42, 42,178,213,252, 9, 19, 39, 69,140, 24, 49, -194, 91,105, 99, 43,205,201,201, 44,250,230,235, 37,142, 18,194,181, 39,132,188,218, 92,147,213,165, 75,151, 8, 34,138,107,159, -127,246,217,192,142,221,187, 75, 61,189,189, 81, 93, 94,142,140, 75,151,252, 78,158, 56, 17,191,101,239,222,105,177,177,177, 99, - 82, 82, 82,154,188,150, 76, 38,147,239,161, 15, 63,132,196,205, 13,212, 98, 1,223,166, 13, 68, 81,172,153, 71,239,240, 97,192, - 98, 1,181, 88, 96,233,223,191,110,126,202, 97,195,134,121, 20, 23, 23,203, 0, 52, 43,221,126,126,126,222, 97, 97, 97,203,223, -124,243, 77,185,209,104,196,233,211,167,113,244,232, 81,177,168,168,104,126, 83,230,138, 16,178,117,230,204,153,154,158, 61,123, -218,151,148,148,128,231,121,215,196,196,196, 9,177,177,177,246, 62, 62, 62,138, 85,171, 86,213,206, 16,224, 28, 18, 18,226,252, -248,227,143,155, 86,173, 90, 53, 25,192, 2,171, 10, 26,130,217,143, 14,235, 15,131,133,131,197,194,187,123,187,219,255, 48,121, -108, 31, 25,168, 9, 43,127, 62, 5, 11, 47,126,219, 28,115, 21, 28, 28,188, 50, 56, 56,184,239,220,185,115, 73, 70, 70,134,164, -205,173,124,229,121, 30,130, 32, 64, 16,106,178,110,204,152, 49,234, 91,229, 92,131, 6, 75, 42,145,250, 28,222,116,193, 93,165, - 82,213,253,182,118, 50,246,202,202, 74, 12,122,170,107, 75,162, 85,126,148, 82,255, 59, 12, 22, 87,219, 54,195,100, 50,193,198, -198,166,215, 3, 15, 60, 80,117,203, 84,151,237,218,181,235, 98, 35,146,207, 63,247,220,115, 83,212,106, 53, 22, 45, 90,212, 47, - 50, 50, 50, 78,169, 84,198,237,219,183, 15, 0,208,171, 87,175,184,206,157, 59,187,240, 60, 63,148, 16, 50,194,193,193,161,103, - 76, 76,204,225,232,232,232, 39,207,156, 57, 83,222,220,244,119,236,216,241,225,168,168,168,151,231,205,155,103,119,225,194, 5, -231,247,223,127,127, 45,128, 14,127,166, 12,137,140,140,148, 87, 86, 86,174,121,239,189,247, 6,215, 78, 53, 38,138,162,231,175, -191,254,250,254,107,175,189,214, 53, 54, 54,246,177,134, 76, 86,167, 78,157,218, 83, 74,103,132,132,132,196, 63,245,212, 83,146, - 30, 61,122, 64,175,215, 99,247,238,221,255,183,105,211,166,255,139,137,137, 57, 70, 41,125,255,244,233,211,135,238,213,195, 49, - 54, 54,246, 18, 0,191,218,184, 67, 74, 74, 74,235,127,197, 83,219,222, 30,232,219, 23, 21,121,121, 53,101,243,188,121, 53,101, -205,156, 57, 44,196,247, 95, 48, 88, 77, 81, 85, 85, 21,253,230,228,177,224,184,154,145,204,195,130,253,241,209, 91, 19,200,150, -109,187,172, 30,103,162,180,180,116,198,227,143, 63,238,189,101,203,150,231, 56,142,179, 41, 44, 44, 36, 85, 85, 85,182,211,166, - 77,243,213,233,116, 35, 18, 19, 19,123, 15, 27, 54,236, 28,165,244,147,173, 91,183, 38, 55,166,229, 30, 61, 50,212,195,205, 99, -247,167,179, 39, 56, 71, 5,135,192,100,177, 32,167, 48, 23, 20, 74,120,121,168, 49,230,161,104,121,143,142,178,208,249, 95,236, -219,229,213,126,104,255,252,179, 91, 27, 43,200, 32,161,120,253,248,137,212, 86, 28, 95, 66,136,204,161,129, 55, 99, 41, 66,219, -197, 73,159, 15,142,114, 26, 50, 96,144,195,195, 79, 79,123, 29,192,143,141, 61,199,234, 61,208, 48,101,202,148,186,169,120,106, - 41, 40, 40,192,254,253,251,238,250, 27,107,253, 70,253, 15, 31,124,240,129, 99,105,105,233,131, 43, 86,172,136,247,246,246,158, -149,151,151,215,236,194,135, 16, 98, 11, 96, 80,191,126,253,102,111,218,180, 73, 93, 59,122,189,167,167, 39, 22, 44, 88,224,247, -232,163,143,126, 12, 96, 88, 19,230,234,187,177, 99,199,142,238,223,191, 63,194,195,195, 81, 82, 82,130, 99,199,142,153,150, 44, - 89,114,253,129, 7, 30, 8, 26, 61,122,180, 98,202,148, 41,254,153,153,153,175, 38, 38, 38,190,234,236,236,252,109, 89, 89,217, -203,214,164,175, 77,155,208, 39,199,141, 31, 31, 49,233,249,151, 98,205,102, 99,213,217,148,131,251,165,114, 78,242,210,203,227, - 29, 75,203,138,220, 40, 21,159, 4,240,125, 51,204, 85,168,143,167,231,158,185, 31,127,236,228,226,238,142,252,252,124,220,200, -201, 65,222,249,243, 32, 0,250,247,239,175,136,110,223, 62,100,225,210,165, 59, 59,117,234, 52,224,228,201,147, 23,155,210,148, -184,185, 33, 55, 38, 6, 0, 80,158,146, 82, 27, 89,129,253,208,161,191,191,153,166,165,129,227, 56,120,120,120,180,100,250,165, -218, 72,112,151,158, 61,123,202, 1,224,181,215, 94,211, 85, 86, 86,206, 35,132,252,148,155,155,171,109,226,167,147,223,121,231, - 29,239,144,144, 16,255, 53,107,214, 64,175,215, 3,128,123,112,112, 48,194,194,194,132,131, 7, 15, 34, 60, 60, 28,246,246,246, - 56,120,240, 32,142, 29, 59,134,152,152, 24,181, 92, 46, 31,105,141,193,234, 21, 77,134,116,236, 16,213, 53,192,207, 31, 7,142, -158,128, 92, 33,115,122,225,169, 4,216,171,165,152,183, 98,187,152,157, 83,250,210,161, 51,116,165,149,215, 35,247,224,131, 15, - 46, 15, 12, 12,140,155, 59,119,174, 74, 46,151,227,220,185,115,200,207,207,135,187,187, 59,108,108,108, 32,147,201, 32,149, 74, -155, 53, 85,150, 74,165,130, 86,171,133,249,214,224,138,130, 32, 64,167,211,193,203,171, 38,248, 56,107, 22,225,102,206,180,174, - 42,107,192,128, 1,175,123,120,120,204,240,240,240,144,212,255,222,104, 52,226,141, 55,222,128, 94,175,135,143,143, 15,124,124, -124, 54,213,206,123, 90, 82, 82,130,254,253,251,207,221,179,103,207,236, 6,100, 29,189,189,189, 49,116,232, 80,152, 76,166,136, -175,190,250,234,123, 74, 41,170,170,170,234, 54,240,240,240,200,236,213,171,151,164,103,207,158, 8, 9, 9,193,210,165, 75,251, -110,216,176,161, 55,128,159,155,123, 45, 57, 58, 58, 62, 50,106,212, 40, 59,181, 90,141, 46, 93,186,192,100, 50,105,226,226,226, -148, 45,169,138, 36,132, 72, 53, 26,141,167, 84, 42,253,108,242,228,201, 3,251,244,233,131,180,180, 52,236,220,185, 19,195,134, - 13, 67, 92, 92, 28,222,126,251,237, 65,239,190,251,238,100, 52, 48,171,133, 40,138,171, 55,110,220, 24,232,235,235, 11,137,164, - 38, 91, 29, 28, 28, 48,110,220, 56,140, 29, 59, 22, 59,118,236,232, 58,103,206,156,181,113,113,113, 1, 7,154, 81, 83,209,212, - 59, 75,202,173,251, 53, 54, 54,214,239,223,242,208, 54,117,235,134,178,188, 60,120,122,123, 3, 0,242,180, 90, 80, 74,235, 62, -227, 86, 89,195,248,151, 26, 44, 99,165,196,108,163,192, 37, 15, 77,135,141,199,119, 78,174,171, 34,148, 82, 92,170,174,148,152, - 1, 64,160, 20, 21,122, 30,182, 74, 14,153,121, 58,156,191, 90,116,183, 2,255,182,174,150,253,251,247,223,170,211,233,194, 93, - 92, 92, 22,240, 60, 47,233,219,183,175,164,107,215,174,238, 89, 89, 89, 56,112,224, 0,100, 50, 25, 76, 38, 19,113,118,118, 86, -142, 27, 55, 78, 99, 48, 24, 92,223,122,235, 45, 55, 0,125, 26,210, 36,163, 71, 75,188,101,146, 13,243,102, 63,238, 76, 36,151, -113, 57,251, 38, 66,125,187,192,213,209, 15,185, 69,122,164,164,238,192,229,140,237, 8,245,245,199,132, 49, 97,142, 11,191, 46, -222, 72, 98, 39, 70,209,148,165,150,134, 52, 1, 72, 36,170, 80, 98, 74,122, 88,148,184,245, 33, 18,239, 4, 66,108, 52,183,109, - 80, 89,146,137, 75,191,173,164,153,231,126,166,254,209, 79, 18, 0,146,134,142,157, 82, 90, 40,145, 72,150,115, 28, 25, 79, 8, - 65,135, 14, 49,133,243,231,207,191,219,155,154,165, 67,135,152, 66,137,132,243,168,153, 71,144, 91, 38,138, 66, 97, 35,233,172, -191,191, 66, 66,200, 66,133, 66, 57, 13, 0,188,189, 53,133,219,183,111,183,140, 26, 53, 10,159,126,250,169, 98,250,244,233, 51, -125,124,124,158,202,205,205,205,109,236, 28,213, 43, 20,163, 28, 28, 28, 38,182,106,213,106,216,236,217,179, 21,131, 6, 13,178, -165,148, 66,167,211, 65,167,211,161,170,170, 10,118,118,118,144, 74,165, 94, 77,157,247,192,192,192,135,199,141, 27, 7,119,119, -119, 28, 63,126, 28,211,167, 79,207, 42, 42, 42,250, 32, 47, 47, 47,101,237,218,181,173, 67, 66, 66,222, 94,186,116,105, 68,207, -158, 61,185,161, 67,135, 98,235,214,173, 61,154,210,172, 59, 81,132,244,120,232,161, 17,238, 38,147,161,210,104, 52,148, 95,207, - 74,206,203,201,185,112, 51, 60,172,147,199,128,129,221, 92, 46, 93,186,218,163, 33,131,117,167,230,232,209,163, 37,156, 32,252, -248,241,188,121, 78,156, 84, 10,139,197,130,128,128, 0,156, 59,119, 14, 21,101,101, 48,232,245,184,150,154, 10, 77, 80, 16, 38, -143, 25,227,244,193,146, 37,107, 98, 99, 99, 59,214,127,235,190, 91, 58,169,197,114,103,181,213, 31,230,204,187,219,119,214,156, -247, 59, 30, 66,153, 90,173, 22, 42,149, 10, 17, 17, 17,118,201,201,201, 71,115,114,114,180, 77,105,218,216,216,140,236,209,163, -135,253,218,181,107, 17, 27, 27, 11, 39, 39, 39,236,223,191, 31,231,206,157,131,217,108,230,116, 58, 29,212,106, 53,230,206,157, - 11,127,127,127, 84, 84, 84, 32, 51, 51,211, 85, 38,147,185, 89,149, 78,130,103, 70,143,120, 8, 18,185, 29, 46,101,228,160, 79, -215, 24,120,120,120,224,236,197, 12,100,231,150, 22, 16,130,167, 7,245, 80,206, 53, 24, 76,239,252,122,154,174,104, 72,147,212, - 56, 79, 78, 42,149, 62, 52,103,206, 28, 78, 46,151,215,229, 93,237,156,132,181,198,170,118,146,246,187,153,213,187,165,147,231, -121,152,205,102,152,205,102,136,162,136,162,162, 34, 84, 84, 84,192,217,217,185,102,131,153, 0, 1, 33,180,129, 89,232,239,184, -223,199,126,242,201, 39, 18,239,218, 7, 94, 61,114,114,114, 80, 94, 94, 14,123,123,123, 56, 57, 57,213, 69,220,138,139,139, 49, -117,234,212,177, 0,102,223, 77, 83, 42,149,126,242,233,167,159, 14,107,221,186,181,215,179,207, 62, 11,169, 84, 58,168,164,164, - 4, 43, 87,174,132, 74,165,194,138, 21, 43, 16, 24, 24, 40, 17, 4, 1, 6,131,161,214, 8, 87, 42, 20,138,204,150, 92, 75,101, -101,101, 63,108,219,182,173,123,183,110,221, 28, 1, 96,248,240,225,220,150, 45, 91,178,251,246,237,123, 67,167,211, 61, 89,191, -186,176, 33,205,216,216, 88, 89,126,126,254, 43, 99,198,140,153, 18, 31, 31,239, 80, 82, 82, 2,165, 82,137,159,126,250, 9,203, -151, 47,223,109,177, 88,102,109,220,184,241,189,111,190,249,166,255,240,225,195,241,205, 55,223,188,112,171, 89,132,120, 23, 77, -111, 63, 63, 63,156, 61,123, 22,206,206,206,112,115,115, 67,121,121, 57,142, 29, 59,134, 19, 39, 78, 32, 34, 34, 2,132, 16,167, -198,162,149,141,164,179,197,145,170,230, 12,103,116,175, 52, 75, 75, 75, 81, 94, 94, 14, 57,106, 6,111,188,121,243, 38, 0,212, -125,110,105, 58, 9, 33, 82, 31, 31,159, 4, 71, 71,199,137, 0, 36,101,101,101, 43,108,109,109, 19, 51, 50, 50, 76,127,215,177, -223,151, 6,139, 16, 82,123, 94,226, 40,165, 7,253, 46, 27,116, 69,177,246,233, 30, 94,145, 27, 92,188, 35, 83, 1, 64, 74,113, -137,202,236,211,253,206, 25,116, 0, 96, 54, 83, 28,189, 84,134, 51, 87, 10,112,238, 74, 62,212, 54, 77,191,117, 27,141,198,126, - 59,119,238,196,134, 13, 27,230,127,254,249,231, 52, 59, 59, 27, 89, 89, 89,112,118,118, 70,159, 62,125, 80, 84, 84,132,147, 39, - 79, 34, 52, 52, 20,148, 82,248,249,249, 41, 0, 56, 54,166,233,121, 69, 28,243,212,132, 14, 65,110,142, 4, 91,143,238, 66,215, -136, 17, 80, 41,165, 40, 42,171, 2, 71, 8, 50,174,239,133, 32,216,225, 76, 90, 54,186, 71,217,161,103, 23, 7,159,202,125,101, -207, 2, 88,218,244, 19,203, 2,161,112, 47, 21, 10,247, 81,206,185, 35,145,120, 15, 39,101,229,213, 72,251,237, 91,154,119, 41, -169,174,172, 53,155,116, 77, 74, 9,130, 48,213,211,211,211,240,198, 27,111,244, 11, 11, 11,179,188,248,226,139,167, 50, 51, 51, -167,220, 97, 68, 62,251,242,203, 47,145,158,158, 94, 60,119,238,220,253, 5, 5, 5,111, 53,243,198,156, 65, 8,249, 2, 0,180, - 90,109,201,182,109,219, 58, 30, 60,120,240,213,133, 11, 23,122,189,244,210, 75,138,151, 95,126,121,124,205,163,162,201, 27, 45, - 58, 46, 46,110,231, 15, 63,252, 96,231,229,229, 69, 8, 33, 48,155,205, 40, 42, 42, 66, 81, 81, 17,202,203,203, 81, 89, 89, 9, -189, 94, 15,142,227,154,108, 47,167, 82,169, 36, 21, 21, 21,184,121,243, 38, 58,119,238,140, 19, 39, 78, 4, 28, 57,114,100,249, -215, 95,127, 45,142, 29, 59,150,196,197,197,145,226,226, 98,108,218,180, 73,204,207,207,231,108,108,108,244, 86,191, 29,115,112, - 82,169,108,229,191, 29, 73,220,169,205, 73, 45,206, 43, 56, 95,206,129,114, 90,109,114,121,112, 88, 95, 87,212,180,201,178,138, -107,215,174, 61, 54,109,210,164, 96, 71,103,103,240, 60, 15, 55, 55, 55,228,228,228,160,170,170, 10, 85, 21, 21, 48,232,245,168, -174,168, 64,218,190,125,232, 54,100, 8, 6,116,232,224,183,253,212,169,103, 0,124,211,152, 46,223,166, 77, 93,228,202, 49, 54, -246,247,251, 33, 53,181,206, 88,201,122,244, 0, 81,169, 64,222,106,121,231, 24,173, 86,123, 38, 32, 32, 96,215,160, 65,131, 6, - 78,152, 48,129,203,207,207,223,226,229,229,213, 47, 63, 63, 63,173,177,223,169,213,234,224,226,226, 98,232,116, 58, 56, 57, 57, - 97,225,194,133,240,240,240,128,193, 96,192,201,147, 39,169,175,175, 47, 73, 74, 74,130,143,143, 15, 74, 75, 75, 97, 50,153, 80, - 85, 85, 85, 96, 50,153, 12,214, 93,152,240,241,244,242, 5, 71, 45,208, 22, 20, 99,248,144, 1,144,202,213,200,204, 41, 70,116, -100,136,247, 19, 67,123,120, 75, 8,143,255,251,120,237, 11, 0, 86, 88, 97, 36,105,122,122, 58, 82,111,229,159,131,131, 3,236, -236,236,106, 38,121,151,203,235,204,149, 84,106,125,128,190,118,114,244, 90,115, 85, 84, 84,132,140,172,203,216,148,180, 10,102, -193,226,250, 93, 23,135,235, 33, 50,217,121,119, 61,153, 89,116,150,158,105,226,254, 89, 53,125,250,244,247,220,221,111,111, 10, -227,231,231,135,137, 19, 39, 98,219,182,109, 72, 79, 79,191,173, 59,119,105,105,169, 8, 96, 85, 67,154,199,143, 31, 47,236,210, -165,203, 35,175,188,242,202,222, 85,171, 86, 41,198,140, 25, 83, 87,157, 41, 8, 2,244,122, 61,246,237,219,135, 67,135, 14, 33, - 57, 57,185,204,108, 54,255, 44,145, 72,150, 28, 63,126, 60,173,185,215, 81,183,110,221,156,213,106,245,135, 47,188,240,130, 61, - 0, 84, 87, 87, 99,204,152, 49,182,143, 60,242, 8, 82, 82, 82, 34, 62,255,252,243,149, 0, 58, 55, 85, 29,200,113,220,250,164, -164,164,248, 86,173, 90,213,188, 61, 90, 44, 56,114,228, 8, 38, 76,152, 80,170, 82,169,198,166,166,166, 86,250,248,248,188,183, -109,219,182,254,209,209,209,104,215,174,157,103,113,113,177, 26, 64, 69, 3,231, 29,130, 32,212,157,159, 21, 43,126,191, 84,170, -171,171,107,162, 59, 38, 19,233,220,185,115,224,137, 19, 39, 50,239, 65,164,234, 70,189,207, 55,254, 45, 15,237,170,213,171, 33, -155, 62, 29,151,143, 28, 1,165, 20,110,145,145, 0,128,203,135, 14,213, 12,159,240,202, 43,205,210,243,241,241,113,161,148, 62, - 19, 31, 31,255,210,160, 65,131,220,188,189,189,225,234,234,138,115,231,206,117,219,181,107,215, 2, 31, 31,159,229,148,210,229, - 90,173,246, 47,203,131, 59, 61,200,125, 23,193,162,148,146, 91, 7, 73, 48,106,148,224,190, 97, 67,201,141,112, 39,179,210, 78, - 72, 7,128,234, 74,137,217,239,220,173, 97, 26,102,175, 5, 5,133, 32, 80, 80, 81,132, 72, 41, 4, 43,130,231,174, 14, 22,112, -231,157,241,120,215,225, 24, 59, 54,153,236,219,183, 15, 7, 14, 28, 64,116,116, 52, 44, 22, 11, 28, 28, 28, 48,122,244,104, 36, - 38, 38, 66,165, 82,161,178,178,178, 73, 77,181, 11, 63,162, 75,187, 48,201,229,236,115,232,216,106, 36, 2,189,123, 34, 35,183, - 28,101, 58, 35, 74,202, 13, 8, 15,127, 29, 5,165, 6, 84, 84, 26,112,246,210, 26,248,122, 7,115,156,236,106,127,171, 12, 86, -189, 39,132, 88,118,146,138,101, 39,233,190, 93,127,108,110,196, 27,173,107,226, 32,138,226,226,157, 59,119,118,235,217,179,167, - 52, 62, 62, 62, 38, 32, 32,160, 67, 86, 86,214,105, 0, 8, 8, 8,232,208,191,127,255, 24, 15, 15, 15,124,246,217,103,213,162, - 40, 46,110,225,219, 79,253,246, 90,199,253,252,252,102,109,222,188,249,235,137, 19, 39,194,219,219,187,189, 53, 26, 78, 78, 78, -227, 87,174, 92,105,231,237,237, 77,120,158, 71,117,117, 53,242,243,243,113,243,230, 77,148,149,149, 33, 59, 59, 27,165,165,165, -200,203,203,171,204,204,204,220,104,109,218,222,121,231, 29,240, 60,111,153, 48, 97,130,172,111,223,190, 88,181,106, 21,119,237, -218, 53,124,243,205, 55,194,250,245,235,179, 56,142,147,142, 28, 57,210,191,121, 7, 76,138,115,114,174,185, 27,205,101,213,131, -226,186, 79, 43,202, 44,134,123,224,112,236,253,117,227,103,217,153, 25,148,112,176,186,237,153, 82, 38, 27, 16,219,181,171, 44, - 63, 63, 31,161,161,161,200,205,205,197,149, 43, 87, 96, 50,153, 80, 89, 94, 14, 75, 69, 5,132,178, 50,208,138, 10,100,254,250, - 43,218,132,134, 42,118,158, 58,213,191, 41,131, 85, 91, 45,220, 80,212,138,227, 56, 16, 59, 59,192,206, 14,148,107,222,228, 10, - 26,141, 38,193,193,193,225,149,138,138,138, 93, 90,173,246, 99,179,217,252,202, 71, 31,125, 20,251,254,251,239,187, 78,159, 62, -221,126,250,244,233,171, 3, 3, 3,187,101,102,102, 54, 88,181,163,215,235,175, 89, 44, 22, 23, 0, 30,123,247,238,133,187,187, - 59,116, 58, 29,204,102, 51, 12, 6,131,217,217,217, 89, 89, 82, 82, 2,163,209, 8,163,209, 8, 7, 7, 7,164,164,164,148,242, - 60,191,195,154, 52,218,218,216,184, 42,108, 28, 33,242,213,144,202,100,240,247, 11,132, 40, 24, 81, 86, 81,133,167, 31, 25,138, - 83,231, 82,177, 35,233, 56,111,177, 52,126,205,211,154, 66, 74, 36,132,208,240,240,112,220,188,121, 19, 18,137, 4,118,118,118, - 80,171,213,136,136,136,192,141, 27, 55, 90,108,176,234,155,171,125,191,109, 67,145, 62, 15,203,230,173,133,143,151, 31, 7,192, - 45, 55,255, 70,191,103, 95, 29,221, 41,168,167,203,188,235,135, 75, 27,108,215,182,123,247,238,121, 3, 6, 12,216,150,159,159, -239, 86,239, 92,119,179, 88, 44,239,242, 60,143,204,204, 76, 92,188,120,241, 19, 74,105,210,239, 33,115, 73,238,158, 61,123, 26, - 53, 5,199,143, 31, 63, 21, 27, 27,251,236,232,209,163, 23, 4, 6, 6,122, 80, 74, 17, 29, 29,141,199, 31,127, 28,243,230,205, -195,175,191,254,186, 65, 20,197,239, 28, 28, 28,142, 22, 21, 21, 73, 26,138, 60, 52, 70,231,206,157, 93,148, 74,229,193, 47,191, -252, 50, 32, 36, 36,132,211,106,181,248,237,183,223,208,173, 91, 55, 16, 66, 16, 22, 22, 6,139,197,226,211,148,185,162,148,254, -180,121,243,230,248,144,144, 16,164,165,165,225,208,161, 67,112,119,119,135,173,173, 45,134, 14, 29,234,242,211, 79, 63, 77,140, -140,140,252, 92, 42,149,190, 59,100,200, 16, 8,130,128,228,228,228,252,235,215,175,235, 27, 59, 71,141,188,188,131, 82, 10,139, -197,242, 9,199,113, 35, 59,117,234, 52,244,228,201,147,201,127,230,225,248,175,105,115, 5,192,223,223,191, 13,199,113, 47,186, -184,184,160,172,164,228,182,200, 85,109,137, 81,251, 25, 0, 90,181,106,181,169,186,186,122,102, 99,157,135,124,125,125,163,108, -109,109, 95, 74, 72, 72,120,244,193, 7, 31,148,152,205,102,108,219,182, 13, 95,124,241, 5, 6, 13, 26,132,176,176, 48,188,254, -250,235, 14, 70,163,241,213, 93,187,118,189, 18, 25, 25,185, 71,167,211,189,251,103, 58, 36, 53,113,127,255,238, 65,238, 55,131, -117,235,192,226,234,214,140, 26, 37,248, 1, 55,111, 21,226,174, 78, 78, 78, 11, 4, 65,232,131,119,223,133,189,212, 17,153, 25, - 87,160, 43, 19, 97, 49, 25, 33,138, 20, 84,108, 58, 79,108, 21, 2, 28,122, 83, 84,252, 74, 32, 35, 4, 67,134, 12,193,192,129, - 3,113,234,212, 41,172, 90,181, 10, 61,123,246, 68,121,121, 57, 42, 42, 42,160,215,235,107,219,130, 52,138,220,166,186,109,128, -103,171,255,103,239,186,227,162,184,246,239,185, 51, 91,129,165,247,166,193, 94,158, 74, 21,187, 24,172,137, 37, 70, 77,177,198, - 94, 98, 98, 73, 98, 75, 98,108,209, 20, 77, 49,106,244,197,168,137,229,133,168,137, 37, 22,140,193,130,136, 84, 81, 16, 80, 65, - 41, 11, 2,210,151, 93,118,119,102,238,239, 15,202, 67,164, 44,198,252,158, 47,111,206,231,195,103,119,150,153, 51,183,204,204, - 61,115,238,247,222,139, 50,109, 79,152,203,229, 40, 44,173, 68, 81, 89, 37, 10,138,117, 56,242,235,235,168,212, 85,128,171,212, -131, 55,112, 80, 57,143, 69,123,187, 65, 0,189,221,245,105, 22,162,177,178,204,164,145, 58,249,249,249, 15, 60, 60, 60,126,137, -137,137, 25, 63, 97,194, 4,156, 63,127,126, 62,128,153,213, 15,216,249, 19, 38, 76, 64, 76, 76, 12,110,221,186,245, 75,126,126, -254, 83, 25, 82,106, 48, 24, 42,140,213, 93, 84, 74,165, 82,102,202, 49, 12,195, 12,113,116,116, 36, 6,131, 1, 15, 31, 62, 68, - 65, 65, 1, 30, 62,124, 8,173, 86,139,242,242,114,112, 28, 7,163,209,136,200,200,200, 7, 60,207, 71,182, 36, 61, 73, 73, 73, -237, 23, 47, 94, 60,115,240,224,193,171, 70,142, 28,137,227,199,143,227,199, 31,127,156, 3,224,112,223,190,125, 99, 90,154, 63, -158,231,255,216,182,109,187,243,172, 25,163,157,127, 62,177,123,227,225, 35,215,123, 76,124, 53, 55,209,205,189,187,227,254,237, -225,114,142,163, 39, 76, 38, 19,132,238,246,206,206,184,119,239, 30,162,162,162,160,211,233,106, 69,133,161,168, 8,198,194, 66, - 16,141, 6, 10,142,131, 46, 35, 3,109,187,119, 7, 1,186,152, 32,172, 27,237, 22,100, 89, 22,132, 16, 16,149,170, 74,100, 53, -210,173,213,136,184,242,241,241,241,249, 97,215,174, 93,178, 37, 75,150, 4,180,105,211,230,219,156,156,156, 12, 79, 79,207, 23, - 62,255,252,243,139,235,214,173, 83, 76,154, 52,169,195,174, 93,187, 38, 54,229, 12,233,116,186,195, 39, 79,158,124,181,117,235, -214, 78, 9, 9, 9,208,233,116, 16, 4, 1, 35, 70,140, 0, 0, 69,205,126,201,201,201,186,138,138,138,188,196,196,196,178,251, -247,239, 27, 1,152,244, 18, 96, 97, 97,105, 39,145, 89, 64, 96, 36,176,182,182,133, 68,110, 1,129,147,128, 23, 0, 75,107, 7, - 92,137, 77, 70,210,125,118,206,237, 52,132,152,244,182, 83, 45, 88, 29, 28, 28,106,187, 4,107,186, 11,157,157,157, 81, 82, 82, -242, 68, 2,171,180,180, 20, 37, 37, 37, 72, 77,191,133,188,178, 28,132, 30,138, 0,207,243,168,172,172,210,166,110,206, 30, 56, -119,232,154, 42,104,188,255,123, 14, 62,228, 98, 65, 28,141,105, 66,100,165, 0, 72,169,233,218, 12, 14, 14,254,120,240,224,193, - 48, 24, 12,232,223,191, 63, 18, 18, 18, 70,216,216,216,172,111,233, 72,209,152,152,152, 95,187,118,237,122,170,172,172,172, 53, -207,243,175,218,217,217, 45,227, 56,174,198,125, 59,193, 48,204,117,141, 70,115,188, 93,187,118,125,252,253,253,143, 68, 71, 71, - 79,111, 70,248,147,128,128,128,113,230,230,230,211, 52, 26,205, 33,165, 82,185,108,219,182,109,173,219,180,105,195,220,191,127, - 31, 28,199, 33, 35, 35, 67,136,138,138,170,240,247,247, 87,133,134,134,150, 51, 12,211,168,211,230,231,231, 39, 53, 26,141,255, - 58,118,236,216,144,182,109,219,226,226,197,139,216,180,105, 19,218,181,107,135, 61,123,246,160, 79,159, 62,240,242,242,130,173, -173,237,130,210,210,210,192, 79, 62,249,100,152,175,175, 47,142, 30, 61,138,252,252,252, 29, 77, 77,217,192,113,141,135, 86, 85, - 84, 84,128, 82,138,231,159,127,126,250,146, 37, 75, 48,106,212,168,227,129,129,129,253, 35, 35, 35,239,152, 80,172,207,164, 83, - 85,219, 55,234,234,186,110,200,144, 33, 75,122,244,232,129,253,251,247, 67, 29, 24, 8,237,143, 63,194,102,228, 72, 80, 0,105, - 63,252, 0, 74, 41,108, 70, 87,133,194,122,141, 31,143,101,203,150, 13, 27, 59,118,172, 39, 0,255, 70, 56, 55, 78,153, 50,229, -173,201,147, 39, 35, 54, 54, 22, 59,119,238, 68, 92, 92, 92,205, 4,162, 48, 26,141, 72, 74, 74, 66, 82, 82, 18, 92, 93, 93,241, -226,139, 47,146,217,179,103, 15, 29, 49, 98,132, 3,128,126,127, 69, 62, 31,211, 32,127, 91, 7,235,209,135,184,189,181,181,117, -244,182,109,219,236,122,246,236,201,114, 28,135,223,207,159,199, 59, 11,167, 99,248,200, 5,208, 85,202,193,233, 8,120,153,170, -217,147,105,245, 44, 74, 47, 18, 8,170, 23,160,215,235, 49,251,160, 12, 54,228, 33,190,156,214, 19, 91,183,110,173,234,138,169, -168, 64, 89, 89, 25,202,203,203, 81, 86,214,124,215, 91,121,177,202, 96, 48, 10,200,206,187,143,172,156, 27,176, 86,181, 2,101, - 60,241,160,176, 2, 4, 78, 48,106,147, 33, 84,223,152,149,218, 44,104, 42, 77, 20,199,212,244, 56, 73,131,190,212,228,125, 25, -134,249,225,192,129, 3,163,182,108,217, 34, 31, 53,106, 84, 71, 87, 87,215,126, 0,240,202, 43,175,116,180,182,182,198,129, 3, - 7,244, 77, 61,192, 90,120,193, 50,174,174,174,147,251,245,235,135, 7, 15, 30, 32, 45, 45, 45,210,196, 52,158,141,143,143,159, -234,233,233, 73, 50, 50, 50,144,149,149,133,194,194, 66, 88, 91, 91,195,206,206, 14, 46, 46, 46, 16, 4, 1, 90,173,214,249,230, -205,155, 62, 0,206,154,154,166,188,188,188, 34, 0, 95, 85, 84, 84,172,146, 72, 36, 53,214,254,175,120,194, 5,168,111, 38,221, - 9,233,214,173,125, 87, 15, 15,219, 14,126,221,186, 57,122,184,223, 41,117,112,244,176,252,237,116,130, 89,222,131,162,228,155, - 55,111, 31,109, 73,145,105, 11, 11,161,190,126,189, 42,230,170,172, 12,186,242,114,112,197,197,112,237,208, 1,208,104,192,232, -116,144,232,116,144, 10, 2,204,204,205, 97,202,219,150,228,210, 37,168, 70, 86, 77,223,162, 79, 74,170,114,172, 8,129,116,192, - 0, 16, 11, 11, 16,115,115, 48, 39, 79, 86, 9, 45, 75, 75, 96,119,179,189,100,112,115,115,179,119,113,113, 9,217,186,117,171, -172,160,160, 0,137,137,137, 9,105,105,105,165, 14, 14, 14, 42,137, 68, 34, 36, 39, 39,255,145,156,156, 60,194,203,203, 11, 60, -207,183,109,134,238,235,163, 71,143, 6,247,237,219,151,243,242,242, 50,207,207,207,247, 44, 42, 42, 34, 57,213,163,148,106, 16, - 21, 21,165,200,204,204,172,224,121,254, 24,170,230,193,106,244, 38,113,116,116,180,144,203,229,175,242, 60, 63,185,171, 23, 47, - 41, 44,211, 2,156, 30,233,247,210, 81,172, 49,128,114, 70,100,100,229, 64, 83, 41,224, 97, 97, 25,252,122,190,176, 85,207, 93, - 89,229,230,230,182, 82,173, 86,159,104,202,197, 26, 51,102, 12, 40,165,136,138,138,194,165, 75,151,112,233,210, 37,220,187,247, -111,243,199,218,218, 26,161,161,161, 24, 52,104,144,233,221, 46, 21, 21,112,118,118,134,181,181, 53,142,134,253,128,239, 62, 63, - 88, 27,232, 94,231, 5, 9,230,230,230,216,240,206, 23, 22,211,223, 27,247, 33,128, 81,166,112, 7, 7, 7, 79,110,223,190,189, - 79, 96, 96, 32,238,221,187, 7,111,111,111,180,111,223,190,107,106,106,234, 12, 83,220,207,250, 72, 76, 76, 52,248,250,250, 58, - 57, 59, 59, 47,158, 58,117, 42, 56,142,195,176, 97,195,144,146,146,242,125,126,126,126,246,140, 25, 51, 90, 15, 28, 56, 16, 31, -126,248,225, 43, 61,123,246, 92,215, 84,119, 89,191,126,253,222, 29, 63,126,252,123, 47,189,244,146,242,210,165, 75, 61,181, 90, - 45,235,225,225,193,220,185,115, 7, 60,207, 35, 60, 60,156, 59,123,246,108,182,193, 96,216,124,227,198,141, 94,229,229,229,199, -226,226,226, 26,117, 46, 31, 60,120,240,214,209,163, 71,135,118,236,216, 17,167, 79,159,198,188,121,243, 78,171, 84,170, 46, 47, -190,248,162,167,133,133, 5,226,227,227, 97, 48, 24,224,234,234,234,180,124,249,242, 17,195,134, 13,195,185,115,231,176,118,237, -218, 83,206,206,206, 95, 55, 39,130, 37,213,177,145,117,193,178, 44,226,226,226,240,252,243,207, 99,217,178,101, 0,128,223,127, -255,221,114,232,208,161, 81, 65, 65, 65, 46,205, 5,230, 55,230, 84, 61, 43,163, 8, 45, 45, 45, 39,239,217,179, 7,183,111,223, -198,229,203,151, 81, 84, 84, 4,157, 78, 87,187,152,110, 73,113,113,213,116, 13,173, 91,163,235,202,149,248,246,229,151,145,147, -147, 3,134, 97,236,155,120,198,191,186,114,229, 74,156, 58,117, 10,155, 54,109, 66,105,105,195,109,152,153,153, 25, 2, 2, 2, -224,227,227,131,180,180, 52, 0,176,255,171,242,249,183,118,176, 26,131,181,181,245,103, 59,118,236,176,235,211,167, 15,171,209, -104, 32, 8, 2,122,247,234,133,169,211,166,226,204,209,159,225,218,102, 16, 88,157, 25, 56, 75,243,230, 5,150,209, 10,232, 81, - 2, 77, 89, 25,148,213,193,164,215,179,116,160,148,194, 96, 48, 64,163,209,212,198,246,212, 4, 83, 55,235, 30, 25, 20,113, 73, -119,121,143,210,242, 56, 68,198,252, 8,163, 94, 15,175,142, 43, 80,105,116,128,133,211, 12,104, 13,199, 97, 40,174,114,226,229, - 86, 65,120,240,160, 0, 32, 76,179, 22, 39,229, 76, 14, 3,130, 81,103,186,192,202,200,200, 40,118,117,117,253, 41, 60, 60,124, -202,216,177, 99,113,230,204,153, 57, 0, 48,118,236, 88,132,135,135,227,238,221,187, 63,229,228,228, 20,183, 80, 72, 57,160,106, - 78,152, 90,215,203,217,217,217,171, 85,171, 86,243,103,207,158, 29,216,189,123,119,236,223,191, 31, 0,206,155,194, 87, 80, 80, -240,207,165, 75,151, 14, 89,188,120,177, 11,195, 48, 36, 37, 37, 5,132, 16, 56, 57, 57,193,211,211, 19,118,118,118, 40, 46, 46, -134,175,175,175,133,167,167,231, 40, 83, 5, 86,181,197,239, 1,160,164,230, 77,169,250, 83, 6,192,154, 82,250, 68,163, 90, 5, - 65,182,253,236,233,200,237, 1,190,195, 25,175,214, 22, 37,128,158, 92,139,202,182, 48,242,210,150, 53, 94,132, 36,220, 77, 77, -245,162,130,128,242,162, 34, 24,202,202, 96, 44, 42, 2, 87, 88, 8,226,234, 10,137, 78, 7,182,178, 18,172, 94, 7,165,210, 28, - 37,121,121, 32,140, 9,215, 82,157, 6,161, 70, 92,177, 44, 91,235, 90, 17, 11,139, 90,135,139,101, 89,152, 50,117,145, 66,161, -216,179,115,231, 78, 23, 87, 87, 87,124,241,197, 23,112,113,113,233, 24, 28, 28, 92,208,191,127,127, 51, 7, 7, 7,116,236,216, - 17,254,254,254,248,227,143, 63,192,178,236,221,102, 30,108, 28, 33,100,212,229,203,151,223,138,136,136,120,217,213,213,149, 76, -153, 50, 5,195,135, 15,135, 66,161,128, 86,171, 69, 81, 81, 17, 78,158, 60, 73, 56,142,235, 83,253, 6,220,234,185,231,158,219, - 67, 8,201, 78, 79, 79,159, 82,159, 83, 46,151,239,153, 53,107, 86,208,168, 81,163, 8, 35,232,244,161,103,246, 73,120,158, 35, -239,172,252,142, 15,187,116,129,225,121,142,140,123,125,169,240,219,249, 4,102,206, 91,159,241, 62,189, 94, 68, 98, 98,162,203, -172, 89,179,214, 3, 56, 97,202,181, 36,145, 72,106,203,179, 62, 88,150,109,116,208,192, 99,206, 8,207,101,143,152,214,251,223, - 47, 76,188,193,222,221,197,147,169,113,174, 0,160,180,180, 20, 25, 25, 25, 48, 26,141,176,183,183,135,209,104, 52,105,125,182, - 53,107,214, 48,132,144,247, 26,218,211, 84, 0, 0, 32, 0, 73, 68, 65, 84, 39, 79,158,140,220,220, 92,172, 93,187, 22, 43, 87, -174,196,248,241,227,177, 97,195,134,149,126,126,126,123, 76,153,255,169, 94, 55, 94,123, 27, 27,155,195,235,215,175,151, 89, 89, - 89, 33, 46, 46, 14, 93,186,116,193,231,159,127, 46, 73, 73, 73,105,221,169, 83, 39,220,186,117, 11,217,217,217,105,205,197, 34, -201,229,242, 57, 11, 22, 44, 80,102,102,102, 98,220,184,113,202,180,180, 52,220,188,121, 19,148, 82,196,198,198,114, 71,143, 30, -205,214,106,181, 3, 98, 98, 98, 30, 2,248,190,185, 23,186,254,253,251, 47,104,223,190, 61,126,255,253,119,204,159, 63,255,172, -133,133,197,235,197,197,197, 51,244,122,253,231, 35, 71,142, 68,159, 62,125,144,156,156,140, 81,163, 70, 33, 32, 32, 0,231,207, -159,199,178,101,203, 78, 91, 88, 88, 76,108,166, 28,238,132,133,133,117,245,247,247,175,237,221,144, 74,165,176,177,177, 65, 82, - 82, 18, 58,116,232,128,101,203,150, 97,203,150, 45, 88,178,100,137, 48,116,232, 80, 78,175,215,203,106,156,205, 39,196, 51, 49, -138,176,188,188,156,230,228,228,192,202,202, 10, 33, 33, 33, 72, 58,117, 10,145,179,102,225,222,154, 53,160,148,194,113,253,122, - 4,190,255, 62,186,221,189, 11,181, 90,141,125,251,246,129, 97,152,218, 17,177,141,220,243, 40, 41, 41,129,183,183, 55,162,162, -162,176,111,223, 62,124,241,197, 23,181,177,108, 82,169, 20, 65, 65, 65, 24, 58,116, 40, 82, 82, 82,176,115,231, 78, 88, 89, 89, - 65,196, 19, 8, 44, 74, 41,169,251, 89,175,123, 99,160,191,191, 63, 91, 94, 94, 14,157, 78,135, 7, 15, 30, 32, 61, 61, 29,102, -102,102,200,206,203, 64,207,118,229,200, 37,122, 36,198,166,242,144, 72,174, 55,247, 80,212,235,245,136,140,140, 68,100,100, 36, -132,142,155, 32, 8, 66, 77, 55, 69,173,123,149,155,155, 43,120,122,122,162,180,180,148,105,190,241,170, 60,123, 62, 60,126,216, -148,177,207,203, 67,195,190,131,177,146, 67,185,206, 6, 26,157, 30,101, 90, 41,244,138,161, 32,228, 34, 24, 86,129, 62, 62,237, -240,199,229, 84,157, 96, 52,132, 54,221,224, 64, 16, 12, 15, 41,227, 49,137, 8, 57, 71, 40,120, 93,195, 59,178, 44, 36,114, 21, -180, 21,101, 2,165,166, 59, 48,182,182,182, 7, 15, 30, 60, 56,182,111,223,190, 22,131, 7, 15,110, 87,221,125,103, 60,120,240, -160,198,214,214,246, 96, 11,197,213, 42, 66,176, 12, 20,140, 66, 46, 63,103,103,111,255,187,165,165,165,223,176, 97,195,218, 13, - 31, 62, 28,109,219,182, 69, 72, 72, 8, 66, 66, 66,206,231,228,228, 92, 49,241, 77,226, 58, 33,100, 66,122,122,250, 68, 87, 87, -215,161, 61,122,244,112,105,211,166,141,210,218,218, 26, 44,203, 66,163,209,160,160,160,160,102,196, 85, 27, 83,211,250,220,115, -207,193,213,213,245, 29,169, 84,186,190,222,155, 10, 7,224, 5, 87, 87, 87,139, 39,185,136, 19, 19, 19, 31, 12, 31, 22,236,180, -253,219,240,246, 90, 45,111,248,245,212, 57,131, 81,111,161, 77, 74,190,219,162,217,236, 13,130,112, 54, 38, 58,122,120,191, 62, -125, 20,247, 98, 98, 96, 44, 46, 6, 95, 84, 4,137,193, 0,137, 70, 3,182,178, 18, 68,171, 69, 43, 31,115, 64,112,198,181,180, -108,206,192,243,231, 76, 22, 88,213,221,129, 53,141,127,141,192, 98,234, 8,172,154,238,175,166,224,236,236,108, 62, 98,196,136, - 32, 95, 95, 95, 80, 74,241,217,103,159,193, 96, 48,200, 13, 6, 3,140, 70, 35, 12, 6, 3,202,202,202,112,248,240, 97,252,240, -195, 15, 17, 86, 86, 86, 63,154, 80,231,156,135,135,199, 92, 65, 16, 28, 57,142, 51, 56, 58, 58,202,126,250,233, 39, 40,149, 74, - 48, 12, 3, 31, 31, 31, 40,149, 74,189,155,155, 91, 9, 0, 56, 57, 57, 25,183,108,217, 34,153, 49, 99,134,172,145,183,127,159, -183,222,122, 75, 90, 35, 26,221, 90,109,224, 12, 6,131, 0, 0,157,123, 12,248,119,183,216, 48,224,246,237,219,216,188,121, 51, - 52, 26, 13, 88,150,149,153,120,141, 34, 56, 56, 24, 67,135, 14,173,237, 14,116,114,114,130, 94,175, 7,199,113, 38,139, 43, 0, -168,153, 68,116,205, 26,194, 96, 53,176, 39,208, 50, 29, 64,109,252, 84, 73, 73, 9, 50, 51, 51,113,255,254,253,218,238, 19,129, -154,246,150, 29, 30, 30,222,223,203,203,203,205,195,195, 3,187,118,237,130, 86,171,189,251,203, 47,191,180,157, 50,101, 10, 90, -183,110,237,192,243,124, 48,128,211, 45,185, 78, 57,142,155,178,112,225, 66, 11, 39, 39, 39,236,222,189, 27,199,142, 29,203,235, -209,163,135,211,244,233,211,209,177, 99, 71, 36, 38, 38,226,171,175,190,122, 40, 8,194,171, 38,112,165, 93,187,118,205,217, 96, - 48, 32, 59, 59, 27,130, 32, 32, 57, 57, 25,217,217,217,194,133, 11, 23,178,117, 58, 93,141,184,106, 22, 94, 94, 94, 42, 63, 63, - 63,167,148,148, 20, 28, 58,116, 8, 70,163,113, 77, 98, 98,162,193,198,198,230,208,182,109,219, 86,182,105,211,198,118,192,128, - 1,232,211,167, 15, 40,165, 56,126,252, 56, 62,250,232,163,211,102,102,102,175, 39, 38, 38, 26,154,113,213, 95, 91,183,110,221, - 7,246,246,246,227, 38, 77,154,196,248,249,249, 33, 58, 58, 26, 60,207, 35, 56, 56,184, 86, 92,157, 57,115,230,167,211,167, 79, -191, 4, 64,166, 82,169,236, 76,153, 86,130, 16,242, 2,128, 26,135,160,130, 82,250,219,179,214, 80,235,116, 58,164,164,164,192, -217,217, 25, 29,251,246, 69,199,244,116,252, 81, 29,212, 62,104,233, 82,148,107, 52,216,179,103, 15, 98, 98, 98,192,178, 44,218, -182,109,219,252,243,206, 96,192,157, 59,119, 80, 80, 80,128, 49, 99,198, 96,210,164, 73,248,244,211, 79, 97, 48, 24,176,106,213, - 42, 20, 22, 22, 98,215,174, 93, 72, 77, 77,133, 68, 34,129, 74,165,250,203,242,215,148, 6,249, 91, 59, 88, 53,194, 72, 16, 4, -168,213,106, 68, 69, 69, 33, 45, 45, 13, 42,149, 10, 90, 78, 16,182, 94,141, 23, 24, 34, 85,115, 20, 17,132,151,174,106,174, 66, -121,158, 71, 68, 68, 4,110,223,190, 13,235, 14,180, 38, 48, 17, 58,157, 14, 26,141,166,198,185,210, 38, 37, 37,229,150,148,148, -216, 53,151,182, 7, 29,152,253,161,161,231, 22,249,251,116,109, 63,120,224, 71, 56,113,226, 67, 20,151,150, 66, 83, 41, 65,185, -214, 0,141,142,194,205,178, 45, 2,123,248, 34,255,161, 30, 41, 55, 99,178,243,101,182, 77,190,137, 81,130,111, 38,140, 13, 94, -252,193,187,179,157,187,116, 92,174,164,121,191,129,150,196, 82,212,204, 87, 73, 24,200, 85, 14,128, 68, 65,163,147, 10,202,255, - 72,208, 22, 80,130,111, 90, 32, 8, 52, 30, 30, 30, 63, 44, 92,184,112,125, 84,212, 53, 39, 0,136,142,142,206,203,205,205,125, - 63, 43, 43, 75, 99, 42, 15, 33,196,134, 16, 44, 19, 4,202, 86,139,180, 33,139, 23, 47,118,235,219,183,175, 65, 42,149, 34, 35, - 35, 3,159,126,250, 41,194,195,195, 15,229,228,228,108,111,201,172,206,148,210,120, 0,241,132,144,181, 9, 9, 9,131,131,131, -131, 55,116,232,208,193,131,227, 56,148,148,148,160,168,168, 8,169,169,169,168,168,168,104,118,217,145,140,140,140,115,153,153, -153,131,231,206,157,139,190,125,251, 78,219,187,119,239,107,117,109,224,238,221,187, 95, 29, 61,122,180,135,181,181,181, 76,171, -213, 26,147,147,147, 47,182,232, 53,211,211,179,223,162, 69,139,122,204,153, 51, 7,229,229,229,216,183,111, 31,182,111,223, 14, - 79, 79,207,126,153,153,153,151, 91, 32, 0, 15, 30, 11, 13, 93,220,163, 83,167, 14,173,189,188,144,114,246, 44,100, 6, 3,164, - 28, 7,182,162, 2, 82, 99, 37,158,243,183,128, 76,233,128,156,123, 90, 28,186,121,243, 62,165,180,217, 9, 50, 13,193,193, 48, - 38, 39,131,101, 89,200,130,130,170, 98,173,204,205,193,252,250,235,191,133,213,234,213,160, 22, 22, 16,130,154, 15, 65,120,240, -224, 65, 69,251,246,237, 99,111,221,186,229,215,169, 83, 39,172, 89,179, 6,153,153,153,160,148, 34, 47, 47, 79,151,151,151,167, - 46, 44, 44,204, 96, 24,230, 88,118,118,246, 30, 83,151, 34, 17, 4,193,241,248,241,227, 53,142, 34,126,255,253,119,184,185,185, -193,218,218, 26,165,165,165,152, 50,101,138,252,131, 15, 62, 0, 0,196,198,198, 74,205,204,204, 26,119,117,141, 70,202, 48, 12, -201,204,204, 52,152,155,155, 19, 59, 59, 59,137, 66,161, 64,101,101,101,173,208,186,125,251, 54, 78,156, 56,129,172,172, 44,216, -217,217, 49,182,182,182,224,121,190,200,196,180,130,101,217,199, 2,218, 91, 42,174,234, 98,245,106, 42, 16, 16,210, 70,194, 94, -207,206,205, 28,236,230,236,129, 7, 15, 30, 32, 35, 35, 3, 25, 25, 25,200,204,204, 68,251,246,237,145,126,255, 46,228, 50,233, -117, 19,239,163,215,122,246,236, 9,173, 86,139,216,216, 88, 94, 42,149,190,150,144,144, 16,161,209,104,164, 61,122,244,192,253, -251,247, 95,105,169,192, 98, 24,198,195,220,220, 28, 90,173, 22,199,143, 31, 47, 84,169, 84,157,227,226,226,198,167,166,166,126, -234,233,233,105,121,255,254,253, 7, 6,131, 97, 68,116,116,116,170, 9,238,200,204,247,222,123,239,128, 32, 8,109,254,241,143, -127,176,163, 71,143,182,112,119,119, 71, 84, 84, 84, 69,101,101,229, 39,166,138, 43, 0, 72, 79, 79, 47,191,116,233, 82, 94,215, -174, 93,157, 92, 93, 93, 33,149, 74,215,185,185,185,125, 98, 97, 97,241,241,200,145, 35,109, 67, 66, 66,240,243,207, 63,195,194, -194, 2,233,233,233, 57,201,201,201,223, 56, 57, 57,109, 55,197,193,139,138,138, 74, 7,240, 70, 96, 96,224,199, 95,126,249,229, - 50, 66,200,107,103,207,158,173,141,189,219,188,121, 51,206,156, 57,243,211,115,207, 61, 55, 43, 36, 36,100,122, 11,171,222,156, - 82,122,179,250,153,250,143, 58,191, 63, 43,177, 89, 70,189, 94, 15,123,123,123,228,231,231, 35, 47, 47, 15,173, 90,181, 66,255, -254,253, 97, 52, 26,241,203,201,147,184, 84, 45,182, 28, 28, 28, 96,101,101,133,248,248,120, 80, 74,111, 53,217,249, 99, 48,212, -246, 70,196,199,199,195,201,201, 9, 75,150, 44,129, 94,175,199, 79, 63,253,132,184,184, 56, 48, 12, 3, 71, 71, 71, 88, 90, 90, -214,196,104,221,130,136,167, 39,176,170,215,204, 26,219,163, 71, 15, 73,106,106, 42, 82, 83,171,238,217,138,138, 10, 78,194,226, -232,131,235,191,188,209,132, 0,232, 86,111,126,152,136,213,171, 87,247,158, 54,109, 26,220,221,221,177,243,154, 1,247, 51,120, - 24, 12, 6,228,228,228,224,202,149, 43,124,255,254,253, 89,142,227,202,121,158, 31,149,153,153,249, 58, 33, 36,183, 73,206,144, - 16,222,209,123,220,132,109, 59,254,249,199,180,105,211,108, 71,143,217,142,216,196, 27, 40,210, 56, 1, 0,220, 28, 44, 16,216, -233, 61,228, 61,172,196,153, 83, 39,138,169, 80, 49,145,198, 29, 50, 54,197,153,148, 70,191,239,214,138, 92,152, 60,251,253,183, -125,186,121, 13,125,103,238, 75,246, 29, 60,198, 40, 80, 28, 73, 21, 86,101,144, 91, 56,226, 86, 90,129,246,183, 8,245,195,130, - 18,238,119,194,227,171,164, 12,154,222, 20,103,125, 20, 22, 22, 94, 86,171,179, 29,235,204,218,238,168, 80, 40, 47, 55, 35,168, -154,228,172,153, 78,225,244,233,211,184,116,233,146,225,246,237,219, 23, 8, 33,199,213,106,245,245, 39,229,164,148,150, 1, 56, - 98,105,105, 41,232,116,186, 15, 71,140, 24,209,158, 16,130, 59,119,238,224,252,249,243, 97, 5, 5, 5,159, 52,199, 89, 81, 81, -177,224,237,183,223,254,102,240,224,193, 67,170, 71, 60,201, 83, 82, 82, 64, 41, 69, 64, 64, 0,250,244,233,211, 70,175,215, 11, - 87,175, 94, 45, 60,121,242,228, 33,157, 78,183,165, 37,233,204,204,204,188, 28, 16, 16, 80,213, 13,173,213, 34, 43, 43, 11, 28, -199, 65,173, 86,183,168, 60, 67, 66, 66,248,192,192,192, 87,190,252,254,251, 63,222, 26, 55,206,182,215,232,209,200,142,136,128, - 94,173,134,156,231, 33,151, 41, 97,212, 56,161, 48, 91,135,239,110,222, 44,213,243,252,235,245, 27,135,134,210, 89, 53,167, 25, -169, 29, 45, 72, 84,170,170,184,171, 58,163, 8,169, 74, 5, 70,165, 2, 35,147, 61,230, 96, 53,196,169,213,106, 39,206,158, 61, - 59,242,183,223,126,179,121,253,245,215, 49,122,244,232,248,210,210,210,225, 5, 5, 5, 38,245,109, 55,196,201, 48, 76,254, 11, - 47,188,224, 88, 89, 89,201,189,246,218,107,146,130,130, 2,116,236,216, 17, 0, 80, 86, 86,134, 83,167, 78,161, 83,167,170, 48, -148,155, 55,111,162,107,215,174,141,114,198,199,199,255,188,119,239,222,185,227,199,143,151,241, 60,207, 87, 7,197, 19, 23, 23, - 23, 54, 42, 42, 74, 56,118,236, 24,180, 90, 45, 60, 60, 60,152, 86,173, 90,145,168,168, 40,225,238,221,187,145,132,144,149,166, -212, 59,165,244, 17,113, 37,145, 72, 80, 81, 81, 97,146,184,106,234, 90,162,160,212, 81, 67,214,188,177,100, 66,224,185, 67,145, - 42, 11, 11,139,218,152,159,118,237,218, 65, 34,149, 96,247, 47, 91, 53, 37,101, 15,215, 54,199, 25, 20, 20,164,144, 74,165,163, -125,124,124, 16, 29, 29, 13,189, 94,127,241,220,185,115,183,130,131,131,207,197,199,199,143,232,216,177, 35, 24,134,121, 33, 40, - 40,200, 34, 44, 44, 76, 99,106, 58, 41,165,105, 89, 89, 89,240,242,242,130,141,141,141,149,209,104,228,226,226,226,126,236,222, -189,251,209,212,212, 84, 47,133, 66,113, 63, 58, 58,186,220,148,188,199,196,196,100, 2,232, 23, 20, 20, 36,185,113,227,198,253, -254,253,251, 67, 46,151,163,125,251,246,170, 59,119,238,188,142, 38,166,142,168,207, 73, 41, 21,220,221,221,183, 93,187,118,109, -173,143,143, 15, 94,123,237,181,231,163,163,163,159,247,246,246, 70,219,182,109, 17, 30, 30,142,176,176,176, 67,130, 32,188,149, -147,147,163,107,234,133,175,177,188, 87, 7,173,207,244,243,243,123, 89, 34,145,192,210,210,146,205,206,206,102,207,158, 61, 11, - 74,233,155, 77, 13, 26,104,238, 89, 87, 31,166,196, 92,181,148,243, 73,238, 77,134, 97, 62,154, 58,117,234,215,115,230,204, 81, -246,236,217, 19, 37, 37, 37,181,162,255,183,223,126,131, 32, 8,176,183,183,135,189,189, 61,110,223,190,141,163, 71,143,234,139, -139,139,183, 41,149,202,207,155,226,156, 50,101,202, 35,156, 53,226,237,196,137, 19,181,131, 72,236,237,237,145,154,154,138, 35, - 71,142,232,138,139,139,183,114, 28,183,229,175,204,251,255,156,192, 42, 46, 46,126,119,197,138, 21, 3,103,204,152, 97,167,213, -106, 89, 7, 7, 7,168,213,106,238,236,217,179, 69,229,229,229,239,182,228,100, 44,203, 14, 87,171,213,147, 22, 45, 90,180,182, -125,251,246,118,111,188,241, 6, 22, 44,232, 4,189, 94, 15,133, 66, 1,153, 76,246,237,137, 19, 39,198,219,216,216,100, 31, 63, -126, 60, 19,192, 38, 83,120,243,227, 15,223,113,241, 25, 51,244,235,175,183, 31,240, 13, 8,244,124,206,203, 75,209,207,211, 26, - 6, 35,143, 7,121, 15,113,225, 74, 82,101, 74, 98, 92, 22, 56,221,228, 7, 55,142, 39,153,194,121,163, 74, 48,189,221,163, 29, -241,126,109,254,230, 69,253,123,182,237,245,230,107, 1,182,165, 66, 9, 61,122,236,118, 97, 90,102,249, 53, 9,139, 47,111,166, -211,248, 39, 41,120,157, 78,103,168,223, 19,164,211,233, 12, 45,180, 85,139, 9, 33,159, 50, 12, 89, 6, 10, 70, 46,151, 71,110, -223,190,125, 31,128,108, 74,105,164, 90,173,214, 62,173, 11,165,172,172,236, 23, 66, 72,236,157, 59,119, 22, 51, 12, 99,195,243, -124,210,131, 7, 15,126,162,148, 54, 55, 75, 56,170, 39,187,124,201,195,195, 99,192,229,203,151, 55,141, 28, 57,178,219,139, 47, -190,136,220,220, 92, 72, 36, 18,196,199,199,235, 79,158, 60, 25, 89, 92, 92,252, 17,165, 52,170,165,105,171,118,176, 48,119,238, - 92,148,149,149,225,208,161, 67, 56,115,230, 76,139, 29,172,154, 7,120, 96, 96,224,208,245,123,246, 28,124,161, 83,167, 86,157, -218,182,149,181,238,218, 21,102,230,230, 40,121,248, 16,241,247,114,248, 31,147,147,211,181, 28, 55, 57, 38, 38,198,164,107,201, -104, 52,194,214,214, 22,148, 82, 72,151, 47, 7, 8, 1, 37, 4,149,213,179,120,115, 28, 7,105,239,222,160, 44,139, 82,173, 22, - 6,131, 1, 74,165,178, 73,206,236,236,236,108, 79, 79,207,215,223,124,243,205,223,246,237,219,199, 4, 5, 5,245, 56,118,236, - 24,253, 51,117,156,149,149,213, 30, 0,220,220,220, 30, 88, 89, 89, 73,222,120,227, 13, 24,141, 70, 84, 84, 84,160,180,180, 20, - 15, 31, 62,212, 47, 90,180, 72, 14, 0,114,185,220, 56,124,248,240, 70,159, 31,106,181,122,133,167,167,231,233,175,191,254,122, -249,140, 25, 51, 2,199,143, 31, 47,101, 89, 86,200,206,206,230, 14, 30, 60, 72, 58,116,232,192, 40, 20, 10, 18, 17, 17, 33,220, -188,121,243, 42,165,244,147,236,236,108,147, 87, 26,168,113,213, 5, 65,168,157,191,170,169, 81,102, 45, 65,254,117, 26,239,213, -199,230,179, 65, 19, 2,222, 91,191,244, 11, 11, 7, 71, 7,112, 28,135,180,140,187,248,254,232, 55,154,210,202,226, 79, 11,110, - 52,191, 6,167, 92, 46, 55,179,179,179, 83, 41,149, 74, 68, 69, 69, 1,192,161,234,134,233, 95,177,177,177, 35, 58,117,234, 4, - 27, 27, 27,179,252,252,252,246, 0,226, 90,144,196,187,106,181, 26, 70,163, 17,142,142,142,146,148,148,148, 86, 0,210, 18, 18, - 18, 42, 0,220,124,146, 60,135,133,133,113,253,250,245,187,125,227,198,141,128,231,158,123,142, 68, 70, 70,106,116, 58,221,193, -150,242, 56, 59, 59,127,125,226,196,137,190,148,210, 33,190,190,190,104,221,186,117,141,107,143,139, 23, 47,134,100,103,103,207, -126, 74,139, 59, 83, 66, 8,202,202,202,216,234, 50, 53,168, 84,170, 39,229,173,168,227, 92, 85, 60,107,141,116, 86, 86,214, 65, - 23, 23,151,115,171, 87,175, 94,209,190,125,251,153,179,103,207,102, 59,118,236,136,146,146, 18, 88, 89, 89,193,213,213, 21,217, -217,217,216,183,111, 31,159,159,159,255, 3,203,178, 31,231,212, 31,161,210, 2, 78, 91, 91, 91,184,186,186, 34, 43, 43, 11,251, -246,237,227,243,242,242,190,231,121,126, 99, 94, 94, 94, 30, 68,180, 76, 44,155,210,107, 84, 61, 77,195,103, 60,207, 15,172,113, -181,138,139,139,223,109,110,125,187,198, 20,110, 80, 80,144,196,204,204,108, 82, 65, 65,193, 90, 15, 15, 15,187, 55,222,120, 3, -171, 86,173, 66, 66, 66,130,249,216,177, 99,237, 36, 18, 9, 23, 18, 18, 82,218,210, 55,134,154,197,158, 33,145,141, 0, 21,186, - 1, 32, 96,216,102, 23,123, 54, 69,137,119,111, 75, 6,241, 20,179,170, 14,192,174,196,187, 52,236,207,190,217,212, 93,156,153, - 82, 52,187,176,115, 99,156, 13, 5,185, 63,233,219,210, 95,241, 6, 86,239,127,196,213,213,117,130, 92, 46,255,122,194,132, 9, - 22,123,247,238,213,229,229,229, 45, 2,112,168,169, 53, 3,155, 75,167,155,155, 91, 69,235,214,173, 97,103,103,135,194,194, 66, -220,191,127, 31,106,181,218,252, 73,211, 89,119,177,103, 84, 47,246, 76, 77, 88,236,185, 62,103,175, 94,189,238, 25,141,198, 22, - 45,190, 42,149, 74, 31, 42, 20,138, 54, 53,231,104, 42,157,238,238,238, 19, 60, 60, 60,214,101,103,103,255,154,149,149,181,236, -105,212,145,187,187,123, 47, 66,200, 81, 65, 16,148,245, 29,174, 26, 17,230,234,234,218, 74, 46,151, 63, 18,228,222, 24,167,167, -167,103,127,165, 82,185, 98,210,164, 73, 61, 71,143, 30,205, 68, 70, 70,226,226,197,139,124,100,100,228, 53,163,209,184, 41, 51, - 51,243, 82, 75,210, 57, 97,194,132, 4,131,193,208,218,196,178,204, 39,132, 60,178,112,182,169,215,188,131, 15,241,179, 54,179, -255, 80,111, 48,118,103, 8,168, 84, 42, 77, 40, 41,123,184,182, 33,113,213, 16,103,245,244, 12,191,216,218,218, 14, 46, 42, 42, -186,193,113, 92, 80, 88, 88, 88,165,159,159,159,212,198,198,230,128,149,149,213, 11,165,165,165,151,251,246,237, 59, 98,245,234, -213,130,169,117, 20, 24, 24,216,185, 77,155, 54, 81, 43, 86,172, 32,235,214,173, 67,102,102,166,223,213,171, 87,147,255,108,189, -247,234,213,171, 53,203,178,123,120,158,111, 67, 8,217,123,245,234,213,143, 76, 17, 67,245, 57,187,118,237, 42, 43, 41, 41,153, -239,225,225,241,150,179,179,179,211,131, 7, 15, 50, 50, 51, 51, 63,207,201,201,217,107,170,184, 50,165,142,252,252,252,138, 0, -200, 1,192,148,120,171,255,239,103,221, 95,193,233,233,233,217,134,227,184,213, 62, 62, 62, 99,167, 79,159, 78,146,146,146, 16, - 26, 26,138,244,244,244, 99, 12,195,172,206,202,202,186,243, 52, 56,207,158, 61, 75,211,211,211,143, 72, 36,146,181,153,153,153, -105,255, 95,121,255,159, 20, 88,127,213,197, 87, 35,180,138,138,138, 86,169, 84,170,219,161,161,161, 47, 60,107, 23,244, 95,205, - 73, 8,113,170,118,163,242,254,151,242, 78, 8,145, 40,149, 74,127,157, 78,119,139, 82, 90,250,148, 56, 87, 1, 88, 9,224, 99, - 74,233,134,255,181,107,233, 89,231,172, 22, 90,139, 40,165,168,172,172,252,178, 41, 97,245,119,202,251,224,193,131, 61,207,157, - 59,151, 89,255,217,167, 84, 42,109,116, 58, 93,113,216, 19,188,248,249,251,251,127,196,178,236, 4,142,227, 14,197,196,196,172, -123, 22,243, 78, 8, 33,173, 91,183,150, 55, 53,201,173,120, 31, 61, 25,167,171,171,171, 47,128,229, 64,213, 50, 74,153,153,153, -209, 79,139,147, 16,194, 3,248, 68,173, 86,199,255,127,231,253,239, 6,201,127,242,228,213, 15,150,189,104,193, 98,188,127, 55, -152, 34,172,254,166,249,230, 0, 92,125,202,156, 27, 0,108, 16,111,235,103, 19,213,130,234,210,255, 90,190,235,139,171, 58,207, -190,130, 39,229,140,142,142,254, 8,192, 71,207,248, 61, 78, 1, 84,138, 87,254,211, 71, 78, 78, 78, 44,128,241,207, 58,231,255, - 58, 24,177, 8, 68,136, 16, 33, 66,132, 8, 17, 34,158, 46, 8,128,110,141,188,125,152,108,253, 17, 66,186,181,244,196, 38,116, -247,136,156, 34,167,200, 41,114,138,156, 34,167,200,249, 55,227,108,142,251,239,210,245,248, 31,141,193, 18, 57, 69, 78,145, 83, -228, 20, 57, 69, 78,145, 83,228,252, 59, 66,236, 34, 20, 33, 66,132, 8, 17, 34, 68,136,120,202, 48, 57,200,189,123, 59,226,206, - 27, 49, 10, 44,134, 3, 0,120,156,102,165, 56,158,112,135,102, 63,233,201, 93, 92, 92, 58, 19, 66, 38, 51, 12, 51, 30,128, 32, - 8, 66, 8, 33,228, 71,181, 90,157,250,164,156,129,129,129,157, 57,142,123,149, 16,242, 18, 0, 80, 74,127,145, 72, 36,255,138, -140,140, 52,105, 6, 90, 51, 51,179,123, 58,157,206, 17, 0,148, 74,101,190, 78,167,243, 66,245,172,227,227,199,143, 39, 5, 5, - 5, 4, 0, 46, 92,184, 80,179,214, 38,109,110,134,116,133, 66,113, 79,175,215, 63, 54, 84, 95, 42,149, 26,108,108,108,138,237, -237,237,139, 29, 29, 29,139,100, 50,217,205,130,130,130, 11,241,241,241,209,148,210,220,150,228,123,224,192,129, 31, 40, 20,138, -133,122,189,126,103, 88, 88,216, 7,127,245,133, 67, 8, 9,240,116,115,217,105, 52, 26,132,220,252,194,143, 40,165, 39, 90,114, -124,187,118,237,228,238,238,238,164,254,208,234, 47,231, 16, 23,202,128, 89,188,163,249,249,181,154, 73,159,175, 84, 42,157,235, -236,236, 60, 52, 43, 43, 43, 22,192, 42,113, 22, 98, 17, 34, 68,136, 16,241, 76, 8, 44, 63, 63, 98,166, 43,197, 96, 8, 24,213, -193,203, 57,112,241,220,241,246,254,189,135,153, 87, 84, 24,232,197,243, 39, 2,190, 59,112,124,193, 63,218,144,107, 60,193,113, - 51,107,132,198,196,208, 70, 39,182,252,234, 29,201, 61,158,231, 29, 1, 64,128, 68,243, 69,136,227,157,128,128, 0,239,165, 75, -151, 34, 48, 48, 16,130, 32,224,194,133, 11,139,191,248,226,139,197,174,174,174,209, 44,203,238,151,201,100, 63,167,165,165, 53, - 59,132, 63, 32, 32,192, 67, 16,132,241, 0, 94,233,213,171, 87,215,121,243,230,161,125,251,246,168,172,172, 68,100,100,228,210, -253,251,247, 47,245,243,243, 75, 4,240, 19,195, 48, 63, 71, 69, 69,101, 53,198,165,211,233, 28,107,244, 18, 33,196,113,246,236, -217, 26,163,209, 8,189, 94, 15,163,209, 8,149, 74,149,168,211,233,174,247,235,215, 47,218,210,210,242,202,201,147, 39,111, 3, -224,187, 56,155,245,108,237,225, 48,252,183,232,140,143,234,115,234,245,122, 71, 93,100, 36,192,243,224,238,223,135,110,240, 96, - 84,175, 27, 39, 99, 71,140,112,226, 24,198,137,148,151,223,213,253,248,227,142, 78,157, 58,213,206, 99,210, 20,103, 61, 49, 65, -230,206,157,187,116,249,242,229,210,137, 19, 39,190, 17, 20, 20,180,166,177,161,223,166,114, 54,115, 62, 69, 47,255, 30,167,142, - 31, 62,164, 4, 33, 24, 59,118,252, 30, 66,200, 44, 74,233, 47,245,247,245,241,241, 9,150,201,100, 31,113, 28, 23, 43,145, 72, - 62,136,140,140, 44,243,247,247, 63,236,224,224, 48, 92,175,215,195,215,215, 55, 34, 54, 54,118, 48, 0,236,152, 73,214,200,129, -197,224, 65,118,206, 36,219,230,124, 71,151, 63, 97,250,102, 79,155, 54,237,243, 13, 27, 54,176,213,147,240, 13,233,210,165, 75, -123, 66,136, 63,165, 84, 43,222,246, 34, 68,136, 16, 33,226, 63, 38,176, 58,183, 37,175,154, 43,100, 75,150,207,127,209,101,196, -240,145,150,118, 30,190, 18, 16,182,202,145,177, 2, 25, 59,121,169,197,152,137,111, 91,164, 39,134,187,159,252,237,196,144, 31, -143,158,207,233,220,150,108,185,117,151,254,171, 33, 62,158,231, 29,151,204,152, 7, 0,216,178,123,135, 69,114,114,178,183, 74, -165,122,100, 89,144, 97,195,134, 97,200,144, 33,200,200,200,240, 63,124,248,176,255,158, 61,123, 62,245,240,240, 88,157,149,149, -181,181,113, 17,232,183,206,221,221,125,241,210,165, 75,137,191,191, 63, 20, 10, 69,237,255, 44, 44, 44, 16, 28, 28,140,224,224, - 96,228,230,230,118, 13, 11, 11,235,122,224,192,129,181,126,126,126, 95,196,196,196,152,228,242,188,254,250,235,120,248,240, 33, - 30, 62,124,136,210,210,210, 28,141, 70,147,175,211,233,114,148, 74,101,234,160, 65,131,238, 0,224, 59,186, 89,118,112,116,176, - 63,188,113,253, 90,160,137,161,211,234, 62,125, 0, 0,218, 27,255,238,182, 54,167,148, 66, 38, 75,145,228,228,252, 90, 87, 92, -153,202, 89, 45, 48,109,211,210,210, 4,153, 76,134, 78,157, 58, 73, 83, 82, 82,238, 5, 5, 5,125, 23, 22, 22,182,166,238,126, - 45,225,108, 6,254, 31,189,187, 64, 86,112, 55, 14,183,174,156,197, 24, 63, 15,101,236,205,148,213, 0, 30, 19, 88, 44,203, 46, -255,237,183,223,188,175, 93,187,230,189,122,245,234,118,126,126,126,163, 1, 12, 58,125,250, 52,164, 82, 41,130,131,131,123, 7, - 5, 5,217,203,184,252, 81,163,219,147,165,243, 23,207, 37, 0,176,235,155, 93,111,110, 95, 64,182,205,223, 70,179, 90, 32,172, -100, 44,203,126,177,111,223,190,105, 83,166, 76,193,253,251,247,113,249,242,101,168, 84, 42,172, 91,183,174,245,210,165, 75,215, - 0,120, 87,188,237, 69,136, 16, 33, 66,196,127, 76, 96,177, 20,239, 70, 94, 75,236,192,112, 15, 9,145, 90, 53,184, 15,195, 72, -208,182,219, 64,201, 92,175,127,216,140, 24, 50,212,234,229,105,139,223, 5,240, 47, 83, 78,108,105,105,217, 8, 39,131,231,158, -123, 14,239,188,243, 14,188,189,189,229, 83,167, 78,125, 31,192,214, 38,168, 22,135,132,132, 16,150,101,193,178,108,163, 59,185, -184,184, 96,200,144, 33,112,113,113, 33,239,190,251,238, 98, 0, 13, 10, 44,165, 82,153, 79, 8,113, 4, 0, 59, 59, 59,236,216, -177, 3, 70,163, 81,168,168,168,184, 81, 81, 81, 17,111, 48, 24,162, 20, 10,197,213,139, 23, 47,222, 1,128, 14, 30,102,110,230, -114,243,227,187,118,108,133,177,236,129,109, 99,231,231,179, 30,215, 9,148,210, 18,198,204,236,190, 52, 61,253,176,172,164, 36, -166,230,119, 83, 57, 1,160, 95,191,126, 54, 22, 22, 22, 23,182,111,223, 46,149,201,100,152, 53,107,150,133, 90,173,198,103,159, -125, 54, 31,192,154, 39,225,108, 66,192, 88,247,239,227,159,252,245,166, 15, 45,125, 3,251,225,234,207,219, 81, 92,172, 65,121, - 89, 5,120,129, 42, 26, 58,134, 82, 90,120,231,206, 29,140, 24, 49, 2, 57, 57, 57, 3,118,238,220,185, 83, 16, 4,162,209,104, -106, 23,106, 85,169, 84,183, 7,246, 9,146, 51,119,215, 62,241,133, 76, 8,113,180,178,178,250,233,204,153, 51, 1, 1, 1, 1, -184,122,245, 42,238,222,189,139, 5, 11, 22,232, 23, 44, 88, 32,155, 58,117, 42, 89,178,100,201, 60, 66,200, 47,148,210, 8,241, -214, 23, 33, 66,132, 8, 17,255, 17,129, 5,128,101,205,219, 17,253, 31, 47, 11,172,195, 64,194,186,142, 36, 68,233,246,200, 14, -154,135,247,144, 28,177,143,222, 75, 56, 70, 91,121, 79, 38, 0,216,122,141,235,191, 23,151,100,217,130, 45,187,119, 56, 0,128, -220,204, 30, 33, 33, 33, 24, 60,120, 48, 14,127,221, 21,229, 37, 85,203, 38,169,172, 93, 49,238,173, 68, 36, 39, 39, 35, 60, 60, -188,102,161, 89,105, 99,156, 53,109, 43,162,163,145,223,183, 47,228,133,133, 48, 55, 55,135, 92, 46,127,100,135,148,148, 20, 92, -188,120, 17,247,239,223, 71,219,182,109,171,142,105,132, 83,171,213, 62, 55,101,202,148,130,201,147, 39,155,237,221,187, 23,105, -105,105, 46,145,145,145,101, 13, 21,144,247,115, 54,214, 50, 65,118,124,247,142, 47,164, 48,104,108,147,163,194,241,143, 17,115, - 26, 76,167,110,224,192, 90,231,202, 44, 48, 16,140,151,151,129,200,100,169,133,187,118, 13,245,245,245, 53,182,148,179,127,255, -254, 43,121,158,127, 83, 16, 4,197,238,221,187,165, 14, 14, 14,204,150, 45, 91,140,103,207,158,229, 41,165,140, 76, 38,219,254, - 36,233,108, 10, 82,137,228,195,207, 87,191,107,105,206, 24, 17,251,219,143,200,186,159,129,235,183,179,141,255,186,156,196,235, -141,220,220,134,202, 83, 34,145,188,181, 98,197, 10,159,221,187,119,187,206,156, 57, 19, 50,153,236,149,135, 15, 31,226,208,161, - 67, 48, 55, 55,199,142, 29, 59,240,220,115,207,201,121,158, 71,220,137,135,216,241,213, 54,128, 82,232,140,178,131, 75,246,113, - 89, 77,212,123, 93,113,213,181,117,235,214,199,255,248,227, 15, 39,119,119,119,132,133,133, 33, 55, 55, 23,174,174,174, 88,176, - 96,129,124,211,166, 77, 7, 74, 75, 75,199,110,216,176, 65,153,144,144,176,151, 16,210,129, 86,225,169,143,128, 17, 57, 69, 78, -145, 83,228, 20, 57,255, 18, 4, 0,112, 4,144, 15, 32,170,222, 54,170,191,163,129,237,130,234, 54,223,190, 14, 87, 1,170, 98, -168, 29, 1,240, 0,174, 1, 40,250, 75, 4, 22, 33,100, 32,128, 48, 0,107, 40,165, 31, 61,178,135, 96, 4,159,119,142,242,121, -191, 83,198,214,159,176,174, 99, 72, 81,137, 14,183, 34,190,167, 57,201,127, 80, 84,199, 43, 25,244,101, 77,158,232,171, 35, 30, - 29,229,114,121,225,173, 91,183,240,251,239,191, 3, 0,142, 28, 57,130,242,146, 28,212,233, 58,196,231,159,127, 14,142,227,192, - 48, 12, 12, 6,211,214, 62,166,149, 85,113,210,122,189, 30,122,189, 30,164,103, 79, 72, 7, 12,192,157, 5, 11,112,238,220, 57, -228,231,231, 67, 38,147, 65, 38,147,153,180, 32, 44,199,113, 36, 47, 47, 15, 58,157, 78,224, 26, 57,192,195,131, 40, 45, 57,243, -195, 91,191,216, 96,105,169, 50,119,138, 62,251, 11,238,223,111, 60, 46,221,104, 52,254,219,165,107,219, 86, 11,137, 36, 86, 26, - 23,247,175,186,226,170, 37,156, 60,207,191,125,240,224, 65,139,162,162, 34,200,100, 50,124,242,201, 39,198, 75,151, 46,169, 57, -142, 27, 16, 19, 19,243,240, 73,211,217, 20, 28, 28, 29, 79,191, 60,105,206,156,245, 51,134, 64,171,209,225,232,165, 68,252,158, -144, 62, 1, 64, 4,165, 84,211,208, 49,145,145,145,121,129,129,129, 47, 47, 90,180,232,252,158, 61,123,204, 38, 77,154, 4,158, -231,107,255, 42, 42, 42,240,199, 31,127,224,210,165, 75,136,137,185,158, 37,163,157,126,119, 49, 47,251,233,199, 51,166, 45,210, - 76, 8,113,245,242,242, 58, 25, 25, 25,233, 96,110,110,142,208,208, 80, 20, 23, 23, 99,254,252,249,181,206, 85,113,113,241,248, - 29, 59,118, 76,188,119,239,222,199,225,225,225,133,213, 47, 2, 28, 68,136, 16, 33, 66,196,127, 28, 77,106,144,127,195,145, 16, -114,130, 82, 58, 18,192, 96, 0,242, 58,219, 32,132,156,168, 22,126,143,108, 47, 95,190,124,229,198,141, 27,111,214,108,215,236, -179, 98,197,138,127,108,218,180,233,227,222,189,123, 31,186,114,229, 74,218, 95, 38,176, 0,132, 81, 74, 73, 51, 50, 6, 66, 81, - 20, 21,138,162,232,239,103, 82, 30, 23, 37,149, 37, 45, 62,185,167,167, 39, 18,147, 30, 19, 55,181,223, 77, 21, 88,232,219, 23, -200,201, 1, 92, 93,171, 82,154,147, 3, 3,128,111, 87,172,128, 92, 46,175,237,138,170, 22, 38,205,210,233,245,122,146,159,159, - 79,117, 58, 93, 66,101,101, 37,215,192,197, 64,218, 57, 91,253,184,122,249,130, 86, 94,109,219,187, 70,158,252, 9,105,105,217, -120,240,160,225,250, 81,169, 84,229, 70,163, 81, 85, 93,177,241,132, 97, 30,154,197,197,253, 12, 32,241, 73, 57, 9, 33,167, 39, - 77,154, 52, 50, 48, 48,144,116,238,220, 89,126,254,252,121,142,231,249, 71,196, 85, 75, 57,155,130,155,155,219,224, 23, 94,120, -225,200,236,217,179, 49,102,248, 96, 76,236,223,149,102,229, 21,107, 1,156,111,106,145,230,106,145,117,195,207,207,111,226,248, -241,227,191,106,211,166,141, 39, 0,120,123,123, 99,226,196,137,248,242,203, 47, 17, 26, 26,186, 23,192,238,152,152,152,184, 22, -222,148,230,182,182,182,191,158, 63,127,222,193,220,220, 28,103,207,158, 69, 69, 69,197, 99,206,213,199, 31,127,172,188,119,239, -222,150, 51,103,206,116, 6,192, 84, 47,211, 35, 66,132, 8, 17, 34,158, 13,152,160, 65,106,159,251, 39, 40,165, 35,235, 10,166, -250, 66,171,230,123,205,126, 27, 55,110, 28, 89, 87,124, 1,192,166, 77,155, 62,174,179, 93,241, 87,100,170, 70, 96, 5, 17, 66, - 40,128, 32, 74,233,133, 39, 33, 50, 86,150, 61,209,140,165,114, 51,123,108,217,189,163,170,144, 36,143,198,101,153,236, 96,181, - 96,178, 84, 83, 28, 44,131,193, 32, 20, 21, 21,221,211,104, 52, 49, 73, 73, 73,143,137, 7,119,119,247,141,189,251,245,234,211, -190, 71, 79,179,200,211, 71,112, 59,245, 62, 10, 10, 74, 0, 74,117, 13,241,217,217,217, 61,100,230,205, 83,153,231,228, 20, 51, -130,144,221, 58, 33,225,213, 63,203, 25, 30, 30, 62, 45, 48, 48,208,247,202,149, 43,161, 86, 86, 86, 0, 64,235,138,171, 39,225, -108, 64, 84,245,150, 72, 36,199, 24,134, 49, 27, 54,108, 24,222,122,235, 45,124,249,229,151, 28,149,153,141,219,113, 42,250,229, -242, 74,253, 71,205,137,171, 26,196,196,196,132, 78,152, 48,161,107,124,124,188, 27,165,116,184,173,173,237, 22,163,209, 8, 65, - 16, 64, 41, 61,206,113, 92,170,191,191,255, 65, 71, 71,199,224,188,188,188,131, 49, 49, 49,139,154,185,201, 24,153, 76,182,247, -220,185,115, 93,220,220,220, 16, 26, 26,138,138,138,138, 90,231,106,218,180,105,143, 56, 87, 87,174, 92, 41, 20,197,149, 8, 17, - 34, 68, 60,147, 48, 89,131,212,136,166,250, 34,171, 37,226, 12,128,118,249,242,229, 43, 9, 33, 39,170, 29, 46, 45, 0,245,211, -206, 20, 83,157,224, 11,213,234, 49,236,209,156,152,222, 22, 25,244,165, 79,148,128,118, 3, 14,192,119,204, 5,164, 25,230,227, - 1, 51,183,190,147,100,154,192, 58,114,164,202,189,202,201,249,183,147, 85,237,102, 61,137,192, 42, 47, 47,191, 81, 88, 88,152, - 80, 82, 82,114, 21,128, 80,207,117,155,219,163, 71,143,105,187,246,238,183, 60,126,250,143,138,152,168,155,154, 7,121,197,168, - 48, 24, 13, 9, 25, 15,182, 55,196,231,228,228, 84, 68,129, 66,137,209,120, 78,126,227,198,207, 13, 56,121, 45,230,172,118,134, - 98, 1,156, 56,125,250,244,109,150,101,191,126, 26,156,117,197,149,189,189,253,175,251,247,239, 55, 59,124,248, 48,166, 79,159, -142, 79, 63,253, 20,167, 79,159, 30,167, 86,171,207,149,233, 42,231, 82, 74, 31,152, 90,207, 95,206, 33, 46, 3, 29,126,118,149, - 72, 36,214,246,246,246,107, 39, 79,158, 12,142,227, 48,104,208, 32, 56, 58, 58, 30,146,201,100, 23,102,204,152, 49,122,243,230, -205,230, 94, 94, 94,179,252,252,252, 92,154,161, 92,127,224,192,129, 17,222,222,222, 8, 15, 15, 71, 73, 73, 9, 92, 93, 93,241, -230,155,111,202, 55,109,218,116,240,235,175,191,214,109,220,184, 81, 54,100,200,144, 45,103,206,156,241,169,168,168, 24, 42,138, - 43, 17, 34, 68,136,120,246,208,168, 6,105, 66,100, 61,225,121,106,142,147,110,220,184,241, 38,165,116,228,166, 77,155, 62, 6, - 96,246,151, 57, 88,213,202, 17, 0,130, 30,213, 87,229,166, 59, 88,186,166, 32,213, 53, 92, 0, 0, 32, 0, 73, 68, 65, 84, 5, -214,219, 47,103,165, 8, 60,143, 47,151,178,144,155,217,163,221,128, 3,205,186, 82, 45,141,193,106, 64,173, 62,182,109,138,192, -170,168,168,136,201,203,203,187,155,158,158,126,169,238, 36,162,158,158,158,163,156,157,157,215, 29, 56,112,192, 76,173, 86,195, -163, 67, 55,171, 29, 63,255,171,210,217, 92,161,203, 44, 46,156,125, 61,171,252,104, 67,124, 74,165,242, 22,189,119, 47, 73,158, -156,124,134, 0, 55,235, 9,161, 39,226,172, 65, 68, 68,196,180, 6, 4,219,159,226,116,115,115,235,237,224,224,240,235, 55,223, -124, 99,174, 86,171, 33,147,201,160, 82,169,112,254,252,121,168,213,234,115, 45,189,200,182,207, 34,171,228, 2,222, 3, 15,166, -175,103,118,229,171,239,125, 99,102,103,103,135,184,184, 56,116,233,210, 5,155, 55,111,150,167,164,164,116,238,212,169, 19, 82, - 83, 83,145,147,147,115, 43, 38, 38, 38,183,137,183,144,209,179,103,207,126,123,220,184,113,184,118,237, 26,114,114,114, 48,111, -222, 60,253,155,111,190, 41,155, 58,117, 42, 41, 41, 41, 25,191,125,251,246,137,233,233,233,162,115, 37, 66,132, 8, 17,207, 56, - 26,211, 32, 77,224, 36,128, 23,235,187, 90,245,197, 87,141, 67, 85,119,187,254,254,213,255,215,253, 21,249,146, 84,159,140, 60, - 46,112, 32, 8,134,135,148,241,152, 68,132,156, 35, 20,124, 35,231,103, 89, 72,228, 42,104, 43,202, 4, 74, 31,117,123,234, 66, -224,121,135,186,193,236, 44,203, 54, 26, 15,197,178, 44,172,173,173, 81, 86, 86, 6, 0,198,102,242,192, 27,199,141, 99,229, 47, -189, 4,131,139, 11,168,193, 80,229, 98, 1,192,202,149,143,236, 40,147,201,106, 92,177, 38,187,181, 74, 75, 75,175,197,196,196, - 92,161,148,230, 1,192,192,129, 3,183,241, 60, 63,202,194,194,194,102,214,172, 89,134,130,130, 2, 28, 61,122, 20,223,127,255, -189, 86, 99, 96, 99,139,245,220,204, 59,217,229,141,206,104, 95, 80, 80,240,187,231,173, 91,135,235,254,246,103, 57, 27,194,211, -224,116,115,115,235,237,228,228, 84, 43,174, 20, 10, 5, 84, 42, 21,178,179,179, 33,145, 72, 90, 60, 73,231,193,249,196, 6, 20, -239,204,121,123, 14,195, 48, 12,179,107,219, 63,205,108,204, 41,126,248,225, 7,132,132,132, 36,119,235,214,173,211,140, 25, 51, -208,177, 99, 71, 36, 39, 39,227,139, 47,190, 80, 27, 12,134, 87,154,188,104, 37,146,105,235,214,173,163,106,181,154,220,189,123, -183,214,185,218,184,113, 99,109,204, 85, 90, 90,154, 24,115, 37, 66,132, 8, 17,255, 29, 14,150, 41,241, 87, 5,213,226,233, 65, - 3,219,108, 29, 97, 85,127, 59,175,222, 54, 0,232,235,253, 63,254, 47, 19, 88, 13,102,152,224,155, 9, 99,131, 23,127,248,238, - 28,231,206, 29,151, 43,105,222, 41,208,146, 24,138,154,144, 27,194, 64,174,114, 0, 36, 10, 26,157, 84, 80,254, 71,130,182,128, - 18,124, 99,234,137, 59,119,238,140,220,220, 92, 20, 22, 22,214,254,198, 48, 12,236,236,236,160, 84, 42, 17, 29, 29,141,240,240, -112, 35,128,117,205, 84,204,166,169, 83,167,174,152, 63,127, 62,211,115,250,116, 24, 46, 93,122,100,120, 24, 33, 4, 74,165, 18, -102,102,102,200,206,206, 70, 74, 74,138, 64, 41,221,212, 20,231,157, 59,119,194, 41,165,249, 0, 16, 20, 20, 52,201,206,206,110, -194,244,233,211,205,174, 93,187,134,245,235,215, 75, 66, 67, 67, 13, 81, 81, 81,156, 32, 8, 43,178,178,212,223, 53,151,215,164, -164,164,168,186,219, 79,131,179, 62,158, 6,167,187,187,123, 47, 55, 55,183, 95,191,250,234, 43,243,220,220, 92, 40, 20, 10, 88, - 90, 90, 34, 35, 35, 3,235,214,173,211,112, 28,247,210,211,184,232,116, 58, 29, 14, 31, 62,156,211,166, 77,155,158,215,175, 95, - 31,180,108,217,178,109,173, 91,183,118,203,200,200,184,199,243,252,139, 81, 81, 81,247,155, 58,222,198,198, 38,208,209,209,145, - 68, 68, 68, 96,222,188,121,250,133, 11, 23,138,206,149, 8, 17, 34, 68,252,189,113,173,153,237,103, 14,141, 46,246,156,148, 70, -191,191,147,146, 57,122,210,236, 85, 7,103,190,185, 34, 59,181,192,190,146, 56,143, 33, 68,225, 6,133,149, 43,172, 92,187, 33, - 61, 95,162,221,122, 88,157,117, 34, 82,251,179,182, 28, 99,147,210,232,247,245,108,191,110,117, 92,169,252, 45,187,119, 96,203, -238, 29,224, 4,169,254,141, 55,222, 64, 65, 65, 1,210, 46, 79, 70,236,175, 3,209, 70,182, 29, 46,116, 39,242,243,243,241,237, -183,223,210,208,208,208, 35, 70,163,209, 71,173, 86,127,211, 24, 39, 0,196,198,198,126,156,157,157,221,123,229,202,149,161,243, -203,202,112,107,251,118,200,167, 78, 5,211,189, 59,204,205,205,225,224,224, 0,141, 70,131, 11, 23, 46,224,250,245,235,161,149, -149,149,189, 99, 99, 99, 63,110,138,179, 70, 92,245,237,219, 87, 85, 92, 92,252,249,212,169, 83,205, 52, 26, 13, 10, 10, 10, 80, - 80, 80,128,200,200,200,243,122,189, 62, 32, 43, 43,171, 81,209, 82,151,147, 82,154, 89,243,253,105,113,214,197,211,226, 52, 55, - 55, 95,116,244,232, 81,115,134, 97,160, 80, 40, 96,109,109,141,204,204, 76,172, 93,187, 86,163,213,106, 95, 82,171,213, 38, 77, -208, 89,151,243,245,237,180, 24, 4,159,239,252,106,167,176,253,139, 29,148,218, 13,132,153,181, 59,172,173,173,237,126,254,249, -103, 33, 62, 62,254,156,155,155, 91,167,212,212,212,110,149,149,149, 1, 87,175, 94,189,223, 28,103, 65, 65,193,197,123,247,238, -193,194,194, 2, 11, 23, 46,148,127,252,241,199, 7,191,254,250,107,221,199, 31,127,220,162,152,171,198,202,243,207, 64,228, 20, - 57, 69, 78,145, 83,228, 20,209,164,131, 5, 0, 55, 50,104, 58,128,183,123,180, 35,222,175,205,223,188,168,127,207,182,189,222, -124, 45,192,182, 84, 40,161, 71,143,221, 46, 76,203, 44,191, 38, 97,241,229,205, 52,218,172,189,246,246,231,220,115,117,183,183, -122,120, 4, 76,159, 62,125,253,210, 9,121,125,234,118, 29,238,255,105,255, 37, 66,200,170,156,156, 28,147,135,236,199,196,196, -220, 4,240,146,175,175,111,191, 37, 75,150,172,123,217,211,211,127, 82, 80, 16,164, 82, 41,162,162,162,240,240,225,195,104, 0, - 31,196,198,198, 94,110, 73,225,148,150,150,126,216,177, 99, 71, 89, 82, 82, 18,238,220,185,131,148,148, 20,240, 60,127, 55, 43, - 43,107,220,147, 22,248,179,204,169,211,233, 62, 91,191,126,125,240,154, 53,107, 20,150,150,150,136,139,139,195,154, 53,107, 52, - 58,157,206,100,113,213, 16,230,255,147,110,248,114, 14,249, 62, 60,173,205,144, 46,238,189,183, 27,141, 70, 56, 57, 57,201,123, -245,234,229, 10, 64, 29, 18, 18,194, 3, 72,107, 1,229, 7,222,222,222, 29,215,175, 95,223,110,218,180,105, 40, 46, 46, 22,157, - 43, 17, 34, 68,136, 16,241,223, 35,176,106,112,253, 14,141, 7, 48,181,123, 91, 50,232, 82,212,221, 89, 85,242, 21,187, 18,211, -105,216,147,158, 56, 43, 43, 43, 10,192,144, 45,139,201, 35,243, 79,228,228,228, 12,127, 82,206,106, 1, 53,208,219,219,123,244, - 81,150,125, 23,105,105,224,121,254,179,248,248,248, 99, 45,225,233,213,171, 87,235,178,178,178,127, 26,141,198, 30, 60,207,203, - 47, 92,184, 0,157, 78,135,196,196, 68,173, 32, 8, 71,159, 36,109,255, 13,156,153,153,153, 49,110,110,110, 35, 9, 33, 39,150, - 45, 91,166, 88,187,118,237,159, 22, 87, 53, 88,180,147,230,238,247,243, 11, 99, 83, 82,120,163,209,200,114, 28, 7,158,231,101, - 79,194, 69, 41,189, 67, 8,233,185,120,241,226, 15,222,121,231,157, 69,155, 54,109,146,137, 49, 87, 34, 68,136, 16, 33,226,191, - 78, 96,213, 32,225, 46,253, 3,192, 31, 79, 51, 1,213, 93,135,142, 53,223,159, 6,103,181,160, 58,246,164,199,151,148,148,124, - 84, 88, 88,216,179,180,180,148, 75, 75, 75,211, 18, 66,120,134, 97,180,130, 32,108,228,121,254,187,191, 51,167, 90,173,142,112, -117,117, 29,114,229,202,149,133, 21, 21, 21, 59,213,106,245,213,167, 85,215, 49, 49, 49,153,126,126,126,239,207,154, 53,107, 34, -199,113,255,138,142,142,190,247,164, 92,148, 82, 61,128,247, 9, 33,191, 38, 36, 36,252,112,229,202,149, 92, 81, 92,137, 16, 33, - 66,132,136,255, 74,129,245, 87,160,126,215,225,179,128,228,228,228,105, 0,166,253, 47,114, 2, 64, 78, 78, 78,236, 95,193, 91, - 45,178,190, 6,240,245,211,226,163,148,198, 16, 66,186,160,106,148,136, 40,174, 68,136, 16, 33, 66,132, 40,176, 68,136,120, 74, - 34,139, 66, 92, 91, 80,132, 8, 17, 34, 68, 60, 67, 32, 0,186, 53,210,104,153,188, 82,246,147,140, 38,104,142, 95,228, 20, 57, - 69, 78,145, 83,228, 20, 57, 69,206,191, 31,103,115,220, 45,209, 31,207,180,192,106,201, 58,126, 45, 38, 39,164,219,211, 46, 40, -145, 83,228, 20, 57, 69, 78,145, 83,228, 20, 57,255,126,156,127, 55, 48, 98, 17,136, 16, 33, 66,132, 8, 17, 34, 68, 60, 93,180, - 56, 6, 43, 48, 48,176, 29, 0, 68, 70, 70,222,121, 22, 50,224,227,227,115,161,109,219,182,173,110,223,190,109, 36,132,160,238, - 31, 0,200,229,242, 43, 87,174, 92,121, 67,172,234,255, 44, 44, 44, 44, 52, 44,203, 18,134, 97,192,178, 44,234,127, 54,244, 27, - 33,196, 41, 49, 49, 81,211, 24,167,155,223, 4, 79, 35,103, 92, 67,136,240, 29,229,153,153,132,173,249,164,255,164, 60,153,193, -200, 12, 95, 10, 6,217, 34, 41, 85,124,164,190,121, 40, 75,172,133,134,209,173, 91,183,243, 61,123,246,236, 24, 23, 23,103,160, -148,214,222, 63, 12,195,128, 16, 2, 65, 16,114,162,163,163,251,252,221,203,193,213,213,181, 31,128,205,213,131, 38,234, 34,133, - 16,242, 78,118,118,118,152,120,181,136, 16, 33,226,169, 9,172,158, 61,123,182,231,121,190, 63, 33,164, 31,165,180, 95,231,206, -157,157, 42, 42, 42,224,231,231,151, 71, 8,185, 76, 41,189,204,178,236,165,107,215,174,221,110,142,171, 79,159, 62,209,122,189, -190,115,139, 18, 40,145,148, 41,149,202,118, 97, 97, 97, 13, 54,180,206,206,206, 94,251,247,239,183, 75, 72, 72,128,133,133,197, - 35,127, 18,137, 4,189,122,245, 10,120, 86, 11,191,119,239,222, 6,158,231,165, 13,253,143,101, 89, 99, 68, 68,132,172, 25,177, -123,143,227, 56,199,150,156, 83, 38,147,229, 71, 68, 68,152, 52,114,179,111,223,190, 42,142,227, 22,179, 44, 59, 80, 16,132, 46, -213,233, 74,226, 56,238,130, 68, 34,249, 34, 60, 60,220,228,213,192, 89,150, 37, 5, 5, 5, 56,116,232, 16,186,249, 6,130, 82, -192,187,107,251, 90, 33, 28, 25,155, 4,158,231, 17, 30,118, 26, 75,151, 46,133,175,175, 47, 52, 26, 13,219, 20,167,129, 19, 86, -125,176, 96,114,208,134,173, 7,253,222, 95,248,186,106,195,214,131,190,239, 47,124,221,114,195,214,131, 62,239, 47,156,104,185, -126,235,126,223, 85, 11, 39, 89,173,255,230,128, 30,192,252, 39,169,163,153, 93,186, 24, 25,142,107,240, 62, 17, 36, 18,238,187, -164, 36,233,127,251, 67,128, 97, 24,247,157, 59,119, 90,159, 61,123, 22,102,102,102,181,247,143, 74,165,130,133,133, 5, 94,124, -241, 69,254,105,157,203,207,207,239, 0,128, 49,213,155, 97, 49, 49, 49, 47, 62, 41, 23, 33,196, 66, 34,145, 44,148,203,229,253, - 57,142,235, 84,125,125, 39,235,116,186, 75, 28,199,109,165,148,106, 90,200,247,233,181,107,215, 58, 91, 90, 90,194, 96, 48,212, - 46, 12,207,178,108,199,192,192,192, 47, 0,244, 16,155, 12, 17, 34, 68,252,105,129,229,231,231,119, 20, 64,191,206,157, 59,155, - 13, 25, 50, 4,190,190,190,104,221,186, 53,148, 74, 37, 0,160,176,176,208, 41, 49, 49,113, 92, 92, 92,220,184,136,136, 8,248, -249,249,105, 9, 33, 17,209,209,209,163, 27,227, 20, 4,193,227,244,233,211,112,112,112, 48, 41,113,130, 32, 96,196,136, 17,210, -146,146, 18,115, 0, 13, 62, 44,115,115,115,133, 15, 63,252,176, 36, 60, 60,220,192, 48, 12, 40,165,132, 84,181,218, 4, 0, 56, -142, 43,252, 79, 23,114,191,126,253,146, 0,184,213,228,137, 16,162, 14, 15, 15,239,194,243,188,244,218,181,107,141, 9,219,102, - 27,110,142,227, 28, 47, 95,190, 92, 91, 39,205,129,231,121,244,236,217,211, 36, 65,230,227,227, 51, 64,161, 80,252, 48,111,222, - 60,235, 62,125,250, 72, 60, 60, 60, 64, 8, 65,110,110,110,207, 43, 87,174,248,110,223,190,125,134,143,143,207,148,184,184,184, -139, 38, 10, 44,236,219,183, 15,235,215,175,199,146,247, 63,197,155,211,199,131, 16, 2,133, 66,129,146,146, 18, 4,250,118,193, -142,125,191,226,208,161, 67,208,106,181, 96, 89, 22, 94, 94, 94, 77,137, 83, 55,149,196, 54, 96,225,204,151,204, 63,219,190,207, -124,225,204,151,240,249,142, 31,234,124,142,193,103, 59,246, 89,188, 53,115, 12,182,238,220, 19,216,187,119,111,183,136,136, 8, -181, 41,117, 4, 0,148, 82,117,120,120,120, 23,134,227, 36,187, 82, 83,171,126,252,246, 91,224,193, 3,208,213,171, 1, 0,115, - 58,118,108,145, 3,220,189,123,247,203, 44,203,186,155, 80, 79,217, 9, 9, 9,253,254,132,240, 24, 12, 96,105,245,230,102, 74, -233,185,102,238,179,236,185,115,231, 90,196,198,198, 54,230, 96,229,253, 9, 65,101, 79, 8,217, 10,192,140,101,217,119, 0, 12, - 15, 13, 13, 5,195, 48, 24, 58,116,104,144,159,159, 95, 71, 0, 27,205,205,205,169, 94,175,159, 23, 25, 25,153,103, 98, 30,251, - 89, 90, 90,254,243,192,129, 3, 54,189,123,247,102, 50, 51, 51,209,173, 91, 55, 20, 20, 20,248,133,133,133,249,204,153, 51,103, - 42, 33,100, 22,165,180, 37,171, 55,116,176,176,176,160, 83,167, 78, 37,117, 23,162,223,189,123, 55,124,181,218,182, 51, 91,183, - 46,172, 52, 24,202, 46,178,236, 42, 66,200,133,204,204,204, 28,177, 9, 17, 33, 66,196,147, 56, 88, 67, 47, 92,184, 0,163,209, - 8, 75, 75, 75,176,236,163,102,130,157,157, 29, 6, 12, 24,128,192,192, 64, 12, 30, 60, 24,201,201,201,102,159,124,242,201,243, -205,157,208,220,220, 28, 17, 17, 17,224, 56, 14, 49, 49, 49, 40, 43, 43,195,232,209,163, 33,149, 74, 33,149, 74, 33,145, 72,106, - 63,157,157,157,161, 84, 42, 73, 73, 73, 73,163,124,214,214,214,109, 79,158, 60,201, 40, 20, 10,170, 82,169,232,133, 11, 23, 40, - 0, 90,213, 70, 62, 89, 4,127, 64, 64,128,179, 68, 34, 89,207,243,252, 88,158,231,229, 77,136, 6,163, 76, 38, 59,174,211,233, -222,143,137,137,201,108,130,210,237,242,229,203, 86,181, 5, 59,116, 40,233,221,187,119, 73, 77,153,250,249,249, 61,178,115, 76, - 76,140,201,105, 85, 42,149, 8, 11, 11,131, 68, 34,129,109,255,254, 0, 0, 99,124, 60,164, 82, 41,208,181, 43, 0, 64,149,145, - 1,169, 84, 10, 23, 23, 23,147, 56,189,189,189, 7,183,106,213,234,224, 87, 95,125,101,198,178, 44, 82, 83, 83, 65, 8, 1,203, -178,200,203,203, 67,191,126,253, 36,221,186,117,179, 95,177, 98,197, 97,111,111,239,215,227,227,227,207,153,224,146, 96,234,212, -169,248,236,179,207,176,112,198,120,212,172,119,168,215,235,107,247,153, 55,117, 12,246,110,223,136, 15, 62,248, 0,167, 78,157, -106,142,111, 67,231, 14,237,220,247,254,116, 6,125,123,245,196,222,159, 78,163, 79,175, 64,236, 13, 57,131,190,189, 2,241, 67, -200, 25,244,239,221, 11, 63,132,156, 65,183,206, 29, 60, 30,222, 47,217,128,166,231,246,122,164,142,134, 13, 27, 70,122,247,238, - 93,210,141, 97,106, 4, 23,200,188,170, 37,157, 80, 45,176, 90, 10,150,101,221, 99, 99, 99,155, 21,184,190,190,190,127,246,190, - 94, 74, 41,237, 87, 45, 68, 0,160,201,250,185,113,227,198,243, 0,240,242,203, 47,159,239,214,173, 91,199, 91,183,110, 25,106, -142,173,254,115,157, 56,113,226,189, 26,209, 69, 41,205,249,241,199, 31, 77,234, 50, 36,132,108, 62,126,252,248, 40,131,193,128, -233,211,167,199,180,105,211, 70, 98,109,109,141,221,187,119,195,214,214, 22,122,189,254,218,231,159,127, 46,185,127,255, 62,190, -249,230,155,157,117,220,173,166, 56, 7,245,239,223,127,223,201,147, 39, 21, 18,137, 4, 37, 37, 37,184,120,241, 34,108,108,108, - 96,102,102,134,113,227,198, 49, 3, 6, 12,176,123,254,249,231, 15, 16, 66,166, 81, 74, 77,158, 28, 89,171,213,210, 21, 43, 86, -192,220,220,252, 17, 55, 92, 9,144,117, 87,175, 42, 54, 6, 5, 41, 86, 45, 90,180,244,219,111,191,237,229,225,225,177, 41, 43, - 43, 75, 45, 54, 35, 34, 68,136,104,169,192,130,133,133, 5,162,162,162, 64, 8,129,165,165, 37,172,172,172, 96,109,109,141,210, -210, 82, 36, 38, 38,226,214,173, 91, 72, 79, 79, 7,195, 48,104,219,182, 45,106, 92,163, 58, 46,192,141, 6, 30,142, 96, 89, 22, -247,238,221, 67,110,110, 46, 24,134,193,197,139, 23, 49,124,248,240, 71,196,149, 84,218,176,129, 83,159, 51, 44, 44,140,123,103, -170,203,121,131, 94,227,192,113,250, 43, 97,148,206,243,245,245,189,224,228,228,228,225,237,237,205,215,116, 65, 53, 21,151, 85, -159,147,101,217,141,243,231,207, 31, 55, 97,194, 4, 70, 34,145, 60,226, 0,233,245,122,232,245,122, 24,141, 70,104,181, 90,233, -225,195,135, 95, 58,113,226,132, 57,128,151, 27, 75,167, 32, 8,143,228, 97,253,250,245,150, 28,199,225,171,175,190, 2, 0, 68, - 71, 71, 63,230,220,153,146,247,218, 74,148, 72, 80, 55,157, 53,101,200,213,219, 54,133, 51, 48, 48,208, 82, 46,151,127,191,101, -203, 22,179,188,188, 60, 36, 36, 36,160, 71,143, 30, 88,181,106, 21, 52, 26, 13, 54,111,222,140, 59,119,238,192,201,201, 9, 43, - 87,174, 52,123,231,157,119,190, 15, 12, 12,236, 18, 25, 25, 89,214, 84, 58, 25,134,193,119,223,125, 7,142,227,192, 84,139,150, -202,202, 74, 40, 20,138,250,233,193,234,213,171,107,247,105,140,211, 96, 48, 12, 91,177,104, 22,190,250,103, 8,186,182,115,198, -137,208,171,232,217,173, 53, 78,157,191,134, 94,221,219,224,244,133,104,244,246,110,135,243, 87,111,226,237,249,147,240,238, 91, - 23,135, 53,149,247,250,101,190,118,237, 90, 75,158,231,113,106,217, 50,224,155,111, 64, 22, 46, 4,173,222,135, 48, 12,224,238, - 14,152,153,153, 92, 71,117,113,235,214, 45, 84, 86, 86, 62,246,187, 66,161, 64,231,206,157, 91,204, 73, 8,233,238,228,228,244, -109,199,142, 29,187, 1,192,128, 1, 3,154,189,241, 27,185, 55,221,223,127,255,125,235,253,251,247, 67,161, 80,192,204,204, 12, -230,230,230, 48, 55, 55,127,228,251,170, 85,171,248, 22, 92,159,242,228,228,100, 88, 90, 90, 98,215,174, 93, 18, 59, 59, 59,196, -196,196, 64, 34,145, 96,242,228,201,232,222,189,187,196,204,204, 12, 23, 46, 92, 64,121,121,121,179,156,132, 16,149,133,133,197, -183,199,143, 31, 87,240, 60,143,130,130, 2, 0,192,200,145, 35,193,178, 44,110,221,186,133,143, 62,250, 8, 63,255,252, 51,126, -249,229, 23,165,159,159,223,183,132, 16, 95, 74,105,185, 9,229, 73, 43, 43, 43,169, 82,169,132, 82,169,132, 66,161,128, 66,161, -128, 76, 38,131,142, 82,124,224,239,175,151,169, 84,124,143, 30, 61,218, 44, 88,176,128, 89,179,102,205, 32, 0, 63,154, 90,239, - 45,133,200, 41,114,254,175,113, 54,231,125, 0,168,251,130,170, 7, 80, 99,128, 20, 84,235, 15,251,122,191, 3, 64,205, 10, 49, -142,141,108, 23, 0, 72, 4,208,165,250, 55, 30,192, 53, 0, 69, 79, 69, 96, 17, 66,104,157, 66, 35, 13, 20, 36, 74, 75, 75, 81, - 90, 90,138,204,204, 76,236,216,177,163,182,209,150, 72, 36, 96, 24,166, 54, 94,193, 20, 72,165, 82,100,102,102,194,219,219, 27, - 78, 78, 78,216,179,103, 15, 70,142, 28, 89,203, 87,243, 87, 87, 20, 53,133, 62,131, 38,118,126,169, 75,138,229,252, 77,161, 20, -168,138,203,250,245,215, 95,237, 82, 83, 83,161, 84, 42, 97,102,102, 6, 51, 51, 51, 40,149, 74, 72,165,210,102,227,178, 4, 65, - 24, 53,126,252,120, 38, 52, 52, 20, 28,199, 65, 34,145, 64, 38,147, 65, 46,151,131,101, 89,200,100,178,218,191, 81,163, 70, 49, - 71,142, 28,121, 62, 40, 40, 72, 18, 22, 22,198, 53,114, 33, 34, 58, 58, 26,145,145,145,224,121, 30, 28,199,129,227, 56,104,181, - 90, 0,128,191,191,255, 35,251, 95,189,218,178,213,105,234, 58, 87, 18,137, 4,164,107, 87,112,213,206,149, 68, 34, 65,145,171, - 43, 0,192,193, 52, 67,111,209,244,233,211, 45, 21, 10, 5,110,220,184, 1,133, 66, 1,141, 70,131, 49, 99,198,160,188,188, 28, - 28,199, 65,161, 80,160,178,178, 18,206,206,206, 24, 60,120,176, 69,104,104,232, 34, 0,107,155,113,111, 48,115,230, 76,108,219, -182, 13, 95,253,243, 39,188, 61,235,149,199,246,217,190,183,106,249,196, 53,107,214, 32, 44,172,233,120, 98, 65, 16,216, 62,254, -157, 81, 90, 16, 0,169, 84,138,190,190,237,193,178, 44,250,248,117,128, 68, 34, 65,191,128,142, 96, 89, 22, 3, 3,187,160, 93, -187,118, 16, 4,129,109,230, 97,209, 96, 29,233,245,122, 32,167,129,158,160,220, 92,160, 77,155, 39,121, 40, 97,217,178,101, 37, -106,181,218,240,152,133,230,230, 38, 59,114,228,136,117, 75,140, 87, 66, 72,143,206,157, 59,159, 57,127,254,188,202,217,217, 25, - 28,199,193,104, 52, 66,163,209,224,149, 87, 94, 1,128,163, 45, 72, 91,246,250,245,235, 45, 26,112,176, 30,233, 54,164,148,154, -220,101, 40,145, 72,150, 47, 91,182,108,248,152, 49, 99, 36,150,150,150,144, 74,165,144,203,229,144,203,229,144,201,100,184,119, -239, 30,140, 70, 35, 66, 66, 66, 40,203,178,239,154,192,247,230, 15, 63,252, 96, 37,151,203,145,147,147, 3, 66, 8, 40,165,144, -201,100, 72, 75, 75,195,151, 95,126,137,233,211,167, 35, 35, 35, 3,174,174,174, 88,178,100,137,106,211,166, 77,111, 2,216,104, - 74,131,161,215,235,125,205,204,204,160, 80, 40, 80, 35,180, 0, 32,214,220, 60, 49, 45, 45,173,167,139,139, 75,231, 86, 23, 47, -238, 12, 10, 10,234,102,111,111, 31, 64, 8,217, 79,255,202,185,110, 68,136,248, 31, 64,115, 26,164, 70, 16, 17, 66, 78,212,217, -111,100,205,246,242,229,203, 87,110,220,184,241, 38, 33,228, 68,221,223,107,246,171, 62,199,137,134,182,171,143,181, 95,177, 98, - 69,183, 77,155, 54,125,220,187,119,239, 67, 87,174, 92, 73,123,106, 2,171, 58,110,137, 54,145,177,199, 92,168,250, 48, 69, 96, -213, 60,164, 43, 43, 43, 81, 80, 80,128,161, 67,135,194,204,204, 12, 12,195, 32, 51, 51, 19, 29, 58, 84, 53,142,241,241,241,248, -240,195, 15,209,181,107, 87, 24, 12,134,102,211,116,230,196, 46,237,149,115,188, 86, 16,170, 30,252, 15, 30, 60,160, 27, 55,110, - 44, 15, 13, 13,213,255,251,212,181, 52,164,185,184, 44, 74,169, 68, 34,145,192,104, 52, 62, 50,202,141, 16,130, 65,131, 6,225, -210,165, 75,181,191, 85, 59, 48, 76,117, 89, 54, 90, 8,213,142,215, 35,141,119, 13,106, 28, 44, 74, 41,116, 58, 29,140, 70,227, -147, 85,102,181,243,199,213,219,110, 9, 24,134, 9,234,223,191,191, 36, 37, 37,165,182, 33, 52, 24, 12, 24, 56,112, 32, 24,134, - 65, 70, 70, 70,237,239,148, 82,248,248,248,200, 46, 93,186, 20,212,156,192, 98, 24, 6, 59,118,236,168,205,219, 55,223, 31,193, -155,211, 95,174,117,114,190,249,254, 72,237,126,239,191,255,254, 99, 14, 86, 99,144,201,100,181,117,193,178, 44, 36, 18, 73,237, -103,205,119, 83,219,191,198,234,136,110,216, 0,108,216, 80,229, 92, 1,168,208,104,170,196,113,223,190, 45, 22, 87,122,189, 30, -106,181,218, 16, 31, 31,255,216, 64, 3,111,111,239,123,122,189,222,228,244, 18, 66,156,106,196, 21,165, 20, 47,190,248, 34, 22, - 45, 90,132,128,128, 0,148,149,149, 97,233,210,165, 40, 46, 46,254,162,123,247,238,159,220,184,113, 99, 21,165,116,123, 83,124, - 71,142, 28,121,172,139,191, 75,151, 46,231,123,245,234,213, 49, 54, 54,182,174,232,114, 13, 8, 8,184, 71, 41,109,114,116, 97, - 77, 64,123,247,238,221, 49,103,206, 28, 28, 62,124, 24,123,246,236, 65, 77,124,211,216,177, 99,241,210, 75, 47, 33, 63, 63, 31, -206,206,206, 36, 59, 59,251,186,159,159, 95,147,129,239,114,185,124, 64,159, 62,125,152,178,178,178,218,231,144, 84, 42, 69, 90, - 90, 26, 54,111,222,140,137, 19, 39,162, 93,187,118,224,121, 30, 26,141, 6,131, 6, 13,146,108,221,186,117,128, 41, 2, 75, 34, -145,188, 27, 28, 28,252, 49,128,174,117,159,133,132,144, 91,132,144, 85, 85,186, 58,247,214,168, 81,163,238, 5, 7, 7,251,180, -105,211,198, 33, 33, 33,129,133,184,138,128, 8, 17,127,214, 13, 51, 89,131,212, 8,164,250, 66,107,227,198,141, 35,235,255, 86, - 87, 76, 53,244,189,238,177,155, 54,109,250,184, 14,119,197,211,200,215, 83, 91, 42,199, 84, 81,160,215,235, 17, 27, 27,139,246, -237,219,195,204,204, 12, 18,137, 4,190,190,190,136,141,141, 69,151, 46, 93, 32, 8, 2, 86,174, 92,137,213,171, 87, 35, 36, 36, - 4,137,137,137, 18,103,103,231, 38, 57,119, 30, 46,123,196, 74,176,180,180,108, 19, 18, 18,242,167,226,178, 8, 33,181, 13,244, -232,209,163,241,219,111,191, 65, 42,149,214,118,113,250,249,249,225,250,245,235, 38, 9, 1, 74,105,109,227, 93, 94, 94, 14,189, - 94, 15,142,227,224,232,232,136, 55,222,120, 3, 28,199,129,231,249,218,134,157,231,121,176, 44,139,158, 61,123, 82,134, 97,140, - 87,175, 94,109,114, 52,161, 33, 46,174, 42,109,255,248, 7, 56, 0, 22,247,239, 67, 42,149,162,216,173, 42,102,187, 85,121,121, -163, 93,132,245,193,243,124, 23,119,119,119,164,164,164, 64,161, 80, 64, 46,151,163, 85,171, 86, 88,184,112, 33, 42, 42, 42,240, -221,119,223,161,184,184, 24,114,185, 28, 82,169, 20,237,218,181,131, 94,175,239,210, 28, 47,203,178,152, 59,119, 46,190,255,254, -123,236,216, 92,213, 5,248,237,150,170,207,186,211, 51, 48, 12,131, 13, 27, 54, 96,208,160, 65, 38,187,161, 75,151, 46, 53,107, -236,255,135, 14, 29,210,154, 82,229,117,235,168,180,180, 20,122,189, 30, 60,207, 67,229,233,137,105,211,166, 85,213,207,171,175, -130,231,121, 8, 83,167, 86,137, 4,115,115,147,235,168,174,192,106, 44, 61,148,210, 6,187, 14,155,192,208,229,203,151,171, 4, - 65,192,160, 65,131, 48,125,250,116,248,251,251, 99,235,214,173, 8, 15, 15,199, 63,255,249, 79, 28, 56,112, 0, 28,199,201,134, - 13, 27,182, 8,192,246,150,222,215, 44,203,186,239,220,185,211,250,151, 95,126,129, 74,165,130,141,141, 13,172,172,172, 96, 99, - 99,131,113,227,198, 53, 55,186,112,120,104,104, 40,108,109,109, 17, 29, 29, 13,185,188,202,181, 87,169, 84,118, 97, 97, 97,149, -219,182,109, 43, 53, 51, 51,147,200,229,114,124,248,225,135,144,203,229,152, 57,115,102, 80, 80, 80,144, 34, 44, 44,172,193,130, -224, 56,174,147,173,173, 45,114,115,115,107, 5,185, 74,165,194,135, 31,124,128, 41, 83,167,214,138, 43,185, 92,142,149, 43, 87, - 98,200,144, 33,168,172,172,236,100, 74, 94, 51, 51, 51, 99, 0, 12,105,110, 63, 65, 16, 72,117,125, 81, 0,130,216, 60,138, 16, -241,255,234,118,157,168, 47,178,254, 12,215,242,229,203, 87, 2,160,203,151, 47, 95, 89,179,189,113,227, 70, 45,128, 63, 29, 95, -249,212, 4,150, 41, 14, 86,255,254,253,149,219,182,109,131,139,139, 11,124,125,125,107, 29, 22, 63, 63, 63,108,221,186, 21,211, -167, 79,199,169, 83,167,208,165, 75, 23, 12, 31, 62, 28, 3, 6, 12, 64,247,238,221,155,229,125,103,186,251,101,174,178,204,198, -160,175,140,218,126,196, 48,189,180,180,244, 82,187,118,237, 92, 51, 50, 50,184,178,178,178,218,160, 97, 66, 8, 2, 2, 2, 32, -145, 72,174, 69, 68, 68, 76, 52,197, 17, 26, 63,126, 60,126,249,229, 23,140, 29, 59, 22,103,207,158, 5, 0, 4, 4, 4, 32, 41, - 41, 9,230,230,230, 38, 59, 68, 53,141,119, 89, 89, 25,182,110,221,106,210, 49, 6,131, 1,193,193,193,205,158,160,166,187,150, -175,183, 93, 87,220,152, 42,176,106,202, 73, 38,147,129, 97,152,218,174,156,242,242,114,148,148,148,212,118,149,214,252,153,218, - 53,204,178, 44,182,110,221, 10,163,209,136,121, 75,215,128,101, 37,152, 55,245, 37,176,108,149, 64,221,177,239, 87,240, 60,143, -159,246,124,137,229,203,151,155,212, 53, 92,195,187,109,219, 54, 45,195, 48,143,185, 87, 12,195,180,200,193,171, 91, 71,219,182, -109, 51,233,152,162,162, 34,140, 25, 51,198,228,147,212, 13,234,111,169, 0,107, 0,199,222,123,239,189, 25, 6,131,161,115,207, -158, 61,205,102,207,158,141,204,204, 76,108,217,178, 69, 87, 84, 84,180,125,200,144, 33, 51, 84, 42,149,181, 70,163,209,164,167, -167,127,254, 36,247,181, 32, 8,217,115,230,204,177,168,153, 35,171,102,100, 33,203,178, 38,141, 46,228,121, 30,187,118,237,170, -237, 26,108,168,254,234, 94, 83,166,136,212,164,164, 36, 92,186,116, 9, 35, 70,140, 64, 69, 69, 5,140,122, 61, 22, 93,191,142, -174,147, 38, 65, 47,147, 65, 16, 4, 40, 20, 10,108,222,188,249, 47,123,198,215, 17, 88, 34, 68,136,248,255,117,187, 70, 62, 77, -174, 26, 7,107,227,198,141, 55, 55,110,220,248,152, 27,246,151, 10, 44,150,101, 81,119,200,114, 67,141,177,169, 49, 88,151, 47, - 95,214,157, 63,127, 94,149,149,149, 85,235, 16, 73, 36, 18,180,109,219, 22,132, 16,156, 58,117, 10,251,247,239,199,170, 85,171, - 32,145, 72, 96,101,101, 5, 31, 31, 31, 99, 78, 78,211,163,161,251, 12,120,181,237,255,177,119,222,225, 81, 84,251,255,127,159, -153,217,158, 94, 73,150,132, 64, 8, 53,148, 84, 18,144, 18,145,142, 72, 17, 68, 68, 69, 65, 44,148, 43, 32, 2,126,239,189,128, -138, 1, 1, 17, 68,154,168,168,160, 20,233, 8, 2,210, 33, 9, 73, 32,212,208, 18, 66, 72,239,109,179,117,102,206,239,143,100, -115, 3,146,100, 3,168,252,116, 94,207,179,207,238,236,206,190,231,204,153,153, 51,239,249,156, 86,221, 6, 75, 0, 0, 47, 47, -175,166, 91,183,110,173,175, 13, 86,131,227,217,152, 76, 38,200,100, 50,236,221,187, 23,253,250,245,195,177, 99,199,160,174,110, -212,124,229,202, 21, 4, 5, 5,225,198,141, 27, 54,221,192,107, 71, 71, 12, 6, 3, 0, 32, 37, 37,197,214, 19,160,225,210,190, - 67, 7, 8,213,145, 43,142,227,238,137, 92,177, 44,139,219,213,233,110,111,131,150, 92, 46, 79,206,201,201, 9,243,244,244, 68, - 81, 81, 17, 20, 10,197, 61,230,140,227,184,154,200,150, 66,161,176,182,211, 74,110, 72,151, 97, 24, 76,153, 50, 5,155, 55,111, - 6, 0,188,253,234, 48,104, 52,106,152, 76, 38, 24, 12, 6,188,253,234, 80,172,254,110, 23, 24,134, 65,116,116, 52,250,245,235, -103,115, 4,107,210,164, 73,117, 70,176,118,237,218,165,183, 53,159,173,199,200,218, 54,238,113, 30, 35, 91, 35, 88,182, 24, 44, - 66,200,155,237,219,183,159,161, 82,169,238,230,230,230,110,241,242,242,154,178,124,249,114,223, 59,119,238,192,209,209, 17, 7, - 14, 28, 80, 77,157, 58,245,157,179,103,207,142,161,148, 30,106, 40, 93, 29, 59,118, 60, 18, 17, 17,209,166,246, 48, 13,213,215, -125,246,149, 43, 87, 30,101,128,209,195, 3, 6, 12, 24,236,232,232,136,215, 95,127, 29,114,185, 28, 35, 70,140,128,147,147, 83, -209,186,117,235, 16, 22, 22, 86, 99,226,231,206,157,139, 59,119,238,128, 16,114,184,174,232, 85,245,249,121,173, 73,147, 38, 33, -163, 71,143, 70, 73, 73, 9,178,178,178,224,232,232,136,192, 37, 75,112,241,157,119, 16,180,102, 13,152,222, 85, 53,157,181,206, -207,107,117,233,249,248,248,132,139,162,248, 49,128,174,248, 95, 39, 29, 10, 32,134, 97,152,127,103,100,100,196, 63,160, 76,100, -172,230,177,122, 93, 9, 9,137, 63, 49,130, 85,219,104,213,138, 66,213, 69,126,237,118, 89,117, 25,180,218,109,178, 0, 24, 31, - 71, 90,185, 90,133,251,253, 61, 0,111, 37, 37, 37, 5,116,232,208, 1,233,233,233, 40, 41, 41,121,160,128,157,157, 29,212,106, - 53,110,222,188, 9, 74,233,173,134,110, 48,181,163, 10,181,123, 12,126,240,193, 7,152, 61,123, 54,250,246,237,139,167, 26,217, -182,229,215,221,107,202, 78, 29, 18,117,130, 72,179, 0, 32, 55, 55, 87,252,232,163,143,116, 7, 15, 30, 52,213,110, 40,111,173, -206, 19, 4, 33,167,129, 3,200,151,149,149,113, 10,133, 2,132, 16,156, 62,125,186,102, 24,137, 43, 87,174, 64, 38,147, 33, 45, - 45, 13,114,185, 28,102,179, 25,168,170, 38,224, 27,115,243,110,132,195,182,253, 96,222,215,230,170,177,145,171,234,168,217,177, -184,184,184,160, 62,125,250,112, 58,157,238,129, 6,203,106,174,148, 74, 37, 98, 99, 99, 77,122,189,190,193, 17,174, 89,150,197, -178,101,203, 96, 54,155,107,134,105,176, 86,135, 89,199,194,122,251,213,161,216,177,241, 75,204,156, 57,211,230, 54, 88, 50,153, - 12, 95,127,253,181, 94, 38,147,213, 84, 51,214,110,127,101,109, 59,247, 48, 6,235,113, 29, 35, 47, 47, 47,119, 15, 15,143,229, - 46, 46, 46, 42,131,193,240,187,245,107,255, 94, 95,132,203,138,191,191,255,251, 73, 73, 73, 77,138,139,139,181,123,247,238,141, -244,244,244,132, 82,169,196,176, 97,195, 42, 69, 81,100,150, 47, 95,174, 90,179,102,141,106,214,172, 89,171, 0,180,180,193,252, - 54, 93,179,102,141,211,137, 19, 39,238, 25,158, 96,204,152, 49,143, 52,192,104, 98, 98,226, 11,145,145,145,126,130, 32, 92,236, -220,185, 51,119,231,206, 29, 60,251,236,179, 80,171,213, 53,199, 70,167,211, 89,219,165, 81,142,227,130, 26,154, 33,194,104, 52, -158, 60,122,244,104,208,240,225,195,153, 27, 55,110, 64, 46,151, 87,245,238,237,218, 21, 65,107,214,224,210,244,233,232,149,154, - 10,131,197, 2,181, 90,141,253,251,247, 91, 42, 43, 43, 79,214, 99,216, 86,198,196,196,180, 87,169, 84, 48,155,205, 16, 69, 17, - 12,195, 16,150,101,187, 5, 6, 6, 46, 1,208,163,246,250, 90,173,182,245,228,201,147,155,242, 60, 47,100,102,102, 22, 73, 81, - 44, 9,137,199, 22, 77,106,168,160,206,191,207, 28,153,106, 45,231,163,106,110,229,103,171, 63,163,214,231,120, 0,225,247,173, -107,253,221,116,223,187,245,247,164, 63, 52,130,197,178,236,240, 55,222,120, 99, 69,223,190,125,163,102,204,152, 1,123,123,123, -100,103,103,215, 68,170, 20, 10, 5,124,125,125,161,215,235,113,226,196, 9,148,148,148, 28,103, 89,118, 74, 67, 27,180, 88, 44, - 53, 55,189,218, 61, 6,253,253,253,177,107,215,174,223, 25,130,186,134, 44,168,205,218, 29,186, 54,181,151,207,157, 59,231, 7, - 0, 31,126,248,225, 67,101,138, 76, 38,219,179,109,219,182,231,251,247,239,207, 88, 35,120,214,116,212, 30, 74,194,104, 52,226, -251,239,191,167, 42,149,234, 72, 93, 61, 8,107,239,119,237, 8,214,227,186,121, 91, 44, 22,104,210,210,238,233,213,233, 83, 86, -118,207,114, 59,209,246,102, 34,132,144,101,171, 87,175,158, 16, 18, 18,226,226,237,237,141,202,202, 74, 16, 66,224,225,225, 81, - 99, 96, 84, 42, 21,228,114, 57,146,147,147,113,232,208,161, 74, 74,233, 50, 91, 34, 88,239,190,251, 46,118,238,220,121,143,121, -178,154, 43,235,112, 13,148, 82, 44, 94,188, 24,131, 7, 15,174, 55,114, 90,219,240,189,254,250,235,117, 70,176, 14, 31, 62,172, -183,213,172,253, 17, 6,171,105,211,166,157, 34, 34, 34,246,174, 93,187,214,213,221,221, 29, 89, 89, 89,247,156,211, 77,155, 54, -237,212,165, 75,151,189,107,215,174,117,245,240,240, 64,122,122,122,131,251,157,154,154,186,122,200,144, 33,243,134, 14, 29, 74, -250,244,233, 3,181, 90,141,127,255,251,223,184,122,245,234,100, 0, 23,119,239,222,125,126,226,196,137,104,222,188,185,151,141, -233,175, 25,104,180,118, 84, 90, 16,132,188, 71, 45, 96,120,158, 95,184, 98,197, 10, 78,163,209, 64,175,215, 35, 63, 63,255,158, - 42,193,202,202, 74,120,121,121, 97,242,228,201,228,243,207, 63, 95,140, 6,198,193,226,121,254,139,241,227,199,143,235,211,167, -143,179, 86,171, 69,118,118, 54,228,213,213,130,228,233,167,209, 51, 37, 5, 38, 65,128, 70,163, 65,114,114, 50,214,175, 95,175, - 51,155,205, 15,172,147, 15, 8, 8, 80, 48, 12, 19, 32,151,203, 49,118,236,216,123,126,251,238,187,239, 16, 41, 8, 33,175,251, -248, 20,136, 12, 99, 42,234,216,241, 4,195, 48,100,202,148, 41, 62, 61,122,244,104,127,249,242,229,212,130,130,130,179,210,109, - 81, 66,226, 79, 35,254, 47,250,239,227, 55, 88,241,241,241,183, 1, 12, 14, 9, 9,121,225,196,137, 19,139,166, 79,159,238,222, -189,123,119, 20, 21, 21,193,207,207, 15,222,222,222, 72, 72, 72, 64, 82, 82, 82, 33,165,116,118, 66, 66,194, 79, 15,184, 89,255, -110,182,109,189, 94,143,245,235,215, 99,234,222,189, 88,218,161, 3,138,238, 27, 7,169, 54,159,127,254,185, 53, 66, 84,175,214, -238,131,252, 0, 0, 32, 0, 73, 68, 65, 84,230,253,109,176,130,131,131, 99,154, 53,107,230,157,158,158,206,215,142, 96, 89, 63, -223,223, 6,235,126, 77,163,209,248,193,150, 45, 91,100, 63,252,240,195, 96, 81, 20,101,245,152, 80, 94,165, 82, 29, 50,153, 76, - 51,235,219,119, 74, 41,241,244,244, 68,243,230,205,161,215,235, 27,213,171,173,246,205,248, 65,251,110, 50,153,176,108,225, 66, - 44, 61,115, 6,147,186,118,173,215,136, 60,168, 93,209,253,154,113,113,113,229,193,193,193, 19,103,206,156,249,253,135, 31,126, -168,246,240,240, 0,207,243,248,226,139, 47, 32,138, 34, 68, 81,172, 49, 87, 51,102,204,168,172,172,172,156,120,254,252,249,242, -134,142, 17,203,178, 88,188,120, 49,120,158,175, 25,166,193, 58,208,168, 74,165,130,193, 96,192, 55,155,247,131, 97, 24,204,152, - 49,227,119, 85,211, 15,210,180,166,229,199, 31,127,212,223, 31,181,186,127,185, 14, 51,121,207, 49,178,183,183,135,159,159, 31, -220,220,220, 30,219, 49,114,115,115,123,119,253,250,245,174,122,189, 30,201,201,201, 72, 78, 78, 6,195, 48,215,238,255, 93,167, -211,225,210,165, 75,184,122,245, 42, 8, 33,215,234,203, 79, 74,233, 18, 66,200,166, 95,127,253,117,168, 82,169, 28,238,233,233, -233,147,158,158,190,153, 82,186, 21, 0,222,126,251,109, 88, 44,150,134,170,246,107, 52, 47, 94,188, 88,231, 0,193,181,171, 15, -173,215, 16,165, 52,251,220,185,115,221,108,185,222, 1,152,118,239,222, 13,123,123,123,236,220,185,147,119,113,113,225,230,207, -159, 15,133, 66,129,121,243,230, 33, 61, 61,157,159, 48, 97, 2, 39,138, 34, 40,165,166,134, 52, 41,165, 21,132,144,201, 61,122, -244, 88,255,203, 47,191,168, 90,183,110, 13,235, 64,196,115,230,204,193, 23, 95,124, 1,141, 70,131,107,215,174, 97,232,208,161, -122,157, 78, 55,185,246, 24, 88,181, 53,121,158, 39,114,185,156,138,162,136,127,255,251,223,247, 12, 44,170,209,104,160, 6,176, - 32, 62, 94, 29, 29, 21,165,158, 50,111,222,208,106,131, 39, 92,190,124, 57,117,245,234,213, 49,148,210,227, 13,236,251,163, 86, -133, 72,154,146,230, 63, 74,243,239, 70,131,245, 71,231,206,157,219, 18, 20, 20,116,112,225,194,133, 31,237,216,177,227,181,169, - 83,167, 18, 71, 71, 71,108,221,186,149, 22, 23, 23,255,160, 82,169, 62, 56,117,234, 84,137, 77, 27,227,184,235,135, 15, 31,238, - 60,125,250,116, 25, 59,115, 38,254,115,223, 36,191,247,147,156,156, 76,117, 58,157, 96, 48, 24,234,157, 83,236,113,183,193, 74, - 76, 76,204, 1, 48,246, 49,230,243,190, 79, 62,249,100,212,134, 13, 27, 56,181, 90,141,148,148, 20,220,176, 78,191, 82,183,121, -195,103,159,125,198,155,205,230, 58,123, 50,168, 84,170, 59,167, 79,159,246,249,232,211, 79, 89, 35,195,224,243, 90,195, 21, 60, - 40,106,115,250,244,105,170, 80, 40, 74, 27, 74,236,249,243,231, 15,132,134,134,190, 52,101,202,148,111,134, 12, 25,162, 9, 11, - 11,147,251,249,249,129,227, 56,164,167,167,227,228,201,147,166, 3, 7, 14,232,141, 70,227,235,231,207,159, 63,100, 75, 6, 48, - 12,131,247,222,123, 15, 12,195,160, 77,203,102, 56,120, 34,254,158, 30,115,187, 15,158,130,151,167, 27, 58,116,232,128, 69,139, - 22, 97,216,176, 97, 13,233, 9,102,179,153,213,104, 52, 53, 99,149, 89,247,221, 90, 93,216,187,119,111,245,233,211,167,245, 38, -147, 9, 44,203, 54, 20, 14,219,183,100,201,146,145, 63,252,240,131, 76,163,209, 60,182, 99,196,243,124,187,226,226, 98,232,116, - 58, 36, 36, 36,208, 47,191,252,178,160,180,180,116,110,237,223,139,138,138, 80, 94, 94,142,179,103,207,210,175,190,250,170,160, -188,188,188,193,161,226, 41,165, 57, 0, 86, 87,191,238, 33, 55, 55,183,210,108, 54,107,178,179,179, 45,143,122,226, 90,171, 15, - 99, 99, 99,225,224,224, 0, 39, 39,167, 70, 85, 29, 82, 74,103, 28, 60,120, 80,142,234,169,114,242,243,243,207,202,100, 50,133, - 66,161, 64,102,102, 38, 68, 81,236,178,110,221,186,104, 0,102,142,227,166,218,168,121,136, 16,242, 90, 96, 96,224,154,121,243, -230,217, 69, 69, 69,113, 90,173, 22,253,250,245,195,245,235,215,241,203, 47,191, 88, 86,173, 90, 85,169,211,233,222,162,148, 30, -169,167, 60,162,148, 82,194,243,252, 61, 29, 55,172, 61,100,245,162,136, 15,130,131, 13,148,227, 76,243,230,205, 59, 14, 0, 89, - 89, 89,197,249,249,249,137,162, 40, 30,207,206,206,206,148,110, 33, 18, 18, 18,117,154,208,198, 52, 33,136,136,136,136, 16, 69, -241,103, 65, 16,100,132,144, 17,137,137,137,167, 27,227,112, 35, 34, 34, 28,228,114,249, 97,189, 94, 31,104,203,246, 20, 10, 69, -137,197, 98, 25, 28, 31, 31,127,161, 62,215,252,230,112,187,235, 26,149,200, 86, 26, 44,183,214,238,176, 12, 12, 9, 9,185, 51, -104,208, 32, 85, 93,109,176,204,102,243,205,132,132,132,103,254, 44,119, 79, 8, 97,130,131,131,207,200,100,178,136,234,237,215, -190, 89,212, 12,150,104, 93,174, 21,157, 74,191,126,253,122, 43, 74,169,185,142,252,244,148,201,100, 71, 13, 6,131,159, 45,105, - 82, 42,149,217, 70,163,177,127, 98, 98, 98,170, 45,251,222,189,123,119,103,158,231,255,165, 84, 42,159, 54, 26,141,237, 0, 64, -173, 86, 39,235,245,250,163, 28,199, 45,175,203, 88, 63, 72,179,115,231,206, 58,150,101, 73,237, 33, 25, 30,244, 94,123,184,134, -138,138, 10, 79,235, 36,223,247,107,246,232,209, 99,195,232,209,163, 7,190,242,202, 43,132,227,184,154,124,179, 30,107,107, 53, -180,209,104,196,134, 13, 27,232,246,237,219,247, 31, 59,118,108, 92, 67,199,136,227,184, 8, 66, 72,205, 49,122,208,245,209,152, - 99,228,231,231, 23,100,103,103,183, 14, 85, 35, 11,167,148,150,150, 78,205,204,204,204,172,253,187, 90,173, 94, 7, 64,193, 48, -204,239,126,127,152,243,147, 16, 50,177,109,219,182, 51,175, 93,187,182,172,174,177,175,108,213,236,212,169,211,145, 46, 93,186, -180, 57,127,254,188,217,122, 13,213, 53,254,149, 45,154,161,161,161, 91, 0, 12,174, 94,255,112, 66, 66,194,208,135,125, 74, 38, -132, 56,201,229,242, 73,106,181,186,167,193, 96,104, 91,253,208,113, 77,175,215,159, 48,155,205, 95, 82, 74, 75, 27,210,244,247, -247, 63,123,242,228,201, 64,107,212,211, 58,122, 59,203,178,104,218,180,233,185,172,172,172, 30, 82,212, 65,210,148, 52,165, 8, -214, 31,110,176,164, 19,229,159,171,105, 29,169,213,150, 70,189,127, 70, 58,187,118,237,170,229, 56,110,129,209,104,236, 95,223, - 40,237, 44,203, 10,106,181,250, 87,147,201,244,127,247, 79,246, 44, 29,119,233,252,124,152, 94,132,210, 49,146, 52, 37, 77,201, - 96,217, 2, 39,101,129,132, 45, 60,105,189,165,170,205,210, 56,233,200, 72, 60,202,249, 89,109,160,250, 74, 57, 40, 33, 33,241, -184, 97,164, 44,144,144,144,144,144,144,144,144,120,188, 16, 0, 29,235,120, 34,108, 76,155,143,142, 15,241,196,121, 73,210,148, - 52, 37, 77, 73, 83,210,148, 52, 37,205,127,150,102, 67,218,127,151,170, 71,169, 13,150,164, 41,105, 74,154,146,166,164, 41,105, - 74,154,127,185,230,223, 13,169,138, 80, 66, 66, 66, 66, 66, 66, 66,226, 49, 35, 53,114,127, 8,180, 90,173, 26,192,179, 28,199, -141,117,113,113, 9, 43, 44, 44, 92,144,145,145,241,197,223,116, 95, 91, 83, 74,199, 50, 12,243, 2, 0,136,162,184,149, 16,242, - 67, 86, 86,214,141, 71,213,142, 34,132,243, 2,198,203,128,105, 0, 96, 1,150,229, 0, 95, 31,163,148,255, 59,159, 63, 61,131, -201, 44,133, 92,246,186,193,108, 89,116,234, 60,253, 38, 42,148,184,241, 34, 22,170,228, 92, 15,163,137,255,244,100, 18, 93,255, -136, 79,150,246, 30, 30, 30,209, 12,195, 60, 77, 41, 37,148,210, 19,249,249,249,179, 40,165,101,210,213, 43, 33, 33, 33,241, 4, - 25, 44, 66, 8,219,190,125,192,203, 44, 33, 79, 1,112, 6, 80, 34, 80,122,250,234,213, 91, 63, 80, 74, 31,106,190,178,168,168, - 40, 78,175,211,141,225, 88,118, 32,165,180, 35, 40, 37, 32,228, 18,207,243, 7, 52, 14, 14, 27, 27,154,122, 6, 0, 70,141, 26, -197,102,102,102, 94,231,121,222,163, 49,219,150,201,100, 57,103,206,156,105,243, 48,233,246,241,241, 25,209,180,105,211,213,145, -145,145,154,224,224, 96,200,229,114,124,250,233,167, 83, 1,216,108,176, 72, 84, 20,215,164,216,109, 12, 35,227, 6, 1,180, 35, -165, 0, 37,220, 37,152,205, 7,114, 93, 11, 54, 82, 27,246, 29, 0, 66, 66, 66,102, 18, 66,198, 86,247,160,218,112,238,220,185, -207, 31,229,100,248,239, 27,108, 46,165,162,189, 72, 9, 42, 12, 50,243,207,199, 93, 47, 7, 7, 7,135,204,156, 57, 19,145,145, -145, 16, 69, 17, 39, 78,156,152,182,108,217,178,105,222,222,222, 9, 44,203,110,148,203,229,219, 82, 83, 83, 31,234,198,237, 5, -140,143,236,222,125,241,107, 51,102,176,149, 39, 78, 96,249, 55,223,124,138,178, 50, 0, 88,219, 72, 67, 65,186,116, 9, 26,238, -232, 72, 6, 50, 4, 65, 20,148, 16,144, 11, 69,197, 56,144,144,112,254,103, 74,169,248,176,121, 18, 22, 22,182,157, 82,218,191, -122, 59,191, 38, 36, 36,140,120,148, 60,238, 22, 76, 34,219,182,240,254,239,228,151,158,198,123, 11, 55, 79,238,222,137, 20,168, -237,228,171,159,239, 30,224, 28,216,210, 25, 31,174,141,153, 10,224,161, 13, 22, 33, 68,227,225,225, 17,183,107,215,174,166, 17, - 17, 17, 28, 0, 36, 36, 36,140, 25, 60,120,112, 47, 66, 72, 56,165,180,252,175, 40,104,186,118,237,170,226,121,126, 34, 11, 60, - 67, 41,237, 80,157,214,203, 2,240, 27,199,113,235, 98, 98, 98, 12, 82,113, 44, 33, 33,241,143, 50, 88,132, 16,182, 99, 96,235, -165, 19,223,124,171,221,240,225,195,189,213, 26, 7, 85,122,250,173,172,117,107, 86, 57,177,132,233, 76, 8,153,209, 88,147, 21, - 17, 17,209,142,136,226,143,111,191,254,122,243,176,110,221,184, 38,222,222, 48,148,150,226,214,181,107,190,241,103,207,246,217, -117,248,240,180,208,208,208,177,137,137,137,151,235,211, 41, 40, 40,144,113,130,224,121,228,147, 79, 88,198,197, 5,148,231,193, -183,107, 7, 81, 20, 65, 5, 1,220,233,211,128,197, 2, 42, 8, 48,247,174,154, 13, 68, 20, 69,244,239,223,223,231, 97, 50,203, -215,215,215,187, 85,171, 86,235,231,204,153, 35, 55, 26,141, 56,127,254, 60,206,156, 57, 35,230,231,231, 47,181,217, 84, 4, 15, -109,231, 5,175, 77, 67,135, 15,106, 54,184,175,135,194,207,203, 3,162,168,196,181, 84,139,239,161,147,231,250,254,178,255,224, -187, 77, 58, 14,125, 57,247,210,174,122,247,189, 75,151, 46,253, 24,134,153,151,144,144, 0, 0, 8, 13, 13, 93, 16, 26, 26,186, -160,161,237,219,217,217,229,233,116,186,241,137,137,137, 15,152,160, 89,212,204,159,250, 22, 68, 10,124,181,239,154, 60,121,213, -174, 16, 71, 71,199,123, 38, 75,238,215,175, 31,250,246,237,139,244,244,244,176, 29, 59,118,132,173, 95,191,254, 83, 31, 31,159, -121, 25, 25, 25, 43, 26,155,159, 50, 96,218,107, 51,102,176,118,105,105,176, 59,127, 30, 99,203,202,184, 69, 85,209, 44,155, 13, - 86,120,120,120,139,126,125,131, 55, 14, 27, 30,213,214,203, 43, 80, 46,147,185, 87, 79,220, 92,212, 42, 63,255,234, 48, 23, 23, -188, 23, 17, 17,241, 82, 67,147, 8,215, 58, 55, 61,121,158, 95, 1, 64,206, 48,204, 12, 74,105,255, 3, 7, 14, 64, 16, 4, 12, - 30, 60,184,127,120,120,120, 11, 81, 20,151,218,217,217, 81,163,209,248,118, 92, 92, 92,163,230,235,227, 8, 62, 26,253, 92, 95, -232, 45, 12, 44, 22,222,195,219,195,225,135,169,175,244,146,129,154,240,221,238,115,176,240,226, 55,143,114, 65,107,181,218, 5, -223,127,255,189, 79,100,100,100,205,216, 96,193,193,193,236,146, 37, 75,180,211,166, 77, 91, 12,224,205, 70,152,203, 32,165, 82, -185,160,164,164,100,212,149, 43, 87,116,157,222,222,233,193, 89,212, 14, 50,181,104,140, 91, 49, 32,179, 17,199, 40,140, 35,100, -211,146,247,199,123,181,237,212,153, 81,121,184,131,220,201, 67,177,160,127,250,204,165,171, 61, 62, 95,181,113, 82,120,120,248, - 75,241,241,241, 9, 82,145, 44, 33, 33,241,143, 49, 88,237,219, 7,188, 60,254,141, 55,218,189,245,246,228, 80,179,217, 88,121, - 33,241,248, 17, 78,206,176,147,167,188,225, 84, 84,156,239, 78,169,248, 50,128, 13,141, 48, 87, 1, 77,155, 52, 57,180,112,209, - 34,103, 87, 15, 15,228,228,228,224,110, 70, 6,178, 47, 93, 2, 1,208,183,111, 95, 69, 80,231,206, 45,151,173, 93,123, 32, 60, - 60,188, 95,124,124,252,213,250,244, 88,142, 3,177,179, 67,102, 72, 8, 32,151,163, 52, 38,166,234,123,158,135,253,144, 33, 85, - 43,201,229, 48, 95,184, 0,134, 97,224,233,233,249,208,153, 69, 41,141,232,222,189,187, 28, 0,222,123,239,189,114,157, 78,183, -152, 16,178, 37, 51, 51, 51,203,150,255,123, 4, 61, 31,224,233,238,121,112,201, 71, 19, 93, 58,250,183,132,201, 98, 65, 70, 94, - 38, 40,148,240,242,180,199,216, 97, 65,242,167,194,100, 1, 75, 87,254,246,171, 87,231, 33,125,115, 46,236,169,115,223, 89,150, - 93, 58,123,246,108,108,217,178, 5, 0,176,105,211, 38,180,110,221,186,193, 52,156, 57,115,198,243,253,247,223, 95, 13,224,129, - 17, 60,145, 86,205, 91,216,178,101, 0,156,156,156,234, 50,221,240,243,243,195,180,105,211, 16, 18, 18,162,120,249,229,151, 63, - 2,176,226, 97,242,180,242,196, 9,216,157, 63, 15,156, 56,209,232,255,134,134,134,250,182,111,239,118,116,233,146,255,186,239, -217,123, 25, 75,150,124,131, 91,183,170,124, 84,203,150, 45,241,210,152, 81,178,141, 63,172,109, 63,107,214,220, 35, 93,186,116, -121,230,236,217,179, 55, 27,210,228,121,126, 69,116,116,244, 96,123,123,123,204,158, 61, 59,201,223,223, 31,142,142,142, 88,187, -118, 45, 92, 92, 92,192,243,124,210,162, 69,139,184,172,172, 44, 44, 95,190,124, 53,128,225,182,166,183, 71, 16, 25, 20, 22,220, - 49,210,207,183, 25,142,157, 57, 11,185, 66,230,252,206,171,207,194,193,158,195,226,175,247,137,233, 25, 69,147, 79, 38,209,239, -234,125,224, 25,181,141, 13,210, 37,185, 36, 29, 80, 20, 81, 58, 87,180, 70,240, 80, 61, 72,102, 19,111,237,160,158, 61,123,178, -213,231, 43,210,210,210, 96, 50,153,208,190,125,123,198,108, 54,247,108,196,117, 26,162, 80, 40,246,155,205,102,181,157,157,157, - 6,128,142,179,168, 29, 68, 57, 55,210, 76,197,171,157,102, 30, 50, 95, 92,220, 55,223, 22,115,213, 46,160,217,190,229, 11,254, -207,142,205,191, 1, 29, 57,143,226, 92, 51,176,116, 15, 24, 71, 15, 60,253,222,100,174,115,112,144,118,246,255, 69,239,235,210, -165,203,160,179,103,207, 38, 74,197,178,132,132,196,223,129, 6, 27,185,179,132, 60, 53,108,216,112, 15,147, 73,175, 51, 24,116, - 37,183,239, 36,100, 31, 57,178,254,210,245,171, 39,111,244,235,223,213,204,176,228,169,122, 12,201, 61, 61, 12, 70,141, 26,197, - 50,130,176,121,209,226,197,206,172, 92, 14,139,197, 2, 63, 63, 63, 24, 12, 6,148, 21, 23, 35, 39, 61, 29,167,247,238,133,174, -160, 0, 83,198,142,117,150, 17,178, 41, 52, 52, 84, 86,159, 38, 40, 5,248,123,107,212, 24,134,185, 39,234, 98,253,238, 65,243, -243, 61, 80,179, 14, 68, 81, 76,203,202,202,130, 70,163, 65,187,118,237,236, 8, 33,103, 50, 50, 50,178,108,209, 36,163, 70,177, - 50, 25,187,109,241, 71, 99, 92, 8,123, 29,215,211, 19,192,177, 74,184, 57,249,194,100, 6, 78, 37,254,130,111,182,253, 7, 25, -153,113,152, 56,182,149,147, 90, 77,127, 38,161,111,214,185,239,102,179,185,121, 64, 64, 0, 58,118,236,136, 78,157, 58, 65, 16, - 4, 92,190,124, 25, 23, 47, 94,196,249,243,231,145,152,152,136,248,248,120,196,198,198,226,204,153, 51, 24, 53,229, 51,188, 53, -101, 38, 42, 42, 42, 96, 50,153,124, 30,156, 78,166,114,252,127,190,199,225,171,102, 20, 20, 27,176,117,235, 86, 20, 21, 21, 97, -243, 23,221,177,102,174, 55,214,204,245,198, 15,159,133,160,184,184, 16,177,177,177, 88,188,120, 49,116, 58, 29, 4, 65,224, 30, - 38, 63, 45,192,178,229,223,126, 43, 38,159, 56,129,100, 0,235, 9, 17, 45,192, 50,155,242,147, 16,226,230, 42,254,180,108,217, -127,220, 89,230, 10, 92,157, 22,225,236,217,211,200,205,205, 69,110,110, 46,226,226,206,192,197,249, 43,112,220, 85,124,246,217, - 60, 87,103,103,254, 71, 66, 8, 99, 67, 58,229,201,201,201,208,235,245,248,233,167,159,184,232,232,104,196,197,197, 65,173, 86, - 99,220,184,113, 88,177, 98, 5,231,234,234,138,219,183,111,163,162,162,130, 52,234, 92, 34,120,109,212,240, 97, 96,229,118,184, -118, 43, 3,189, 34, 67,224,233,233,137,171,105,197, 72,207, 44,202, 37, 4,227, 6, 60,165,204,233, 25, 76,198,215,165, 73,183, -142, 20, 94, 26, 57, 32,120,192, 4,199, 9, 77,195, 39,118,174,222,167,234,116,180,231, 8,163,112,178,154,171,155, 55,111, 34, - 57, 57, 25,119,238,220,193,157, 59,119, 96,177, 88,234, 76,103,175, 94,189,222,137,140,140, 44, 14, 15, 15, 47,239,209,163,199, - 70,150,101,247, 47, 88,176, 64,163, 82,169, 76,188,139,159, 93,232,155,191,249,202,101, 10,158, 18,198, 72, 5,124, 40, 43,151, -187, 4, 76, 61,160,168,111,223,187,118,237,170,146, 49,204,166, 21,209,255,182,179, 36,108, 7,188,155,194,211,127, 34,236, 93, - 34, 65, 75,244,224,147,146, 81,190,100, 37, 56,149,136,127,255,223, 44, 59, 34,138, 63, 4, 4, 4, 40, 30,230, 92,106,228,131, -146,164, 41,105, 74,154, 79,160,230, 63, 46,130, 69, 24, 56,107, 52,106,121,204,233,157, 7,178, 50,174, 20,100,231, 94, 42,101, - 64,153,172,172,132, 82,255, 86, 79,187,161,170, 77,150, 77,164,166,166,190, 56,237,173,183,252,157,170, 34, 1,112,119,119, 71, - 70, 70, 6, 12, 6, 3, 42,203,202,160,175,168,128,177,172, 12, 87,143, 28, 65,183,129, 3,209, 63, 56,216,119,239,185,115,175, - 1, 88, 87,231, 77,154, 97,192,119,238,140,210,196, 68, 16,179, 25, 78,161,161, 53, 81, 43,227,149, 43, 85,198,202, 98,129,236, -169,167, 64, 52, 26,144,121,243, 30, 58,179,178,178,178,146,252,252,252, 14, 14, 24, 48,160,223,196,137, 19,153,156,156,156, 93, - 94, 94, 94,189,115,114,114,146, 27,250,111,147, 27,226,216, 87, 39, 6,183,112,119, 34,216,115,230, 87, 68,182, 27, 14,141,146, - 67,126,113, 37, 24, 66,112,235,246, 97, 8,130, 29,146,146,211,209,173,163, 29,186, 71, 56, 54,213,253, 86,252, 58,234,169, 46, - 51, 24, 12,200,203,203,131,197, 98, 1,207,243, 24, 57,106, 20,190,219,176, 1, 58,157, 14, 6,131, 1, 38,147, 9,162, 88,213, -252, 40, 39,207,128,184,115,251, 17,218,169,238, 40,215,135, 95, 9, 77,180, 90,109,229,119,123,214,226,208,161,170, 57,156,119, -237,218, 5, 67,110, 10, 38,189, 88,213,244,104,217,119, 63, 97,217,103, 75, 97,182,136, 86,163,247,208,249,121, 19,248, 38, 85, - 20,103, 13,216,190,221,227,204,206,157, 98,236,158, 61,153,202,242,242,175,109,249,111,151, 46, 65,195, 39, 79,126,182,173, 90, -165, 70, 70,250,231,104,215, 78,142, 25,211,220, 16,189,168, 0, 0, 48,117,178, 15,194,194,220, 80, 86,178, 13,238,158, 31,224, -189, 25,195,253, 43, 42, 48, 6,192,198,122,159, 56, 24,102,198,198,141, 27,147,250,245,235,199,157, 59,119, 14, 74,165,178,102, -162,112,181, 90,141,156,156, 28,152, 76, 38,108,217,178,133,103, 24,102, 70,227, 74, 36, 52,109,226,229, 3,134, 90,144,149, 91, -128,161,131,250,129,147,219, 35, 45,163, 0, 65,129, 45,189, 95, 26,242,148, 55, 75,120,188,191,232,199,119, 0, 60, 48, 31,162, -162,230,115,239,252,103,172,229,157, 54,205, 29,247, 30, 60,253,218, 30,134, 20,230,150, 94,253, 28, 55,206, 24,148,173, 58,190, -216,214, 31,230, 35, 71,142,168,123,246,236, 9,189, 94,111,141,118, 98,227,198,141, 34,207,243,117,134, 9, 5, 65,152,245,253, -247,223, 43,220,221,221, 49,101,202,148,190,227,199,143, 87,135,134,134, 18, 74, 41,168,162,149,147,192,209, 94, 60,248,179,172, - 73,216, 11, 57,219, 79,224,204, 99,157, 5,118, 45,128,140,122,162,129, 19, 23,127, 60,181, 9, 85,231, 65,222,123, 32,152,124, -130,204,183,158,131, 88,110,128,121,193, 36,136, 84, 14,163,137,131,121,216, 36,200,253,219, 96,114, 72,184,247,242,115,241,111, - 0, 88, 41, 21,205, 18, 18, 18,247, 17, 14,192,218,222,186,160,250,193,210, 13,128, 53,146,238, 1,192,132,170,121, 95,173,220, -191, 92,123,221,251,151,107,127, 46, 64,213,148, 89, 30, 0, 4, 0,103, 1, 20, 63, 84, 4,139, 16, 66,107, 69, 6,238, 29, 24, -139,146,130,140,140,212, 34,163,185,216, 48, 32,170,219,180,103, 35,188,230,191,246,226, 59,115,157, 28, 84,234,244,180, 91,148, - 48, 40,180,117, 99, 74,153,172, 95,104,100,164, 44, 39, 39, 7, 78, 78, 78,200,204,204,196,141, 27, 55, 96, 48, 24,160, 43, 45, -133,177,184, 24,124, 97, 33, 80, 88,136,180, 19, 39,208, 86,171, 85,176, 54, 76, 99, 33,138, 34, 8, 33, 96, 89,246,129, 81, 43, -134,101, 65,236,237, 1,123,123,128,105,220,200, 20, 90,173,246,217,118,237,218, 29,211,106,181,179,170, 13,197,180,232,232,232, - 66, 74, 41,102,205,154,229,224,224,224,176,177,121,243,230,202,134,116,236, 93,249,225, 17,157, 90,177,215,211, 47, 34,172,245, -243,104,238,221, 19,183, 50, 75,145, 95,106, 64, 78,145, 14,109,218,204,132,135,118, 34,156,188,222,194,133,107,119,161,245,242, -103, 24,153,188,222,125,207,201,201,185,103,249,199, 77,155, 80, 89, 89,137, 86,173, 90,225,197, 23, 95,196,251,239,191,143,209, -163, 71, 67,171,213,162,123, 75,224,245,151, 71, 34, 47,175, 81, 77,134,224,227,227, 83, 51, 65,155, 40,138,224,121, 30, 22,203, -255, 76,149,201,100,178, 89,203,203,203,235, 61, 47, 47,175, 56,111,111,239, 4,111,111,239, 29,185, 90,237, 57,139,191,191,103, -247,225,195, 73,224, 11, 47,176,119,237,236,200, 29, 63, 63, 59, 91,180, 28, 29,153, 1, 97, 97,221, 21, 37,197,223, 0,168, 50, -123,175,191,230,129, 83,199, 59,224,244,201, 80, 76,153,220, 18, 12, 81,129, 48,114, 84,234,126, 67,251,192,142,114, 7, 7, 58, -176, 62,205,176,176,176,237,162, 40, 94,238,208,161, 3,247,246,219,111, 67,169, 84,226,187,239,190,195,234,213,171,241,217,103, -159,225,250,245,235,240,243,243,131,183,183, 55,154, 52,105,194,137,162,120, 57, 44, 44,108,187,173,251,175, 86,169,220, 20, 42, - 39,176,114, 59,112, 50, 25,154,249, 54, 7, 43,183, 67,113, 89, 37,198,189, 48, 4,151,110,102,227,227,213,123,120,139, 69,172, -179,186,245,248,241,185,194,142,125,199, 44, 21, 21, 58,238,185, 65,125,244,111,189,246, 98, 43, 23, 85,203,111,224,211,167,115, -139,102,222, 47,254, 55,122,133,105,194,219,239,154,191, 90,255, 53, 45, 47, 47, 71, 89, 89, 25,150, 47, 95,206,239,217,179, 39, - 75, 16,132,153,245, 24, 44, 5,203,178,160,148, 98,194,132, 9,154, 54,109,218, 16,158,231, 65, 41,133,194,172, 51, 51, 34,218, - 16,194,140, 32, 44,107, 22, 64, 54, 18,202,246, 16,121, 78, 94,111,244, 27,120, 38,176,115,103,182, 82,159, 6,123,199, 80, 20, -126,250, 95,136, 57,197,160,121,101, 16, 56, 13,244,162, 10,101, 38, 25,138, 58,133, 32, 43, 41, 25,158, 26, 71,142, 35,164,143, -116, 31,145,144,248,103, 81,175, 7,249, 31, 30,132,144,189,132,144,189,115,230,204,121, 26,128, 27, 33,100,111,181, 9,242,168, -254,172,176,174, 83,199,178, 71,109,157,251,254, 91,251,179,251,156, 57,115,122, 19, 66,246,118,235,214,237,229,106, 35,247,248, - 35, 88,130, 32, 28,253,242,203, 85, 77,222, 24,255, 92,147,109,123,191,142,254,121,251,133,206, 47,141,206,185,162,109,218,201, - 99,227,170,211, 10,158,167,123,109,222,154, 40,118,114,107,210, 4,105,105,105,136,143,143,135,193, 96,128,209,104,132,209,104, -132,185,184, 24,150,146, 18,144,242,114, 40,120, 30,134,244,116,180,236,212, 9, 4,104,111, 67,168,178,206,106, 65,150,101, 65, - 68, 17,196,206, 14,196,206,174, 81, 6, 75,171,213, 6, 7, 7, 7,127,191,110,221, 58,249,244,233,211,195,253,253,253,215,100, -103,103,167,251,250,250, 14, 90,178,100,201,137,143, 62,250, 72, 57,118,236,216,214,235,214,173,123,169,174,136,131, 21,185,202, -208,193,175, 73,107,148,235,187, 64,163, 80,160,168,204,136,226,114, 35, 10, 74, 12,216,190,107, 12,140,134, 74,240, 70, 19, 4, - 51, 15,251, 38,195,209,202,245,105,128,222, 12,172, 79, 51, 54, 54, 22,151, 47, 95,174,137, 96, 25, 12, 6, 12, 24, 48, 0,195, -135, 15, 71, 90, 90, 26,206,157, 59, 7, 39, 39, 39,120,120,120, 96,235,214,173,184,120,241, 34, 66,173, 17,190, 70,192, 42,221, -240,197,166,205, 48, 24, 12,160,140, 61,104,173,154,229,198, 68,176, 8, 33, 99,179,135, 13, 11,192,241,227, 24,216,172, 89,187, -182,109,219,194, 96,248, 95,231,177,128,128, 0,223,140,140,140,219, 90,173,118, 51, 33,100, 93,102,102,230,133, 58,181, 32, 6, -185,184,182, 71,214,221,232,106,109, 14, 4, 74,244,238,155, 4,179, 89,196,245,107, 3,160, 82, 42,193, 16, 37,120,190, 16,142, - 78, 77, 0,144,192, 6,206,163,254, 7, 14, 28,128,163,163, 99, 77,181, 32, 0, 60,251,236,179, 51,236,237,237,187, 27, 12,134, -161,123,247,238, 69, 73, 73, 9,252,253,253,225,233,233,137,184,184,184,254,182,238,191,157,157,131, 43, 39,183,131,200,112,112, -114,114, 1,167,176,131,200,115, 16, 68,192,193,201, 29,103,206, 93,195,213, 59,236,155, 55, 83,177,181,238, 52,130, 6, 12,188, - 20, 95,169,171,236, 48,244,185,126,174, 33,157, 59, 26,162,231,189,239,176,240,179, 53, 31,255,103,214, 91, 77, 50,203, 84,101, -125,167,238,207,219,241,235,188,230, 75, 62, 91,174,202,203,203,179,152,141,134,253,162, 40, 78,173,175, 7, 33,165, 20,151, 46, - 93,130,131,131, 3, 82, 82, 82,224,230,230, 6, 65, 16,170, 30, 94,144, 87, 46,200,185,205,172,133,255,150,149,169, 86, 3,230, -100,145,210,118,148, 19,229,100,254,124,134,206,157, 43,214,161,217, 65,161, 84, 66,167,163, 40, 63,189, 15, 98, 81, 37,104,137, - 30,168, 52, 65,167,103, 81, 94, 73, 80, 94, 41, 66,223, 57, 12,194,193, 88,184,148, 26, 64, 41,237, 36,221,110, 36, 36, 36,234, - 41,171,158, 37,132,236,141,142,142,126,182,190,223, 41,165,207, 2, 48,221,183, 12, 91, 62, 3,192,194,133, 11, 63,169,181, 92, -249,135, 24,172,203, 87,111,109,237,216,177, 85,160,143,143, 75,235,208,142, 29, 61,124,154,222, 42,115,247,240,113,248,229,192, - 69,117, 94,110,241,181,203,151,111,238,104,140, 81,213, 23, 21, 33,235,194, 5,148, 21, 21, 65,175,211,193, 80, 94, 14,190,184, - 24,222,109,219,130, 86, 84,128,213,235,193, 25,141,144,139, 34,212, 26, 13,240,191, 25,238, 31,136, 76, 20,193, 29, 61, 10,251, -225,195, 1,185, 28,166,171, 87,171,204,150,197, 2, 89,207,158, 32,118,118, 96,156,157, 65,246,237,171,250,222,193, 1,248,188, -225,209, 12,180, 90,173,155,151,151,215,214, 47,190,248, 66, 94, 80, 80,128, 43, 87,174, 92, 76, 77, 77, 45,115,119,119,183,231, - 56, 78,188,118,237,218,209,107,215,174, 13,108,209,162, 5, 4, 65,104,217,144, 94, 69,137,189,217,108, 17,145,153,119, 7, 25, -217,151,224,100,223, 12,148,241, 69,110, 81, 37, 8, 60, 97,209, 95,131, 88,221,150,204,168,207,128,206, 72,108,202, 80,179,217, - 12,179,217, 12,158,231, 97, 50,153,240,202, 43,175,224, 76, 76, 12, 54,237, 58,129,187,119,239,194,191,137, 26, 47,142, 30,137, -160,160, 32, 88,123, 28,218, 98, 88,107,211,162,203, 82, 40, 20, 10,108,219,182, 13,154,170, 99,210,104,131,229,237,237, 29,221, -174, 93,187,128,107, 58, 29,174, 36, 39,163,203,168, 81, 0,128, 83,167, 78,213,172,163,215,235,241,210, 75, 47, 41, 82, 83, 83, - 95, 77, 78, 78,126,213,219,219,123, 69,118,118,246,156,186, 52,247,237,139,193, 91,111, 93, 65,126,126, 85,100,119,243,166,255, -249,167,180, 84, 51, 6, 12, 62, 0, 0,112,118,118,198,210,165,182,205,246, 32, 8, 2,214,174, 93, 91, 83, 45, 8, 0, 10,133, - 34,114,250,244,233, 67, 31,180,126, 96, 96,189,158, 13, 30, 30, 30,118, 10,133, 98,180, 32, 8, 47, 7,182, 16,184,162,114, 61, -192,155,112, 59,237, 54, 74,116,102, 80,222,130,244,140,108,232,140, 34, 10,139,202, 17,218,101,208, 23, 38,254,204,255,105,181, -218, 15,178,178,178, 30,248,240,114,107,255, 10,147,107,192,212,141, 57,249,155,103, 77,158,248,178,204,201,197,171, 98,253,202, - 79,156, 24,194, 96, 79,162,165, 56,176,165,155,203,208,200, 21, 21,111,190,251,239, 36,163,112,123, 58,210,127,185, 81, 29,238, -174,151,162,162, 34, 24,141, 70,220,190,125, 27,106,181, 26, 50,153,172,218, 96, 89, 79,140,234,143, 22,209, 66, 57,194,112, 22, -150,153,135,185,117, 95,236, 12, 3,220,206, 1, 86,238, 66,209,184,193,176,124, 52, 9, 2, 47, 71, 69,153, 8,211,224,201, 48, -153, 69, 88, 88, 5,244,237, 58,160,248,195, 5, 48,218,171,129, 75,167,165, 59,136,132,132, 68,125, 15,234,123,103,207,158,253, -129,141,171, 31, 6, 48,184, 49,198,205,186, 60,123,246,236, 15,172,219,138,142,142,214, 3,200,106,108, 90,109, 10,231,136,162, -124,213,193, 3,113, 50, 70,198, 49, 45,252,236, 74, 1, 19,206,198,103,218, 89, 4,217,186, 70,230,204,197,148, 27, 55, 64, 69, - 17, 21, 37, 37, 48, 20, 21,193,146,151, 7, 75, 94, 30, 72,121, 57, 56,189, 30,156,193, 0,153,201, 0, 21,199,161, 52, 55, 23, -132, 97,174, 52,152, 49,181, 26,239, 90, 35, 89, 44,203, 2,246,246, 85, 85,131, 26,205,255,170, 11,109,140, 96, 41,149,202,111, -215,174, 93,235,229,237,237,141,175,191,254, 26, 94, 94, 94,109,158,121,230,153,130, 30, 61,122,228, 62,247,220,115, 9,239,191, -255,254,192,176,176, 48, 20, 20, 20,128,101,217,148,134,244, 44,102,229,249,171, 41, 2,242, 11,206, 35, 46,241, 91,236,253,117, - 14,146,111, 95, 65,118,161, 14,118,158,227,193,217,247,168, 89, 87,225, 24,133,220,220, 2,128,212,191,239,247, 27, 33, 74, 41, - 46, 92,184,128,239,118,158,129, 54,240, 25,200,236, 60,112,233,210, 85, 28, 59,116, 16, 62, 62, 62, 13,154,161,255,190,193,230, - 62, 19, 82,138, 67, 91, 38, 34,239,230,183, 54, 27, 60, 27, 47,138,209,243,231,207, 71,233, 91,111, 1, 91,183, 66, 46,175,170, - 93,138,140,140, 68,120,120, 56, 62,252,240, 67, 68, 70, 70,130,101, 89,180,106,213, 10, 67,135, 14, 5, 33,100,116,157,251, 14, -114, 65, 20, 10,209,178,229,255,188,237,119, 63,228,227, 92, 66, 31, 92,185, 56, 4, 59,119,103,215,124,223,172, 89, 51,228,228, -164, 2,160, 87, 26, 72,227,175,131, 7, 15,198,222,189,123,161, 82,169,160,209,104, 48,124,248,112, 84, 86, 86, 62, 95,253, 68, - 3, 66, 8, 8, 33,152, 87,221,150,175,178,178,210, 88,159,166, 66,161,248,246,141, 55,222, 88,184,127,255,254,192, 37, 43,246, -152, 14,253,122,208,114,224,224,111,252,123, 31,172, 55, 29, 59,121,222,114,228,212, 69,254,249, 49, 51,204,191, 28,185,196,191, - 57,117,177,105,201,146, 37,248,234,171,175,188,100, 50,217,199,245,233, 22,167,124, 81,145,124,243,242,202, 21,107, 54,176, 10, - 57, 85,222,201,183, 20,159, 74,214,103,217, 41,137,172,117, 19,106,247,175, 57, 31,221,206,206,185, 62, 7,233,191,220,180,177, -112, 65, 97, 97, 33, 10, 10, 10,144,145,145,129,252,252,124, 20, 20, 20,128, 82, 10, 10, 79, 7,214,204,143, 6,203,236, 16, 44, - 70,163,133, 35,173, 1,154, 42,136,102,211,220,185, 16,235, 17,189, 92, 89, 86, 14,198, 64, 33,158, 79,131, 73, 84,161,212,196, -161,196,200,162,220, 32,160,140,200, 81,206, 40, 81,212, 45, 10, 70,129, 69, 89,105, 25, 8, 33, 23,165, 91,136,132,132, 68,125, - 70,104,225,194,133,159,252, 81,218,214,207,209,209,209,151,107,109, 75,253, 40, 17,172,168, 90,245,158, 81,247,175,116,229,202, -149,220, 1,253,159,241, 92,241,229,177,150,102,147,192,239,250,229,144,217, 98,182,215, 95,189,150,210,168, 6, 61,102, 81, 60, -152,152,144, 48,160,123,183,110,202,180,115,231, 96, 41, 46,134, 80, 92, 12,153,217, 12, 78,167, 3, 99, 52,130,213,235,209, 44, - 88, 3, 80, 47,156, 77,201,226,205,130,112,184, 65,147, 97, 53, 88, 44, 91, 99,174, 24, 74,193,216,219, 87, 85, 13, 58, 56, 52, -202, 92, 53,105,210, 68, 51,112,224,192,168,144,144, 16, 80, 74,177,120,241, 98,152,205,102,133,217,108,134,197, 98,129,217,108, - 70,121,121, 57,126,254,249,103,124,255,253,247, 49,142,142,142, 63, 52,108, 2,141, 7,143,156, 78,234,255,202,240,222,138, 67, -199,214,195, 98,228, 81, 97,112,134,206, 96, 66,185, 94, 6,147,178, 31, 8, 57, 1,134, 85,162, 91,112, 0,142,158,186, 97, 16, - 45,230, 67,141,116,246, 48, 26,141,200,203,203, 71, 81,197,111, 64,105, 6,220,205,229,168,184,125, 11,193,175,188,218,160, 25, - 98, 24,104,190,254,232, 21,112, 28,135,159, 99, 42,192,113, 28,120,254,193, 99,158,178, 44, 11, 39, 39, 39, 84, 84, 84, 0,128, - 77, 46, 75,175,215, 99,211,166, 77,136,140,140, 68,175, 94,189,144,153,153,137,148,148, 20, 12, 26, 52,168,102,157,164,164, 36, -156, 59,119, 14, 81, 81, 81,245,106,149,150,138,191, 22, 21,221, 28, 62,116,232, 80,121,108,108, 44, 40,165,104,221,218, 25,142, - 14,246, 32,140, 18,237,219,123, 0,184, 6, 66, 8,162,162,162, 96, 54,103,241, 58, 29,126,173, 79, 51, 33, 33, 97, 68,120,120, -120, 11,158,231,147, 58,117,234,196,229,228,228, 96,228,200,145,216,188,121,179,245,137, 6,179,103,207,190, 55, 50, 89, 81, 81, -175,193, 10, 13, 13, 13,158, 58,117,170,204, 90, 93,173,109,182,128, 55,155,205, 34, 0,180,235,220,243,127,227,199,245, 7,110, -222,188,137,165, 75,151, 66,167,211,129,101, 89,121, 3,231, 61, 37,132,228,165, 19,187,237, 63,239,220, 59,126,200,179, 67, 57, -139, 32,240, 29,253, 56,199,159,126,222,155,159,121,247,206, 42,220, 57,124,181,246,250, 13,232,153,178,179,179,237,213,106, 53, - 46, 94,188,104, 82,171,213,114, 47, 47, 47, 66, 41, 5,207,217,113, 34,131,235,160,244, 44, 17, 4, 57,203,114,163, 65,200, 9, -194,178,245, 30,119, 1,248,237,230,149,171,189, 90, 53,109,205,148, 31,187,140,210,144, 30, 40,215, 1,186, 10, 2, 65,166,134, -142, 83,162,162,101,107,148,187,121,129, 3,131,172,187,105, 22,158,210,195,210, 45, 68, 66,226, 31, 71,189, 30,228,254, 8, 86, -215,174, 93,127,170, 29,101,178,126, 6, 96, 4, 80, 95,155,232,252,218,145,170,218,134,234, 65,219,185, 79,247,225, 12, 22,165, -244, 56,234,169,138,243,245,245,237,254,238,187,239,118,126,243,205, 55, 81, 81, 81,129,239,190,251, 14,171, 86,173,130,175,175, -111,247,187,119,239,158,178,117, 99,205,155, 55,255,113,247,161, 67,211, 58,183,109,219,186,121,243,230,184,118,243, 38,228,102, - 51, 56,158, 7, 91, 89, 9,153,197,136,230, 97,118,144,171,220,145,157, 86,137,159, 46, 95,190, 67, 41,173,119,224, 69, 11,195, -192,212,191, 63,248,235,215,193,240, 60,228,189,123, 87,181,181,114,116, 4,179,107, 87,149,177, 18, 69, 96,238, 92, 80, 59, 59, -136,207, 60,211, 96, 58,115,115,115, 43, 91,181,106,117, 46, 57, 57, 57,180,109,219,182,152, 63,127, 62,238,222,189, 11, 74, 41, -242,242,242, 12,121,121,121, 89, 69, 69, 69,233, 12,195,236,206,204,204,252,214,150,145,194,115, 91, 51, 27, 15, 29, 58,252,110, - 88,112, 96,171, 62,189,230, 97,239,222,255,162,164,172, 12, 58, 35,135, 10,189, 25, 58, 3,133,214,161, 37, 34, 58,135, 32,191, -208,132,235,151, 19, 51,243,229, 46,141, 26,116,146, 16,130,164,164, 36, 52,115, 5,174, 92, 75,128,187,177, 16,109,157,237, 17, -210,189, 7, 82, 83, 83, 31, 24,245,250,157,201, 34, 0,207,243, 40, 43, 43, 67,183,182,109,145,155,155,139,194,194,194,123, 34, -132,174,174,174,208,104, 52, 72, 72, 72,192,201,147, 39, 45, 12,195,252,215,134,228, 89, 76, 38, 83, 77, 85,229,225,195,135,209, -187,119,111,244,236,217, 19,199,142, 29, 67, 66, 66, 2,206,157, 59, 7,134, 97,224,239,239,111, 29, 82,192, 82,151, 88,124,252, -133,237,142,142,228,189,113,227,222, 9, 28, 59,118, 44,126,254,249, 39,188,254, 90, 27, 16, 70, 9, 66,148,120,110, 72, 59,124, -248, 81, 2, 34, 34,162,224,238, 46,199,225, 95,200,149,199, 0, 0, 32, 0, 73, 68, 65, 84,195,151,211, 56,206,233,199,134,163, -181,226,210, 69,139, 22,113, 42,149, 10, 38,147, 9, 21, 21, 21, 53,251,191,112,225, 66,204,153, 83, 85, 99, 57,119,238, 92,204, -155, 55, 15, 6,131,161,222, 14, 14, 22,139,133, 50, 12, 67,238,222,189,107,214,104, 52,196,213,213,149, 83, 42,149, 48, 26,141, - 53, 70,235,230,205,155,216,187,119, 47, 50, 50, 50,224,234,234,202,184,184,184, 64, 16, 4,155,122,172, 20, 37,127,191,111, 55, -193,224,238, 93, 35,252, 59,249,121, 43,138, 11,243,176,125,247,254,171,230,148,159,247,163,170, 90,208,166,217,220, 41,165,139, - 98, 99, 99, 63,166,148,114, 26,141,102,255,197,139, 23,251,232,116, 58, 13,165, 20, 68, 72, 45, 99, 76, 17, 63, 11,132, 99, 40, -199, 14, 6, 65, 43,176,248,175, 92,161, 41,168,183,112,225,184,117, 31,108,220, 57,233,171, 53, 75,180,101,186, 82,232, 23,172, -133, 57,241, 10,204, 10,123, 20,126, 20,141, 74,147, 8,125,113, 5, 28,190,250, 18,106, 47, 47, 28, 43, 79,201, 43, 45, 43,251, - 74,186,215, 72, 72,252,227,162, 82,245,122,144,218,230,200, 90,244, 1, 72,139,142,142, 46,168,213, 22, 43, 31, 64, 18,128,160, -234,245,242,239,251, 95, 62,128,120, 0,225,181,116,242,107, 25,173,218,159, 77,247,173,147,244, 48,251, 69, 26,186,225, 90, 9, - 15, 15,175, 28, 61,122, 52,244,122, 61, 50, 50, 50,176,111,223, 62,100,101,101,105, 26,184,225,255,110,182,237,136,136,136, 0, - 23, 59,187,163, 83, 70,140,112, 81, 26,141,200,136,137,129, 57, 43, 11, 30, 45, 90, 64, 33,147,193,181,185, 55,202, 75, 13,248, -234,242,229,178,212,178,178, 62,247, 15, 52, 90, 91, 51, 42, 42, 74,105, 54,155,243,119,239,222,205,150,148,148,128,225,121,176, -195,135, 87, 69,173,156,156,192,110,216, 80, 85,165, 35, 8,192,178,101, 96,236,237,161,121,234, 41,244,154, 51, 7,137,137,137, -154,250,210,217,180,105,211,166,126,126,126,113,191,252,242,139,115,102,102, 38,158,123,238,185,164,178,178,178, 1, 5, 5, 5, - 21, 54,154,157,223,105,122, 4, 61, 31,224,226,232,116,116,220,184,113, 46, 26,165,128,115, 87, 46,225, 78,177, 39, 76,102, 30, -142,118, 10, 68,180, 85, 33,175,208,136, 95,247,239, 45, 49, 86, 22,245,187,127,160,209,218,154,161,161,161,149, 99,198,140,193, -193,131, 7, 97, 50,153,170,123,247, 85,249,145,127,253,235, 95, 56,115,252, 24,202,211,110,161,107,143, 40, 12,124,101, 28, 94, -127,253,117,196,198,198, 98,212,168, 81,184,114,229, 74,205,254,215,214,180, 78,149,195, 11, 12,242, 75, 21,194, 93, 93, 55,102, -250,244,233, 36,251,194, 44,232, 43,114, 96, 52, 26, 33, 87,185, 35, 71, 24,133,253,251,247,211,194,194,194,237, 50,153,108,126, -122,122,250,237,134,246,221,199,199,103,140,179,179,243,138, 62,125,250,168,170,163,132,184,120,241, 34, 40,165, 56,121,242, 36, - 0,192,207,207, 15,126,126,126,200,201,201, 65, 90, 90,154,222,108, 54,255, 43, 35, 35,227,199,186, 52,187,116,233,210,188,109, - 91,215,227,131, 7,143,112, 51,155, 45,232,251, 76, 57,120,190, 0,132,145,131,227, 60,113,242, 20, 65, 94,110, 17,206,196,196, - 20,223,186, 85,222, 47, 46, 46, 46,185,161,116,134,134,134,110, 25, 50,100,200, 96,149, 74,133,159,127,254,153,111,210,164, 9, -231,236,236,140, 13, 27, 54,212,105,106, 41,165,117,158, 75, 90,173, 54,122,214,172, 89,111,141, 28, 57,146, 21, 4, 65, 40, 46, - 46, 22, 0, 16, 47, 47, 47, 54, 38, 38,198,178,123,247,110,232,245,122,248,248,248, 48,132, 16, 18, 31, 31, 47,166,164,164,196, - 17, 66, 62,200,200,200,184, 84, 87, 58,171,191,175, 26, 96,212,173,159,103,179,182, 1,235, 22,126, 56,215,253, 63, 31, 47, 44, - 77,185,120,229, 53, 20, 30,204,175,101,174,232,253, 17,172,186, 52,107, 93,167, 33,162, 40,238, 23, 69, 81,205,113, 92,203,184, -184,184,188,208, 55,143,250, 11, 44, 29, 5,134, 38,243, 28,137,187,252,121,239,188,134, 52,195,195,195,195, 90, 54,111,182,239, -157, 41, 83,236,202,242,203, 80,244,254,199, 40, 55,139, 40,124,111, 54,140, 60,133,219,143,235,193,169, 29,112, 76, 94,166,203, -173, 40,253,221, 64,163, 13,165,243,161, 10, 61, 73, 83,210,148, 52,159, 72,205,191, 27, 54,205, 69, 88, 29,193,194, 91,111,189, -133,242,242,114,252,244,211, 79,248,245,215, 95, 27, 29,193, 2,128,184,184,184, 91, 17, 17, 17,253, 62,222,176,225,199,193,109, -219, 54,107,219,178,165,220, 53, 48, 16,106,141, 6, 37,133,133, 72, 74,203, 22,190,191,118,237,182,129,231, 95, 78, 76, 76,188, -106, 67,196, 1, 60,207,195,201,201, 9,148,231, 33,155, 53, 11, 32, 4,148,101, 97,172,186,249, 65,164, 20,178,174, 93, 65, 89, - 22,165, 21, 54,249, 35,100,102,102,102,250,250,250,142,153, 60,121,242, 47,223,125,247, 29, 19, 21, 21,213,121,247,238,221,244, - 81, 50, 59, 63,233,231, 91, 94,193, 67,251,173, 88,177,106, 83, 72,120,132,111,243, 22, 45,148,221,125,157, 96,182, 8,200,205, - 43,196,241, 51, 87,141,215,175,156,207, 0,111,120, 57,247,210,158,122,247, 93, 46,151,167, 57, 59, 59, 55,159, 55,111, 30,120, -158,135, 40,138,176, 88, 44,200,207,207,199,185,115,231, 16, 26,217, 21,237,198, 79, 64, 81, 81, 17,190,254,250,107,248,248,248, - 96,208,160, 65, 40, 41, 41,193,181,107,215,210, 30,164,249,225, 87, 66,147,218,203, 90,173, 54,120,252,248,241, 11,166,189, 80, -222,227,189,241,227, 64, 41, 69,244,218,245,248, 97,231,247,167, 0,242, 65,118,118,246,249,134,246, 57, 32, 32, 64, 97, 52, 26, - 59, 83, 74,185,146,146,146,149,197,197,197, 99, 63,248,224, 3,175,207, 62,251, 12, 79, 61,245, 20, 50, 50, 50,144,154,154,138, -182,109,219,162,180,180, 20,241,241,241, 66, 69, 69,197,122, 74,105,116, 78, 78, 78,189, 17,146,179,103,207,166,133,134,134, 62, -157,155,179,250,199,183,223,234, 23, 96,177,132, 41, 28,157,122,128, 82, 30, 37,197,119, 65,232, 5,243,142,157,191,165,150,151, -203, 95,180,117,170, 28,142,227,166,238,217,179, 7,168,158, 42, 39, 43, 43,235,178,181,106,249, 65, 17,172,134,200,202,202,154, -227,235,235,123, 96,197,138, 21,179,199,143, 31, 31, 49,114,228, 72, 25,203,178, 98,102,102, 38,255,227,143, 63,146,214,173, 91, - 51, 74,165,146,196,196,196,136,151, 47, 95,142,165,148, 46,202,204,204, 60,105,227, 83, 31, 37,132,224,237,145, 45, 34,210,210, - 82, 10, 62,157,222,183,147,159,171,235,213,222, 35,252,187,148,149,141, 62,178,121,243,230,202, 7,153, 43, 27,175,211,115, 97, - 97, 97,253, 9, 33, 11,116, 58, 93, 37, 0,136, 10, 83, 57,163,103,182, 17,150, 53, 39,173,236,109, 83,243,128,248,248,248,132, -240,240,240,193,179,102,206,218, 52,108,216, 11, 77,124, 95,123,137, 37, 23,174,193,172, 82, 64,121,253, 58, 24,123, 7,186,175, - 52, 53,183, 92,198,190, 24, 31, 31, 47,141,226, 46, 33, 33,241,183,193,230, 8,150, 86,171,173,244,243,243,131,171,171, 43,138, -138,138,112,231,206,157,135,138, 96, 89,185,127,178,103, 66, 41,161, 54, 76,246,124, 95, 4,139, 51, 26,141,169, 22,139,165, 81, - 99, 84,200,100,178,252,216,216,216,230,182,164,179,105,211,166,163,124,124,124, 62,202,204,204,220,149,145,145, 49,235,113,184, -123,235,100,207,224,228, 3, 65,197,142, 0, 8, 24,182,193,201,158,239,139, 96, 69,201,229,242, 47,204,102,115,243,251,215, 51, -155,205, 40, 44, 44,132,209, 88, 85,109,172, 80, 40,224,230,230, 6,133, 66, 1,150,101,211, 4, 65,152, 98,157,139,208,150,167, -144, 79,255, 37,171,156,254,250,120, 10, 0,139,191, 90, 71,110, 86, 82,215,111,191,165, 70, 91,246,253,246,237,219,173,236,237, -237, 71, 18, 66,134, 3,104, 93, 81, 81, 97,252,207,127,254,115,225,216,177, 99,229,173, 90,181,234,219,175, 95, 63,114,245,234, - 85, 92,186,116,137, 22, 20, 20,236,224, 56,110,254,221,187,119, 83, 27,149,159,132, 48,221,186, 5,143,116,176, 39, 3, 68, 42, -118,174,254,238,114, 69, 5,126,245,246,246,223,188,117,235, 86,225, 97,159,192,194,194,194,182, 87, 84, 84,244,191,126,253,250, - 67, 69,176,238,123, 80,233,161, 82,169,230,140, 29, 59,182,203,115,207, 61,199,196,197,197,225,196,137, 19, 66, 92, 92,220, 89, -139,197,178,240,238,221,187, 39, 27,147,206,121,243,230,177, 37, 37, 37, 61, 69, 81, 28,218,162, 69,139, 32, 47, 47, 47,135,220, -220,220,226,219,183,111,159,165,148,254,226,234,234, 26, 51,111,222,188,135,222,247,199,249, 68, 91,123,178,103, 78, 20, 59, 90, - 8,161,182, 76,246, 44, 69, 8, 36, 77, 73, 83,138, 96,253,237, 13, 86,117,134,254, 31,128, 15, 0,124, 66, 41, 93, 32,157, 40, -255, 12,205, 79, 38,147, 34,150,169,106, 56,200,139, 48,243, 87,225, 62,247, 24,229,109,209,108,222,188,185,210, 98,177, 4, 1, -104, 69, 8,113,162,148, 22, 91, 44,150, 67,121,121,121,121,222,222,222, 33, 0,172,173,198, 23,102,103,103,159,123, 18,243, 83, -171,213,158, 49,153, 76, 45,141, 70,163, 92,175,215,203, 40,165, 53,109, 5,212,106,117, 65,101,101,165, 95, 99, 52,171,141,214, -187,148, 82, 24,141,198,207,235, 50, 86,182,106, 78,158, 60,121,104,245, 58,254,132,144,107, 0,146, 43, 42, 42,142,110,216,176, - 65, 39,157,243,146,166,164, 41,105, 74, 6,235,175,129,107,204,202,213,166,106,129,148,109,255, 44, 62, 88, 73, 93, 31,246,191, -105,105,105, 70, 0,177,213,175,123,168, 54, 84, 35,159,244,253,207,202,202,234,246, 56,245,170, 13,213,201,199,165,183,114,229, -202, 93, 0,118, 73,103,170,132,132,132,196,147, 3, 35,101,129,132,132,132,132,132,132,132,196,227,133, 0,120,224, 16,215,141, - 9,253, 17, 66, 58, 54,118,195, 13,233, 75,154,146,166,164, 41,105, 74,154,146,166,164,249,247,211,108, 72,251,239, 82,245, 72, - 30,162,131,145,237,226, 82,253,180,164, 41,105, 74,154,146,166,164, 41,105, 74,154,255, 64,164, 42, 66, 9, 9, 9, 9, 9, 9, - 9, 9,201, 96, 73, 72, 72, 72, 72, 72, 72, 72, 72, 6, 75, 66, 66, 66, 66, 66, 66, 66, 66, 50, 88, 18, 18, 18, 18, 18, 18, 18, - 18, 18,146,193,146,144,144,144,144,144,144,144,120, 98,248, 67,123, 17, 74, 72, 72, 72, 72, 72, 72, 72,252, 19,145, 34, 88, 18, - 18, 18, 18, 18, 18, 18, 18,127,132,193, 34,132,208,218,239, 18, 18, 18, 18, 18, 18, 18, 18,127, 6,127, 87, 15, 34, 69,176, 36, - 36, 36, 36, 36, 36, 36, 36, 36,131, 37, 33, 33, 33, 33, 33, 33, 33,241,255,135,193,138,170, 14,205, 69, 73, 89, 34, 33, 33, 33, - 33, 33, 33,241, 39,242,183,244, 32, 53,189, 8, 9, 33,148, 82, 74,164,227, 44, 33, 33, 33, 33, 33, 33,241,167,154,145,191,161, - 7,145,134,105,144,144,144,144,144,144,144,144,120,204,252,161,109,176, 8, 33, 29, 37, 77, 73, 83,210,148, 52, 37, 77, 73, 83, -210,148, 52, 37,131, 37, 33, 33, 33, 33, 33, 33, 33, 33, 33, 25, 44, 9, 9, 9, 9, 9, 9, 9, 9,201, 96, 73, 72, 72, 72, 72, - 72, 72, 72, 72, 6, 75, 66, 66, 66, 66, 66, 66, 66, 66, 66, 50, 88, 18, 18, 18, 18, 18, 18, 18, 18,127, 17, 4,192, 3,123, 2, - 80, 74, 47,217, 44,242, 16,189, 9, 26,210,151, 52, 37, 77, 73, 83,210,148, 52, 37, 77, 73,243,239,167,217,144,118, 99,252,199, - 19,109,176,254,200,113,176, 8, 33, 29, 31,119, 70, 73,154,146,166,164, 41,105, 74,154,146,166,164,249,247,211,252,187, 33, 85, - 17, 74, 72, 72, 72, 72, 72, 72, 72, 72, 6,235,175,135, 16, 50,134, 16,178,139, 16, 18, 79, 8,217, 77, 8, 25,243, 8, 90,106, - 66,200,140, 90,122, 59, 9, 33,211, 8, 33, 74, 41,167,159,232,115,128,149,114,225, 47,205,127,226,227,227, 19, 16, 26, 26, 42, -251,163,182, 17, 26, 26, 42,243,245,245,245,255, 35,183,241, 56,209,106,181,109, 2, 3, 3, 19,181, 90,109, 27,233, 12,145,144, -248,235,225,234,250,161, 75,151, 46,215, 5, 65,240,105,140,152, 66,161,200, 56,115,230, 76,157, 23,119,120,120,248,117, 81, 20, -127,167, 41,147,201, 68,139,197,242, 64,179, 39,147,201,242, 99, 99, 99,155, 63, 65, 5,251,215, 46, 46, 46,150, 85,171, 86,173, - 13, 14, 14, 14, 40, 46, 46,214,189,249,230,155,125, 8, 33,189, 41,165,227, 27,169, 21, 72, 8, 89, 31, 30, 30,190,107,234,212, -169,219,219,180,105,227,160,215,235, 21, 91,182,108,105,178,122,245,234, 67,132,144,183, 40,165,201,210,105,250, 68,221,196,130, - 40,165,159,181,110,221, 58, 68,171,213, 38, 18, 66,166,101,102,102, 94,148,114,230, 79,203,127, 95, 0, 19,218,183,111,255, 98, -219,182,109,189, 83, 83, 83, 77,222,222,222,191, 80, 74,167,231,228,228, 20, 60,142,109,248,248,248,184,136,162,248,153,167,167, -231,144, 46, 93,186, 40, 82, 82, 82, 76, 90,173,118, 15,195, 48,211, 51, 50, 50,138,159, 84,115, 21, 17, 17,113,234,147, 79, 62, -113,155, 51,103,206, 41,173, 86,219, 61, 43, 43,235,186,116,198, 72, 52, 68,243,230,205,157,202,203,203, 87, 49, 12, 19,164, 82, -169,154, 56, 56, 56,192,222,222, 62, 87,169, 84, 94,112,114,114,122,123,231,206,157,165, 82, 46, 61,102,131, 69, 41,245,250,237, -183,223,224,232,232, 8, 65, 16, 32,138, 34, 68, 81, 4,165,180,230,189, 54,102,179, 25,253,251,247,247,170,111, 99,148, 82,239, -163, 71,143,194,193,193,225,158,255,117,237,218,149, 57,117,234, 20, 84, 42,213, 61,235,155, 76, 38,116,235,214,205,227, 9, 50, - 87,163,221,220,220, 76,119,238,164, 71, 24, 76,230,136,119,222,155,255,241,232, 33, 79, 59,198,196,196, 48,131, 7, 15,150, 17, - 66,198, 80, 74,127,180, 81, 75, 77, 8, 89,253,193, 7, 31, 44,149, 43,237, 61,182,238, 59,201,101,173,250, 33,163,115,160, 63, -121,119,202,219,154, 41, 83,166, 36,180,107,215,110, 13, 33,164, 47,165,212, 40,157,170, 79,196,241,231,124,125,125,183, 68, 71, - 71,107,115,179,179,177,116,217,178, 46,162, 40,126,142,191,217, 12,240, 79,114,254,251,248,248,108,137,142,142,238,248,194, 11, - 47,128,101, 89, 24, 12, 6,197,246,237,219,135,127,252,241,199, 79,249,248,248,132, 60,170, 1, 10, 8, 8,112, 80, 42,149,241, -209,209,209, 94, 35, 70,140, 0, 0, 84, 86, 86, 42,182,110,221, 58,242,147, 79, 62,121, 42, 32, 32, 32,248,214,173, 91,229,143, -176, 15,140,155,155,219, 84, 0, 79,139,162,168, 4, 16, 87, 92, 92,252, 49,165,212,252, 40,233,118,113,113,217,184,100,201, 18, - 55,165, 82,137,111,191,253,214,237,133, 23, 94, 56,169,213,106,123, 72, 38, 75,162, 62, 60, 60, 60,198,149,149,149, 45,211,104, - 52,114,103,103,103,168,213,106,200,229,114, 40, 20, 10, 95, 23, 23, 23, 95,123,123,251,254, 47,189,244,210,180, 77,155, 54,109, -144,114,235, 49, 26, 44, 0,208,104, 52,248,233,167,159,192,113, 28,228,114, 57,100, 50, 25,100, 50, 25, 20, 10, 5, 56,142,171, - 89,150,203,229,240,241,177, 61,216,181,123,247,110, 56, 57, 57,193,209,209, 17,237,219,183, 7, 0, 40,149, 74, 28, 62,124, 24, -114,185,188, 70, 59, 44, 44,236, 79,207,144, 81,125, 72, 37, 0,108,253,188, 93,213,242,187, 85, 1,164,173,159,183,195,224,158, -118,120,118,204,130,151, 42, 77,150,167,168, 72, 12,217, 69, 98,209,130,101,107,175, 6, 5,182, 37, 91,183,110, 13,118,119,119, -127, 1,192,143, 54,110,234,157, 46, 93,186,236, 19, 24,149,231, 43,227, 94, 27,251, 26, 67,248,225,227,102,124,114, 58,233,122, -201,250,192,144,205, 5, 5,153, 19, 86,172, 88,113,115,210,164, 73,111, 3, 88,102,107,250,107, 71, 9, 89,150, 45, 84,171,213, -254,199,142, 29,227,159,128,155,163, 55,128, 5, 0,120, 0, 75, 41,165,215,107,253,214, 74, 46,151, 47, 48,155,205,197, 0, 62, -166,148,102, 60,137, 23,139,143,143, 79,155,151, 95,126,217,173, 48, 63, 31, 75,151, 45,179,166, 61,132, 16,194, 82, 74,133, 63, - 51, 45,225,225,225, 45, 20, 10,197, 2, 0, 65, 70,163, 81, 91,125,189,102,137,162,184, 91,175,215,207, 79, 76, 76,212, 63,228, -113,242, 1,208, 30, 85, 61,140, 31,248,156, 20, 29, 29,125,115,246,236,217,183,255,108, 77,173, 86,251,175,167,159,126,186,227, -152, 49, 99,112,232,208, 33, 28, 61,122, 20, 65, 65, 65,232,219,183, 47,238,220,185,227,177,102,205,154, 49, 0, 86, 62, 74,190, - 26,141,198, 81,211,166, 77,243, 26, 49, 98, 4,246,236,217,131,163, 71,143,162, 91,183,110, 24, 52,104, 16,210,210,210,188, 54, -108,216, 48, 10,192,250, 70,230,169, 18,192, 84, 0, 79,179, 44,219, 99,220,184,113,252,148, 41, 83,100, 12,195, 88, 62,255,252, -115,143,245,235,215,143,118,119,119, 15, 41, 40, 40,168,120,216,116, 23, 23, 23,127,252,209, 71, 31,125,183,114,229, 74,135,148, -148, 20,204,159, 63,223,125,242,228,201,199,181, 90,109, 47,201,100,213, 13,203,178,165,162, 40,202, 0,184, 82, 74,141, 13, 45, -255,157,246,221,221,221,253,141,162,162,162,207,181, 90, 45, 60, 60, 60, 64, 72,213,229, 41,138, 34,116, 58, 29,244,122, 61,252, -253,253,229,237,219,183,255,114,210,164, 73,178, 47,191,252,242, 43,233,140,105,100,121, 10,160, 23,165,244,120,173,194,160, 23, -165,244,120,120,120,120,217,169, 83,167,184,189,123,247,130,101,217, 26, 35, 85,219, 84, 89, 63,203,100, 50,120,121,121,161, 79, -159, 62,252,217,179,103, 29,235,218, 88,104,104,104,197,238,221,187,153,148,148, 20, 56, 58, 58,194,201,201, 9,222,222,222,232, -218,181, 43, 98, 98, 98, 16, 27, 27,123,143,113,235,208,161, 3, 34, 34, 34,144,152,152,168,249,211,114,228,106,251, 74,180,191, -170,169,163,160,188,112,245,234,213,175, 23,172, 59, 92,150, 87, 84,154,223,202, 89, 94, 57,166,123, 27,141,127, 83, 55,165, 87, -100,247,207, 9, 33,249,148,210,112, 27, 11,221,157,223,127,255,253,142, 45,135,174,217,125,245,217,251, 19, 57,134,240,239,205, -253,236,227,166,142, 44,223,132,229,117, 97, 3, 7, 58,118,232,208, 97,130,157,157,157, 64, 41, 29,102,107,242,195,194,194,202, -126,253,245, 87,142,227, 56,244,233,211, 71,208,104, 52, 30,199,142, 29,251,203, 11, 6, 66,200,242,220,220,220, 9, 6,131, 1, - 97, 97, 97,229,133,133,133, 3, 40,165, 23, 8, 33, 29,134, 14, 29,122,120,235,214,173,246,231,206,157, 67,100,100,228,118, 74, -233, 43, 79,210, 69,162,213,106,247, 0,232,205,178, 44, 70,143, 26,101,250,105,203, 22,133, 40,138, 85,206,128,210,248,236,236, -236, 63, 53,130, 21, 26, 26,218, 70,165, 82, 29, 93,186,116,169, 67, 96, 96, 32,145,201,100,224,121, 30, 55,110,220,192,198,141, - 27, 13,103,207,158,205, 52, 24, 12, 97,137,137,137,150,135, 56, 78,253,143, 31, 63, 94, 25, 16, 16,240, 64,195,168,211,233,216, - 86,173, 90,249, 3,216,240,103,107, 54,109,218,180,169, 40,138,203,163,162,162,250,159, 56,113,226, 10,128,143, 40,165,239,110, -220,184, 49,210,206,206, 14,207, 63,255,124,114,122,122,250, 35, 61,149,249,250,250,158,140,141,141, 13, 41, 47, 47, 71,239,222, -189, 19, 57,142,251, 15,207,243, 31,109,219,182, 45,148, 97, 24,188,240,194, 11,231,238,222,189,219,163, 17,251, 30,168, 84, 42, - 55,252,248,227,143,246, 45, 91,182,108, 41,151,203,153,150, 45, 91,162,168,168, 8, 6,131, 1,158,158,158, 88,176, 96, 65,210, -242,229,203,211,202,203,203, 71, 60,228,249,217,166, 75,151, 46,167, 62,252,240, 67,183,171, 87,175,162,117,235,214,200,207,207, - 71,106,106, 42, 86,172, 88,145, 91, 94, 94, 30,245, 87,153, 44, 66, 72, 14, 0, 7, 0,222,148,210,178,199,164,167,176, 46,203, -100, 50, 40,149, 74, 40,149, 74,168,213,106,164,166,166,238, 98, 89,246, 77, 0, 54,157,251, 28,199,149, 9,130,192, 1,120, 26, - 64, 2,203,178, 37,245, 45, 83, 74,197, 39,160, 44,109,202, 48,204,167,148,210, 94, 0, 24, 66,200, 73, 79, 79,207,153,217,217, -217,233,182,106, 52,109,218,212,181,160,160, 32,213,195,195, 67,230,233,233,105, 53,155, 8, 11, 11,131,193, 96,192,229,203,151, - 97, 45,227, 66, 67, 67,209,169, 83, 39, 75,105,105,169,255,156, 57,115,138,254,128,253,121,160, 7,249, 59, 24, 44, 6,192, 49, -235, 78, 85,127,119,204,250,163, 32, 8,247,152,168,218,175,218, 70, 72, 38,147,129, 97,108,106, 47, 79, 76, 38, 83,141,185,114, -116,116,132, 76, 86,213,126,148,231,249,223,105, 10,194,195, 7, 5, 92, 92, 92,118, 19, 66,158,121,204,249,149,146,159,159,111, - 30,210,163,181, 82, 86,150, 95,244,202, 83,173,156, 58, 5, 52, 13,244,244,105, 54, 66,167,211, 37, 2,200,105, 76,185,216,190, -125,123,135,130,188,156,194,151,254,181, 56,122,230, 39,171, 23,134,183,106,234,208,163,109, 11,175,110,157,219, 53,119,183, 88, - 24,141, 70,211, 30,128,182,177,137,116,114,114,194,145, 35, 71,158,180,115,205, 89,175,215,163,168,168, 8,107,214,172,113,112, -115,115, 59, 64, 8,121,105,232,208,161,191,109,219,182,205,190,180,180, 20,102,179, 25, 0, 12, 79,224,117,178,208,197,197,197, - 52,108,216, 48,252,184,121,179, 66, 20, 69, 29, 0, 29,128, 28, 66,200,244, 63, 59, 49, 74,165,242,221,143, 63,254,216, 33, 48, - 48,144, 20, 20, 20, 32, 43, 43, 11, 5, 5, 5,112,119,119,199,123,239,189,167,106,213,170,149, 86,169, 84,206,124,216,242,174, - 46, 35, 4, 0,118,118,118, 2, 26,223, 57,230,129,154, 60,207,147,200,200,200,105,157, 59,119,254,202, 22,205,204,204,204,204, -236,236,236, 17, 39, 78,156, 24, 39, 8,194,107,153,153,153,251, 0, 44,223,189,123, 55,156,157,157,209,190,125,251,118, 62, 62, - 62, 1,143, 96,164,125,194,194,194, 66,188,189,189,177,117,235, 86, 48, 12,179,242,238,221,187, 39, 25,134, 89,185,103,207, 30, -120,120,120,160, 93,187,118, 33, 90,173,214,166,112, 61, 33, 68,169, 84, 42, 55,220,188,121,179,237,144, 33, 67, 90,149,149,149, - 49, 90,173, 22,214, 99,150,158,158,142, 11, 23, 46, 96,252,248,241,158,130, 32,116,179,213, 76,245,234,213,235,238,200,145, 35, - 11,159,127,254,249,194, 17, 35, 70, 20, 14, 30, 60,248,236,183,223,126,235,102, 45, 71,231,204,153,131,148,148, 20, 56, 59, 59, -227,181,215, 94,107,162, 86,171, 55, 62, 1,215, 80,182, 76, 38,171,116,113,113,113,124, 68, 29,133,245,197,113,156, 66,161, 80, - 40, 84, 42,149, 66,165, 82, 41,148, 74,165,226,111, 31, 17, 33, 68, 75, 8, 73,228, 56,110,128,179,179,179,163,171,171,171,189, -175,175,111,159,150, 45, 91,198,191,246,218,107,126,182,234,232,245,250,245,106,181, 90,230,225, 81,213, 2,167, 95,191,126,216, -184,113, 35, 70,143, 30, 45,246,235,215, 79, 28, 53,106, 20,154, 52,105, 2, 0, 72, 74, 74,130, 66,161,144,217,219,219,175,255, -131,118,171, 78, 15,242,255, 59,220,125, 59,121, 79, 8, 95, 20,197,154,232,213,131, 76, 85,237,151,173, 8,130, 0, 47, 47, 47, -104, 52, 26,104, 52,154,123,182,117,191,230,163,140,209,213,170, 85,171, 94, 26,141,166, 27, 33,100, 20,165,244,168,173,255, 27, -245,110, 50,182, 30,174,243,231,189,239,190,251,110,255,152,152, 24, 99, 68,199,150,162, 42,235,110,145,198,197,163, 35,227,238, -209,123,210,196, 55,227, 0,108,105, 76,129,163,215,235, 21, 45,188, 89,125,102,105,133,169,133,157,147,115,115, 7,181,166,133, -135,147,171,179, 74,201,216, 53,245,244,182, 88, 44,165, 0,178, 27, 18,170, 93, 45,168, 82,169, 76,132, 16,206,217,217, 25, 78, - 78, 78,230,226,226,226,162,208,208, 80, 40, 20,138, 66,185, 92,110,115,117, 97,151, 46, 93,210, 4, 65,168,183,253,155, 92, 46, -207,143,137,137,177,181, 3,194,252,160,160,160, 30,171, 86,173,114,111,221,186, 53,214,172, 89,227,176,109,219,182,117, 27, 55, -110, 68, 73, 73, 9,110,223,190,141,215, 95,127,189, 28,141,168, 14,253,179,112,117,117, 61, 60,114,228, 72,172, 95,191,158, 82, - 74, 9, 0, 59,134, 97, 34, 28, 29, 29,111, 92,185,114,197,252, 23, 20,178,125,218,182,109, 75, 74, 75, 75, 65, 41, 5,203,178, -247,188,102,206,156,169, 30, 63,126,252,172,110,221,186,189, 43,147,201,202,121,158,223, 86, 89, 89,185, 40, 41, 41,233,137,106, -172,218,179,103,207,201,119,239,222, 29,232,231,231,247, 75, 99,254,151,153,153,185,205,250,153, 82,122, 41, 39,167,234,185, 70, -173, 86, 3,128,234, 17,242, 85,229,228,228, 4, 0,184,123,247, 46, 0, 88, 59, 47, 92,204,202,202, 2, 0,216,219,219,131, 16, - 98,235, 54,166,110,221,186,213,193,219,219, 91,173,215,235,145,146,146,130,208,208, 80,148,151,151, 67,167,211,161,178,178, 18, -102,179, 25,165,165,165,206,130, 32,152,108, 60, 23, 55,126,249,229,151, 62,237,218,181, 3,207,243,176, 88, 44,160,148,226,248, -241,227,208,233,116,176, 88, 44,104,219,182, 45, 22, 46, 92,104,152, 52,105,146,106,203,150, 45,121,122,189,126,236, 95,125,172, - 89,150,133, 82,169, 4,199,113,217,205,154, 53, 3,195, 48,174,105,105,105, 15, 19, 89,247, 2,144,195,113,156, 66,169, 84, 66, -165, 82,193,250,126,249,242,229,109,141,137, 94, 85,159, 63,180, 49,203,127,121, 68,132, 97, 62,229, 56, 78,225,230,230, 38,183, -126,103, 54,155,229, 46, 46, 46,240,245,245,253, 12,192,112, 27,165, 58,187,187,187,131, 16, 2,185, 92,142, 55,222,120, 3,241, -241,241,187,239,222,189,251, 70, 94, 94, 30, 42, 42, 42,190,114,116,116,124, 46, 47, 47, 15,130, 32, 32, 45, 45, 13, 65, 65, 65, -157,255,224,221,251,157, 7,249, 91, 24, 44,171,115,172,229, 32,235, 52, 61,181, 77, 86,237,207, 54, 94,100,226,139, 47,190,248, -192,238,237, 60,207,223,211,254,234, 81, 13,150, 82,169,196,160, 65,131, 84, 26,141,102,115,181,201,122,232,144, 99, 59,111, 85, - 51, 14,178,239,158,237,221,179,243,196,119,223,147,245,238,221,251,151,157, 59,119, 6,121,244,124,122,192,137,223, 54,123,174, -157,189,231,151,159,126,250,169,194,214, 6,238,213,196,108,223,190,221,235,189, 41,111,203,163,162,162,118,142, 11,154,193,105, -149,130,189,179, 66,206,218,177, 44,163,244,105,222,247,183,227, 39,114, 0,156,178,161,144,240, 58,124,248, 48,156,157,157, 1, - 64, 97, 50,153,224,236,236,140, 53,107,214,168, 28, 29, 29,225,232,232,136,110,221,186, 57,203,229,114, 14, 85,109,160,108, 49, -194, 30,199,143, 31,135,157,157, 29,116, 58, 29,140, 70, 35,120,158, 7,165, 20, 28,199, 65,165, 82,161, 87,175, 94, 30,141, 40, -200, 82, 9, 33,125,223,121,231,157, 67,171, 86,173,114, 15, 8, 8,192,252,249,243, 81, 88, 88,136,244,244,116,140, 29, 59,182, - 60, 53, 53,117, 64,237,182, 89, 79, 2,157, 58,117,170, 60,125,250, 52,246,239,223,143, 33, 67,134,144,221,187,119,155, 5, 65, -144,103,100,100, 92,254,171,210, 36, 8,130,189, 66,161,128,197, 98, 1,199,113, 96, 89,182,230,157,101, 89, 52,109,218, 20,135, - 14, 29,226, 42, 43, 43,185,194,194, 66,205,215, 95,127,253, 86, 66, 66, 66, 19, 0,175,253,149,121,185,102,205, 26,223, 9, 19, - 38,100,112, 28, 71, 7, 14, 28,248,226,157, 59,119,134,120,123,123, 31, 59,114,228,200, 10, 0,173, 26,171,215,173, 91,183, 52, - 79, 79, 79,143,188,188, 60,252,240,195, 15,200,203,203,131,155,155, 91,108,104,104,232,189,133, 28,199,229,199,197,197, 53,248, - 32,224,227,227,115, 56, 59, 59, 27, 43, 87,174, 68,118,118, 54, 60, 60, 60,146, 66, 67, 67,225,225,225,129,188,188, 60,108,218, -180, 9, 69, 69, 69,240,246,246, 62, 12,160,153, 13, 73,140,138,136,136,240, 43, 41, 41,129,147,147, 19, 42, 42, 42,144,144,144, -128,192,192, 64,100,101,101,129, 97, 24, 56, 59, 59, 99,245,234,213,149,132, 16,155,170, 94,138,138,138,198,190,242,202, 43,199, -246,236,217,211,196,203,203, 11,249,249,249,208,235,245,240,243,243,195,138, 21, 43,208,172, 89, 51, 28, 62,124,184, 72, 16,132, - 9,235,215,175,255,183, 94,175, 31,251, 87,183,193, 98, 24,166,166, 26,175,150, 41, 42,138,140,140,196,233,211,167,183, 52,198, - 20, 81, 74, 77,214,106, 65,149, 74, 85,243, 82, 42,149, 96, 24, 70,124,136,107,201,137, 16,210,217,122, 99,111,104,249,175,134, - 82,218,195,206,206, 78,126,255,247,197,197,197,242, 54,109,218,116,179, 85, 71,165, 82,185, 86, 63,144,160, 87,175, 94,200,203, -203, 19,252,253,253, 95, 29, 53,106,148, 5, 0,222,124,243,205, 87,243,242,242,138, 44, 22, 11,203,113, 28,242,243,243,209,178, -101, 75,215, 63,240,161,241,129, 30,228,255,123,131, 69, 41, 37,132, 16, 90,251,189,214,193,108, 48,114,101,253,205,150, 42, 66, - 81, 20,105, 29,189, 8,107,204,220,227, 52, 88,206,206,206, 24, 51,102,140, 38, 51, 51,115,157,173, 5,184,181,113,123,109,115, -165,117,107,114,100,209, 39,243,189,110,237,255, 6, 95, 45, 95,204,199,197,197,237,246,242,242, 26, 6,160,220,203, 13,158, 57, -133,216, 65, 41,221,220,136,147,137, 1,240,115,108,108,108, 76,255,254,253,227,110,223,190,237,156,122,243,102,140,131,190, 84, -231,224,215,146,151,123,120, 62,171, 55, 91,184,231,159,127, 94, 9, 96,181, 13,122, 16, 69, 17,251,246,237,131,131,131, 3, 28, - 29, 29,225,236,236, 12,171,185,122, 88, 82, 82, 82,144,145,145, 1, 59, 59, 59,216,217,217,193,222,222, 30,246,246,246, 80, 40, - 20,214,104, 65, 99, 11,135,155,132,144,153,219,183,111,223,240,201, 39,159,160,164,164, 4,149,149,149,152, 59,119, 46, 82, 82, - 82,102, 82, 74, 47, 60, 73, 23, 71,231,206,157, 43, 99, 98, 98,112,234,212, 41,232,116, 58,172, 92,185, 18,222,222,222,131, 0, -204,254, 43,211, 37, 8,130,156,101, 89, 48, 12, 3,134, 97,126, 23,193,178,154, 45,181, 90, 13,119,119,119,204,153, 51, 71, 62, -116,232,208,129,127,101,154, 63,253,244,211,150,203,151, 47, 95,189, 97,195,134,131, 47,191,252,242,207,151, 46, 93,122,217,209, -209,241,242,225,195,135, 23, 41,149,202,135,106,215, 98, 50,153, 60,146,146,146,254, 23, 34,157, 63, 31,130, 32, 64, 16,132,154, -232, 78,101,101, 37,134, 12, 25, 98,211,131,128,197, 98,113, 59,112,224, 0, 0, 96,202,148, 41, 53, 15,153,181,245, 38, 78,156, -136,193,131, 7,187,217,152, 68,173,139,139,139, 44, 61, 61, 29, 60,207, 35, 36, 36, 4,171, 87,175,198, 11, 47,188,128, 14, 29, - 58,160,188,188, 28, 87,174, 92,193,134, 13, 27, 92,228,114,249,243,182, 8,102,101,101, 93,215,106,181, 81,131, 6, 13, 58,185, - 99,199, 14,247,102,205,154,225,194,133, 11,200,206,206, 70,135, 14, 29,176,112,225, 66, 29,165,244,169,106, 83,181,235, 9,136, -184,220, 99,132,212,106,245, 61,230,232, 97,224,121,222, 75,169, 84,230, 84, 87, 13, 66,169, 84, 34, 33, 33,161,209,209,171, 90, -229,210,133,198, 44,255,149, 88,203, 97,139,197,242,187,239, 91,183,110,109,179,142,189,189, 61,177,222, 99, 45, 22, 11,178,179, -179,133, 75,151, 46, 9, 33, 33, 33, 0, 0,111,111,111, 33, 54, 54, 86, 48, 26,141,172,245,126,237,228,228,244,135,152,204,250, - 60,200,223, 34,130, 5,224,196,125,239, 53,133,139,213,240,212, 21,185,178, 46,219,216, 6, 11, 28,199, 97,251,246,237, 53,237, -176, 58,119,238, 92, 99,230,238,215,181,246,106,120, 24, 20, 10, 5,156,156,156,112,240,224, 65, 67, 82, 82,210,164,135,141, 92, -105,221,154, 28, 89,186, 56,218,171,240,106, 12, 50,178,114,113,243,114,198, 17, 74,233, 38, 0,155, 0, 88, 27,197,219,108,174, - 2, 61,237, 58, 69,182,246,218,242,116,223, 1,218, 97,175,190,195, 76,154, 52, 41,226,213, 87, 95, 45,126,245,213, 87,223, 86, -169, 84,129,130, 32, 20,255,118,252,120,250,243,207, 63,239, 90, 86, 86, 54,145, 82,170,183,161, 16,203,233,215,175,159, 15, 0, - 56, 56, 56,152,190,249,230, 27,133,179,179, 51, 94,122,233, 37, 67, 78, 78,142,170, 58, 63, 74,108,141, 94, 89,159,250, 39, 76, -152,224,209, 64, 30,231, 55,242, 41,165,243,179,207, 62,187,114,243,230,205, 40, 44, 44, 68,101,101, 37,228,114, 57, 22, 47, 94, -140,187,119,239, 46, 33,132, 92,121, 82, 10,179,160,160,160,202,184,184, 56, 92,188,120, 17, 70,163, 17,111,188,241, 6, 40,165, -214, 58,237, 33,127,113,242, 72, 70, 70, 6,126,248,225, 7, 8,130,128,177, 99,199,162,121,243,230, 53, 6, 43, 39, 39, 7,223, -124,243, 13, 4, 65,192,132, 9, 19,208,172, 89, 51, 88, 44, 22, 85, 84, 84, 20,247, 87,245, 40,157, 62,125,122,234,142, 29, 59, - 14,102,100,100,244, 91,180,104, 81,119, 66,136, 56,115,230,204,165, 78, 78, 78,143,212,251,178,184,180, 28,215,110,222, 1,207, -243, 15,124,121,184,187, 54, 90,239, 70, 74, 58,120,190,202, 84,241, 2, 15,129,231,171,151, 45,112,115,109,148, 94,102, 81, 81, - 81,107,150,253,127,237,157,121, 92, 84, 85,255,199, 63,231,222,185,115,103, 31, 96, 8, 17, 68, 81,220, 23, 52, 89, 21,125,244, -209, 52, 82,212,204,210, 39, 31, 75,109,251,169, 61, 46,143,230,146,102, 18, 21,104,174,105, 41, 60,105,101, 90,102,155,230,174, -165, 86,138, 32, 66,106, 41, 34, 18,200, 42,187, 16, 12,179,221,153,243,251,131, 37, 52,209, 25,212, 28,237,190, 95, 47, 94, 51, -115,239,240,153,115,207, 61,247,220,207,253,158,141,149,166,167,167,195,215,215, 23, 33, 33, 33,136,142,142, 70,113,113, 49, 4, - 65, 64,139, 22, 45,108, 22,139, 37,197,100, 50,253,104,175,104, 65, 65,129,190,125,251,246,134,231,158,123,142,190,247,222,123, - 68,171,213,226,210,165, 75,144, 72, 36,208,104, 52,250,212,212, 84,167,137, 2, 55,142, 92,201,100, 50,240, 60, 15,153, 76, 86, - 31,185, 34, 0,246, 2,112,200, 96, 83, 74, 77,173, 91,183,110,136, 92, 53, 55,122,117,183,184,155, 35, 19,187,116,233,242,147, - 90,173, 30,118,225,194,133,107,162, 88,227,199,143, 55,119,232,208, 33,222, 94, 29,141, 70,115,149,231,121,157,193, 96,192,137, - 19, 39,208,181,107, 87,105, 69, 69, 69, 20, 33,100,113,221,195,101, 84, 97, 97,161,180, 85,171, 86,245,191,139,138,138,138,171, -173, 91,183,190, 91,217,118, 67, 15,242, 64, 24,172,186,209, 8, 13,175,215, 71,176,110,213, 60,104,111, 4,139, 16,130,170,170, - 42,168,213,106,212, 77,102,134, 70,163,177,254,212, 68,120, 59, 6, 75, 46,151,227,200,145, 35,134,184,184,184, 9,148,210,239, -236,253,191,198,125,176, 60, 31,242,216,185,242,157, 90,115,117,230,216, 33,124,113,250, 74, 62, 97,108,255,109,110,154,122,180, - 80,249,123,122,184, 31, 88,181, 98,169, 38, 47,113, 31,182,199,173,162,103, 78,158,236,127,242,228,201,209,211,166, 77,115, 67, -109,127,171,124, 0,241, 0,214,219, 99,174, 0, 32, 49, 49,177, 97,114,215,144,144,144, 74,173, 86, 11,181, 90,141,226,226, 98, -169, 90,173,214, 53,103, 20,161, 61, 77, 42, 14,154,171,142, 35, 71,142, 60,248,213, 87, 95,169,174, 94,189,138,172,172, 44,204, -155, 55, 15,239,191,255, 62,180, 90, 45,118,239,222,173, 30, 49, 98,196, 1, 66,200,160,123, 61,185,106,239,222,189,245, 73, 73, - 73,200,204,204,132, 32, 8, 24, 61,122,116, 99,115,117,207,177,217,108,116,214,172, 89,248,224,131, 15,192, 48, 12, 38, 78,156, -136,202,202, 63, 6,104,233,116,186, 27,237, 99,235,174,247,123, 98,176, 36, 18, 9,253,225,135, 31, 86, 13, 28, 56, 16,185,185, -185,143, 6, 5, 5,109,152, 60,121,114,254,237,234,186,185,104,240,112,247,246, 48, 26,141, 48, 26,141,240,246,246, 70, 85, 85, - 21,210,211,211, 97, 52, 26,225,217,194,213, 97,189,222, 61, 58,194,100, 50,193,104, 52,162, 69,139, 22,168,174,174, 70,102,102, - 38,140, 70, 35, 60, 60,220, 28,145,251,225,216,177, 99,190, 67,134, 12,233,114,238,220, 57,252,248,227,143, 48,153, 76,232,221, -187, 55, 46, 94,188,136,190,125,251,162,178,178, 50, 49, 41, 41,233, 91, 7,174,163,214,225,225,225, 71, 62,253,244, 83,247,173, - 91,183,154, 38, 77,154,196, 71, 71, 71, 19, 66, 8,170,171,171,225,100, 93,134,254,100,176,146,147,147,191,228, 56,142, 2,104, - 86,180,169,158,156,156, 28,183,158, 61,123,150,203,100, 50, 62, 62, 62,126,123,115,163, 87,119,229,233,231,143, 27, 87, 79, 66, -200,169, 58, 35,217,228,103, 71, 70, 38,118,238,220,121,158,151,151,215,224,128,128, 0,156, 63,127, 94, 42,147,201,240,204, 51, -207,152, 35, 34, 34,204, 44,203,218, 61,224, 70, 46,151,167,106, 52,154,254, 70,163, 17, 38,147, 9,223,127,255, 61,220,220,220, -254, 59, 98,196,136,105, 5, 5, 5,200,207,207,231,235,140, 43, 24,134,193,160, 65,131, 80,213, 69, 54,191, 0, 0, 29,173, 73, - 68, 65, 84, 86, 86,118,215,234,229,166, 60,200,131, 18,193,106,234,160,237,106, 30,116,196, 12, 25, 12,134,134,166, 38,141, 70, -211, 96,204, 8, 33,127,210,180, 55, 42,118, 35, 82, 82, 82, 18, 50, 50, 50,214, 82, 74, 15, 52,231,255, 59,121,186,180, 11,108, -163,233,152,159,184, 23, 23,206,156,194,231, 41, 87,242,171, 5,243,144,212, 2, 67,118, 83,134,236,166,209, 48, 79,117,119,111, - 15,247, 3, 43, 87, 44,213,148,158, 63,129,244,179,167,176, 55, 49,239,103, 35,165,151, 0,188,115, 39, 79,106,115,154,239,238, - 54,114,185,252, 63, 95,126,249,165,234,234,213,171,200,200,200,192,132, 9, 19, 42,178,178,178,102, 61,241,196, 19,171,247,237, -219,231,170,211,233,112,240,224, 65,117,235,214,173,163, 0, 60,121, 15, 43, 71,189,213,106, 69,105,105, 41, 0,160, 95,191,126, - 78,101,174, 0,224,212,169, 83, 46, 35, 71,142,220, 11, 96,224,249,243,231, 97,179,217, 18,146,147,147, 27, 70,204,222,108,159, - 61,254, 77,175,215, 75,148, 74,165,208, 68,217,226, 28,141, 56, 52,214, 60,126,252,248,202,149, 43, 87,126, 59,103,206,156,140, -219,212,188, 97, 4,107,196,136, 17,168, 49,152,145, 91, 88, 1, 65, 16,160, 55, 21,222, 86, 4,171, 86,207,132,236,130,114, 8, -130, 5, 85, 6,135, 2,110,107,199,143, 31,255,212,241,227,199,203,186,116,233,162, 75, 74, 74, 66, 81, 81, 17, 44, 22, 11, 6, - 15, 30, 12,153, 76,118, 57, 38, 38, 70, 10, 96,173,157,101, 83, 57,116,232,208, 3,219,182,109,107, 25, 31, 31, 15,147,201,100, -203,205,205,205,156, 61,123,182,230, 63,255,249,207, 67, 44,235,124,171, 55,213, 71,172, 82, 83, 83,235,141,213, 75,119,202, 8, -213, 71,176,254, 78,108,222,188, 57,127,227,198,141,129, 62, 62, 62,239, 60,251,236,179, 3,189,189,189, 25,158,231,127, 98, 89, -118, 46, 0,187,167,105, 80, 40, 20, 83,220,220,220,126, 97, 89,150,205,203,203,195,197,139, 23,193,178, 44, 40,165,124, 77, 77, - 13, 60, 61, 61, 81, 95,158,198,143, 31, 15, 31, 31, 31,107,106,106,234, 20,136,220, 57,131, 5, 0,111,190,249, 38,118,253,246, - 27, 70,250,249,221,244,123, 95,127,253,245,141, 42,132, 63,173,182,109,177, 88, 16, 19, 19,211,240,249,219,111,191,109, 48, 88, -211,166, 77,187,230,255,119,236,216, 97,151,230,141,184,116,233, 82,184, 3, 55,213, 6,205,250, 62, 88, 23, 11, 43, 50,123,121, -107,143,127,252,237,247,253, 50,203, 12,153,122,193, 28,113,189,185,178, 87,179,135,151,186,139,183,135,238,224,202,229, 75,181, -245,209,176,109, 41, 5,149,196, 74,167, 59,120,243,191,229,177,115, 28,119, 37, 44, 44,204,167,174,114,187,101,179,224, 95,181, -202,186,193, 96, 64, 66, 66, 2, 0,224,249,231,159,175,200,202,202, 26, 74, 41, 61, 79, 8, 73, 29, 62,124,248,193,189,123,247, -214,135, 26,202,238,101, 58,129,218,145,174, 18,137, 4,157, 59,119,118,216, 92,253, 85,233, 44, 44, 44,156, 62,101,202,148,117, - 70,163,145, 53, 24, 12,211,237,221,119,171,116,126,254,249,231, 25, 29, 58,116,232,143,166,167, 77,176, 1, 72,188, 29,205,119, -223,125, 23, 0, 58,221,142,102, 83, 17,172,207, 63,255, 28, 54,155, 13, 62,158, 46, 48, 26,141, 80,169, 84, 14,105, 94, 31,193, -218,190,125, 59,108, 54, 27,218,120,185,193,104, 52, 94, 51,242,249, 86,154,148, 82, 35, 33,100,114, 88, 88,216, 39,111,189,245, -214,111, 93,187,118,109, 29, 22, 22,230, 86, 86, 86, 86,244,243,207, 63,103,197,197,197,169, 5, 65,152,220, 84, 51,209,245,154, -238,238,238,171, 54,111,222,236,115,254,252,121,228,229,229, 97,245,234,213,151,139,139,139,135, 75, 36, 18,217,218,181,107,143, - 70, 68, 68,120, 10,130, 96,116,134,242, 89, 79, 65, 65,193,158,186,251,140, 67,198,202,158,116, 38, 38, 38,126, 93,167,125,192, - 30,237,191,234,216,111,119,100,226,173,210,249,194, 11, 47,228, 1, 24,127, 59,233,220,191,127,255,229,167,159,126,122,169,191, -191,255, 34,181, 90,141,180,180,180,134,105,145,234, 31,208, 9, 33, 24, 59,118, 44,166, 78,157,138, 67,135, 14, 45,253,215,191, -254,117,249,110,231,231,223,198, 96,113, 28,151,157,145,145,209,118,243,230,205, 76, 5, 33,216, 66, 8, 88,150, 5, 33,164,161, - 99,109,253, 43, 0, 28, 57,114, 68,224,121, 62,235, 22, 55,255,236,147, 39, 79,182,217,184,113,163, 68,165, 82, 65, 46,151, 35, - 61, 61, 29, 18,137, 4,151, 47, 95,198,103,159,125,118, 77,167,221, 67,135, 14, 89, 21, 10,197, 61,155,213,251, 76,126,229,163, -157,124, 20,222,234, 60, 67,113, 42,165, 55,188,128,175,239, 20,127, 35,148, 26,237,155, 43,151, 47,117,105,100,174, 42,140, 38, -219, 99,231,138,170,239,120,225, 60,126,252,184,179, 46,244,250,214,192,129, 3,109, 0,220, 1,188, 65,107, 35,119,168, 51, 89, -255,236,220,185,243, 12, 0, 10, 0,111,221,203,232,149,205,102,107,136,156, 58, 91,228,170, 49, 73, 73, 73,153, 0,134, 59,186, -239, 86,140, 27, 55,238, 55, 0,191,221,201,180,222, 13,205,122,202,174, 86,226, 82,102, 94,221, 82, 94, 86, 88, 47, 95,249,163, -255,148, 96, 65, 89,101,169,195, 17,172, 75,153,185,176,217,104,173,158, 53,175,182,147,187, 85,128, 96, 17, 80,114,213,177, 9, -242, 41,165,231, 8, 33,125,231,207,159, 63, 3, 64,127,212,142, 62,204, 70,237,232,224,181,246,246,193,225, 56,174,255,154, 53, -107,134, 51, 12,195, 36, 36, 36, 24,151, 47, 95,158, 83, 92, 92,252, 56,165, 52, 27, 0,188,189,189,255,185, 99,199,142,173,206, - 48, 37,195,117,188,120,159,106, 55,155,251,101,100,226,182,109,219,162,167, 77,155, 38, 9, 13, 13,157, 27, 28, 28,204,100,102, -102,162,184,184, 24, 44,203,162, 83,167, 78, 8, 15, 15,135,175,175,175,109,223,190,125,203, 71,143, 30, 29, 45,218,165, 59,104, -176,172, 86,235,144, 57,115,230, 28, 54, 26,141,118,245,197, 81, 40, 20,121,213,213,213, 67,110, 81,240,134,196,198,198, 30, 94, -179,102, 77,219, 70, 21, 71,141,197, 98, 89, 52,109,218,180,183, 5, 65, 80, 92,167,153,107, 54,155, 7,253,149, 25,114,125,147, -223,197,220,154,219,238, 39,162,226,225,151,147,176, 7,233,103,147,241,121, 74,193, 85,189,153,134,167, 22, 85,159,251, 59, 21, - 52, 74,105, 49,128, 89, 77,236,187, 4, 96,186, 19,164, 81, 73, 8,209, 59,179,177, 18,249, 3,158,231,139, 31, 29, 50,248,150, - 35, 4, 37, 18, 73,177,189,122, 67, 31, 25,116, 75, 61,142,227,138, 29, 44, 87, 70,212,118, 3,104,118, 87, 0,150,101,231,132, -134,134,178,115,230,204, 41,220,183,111,223,247,229,229,229,179, 41,165,250,250,253,117,163, 6, 3,197, 82,225, 52,245,221,125, - 49, 50,113,253,250,245, 81,179,103,207,222,234,235,235,187,177,127,255,254,157, 59,116,232,160,209,104, 52,168,172,172,172, 42, - 43, 43, 75,219,181,107,215,243,147, 39, 79,206, 20,207,232, 29, 54, 88,137,137,137, 69, 0,186,223,201, 31,187,133,230,255,156, - 38, 87,206,119,211,215,155,173,198, 81,170, 38, 63,223,162, 15,214,149,146,223,103,188,245,241,222, 24,163,197,102, 19,108,116, - 74,106, 97, 85,170, 88,244,156,182, 98, 20,205,213,125, 66,124,124,124, 91,103,214,187,147,152, 76,166,153, 97, 97, 97,239, 90, -173,214,149, 22,139,229,152,120,246, 69,238, 20,171, 86,173,202, 68,237, 82, 64, 24, 59,118, 44, 11, 0, 95,124,241,133,213, 9, -147, 26, 12,192, 3, 64,253, 3,142, 7, 0, 19,106,103,246, 47, 6,144,116,223, 24,172,191, 43, 95,124,247,199, 13,246,122,227, -116,171,207, 77,250,181,130,223,143, 1,232, 39,230,174,136,136, 72, 51,141,127, 54,128,199,197,156, 16,185,171,247, 63,231, 52, - 86,245,120, 16, 66,118, 83, 74, 71, 0, 64,253,251,198,219,156, 13, 70, 44, 82, 34, 34, 34, 34, 34, 34, 34, 34,119, 22, 2,192, -191,137, 39, 38,187, 59, 96, 19, 66,252,155,241, 68,246,139,168, 41,106,138,154,162,166,168, 41,106,138,154,127, 47,205, 91,105, - 55,241,255, 17,183,136, 96,237,113, 58,131,117, 55, 39,166,251,171,135, 4,139,154,162,166,168, 41,106,138,154,162,166,168,121, -127,106,222,130,251,206, 96,137,125,176, 68, 68, 68, 68, 68, 68, 68,156,157,154, 5, 11, 22, 44, 36,132,236, 6,128, 5, 11, 22, - 44,116,246, 4,139, 6, 75, 68, 68, 68, 68, 68, 68,196,217,137,143,137,137,209,199,196,196,212,119,104, 47, 70,109, 43,220, 8, -252, 49,178,240,254, 54, 88, 11,134,248,245,243,110,237,253, 97, 69,105,233,105,155,169,106,234,146, 3,185,229,205,249, 97, 66, -136,142,231,249,167,148, 74,229, 32, 74,169, 31,203,178, 23, 42, 43, 43,143, 88, 44,150, 47, 40,165,213, 98, 89, 18,185,215, 4, - 6, 6,246,224, 56,110, 54, 33, 36, 88, 16,132, 86, 28,199, 21, 16, 66,146, 76, 38,211,154, 83,167, 78,157, 22,115,232,193, 37, - 40, 40,232,107, 74,105,120, 93, 93,117,224,212,169, 83, 99,196, 92, 17, 17,185,167,152, 0,156,188,159, 18,236,176,193, 34,148, - 62,253,252,139, 19,189,175,230,164,121,127,178,109,127,167, 55,134,183, 13, 95,178, 55,203,161, 5,191, 20, 10,197, 83, 61,122, -244, 88,177,110,221, 58, 93,187,118,237,136, 66,161, 64, 65, 65, 65,231, 51,103,206,140,138,140,140, 92,200,113,220,255, 89, 44, -150,195,183,115, 96,132, 16, 23,119,141,100,118, 73,165,229,117,177, 92,138, 56,194,216,177, 99,217,156,156,156, 69, 58,157,110, -230,252,249,243,101,126,126,126, 80,171,213, 40, 42, 42,106,125,241,226, 69,159,245,235,215, 15, 15, 11, 11,139,149, 74,165,145, - 71,143, 30, 21,196, 28,187,255, 9, 13, 13,109, 33, 8,194, 90, 66, 8,207,178,236, 92, 74,105,248,254,253,251, 97,181, 90, 17, - 17, 17, 17, 30, 26, 26,218,193,106,181, 46, 87, 42,149, 54,163,209, 56,181,110, 78, 63,145,251,156,144,144,144, 44,171,213,234, - 97,239,247,121,158,207,141,143,143,239, 44,230,156,200, 93, 49, 88, 44,197,129, 61, 95,109,159, 56,114, 64, 23, 50,241,241,128, - 14, 91,191, 77, 62, 50,231,209,246,143,174, 60,152, 97,215,146, 54, 74,165,114,218,148, 41, 83,162,162,162,162,228, 23, 46, 92, -192,185,115,231, 32, 8, 2, 52, 26, 13,252,253,253,153, 61,123,246,180,156, 62,125,250,167, 60,207, 79, 49,153, 76, 59,155,123, - 96,158, 58, 54, 90, 35,151,140,147, 73, 36, 73, 70, 65,216,227,164, 23,247, 46,139,197,178,242,231,159,127,254,241,126, 41, 48, -193,193,193,125, 37, 18,201, 66,158,231, 31,127, 80,205,197,229,203,151, 23,254,227, 31,255,152, 25, 25, 25, 41,203,204,204, 68, - 90, 90, 26, 10, 10, 10,208,174, 93, 59,180,107,215,142,172, 93,187, 86,190,110,221,186, 41,167, 79,159,102, 0,216,221, 15,128, - 16,194,120,121,121, 77, 26, 60,120,240,104,119,119,119,109, 65, 65, 65,101,124,124,252,238,188,188,188, 15, 41,165,205,202, 75, - 66, 8,227,225,225, 49, 33, 34, 34, 98,180,155,155,155, 91, 65, 65, 65,249,225,195,135,119, 23, 21, 21,125, 76, 41,181, 53, 55, - 15, 8, 33, 45, 81, 59,194, 88, 87,183,233,138,159,159,223,249,140,140,140,226, 59,168, 89,224,231,231,151,218, 28,205,190,125, -251,122,155,205,230, 61, 0, 58, 54,245, 29, 74,105, 42,199,113, 17,246,152, 33, 65, 16,214,190,243,206, 59, 17, 26,141, 6,243, -231,207, 63,237,235,235, 11,173, 86,139,184,184, 56,184,185,185,193,106,181,158, 94,177, 98, 5,201,201,201,193,154, 53,107, 54, - 0,120, 66,188,125,216,117,206,183, 0,112, 5, 48,137, 82, 90,218,104,187, 59,128,207, 1, 20, 83, 74,199,223,171,244, 89,173, - 86,143, 31,126,248, 1, 50,153,172,110,185, 37, 27, 40,165, 13,175,141, 49,155,205, 8, 15, 15,111, 41,158, 85, 17, 7, 2, 82, - 77,143, 34,124,117, 72,187,151,252,123, 7,188, 45,229, 37, 10,155,213, 2,155, 96,129,213, 98, 2, 75, 5,116,111,231,138,246, - 45,120, 84,253, 94,133, 79, 14,166,255, 94, 90,131, 1,209,123, 47,164,223,226, 98,243, 13, 14, 14, 62,113,244,232, 81,237,247, -223,127,143, 11, 23, 46, 32, 58,186,118,137, 35,149, 74,133,125,251,246,213,175,232,141,199, 30,123,172, 36, 63, 63,191, 55,165, -180,188, 25, 23,117,155, 1, 65, 62,199,191, 94, 49,192,173,199, 19, 95,102, 95, 41, 51,245,160,148, 58,221, 4,106,129,129,129, -122,142,227,244, 38,147,233,169,251,193,100, 5, 7, 7,247,101, 89,118,135,197, 98, 81,170,213,106,247,163, 71,143, 26, 31,180, - 11, 34, 48, 48,176,135,171,171,235,209, 29, 59,118,200, 19, 18, 18, 80, 94, 94,142,162,162, 34,204,156, 57, 19, 27, 54,108, 64, -143, 30, 61,160, 82,169,192,243, 60, 94,126,249,229, 26,189, 94, 31,158,152,152,152, 98,143, 17, 26, 48, 96,192, 71, 91,183,110, -109,107,177, 88, 24,160,118,225,243,236,236,108,235,194,133, 11,115,146,147,147, 39, 59,106,178, 8, 33, 76, 88, 88,216,166,173, - 91,183,250,241, 60,207, 8,130, 0,155,205,134,139, 23, 47, 90, 23, 45, 90,116, 57, 57, 57,249,185,230,148,123, 66, 72, 47,165, - 82,217,229,229,151, 95, 46,125,252,241,199,205, 0,144,146,146, 66, 82, 82, 82, 92,124,125,125, 47, 47, 89,178,228, 76, 51, 52, -123, 43,149,202, 78,211,167, 79, 47, 25, 62,124,184,192,243,188, 45, 33, 33,129, 61,123,246,172,139,159,159,223,111, 11, 23, 46, -116,104, 52, 82, 64, 64,192,153,247,222,123,175,149,143,143,143,149, 16, 66,235,126,131, 18, 66, 40,195, 48, 20, 0, 82, 83, 83, -185, 87, 94,121, 37, 59, 37, 37, 37,200,142,243,190, 99,252,248,241, 67,123,245,234,133, 46, 93,186,128,101, 89,164,165,165,225, -210,165, 75,144,203,229,240,247,247,135, 66,161,192,206,157, 59,241,217,103,159, 29, 74, 78, 78, 30, 45,222, 62,236, 58,239, 63, - 0, 8, 2,112, 30,192, 48, 74,105,105,157,185,218, 15,160, 43,128, 19,148,210, 33,247,178, 14, 78, 72, 72,192,142, 29, 59, 32, -149, 74,193,113, 28, 74, 75, 75,225,235,235, 11,137, 68, 2,142,227,192,113, 28,164, 82, 41,124,124,124,240,200, 35,143, 8, 73, - 73, 73, 90,241,204,138,220,118, 4,203,171,229, 67,243,158,124,114,136, 2, 86, 1, 48, 87, 3,102, 61,168,185, 26,212,164, 7, -225, 21,160, 22, 3, 84,108, 41,254,239,145, 22,154,175,226, 11, 83, 94, 29,220,110, 76,204,225,204, 67, 77,233,105,181,218, 5, -113,113,113,218,179,103,207, 34, 45, 45, 13,171, 87,175, 70, 84, 84, 20,164, 82, 41,202,203,203, 49,106,212, 40,196,199,199,195, -100, 50,225,181,215, 94,115, 91,176, 96,193, 20, 0, 14, 47, 50,217, 82, 39,121,119,251, 39,107,221,116,138, 18, 60, 55, 42, 73, -183,254,139,172,151, 0,108,112,198, 19, 48,111,222, 60,229,242,229,203,191,236,221,187,183, 83,155,172,224,224,224,190, 82,169, -116,199,226,197,139, 85,139, 23, 47,182,222, 33,205,110, 12,195,124, 98, 50,153, 22,156, 62,125,250, 59,103, 56, 78,169, 84, 58, -237,149, 87, 94,145,231,228,228,224,234,213,171, 13, 79,182,245,200,100, 50, 48, 12, 3,158,231,241,236,179,207,202, 55,109,218, - 52, 29,192,164, 91,233,122,121,121, 77,218,178,101, 75, 91,179,217,204, 84, 85, 85,129,231,121, 72,165, 82,244,236,217,147,157, - 59,119,174,207,172, 89,179, 94, 0, 16,235, 72, 90,117, 58,221,191,183,108,217,226,199,243, 60, 83, 80, 80,128,126,253,250, 33, - 33, 33, 1,161,161,161,236,188,121,243, 90, 79,159, 62,253, 57, 0, 31, 56, 26,101, 82, 42,149,221,142, 29, 59,150,219,170, 85, -171,134,237,237,219,183,167,195,135, 15, 47, 59,127,254,124,167, 83,167, 78,149, 5, 5, 5,229, 58,160,233,173, 84, 42, 59, 31, - 60,120,240, 74, 84, 84,212,160, 13, 27, 54,140, 0,128,144,144,144, 61, 49, 49, 49, 71,138,139,139,187, 38, 36, 36,148,245,233, -211, 39,223, 1,205, 14, 94, 94, 94, 85,211,166, 77, 83, 55,245,157,143, 62,250,168,140, 16,210,213, 30, 61,150,101,103,111,219, -182,237, 76,121,121,185, 36, 57, 57, 25,114,185, 28, 10,133,162,225,245,202,149, 43, 48,153, 76,216,190,125,187,192, 48,204, 28, -241,214, 97, 55,227, 0, 28, 0,208, 13,192, 62, 66,200, 51, 0, 62, 5,208, 5, 64, 58,128,123,190, 56,181,205,102, 3,199,113, -144, 72, 36,216,179,103, 15, 98, 99, 99,241,205, 55,223,192,219,219,187,193, 96, 73, 36,146,250,114, 39,158, 81, 17,199, 12, 22, - 33,132, 82, 74, 73,253,107,253,206,130,130,162, 85, 31,199,126, 24,205,115, 12, 55, 36,172, 11,220,100, 2,136, 82, 7,233,192, - 5, 32,174,190, 0, 0, 90,150, 1,211,129, 5, 24,219,187,132,249,196, 76, 62,127,103, 84,231, 54,243,190, 77,171,106,162, 82, - 12,105,211,166, 13,126,252,241, 71,180,107,215, 14,139, 23, 47, 70,215,174, 93,161, 84, 42, 81, 88, 88,136,234,234,106,168, 84, - 42, 88,173, 86, 4, 4, 4,176,106,181,122,128,163, 6,139, 16,242,240,243,227, 66,131, 36,218, 46,232,247,216, 11, 56,184,126, -160,234,227, 61, 5,175, 16, 66, 62,105,188, 56,170,179, 48,122,244,104, 20, 22, 22, 42,183,110,221,218,108,147, 21, 18, 18,178, -203,106,181, 14,190,213,247,228,114,249,143,199,142, 29, 27,214, 92,115,181,105,211, 38,149,171,171,235, 29,169,100,234,204,213, -247, 19, 39, 78,212,108,217,178,101,219,195, 15, 63,252,180, 51,152, 44, 66, 72, 31, 63, 63, 63,100,103,103,163,176,176, 16, 70, -163, 17,133,133,181, 93, 12,115,115,115,225,227,227, 3, 55, 55, 55,248,248,248,160,115,231,206,132, 97,152, 96,123,116, 7, 14, - 28, 56, 2, 0,147,145,145,129,226,226, 98,104,181, 90,168,213,106,180,106,213, 10,131, 6, 13,146,180,111,223, 62,220, 81,131, - 21, 30, 30, 62, 90,169, 84, 50,217,217,217,200,204,204,132,209,104, 68,122,122, 58, 92, 93, 93,241,200, 35,143,112,126,126,126, -195, 28, 53, 88, 0,186, 79,153, 50,165,184,177,185,170, 71,165, 82,145,110,221,186,149,107, 52,154, 0, 0,185,142,104,206,156, - 57,179, 40, 38, 38,166,255,161, 67,135,102,215,111, 60,116,232,208,127, 1,224,253,247,223, 63,230,226,226, 18, 0,192,161,133, -213, 41,165,182, 23, 94,120,225, 18,207,243, 13,134,181,254, 61,207,243, 96, 24,198,197, 30,157,250, 14,237,254,254,254,152, 58, -117, 42,190,249,230, 27,108,222,188,185, 97,255,147, 79, 62,137, 49, 99,198,160,170,170, 10,158,158,158,146,252,252,252, 95,131, -130,130,156,162,227, 59, 33, 36, 16,192, 82, 0,102, 0,145,148, 82,167, 90,143,141, 82, 90, 68, 8, 9,111,100,178, 78, 0,144, -213,153,171,112, 74,233, 61,239,203,102,181, 90,193,113, 28,114,114,114,176,113,227, 70,188,244,210, 75,232,217,179, 39, 42, 42, - 42, 26, 12, 22,199,113, 96, 24,113,225,147,187, 88,142,111,232, 65, 30,232, 8,150,172,127,118,108,230,113,166,231,216,145, 97, - 19,116, 90, 5,108,191,231, 67,250, 72, 36,206,150, 41,177, 38,246, 0, 0, 96,214, 83, 1,240, 31,250, 22,140, 31, 62,138,193, -190, 38,254,195,159,229,255, 5, 16,117, 35, 61, 15, 15, 15,119, 65, 16,192, 48, 12, 84, 42, 21,116, 58, 29, 20, 10, 5, 74, 74, - 74, 48, 99,198, 12,236,223,191, 31, 38,147, 9, 82,169, 20,126,126,126, 48,155,205,126,142, 30,144,167,155,100,253,154, 21,209, - 46,165, 25,159, 33,249,194, 85, 40, 93,124,176,232,165, 64,215, 55, 54, 36, 47, 4,176,200, 25, 79, 66,247,238,221, 49, 99,198, - 12,229,186,117,235,154,101,178, 40,165, 75, 37, 18, 73,159, 57,115,230, 40,158,122,234,169, 63,237, 63,119,238, 28,166, 78,157, - 90,163,215,235,151, 53,199, 92,113, 28,183, 99,227,198,141, 42, 23, 23, 23,100,103,103,223, 49,115,181,118,237, 90, 77,251,246, -237,193,113,156,252,163,143, 62,114, 10,147, 37, 8,130,143, 82,169, 68, 73, 73, 9,102,205,154,117, 77, 63,140,250,230,108, 0, - 72, 75, 75,131,143,143, 15, 12, 6,131,183, 61,186,238,238,238,174,148, 82,188,248,226,139,200,201,201,105,216,238,237,237,141, -220,220, 92, 8,130,224,230,104, 90,117, 58,157,155,197, 98,193,128, 1, 3, 96, 48, 24,106,195, 5,227,198,129,227, 56, 20, 21, - 21,193, 98,177,232,154,145, 5,238,195,135, 15, 47,104,106,167, 90,173,182,232,116,186, 54,142, 38, 53, 34, 34, 34,127,253,250, -245, 17,215,239, 56,121,242,100,132,139,139,203, 97,119,119,247, 78,205, 9, 62,200,100, 50,240, 60, 15,142,227, 80,255,190,254, -143,101, 89,155,157,215, 79,248,254,253,251,161,213,106,145,152,152, 8,133, 66, 1, 0, 24, 49, 98,196, 28,181, 90,221,223, 96, - 48, 60,190,123,247,110, 92,189,122, 21,126,126,126,104,209,162, 5, 18, 19, 19,195,157,164,250,120, 27, 64,159,186,247,239, 54, -122,239,108, 38,107, 2,128, 99,117,230,202, 4, 96,188, 51,152,171,198, 17,172,101,203,150, 65, 16, 4,196,199,199, 99,236,216, -177, 32,132,128, 16, 2,173, 86,139,119,223,125, 87,116, 65, 34,205, 51, 88, 55,114,142,111,188, 65, 24,227,241,182, 27,198, 70, -244,153,208,205, 71, 5, 99, 73, 6,120,181, 59,136,107, 91,172,137, 61,128,243, 89,101, 0,128, 53, 95,166,224,227, 87,195, 65, -148, 58,120,213, 92,128,150,151,141,106,202, 96,149,150,150, 86,153,205,102, 55,133, 66,209,240, 84, 80, 82, 82,130,215, 95,127, - 29,219,183,111, 71,219,182,109, 33, 8, 2,120,158, 71,113,113, 49, 56,142,115,104,116,162, 68, 66, 30,139,156, 57,172,173,202, -189, 19, 74, 83,222,168,221,168, 13,192, 75,227, 24,126,229, 39,191,252,155, 16,242, 46,165,212,233,230,203, 80,171,213,232,213, -171, 23,254,253,239,127, 43,183,110,221,250, 1,110,210,113,247, 70, 36, 37, 37,157, 8, 14, 14, 30,181,106,213,170,111, 11, 10, - 10, 20,189,123,247,134, 90,173,134, 90,173, 70, 70, 70, 6,162,162,162, 12, 6,131,225,201,230, 68,199, 24,134,137,125,254,249, -231, 85, 90,173, 22, 25, 25, 25,208,233,116,183,117,172,193,193,193,221, 88,150,253,126,237,218,181,154, 14, 29, 58, 32, 53, 53, - 21,129,129,129,104,217,178,165, 60, 38, 38,230,158,155, 44,169, 84,154, 87, 92, 92,220,190,117,235,214,216,180,105, 19, 24,134, - 65,126,126, 62, 22, 45, 90,132,152,152, 24,244,233,211, 7,106,181, 26,173, 91,183, 70,122,122, 58, 20, 10,197, 21,123,116,243, -242,242,202, 1,120,236,219,183, 15, 37, 37, 37, 13,219,219,180,105,131,178,178, 50,152, 76,166, 50, 71,211,154,159,159, 95, 6, -160,197,233,211,167,145,153,153,137, 97,195,134, 97,231,206,157, 8, 12, 12,132,213,106,133,197, 98, 41,107, 70, 22, 88, 89,150, -189,217,242, 14, 4,128,163,102, 80,144, 72, 36,244, 38, 79,175,205,209,132,205,102,163, 77,153, 43,169, 84,138,155,253,230,141, -162, 24,113,113,113, 13,205,130, 0,192,113, 92,159,217,179,103, 63,222,212, 67,145,147,208, 56, 74,231,148,131, 78, 8, 33, 30, - 0,182, 0,224,235, 34,109, 60,128,205,132,144, 97,141, 59,190,223, 75,131,197,178,108,195,103,149, 74,133, 94,189,122, 53, 24, - 44,189, 94, 15,142,227, 68,183,112,119, 77,248, 3, 23,189, 2,234, 22,123,110, 28,158,187,198, 92, 13, 11,154,208,213, 71,142, -159, 83,126,129,196, 84, 6,106,172,188, 73, 13,101, 1,145,170,160, 85, 73, 90,221,228, 66, 59,157,149,149, 5, 87, 87, 87, 72, -165, 82,200,100, 50,248,251,251,227,196,137, 19,232,212,169, 19,172, 86,107, 67, 69,249,235,175,191, 66, 16,132, 99, 14, 92,196, -236, 67, 90,201,138,121, 11,163,212,200,219, 4, 87,141, 12,131,250,116, 0, 84,221,192,114, 50,172,122,109,164,155,231, 67, 46, -239, 56,227, 73, 80,171,213,200,203,203,195,103,159,125,166, 55, 24, 12, 47, 54, 71, 35, 41, 41,233,132,213,106, 29,245,197, 23, - 95,212,100,101,101, 65, 46,151,227,226,197,139,245,230,106, 76,115,251,119,217,108,182, 41, 31,124,240, 65,245,238,221,187,161, - 86,171,161,209,104,110, 59,114, 53, 99,198, 12,117,199,142, 29,145,145,145, 1, 23, 23, 23,184,187,187,163,127,255,254, 88,183, -110,157, 92,173, 86,111,123,248,225,135,239, 89,167, 87,155,205,150,152,158,158, 78, 93, 92, 92,208,185,115,103,244,232,209, 3, - 33, 33, 33, 0,128,250, 14,208,237,218,181, 3, 0, 92,186,116, 9,148,210, 83,246,232, 30, 59,118,108,119, 90, 90,154,213,203, -203, 11, 61,123,246, 68, 64, 64, 0, 66, 67, 67,225,235,235,139,255,253,239,127,230,203,151, 47,239,119, 52,173,135, 15, 31,222, -245,203, 47,191, 8, 94, 94, 94, 8, 12, 12,132, 76, 38, 67,143, 30, 61,224,229,229,133,184,184, 56,115, 86, 86,214,254,102,100, - 65,238,153, 51,103,216,166,118, 42, 20, 10, 13, 0, 71, 35, 15,249, 39, 79,158,100,194,194,194,254, 52,154, 55, 36, 36,100,143, - 66,161,112, 1,112,197,209,132, 18, 66,108, 60,207, 67, 46,151, 95, 99,174,120,158,135, 76, 38,131, 68, 34,177,119, 20,229,158, -136,136, 8,236,222,189, 27,114,185, 28, 74,165, 18, 79, 60,241, 4, 12, 6,195,147, 0,176,116,233,210,134,155,109,100,100, 36, - 0, 64,175,215, 59,203, 0,143,185, 0,126, 5,240, 27,128,215,156,208, 92,181, 64,109,243, 96, 39,212, 54, 11,246,175,123,173, -239,147,229,238, 4, 55,119, 72,165, 82,188,249,230,155,224, 56, 14, 45, 91,182,196,194,133, 11,177,120,241, 98, 68, 70, 70, 98, -249,242,229,112,115,115, 19,155, 8,239,110, 57,185,198,131, 60, 80, 6,235,122, 76, 9,190, 75,158,122,172,247,132,174,173,100, - 56,157,242, 43,118,157, 44,184, 88, 82,114, 21,182,194, 95, 96, 43, 78,197,172,167, 2,208,173,173, 14,221,218,234, 48,235,169, - 0,216,138,126, 5, 45,207, 0,149,235, 80, 92, 69,154,108, 94, 40, 43, 43, 91, 19, 21, 21,117,213,205,205,173,161, 82,204,205, -205, 69,247,238,221,175,169, 36, 89,150,197,235,175,191, 94, 82, 84, 84,180,201,110,147,162, 96,159, 91,246,218,211, 45,164, 50, - 13, 80,246, 35,180, 90, 53, 54,197,174, 0,140,249, 0,195, 99,228,144,135, 89,175, 22, 46,255, 36,132,116,116,182,147,144,157, -157,141,200,200, 72,189, 94,175,191,173,142,238, 73, 73, 73, 39, 44, 22,203,168,184,184,184,154,189,123,247,226,237,183,223,190, - 45,115,213,200,184,141,222,188,121,115,117,118,118,246,109, 25, 44,142,227, 94, 17, 4, 65,179,122,245,106,219,208,161, 67,173, - 47,191,252,178,117,242,228,201,214, 49, 99,198, 88,135, 12, 25, 98,157, 50,101,138,213, 96, 48,200,212,106,245,219,247,234, 92, -152,205,230,216,216,216, 88, 3,195, 48, 80,171,213,224,121, 30, 30, 30, 30, 13, 70,184,190,159,143,217,108,198,250,245,235,107, -140, 70,227,251,246,232,150,148,148,108,158, 59,119,110,214,193,131, 7, 45, 21, 21, 21, 0,128,130,130, 2, 68, 71, 71,155, 55, -108,216,144, 95, 94, 94,254,161,163,105,173,168,168,216, 50,127,254,252,203,123,247,238,181,176, 44,139,242,242,114,184,186,186, - 34, 58, 58,218, 28, 27, 27,155, 95, 89, 89,233,176,102,255,254,253, 51,114,115,115, 53, 70,163,145,222,224,252, 17,133, 66, 17, - 4,224,168, 35,154, 33, 33, 33, 25,217,217,217,218,183,222,122,235,167,161, 67,135,174,210,106,181,151,180, 90,237,165,161, 67, -135,174,222,176, 97,195, 15,114,185, 60, 8,192,145,102, 68, 87,109,245,117,134, 92, 46,135, 76, 38,107,120, 64,147,201,100,224, - 56,206, 46,131,149,156,156, 60,142, 82,218, 83, 16, 4,161,103,207,158, 80, 42,149, 24, 51,102, 12,164, 82, 41, 0, 96,193,130, - 5,160,148,130, 82,218, 96,176,170,170,170,156,194, 96, 81, 74,127,162,148,134, 82, 74,253, 41,165,206, 56, 72,102,107, 35,115, - 21, 78, 41, 61, 7, 32,188,145,201,218,238, 12, 6,139,227, 56,116,237,218, 21,179,102,205,194,206,157, 59,145,149,149, 5, 65, - 16, 96,181, 90,193, 48, 12, 36, 18,137,104,176, 68, 28,166,161,137,176,241,107, 75, 87,213, 51,221,188, 36, 56,125,250, 60,190, - 61, 85,182,149, 97,216,157, 41,153,198,175,194,253,126,135,121,251,120,248,143,221,130,143, 95,173,237,130, 96, 43,250, 21,230, - 47,158, 1, 81, 62,132,244, 74, 37,244,230,242,253, 55, 41,200,167,116, 58,221,151,159,124,242,201,196, 73,147, 38,241, 54,155, - 13, 10,133, 2,179,103,207, 6,165,180,193, 92, 77,157, 58,181,186,168,168,104, 29,165, 52,195, 78,247,171,104,229,193,207,159, -240,226, 34, 57,114, 98, 1, 70,138, 18,244, 70,175, 1,207,163, 40,235, 4, 80,125, 30, 32, 82,196, 46,123,193,125,212,228, 21, -239, 1, 24,234, 44, 39, 32, 53, 53, 21, 75,150, 44,185,109,115,213,216, 16, 5, 7, 7,143,218,185,115,231,255, 12, 6,195,203, -119, 80,115,244,178,101,203,118,180,104,209, 66,213, 92, 29,111,111,239, 23, 74, 74, 74,166,218,241,213,123,214,212,113,234,212, -169,211,125,251,246,221,184,122,245,234, 23,103,206,156, 41, 87, 40, 20,208,106,181, 72, 75, 75, 67,155, 54,181, 93,143,106,106, -106,240,234,171,175,214, 8,130,176, 53, 49, 49, 49,209,206, 74,220, 70, 8,121,126,202,148, 41,147, 58,117,234, 20, 65, 41,213, -153,205,230,178,203,151, 47,239,175,172,172,108,214, 60, 88,117,154,207, 77,157, 58,117, 66,199,142, 29, 71, 91, 44, 22,157, 32, - 8,101, 57, 57, 57,123, 42, 43, 43, 55, 55, 71,243,167,159,126, 42,217,180,105,211,111,249,249,249, 93, 61, 61, 61, 43,221,221, -221, 77,122,189,158,213,104, 52, 26,158,231,123, 3, 72, 4,112,193, 17,205,196,196,196,162,184,184,184,203,122,189,190, 83,108, -108,236, 49, 87, 87,215, 35, 86,171,149,240, 60,239,166, 82,169, 6, 2,248, 9,192,165,230, 24,172,250, 7, 51,169, 84,218, 16, - 21,175,255, 12,192,230,128,214,138,101,203,150, 73,228,114, 57, 76, 38, 19,244,122, 61, 74, 75,107, 91,175,150, 46, 93,138, 87, - 95,125, 21, 0,176,100,201, 18, 68, 70, 70,162,166,166, 70, 38,222, 62,236,162, 12,192, 41, 0,227,234,251, 92, 53,234,248,190, - 21, 64,133,179, 24, 44,142,227, 48,105,210, 36, 12, 31, 62,252, 79,211, 52,136,157,220,239,250, 57,184,198,131, 60, 48,145,185, - 27,205,131,181, 96,104,219,255,243,113,225, 94,201,175, 20,118,242,125,179,230, 71, 70,130,190,250, 72,219,157,163, 59, 86, 63, -210,173,165, 13,160, 2,136,182,246,102, 67,171,242, 65, 84, 45, 81,110,115,193,166,195,133,133,148, 97, 66,150,236,186, 88,122, - 19, 51,196,185,186,186,174,236,216,177,227,152,232,232,104,151, 46, 93,186, 64,169, 84,130, 82,138,179,103,207, 98,234,212,169, -229,197,197,197,155, 74, 75, 75,223,160, 55,155,164,171, 17, 30,174,220,155, 27, 34,135,253,103,204,164,215,165,184, 48, 7,144, -184, 0, 15, 13,193, 21, 50, 24, 45, 37,103, 0,211,149,218,109,156, 11,134, 77, 88, 90,190,255,112,210,191, 40,165,241,247, 58, -243, 3, 3, 3,245,114,185,252,142,153,171,187, 77,112,112,112, 95,158,231,119, 24,141, 70,165, 74,165,122, 32,231,193,170, 59, - 47,156, 76, 38,139,146, 74,165, 47, 60,243,204, 51,138, 46, 93,186,192,215,215, 23, 69, 69, 69, 72, 75, 75, 67,108,108,172,193, -102,179,125, 92, 86, 86,182,240,220,185,115,230, 7, 49, 15, 46, 94,188,232,213,190,125,251, 96,150,101,219,163,118,162,200, 43, - 0, 14, 54,199, 8,213,147,158,158,238,237,235,235, 27, 44,149, 74,253,234, 52,243, 1,124,215, 28,205,128,128,128, 51, 11, 22, - 44,104, 49, 96,192,128,106,150,101,169, 84, 42,165, 12,195, 64, 42,149, 82,137, 68, 66, 9, 33,244,211, 79, 63,213,174, 90,181, -170,192,158,121,176,130,130,130,182,141, 24, 49, 98,164, 92, 46,199, 87, 95,125, 37,120,122,122, 74, 92, 93, 93,241,241,199, 31, - 55, 85,143,129, 82,170, 20,111,141,247,253,181,174,255,238,187,239,144,147,147,115,205,156, 87,141,141, 85,253,103, 66, 8,194, -194,194,132,147, 39, 79,138,243, 96,137, 52,223, 96,221,136,101, 67,252,180, 21,160,159,247,106, 69,255, 17,228, 43,131,135,171, - 28, 12, 39, 67,165,129,224, 92,190, 1,199, 82, 43,115,173, 54,242,228,219, 7, 51,206,217, 25,117, 10,105,217,178,229, 92,155, -205,214,141, 97, 24, 37,165,180,138, 97,152, 51, 5, 5, 5,209,148,210,243,142, 28,132,171,134, 61,235,166,146,184, 72,121,158, - 10,130, 21, 0, 11, 48, 4, 32, 12, 0,166,238,149, 5, 8,131,154, 26,179, 84,176,146,157, 69, 37, 37,211,238,117,230, 15, 24, - 48, 96, 87, 85, 85,213,125, 55,147,187, 76, 38, 91,200,178,236,227, 15,250, 50, 49,161,161,161, 1, 60,207,207,165,148, 6, 26, - 12, 6, 79,133, 66, 81, 68, 8, 73,169,174,174, 94,153,156,156,124, 82,172, 62,238, 29,119,122, 38,247,192,192, 64,119, 66,200, -106, 74,169,146, 97,152, 87,108, 54,219,175, 62, 62, 62,216,177, 99,199, 13, 35, 88,162,193,122,176, 12,214,196,137, 19,177,235, -183,223, 48,210,175,233,129,235, 95,127,253, 53,250,245,235, 39, 26, 44,145, 59,111,176,234, 76, 17,153, 59,168,237,147, 18, 66, -158, 32, 12,237, 78, 0,222, 74,145,206, 16,250,157, 84,102,254, 96,201,174,252,154,235,190,239, 79, 41,253,229,142, 38, 88,212, - 20, 53,239,129, 38, 33,132,177,103,233, 25, 49, 63, 31, 12,205,192,192,192,237,213,213,213, 17,105,105,105, 77,105, 92, 99,176, -196,252,188, 63, 53,251,245,235,119,126,213,170, 85,173, 59,118,236,200, 16, 66,192,178, 44, 8, 33, 96, 24, 6, 44,203, 54,188, - 2,192,145, 35, 71,132, 55,222,120, 35,235,167,159,126,234, 37,230,231,221,209,124,208,112,104, 45,194,186, 38,187, 47,235,254, - 68, 68,254, 54,220,206,186,126, 34,247, 31,201,201,201,227,188,189,189,227,221,221,221,219, 27,141, 70,105, 77, 77,141,180,241, -195,168, 66,161, 40, 17,115,233,254, 71, 16,132, 65,115,230,204, 57, 98, 48, 24,124,111,245, 93,133, 66,145, 87, 93, 93, 61, 68, -204, 53,145,187, 98,176, 68, 68, 68, 68,254, 46,228,231,231,135,137,185,240, 96, 83,215,124,220, 77,204, 9,145,187,129, 56, 44, - 66, 68, 68, 68, 68, 68, 68, 68, 68, 52, 88, 34, 34, 34, 34, 34, 34, 34, 34,162,193, 18, 17, 17, 17, 17, 17, 17, 17, 17, 13,150, -136,136,136,136,136,136,136,136, 72,243,249,127, 79, 26,247,226, 57,216,252,127, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130, +137, 80, 78, 71, + 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 2, 88, 0, 0, 2, 0, 8, 6, 0, 0, 0, 94,187, 18, 70, 0, 0, 0, + 4,115, 66, 73, 84, 8, 8, 8, 8,124, 8,100,136, 0, 0, 0, 9,112, 72, 89,115, 0, 0, 13,215, 0, 0, 13,215, 1, 66, 40, +155,120, 0, 0, 0, 25,116, 69, 88,116, 83,111,102,116,119, 97,114,101, 0,119,119,119, 46,105,110,107,115, 99, 97,112,101, 46, +111,114,103,155,238, 60, 26, 0, 0, 32, 0, 73, 68, 65, 84,120,156,236,157,119,120, 20,213,254,198,223, 51,101,251,166,147, 30, + 58, 4,129,208, 3, 74, 2,130,116, 17, 69,184,162,128,160,226,245, 94, 44,168, 88,126,130, 5, 21, 5,162, 94, 21, 69, 17,229, + 90, 16, 68,175,168, 32,241, 42, 77, 1, 41, 82, 69, 18,138, 92, 74,164,133,146, 72,250,246,153,243,251, 99,119,134,205,102, 91, + 96,163,128,231,243, 60,243,236, 78,123,231,156,169,239,124, 79, 25, 66, 41, 69, 67, 65, 8,233, 64, 41, 45, 96,154, 76,147,105, + 50, 77,166,201, 52,153, 38,211,252, 43,193,213,119, 5, 66, 72,196, 29, 25, 33,132,122,134, 62,151,186,102,164,180,188, 53,149, + 33,130,154,125, 60,154,207, 69, 80,179, 33,211,217,231, 82,213, 84,242, 27, 73, 93,239,125, 24,169,253,233,149,206,136,157,247, + 13,173,121,177, 90,254, 52, 35,117,142,250, 57,238,207, 69, 80,179, 33,211,217,231, 82,211,244, 61,127, 34,161,235,239,156,188, +216,253,233, 39,157, 23,125,222,255, 81,154, 23,170, 21, 70, 58, 35,189, 79, 35,254,108,186,148, 17,234,179,112, 67, 24, 12, 0, +160,148, 18, 47,125,114,169,106, 42, 16, 66,168,162, 31, 9, 34,169,229, 97,109,164, 53,125,246,103,164,120,142, 82, 74, 8, 33, +235, 0,244,137,144,230, 90,143,230, 69, 31,119,159,188, 70, 68,183, 33,205, 21, 16,185,243,190,161, 53,189,167, 93,204,185,234, +171, 25,137,243,222,223,113,143,164,102,164,174, 37,159,245, 35,114, 45, 53,196, 57,239,231,252,185,104, 93, 95,205, 72, 92, 75, +190,154,145, 56,239,255, 8, 77,101,250,197, 92, 75,254, 52, 35,113,222, 7, 58,246, 23,171,123,185, 80,175, 8, 86, 67,238, 24, +207, 1,232, 27,105,205, 72,167,185, 33, 76,102,164,163, 56, 13,169,137,200, 30,163,231, 60,154,207, 69, 80,179,111,164,142,145, +239,185, 19,137,183, 46,111,205, 72,157,155,126,210,121,209,199,201,159,230,197,166, 55, 64, 58, 47, 10,127,154, 23,123,222,255, + 81,154,136,236, 49,138,200,181,228,163, 25,177,107,201, 55,191, 17,140, 8,246, 5, 34,119, 45,249, 73,231, 69, 31, 39,127,154, + 23,155,222, 0,233,188, 40,252,105, 70, 48, 34, 26,113,221,203,129,122, 69,176, 26,138,134, 48, 66,128,251,162,139,164,118, 67, + 68,113, 26, 42,210, 22,169, 40,142, 31,221,117, 17,148,139, 88,180, 73,193,147,190,136,188,209,250,209,126,142, 16,242,108,164, +117, 35, 9,187,150,216,181,132, 75,236, 90,242,119,222, 92,236,181,212, 80, 47,207,222,154,145, 50, 66,126,242,126, 81,215,146, +239,186,145,184,150, 66,104, 94, 84,132, 57, 80,254, 47, 70,247,114,161,222,117,176, 26,138, 72,148,247, 6,208,139,104, 84, 44, +210, 52, 80, 58,251, 94, 14,121, 71, 3,164,147, 16,242, 92, 3,229,253,114,217,167,236, 90, 98,215, 82, 68,136,228,181,228,115, + 78, 70, 36,173,145, 62,207,253,105, 70, 98, 27,222, 26,145, 58, 71, 27, 58,239,145,188,150, 26,226,216, 95, 46,212, 59,130,213, + 80,111,199,151,131,102, 67,104, 55, 80,222,215,161, 1,222, 14, 26,160, 94,215, 58, 68, 62, 42,240, 28, 34, 88,228,168,228, 57, +146,105,109,200, 98,194,134, 56, 55, 27,242,124,143,100, 61,143, 6,202,251, 58, 92, 30,199,125, 29, 34,156,206, 72, 93, 75,126, +142,249, 58, 92,100, 90,253,237,191, 72, 23, 97, 71,242,220,108, 72,205, 72,104, 55, 68, 58, 3,232,174,195, 95, 32,114,165, 64, +104, 3,118,211,192, 96, 48, 24, 12, 6,131,241, 87, 36, 96, 4,171,107,215,174,249,122,189,190, 85,160,249, 53, 53, 53,197,187, +118,237,186,174, 97,146,197, 96, 48,174, 36, 8, 33, 28,206, 87, 73,144, 1, 80,202,222,238, 24, 12,198, 21, 76, 64,131,165,209, +104, 90,172, 95,191, 62, 83,150,101,184, 92, 46, 72,146, 4, 73,146,224,114,185, 96,183,219,241,183,191,253,173,222,197,139,157, + 59,119, 94,207,113, 92,179,250,172, 35, 73,210,209, 95,126,249,165, 87,160,249,201,201,201,155, 0,180, 32,228,124,212,145, 16, + 2,101,220,123, 58,199,169, 85,206, 78, 30, 59,118,172,107, 48, 77, 66, 72, 11,111, 61, 95, 45, 63,186, 65, 53,175,186,234,170, +237,130, 32,100,248, 91, 63,144,182, 44,203,135, 11, 10, 10,114, 2,105, 50, 34, 75,231,206,157,215,243, 60, 95,239,243,115,215, +174, 93, 1,207,207, 14, 29, 58,252,204,113, 92, 26, 80,247, 24, 7, 56,159,120, 73,146,126,253,229,151, 95,122, 5, 50, 32,169, +169,169,155, 40,165, 45,194, 60, 47, 21,142, 31, 59,118, 44, 59, 80, 58,149,235, 40, 88, 58,253,104, 7,213,244,210,224,210,211, +211,243, 18, 19, 19,239,173,169,169,177, 2,160, 28,199,209,118,237,218,213,210,151, 36,233,236,190,125,251, 58,132,210, 99, 48, + 24,140,203,129,128, 38, 73,150,101,206,102,179,225,192,129, 3,240,119,159,231, 56, 78,170,239,198, 40,165,153,107, 22, 47, 76, + 50, 36, 38, 67,114,216,161,107,148,164,106,151,237, 45,128,228,112, 64,118, 58,208, 40,251, 26, 37, 13,232,219,183, 47, 31, 66, + 54, 99,242,228,201, 73, 81, 81, 81,176, 90,173,176, 90,173,176,217,108,176,217,108,176,219,237,176,219,237,112, 56, 28,112, 56, + 28,112, 58,157,176,217,108, 40, 40, 40, 8,154,118, 66, 72,198,131, 15, 62,168,106,218,108, 54, 88,173, 86, 85,203,102,179,169, +154,118,187, 29, 54,155, 13,123,246,236, 9,170, 41, 8, 66,198,206,157, 59,147, 52, 26, 13, 40,165,144,101, 25,148,210, 90,131, +207,190, 66,110,110,174, 35,212, 62,101, 68,148,204,165, 47,205, 72,210, 37, 52,130,236,116, 34,161,115, 55, 0,238, 99,113, 98, +205,119,144,157, 78,200, 78, 39,154,222, 56, 82,157,222,167, 79,159, 80,231,103,211, 47,166, 77,141,213, 68, 69,193,101,181,162, +249,176, 17,234,140,194,119, 94, 7,117, 58, 65, 93, 14,116,124,228,105, 0, 64, 73, 73,137,165,109,219,182, 39,225,174,167, 16, + 40,194,147,113,228,200,145, 36, 37, 13,222, 16, 66,192,113, 92,173, 97,195,134, 13, 24, 55,110, 92,168,188,103, 60,245,212, 83, + 73,202, 53,226,125,174, 59,157, 78,245,250,113,185, 92,112, 58,157,176,219,237,248,249,231,159, 67,105,130, 16,194,165,166,166, +190,212,187,119,239, 9,139, 22, 45, 50,125,245,213, 87,166,230,205,155, 67,163,209,128,231,121,240, 60, 15,142,227,192,243, 60, +134, 15, 31,254,151,169,155,193, 96, 48,174,124, 2, 26, 44,135,195,113,100,208,160, 65, 20, 0,236,118,123,186, 86,171,213,120, +207,151,101, 57, 45, 55, 55,247, 87,223,245, 66, 21, 29, 26, 18,147,241, 65,243,120, 0,192,168, 67,165, 0,220, 15,133, 37,215, +118, 81,151, 25,243, 91,185,123, 89,131, 1, 28,199, 5,189,233, 18, 66, 96, 54,155, 49,104,208, 32,104,181, 90,116,235,214, 13, + 26,141, 6,162, 40, 6, 28,194,193,100, 50,225,249,231,159, 7, 0, 8,130, 0,147, 94,135,251,122, 95, 3, 61,161,248,224,151, +253,176, 73, 50, 4, 65,128, 32, 8, 16, 69,177, 78, 68,202, 31, 26,141, 6, 5, 5, 5,224,121, 30,130, 32,212,250,229,121, 30, +203,151, 47,199, 45,183,220, 2,158,231, 97, 52, 26,129,191, 80,101,192, 75, 5, 93, 66, 35,124,209,199, 29,136,188,253, 88,165, + 58,253,187,209, 55,170,255,199,159,168, 6, 33, 4, 26,141, 38,188,227, 30, 21,133,255,222,114, 61, 0, 96,228,129, 51,234, 57, +179,251,245, 25, 16,181, 90, 8,162, 6, 29, 38, 63,133,146,146, 18,203,200,145, 35, 55,232,245,250, 21,161, 52, 41,165, 56,122, +244,168,170, 37,138, 98,157,243,158,227, 56,124,248,225,135,248,237,183,223,194,202,187,197, 98,193,204,153, 51,213,188,249,211, +245,254, 31, 42,239,132, 16, 46, 37, 37,229,197,222,189,123,143, 91,180,104, 81, 28, 33, 4,115,231,206,133, 32, 8,184,225,134, + 27,144,144,144,128,149, 43, 87, 66,163,209,224,241,199, 31, 15, 43,141, 12, 6,131,113,185, 16,208, 96,237,218,181,235,122,229, +255, 53,215, 92,179,111,195,134, 13, 87,121,133,242,225,114,185, 52, 46,151, 43, 83, 41, 54,116,185, 92,176,217,108, 24, 51,102, + 76,208, 55,122,201, 97,175, 53, 30,232, 38, 29,206,131, 75,193,110,183, 99,212,168, 81, 0, 16,210, 92,133,249, 96,128,205,102, +131, 32, 8,104,217, 36, 17, 79,143,202, 70, 46, 79, 97, 41, 5, 80, 82,141, 59, 83, 5,236,202,200,196,156,163,165,248,173,162, + 10,130, 16, 94,105,169, 44,203,181, 12,149,239,255,121,243,230, 97,244,232,209,224,121,190, 78, 17, 18,227,143, 65,118, 58,107, +141,251, 59, 6,245, 61, 54, 46,171, 21, 0,192,123, 25,114, 81, 20,161,213,235,193,139, 34, 4,173, 6, 37, 37, 37,150,129, 3, + 7,254,100, 48, 24, 22,164,164,164,156, 56,126,252,120, 64, 61, 66, 8, 40,165, 16, 69, 17,130, 32, 4, 60,231, 63,252,240, 67, + 44, 92,184, 16, 61,122,244, 8,235,156,183,219,237,208,104, 52,152, 49, 99, 70,157,249,239,188,243, 78, 29,131, 21, 66,143, 0, +224,146,147,147,239, 91,188,120,113,180,178,253,132,132, 4,136,162,136,172,172, 44, 68, 69, 69, 97,195,134, 13,144, 36, 41,108, +179,202, 96, 48,254,178,136, 0, 58, 3, 72, 4, 32, 1,168, 4, 16,235, 53,255,172,231, 55,209,107,124,155, 31,157,238,158,101, +148,249,202,184, 29,128,214,207,244, 82, 0, 6,207, 96, 3,176, 9, 64,150,215,118,148,245,188,211,177, 13,240, 24, 44,226,238, + 85,117, 45,128,190,254, 58,191, 83,138, 11,247,239,223,239,183,184,208,155, 80,205, 59,117,141,146,212,200,213,231, 45, 19,212, +233,163,139,202,212, 27,236,127,123,180,134,206,108, 66,246,115,175, 4,221,150, 39,237,176,219,237, 56,115,230, 76,157, 55,239, + 11, 53, 88, 0,224,116, 58, 97, 48,232,240,195,187,215,162,248,176, 11, 51,242,143, 97,217,214, 35, 16, 4, 1,195,174,106,141, +191,185,128,188,120, 61,254,233,146,224,144,105, 88, 15, 48, 74,105, 29,115,229,109,178, 8, 33,234, 52,246,176,249,115, 72,232, +220, 77,141, 92, 45,106, 28,165, 78, 87,162, 86, 0,176,172, 75, 51,232,163,204,200,122,104, 74, 72, 61, 66, 8,154, 15, 27,161, + 70,174,190,233,214, 2,130, 70, 3, 81,167,197,223,126, 57, 6,192, 93, 44,216,175, 99,187,117,101,188,246,163, 59,238,184,227, +240,154, 53,107,140,225,164, 85,163,209,212, 50,108,254,204,149, 32, 8,112,250,152,198, 64,233,180,217,108, 1,141,147,114, 93, +213, 39,130, 5, 0, 53, 53, 53,246,101,203,150, 97,206,156, 57, 72, 72, 72,192,160, 65,131,144,146,146,130, 37, 75,150,128, 82, +138, 7, 30,120, 0, 6,131, 1, 6,131,129,157,243, 12,198, 95,156, 16, 94,228,218,169, 83,167,102,231,229,229,205,236,217,179, +231,167,155, 54,109, 90, 76, 8,201, 87,102, 82, 74,135,121, 52,242,189,198,187,163,182,201, 18, 1, 36, 18, 66,242,149,229,189, +199,189,166, 15, 0,160, 85,198,167, 78,157,154,149,151,151, 55,115,202,148, 41, 79,206,154, 53, 75, 51,117,234,212,142,121,121, +121, 51,149,237,248, 75, 7,112, 62,130, 21,180, 23, 96,135,195,113,100,192,128, 1, 97,181,248,177, 88, 44,167,130,205, 87, 12, +154,191, 74,222,202, 52, 93,148, 25,134,168, 40,144,224,165,131, 42, 78,167, 19,130, 32,128,227, 56,172, 90,181, 10, 6,131, 1, + 67,135, 14,189,224, 34, 66,197,180,105,181, 26, 8,177, 28,238,120,109, 59,206,158,171, 81,139, 4, 87, 23, 29,195, 86,131, 1, + 79,183,235, 8,115, 85, 17, 42,108,246,144,154, 64,224, 8,214,232,209,163, 97,181, 90,193,113,156, 58,141,227,184, 6,237,203, +139, 17,156, 64,141, 16, 8, 33,208, 71, 71, 65,111, 54,131, 23, 66, 85,191,114, 67, 41, 61,111,132,180, 90,136, 58, 45, 4,141, +187,196, 93,137, 92,149,241,218,143, 78,156, 56,241, 19, 0,125,184, 6, 75,137, 96, 5, 51, 87,130, 32,192,225,112,132,101, 94, +108, 54, 27, 52,154,243, 53, 1,142, 30, 61,170,254,247,103,176, 66,228,153, 18, 66,100, 66,136,220,162, 69, 11,117,157,228,228, +100,196,198,198, 66,150,101,200,178, 12,189, 94, 15,131,193, 80,107,187, 12, 6,227, 47, 75, 48, 47,162,203,203,203,155,233,109, + 96,128,218,134,198,219, 56,249,152, 40,133,107,167, 78,157,154, 21, 44, 1,222,102, 75,153,166,108,151, 16,146, 63,107,214,172, + 97, 33,210,161, 68,210,206, 23, 17, 6,235, 21,214,187,184, 48, 18,248, 43, 98,241,126,128, 25, 98,162,161, 53,153,224,169,126, + 21,212,216, 17, 66,224,112, 56,212, 58, 39,247,222,123,111,192,183,122,239,186, 41,161,176,219,237,224, 57, 30,208, 53,135,140, + 45,234,195, 74, 29, 52, 26, 20, 53,233, 4,114,234, 4, 4, 33,188,250,254, 74, 4, 75, 49, 81, 15, 60,240, 0,230,207,159,175, + 86, 76, 6, 0,158,231,209,166, 77, 27, 28, 58,116, 40, 44, 77, 70,100,161, 52,112, 52, 82,153,174,143,142,130,206,108, 6, 31, + 70,164, 81,153,175,214, 97,210,235,192,107, 52, 16, 52,238, 98,193,155,110,186,105, 93, 89, 89,217, 71,237,219,183,255, 31,220, +221, 24,132,116, 66,202,245,227,239, 60,255,232,163,143,106,153,171,250, 68,176,148,235,200, 27,127,197,133, 35, 71,142, 12, 55, +130, 69, 9, 33, 84, 20, 69, 12, 24, 48, 0, 29, 59,118,196,178,101,203, 32,203, 50,238,191,255,126, 24, 12, 6,204,158, 61, 27, + 46,151, 11,121,121,121, 44,130,197, 96, 48,130,121, 17,203,148, 41, 83,158, 36,132,228,123, 34, 73,133,158,229,253, 25, 41,127, +116, 71,109,147,118,214,223, 66,222,145, 44,111,147,229,253, 95, 97,234,212,169, 89,126,210,161, 70,204, 84,131,229,229, 26, 27, +148,178,189, 5,106,133,118,165, 88,144, 16,130,239,114,174,130,214,108,130,222,108, 70,175,165, 63, 2,112,191, 53,227,197, 87, + 67,106, 58,157, 78,213, 56,149,150,150,134, 44, 34, 12, 7,167,211, 9, 94, 35,226, 39,179, 8, 42,242,181, 30, 88,162, 40,130, + 19, 68, 20, 37,102,130, 8, 43, 33, 72,174,176, 30, 14, 74, 36,195,187,245,212, 29,119,220, 1,142,227, 84,147,213,165, 75, 23, +239, 85,216, 19,231, 15,230,228,247, 43,240,237,109,238,107,213,187, 88, 48,191, 71, 43,232,162,204,208,153, 76,232,179,124,147, + 90,156,139,217,239,133,212,220,255,254,219, 40,124, 99, 22, 4, 81,196,136,157, 69, 0,220,145,171,220,171, 90,255,100, 55, 69, +127,116,244,232,209,159, 0,112,183,221,118, 91,108,215,174, 93,195, 10,139, 17, 66,106, 85, 60, 23, 4,193,175,185, 18, 4, 1, + 46,151, 43,172,188, 59, 28,142,176, 34, 73, 74, 20, 43, 20,148, 82,218,182,109, 91,240, 60,143,152,152, 24, 68, 69, 69,169, 45, +104,149,200,149, 82,127, 51,220,235,146,193, 96, 92,217, 4,241, 34,182, 89,179,102, 21,206,154, 53, 75,141, 36,121,150, 15,101, +174,110,128,219, 76, 37, 42,230, 12,238,186, 84,254,234,103, 41,105,168,163,233,107,184, 0,119,100,203, 79, 58,212, 98, 73,191, +181,179, 59,119,238,252,173,209,104,108, 30, 34,209, 42,245,233,116, 84,114,156,239,121, 64, 49, 87,132, 16,232,205,102,104,163, +204,208,153,205,181,230,133,130, 16,162, 22, 17,242, 60,175, 62,116, 22, 44, 88, 0,179,217,140,187,238,186,235,130, 42,185,187, + 13, 22,143,175, 53, 7, 0,141, 80,231,161,197,139, 34,142,198, 52, 6, 39,138, 16,164,240, 34, 4,229,229,229,224,121, 30,207, + 62,251, 44,242,242,242,212,102,244,222, 77,235,149,101, 25,127, 14,222,149,220,107, 69, 85,163,162,212,243,211,123,122,168, 58, +137,132, 16, 64,114,185, 91, 11,234,220,245, 32,149,200,149,221, 20,253,209, 85, 87, 93,165, 68,174, 56,163,209, 24,178,213,172, +162,233, 93,223,208,215, 92, 41, 81, 82,229,191,211,233, 12,235,156, 87, 12,214,252,249,243,131,190,140, 40,219, 13,247, 60,229, + 56, 14,235,215,175,199,206,157, 59,113,239,189,247,194, 96, 48,224,205, 55,223,132,203,229,194,244,233,211, 97, 48, 24,160,213, +106, 67, 11, 49, 24,140,191, 50,113,138,193,241,152, 36, 0,181,235, 92,121,155,160, 64, 69,133,158,136,211,250, 16,219,250, 6, +110, 99,230, 23, 37,146,230, 61,205,119,187,128,199, 96,249,126,203, 75,171,213, 54,223,184,113, 99,166, 44,203,144, 36, 9,193, +126,237,118, 59,110,189,245,214,176, 59, 29,149,157,110,131,197,249,180,148,211, 69, 71, 65,107, 62,255, 0,243,122,136,133,188, +139, 43, 17, 44,111,131,245,236,179,207, 66, 16, 4,204,159, 63, 31, 0,240,216, 99,143,213, 59,130, 69,101, 96,147,180, 22,105, +115, 59,129,126,164,199,233,245,251, 32,138, 34, 82,122, 12,132,156,253, 55,148,106,163, 97,242,212,171, 10,167,216,177,180,180, + 20,191,253,246, 27, 8, 33,120,228,145, 71,130,154,171, 85,171, 86,177, 58, 88,127, 2,138,193,226,120,119, 32,201,223,249,233, + 61, 61,156,243,147,186, 92, 16,117,186, 90,173, 5,203,202,202, 62, 58,122,244,232, 22, 0,100,220,184,113,177, 70,163, 17,239, +191,255,126, 13, 0,205,210,165, 75, 13,161, 52,189,235,241,249, 70,174,124, 13,150, 36,133, 46,194, 86, 94, 42,194,137,246,214, +199, 96, 41,231, 55, 33, 4,146, 36,169,145, 43,167,211,169,142,235,116,186,144, 58, 12, 6,227,202, 39,196,119, 69,207,250,212, +115, 34, 62,145,166,179,158,117,107, 25, 43,239,226, 64,175,255,222, 81, 17, 69,215,238, 83,116,232, 59, 93,249, 45,157, 53,107, +214, 15, 74,228,202,107,122,173,116, 0, 1, 34, 88, 28,199,193,102,179, 97,239,222,189,193,247,198,249,229,195,238,116, 52,161, +219,213, 24,243, 91, 57, 8, 33, 88,217,187, 61,244,102, 51, 52,102, 19,114,190, 88,171,222,176,139,242, 30,135,198,100, 70, 66, +175,129, 33,245,148, 27,183,175,193, 42, 43, 43,131, 40,138,120,241,197, 23,193,113, 28, 94,122,233, 37,164,167,167,163,184,184, + 24,125,250,244, 9,169,233,116, 58,193,201, 28,244,119,198, 67,255,207, 40,112,247,182, 66,214,141,255, 68,121,101, 51,236,182, +155,208,182,250, 0,226,190,127, 14, 14,217, 21, 86, 55, 13,132, 16,184, 92, 46,252,240,195, 15, 16, 69, 17, 46,151, 75,125,248, + 80, 74,213, 94,242,149, 78, 29, 95,122,233,165,176,246, 39, 35,178, 52,190,225,102,220,113,178, 6, 0,240,109,206, 85,208,153, + 76,208, 70,153,209,235,171,245,234,249,121,120,230,163,208,152,204,136,237,222, 59, 44,205,118,247, 63,134,182,247, 61,138,146, +146, 18,203,128, 46, 89,235,203,121,221,135, 29, 58,116, 80,235, 92, 25,141, 70,232,245,122,226, 25, 15,233,212,189, 77,121, 40, +115,165,252, 15, 7,167,211, 89,167, 21,174, 63,194, 45, 34, 84,224, 56, 14,119,221,117, 23, 82, 83, 83, 49,103,206,156, 90,145, +171, 39,159,124, 18, 78,167, 19,179,103,207, 14, 91,143,193, 96,252, 37, 9, 88,164,231,135,238, 94,102, 41,212,122,129,230,215, +103,123,126,241,123,231,181,217,108, 69,253,251,247,247,187,130,205,102, 75,215,233,116,181,238,174, 74,167,163,190, 69,133,132, +144, 14,148,210, 2,239,101,149, 74,196, 74,107, 44,157,217, 12,173, 79,177,139,214, 28, 5,209,100, 6,231,231, 38,238, 79,211, + 95, 4, 75, 41, 58, 41, 47, 47,135, 40,138,152, 51,103, 14,162,163,163, 97,179,217,252, 85,176,247,171,201,243, 60,106,126,171, +193,145,103,118, 67,103, 58,136, 54, 3,163, 16, 37, 30, 66,235, 31,151,194,229,178, 3, 94, 69,134,225,104,182,105,211, 6,207, + 62,251,108,157,238, 25, 2,209,173, 91,183,144,154, 23, 11,211,244,175, 73, 8,129, 46,202, 12,125, 84, 84,192,243, 83,240,211, +119,147,175,166, 50, 95,137, 92, 85,105,140, 31, 30, 61,114,100, 11, 0,110,220,184,113, 49, 70,163, 17,243,230,205,171, 1,192, +189,240,194, 11,198,166, 77,155,214, 57, 33,252,165,147,227, 56, 44, 88,176,160, 78,157,171, 64, 6, 43,156,116,186, 92,174, 58, + 6,107,212,168, 81,117, 58, 26, 13, 20,193,242,151, 78,165,174, 90,163, 70,141, 96, 52, 26,213,207,110,233,245,122,232,245,122, +181,119,248, 64, 69,173, 87,194,185,196, 52,153, 38,211,252,195,185,104,115, 20, 9,252, 26,172,159,127,254,121, 72,160, 21,114, +115,115, 15,108,220,184,177,181,247,183, 9, 93, 46,151,198,102,179,101, 14, 31, 62, 60,228,171,178, 44,203,208,233,116,160,148, +162,243,211,121,238, 87,120,238,124,145, 32,165, 20,177,185, 3, 64,120, 30,146, 36,195,233,116,134,108, 69,104,181, 90,107, 85, + 64,247,215,124,189,170,170, 42,104, 63, 63,190,154, 22,139,165, 86,189, 46, 34, 81, 28, 94,189,164,110,107, 66,207,118,194, 69, +175,215,215, 42, 54, 9,149,148,176,133, 25, 17, 65,233,192,147, 82,138,172, 7,167,184, 35, 69, 60, 87,107,126, 76,247,222, 32, +130, 8,217, 93,111, 41, 84,195, 16,114,246,236, 89,203, 77, 55,221,180,142, 82,250,193,240,225,195,127,133,187,130, 37, 53,155, +205, 58, 81, 20,101, 0,191, 3,160,231,206,157,139, 57,113,226,132,108,181, 90,155,132, 74,231,250,245,235,113,240,224, 65,116, +237,218, 85,141,124, 42,131, 82,124,127, 33, 17, 44,223,174, 24,124,199,195,237,166,193, 27,142,227, 16, 19, 19, 3,173, 86,139, + 23, 95,124, 17, 26,141, 6, 6,131,187, 20,116,246,236,217,234, 62,103, 48, 24,140, 43,137,122,127,176, 89,150,101, 62, 80,241, + 97,168,162, 66, 73,146,142, 95,125,245,213,245,221,222,233, 96,243, 41,165,199,127,252,241, 71,141,119,132,193,251, 55,192,180, +144,154,219,182,109, 83,155, 83, 5,211,244,250, 31, 84,211, 55,239,225,212, 95,113,185, 92, 39, 66, 46,196,136, 24, 46,151,235, +120,143, 30, 61,252,207,124,214,127,145,173, 36, 73, 65,143,187,211,233,252, 95,102,102,230, 73,179,217,252, 77,114,114,114,233, +198,141, 27, 19,186,119,239,158,224,189, 76,247,238,221, 83,125, 86,179, 35, 72,247, 36,132,144,227,119,220,113,135, 38,196,249, +232,251, 63,112,215,240, 30,205,194,194, 66,141,247, 58,161,126, 41,165, 65, 53, 61,252,118,253,245,215,115,254,174, 33, 95, 36, + 73,242,219,108,154,193, 96, 48, 46, 71,234,109,176,172, 86,235,177,254,253,251,251,109,247, 93, 83, 83,115,212,223,116,133,194, +194,194,236,250,110, 47, 20,199,143, 31,207,185, 28, 52, 27, 34,239,140,200,210, 16,199,168,176,176, 48,128, 99,187,112,142, 30, + 61, 26,241,243,179, 33, 52, 1, 96,207,158, 61, 61, 27, 66,151,193, 96, 48, 46,117,234,109,176,194,237,142,129,193, 96, 48, 24, + 12, 6,227,175, 74,232,190, 5, 24, 12, 6,131,193, 96, 48, 24,245,130, 0,232,224,111, 70,125, 90, 7, 16, 66,252,106, 4, 35, +148, 62,211,100,154, 76,147,105, 50, 77,166,201, 52,175, 60,205, 80,218,151,112,235,196,122, 65, 66,245, 68,125, 81,226,151, 73, +211, 80,166,201, 52,153, 38,211,100,154, 76,147,105,254,185,154, 87, 26,172,136,144,193, 96, 48, 24, 12, 6, 35,194,212,187,146, + 59, 35, 50, 16, 66,120, 74,105,216, 61,224,135, 65, 44,128, 64, 31,116,179, 3, 40,187, 64, 93, 45, 0,209, 51, 0,238, 79, 12, + 56, 61,154, 12, 6,227, 10, 34, 59, 59,123, 2,165,116, 6,220, 95,129,122,113,251,246,237,111,253,217,105, 98, 48, 46, 87, 2, + 26,172, 86,173, 90,109,231, 56, 46,195,223, 7,136, 3,245,139, 35, 73,210,241,125,251,246,133,213,212,157, 16, 34,164,166,166, +142, 50,153, 76,215,241, 60,159,235, 89,127, 99,117,117,245, 15,197,197,197,159, 83, 74,253,118, 5, 17,138, 22, 45, 90, 68, 91, +173,214, 91, 9, 33, 99, 1,128, 82,250,137, 94,175,255,207,225,195,135, 43, 46, 68,143, 16,210, 42, 37, 37,229, 19, 81, 20,249, + 99,199,142, 93, 7, 0,141, 27, 55,254,193,110,183, 75,103,206,156, 25, 75, 41, 61, 88, 79, 61, 78,163,209,228,245,238,221,187, + 23, 33,228, 99, 74,233, 59, 23,146, 46, 63,232, 56,142,251,205,223, 12, 89,150,155, 94,128,158, 6, 64,204,236,217,179,227, 23, + 46, 92,216,165,184,184,184, 35, 0,164,166,166,238, 30, 55,110,220,207, 15, 63,252,240,239, 0,202, 1, 56,130,170, 48, 46,121, + 50, 51, 51,183,115, 28,151, 81,159,190,228,136,251, 19, 85,199,247,236,217,227,247,122,207,204,204,220,206,243,124, 70, 48, 13, +127,255,101, 89, 62, 92, 88, 88,232,183,203,136, 54,109,218,108,230,121,190,121,168,180,249, 75,103,160, 46, 56,218,180,105,179, +157,231,249,140,250,106,202,178,124,184,160,160, 32, 80, 58, 47, 72,243,143, 78, 39, 0,244,237,219, 87, 87, 93, 93,253,137,217, +108,238, 84, 93, 93, 61,129, 82, 58,109,237,218,181,201, 28,199, 97,192,128, 1,211,178,179,179,143,232,116,186,185, 86,171,245, +103,179,217, 60,102,237,218,181,182, 64, 90, 12, 6,163, 54, 1, 13, 22,199,113, 25, 59,119,238, 76, 50,153, 76, 0,160,126, 47, + 79,233, 37, 90, 25, 40,165,160,148,194,229,114,161,111,223,190, 97,109, 52, 35, 35,163, 67,155, 54,109,150, 60,240,192, 3, 77, +110,188,241, 70,109,114,114, 50, 8, 33, 56,117,234, 84,102,126,126,254,237,115,230,204,121, 54, 35, 35,227,150,227,199,143,135, + 91, 81,142, 75, 77, 77,237, 15,224,206, 14, 29, 58,140,124,236,177,199, 52,185,185,185,144, 36, 9,223,127,255,125,239,215, 95, +127,125, 78, 90, 90,218,151, 0, 62, 42, 46, 46, 94, 67, 41,149,195,212,237,210,188,121,243,255,172, 95,191,190,121, 81, 81,145, + 52, 98,196,136,143, 1, 96,227,198,141,157, 40,165, 36, 55, 55,247, 91, 66,200,173,148,210,159,195,202,184,155,225,147, 38, 77, +186,229,254,251,239, 79,156, 48, 97,194, 56, 0,239,120,182,165,124,228,178,190,149,226,212,200, 21,165, 84, 19,100,185,100,132, + 31,201, 50, 29, 62,124, 56, 54, 55, 55,247,254, 51,103,206, 76,246,214, 61,125,250, 52,118,237,218,229,120,233,165,151, 94,223, +184,113,227,219, 45, 90,180, 40, 3, 80, 93,207, 52, 51, 46, 33,120,158, 79,223,190,125,123,146,209,104, 84, 63,228,238,125,157, + 43,215,184,247,169, 73, 41,197,181,215, 94, 27, 76, 51, 99,199,142, 29, 73, 6,131, 65,189,119, 4,211,243,210, 12,104,216, 57, +142,107,186,109,219,182, 36,163,209, 8, 74,105, 72, 61, 66, 8, 40,165, 65,191, 61,170,164, 83,175,215,135,165,169,144,155,155, + 27, 48,250, 92, 95, 77, 37,157, 61,123,246, 12,120,237,243, 60,159,177,115,231,206, 36,229, 43, 24,245, 72,103,208, 23,160,234, +234,234, 79, 62,255,252,243, 17,201,201,201, 24, 62,124,248,202,246,237,219,107,141, 70, 35,190,253,246, 91,100,100,100, 52,138, +142,142,254,239,172, 89,179,240,234,171,175, 54, 89,181,106,213, 98, 0, 35,130,233, 49, 24,140,243, 4, 51, 88, 48,153, 76,248, +244,211, 79,253,126,126,198,247,127,211,166, 77,195,218, 96, 74, 74, 74,118,179,102,205,214, 45, 93,186,212,144,148,148,164, 78, +119, 56, 28,136,142,142,198, 93,119,221,165, 29, 48, 96, 64,235,219,111,191,253,167,148,148,148, 62,167, 78,157,218, 30, 76, 47, + 53, 53,117,100, 86, 86,214, 91,147, 39, 79, 78,190,233,166,155, 16, 23, 23, 87,107,254,176, 97,195, 48,116,232, 80,205,225,195, +135, 71,127,254,249,231,163, 63,254,248,227, 83,169,169,169,147,138,139,139,191, 12,166,107, 50,153, 6,116,238,220,249,253, 53, +107,214,100,196,198,198, 34, 45, 45,141,123,230,153,103, 58,180,108,217,210,144,154,154,202,157, 60,121, 18, 95,126,249,101,203, +113,227,198, 45,211,235,245, 19,172, 86,235,154, 80,121, 39,132,104,227,227,227, 31,255,231, 63,255,153, 80, 89, 89,233,218,185, +115,231, 65,101,186, 78,167,155,118,205, 53,215,116, 37,132,124, 70, 41,253, 40,148,150, 23,106,228,138, 82, 90,129,243, 69,121, + 10, 78,101,126,152,145, 44,237,206,157, 59,227,114,115,115,191,178,217,108, 93,255,254,247,191,159,120,229,149, 87,180,209,209, +209,209, 0, 72, 89, 89,217,185,231,159,127, 94,122,243,205, 55,159,104,223,190,125,255,141, 27, 55,142,232,218,181, 43, 43, 50, +188,204, 49, 26,141, 88,190,124,185,223,207, 76,249,187,230, 99, 99, 99, 67,126,141,192, 96, 48, 96,213,170, 85,234,122,222,159, +150,242,247, 63, 54, 54, 22,148,210,160,162,122,189, 30, 27, 54,108, 80, 63, 3, 20,232,190,164,252, 26,141, 70, 16, 66,130,214, + 53,213,235,245, 88,183,110, 93, 72, 45,229,215,108, 54, 3, 64,224,143,136,122,165, 51, 84,158,149,255, 38,147, 41,228,254,212, +233,116,170,166,183, 70,160,113,207,203,113, 80, 81,131,193,208, 41, 57, 57, 25, 91,182,108,193,115,207, 61,167,205,202,202,194, +129, 3, 7,192,113, 28, 38, 76,152,128,246,237,219,227,212,169, 83,104,223,190, 61, 54,108,216,208, 37,104, 2, 25, 12, 70, 45, + 66,214,193, 10,116,131,245,253, 15,212,253, 12,134,111, 11,131,102,205,154,233,204,102,243, 23,203,151, 47, 55, 36, 36,156,255, + 90,136,221,110, 71,101,101, 37,170,170,170, 80, 89, 89, 9,147,201,132,185,115,231, 26,198,142, 29,251, 69,179,102,205, 50,139, +138,138,108,129, 52, 9, 33,175,239,218,181, 43,217,229,114, 65,171,245, 95, 5,137,227, 56,180,106,213, 10,147, 38, 77, 66,175, + 94,189, 82, 70,143, 30,253, 58, 0,213, 96,249,107, 9,145,154,154,250,246,198,141, 27, 51,180, 90, 45, 14, 28, 56,128,227,199, +143, 99,226,196,137, 77,101, 89,198,177, 99,199,112,224,192, 1,156, 60,121, 18,239,189,247, 94,198,216,177, 99,231, 2,104, 29, + 44,239, 30,238,121,228,145, 71, 90,199,197,197,113,175,188,242, 74,121, 85, 85,213,123,158,233, 83,103,207,158, 61,166, 79,159, + 62,137,127,255,251,223, 41, 33,228, 83, 74,105, 29,195,226,163,233, 47,114, 37, 81, 74,247,249,172,214,214, 39,178,149, 12,247, +183,240,202,253,104, 18, 0,209, 67,134, 12,121,212,102,179,117,253,241,199, 31, 15,246,234,213,171, 41,128, 98, 74,233, 89, 0, +136,139,139, 51,189,241,198, 27,201,195,134, 13,251,117,192,128, 1, 93,135, 12, 25,242,232,217,179,103,103, 0, 40,129,231,243, + 46, 13,209,178,132,105, 54,156,166,167, 40, 9,130, 32,224,250,235,175, 7, 33,196,239,247, 54, 55,111,222,140,254,253,251, 67, + 20, 69,220,125,247,221, 97,107, 14, 30, 60, 24, 46,151,171,142,158,175, 1, 33,158,111,116, 6,203, 59,165,180,214, 55, 66,253, +153, 11,239,193, 87,207,159,166, 44,203,126,181, 2,153, 44, 66, 72,208,123,157,119,222,195, 53,151,161,210,233,173, 41,138, 34, +114,114,114,176,115,231,206,160,102, 43, 84, 58, 1,160,186,186,250,206,225,195,135,175,156, 56,113,162, 30, 0, 74, 74, 74,106, +125,136,126,255,254,253,176,217,108, 88,180,104, 17,108, 54,219,189,117, 18,233, 71, 51, 18, 48,205,191,166,102, 8, 68, 0,157, + 1, 36, 2,144, 0, 84,194,253, 28,180,195,253, 44, 44, 5, 96,240, 12, 54, 0, 85, 0, 26,121,214, 45,129,251,249,230,253,153, +178,179,168,253, 81,232,238, 30,109,229,147, 93,137, 94,243,148,109,248,142,251,254,214,210,230, 0,128, 16, 66, 61, 67, 31,101, +174, 18,182, 14,199, 92, 41, 55,199, 80, 80, 74, 31,152, 58,117,106,178,183,185,178,217,108,168,168,168, 64,101,101,165,250,123, +224,192, 1,104,181, 90,140, 26, 53, 42,153, 82,250, 64, 8, 89, 13,207,243,216,185,115, 39,150, 46, 93,138, 35, 71,142,212, 89, +224,208,161, 67,120,227,141, 55,240,234,171,175,162,162,162, 2,112,215, 47,242, 75,231,206,157,159, 27, 59,118,236, 79,125,251, +246,213, 9,130,128, 93,187,118, 33, 51, 51, 19,155, 54,109,194,209,163, 71,113,238,220, 57,236,223,191, 31, 29, 58,116,192,193, +131, 7, 81, 81, 81,129,172,172, 44, 93,183,110,221,126,108,214,172,217,115,129,116, 9, 33,154,244,244,244, 39,255,249,207,127, +234,138,139,139,229, 5, 11, 22,108,164,148,110, 34,132, 76,124,234,169,167,198, 15, 30, 60, 56,113,223,190,125, 21,219,182,109, +219,238,207, 92,249, 65,199,113,220, 81,142,227,126,163,148, 86, 80, 74, 45,112, 87, 62, 87,241, 20,221,218, 44, 22, 75,121,105, +105,105, 9,199,113,191,113, 28,119, 0,128, 46,144,230,184,113,227, 90,150,148,148,220,255,240,195, 15, 31,233,213,171, 87, 83, + 74,233,126, 74,105, 41,220, 39,172,205,229,114,149,150,149,149,253,154,155,155,155, 58,102,204,152,131, 37, 37, 37,247,143, 27, + 55,174,101, 16, 77,198,165, 15,149, 36, 9,162, 40, 98,237,218,181,216,176, 97, 3, 54,108,216,128,141, 27, 55, 98,211,166, 77, +216,188,121, 51, 54,111,222, 12, 65, 16,176,105,211, 38,108,218,180, 9,147, 38, 77, 10,121,205, 75,146, 4, 65, 16,176,110,221, + 58,108,221,186, 85, 29,182,109,219,134,173, 91,183,194, 96, 48,132, 52, 67,222,120,234, 41, 5, 52, 83,111,191,253,182,106, 14, +149,123, 19,199,113, 65,163, 98,190,198,197,215,176, 52,109,214,172,206,188, 80,233, 4,160,106,254,251,223,255,198,137, 19, 39, + 48,103,206, 28, 28, 58,116, 8, 47,191,252, 50, 10, 11, 11, 49,125,250,116,108,219,182, 13, 83,167, 78,197,143, 63,254,168,124, +252, 61,104,245, 0,197, 8,230,228,228,192,225,112,168,233,217,191,127, 63,102,206,156,137, 93,187,118, 97,218,180,105,216,188, +121, 51, 30,127,252,113,240,124,208, 32, 27,178,179,179, 39, 16, 66, 62,111,211,166,141,174, 95,191,126, 16, 4, 1, 51,103,206, +148,167, 77,155,118,230,169,167,158, 58,147,159,159, 79, 91,182,108, 9,187,221,142,168,168, 40, 80, 74, 63,202,206,206, 14,117, + 63,102, 48, 46, 24,127, 94,196,139,107,167, 78,157,218,143, 16,146,159,147,147, 51, 14, 64, 44, 33, 36, 31,128,214,243,155, 48, +117,234,212, 30,132,144,252,169, 83,167,102, 3,104, 68, 8,201,247,140, 95, 7, 32, 65, 25,247, 44,239,109,160, 68, 0,137, 94, +211, 19,125,150,213,250, 27,247,253,245,213, 86, 35, 88,148, 82,226,185,192,213,155,145,114,211, 13,215, 96,133,186,225,154,205, +230,161, 67,134, 12, 81,205,141,205,102,171, 21,185, 82,126, 43, 43, 43,241,235,175,191,162, 67,135, 14, 26,179,217, 60, 20,192, +191, 66, 29, 24, 65, 16,144,150,150,134,146,146, 18, 20, 20, 20,160,105,211,166,112, 58,157, 88,177, 98, 5,202,202,202,160,209, +104,160,209,104, 96,183, 7,247, 46,109,219,182,189,126,225,194,133,217, 31,127,252,241, 57, 65, 16,176,127,255,126,124,242,201, + 39,160,148,162, 81,163, 70,168,169,169,193,153, 51,103,240,250,235,175,195,225,112,192,108, 54, 35, 61, 61, 93,255,192, 3, 15, +244,122,254,249,231, 69, 0,207, 5,144,190,122,228,200,145,209, 81, 81, 81,120,232,161,135,100,135,195,241, 42, 33,228,154,145, + 35, 71, 62, 57,105,210,164,248,162,162, 34,251, 61,247,220,179,221,225,112,188, 14, 0,132, 16,145, 82,234, 12,160, 5, 32,120, +228,202,229,114, 41,251,244, 72,101,101, 37,146,146,146,154, 80, 74, 53, 33,142,145,102,211,166, 77, 57, 0,248, 23, 94,120, 65, + 79, 41, 61, 13, 47,211,230,112, 56, 20, 77, 87,121,121,249,153,199, 31,127,220,181,120,241, 98,222,179,206, 94, 0,214, 96,226, +140, 75, 19,197,184,136,162,136,235,175,191,190,150,161, 88,191,126, 61,134, 12, 25,162, 94,239, 26,141, 70, 93, 46,148,166,119, + 84, 76,137, 60, 41,186, 63,252,240, 67,157,200, 75,152, 47,105,106,132,197,159,241,241, 53, 93,202,139, 98, 48,252, 69,155,188, + 35,243,254, 34, 67,225,164, 83, 20, 69, 76,154, 52, 9,130, 32,224,241,199, 31,135, 40,138,232,220,185, 51, 4, 65, 64,207,158, + 61, 33, 8, 2,174,187,238,186,176, 95, 80,149,116,110,222,188, 25,221,186,117, 83,211,211,185,115,103,116,239,222, 29,130, 32, +160,119,239,222, 16, 4, 1,131, 6, 13, 10,169,169, 84,104, 55,155,205,248,245,215, 95,193,243, 60, 8, 33,165, 59,118,236, 72, + 6,128,231,158,123,174,196,106,181, 38, 88,173, 86,244,239,223, 31, 57, 57, 57,137,139, 23, 47,126, 6, 0,107, 89,200,104, 48, +252,121, 17, 15,186,188,188,188,153,148,210, 97,129,214, 85,230, 19, 66,242,103,205,154, 53,204,163, 87,103,220,179,184,247,199, +229,175,157, 58,117,106,150,215,248, 89,101, 61,239,237, 5,219,182,207,242,103, 1, 47,131,229,201, 80, 95,175,113,191, 6, 43, +144,209, 10,231, 6, 97,181, 90, 59, 43,209, 43,171,213, 90,203, 80, 85, 85, 85,213, 50, 90,118,187, 29, 45, 90,180,128,213,106, +237, 28, 82,216, 11, 66, 8, 82, 83, 83,225,112, 56, 48,127,254,124,213, 88, 41, 56, 28,193, 27,189,237,217,179,231,200, 79, 63, +253,212,181, 91,183,110,113, 95,125,245,213,217, 1, 3, 6, 36, 14, 30, 60, 24,122,189, 30, 86,171, 21, 46,151, 11, 87, 95,125, + 53,218,182,109,139, 51,103,206,224,219,111,191, 45,201,204,204,108,180,101,203, 22,249,212,169, 83,191, 5,145,238,223,191,127, +127, 16, 66,240,237,183,223,254, 78, 41,221, 97, 48, 24,190,156, 57,115,102,172,205,102,147,199,143, 31,127,236,247,223,127,127, + 28,128, 83,167,211,253,107,224,192,129, 87,243, 60,255,153, 36, 73,245,190,153,217,108,182, 90,251,182,178,178, 18, 70,163, 49, +156, 46, 33,196,178,178,178,142, 0, 96, 52, 26,227, 1,168,249, 47, 19, 36, 0, 0, 32, 0, 73, 68, 65, 84, 45, 36, 45, 22,139, +122,140, 60,199,199, 26, 31, 31,111, 2, 0,207, 58,190,117,191, 24,151, 17,202,195,123,237,218,181,181,174,111, 37, 2,229,123, +205,107,181, 90, 44, 95,190, 60, 44, 77,111, 51, 21, 70,113, 94,208,104,147, 98,176, 4, 65,192,123,239,185, 75,216, 31,122,232, + 33,117,125,223,109,132,194, 59, 82, 47, 8, 2,218, 62, 43, 3,112,224,248,107,122,136,162,251,148,246, 77, 51,128,176,163, 98, +115,230,204,193,176, 97,195,144,159,159, 31,244,119,232,208,161, 97,165, 83, 16, 4,232,116,238, 96,177,146,158, 93,187,118,249, +213,157, 55,111, 94,200, 58,109,178, 44,227,155,111,190, 1,199,113,181, 34, 94,207, 60,243,204, 63,163,163,163,205,235,214,173, +195,233,211,167, 81, 93, 93,141,170,170, 42,196,197,197,197, 14, 24, 48, 96,215,169, 83,167,138,246,236,217,195, 42,188, 51, 34, +142,175, 23,241,194, 50,101,202,148, 39, 9, 33,249, 83,166, 76,121,114,214,172, 89,133,158,229,243,125,214,207,247,179,110,173, +249, 30, 19,164, 20, 15,118, 71,109,243,166, 20, 29,222, 16,100, 93,187,143,161,242, 45, 34,220, 6,132,136, 96,249,214, 77, 8, +246,223, 19,226, 14,150, 47,200,178, 44, 16, 66,234, 24, 0,127, 17, 44,167,211,137,210,210, 82,200,178, 28,209,190,186, 66, 25, +172,130,130,130,187, 38, 76,152,112, 50, 38, 38,166, 83,105,105,105,177, 78,167,235,189,126,253,250,198, 78,167, 19,209,209,209, +136,142,142,198,127,255,251, 95,196,196,196,224,225,135, 31, 62,106,177, 88, 54,153, 76,166,100,139,197,242,203,169, 83,167,158, + 14,164, 43,138, 98,255,222,189,123, 99,199,142, 29, 40, 43, 43,251,158, 16,210,233,239,127,255,251,160,198,141, 27,147, 25, 51, +102, 88, 15, 30, 60,248, 22,128,179, 38,147,233,223, 11, 23, 46,236,211,181,107, 87,243,248,241,227, 65, 8,121,159, 82, 26,118, +100,168,166,166,166,150,177, 82,246,105, 84, 84, 84, 88,125,110,121,246, 55, 37,132,168, 13, 26,189,141,149,151, 1,166, 60,207, +203, 0,104,164,143, 17,227,143, 69, 49, 4,162, 40,226,198, 27,111,172, 83,185, 93,163,209, 96,229,202,149,184,249,230,155,213, + 23,150,110,221,186,133,212, 85, 12,193, 77, 55,221, 4,192,109, 8, 86,174, 92, 25,208, 96,133, 42,210, 2,106, 71,155, 30,124, +240, 65,136,162,136,183,222,122, 11,147, 39, 79, 6,207,243,120,237,181,215,192,113, 28,158,121,230,153,176,243,239, 93, 68,120, +228, 37,247,111,198, 35, 21, 40,125, 39, 25, 0, 16, 21, 29,237,206,143, 28, 86,227,227, 90,121, 15, 21,185,242, 54, 86,161,138, + 8,189,163,128, 7, 14, 28, 80,255,247,236,217,179, 86,228, 74, 16,132,144,134,205,179,189,233,253,250,245,155,145,145,145,145, + 52,113,226, 68, 34, 8, 2,178,179,179, 27, 77,155, 54,173, 92, 20, 69,253, 99,143, 61,230,175, 42,133, 8,160, 83,187,118,237, + 76, 97,239, 12, 6,163, 30, 4,137, 96,217,102,205,154, 85, 56,107,214, 44,191, 17, 42,175,245,135, 5, 51, 89, 94, 81,168,238, +112, 27,161, 68,197,180,193, 93, 21,102, 91, 24,235,106, 21,115,229, 27,229,242,198, 55,130,245,188,247,204,112, 13, 86, 56,245, + 39, 0,192,104, 52,238, 46, 41, 41,233,169,211,233, 80, 81, 81, 81,231,161,237,109, 10,120,158,199,153, 51,103, 96, 52, 26,119, +135, 20,174, 7,161,138, 8, 61,102,230, 81,101,156, 16,210,125,212,168, 81,139, 63,251,236,179, 22,171, 87,175,198,150, 45, 91, +208,168, 81, 35,204,156, 57,243,112, 81, 81,209, 24, 74,105,192,131,225, 77,203,150, 45,219,155,205,102,108,220,184, 17, 0,126, + 4,112,231,125,247,221, 71, 28, 14, 7,230,206,157, 91, 3, 96,117, 76, 76,204,151, 75,150, 44,233,212,169, 83, 39,221,234,213, +171, 43,183,108,217,178, 54, 76,115, 37, 81, 74,253, 26,171,202,202, 74, 84, 87, 87,195,108, 54,135, 99,176, 92,209,209,209, 5, +149,149,149,183, 90, 44,150, 10,157, 78, 23, 85, 81, 81, 97,243,142, 48, 86, 85, 85,161,186,186, 26,130, 32,136, 7, 14, 28, 56, + 9,160,101,116,116,116, 1,128, 11,234,183,140,241,231,195,113, 28, 85, 76,198,234,213,171,253, 94,235,162, 40, 98,197,138, 21, +181,174,247,111,191,253, 54,160,166,119, 20, 71,105, 73, 24, 42,130,165,172, 26, 42,189,162, 40,130,231,121,188,243,206, 59,160, +148,170,145, 43,142,227, 48,101,202, 20,232,116, 58,188,248,226,139,152, 50,101, 74, 88, 81, 44,239,168, 88,243, 39, 44,234,116, +101, 93,135,221,238,142,210,115,156,183,201, 10, 43,210, 22,170,130,123,184,248, 70,218,116, 58, 93,192,202,237,190,171, 6,210, +220,190,125,251, 7, 93,187,118, 61,152,152,152,184, 42, 39, 39, 71,183,125,251,118, 76,154, 52,137,216,108,182,232,213,171, 87, +171,219,245,133, 82,138,234,234,106,125,216,137,103, 48,234,129, 63, 47,226, 33, 78, 49, 78, 30, 51, 20,174, 94,190,247,242,138, +134,175, 41,242, 68,196,214,135,210,242,183,110, 32, 4,207,194,117,174, 34,223,155, 68, 40,163, 21,206,219,167,197, 98, 89,179, +118,237,218,238, 55,223,124,179, 16,172,120,176,170,170, 10,201,201,201, 56,116,232,144,203, 98,177,132,236,254, 64,146,194,239, + 16, 61, 84, 4,203, 23, 74,233,182,172,172, 44,151,195,225, 64,235,214,173,145,158,158, 14,139,197,130, 55,222,120,195, 21,174, +185, 34,132,104,178,179,179,121, 0, 40, 47, 47, 7,220,173, 29, 50, 51, 51, 51,177, 99,199, 14,156, 59,119,110, 25,128,254,207, + 63,255,124,151,107,174,185, 70,243,217,103,159,213,220,123,239,189,203,156, 78,231,140,112,244,101, 89,182,187, 92,174,230, 28, +199, 57,202,202,202, 78,120, 27,171,228,228,228, 56,179,217,204,157, 57,115, 38,104,125, 46, 15,142,142, 29, 59,110, 61,126,252, + 56, 94,120,225,133,179, 51,103,206,204,172,172,172, 60, 87, 94, 94,238, 82,140, 85, 69, 69, 5, 44, 22, 11,151,152,152,168,155, + 55,111,158, 17, 0, 58,118,236,184, 21,172,195,209,203, 26,223, 6, 45,190,230, 42, 84,139,183, 64,154,130, 32, 96,248,240,225, +117, 34, 98,202,176,100,201,146, 90,245,154, 66, 21,189, 41,154,111,191,253, 54, 30,122,232, 33,232,116, 58,204,158, 61,187, 86, + 29, 44,127,171, 6,211, 4,220,166,173,249, 19, 22,156,122, 51, 30,162, 40, 34,225,222,211,181,138, 8,253,228, 45, 44, 35, 56, +115,230,204,136, 20, 17, 42, 8,194,249, 46,113,230,207,159,143, 81,163, 70,225,199, 31,127,188,224, 34,194,230,205,155, 47,124, +227,141, 55,116,123,247,238, 69, 69, 69, 5,206,158, 61, 11,171,213,138, 99,199,142, 41,249,244,187, 94, 77, 77,141, 33,172, 4, + 51, 24,245, 32,196,249,122,214,167,254, 20,241, 46,174, 11,242,235,187, 60,188,166,121,235,158, 69,237,134, 98,222,211,125, 77, +149,239, 54,188,151, 81,235,118, 5,125,133, 82, 34, 88,225, 26,172, 48,138, 8, 95,127,246,217,103,239,239,213,171, 87,124,116, +116, 52, 78,158, 60,233, 55,130, 21, 29, 29, 13,135,195,129,181,107,215, 86,200,178,252,122, 80, 81,192,233,116, 58,145,148,148, +132,146,146, 18,200, 1,194,248, 28,199,193, 96, 48,160,170,170, 10,240,105,109, 23, 10, 74, 41,156, 78, 39, 28, 14, 7, 28, 14, + 7,156,206,122,173, 14, 0, 6,165,195,214,234,234,106, 0,168, 78, 75, 75,107,169,215,235,149, 86,143, 7, 0,244, 27, 60,120, +176, 88, 90, 90, 74,239,185,231,158,205,148,210, 73, 52,120,111,246,246,181,107,215, 54, 3, 0,131,193,112, 0, 0,142, 29, 59, +230, 44, 43, 43, 67, 85, 85,149, 26, 33, 52, 24, 12, 24, 49, 98, 68, 10,165, 20,107,215,174,109,166,209,104, 40, 2,155, 33, 91, +126,126,254,158,152,152,152,197,121,121,121, 99,110,184,225,134,194,142, 29, 59, 54,175,170,170, 58, 83, 83, 83, 99,177, 88, 44, + 84, 16, 4, 77, 66, 66,130,110,213,170, 85, 7, 55,111,222, 60, 48, 58, 58,122,113,126,126,254, 30,184, 67,171,140,203, 16,223, +186, 77,254, 76,149,119, 69,242,112, 53, 1,183, 33, 88,177, 98, 69,208, 40, 78,184,154, 10,130, 32,224,209, 71, 31,197,155,111, +190, 89, 39,130, 53, 99,134,251,157,228,169,167,158,170, 87,132, 72, 16, 4,156,122, 51, 30, 41, 15,254, 94,107, 26, 0, 16, 79, +250,234, 83, 68,168,172, 63,125,250,116,136,162,168, 22,225, 13, 28, 56,176, 86,209, 96,184,198,202, 91,243,204,153, 51, 16, 4, + 1,241,241,241, 24, 51,102, 12, 6, 13, 26, 84, 71, 47, 92,221, 99,199,142,253,252,234,171,175, 54, 73, 79, 79,199,103,159,125, +102, 55,153, 76,218,126,253,250,209,242,242,114, 2, 4,142, 96, 89, 44, 22, 22,193, 98,252,209,132, 21,208,136,160,238, 69,111, + 47,224, 29, 40, 18,221, 52, 16,159,175,109, 23, 21, 21,149,167,166,166,142, 29, 61,122,244, 87,239,188,243,142,161,101,203,150, +216,191,127, 63,206,157, 59, 7,135,195, 1,141, 70,131,180,180, 52, 84, 85, 85,225,139, 47,190,168,169,169,169, 25, 91, 92, 92, + 92, 30, 76,147, 16,242,212,245,215, 95, 63,239,233,167,159,214,183,111,223, 30,231,206,157, 67, 85, 85,149,250,230, 69, 8, 65, +116,116, 52,140, 70, 35, 10, 10, 10,176,121,243,102, 11, 33,228,169, 96,154,190,200,178,172, 26, 43,197,104,133,106,153,228,163, +105, 50, 26,141, 0,220,117,164, 0,184,154, 52,105,146, 12, 64, 49, 88,191,181,104,209,226,233, 86,173, 90,145,133, 11, 23, 82, + 74,233,106,127,230,202, 71,243, 92,159, 62,125,202, 0, 36,219,237,118, 13, 0, 84, 84, 84, 56, 18, 18, 18,146,116, 58,157,172, +211,233,100,189, 94, 47, 23, 23, 23,187, 92, 46,151, 6, 0,250,244,233, 99, 7,112, 26,158,254,170,252,104,202, 0, 42,231,206, +157,251,220,157,119,222,217, 51, 55, 55, 55,235,158,123,238,217,123,239,189,247, 34, 61, 61, 61,174,170,170,202,122,224,192,129, +178,119,222,121,199,186,117,235,214,129,162, 40,254, 54,119,238,220,231,224,238,143, 68, 14,160, 25, 17,152,102,195,105, 42,117, +127,252, 25, 43,239,241, 48,186, 81,168,149, 78,197,180,221,122,235,173,106,235, 67,223,200, 85,125, 53, 1,168, 45, 8,255,239, +255,254,175, 86,250,158,126, 58, 96, 21,200, 90, 55, 39,159,188, 67,201,187, 32, 8, 40,159,159, 94,203,252,133,107,170,252,105, + 10,130,128,105,211,166,133, 29,193,242,173,131, 21, 44,157,125,250,244, 65,117,117, 53, 68, 81,196,202,149, 43, 3, 70,176, 66, +237, 79,131,193, 48,102,217,178,101,159,232,116,186,142,118,187,253,238,146,146,146, 5, 53, 53, 53, 77,202,202,220, 31,124, 8, +116,159,179, 90,173,106,183, 44,151,227, 57,207, 52, 47, 77,205, 43,141,160,175,120, 46,151, 11,141, 27, 55,174,245,109, 43,165, + 50, 59,207,243,106,203,147,112, 90, 16, 42, 20, 23, 23,175, 76, 77, 77, 29, 57, 98,196,136, 69,119,222,121,103, 84,219,182,109, +197,166, 77,155,194, 98,177,160,168,168, 8, 69, 69, 69,174,239,191,255,190,162,166,166,230,246,226,226,226,149,161,244, 78,156, + 56,241,113,114,114,242,138,113,227,198, 77,235,210,165,203,196,201,147, 39,243, 45, 90,180, 64,121,121, 57,226,226,226,144,152, +152,136,162,162, 34,124,241,197, 23, 82, 89, 89,217, 60, 73,146,166,159, 62,125,250,108, 40, 93,159,253,192, 59,157, 78,140, 30, + 61, 26,178, 44, 99,246,236,217,112,185, 92,161,203, 68,207,227,112, 56, 28, 20, 0, 41, 41, 41, 1,128, 26,197,112,253,239,127, +255, 3,128,163,205,154, 53, 51, 3,192,154, 53,107, 8,128, 77, 97,234, 82,120, 69,178,218,182,109, 91, 4,212,190, 41, 42,145, + 43,207,168, 29, 94,230, 42, 0,214, 49, 99,198,156,181,217,108,131, 31,121,228,145,105,243,231,207, 31, 51,127,254,252, 58, 11, + 69, 71, 71, 47,126,237,181,215,166,143, 25, 51,230, 44, 88,247, 12, 87, 4,190,209,170,250, 86, 1, 8,164,249,245,215, 95,251, +141, 96,213, 55,114,165,116, 5,227,175, 69, 98,176,123, 80,168,151, 33, 37,157,190,186,245,185,175,249, 75,171, 32, 8,120,229, +149, 87,212,200,149,119,229,243, 11,137, 96, 41,154,241,241,241, 0, 0,147,201, 4, 89,150, 49,116,232,208, 11,214,245,124, 91, +112,164, 50,158,157,157, 61,253,211, 79, 63,157, 65, 41, 77, 0, 32,120,239,131,112,246, 35,131,193, 56, 79, 64,131, 37, 73,210, +113,229,219,130,222, 6,203,251,215,247,191,203,229, 58, 30,206, 70,139,139,139, 87,180,104,209,162,197,252,249,243, 31, 50,153, + 76, 3,172, 86,107, 71, 0,208,235,245,187,171,171,171, 87,115, 28,247, 70,113,113,113,216, 31,103,246, 24,166, 7, 50, 50, 50, +102,143, 27, 55,110, 70, 78, 78,206, 45,247,220,115, 15, 17, 4, 1,159,127,254, 57, 61,113,226,196, 18,142,227,158, 58,121,242, +228,161,112, 53,189, 49, 26,141,191, 46, 89,178,164,229,215, 95,127, 13,167,211,137,121,243,230, 65,167,211,253, 26,238,250,148, +210,179,130, 32, 44,202,205,205, 29,179,121,243,230,197,148,210, 2,157, 78,247,201,181,215, 94, 59,118,211,166, 77,255,161,148, +238, 21, 4,225,147,156,156,156,177, 91,183,110,253,146, 82,250, 75, 61,146,167, 70,178, 92, 46,255, 37,138,254, 34, 87, 33,168, +152, 48, 97,130, 99,194,132, 9,143,220,114,203, 45,243,119,236,216,113,181,210,125, 67,108,108,236,238,110,221,186,109, 89,178, +100,201,126,184, 35, 87,204, 92, 93,230, 40, 21,210,227,226,226,192,113,156, 58, 40,189,121,215,215, 8, 41,154,148, 82,196,197, +197,249,125, 49, 11,162, 25,212,213, 80, 74, 97, 54,155, 85,205, 48, 91, 47,135, 12, 67,153,205,230, 90,105, 12,131,128,215,146, +146,119,223,116,134, 34, 88, 62, 20, 77,147,201, 4,135,195, 17,182, 38,194,104, 52,224,205,246,237,219, 63, 0,240, 65,235,214, +173,255, 7,160, 21, 51, 85, 12,198,133, 19,208, 96,237,219,183,207,239, 87,221, 35,197,225,195,135, 43, 0, 76,247, 12, 17,225, +248,241,227,135, 0,220,154,146,146,242,175, 77,155, 54, 61, 3, 0,178, 44,191, 16,234,123,134,161,248,229,151, 95,110, 22, 69, +113,238, 71, 31,125,148, 67, 41, 69, 76, 76,204,166,131, 7, 15,222, 87, 31, 13,151,203, 53,145, 16, 50, 89,105, 21,104,179,217, + 38, 18, 66, 30,163,148, 86,123,205, 87,199,235, 9,133,187,178, 93,106,128,249,225, 68,174,124,177, 2,176, 47, 89,178,164, 10, +192, 46,156,239,231,202,233, 25,108,240, 42, 22,100, 92,190,184, 92,174, 19,125,251,246, 21, 66,189, 64,249, 89, 47,224, 11,149, + 36, 73,199,123,247,238, 29,242,165,204, 95, 90,130, 36,245,183,156,156, 28, 46, 92, 45, 5,167,211,121, 38,208, 60, 89,150,143, +247,236,217,211,111, 58,131, 17, 42,239, 61,123,246,172, 87, 26, 61,105, 9,152,247, 11,213, 12,177, 63, 3, 98,177, 88,206, 37, + 38, 38, 86, 89,173, 86,209,102,179,137,190, 17,123,131,193, 80,175, 82, 0, 6,227,175,200, 21,217,127,145,199, 80,221, 24, 41, + 61, 79,125,168,127, 68, 64,199,234, 51, 94, 29,108,188,158,156,187,136,117, 3, 33, 3,176,132, 92,138,113, 89, 83, 80, 80,112, +117,164, 53,247,236,217, 19,241, 23,180,130,130,130,158,161,151,170, 31,133,133,133, 17, 79,231,229,162, 25,140, 19, 39, 78, 68, +252,156, 96, 48,254,106,212, 63,246,207, 96, 48, 24, 12, 6,131,193, 8, 10, 1,208,193,223,140,250,180, 14, 32,132,248,213, 8, + 70, 40,125,166,201, 52,153, 38,211,100,154, 76,147,105, 94,121,154,161,180,175,148,214,137,164, 33, 43, 49, 94, 46, 77, 67,153, + 38,211,100,154, 76,147,105, 50, 77,166,249,231,106, 94,105,176, 34, 66, 6,131,193, 96, 48, 24,140, 8,195, 12, 22,131,193, 96, + 48, 24, 12, 70,132, 97, 6,139,193, 96, 48, 24, 12, 6, 35,194, 48,131,197, 96, 48, 24, 12, 6, 35,162, 16, 66, 72, 70, 70, 70, +159,180,180,180,136,119,175,114,185,112, 69,246,131,197, 96, 48, 24, 12, 6,227,143,167, 73,147, 38,177,146, 36,221,153,150,150, +118, 95,203,150, 45, 91, 2, 64,122,122,122, 1,165,244, 13,131,193,240,201,193,131, 7,237,127,118, 26,255, 40, 26,180, 21, 33, +131,193, 96, 48, 24,140, 43,159,180,180,180, 46, 0,238, 51, 24, 12,183, 95,125,245,213,218,126,253,250, 33, 46, 46, 14, 46,151, + 11,197,197,197,248,254,251,239,177,107,215,174,223,157, 78,231, 92,167,211, 57,247,236,217,179,167,255,236, 52, 55, 52,170,193, + 34,132,172, 3, 0, 74,105,159, 63, 49, 61, 12, 6,131,193, 96, 48, 46, 35, 82, 83, 83, 95, 29, 50,100,200, 35,113,113,113,104, +221,186, 53, 82, 82, 82, 96,179,217, 96,177, 88, 64, 41,133, 32, 8,160,148,162,178,178, 18,219,183,111,199,150, 45, 91, 92, 21, + 21, 21,139, 9, 33,111,156, 60,121,242,103,111,173, 43,201,139, 16, 74, 41, 8, 33, 20, 64, 95, 0,160,148,174,251,115,147,196, + 96, 48, 24, 12, 6,227,114, 33, 45, 45,237,244,154, 53,107,146, 36, 73, 66, 73, 73, 9,108, 54, 27,106,106,106, 84,131,197,243, + 60, 40,165,112,185, 92, 0, 0, 89,150,177,119,239, 94,108,222,188, 25,199,142, 29,123,173,184,184,248, 81, 0, 87,156, 23, 81, + 43,185, 83, 74,215, 93, 9, 25, 98, 48, 24, 12, 6,131,241,199, 98,179,217,176,112,225, 66,148,148,148,160,113,227,198, 72, 79, + 79, 71, 76, 76, 12,244,122, 61, 0,168,230, 10, 0, 56,142, 67, 86, 86, 22,198,142, 29, 11, 66,200, 88,111,157, 43,201,139,176, + 74,238, 12, 6,131,193, 96, 48, 46, 6,167,195,225, 64,118,118, 54,142, 28, 57,130, 29, 59,118,160,107,215,174,104,215,174, 29, + 74, 74, 74,112,242,228,201, 90, 11,111,221,186, 21, 59,119,238,196,181,215, 94,251, 39, 37,247,143, 65, 41, 34,124, 14, 64, 31, +224,202, 40,247,100, 48, 24, 12, 6,131,241,199,144,158,158, 62, 62, 49, 49,241,157,113,227,198, 25, 58,119,238,140,227,199,143, +227,196,137, 19, 56,119,238, 28,186,116,233,130,172,172, 44, 28, 58,116, 8, 43, 86,172,192,206,157, 59,161,211,233,144,145,145, + 1,243,226, 79,241, 77, 90,234,137,147, 39, 79,102, 0,184,226,188,136,119, 37,247, 62,192,149, 81,238,201, 96, 48, 24, 12, 6, +227,143, 35, 45, 45, 45,129, 16,242, 84, 90, 90,218,253,183,223,126,187,216,170, 85, 43, 28, 63,126, 28, 37, 37, 37, 56,119,238, + 28,126,250,233, 39, 0, 64,122,122, 58,210,211,211, 81, 84, 84,132,130,130, 2,139,205,102,187,247,196,137, 19, 31, 43, 58, 87, +146, 23, 97,221, 52, 48, 24, 12, 6,131,193,136, 8,105,105,105,141, 1, 60,223,170, 85,171,241,163, 70,141,226,210,210,210,112, +226,196, 9,124,255,253,247,104,217,178, 37,206,156, 57,131,237,219,183, 75, 21, 21, 21,243, 36, 73,154,126,250,244,233,179,127, +118,154, 27,138, 6,237,201,157, 16,210,129,105, 50, 77,166,201, 52,153, 38,211,100,154,127, 13,205,147, 39, 79, 30, 59,121,242, +228, 93, 7, 14, 28,200,154, 49, 99,198,178,119,222,121, 7, 60,207, 35, 45, 45, 13, 63,252,240, 3, 93,179,102,205,146,170,170, +170, 54, 39, 79,158,124,224, 74, 54, 87, 0,171,228,206, 96, 48, 24, 12, 6, 35,194,156, 58,117,106, 31,128,155,211,211,211,175, + 46, 44, 44,124, 18, 0,100, 89,126,225,212,169, 83,219,255,228,164,253, 97, 48,131,197, 96, 48, 24, 12, 6,163, 65, 56,113,226, +196, 22, 0, 55,254,217,233,248, 51, 96, 31,123,102, 48, 24, 12, 6,131,193,136, 48,204, 96, 49, 24, 12, 6,131,193, 96, 68, 24, +102,176, 24, 12, 6,131,193, 96, 48, 34, 12, 1,224,183, 37, 0,165,180, 32,108,145, 11,104,161, 16, 74,159,105, 50, 77,166,201, + 52,153, 38,211,100,154, 87,158,102, 40,237,250,248,143, 75,153,176,250,193, 34,132, 16,122, 1, 29,102, 17, 66, 58, 68,122, 71, + 49, 77,166,201, 52,153, 38,211,108, 24,205, 11,185,215,251,211, 36,132, 16,229,175,231,151, 2, 64,184,218,127, 84, 58, 27, 66, +179, 33,242,254, 87,209,188,210, 8,218,138,144, 16,194,193, 93,140, 72, 8, 33, 50, 0, 57, 18, 59,202,115, 16,184, 72,233, 49, + 34,143,231, 24,169, 23, 9, 59, 78, 12,198,149, 75, 36,239,245, 94,247, 14, 94,209, 4, 32, 1,144, 8, 33, 23,245,176,109,136, +103,210,165,158,247,191,178,230,229,142, 95,131,165,236,168,196,196,196,149, 73, 73, 73,215,149,148,148,200,158,233, 72, 79, 79, + 7,199,113, 16, 4,193,114,228,200,145,232,250,110, 48, 57, 57,249,253,172,172,172, 59, 75, 75, 75,101,142,227,208,184,113, 99, + 16, 66,192,243, 60,120,158,183, 28, 60,120,176,222,154,145,166, 91,183,110,231,236,118,187,217,119,186, 86,171,181,238,216,177, + 35,234,207, 72,211, 31, 9, 33, 68,200,204,204,188,205,104, 52, 26,148,105, 93,187,118,245, 94,132,238,220,185,115,126,184,122, +205,155, 55,223,106, 48, 24, 98, 5, 65, 0,207,243, 16, 4, 1,213,213,213,101,123,247,238,237,225,153,191,209, 96, 48, 36,240, + 60,175,156, 91,176, 90,173,165,123,246,236,201,141, 92,174,174, 28,250,246,237, 43,160,254, 93,172,184,214,174, 93,235, 10,189, + 88,196,224,236, 59,162, 90, 17,151,165, 19,225,104, 12,149, 73, 57, 21, 12,191,104,187, 85, 30, 12,115,125,185, 65, 83, 23, 2, + 66, 72, 19, 0, 46, 74,233,201,144, 11,251, 89,217,119,146, 0, 12,145,128,209,158, 81, 43, 7,148, 18,224, 64, 2,240,197,105, +192, 82,107,225, 63,240, 65,164,220,235, 51, 50, 50,222, 72, 78, 78,190,171,178,178,178,134,231,121, 16, 66,104, 86, 86,150,178, +140,247,242,144,101,249,120, 97, 97, 97,118, 48, 61, 0, 98,147, 38, 77, 94, 75, 76, 76,188,163,166,166,166,134, 16, 2, 66, 8, + 37,132,160, 99,199,142,170,166,242, 43, 73,210,241,130,130, 2,191,154, 13,145,206, 63, 43,239, 29, 58,116, 80,181, 20,109, 89, +150, 3,230,221, 91, 51, 35, 35,227,181,228,228,228, 59,170,170,170,106, 56,142, 83, 53,179,178,178, 46, 56,157,151,178,230,149, + 64,160,155, 52,151,148,148,180,172, 71,143, 30,125,191,254,250,107,110,223,190,125, 92,219,182,109, 33, 73, 18,100, 89, 6,165, + 20,221,186,117, 51,214,119, 99, 41, 41, 41, 11,186,119,239, 62,122,249,242,229,220,178,101,203,184,238,221,187,131, 16, 2, 73, +146, 32, 73, 18,250,247,239,111, 8,173, 18, 24, 66,136, 89, 16,132,201, 90,173,182,143,203,229,106, 7, 0,162, 40,238,181,217, +108,235, 92, 46,215,235,148,210,170,112,116,156, 78,167,177,176,176,176,206,190,233,209,163,135,246, 66,211,150,153,153,185,137, +227,184, 22,158,116, 34,156, 95, 74,233,225,194,194,194,156, 64,154, 87, 93,117, 85, 72, 77,223,105,178, 44, 31, 46, 40, 40, 8, +168, 73, 8, 17, 90,183,110, 61,186,125,251,246,250,207, 63,255, 28,199,142, 29,131,201,100,130, 44,203,144, 36, 9, 78,167, 19, + 55,223,124,115,157, 7, 72, 48, 12, 6, 67,244,247,223,127,223, 42, 41, 41, 9,103,206,156, 65, 73, 73, 9, 38, 78,156,120,192, +107,126,194, 15, 63,252,144, 25, 31, 31,143,154,154, 26,148,151,151, 99,236,216,177,245,217,196, 37,201,160,107, 91,190, 72,128, +120,101, 92,146,241,251,234, 13,135,158,190, 88, 93,155,205, 86, 44, 73, 82,156,247, 52, 63,207,244, 90,240, 60,127, 14, 64, 98, +176,101, 8, 33,205, 0,220,200,243,124,107, 81, 20,175,162,148, 54,115,185, 92,201, 0,160,209,104, 78,243, 60, 95,228,116, 58, +247,219,237,246,255, 1, 88, 78, 41, 45, 10,164,101,223, 17,213, 74,178,213,220, 82,109,147,135,202, 20, 41, 28,193, 41,147,174, +230,191,246, 29, 81, 75,234, 97,178,254, 20, 8, 33,205,211,210,210, 94,241,252,127,156, 82,122,228, 98, 53, 37, 96, 52,165, 52, + 6, 0,202,203,203, 99,142, 29, 59,150,178,124,249,242,172,153, 51,103,246,211, 90,173, 47,219,129,189,193,214, 31,216,167,213, +118,129,144, 12,101,220, 69,229,227,171,214, 29,138,196,131,137, 75, 79, 79,127,227,250,235,175, 31, 55,111,222, 60,227,150, 45, + 91,140, 29, 59,118,132,251,193, 8,245,126, 79, 41, 85,207,177,107,174,233, 25, 76,143, 0, 16,210,210,210,102, 95,127,253,245, + 99,230,206,157,107,220,191,127,191,177,121,243,230,170,166,186, 32, 33,158,105, 4,157, 59,119,249,163,211,217,160,121, 31, 60, +120,240,152,121,243,230, 25,119,239,222,109,204,204,204, 84, 53,125,189, 51,199,113,200,206,238, 30,150,230,144, 33, 67,198,188, +251,238,187,198, 29, 59,118, 24,219,181,107,231, 49,105, 80,211,120, 33,233,188,196, 53, 47,123,234,152, 8, 66, 8,151,152,152, +184, 48, 59, 59,123,240,215, 95,127,205, 3,192,142, 29, 59, 80, 90, 90,138,244,244,116,152,205,102,232,245,122, 88,173,214,122, +189,101, 37, 39, 39,191,223,163, 71,143,209, 95,127,253,181, 8, 0, 95,222,126, 51, 14,139,192,164, 51,118,104, 52, 26, 28, 60, +120, 16, 60,207, 95, 76,232,248,218,168,168,168,143,151, 46, 93, 26,215,181,107, 87,174,164,164, 4,205,155, 55,199,239,191,255, +222, 99,253,250,245,221,238,190,251,238,187, 9, 33,227, 41,165,235,195,213,252,230,155,111, 96, 50,153,212,193,225,112,212,203, + 88,120,195,243,124,198,150, 45, 91,146,204,102, 51, 36, 73, 2,165,180,214, 5,236,123,225,201,178,140,222,189,123, 59,130,105, + 10,130,144,177,101,203,150, 36,131,193, 80, 71, 75,146, 36,104,181, 90,112,156,187,161,168, 36, 73,112,185, 92,200,201,201, 9, +168, 73, 8, 33,153,153,153,183, 41,230,138,227, 56,124,246,217,103, 72, 73, 73, 65, 82, 82, 18, 76, 38, 19, 12,134,250,123, 96, + 65, 16,144,144,144,128,251,239,191, 31,183,221,118, 27, 22, 45, 90, 4, 81, 20,107,205,143,143,143,199,119,223,125,135,232,232, +104, 52,109,218,180,214,252,203, 21, 2,196,175, 88,127, 72,141,200,222, 50,172,179, 48,160,119,139,185,202, 56,231, 94,136,202, +238,101,169, 44, 73,231,214,108,252,109, 90, 40, 93,167,211,217,104,227,198,141,208,233,116, 97,165, 67,146, 36,244,232,209,163, + 81,208,180, 18, 50,180, 67,135, 14, 95,222,127,255,253,154, 86,173, 90, 17, 81, 20, 33, 8, 2, 4,193,125,139,144,101,185, 41, +165,180,169, 44,203,125, 79,159, 62, 77,231,204,153,243, 50, 33,100, 4,165,244,191,126,245, 92,150, 78,213, 54,121, 40,165, 72, + 73, 30, 64,155,156, 89, 77, 80,109,147,135,198, 8,150,131, 0, 46, 89,131, 69, 8,137, 54, 24, 12,207,124,254,249,231, 26, 0, + 24, 48, 96,192, 51,132,144,135, 41,165, 21,145,218, 70, 76, 76, 12, 98, 98, 98,208,161, 67, 7,140, 28, 57, 50,182, 75,151, 46, +143, 53,179,217, 38, 22, 1,246, 64,235, 8, 28,151,241,237, 15, 7,146,148,241, 49, 55,119,213, 12,238,219,234,180,187,130,139, +239,210, 20,178, 68,143,175,222,112, 56,168, 1, 35,132,112, 41, 41, 41,255, 26, 50,100,200,173,243,230,205,139, 2,128,247,223, +127, 31, 67,135, 14, 69, 74, 74, 10, 12, 6, 3, 52, 26, 13, 52, 26, 13, 68, 81, 84,127,131,232, 17, 0,124, 74, 74,202,203, 55, +220,112,195, 45,115,231,206,141, 2,128, 5, 11, 22, 96,216,176, 97, 72, 72, 72, 64,116,116, 52,116, 58, 29,180, 90,173, 71,139, + 32, 84,188,206, 95, 58,239, 25,212, 15, 45, 12, 58,220, 56,227, 21,196,198,198,226,251, 71,239,131,200,113,184,239,187,117,136, +142,142, 14,121,255,240,167,185, 99,199, 14,156, 62,125,218,111,222,121,158, 15,122,189,121,231,125,232,208,161,183, 40,154, 11, + 22, 44,192,224,193,131,145,144,144, 0,179,217,172,230,253,188,118,224,134,252,222,154,131, 7, 15,190,229,221,119,223, 85, 53, +251,247,239,143,248,248,120, 68, 69, 69, 65,163,209,168,251,179, 62,199,232, 82,214,188, 82,168,101,176, 60, 59,138, 75, 74, 74, +186, 53, 63, 63, 95, 61,242,162, 40, 66,167,211,169, 39,135,247,131, 59, 28, 8, 33, 36, 43, 43,235,206,175,191,254, 90, 93,201, +238,115, 81,233,245,250,122,105,250,232, 15,184,238,186,235, 62,205,207,207,215,107, 52, 26, 88, 44, 22, 20, 22, 22, 34, 38, 38, + 6, 90,173, 22,195,135, 15,231,115,114,114, 18,174,187,238,186, 47, 8, 33, 99, 40,165,171, 67,105, 82, 74, 97, 54,155,107, 25, +172,139,137,220, 19, 66, 96, 48, 24,176,108,217, 50, 8,130, 80,235, 36,243,119, 19, 75, 78, 78, 14, 25,149, 0, 0,157, 78,135, + 77,155, 54,129,227, 56,136,162,168, 14,223,124,243, 13, 30,125,244, 81,156, 62,125, 90,157, 23, 21, 21,178,116,147, 24,141, 70, +131, 98,174, 0,247,177, 55, 24, 12, 16, 69,145, 8,130, 64,120,158, 7, 0, 74, 72,248, 21, 66, 5, 65, 64, 81, 81, 17,110,191, +253,118,124,244,209, 71,120,225,133, 23, 48,102,204,152, 90,243, 43, 42, 42, 16, 23, 23,135,216,216, 88,232,116,186, 11, 62, 23, + 46, 37,100,159,189, 51,253,133,151,141,238, 10, 30, 50, 32, 3, 20, 84,253, 95, 92,124, 16,175,254,235, 77, 62, 92,109,157, 78, +135,141, 27, 55,194,187,216,149,227, 56,104, 52,154, 90,211, 4, 65, 64,106,106,106, 56,122,207, 47, 93,186, 84,251,217,103,159, +225,171,175,190,130, 36, 73, 16, 69, 17,122,189, 30,209,209,209,136,143,143, 87,135,166, 77,155,146, 15, 62,248, 64,211,169, 83, +167,231, 1,248, 55, 88, 28,141,145, 61,230, 10, 0,146, 6,208, 38,135,190,230,227, 98,163,220, 81,156, 75, 17, 66,136, 0, 96, +234, 91,111,189,149,208,173, 91, 55, 0,192, 91,111,189,149, 48, 97,194,132,169,132,144,167, 41,165, 23, 92,196,202, 3,159, 18, + 66, 70, 3,128,193, 96,208, 15, 28, 56, 80,251,246,219,111,227,170,171,174,194,131, 15, 62, 24,255,234,203, 47,223, 8, 96, 73, +160,245,101,159, 75,109,214, 43,111,198,122,191, 80,157, 31,128,223,207, 22,225,153,103, 94, 12,149, 87, 2,128, 75, 75, 75,187, +251,189,247,222, 83,171, 67,196,199,199,171,247, 32,223,123,148,242, 27,228,190, 68,224,142, 10, 77,152, 55,111,158,170,153,152, +152, 88, 75, 67, 20, 69, 20,237,253, 25,223,190,159, 7, 83, 66, 42,198, 62, 58,171,222,233, 76,215,105,145, 97,208,162, 83,167, + 78, 48, 24, 12,216, 33,186, 31,101,138,185, 10,150,206, 64,154, 60,207,171,105,164,148,194,106,181,162,178,178, 18,146, 36,193, +110,183,163, 91,183,110, 97,229,253,221,119,223, 85, 53, 27, 53,106,164,222,223,189,239,243,202,160,188,192, 4,211, 76, 75, 75, +155,240,239,127,255, 91,213, 76, 72, 72, 80,181, 4, 65,128, 70,163,193,130, 5, 11,124,243,120,209,154,245, 61,238,190,154, 71, +142, 28,193,204,153, 51,161,209,104,148, 42, 64,106,196, 50, 61, 61, 29,115,230,204, 9,235, 25,119, 57,227,239,232,146,146,146, + 18,121,223,190,125,220,246,237,219,161,209,104,144,152,152,136, 30, 61,122, 0, 0, 28, 14, 7, 4, 65,128,193, 96, 32,153,153, +153,167,149,157,166,252,122,151,165,123,181, 48,224,126,255,253,119,121,229,202,149,220,162,145,131, 97,167, 64,151,103,102, 97, +240,176, 97, 88,145,174, 5, 15,160,199,190, 18,104,181, 90, 33, 53, 53,213,169, 28, 4, 69,215,187,110,150,159, 86, 11, 81, 38, +147,233,131,229,203,151,235, 57,142, 67,101,101, 37,100, 89, 70,110,110, 46, 8, 33,216,189,123, 55,158,126,250,105,124,249,229, +151, 88,186,116,169,161,107,215,174, 31, 16, 66,218, 81, 74, 43, 21, 13, 63,154, 0,220, 23,171,193, 96, 80, 13,150,193, 96, 32, + 87, 93,117,213,105,165,252,220,167, 56,238, 68, 97, 97, 97,183, 64,154,128, 59,146, 48, 98,196, 8,181,206,153,242, 0,244,190, +216,148,255,133,133,133,117, 14,140, 63, 77, 89,150,209,171, 87, 47, 0,128,201,100,130,217,108,198, 15, 63,252,160,206,239,218, +181, 43,236,118, 59, 26, 53,106,132,189,123,235,150, 66,248,211, 60,117,234, 20, 22, 46, 92, 8, 81, 20,145,144,144, 0, 81, 20, + 53,171, 87,175,126,193,100, 50,197,240, 60,143,216,216, 88, 12, 27, 54,108,222,141, 55,222,168,164, 65,250,230,155,111,132, 64, +154, 60,207, 67,175,215, 99,193,130, 5,152, 57,115, 38,158,124,242, 73,248,206,183, 90,173, 72, 72, 72, 64, 92, 92, 28,226,226, +106,149,126, 5, 76,231,197,210,208,154, 20, 20,133, 59, 87, 96,207,174,213,144,168, 4, 89,146, 65,101, 10, 73,150,177,115,213, +214,204,226,195, 39,211, 41,168, 90,219, 72,170,170,118,245,109,164,187, 10,192,178,181, 37,182,217,161,210,201,243, 60, 28, 14, + 7, 86,172, 88,129,131, 7, 15, 98,229,202,149,176, 88, 44,104,212,168, 17, 98, 99, 99,145,147,147,131, 9, 19, 38,248, 53, 88, +190,154,146, 36, 45, 56,113,226, 68,151,156,156, 28, 82, 94, 94,142,146,146, 18, 84, 86, 86,194,225,112,192,225,112,168,199,208, +100, 50, 33, 37, 37, 5, 22,139,133,218,108,182, 5,129, 52,169, 76,202, 57,130, 83,135,150, 9,141, 90, 14,119, 25, 78,255,144, + 96,179,216, 53,174,119,150, 25, 39,124,243, 68,203, 65, 28,229, 40,224,206, 58, 33,160,178, 36,149,172,254,241,240,253,161,210, + 25, 9,130,104, 78,156, 60,121,114, 59,239,226,233,177, 99,199,162,176,176,176,221,235,175,191, 62, 17,192, 91,245,213, 52, 0, +233, 0,224, 2,190,131,123,192,243, 22, 11,121, 97,217,178, 17, 0,238, 88,186,116, 41,198,140, 25,131,127,189,252,114, 7,248, + 24,172, 90,251,147, 82, 20, 29, 88,143, 35, 7, 54, 66,150,101,207, 64, 3,254, 15,244,230,227,147, 78, 82, 85, 85,101,221,178, +101,139,249,195, 15, 63, 68,124,124, 60,154, 53,107,134,168,168, 40,232,116,186, 58,102, 64, 25, 66,229,189,166,166,198,186,111, +223, 62,243,167,159,126,138,132,132, 4, 52,109,218, 20, 38,147, 9,122,189, 94,125, 65,223,178,114, 41, 38,142, 31,142,210,163, +251,241,230,195,183,133,157,206,123, 6,246, 67,134, 65,139,225,211,103,161, 93,187,118, 88,114,219, 77,224, 8,112,239,247, 63, + 65, 20, 69,124, 56,244, 90,232,116, 90,220,251,253,182,176, 53,183,109,219, 6, 74, 41,154, 54,109, 10,139,197,162, 70,217, 52, + 26, 13, 86,175, 94,141,155,110,186, 9,139, 22, 45,194, 53,215, 92, 19, 50,239, 85, 85, 85,214,221,187,119,155, 63,249,228, 19, +196,199,199,163,113,227,198, 48, 26,141,170,158,183,137,105,209,162, 5,202,202,202,208,178,101,203,160,154,213,213,213,214, 29, + 59,118,152, 23, 45, 90,132,248,248,120,100,100,100,192,104, 52,214,138,132, 61,255,252,243,181, 52, 58,117,234,116,209,154,245, + 61,238,190,154, 35, 71,142, 68,203,150, 45, 17, 29, 29,173,238, 3, 95,163, 93, 79,186,163,118, 53, 7, 59, 0,173,215,239, 89, + 0,219,252, 44,167, 76, 23, 1,116,246,204,147, 0, 84, 2,136,245,163, 23, 72,167, 4,238,120,113,162,207,242,190,219, 81, 17, + 0,128, 16,162, 92,143,125, 1,108, 0,128,182,109,219,162,180,180, 20, 58,157, 14, 61,122,244,192,217,179,103,213, 48,159, 44, +203, 24, 53,106, 20,255,196, 19, 79, 36,113, 28, 7,167,211, 9, 74, 41,120,158,135,242,230,231,131,204,113, 28,114,114,114,176, +199,179, 79, 7, 15, 27,134,140,140, 12, 40,149, 56,116, 58, 29,198,140, 25, 67, 30,125,244, 81, 65,137, 94, 80, 74, 97,177, 88, +208,169, 83,167,128,229, 82,130, 32, 60,252,197, 23, 95,196,104,181, 90,213, 92, 41,105,217,183,111, 31, 94,125,245, 85,220,113, +199, 29, 56,122,244, 40, 82, 83, 83,241,216, 99,143,153,243,242,242, 30, 6, 48, 61,144,166,130,217,108,174,101,176,198,143, 31, + 47,228,228,228, 36, 25,141, 70, 53,186,229, 49,149,200,201,201, 9,106,197, 61,245,159,240,221,119,223,249,125, 59,244,125, 99, + 32,238, 86, 23, 97,105,110,217,178, 69, 53,103, 74,244, 66,153, 95, 88, 88,168, 70,176, 60, 70, 48,152, 38, 5,160, 62, 68, 61, +145, 43,205,150, 45, 91,102,164,166,166,154,199,143, 31,143,202,202, 74,164,165,165, 97,208,160, 65,144,101, 25, 14,135, 3,147, + 38, 77, 10, 26,121, 17, 69, 17, 91,183,110, 69, 94, 94, 30,158,120,226, 9,204,155, 55, 15, 3, 6, 12, 80,231, 43,111,113,137, +137,137,136,142,254,211,219, 56, 68, 14, 25,112,184,156,168,169,177,128, 82, 9,146, 76, 33, 75, 50,118,175,221,153,121,120,215, +193,172,252,197, 11, 69, 0,176,174, 91,234,189, 86,234,200,185,255,105,211, 55, 94,179,101,237,239,142, 45,193,228,121,158,199, +125,247,221,135,105,211,166,225,214, 91,111,197,170, 85,171,240,212, 83, 79,225,238,187,239, 86,205,187,114, 46,132,194,233,116, +190, 55,118,236,216,127, 46, 89,178,228,170, 71, 30,121,132, 3,220,215,164,209,104, 4, 33, 4, 86,171, 85, 29,246,237,219, 39, +255,227, 31,255,248,213,110,183,191, 23, 72,143, 10,134, 95, 76,186,154,255, 22,151,114,173, 79,125, 31,207, 17, 33,218,145,216, +180,111,249, 13,153, 3,232,128,219,154,197, 81,217, 29,225,163,160,176, 89,171,241,228, 19,143,135, 29,189,107, 8, 8, 33, 67, + 7, 14, 28, 56,104,198,140, 25,117,230,205,152, 49, 3,123,247,238, 29, 68, 8, 41, 10, 84, 36,234, 15, 3,144, 17,147,146,242, + 58, 0, 24, 78,157,154,108, 1,142, 3,192, 11,192, 96, 9,184,105,213,170, 85, 0,128, 38, 77,154, 64, 6, 67, 43,125,112, 0, + 0, 32, 0, 73, 68, 65, 84,218, 19,224, 99, 30,248,212, 5,124,235,171, 69, 41,133,195,233,130,197, 98,133, 76,221,231,145, 76, +101,200,146, 59, 10,234,107,178, 66,149,187, 81, 74, 41, 33, 68,230,121, 30, 29, 58,116,192,224,193,131,161,213,106, 97, 54,155, +213,251,188,239, 61, 41,140,135, 34, 5, 32, 19, 66,208,162, 69, 11, 12, 26, 52, 8, 26,141, 6, 38,147, 9,209,209,209,170,193, +226,121, 30, 29,114,250,225,211, 69,175, 96,220,224, 44,140,191, 54, 25, 95,236, 46, 9, 43,157, 77,141, 90, 52, 53,232,208,182, +109, 91, 68, 69, 69,129, 16,128,231, 57, 53,157, 38,163, 30, 26,181,248, 49,188,188,159, 58,117, 10, 69, 69, 69, 40, 42, 42, 2, +199,113,200,205,205,133, 86,171,133, 32, 8, 56,112,224, 0,166, 79,159, 14,187,221, 30, 86,222, 57,142, 67,235,214,173,209,175, + 95, 63,104,181, 90, 40,207, 10,239,162, 65, 81, 20, 81, 89, 89,137, 86,173, 90, 97,217,178,101,232,221,187,119, 72,205,118,237, +218,161,111,223,190,208,104, 52, 48, 24, 12,106, 85, 29,173, 87, 94,171,170,170,212,253,208,165, 75,192, 58,109,126, 53, 87,110, + 61,138,249, 43,127,128,205, 46,163,162,198, 89,107,133,212, 70,209,216,240,201, 19, 97,229, 93,209,124,239,189,247, 80, 86, 86, +166,222,135, 56,142, 83, 7, 66, 8, 50, 50, 50,240,238,187,239,214, 17,242,246, 34,148,210,117, 62,179, 19, 9, 33,249,234, 70, + 41, 29, 70, 8,201,247,254, 13,180,156,231,239,181, 83,167, 78,205,206,203,203,155,217,179,103,207, 79, 55,109,218,180, 56,144, + 94, 32,157,169, 83,167,102,229,229,229,205,244, 94,222,207,118, 84,188,163, 14,196,147, 57, 78,137,204,164,167,167,171,229,206, +102,179, 25, 26,141, 70, 93,209,229,114,225,131, 15, 62, 64, 82, 82, 18,146,147,147,213, 95,127, 80, 74,105,147, 38, 77, 64, 41, +197,131,103,221, 85,128,190, 75,211,160, 8,192, 13,103,169,170, 39, 73, 18,150, 44, 89,130,168,168, 40,245, 66, 55,155,205, 65, +139,139,180, 90,109,223,238,221,187,115, 54,155, 77, 13,147,115, 28,135,125,251,246, 33, 47, 47, 15, 99,198,140, 65,155, 54,109, + 32, 73, 18,170,171,171,113,221,117,215,137,111,190,249,102, 95,132,105,176,140, 70,163, 90,239,200,102,179, 97,205,154, 53,136, +141,141, 69, 92, 92, 28, 18, 18, 18, 16, 31, 31, 15,157, 78,231,125, 98, 4,132, 82,138, 17, 35, 70,212,138, 92,121, 71,173,188, +111,104, 74,177, 95, 56,154,215, 92,115,141, 26,189, 50,155,205,248,246,219,243,247,231, 30, 61,122,128, 82,138,196,196, 68,108, +222,188, 57,148, 22,237,218,181, 43,100, 89, 70, 82, 82, 18, 68, 81, 36,171, 87,175,126,193, 99,174,136, 40,138,248,249,231,159, + 81, 88, 88,136,196,196, 68,245,173, 52, 20,213,213,213,197,111,190,249,166,244,246,219,111, 3, 0,250,247,239,143,242,242,242, + 51, 94,243, 75,199,141, 27, 87, 43,191,231,206,157, 43, 13, 41,124,137, 35, 3,112, 57, 92,168,177, 88, 81, 85, 89, 13,167, 44, +193,233,146,112,230,196,217,216, 39, 30,157, 44,254,107,210, 4, 0,192,163,179,223, 66,229,187,231,111, 96, 95, 61, 58, 58,105, +196,171,159, 77, 1, 48, 60,152,126, 77, 77, 13,172, 86, 43,154, 52,105,130,109,219,182,161,178,178, 18, 3, 6, 12,168, 21,253, + 13, 81, 4,161, 66, 41,181, 19, 66,114,135, 13, 27,182,237,181,215, 94,107,217,190,125,123, 82, 93, 93,141,234,234,106,212,212, +212, 64,249, 95, 80, 80, 64, 23, 47, 94,124,184,166,166, 38,135, 82, 26,176,206,144,182, 91,229, 65,251,142,168, 37, 63,254,162, + 25,246,183,145, 55,197, 28, 63,113,204, 85,106,209, 87,149, 91,126,181, 73,116, 47,168, 68, 33, 81, 10, 42,201,144,168, 28, 48, +226,242, 71, 64, 8,201,200,204,204,252,199,162, 69,139,252, 26, 82,158,231,177,104,209, 34,244,234,213,235, 31,132,144,125,193, + 42,247, 43, 52, 3,180, 46, 81,124,226, 63,255,249,143, 6, 0,250,245,235,247, 68, 51,167,243,209, 34,192,222,190, 99,199, 91, + 54,109,218, 20, 99, 52,186,219, 9,197,196,196,128, 82,202,215,212,212,196,228,228,228,220, 2,127, 6, 75,166,112, 58, 93,176, + 88,109, 40, 43,175,130,211,238,132, 75,118, 65,114,201,112,201,238,232,168, 75,146, 32,187, 36,184,100, 9,188,192, 71,245,189, +166, 73,149, 59,150, 69,202,214,253,116,180,177,159,100,202,238, 22, 94, 64, 74, 74,138, 90, 36,236, 93, 87, 38, 84, 20,195, 15, +146,251, 94, 72,213,123,227, 47,107,243,113,102,239, 6,104, 8,133, 44, 57, 33,187, 28,144,156, 14,240,144,177,247,208, 9,180, + 79, 11,121, 15, 81,211, 57,228,153, 23,209,163, 71, 15,124, 49,122, 56, 8, 1,238, 93,179, 25, 26,141, 6,139,111, 30, 0,173, + 94,139,191,175,252, 41,220,116,214,202,251,142, 29, 59,240,224,131, 15,226,165,151, 94,130,193, 96, 80, 95, 78,246,239,223,143, +207, 62,251, 12, 3, 7, 14, 12, 59,239,132,184,139, 90,149,125, 56,117,234, 84,156, 60,121, 18,175,191,254, 58,178,179,179, 33, +138, 34,202,202,202,144,147,147,131,211,167, 79,135,165, 73,169,140,248,248,120,181,186,142,111, 29, 49, 0,245, 62, 70,222,154, +119,221,156,138,175, 55, 46, 6, 1,193, 79,159, 76,174,245, 60,122,231,179, 31,235,173, 57,109,218,180, 90,233,172, 79,244,202, +203,139,248, 13, 6,248, 51, 50, 33,150, 83,118,178, 46, 47, 47,111,166,239,250,161,244,188,231,251,172,111,247, 49,101,117, 14, +102,157,187, 47,165,148,166,167,167, 67,150,101,152,205,102,104,181,238, 8,152,239,131,212,100, 50,213,114,228,161,202,147,121, +158, 7,165, 84,221,177,190,183, 49,158,231,177,121,243,230, 58, 38,224,223,255,254,119,208,114, 90,151,203,213, 46, 42, 42, 10, +149,149,149,106, 29, 41,173, 86,139, 41, 83,166, 96,220,184,113,170,185,210,106,181,248,232,163,143,208,173, 91, 55,216,237,246, +118, 1, 5, 1,104, 52,154,154,142, 29, 59,186,235, 32,187,235, 78,145, 49, 99,198,240, 14,135, 3,122,189,190, 86,212, 73,169, +155, 22,202, 12, 41,209,166, 21, 43, 86,132, 21,193, 10,183, 14, 18,165, 20, 59,119,238,172,101,212, 60, 77,141, 1, 0,187,118, +237, 82, 31,180,225,150,119, 75,146, 4,131,193, 64, 52, 26, 13, 49,153, 76, 49,227,199,143, 87,117,149, 99,174,228, 59,156,138, +214,191,252,242,203,117,193,230,239,222,189,251,138,236,142, 65,150,101, 56,156, 78, 88, 44, 86, 84, 86,215,224,249, 89,158, 18, +181,231,177, 5,192,150,220,137, 15,226,190,193, 3,251, 33, 68,235,190, 64,196,199,199,227,203, 47,191,132, 40,138, 88,182,108, + 25,162,163,163,113,211, 77, 55, 33, 58, 58, 26, 79, 60,241, 4,110,187,237,182,176, 13, 22, 0, 80, 74,203, 9, 33,185,147, 39, + 79,222,246,242,203, 47, 55,105,210,164, 9, 28, 14, 7,236,118, 59, 28, 14, 7, 14, 29, 58,132,197,139, 23, 31,171,169,169,201, +165,148,150,135,210,211,118,171, 60,152,255, 72,203,226, 94, 35,111,182,238, 61,181, 18,167, 79,157,133, 75, 58, 14,151, 36,193, +229,116,185, 13,129, 44,195,229,112,129,231,185,232,235,122, 54, 93,237,174,240, 79,236,107, 55, 23, 93,127, 33,251,228, 2,161, + 7, 14, 28, 40, 77, 76, 76, 84,222, 32,163,237,118, 59, 1, 0,173, 86, 75, 1, 40, 21,220,171, 1, 4,109,120,162,112, 12,152, +248,175,151, 94,106,172, 20,223,191,244,210, 75,141, 31,123,228,145,137, 0,222,216,187,123,247,194,187,238,186,107,242,231,159, +127, 94,107,157,187,238,186, 11,123,119,239, 94,232, 55,129, 0,156, 78, 39, 44, 22, 27, 74, 74,126,199, 61,247, 62,163, 78, 7, +168, 90,209,221,211,171, 35, 0,232, 1,160,228,244,255, 48,233,193,199,252, 94,164,148, 82,218,190,125,123,229,122,135, 40,138, +117, 42, 33,123,223,223, 67,221, 63, 60,145,161, 90, 85, 44, 52, 26, 13, 14,110,202,199,228,137,183, 0,146, 11,112, 84, 3,142, + 26, 80, 71, 13,168,189, 26, 68,107, 0,117, 90, 67,234, 42,233, 84,170,109, 8, 60, 7,157,246,252,125,211,104, 52, 64,171,215, +134,149, 78,127,121,255,237,183,223,112,255,253,247,195,110,183, 99,228,200,145,176, 90,173,176,217,108,176, 90,173,104,209,162, + 5, 44, 22, 75, 72, 61, 37,239,178, 44,171, 81,192,201,147, 39, 35, 59, 59, 27,211,167, 79,199,255,253,223,255,161, 69,139, 22, +152, 56,113, 34, 62,253,244, 83,100,101,101,161,166,166, 38,164, 38, 0,245,121, 44, 8,130,122, 15,246, 62, 86, 0,234,117,140, +252,105,186,187, 3, 67,157,227,254,208,248,254,245,214,156, 57,115, 38, 74, 74, 74,234, 68,174,188, 35, 88,115,231,206, 13,170, + 27, 8,159, 40, 83, 56,203,237,240, 76,178, 76,153, 50,229, 73, 66, 72,254,148, 41, 83,158,156, 53,107, 86, 97, 56,122, 1,230, +127,227,249,189,193,107,218, 14,159,101,252,119,211,192,113, 28, 40,165,106, 88, 19,112,239, 56,101, 30, 0, 24,141, 70,228,231, +231, 99,201,146,243,213, 6,148,101, 2,105,202,178,140,255, 38,186, 15,196, 80, 79,228, 74, 25,191,254,140,140, 97,195,134,225, +255,217, 59,239,240, 40,170,182,141,223,103,102,251,102,211, 32,148, 52, 18, 66, 4, 66, 66, 9,161,136,210, 85,164, 74,183,243, + 89,105, 42,190, 42,205, 6, 1, 21, 80, 4, 4, 17, 17, 16, 81,124, 1, 21,233, 77, 64,186, 1, 36,116,144, 38,144, 78, 72, 32, +125,235,148,243,253,145,108,220,148,205,238,134, 32,229, 61,191,235,218,107, 51, 51,103,238,121,102, 55,187,115,239,115,158,115, + 38, 34, 34,162, 76,246, 74,167,211, 85,105, 54,100, 89, 70, 82, 82, 18, 78,157, 58,133, 14, 29, 58, 32, 47, 47, 15, 10, 0,239, +156, 60,137,232, 97,195, 96, 41, 49,126,106,181, 26,195,135, 15,119,170,227,200,159,127,254, 89,166, 8, 40, 58, 58, 58,245,161, +135, 30, 10, 78, 72, 72, 40,205,104,105, 52, 26,104,181,218, 82,147,225,230,135, 26, 67,134, 12, 41, 99,134,202, 27, 44,251,135, +103,235,214,173,110,117, 17, 82, 74,209,165, 75,151,210,236,149,183,183, 55,214,172, 89, 83,218,166,115,231,206, 32,132,160,110, +221,186,216,178,101,139, 75, 77,160,248, 53,181,191,247, 60,207,163,168,168, 8,137,137,137, 80,171,213,165,245, 25, 58,157,174, +244,252, 25, 78,160, 50,172,130, 0,163,201,140,130,130,226, 47,210, 75,167, 86,151,105, 98,179, 84,127,112,154, 61, 19,154,159, +159,143,157, 59,119,226,215, 95,127, 69,155, 54,109,202,116, 15,186,219, 69, 88, 26, 50,165, 89,132,144,142,227,199,143, 63,248, +209, 71, 31, 5,213,174, 93, 27, 54,155, 13, 73, 73, 73, 88,186,116,105,186,209,104,236, 72, 41,205,242, 64, 16,162, 32,194,108, + 52, 33,175,160, 8,241,159, 44,115,214,146, 3, 0,155,181, 0,125,123,117,169,246,116, 40,213,129, 82,154, 6,224,101,251, 50, + 33,100, 57, 0,123, 49,126, 62,165,244,121, 79,244,148, 64,215, 65, 67,134,116,127,235,173,183, 74,215,189,245,214, 91, 56,120, +240, 96,119,229, 47,191,156, 18,128,221,252, 47,191, 52,159, 51,103, 78,105,155, 57,115,230,224,215, 95,126,249, 93, 2,118, 59, + 9,178, 56,131,101, 50,163,176,200, 4, 31,191, 64,164, 93,217,227, 50, 22, 21,111, 1,173,226,123,217,254, 29,226,172,238,198, + 93,115,245, 79,152,148,182,104,209, 2, 0, 74,235,142,154,119, 31,130,217,115,151, 64,195, 81, 12,236, 30,141, 58, 58, 25, 68, + 95, 11,170, 46, 19, 65,252,194,138,119,140,111, 85,165,174, 61,206, 61,239,191,131,191,189,180, 24,190,253, 0,148, 74, 37,126, +125,186, 55, 84,106, 21,254,111,211,222,226,193, 61, 47, 13,132, 74,163, 70,143,175, 87,185,140,213,241,220, 47, 93,186,132, 3, + 7, 14, 32, 42, 42, 10, 23, 47, 94, 44,173,177,181, 95,183,220,236, 77,160,246,121,174,236,223,227,215,174, 93, 67,223,190,125, +161, 82,169,176,108,217, 50,236,217,179, 7,227,199,143,199,139, 47,190,136,110,221,186, 85, 90, 23, 91, 94, 51, 38, 38,166,204, +123,228,172, 62,202,147,247,168, 50, 77, 59,213,125,223, 29, 53,237,197,237,149,153,245, 91, 45,108,119,200, 22, 85,214,101,214, +167, 92, 59,160,184,150,234, 79, 0,150,233,211,167,159,158, 62,125,122, 95, 66,200,198,233,211,167,247, 45,215,206,149, 78,249, +237, 46,191, 7, 75, 13, 86, 73, 74,174, 43,240,143,137, 82, 87,209,151,237,229,229,133,151, 95,126, 25, 19, 38, 76, 40, 45,100, +172, 10,187,115,173,138,141, 27, 55, 86, 88,183,110,221, 58, 87, 93,132,127,249,250,250,182,233,222,189, 59,242,242,242,144,156, +156, 12,131,193,128,232, 89,179,112,114,244,104,180, 90,184, 16, 92,247,238, 0,138, 63,240, 39, 79,158,132, 70,163,249,171,202, + 64, 42,193, 96, 48,192,223,223, 31, 90,173, 22,222,222,222,240,246,246,134,151,151, 87,169,209,114,213, 69,104,255, 48,111,218, +180,169,202,204,149, 99,202,215, 29, 51, 68, 41, 69, 66, 66, 66,133, 12,150,253,152,246,109,246, 76,134, 59,154, 0,160,213,106, +169, 70,163, 1,207,243,208,235,245,165,233,126,173, 86, 91,250,112, 55,131,229,106, 34,209,240,240,240, 50, 19,145, 42,149,202, + 50, 19,145,222,171,252,211, 69,104, 65, 81, 97, 81,141,235, 91,173, 86, 40, 20, 10,252,250,235,175,104,223,190,125,169,185,178, + 27, 43,199,247,221, 19, 40,165,169,132,144,174,243,230,205, 59, 52,123,246,108,255,194,194, 66, 44, 91,182, 44,175,176,176,176, + 43,165, 52,213, 35, 45, 0,130, 77,132,209, 98, 65, 97, 65,241,107,240,247,233,213, 46,118,186,183, 39,124,110,214,162,197,243, +223,125,247, 93,133,245,223,125,247, 29, 46, 94,188,248, 60, 78,158,220, 29, 10, 44,156, 48, 97, 66,100, 92, 92, 92, 40, 0, 76, +152, 48, 33, 37, 20, 88,232, 76,147,210,127,186, 8, 11, 75,204,186,185,168,242,186, 37, 79,145,101,185,194, 15,190, 91,189, 32, + 18, 66, 74, 77,198, 99, 79,190,140,244,203,231, 16,165,207, 70, 93, 63, 47,200, 5,233, 80, 61, 18,143,147, 55,245,248, 98,225, + 54,143,226,212,171, 85,208,234,254,233,110,210,234,180,208,148,244, 42, 16, 66,160,213,235,160, 84,187,239,207,237,231,126,238, +220, 57,232,245,122, 72,146, 84,225,122,227,233,136,102, 74,105,233,181,115,246,236,217, 24, 55,110, 28,150, 45, 91,134,147, 39, + 79,162, 85,171, 86,120,244,209, 71,113,253,250,117,156, 56,113, 2, 22,139,197,237, 56, 29,175, 23,103,207,158,197,142, 29, 59, +112,254,252,121,164,164,164,120, 20,159, 51, 77, 59,246,229, 95,119, 28,195,224,199, 90, 87,161,224, 92, 51, 62, 62, 30,215,175, + 95,175,144,185,114, 44, 63,114,150,193,114,244, 34, 85,144,136,178,217, 35,216,235,161,236,134,168,252, 50, 0,127,251,186,137, + 19, 39,190,231,238,126,142,203,246, 12, 88, 57, 93,167, 40, 74, 26,150,249, 4,217,187,152,236, 47,186, 99,102,202,254,183, 94, +175, 47,205, 50,133,133,133, 85,153,189, 42, 9, 18, 60,207,163,211,229, 2,168,213,234,210,238,188, 94,215,255,217,239,197, 23, + 95, 68, 68, 68, 68,153, 26, 44,199, 55,165, 50, 44, 22,203,238,221,187,119,199, 62,241,196, 19,252,217,179,103,161, 80, 40, 32, +203, 50, 44, 15, 62,136, 86, 11, 23,226,212, 91,111,161,243,149, 43,176, 8, 2,180, 90, 45,182,110,221,106, 51, 26,141,149,255, + 74,116, 2,199,113,196,110,176, 52, 26, 13,188,189,189,225,227,227, 83,154,205,241,228, 75,200,217, 47, 68,199,135, 39, 31,104, +123, 65,191,227,133,213,254,254,153, 76,166, 50,134,203, 93, 28,187, 12,236,166,200,215,215,183, 76,183,168, 61,139,231,142,193, +114, 53,145,168, 70,163,241,217,187,119,111,164,143,143, 15, 40,165,200,206,206,198,211, 79, 63,125,161, 10,201,123, 2, 10, 90, + 92,228,110, 50,163,208, 84,117, 55, 72,117,248,239,127,255,139, 75,151, 46,193,102,179, 97,250,244,233, 21,140, 85,117, 50, 88, +118, 40,165,151, 90,183,110, 45,247,236,217, 19, 9, 9, 9,208,104, 52, 2,165,212,227,249,171,168, 44,195, 38,136, 48,155, 44, + 40, 44,170,121,147,121, 55,114,230,228,201, 95,188,188,188,158, 6, 96,200,205,205,229,125,125,125,161,215,235, 97, 50,153,242, +248,146,145,130, 87, 1,171, 78, 16, 62,125,242,201, 39,231, 0,128, 66, 16, 62,173,106, 30,172, 82,131, 85,195,175,163,253,123, +203, 89,246,170,186,230,138, 16, 82, 60, 60,159,227,176,108,250, 56, 68,233,179,208,186,161, 23,204,215, 47, 65,227, 19, 0,226, + 23,142, 47, 22,110,195,217,171, 55, 61,138,243,153,229,171, 17, 26, 26,138,141,255,215, 31, 26,141, 6, 79,175,222, 81, 92,164, + 61,242, 41,168,180, 26, 60, 50,255,191,213, 58,119,163,209,232, 52, 83,229,110, 6,203, 81,211,110, 0, 91,183,110,141, 7, 30, +120, 0,187,119,239, 70,235,214,173,113,241,226, 69, 92,188,120, 17, 87,175, 94,197,201,147, 39,145,147,147,227, 81,156, 74,165, + 18,171, 86,173, 66, 86, 86, 22, 84, 42, 21,242,243,243,113,229,202, 21,167,245,207,238,106, 58, 26,172,166,125,226, 1, 0, 65, +117,124, 61, 50, 88,142,154, 51,103,206,172, 96,214,221,236,229,169,170, 81,118,185, 90, 39,251,178,181,156,217, 41,191, 92,190, + 61, 0, 92, 7,192,187,216,175,252,114,246,244,233,211,119,219, 51, 95, 37,186, 60,117, 82,127, 5, 56,233, 34, 84, 42,149,166, +166, 77,155,234, 28,251, 79, 57,142,131,183,183, 55, 25, 59,118, 44, 79, 8,129,193, 96,128,175,175, 47, 26, 55,110, 12,155,205, +117, 89,130, 74,165, 50,181,107,215, 78,231,152,122, 37,132,192,203,203,139, 31, 63,126, 60, 89,178,100, 73,165,251,173, 95,191, +190,202,127,110, 81, 20,231, 12, 27, 54,236,149,212,212, 84,255,122,245,234, 33, 35, 35, 3, 42,149, 10,148, 82,144,110,221,208, +233,242,101,216, 74, 12,195,185,115,231,176,120,241,226, 34,155,205, 54,199,101,192,229, 48, 24, 12,168, 93,187, 54, 52, 26, 77, +153, 81, 49, 14,169, 85,183, 50, 88, 53,105,174,236,154,142, 23, 86,251,223, 35, 71,142, 44, 93,246,228, 75, 82,165, 82,209, 62, +125,250,216,119,160,126,126,126, 8, 8, 8, 64,102,102,102,233, 7,197,158,185,115,215, 96,185,154, 72, 84,169, 84,194,102,179, +149,118,103,206,159, 63,191,218,198,224,110,130,138, 50, 49, 24,234, 32, 40,168, 9,234,212, 53, 67,150,165, 26,211, 22, 69, 17, +163, 70,141, 42, 51,231, 21,240,207,108,201,246,139,130, 32, 8,101,210,255, 30,197, 95, 3,153, 36,153, 2,130, 88,146,197, 51, + 58,245, 15,119, 45, 97, 97, 97, 62, 37, 93,134,229, 89, 73, 41,173, 80,140, 14,252, 51, 37, 3, 15,124,156,156,156,220,220,215, +215, 23, 61,122,244,192,134,181,107,215,127, 8,148,166,108, 76, 64,170,238,218,181,255,148,252,157, 86, 85, 28,148,162,180,139, +176,200, 88,211,102,157, 84,200, 94,221,106, 87, 14,199, 21,255, 48, 91,243,205,167,136,210,101,162, 85, 3, 13, 14, 28, 60,129, +246,161, 20,212, 82,189,255, 71,160,248,186,163, 84, 42,161,213,235,161,209,252, 83,115,165,209,235,160, 82, 87,167, 92,225,159, + 68,130,253,187,247, 86, 51, 88,132,112,101, 94,199, 87, 94,121, 5, 19, 38, 76, 64,143, 30, 61,112,241,226, 69,236,221,187, 23, + 23, 46, 92,192,152, 49, 99, 16, 19, 19,131,199, 31,127,220,237, 56,149, 74, 37,214,172, 89,131,188,188, 60, 80, 74,145,149,149, + 5,179,217,140, 73,147, 92,206, 79, 92,165,166,227,119,196,229,237,211, 0, 0,171,183, 31,173,182,230,187,239,190, 91, 58, 7, +163,253,154, 95, 85,214,202, 77, 14,187, 88,246,116,255,219, 78,165, 6,235,252,249,243,149,142,149,111,214,172, 89,230, 35,143, + 60, 82,247,252,249,243, 48, 24, 12,104,220,184, 49, 44, 22,139,211,110, 8,226,112,183,237,211,167, 79, 87,170,217,168, 81, 35, +219, 99,143, 61,166,172, 95,191,126,153,204,149,125,132, 77,137, 78,165,154, 0, 64, 41, 45, 32,132, 12,127,248,225,135,127,216, +178,101,139,174,113,227,198,200,203, 43,174,191, 93,182,108, 25, 94,127,253,117,232,116, 58,156, 63,127, 30,253,251,247, 55, 26, +141,198,225,212, 97, 14,172,202, 52, 43, 57, 15,168, 84,170,210,110, 50,123, 87,153,186,138, 84,116,101,154,132, 16,204,155, 55, +175,210,185,160,202,179,112,225, 66,160,220, 40, 10,103,113,126,254,249,231, 53,166,121,240,224,193, 50,247, 24,236,215,175,223, + 55,143, 63,254, 56, 82, 82, 82,202,116, 11, 86,101,176,202,107,186,154, 72,148,231,121,212,171, 87, 15, 31,125,244, 17, 2, 2, + 2, 80,191,126,253, 10, 6,203,213,123, 84, 29,110,183, 38,229,104,226,220,217,241, 29,191,249,118,181, 82,163,230,144,176,119, + 53,242,115,174,149,105,111,177,253, 51, 36, 90,221,250, 17, 88,143,238,116, 43, 78,139,197,130,207, 62,251, 12,241,241,241,136, +143,143,175, 50, 38, 39,195,161, 93,158,187,163,193,114,199,108, 85,166, 41,203, 18,209,234,253,161,247, 10, 66, 76,140, 63,100, + 55,230,234,116,204,133,223,161,247,221,152,146,146,226, 27, 26, 26,138, 11, 23, 46, 16,252, 83,143, 85,138, 90,173,126, 26, 14, +163,253, 42,253,188, 3, 39, 87,172, 88,209,188, 69,139, 22,152, 63,127, 62, 0,252,223,103,191,253,246, 84,188,169, 56,157, 89, + 50, 37,195, 86,119,226,148,168, 68,180,122, 63,232, 12, 37,175,163,236,254,156,167,142,239, 92,249, 56,237, 23,191, 91,252,161, + 87, 65,211,190,255,223, 9,155,208,167, 87, 8,254, 56,116, 18, 59, 83,189, 16,170, 73, 71,160, 49, 11,114,214, 95,248,207,144, +214,248,226,151,226,139,248,201, 35,174, 53, 9, 33,216, 63,118, 56, 12, 90, 13, 6,175,216, 12,165, 82,137,221,111,189, 0,149, + 74,133, 46,179,139,187,100, 79,125,246, 46, 20, 26, 53,162,198,196,187, 21,103,249,158, 26,123,205,149, 29, 87, 53, 88, 85,157, +123, 97, 97, 33,114,114,114,240,195, 15, 63,224,165,151, 94,194,245,235,215,113,229,202, 21,156, 63,127, 30, 43, 87,174, 44,115, +141,115, 55, 78,165, 82,137,137, 19, 39,226,157,119,222, 1,199,113,104,222,188, 57,226,227,227,209,161, 67,213,183,156,113,231, +125, 47,143,171,236, 85, 85,154,115,231,206,245,120,192,214,253,136, 71, 5, 26,246, 76, 86, 64, 64, 0,188,188,188, 0,160,204, + 5,214, 85, 55,161, 51, 77, 81, 20,161,211,233,160,211,233,202, 76,139,240,196, 19, 79,184,204, 96, 1, 0,165,116, 43, 33,228, +217,232,232,232,165,241,241,241, 94, 93,187,118, 85, 6, 5, 5, 33, 46, 46, 14,231,207,159,199,166, 77,155,108, 11, 22, 44, 48, + 26,141,198,151, 40,165,219, 61, 14, 18, 32,246,194,111,199, 25,237, 61, 65,146,164,148, 43, 87,174, 4,126,254,249,231, 60, 33, + 4,115,230,204, 41, 51, 65,107,249,115, 60,120,240,160,232,170, 75, 70, 20,197,148, 43, 87,174, 4,206,154, 53,171,140,166,253, + 81,222,164,184,163,233, 12,251, 57,151,127, 13,220,249,240,184,154, 72, 84,161, 80,224,220,185,115,152, 60,121, 50, 8, 33,101, + 6, 78,220,203, 28, 56,156,190,228,161, 54, 65,254, 79, 15,233,222,130,128,131,181,146, 76, 47,127, 35, 23, 64,177,185, 26, 56, +107, 21,214,188, 83,113,210,197,242,104, 52,154, 43,123,246,236,105, 48,109,218, 52,158,231,121,204,156, 57,179,204,255, 82,249, +247,253,247,223,127,151,116, 58, 93,114,117,207,195,102,179,185, 28, 69,229, 20,142, 59, 48,111,230,228, 30,223,124,183, 65, 73, +136, 21, 9,123, 86, 35, 47,183,242,161,233,106,165, 2,203, 87,172, 23, 21, 60, 87,189,162,146,154,227,155, 71, 31,125,116,210, +142, 29, 59, 20,161,161,149,205,110,224, 30, 33,192,134,121,243,230,245, 26, 54,108, 88,173,102,205,154,217, 7,159,168, 75, 30, + 32,197, 51,187, 59, 53, 88,142, 80, 96,221, 23,159, 79,254,191, 69,223,109, 80,115,196,134,132,189,171,145, 87,206,172,151, 71, +165, 82,226,199, 21,235,108, 10, 5,127,174,170,118,246,121,242,110,199, 5, 49,182,207, 75,248,106,243, 98,212,109,209, 11, 67, +251,117,196,254,249,255,135, 39,155,153, 96,251,233, 25, 52, 31,186, 28,203,222, 45,206,222,180,250,249, 93,151, 90, 28,199,193, +199,240,207,132,149, 28,199, 65,163,213, 65,169,254, 39,251,162,214,235,193,123,144,177,181,159,187,253,111,103,109, 60,129,231, +121, 68, 68, 68,160, 81,163, 70,120,248,225,135, 17, 27, 27,139,110,221,186,225,196,137, 19, 56,113,226, 4,198,140, 25,227,212, + 92,185,138, 83,165, 82,161, 71,143, 30,232,217,179,167, 71,251,187,210,116, 86,107,125,171,154,149,189,118,163, 71,143, 6,128, + 91,205,102,221, 19, 84,203, 96,213,169, 83, 7,106,181,186, 90,134,170, 50, 77,171,213, 90,106,172,116, 58, 93,105,198,106,253, +250,245,165,109, 92, 65, 41,221, 78, 8,137,249,224,131, 15,222,212,233,116,221, 76, 38, 83, 20, 0,232,245,250,191,140, 70,227, + 46,155,205, 54,151, 82,154,123, 43,177, 58, 26,140,242,184, 42,114,207,202,202,122,252,249,231,159,223,206,113, 92, 67,251,249, +149,127,118, 68,150,229,171,153,153,153, 85, 14, 85,207,202,202,122,252,185,231,158,171, 84,179, 50, 93,119, 52, 43, 67,146,164, + 50,166,202,113,132,161, 59,184,154, 72, 84,169, 84,194, 96, 48, 96,237,218,181,168, 93,187,182,167,225,221,213,252,113, 36,253, +179,170,182,119, 13,208,236, 1, 80,103,224,172, 85,201,187,179,173, 97, 93, 3,212, 73,107,222,121,170, 65, 85,251,216,108,182, +135,102,204,152,177, 95, 16,132, 48,119, 98, 80,171,213, 73, 22,139,165,163,219, 65,151, 64, 41,197,185,115,231,228, 87, 94,121, + 37, 59, 43, 43,107,168,167,251, 3,192,222,132,164,217, 29,219, 5, 5, 12,233,223,177, 45, 8,129,213,234,164,168,151,128, 82, + 74,169,130,231, 82,246, 28, 76,121,165, 58,199,170, 41, 40,165,199, 9, 33, 83, 35, 35, 35, 71, 0,112,118, 37, 92,233, 74,231, + 42, 96, 85, 91, 44,159,183,105,211,102,252,123,239,189,231,215,175, 95, 63,132,134,134,194,215,215,243,187, 5,237, 63,148, 58, +162, 67,155,192,144,193, 79,116,124,156, 35,132, 90,156,189,142, 37, 16,251,235,169,224,207,237, 57,152,210,210,121,187,127,230, + 76,187, 29,217,134, 71,134,188,136, 71,134,188, 8,160,248,255,105,231, 47, 93,145,152,246, 27,226,184, 52, 88, 22,117, 4,241, +177,255,171,187,158,230,134,227, 56,244,251,110, 45, 84, 42, 85,105,156, 15,205, 40, 59, 46,160,241,107,238,223, 75,221,241,220, + 1,231,181, 86,158,214, 96,241, 60,143,236,236,108,156, 63,127, 30,153,153,153, 48, 26,141, 56,123,246, 44,172, 86, 43,114,114, +114, 96, 31,105, 88,157, 56,107,234, 61,186,147,154,255, 11,198,202,142, 71, 6,139, 82,154,218,190,125,251, 42,219, 72,146,228, +209, 40, 35,133, 66, 97,238,216,177, 35,169,108,180,129,253,111,157, 78,231,214,207,231, 18, 3, 21, 15, 32,158,148,184, 11,171, +181,252, 93, 15, 61, 71,146,164,244,118,237,218,241, 85,213, 36,200,178, 92,229,140,113, 89, 89, 89, 69, 0,106,244,214,225,183, + 67,179, 60,132, 16,105,196,136, 17, 85, 58, 41, 47, 47,175, 42,139,139, 92, 77, 36,106, 52, 26, 51,158,127,254,121,201,177,171, +217,113, 34,210,251, 26, 66,147,122, 63,253,114,216,238,108,107, 24, 0,216, 77, 22, 40, 77,114,182,203,159,127,254,153, 9, 32, +242,118,135,118,249,242,101,107,251,246,237,127, 44, 40, 40, 24, 77, 41,117, 62, 97,143, 11,246, 31, 78,119,157,158,184,203,160, +148, 30, 7, 48,242, 86,117,172,192,217,122,102,243,168,248, 15, 63, 28, 60,249,195, 15, 27,203, 64,109,148,204, 81,197,187, 97, +210, 28, 73, 56,146, 81,227,115,131, 73,146,148,250,208, 67, 15,121,188,143,171,237, 85,204, 36,142,255, 34, 20, 40,215, 37,232, +142,230,237,136,211,174,217,162, 69, 11,180,106,213,170,244,217,142,227,250,216,216, 88,183, 52, 91,183,110,141,102,205,154, 57, +157,161,189,124,205,213,157, 62,119, 59,246,159,190,177,177,149,143,236,188, 19,113,222,235,144,154, 40,100,117, 42,126, 15,214, +205, 48, 77,166,201, 52, 75,219,240,148, 82,183, 43,243,239,167,115,103,154, 76,147,105,254,251,154,247, 27,255,187,213,103, 12, + 6,163, 74, 60, 49, 87, 12, 6,131,193, 40, 11, 1, 80,105,135,176, 39,206,148, 16,226, 89,167,178, 27,250, 76,147,105, 50, 77, +166,201, 52,153, 38,211,188,255, 52, 93,105,223, 47,153, 49,214, 69,200, 52,153, 38,211,100,154, 76,147,105, 50,205, 59,174,121, +191,193,186, 8, 25, 12, 6,131,193, 96, 48,106, 24,207,111, 84,198, 96, 48,238, 43,166, 16,114, 75, 63,180, 38, 83,122,235,243, +181,184,193,189, 18, 39,131,193, 96, 0, 44,131,197, 96, 48, 24, 12, 6,131, 81,227, 48,131,197, 96, 48, 24, 12, 6,131, 81,195, + 48,131,197, 96, 48, 24, 12, 6,131, 81,195,220,214, 81,132, 12, 6,227,238,231, 94,169,109,186, 87,226,100, 48, 24, 12,128,101, +176, 24, 12, 6,131,193, 96, 48,106, 28, 5, 80,246, 70,197,148, 82,231, 55,220, 99, 48, 24, 12, 6,131,193,184, 13,220,111, 94, +164,116,154,134,251,225,100, 24, 12, 6,131,193, 96,220,187,220, 79, 94,164,180,139,208,209, 57, 50, 24, 12, 6,131,193, 96,252, +219,220, 79, 94,164,212, 96,221, 79,174,145,193, 96, 48, 24, 12,198,189,199,253,228, 69,202,100,176,238, 39,231,200, 96, 48, 24, + 12, 6,227,222,226,126,242, 34, 10,224,254,114,140, 12, 6,131,193, 96, 48,238, 61,238, 55, 47,114, 91,167,105, 32,132, 52,103, +154, 76,147,105, 50, 77,166,201, 52,153, 38,211,252, 95,131,205,131,197, 96, 48, 24, 12, 6,131, 81,195, 48,131,197, 96, 48, 24, + 12, 6,131, 81,195, 48,131,197, 96, 48, 24, 12, 6,131, 81,195, 40, 92, 55, 97, 48, 24,247, 51,247,202, 61,250,238,149, 56, 25, + 12, 6, 3, 96, 25, 44, 6,131,193, 96, 48, 24,140, 26,135, 0,168,116, 36, 0,165,244,148,219, 34,213, 24, 77,224, 74,159,105, + 50, 77,166,201, 52,153, 38,211,100,154,247,159,166, 43,109, 79,252,199,221, 12,161,244,246,205,231, 69, 8,105, 94,211, 47, 20, +211,100,154, 76,147,105, 50, 77,166,201, 52,239, 63,205,251, 13,214, 69,200, 40, 3, 33, 68, 65, 8,113, 90,155,231,106,251,191, +165,201, 96, 48, 24, 12,198,221, 12,187,168, 49, 74, 33,132,116, 0,208,183,228,239,141,148,210, 4, 79,182,255, 91,154,119,138, +184,184, 56,157, 86,171,237,241,251,239,191,171,206,157, 59,135,131, 7, 15,210,255,254,247,191,130,217,108,254, 45, 49, 49,209, +116,167,227, 99,212, 12,173, 91,183,126,156, 16, 50, 1, 0, 40,165,159, 30, 61,122,116, 91,117,181, 8, 33, 36, 50, 50,114,140, + 90,173,238,173, 84, 42,131, 36, 73, 34, 22,139, 37,221,100, 50,109, 79, 75, 75,155, 69,171, 81,184, 79, 8,105, 27, 16, 16, 48, + 50, 38, 38,166,241,229,203,151, 83,146,147,147,151, 3,216, 6,224,241, 6, 13, 26, 60, 31, 17, 17, 17,122,250,244,233, 11,217, +217,217, 11, 41,165,127,222,169, 56, 25,140,255,117,220, 50, 88,132, 16,206,223,223,255, 49,157, 78,247,102, 97, 97, 97,107, 31, + 31,159,211,162, 40,206,203,200,200,216,200, 62,120,247, 7, 37, 25,164,190,148, 82, 37, 0,240, 60,223,191, 67,135, 14, 97,132, + 16,153, 16, 66, 41,165,132,227,184, 88, 73,146,184,146,246,125, 9, 33,127, 82, 74,197,234,106,138,162,232,177,230,237, 34, 38, + 38,102, 26,165, 52,168,170, 54, 94, 94, 94,109,118,238,220,217,116,221,186,117,226,242,229,203,115,159,122,234, 41,195, 11, 47, +188,160, 88,182,108,217, 87, 0,254, 83,190,125,116,116,244,108,142,227, 2,220, 57,190, 44,203,217,103,206,156,121,187,154,225, + 51,106, 16, 66,200,132,151,103,236,238, 44, 83, 96,233,196, 46, 28,138,205, 75,181,136,141,141,253,126,192,128, 1, 79, 55,105, +210, 68, 33,203, 50, 4, 65,128,197, 98,105,122,244,232,209,174,219,182,109,107, 3, 96,168,135,177,245,157, 56,113,226,226,169, + 83,167,214, 81, 42,149, 68, 16,132, 7,127,250,233,167,158, 35, 71,142, 60,190,112,225,194, 86, 79, 62,249,164,183,125,253,228, +201,147,123, 17, 66,222,162,148,174,252,183,227,100, 48, 24, 46, 12,150,183,183,247, 3,117,234,212,121,167,118,237,218,189,218, +180,105,147, 55,124,248,240,191, 79,156, 56,113, 54, 38, 38,166,240,187,239,190,251, 68, 16,132, 5, 77,154, 52,249, 45, 63, 63, +127,214,181,107,215,206,122,114, 96, 66,200, 3, 0,134, 3,232, 5, 32, 4, 64, 58,128, 45, 0, 22, 83, 74,207, 85,231,100,130, +131,131, 91,120,121,121,141, 39,132, 60, 88, 84, 84, 20,226,229,229,149, 78, 41, 61, 84, 80, 80, 48, 51, 35, 35,227,104,117, 52, + 67, 66, 66, 26, 1,120, 67,161, 80,116,146, 36,169, 33,207,243, 73,146, 36,237,147, 36,105,126,122,122,250,133,234,104, 62, 28, +234,221, 79, 54,248,204, 18,120, 93,104,161, 89, 84, 25, 52, 10, 65, 41,155, 83,228,162,220,137,135,146, 11, 87, 87, 71,179,166, + 81,171,213,220,242,229,203, 91,169,213,106, 0,128,213,106, 69, 76, 76,204, 45,221, 39, 74,169, 84,114, 51,103,206,108,165, 82, +169, 0, 0, 54,155, 13,221,187,119,191, 43,238, 61, 69, 8, 9, 73, 76, 76,244,181,199, 86, 30, 73,146,208,191,127,255,112,181, + 90,141,133, 11, 23,138,217,217,217,173,151, 46, 93,154,248,213, 87, 95, 5,124,255,253,247, 67, 80,137,193,226, 56, 46,192,153, +166, 36, 73,176,217,108, 16, 69, 17, 86,171, 21,221,186,117,171,241,115, 98, 84, 15, 74,105, 24, 5,176,229,132, 25, 0,106,223, +138,150, 78,167,139, 26, 56,112,160, 34, 43, 43, 11, 74,165, 18, 54,155, 13,215,174, 93, 67,163, 70,141,120,171,213,218,196, 83, +189,166, 77,155,142,156, 62,125,122,221,205,155, 55,219,126,252,241, 71,203,163,143, 62,170,122,233,165,151,124, 58,119,238,220, + 41, 36, 36,132, 91,186,116,169,101,199,142, 29,182,231,158,123, 78, 51,109,218,180,186, 91,182,108,121, 26,128, 75,131, 85,211, +113, 50, 24,140, 42, 12,150,183,183,247, 30,131,193, 16,249,234,171,175,158, 27, 61,122,244,111, 6,131, 65, 2,128,107,215,174, +105,250,247,239,159, 53,104,208,160,235, 70,163,145, 95,176, 96, 65,131, 47,191,252,114,187,183,183,119, 90, 65, 65, 65, 59, 87, + 7, 36,132, 16, 0,111,114, 28,247, 70,143, 30, 61,246, 8,130,144,181,118,237,218,159,135, 12, 25,210, 81,150,101,175,223,127, +255,125, 19, 33,228, 27, 0,159,187,155, 29, 35,132,240, 17, 17, 17,241, 33, 33, 33, 99,191,254,250,107, 77,195,134, 13,161,215, +235, 81, 80, 80,208,224,194,133, 11,161,111,190,249,230, 19,141, 26, 53,154,231,235,235,251, 65, 98, 98,162,224,166, 38, 9, 10, + 10,250,143,143,143,207,199,159,124,242,137, 54, 58, 58,154,232,245,122, 92,189,122,181,121, 66, 66, 66,204,183,223,126,251, 82, + 72, 72,200,148,180,180, 52,183,227,236, 74,136,194, 18, 89,103,155, 95,211,118,221, 22, 46,254,150, 4,120,233,161, 32, 4,130, +205,166,204, 52,154, 34, 94, 31, 53,226,231, 14,141,235, 31, 40, 80,102, 62,114,230, 12,181,185,163, 89, 83, 80, 74, 69, 66,200, + 70,158,231,251,171,213,106,174,127,255,254,216,177, 99, 7, 49,155,205, 10, 0,208,106,181, 98,255,254,253,161,211,233, 96,181, + 90,101, 0, 27, 75,246,209,148,236,111,169, 74, 83,169, 84,114,221,186,117, 51, 30, 57,114,228,134,209,104, 84,218, 53,187,117, +235, 86, 75,163,209,232, 5, 65,112, 75,243,118,162, 86,171,113,233,210,165, 50,235, 36, 73,194,245,235,215,113,227,198, 13, 88, + 44, 22,146,147,147, 3, 73,146, 96,177, 88,178, 36, 73, 2,199, 21, 39,223,156,105,170, 84, 42,156, 63,127,190,194,122,155,205, + 6,147,201, 4, 65, 16,144,159,159,175,211,106,181,145,157, 58,117, 74, 5,176,174,176,176,112,214,241,227,199,147,106,246,236, + 24, 30,144,188,233,152,185, 1, 0, 27,128,203,183, 34, 68, 8,145, 1, 96,223,190,125,200,204,204, 68, 86, 86, 22,178,178,178, + 16, 26, 26,138,234,100,255,207,157, 59, 55, 55, 54, 54,150, 28, 63,126,124, 3,128,197,171, 86,173, 26,120,243,230,205,175,199, +141, 27, 87,107,230,204,153, 55,199,143, 31, 63, 10,192,154, 85,171, 86,189,216,162, 69,139,126, 39, 79,158,252,226, 78,196,201, + 96, 48,170, 40,114,167,148, 6, 61,240,192, 3, 55,231,204,153,211,116,226,196,137,181, 11, 11, 11,121, 0, 8, 10, 10, 50, 3, +128,209,104,228, 39, 76,152, 80,103,198,140, 25, 77, 53, 26, 77,142, 40,138,117, 42,209,168,108,132,193, 27, 62, 62, 62, 79,252, +253,247,223,171,154, 54,109, 90,107,250,244,233,199,188,188,188,232, 23, 95,124,113,180, 81,163, 70,129, 73, 73, 73, 63,248,248, +248,116, 7, 48,214, 73, 92, 21, 52,195,195,195, 39, 15, 25, 50,100,236,129, 3, 7, 52, 45, 91,182,132,183,183, 55,120,158,135, +159,159, 31,218,183,111, 79,246,238,221,171,233,221,187,247,152,188,188,188,153,238,106, 6, 7, 7,143,237,217,179,231, 39, 71, +142, 28,209, 61,242,200, 35,220, 36, 14,212, 0, 0, 32, 0, 73, 68, 65, 84, 68,173, 86, 35, 55, 55, 23,106,181, 26, 29, 58,116, + 32, 95,127, 53, 95,215, 60,186,217,228,144,144,144,169,238,106, 90, 30, 8,216,254,212,232, 9,221, 55,110,217, 70,234,213,171, +135,191, 63,159,138,125,157, 99,112,241,163,137, 8, 12, 12,196,134,205, 91, 73,223, 97,163, 59,250, 8,245,126,119, 87,243, 86, +113,212,164,148, 38,196,196,196, 36,158, 61,123, 22,157, 58,117,194,207, 63,255,220,114,220,184,113,163,199,141, 27, 55,250,231, +159,127,110,217,169, 83, 39,156, 61,123, 22, 49, 49, 49,137,148,210, 4, 66,200,104, 0, 55, 1,220, 44,249,219,169,230,158, 61, +123,208,189,123,247,156, 85,171, 86, 53,154, 52,105,210,180, 73,147, 38, 77,251,249,231,159, 35,186,119,239,158,179,103,207, 30, +143, 52,111,199,185,219,145, 36,169,194,131, 82, 10, 89,150, 81,183,110,221,235,155, 55,111,166,125,251,246,229,235,215,175,159, +222,191,127,127,205,161, 67,135, 40, 33,100,163, 39,113, 82, 74, 97, 50,153, 96, 50,153,112,249,242,101,221,188,121,243, 58,142, + 29, 59,246,129,159,126,250, 41,120,204,152, 49,163,124,124,124,142,182,106,213, 42,204, 19, 77, 79, 97,154,206,225, 56,238, 26, +138,205, 85, 17,199,113,201,213,213, 28, 60,120,112,243,176,176,176,122, 63,157,246, 71,142,170, 41, 36,165, 47,100,149, 31,164, +218,109,113, 81,213, 19, 65, 65, 65,245,194,194,194, 58,120,162, 73, 41,221,126,236,216,177, 94,148,210,133,148, 82,137, 82,250, +203,248,241,227, 95, 33,132,172, 30, 63,126,252, 8, 74,233, 47, 37,235,151,156, 56,113,162, 31,165,116,215,157,136,243, 86, 97, +154,255,155,154, 46,104, 11,160, 79,201,163, 29,128,246,229,150,213,229,218, 61,234,228,185, 79,185,229,182,229,246,179, 47,223, + 50,246,218, 23,106,127,216, 55, 16, 66,132,207, 62,251,236,224,183,223,126,187, 35, 35, 35, 35, 48, 34, 34,162,207,192,129, 3, +195,242,243,243,185, 65,131, 6,133, 7, 6, 6,246,221,181,107, 87,253, 65,131, 6,253, 62,100,200,144, 4, 66,136,203,186, 25, + 66, 72, 35,158,231,223, 58,126,252,248,254,240,240,112, 91,122,122,186,119,108,108,108, 1, 0, 52,110,220,216,120,227,198, 13, +157,183,183, 55, 54,111,222,124,152, 16, 50,156, 16,210,212,149,102, 80, 80, 80,108, 64, 64,192,216,143, 63,254, 88,195,243,124, +165,109, 52, 26, 13, 62,254,248, 99,141,143,143,207,171,193,193,193, 15,186,210,172, 95,191,126,148,183,183,119,252,188,121,243, +180, 86,171, 21, 54,155, 13,245,234,213,131,193, 96, 64, 70, 70, 6,210,174, 92,193,245,171, 87, 49,230,229,151,117, 94, 58,221, + 91, 65, 65, 65,173, 92,105,118, 10,247,238,111, 8,110,214,245,245, 55,222,196,153, 55, 95,198,142, 96, 53,234,191, 49, 1, 45, +119,159, 66,200,148, 89,216, 21,225,131,196,161,143,225,173,183,222,129,170,110,196, 67, 15,133, 26,158,114,165,121, 59, 80, 40, + 20, 84,163,209,192,108, 54, 43,246,237,219,215, 73, 20, 69,165, 40,138,202,189,123,247,118,253,237,183,223,122, 77,159, 62,253, +113,157, 78, 55,170, 67,135, 14,223, 19, 66,230, 82, 74,117,148, 82, 29,128,153,246,204, 83,101,154, 74,165, 18, 38,147, 73,121, +228,200,145, 17,146, 36,169, 37, 73, 82, 31, 57,114,228,181, 93,187,118, 61,191,112,225, 66,143, 53,255, 45,120,158,135, 66,161, +128, 82,169, 68,171, 86,173,254, 94,177, 98,133, 16, 20, 20,164, 88,180,104,145,127,221,186,117,189,190,255,254,251,220,156,156, +156,207, 60,209,180, 90,173,176, 88, 44, 48,153, 76,216,183,111, 95,195, 87, 95,125, 85, 97,181, 90,165, 97,195,134,221, 20, 4, +193,242,218,107,175,249, 24, 12,134,119,110,215, 57, 49,170,134, 82, 42, 1, 40, 2, 80,104,207,162,134,135,135,107,130,131,131, + 91,132,135,135,187,253,255, 88, 88, 88,248,205,236,217,179, 67, 56,141, 31,246, 91,123, 99, 21,157,138,237,126, 95, 33, 43,124, + 28,234,133, 62,128,158, 61,123,214, 37,132,204,175,129,120,215, 81, 74,135, 80, 74,127,173,206,254,183, 59,206,182,109,219,118, +106,211,166,205,145,184,184,184,140, 54,109,218, 28,105,219,182,109,167,234,106,217,153, 58,146, 60,250,233, 27,124,234, 71,163, + 8,253,244, 13, 62,117,234, 72,242,232,173,106, 50,238, 60,149,121, 17, 7,234, 16, 66, 54, 18, 66, 54,190,251,238,187,221, 0, +212, 46,183,252,144, 99, 59, 0,234,202,158,237, 15,135,245,117, 80,108,172,234, 56, 44,215, 8,165, 93,132,148,210, 74,187, 57, +234,212,169, 99,125,239,189,247,142,155,205,230, 83,223,127,255,125,228,232,209,163, 99,195,194,194,206, 15, 26, 52,104,147, 94, +175, 23,237, 53, 58,110,242,114,239,222,189, 55,215,170, 85,139,100,103,103,171,172, 86,171,226,218,181,107, 42, 73,146, 8,207, +243,212,104, 52, 42, 46, 94,188,168,180,217,108,242,131, 15, 62,184, 62, 33, 33, 97, 56,128,183,170, 18,212,235,245,175, 45, 90, +180, 72,235,204, 92, 73,146,132,194,194, 66,136,162,136, 41, 83,166,104,199,142, 29,251, 38,128,131, 85,105, 42,149,202, 49,115, +230,204,209,218,187,128,100, 89,198,209,163, 71,145,125,253, 58, 44, 5,249,176, 22,228,195,154,151, 3,174, 48, 15,207,247,122, + 92,187,240,215,181,111, 3,120,190, 42, 77,171,198, 48,227,251,197,223, 66,146, 36,164,175,173,188, 36,226,230,129,221,144, 68, + 1,211, 62,157, 73,222,122,249,201,233, 0, 86, 85,165,249,111,162, 86,171,185,207, 63,255,188,169, 90,173, 6, 33,132, 90,173, + 86, 68, 71, 71,223, 82,253,148, 90,173,230,231,206,157, 27,171, 82,169,136, 93,179,121,243,230,119, 69, 77,150, 35, 42,149, 10, + 58,157, 14,225,225,225,166,126,253,250, 37,204,157, 59,183, 1,207,243,122,133, 66,177, 53, 47, 47,111,250,233,211,167, 61,234, + 70,178, 88, 44, 48,155,205, 48,155,205, 72, 78, 78,174, 31, 25, 25, 73,254,243,159,255, 72, 69, 69, 69, 17, 75,150, 44,185,180, +106,213, 42,253,252,249,243, 7, 1,120,227, 54,157, 18,195, 9,145,145,145,106, 31, 31, 31,223, 6,181, 21, 69, 74, 30, 69, 25, +162, 88, 47, 36, 36,100, 2,128, 54,141, 27, 55,246,191,120,241, 98, 78,112,112,240, 65,142,227, 86,166,164,164,100, 84,165, 69, + 41, 37,162, 40, 98, 68,187, 92,140,122,144,131, 40,138,200,205,205, 69,114,114, 50, 78,159, 62,141, 67,135, 78, 87, 43,198,134, + 13, 27,190,172,213,106,123,168,213,234,112, 73,146, 56,163,209,152,100,177, 88,118,164,167,167,127, 67,171, 49,177,225,237,138, +211, 65,127,214,192,129, 3,131,124,125,125,113,236,216,177,160, 19, 39, 78,204, 2,208,230, 86, 52,213, 74,110,233,176, 87,230, + 7,215,242,243,195,213,179, 27,130,215,109,249,105, 41,138,107,121, 25,247, 56,206,188, 8,128, 44, 74,105,233,136,243,233,211, +167,247, 45,105,223,215,113,217, 13,253, 10,237, 74, 70,176,187,181,191, 39,148, 26, 44,251, 72, 49,103, 13,181, 90,173, 52,114, +228,200,243,235,215,175, 15,111,211,166,205, 95,206,138,129, 93,240,112,211,166, 77,147, 14, 31, 62, 76,235,212,169, 99,149,101, +153,232,245,122, 73,167,211,201,121,121,121, 16, 4,129, 38, 37, 37, 41,146,147,147, 85, 1, 1, 1, 42,184,145,170, 83, 42,149, + 29, 26, 54,108, 88,233, 54,171,213,138,194,194, 66, 20, 20, 20,192, 98,177,160, 94,189,122,132,227,184,246,174, 52, 57,142,235, +216,180,105, 83,146,147,147,131,160,160, 32,236,223,191, 31,133,121,185,176, 20, 20,192,146,151, 11, 91,126, 30,164,252, 92,228, + 94,207, 64,120, 96, 8, 41,153,106,160, 74, 68, 94, 23, 86,215,224,133,139, 83, 39,160,237,209, 36, 16,165, 10,135,155, 7,130, + 10,197,165, 86,237, 78,166,131,168,212,248,107,204, 11,168,255,236,171, 16, 56, 77,176, 43,205,219,129, 40,138,196, 98,177, 64, +171,213,138,157, 58,117,218,199,243,124, 87,181, 90,205,141, 26, 53, 10,215,174, 93,179, 55, 35, 0, 48,106,212, 40,232,116, 58, + 88, 44, 22, 17,192, 56,103, 53, 83,162, 40, 18, 65, 16,160,211,233,132, 54,109,218,124,195,243,252,107,106,181,154,111,210,164, + 73,230,140, 25, 51,210,189,188,188,188,146,147,147,111,170,213,234,212,240,240,240,118, 58,157, 46,204,149,230,191,137, 70,163, +129, 66,161, 0,199,113,168, 93,187,118,209,141, 27, 55, 14,253,253,247,223,207, 84, 71, 75,146, 36, 88,173, 86, 8,130, 0,179, +217, 12, 89,150,113,226,196, 9,104, 52, 26,165, 36, 73,167, 37, 73,210, 43,149, 74,240, 60,207,230,168,251,151,137,139,139,235, +218,178,190,207,172, 81,129, 22,255, 70,125,189, 10,245, 26,190,232,233,181, 66,219, 71, 31, 29,250,248,184,113, 19, 12, 1, 1, + 1,234, 43, 87,174,152,191,248,226,139,134,107,214,172, 33, 0, 62,175, 74, 47, 61, 61,125,245,140, 25, 51,106,117,237,218, 53, + 66,169, 84,146,220,220, 92,100,101,101,225,250,245,235, 72, 78, 78,166, 87,175, 94,253, 91, 20,197,159, 61,137,177,101,203,150, + 75,158,125,246,217, 97,209,209,209, 74, 74, 41, 4, 65,128,209,104,140, 61,116,232,208, 19,251,247,239,239, 4,192,227,255,203, +140,140,140,159, 63,253,244, 83,175, 46, 93,186, 52, 85, 42,149, 92, 77,196,233, 8,165, 52,200, 96, 48, 96,199,142, 29,240,241, +241,129,171,209,186,238, 96, 19,229,224, 90,126,181, 97,190, 48, 27, 65, 62, 97,176,137,242, 29,249,190,100,212, 60, 85,120,145, + 63, 1,244,185, 85, 51,116,187,204, 84,101,184,204, 96,217,185,118,237,154,166,176,176, 80, 33,203, 50,103,177, 88,148,178, 44, + 67,169, 84,186, 85, 48,238, 64,244,192,129, 3, 15,182,109,219,214, 8, 0,106,181, 90,244,245,245, 21,243,242,242, 80, 98,176, +100,133, 66, 97, 54, 24, 12,230,136,136, 8, 0,112,217, 69,104, 50,153, 26,232,116,186, 10,235,141, 70, 35, 10, 11, 11, 75, 13, +150,209,104,132,143,143, 15,138,138,138, 92,126,184, 37, 73, 10,215,235,245, 72, 79, 79, 7, 0, 20,230,230,192,156,159, 15, 91, + 65, 30,108,185, 57, 16,242,114, 33,228,229,128, 51,153,224, 23, 18, 10, 81, 20, 67, 93,105, 22, 89, 36, 53, 15,138,235, 27, 87, +163,222,107,227,156,182,187,185,111, 23, 12,145, 77, 96, 50,217,254,245, 57,202, 8, 33, 29, 56,142,139,107,214,172, 25,250,247, +239,143,161, 67,135,158,208,233,116,117,231,207,159, 31,157,150,150, 86,161,253,128, 1, 3,240,198, 27,111, 96,224,192,129, 63, + 28, 59,118,108, 65, 85,154, 93,186,116, 65,183,110,221,106, 13, 29, 58,244,170,193, 96, 72, 92,188,120,113,187, 41, 83,166,100, + 26,141,198,180,196,196,196, 22,169,169,169,250,198,141, 27,239,142,137,137,225, 54,111,222, 28, 86,149,230,191,141, 40,138, 16, + 4, 1, 54,155, 13, 22,139,197,229,103,197,145,242, 9, 5, 65, 16, 74, 71, 16,154,205,102, 8,130, 64,214,173, 91,139, 13, 27, + 54,112,103,207,158, 9,153, 56,241, 93,228,230,230, 66,146,164, 26, 63, 15, 70,229,180,105,211,166,151,130,202,139,158,171, 47, +106,159,171, 39, 22, 42, 56, 90,120,225,219, 15,138, 78,248, 41, 44,150, 34,226,253,254, 7, 31,248, 95,186,116,201,246,233,167, +159,102,244,239,223, 95,251,202, 43,175, 52,219,188,121,115,167, 6, 13, 26,124,155,156,156,156, 91,153, 38, 33, 68,245,242,203, + 47, 31,244,247,247,111,244,227,143, 63,102,166,167,167,215, 18, 4, 65,111,181, 90,109, 86,171,245,146,205,102,219,111,181, 90, +119,100,100,100, 36,122, 18,171,193, 96,104,249,212, 83, 79, 41,115,114,114,160, 80, 40, 96,179,217,144,149,149,133,214,173, 91, +243, 59,119,238,140,174,206,249,159, 57,115,102,118, 80, 80,208,238, 13, 27, 54,244,240,242,242,138, 83,171,213,245, 37, 73,146, +204,102,115,166,217,108, 62, 94,157, 56, 29, 33,132,164, 31, 61,122, 52,200,219,219, 27,105,105,105, 32,132,164, 87, 87,203,142, + 74,201,165, 92,253,107,125,104,144, 79, 67,156, 59,119, 16, 42, 37,151,114,171,154,140,187,131, 42,190, 95,219,150,108,239,235, +194, 36,153, 38, 78,156,248, 30, 33,100,227,196,137, 19,223,171, 68,223,190,159,228,216,206,161,125,141,253,168,175,242, 34, 94, + 80, 80,160,248,243,207, 63,107, 39, 39, 39, 27,234,215,175,111,140,137,137,201, 37,132, 80, 73,146,184,155, 55,111,122,165,166, +166,106,253,253,253, 45,161,161,161,121,110, 30,239,194,235,175,191,222,101,210,164, 73,137,143, 61,246, 88, 54, 0,228,228,228, + 32, 43, 43,203, 62, 74, 11,233,233,233,220,145, 35, 71,106,109,221,186, 53, 22,110,140,224,209,233,116,201, 5, 5, 5, 77,252, +252,252, 0, 20, 95,208,236,166,202,241,217,102,179,161,160,160, 0, 94, 94, 94, 46, 63,220, 28,199,165,165,165,165, 69,154, 76, + 70, 36, 93,188, 8, 75, 65, 30,108,249,121, 16,242,115, 33,228,230, 66,202,189, 9,174,176, 0, 6,157, 14, 5, 55,111,128,231, +249,107,174, 52,189, 52,188, 85, 16, 37,117,157,158, 79, 0,196,249,245,217,175,125, 71,208,168,150,208,233,126,245,212,188,222, + 18,246, 57,171,236,115, 82,233,116, 58,124,242,201, 39, 72, 76, 76,148,171,234, 6, 86,171,213,224, 56,174, 82, 55, 80, 94, 83, +163,209,232, 38, 77,154,164, 59,126,252,184, 86,173, 86,195, 96, 48,232,143, 31, 63,222,226,143, 63,254,224,140, 70, 35, 31, 25, + 25, 57, 48, 56, 56,184,176, 42,205,219,137, 40, 86, 44, 35, 20, 69, 17,133,133,133,165,117, 83, 55,111,222, 84,104,181,218,198, +157, 59,119, 78,176, 90,173, 63,139,162,248, 93, 98, 98, 98,190, 51, 77,155,173,226, 96, 80, 89,150, 33,138, 34, 68, 81,132, 66, +161,144,215,173, 91,143, 47, 23,204,197, 47,171,126,165, 93,186,116, 33,155, 55,111,134, 44,203,169, 53,123,118, 12,103,200,178, + 60,107,215,132,193, 90, 72, 82,161,101,247,138,162,109, 55, 20, 69,223,158,218,117,228,134, 96,209, 60,240, 64, 68,148,143,183, + 47,247,253,242,111,111,102,100,254,125,225,203, 47, 83, 67,167, 77,155,230, 23, 17, 17,225,123,254,252,249, 96, 0,149, 26, 44, +131,193, 16,254,194, 11, 47,188,116,243,230, 77,229,226,197,139,151,165,165,165,237,165,148,254,237,216,134, 16,210,154, 16, 50, + 19,128, 18, 64, 61, 0, 34,128,237,148,210, 31,156,197, 90, 50,135, 28,118,239,222, 93, 97,180,159, 44,203,213, 30,237,151,145, +145,145,211,190,125,251,150, 23, 46, 92, 88,151,147,147,243, 99,249,237,122,189,254,137,152,152,152,167, 15, 31, 62,252, 33,165, +244, 82,101, 26,206,160,148,190,117,246,236,217,207,100, 89, 14,227, 56, 46,137, 82, 58,190,186,113,218,177,218,228, 87,214,111, + 89,181,216, 42, 72, 13,212, 74, 62,217,106,147, 95,189, 85, 77,198, 93,143,189, 70, 10,142,198,169, 18, 99,244,199,244,233,211, +117, 51,102,204,192,244,233,211, 43,244,111,219, 53, 40,165,125,167, 79,159,126,218,222,206,161,253,222,154, 10, 88, 81,114,160, + 10, 87,124, 81, 20, 13,239,190,251,238,195,177,177,177,233, 93,187,118,205,104,216,176,161,209,190, 77,175,215, 91,253,252,252, +172, 22,139, 69,147,158,158, 94,231,175,191,254,106, 40,203,114,197, 52, 82, 69,126,247,243,243,171,117,228,200,145,218, 43, 87, +174,124,224,232,209,163, 97,207, 62,251,108, 23,139,197, 2,171,213,138,203,151, 47,135, 45, 90,180, 72, 86,169, 84,185,132,144, + 63, 1,184,188,200, 10,130,144,112,225,194,133,198,237,219,183, 39,130, 32,148, 49, 85,142,127,171,213,106,164,165,165, 81, 89, +150, 15,185, 17,231,193, 35,135, 15, 71, 54,111,214, 12,150,188, 28, 88,243,115, 97,203,203,133,152,151, 11, 57, 63, 23, 92, 97, + 1,106,215, 82, 66,167,243,194,133,244, 12,148,196, 90, 37, 74,209,116, 53, 45, 47,191, 73,100,252,231,216, 21,225, 3, 42,216, + 74,187, 5, 1,148,118, 23, 62,244, 87, 22,246,253,145, 0,133,100,169,152, 50,250, 23,177, 90,173,242,160, 65,131, 14,115, 28, +231,241,141, 62,157, 33, 8,130, 60,122,244,232, 82,205,148,148,148,155, 41, 41, 41, 90,147,201,196, 25, 12,134,194,154, 58,206, + 45,196, 87, 97,157,205,102,131,213,106,133,201,100, 66, 70, 70,134,122,251,246,237,157, 18, 18, 18, 84,103,206,156, 65, 66, 66, + 66,171,117,235,214,189, 27, 21, 21,213,242,175,191,254,170,212,100,151, 55,109,178, 44,195,126, 29,164,148,130, 82,202, 3,192, +250, 53, 27,209,179,103, 79, 82, 80, 80,128, 13, 27, 54,212, 72, 55, 10,195,109,138, 32, 74, 58,235,158, 21, 69,239, 92, 84,231, +159, 54, 42, 62, 78, 76, 76,220,214,187,119,239,125, 65,245, 34,124, 0, 64,163, 50,212,225,169,183,161, 78,157, 58, 26, 0, 8, + 10, 10,138, 19, 4, 97, 1,128,142,149, 9, 14, 24, 48,224,161,186,117,235,198,110,217,178,229,120, 90, 90,218,190,242,230, 10, + 0,154, 52,105, 50,229,212,169, 83,189,148, 74,101,233,247,111, 73,113,111,165, 6,107,240,224,193, 77, 66, 66, 66,106,111,190, +224,139,124, 85, 36,100, 46, 23,148,215, 64,242,107,137, 36, 85, 52,234,213,251,171,118,100,100,100,171, 75,151, 46, 29,247,228, +228, 9, 33, 13,158,124,242,201, 77, 75,150, 44,137,234,217,179,167, 26, 64, 5,131, 21, 21, 21, 53,104,231,206,157, 67, 70,141, + 26,213,146, 16,210,143, 82,122,209, 93,253,196,196,196, 3, 0, 92,150, 81,120,194,164,133,116, 7,128,176,154,212,100,220,121, + 92,244, 14,100, 57,100,159,178, 80,124, 47,101,199,101,251,255,189,213,161,109, 86,137,110, 95, 0,214,114, 89,175,202,182,101, + 1,168,177,228,134,211, 12,150,205,102,219,126,249,242,229,182, 79, 62,249,100,150,163,185,114,124, 1, 12, 6,131,197,199,199, +167,240,240,225,195, 65,146, 36,237,118,227,120,139,119,238,220,185,107,222,188,121, 43,106,213,170, 37, 60,255,252,243,220,132, + 9, 19,246,221,184,113,131,222,184,113, 3,243,231,207,239,220,169, 83,167,125, 73, 73, 73, 82, 98, 98,226,139, 0,122,186, 18, + 52, 26,141, 95,189,246,218,107, 79,239,219,183, 79,107,181, 90,145,155,155, 91, 33,123, 37, 8, 2,120,158,199,130, 5, 11, 44, + 69, 69, 69,115, 93,105,138,162,248,205, 87, 95,125, 53,100,209,151,243,180, 10,193, 6, 99,110, 14,164,146, 7,111, 46,130, 65, +203, 33, 50,182, 14,114,211, 53, 88,190,229,128, 73, 20,197,175, 92,105, 42,205,133,227, 70,141, 24,190,113,251,239,187, 80,187, + 99,119,100,239,218, 90,161,141,186, 78, 61, 88,109, 54,124, 60, 53,158, 18, 83,238, 4, 87,154, 53,137,125,206, 42, 66,136,253, + 31,112,227,177, 99,199, 18, 98, 99, 99,123, 89,173, 86,167,251, 89,173, 86,200,178, 92,233, 8, 3, 87,154, 26,141, 38,181, 73, +147, 38,191, 55,106,212,104, 32, 0, 52,107,214,108, 13,199,113,221,171,210,188,157, 8,130,128, 73,147, 38, 97,198,140, 25,152, + 56,113, 34,128, 98,131,100,255, 1, 96,177, 88, 26,110,221,186, 85,125,224,192, 1,186,124,249,242,236,193,131, 7,251, 61,251, +236,179,126, 63,254,248,227,127, 0, 84,250,126, 9,130,128,241,227,199, 99,225,194,133, 24, 57,114,100,133,237, 60,207,203,105, +105,169,176, 88, 45,116,253,250,245,233, 10,133,194,255,139, 47,190,208,141, 29, 59,246,174, 43,246,191, 95,145, 36,233,253,142, +179,215,189, 9,232, 4, 81, 20,231,158, 56,113,100, 55, 0, 12, 29, 58,180,238,236,217,179,213, 0,240,249,204,207,149,148, 82, +165,125, 98,216,143, 62,250, 72, 59, 98,196,136,186,206, 52, 87,175, 94,157,243,209, 71, 31,213,126,229,149, 87,122,238,218,181, + 75, 75, 8,217,138,226, 26,146,108, 20,255,112, 12, 0,112,160, 78,157, 58,129,171, 86,173,138,236,209,163,135,151,171, 56,139, +138,138,190,253,250,235,175,195,103,237,245,198,230,162,129, 72,161, 67, 65,107, 81,212, 82, 21,160,153, 33, 25, 93, 2, 83,130, +126,252,241,199,197, 0,226,220, 61,119, 66, 72,244,224,193,131,215, 46, 89,178,164,225,240,225,195, 83, 15, 28, 56,144, 66, 8, +153, 82, 73,211, 27, 47,188,240, 66,210,178,101,203, 34,101, 89,222, 70, 8,233, 73, 41,173,214, 68,203, 12, 70, 53,113,235,182, + 79,213,104,123,219,112,106,176, 68, 81,124,153, 16, 18, 51,113,226,196,207,130,130,130, 26,196,199,199, 95,105,214,172, 89,145, +125,251,141, 27, 55, 12,123,246,236,137,200,207,207, 47, 16, 69,113, 24,165,244, 68,121, 13, 82,238,110,219,148,210, 36, 66,200, +103,173, 90,181,122,250,167,159,126,218,227,237,237,157,127,240,224, 65, 31, 31, 31,159,188, 51,103,206,120,241, 60,111,252,251, +239,191,177, 99,199,142,206, 0,190,172,236, 87, 82,121,205,244,244,244, 99, 13, 27, 54,252,124,236,216,177, 99, 63,252,240, 67, +173, 44,203, 48,153, 76, 40, 40, 40,128,217,108, 46, 45, 78, 94,185,114,165,197, 98,177, 44, 74, 75, 75,171, 48,130,176, 18,205, +132,208,208,208,133,115,191,152, 59,250,213,167,159, 84,211,220, 27,200,203, 48,129,152,139, 96,208,170, 17,221, 61, 24, 69, 55, + 8,150,236, 57, 98,189,105,181,173, 74, 75, 75,171, 96, 46,203,107,238, 79, 46,216,244,224, 3,117,119,124, 52, 53,254,209,119, +191,251, 21,178, 44,227,175,215,158, 71,206,222, 29,208, 55,107,129,135,254,202,130,213,106,197,196,241, 99,193, 27, 51,247, 29, + 76, 46,252,197,149,102, 77,224,168, 89, 50, 15,213,159, 37,127,139,132,144,209,132,144, 97, 81, 81, 81, 24, 53,106, 20, 6, 12, + 24, 80,102,223,181,107,215,226,235,175,191,134,197, 98, 25, 70, 8, 57, 74, 41, 93,224,137,102,195,134, 13,219, 69, 71, 71,243, + 65, 65, 65, 70, 0,224,121,190,251,233,211,167,219, 70, 69, 69, 85,169,121,155,206, 61,231,226,197,139, 62, 51,103,206, 36, 54, +155, 13, 83,166, 76,129,221, 88,218, 51, 78,239,191,255,126,144,183,183, 55,102,205,154,101,205,206,206,126,228,198,141, 27, 59, +231,205,155, 23,176,114,229,202,103, 80, 98,176,202,105, 94, 63,123,246,172,247,194,133, 11, 57, 81, 20, 49,123,246,236, 10, 25, +173,183,222,122, 11, 54,155, 0,165, 66,105,181,152, 45,209, 58,157,238,146,191,191,191, 78,150,101, 90, 89,156,183,227,220,255, +215, 53, 79,156, 56,177, 29,192,118,103,237,237,117,116, 38,147, 9,217,217,217,200,206,206,134,175,175, 47,224, 48,193,108,121, + 77,147,201,116,124,252,248,241,137,223,124,243, 77,207, 63,254,248,227,201,189,123,247,246,222,177, 99,135, 57, 41, 41, 73, 20, + 4,129, 6, 6, 6, 42, 58,118,236,168,237,221,187,183,151, 70,163,225,222,127,255,253,236, 79, 62,249, 36, 0,192, 13,103,154, +148, 82, 94,150,101,188,221, 41, 31,227,187, 41, 96,177, 20,255,160, 76, 79, 79,195,233,211,167,145,144,112, 14,132,144, 42, 7, + 71, 84,242,122,206,253,241,199, 31, 35,212,106, 53, 89,177, 98, 69,131, 21, 43, 86,140,113,245,250,253,240,195, 15,225, 43, 86, +172, 88, 64, 8,121,148, 82, 42,223,171,239, 59,211,188,251, 52,239, 55,170,172,193,162,148,158, 6,208,147, 16,210,113,248,240, +225,159, 70, 69, 69, 89, 68, 81, 84,110,219,182,173,105,118,118,182, 90, 20,197,241,148, 82,143,250, 43, 41,165, 11, 9, 33,232, +223,191,255,248, 70,141, 26,237, 60,122,244,104,203, 62,125,250,108, 91,187,118,109, 71, 81, 20,255, 62,117,234,212, 48, 0,115, + 1,124,233,174,230,213,171, 87,167,236,216,177,131, 28, 60,120,240,157,137, 19, 39,106,234,212,169, 67,252,252,252, 96, 50,153, +144,146,146, 66,151, 45, 91,102,177, 88, 44, 95,250,250,250,126,224,174,102,157, 58,117, 38,236, 61,114, 68,125,254,210,197, 23, + 95,236,245,152,182, 65,227, 38, 48, 16,160,240,230, 13,236,217,147,129,239, 14, 29, 55,103, 91,109,255,229,121,222,237,161,244, + 33,151,178,122,110, 95,181,100,203,238,223,127,127,116,218,140,207, 72,208,115,175,194, 43,172, 33,228,240, 7,176,103,247,110, +124,242,209, 20,202, 23,102,238, 21, 46,101, 62,230,174,102, 77, 67, 75,238, 3, 88, 50,255,212, 76, 89,150, 21, 64,113, 77,214, + 27,111,188, 1,199, 91,231,124,253,245,215, 48,153, 76, 0,160, 32,132,204, 36,132, 44,173,108,212, 95, 21,154,161,155, 54,109, + 10,117,212,140,138,138,114, 75,179,166,201,204,204,252,224,229,151, 95,158,161, 84, 42,125,101, 89,174, 80,156, 14, 0, 94, 94, + 94,200,207,207,135, 36, 73, 98,173, 90,181,206, 9,130, 0,133, 66, 1, 56,249, 28, 21, 21, 21,125, 48,114,228,200,143, 9, 33, + 78, 51, 29, 58,157, 46,105,255,254,253, 15, 60,251,236,179,220,170, 85,171, 46, 63,243,204, 51,154, 63,254,248, 67, 2, 80,173, + 57,141, 24,183, 31, 74, 41,138,138,138, 0,192,233,148, 8,148,210,100, 66,200,248,196,196, 68,237,200,145, 35,227,158,123,238, + 57,159,110,221,186, 25, 28,219,152, 76, 38,121,195,134, 13, 69, 11, 23, 46,188,177,119,239,222, 63, 95,122,233,165,129, 40,238, +222,168,148,244,244,244, 77,243,231,207,247,237,210,165, 75, 99, 73,146,144,157,157, 93, 90,131,149,154,154,138,164,164,164, 36, + 89,150,215,123,120, 58,175, 61,251,236,179,155,151, 45, 91, 22, 54,124,248,240,212,149, 43, 87,174, 7, 80, 89, 77,173, 97,208, +160, 65, 79, 44, 91,182, 44,108,196,136, 17,201, 0,198, 80, 54,195, 59,131, 81, 37,110,141, 84,163,148,238, 7,208,129, 16,210, +159,231,249,113,133,133,133,179, 41,165,235,170,123,208, 18,147,181,237,226,197,139,175, 0,104, 51,119,238,220,119, 1,164,160, + 56,173,215,163,178,122, 5, 23,122, 18,128, 15,131,131,131, 87,199,199,199,215,200,189, 8, 75,110,169,243, 90, 80, 80,208,202, + 79, 87,174,254,128, 82,218,154,163,114,109,153,112, 57, 28,199, 29,147, 36,233,147,212,212,212, 61,158,104,254, 92, 28,103,143, + 7, 27,120,247, 29, 63,226,217,207, 68,165, 46,188,208, 44,170,189, 52, 10,171, 74,178, 36,113,166,156,247, 15, 38, 21,222,149, + 23, 86,139,197, 34, 14, 28, 56,240, 91,142,227,100, 0,144, 36, 73, 97,177, 88, 94,132,155,255, 67,255,150,102,117,201,206,206, + 46, 4,240, 90, 85,109, 58,117,234,244,195,150, 45, 91,158,237,209,163,135,180,113,227,198,204,190,125,251, 42, 18, 19, 19, 41, +128, 29,149,181,191,122,245,170, 5, 78,238, 72, 96,167, 85,171, 86, 97, 75,151, 46, 61,250,202, 43,175,248, 44, 88,176,160,214, +225,195,135,165, 37, 75,150,228, 23, 22, 22,206,170,246,201, 48,106, 20, 82, 50, 40, 69,169, 84, 66,175,215,195,199,199, 7, 89, + 89, 89, 46, 71,122, 82, 74, 47, 17, 66,250,140, 27, 55,174,211,184,113,227,250,132,132,132, 68, 55,104,208,160, 1,199,113, 92, + 70, 70, 70, 86, 74, 74,202, 85,155,205,182, 19,192, 38, 0,170, 70,141, 26, 29, 3,176,220,153,222,153, 51,103, 62, 14, 10, 10, +218,181,102,205,154, 62, 26,141,166,153, 90,173,174, 37, 8, 2, 87, 84, 84,116,211,102,179,157,181, 88, 44, 27,211,211,211,255, +240,228,220, 40,165,231, 9, 33,221, 20, 10,197,166, 37, 75,150, 68,101,100,100,132,239,217,179,167, 95,249,118,113,113,113,203, +150, 45, 91, 22, 54,106,212,168, 75, 43, 86,172,240,168, 6,139,193,248, 95,197,163, 11, 89,137,169,170,182,177, 42,167,149, 4, +224,131,146, 71,141,144,150,150,118, 18,192,179, 53,165, 7, 0,233,233,233, 7, 0, 60, 14, 20,207,230,156, 82,124,209,188, 37, + 14, 38, 23,108, 4,176,209,101,195, 59, 8,165,212, 66, 8, 25, 87, 50,202, 9, 0,198,149,159, 54,129, 16,114,194,113,187,171, + 76,211,237,208,252, 55,201,201,201,249,207,119,223,125,119,248,245,215, 95,215, 12, 29, 58, 20,103,207,158,197,130, 5, 11, 44, + 57, 57, 57, 46,111,166,235,140,227,199,143, 39,181,106,213,170,245,226,197,139,223, 89,180,104, 81,127, 66, 8,187, 23,225, 93, +130,213,106,253,251,169,167,158,178,223, 63,149,218,111,157,100,159,182, 67, 20, 69,151, 63, 4, 75,178,183,187, 74, 30,174,168, +244, 86, 94,142,164,167,167, 39, 0, 72,112, 67,203,109, 74,178,109,125,174, 94,189, 58,237,252,249,243, 21,139, 67, 1,156, 62, +125,122,109,143, 30, 61,244, 9, 9, 9,239,121, 58,138,144,193,248, 95,133, 84, 99,226, 95,247,197,239,145,126, 95,166,233, 92, +147,184,184,241,114,101,219,239,132,102,117, 96,154, 76,147,105, 50, 77,166,121,247,104,222,111,252,235, 93, 49,140,123, 11,119, +178, 82,119,131, 38,131,193, 96, 48, 24,119, 19, 4, 64,165,243, 28,121,226, 76, 9, 33, 30,207,149,228, 74,159,105, 50, 77,166, +201, 52,153, 38,211,100,154,247,159,102, 37,218,131,203,109, 42, 51, 15, 36,165,116,145,167, 49,220, 13,176, 46, 66,166,201, 52, +153, 38,211,100,154, 76,147,105,222,113, 77, 39,199, 25,126,175, 26, 44,118, 67, 89, 6,131,193, 96, 48, 24,140, 26,134, 25, 44, + 6,131,193, 96, 48, 24,140, 26,198,173, 34,119,181, 90, 29, 67, 41,125,137, 16, 82,159, 16,114,141, 82,186,212,106,181, 86,184, +137,226,253,142, 90,173,142, 33,132,188, 68, 41,173, 79, 41,189, 70, 8,185,179,175, 3, 33,100, 74,124,241,108,210,147,227, 65, + 43,157, 29,147,193, 96, 48, 24, 12,198,191,142, 83,131, 21, 30, 26,250, 36,199,147,121, 54, 65,242,247,243,243,227,230,207,159, +207,245,235,215, 15, 27, 54,108,192,152, 55,222, 24, 19, 28, 28, 36,171, 20,138, 28, 42,139, 99,174,166,164,255,228,206,193, 6, + 13, 26,148, 41, 8,130,211, 89,173,121,158,191,190,118,237,218,122,213, 57, 17, 71,130,227,158,204, 20,108, 54,167,199, 81, 40, +148,215,211,143,253,236,214,113, 66, 67,131,158,228, 9, 55, 79,144,100,127,127,127,127,238,203, 47,191, 44,125, 29, 94,127,253, +245, 49, 33,193,193,178, 74,201,231,200, 18, 29,115, 53, 37,197,173,215,161, 70,112, 48, 87, 0, 48, 37, 30,100, 50, 33, 96, 38, +139,193, 96, 48, 24,140, 59,143, 83,131, 69, 56, 44, 88,241,205, 76,255, 27, 55,115,176,114,237, 54, 68, 69, 69,225,204,153, 51, +136,138,138, 66,199,118, 45,185,199, 59,180,226,120, 14,117, 38,125,185,124, 1, 0,183,140,133, 32, 8,117,215,172, 89, 3, 66, + 72,233,132,125,246, 73,251, 10, 10, 10,240,230,155,111, 58, 53, 69,158, 32,216,108,117,255,254,243, 87, 40,121, 2, 65,162, 16, + 68, 10, 65,148, 97,147, 40,242,141, 34,186,247,121,214,237,227,112,224, 22, 44,157, 55,211, 63, 55, 47, 15,191,110,222, 94,230, +117,232,254,112, 91,110,104,239,174,156, 94,167,170, 51,124,194,167,110,191, 14, 53,129,163,185,114, 92, 55,185,138,219,119, 48, + 24, 12, 6,131,193,248,119,112,106,176,172,130,228, 95,175,150, 47,190, 91,186, 20,227, 39,126,132,166, 77,155,130, 82, 10, 66, + 8,222,251,112, 42,230,124, 52, 17, 79,245,234, 12, 65,148,253,157,105, 84, 54,194,128, 16,130, 43, 87,174,192,100, 50,149,121, +196,196,196,184, 21,176,187,163, 22,148, 60,193,166,163, 5,176, 9, 50,108, 98,201, 67,144,209,173,185,183, 71,154,130, 36,251, +251,249, 24,176,248,155,175, 49,126,234,204, 50,175,195,132,247, 62,196, 87, 51, 62,192, 91,163,254, 15, 86, 65,242,119, 87,179, +186, 48, 77,166,201, 52,153, 38,211,100,154,247,171,230,253,134, 2, 0, 8, 33, 93, 0,236, 6, 0, 74,105,105,102, 68,176,154, + 17, 29, 90, 27, 95,207,250, 24, 20, 28,100, 74, 1, 10, 80, 89, 64,195, 0, 61, 76, 70,163,199, 7,148,101, 25, 54,155, 13,130, + 32, 96,209,162, 69, 40, 44, 44,132, 44,203,136,138,138, 2, 0,196,197,197, 57,102, 96,146, 19, 19, 19,195, 92,105,214,109, 49, + 32, 9, 20, 13, 28,215, 77,158,249, 45, 14, 28,253, 27,148, 2, 26,157, 30, 67,158, 27, 1, 73,166,176, 9,158,223,159,212,108, + 52, 34,208,160,196,156, 79, 62, 4,167, 84,129, 3, 1,199, 17,112, 68, 70,211, 16,127, 88,138,111, 78,252,175, 50, 57, 30,180, +124, 22,107,114, 60, 40, 38,255,235,161, 48, 24, 12, 6,131,113,203, 56,243, 34,247, 42,246, 12,214,238,202, 78,198,106, 54, 33, +196, 95,133,250, 6, 95,136,162,132,211,182, 64, 20, 24,205,176,217, 4, 36,217,108,184,116, 44, 3, 15, 61,244, 16, 6, 12, 24, + 32,217,108, 54,168, 84,170,188,181,107,215,214,170,234,128,178, 44, 67, 16, 4,216,108, 54, 20, 21, 21,225,199, 31,127,132, 66, +161,128, 44, 23, 27, 31,123, 9, 17,165, 20, 15, 63,252,112,131,170,180, 74,161,104,112,233,240,106,120,107,121,136, 50,133, 40, + 82, 8, 18, 32,201, 20, 70,171,140, 65, 47,127, 0, 81,150, 33,202, 50,172,110, 24,172, 50,134,173, 86, 91,244,127,119, 37, 0, + 67,233,118, 31, 13,197,248,135, 57,168,212, 26,168, 85, 60, 44, 38,207,141,230, 45, 67, 41,157, 76, 8, 88,145, 59,131,193, 96, + 48,238, 19, 42,245, 34,247, 42,101,186, 8, 9, 33, 93, 40,165,123,236,203, 86,179, 17,162, 32, 65, 16, 37,136,130,136,188, 66, + 19, 62,251,236, 51,104, 52, 26, 16, 66, 74,205,146, 44,203,156, 32, 8,232,221,187,183,211,238, 66, 59,146, 36,193,102,179,193, +102,179,129, 82, 10,158,231,209,190,125,251, 10,237, 14, 30, 60,232,209,137,120,107,121, 52,124,244,221, 10,235, 15,173,254, 24, +148, 82, 72, 82,241,195, 29,131,229,202,176,197,118, 25, 10,139, 85, 0,165, 0,104,113,134,235,142, 64, 41, 45,173,185, 98,153, + 43, 6,131,193, 96,220, 7,148,247, 34,247, 42,229,107,176,118, 3,255,116, 59, 89, 76, 38, 8,130, 8, 81,148, 32, 8,197,198, + 72,167,211,161,115,231,206, 0,202,102,155,182,109,219, 6,155,205,230,242,128,246,162,246, 18, 99, 6, 74, 41, 86,174, 92, 9, +165, 82, 89,250, 80,169, 84, 30,159,136, 40, 81,188, 59,225,109,168, 20, 28,148, 10,174,244, 89,162, 20,148, 22,155, 35, 73,166, +176, 8,238, 37,121,170, 50,108, 0, 96,181,216, 0, 74, 65, 65, 97, 42, 42,242, 56, 94, 6,131,193, 96, 48, 24,149, 82,198,139, +220,171,216, 13, 86, 87, 66, 72, 5,231, 97, 53, 21,149,100,175, 36, 8,162, 88,106,160,102,205,154, 5,133, 66, 1,181, 90, 13, +133, 66, 81,106,136,220, 49, 88,102,179, 25, 17, 17, 17,176, 90,173,136,138,138, 2,165, 20, 79, 63,253,116,133,118,135, 15, 31, +246,232, 68, 4,137, 98,250,167,179, 43,172,223,255,243, 71,104,209,172, 33,218, 61,224, 5,179, 77, 70,190, 81,116, 75,175, 42, +195, 6,160, 56,131, 5,128, 82,192, 84,116,135, 50, 88, 12, 6,131,193, 96,220, 63, 84,234, 69,238, 85, 20, 0, 80,146,138,171, +224, 22,205, 70, 35, 68, 65, 44, 53, 89, 86,171, 21,178, 44,227,141, 55,222,168, 32,180,115,231, 78, 88,173,214,170, 15,166, 80, + 92,127,245,213, 87,203, 76,145, 64, 41,197,234,213,171,161,209,104,202,100,177, 8,241,204,188, 10, 18, 69,252,251, 99,161, 86, +242,101, 12,145, 44, 3, 27, 54,253,134, 13,155,126, 43,109,203,243,202,235,238,232, 57, 51,108, 0, 96,181,150,100,176, 40, 69, + 81, 97,129, 71,177, 50, 24, 12, 6,131,193, 40,139, 51, 47,114,175, 82,229, 76,238,102, 83, 17, 4,135, 26, 44,155,205, 6, 81, + 20,177,104,209,162, 50,221,121, 74,165, 18, 28,199,185,204, 96,173, 89,179,166,204,228,158,113,113,113,148, 82,138, 33, 67,134, +148,118, 55,190,248,226,139, 24, 62,124,184,199, 6, 75,148, 40,166, 76,155, 85,170,211,251,209, 78,232,223,171, 11,228, 18, 47, +124,253,212, 90,143, 4,171, 50,108, 0, 96,181, 20,215, 96, 81, 0,198, 2,214, 69,200, 96, 48, 24, 12, 6,227, 31,156, 26, 44, +165,130,203,187,148,116,205, 55,192, 75, 11, 81,182, 64,148,139, 71,254, 73,146,132,225,195,135,151,182,123,230,153,103, 48,108, +216,176, 74, 13,150, 59,119,219,150,101, 25,251,247,239, 7, 33, 4, 28,199,149, 62,156,225, 76,179,200, 34,227,192, 79, 83, 33, + 83, 10,153, 2,114,201, 64, 4,171,232, 58,219, 88,153,166, 43,195,166, 49,248,129,231, 40, 8, 1, 46,165,102, 66,193,115,121, +158,158,187,167, 48, 77,166,201, 52,153, 38,211,100,154,247,171,230,253,134, 83,131, 69, 37, 58,102,225,198,131,243, 4, 73,246, +181,175,139,142,142,134,205,102,195,214,173, 91, 75,141, 7,207,243,165, 93,122,238,212, 96,149, 35,185,115,231,206, 85, 77,197, +144,236,150, 10, 65,114,155,110, 79, 58,215, 33,110,234, 56,224,202,176, 45,217,251,207, 45, 8, 21, 28,151, 7, 74,199,120,122, + 12, 6,131,193, 96, 48, 24,247, 39, 78, 13, 86,114, 90,218,114, 0,203, 29,215,245,233,211,167,240,137, 39,158,208,137,162, 8, +171,213, 10,155,205, 6,171,213, 90,250,208,104, 52, 30,205,184,233,206, 36,162,238,112,253,228,218, 26,209, 41,197, 13,195,150, +158,158, 94,179,199,100, 48, 24, 12, 6,131,113,223, 80,101, 13, 86,121,140, 70,163, 31, 33, 68,145,158,158, 94, 97,219,181,107, +215, 0,192,189, 33,122,119, 57, 53,110,216, 24, 12, 6,131,193, 96,252, 79,225,145,193,218,189,123,183,136,251,196, 68, 49, 24, + 12, 6,131,193, 96,220, 46,156, 87,147, 51, 24, 12, 6,131,193, 96, 48,170,235,122,100, 60, 0, 0, 32, 0, 73, 68, 65, 84, 5, + 1,208,188,178, 13,158,140, 14, 32,132, 84,170, 81, 21,174,244,153, 38,211,100,154, 76,147,105, 50, 77,166,121,255,105,186,210, +118,220,159, 16, 50,156, 82,186,200,211, 24,238, 6,200,237,188, 63,240,189, 50, 52,148,105, 50, 77,166,201, 52,153, 38,211,100, +154,119, 86,211,201,113,238, 89,131,197,186, 8, 61,128,196,141, 80,222,233, 24, 24, 12, 6,131,193, 96,220,253,120, 84,228,126, + 43, 76,153, 50,229,150,204,220,228,201,147,229,154,138,197, 83, 72,200,224, 72, 94,129,207, 90,199,182,232,197,133, 13,218, 76, + 37, 50,129,166,174,190,116,167,226,185,215,137, 53,144, 0,129, 40,251,250, 27,180,253, 27,120, 43, 30,188,152,109,252,195,104, +147, 55, 80, 34,172, 59,147, 79,115,238,116,124, 12, 6,131,193, 96,220, 42,183,108,176,218,182,109,219, 80,150,229,255, 3,240, + 28,165,244,248,209,163, 71, 7, 87, 71,103,231,206,157,193,130, 32,180, 21, 69,177, 53,128,214, 58,189,161,149,197, 98,190, 78, + 64, 95,232,213,171,215, 49, 79,245,226,226,226, 54, 1,232, 93,217, 54, 66,200,148, 35, 71,142,196,187,171,197, 43,240,217,111, +235,150,244,207, 48,234,176, 39, 49,105,192,210,207, 39, 2,192, 64, 79, 99,250, 55, 8, 10, 10,210, 1,120,129,227,184, 71, 52, + 26, 77, 99,179,217,124, 21,192, 73, 66,200,130,212,212,212,138,243,107,184, 1, 33,132,139, 49, 40, 95,214,235,244, 61, 3,189, +213,173,211,114,242,211,204, 54,121,159, 76,108, 51, 61, 53, 68,145,132,168, 27, 53,240,219,243,206,160,142, 81, 45,163, 31,128, +156,116, 28,230,220,172, 39, 18,211,140, 79,124,115,232,250,219,145,132,180,190, 68,105,213, 55,181, 44, 33, 52, 52, 52, 80,146, + 36, 69,122,122,122, 10, 0, 68, 68, 68,248, 88, 44,150, 54, 0,162, 0,252,165,209,104,142, 92,190,124, 57,223,243, 51,254,135, +123, 69, 51, 36, 36, 36, 72,150,229, 87,234,213,171,215, 39, 51, 51,115, 19,199,113, 75,170,251,126, 51,254,119, 8,127,112,216, +108,194,145, 0, 79,246,161, 50,205,190,122,240,135,183,111, 87, 76, 12,198,253, 66,181, 12, 86,116,116,180,151, 90,173, 30,194, +113,220, 11, 45,227, 58,116,124, 98,232, 11, 68, 32,122,124, 50,246, 25,143,167,112, 56,122,244,168, 38, 35, 35,227,163,134, 77, +227,254,211,181, 71,127,174, 89, 84, 83, 4,212,246,135,204,169,177,108,235,133,218,187,191,121,113, 62,128, 14,213, 8,179,247, + 79,155, 15, 33, 35, 87, 2, 33, 0, 33, 0, 71,128, 66,179,140,247, 94,234, 56, 25, 64,188, 59, 34, 36,110,132, 50, 38, 58,170, +215,133,155, 90,108, 61, 37, 0, 8,130,222,191, 94, 47, 18, 55, 66, 73, 19,191, 17,170, 17,215,109, 35, 48, 48,176,117,237,218, +181,191,122,241,197, 23,253, 27, 55,110, 28,168, 86,171,245,102,179,249,129,164,164,164,134,115,230,204,121, 44, 48, 48,112, 70, + 70, 70,198,175,158,104, 70,249,105, 27,244,106, 26,246,211,132, 81,255,215,174,113, 68, 40, 20,214, 34, 80, 75, 97,104,210,149, +191, 59, 76, 91,242,235,171, 49,190,202,167, 79,231, 9, 59,220,213,211,122,171,222,127,111,248,211, 81,145,222, 20,214, 51,251, +161,224, 41,180,222,254,104,215,128, 7, 1,109, 22,255,123,250,123, 0, 38,187,210, 9, 10, 10,154, 10,224, 61, 0, 36, 48, 48, +240, 39,165, 82,121,248,193, 7, 31,108,250,212, 83, 79,145, 22, 45, 90,224,216,177, 99,205, 54,108,216, 48,184, 65,131, 6,231, +172, 86,235,161,218,181,107, 31, 63,115,230,140, 91,183, 26,136,142,142, 86,221,184,113,163,149, 90,173,110,127, 55,107, 6, 5, + 5,233,172, 86,235,255,133,132,132, 12,127,226,137, 39, 90,244,235,215,143, 52,105,210, 4,231,206,157,139,219,178,101,203,228, + 86,173, 90,157, 76, 77, 77, 93,164, 86,171,191, 79, 79, 79,119,107, 18,224,161,143,146,115, 63,239,160, 77,171,187,221, 17, 66, +136, 31, 0, 45,165, 52,195,141,182,245, 0,232, 41,165,151,255,109,205,219, 65, 72, 72,200, 89, 66, 72,173,146, 56,236,241,148, +249,219,241, 89,146,164,162,164,164,164, 70, 85,105, 54,104,208,160,153, 44,203,188,227, 58,165,210,121,213,130, 40,138,114, 74, + 74,202,153,170, 52, 9, 71, 2, 22,125, 53,219, 87,193, 1, 18, 45,121, 8, 20, 18,165,144,101, 64,146, 1, 73,150, 33, 74, 20, + 50,149, 33,136, 20, 83, 38,191,231,226,236, 25, 12, 6,224,129,193, 34,132,144,184,184,184,206,148,210, 23,194, 35, 34,135, 12, +122,118,132, 46,252,129,230, 40,148,125,112, 37, 91,198,209, 93, 43, 0, 96,149, 39, 7,223,182,109, 91, 27, 74,241,221,168,137, +179,155,182,140,109,139, 83,105, 34, 14,164, 72, 40,186, 36, 65,193,155, 32,203, 0,165,212,226,233, 73,217, 73,205, 17,177,239, +156, 21, 60, 7,112, 28,192,115, 4,188,135,247,233,166,137,223, 8, 92,216,160,205,191, 29, 78, 27, 0,109, 61, 24,115,210, 96, +204,201,220, 66, 83,214,220, 85,230, 42, 56, 56,184,123, 68, 68,196, 23,111,190,249,102,253,140,140,140, 90,135, 14, 29,130, 70, +163,129,191,191,191, 34, 32, 32,160,233,196,137, 19,243,166, 77,155, 54,174, 94,189,122,199, 50, 51, 51,175,186,163, 25,109, 80, + 71,117,105, 29,253,199,164,169,241,190,150,196, 45,200,253,229, 23,240,156, 12,149,151, 1,129, 58, 61,230,246, 9,175, 53,113, + 91,202,175, 45,116,186,168,147, 38, 83,154, 59,154,161,117,107,245,136,108,220, 4,185, 27, 23,224, 98,174, 5, 9,153, 22, 60, +209,165, 13, 34,253,117,136, 21, 37,212,214, 42,186,195,133,193, 10, 9, 9,241, 7, 48,225,234,213,171,156, 74,165, 34, 13, 27, + 54,124,122,209,162, 69,180, 89,179,102,165,119,221,238,208,161, 3, 58,116,232, 64, 10, 11, 11,163, 14, 28, 56, 16,181,118,237, + 90, 33, 56, 56, 56, 49, 45, 45,109,153, 51,221,136,136, 70,201, 22,139, 57, 84,163,213,153,231,204,153,243,223, 7, 31,124, 80, + 86,171,213,184, 21, 77, 0, 8, 12, 12,252, 49, 36, 36, 68, 63,105,210,164,236,182,109,219,210,154,208,108,216,176,225,111,157, + 58,117,234,214,163, 71, 15,197,195, 15, 63,140,160,160,160,210,109, 1, 1, 1,232,212,169, 19, 73, 73, 73,105,185,111,223,190, + 5,191,253,246,219,188,134, 13, 27,238,186,114,229, 74,143,170, 52, 75,104,114,139,219, 29,225, 1, 76, 39,132, 44,166,148, 30, +112,214,136, 16,210, 26,192, 51, 0, 62,187, 67,154, 85,162,211,233, 50,205,102,115, 93, 0,208,106,181,215, 77, 38, 83, 61, 87, +251, 16, 66, 12,115,230,204,169,171, 82,169,192,113, 28, 36, 73,130, 36, 73,144,101, 25,148,210,210,103,251, 32,163,169, 83,167, + 74,174, 52,101, 89,230,102,207,158,173,212,233,116, 0, 0, 65, 16,202, 60,219,177, 47, 79,157, 58,213,173,239, 40,157,154,199, +135, 99,135,183,227, 36,171,182,202,227,243,106,243,203,227,190, 56,236,142, 38,131,193,240,192, 96,197,198,198,110,238, 53,112, + 88,207, 7, 59,247,128,168,170,139,115,215, 9, 82,174, 80, 40,120, 17, 28,100, 92,254,115, 29,229, 56,238,123,199,125,170, 26, + 97,176,121,243,230,183, 27, 68,182,154,241, 94,252,116,254, 84,166, 26,223,237, 51, 65,178,228,193,148,125, 9, 69,215, 47,160, +224,218, 89,228,166,157, 58,201,113, 92,188,187,154,229,161, 20,144, 41, 5,161, 4,144, 1,128, 22,167,177, 42,180,171, 90,147, + 74,100, 66,226,111,223, 13,136,237,255, 46, 46,236, 91, 14, 80,110,130,235, 99,215,252,232, 10,103,154, 65, 65, 65,143,133,135, +135,207, 28, 49, 98, 68,200,137, 19, 39,124,140, 70, 99,209,225,195,135,247,100,100,100,212, 11, 8, 8, 72,121,234,169,167, 30, +170, 91,183,110,221,206,157, 59,235,183,109,219,246, 62,128, 87, 92,105, 54,247, 82,199,116,106,215, 60,225,227,153,179,188,178, +127,157, 7,235,149, 19, 72,200, 52,227, 68,150,137, 6,251,228,145, 39,155,251,195, 75,173,192,240,246,117, 13,255,217,112,245, + 83, 0,207,186,115,238, 13,131,235, 53, 18, 76, 38,152, 77, 54,108,190,144,103, 74,200,201,171,203,121,167,102,141, 27,208, 70, +203,103,167,163,190,183,242, 1, 79,206, 29, 40,206, 2,232,245,250, 74,183,249,250,250,162, 67,135, 14,104,212,168,145,242,153, +103,158,121, 16,192, 50,103,154, 54,155, 45, 48, 45, 45, 29,141,155, 52,214, 60,242,200, 35,132,231,121, 88,173, 21,123, 43, 61, +209, 4, 0, 47, 47,175,126,173, 91,183, 86,252,240,195, 15,185, 87,175, 94, 61, 61,104,208,160, 52,189, 94, 95,230,130,170,215, +235,209,160, 65, 3,140, 30, 61, 90,249,234,171,175,186,212,172, 87,175,222, 99,203,151, 47, 7, 33,164,244,226, 93,158,176,176, + 48,212,175, 95, 31,189,123,247, 86, 12, 30, 60,248, 49,199,109,229, 53,135, 62, 74,206,161,196, 60, 13,125,148, 84, 57,180,184, +100,251,249,242,153,172,242,154,148,210, 27,132,144,133, 0,214, 16, 66,134, 84,102,136, 8, 33, 15, 3,248, 5, 64, 47, 74,233, +245,242,219,171,210, 84,171,213, 42,155,205,230, 15,148, 53, 62,158,106, 58,196, 66, 19, 19, 19, 17, 23, 23, 7,199,103,179,217, + 92,106,132, 8, 33,117, 43,219,183, 50, 77,158,231,241,245,215, 95,131,227, 56,168, 84, 42, 40,149, 74,168, 84,170, 10,143,216, +216,216,202, 36, 43,213, 84, 42,149,248,250,235,175, 33, 73, 18,119,245,234,213, 23, 36, 73,234,111, 54,155,235,234,116,186, 44, +149, 74,181,177, 75,151, 46, 75, 53, 26,141,232,137, 38,199, 3,156,100,213,238,216,182,222,171,210,157, 0, 88, 44, 22,244,237, +255, 36, 56, 82,177,148,246,223,252,174, 99,154,247,183,166, 11,218, 2,168,227,176,108, 5, 96,255,181,154,141,226,105,167,106, +151, 91,239,216,206,254,156, 85,178,190, 78,201,126,212, 65, 55, 11,192,159, 53, 21,176, 2, 40,254, 98,161,148, 18,251,179,147, +182, 62,169, 38, 63, 20, 94, 9,128,130,147,161,224, 9, 20, 60, 0, 16,220, 72, 61, 11,107,209,141,253, 71,142, 28,185,226,206, + 65,183,110,221,218, 33,188, 89,187, 79,227, 63,254,156, 91,186,215,132, 60,163, 25,217,103,214, 35,227,240,183, 25,178,104, 91, +207,113,220, 17,142,227,142,182,110,217,226, 92, 96, 96,160,203, 95,118,206,144,105,113,138,187,212, 88,201, 0,129,231,211, 82, +208,212,213,151,130,186,124, 80,102,185,186, 49,213, 52, 33, 33, 33,189, 34, 35, 35,167,143, 24, 49, 34,236,232,209,163,222, 5, + 5, 5, 89, 59,118,236, 56,103,179,217,142,113, 28, 55, 55, 61, 61,189,203,242,229,203,245,227,199,143,239,209,164, 73,147, 38, +191,253,246,155,209,149,102,180,151,170,229,176,231,159, 74,232, 63,124,140,246,244,234,249,208,156, 59,138, 69,103,114,164, 35, +153,166,247,205,133,226, 23, 58,189,226,225, 92,179,184,253,157, 78,129, 92,160,183, 18,161,190,170,174,238,198,171, 86,106, 20, + 84,161,133,213, 34,162,200, 42, 91,207,100,209,162,183,187, 54,183, 81,175, 0, 45, 0, 40,120,206,165,233, 79, 77, 77,205, 9, + 10, 10,250, 52, 60, 60,252, 3, 66, 8,237,220,185,243,153,184,184,184, 34, 89,150, 97, 50,153, 96,179,217,160, 84, 42, 97, 50, +153,144,148,148,132, 67,135, 14,193,215,215,215,149,108, 25,114,115,115, 17, 30, 30, 14,189, 94,127,203,154,178, 44,147, 5, 11, + 22,104, 79,159, 62,173, 93,179,102, 77,173,183,223,126, 59, 47, 54, 54,246,236,128, 1, 3, 82,106,213,170,101, 59,126,252, 56, + 18, 18, 18,144,147,147,131,118,237,218,185,165,105,179,217,160, 80, 40, 96, 50,153,160,209,104,160, 80, 40, 32,138, 34,100, 89, + 46, 53, 93,133,133,133,184,121,243, 38,148, 74,165,203, 27,177,219,205,210,208, 71, 9,253,249,151, 63,174, 23,247, 13,229, 11, +176,229, 9, 16,243, 4, 8,121, 2,132, 92, 97,232,155,179, 90,254,188,195,233,119, 68, 5, 40,165, 7, 9, 33, 67, 0,252, 82, +222,100, 57, 24,161, 33,148,210,227,158,106,218,108,182,253,118,227,163,213,106,235, 18, 82,108, 12, 53, 26,141, 96,177, 88,186, +121,162, 9, 0,137,137,137,104,221,186, 53, 95,162, 73,237,207, 37, 15,143, 32,132,128,231,121, 40,149, 74,240, 60,143,214,173, + 91,163, 95,191,126,104,210,164, 9, 82, 83, 83,177,123,247,110, 92,184,112, 1, 42,149,170, 76,215,161, 43,148, 74, 37, 56,142, +227,206,159, 63,191,244,145, 71, 30,137, 28, 51,102,140,186, 65,131, 6, 56,119,238, 92,253, 5, 11, 22, 12,219,185,115,103,151, +129, 3, 7, 14, 3, 32, 86,213,125,232, 8, 95, 98,154, 44, 22, 11,206,158, 61, 91,117, 91, 79,187, 0, 24, 12, 15,112,225, 69, +234, 16, 66, 54,218, 23, 40,165,125,237,203, 19, 39, 78,124,111,250,244,233,167, 9, 33, 27, 29,215, 59,182,115,124, 46, 57,214, + 70, 74,105,223,119,223,125, 55,102,198,140, 25,211,236,109,107,242,124,220,206, 96,241, 60, 63,232,212,214, 47, 14, 62, 96,163, + 97,245, 98,250,160,248, 59,135, 0,160, 72, 58,190, 21,178, 44, 47,115, 71, 39, 33, 33, 65, 43,202, 88, 58,254,189,169,220, 55, +187, 76,200,188,150,142,244, 61,159,193,116,253,236,119, 58,157,238,157, 71,122,246,189,165, 98, 95, 0,136,139,139,139,241,171, + 93, 31, 22, 27, 45, 49, 88,128,163,201,186, 95, 8, 10, 10,234, 23, 25, 25, 57,117,253,250,245, 97, 38,147,201,251,192,129, 3, +185,219,183,111,191,104,179,217,150,100,100,100,252, 8, 0,132,144,245, 10,133,226, 35, 74, 41, 12, 6,131,130,231,121,157,253, +191,183, 50,205,230,190,170,214, 47,190,240,220,254,183,231, 46,214, 94, 60,117, 28,243, 86,109,134,134,218,164, 51, 55,172, 3, + 78, 21, 8,246,127,218,223,123, 7,235,211, 40, 69,168,146, 35,168,165, 87,214,239, 64,136, 54,129, 82,179,171,152, 3, 66,195, + 56, 49, 56, 2,251,140, 22, 24,124, 84,106, 0, 8,110, 28,205, 31,207, 23,113,224,240, 95,208,106,253, 85,238,156,123,122,122, +250,164,224,224,224,240,237,219,183,115, 70,163,177,232,196,137, 19,168, 93,187, 54,234,214,173, 11, 31, 31, 31,156, 59,119, 14, + 59,118,236,192,249,243,231, 65, 41,117,154, 37,112, 70,102,102, 38,242,243,243,107, 68, 83, 20, 69, 2, 0, 49, 49, 49,136,137, +137, 81,167,165,165,213,221,184,113,163,255,180,105,211,174, 5, 6, 6,110, 51,153,254, 41,143, 42,223,221,227, 12,139,165,184, +231,220,108, 54,195, 98,177, 64,165, 82, 65,171,213, 66,165, 82, 33, 63, 63, 31,153,153,153, 40, 40, 40, 0, 0,248,249,249,149, +182,119, 11, 73, 6, 14,118, 60, 82, 97,125,240, 11,149,102,111, 92, 65, 41, 61, 80, 98,178,126, 39,132,216,223,223,204,146,231, + 74, 51, 91,110,106,150, 46, 91, 44, 22,199, 44,147,178, 58,154,113,113,113,118,141, 50,223, 18, 90,173,246,186, 61,115,165,213, +106, 43,100,196, 42,195,222, 45,168, 86,171, 17, 19, 19,131,119,222,121, 7,231,254,159,189,243, 14,107,234,236,255,240,231, 57, +217, 9,132, 61, 19, 16, 81,134, 32, 14,100, 41,136,162,213,186, 71,219, 87,235,104,107,109, 93,125,171,109,181,173,117,212, 45, +142,106, 85,180,237,107,171,117,212,209,170,191,214,186, 87, 5, 7, 78,192, 45, 42, 42,136, 97, 35, 35, 64, 32, 36, 57,207,239, + 15, 70,145, 50,194,176, 86,123,238,235,202, 5,156,156,220,231, 9,129,228,115,190,207, 56,241,241, 56,115,230, 12,236,236,236, +208,167, 79, 31,240,249,124, 36, 39, 39,131, 97, 24,163, 2,150, 80, 40,132, 78,167,195,189,123,247,198,244,236,217,179, 85, 68, + 68,132, 40, 49, 49, 17,241,241,241, 48, 51, 51,195,194,133, 11,197,211,167, 79,119, 58,114,228,200,184,142, 29, 59,126,103,236, +243,230,145,178,238,191,129, 67,134,255,229, 62, 11,115, 19,193,214,205, 27, 69, 21,193,139,225, 22,246,225,120,206, 84, 15, 65, + 21,193,105,201,146, 37, 3,171,111,171, 41, 48, 85,223,190,116,233,210,240, 42, 63, 55,235, 44,246,202,127,151,138,179,191,218, + 96, 89,214,209,194, 86,105, 53, 97, 84, 31,176, 44,160,103, 1,189,129, 66, 83, 84,136,180,248,147, 69, 90,173,118,183, 49, 7, +204,206,206, 94,248,238,199, 75,221, 46, 63,226, 35, 53, 71,139,199, 39, 22,208,146,172,248, 55, 6, 13, 26,244,254, 43,175,188, +210, 44,225,202,210, 70, 17,249,229,242,141,184,244, 64, 11,150,254, 89,201, 50,176,101,223,191, 12, 40,149, 74,119, 75, 75,203, + 21,123,247,238,109, 41, 18,137,228, 9, 9, 9,134,168,168,168, 20,157, 78,247,109, 69,184, 2, 0,133, 66, 49,186, 93,187,118, + 58, 19, 19, 19,104, 52,154, 98,157, 78, 87, 80, 91,184,242,145, 74,157, 58,181,111,119,106,234,154, 31, 36,197, 90, 45,242, 52, + 37,176,117,116, 52, 92,203, 46, 26,122, 77, 93, 82,121, 70,208, 86, 46, 8,246,247, 80, 42, 25,169, 28, 0,160,202,215,166, 24, + 19,174, 0,192, 68,110,193, 56,249,135,193,255,163,181,208, 48,230, 20, 0, 44,236, 21, 76,143, 15, 22,163,239,234, 40,148,240, +228, 13,137,192, 26, 15, 15,143,202,113, 87,217,217,217,184,117,235, 22,242,242,242, 16, 17, 17,129,248,248,248,202, 15,221,226, + 98,163,154,247, 23,154,195,201,178,236, 83,159,158, 74,165, 18,147, 38, 77, 18,104, 52, 26,147,170,225,170, 33, 78,173, 86, 91, +217, 14, 74, 41,180, 90, 45,242,242,242,160,213,106,113,239,222,189,202,112, 5, 0, 6,131,161,198,174,206,218, 27,156, 87,115, +185, 75,151,221,232,113,135,229,129, 71, 88,101,220,145, 61, 26, 25,174, 42, 40, 15, 62, 70, 87,127,234, 35, 38, 38, 6,168,161, + 90,165,209,104,236, 41,165, 36, 38, 38, 6,198,140,191,170,128, 82, 10,145, 72,132,193,131, 7,227,246,237,219, 80,169, 84,224, +241,120, 40, 41, 41, 65, 73, 73, 9, 58,117,234, 84, 89,193,106, 8,148,210,126,147, 39, 79,150, 60,124,248, 16,217,217,217, 96, + 24, 6,122,189, 30, 6,131, 1,227,198,141,147,104,181,218,190, 13,241,241,120, 4,189,198, 44,187,216,243,189,213, 81,213,111, +185,121,133, 58,177, 88,252,231,190, 92,194,226,120,198,212,148, 69, 8, 33,227,171,124,191,191,250,253, 13,161,122,133,171,130, + 25, 51,102,248, 0, 16,215,240,144, 70, 83,249,223, 82, 71,215, 32,252,252,252,124, 45,108,148, 39,103,132,255, 96,250,235, 85, + 30,158,164,222, 65,114,236, 94,232, 89, 32,245,206, 89, 80,131,238,255,110,222,188, 89, 88,219,227, 43, 56,114,228,136,135,179, +167,255, 71, 29,253,130,112,228,122, 9,158, 92,219, 9,109,206,195,239, 6, 12, 24,240, 91,115, 60, 25, 63, 63, 63, 31, 75,107, +199,200,153, 75,127,176,218,119, 67,128, 71, 15,239, 32, 50, 98, 48,142, 46,127, 5,135,151,189,130, 3, 75,122,226,247,197, 61, + 1,224, 96, 67,188, 97,132,240, 93, 45, 75,209,219,155, 64, 97, 83, 4, 18, 70,254,182,245,195,106, 67,165, 82,221, 3,176,229, +135, 31,126, 80,159, 57,115,198, 48,113,226,196,187,121,121,121,139, 82, 82, 82,118, 86,236, 83, 62,240,253,211, 5, 11, 22,120, + 26, 12, 6,156, 58,117,234, 30,143,199,171,181,127,249,134, 70,243, 56,238,218,205,111,207,108,223,128,184,203,151,240,211,156, +169,250,232,235,183, 6,221, 84,235,255, 12, 87,166, 34,175, 46, 62,238,251,255, 59,229,191, 12, 17,155, 32, 62,171, 4,169, 5, +186, 19, 70,183, 91, 93,164, 19,136,165, 48,117,104,137, 36, 13, 43, 84, 42,149, 23, 30,231,106,132, 12,143, 15,134, 47,196,131, +156,146, 6,125,136,179,236, 95,243, 88,245,208, 2,160,222, 46,178,250,104,138,179,162,130, 85, 29,157, 78,247,151,237,198, 58, +171, 6,172,170,212, 52, 22,139,101,217,134, 5,172,210,252,154, 95, 3,109,227, 3, 86, 85, 75,249, 13, 77, 9, 87, 64, 89,240, +169,168, 40,137,197,226,202,174, 54, 99,171, 76,213,241,243,243,107,210,253, 85, 33,132,128,101, 89, 8, 4, 2,184,187,187, 35, + 47, 47, 15,102,102,102,144,203,229, 48, 53, 53,133, 88, 44,134,189,189, 61, 68, 34, 17, 24,134, 1, 99,100,112,209,233,116,208, +106,181, 14, 78, 78, 78, 40, 40, 40,128, 68, 34,169,188,137, 68, 34,120,122,122,162,160,160,160, 65,149,198,134,132, 38, 30,151, +175, 56,158, 49, 53,101,145,170, 43,185, 55, 71, 55, 94, 77,142,242,110, 66,105, 83,221, 85,169, 55, 40, 84,132,171,233,139,191, + 55,219, 21,203, 32, 55, 53, 30, 73,135,103,170, 13,165, 69, 57, 44,171,115,201,185,127, 6,168, 50, 32,183, 46, 88,150, 13, 8, +238, 57,132,137,188,173, 69,169, 58, 5,249, 55,126, 78, 20,139,197, 95, 52,241, 57, 84,180,211,199,210,218, 49,242,139, 37, 63, + 88,253,122,149,143, 39, 41,119,112,255,224,140, 60, 67,105, 81,207,152,152,152, 6,175,163, 53,129, 16,193,122, 74,117, 67,236, +236,134, 58, 59,219, 47, 31,251,186, 28,221,122, 73, 97, 38, 52,195,130,175,152,219,246, 33,228,211,244,179,116, 31,241, 35, 2, + 26, 67,159,203,140,194, 27, 55,110, 44,118,119,119,103,244,122,253,216,210,210,210,121, 41, 41, 41,149, 85, 68,133, 66,209,219, +197,197,101,249,194,133, 11,157, 18, 19, 19, 69,231,207,159,127, 18, 23, 23,199, 26, 12,134,165,117, 57,175,229,149,124,222, 78, + 46,228,185, 57, 43, 38, 39, 60,126, 60,248,122,190,254,112,197,125,237, 76, 68, 62, 93,125,189,206, 46,156, 63, 67, 94,122,126, + 15, 10,211, 30, 99,221,249,180,124,214,160,155, 97, 76,123,149, 74,165, 85, 75, 33, 48, 99,220, 24, 86,173, 86, 67, 38, 18,178, +143,227,239,243,222,238,213,205,176,108,250, 52, 38, 45, 45, 13, 69,133,133, 60,165, 82,105,165, 82,169,158, 24,227,172, 41, 80, +212, 84, 5,106, 80,192,168,129,166, 56,171, 87,176, 42,168, 41, 96, 25,235,172,218, 37, 86,149,154,126, 31, 6,131,161, 97, 93, +132,250, 90, 2, 86,105,102,211, 82, 42,240,136, 16,210,162,226,251, 38,186, 0, 0,197,197,197,118, 85,186, 6,235, 60, 81,172, +143,242, 10, 86,163,239,175, 78, 69, 5, 43, 33, 33, 1,182,182,182,208,235,245, 48, 49, 49,129, 84, 42,133, 84, 42,133, 70,163, +129, 72, 36, 2,143,199,171, 95, 86, 5,177, 88,156, 22, 31, 31,239, 98,105,105, 9,131,193,240, 84,200,122,248,240, 33,204,205, +205, 51,140, 29,127, 5, 0, 60, 30,112,124,243,244, 26,103, 17, 90,152,155, 60, 37,226, 53, 83,181,144,131,163,177, 84, 84,159, +170,142,165,250,226,139, 47, 26,189,118,200, 23, 95,124, 49,179,169, 85,177,218,224, 3,127, 38,198,234,111, 78,126,126,126,190, + 22,214,138,147,159, 46, 92,111,182,253, 50,131,188,212,219, 72, 57, 62, 59,143, 45, 45,234,201, 48, 76,106,114,244,247,187, 1, + 20,197,198,198, 70, 25,115, 48,131,193,208,169,141,135, 7,118,221,208,163, 56,237, 42, 24, 66, 55,247,234,213,171,222, 65,215, +245, 81, 17,174, 62, 15,255,222,106, 87, 28, 31, 57,101, 33, 48,143,109, 68,184, 26, 37, 22,187, 9, 24,102,185, 91,151, 78, 3, + 70,216,219, 20,244,119,147, 89,244,119, 19,131,119,254, 55,236, 83,100,224,137,205, 31,152,180, 74,233, 22,189, 55,255,247, 22, +175,240,159, 12,238,214,209, 76,209,157,127, 64, 71, 13,159,103,158,162,127,251,224,247,123,247,238, 45,116,112,112,248, 53, 45, + 45,173,114,116,170,147,147, 83,191,150, 45, 91,134, 47, 88,176,160,101,114,114,178,252,202,149, 43,249,187,119,239,126,200, 48, +204,130,212,212,212,122,207,238,175,171, 75,167,249,152,138, 54,220, 40,208,199, 87,108,107,107, 34,236, 48,230,237, 17,231,122, +141,120, 87,242, 32,114, 11,172, 30,223,196,234,139, 25,134,199,121,197, 35,111, 23,209,180,250,156, 74,165,210, 74, 36, 18,237, +138,216,179,231, 94,187,118,237, 72, 81, 81, 17,116, 58, 29, 50, 51, 51,241,213,182, 93, 55, 88,150,133,165,165, 37, 78,156, 56, +193,126,244,209, 71,187,148, 74,229, 48, 99, 66, 22,203,178,149, 31, 86, 21, 84,175, 2, 73,165,210,134, 5,140,242,199, 84, 13, + 48, 77,113,214, 22,176,170, 87,182, 26,232, 4,128,202,193,237,213,183, 87,192,227,241,192,178,108,141,149,190, 90,209,229,214, + 18,176, 50,154,116, 34, 65, 41,117,169,103, 34,205,115,163,124, 41, 6, 0, 96,107, 91,138,161,202, 24,173,122,169,232,246, 19, +137, 68,136,142,142, 70,223,190,125,193,178, 44,196, 98, 49,164, 82, 41, 36, 18, 9, 46, 94,188, 8,161, 80, 8, 30,143,215,160, +110, 66,129, 64,112,104,221,186,117, 99,150, 46, 93, 42,101, 89, 22, 34,145, 8, 82,169, 20, 98,177, 24, 95,127,253,181, 70, 36, + 18, 29,110, 80,192, 66,253,179, 8, 43,247,109, 88, 22,228,224,104, 16,181,101,145,114, 50,171, 85,158,180, 85,126,206, 68,217, +181,149, 7,150,127,143, 26,190,215,214,176, 45,123,201,146, 37, 39,171,140,223,202, 68, 51, 82,107, 5,203,215,215,215,203,202, +214,233,228,212,133,235,205,182, 92,224, 33, 47,245, 22,178, 78,126,153, 71,245,154,170,161,165,107, 3,143,231,107,103,103,141, +172,232, 98,232,114,238,129, 16, 18,219,248,166,151, 17, 24, 24,232,110, 97,229, 16,249,233,162,239,173,118,196,240,145,155,242, +103, 8,108, 76,229,138,207, 48, 95,173, 60,242,243, 96,113,218,109,104,174, 70, 90, 8,158, 60,198,141,140, 82,236,138, 78, 83, + 71,158,253,225, 12,227, 77, 67,123,142,180, 48,237, 57,210, 10,171, 39, 29,182, 74, 47,190,137, 11,119,247, 15, 9,159,177,159, +226, 57,173,238, 94, 53, 92, 41, 20,138, 65, 78, 78, 78,243, 15, 28, 56,224,162,215,235,229,167, 78,157, 82,239,222,189,251,190, + 94,175,143, 72, 77, 77, 61, 96,172,243, 70,129,182, 50, 92,181, 51, 23,118,122,255,189,119,206,124,180,234,127,146,155, 49,151, +176,124,203, 1,200, 5, 58, 67, 76, 74,241,176, 27, 5,250, 67,198,248,248,124,254,130, 29, 59,118,152,120,123,123,147,236,236, +236,202, 15,252,210,210, 82,228,231,231, 87,142, 31,106,215,174, 29, 51,119,238, 92,147, 57,115,230, 44, 0,240,223,186,156,148, +210,140,249,243,231,219,141, 31, 63, 30,102,102,102,200,206,206,134, 78,167,171,172, 54,137,197, 98, 88, 88, 88, 32, 55, 55, 23, +199,143, 31, 71, 77, 83,246,171, 34, 20, 10, 83,149, 74,133,179, 84,102,162,149,201,100,212,212,212,180,201, 78, 0, 32,132,164, +245,239,223,223, 97,254,252,249,162,170,221, 76,165,165,165,164,177, 78, 74,105,209,171,175,190, 42,139,136,136,128,139,139, 11, +180, 90, 45, 88,150,173,172, 96, 85, 44, 13,240,232,209, 35, 44, 94,188, 24,148, 82,227, 79,100,116, 57, 58, 56,189, 99,139,210, +108, 29, 74,179,117,208,102,233, 80,154,161,131,190,232, 31, 55, 69,164, 49, 3,208,107,162, 90, 37,172,198, 46,182,134, 84,176, +202,171,105, 16, 10,133, 72, 78, 78,198,137, 19, 39, 16, 24, 24, 8,185, 92,142,194,194, 66,156, 59,119, 14,105,105,105,141,170, + 96,245,236,217,115,243,209,163, 71, 67, 63,252,240, 67,215,137, 19, 39, 74,189,188,188,144,152,152,136, 85,171, 86, 21,223,186, +117, 75, 53,101,202,148, 31, 26,226, 99,202,151,174, 49,106, 22, 97, 13,203,220,112,112,252, 77, 52,219,242, 9,127, 23,181, 6, + 44,134, 97, 62, 9,122, 99,150,217,230,243,124,228,168,110, 32,239,244,220,234,225,170, 94,170, 95,109, 91, 32,145,183,211, 83, + 33,128, 98,232,115,239, 67, 36, 18, 53, 56, 0, 85,119,178, 44, 59,173,243, 27,179,172,182, 94,226, 35, 47,229, 22, 50, 35,231, + 52, 56, 92, 85, 56, 39, 16, 34,112, 15,246, 31, 32, 78,191,131,226,200,157, 32, 0, 54,196, 21,226,220, 99,237,215,165, 90,237, +162,155,121, 37,185, 78, 93,136,229,206,240,140, 57,253, 94,107,255,145,231,155,199,113, 33,243, 59, 64, 6, 88,218,242,251, 85, +237, 46,124, 30, 87, 47, 87, 42,149,238,114,185,252,171, 67,135, 14,217,138, 68, 34,179,155, 55,111, 26,246,236,217,147,108, 48, + 24, 86,166,166,166,238,172,233, 49,245, 57,125,164, 82,167,182,109, 92,163,166,172,252, 86,162, 46, 40, 68,161,182, 20,138, 22, + 74, 67, 84,204,237, 55,110, 20,104,247, 26,227,180,183,183,239, 49,106,212,168, 14,126,126,126, 76,109,225, 42, 63, 63, 31, 5, + 5, 5,120,252,248, 49, 66, 67, 67, 25, 47, 47,175,118,246,246,246, 61,210,211,211, 79,214,214,206,212,212,212,121, 59,119,238, + 12,249,229,151, 95, 6,142, 27, 55, 78,254,250,235,175, 67, 42,149,162,176,176, 16,206,206,206, 96, 89, 22,167, 79,159,198,221, +187,119,213, 0,246,167,166,166,158,173,171,157, 15, 30,220,111, 65, 8, 97,156,156,156, 66,250,246,237,219, 44, 78, 0,200,204, +204,116,139,138,138,154, 62,100,200,144,143,251,244,233, 35,159, 57,115,166,208,213,213, 21, 6,131,129, 52,214,153,147,147, 99, + 30, 27, 27,187,162,107,215,174,255,237,219,183, 47, 63, 60, 60, 28,230,230,230, 48, 24, 12,144, 74,165,200,207,207,199,130, 5, + 11,112,230,204, 25, 61,165,244,155,188,188,188, 79,235,114, 62,181, 14,214,148,175, 59,214,244,186, 86,217,183,198,117,176,158, +199,223,188, 70,163,177,111,104, 85,204,152,118,198,198,198,210,234,235, 97,213, 85,193,170,238,172, 24, 15, 38, 18,137,192,231, +243,145,153,153,137,163, 71,143, 62,181,254,149, 72, 36,170, 92,198,161,166, 10, 86,109,237,148,203,229,236,127,254,243,159,177, +135, 14, 29, 26, 51,109,218,180, 33,106,181,218,206,204,204, 44,211,196,196,100,255,148, 41, 83,126,180,176,176,168,117,137,134, +154,156, 60,134,212, 58,139,176, 42, 44, 79, 84, 92,211,112,173,231,241,186,115,206,151,211,249,178, 81,215, 24, 44,201,217,152, +187, 96,196, 25, 80, 95,248,170,193,225,170, 38,244, 37,133, 9, 11,127,126,224,107,208,106,160,207, 79,186,211,119, 64,255, 70, +159,113, 86, 64, 41, 53, 57, 19,155, 0,190, 36, 27,185,231,151,229, 18, 67, 73,207,152,152,152, 6,173,127, 83,193,122, 74,117, +163, 77, 76, 34,239,159, 57,241,138, 2, 64,210, 19, 45,174,196, 63, 57,250,107, 81,209,180,138,125, 30,159,163, 57, 0, 62,118, +236,198,180,177,242,200,235,109,174, 0, 50, 30,233,144,147,169, 63,244,188,198, 98, 85,160, 82,169,238,249,248,248,108,217,184, +113,227,164, 78,157, 58,153, 78,158, 60,185, 98,224,251, 47,141,117,222,208,104, 30,251,200, 69,223, 69,110, 88,245,153,196, 43, + 16,123,194,103, 24, 78,197,196, 15,189,174,214, 26,221,103, 45, 22,139,195, 38, 77,154, 36, 44, 42, 42,170, 53, 92,229,231,231, + 67,173, 86, 35, 63, 63, 31, 87,174, 92,193,235,175,191, 46,190,125,251,118, 24,128,147,181,121, 41,165, 44,128,211,110,110,110, + 23,191,251,238,187, 94, 91,183,110,237,253,222,123,239,137,194,194,194,112,243,230, 77, 92,188,120, 81, 91, 90, 90,122, 76, 34, +145, 28, 79, 72, 72, 48,106,112,211, 51,114,234, 1, 44,182,177,177,137,216,189,123,247,162, 63,254,248,227,173, 49, 99,198,152, +232,245,122,210, 68,231,199,182,182,182,179, 15, 30, 60,184,249,232,209,163, 67,223,122,235, 45,102,202,148, 41, 88,187,118, 45, +246,236,217,195, 26, 12,134,189, 2,129,224,157,204,204,204,122, 39,160, 60,181, 14, 86, 29,235, 92,213,119,191, 17, 60,139,179, +208, 38, 59,171, 87,194, 58,117,234,100, 95,117,150,102,213,175, 13,161, 67,135, 14, 79,173,115, 85, 49,160,189,226,198,227,241, +192,231,243, 27,212, 69,232,227,227, 3,129, 64,192,250,250,250,254, 8,224, 71,224,233, 75,230, 8, 4,130,202, 69, 77,141,161, + 68,207, 98,195,198, 45, 23,245, 44,133,129,165,160, 44,160,163, 0,107, 96, 97, 96, 41, 12, 44, 91, 54, 11,155, 2,154,226, 70, + 47, 75,200,193,241,175,163,174,128, 53,179, 32,102,141, 14,128, 53, 33,100, 70, 76, 76, 76,157,215,180, 50, 6, 30,143,153,145, +177,239,221, 8, 10,228,240, 8,140, 26, 24, 93, 31, 6,131, 97, 86, 97,108, 4, 75, 41,181, 32,132,124,113,249,242,229, 38,181, +147,234,245, 31,124,245,195,233,175,109,205, 69,189,179,114, 75, 14,130,144, 26, 87,109,215,131,126,248,211,178, 71,203, 44,109, +249,253,114, 50,245,135, 88, 6,245,174,238,254,119,112,227,198,141,112,119,119,119,222,255,254,247,191,177, 90,173,246,169,129, +239,141,118,170,181,159,183,147, 11,121,109, 92,157, 38,199, 39, 62, 26,114, 93,109, 92,183, 96, 21, 68, 74,165,242, 70, 81, 81, + 17, 8, 33, 40, 41, 41,121, 42, 80, 85, 13, 88,165,165,165,200,200,200,128,171,171, 43,170,172,153, 84, 39,229,161,228,128,141, +141,205,169, 53,107,214, 12, 88,187,118,109, 48,203,178,209,165,165,165, 7,178,178,178, 10, 26,254,140,159,141,179,252,113, 31, +201,100,178,165,107,215,174, 93, 33,145, 72,252, 51, 50, 50,162,154,226, 44, 15, 79,111, 88, 91, 91, 43,182,108,217,178,107,227, +198,141,157,249,124,254,121, 66,200,176,220,220,220,198, 92,236,249, 78, 19,239,175,143, 61, 77,124,252, 51,113, 54,100,249, 5, + 99,208,235,245, 5, 51,102,204,200,168,126,205,193,170,107, 94, 85,253,170,213,106,235, 93,159, 67,175,215,179, 95,126,249,101, +157, 39,113, 85,131, 86,113,113,113,189, 93,186,148,165, 89,253,135,127, 80,223,110,127,121, 76,131, 30,192,193,241, 47,165,214, +128, 21, 19, 19,147, 12,224,221,230, 60, 88,223,190,125, 79, 0,240,106, 78,231,149, 43, 87,146, 0,188,213, 92,190,237, 37, 37, + 9, 0, 6, 78, 32, 68,240, 19,173,189, 34, 85, 62,160,253,181,231, 57,139,176, 54,106, 26,248,222, 84,106, 26,248,110, 44,122, +189,254,136, 88, 44, 38,249,249,249, 40, 45, 45,133, 90,173,174, 12, 87, 85, 67,150, 94,175, 7, 33, 4,106,181, 26,166,166,166, +208,233,116, 13, 42, 25,148,135,148,157, 97, 97, 97,187, 35, 35, 35, 27,124,225,241,191,203, 89, 84, 84,148, 6, 96, 84, 88, 88, + 24,191,185,156,217,217,217, 41, 0,130,221,220,220, 68,198, 86,193,106,162,190, 11, 57, 27,123,161,231, 58,248, 95, 19, 31, 95, + 19,219,234,223,229,239, 37, 49, 49,209,187,185,157,143, 30, 61,106,182,255,231, 10, 18,207,111,157,218,220, 78, 14, 14,142, 50, +254,182,245,156,230,206,157,251,143, 27, 32, 91, 23,235,235, 8, 87, 85,249,167,133,171, 10,154, 51, 92, 85, 80,117,224,123, 67, + 80,169, 84, 39, 1,192,206,174,108,236,176,179,179,179,177,143,107,204,225,208, 92,161,229, 69,116, 54, 37, 92,253, 29, 80, 74, + 27, 85,169,171,199, 89,239, 44, 86, 14, 14, 14,142,191, 27,110,217, 56, 14, 14, 14, 14, 14, 14, 14,142,102,134, 0,104, 87,211, + 29, 13,153, 29, 64, 8,169,209, 81, 23,245,249, 57, 39,231,228,156,156,147,115,114, 78,206,249,242, 57,235,115, 87,155,145, 59, +190,234, 74,238, 47, 18,164, 49, 51, 99,140,150,191, 32, 83, 67, 57, 39,231,228,156,156,147,115,114, 78,206,249,124,157,181, 28, +231,133, 13, 88, 92, 23, 33, 7, 7, 7, 7, 7, 7, 7, 71, 51,243,220, 47, 90,204,241, 98,224,228,228,180, 36, 40, 40,232,131, + 75,151, 46,173,124,244,232,209,130, 70, 58, 20,214,214,214,139, 1, 4, 83, 74,197, 60, 30,239, 86, 86, 86, 86,120,114,114,242, +233,198,182, 75,161, 80, 56,219,218,218, 46, 6,208,153,101, 89,161, 64, 32,184,145,158,158,190, 72,165, 82,157,111,172,211,214, +214,214,196,209,209,209,159, 82,106, 71, 41,101, 4, 2, 65,142, 74,165,186,146,145,145,209,228,117,219, 56, 56, 56, 56, 56,254, + 29,212, 25,176,230, 79, 38,142, 40, 5,127,238,122,154, 12, 0,132, 16, 51, 0,254, 40, 91,106,225, 54,128,203,148,210,252,166, + 52,224, 69,113,254,211, 33,132, 48, 22, 22, 22,175,202,100,178,143, 10, 10, 10,124,205,204,204,110,148, 95, 30,103,127,249,226, +153,141,198,206,206,206,110,248,240,225, 95,172, 89,179, 6, 99,199,142,157,109, 99, 99,179,170,161,235, 54,121,123,123, 15, 86, + 42,149,235, 23, 46, 92,100, 27, 24, 24, 72, 36, 18, 9, 18, 18, 18,148,179,102,205,236,212,169, 83,167, 93,177,177,177,117, 94, + 22,167, 38,124,124,124,134,185,184,184, 68,132,135,135,219,250,251,251, 19, 62,159,143,107,215,174, 57,205,159, 63, 63,208,215, +215,119, 75, 92, 92,220,180,250, 45, 79,211,174, 93, 59, 87, 55, 55,183,224, 69,139, 22, 73, 2, 3, 3, 33, 22,139,113,235,214, + 45,147,153, 51,103,218,118,234,212,233, 94,108,108,236,133,134,248,252, 38,196, 10,132,178, 82, 62, 0,148, 22, 9,245, 49,235, + 59,233,140,221,214,208,182,115,112,112,112,112,252,115,168, 53, 96, 45,152, 68, 22, 48,192, 76, 48, 32, 31,143, 36,191,172,253, +133,185,216,171, 87,175, 54,239,189,247, 30, 41,191,116,132,247,206,157, 59,223,224,241,120,241, 44,203, 94, 0,112,133, 82, 90, + 90,155,175, 42,229, 11, 72,118,100, 24, 38,232,159,236,124, 17,144,203,229,238,182,182,182,211,172,173,173,251,249,251,251,231, + 79,156, 56, 49,241,252,249,243, 15, 2, 2, 2,138, 55,110,220, 24,174,211,233,190,245,240,240, 56,166, 86,171, 87, 52,118,233, + 6,129, 64,224, 69, 8,129, 74,165,130, 64, 32, 16,136, 68, 34,111, 0, 70, 7, 13,103,103,103, 71,133, 66,241,191, 95,126,140, +136, 96, 97, 0, 0, 32, 0, 73, 68, 65, 84, 59, 98,151, 95,194,224, 94, 38, 11,160, 8, 6,198, 6, 11,151,175,181, 94,177,120, +246, 72, 15, 15,143, 51,119,239,222,253,217, 88,167, 66,161,112,118,113,113,137,248,227,143, 63,236,196, 98, 49, 88,150,133, 90, +173,134,157,157, 29,150, 44, 89, 98,181,112,225,194,247, 92, 93, 93, 79, 61,124,248,112,159,177, 78, 91, 91, 91, 19, 55, 55,183, +224,147, 39, 79, 74, 68, 34, 17,209,233,116,164,164,164, 4, 14, 14, 14,244,235,175,191, 22,207,154, 53,203,211,213,213, 53,237, +225,195,135,143,140,241,249,125, 31, 43,200,207, 58,217,133, 38,107,102, 3, 0,145, 72, 23,133,205,183,186,152,159,117, 50,176, +190,109,126,223,227, 92,204,120, 46,100,113,252,189, 40, 20,138, 16, 87, 87,215,223, 30, 61,122, 20,205,227,241,222, 76, 76, 76, +108,216, 85,210,107,128, 16,226, 4,192, 21,128, 37,202, 38, 86, 61, 1,144, 72,105,217,137,123, 99,176,113,235, 49, 8, 98,217, +187,160,180, 35, 3, 0, 12,115,133, 45, 45,220,148,117,231,164,209,255,239, 53, 58, 37, 38, 99,193,178, 29, 25, 80, 22, 12,239, + 42,213, 23,254,144,121,251,100, 67, 23, 86,230,224, 0, 80, 75,192,154,255, 62,177,100, 4,152, 62, 99,226,120,134,207,227,145, +240,245,223,143,184, 20,189,143, 58,182,232, 88,121,201,141,208,208, 80,132,134,134,146,229,203,151,123,253,241,199, 31, 94,219, +183,111,215, 17, 66, 98, 40,165,155,107, 59,216,146, 41,178, 71,122,157,198,121,193, 7,210,226,150,157,191,221, 30, 28, 28,202, +138,197, 98, 52,197, 9, 0,255, 29, 38, 56, 54,118,152, 43, 9, 27, 56, 39,169,185,156, 47, 2,114,185, 60, 74, 46,151,187, 77, +152, 48,225,222,164, 73,147, 78,153,152,152, 80, 0,200,200,200, 48, 25, 48, 96, 64,206,208,161, 67,179,139,138,138,240,221,119, +223, 57, 71, 68, 68, 28, 51, 51, 51, 83,229,231,231, 7, 26,235, 39,132,240, 29, 29, 29,151,246,238,221,123,234,168, 81,163, 32, +151,203, 49,102,204, 24,148,148,148, 68, 43, 20,138,229,169,169,169,179, 41,165,245, 94, 59,195,210,210,114,238,252,249,243,237, + 10,180, 60,204,222,154,128, 39, 5,101,185, 65, 38, 98,240,223, 87,196,120,251,237,119,204,227,226,226,150, 3, 48, 58, 96,217, +218,218, 46, 14, 15, 15,183,173,120,173, 11, 10, 10, 80, 80, 80, 0,181, 90,141,130,130, 2,140, 26, 53,202,236,222,189,123,171, + 1, 24,253,134,235,232,232,232,191,104,209, 34,137, 72, 36,194,190,125,251, 58, 20, 23, 23,243,117, 58, 29, 40,165,250, 54,109, +218, 92,121,231,157,119,132,119,239,222,237, 2,192,168,128,229,152, 6, 65,158, 70,243,205,186,101,159,217, 2,192,135,211,191, +250, 6,208, 4, 81, 35,182, 57,166, 33, 0, 0, 23,176,234,128, 16,194, 3,240,154, 64, 32,120,221,205,205,205,255,222,189,123, +113,122,189,254,255, 0,252, 31, 53,114, 29,187, 58,220,175, 40, 20,138,197, 41, 41, 41,235, 40,165, 63, 53, 79,139,255,249,180, +110,221,250,215,237,219,183, 91, 31, 60,120,112,240,194,133, 11,135, 3,216,210, 88, 23, 33, 68, 0,160, 11,202, 66,213,109,148, + 5, 43,160, 44,104,181, 33,132,180, 6,112,182, 33, 39,188, 54,158, 33,166,224,155,237,236,210,179,111,215, 97,111, 12,149,219, + 90,153,163,176,196,128,187,137,105, 45,142, 30,252,181,187, 67,187, 1,209,250,210,188, 17, 89,119,206, 26, 93, 97,175,112,246, +232, 55,184,107,207, 87,122,201,205,205, 45,144,173,214,225,126,226, 99,151,168, 99,123, 67,237,219, 13, 56, 5,162,123, 43,253, +218, 81,227, 47,152,206,193, 1, 35, 7,185, 19, 66, 96, 98,106, 82,227,125,230,230,230, 8, 11, 11, 67,120,120,184, 0, 64,231, +170,247, 85,159, 97, 96, 48,104, 29,103,255,119, 50, 68,124, 42, 30,208,175, 15, 49, 51, 51,107,178, 19, 0,236,173,244,189,130, + 60, 53,221,211,175, 76, 25,125, 37,106,113, 59,109,113,238, 95,174,116, 42,147,201,224,238,238,142, 89,179,102, 25,229,108, 42, +127,135,147, 82,170,240,246,246, 86,175, 90,181,202,115,206,156, 57,150,197,197,197, 38, 0,156,188,125, 67, 20, 12,195, 56,107, +181, 90,249,188,121,243,108,150, 45, 91,230,105,107,107,155, 75, 41,181,109, 72, 59, 29, 29, 29, 87,133,135,135, 79,219,180,105, + 19, 9, 8, 8,128, 92, 46, 71,151, 46, 93,176,117,235, 86,102,238,220,185, 95, 56, 58, 58, 46, 53,166,157, 0, 66, 3, 3, 3, + 9, 11, 32,167, 64,143,147, 75,252,112,246,171, 0, 20,105, 89,228,169, 11,160,209,104, 32,145, 72,164, 54, 54, 54,166,198, 62, +119, 0,157,253,253,253, 9,128,202, 80,165, 86,151,221, 10, 10, 10,161,213,150,130, 97, 24,179,150, 45, 91,138,107,208,213,232, +164,148,218, 5, 6,150,229,207,226,226, 98,254,224,193,131, 49,112,224, 64,168,213,106,126,126,126, 62,180, 90, 45, 24,134, 17, +150,127,176,215,235,212,202, 4,132,165,172,189,137, 76,106, 99, 34,147,218,176,148,181, 7, 0, 99,182,105,101, 2, 82,147,179, +185, 48, 98,106,182, 45,143,199,251,209,205,205,237, 22,143,199,219, 66, 8,113,104,138,147, 16, 18, 64, 8, 9,151,201,100,199, +189,189,189,147, 77, 76, 76,254, 32,132, 44, 37,132,116,105,140,147, 16, 34,146,201,100,127,132,135,135,239,138,139,139, 27,126, +226,196, 9,215,107,215,174,189,177,124,249,242,157,166,166,166,167, 8, 33,210,198,180,179, 2, 87, 87,215,141, 23, 46, 92, 8, + 8, 14, 14,222, 64, 8,169,245,111,168, 33, 78, 66, 8,143, 16,226, 75,140,188,240,224,223,253,186, 59, 57, 57,185,249,250,250, +218,240,120, 60,132,134,134,130, 82, 26,218, 68,103, 48,128, 52, 74,105, 20,165, 52,147, 82,106, 40,191,101, 81, 74, 79,163,236, + 68,165,198, 99,212,234,228,155,237,252,232,147,207,251,126, 58,249,125,121,108,146, 1, 63, 28, 77,197, 47,103, 50,161, 82,139, +209,123,200, 88,243,238,253, 71,245,225, 11,205,107,188,176,125, 93,206, 47,190,152,217,247,253, 49,163,229,215, 83, 24,236, 58, +155,133, 51,183,243, 81, 68, 44, 17, 54,100,188,165,119, 96,191, 1, 4,194,205, 13,124,238,141,230,223,236,124,217,168,177,130, + 53,119, 3,205, 89, 48,137, 44, 11,255,238,251,217, 12, 33,212,201,163,207, 77, 87,247,206,133, 44,203, 66,163,209,160,180,180, + 20, 2,129, 0, 26,141, 6, 73, 73, 73,184,112,225, 2,204,205,205, 27,116,224,220,188, 60, 40,157, 92, 33,147,201,154,197, 57, +238, 63, 67,249,143, 82, 83,249,209,177, 39,253,126, 94,179,221,207,185,117,239,219, 29,195, 62,191,110,106,222, 66,115,229,202, + 21,156, 59,119, 14, 57, 57, 57,168,248, 0,125, 25, 32,132,232, 86,172, 88, 17,155,146,146,130,211,167, 79,251,206, 95,189,173, +229,245,252,214,252,204, 2, 42,176, 53, 77,119,241,146,222, 49,228, 60,121,242, 96,218,180,105,127, 56, 58, 58,106, 39, 79,158, +220,221, 24,175,147,147,147,132, 16,226,215,191,127,255,255,190,243,206, 59, 72, 76, 76,196,167,159,126,170,189,114,229, 74,174, +159,159,159,229,138, 21, 43,132,227,199,143, 71,116,116,244, 52, 39, 39,167,221, 0,110, 60,126,252,184,174,107,169,137, 36, 18, + 9,144, 87,118,162, 90,170,167, 0,202,134,133, 21, 20, 20,128,161,185, 16, 10,133, 12,195, 48,182, 0,140, 58,243,100, 89, 86, + 40, 18,137, 80, 88, 88,136,130,130, 2,168, 50, 11,144,148, 94, 8,117, 97, 9, 52, 26, 29, 74,138, 41,196,114,123, 70,151,153, +105, 13,192,168, 37,225, 41,165, 76, 69,119,163, 86,171,133, 70,163,129, 86,171,133, 86,171,173,188,156, 15,143,199,147, 43,149, + 74, 51, 0, 57,245,249,120, 34,169,158,199, 8,195,103, 46,250,102, 30, 0,240, 24, 97,184, 41,138, 89, 99,182,241, 68,210,102, + 95,229,221, 88, 8, 33, 98, 91, 91,219,147,187,118,237,242,118,119,119,199,195,135, 15,189,134, 13, 27, 22, 68, 8,241,165,148, + 54,232, 44,158, 16, 34, 99, 24,102,217,187,239,190,251,193,200,145, 35,137,135,135, 7,248,124, 62,244,122,189, 83, 66, 66, 66, +143, 95,126,249,101, 58,159,207,255,193, 96, 48, 76, 51,118,149,119, 66, 8, 35, 18,137,126, 94,191,126,125,183,160,160, 32,108, +217,178, 5, 23, 47, 94,100, 3, 2, 2,152,183,223,126, 27, 46, 46, 46,157,223,126,251,237, 61,132,144,129,198, 84, 88,107,240, +187,140, 30, 61,218,153,199,227, 33, 56, 56, 88, 24, 29, 29,221, 9, 64,116, 67, 61,213,156,166, 78, 78, 78, 81, 97, 97, 97,190, +199,143, 31,143, 37,132,132, 53,100, 85,123,133, 66, 49,196,222,222,126,185, 92, 46,183, 52,246, 49, 5, 5, 5, 69,233,233,233, +159,170, 84, 42,163,174, 71, 74, 41, 13,110,223,190, 61,244,122, 61,204,205,205,225,224,224,208, 85,169, 84, 78, 51, 55, 55,127, + 45, 63, 63,127,234,227,199,143, 47, 26,123,108, 66,136, 18, 0, 67, 41,189, 87,254,115, 75, 0, 21,151, 89,186, 67, 41,125, 72, + 41,125, 64, 8, 81, 16, 66,156,141,233, 46,180,113,235, 49, 40,184, 87,255,174,161, 65,237,152, 37,187, 19, 97, 96, 89,240, 97, + 0,159,199, 34,203, 32, 0, 33, 4, 46,158, 1, 60,251,235,151, 59,219,120,246, 30,148,117,231, 88,189,213,107, 27,183, 30,131, +250, 14, 30, 26,218,198,211,131, 89,249,219, 35,228,170,174, 27,210,111,255,145, 69, 24, 6,173, 58,246,182,113,241,244,229,185, +249,190, 34, 72, 79,188,222,195,202,189,123,175, 39,247,162,142, 27,251, 59,224,224,168, 12, 88,132, 16, 74, 41,173, 60,179,154, +243, 29,157, 99, 99, 73, 90,222,188,126,149, 73, 78,211, 22, 94,189,122, 21,214,214,214,176,179,179,131,153,153, 25,226,227,227, +113,252,248,113,220,185,115, 7,148, 82,248,250,250, 54,232,192,233,105,105,200,126,162,110, 86,103, 11, 71, 71,180,112,116,228, +103,229,228,226,220,213,107,222,251,126,232,213, 38,157,153,176, 73,163,209, 84,238,163,211,189,124,189, 46,118,118,118,134, 15, + 63,156,156, 61,238,155, 7,173, 71,244, 84,242,134,116,113,192,111,209,169,188,157,145, 60, 58,251,189, 14, 89, 9, 9,119,141, +126,210, 46, 46, 46,139,123,244,232,241, 25,159,207, 23,140, 31, 63, 30, 0, 48,101,202,148,146,107,215,174,181, 77, 78, 78,126, +224,232,232,216,102,234,212,169,215,246,236,217, 35,120,255,253,247, 73,113,113,241, 69,129, 64, 64, 21, 10,197,130,148,148,148, +121, 53, 57,121, 60, 94,220,205,155, 55, 91,234, 37, 10,216,200, 25,244,153, 29, 11, 0, 48, 21, 83,100,165,171,112, 35,225, 18, +108,109,109,205,109,108,108,110,135,132,132,148,164,167,167,127,116,255,254,253,205,117,181, 83, 32, 16,220,184,118,237,154,147, +189,189, 61, 10, 10, 10,144,156, 81,136, 31,207, 17, 20,149, 72, 1, 72,193,131, 28,114, 27,103,121, 43, 90,116,165, 93,187,118, +165, 90,173,246,139,187,119,239,214,217,213, 35, 16, 8,114,110,221,186,101,162, 84, 42,193,227,241, 74,127,249,229, 23,161, 86, +171, 5,165, 84,127,240,224,193, 55,115,115,115,131, 91,183,110,205,184,184,184,172, 8, 9, 9,209,164,166,166,142,123,248,240, + 97,173, 23, 26, 62, 60,197,173,180,251,188,200,111,115, 31, 38,255, 2, 0,202, 32,239, 39,251,231,117,210,118,159, 87, 80,239, +182,195, 83,220, 74, 49,249,217,173, 81, 87, 15,239,206,156, 57,211,219,202,202, 10, 19, 39, 78,196,252,249,243, 49,103,206, 28, +247,137, 19, 39,142, 7,176,202, 88, 9, 33, 68,234,224,224,112,105,205,154, 53, 94, 33, 33, 33, 56,120,240, 32,118,236,216,129, + 7, 15, 30,232, 93, 93, 93,249, 65, 65, 65,152, 59,119, 46,250,244,233, 51,110,242,228,201,221, 9, 33,157,140, 12, 29, 99,231, +206,157, 59,164,107,215,174, 24, 51,102, 76, 73,100,100,228,112, 0, 71,143, 29, 59,214, 51, 42, 42,106,247,182,109,219,164,225, +225,225,125,167, 78,157, 58, 9,192,186, 70, 60,255,161,221,186,117, 3, 0,116,237,218, 21,203,151, 47,239,131, 38, 4, 44, 66, +136,200,218,218,250,192,150, 45, 91,124, 61, 61, 61,241,214, 91,111,117, 26, 62,124,248, 1, 66, 72,111, 74,169, 81,151, 54,114, +116,116, 92,182,126,253,122, 55,169,180,214,194,220, 95,208,106,181, 86, 19, 38, 76, 88, 10,192,232,128,213,174, 93, 59, 68, 70, + 70,162, 87,175, 94,240,241,241,113,155, 48, 97,194,138, 62,125,250,224,147, 79, 62, 57,227,224,224,160, 72, 75, 75, 51,246, 66, +207, 46, 0,226, 1,128, 16,210, 2,128, 59,128,179,229,247, 5, 17, 66, 64, 41,125,136,178,139,135,183, 1, 80,255,120, 44,137, +201,187,131, 7, 14,148,255, 95,116, 6, 12, 44, 11, 47,165, 4,222, 45,204,144,152, 81,140, 68, 85, 54, 4,164, 20,114,169, 24, +237,131, 7, 88, 62, 73, 79,124, 23,198, 12, 15, 16,203,222, 29, 58,120,160,233,175,231, 50,144,171,186, 65,147, 46,253,242,135, +174,184,112, 28, 0,220, 60,245,211,255,236, 45, 37,189, 61, 58,250,241,138, 66,135, 88, 70,253,246,221,187, 0,184,128,245,140, +169,158, 69, 94,100,234,156, 69,152,157, 11,141,181,131, 55,146,211,226,202,126,206,206, 70,118,118, 54, 90,181,106,133,136,136, +136,167,246, 45, 46,174,247, 98,240, 53, 31,227, 25, 56,109, 44, 45, 48,184, 71,119,222,245,248,239,120, 26, 86,243,212,125,141, +117,254, 83,161,148, 82, 66, 8, 73,202,210, 89,100,229,235,132,111,246,112,166, 2, 30,131, 17, 61, 90,144,117,251,146,132, 89, + 26,153, 5,143,199, 99,140, 57,147,247,243,243, 19,244,232,209,227,179,141, 27, 55, 10, 82, 83, 83, 97, 97, 97, 1,157, 78,135, +184,184,184,148,148,148,148, 7, 0,144,154,154, 26,239,228,228,148,110, 48, 24,156,188,188,188, 48, 97,194, 4,180,105,211,134, + 76,155, 54,109, 58, 33,100, 65, 77, 51, 22,211,211,211,195,103,205,154,213,109,241,242, 8,235,209, 65, 4,133, 69, 90, 20, 20, + 20, 32,241,238, 13,208, 2, 45, 86,174,252, 26, 82,169,148, 0, 16,102,102,102, 10,231,205,155,187,193,223,223,127,224,229,203, +151, 95,175,173,173,233,233,233,139,230,206,157, 27,184,114,229, 74,171,130,130, 2,104,138,139,161,214,136,112,225,235,178, 10, +101,208,212,139, 88,247,213, 10,166,157,139,137,117, 65, 65, 1, 62,251,236,179, 53,190,190,190,157,227,226,226, 62,168,205,169, + 82,169,174,204,156, 57,211,118,237,218,181,226, 54,109,218, 92,203,207,207, 71, 78, 78, 14,179,103,207,158,133, 46, 46, 46, 86, +107,214, 68, 16,153, 76, 6, 0, 72, 78, 78, 22,206,158, 61,235,231,246,237,219,111,187,118,237,218,152,218, 94, 27, 0, 37,132, + 32, 85,161,104,229, 86,116,142,153,167, 80, 20,159,137,156,171,218, 74, 8, 82,203,246, 1,117, 92,239, 56,250,209, 22,113,215, +146, 18,118,117, 90, 90,210, 29, 74, 65, 49,247,185,133, 43,216,216,216, 76, 30, 50,100, 8,150, 46, 93,138,125,251,246, 77,181, +178,178,250,122,254,252,249, 80, 40, 20, 31, 18, 66, 86, 83,227, 87, 39,254,106,213,170, 85, 94, 94, 94, 94,120,231,157,119,180, +199,143, 31,159, 9,224, 55, 0, 73,167, 79,159,110,177,121,243,230, 65, 63,255,252,243,210, 53,107,214, 72,214,174, 93,235,246, +198, 27,111,172, 6,240, 94,125, 82,123,123,251, 79, 70,142, 28,137, 21, 43, 86, 32, 50, 50,242, 13, 74,233,193,242,187, 14, 17, + 66, 6,133,135,135,159,152, 61,123, 54, 86,173, 90,245, 49, 26, 24,176, 8, 33,166,222,222,222, 95,246,237,219, 23,167, 79,159, + 70,104,104, 40,186,116,233, 50,149, 16, 18, 65, 41, 53, 54, 92, 84,245, 49,166,166,166, 63,111,218,180, 41,180,101,203,150, 88, +180,104, 17, 62,251,236, 51,108,220,184, 49,244,173,183,222,250,153, 16,242,186, 49,179,124, 77, 77, 77, 77,165, 82, 41,150, 46, + 93, 74, 31, 61,122, 84,111,245,212,209,209,209,242,203, 47,191, 36,230, 70,116, 3, 16, 66,120, 10,133,194,220,193,193,161,155, +131,131, 3,214,172, 89, 3, 59, 59, 59, 76,157, 58, 21,214,214,214, 40, 44, 44,196,235,175,191, 46, 56,127,254,252, 8, 0, 17, +245,249,202,177, 6, 80, 81,241,242, 70,217, 88, 43,117,249,241,206, 3,232, 10,224, 33,202,198,101, 89, 25, 35,100, 40,109,103, +105, 97,134,148,107,233,224, 67, 15,175, 22,114, 92, 78, 40, 68,169,129, 66,102, 98,138, 66,117, 46, 58,186,217, 34,191,200, 9, + 0,107,212,234,227, 66, 30,227, 39, 18, 75,145,145,159,135,180, 91, 39,178, 75, 13, 37, 19,114, 31,156, 73, 6, 0,171,214,221, + 38,220,184,112,248,242,235,253, 66,237, 50,115, 90,128, 82,246,229,233,254,224,248, 91,168,119, 12, 22,203,254,245,127,191,106, + 69,168,130,210,210,166, 77,204,123, 22,206,154,120, 22,206,127, 0, 84,105,201,207, 51,145, 48,250, 99,151, 51, 12, 58,189, 1, + 71, 46,167, 25,100, 98,162,183, 20,107,243, 89,150, 53,234, 3, 49, 38, 38, 70,119,250,244,233, 45, 51,102,204,192,170, 85,171, +112,255,254,125, 8, 4, 2,120,122,122,218, 59, 59, 59, 59, 2,101,179,247,124,124,124,108,120, 60, 30, 18, 18, 18,176, 99,199, + 14,204,155, 55,143,198,196,196,108,172,237,131, 34, 37, 37, 37, 46, 61, 61,125,253,146, 5, 51,115, 5, 37, 41,144, 25, 50, 97, +200,189, 15,129, 33, 15,147,167,206,192,195, 44, 3,226, 30,170, 17,247, 80,141, 52,141, 4, 95, 46, 90,201,115,119,119, 31,228, +228,228,212,167,182,182,170, 84,170,243,169,169,169, 91,231,204,153,147,151,149,149, 85,249,247, 83,170,103, 81,170,127,186, 25, +166,166,166, 88,178,100,137,133,163,163,227,155, 74,165, 50,172, 54,103, 70, 70, 70, 70, 74, 74, 74,194,140, 25, 51, 74, 51, 51, + 51,145,159,159,143,195,135, 15,191,209,170, 85, 43,171,105, 51, 22,144,135, 89,180,178,157,121,172, 5, 86, 68,252,192,107,221, +186,245, 40,133, 66, 81,231, 56, 34,133, 66,233,230,237,221,122,215,249,243,231,199,184,185,185,125, 0,148, 5, 43, 74, 65, 1, +192,213,213,117, 98, 76, 76,204, 88, 95,223,182,187,236,237, 29,218,212,229,122,214, 16, 66,122,188,249,230,155,109, 88,150,197, +174, 93,187,174, 81, 74, 87,253,250,235,175,151, 74, 74, 74, 48, 98,196, 8, 87, 0,125,141,244, 4,140, 26, 53,234,131,208,208, + 80,124,252,241,199,165,199,143, 31,247,163,148,126, 77, 41, 77,164,101, 36, 81, 74, 35,162,162,162, 58, 78,158, 60,185, 36, 48, + 48, 16, 99,198,140, 25, 75, 8,169,115,220, 15, 33, 36,120,228,200,145, 94, 44,203, 98,231,206,157, 87,171,132, 43, 0, 0,165, +244,143,221,187,119,159,215,106,181, 24, 61,122,116, 43, 66, 72,207, 6, 60,119,161, 88, 44,222,181,112,225, 66, 11,149, 74,133, +183,223,126,187, 36, 62, 62, 30,243,230,205,147,154,155,155, 31, 36,132,212, 58, 70,176, 54,196, 98,241,247,223,125,247,221,144, +246,237,219, 99,210,164, 73,218,111,191,253,118,202, 7, 31,124,160,245,243,243,195, 55,223,124, 51, 68, 36, 18, 53,104,133,234, +244,244,244,220,200,200, 72,235,250,110,105,105,105,233,198,248, 90,180,104, 97,225,227,227,115, 45, 32, 32, 32,171, 67,135, 14, +173, 1,224,198,141, 27,153,187,118,237,162,214,214,214, 56,124,248, 48,190,255,254,123,132,132,132, 64, 46,151,143,104, 64, 83, +105,249, 13, 85,190, 86,191,191,250,126,117, 67, 8,205, 43,210,131,207, 48, 16,240, 40,146,210,139, 81,106,160, 16, 10, 24, 8, +120, 0,159,161,176,150, 11, 32, 16,240, 0, 16,163,156, 12, 33,200, 41,212,129,207, 35, 16,136,132,132,209, 27, 42, 75,132, 12, +223, 32, 21, 75,196,196,206, 92, 8, 33,159,192,184,145,115, 28, 28,127, 82,239, 66,163, 6,195, 95, 11, 31, 53, 85,129,180, 90, +163, 42,221,181,242, 44,156, 53,241, 44,156,207,147,252,252,124,126, 84, 84,148,185, 64, 32, 48, 25,216, 62, 36,123,217, 47,119, +109,230,111,191, 3, 17, 15,100, 80, 7, 38, 53,242,228,113,146,147,147, 99,233,238,238, 94,239, 89, 47, 0,220,191,127,127,156, +163,163,227, 34,134, 97, 2, 13, 6,195, 47,171, 86,173,194,186,117,235,100, 19, 39, 78,140, 87, 40, 20, 42, 15, 15, 15,231,213, +171, 87,139, 1, 96,235,214,173, 56,114,228,200, 80,129, 64,112, 49, 41, 41, 41,173, 46,239,149, 43, 87,102,187,184,184, 68, 63, +120,240, 32,130, 16, 98, 33,151,203, 45,127,253,245, 87,146,154,171,197,236,173,247, 43,103, 22,154,136,121,152,241,154, 45,254, +243,159, 97,252,123,247,238,125, 5,224, 72,109,206,216,216,216,169,174,174,174, 81,119,239,222, 93, 37,180,246,180,150,180, 27, + 47,239, 57,163,172,251,209,209, 74, 12,166,252, 13, 49, 47, 47, 15, 89, 89, 89, 24, 59,118,172,197,226,197,139,167, 3,136,172, +205, 25, 23, 23,119,222,213,213, 53,245,238,221,187,157, 41,165, 34,115,115,243,144, 85,171, 86,145,164, 39, 90,124,177, 57, 1, +234,226,178,118,202, 37, 2, 44, 24,233,132, 49, 99,198,240, 31, 62,124,184, 12,101,103,228,127, 65,169, 84,186,123,123,123,239, +218,190,125,187,247,234,213,171,159,220,187,119,175, 80,161, 80,204,175,182, 91,201,146, 37, 75,178,183,110,221,234,249,246,219, +111,239,114,112,112, 24,222,216, 37, 53,154,138,153,153,217,210, 9, 19, 38,224,231,159,127, 70, 78, 78,206,106, 0,200,207,207, + 95,181,125,251,246,157,227,198,141,195,214,173, 91,151, 18, 66, 14, 27, 81,197,234, 55, 98,196, 8, 28, 58,116, 8, 39, 78,156, +248,146, 82,122,179,166,157, 40,165,119, 9, 33,211,247,238,221,187,102,228,200,145,248,241,199, 31,251, 2,168,107,225,217,222, +125,250,244,193,193,131, 7,145,157,157,253, 77, 77, 59,228,230,230,126,251,251,239,191,119,238,211,167, 15,150, 44, 89,210, 27, +192, 31,245, 61,111, 66,136,151,185,185,249,166, 53,107,214, 4,180,111,223, 30,163, 70,141, 42, 46, 45, 45,237,251,217,103,159, +237,219,177, 99,135,124,203,150, 45,254,227,199,143,191, 64, 8,121,159, 82,106,212, 34,182, 60, 30, 47,124,237,218,181,239,133, +133,133, 97,234,212,169,250, 35, 71,142, 12,166,148, 30, 37,132, 36,124,254,249,231, 7, 86,174, 92,201, 91,177, 98,197,123, 60, + 30, 47,211, 96, 48,204, 52,198,217,220, 16, 66, 86,172, 92,185,210,187,109,219,182, 40, 46, 46,198,253,251,247,145,158,158,190, +253,240,225,195, 71,175, 95,191,190, 60, 45, 45,109,143,189,189,253,184,169, 83,167, 58, 5, 4, 4, 4, 56, 57, 57, 89, 62,126, +252,216,152,247,146,138,202, 84, 6,128, 91, 0, 58,151, 87,174, 0, 32, 8,101, 93,131, 64,217,140, 66,163,222,155, 64,200,181, +187, 15, 85,173, 44, 77,205,144,195,138,240, 80,149, 5,169,137, 9, 24,202, 64,175,201,129,187,139, 29, 88, 10,228,103,169,192, + 48,228,154, 49, 74,157,129,141, 73, 76, 78, 87, 90,152, 72,224,238,215,223,250,234, 31, 63,254,100,222,186,235,120, 62,143,240, +132, 98,179,245,163, 70,190, 99,163, 51, 80, 20,228,164,130,240, 24,163,199,160,113,112, 0, 70, 4, 44,150,101, 33,149, 74,159, +170, 48, 85,175, 2, 73,165, 82,148,148, 52,108,185, 20,169, 84,138,210, 42,195,120,155,195,105,204, 49,155,219,249, 60,209,233, +116,242, 15, 62,248,160,107,231,206,157,147,251,245,235,151,224,229,101,155, 56, 32, 88, 98,179,118,227, 94,223,126,221,125,226, +242,159,164,103, 38,137,197,197, 57, 57, 57,214, 91,183,110,237,164,211,233,100,198,120, 83, 83, 83, 31, 1,120,164, 84, 42, 7, +244,232,209,227,173,129, 3, 7,226,212,169, 83,242,194,194, 66, 47, 19,147,178,217,164,123,246,236,193,239,191,255,254, 67, 74, + 74,202, 94, 99,219,155,148,148,116, 24,128, 91,139, 22, 45, 44, 90,180,104,145,110, 97, 97, 33, 84,169, 11, 43,103, 22, 10,249, + 12, 66, 62,187,132,220,124, 53, 44, 44, 44, 32,147,201, 92,235,115,150,175,115,181, 47,240,205,133,237,121, 15,182, 71,173, 93, +179,218, 28, 40, 59, 51,181,183, 16, 34, 55, 55, 23, 89, 89, 89,200,204,204, 4,165, 20, 6,131,193,219, 8,231, 35, 0,143,108, +108,108, 28,221,221,221,137,169,169, 41,232,147, 66,228, 20,148, 62,213, 5,169, 46, 40,132, 82,169,132, 92, 46,175,177, 59,194, +202,202, 74, 46, 22,139, 55,111,216,176,193, 75, 46,151,243,198,141, 27,103, 49,110,220,184,174,168, 37,140,201,100, 50,222,143, + 63,254,232,225,235,235,187,169,101,203,150,189, 19, 19, 19,243,234,107,107,115, 81, 62, 51,114,226,167,159,126,234, 47,145, 72, +176,110,221,186, 7, 0,182,149,223,189,235,219,111,191,157, 51,114,228,200, 54, 83,166, 76,241,153, 61,123,246,212,242,174,194, + 90,187,157,133, 66,161,159,183,183, 55,126,253,245, 87, 0,248,181,158,195,239,142,142,142, 94, 51,112,224, 64, 72, 36,146,128, +122,246,117,117,118,118,198,222,189,123, 1, 32,174,150,125,226,226,227,227,241,250,235,175,131, 16, 82,239,223, 16, 33,100,200, +171,175,190,186,123,201,146, 37,124,185, 92,142,247,222,123, 79,123,225,194,133,254,148,210, 83,132,144, 30,163, 71,143,142,218, +182,109,155, 73, 84, 84,148,215,226,197,139,163,121, 60, 94,184,193, 96,152, 93,143,115,236,162, 69,139,102, 12, 29, 58, 20,243, +231,207,167,191,252,242,203, 40, 74,233, 81, 0,160,148, 30, 33,132,188,109,105,105,185,109,214,172, 89, 36, 47, 47,111, 6, 33, +228, 49,165,244,187,218,124, 69, 69, 69,121, 6,131,193,161,168,168,200,168, 51, 68, 99,247,111,213,170, 85,191,182,109,219, 98, +239,222,189, 24, 52,104, 16,142, 29, 59, 6,134, 97, 14,168, 84,170,147, 0,142, 2,128,163,163,163,121, 66, 66,194,212,208,208, + 80,230,248,241,227,175, 3,248,193,136, 38, 60, 4,208, 30,192, 49, 74,105,114,249,196,201, 96,148, 45,217,112,139, 82, 90,177, +212, 73, 59, 0, 9,198, 60, 39, 86, 91,176,229,196,193,221, 61,122,191,241,129, 57,143,199,128, 15, 33,138,212,249,128,193, 0, + 55, 23,123, 4,122,219,227,106,162, 6,209,199,119,229, 22, 21, 20, 25,181,188,132,161,180,112,211,137,195,123,187, 7,188,250, +142,185,216,173, 45,156,237, 63,246,189,113,241,232, 49,177, 72, 72,222,120, 99,152, 69,143, 64,119,156,184,150,143,243, 39,126, +203, 41, 82,231,111, 50,198,201,193, 81, 65,101,192,170,101, 80, 89,198,212,169, 83,237,166, 77,155, 6, 51, 51, 51,100,103,103, + 67,167,211, 85, 86,155,196, 98, 49, 44, 44, 44,144,157,157,141,157, 59,119, 2,101,103, 43,181,194,227,137, 82, 23,125,179,214, +153,240, 76,180, 98,169,140, 90,201,154,238, 4, 0,173,142,159,241,221,206, 61, 86,253,186,117,225,183,112,116,252,203,253,141, +113,190, 8,232,116,186, 99,105,105,105,254,109,218,180, 73,115,113,113,209, 20, 23, 23,131,106, 52,234,131, 59, 87,183,118, 54, +159,116,159, 97, 24, 42,149, 74, 89, 11, 11,139,194,251,247,239, 19,189, 94,127,178, 33,126, 74,233,196,137, 19, 39, 50,167, 79, +159, 30,245,214, 91,111,161,101,203,150,136,139,139,195,214,173, 91,177,123,247,238,205, 66,161,112, 74, 99,218,157,156,156, 92, +224,237,237,253, 84, 5,164,250,204, 66, 93, 73, 38, 88,150, 53,122,112,126, 78,236,214, 59, 60, 27, 27,157, 79,139, 63,151, 19, +201,201,201, 65,102,121,184,170, 18,178,140, 46, 97, 18, 66,212, 90,173,182, 90, 59,255,236,126, 44, 44, 44, 68,105, 73, 6, 12, + 6, 67,141,206, 39, 79,158,168, 21, 10,197,218,136,136,136,149, 11, 23, 46,180, 91,181,106,213,147,219,183,111,231, 51, 12,243, + 84,185,150,101, 89,137,155,155,155,124,197,138, 21,246, 17, 17, 17, 79, 88,150, 93,251, 55,135,171,161,237,219,183,223,220,175, + 95, 63,249, 7, 31,124,128,136,136, 8,164,166,166,126, 65, 41,213, 3, 0,165,148, 37,132,124,254,205, 55,223,236,159, 62,125, + 58, 74, 75, 75, 87, 28, 60,120,112, 62, 33,100, 34,165,116, 91, 77, 78, 91, 91, 91, 39, 62,159,143,216,216,216,124, 74,233,253, +186,142, 79, 41, 77,243,244,244, 76, 39,132,216, 59, 58, 58,182,174,107, 95, 43, 43, 43, 55,185, 92, 14,149, 74, 5,148,125,136, +215, 68, 98, 74, 74, 10, 21,137, 68, 68,161, 80,184,215,247,252, 45, 45, 45, 63,223,176, 97, 3,255,228,201,147,152, 59,119,238, +227,164,164,164,209,229,203, 8,128, 82, 26, 75, 8, 9,237,209,163,199,142,233,211,167,123, 46, 91,182,140,196,199,199, 79, 2, + 80,103,192,114,113,113,153, 56,118,236, 88,172, 93,187, 22,235,215,175,159, 68, 41,221, 85,237, 57,239, 32,132, 88, 90, 91, 91, +175,157, 48, 97, 2, 54,109,218, 52, 26, 64,173, 1, 75,165, 82, 77,127,243,205, 55,231, 60,121,242, 36,188,190,231, 99,236,254, + 10,133, 98,240, 91,111,189,101, 79, 41, 69, 68, 68, 68,218,218,181,107,139,242,243,243,183,165,164,164, 60,245, 62,193, 48,204, +158,195,135, 15, 79,253,224,131, 15,112,242,228,201,117, 10,133,130,166,164,164,108,168,235,248,148,210, 84, 66, 72,107, 66,136, + 55,165,244, 86,249, 44,193,167, 6,178, 19, 66, 60,203,247,125,108,204,115,202,186,115,114,159,189, 79,255,179, 87, 46, 70,190, +234,234, 19, 42,176,179,148, 67,233,110, 3, 43, 83, 33, 40,128,235, 73, 26,156, 63,117, 84,151,145,250, 40,218,152, 25,132, 21, + 78,135,118, 3,162,101, 54, 46,175,182,106,219,149,239,234,238,129,222, 33, 29, 44,173,205, 4,208,234, 40,142, 93,201,195,185, +168, 67,186,140,244,228,147,220, 12,194,191,135,151,101,128, 59, 80,127, 5,107,222,250,245,235, 67, 54,110,220, 56,112,234,212, +169,242,119,222,121, 7, 82,169, 20,133,133,133,112,118,118,134, 94,175,199,193,131, 7, 17, 27, 27,171,102, 89,118, 63,254,156, + 37, 2,224,175, 87,219,158, 17, 81,212,130, 16,194, 0,133, 33,243,215,119,104, 22, 39, 0, 68, 63,208, 43, 21,169, 89,243,178, +115, 14,126,226,162,116, 20,246,233,218,153,111, 99, 89, 54,155,185,177,206,166,242,119, 56,245,122,253, 88, 66,136,207,231,159, +127,190, 92,169, 84, 42,230,207,159,255,168,109,219,182,154,252,252,124,170,213,106,217,204,204, 76,217,238,221,187, 93,179,179, +179,213, 58,157,238,109, 74,233,213,134,180, 51, 37, 37, 69, 3, 96,180,131,131,195,222,140,140,140,221, 35, 70,140,192,166, 77, +155,112,238,220,185, 1, 41, 41, 41, 7,107,122, 76,125, 78, 0,160,148,234,187,116,233,146,123,227,198, 13,123,158,185, 43,236, + 45, 4,232,251,101, 89, 49, 66, 46, 6, 52,133,106, 60,184,123, 11,249,249,249,151,141,117, 38, 36, 36,104,125,125,125,115, 51, + 51, 51,109,108,109,109,203,194, 85,149, 96,245,228,201, 19,228,229,229, 81,134, 97,206, 26,235,204,204,204, 44, 12, 14, 14, 46, + 74, 72, 72, 16,241, 68,142,112,180, 20,163,172, 11,146,194, 86,206,135,166,168, 16,215,226, 46, 35, 63, 63, 63,178, 54,103, 74, + 74,202, 78,133, 66, 1, 0, 43,231,204,153, 99,211,183,111,223,123, 23, 47, 94,236, 94,245, 56,126,126,126,191,205,159, 63,127, +192,226,197,139,179, 54,111,222, 60, 61, 53, 53,245,169,217,142,207,250,111,201,218,218,122,218,129, 3, 7,228,165,165,165,136, +136,136,192,215, 95,127,189,145, 82,250,212,236, 72, 74,233, 1, 30,143,247, 13,195, 48,255,253,240,195, 15, 49, 97,194, 4,153, +191,191,255, 84,252, 89,229,122,202,169, 82,169,102,251,249,249,205,201,200,200, 48, 42, 16,220,189,123,119,188,159,159,223,236, +140,140,140,229,181,181, 19, 0, 76, 76, 76, 76, 12, 6, 3, 30, 62,124,152, 67, 41,173, 49,132, 82, 74,139, 61, 60, 60, 84, 6, +131,193, 73, 38,147,253,101, 0,117,117,103, 78, 78, 78,184,191,191,255,188,244,244,244,163, 0, 22, 81, 74,139,171,249,174, 16, + 66,124, 62,250,232,163,201, 75,151, 46,125, 61, 45, 45,237, 47,235, 44, 85,119, 38, 37, 37,133,247,232,209,227,203, 59,119,238, +108,166,148,174,175,165,157,235, 8, 33,165, 63,253,244,211,164,135, 15, 31, 46,169,203,153,146,146,178, 31,192,254,154, 60, 53, + 81,219,254, 85,157, 86, 86, 86,211, 39, 79,158,140, 67,135, 14, 65,173, 86,175, 73, 73, 73, 89, 86,147, 75,165, 82,157,119,117, +117,253,189, 75,151, 46,131, 87,172, 88, 33, 28, 48, 96,192, 36, 0, 27,106,114, 86,227, 28,128,144,242,113,112,183, 1,100,151, +111,183, 66,217,204, 65,130,106,239,197,245, 57, 13,186,252,145,113,167,127,221,145,156,112,173,139, 95,247,161,150,121, 69, 78, + 16,242, 25, 20,228,164,226,220,241,255,203, 73,121,124,255,156,182, 56,119,100, 67,156,250,210,188, 17,215,206,252,182, 51, 45, +241, 86,231,162,144,254,150,185,106, 23, 8, 5, 4,185,153,143,113, 33,114,239,147,212, 71, 15, 79,235,216,146, 49, 13,113, 54, +133,127,179,243,101,131, 24, 51, 33,136, 16, 34, 2,208, 75, 46,151,247,254,228,147, 79, 68,125,251,246,197,226,197,139,113,236, +216, 49,173, 86,171, 61, 6,224,120, 77,149,129,186, 94,128,103,225,236, 23, 68,228, 14,246,204,234,150,142,204,232,182,238,110, +228,198,221,120,254,229,148,129,223, 55,197,217, 88,254,110, 39, 33,164,171, 64, 32, 88,230,229,229, 85,146,152,152,216,214,202, +202,234,142, 74,165, 18,233,116,186,207, 41,165,167,154,210, 78, 7, 7, 7,155,254,253,251,103,204,154, 53,139,204,159, 63, 31, +167, 78,157,178,168,171,194, 98,140,179, 69,139, 22, 61,253,253,253,143,172, 90,183,129,159,148, 94,128,124,181, 26,106,181, 26, +133, 5, 5, 40,206, 79,195,161,223,118,104,175, 95,191,238,153,150,150,150,100,172,211,197,197,165,111,135, 14, 29,118,108,216, +176,193, 60, 59, 59,187, 50, 96, 61,121,242, 4, 44,203, 98,253,250,245, 79,178,179,179,219, 63,126,252, 56,197, 88,103,203,150, + 45,135,132,132,132,236, 94,190,250,127,252,228,244, 2,168, 11, 11, 81, 84, 84,132, 98,141, 6,165, 5,233,216,252,125, 68,201, +173, 91,183, 90,102,102,102,166,215,229, 84, 40, 20,111,118,237,218,117,193,181,107,215, 78,198,199,199, 79,172,122,159,135,135, +199, 55, 29, 59,118,236,127,246,236,217, 57, 42,149,106,107, 99,126,159, 13,165,170,147, 16,210, 87,169, 84,126,157,153,153,249, +160,180,180,116, 23,165,244, 47,109,168,242,184, 17,124, 62,127,132,141,141,141,125, 90, 90,218, 82, 74,233,175, 53, 57,159, 69, + 59,203,127, 30,104,103,103, 55, 51, 35, 35, 99, 41,165,244,247, 58, 30, 87,177,223,114, 74,233,111,117, 57,159, 69, 59, 95, 4, +167, 66,161, 24,104,103,103,183, 32, 61, 61,253,100, 90, 90,218,231,117,117,249, 58, 57, 57, 73, 88,150, 93, 96,111,111, 31,156, +150,150,182, 50, 53, 53,245,255,140,109, 39, 41,187, 84, 78, 75,148,141,183, 2,202,198, 92, 37,209, 58,214,190,170,207,105,227, +217,123,144, 88, 38,125,151,178,134,142, 0, 1,195,227, 93, 41, 46, 44,218, 84, 87,229,202, 24,167,196, 68, 54,150,101, 13, 29, + 25, 16,150, 97,152,171, 26, 77,209, 15,153,183,143,213,122,169,156, 23,241,117,255, 39, 59,107, 57,206,120, 74,105,131, 38,131, +252, 83, 48, 42, 96, 85,238, 92, 54,139,102, 0,195, 48,193, 44,203, 70, 3, 56, 64,235, 88,183,198,152, 23,224, 89, 56,251,133, + 17,101, 75, 27,222,122,185,140,241, 95,186, 89,247, 81,115, 56, 27,202,243,114, 18, 66,134,240,249,252,207,244,122,253, 87,148, +210,122,199, 71, 25,219, 78, 15, 15,143, 13, 97, 97, 97,239, 30, 57,114,228,219,164,164,164,201,205,225,108,219,182,237,202, 86, +173, 90, 77, 30, 48, 96,128,192,206,206, 14, 89, 89, 89,184,123,247, 46, 98, 98, 98,180,105,105,105, 19,227,227,227, 55, 55,212, +217,161, 67,135,133,214,214,214, 19,223,127,255,125,107, 66, 8,178,179,179,161, 86,171,233,158, 61,123,178, 52, 26,205,251,241, +241,241,149,103,245,198, 58,219,183,111,255,189,171,171,235,152,161, 67,135, 10,148, 74, 37,178,178,178,112,243,230, 77,156, 61, +123,182, 36, 45, 45,237,173, 59,119,238, 84, 86,123,234,114,186,185,185,137, 18, 18, 18,106,236, 78,244,243,243, 19,196,196,196, +212,216, 37,250, 50,253,125,114, 78,206,201, 57, 57,103, 3,143,243,194, 6,172,122, 7,185, 87,165, 60,164,236, 36,132,236,174, + 24,159,209, 84,158,133,243, 80, 36, 85, 1,232, 79, 8,225, 55,151,243, 69,161, 60, 84, 25, 61,240,220, 88,238,222,189,251,190, + 66,161,152, 82,222,109,216, 44,220,188,121,115,154, 82,169,252, 41, 49, 49,113,133, 76, 38,243,101, 89, 86, 87, 82, 82,114, 38, + 59, 59,123,106, 74, 74, 74,163, 46, 4,123,245,234,213, 47, 21, 10,197,111, 43, 86,172,248,130, 82,218,129, 16,162,213,235,245, +209, 57, 57, 57, 11,146,147,147, 83, 27,227,188,118,237,218,120,165, 82,249, 99, 98, 98,226, 18,177, 88,220,129, 82,170,213,104, + 52,145, 25, 25, 25,159, 84, 84,174,140,161,182,112, 5,148, 45,145,209,152,182,113,112,112,112,112,252, 51,105, 80,192,170,224, + 89,132,150, 23,197,249,111,166, 57,195, 85, 5, 42,149,234, 42,128, 87,154,211,153,146,146, 18, 7, 96, 88,115, 58, 85, 42,213, + 5, 0,181,174,161,197,193,193,193,193,193, 46,169, 84, 2, 0, 0, 32, 0, 73, 68, 65, 84, 81, 21,163, 46,246,204,193,193,193, +193,193,193,193,193, 97, 60, 4,101,235,144,252,133,134,244,173, 18, 66,140,186, 44, 65, 67,252,156,147,115,114, 78,206,201, 57, + 57, 39,231,124,249,156, 53,184,223,168,118,151,170,154,239,133, 28,131,213,160, 65,238, 13,150,191, 32, 3,235, 56, 39,231,228, +156,156,147,115,114, 78,206,249,124,157, 47, 27, 92, 23, 33, 7, 7, 7, 7, 7, 7, 7, 71, 51,195, 5, 44, 14, 14, 14, 14, 14, + 14, 14,142,102,134, 11, 88, 28, 28, 28, 28, 28, 28, 28, 28,205, 12, 23,176, 56, 56, 56, 56, 56, 56, 56, 56,154, 25, 46, 96,113, +112,112,112,112,112,112,112, 52, 51,207,116, 22, 33, 7, 7, 7, 7, 7, 7, 7,199,191,145,167, 42, 88,132, 16, 46,109,113,112, +112,112,112,112,112, 60, 55, 94,150, 44,194,117, 17,114,112,112,112,112,112,112,112, 52, 51, 92,192,226,224,224,224,224,224,224, +224,104,102, 24,224,229, 41,199,113,112,112,112,112,112,112,188,152,188,108, 89,164,162,130, 21, 86,254,196,194,158,103, 99, 56, + 56, 56, 56, 56, 56, 56,254,181,188, 84, 89,132,155, 69,200,193,193,193,193,193,193,193,209,204,112, 99,176, 56, 56, 56, 56, 56, + 56, 56, 56,154,153,103, 26,176, 8, 33,237, 56, 39,231,228,156,156,147,115,114, 78,206,201, 57,255,109,112, 21, 44, 14, 14, 14, + 14, 14, 14, 14,142,102,134, 11, 88, 28, 28, 28, 28, 28, 28, 28, 28,205, 12, 23,176, 56, 56, 56, 56, 56, 56, 56, 56,154, 25, 46, + 96,113,112,112,112,112,112,112,112, 52, 51, 92,192,226,224,224,224,224,224,224,224,104,102, 8,128, 26,103, 2, 80, 74,175, 27, + 45,105,196,108,130,250,252,156,147,115,114, 78,206,201, 57, 57, 39,231,124,249,156,245,185, 27,146, 63,254,201, 60,211,133, 70, + 9, 33,237,154,251, 23,197, 57, 57, 39,231,228,156,156,147,115,114,206,151,207,249,178,193,127,222, 13,224,224,224,104, 34,187, + 9, 15,118,109, 92,193, 82, 5,248,162, 84,252,113,237, 62,230, 82,182,201, 78, 69, 91, 23,104,117,246,144, 74, 50,113,228,234, +131, 38, 59, 57, 56, 56, 56,254, 69,112, 1,139,131,227, 69,199,209,203, 19, 6, 44, 1, 15,142,160,165, 9, 8,105,187, 4, 64, +211,206, 44,173,189, 60,161, 99, 23,129,207, 56, 65, 91,122, 7,221,218, 44, 5,112,179, 89,218,203,193,193,193,241, 47,224,185, + 12,114, 15, 8, 8,136, 9, 8, 8, 88, 24, 22, 22, 38,126, 30,199,231,224,120,105,184,222, 94, 6,189,161,159, 86,199, 42, 15, + 71,231,218, 21, 21, 27, 60, 33,212,247, 71,180,167,105,147,156, 2,242,106,177,142,109,241,211,177, 34,251,194, 98,189, 55, 24, + 52,205, 89, 78,187,118,237, 44, 2, 3, 3, 15,251,250,250,218, 52,213,197,193,193,193,241, 79,230,185, 4, 44,150,101, 59,217, +217,217, 77,213,104, 52, 73,254,254,254,131,159, 71, 27,158, 23,157, 59,119,142,238,210,165, 75,122,112,112,112,122,112,112,112, +108,125,219, 95, 70, 20, 10,133,103,251,246,237,147,124,124,124,238, 84,221,110,215,241,245, 96,239,110,239,204,181,241, 25,218, +253, 57, 53,237,197,163,144,181, 7,195,235,113, 51,177, 72,150,150,171,179,143,137, 47,146,131,242,194, 80, 10,199, 38, 57, 89, +218,243, 74,130,198,228,220,125, 91,251,211,215, 75,204, 64,153, 30,160,196,161,169,205, 21,137, 68,147, 40,165,189, 5, 2,193, +199, 77,117,113,188,216, 16, 66,218, 17, 66, 6, 19, 66, 2,154,209,185,204,203,203, 75, 69, 8,249,168,185,156, 28, 28,141,197, +232,128, 53,172, 21, 9, 25,213,154, 68,189,217,138,168, 71,180, 38, 5,111,181, 38,103,254,227, 70,186, 55,246,192,123,246,236, +145,110,221,186,213,174,109,219,182, 59,131,130,130,206,248,251,251,123, 52,198, 19, 16, 16,112, 56, 32, 32, 96, 88,245,109,254, +254,254,111, 86,221, 22, 24, 24,120, 35, 48, 48, 48, 47, 32, 32,224,190, 49, 94, 63, 63,191,123,126,126,126,133, 1, 1, 1,247, +170,110,247,247,247,127, 51, 48, 48,240,112,181,227, 13,171,190,173, 54, 24,134,113,218,183,111,159,221,129, 3, 7,236,248,124, +190,125,245,237,251,247,239,127,106,123, 67, 9, 8, 8, 24, 23, 16, 16, 16, 93,237,185,188, 95,125, 91, 93,248,251,251, 71,251, +249,249,189, 95,205, 27, 29, 16, 16, 48,174,177,237,170, 64,161, 80,120,118,235,214,237, 76, 92, 92, 92, 11,185, 92,110, 81,245, + 62, 7,107,139, 62,209,251,191,153, 58,102,216,171,147,236,218,190,214,190,169,199,122,233,185,221, 86, 8, 61,219,141,101,169, +237,205,251,197,182,253, 7,252,135,127,229,158,198, 86,167, 55, 88,129,240,194, 16,213,178,225, 21,226,219,109,133,208,233, 66, + 89, 74,237, 79, 92, 17,218,134, 13,250,144,119,242, 26,223, 86,103, 48, 88, 67,135,238,141,114,150,227,231,231, 39,224,241,120, + 83, 39, 76,152,192, 16, 66, 62,116,115,115, 19, 53,214,245, 34, 18,212,158, 40, 95,241,231, 95,244,107, 75, 66,154,203, 73, 8, +241, 49, 49, 49,185, 76, 8,241,108, 46,231,223, 1, 33,164, 19, 0, 25,165,244,119, 0,246,132,144, 38, 15, 87, 33,132,172, 90, +176, 96,193,231,215,175, 95, 87,180,106,213,106, 62, 33,132,215,244,150,114,112, 52, 30,163, 2,214,136, 86,100,158,189,131,242, +232,172, 85,219,187,109,136,122, 96,250,237,190, 88,147,169,211,195, 67, 28, 44,109, 15,190,229, 70,150,214,246,184,186,102, 24, +136, 68, 34,220,191,127, 31, 17, 17, 17,146,121,243,230, 5,155,155,155, 95, 13, 10, 10, 90,221,182,109, 91,147,186,218, 82,221, + 73, 41, 13, 17, 8, 4, 27,130,130,130, 54, 85,188, 97, 19, 66, 66,196, 98,241,247, 65, 65, 65, 63, 85,116, 67,250,249,249,181, +186,120,241,162, 25, 33,228, 47,225,165,166,118, 6, 6, 6, 58,198,196,196,200,128,178, 74, 64, 88, 88,152, 56, 48, 48,112,171, + 82,169, 92, 15, 32, 4, 0,220,220,220, 68, 65, 65, 65,155,156,157,157,127, 32,228,233, 55,205,218,158, 59,195, 48,176,176,176, +192,246,237,219,193,227,253,249,255, 79, 8,129,133,133, 5,182,109,219, 6, 66,136, 81,207,189, 42,109,219,182, 53, 9, 8, 8, +216,227,232,232,184,154,101,217, 46, 0,208,190,125,123, 89, 96, 96,224,110,165, 82,185,166, 98,155, 49, 78, 74,105, 23,161, 80, +184, 58, 48, 48,112,119,251,246,237,101, 0,192,178,108, 23, 62,159,191, 42, 32, 32, 96, 79, 67, 94,163, 78,157, 58, 77,232,208, +161, 67, 74,135, 14, 29, 82,218,180,105,179,216,222,222, 62,114,237,218,181,214, 85,159,123, 69,229, 42, 61, 35, 59, 39,250,210, +141,248,169, 19,254, 19,214,194,217,126,180, 69,199,161,230,198, 60,247,198,242,194, 59,179,137, 29, 8,237, 21,159,164,145,180, +116,247, 55,177,243,250, 15,108, 45,248,226,115,183, 10,229,224,225, 21, 8,100,182,141,115,242, 95,185,241, 64, 35,181,108,213, + 79, 22,208,185, 27,136,137,135, 56, 50,174,208, 12,124,166,113,206, 63,249, 79,151, 46, 93, 68,189,122,245,130, 66,161,224,153, +155,155,143,174,103,255, 23,255, 53, 42, 39,168, 61, 81,202, 37,162, 11, 43, 23,124,226,175,176,150,237, 53, 38,100, 25, 49,125, +222,199,206,206,238,228, 55,223,124,227, 39,151,203, 79, 25, 19,178,254, 9,191,207,242,112, 37,164,148,158, 47,223,116, 19, 64, +104, 19,157,171,230,205,155,247,241,140, 25, 51,160, 86,171, 49,102,204, 24, 51, 0, 43,141,117,202,229,114,247, 14, 29, 58,252, +228,227,227,243,200,215,215, 87,235,237,237, 93,220,166, 77,155,196,118,237,218,109,150, 72, 36,174,181, 61,238,159,240,251,124, +153,156,245, 32, 2,208, 3,192, 0, 0,175, 0, 8, 44,255, 62,160,252, 54, 0, 64,175,106, 95, 43,170,163, 21,247, 7,213,226, + 24, 80,195,227, 2,170,108,175,250,115,245,239,107,133, 1, 0, 66, 8,173,250,181, 42,195, 91,147, 96,107, 7,229,231,203,126, +187, 36,101,239, 94, 65,204,123, 61, 17,255,209, 80, 72,239, 93,193, 23,147,191,144,202,229,150,147,135,181, 38, 61, 26,246,123, + 42,227,206,157, 59,216,185,115, 39,108,108,108,200,198,141, 27,197,195,134, 13,155,100,102,102,150, 28, 16, 16, 80,239, 27,111, + 5, 60, 30,207,176,105,211, 38,211, 33, 67,134,140,176,178,178,186,225,231,231,215,138, 97, 24,195,150, 45, 91, 76,223,124,243, +205, 97, 90,173,246,150,191,191,191, 71,108,108,172,225,210,165, 75, 96, 24,227,138,118, 49, 49, 49,250, 67,135, 14, 1, 0,252, +253,253, 61, 40,165,183,150, 46, 93, 58,226,215, 95,127,149,155,155,155,179,126,126,126,173,156,157,157,111, 44, 91,182,108,244, +238,221,187,229,102,102,102, 70,205,176, 34,132,160,184,184, 24, 18,137,228,169, 32, 69, 8,129, 70,163,129, 88, 44, 54,186,141, + 21,248,249,249,249, 88, 91, 91,223, 94,178,100,201,144,223,126,251, 77, 42,151,203, 17, 16, 16,224,109, 97, 97, 17,191,124,249, +242,161,123,247,238,149,202,229,114,163,125, 66,161, 16,219,182,109,147,141, 26, 53,106,176, 88, 44,190, 29, 16, 16,224, 45, 20, + 10,177, 99,199, 14,217,232,209,163, 7,202,100,178, 91,126,126,126, 62,198,184,116, 58,221,156, 75,151, 46, 57, 70, 70, 70, 58, +186,184,184, 76,249,246,219,111,237, 5, 2, 1, 0,192, 96, 48, 0,248,179,114, 53,250,245,222, 65, 31,207,249,230,164,166,184, + 68,187,232,139,177, 97, 2, 3, 58, 55,232, 23,241,111, 98, 55,225,129, 53,116, 2,224, 22,123, 71, 99,211,177,219,104, 62, 50, +126, 71,160,183, 41, 63, 42,182,192,142, 82,234, 2, 61, 13, 68, 84,152,241,149,129,221,132, 7, 30,237, 8,194,122, 28,141, 35, + 54,193,189, 70,243,147,146,146,224,234, 29,198,219,127, 9,246,148, 82, 87,176,240,111,144,179, 10, 2,129, 96,238,240,225,195, + 77, 18, 19, 19, 17, 28, 28, 44, 19,137, 68,115, 26,227,121,138,219,109,133,184,208,198, 5,167, 60,195, 16,237,233,216,216,182, + 61, 75,130,218, 19,165,153, 68,116,126,199, 79, 63, 43,218,135,142, 35,235, 63,113,177,178,149, 11,140, 10, 89,181, 81, 30,174, +254,184,112,225,130,245,171,175,190,138,121,243,230,217,154,153,153, 25, 21,178,158, 39, 85,195, 21, 33, 68, 90,222, 61,168, 2, +224,212, 4,231,154,121,243,230,125, 60,115,230, 76,156, 63,127, 30,203,151, 47, 71,191,126,253, 96,105,105, 89,239,251,199,219, +111,191, 45, 11, 9, 9,137, 25, 60,120,240,149,143, 63,254,120,244,254,253,251,157, 55,109,218, 36,124,247,221,119,197,195,135, + 15,119,249,228,147, 79,222,233,223,191,255,245,160,160,160, 11,195,134, 13,147, 52,182,137,229, 55,142,122,168, 43,139, 0,232, + 48, 99,198,140, 64, 66,200,254, 25, 51,102,248, 3,176, 33,132,236, 7, 96, 11,192,182,252,123, 81,181,175,182, 40, 11, 77, 21, +247, 91,215,228,168,184, 85,123,156,109,149,237, 85,143, 81,253,251, 90,169,252, 36, 39,132,116, 7,112,170,250, 14,124,138, 5, + 19,166, 46,148, 60,220,252, 53, 82,127, 90, 5, 38, 75, 5, 94,110, 26, 74, 78,253, 14,221,233,125,120,187, 75, 23,169,148,144, + 69, 13,250, 45,150, 35,151,203, 33, 20, 10,113,247,238, 93,220,186,117, 11,253,251,247, 23, 70, 68, 68, 88,248,248,248,124, 31, + 18, 18,114, 37, 32, 32,160, 67,125, 14, 66, 8,220,221,221, 49, 98,196, 8,209, 71, 31,125,212, 90, 34,145,196, 82, 74, 5,174, +174,174,120,243,205, 55,133,211,167, 79,111, 41,145, 72, 46,177, 44, 43,148,201,100,181, 86,135,106,242, 74,165, 82, 0, 16,120, +120,120, 92,222,185,115,167,107, 72, 72, 8,255,232,209,163,200,207,207,231,123,122,122, 94,217,177, 99,135, 91,112,112, 48,255, +204,153, 51, 40, 44, 44, 52,106, 65, 49, 66, 8, 10, 11, 11, 33,149, 74,255, 18,176, 10, 11, 11,255, 18,188,234, 35, 32, 32, 96, +156,155,155,219,165,157, 59,119, 58,133,134,134,242, 78,158, 60, 9,181, 90, 13, 23, 23,151,203, 59,119,238,116, 10, 9, 9,225, + 69, 71, 71, 67,173, 86, 27,237, 20,137, 68,112,117,117,197,240,225,195, 5,159,126,250,169,147, 64, 32,184, 36, 18,137,224,226, +226,130,225,195,135, 11,167, 77,155,230, 36, 18,137, 46, 24,217,101,200, 3, 0,189, 94,143, 97,195,134,153, 72,165, 82, 36, 39, + 39,131,101, 89,176,108, 89, 38, 77,205,204,190,118,246,210,245,219, 83, 39, 14,235, 94, 88, 82, 82,114, 36,242,242,173,182, 30, + 46, 78,132,208,150, 70, 55,250,223,134,101, 91,107,240,208, 59, 41, 69, 43, 22,153, 56,201, 77,109,218, 0, 79, 78,161,149, 66, + 12, 80, 34,185,116,187,200, 4, 12,237, 13,100, 89, 55,200,105, 96,123, 63, 80,105,197,165,210,118,166, 10,101, 11,100,103,103, +195,217,213, 11, 37,176, 21, 69, 95, 47, 52, 5,109,160,179, 28, 95, 95,223, 80,103,103,103,135,150, 45, 91, 34, 43, 43, 11,238, +238,238, 48, 53, 53,181,244,243,243,235,221, 80, 87, 37, 81, 45,197,200, 67, 8, 74,201, 74, 16,102, 62, 40,127, 9,248,153,157, + 16,235, 39,104,180,179,153,169, 12, 87,219,126, 86, 90, 59,122, 1,215,223,131,189,149, 8, 27,103,116,180,178,149,139, 27, 21, +178, 8, 33, 62,246,246,246,127, 92,184,112,193, 70, 34,145, 32, 38, 38, 6,109,219,182,197,215, 95,127,109,107,105,105,249,143, + 13, 89,213,194,149, 21,165, 84, 3,128, 5, 48, 18,141,152,245, 74,202, 88,183,112,225,194, 41, 51,103,206,196,185,115,231,160, + 84, 42,145,145,145,129,208,208,208,164,156,156,156, 58, 63,151,124,124,124,156,238,222,189,171,250,228,147, 79, 58,109,221,186, + 85,106, 98, 98,130,220,220, 92,252,240,195, 15,152, 49, 99, 6, 8, 33,160,148,226,199, 31,127,148,141, 29, 59, 54, 48, 33, 33, + 65,213,178,101, 75, 99,135,111, 16,148, 85, 92,100, 0, 76,202,191, 74,166, 76,153, 34, 34,132,136,203,195,165,132, 16,242,143, +249, 91,253,167, 80, 91, 22, 1, 96,179,116,233,210,112, 74,233,192,165, 75,151,134, 87,217,127,127, 29,174,170,161, 9, 0, 80, +221, 65, 41, 29, 88,245,107,213,199, 82, 74, 7, 82, 74, 7, 86,125,124, 93,199,171, 78,213, 82, 73, 36,165,180,123,245, 29, 40, +208,193,161, 85, 27,228, 30,219, 5, 41,143, 60,117, 99, 30, 92,131,179,132, 15, 29,165, 70, 85, 51,170, 99,106,106, 90,121, 99, + 24, 6,169,169,169,224,241,120,152, 51,103,142,100,242,228,201,237,133, 66,225,185,110,221,186, 45,169,203, 81, 17, 70, 46, 94, +188, 8,119,119,119, 50,115,230, 76,179,238,221,187,243, 1,224,234,213,171,112,115,115, 35,139, 23, 47,150, 15, 26, 52,136,200, +100, 50,163,171, 67, 12,195, 64, 42,149, 34, 44, 44,140,108,218,180,201, 84, 44, 22,227,192,129, 3,200,202,202,194,171,175,190, +202,223,180,105,147,169, 68, 34, 65, 84, 84, 20,242,242,242,140,246, 18, 66, 80, 82, 82, 82, 99,192,170,169,178, 85, 23,193,193, +193, 27, 29, 28, 28, 86,111,221,186, 85, 44,149, 74,113,242,228, 73,228,229,229, 97,196,136, 17,250,109,219,182, 73,204,204,204, + 16, 29, 29,141,188,188, 60,163,124,213,185,120,241, 34,220,220,220,200,172, 89,179,164, 93,186,116,209, 1, 64, 92, 92, 28, 60, + 60, 60,200,172, 89,179,164,102,102,102,171,186,118,237,186,177, 46, 7,203,178, 72, 77, 77,197,245,235,215,241,224,193, 3,100, +101,101, 33, 51, 51, 19,106,181, 26,122,189, 30, 0, 32, 83,231, 31, 88,183,105,223, 21, 19,169, 84, 22,212,222,163,197,133,216, +155, 25, 38, 82,169,204,195,181,133, 39, 33,243,185,203, 57, 85,135, 16, 2,129,214, 3,148,116, 58,127,179,192, 42,180,207, 72, + 33, 50, 15, 1, 84, 7, 16, 62,122, 4, 57,241,247,158, 41,180, 7,139, 14, 16,194, 11, 48,226, 15,138, 16, 2,126,169, 59, 64, +252,143,198,232,173,187,246,153, 36,124,252,248, 49,132, 66, 33,196, 98, 49,124, 67,222,224,239, 56,169,115, 0,208, 17, 2,180, + 49,202, 89, 5,177, 88,252,229,216,177, 99, 77, 84, 42, 85,165,179, 95,191,126, 38, 50,153,108,110,163,126, 7, 81, 45,197, 96, +100, 93,160,167, 31,223,120,160,113, 89,188, 57,213,235,126,178,198, 11, 20,211,160,211,249, 54, 53,100,185,184,184,132,121,122, +122, 62,112,117,117,237,218, 88, 71,121,184, 58,183,115,219,207, 74, 43,135,178,112, 5, 67, 17,192,147,194,193,206, 18, 27,231, +134, 89,217,154, 73, 27, 20,178,202,195,213,137,243,231,207,219, 72, 36, 18, 92,190,124, 25, 34,145, 8, 18,137, 4,237,219,183, +199,250,245,235,109,173,172,172,254, 17, 33,139, 16, 98, 73, 8,233, 67, 8,249, 15, 33,228, 13,252, 25,174, 92, 1,244, 36,132, +244, 6,224, 0, 32,138, 82,122,197, 72,103, 87, 62,159,127,160, 99,199,142, 41,124, 62,255,102,120,120,248,127,167, 79,159,142, + 53,107,214, 32, 44, 44,236,254, 23, 95,124,129,248,248,120,125, 81, 81,209, 96, 74,105,157, 31,132, 5, 5, 5,191,207,154, 53, +203,252,181,215, 94,171,248, 25,103,206,156,193,150, 45, 91, 96, 98,242,231, 40, 8, 74, 41, 6, 13, 26,132,113,227,198, 89,106, +181,218, 61,117, 57,237,237,237, 95,137,140,140,244, 64, 89,184,146,224,207,128,101,114,252,248,113, 11,137, 68, 98, 21, 24, 24, +104, 86,190, 93,246,218,107,175, 89, 11, 4,130, 70,255,141,189,164,212,152, 69, 42,168, 30,112,170, 7,160,154,238,171, 41, 60, + 53,182,113,117, 29,175, 58, 85, 63,188,194, 8, 33, 81, 53,237, 84,250, 36, 29, 98, 24, 32,227, 17, 72,249,164,236, 43,143, 64, + 74, 88,240,115,210, 27,248, 86,251, 39,166,166,166,144,203,229,127, 9, 90, 26,141, 6, 5, 5, 5, 70, 5,141,138,177, 60,150, +150,150,149, 31,218,166,166,101,179,201,173,172,172, 80, 82, 82, 2, 66, 8, 76, 76, 76, 96, 98, 98,210,160, 10,150, 68, 82, 86, + 17,142,142,142,198,217,179,103,193,231,243, 97,101,101, 5, 0,184,124,249, 50,174, 93,187, 6,145, 72, 4,107,107,235, 6,121, + 75, 75, 75,107,236, 34,212,106,181, 13,234, 34,100, 24, 6,197,197,197,244,242,229,203,184,126,253, 58,196, 98, 49,108,109,109, + 33, 18,137,144,156,156,140,219,183,111, 67, 36, 18,193,214,182,206, 42,102,173,152,153,153, 33, 55, 55, 23, 44,203, 86, 84,243, + 96,102,102,134,130,130, 2, 48, 12, 99, 84, 59, 89,150,133, 74,165, 66, 86, 86, 22, 30, 61,122,132,204,204,204,202,144, 85,209, + 69,200,209, 64,206,248,152,131, 8, 94,205,204,213,137, 51, 11, 68,230,246,110,189,128,172, 67, 0,225, 1, 2, 75,116,238,212, + 10, 73,105, 6,147,248, 71, 90, 9,116,232,131, 63, 60, 45,141,114,242, 4,189, 51,242,116,226,196, 92, 91, 51,239,118,126,200, +200,200,128, 88, 44,134, 88, 44,134,127,231, 87,240, 32,133,149,221,124,168,145,129,226, 85,163,156,229,116,234,212,169,181, 84, + 42,237,210,169, 83, 39,146,158,158, 14,177, 88, 12,137, 68,130, 46, 93,186,128, 97,152,246,190,190,190, 94, 13,122,254,247,221, + 68, 16,200, 58, 3,244,227,219, 15,139, 20,123,163, 53,158,131,134,190, 97,181,234,151, 12,175,219, 15,139, 93,161,213,127,138, +194, 82,191,198,134,172,150, 45, 91,118, 55, 53, 53,221,255,229,151, 95,186,138,197,226, 67,174,174,174,161,245, 63,234,175,152, +138,121,255,251,242,227,145, 74,203,138,112,165, 47, 4,120, 82,128, 39, 43, 11, 89,246, 54, 88,244, 81, 47, 43,153, 80,240,127, +198, 58,165, 82,233,142,117,235,214,217, 86,132, 43,161, 80, 8,137, 68, 82,121,235,212,169, 19,230,204,153, 99,107,101,101,181, +189, 49,109,110, 46, 8, 33, 86, 40, 27, 87,117, 21,192, 30, 0, 39,170,132, 43,119, 0,255,135,178,170, 85, 44,165, 52,201, 72, +103,112,223,190,125, 79,222,191,127,191,255,149, 43, 87, 28,211,210,210,254,159,189,243, 14,143,162,218,223,248,123,102,182,151, +244,108, 26, 9, 9, 1, 82, 9, 45, 32,132,222,164, 73, 87, 4, 20,165, 11, 40,138,130, 8,162,162,116, 17, 41, 98, 1,165, 35, + 40, 32, 77,145, 34, 32, 32,210, 66,135, 16, 18, 66, 72,111,155,182,201,102, 55,219,102,206,239,143, 77, 48, 66,202, 6,184,191, +123,175,119, 62,207, 51, 79,118,206,206,188,243, 61,179,155,221,119,191,167,133,207,152, 49, 3,171, 86,173,194,123,239,189,183, +157, 82, 26,186,107,215,174, 86, 23, 47, 94,108,238, 72,255,160,156,156,156,151,102,207,158,157,159,159,159, 15, 0,136,138,138, + 66,113,113, 49,102,206,156,137,233,211,237,131, 92, 91,181,106, 5, 0,200,203,203,195,242,229,203,115,115,114,114,198,212,166, +201,113, 92,250,222,189,123, 99,204,102,115, 67, 0, 18, 0, 50, 0,202,212,212, 84,151,178,178, 50,103,150,101,157, 84, 42,149, +179, 76, 38, 83,141, 27, 55, 78, 18, 23, 23, 23, 97,179,217, 50, 29,169,255,255, 16, 53,122, 17,224,209, 76, 83, 77,101,143,123, +188, 35, 56,122,254,131,111, 72, 74,233, 41, 0, 93, 30, 62,128, 37,184,158, 22,123, 10,238,145,173,255,158,193, 18, 17, 40,157, +156,145,156,153, 14, 9,200,173,199, 8,240,129,169,170,106,178,178,179,179, 49,123,246,108,195,182,109,219,110,152,205,230,152, +211,167, 79,207,169, 77,167,210,164,120,121,121, 33, 45, 45,141,126,246,217,103, 37,135, 14, 29,178, 85,150,165,167,167,211, 15, + 62,248,160,244,199, 31,127,164,245,105, 34,172,204, 96,157, 58,117,138,206,155, 55, 79,151,149,149, 69,221,221,221,225,225,225, +129, 99,199,142,217,230,204,153,163, 75, 74, 74,162,238,238,238,112,119,119,175,151,193,178,217,108, 80, 40, 20,127, 51, 40,132, + 16, 88,173,214, 71, 50, 91,181,113,230,204,153,241, 58,157,238,237,153, 51,103, 26,111,223,190, 77, 53, 26, 13, 52, 26, 13, 54, +111,222, 44,122,245,213, 87,141,215,175, 95,127, 80,246, 56,120,122,122, 34, 33, 33,129, 46, 94,188,216,120,252,248,113, 49, 0, +104, 52, 26,220,185,115,135,206,159, 63,223, 88, 92, 92,252,246,153, 51,103,198,215,166,193,113, 28,146,147,147, 81, 82, 82, 2, +142,227, 96, 50,153,160,213,106,145,145,145,241,192, 96, 25, 85,206,125,223, 24, 59,176,101,153,209,104,184,112, 35, 49,173, 93, +235, 72,175, 50,163,209,144,120, 63, 45,129,210,121,194,236,225, 15, 67,121, 31, 80,218,233,204, 13,189,235,179,207,141,144,146, +146,139,128, 85, 15,136,221, 0,177, 43, 68,114, 15,244,235,217,138,221,116,164,196, 7,132,239, 0,185,172,238,254, 45, 60,245, + 6,207,119, 62,118,169,220,173, 83,255,105,210,194,194, 66, 48, 12,243,192, 96, 41, 85, 42,244, 28, 48,154,217,120,196,228, 3, +158,118, 4,203, 58,220,103, 70, 34,145,204, 26, 59,118,172,164,168,168,232,111,154, 10,133, 2, 67,134, 12,145, 57, 57, 57,125, +224,112,221,227, 35, 37,200,149,181, 7, 79,167,223, 73, 49,250,237,253,211, 24, 58,227,163,141,138,102, 45,218, 97,242, 96, 47, +197,162,173,121,145,215,146, 12,141,192,112,239,192, 96,110,131,111,235,103,178, 26, 53,106,212, 89,165, 82, 29,220,183,111,159, +178,123,247,238,152, 49, 99,134, 74, 38,147, 29, 10, 10, 10,122,228,179,177, 46,202, 74,185, 55,230,175,220,154,123,125,103, 31, +192, 86, 90, 97,174,254,218,242,116, 60, 62,250,242,119,157,149,163,163, 28,213, 52, 26,141,175, 78,152, 48,161,224,167,159,126, +122,196, 92,201,229,114,220,191,127, 31,139, 22, 45, 42, 44, 44, 44, 28, 83,223,120,159, 50,173, 0, 92, 5, 80, 14,160, 43, 0, +101,197, 72,193, 24, 0,199, 40,165, 28,165, 52,151, 82,154,237,168, 32,203,178,239,125,253,245,215, 34,163,209,136,137, 19, 39, + 34, 61, 61, 29, 89, 89, 89,152, 59,119,238,125,158,231, 95,173,208,188, 70, 41,141,119, 68,207,108, 54,223, 41, 42, 42, 26,208, +183,111,223,226,162,162, 34,180,104,209, 2, 3, 6, 12,128,143,143, 15,252,252,252, 48,104,208, 32,132,132,132,160,160,160, 0, +163, 70,141, 42,212,106,181,125, 40,165,181,142, 66, 47, 40, 40, 72,218,185,115,103,210,235,175,191,222, 54, 61, 61, 61, 10,128, +175,213,106,117, 55, 26,141, 78, 54,155, 77,237,236,236,236, 17, 29, 29,173,153, 60,121,178,107,108,108,108,100, 70, 70,134, 30, + 64,170,163,247,224,127,129,154,188,200, 19,112,240, 49,227, 24, 80,217, 7,235,113, 13, 25, 83, 33, 68,170,254,173,138, 5,248, +104,203,238, 45,229,210,192, 16,184,132,183,132, 82, 46,135, 66, 38,133,194,213, 29,229, 60,143,245,247,115, 12,101,148, 58,254, + 1,249, 87,240,127,203, 92,241, 60,143,117,235,214,149, 47, 92,184,176, 56, 39, 39,103,242,233,211,167, 91,198,198,198, 94,175, +179, 2, 12,131,146,146, 18,236,218,181,203,184,105,211,166,123, 70,163,177,181, 68, 34,177,154,205,102,108,223,190,189,124,213, +170, 85, 41, 6,131,161,173, 88, 44,182,212,167,249,173,178, 15,150, 88, 44,182,150,151,151,183,254,225,135, 31,146, 14, 30, 60, +104,116,118,118,134, 88, 44,182, 26, 12,134,230, 91,183,110,189,243,195, 15, 63, 24,157,157,157,235,101,220,120,158,175, 54,131, +197,113, 28,100, 50, 89,189,250, 96,197,198,198,126,103,177, 88,218,109,223,190, 61, 99,227,198,141,229,206,206,206, 0, 0,171, +213,218,118,203,150, 45, 25,107,215,174, 53,213,167,131, 59, 0,152,205,102,112, 28,135,173, 91,183,154,118,236,216,145, 97,179, +217,218, 86,150,109,220,184,177,124,235,214,173, 25, 22,139,165, 93,108,108,236,119,117,105,113, 28,199, 21, 23, 23, 67, 36, 18, +225,222,189,123, 38,153, 76, 6,150,101,145,152,152,248,192, 96,121,121,186, 71,118,108, 27, 21,190, 98,237,174, 83, 42,153, 76, +214,167, 91,155,136,184,196,212, 12, 74, 73, 74,189, 2,255, 95,193, 2, 37, 8, 20,137,233, 38, 39,185,216, 74,144,179, 7,144, +184, 85, 24, 44,251,230,215,192, 31,177,241, 6, 39, 16, 72, 97,182,122,213,169,105,165, 42, 16, 40,111,166,194, 73, 36, 81,144, +156,156,156, 7,153,166, 74, 67,212,168, 73, 4,174, 36,234,213, 32, 84, 6,192,225,169, 68, 40,165, 3,212,106,181, 40, 59, 59, +251,129,214, 3,205, 70,141, 88,171,213,218,199,225,186,107, 57, 95,240,252, 27, 9,105,229,126,251,254, 52,134,188,243,209, 70, +133,130, 45, 2, 82, 86,163, 89,136, 15,102,140,105, 41,157,187, 94,219, 44, 54,206,208, 24,132, 78, 70, 51,189,195,191, 46, 26, + 53,106,212, 73,169, 84, 30,218,183,111,159, 82,165, 82,225,222,189,123,104,209,162, 5, 22, 44, 88,160, 84, 42,149,191, 6, 6, + 6,118,115, 56, 78, 0,231,239,208, 84,125, 41, 23, 51,107, 93,122,206,245,251,156,221, 88, 49,118,115,165,213, 81, 76,248,240, +231,226,162,146,242,231,207,221,176,158,112, 84,147, 82,122, 85,167,211,245,254,240,195, 15, 11,242,243,243,255,102,174, 82, 83, + 83, 43,141, 64, 55, 74,105,189,127,244, 62,101, 84,176,119, 94, 15, 3,208, 4, 64, 75, 74,169, 13, 64, 41,165,244,177, 82,215, +145,145,145,173, 3, 3, 3,241,205, 55,223, 96,253,250,245, 69, 43, 86,172, 0,165, 20, 33, 33, 33,206,143,171,153,155,155,123, +241,206,157, 59,125, 90,182,108,121,123,205,154, 53, 25,190,190,190,252,196,137, 19, 49,126,252,120,104, 52, 26,110,245,234,213, +105,157, 59,119,190,153,148,148,212,171,172,172,236, 70, 93,122,148, 82,154,159,159,127,118,195,134, 13, 23,123,246,236,233, 52, +118,236, 88,239,245,235,215,251,196,199,199, 55, 52, 24, 12, 13,242,242,242, 84,167, 79,159,150,109,217,178,197, 39, 46, 46,238, +190,209,104,188, 72,255,149, 11, 2,255,151, 81,155, 23, 1,160,173, 48, 58,230,135,254,106,235,120,206,209,115,171,125,236,192, +113, 53, 82,231,136,155,157,247,232,217,209, 77,200,178, 5, 27,215,189, 59,186,121,184, 34,168, 81, 4, 56,125, 49,110,228,228, + 96, 75,182,206, 96,165,244,203, 93,247,232,239,117,233, 60, 76,165,193, 98, 89, 22, 71,142, 28,225,182,111,223,110,161,148,126, + 91, 82, 82,242, 65, 92, 92, 92,153,163, 58, 60,207,179,227,198,141,211, 23, 21, 21,237,201,206,206,158,156,148,148,100,238,220, +185, 51,251,210, 75, 47,233, 11, 11, 11, 15, 16, 66, 38, 94,186,116,201,212,169, 83, 39,212,231,125, 76, 8,129, 68, 34, 1, 33, + 4,177,177,177,247, 35, 35, 35,155,157, 63,127,254,171,132,132,132, 23, 41,165,236,229,203,151,211,163,163,163, 91,156, 61,123, +118, 77,124,124,252, 40,158,231, 29,154,115,133, 16,242, 32, 59, 86,213, 72, 49, 12,243,192,212,213,199, 96, 1,192,229,203,151, +111, 69, 70, 70, 70, 92,188,120,113,243,164, 73,147,250, 0, 80,198,198,198,222,110,222,188,121,248,249,243,231, 55,191,250,234, +171,125, 97,111,243,119, 8,139,197,130, 33, 67,134, 24,116, 58,221,225,210,210,210, 49, 55,110,220, 48, 68, 71, 71, 87,150, 29, + 41, 46, 46, 30, 83,143,215,104,254, 23, 95,124,241, 17, 0,240, 60,191,121,229,202,149, 19,102,206,156,169,201,204,204,124, 96, +176,242,242, 11, 79,116,120,110, 26, 87, 80,172, 51,111, 92, 57,235, 5,133, 92, 38,253, 96,233,198,147, 86, 22,231,107, 85,254, + 95, 69,202,149,128, 50, 89, 47,244,112,147,173,254,114,131,100,236,160,198,242,168,240, 64,187,185,146,184, 33, 54,174, 24, 31, +125,182,139,255,116,138, 38, 25, 60,210,193,225, 78,157,154,106, 81, 9,202,173,121, 19,250, 72,100, 75,190,157, 30,220,113,192, +187,178,136,168,103, 30, 24,161,248, 91,151,176,114,209, 52,254,211,201,238,201,224, 73, 22,108,112, 40, 75, 0, 0, 54,155,237, +133,165, 75,151, 30, 30, 59,118,172,170, 89,179,102, 15, 52,239,223,191,143, 79, 63,253,212,104, 50,153,158,119, 76,137, 16, 48, +145,173, 56,142,243,250,254,104, 65,211,183,223,156,172, 84, 48,133, 64,242,114,187,121, 17,187,160, 85,148, 39, 62,122,211, 71, + 60, 99,201,207,145,103,190, 10,214,195, 42,137, 0,144,229,136,186, 72, 36, 58,184,120,241, 98,165, 66,161, 64, 98, 98, 34, 20, + 10, 5,228,114, 57,162,163,163,177,106,213, 42,229,235,175,191,126,168, 91,183,110,234,147, 39, 79,218, 28,173,251,249, 59, 52, +181,125, 24,137,153,245,117,210,185,101,111,185,250,180, 8,243, 68,126, 41, 48, 97,222, 47, 69,133, 37,198,225,245, 49, 87,149, + 80, 74,175, 18, 66,122, 79,159, 62,253,232,166, 77,155, 60, 34, 34, 34,144,158,158,142,145, 35, 71, 22,104,181,218,238,255, 1, +230, 10, 0,202, 0, 52, 0,144, 0,123, 95,164,187,132, 16, 41,158, 96,121,182,184,184,184, 43,169,169,169,190,227,199,143, 71, + 73, 73,137,219,136, 17, 35,112,239,222, 61, 36, 36, 36, 92,125,146, 64,141, 70, 99, 44, 33,164,249,219,111,191, 61,122,214,172, + 89, 29,157,156,156, 26, 81, 74,105, 73, 73, 73, 50,199,113,103, 0,108,167,212,241,117, 56, 43, 12,211, 93, 66, 72,114, 82, 82, +146,247,230,205,155, 93, 97,191, 7, 0, 96, 4,160, 3,144,251,184,166,240,127,152,216,127,211,185,143, 15,165,212,161,237,133, + 70,232, 56,182, 49, 57,245, 82, 48, 74, 71, 5, 67, 63,182, 9, 57,243,124, 99,116,173,237, 28, 0, 81,213,149,183,110,221,154, +218,108, 54,122,244,232, 81,218,175, 95,191,178, 78,157, 58,157,137,142,142, 14,113, 36,142,135, 53,187,117,235,118,184, 77,155, + 54,195, 31, 46,123,230,153,103, 70, 84, 45,235,218,181,235,173,174, 93,187,234,186,116,233,114,207,145, 56,187,116,233, 18,223, +177, 99,199,178, 46, 93,186,196, 87, 45,111,219,182,237,224, 30, 61,122, 28,172, 90,246,204, 51,207, 12,122,184,172,166,186,247, +234,213, 43, 61, 33, 33,129,166,165,165,209,254,253,251,103, 85,150,247,236,217, 51,253,218,181,107, 52, 33, 33,129,246,237,219, + 55,171,186,115,107,210,172,186,181,105,211,102, 98,231,206,157,207, 62, 20,243,132,135,203,106,211,236,220,185,243,217,182,109, +219, 78,120,184,172, 77,155, 54, 19, 31,231, 53,170,186,249,250,250,134,182,106,213, 42,111,229,202,149, 52, 56, 56, 56,175,234, +115,205,186,141,251,176,184, 68, 95, 50,115,254, 55, 59, 53, 17, 67,154,215,183,238,245,221,254,107, 53,111, 71, 72,232,159, 17, + 29,233,233,136,131,241, 91, 3,111,143,233,173, 50, 93,222,222,151,210,248,119,233,249, 93,227,105, 76,132,148,251,243,171,128, + 4,122, 58,252, 16,253, 35,180, 11, 61,212, 88,234,144,230,233, 38,157,233,233,240, 67,113,155, 3,111, 15,233,162, 49,111,223, +186,142,222,189,123,151, 30,216,187,157,182,143, 80, 86,104, 70, 28,165,167, 35,186, 59,164, 89,101,107,221,186,117,199,152,152, + 24,253,206,157, 59,105, 98, 98, 34,253,237,183,223,104,135, 14, 29, 12,173, 90,181,234,238,120,221, 65,232,169,200, 33,182,223, +195,206,204, 25,169, 46,158,208, 71,110, 26,217, 93,106, 30, 28, 35,177,244,110, 45,177,117,140, 16,113, 45,130, 25, 62, 34, 0, +180,119,180,194, 68, 79,135,253, 65,207, 68,244,113, 52,206,144,144,144,180,160,160, 32, 90,211, 22, 26, 26,170,237,218,181,171, +232,113, 94,247,118,161, 8,236,213, 86,150,125,252,219,238,116, 96, 23,167,130,246, 81,162, 30, 79,250, 94, 2,208,202,211,211, + 51,127,211,166, 77,212,219,219, 91, 11,160,217,127,196,251,211, 94,230, 14, 96, 48, 0, 77,197,190, 26,246,249,135,130,159, 64, +179, 67,239,222,189,173, 87,174, 92,161,247,238,221,163,135, 15, 31,166, 29, 59,118,180, 1,232,246,184,154,255,138,186, 11,154, +194, 86,185,145,138, 27,245, 47,129, 16, 18, 69,171,233,108, 24, 29, 29, 77,251,244,233, 99, 60,117,234,148,222,108, 54,191,118, +233,210,165, 3, 79,170,249,175,136,243, 95,161,217,163, 71,143,179, 12,195, 4, 87, 12, 1,206, 58,118,236, 88,107, 0,232,222, +189,251, 89,150,101,131, 1,128, 82,154,117,252,248,241,214,255,206, 56,255,149,154,126,126,126,161, 12,195, 28, 1, 96,202,200, +200,120, 48,218,201,171,217,224, 24,119, 55,151,238,197,197,186,171, 57, 55,247, 31,250,119,199,249, 31,173,121,184,137, 20, 78, +210, 54,224, 48,251,230, 61, 67,163, 15, 54,228, 55, 30,208,187,131,120,243,174,211,252,178,169, 94, 73, 29, 34, 85,247, 65,248, + 79,193,153, 46,162,107,138,201, 97, 77, 37,121, 6, 16,207,190,150,100, 8,156,249,117, 81,211, 94, 3, 39,176, 63,239, 94,199, +127, 54,213, 35,169, 67,164, 58, 13,192,167,224, 13,231, 28,214,172, 66,116,116,116, 71,153, 76,118,104,212,168, 81,234, 29, 59, +118, 24,203,203,203, 7, 92,185,114,165,214,236,247, 35,154,231,194, 27,194, 70, 22, 1, 52,160,182,243,236, 48,119, 97,227, 23, +160,123,124, 90,125,226,124, 28, 28,209,108, 31, 70, 2, 85, 78,178, 95, 12, 38,219,116, 71, 50, 87,142,104, 18, 66, 90,185,185, +185,109, 43, 42, 42, 26, 65, 29,200, 92,253,127,214,157, 16,162,129,125, 34, 70, 17,236,211, 22,220,162,117,244, 97,114, 64,179, + 19,203,178,239, 53,110,220,184,197,189,123,247,110,114, 28,247, 25,165,244,228,147,104, 62, 9,130,230,255,251,100,163,255, 85, +252, 91, 12, 86,231,206,157, 47,115, 28,119, 88, 34,145, 44, 58,121,242,228, 35, 31,212,143,163,249, 36, 8,154,130,230,127,165, +102, 21,147,117, 57,161, 44,120,201,247,133,129,239,140,112, 75,171,203, 92,213,169, 89, 97,178, 46,222, 49, 4,125,186,189, 52, +112,198, 8,117, 90, 93,230,170, 86,205, 42, 68, 71, 71,119,148,203,229, 91,140, 70,227,196,186,204, 85,181,154,241,145, 18, 20, + 89, 27,192,198, 70,129, 65,205, 75,237,240,212, 0, 49,123, 19,217,200,197, 11,113,150,250,198, 89, 95, 4, 77, 65, 83,208, 20, +120,152,127,203,172,199,127,252,241, 71,244,191,227,186, 2, 2,255, 40,250, 38,153,113,184,201, 37, 56, 73,151, 70,135, 42,166, +237, 89,164, 48,128, 39, 25, 32,252,170,218,204,149, 3,154, 23,161,180, 46,125, 38, 84, 49,125,239, 34,133, 1, 64, 14, 40, 86, +214,102,174, 28,229,242,229,203,127, 2, 8,126,108,129,240, 56, 11,128,251, 0, 73,193, 39,181,204,142, 61, 15, 20,248, 23,254, +122, 20, 16, 16, 16,168,131,255,184,101, 37, 4, 4, 4,234, 65,223, 36, 51,226, 35, 99, 81,192,206, 4,135, 96,200,108,169, 40, +182,229,160,111,138,249, 9, 53, 47,160,128,188, 5, 30,161,144,218,146, 80,108,126, 50,205,167, 14,165,118, 19, 37, 32, 32, 32, +240,159,137, 96,176, 4, 4,254,219,177,103,117, 50, 42,182,255, 92, 77, 1, 1, 1,129,255, 33, 8,128,168,234,158,168, 79,219, + 42, 33,164, 90,141,218,112,160,243,166,160, 41,104, 10,154,130,166,160, 41,104, 10,154,255, 48,205,186,180,255, 41,125,187,254, + 45,157,220, 5, 77, 65, 83,208, 20, 52, 5, 77, 65, 83,208, 20, 52,255,201, 8, 11,233, 10, 8, 8, 8, 8, 8, 8, 8, 60,101, +254,173,125,176,148,158,161,190, 16, 49, 45, 8, 79,195, 1,128, 50, 36, 30, 54,254,186, 33, 63,193,225,245,169,106,130,120, 55, + 87,170,197,236,118,189,149,123,137,230,222, 48, 60,121,180,246, 57, 88, 0, 4, 2, 72,165,148,158,121, 26,154, 2, 2, 2, 2, + 2, 2, 2,255, 60,106, 52, 88,161, 29,134,254,161, 82,168,154, 2, 0, 79, 41, 56, 30, 40,183,246,204, 32, 0, 0, 32, 0, 73, + 68, 65, 84, 41,202, 59,151,122,253,183,161, 0,224,215,172,231, 94,169,202, 51,134,231, 41,120, 74, 97,227, 41,108, 38,227, 93, +109,220, 65,135, 86,158, 87,123,133, 13,237,213,187,215,176, 1, 3,158, 11,107, 30,213,188, 9, 0,220,184,121, 35,233,151, 95, + 14,222, 81,123,133,237,209,231,221,217,251, 36, 21, 83,139,197, 31,182,125,166, 93,159,216,216, 11,115, 1,188,255, 36, 90, 85, +144,208, 51,253,183,146, 78,191,246,124, 74,122, 2, 2, 2, 2, 2, 2, 2,255, 64,106, 52, 88, 42,133,170,233,137,253, 27,188, +246,254,145, 14, 0,232, 21,237,131, 79, 62,223, 52,132, 16,114, 7, 0,158,127,253,243,208, 15,222, 30,131,179,183,180,160,148, +162, 85, 83,119, 12,121,249,117,135, 46,170,240,137,108, 59,226,197, 23, 95,154, 57,115,198,160,187,119,239,166,236,216,177,227, + 15, 0,232,220,165, 75,211,197,139, 23,191,184,220,205, 93,166,240,137,204, 52,230,196, 61,214,250, 65,106,159, 38,158, 17,205, +218, 76,216,254,221,103,162, 30,253, 71,142, 87,251, 52, 89,169,207, 73,202,127, 28, 45, 89, 64,179, 96, 23,177,228, 19,194, 48, + 34, 23,175, 32, 47, 0,112, 11,104,245,139, 95,179,126,156, 92,174,184, 81,102, 52,110,201,187,125,120, 61,253, 87,118,102, 19, + 16, 16, 16, 16, 16, 16,248,175,162,214, 38, 66,181, 92,132, 59,247,237,173,117,174, 74, 96,210,171,207, 35, 55, 55, 39,212, 98, +227, 49,122,196, 80, 92,185,147,141,132,251, 90, 80, 10,132,250, 59,188,150, 48, 88,240,109,198,141, 31,215,245,200,209,163, 23, + 63,252,224,195,173,132,224, 28, 0,172,251,246,187,152,143,230,125, 52,113,244,171,163,159,221,189,123,247, 45, 60,230, 2,141, +140,196,117,229,167,139, 62, 81,103,230,151,151,191, 57,227, 93,118,230,219,111, 45, 7,240,106,125,117,100, 1,205,130, 35, 2, +252, 23,253,113,116,183, 82,169, 84, 98,253,250,245, 50, 96, 63, 62,158, 57, 78,254,220,128, 1,224,192,118,248,236,171, 29, 45, +142, 74,165,227, 61, 67,159, 29,154,159,240,219, 19, 55,109, 10, 8, 8, 8, 8, 8, 8,252,247, 83,107, 39,119,142,167,136, 79, +206, 65,124,114, 14, 46,196,107, 97,230, 68, 88,190,240, 61, 44,253,120, 22, 10, 12,192,190, 63,211,113,231,126, 14,238,220,207, + 65, 65,177, 30, 15, 79,251,247,240, 8,131,207,223, 82,182, 94, 53,203,229,179,190,109, 84,221,220,221,220,220, 18, 47,110, 45, +251,232,229,220,136, 79, 94, 76,151,136,229,222, 25,110,222, 13, 59,236,218,189, 59,210, 91,227,165,114,118,118,153,229, 30,222, +123,131,107, 80, 55,151,218, 52, 31, 70,237,211,172,235,192,231,250, 63,231,227,227,205,189,182,234, 82,124, 84,120,168, 45, 36, + 52,188,155,218, 39,172,107, 77,231, 84,167, 41, 11,104, 22,220,196,215,123,209,169,195,187,149,229,229,229,184,121,243, 38, 10, + 10, 10,236, 79, 18, 2,134, 97,209,176,129, 47,214, 44,153,161,252,248,189, 41,209, 50,185,114, 63, 33,132,212,166,249,164, 8, +154,130,166,160, 41,104, 10,154,130,230, 63, 85,243,159, 6, 3, 0,132,144,106,155,183,146,210, 11,112, 39, 57, 27,173,195, 27, +160, 73,144, 15, 46, 38, 22, 97,251,137,116,108, 60,154,130, 19,215,181,224,197, 78,200, 41, 37,184,155,154,139,132,148,252, 58, +167, 85,102,165,226, 17,211,151,233,102, 70, 6,151,180, 63,185,115, 26,252,212,137,145,239,125, 94, 60,141,149,138, 71,120,249, +184,238,152,249,214,228,151,157,148, 10,169,217,100, 70,163,160, 0,249,148,137,227,198, 74,212,170, 29,142, 86, 70,163,137, 84, + 73, 21,170,173,139, 62,154, 33, 95,177, 55, 49,173,204, 76,203,118,159,205,186, 55,115,246, 71, 37,172, 88,241,173, 70, 19,169, +114, 68, 71, 22,208, 44, 56,208,195, 99,209,153, 35,187,149, 22,139, 9, 89, 89, 89, 48,155,205,176,217,108, 15,142,161, 0, 74, +141, 54, 36,103, 27,209,181, 75, 71,182,117,171,102,225,154,240,126,175, 57, 26,171,128,128,128,128,128,128,192, 95,212,228, 69, +254, 91,169, 49,131, 85,102, 44,187,251,202,107, 51,243,154, 58,101,155,135,118,143, 0, 40,160,205, 78, 65,220,197, 35, 72,188, +124, 20,165,218, 52, 80, 10, 4, 5, 53,132,196,152,108, 94,183,246,235, 60,222, 86,126,183, 38,189,193,189,253,252,239,102,170, +152,101, 51, 27,158, 75, 76,200,246,156, 58,115, 19, 18, 19,178, 61,151,205,108,120,238,110,166,138, 81, 74,184, 14,175,142, 28, + 76, 6, 15,232,139,247,222,155,137,193, 3,250, 98,230,228, 23,137, 92, 42,110,239,104,101,202,165,242,165,179, 63,156,239,148, + 83,108, 49, 95, 72, 40, 49,169,149, 74,217,159,241,101, 6, 19, 85, 88, 6,141,152,164, 53, 73, 68,243,235,210,144, 5, 52, 11, +246,117,118, 94,116,246,216, 79, 74, 74, 41, 50, 50, 50, 96,177, 88, 96,181, 90, 97,181, 90, 31, 28, 87,172,183, 34, 77,107, 68, +106,158, 1, 55, 83, 74,208,175,111, 95,165, 72, 44,125,217,209, 88, 5, 4, 4, 4, 4, 4, 4,254,185,212,104,176, 18,206,238, +237,124,249,216, 86,239,252,220, 92,157, 74, 38,130,136, 97,144,151,113, 15, 91, 62,127, 11,187,191,156,129,226,236,187,160, 20, + 80, 72, 88,152,244, 5,186,236,171,187,188,243,107, 25, 65, 72, 96,125,246,171,109,247, 27,165,100, 83,151,237,135,245, 98, 0, +216,126, 88, 47, 78,201,166, 46, 95,109,187,223, 72, 74,181,224, 57, 14, 3, 6, 63,143,173,155,215, 35,166,199, 96,236, 62,157, + 6,131,209,226,208,250,103,114,239,208, 32, 47, 31,159,231,167,143,238,233,244, 76,168,155, 58, 36,192,149,101,197, 18,155, 84, + 44,227,127,190,164,203,236, 51, 96, 40,163, 84, 57,247,149,123,135, 6,213,166,227, 34,150,124,242,231,209,159,148, 44,203, 34, + 45, 45, 13, 22,139, 5,102,179, 25, 38,147,233, 65, 6,171,196, 96, 69,102,129, 17,233, 90, 3,210,180, 6,220, 78, 43,129, 84, +229, 6,171,213, 90,239, 25,111, 5, 4, 4, 4, 4, 4, 4,254,121, 56, 52,209,104, 86, 94, 33,220,157, 88,104,252, 26,225,165, +183,150, 3, 0, 56,222, 6, 10,251,244, 12,142,228,244, 40,196,191,189, 49,186, 81,114,144, 47,209,189,220, 79,105, 4,128,151, +251, 41,141, 65,190, 68,247,198,232, 70,201, 6,206,205,194,113, 28,206,220,202,195,178, 31,111,227,195, 77,215,113,228,146,227, +125,198, 69, 98,197,244, 79,151, 44, 86,138, 88, 66,110,165,150,234,179, 11,109,122,137, 68,108, 17, 75, 69, 86,189,153, 24, 83, +180, 92, 65,223,225, 83,239,179,172,120,106,157,177, 82, 30,148, 82,152, 76, 38,152,205,230, 7, 91,101, 6,171, 80,111, 65, 86, + 65, 57,210,180, 70,164, 87,108,185, 69, 70, 8, 3, 9, 5, 4, 4, 4, 4, 4, 4,128, 42, 6,139, 16, 66,171,107,255,228, 1, + 36,166,104, 33, 19,241,240,111,216,228,175,142,236, 20,160, 20,176,218,120,135, 46,180,255,104, 86, 70,112,131, 50, 58,107,121, + 90, 76, 84,184,199,245, 41,163, 2,226,163,194, 61,174,207, 90,158, 22, 19,220,160,140, 90,121, 41, 71, 41, 5,229, 41, 40,165, +160, 20,224,121,199, 13, 11, 33,108,251, 86,225,129,162, 79,118,220, 77,157,250,117, 66, 60, 17,137,172, 82,169,212,230,237,162, + 32,254,158, 10, 81,169, 9,229, 97, 81,173,173, 4,104, 93,155,142,206,106,153,215,177,207,112,131,197, 98, 67, 64, 64, 0,204, +102,243,131, 38,194,202, 12, 86,177,222,130,204,194,114,164,107,141, 72,211, 26, 97, 44,231,112, 35, 62, 5,132, 97,133, 78,127, + 2, 2, 2, 2, 2, 2,143, 73, 77, 94,228,191, 17, 6, 0, 40,165,164,114,171,238,160,192, 0,111, 92,184,153,138,134,222, 50, + 56,187, 56, 33, 62, 41, 3, 12, 43, 2,203, 16,216, 56,199,239, 3, 53, 91,127, 92, 49,203,101,121, 90, 54,119,254,235,109,247, +238,166,101,115,231, 87,204,114, 89, 78,205,214, 31,237,113,216, 39, 53,229,171,252,117, 88,155,242, 94,158, 46, 50, 81,108,146, +190,144,176, 34,147, 68, 44, 50,249,122,200,136,175,167, 66, 20,224,161,144,170,228, 98,198,215,219,155, 7,165,222,181,233,152, +210,111, 37,231,148,148,204,237,220,251,121,131, 88, 44, 70,112,112,240,131, 12, 86,165,193,178,103,176,140, 72,211, 26,144, 83, + 88, 14,133,140,193,181,115,199, 13, 28,103,221,226,120,196, 2, 2, 2, 2, 2, 2, 2,149,212,229, 69,254,219,168,123,169, 28, + 74,161, 82, 42,192, 51,114,156,185,148,132,240,136, 22,216,116,224, 34,154, 68,181, 67,118,169, 13,180, 30,203, 25,206, 88,109, +184, 2,224,202,224,222,126,254, 67,251, 53,120,150, 66,252,219, 87, 59,116, 25, 0,176, 33,102,104,133,177,178,103,174,120,106, +159, 38,194, 81, 8,144,149,150, 87,166,110,228,163,194,237,116,179,201, 73, 41,183,185, 42, 37, 34,141,139,148,117, 86,136, 68, + 34, 9,195, 20, 23,107, 75, 1,146, 85,151,150, 41,253, 86,178, 44,160,217,220, 46,253, 70, 46,250,227,240, 78,101,227,198,141, +113,237,218,181, 7, 77,132,134,114, 27, 72,169, 5, 98, 5, 69, 72, 3, 53,226,175,252,193, 21,228,101,198, 21, 37, 28, 94,239, +112,192, 2, 2, 2, 2, 2, 2, 2,255, 88, 28,114, 71, 60, 79,161,241,116,131, 76,237,130,100,173, 25,122,104,160, 51, 18,240, + 28,192,217,106, 54, 65,132,144,106, 59,125,239, 63,154,149,177,239,168,118,195,254,163, 89, 25, 85,203,237, 77,131,246,230, 65, + 74,105,181, 77,132, 53,105, 82,202, 29,250,229,183, 51,133, 67,218,123,185, 50, 98,177, 81, 42, 99, 45, 10,185,216,170,148,137, +224,229, 34,145,250,187, 73,100, 39, 15,254,192, 16,158,158,112, 68,211,148,126, 43,249,126, 94,222,220, 30, 3, 70, 25,188,125, +124, 48,122,244,104, 52,108,216, 16, 0,224,174, 98, 16,232,198, 64,100,202,193,169, 3, 27,202,226, 47,255,126, 25,156,105,104, +213,217,220,107,138,243, 73, 16, 52, 5, 77, 65, 83,208, 20, 52, 5,205,127,170,230, 63, 13,135, 22,123,110,236,171, 66,211, 6, + 42,148,155,189, 97, 52,115, 40, 51,217, 80,106,176, 66,103,176, 34, 37,199,128,132,147, 79, 30, 8,133,221, 84,129, 18,240,148, + 2,196,222, 76,232,104,162,176, 76, 92,178,252,211,197,159,140,220,185,107, 47,125,179,191,175,255,133,187,198,116, 25, 43, 54, + 43,101,140,200, 89,193,112,247,147,239,103, 29,253,229,135,102, 6,185, 97,140,163, 49, 85,102,178,194, 90,247,248, 4, 20, 34, +179, 81,167,154,221, 49, 18, 71, 14, 31, 52, 74,207, 92,182, 18,145,244, 38,207, 89,182, 21, 37, 8, 75,229, 8, 8, 8, 8, 8, + 8, 8,252, 69,157, 6,203, 96, 52,220,125,118,216,132,138, 5,159, 41, 56,206,158, 89,226, 42,155,242,120, 10,206, 98,172,113, +254, 43, 71,225,120,254,226, 55,155,126,236,223,178, 85, 59, 54, 50,208, 9, 37,197,249,184,116,225,156,141,242,252, 57, 71,206, +167, 41, 41, 38,181,119,248,139,195,159, 31,242,195,248,201,111,234, 59,119,237,174,244,240,112,182,229,231, 21,148,108, 89,191, +179,104,239,206,239,155, 17,158,127,133,166,164,152,234, 19,151, 41,253, 86, 50,128,151, 1,128, 16,210, 3,136,236, 90,150,117, +125,160,158, 62,154, 9, 19, 16, 16, 16, 16, 16, 16, 16, 0, 28, 48, 88,137,231,246,214, 56,183,213,211,164,176, 48,119,244,182, + 31,246, 44,252,126,231,129,142, 38,139,165, 1, 15, 54,157,179, 90, 79,201, 74, 11, 62,114, 84, 67,159, 27, 31, 71,130,130,218, +124,247,229,242,183,191,253,106, 69, 79,240, 92, 19, 16,114,159,240,244,132, 94,110, 24, 79, 51,235,103,174,170, 33,159,116,250, +181, 55,128,199, 90, 56, 90, 64, 64, 64, 64, 64, 64,224,127, 3,135,154, 8,255, 63, 40, 76,186, 80, 10,224,205, 39,213,169,200, + 80, 45,169,216,158, 42, 21,107, 47, 9, 83, 49, 8, 8, 8, 8, 8, 8, 8,212,138,227, 67, 0, 5, 4, 4, 4, 4, 4, 4, 4, + 4, 28,130, 0,168, 97, 84,158,227, 43,101, 63,206,104,130,186,244, 5, 77, 65, 83,208, 20, 52, 5, 77, 65, 83,208,252,231,105, +214,165, 93, 31,255,241,159, 12,249, 87, 14,126, 35,132, 68, 61,237, 27, 37,104, 10,154,130,166,160, 41,104, 10,154,130,230, 63, + 79,243,159,134,208, 68, 40, 32, 32, 32, 32,240, 63,135,103,232, 32,181,103,232, 32,181,163,199,107, 34,135,123,107, 34,135,215, +186, 18,136,128, 64, 85,254, 99, 58,185,255, 55, 67, 8,145, 1,224, 41,165,150,127, 87, 12,110,110,193,206, 54, 39,207,189, 12, +111,250, 84,151,126,253,183,167,169, 77, 8,145, 69, 70, 70,182, 2,128,184,184,184,171,148,210, 39, 29,141, 9,149,119,216, 40, + 55,103,215,215, 44,188,153, 51,148, 25,190,209,231, 36,236,126,242, 72,255, 66,163,137, 84,153,101,138,101, 32,180, 31, 40, 24, +202,144,227,108,137,245,157,226,226,107,186,218,206,107, 56,120, 73,248,248, 23,158,251, 96,195,238,131, 11,211,246,207,137,127, +248,121,247,126,107,156,222, 28,221,115,214,151, 63,254,242,105,254,129, 89,250,167, 25,243,255, 10, 13, 59,189,228,106, 19,249, +176, 89, 39,151, 23,212,231, 60,255,176,152, 91, 98,177, 88, 99,177, 88,242, 50, 19,206, 59,212,108, 17, 16,222,225, 10,203, 50, +126,156,141,207, 72,191,115,182,205,227, 69,252,191,133,210, 47,188, 21,225,184,247, 40,207,137,121,176, 43,203,181,137,103,158, + 68,207,207,207, 79,225,226,226,210,197,217,217, 57, 64,169, 84,202,139,138,138,140, 69, 69, 69,105,169,169,169, 39, 40,165,182, +167, 21,119,125,208, 52, 27, 50, 71, 36,101,230, 85, 60,254, 68,123,107, 95,173,131,162, 52,205, 6, 47, 36, 12,153, 83,241,120, +137,246,214,254, 15,254, 63,226,172, 11,239,230,195,218,129,242,111, 51, 12,219,129,163,182,197,121, 55,246,127, 93,159,243, 99, + 98, 98,134, 88,173, 86, 89,229,190, 88, 44, 54,157, 59,119,110,223,211,143,244,127,147,122, 27, 44,255,200,225,110, 86, 17,253, + 88,196, 50,207,243,148, 58,101, 95,221,165,250, 87, 4,246,180, 8,108,247,202, 37,134, 97,252,171,150,241, 60,159,145,122, 97, +235, 83,249,176, 37,132,248,127, 62, 61,250,189,220, 2, 99, 9, 33,100, 65, 77,230,195,187,213,168,179,132, 33,193,132, 16, 48, + 4, 96, 25, 2, 0, 89,105, 23,182, 61,178,248, 52, 33,196,215, 89, 37, 10, 45, 41,179,221,164,148,214,249, 37,164,240, 8,241, + 83,121, 52, 56,213,109,232,180, 70,151,142,108,138, 80,123,135,247,212,231,198,199, 61,133,186,105,154, 52,105,210, 54, 52, 52, +212, 99,218,180,105, 18, 0, 88,185,114,101,211,166, 77,155, 22, 36, 37, 37,197, 82, 74,181,143,163,171,242, 10, 31,189,122,249, +252,173,253,250,245, 67,150,182, 12,203, 86,126,221, 77,237, 19, 58,252,105,153, 44,226, 23,173,112, 85, 41,111,190,254,246, 71, +254,253,187,183, 21, 21,235,173,248,245,196,249,209,187, 55, 46,235,225,234,218,178,121,109, 38,139, 55, 20,127,224,237, 68,251, +242,134, 98, 0, 24,245,240,243, 13,212,214, 94,238, 74,244,243,149,137,174, 1,216, 83, 87, 44,126,109, 95, 61, 34,150, 72, 2, + 9, 97,236,175, 59, 75,192, 84,188, 7,108, 86,115,234,221, 63, 54,246,121,162,202, 62, 37,188,163, 71,231, 16, 16, 15,166, 34, + 62, 66, 0,134, 97, 32, 34, 0, 40, 45,185,119,118,147,199,147, 94,131, 16,226, 18,213,212,181,217,115, 29, 59,109, 56,149, 92, +168,110,216,245,237,131,132, 50, 95,167,158,254,252,154, 35,231,203,229,114,183,159,127,254, 89,211,183,111, 95, 23,239,168, 33, +167, 28, 57, 71, 45,149, 71,254,242,203, 1, 73,223,190,142,223,102,149, 87,216,179, 96,152,109, 4, 16,243, 60, 93,201,242,116, +167,190, 32, 33,169,190,147, 9,123, 69, 13,153, 15,130, 8,135, 79,160,184,157,119,115,159,195,211,210, 84,133, 16,194, 42,188, +194,198, 40,228,242,153, 77, 67,195, 67, 83,238,223, 75, 40, 41,209,173, 48,230, 37,108,160,148,242,245,210,178,113,211,143,158, + 56,251,130, 72, 44, 38,125,186,183, 85, 17, 66,250,212, 87,163, 42,222,222,222, 67,214,172, 89,211, 56, 38, 38, 6, 0, 96,179, +217,156,119,237,218,229,179, 96,193, 2, 21, 28,248, 31,170,142, 6, 13, 26, 52,112,113,113,105,168, 80, 40, 26, 0,128,209,104, +204,212,233,116,105,153,153,153,153,117,157,235,211,106,184, 39,195, 96,254,225, 61,223,138, 0,160,207,176,215, 22, 54,234,246, +174, 27, 97,197,198,234,142,231,108,102, 21, 67,200,219,199,127,222, 68, 0,160,231,160,177,179, 53,145,195,191,212,198,237,202, +125,156,216,159, 20, 50,124, 56,235,153,104, 25, 66, 40,121, 39,186, 77,219,246,195, 6,247, 67,100, 19, 63, 12, 25, 57,101, 38, +128,122, 25, 44,171,213, 42,219,189,123,183, 63,195, 48,172,197, 98, 41, 31, 57,114,100,222,147,196, 22,210,233,213,179, 32, 36, +192, 98,179,125,151,122,190,201, 66, 74,231,253,237,125, 67,134, 15,103,125,239,139,230,130, 48, 19, 41,207,167,103, 95,217,209, +225, 73,174,247,159, 78,189, 12,150,103,232, 32, 53, 43,147,220,236,214,185,189,199,156, 41, 67,165,107,119,254, 1,191, 86, 47, +102,102, 93,221,217,224, 95, 21,224,147,194, 48,140,255,254,237,107,188, 20, 50, 22, 0,160, 55,114, 24, 54,122, 90,157,231, 53, +104,251,242, 73, 16,132, 85,182,161,114,156, 77, 46, 18,137,203, 9, 0, 16,251,232, 0,133, 66,122,126,195,220, 24,221,216,129, +193,175,188,247,229,149,205, 0, 92, 1,228, 84,167, 71, 24,198,255,135,141, 43,189, 26,120,200, 33, 98, 9,244, 70, 27,134,190, +242, 14,247,200,113,132,248,111,152, 27, 51,127,116,191,160, 17, 94,125,127, 26, 6,224, 80,109,113,170,125, 34,195,157, 60,253, +126, 27, 54,105,190,159, 17,206,248, 96,225, 10,175,179, 71,119,255,209,107,200, 4, 75, 90, 70,134,193,102,177,222, 41, 40,204, +158, 81,154,149,144, 88,103,165,237,215,103,213,106,117, 99,181, 90,221,178, 95,191,126,242,153, 51,103,138,187,117,235,246,224, +249, 73,147, 38, 73, 78,158, 60,233,187,124,249,242,254,126,126,126,229,122,189,254,154, 94,175,191, 71, 41,125,164, 46, 53,225, +227,163,121,227,249, 33, 3,209,227,249,215,193,241, 4, 19,167, 78,199,145, 67,123, 38, 3,120, 42, 6, 75,205, 50,159, 76,156, +246,190,127,215,152,104,209,210, 93,119,225,162,148,160, 79,187, 54, 34, 25, 59,203,247,135,141,203, 87, 0, 24,247,240, 57, 13, + 7, 47, 9,231, 13,197, 31, 68,121, 90, 70, 14,234, 16,140, 3, 63, 88, 70,250,247,154, 5, 70,233,250, 32,147,213,164,223,155, + 78,110, 10,249,154, 6,174,172,151,140,203, 91,211,164,223,155,199,146, 14,125, 81, 90, 91, 44, 98,137, 36,112,195,151,139, 66, +220,213, 18,176, 44,129,136, 97,192,178, 4, 38, 51,135,209, 83,230, 60,141,234, 86,124,185,134,244,103,128,177, 0,192, 3,155, +140,121,137,191,214,231, 53, 33, 12,235,177,107,227,114,145,151,139, 20, 44, 75,192, 50,246,237,126,142, 17,111,190,251,177,203, + 19,198,167,233,215,209,171,237,201, 47,187,246,105, 31,229,222,226,199,115,196,181,125,191, 17, 30,249,229,138, 49, 63,236, 63, + 57,178, 97,151,119, 46, 80,202,127,150,254,199,170,163,181,233,152, 76,166,220, 62,125,251, 57, 19,145, 74,121,108,239,230, 46, +149,139,205, 91, 57,254,175,197,225, 41, 80,249, 35,134,167,192,164, 9,227,209,167,111, 63, 3,111,227, 51,106,211,254, 27, 12, +179,237,240,177, 51,154,114, 43,197,231,107,214,207, 47,211,229,207, 79,142,247, 72, 81,122,135,190,109,200, 77, 56,224,120,197, + 17,145,112,118,215,208,237,191,156, 67, 84,100, 4, 56,222,190,190,106,168,191, 10, 59, 14,158, 71,120, 88,184,125,242,102,158, + 34, 44, 64,141,174,207,189,226,176,244,223, 46, 67,186,137, 84,222,225, 59,134,140, 24,251,194,208,231, 71,194,213, 89, 13,179, +197, 20,122,226,232,161,111,191, 89,179,172, 35, 33,100, 76,125,204, 33,207,115,210,191, 30, 91,229, 0,196, 0,204,143, 21, 28, + 0, 63, 63, 63, 77,219,182,109, 31,236,219,108, 54, 52,106,212, 8,153,153,153, 97,245,213,242,246,246, 86,250,249,249, 61,183, +108,217, 50,175,238,221,187,139, 53, 26, 13, 0, 64,171,213, 54,248,253,247,223, 91,183,110,221, 58, 47, 43, 43,235, 96,110,110, +174,161, 38, 13, 43, 95, 46, 97,169,136,149,201, 20, 0, 0, 10, 48, 51,167,189,212, 66,163,209, 84,251,227,184,160,160, 80, 58, +111,222, 71, 68, 36, 18,219,143,167,148,161, 60, 87,227, 26, 35, 29, 58,116, 24,100,177, 88,228,213, 61,151,111,211,244, 47,231, +165, 35, 96,255, 10,129,136,101,139,178,174,238,214, 56, 86,123,192,171,197,224,222,190,140,248,155,129,131, 7, 7, 13,233,223, + 13,190, 26, 23,156, 56,127, 7,111,205,253, 28, 86, 27,183,202, 81,157,170,176, 44, 43,202,203,203, 75,113,115,115,243,121,156, +243,171,194, 48, 76,240,254,237, 95,120,253,254,199,165,217, 95,202,126,152,210,184,211, 88,107,229,242,119, 28, 79, 17, 38,119, + 22,119, 25,252,172,147, 71,131, 80,197,250, 47,151,138,159,244,122,255,233,212,203, 96,177, 82,118, 65,167, 14,109, 61,230, 76, + 31, 47, 93,176,254, 20,206, 29, 61,104,204,186,186,235,169,152, 43, 39,175,176, 24,194,138, 94, 35, 44,171, 34, 12,145,242, 28, +159,110, 51,155, 23, 26,242, 19,178,159, 84,155,227,129,159,254,172,167, 49,167,180,233,183, 95,125,238,229,237, 42,131,209,108, +195,184, 55, 62,196,186, 85,243,157, 52, 46, 82,152, 44, 28, 54,237,143,205,111, 81,182,130,142,237, 31,252,202,162, 13,183,246, +124,182, 45,126, 15,236, 43,254, 84, 11, 67, 24,120,185,200,176,112,199, 29, 56, 43,197,112, 87, 75,193, 60,212, 3,174,210, 92, +141, 29,104,215, 44, 46, 53,219, 8, 33, 82, 74,105,181, 31,110,106,223,168,206, 78, 26,255,221, 67, 39,204,215, 36,106, 9, 40, + 53,227,158,139, 12,195, 70, 79,113,109,226,163,128, 74,206, 34, 37, 61,187,209,187,179,102,181,145,251,134,183, 45,207,142, 79, +171,171,218, 65, 65, 65,195, 6, 12, 24,160,156, 49, 99,134, 56, 32, 32, 0,219,118, 29, 9,124,246,133, 55, 7,102,230, 20, 4, +240, 20,240,246,114, 79, 31, 63,162,255,207,191,254,250,107,106,122,122,186,120,217,178,101,237,246,238,221, 27,137,122,252, 18, +229, 40,133,209,204,129,227,120,112, 60,129,182,184,254, 45,142,132, 16,166,230, 95,213,116,112,239,110,207,136, 86,238,187,135, + 82,131, 21, 10, 9,139,187,217,101,136,137,105, 43,218,185,137,116,175,238,140,241, 47, 60,247,129,183, 19,237, 59,168, 67, 48, +188,220,148,216,248,229, 34, 28, 56,155,220, 55,183,148,192,115,208,178,215,124,101,162,103, 53, 74,201,154,110,109,154,250,244, +140, 14,196,165, 54, 77,125, 78, 95,142, 79,104,254,226,138,105,153,122,241,177,194, 67,211,170, 53, 90, 12, 97,224,174,150, 96, +253,145, 20,168,100, 98,168,228, 34,251, 38, 19,129, 97,158,108,193,120,133, 95,100, 0,203,115,227,157,253, 34,199,143,124,113, +184,223,168,145, 47, 80,194,176,216,181,231,231,193,223,127,191, 45, 91,237, 19,182,158, 99,216, 13,198,172,184,244,186,180, 8, + 1,188, 92,164,120,247,187,155,112, 82,138,225,172, 20,195, 73, 33, 70,207,150,154,199,142,147, 16,226, 54,121,112,227,254,215, +183,246,234, 30,214, 80, 29,114, 45, 73, 23, 55,126,225,165, 85, 39,139,187, 79, 95,179, 50,210, 67, 90,100, 18,125, 56,115,130, + 40, 51, 43,187,251,174,159, 79,245,240,123,102,252, 29,155,165,236,253,188,107, 59,247, 87,167,151, 30,127,182,181,127,204,112, +185, 69,111,189,113, 45, 33,163, 73, 97,185, 20,113,169, 37, 21,247, 84, 12,117,229,189,173,184,191,217, 25, 41, 40, 52,176,103, + 50, 61,152,238,244,228,217,122, 53, 69, 25, 45, 60,174, 37,235, 17, 20,218, 26, 62,190,126, 48,247,127, 41,232,226,137,159,246, +171,124, 35,150,148,101,223,126,223, 81,157,237,191,156,195,130, 37,171, 18, 65,112, 27, 0, 64, 17, 49,227,157,105, 33,159,175, + 88,243,183,178, 41,175, 79, 13,169, 79,124,149, 16, 66, 88,165,119,216,247,189, 6,141,121,161, 69,187,103,145,152,116, 15,137, +183, 46,161,103,175, 62,232, 55, 96, 40,204,166,242, 87, 54,124,187, 38, 22,192, 87, 15,159,235,228, 27,209,169,121, 84,196,247, +126,190,126, 1,148, 86, 44, 77, 70, 41,186,119,239,142, 89,111, 79,132, 65, 95,138,176,176,168,142,174,157,123,155,250,142,120, + 3, 60, 79, 81, 80,144, 95,118, 39, 62,174,151, 49, 55,254,130,163, 49, 26, 12, 6,171, 86,171,197,213,171, 87,145,144,144,128, + 91,183,110,161,160,160, 0, 46, 46, 46,245,106, 98,119,115,115,115,110,211,166,205, 75, 59,119,238,148,187,184,252,229,249,205, +102, 51,148, 74, 37,134, 12, 25, 34,238,212,169, 83,131,177, 99,199,190,234,230,230,182,189,168,168,168,164, 58,157,130,235,191, +100,249, 52, 31,178,182,255, 11,147,166, 0,128, 68,166, 78, 94,253,221,158, 91,181, 93, 91, 34,119, 14,236, 53,100, 92, 19, 80, + 10, 66,200,234,252,248, 61,213,254,144, 6, 0,139,197,162,248,241,199, 31, 27, 16, 66,254,246,253, 58,255,139, 31, 59,220, 72, +204,238,245,205,199,239,137,156, 84, 50,228,235,204,120,109,202, 52, 79, 71,235,239,213,124,240,212,182,173, 91,127,245,225,204, +137, 80, 41, 21, 56,122,254, 30,222,158,179,196, 86,152,159,183, 21,132,172,212,222,218,251,164,173, 22, 79,101,196, 91, 72, 3, + 53,156,250,196,200, 39,190,216, 77,110,182,114, 40,210, 91, 97,178,112,224, 41,133,174,204,138,184,212, 82,120,186, 72,176,254, +105, 92,236, 63,156,122, 25, 44,145, 88, 58,224,205, 49,253,165,203,183, 95,192,185,163,219,141, 89, 87,118, 41, 43,159, 11,104, + 51, 50, 57,253,210, 15,193, 85,143,119,100,132,129,194, 47, 50, 64, 68,216, 21, 29, 58,119,232, 61,233,181, 41,180, 69, 88,160, + 4, 96,112, 59,241,190,117,227,134,245, 99, 92, 2,154,175, 42,201,184,249, 65,229,151,105,125, 71, 45,240, 60,159,241,112,198, +138,231,249,135, 23,153,126, 68,147, 16,192, 85, 37,198,218,131,201,246, 95,198,160,112, 81,138,177,227,247, 12,148, 20,102,230, +183, 48,174,248,115,124,127,175, 65, 11, 55,196,237,255,250,231,220,203, 0,110, 81, 74,115,107,210, 36, 12, 32, 98, 9, 92, 84, + 18,184, 40,197,112, 81,139,193, 16, 82,229,122,127, 55, 87, 31,126,123,125, 51,128, 59, 85,205, 85, 85, 77,149,119, 88, 51,103, + 77,208,190,231, 39, 47,118,187,145,102, 1,195, 0,193, 62, 42,184,169,165, 48, 91,129, 20,173,165,162,174,206,152, 58,227, 99, +205,236,119, 38,255, 74, 72,183, 22,148,158,252,219, 23,205,195,113, 26, 12, 6,233,232,209,163,197, 86,171,213, 50,246,173,133, +189,179,115,243, 7,175, 90,252,174,204,211,211, 3,101,229, 54, 92,189,157, 18,177,228,179, 47,131, 15,157,188,184,119,246,228, +193, 7,250,246,237,235,242,227,143, 63,242,181,105, 62,140, 54, 55,255,203, 77,219,118,111, 93,185,124, 9,226, 83, 10,177,241, +219,175, 65, 57,219,218,218,206,121, 88,115,221,186,117, 94, 49, 49, 49,204,249,243,231, 11, 30, 54,160,132, 64, 85,168, 51,193, + 85, 37,129, 82, 38,130,143,171, 12, 30, 78, 18,200, 36, 12, 24,230,175, 15,145,170,154, 27,118, 31, 92,200, 27,138,113,224, 7, +203,200,141, 95, 46,194,184, 55,230,226,102,190,228, 48,163,116, 93,248,198,136,193,239,185, 43,209,175,129, 43,227,213, 51, 58, + 8, 42,185, 4,115,222, 28,141,182,151, 83,188, 50,138,249,185,133, 6,180, 4,240, 65,117,113, 50, 44,129,136,101,224,164, 16, +227,228,193, 29,121,134, 82,157,142,176,246, 12,139,213,108, 73,173,173,206, 53,213, 29, 0, 84,222, 97,179,163, 91,181, 88, 52, +101,210,120,166, 99,204, 51,148, 97, 68,200, 47,177, 16, 10,138,233,111, 76,198,212,201, 19,125, 50, 50,115, 63,250,234,235,117, + 31,168,189, 34, 22,232,243,110,127, 92,155, 38, 75, 24, 48, 12,129, 74, 33,134, 90,254,215, 86,110,230, 65, 8, 88,255,232,145, + 58, 16,128, 16,146,149, 30,187,163,218,102,175,135, 53,253,154,247, 59,126, 42, 79, 18,110,248,181,252,220,221,196, 43, 11, 47, + 94, 79,187, 72, 41, 45,108,216,245,157, 87,173, 86, 10,125,185, 13,247,115, 13,176,153, 41, 25,215, 55, 16,141, 94, 32, 97,139, + 55, 94,217, 74, 8,113,174,204,184, 60,172,153,113,110, 87,185,103,243, 97, 35, 86,126,177, 46,118,249,162,185,108, 65,137, 25, + 28, 5, 20, 82, 22,242,138, 77, 33, 97, 81, 94,166,195, 87,107,191,203,177,129, 12,163, 39,107,127,207, 63, 2, 79, 95, 30,214, +191,203, 15, 4,144, 18, 70,146,225, 23, 24, 20,216, 99,192, 24,121,207,129,175,128,179, 89,102,171,188,195,127, 47,203,141, 63, +238,136,102, 84,100, 4, 64,112, 59,239,198,190, 97, 0,224,213,124,200,158,240,176,240,144,135,203,154, 54, 13,125,196, 96,213, +164, 73, 8, 97, 20,154,144, 73, 77,195,155,207,154,242,225,186,160,172, 2, 19,220, 26, 52,197,213, 43,151,113,100,215, 87, 87, +140,165, 69,203,143,252,178,119,214,130,165,171, 90, 14, 24,242, 34,246,239,219, 57,131, 16,242, 53,181,243, 64,147,242,252,203, +155,215,175, 11, 16, 75,100,176,114, 20, 86, 27, 15, 43,199,195,106,163,200,206,206, 66,169, 94, 15,185,194, 9, 42,103,119, 88, +109,246, 76,161,201,100, 85, 77,126,101,192, 84, 0, 23,170,139,179, 81,187,209,151,192, 16,127,123,185,189, 76,194,184, 25,124, +125,125,183, 2,128, 76, 38,131, 76, 38,131,205,102,195,141, 44, 76,247,107,251,242, 28,208,138,111,118,158,207,200,190,178,163, + 77, 77,117, 15, 8, 8, 24, 88,157,185,210,235,245,248, 51,246,186,203,166, 31,143,246, 77, 73,207,105,204,115, 94, 38,133, 79, +203, 62, 0, 6,214,116, 63,115,110,236,155,218,176,219,116,102,198,148,209, 77, 87,127,183,251, 98,226,225, 5,181,166,147,131, +123,205, 54,207,154, 58,170,205,167,171, 55, 38,102,156, 90,245,118, 93,175,145, 68, 34, 17,107,181,218,212,202,253,249,107,126, +234,151,150, 91,210,235,179, 69,115, 37, 87,239,233,113,253,126, 54,198, 60, 27, 88,237,181,170,211,244,109, 54, 52, 44, 48, 40, + 96,213,170, 5,111, 33, 33,203,136, 53, 63, 93,196,169,131, 91, 47, 91,202, 75,159,203,187,117,160,206,236,129,131,223,155,245, + 50, 88,213,105, 86,126, 17,252,126, 61, 31,165, 70,187,177,178,114, 60, 74,141, 54,228, 21,155,160, 43,179, 66, 95,110,197,152, + 94,129,245,185, 84, 37,109, 1,104, 0,104, 1,196, 62,180,143,138,199,168,102, 63, 31,246,140,161, 7,236,153,216, 7, 25,218, + 42,251, 53,149, 87,158, 31, 7, 32,162, 66,147, 3,112, 17, 64, 81, 93, 1,139, 8, 33,148,210,191,150, 84,126,120,191, 42,156, +205,234,239,231,235, 11,158,102, 84,196,107, 39,168,221, 72,195,219,147,134, 43,252, 90,189, 80,150,117,117,183,195,125,178,156, +188, 66, 59, 40, 20,202,131, 75,150, 46,163, 35, 6,118,149,230,232,172,198,184,204,114,173,222, 68,109, 62,154, 38,178,165,159, +126,170, 94,188,116,249,235,123,247,240,197, 0, 62,171, 78,195,175,237,168, 75,132, 48,254, 15,146, 65, 4,160, 60,205,200,136, +221,222, 6, 0,158,164,175, 85, 89,185, 13, 44, 75, 32,174,232,147, 98, 48,115, 48, 20,231, 20,180, 48,172,250,115,124, 95,187, +185,186,144,233,115,143,101,181, 22, 74,105,173, 77, 16, 12, 33, 40, 49, 88,225,172, 16,195, 69, 37,129,171, 82,242, 32,131, 85, +131,185,186, 85,155,166,196, 98, 73,231,172,166,114,202,113,232,223, 86, 3, 47, 23, 41,124,221,100,144, 75, 69,176,114,128,209, +204,195,104,230,144,154,103, 64,169, 65,134,230, 93, 71, 54,245,244,189, 96,240, 12,106,187, 57, 63, 37,246,181,218, 98,229, 56, + 14,223,239, 62,210, 52, 51, 59,111,240,254,109, 43,100,121, 58, 43,174,167,232,145, 87,100, 6, 37, 46,152,243,193, 7,178, 15, + 63,156, 55,116,231,190,227,247, 59,180, 9,117,188,233,165,242,190,230,197,111,107,209,241,185, 47,159, 27, 56,196, 41,238,226, + 33, 36, 94, 61,254,161, 62,183,126,253,175, 2, 3, 3,185,175,190,250,202,117,237,218,181, 77,189,188,188,210,243,242,242,146, + 1,123,115, 84,163,200,152,172,223, 78,156,246,232,218,177,139, 40, 61,191, 28,158, 78, 18, 4,122, 43,113,249,236,239,102,134, +144,195,213,233, 85, 52, 3,142,242,239, 53, 11, 7,206, 38,247,189, 85, 32, 59, 57, 97,226,184,148,223, 14, 94, 44,248, 98,219, +241,101, 13,212,214,107,114, 62,111,205,229, 54, 77,125,102, 79, 27,141, 37, 95,108,195,169,203,241,121,101,140,223,162,108,147, +237,183,121, 35,171,111,237, 96, 25, 64, 44, 34,112, 82,136, 97, 40,211,233,110, 30,251, 58,180,190,247,171, 6, 94, 61,178,111, + 27, 83, 88,106, 69, 70,190,145,100, 21,148,194,198,243,112, 85, 73, 97,227,129,226,194,124,242,253,247,219, 16, 27,123,142, 1, +203, 76, 0,240,113,109, 98,164,162, 95,160, 90, 46,130, 90, 97,207, 2,169, 21, 34, 88,108, 60, 66,130, 3,176,106,254,155,206, + 26, 47,111,244, 30, 86,235, 91,231,111, 40, 84,110, 45,183,124,179, 0, 39,207, 93,235,246,251,221, 29,109,189,162, 90,126,225, + 31, 57,124, 57,227,238,103, 52, 89, 57,148,232,138, 80,110, 74,199, 51, 13,242,225,174,226,144, 82,226,139,155, 57,137,234,186, +154,179,242,111,236,185,170,137, 26,250,193,174,159, 79, 44,233,243,108, 55,220,186, 95, 98, 55, 87, 18,187,185, 18, 17, 30, 43, +214,174,179, 22,233, 74, 7,228,223,220, 87,239,101,173,202,242,226,143,193,254, 97, 12, 0, 80,123, 55,214,124,191,230,131, 45, + 19,103, 45,235,211,103,232,171,228,102,236,239,239, 3, 56, 94,179,194, 95,112,213,228, 88, 57,254,209,234, 85, 87, 86, 29,132, + 16,198,171, 73,155,237,155, 54,239, 24, 17, 25, 18,128,220, 98, 43,178,138, 44,248,227,242, 93,236, 93,247,126,113,113,238,189, +151, 97,209,235,121, 98,211, 29, 61,242,243,225,215,223,156,133,102,205, 90, 6,149,100,148, 56, 3,248, 91,223, 67,158, 37,235, + 94, 25, 63,121,132,183,151,183, 19, 95,145,193,226, 41, 69, 88, 88, 36,250, 15, 28,134,147,167,207, 34,238,214,117,123, 57, 15, + 80, 74, 81, 92, 84,144, 99,179,154, 55,215, 24, 31, 75,252, 55,173, 93,225,197, 16,192, 98,227, 97,182,242,152, 61,231, 67,243, + 91, 31,173,233,212,167, 99,139, 91, 44,248,146,180,236, 98,215,216, 59,217,205,137,216,217,247,165, 73,239, 73,140, 22, 14, 37, + 6, 43,142,239, 90, 93, 99,189,253, 26,183,140,105, 20,209,105,252,164,185,107,101, 50,150,177, 52, 11, 13, 72,238,218,190, 89, +122, 67, 63,207,210,197,171,191,127,230,236,229, 59,253,135, 61, 63, 84, 62,162,113, 36,241,243,144, 59, 77,158, 58,173,133, 79, + 72,167, 87,114, 18,207,108,173, 73, 83, 36,146, 21, 7,248, 7, 60,104, 74,244,138, 26,114, 29, 64,224, 67,135,165,230,221,220, +215, 2, 0,188,188,125,202,137, 88, 86,107,151,128,170, 84,190,143, 63,249, 98,119,255, 12,173,254,133,207, 22,205,149, 92, 77, + 46,195,213,123, 58, 72, 37, 44, 76, 22,199,187,181,113,132, 78,127,111,218, 56,113, 97,153, 13,191, 95,215,226,230,165, 19,212, +102, 41, 25, 67,137,104,172, 38,106,200, 43, 4,104, 68,129,251, 12,193,183,102, 6,155,139,175,237,171,117, 48, 79, 77, 33, 3, +128, 87,228,176, 14,132, 69,127, 86, 36,105, 11,240,225, 54,171,213,139, 97,217,252,156,107,187, 29, 30, 65, 73, 41,133, 33, 47, + 17,203, 22,127,132, 85,235,247,226, 98, 66, 33, 92,108,233,216,191,113, 17,102, 44,249, 30, 6,115,245,189, 23,234,240, 35, 26, + 66,200, 47,148,210, 1, 0,122, 1,144, 86,217, 7, 33,228,151,138,107,255,109,127,246,236,217,239, 47, 89,178,228, 86,229,177, +149,229,149,199,214, 86, 94,229,124,143, 57,115,230, 68, 45, 93,186,116,113, 76, 76,204, 15,103,207,158, 77,134, 35, 6,171,106, + 37, 8, 33, 53,254,151,123, 55, 31,252, 12,192,176, 62, 30,106, 52, 13, 14,128,106,248, 88,133,127,244,136, 50,150,101,152,205, +171,222,151, 23, 24, 69, 16,177,108, 89, 93, 23,172, 68,225, 29,222,206,201,201,233,215, 31,119,254, 68, 67,130,124,164, 63,157, + 47, 78,187,156,108,120,144,210, 45,209,166, 74,155,186,155,216, 17, 47, 14, 83, 29, 62,250,219,116,212, 96,176, 8, 97,252,191, + 88,241,169,151,147, 66, 12,134, 0, 37, 70, 27,166,191,243,158,163, 97,212, 8, 5,101,167,190, 51, 15, 12,177,127,249,232,117, +133, 88,180,114,147,126,152,255,137, 51,227,251,122, 14, 90,184, 33,110,255,209,219,138,187, 67,135,246,208,165,164,164,212,121, +163, 9,229, 50, 94,120,245, 45, 9,195,216,155,141, 8, 33, 0,184,220,199, 49, 87, 0, 80, 84,148, 92,162,240,105, 49,116,219, +138,105,235, 27,250, 55,112,119, 82,202,161, 86,201, 72,120, 88, 19,121,251,118, 49,138,192, 38,205, 36,167,111,235,145,166, 53, +226, 94,102,255, 91,126,158, 0, 0, 32, 0, 73, 68, 65, 84, 9,100,154, 40,241,136,110,207, 98,219,234,247,250, 59, 82,255, 19, +231,110, 14,252,122,249, 92, 89,110,145, 5,183,211, 75,145, 83,104, 66, 78, 81, 57,114,138, 76, 80,203, 69,104,223,115,152,236, +192,241,221, 67, 58,180, 9,253,194,161, 27,250, 16,247,146,146,247,166,102,102,143,105,209,234, 25,124,191,101, 83,123,226,239, + 47,167, 25, 25,229,142,158,191,126,253,250,194,214,173, 91,123,126,246,217,103,101, 97, 97, 97, 45,195,194,194,130, 19, 18, 18, + 78, 54,110,220,120,224, 55,171, 23,156,124,107,238,242, 64, 17,108, 46,237, 59,118,100,149, 82,130,243,167,143,154, 54,175, 95, +155,101, 41,214,207,170, 77,151, 81,186, 46,204, 45, 37,208,248, 5,220, 84,137,173,189,197, 74, 75, 66,225,214,105,219, 0,236, +105,210,239,205, 99,191, 95,186,147, 16,125, 57,197,235,196,229,132,188, 66,131, 53, 52,233,208, 59,181,126,224,178,164, 34,131, +165,252, 43, 99,233,221,114,248, 93, 74,136, 6,176,191,183, 8,236, 25, 45, 2,128, 0, 89, 25,151,127,116,160, 99, 52,161, 60, + 15, 36,100,232, 81,106,180,161,220,106, 67,128,167, 10,218,220, 12,124,243,197,102, 92,185, 20,139,222,253, 6,225,171,239,190, +199,196, 87,134,215,121, 95, 25,134,128, 97, 72, 69,230,202,110,174,212,114, 17, 64,128,226, 50, 43,246,156, 73, 71,147, 96, 6, +164, 30,173,133, 78,106, 5,116,165,229, 96,196,106,196,255,177, 85,121,232,196,197, 57, 31, 47,223,240,110,137, 62, 55, 45, 41, +238, 28,194,220, 10, 16,236,103,198,173, 92, 23, 92, 42, 12, 66, 88,147,198, 96, 36,177, 14,105,231,223,106,190,236, 0,243,211, +128,182,173, 34, 99, 26,122,185,192,104,230, 42,178, 88, 34,108,222,180, 9, 41,247, 51,198,231,223,218,119,197,241,104,107, 70, +159,123, 79, 43,247, 14,121,253,198,249,227,201, 67, 94,158, 10,159, 6, 13, 91, 58,122,174,163,102,138,119,192, 96, 17, 66, 24, +247,160, 86, 91,182,108,219, 53, 34,184,161, 15,126,187,120, 31, 87,146,138,224,236,228, 10, 86,229,139,208,174, 99, 93,111, 28, + 94,253,188, 49, 95,191, 69, 44, 81, 78,120,166,125, 71, 80, 74,113, 39,254, 86,161, 78,231,242,200,103,179, 33, 43,254, 42, 0, +231,170,101, 74, 77, 68, 75, 39, 23,247,171,229, 22, 14,153,153, 25,248,243,236,201,214, 21,199, 57,140, 76,194,224,232,229, 60, + 88,108, 60, 44, 86, 30,173,155,135,151,139, 37,138,206,159,174, 63,216, 62, 39, 55,143, 81,170, 93,120, 23,207,198, 18, 87,107, +142,233, 90,178, 78, 98,177,241,104,236, 91,251,239,114,165,123,227,197,111,191,243, 86,132, 72,170, 64, 73,153,201,156,157,145, +233,243,237,142,223,245,183,239,196, 53,104, 20,212,208,121,193,130,143, 37, 37,229, 20,121,197, 38,228,151, 90,200,139,163,198, +251,109,221,248,213,203, 0,106, 52, 88,213,208,252,135,173,107,173,238,106, 9, 41, 53, 88,169,182,164,156,155,250,250,244,230, +245,169,251,195,252,205, 92,221, 43,195,213,228, 98,200, 36, 44,100, 18, 22, 86,155, 99, 93, 36, 53,145,195, 85, 26,141,235,203, +237, 90, 53,197,145,203, 90,136, 88, 2, 99, 89,137, 89, 46, 83,223, 12, 15, 15, 97, 90,181,140, 66,183, 78, 29,144,148,156, 18, +118,228,183, 19, 43, 47,198, 94, 89,164,137, 26, 58, 75,123,115,239, 35,205,194,181,145,154,169, 85,229,218, 2, 70,122,249,120, + 70, 13, 26, 52, 80,214,176,129, 55,241,244,112, 5, 7, 9,166, 76,125,195,203, 81, 29,158, 82, 80, 0, 75,231,207,129,201,108, +134,151,171, 20,148, 2, 27,215,124, 2,179,217, 12, 63, 15, 57,116,101,214, 26,207,175,203,143, 84,103,136, 30, 54, 90,149,143, + 43,143, 91,178,100,201,128,170, 26,149,207, 63,204,195,229, 85,207, 95,186,116,233,226, 42,207,215,216,199,175, 42,162, 10, 17, + 82, 91,165, 52, 45,134,118, 84,200, 84, 71,191, 90, 50,157, 41, 46,179, 64, 38, 97,208, 56,184, 17,166,189,249,150,178,103, 43, + 47, 24,225,140,159,118,108, 46,177,113,214, 95, 30,189,196,163, 40,125, 66,218,168,149, 78,135, 55,110,217,193,251,120,121,146, +111,143,105,147,181, 37,182, 7, 83, 28, 36, 92, 56,192, 95, 58,242,173, 47, 5, 57,172,148, 43,154,154,204, 38,183,154,180, 24, +216, 95,208,141, 71, 83,192, 50, 12,216,167, 52,179, 23,195, 48,220,119, 95, 44,128,167,179,189,207,213, 39,171,182,149, 14,212, + 28, 62, 81,213, 92,181,106,213, 74,215,178,101,203, 98,230,225,206, 84,213,144,118,241,251, 71, 70, 75, 60,174,185,170,196,152, +115, 61, 22, 15,205,196, 79, 72,180,216,179,209,174, 25, 35, 95,122,121,142,119,179,129, 78,247,179,117,144, 50, 86,180,141,240, +197,201, 35,123,248,244,228,219,147, 29,209,206, 43,208, 5,120,122,120,224,202, 61, 61,178, 10,202,145, 93,104, 55, 87, 57,133, +229, 40, 49,218,208,170,145, 23,138,117,250, 0, 71,180,170,131, 18,186,239,200,225, 35, 99,250, 13, 30,129,105,239,126,220,111, +253,215,159, 95, 87,120, 71,188, 98,204,189,125,209,145,243,119,237,218,197, 5, 5, 5, 37,231,231,231,183,157, 53,107, 86,105, +163, 70,141,124, 22, 44, 88, 48,169,113,227,198,126, 61,187,119,215,197,254,222,126,203, 91,239,126,220,253,253,183,214, 7, 51, + 12,147, 75,121,122, 32,171,204, 58,143,106,227,170, 29, 41, 84, 73,218,254, 57,241, 36,242,147, 49, 61, 59,123, 28,240, 80, 48, +145, 98, 98, 26, 69, 34, 63,217, 73,227,230, 89,146, 14,125, 81,218,252,197, 21,211, 50,139,249,185,229,140,207,162,186,204, 21, + 96,207, 10,153, 45, 60,156, 21,226,202,145,163, 0,133,239,215,107, 62, 87,106, 92,100, 16,177, 4, 98,150,129,206, 96, 69, 65, +137, 25,239,206,170,213,255, 85,129,242, 28,207,195, 96,226, 96, 52,219, 64, 64, 80, 90,146,143, 57,239,190,141,126, 3,135, 97, +252,228,119, 80,108, 4, 46, 37,151,194, 98,181,214,105,139, 88, 2, 24, 76, 54,140,239, 19,136,130, 82, 11,202,202,109, 48, 91, +120, 40,229, 34,136, 68, 12, 84, 50, 17,156, 20, 98, 16, 66, 37,190,190,190,147, 0, 64, 44, 22,151,167,165,165,109,171, 73,147, +231, 41,130, 2,188, 97,180, 48,120,102,196,114,244,138, 9,197,213,223, 54,136, 78, 95,184, 17,252,238,199, 43, 49,117, 84, 12, +118,223,105, 2,119,175, 32,168,149,114, 88, 41, 3,192,177, 41, 64, 40,157,199,251,134, 15, 27,181,246,187,141,119,230,127,248, +158,188,168,140, 64, 38, 17,225,196,137, 99, 56,119,225,210,106,237,173,125, 53,198,245, 56,136, 41,227,237,236,226, 12,185,148, +133,197, 98,114,184,195, 55,199, 83,128, 34,194,171,249, 16,123, 31, 69,138, 8,190,154,178,186, 50, 88,132, 16,226,226, 23,181, +105,237,250,239, 95,246,245,241,194,222,227,215,177,101,253,151,104, 16,213, 15,119, 47,175, 69, 64,244, 16,168,131,123, 64,234, +180,107, 18,195,138,154, 79,125,107,206,176,232, 54, 49, 56,251,199,239,200,203,201, 94, 75,105,188, 67,125,208, 88, 49,121,179, +123,175, 1, 48, 89, 56,116,238, 49, 0,135,127,222, 59, 13, 21,131, 39, 30, 23,150,101,248, 55, 38,142, 20,231, 21,155,197,121, + 58, 19, 50,243,141, 72,206, 41,195,254, 31, 55, 56,220, 36, 69, 88,166,109,215,150,254,226, 73,203, 78,164, 7,248,251,154,196, + 38,163, 34, 33, 41, 41,124,194,152,151,197,141,154,134, 49,218, 98, 19,180, 58, 51,180, 58, 51,202,202,173,104,226,215,144, 49, +217, 68, 49,245,141,213,203, 69, 46,254,234,151,100, 56, 43, 69,232, 16,225,241,216,157,176,121,158,255,203, 92, 45,180,103,174, +174, 37,235, 32,151,176,144,138, 89,200, 36, 12,172,156, 99,213,103, 24,219,200,215,198,188,168, 48, 91, 41,242, 75,204, 96, 25, + 2, 31, 79, 15, 89,128,111, 40, 54, 46,127, 3, 0, 48,241,189,175, 49, 97,220,104,132,133, 54,133, 78, 87,170,152, 48,229,173, + 21,168,166,223, 93,117, 80, 74,233,247,251, 79, 71, 94,186,153, 58,227,213, 49,175,136, 71, 12,234,194, 92,185, 87,130,236, 66, + 19,238,221, 53,192,108,173,223,108, 52, 54,206,222,230,187,105,231, 47, 80, 74, 88,104,117,246,127,151,133,107,118, 66,173, 16, + 33,167,200, 12,158,175, 57,123, 87,151, 31,169, 41,235, 84, 31,170,154,176,218,202, 9, 33,191,204,158, 61,251,125, 0,116,246, +236,217,239, 87,238, 47, 89,178,196, 8, 32,171,174,235, 60,232,131, 85, 83,179,160,166,197,208,142, 10,169,252,232,214, 53,239, + 43,142, 39, 80,172, 62,122, 25,253,219,251, 66, 34, 34,144,171,125,112, 53,185, 24,199,143,239, 47,253,227,220,133,114,194, 88, +235, 28, 22,165,244, 13,107,173,148, 59, 29,251,114,221, 22,155,183,143, 15,118,156, 41,202, 42,208,219, 30,216, 89,142,179,146, + 75, 71,190, 13,182,241,214,190,198,156,196, 58,127,206,242,148, 74,150,124,115, 0,148, 82,128,231,192,131, 7, 43,145,169, 2, +219,141,206, 5, 1, 56,142,151,139, 88,166,188,226,110,217,235,202,115, 25,169, 23,182,215,218,116, 72, 0, 56, 43,197,248,241, + 84, 6,116,133, 89,249, 3, 53,135,255,172, 52, 87,135,111,201,238, 70, 71,183,210,181,107,215,174, 88, 38,147,129,101,217,186, +194,124, 84,255, 9,205, 85, 77, 80,122,217, 10, 96,169, 95,120,151, 65,253, 84, 81,237,164, 68,140,232,112, 95,156, 60,186,151, + 63,119,104,195, 80, 67,110,194, 65,199,116,236,125,100,178, 10,141,200,204, 55, 34,187,168, 34,131, 85,104, 2, 33, 64,185,249, +201,166,175, 49,228, 38,252,172,110,208,108,173,201,138,201,157,123, 15,193,140,143,191,108,186,109,237,178, 63, 84, 94, 33,109, +203,242, 18,111, 56,162,145,146,146, 98,242,246,246,190, 82, 90, 90,250,236,138, 21, 43,244, 17, 17, 17, 82,133, 66, 81, 0, 64, +158,120,231,142,228,196,175,187,238,107,179,178, 94,179, 88, 44,142,165, 69, 0, 4,117, 27, 43, 11,119, 46,156, 20,168,236,208, +167,177,143, 18,129,202,178, 62,225,234,107,159,121,245,156,190, 56,239,248,170,188,108,147,237,183, 66, 3, 90,102,234,197,199, + 28,209,179, 89,204,169, 47,189, 54, 27, 44, 67, 96, 49,153, 83, 43,203, 53, 46, 50,124,188,237, 54,156, 20, 98,168, 21, 98, 56, + 41, 68,232, 24,225,129,122, 36,136,168,213, 70, 97, 52,219, 96, 52,113, 48,154,108,240,108,232,138,239,182,238, 70,154,214,136, + 3,177,249,136, 79, 41, 65,104,128, 10,148,214,157,119,226, 41, 87,246,226,164,185, 78, 44,195,128, 37, 96,194,155, 6,161, 80, +111,134, 68,196, 64, 42,149, 66, 41, 23,193, 89, 41,134, 88, 36,198,197,235,215, 97, 50,153,208,174, 93,187,106, 71, 74,253, 21, +161, 61,139, 21, 18,236, 7,139,213,134, 95, 79,199, 97,225,244,161,120,182, 75, 27,188,203, 74, 17,111,106, 5, 39,119, 39,240, +132,133,197,198,195,100,229, 0,144, 26, 13, 48, 33,164, 3,236,253, 34,202, 41,165,231,179,227,247,164,121, 53, 27, 50,233,208, +209, 19,219, 6,246,239,141, 43,215,110,225,167,189, 7,254,200,247,208,205,172,114, 78,115, 84,140,130,163,148,214,218,145,185, +150,235, 18,149,119,248,244,152,142,221,160, 47,202, 67,110,250,125,135, 63,212, 35, 27, 58,225,237,233,211, 66,194,194,194, 66, + 56,158,130,231, 41, 34, 3,157,240,218,148, 41, 33, 77,154,134,134,240, 21,163, 8,195, 3,156,106,213, 81,121,135, 77, 93,180, +226,155, 87, 2, 2, 2,112,248,204,109, 44,153, 59,249,138, 82,169,110,212,198,221,201,149, 15,107,137,228,155,191,193, 61,168, + 24,206,222, 33,254,131,158, 29,227,223,239,185, 33,184,113,237, 50, 86,125,182,224, 92, 25,171, 88,236, 72,172,106,239,198,154, + 86,109,187,188,228,236,238,141, 34,157, 30,106, 55, 47, 68,180,104,243,146,218,187,241,123,250,220,123,143, 53, 37, 11, 96,255, + 1,108,178,240, 40,212, 91,144,161, 53,226,126,174, 1,247,115, 12,224,249,191,154,130,235,122,135, 18, 16,162,146,137, 68,238, +214,187, 13,175, 31, 59, 65, 3, 3,188,201,178, 5,179, 88, 11,149, 33, 79,103,134,182,196, 12,173,206, 4,109,137,221, 96,185, +169, 69,224, 41, 95,239,209, 25,133,122, 11,156, 20, 34,184,168, 36,224, 28, 52, 64,213,241,241,202, 29, 29, 50,180,250,158,159, + 45,156, 43,185,122,191, 12,215,147,117,144, 73, 24,123,246,170,194, 96, 57,218, 44,204,138,152,105,207,245,106,135,116,109, 57, + 68, 44, 3, 17,203,160,105,179,214,240, 84,242,232, 57, 98, 54, 0, 96, 96,127,251, 52, 36,201,217,101,248,249,124, 54, 0, 72, + 28,141, 53, 47,191, 68,190,247,183, 43,111,237,248,110,153,180,156, 19,227,155,131, 41, 40, 55,115,144, 73, 42,154,221,165,245, +251,126,179,113,246, 12, 86,186,214,130, 50, 19,135, 18,131, 5,148, 2, 23,239,150,194, 96,226,160, 51, 88,208, 62,204,189, 86, +141,154,252, 72,149,231,171,205, 64, 57, 74,197,249, 90,252,213, 79,171, 90,221,170, 25,172, 37, 75,150,220, 90,178,100, 73,181, + 25,177,154,168,181,147,187,166,197,208,142, 10,137,252,232,150, 47,222, 87, 28,187, 67,113,242,122, 1, 94,232,236,143,130,188, + 12,172,255,122, 53, 79, 41, 32,147, 75,115, 56, 27,127,168,156,183,205, 42,190,246,115,173,237,190, 42, 77,100, 11,133, 82,121, + 98,201,170,181, 22, 31, 95,127,126,207,249,226, 60,157,129,251, 91,174,144, 51,153, 24,202, 83,137, 35,230, 10, 0, 24,134, 88, + 62,158, 54, 20, 60,165,152,183,122, 39,150,204, 24, 9,181, 92,164, 36,132, 40,203,202,109,152,190, 96, 3, 86,124, 48,206, 73, + 41, 19, 85, 24, 3, 14,147,167,189,235,136, 52,140, 38, 14,101, 69, 57, 5,205,245, 43, 31, 50, 87,209,186,182,109,219, 22,187, +185,185, 65,165, 82,213,219, 96, 85,103,174,124,124,124,252,148, 74,165,123, 72,136,189,175, 43,203,178,224, 56,174, 44, 49, 49, +241,177, 38,125, 43, 41,206,223,151,117,255,102,187,142,221,158,195,169,163,251,248,115,191,174, 31, 90,159, 33,230,174, 46,206, +233,151,227, 82, 35, 0, 53, 50, 11,202,145, 83, 84,142,236, 66, 19, 44, 54, 30,129,222, 74,100,164,167,193,213, 69, 93,231,232, +180, 74,148, 62, 33,125, 25,202,190,198, 19,124,103,200,137,255, 21, 0,244,153,183,166, 40,189, 66,111,220,186,117,109,213,128, +145,211,164,207, 62, 63, 69,178,110,233,235,179, 1,140,116, 84, 55, 55, 55,215,224,229,229,117,206,207,207,111,192,188,121,243, + 76, 0,164, 38,147, 73, 57,110,220, 56,101,106,106,234,219,148, 82,135, 98,236, 60,110,147, 39,145,211,190,141,195,162, 71, 5, + 42,203,122,247,232, 18,131, 14, 81, 1,200,232, 18, 3, 0,111,166, 26,212,161,157, 38,175,255, 49, 88,227,118,232,155,205,191, + 46,153, 56,162,199,219,126, 3, 63, 89,145,245,243,188, 90, 51, 98,119, 78,111,120,116, 2, 38, 2,136, 43, 58,190, 87, 53, 88, + 54,142,214,167, 9,142, 90, 57, 30, 6,147, 13, 6,147, 13,250,114, 43,142, 95,205, 67,110,177, 25, 69,101, 22,148,155, 56, 80, + 0, 22, 43,173,156, 85,164, 86, 82,206,110,118,173,124,236, 31, 61, 82,183,122,254, 52,231,159,206,100, 64, 37,179,247,199,114, + 81, 73,225,172, 20, 3,160, 56,121,242, 36, 42,135,199,215, 6,207,243,248,233,240, 69,172,216,124, 2,135, 55,204,130, 92,202, +162,229,144,249, 24, 51,164, 29,120,158, 34,233,206,205,220,144,136, 86,222,140, 90, 9,134, 65,101,159,148,218,238,167, 7,165, +244, 0, 33,100, 0, 33,228, 57,216,251,140, 20,237,227, 10,202, 78, 28,220,161, 42, 51,154,108, 69,169,183,191, 68, 89,126, 87, +123, 19, 60,120,216,127,160,159, 36,132,116,169, 51,224,106, 32,132, 48, 10,175,208,213, 19,166, 76,127,161, 73,147,198,216,185, +125, 35, 40, 37, 63, 57,122,254,182,159,207, 97,229,170,191,143, 24,124,109,202,148,144,117,223,124,243,183,178, 87,198, 77,170, +113, 20, 33, 33,132,248, 71,245,152, 21, 22, 30,137,243,183, 50,176,236,195,169, 87,202,243,146, 71,153,213, 30,175, 89,202,178, +223,137,140,106, 5, 31,111, 15,228,100,231,162,251,224,103,209,175, 79, 31,220,184,118, 25, 11, 63,122,247, 28, 12,230,222,117, +101,109, 43,225,169,120,114,183, 62, 67,196, 6,147, 5,107,150,125,132,215,102, 46, 66,251,238, 3,197, 55,175, 94,152, 12, 96, +190,163,117, 54, 91,121,116,111,161,129,217,202,193, 98,229,113, 32,153,125,228,123,134, 16, 64,196, 50, 76,171,198,246,230,221, + 18, 99,205, 77, 70, 0,192,136, 72, 78, 81, 73,105,208,151,139,222, 98,203, 76, 28,180, 58, 19,242,138,205,208,150,152,144,175, + 51,217,205,149,206,140,124,157, 9, 34,150, 32, 49, 57, 19, 44, 75,234,221,255,174,184,204,130,103, 66,221, 0, 16, 48,143,217, + 28,146,111,211,244,187,150,144,209,115,217,130,185,146,171,201,122, 92,191, 95, 82, 97,172, 24, 72,171, 24,172, 90,146, 56, 15, +240,138, 28,212,225,149,145,131,155, 57,171,228,200,188, 83, 10, 17, 67, 32, 98, 9,156, 53, 1,112,145,151, 99,218,212,215,224, +225,238,130,180,252,114,172,222,155,128,235,113,119,193, 27,235, 87,237,175,191, 63, 60,244,149,151, 71,200, 24,177, 28,219,142, + 38, 67, 42, 97, 33,130, 25,113, 23, 78,155,114, 51,238, 91, 74, 75,138, 85, 34,145,216, 33, 81, 2, 80, 27,199,131, 82,138,197, +159,204,193, 15,155,191,198,225, 75,185,160,176, 79,213,240,231,158,207, 49,125,246, 66,104, 75,204, 0,106,238,146,228, 0, 7, + 1, 60, 87,185, 83, 53,155, 85, 67, 6,170, 58, 98,171,106, 84, 30,255,176,198,195,207, 85,232, 57,148,105, 23, 61,236, 20, 43, +247, 53, 45,134,118,148, 75,165, 71, 55,175,158,163, 56,158,128, 7,230,202,168,207,199,214, 13,235,244, 20,124,175,220,155,251, + 29,106,206, 1, 0,149, 87,104,148, 76,165, 58, 53,119,225,106,147,159,127,176,237,215,171, 37, 5,165,229,220, 35,105, 16,137, + 82,197,169, 92, 52,229,174,129,173, 87,136,141,230,143,180,218,184, 58,250,117, 17,240,148,226,231, 11, 57, 0,111,127, 17,119, +158,206,180,207,227,195, 18,112,188,189,157,251,183, 43,121, 15,202, 28,129, 16,224,199,163, 87,242,107, 50, 87,174,174,174,112, +117,117,133, 90,237,240, 74, 11, 21,186,213,103,174,148, 74,165,251,145, 35, 71,228,206,206,206, 96, 89, 22, 38,147, 9,207, 62, +251,108,189,180, 43, 81,121,135,141,108,223,115,216,146, 78,221,159,195,239, 71,246,240,231,126,221, 52,204,144, 87,143,249,123, + 0,244,235,210,226,231,101,159,175, 9,158, 57,123,174, 76, 37, 23,161, 72,111, 1,203, 16, 4,122, 41,224,161,102,113,238,196, + 47,229,163,250,182,114,216,252, 5,248, 7,109,253,124,245, 90,143, 21,159,126,210,219,205, 45,216,187,168, 40,185, 4, 0, 12, +121, 9,107,213, 62, 97,119,252, 27, 30, 61,213,178,203, 80,120, 53,104,234, 80, 31,177,170,228,229,229,229, 69, 69, 69,221,142, +140,140,108, 51,108,216, 48,186,120,241, 98,183,140,140,140, 93,142,154, 43, 0,232,209,167,195,116,149,216, 26,227,161, 96, 34, + 27,251, 40,209, 33,202,222,250, 57,226,185, 78,240, 15,104,136,123, 57,134, 86, 5, 70, 94, 82,102, 21, 55,254,102,237,198,216, + 64,119,209, 68,155,222, 24, 7,160,218, 41, 5,106,131,160,226, 67, 82, 89, 97,174,228, 34,168, 21, 98,240,212,254,156,131, 80, +171,141,135,217,194,195, 96,182,193, 96,226,236,102,203,204,129,231,237,157,149, 9, 33,176, 88, 57,251, 37,235, 23, 32,156,221, + 60, 17, 28,100,143,241,193,166, 16,131, 16, 64,163,209,192,195,163,238,121, 71,121,158,135,217, 98,255, 23, 55, 91,185, 7,131, + 58,204, 22, 27, 40,165, 72, 72, 72,156,149,146,156, 50,184,105, 72,147, 46,145, 45, 90,185, 43,164, 12, 0,212,214, 95,140, 16, + 66, 70, 1,176, 82, 74, 31, 12,138, 8,106,214,169,124,239,158,159, 84, 3, 6, 14, 44, 50,235,181,187,171, 28,204, 2,232, 91, + 97,198, 28, 50, 25, 85, 47,164,210,132, 14, 9, 8,239,176,104,244,216,215, 66,187,247,234,131,147,199,127,195,129, 61, 59,182, +148,229,221,169,117,190,174,170,132,133,133, 61, 50,138,176, 73,211,208, 71, 70, 17, 6, 5,135,212,104,176, 92, 92, 90, 56,183, +104,219, 45, 32, 53,223,130, 67,135,126, 69,153, 46,231, 67,179, 89,111,128,152,174, 63,182,231,219,241,163, 38,207,115,110,223, +182, 13, 92,157,148,240,116, 83,227,242,165,115,248,116,254,220,115, 48,152,123,215,253,249, 89, 81,223,200, 72, 73,211,134, 65, +111, 5, 54,110,134,203, 23,206, 32, 41,225,230,173,171,177,231,154, 53,141,106, 7,141, 95,224, 91, 36, 50,114, 41,141,139,171, +115,165, 10,202,209,140, 87, 39,189, 99,127, 92,241,245,217,190,101,176, 20,120,248, 77, 72, 96,179, 90,184,109,235, 62,205,171, + 58,138,176, 38,221,242,210,226,221,127, 92,184,241,238,160, 62,157, 73,101, 83, 96,165,169,122,120,191,105, 3, 21,146,110,196, +243,214, 50,157,195, 70,184, 34,250,220, 41, 83,223, 84,216, 99,231, 65,237, 19,171,213,235,125, 3, 0,229,156,228,165,111, 62, +121,159, 92, 75, 41,195,141,251, 37,246,102,193, 10,131, 37,147,176,144, 86,252,117,104,106, 50,134, 89,246,202,240, 62,200,215, +153,193, 83, 90, 49,151, 30,129, 72, 36, 70,106, 9,144, 94,162,135,182, 56, 23,201,247, 83,160,203, 73, 6,195,176,240,104,208, + 20,134, 58, 39,228,177, 83,202,169, 67,173, 60,154, 12, 31,208,153,221,119, 54, 27, 10,153, 8,165,249,233, 56,115,100,167,145, +114,220, 90,179,213,252,131, 23,149,222,140,187,177,203,161, 85, 74, 8,160, 45, 41, 51,123,203, 36, 44,118,110,250, 18, 47,142, +153, 98,127,162,162,170,239,206, 93, 0, 66, 8,138,116,122, 0,228,145,172,104, 77,126,164, 2,109,149,204,211, 35,251, 85, 76, + 81,117,251,164, 98,223, 92,131,134,249, 33, 83,101,126,168,220,252,144,158, 67,147, 35,215,152,193, 18, 51,236,111,155, 86,189, + 47,191,149, 39,195,197,248, 28,188,208,217, 31,134,146,124,172,251,106,165,190,220,106,233,167,189,225,184,185, 2, 0, 48,255, +199,222,121,135, 69,113,173,127,252,123,182,179, 75, 47,130, 44, 69, 1, 21, 16, 80, 81,209, 24, 75,176, 36,246, 24, 73,212, 36, +154,104,138, 37,215,154, 98,139,209, 24, 77, 52,198,154,102, 44,177,183,196, 88, 98,139,133,136, 37, 18, 11, 54, 64, 68,186,192, +194,210, 97,217,101,219,204,156,223, 31,128, 33,132,178,139,222,252,238,205,157,207,243,240,184, 59,156,249,206, 57,187, 43,243, +238,123,222, 34, 24, 60,246,141,247, 18, 2,218,119, 52, 70,199,107,210,203,180,230, 70,227, 24,122,190,180, 48,225,230,137,175, +135,149,155,211,223,177, 83,134,178, 28,195,172,210, 21,220, 95,218,208, 88,142,163,210, 37, 27,126,168, 54,174, 56, 14,243, 62, +223, 5,202,177, 53, 5,252, 88, 80,150,195,244,143,190, 5, 83,243,152,229, 88, 16, 51,171,104, 72,171, 46,118, 54,146, 51,157, + 42,215, 57,214, 55,174,186,118,237, 90,230,228,228, 4, 87, 87, 87, 56, 59, 59,163,214, 32,178,132,166,182, 5, 59,116,232, 0, + 59, 59, 59,196,196,196,192,206,206, 14,182,182, 45, 43,144,111,231, 17, 60,182,231,128,209,123,250,143,124, 67,112,238,240, 38, +246,106,204,241,151,170, 10,146, 44, 54, 2, 88,150, 37,102,179, 25,131, 35,187,101,221,186,255,240,151,101, 75,151, 14,137, 24, +240,162,236,233, 32,119, 84, 25, 25,228,100,103, 35,246,252,207,250,246,190,110,191, 60,221, 61, 48,199,108, 54,131,101, 27, 47, +186, 87,139,193, 96, 44, 22,136,109, 92,199,189,252,170,236,250,181,107,123,108, 61,130,246, 9,132,220,109,202, 10, 59, 3,116, +108,231, 78, 29, 97, 98, 56, 84,233, 42, 74, 90,178,238,132,132,132,235,107,214,172, 9, 18,139,197,222, 7, 15, 30, 44, 42, 45, + 45,181,170, 93,208,217, 19,215, 54,136,236,204, 15, 36, 84,255, 74, 27,133,246,185,236,190,189,240,242,136, 62,216,127,226, 50, +206, 95,140, 69,150,206,238,150,214, 40, 60,146,147,163, 50,132, 56,151, 31,122,161,183,159,240,167, 93, 21, 63,185,247,159, 55, +134, 82,249,217,194,152, 37, 22, 39,120, 16, 2, 84, 84,153,235,120,176,170,227,155, 4, 2, 98,177, 7,139, 0,233, 23,175,196, +133,117, 11,236,136, 91,105, 21, 40, 44, 53, 64,103,172,254,220, 83, 80,184, 58, 72, 32,147, 8,145,149,145, 14,142,154, 50,172, +121, 45, 64, 81, 56,244,165, 41,213, 9, 48,224, 68, 98,177, 8, 20, 53,197,117,109,164,149,238,238,238, 22, 25, 88,102,150, 69, +212,224,158,120, 42,162, 51, 70, 77, 93, 3, 0,136,222, 57, 15,206,118, 18, 28, 60,120, 16, 15, 47,175,219, 29,240,244,180, 51, +241,119, 19, 95, 76,184,121,229,213,161,221,228,225,173, 69,121,141,110,109, 80, 74,143, 18, 66,164, 0,250, 19, 66,158, 5, 16, + 67, 41, 53,179, 12,247,112,200,144,193, 28,203,114,143, 98, 34, 8, 33,206, 0,122, 1, 40, 1, 16, 71, 41,109,210, 69, 98,235, + 30, 60, 8, 2,236, 3, 33, 54,118,114, 69, 86,175, 65, 47, 43, 35,158,234,233,248, 66,212, 24, 72, 37, 82,156, 59,123, 26, 95, +174, 91,249, 67,101,222,189,191, 20,169,109,138,134,130,215, 27, 58,214,212,118, 81,121,185,163, 54, 57,241, 86,105,186,218,232, + 44,114,234, 0,177,204,126, 10,113, 84,110, 16,202,236,150,120, 61, 53,209, 33,250,242, 53, 36,220,186, 2,165,155, 28,233,169, + 41,186,248,219, 55,191,213, 17,241, 82, 90,152,104, 81, 32, 46, 0, 40,138,217, 23,159,154, 48,196, 89,111, 98,113,233,215, 19, +122,142,225,134,252,126,225,100,170, 79, 96,132, 77, 88,196, 64,231,162,163, 91,163, 0,236,111, 78, 39,227,234,238,191,132, 94, + 4,244, 28,171, 58,121,246,162,157,210,183,189, 16, 68, 0, 67,149, 22,133, 89,241,140,190, 66,173, 83,223, 61,162,180,100,126, + 89, 76,238, 71,139, 87,126,247, 78,183, 46,161,182,148, 74,255,228,177,170,125, 92,172, 49, 86,199,204,106,203,144,118,247,178, +190, 48,165,188,201,144, 21,150, 53, 43,138,139, 75, 30,165,230,203, 43,157,218,150, 59,150, 87,183,141, 33, 0,132,128, 99,185, +211, 35, 79, 69,113,113,137,148,101,205,205,222, 59, 0, 16, 39,123, 27,220,205, 80, 61, 10,104,151, 73, 4, 53,177, 87,127,120, +178, 44,129, 0,221, 68, 82, 91,228, 22,235, 33,160, 20, 28,199,128, 49, 27, 81, 89, 81, 1, 85,110, 62,212,234, 2, 84,106,202, + 33,183,115, 66, 88,120,119,216,219,219,227,222,141,243, 0,200, 49, 75,244,245,156,164, 67, 68,247,238,226,132, 76, 13, 76,102, + 14, 98,152,112,233,151, 3,122,198,108, 28,169,190,123,228, 87,139, 38, 89, 7,134,163,231,226,239,103,133,250,184,121,146,155, +105,101,216,181,249,171,234,108, 82,166,218,155,153,240, 80, 11, 85,177, 22,185,217, 89, 20, 28,107, 81,152, 69, 29,234,239,106, + 89, 28,250, 97,133,230, 19,165, 81, 3,139, 97, 24, 27,223, 54,109,241,242,148, 9,248,246,219,141, 72, 78,203,194,230,111,214, + 87, 27, 87,119, 14,255,102,137,120,221,110,219,218,252,164, 85,111,124,155,145,115,236,118,169,160,202,216,116,255, 41, 69, 43, + 63,244,125, 99,237,233, 42, 77,137,148, 53,232, 68,199,118,191,177,175, 33, 77, 0, 16, 10,136,177,102, 91, 16,132, 16,212,110, + 11,126,251,201,219, 80,200,132, 32,132, 64,103, 96,240,218,156,181,216,185,182,250,155,213, 91,239,188,247,167, 63, 60,245, 53, +107, 12, 33, 50,105,136,255,243,203,191, 79, 60,122, 57,211, 53,109,248,240,103,202,195,195,195,203,228,114, 57,108,109,109,225, +224,224, 0, 7, 7, 7, 56, 57, 57,161, 33, 26,208,244,104, 46,230, 74, 32, 16,192,193,193, 1,114,185,188, 65,195,173,185,238, +229,118,173, 3,199,244,232, 63,122,223,128,231,223, 20,156, 59,188,153,187, 17,115,108, 76, 85,193,253, 38,189, 76,245, 53, 57, +142,187, 29, 21, 21,213,105,202,148, 41,146,133,239, 68,157, 62, 29, 19,151,124,232,236, 79, 35, 75,202, 52, 62,148, 82, 56, 57, +218,101,191,244,108,167, 99,125, 35,130,178,162,163,163,185,125,251,246, 25, 8, 33,119,155,210, 4,128,162,162,130,237,209,209, +191,126,222,239,153, 72,108,222,177,111,120, 98,226,189,225,169, 41, 15,224,211, 38, 0,126, 1, 29,160, 35, 78,136,190,112, 9, +154, 18,245,118, 75,230, 89,151, 78,157, 58,121,117,233,210,197,187,172,172, 76,255,209, 71, 31, 5,177, 44,251,115, 88, 88, 88, +247,208,208,208,188,132,132,132, 70,191, 21,215,213,188,178,107, 66, 33,128, 93,109, 35, 39,253,168, 50,149,205, 2,176,210,199, +215, 23,231, 47,198,226,247,223,174,110, 44, 82,248, 46,157,244,234,235,111,183,117, 21,191, 61,234,233,182, 66,119,103, 5,246, +110, 94, 35, 60,122, 37,115, 93,102,177,121, 11,128,229,205,205,179, 46, 37, 26, 19,122,135,184,130, 97, 40, 88, 74, 33, 32, 4, +246,114, 81,131, 6, 86, 67,154, 34,163,236,141,105, 83,167,164,134,117, 14,159,253,234,196, 41,146,240,118,190,184,246,160, 20, + 0,129,171,131, 2, 42, 85, 30, 46,253,188,133, 41,205, 77,218, 40, 20,114,127,217,222,105,106,158, 57,113,251,219,215, 62,246, +244,244,156,124, 43, 62, 30, 49, 49, 49,112,117,117, 69,173,113,213,208, 22, 97,125,205,210, 82,205,111,203,214,108,233,253,246, +248, 81, 24, 17, 25,138, 11,215, 83, 97, 52,115, 48, 49,220,163, 32,215,244,216,239,164,179,198, 5, 24,223,137, 10,172,208,153, +165,153, 75, 50, 43, 46,212, 45, 34, 91, 95,147, 82,106, 36,132,156, 6,208, 19,192, 40, 66,200, 25, 74,105,247, 58,115, 32, 0, + 58, 1, 8, 5, 16, 75, 41, 77,183,104,237, 2,236,141,187,126,195,213,196,112,184,116,245,118,199, 1,189,195, 65, 57,138,235, +215,111, 96,235,182,173,250,187,119,110,173,214,170, 91,127, 66, 27, 41,110,219,216,235,105,105, 22, 97, 67,199,106, 53, 41,141, + 97,236, 60,130, 55, 94,185,124,225, 67,153,178, 59,130,135, 45,124, 62,247,246,207,207,183, 14, 25, 12,183,118,189,161,186,125, + 4, 55,127,219,123,242, 6,195,204,183,225, 4, 89,218,194,164, 70,141,253,198,230, 41,179, 81,204, 8,237,250, 12,178, 31,102, + 34,227, 65,252,206,170,226, 7, 42,187,214,193, 59,115,115,178,166,250,133,244,198,229,211,251,103,162, 17, 3,171,185,207,188, +155,180,124, 99,204,229, 43, 47,231,254,248,179,135,166,178, 74, 46, 18, 9,116, 50, 33,212, 18, 93,234, 1, 75,231, 73, 19, 19, + 77,238,237,158,142,122,117,202,162, 19,235, 62,255, 72,236,238, 36, 67,126,169, 30, 21, 58, 51, 42,170,204, 16, 18,160,189,210, + 14, 85,218, 10,252,126,114,151,153,154, 74,162,106,226, 81, 27,212,108, 21, 58,106, 57, 33,152,190,104,209, 2, 8,165, 14, 74, +255,129, 11, 77, 2,255,214,112, 70,189, 98,230, 46,128,255,192,133, 48,104,212, 35, 23, 45, 90, 16, 68, 41, 29,216, 42,116,148, +166,182, 23, 97, 99,107, 47,214,152, 48,190,191, 15,140,230,234,250, 97, 44, 91, 29,107,199,213, 84, 53,175,158, 80,243,107,167, +128,228,135, 19,177,200, 85,151,162,202, 96,134,209,196,192,200,176, 16, 8,132,112,118,118, 70,123,255,174,112,114,116, 64, 65, + 81, 49,174,199, 94,198,239,201,183,210, 41,176,188,200,165,124,143, 37,239, 17, 17,217,182,247,112,119, 35,106,141, 17, 54, 50, + 33,126,143,185, 96, 6,176,221, 18,227,170, 33,205,114, 93,217,218,249,203, 54,188,242,237,154, 37,173, 59,251, 57, 32,187, 72, +143,156,194, 42,104,244, 12, 0, 10,134,165, 48,234,203,113,255,250, 47,249, 12,116,107,155,187,198,127, 59,141,123,176,196, 98, +195,245, 59,201,178,249, 31,127,129,123, 41,233,216,186,241, 43,173,193, 10,227,170, 33,182,189,227,215,236, 55,160, 63, 83, 83, +183,244,147,204, 38, 71, 53,180, 45,200, 81,138, 99,191,231, 63,106,251, 81,187, 85, 24,151, 82,214,164, 22, 33, 68,252,197,140, +240,185,181,134,208,151,135,115,127,151,201,138,184,135, 15, 31,150,238,217,179,231,145,209, 35, 20, 10, 81,155, 61,104, 52, 26, +155,205, 42,114,118,144,134, 78, 24,218,118, 92, 99,198,149, 80, 40, 4,199,113,143,188, 87,214,110, 61,218,186, 7, 61,219, 99, +192,232,253, 3, 70,189, 37,136, 62,178,133,187, 17,243,243, 75,149, 5,247, 15, 91, 37, 2,160,180,180, 52,129, 16,242, 96,245, +234,213,225, 91,183,110,245,127,255,253,247,211,182,172,152,250, 37, 0, 20, 23, 87,183, 69,188,121,243, 38,157, 54,109,154, 65, +175,215,167,151,150,150,198, 81, 11,154, 92,235,212,247, 87,111,255,118, 85, 80,118,110,222,196,118,161, 61,225,230,215, 3,173, +219,245, 68, 73,165, 9, 87, 83,114,145,150, 24,141,123, 87, 14, 30,168, 42,244,176, 40, 32,183,150,240,240,112, 95,177, 88, 60, +146, 82, 26,104,107,107,235, 71, 41,149,138, 68,162, 49,132,144, 7, 12,195, 36,134,132,132, 68, 39, 38, 38, 90,220, 51, 44, 51, +102,187,161,109,228,164, 13, 89, 58,219,200,180,124, 93,215, 44,157,237, 77,157,204,241,221,130,232,245, 6,143,231, 86,175,131, +185, 56,225,224,206,242, 67,123, 55,175, 17,142,159,252, 30, 27, 95,226, 48, 75,100, 39, 63,187,114,146,197,153,251, 16, 16,146, +247,254,251, 31,252, 81,166,129, 84,111, 12,214,148,108,104, 54, 51, 5, 0,106,250, 41,206,147, 43, 67,191,142,159, 61,117, 89, +167,136,222, 19,158, 25, 50, 78, 96, 39,177,197,217,195,223,209,244, 59,231,127, 20, 81,246, 67, 93, 65,234, 95, 12, 12,107, 49, + 26,141,127, 50,172, 44,241, 94, 1, 64,161,107,121,228,137, 51, 49, 19,143,255,114, 97,197,208,103,251,184,126,243,209, 88,172, +218,116, 20,118, 10, 25, 40,199, 98,220, 0,223,151,238,237, 27, 60,210,199,195,198,235,167,243, 57, 23,167,175,139,159,167,211, +153,146, 27, 51, 98,106,169,169, 47,244, 59, 33,164, 61,128,145,132, 16, 14,128, 45, 0, 45,128, 74, 84,111, 72, 28,161,148, 90, +236, 85, 4,170,235, 54,101,168,245, 56,122,232, 32,110, 95,141,198,189,123,247, 53,247, 18,239,125, 69, 68,116, 93,101,126,114, +139, 60,171, 13,101, 17,178, 28, 26,206, 44,108, 2,173, 80,254,217,205,227, 95, 68,118, 24, 48,179,151,107,187,222,112,110, 83, +109, 83,150,231,196, 35,251,250,193,163, 26,149,100, 12,165,241, 77, 7, 50, 53,129,210,199,191, 3, 39,148,226, 74,204, 73, 80, +142,219, 8, 0,148,227, 54,222,186,124,114,106,207,161,111,194,197,189, 77,151,218,212, 46,107,181,229, 34,166,252,196,142,207, +126,204,200,200, 64, 82, 82, 18, 82, 82, 82, 80, 82, 82,130,189,123, 47, 89, 85,171,169, 32,245,202, 89,143,192,126,131, 95,153, + 52,251,216,232, 23, 71,219,248,250,181, 19, 4,121, 59,192,213, 94,132,251,169,185, 72,141,127,192,165,220,185,168,167, 85, 5, + 47, 20,164,252,214,168,119,164, 85,200, 24, 15,129,144,204,143,254,185,186,183,224,160, 81,111, 4,205,157,254,254, 83, 46,174, +206, 13,254, 29, 47, 41, 46,149,126,252,241,226,160,218,241,205,245, 34, 20, 8,133,154,201, 83,103,216, 10,136,224,209, 54, 32, +173,221, 35,171,253,135, 82,128, 0, 18,177,168,217,207,232,196,209,125,192,112, 28, 42,171, 76,168,212,153, 80, 86,169, 71,126, + 81, 25, 18, 18, 83,113,237,210, 41,100,164,166,104, 24,134, 57, 15,138, 67,133,174,229, 7,234, 23,214,109, 10, 14, 66, 95, 23, +103,123,100,148,234, 33,151,136,160,122,152,194,152, 24,125,139,139,172, 23,221,250, 57,207, 35,108,212,115,147,222, 89,248, 75, +191,126,125, 29, 58,119,237,110,235,230, 96, 15,137,136, 32,245,161, 26,119,111, 94,215,102, 37,223,170, 96,205, 85, 67,138,226, +127,126,236, 46, 45,255,233, 52,106, 96,153, 88,102,208,123, 11, 87,158, 97, 89, 86, 46, 18, 10,171,204,148, 27,242, 56,198,213, +191, 11, 74,185,156,119,102, 85, 7,173,215,126, 33, 48,179,156,252,173,119,222,175,170,251, 5,129,152, 89, 69,173,231,170,153, + 76, 61, 97, 97,153, 65,179,224,219,219, 59, 63,223,153,120, 16, 64,226,227,102,246, 1, 64,105,133,241,182,235,179, 63,140,210, +232, 24, 2,224, 94, 3,154,218, 1, 3, 6, 84, 79,160,198,136, 99, 89,214,226, 27,132,212, 70, 49,181,255,200, 55, 4,209, 71, +183,114,215,207, 31, 29,211, 18,227,170,150, 26,131,233, 42, 33, 36,254,195, 15, 63,140,240,240,240,240, 88,188,120,177, 77, 69, + 69,133,248,155,111,190,209, 23, 21, 21,229, 87, 84, 84,196, 82,106,121,124, 66,205, 77,115,146,220,163,227,119,228,224,247,207, + 57,187,123, 13,118,114,243, 9, 44, 45,204, 73,173, 40,206,249,133,112, 56,171, 41,184, 31,107,237, 92,111,221,186,245,176, 83, +167, 78, 71,132, 66,161, 55,203,178,110,132, 16, 59, 74,105, 41,195, 48,165, 28,199,229, 89, 99, 92,213,146, 25,179,221,208,239, + 95,219,246, 21, 87,113, 82, 19,177,217,151, 25,179,221, 0, 0,234, 51,239,235, 0,252,236,209,127,222,232,163, 87, 50,190, 74, + 40,117,152, 81, 16,243,185, 69,174,248,186,228,222, 60,208,220,165,181, 73, 0, 0, 32, 0, 73, 68, 65, 84,190,249, 81,150, 81, +165, 74,200, 1, 48,209,214, 35,104, 77,252,205,216, 37,132, 66,204,130, 89,174, 83, 63,184,241, 36,244,197, 98,177,190,123,247, +238, 13,102, 11,202,100,178, 38,235,107,213,252,161,223, 74, 34, 35,119,252, 18,125,105,226,169,179,151, 87, 60,213,171,143,171, +141, 76,137, 54,206, 38,236,248,160,219,204,232,155,133,215,158,255,224,226,183,105, 42,253, 29, 74,169,197,117,208, 0,128, 82, +154, 66, 8, 41, 7, 48,138, 82,186,153, 16, 50, 25,192, 61, 0,241, 86, 27, 2, 28, 94,237,213,171,199, 94, 66,136,136, 50,220, +170, 88,177,112,159, 62,239, 94, 78, 75, 12,138,186,116,246,115,192,228,169, 83, 59, 4,180,251, 35,139, 48,180,173, 61,198, 79, +124,187, 67, 27,255, 14,143,142, 5,249, 52,253,133,138,170,226,170,136, 71,167,103,239,159, 89,253,145,107,234,111,239,200, 93, +188,237,180, 69,153, 37,165,153, 55, 86,235, 10, 60, 86,215,239,208, 96, 45, 25, 41, 9,235,190, 95, 51,239,253,188,220,212,173, +218,130,228,234, 93,135,130,228,120,133, 71,224, 71, 69,249, 57,239, 23, 23,164,173,110,233,107,161,213,106, 85,123,246,236,113, +234,221,187,183,192,195,195, 3,133,133,133, 56,127,254, 60,199,113, 92,179,141,153,235,163, 78,190,120,158,180,107,231,178,111, + 71,249, 42,145,220,126, 24,195, 66, 73, 41,133, 72, 64,242, 76,134,242, 95, 10,157,170, 62,160,119, 98,155,254, 92,114, 44,161, + 2, 42,168,237, 45,200,113, 28,249,226,235, 93,153, 66,177,180,193, 45, 85,214,108, 84,112, 28,103,113, 47, 66,181, 48,203, 53, +204, 28,220,124, 22, 31, 5,226, 73, 82, 51, 95, 78,233,233,167,135,190, 54,152, 97, 88, 51,170,227, 19,107,127, 10, 40, 37,191, +130,176,103,138, 92, 52,177,214, 24, 85,117, 49,153, 76, 78, 16, 72, 96,175, 48, 67, 0,130,138,242,114, 89, 43, 86,122,175, 37, + 90,181,168,227,143, 38,144,200,200, 54,198,115,191,190,126,225,210,111, 99, 40,199,249,177, 20, 0, 37, 25, 70,147,254,199, 2, +135,162,157, 45,157,239,127, 27,228, 49,255,126, 52, 45,110,225,118,201,127,154, 38, 33, 68, 2,192, 13, 0, 75,235,180,191,121, + 28,205, 58,199, 27,237, 45,216, 82, 77,160,186,175,152,204, 70,241,129, 78,167,217,170, 83, 39, 91,124,211,183,228,245, 36,132, + 56,202,100,178,174,118,118,118,226,162,162,162,171,148,210, 38,191,121,254,183,190,239,117,233,251,198,118,183, 1,131,159,158, +125,246,196,181, 13, 53,219,135,143,240, 30,179,206,102,252,176,126,239,238, 58,116,124, 93,253, 44,194,127,194,218,255, 93,154, + 36, 50, 82,228, 94,234, 48,145,101,185,229, 3, 58,104,116,249,233,247,167, 93,186, 91,120,149, 82,218,104, 61, 49, 11, 63,159, +175,160,198,131, 69, 41,221,215,212, 88, 75, 53,173,165, 33, 77,247,176, 23, 62, 1,129, 5, 69, 99,107,160,184, 87, 16,127,100, +113, 83,154, 64,117, 64,186,162, 16,206,186, 34,183, 98,107, 13,171,255,151,247,157, 16, 97,167, 78,157,250, 74, 36, 18, 95,150, +101, 21, 70,163, 81, 87, 85, 85,149,145,153,153,121,133, 54,210,144,252,223, 61, 79,143, 78, 47,172, 19,139,197,179, 0,192,108, + 54,111, 80,223, 61, 50,167,169,115, 27, 27,255,183,220,143,198,140, 17,210, 31,127,180,184,113,187, 37,154,181,120,117,125,169, +204,108,102, 30,245, 30,146,136, 69,229, 57, 55, 15, 54, 28,247, 98,161, 38,207, 31,240, 6, 22,175,201,107,242,154,127,187, 38, +105,178, 89,119,203, 52, 45,133,215,228, 53, 1, 64, 25, 50,210, 7, 0, 84,137,199, 44,202, 54,110,104,252,127,235,218,255, 83, + 53,255,105, 88,213,236,153,135,135,135,231, 73, 96,137,113,197,195,243,239,196, 82,195,170,165,227,121,120, 8,234,181, 90,169, +197, 26,203,148, 16,210,160, 70, 83, 88,224,246,231, 53,121, 77, 94,147,215,228, 53,121, 77, 94,243, 31,166,217,156,246, 63,197, + 51,198,111, 17,242,154,188, 38,175,201,107,242,154,188, 38,175,249,255,174,249, 79,227, 9,181, 70,254,231, 65, 8,241, 32,132, +120, 60,233,177, 60, 79, 6, 66,136, 23, 33,196,203,202,241,158, 45,188, 22,255,254,242,240,240,240,240, 88,197,223, 30,131, 85, +123,163,106, 46, 59,207,210,113, 79,250,220,154,243, 87, 16,130,185, 53,143, 87, 81, 74, 27,173, 8,108,225,216,102,235,115, 7, + 6, 6,218,202,229,242,151, 88,150, 13,224, 56, 14,132,144, 84, 66,200,143,119,239,222,173,194,163,234, 41, 77,227,235,235,235, +103, 99, 99, 51,145, 16,210, 17, 0, 40,165,247,244,122,253,142,135, 15, 31, 90, 87,201,187, 1, 8, 33, 4,192,100,153, 76, 54, +214,201,201,169,125,105,105,105,138,209,104,252, 17,192,166,150,164,111, 43,149,202, 64, 0,175,115, 28, 39, 18, 8, 4,251, 84, + 42,149, 69,173, 7,106,230, 98,241,251, 83, 51,102, 45, 1,102,131,128, 90, 50,254,113,174, 85,143,199,253, 2,195,199, 41,241, +240,240,240,252,151, 98,149,129,229,237,237, 61,148,227,184, 87, 0, 64, 32, 16,236,203,201,201, 57,101,205,249,150,222,172, 30, +231,166, 86,239,220,117,148,210,247,173,156,163, 7, 33,152,203,113, 84, 0, 0, 2, 1,153,231,225,225,225, 34, 18,137,254, 82, +243,137, 97, 24, 57, 33,120,139,227,170,251, 37, 9, 4,100, 46, 33,100,131,181,134, 93, 96, 96,160,173,131,131,195,162,141, 27, + 55, 58,116,236,216,145, 0, 64, 92, 92,156,211,140, 25, 51, 58,116,234,212,105,217,221,187,119,155,109,121, 17, 16, 16,240, 66, +120,215,136,153,115, 62,152,231,225,238,234,102,207,176,140, 41, 55, 55, 79,185,126,221,231, 79, 5, 4, 4,124,155,150,150,102, + 81,223,192, 90, 67, 74, 36, 18,141,181,177,177,105,167,215,235, 83, 25,134, 57, 40, 20, 10, 7, 47, 95,190, 60,108,248,240,225, + 54,229,229,229, 82,134, 97,218,239,217,179,231,221,109,219,182, 13, 37,132,140,106, 42,104,185,214,211, 68, 41,173, 91,247,230, +149,171, 87,175, 14, 20,137, 68,164, 71,143, 30,114, 66,200, 12,250, 71,245,238,134,198,215,106,253,229,253, 33,132,124, 73, 41, +205,247,241,241,233,206,178,236,107, 0, 32, 20, 10,119,101,103,103,223, 32,132,180,182,145,201,102, 87,233,245, 4, 0,177,230, + 61,106,232, 90,118,118,118,187, 42, 43, 43,239,215,254,190,102,158, 45, 50,228,121,120,120,120,120,254,185, 88,101, 96, 81, 74, + 95, 75, 73, 73, 81,112, 28,135,160,160,160, 9, 0, 44, 54,176, 26,186, 89, 13, 28, 56,176,171, 92, 46,255, 83, 77,168,170,170, + 42, 41, 33, 24,216, 18,163,165,246, 26, 70,163, 65, 32, 22, 75, 33, 20, 10,222,235,210,165, 75,247,162,162,162,104,150,101,191, +203,207,207,183,186,187, 58, 33, 4,223,127,255,125, 71, 15, 15,143,191, 20,132, 83,171,213,146,145, 35,255,210,116,219,106,228, +114,249, 75,223,125,247,157, 67,112,112, 48,209,233,116, 48,155,205,240,245,245, 21, 44, 90,180,200,241,211, 79, 63, 29, 3,160, +193,246, 49,181,248,248,248,248,119,139,232, 57,115,199,246,237, 61,203, 75, 74,244, 91,215,110,188,105, 16,201,116,109, 58, 6, + 74, 62, 90,178,220,241,147,197, 11,166,248,248,248,196,103,103,103, 55, 89,213,155, 16, 34, 0,112,120,246,236,217,161, 35, 70, +140,144,106, 52, 26, 27,157, 78,215,118,207,158, 61,139, 34, 34, 34,236,186,118,237, 42,221,191,127, 63, 41, 43, 43, 3,165, 84, + 17, 28, 28, 76,199,140, 25,163,255,225,135, 31,166, 3,248,178, 17,205, 6,141,101,150,101,197,181,142, 47,134, 97,164,168,254, + 44,154, 90,224,157, 34,174,174,174, 19, 1,172, 96, 24,230,173,243,231,207,119, 5,128,254,253,251, 75, 0,220,112,112,112,232, +109, 50, 26,173,107,118,220, 8,195,135,143, 0,128,205,158,158,158, 23, 11, 11, 11,189, 9,193,120, 75,231,201,195,195,195,195, +243,191,133,181, 6,150, 4, 0, 46, 94,188, 8, 74,169,180,185,241, 13,240,232, 70, 71, 8,193,172, 89,179,224,233,249,231,176, +152,188,188, 60,196,196,156,111,129,244, 95,175, 1, 0,159,126,250,169, 99,113,113,241,243,223,127,255,253,224,214,173, 91, 47, +202,207,207,143,105,234,100, 74,169,154, 16,178,170,198, 51, 2,169, 84,150, 49,101,202,148, 27, 53,191, 11, 56,118,236,152, 98, +228,200,145, 58, 66, 72, 26, 0, 72,165, 50,119,161, 80,224, 71,171,123, 76,173,106,137, 55,195,100, 50,181, 11, 14, 14, 38,149, +149,149, 48, 26,141,200,204,204, 68, 97, 97, 33, 90,181,106, 69, 24,134,105,215,220,249, 10,133,226,205,217,115,222,111, 85, 94, + 82, 90,101,214,104, 76,118, 28,203, 56,216,136, 73, 69, 97,113, 89, 70,182,131,238,205,105, 51, 69,139,231,191,251, 38,128,133, +205, 72, 77,159, 51,103, 78,199, 30, 61,122,120, 29, 56,112,128,148,151,151, 67, 36, 18,217,133,135,135,163,123,247,238,108,116, +116, 52,241,247,247, 71, 88, 88, 24, 46, 95,190,140,223,126,251,141,116,237,218, 85,113,248,240,225, 9,104,192,192,170,111, 84, + 11,133,130,249,227,198,141, 27,170, 80, 40,204,145,145,145,120,251,237,183,161,213,106,209,177, 99,199,206,145,145,145,177, 81, + 81, 81, 98,129,128,132,177,108,181, 51,172, 33,227,186,222,251, 67, 38, 78,156,164,182,179,179,139, 82, 42,149,247, 9, 33, 34, +137, 68, 82,123,109,161,135,135, 71,171,206,157, 59, 79,115,113,113, 41, 16, 10, 4,238,180,186,201,138,197,239, 81,237,181, 70, +142, 28, 49, 15, 32, 24, 48, 96, 64,241,204,153, 51,217,123,247,238, 69, 70, 69,141,126,234,193,131,148,199,242, 92,242,240,240, +240,240,252,115,177,202,192, 34,132, 20,221,186,117,203, 83,175,215,131, 16,210,172, 55,168,110,134, 1,165, 84, 45, 20, 10,191, + 21, 8,200, 59,132, 16,132,133,117, 74, 95,191,126,125, 67, 21,205,141, 97, 97,157,210,133, 66,129, 63,165, 20,132, 8, 54,114, + 28,171,110, 72,179,129,235,169, 9, 33,171,164, 82,217, 92, 0,240,244, 84,170,143, 31, 63,110,126,233,165,151,240,197, 23, 95, + 72,231,207,159,191, 92,169, 84,142, 83,169, 84, 57,245,206,139,175,247,124,129,135,135,135,203,247,223,127,223,113,202,148, 41, + 55,114,115,115,103, 3,128,151,151,215,122, 0,157, 8, 33,105,117,142, 97,211,166, 77,221,223,124,243,205,123,106,181,122, 65, + 99,154,141,209,174, 93, 59,191,145, 35, 71,202, 0,192,108, 54, 35, 59, 59, 27,217,217,217, 40, 46, 46,134,217,252,231,214, 98, +141,105, 18, 66,130,157,157,156,109,183,174,217,120,163,149, 76, 72,220,124,148, 68,226,224, 36, 18,216,217,203,168, 80, 88,213, +198, 71,105, 79, 8, 9,110,228, 53,123,164, 41,145, 72, 38, 12, 30, 60, 88,177,127,255,126, 18, 22, 22, 6, 39, 39, 39, 92,188, +120, 17,183,110,221, 66,105,105,169,128, 97, 24, 68, 68, 68, 96,213,170, 85,240,241,241, 65,121,121, 57, 50, 51, 51,221, 36, 18, + 73,171,198, 52, 81,207,224,157, 59,119, 46,220,221,221,193,178, 44,242,242,242, 80, 89, 89, 9, 91, 91, 91, 56, 58, 58, 66,165, + 82,225,232,209,134,119, 50,235,125,150, 22,200,100,178,239,219,180,105,179,118,230,204,153,158,174,174,174, 48, 24, 12,139,138, +139,139, 49,119,238, 92, 0, 64,143, 30, 61, 58, 83, 74, 79,189,249,230,155,240,243,243,203, 45, 41, 41,121, 24, 23, 23,247,182, + 86,171,141,111, 72,179, 49,188,188,188,206, 20, 20, 20,246,237,223,191, 63,202,202,202, 76, 75,150, 44, 65,120,120, 56, 58,116, + 8,108,118,158, 79, 10, 94,147,215,228, 53,121,205,255, 5,205,127, 26, 34, 0, 32,213, 61, 60, 73,253,199,245,161,148,150,122, +121,121,121,202,229,114, 80, 74, 75,173,189, 24,203,178,211,221,220,220, 10, 22, 44, 88,208, 39, 48, 48,208, 56,125,250,244,248, +140,140,140, 15,235,142,241,243,243,251,244,235,175,191, 70,114,114,114,230,138, 21, 43, 46, 23, 21, 21, 45,179,230, 26,148,210, +249,132,144,245, 0,160, 82,169,138,142, 29, 59,214,227,194,133, 11,243,215,175, 95,239, 57,125,250,116,233,204,153, 51,167,161, +121, 79, 14, 68, 34, 81, 85, 67,219,130, 13,225,225,225, 97,106, 40, 70,171, 41, 34, 35, 35,133, 15, 31, 62,236, 40,151,203, 95, +126,247,221,119,229, 38,147, 9, 42,149, 10,217,217,217, 40, 43, 43,131, 64, 32, 64,114,114, 50, 71, 8,185,111,129, 92,165,209, +108, 54,216,250, 40,205, 35, 71, 13,238,116,247,218,173,100,185,139,139,160, 83, 68,120, 72, 82, 74,102, 28, 1,140,168,254,105, + 18, 71, 71,199,192,162,162, 34, 84, 84, 84,160, 85,171, 86,216,176, 97, 3, 60, 60, 60,160,211,233,144,144,144, 64,189,189,189, +201,165, 75,151,160, 84, 42, 81, 88, 88, 8,163,209, 8,157, 78, 87, 96, 52, 26, 27, 92, 59,165, 84, 45, 18,137,182, 10, 4,228, +109, 66, 8,218,183,239,160,254,242,203, 47,205,148, 82, 4, 7, 7, 99,244,232,209,184,120,241, 34, 18, 18, 18, 64, 41, 5,199, +113,102, 63, 63,127,181, 64, 64,220,171, 79,111,220,219,100, 48, 24,210, 60, 60, 60,222,122,239,189,247,246,124,247,221,119,206, + 11, 23, 46, 4,165, 20, 44,203,130,101, 89,112, 28, 7,142,227, 64, 41,197,225,195,135,145,154,154,250,105, 93,227,170, 57,188, +189,189,109, 88,150,157, 26, 20, 20, 52,226,149, 87, 94, 49, 73, 36, 18,232,116,186,218,215,194, 52,100,200,144,226,145, 35, 71, +184,158, 56,113,194, 42,175, 24, 15, 15, 15, 15, 79,195, 88,106,139,252,183,240,200,131,245,119, 45, 70, 40, 20,110, 58,115,230, + 76,120,191,126,253, 68, 3, 7, 14, 12,243,246,246, 14,203,201,201,137, 7, 0,111,111,239,176, 33, 67,134,132,185,187,187, 99, +195,134, 13, 58,161, 80,184,169, 37,215,168,119,179,139,245,242,242,250,232,208,161, 67,223, 79,153, 50, 5, 30, 30, 30,225, 79, +100, 33, 45, 96,233,210,165,228,171,175,190, 90, 43,151,203,163,164, 82,169, 67,171, 86,173,202,135, 14, 29,154, 98,111,111,159, +158,145,145, 1, 74, 41, 92, 92, 92, 80, 89, 89,137,228,228,100,238,204,153, 51,101,118,118,118, 63, 53,167,107, 50,153,174, 63, +204,202, 10,236,221,183,183,231,197, 27,137, 55,163, 94, 24,209, 95, 32, 18, 8, 50,178,242,174,183,114,117,177,253,237,202,229, + 10,147,201,116,189, 57, 29,173, 86,155,193, 48,140, 11,165,180, 85, 76, 76, 12,220,220,220, 80, 90, 90, 10,179,217, 12,147,201, +100,212,233,116, 54, 73, 73, 73, 48, 24, 12, 48, 24, 12,112,112,112,192,221,187,119,213, 12,195,252,218,152, 38,195, 48,147, 9, + 33,159, 80, 74,113,255,254,253, 92, 0, 80, 42,149, 29,156,156,156,246, 50, 12, 3,149, 74,133,152,152,152,241, 42,149, 42,185, +246,156,166,130,220,235,162, 86,171, 11,189,188,188,166, 79,158, 60,249,147,160,160,160, 0, 74, 41,218,183,111,143,193,131, 7, +227,228,201,147,120,240,224, 1,180, 90, 45,251,251,239,191,239, 83,169, 84,199,154, 91,127, 45,238,238,238, 97,182,182,182, 11, +102,204,152,225, 17, 26, 26, 10,189,190,186,119,172,157,157, 29,116, 58, 29, 28, 28, 28,240,244,211, 79,223, 91,182,108,153,137, + 82, 76,164,148,230, 91,170,205,195,195,195,195,211, 56,255, 4,195,170,150, 71, 6, 22,165,148, 16, 66,254,125, 85, 71,107, 80, +171,213,133,222,222,222,191,196,197,197,141, 24, 59,118, 44, 98, 98, 98, 38, 2,120, 23, 0,100, 50,217,196,177, 99,199, 34, 46, + 46, 14, 73, 73, 73,191,168,213,234,194,166,213, 44,131, 16,162, 51, 26,171, 29, 56, 54, 54, 54,114,107,206,165,148, 6,212,108, + 13,130, 82, 26,208,216,177,230, 88,186,116, 41,249,250,235,175, 31,204,158, 61,187,205,140, 25, 51, 68, 14, 14, 14, 40, 43, 43, +179,219,185,115,167,251,235,175,191,174, 92,182,108,217,165,252,252,124,108,223,190,189, 42, 41, 41, 73, 47, 20, 10,147,164, 82, +233,225,216,216, 88, 67,115,218,122,189,254,251, 79,151,125,212,127,247,158, 31,130,131,130,219, 59,159, 60,115,254,166,171,171, +131,220,207, 47, 64, 86, 94, 86,102,248,122,253, 23, 34,173, 86,187,173, 57,157,170,170,170,195,209,209,209, 47,248,248,248,180, +138,143,143,135,209,104, 4,203,178, 24, 52,104, 16, 40,165, 50, 0,156, 72, 36,194,189,123,247, 96, 50,153, 10, 30, 60,120,144, +155,154,154, 42, 3,176,178,153,215,240, 79,134,146, 64, 32, 24, 55, 98,196, 8, 48, 12,131,193,131, 7,227,200,145, 35, 99, 1, + 44,109,108,124, 83,228,230,230,166, 0, 24, 23, 18, 18, 34, 41, 43, 43,235,254,236,179,207,110,120,246,217,103,113,243,230, 77, + 92,190,124,249,101,153, 76, 86, 96, 50,153, 24, 79, 79,207,201,132, 16, 7,147,201,180,183,168,168, 40,175, 49, 61, 79, 79,207, + 62,129,129,129, 75, 87,175, 94, 69, 60, 60, 60,193,178, 12,204,102, 19, 10, 11,139,161,209,104, 16, 18, 18, 2, 95, 95, 95,172, + 92,185, 18, 0,142,240,198, 21, 15, 15, 15,207,147,227,239,178, 69,254, 14,254, 20,131,213,212,194, 60, 60, 60, 20, 21,101,197, +179,252,252,252,108, 0, 64, 38, 17, 14,112,115,115,251,172,168,168,168,210,218,139,234,116,186, 31,246,236,217,243,220,218,181, +107, 37,195,134, 13,107,231,237,237,221, 3, 0,162,162,162,218,217,219,219, 99,207,158, 61, 38,157, 78,247, 67, 75, 22,212, 16, + 28,199, 13,142,136,136, 64, 73, 73, 9, 50, 51, 51,111, 88,115,238,177, 99,199, 20, 0, 58, 53,119,172, 57,190,250,234,171, 13, +179,103,207,110,179, 96,193, 2,145, 94,175, 71, 69, 69, 5,196, 98, 49, 38, 77,154, 36,209,104, 52,126,235,215,175, 87,253,254, +251,239, 55,140, 70,227,214,212,212, 84,171,234, 86,169, 84,170, 42,165, 82, 57,115,249,167,203,247,174,254,226, 11,247,146,226, +210,100,137, 84,174, 87,200,101, 46,243,222, 95, 70,213,106,245,123,106,181,186,217, 82, 15, 0, 86,238,221,187,119,200,115,207, + 61,119,199,199,199,199,189,168,168,168,117, 69, 69, 5, 45, 41, 41, 33,168,142,165, 34, 0,112,231,206, 29,100,101,101, 49, 44, +203, 94, 2,240, 9,165,180,217,237,199, 90,188,189,189,157,123,244,232, 49,196,213,213,245,209, 86,100,215,174, 93,135,120,123, +123,127,149,147,147, 99,245,182,115, 45,229,229,229,163,158,126,250,233,247,166, 77,155, 6,179,217,140, 23, 94,120, 1, 57, 57, + 57,107, 50, 50, 50, 14, 40,149,202,241,147, 38, 77,106,229,234,234,138,247,223,127, 95,142, 58,198, 92,125, 8, 33,175,141, 27, + 55,142,200,229,182, 96, 24, 6, 50,153, 4, 50,153, 12,118,118, 14,112,113,113, 65, 86, 86, 22, 6, 12, 24,192,165,167,167, 31, + 85, 40, 20, 77,102,119,242,240,240,240,240, 88,207, 63,197,200,178, 40,200,221,219,219, 59,194,221,221,125,122, 65, 65,129, 77, +109,106, 61, 33,196,166, 75,187,118,155,148, 74,229,183, 42,149,234, 55,107, 46, 90, 90, 90, 90,225,233,233,121, 52, 54, 54,118, + 76, 84, 84, 20,206,158, 61,251, 58, 0, 68, 69, 69, 33, 54, 54, 22,233,233,233, 71, 75, 75, 75, 43,172, 94, 77, 3,120,121,121, +189,216,191,127,255,215,123,244,232,129, 99,199,142,129,101,217, 70,183,179, 26,162,110,198, 96, 67, 89,132,181,199,154,211, 17, +137, 68, 47,205,152, 49, 67,164,215,235, 65, 41,133, 68, 34, 65, 69, 69, 5,242,243,243,209,183,111, 95,201,236,217,179,219,107, +181,218, 15,178,178,178, 90, 84, 20, 84,165, 82,229, 4, 6, 6,166, 86,233,245, 98,103, 87, 23,157,189,173,148, 86,104, 52,130, + 59,119,110,230,169,213,234, 76, 75, 52, 40,165, 70, 66,200, 51,167, 79,159, 94, 44, 20, 10,199,122,121,121, 97,204,152, 49,100, +224,192,129,144, 74,165,168,170,170, 66, 89, 89, 25,142, 29, 59, 6,134, 97,252, 1,160, 85,171, 86, 30,109,219,182,253, 73, 32, + 16,168,211,211,211,223,108,238, 26, 44,203, 70,141, 26, 53, 74,100, 54,155,177,108,217, 50,124,252,241,199, 24, 58,116,168,232, +250,245,235, 81, 0,182,180,100,237,222,222,222,147, 39, 78,156, 56,121,204,152, 49,208,104, 52,136,141,141, 69,239,222,189,177, +114,229, 74,207,203,151, 47,191, 27, 17, 17, 1,145, 72,132, 11, 23, 46,128, 97,152, 70, 27,182, 70, 70, 70,138,132, 66, 97,128, +151,151, 23, 50, 51, 51,161, 80, 40,224,225,225, 1, 39, 39, 39,184,185,185, 97,237,218,181, 88,183,110,221,109,161, 80,184, 81, +165, 82,165,182,100,174, 60, 60, 60, 60, 60,255, 27,136,128,106,107,177,246, 64,221,199,206,206,206, 14, 54, 54, 54, 83, 70,140, + 24,209,231,133, 23, 94,192,224,193,131,255,116,242,134, 13, 27,236, 98, 98, 98,230,121,121,121, 61, 3, 96, 99,110,110,110,137, +165, 23,230, 56,238,240,222,189,123,135,245,234,213, 75,209,191,127,255, 0, 0,144,201,100,198,189,123,247,234, 56,142, 59,108, +237, 66,234, 23,125,244,246,246,142, 16, 10,133, 19, 71,142, 28, 25,241,198, 27,111, 32, 33, 33, 1,123,246,236,185, 23, 24, 24, +120,214, 74,221,180,102,178, 8,215,195, 2,111, 22,195, 48, 78, 14, 14, 14,168,168,168,128, 68, 34, 1,195, 48, 40, 46, 46,198, +253,251,247,225,234,234,138,242,242,114,135,182,109,219, 38, 88,187,238,186,200, 37, 92,183, 69,115, 39,183,215,235,171, 66,202, +203,203, 25,145, 72, 36,146,137,217, 38,107, 95,213,135, 82,106,240,245,245, 29,197,178,172,155,209,104, 52,123,120,120,136,207, +157, 59, 7,169, 84,138,234,236,207, 48, 72,165, 82,163,183,183,183, 6, 0, 92, 93, 93, 5, 43, 86,172, 16,207,153, 51,167,217, +185,119,235,214, 77,220,182,109,219,113,129,129,129,184,114,229, 10, 18, 19, 19,211,174, 92,185, 18,208,173, 91, 55,248,248,248, +140,235,214,173,219,142,184,184, 56,115,115, 58,117, 9, 9, 9,145,132,135,135,191, 62,102,204, 24,164,165,165, 97,197,138, 21, + 69,121,121,121,231, 79,159, 62,253,226,180,105,211,132,189,123,247, 70, 81, 81, 17,118,236,216,193,220,184,113, 99, 91,126,126, +254,174,198,180, 46, 92,184,192, 41,149, 74, 16, 66, 32, 20, 10,161,211,233,144,158,158,142,167,159,126, 26,219,182,109,195,250, +245,235,119,229,229,229,241, 94, 43, 30, 30, 30,158,127, 3,141,217, 34,255,173, 52,234,193,242,242,242, 26,238,226,226,242,214, +184,113,227,132, 65, 65, 65, 80,171,213,176,183,149, 25, 9, 33, 82, 0,176,183,181, 49,154,205,102, 76,155, 54, 13,225,225,225, + 61,230,205,155, 23,209,186,117,235, 93,249,249,249,205, 6,101, 3,128, 90,173,214,121,122,122, 30,124,231,157,119, 86,222,186, +117,211, 31, 0,174, 93,187,150,174, 82,169,230, 91,184,157,245,136, 58,197, 41,137, 66,161,184,211,190,125,251,226, 33, 67,134, + 56,143, 30, 61, 26,110,110,110,184,121,243, 38, 86,172, 88,145,160,215,235,167,199,196,196, 48,214,104, 63, 41, 68, 34, 81, 89, + 73, 73,137,187, 84, 42, 69,121,121,249, 35,227, 74,171,213,162,164,164, 4,148,210,138,152,152, 24,182,165,250,222,222,222,207, + 12, 27,242, 76,216,234,181, 95,162, 74, 87,137,107,177,199, 81, 90, 82,132, 77, 91, 14,117,242,246,246,126, 38, 39, 39,231,130, +165, 90, 12,195, 4, 28, 60,120, 16, 0, 32,149, 74,241,201, 39,159, 64,169, 84,194,193,193, 1,149,149,149,152, 60,121,178,116, +214,172, 89, 0,128,196,196, 68,216,217,217, 89,164,155,151,151,215,127,202,148, 41, 14,102,179, 25,167, 78,157, 50,176, 44, 59, +243,236,217,179,135,187,116,233, 34,235,215,175,159,195,238,221,187, 7, 0, 56,109,205,186, 25,134,145, 42, 20, 10, 41,203,178, + 56,120,240, 32,178,178,178,222, 40, 42, 42,202,247,240,240, 56,244,193, 7, 31,188,223,161, 67, 7,191, 7, 15, 30,100,105, 52, +154, 85,106,181,186, 73,239, 32,165,148, 83, 42,149, 15,207,156, 57,227, 59,102,204, 24, 72, 36, 18,148,150,150,194,222,222, 30, +171, 87,175,166, 38,147,201,162,207, 54, 15, 15, 15, 15, 15, 79, 83, 91,132,175,254,242,203, 47, 66,142,227,176,121,243,102,196, +197,197, 81, 59, 7,151,217,246,142,100,167,131,131, 3, 91, 86, 86,246,234,170, 85,171, 94, 88,188,120, 49,233,219,183, 47, 98, + 99, 99,137,191,191,127, 20,128, 71, 55,161,230,186,109,151,151,151, 95, 87,171,243,253,235, 84,109,247,151,201,108,154,204,118, +171,175,217, 64, 49,203, 46,159,126,250,105,188,187,187,187, 57, 62, 62, 30, 27, 55,110,228,226,226,226, 78, 0, 88,173, 86,171, + 27, 44, 39,240,119,116, 26,103, 24,230,224, 23, 95,124, 49,101,254,252,249,226,188,188, 60, 36, 39, 39, 67,171,213,194,108, 54, +227,228,201,147,140, 78,167,107,214,107,215,212, 60,115,114,114, 46,116,104,231,139, 29, 91,214,194,100, 50, 32, 47, 55, 11, 0, + 80, 84, 92,142,166,140,171,134, 52, 5, 2, 65,217,196,137, 19, 21, 70,163,145,140, 27, 55, 78, 92, 80, 80,128,118,237,170,235, +157, 86, 84, 84,224,196,137, 19, 8, 14,174, 46,171,117,247,238,221, 71,143,155,155,167, 66,161, 24,219,167, 79, 31,100,102,102, + 34, 33, 33,225,164, 90,173, 46,244,244,244, 60,153,149,149, 21,213,189,123,119, 28, 62,124,120, 12, 26, 49,176,154, 90,123,109, +121, 6,142,227,224,226,226,162, 5,128, 26, 99,234,157,198,214,221,152, 38,195, 48,243, 14, 31, 62, 60, 37, 54, 54,246,153,119, +223,125,151, 12, 28, 56, 16, 0,160,213,106, 89, 75,226, 13,255, 91,186,214,243,154,188, 38,175,201,107,254,167,105,254,211,104, +202,192, 98, 56,142, 67, 76, 76, 12, 14, 29, 58,196, 26,141,198, 5,121,121,121,117,107, 50,109,247,241,241,185, 20, 21, 21,181, + 38, 57, 57, 89,152,152,152, 8, 74,169, 85, 30, 24,189, 94,111, 38,228,175,199,172,209,104,136,109,219,182, 33, 63, 63,223,152, +149,149,245,179,201,100,218,211, 84,214, 88,115, 60,169, 44,194, 25, 51,102,204,250,250,235,175, 7,107, 52, 26,223,168,168, 40, +177,139,139, 11, 74, 74, 74,112,234,212, 41,230,230,205,155, 89, 51,102,204,120,183,165,115, 4, 30,121,176, 48,241,173, 57,168, +170,170,196,239, 87,142,163,172,164, 8,177,215,147, 97,173, 7, 75, 36, 18,249,154,205,102, 25,195, 48,185,148, 82,188,246,218, +107, 96, 89, 22,122,189, 30, 26,141, 6, 37, 37, 37,250, 25, 51,102, 8, 0, 64,161, 80,224,185,231,158,179,168,170,127, 64, 64, +128,175, 72, 36,194,233,211,167, 33, 20, 10,127, 2, 0,161, 80,248, 83,116,116,116,212,184,113,227,224,229,229, 21, 72,106,114, +116,173, 89, 59,199,113, 96, 24, 6, 86,158,214, 32, 5, 5, 5, 5, 0, 62, 81, 42,149, 63,206,157, 59,119, 90,143, 30, 61,194, +150, 46, 93, 10, 0,194,199, 22,231,225,225,225,225,249,159,161, 81, 3,139, 16,178,191,127,255,254, 47, 83, 74,133, 2,129, 96, + 79, 61,227, 10, 0,144,157,157,157,238,237,237,189,217,207,207,239, 81, 3,104,107, 46, 94, 83,121,253,115,129,128,204,173,126, +110,125,193, 70,250, 71,235,148,185, 0,136, 72, 36,222,115,245,234,213,133, 42,149, 42,223, 90,131,175, 33,158, 84, 22,225,146, + 37, 75, 40,128, 14, 95,125,245,213,134,195,135, 15,191, 84, 85, 85,229, 36,151,203,203, 24,134, 57, 56, 99,198,140, 89, 53,191, +111, 49, 57, 57, 57, 23,218, 5,120,159,121, 41,106,216,115, 1,126, 74, 0, 64, 90,134, 10, 69, 37,229,103,172, 49,174, 0, 32, + 51, 51,211, 0,192,224,233,233, 25,245,195, 15, 63, 28,172, 49,122,192,113,143,250, 57, 27, 68, 34, 81, 7, 0,208,104, 52,109, + 14, 31, 62,188, 87, 36, 18,229, 52, 42, 88, 67, 98, 98,226,254, 37, 75,150,140, 79, 79, 79,255, 57, 39, 39, 39,181,102,222,169, + 74,165,114,163, 74,165, 26,159,149,149,181,219, 90,227,202,104, 52,154, 13, 6, 3,195,178,172,200,100, 50, 81,163,209,248,216, + 6, 58, 0,212,212,229,154,165, 84, 42,123, 13, 30, 60,120, 34,165,180,224, 73,232,242,240,240,240,240,252,111, 64,158,196,183, +254, 70,197, 45,116, 33,214, 15, 80,111,137,166, 53, 26,150,104, 42,149,202,233,132, 16,139,188, 83, 53,215, 77, 83,169, 84, 95, + 55,162,249,184,193,122,180,177,121, 54, 68,135, 14, 29,104, 74, 74,138, 69, 65,130,205,105,122,123,123,219,136, 68,162,250, 30, + 42, 67,141, 17, 86,171, 65, 0, 8, 41,165,140, 53,243,180,134,166, 52,253,252,252,254, 21, 18, 18, 50,225,214,173, 91, 7,114, +115,115,215, 63, 9,205,150, 82, 79, 83,240,152,114, 92, 3,154, 79, 4, 94,147,215,228, 53,121,205,255, 52, 77, 11,136, 0, 80, +219,154,173,182, 78,102,171,122,143,141, 0,234,222,179,106,159, 23, 2,184, 94, 71,163,238,241,230,206, 5,128, 34, 0,119, 96, + 65, 87,148, 90,172,234, 69,248,239,226, 73,180, 25,121,210,173, 74,234, 26, 75, 79,128,191,181,158,199,131, 7, 15,158, 88,246, + 69, 78, 78,142, 30,128,190,169, 49, 53, 94,167,255,151,228, 1, 0,200,200,200,248, 38, 50, 50,114, 83,110,110,238,255,219, 28, + 26,129,107,126, 8, 15, 15, 15, 15,143, 5, 68, 0,104, 69, 8, 57, 14, 0,148,210, 17, 0, 64, 8, 57, 94,255,113,237,152,218, +113,117,199,212,106,212, 63,222,212,185, 0, 48,127,254,252,133, 43, 86,172, 80, 0, 56,111,233,132, 31,247, 27, 54, 15,207,127, + 4,255, 95,217,161, 60, 60, 60, 60, 60,127, 11,143, 12,163,250,134, 80,125,106,141,166, 58, 70, 85,163, 52,164, 83,123,141,186, +207, 87,174, 92,249, 25, 0,171, 58,193,136, 8, 33, 97,141, 76,208, 98,215, 95, 99, 26, 77,253,174, 57,125, 94,147,215,228, 53, +121, 77, 94,147,215,228, 53,255,121,154, 79,234,252, 39, 65, 67,198, 90, 61,143, 23, 8, 33,199,231,207,159,191, 16, 86,108, 15, +214,138,255,219,126, 0,132,241,154,188, 38,175,201,107,242,154,188, 38,175,201,107, 62,230,207,240,106,147,133, 14,175,251,184, +161, 99, 77, 61,110,238, 92, 11,198, 90, 60,231,255,136, 24, 44, 30, 30, 30, 30, 30, 30, 30,158, 38, 40,164,117,188, 77,180,218, +195,196,206,159, 63,127, 97,221, 56, 41, 0, 6, 0,178,250, 39,215,143,221,106, 10,107,198, 54, 5,111, 96, 53, 66,120,123,225, + 50, 95, 95,247,238, 64,141,151,175,166, 68, 1, 87, 19,175, 78,107, 76,120, 80, 14,148,163, 80,229,149,197,221, 73,163, 31, 53, + 34,215,108,172, 91,223,190,173, 93,132, 85,149,235, 88,142,237, 13, 0, 4,130,139, 98,177,211,187,209,215,114,203, 96, 97,176, +116,199,118,164,163,141, 8, 31,112, 28, 58, 19, 2, 16,130, 59,122, 6, 95,220, 75,165,247, 44, 57,191, 41, 8, 33, 36,212, 31, +147,165, 50,197, 56, 71, 39,231,246,165,197, 69, 15, 76, 38,195,143,137, 25,216,244,232,181,176,130,224,118, 36, 28, 44,230,177, + 28,196, 34, 1,214,221,203,160,151, 31,119,142, 60, 60, 60, 60, 22,242, 68, 50,124,235,241, 68,178,197,121, 26,229, 58,128,136, + 58, 70, 79, 33,128,187, 43, 86,172, 40, 93,177, 98, 69,221, 99,183, 1,116,169, 25, 87, 8,252,197, 80, 50,214, 60, 55, 54, 48, +198,104,201, 88, 75,177,202,192, 10,245, 33,211, 64,241, 49, 8, 40,128,165, 9,217,116,163, 85,231,183, 39,131,108, 68,194,173, +160, 16,234,205,236,123,148,197,197,134,198, 17, 33,250,217,136,133,107, 64,192,233, 25,246,205,132, 20,122,206,210,107,132,117, + 32, 67, 68, 68,176,155,227,168,152,229,232, 78,112, 56,110,103,198,111,177, 57,180,201, 76,184,250,248,250,186,119, 63,114, 46, +239,185,243,251,103,162,103,120,123, 80,206, 12, 80, 6,138,224, 15, 16,189,235, 53,244,236,228, 91,125,140, 51,195,174,235, 26, + 12,237,227,216,226,255, 28,125,251,182,118,145,115,220,157,141,223,239,110,237,219,190, 23,161,156, 1, 41,183, 78,189, 58,107, +238,135,253, 7,246,240,234, 28,125,173,249, 30,143, 93, 58,144,183,218,181, 13,250, 96,206,135,107, 5, 74,165,183, 29,199, 24, +153,188,236,196,110, 95,173, 93,242, 83,151, 14,100,205,237, 7,116,171, 37,115, 33,132,144, 16, 63, 76, 17,137,165, 99,228, 10, +219,246, 58,157, 38,133, 53,155,127, 12,107, 39, 26,242,197,170,245,225,207,244, 31,106,199, 25,242, 5,102,134,132, 28,248, 97, + 95,155,175,191,221, 56,140, 16,242, 60,165,212,186,140, 57, 22,179,239, 30,157,252,146, 88, 36, 36,193,195,183,216, 18, 66, 6, + 91,173, 1, 32,204,159,132, 82,224, 95,205,174, 11,248, 38, 62,157,182,168,215, 99, 71,127,242, 61, 1, 2, 1, 28, 36, 20,251, + 19, 50,248,154, 88, 60, 60,255, 52,188,188,188,206,231,230,230,246,127,194,154, 61,115,115,115,175, 62, 73,205,255,113, 26,234, +244,114,205,194,113,127, 59,214,122,176,150, 39,164,100, 59,131, 51, 33, 52, 48, 96, 25, 0,171, 12, 44, 27,145,112,231,245, 59, +234,214,160, 38,108, 89,251,206, 1,163, 25, 96, 24, 19, 88,198, 12,150, 49, 87, 63,102,205,224, 24, 61,150,172,139, 1, 24, 13, +186,135,119,216, 9,192,211,210,107,136, 33,216, 29,247,219, 25, 23,194,148,227,192,142, 21, 51,178, 84,149, 51,206, 93, 83, 21, +133,250,145, 5,137,153,216,110,205, 77,252,252,254, 89,216,243,211,201,156, 13, 91,126, 72,226, 64,225,108, 39, 11,154, 16,149, +224,179,235,167,243,217,235,183,233,147, 40, 71,225,100, 47, 11,122,253,249, 20, 95,107, 94,135,250, 8,171, 42,215,125,187,101, +123,107,223, 54,109,136, 57, 99, 57, 96, 54,192,199,119,152,240,195, 57,111,121, 46, 93,245,205, 90, 0,175, 55,117,126,112, 0, + 9, 9,236,208,241,189,157, 7,174,248,106, 43, 11,140,191,158, 88,152, 74, 40, 53,187,185, 5, 75, 62, 89,190, 90,190,104,193, +156,119,131, 3,200,213,164, 52,154,216,148, 14, 33, 68,208,209, 15, 71, 63,251,236,139,206, 3,159, 29,105,199, 26, 11,133,250, + 74, 77,224,214,237,223,127, 28, 28,218, 67,209,167,171,183,164,240,183,169, 68,167, 41,129,137,202,101, 3,186, 15,116,208, 77, + 24,107,254,126,215,190,233, 0,190,180,102,205, 44,243, 71,173, 17, 19, 3, 27, 0, 98, 88, 27, 64, 8,128, 2,255,186, 21,123, +126, 10, 83,122, 29,224, 76, 53, 70,175, 9,224,204,160,117,254,125,234,149,237, 0, 48,213, 90,125, 0, 16, 16, 60,119,238,220, +117, 79,181, 58, 47, 98,221,186,207, 22,132,248,147, 83, 32,216,125, 47, 29, 23, 90, 98, 20,242,240,240,252,103,162, 84, 42, 89, +149, 74,245, 68,187, 54,120,121,121, 13,203,205,205, 61,249, 56, 26, 74,165,242, 3, 0,111,213, 60,221,170, 82,169,190,120,220, +121, 69, 68, 68,120, 83, 74, 91, 3, 0, 33, 36,255,250,245,235,205, 22,139,230,177, 14,107, 13, 44, 27, 80, 14,248,237, 5,128, + 88,151,174, 8, 0, 20,176, 1, 17, 2,230, 74,140, 26, 49, 8,110,174,158, 0,171, 5,216, 42,128,209, 1,108,245, 79, 81, 97, + 22,192,104,129,194, 83, 96, 40,253,203, 94,106,179,152,203,129,130, 31,241, 92, 47, 95, 56,217,219, 96,214,203, 33,110,155,143, + 36,111,221,122,228,254, 32, 0,227, 44,154, 43,165,232,217,181, 61, 54,108,209, 38,253,124,190, 96, 48, 0, 12,143,116,251,165, +103,167, 54, 62,235,183,233,147, 78, 92, 40, 25, 2, 0, 67,251, 56,158,234, 17,214,218,151,179,126,151,236, 17, 44,199,246,241, +109,215,149, 48, 15, 87, 65, 32, 40, 69,101,101, 17,178,211,118,192,205, 99,176,128,225,184,126,205,157, 47, 23, 97,254,172, 15, + 86,138,180,149,106, 35,101, 10, 56, 15,187, 34,137, 24, 68,200,105, 47, 25,171,242,203, 42,103,255,107, 2,243,222,252,207,230, + 3, 24,223,148, 78,136, 63,166,175, 89,181,190, 83,239, 30, 65,238,249,151,103,145,202,114, 53,204, 84, 46,123,254,153,222,112, +110, 19,194,169,111,173, 33, 50,207, 65,112,246, 11, 64,206,221, 61,200,186,115,136,244,237, 17, 37,219,185, 87, 50, 1,141, 24, + 88, 29, 60, 73,159,193,207,245, 56, 16,208, 70,233, 73, 41, 7,142,227, 64, 41,135,215,199, 13,193,130,175, 83,161,173, 98, 48, + 98,208, 83,189, 93, 29,133,134, 21,239, 69,130, 82, 14,217,170, 98,221,175, 87,146, 6,166,230,210,102,191,249, 17,224,155, 46, +189,250,247,185,115, 45, 54,216,164, 58,142,136,209, 43,146, 8,240,104,187,145, 2,125,110, 70,111, 15, 6,182, 55, 39,213,176, + 62, 33,164,163, 31,216,135,191,175,132,119,215,201,194, 77,219,127,105, 85, 94,156,251,250,161, 31,190,125,233,219,205,155,246, +160,133, 70, 27, 15, 15,207,127, 30, 42,149,234,137, 27, 89, 87,174, 92, 81, 61,142,145, 21, 17, 17,209, 15,192, 42,149, 74, 5, + 0, 80, 42,149,171,122,246,236,185, 24, 0, 26,136,206, 40,167,148,142,191,126,253,122,131,187, 67,181,188,251,238,187, 74, 0, +126, 55,110,220,168,189,134, 95, 68, 68,132, 95, 67, 99, 21, 10, 5,219,165, 75,151,204,181,107,215,170, 90, 50,255,255,101,172, + 53,176,146,242, 47,205,238,106, 44,209, 1, 64, 82,115,131,105,189, 84, 75,189,153, 93,185, 99,253,235, 43, 67, 3,157, 81,161, + 49,226,236,165,204, 26, 15, 22, 3,150, 53, 63,250,119,112, 47, 55, 60,205, 76,197,151,251,239,131, 97,185, 21, 77,105,214,199, +196,113,175,132,247, 27,251, 3, 71,169, 84,161, 16,148,183,243,113,117,127,111, 66, 23,193,172,151, 67, 81, 84,101, 50, 10, 0, + 0, 32, 0, 73, 68, 65, 84,165,103,198,134,248,145, 95, 19, 51,232, 22,139, 52,185,191,150, 86,170, 41, 86,254,231, 99,220, 95, + 59,242, 52, 55,207, 90,186, 4,201,123,142, 30,218,215, 1,230, 18,176,218, 12, 24, 89, 14,121,121, 90,164,171, 36,112,228,254, + 92, 59,181, 49, 77,142, 67,231,214,173, 61, 21, 87,206,204,203,112,183, 47,149,184,202, 89,137,132,112, 84, 96,166, 66,163, 49, + 73,239,172, 28, 36,230, 56,116,110,232,220,186,154,114,185,253,107,125,251, 15,119,124, 24,253, 22,145,251, 12,133,187,191, 55, + 50,226,118,160, 32,254, 56,138, 11,178,136, 35, 45,133,162, 67, 0,134, 70,189,140, 85,211,187,163,162,162, 18,164, 48,205, 81, + 42,149, 57, 53,166, 73, 5, 24,191,230,243, 79, 61, 69, 34, 65,245,235, 73, 25,128,154, 1,106,134,166,210, 0,163,209, 8, 27, + 9,133,173, 13, 5,106,182, 97, 89,214,168,232, 60,112,254, 59, 0,174, 54,164, 89,151,248,116,154, 16,234, 79, 46,131, 50,193, +148,173, 2, 1, 46, 39,164,211, 71, 70, 79,152, 63, 9,237, 54,112,210,191, 8,240, 77, 83,107,111,140,176,182, 24,209, 61,216, +206, 86,206, 36, 33, 39,102, 6, 82, 89, 27,234,209,233, 45,188, 60,126,186, 98,211,214,205, 35, 9, 33,211,234,198,160, 89,250, +190, 91, 3,175,201,107,254,183,106, 58, 58, 58,250,183,109,219,118,177,217,108,238, 39,145, 72, 60, 76, 38, 19, 56,142,203,151, + 74,165,151, 50, 51, 51, 63, 41, 47, 47, 79,255, 79,152,103, 93, 78,157, 58,101,177,145,101,137,166, 88, 44,198,201,147, 39, 83, + 44, 53,178,234,107, 10, 4,130,221, 7, 15, 30,196, 15, 63,252, 0, 0, 56,127,254, 60, 58,116,232, 96,219,208,185,217,217,217, +182, 47,190,248,226,110, 0, 62, 77,105, 62,120,240,192,255,211, 79, 63,197,193,131, 7, 1, 0,187,118,237, 66, 96, 96, 96,131, +243,185,125,251,182,112,209,162, 69,254, 0,254,100, 96,253, 59,222,163,127, 26,143, 12,172,154, 30,187,205, 5,233,165,181,182, + 23,119,133,217, 12, 0,105,214, 94, 44, 49,149,126,222, 37, 80, 60, 36,250,208, 55,253,108,164, 2,124,188,238,189,236,194, 66, +205, 83, 34, 97,117,192, 32,195, 66,224,236, 36,141, 93, 49,163,139,111,105,185, 30, 63, 95,200,189,152,144, 70,173,114,133, 38, +164,210,179, 0, 30,221,240,195,218,146,192,215, 63, 60,187,127,255,231, 67, 58,207, 25,223, 25, 71, 99, 50,231, 0,216,210,184, + 66, 53,148,227, 64, 41,243, 40,168,189,230, 96,205,150,211, 31,199, 56, 74, 1,106, 6,181, 50, 62,113,233,210, 49,162,163,251, + 15, 15,177,149,137,190,154,250,246, 20, 7,115,113, 34,202,203, 88,228, 23,105,145, 85,232, 4, 86,222, 14,201, 9, 87, 89,161, + 64,208,108,252, 25, 17,160,130,154,181,246,206,114,185, 32,164,199, 59,158,229,241, 11, 43,100, 66,179,208, 41,252, 83,123,245, +221, 53, 15, 25, 67, 65, 37, 17,192,212,156,142,131,163, 99, 7,131, 38, 83, 88, 94, 86, 12,167, 78, 33, 24,250,252, 72,124,252, +102, 71,104, 52, 90, 20, 22, 95,161,237,219, 56, 18,253,205,189,248,240,181, 96, 20, 23,229,193,104, 6, 4, 21,250, 18,189, 81, + 95,217,152, 38,165,216, 52,251,189,185,175,180,241,110,101, 91,155, 44, 64, 57, 22, 93,194, 2,240,108,255,158, 56, 27,123, 5, +215,111, 38,131,163, 92, 77, 50, 1,139,156,130, 50,181,222,196,238,176,230,245,164, 28, 83,237, 9,173, 71, 77,220,149,213, 94, +166, 78,157,136,130,213,226,163,167, 66,236,223,156,247, 90, 27,123,123, 41,129, 94,206, 66,175, 55, 67,147,244, 53, 92,189, 59, + 65, 97, 99, 67,186,118,173, 18, 1,120, 34,253, 15,121,120,254, 41,140, 25, 51,198, 70,173, 86,199, 12, 31, 62, 60,100,208,160, + 65,138,126,253,250, 65,171,213,226,244,233,211,208,233,116,109,124,124,124,218,156, 57,115, 38,170,103,207,158,137, 62, 62, 62, +145, 63,254,248,163, 85, 49,178, 53,212,222,175,158,104,112,184, 84, 42, 69,108,108,236, 19,245,100, 73,165, 82, 92,187,118,205, + 98, 35,171, 46, 90,173, 86,210,186,117,107,184,186,186,130,101, 89,104,181, 90, 28, 57,114, 4, 21, 21, 21,224, 56, 14,114,185, + 28,107, 78,149, 67,127,255, 32,182,126,245, 41,202,203,203, 37,205,105, 22, 21, 21,145,160,160, 32, 24, 12, 6, 48, 12, 3,189, + 94,143,115,231,206, 61,122, 46, 18,137,176,236,160, 26,134,228,253,216,185,105, 13,138,138,138,158, 88,119,144,230,176,208, 22, +249,175, 64, 4,252,177,160,191, 99, 97, 44,203, 44,216,188, 99,127,236,130, 25,227, 48,253,181,129, 62,159,124,121,120, 80, 98, + 26,221, 9, 0, 33, 1,228,245, 9,195,218,251, 58,217,138,177,244,187, 27, 0,232,130,199,189, 94,124, 38, 77, 14,109, 71,230, + 28,142,201,138, 89,248,102, 87, 4,248, 56,116,104,215,142, 72, 83, 83,105,243,241, 62,156, 25,206,118,178,160,225,145,110,191, +128,114,112,178,147, 5,131,178,112,178,151, 5, 13,237,227,120,138,163, 20, 78,182,146, 96,218,128,167,171, 49,122,132,201,222, +150,139, 5,111,219,218, 59,249,206,158, 58, 65, 62,124,248,139,114, 91, 41, 69,113,226, 73, 84,208, 80, 24,109,109, 65,117,101, + 72,127, 16,207,158,186,112, 35, 87,230,234,249,126,179,211,100,113, 81,149,125,111,116,219,246,131,156, 10,111,124, 88,224, 63, +112,175,159, 0,172, 64, 27, 27, 85, 96,107, 31, 34,185,124, 59,158,225, 88, 92,105, 78, 71, 83, 81,145,105, 54,193, 83,111, 22, +219,167, 94,219,142,249, 19, 66, 81, 86, 90, 8,189,129, 65,153,150, 49,121,186,153,100,250,210,187, 48, 24, 25, 24, 76, 20, 98, +133, 18,103, 98,227,139, 56,198,124,170, 49,205, 84, 21,189, 5,192,174,238,177,118, 74,210,101,158,179,252, 22,216, 42,100, 61, + 84, 97,231, 79,177, 93,107,198,181, 28,202,128, 50,127,252,141,174, 13,126,111, 73,112,123,199,182,164,135, 92, 46,254,106,233, +252,225, 33,145,161,172,140,232,243, 64, 0, 40,108, 68, 48,216,176,112,180, 9, 0, 53,105,168, 78,175, 47, 75,136,255,255,107, + 17,196,195,243,159, 72,112,112,112,107, 71, 71,199,132,247,222,123,207,101,244,232,209,143,140,129, 29, 59,118, 96,253,250,245, +248,248,227,143, 97, 54,155,177,121,243,102,197, 79, 63,253,212,227,155,111,190,201,105,211,166, 77,104, 86, 86, 86,190, 5,242, + 4,128, 4,213,247, 46, 1,170,141, 43,118,233,210,165,244,227,143, 63, 70,221, 99,148,210,102,191, 84, 54,132, 84, 42,133, 84, + 42, 69, 82, 82,210, 19, 49,178,196, 98, 49, 36, 18, 9,164, 82, 41,238,223,191,111,181,145,197, 48,140, 48, 39, 39, 7, 21, 21, + 21,120,118,228, 72,172, 95,185, 18,253,250,245,195,160, 65,131, 64, 41, 69,116,116, 52,158,118, 78,134,203,200,103,112,239,222, + 61,152,205,102,139,118,166,114,114,114, 80, 92, 92,140, 33, 35, 71, 98,203,183,223,162, 91,183,110, 8, 10, 10, 2, 0,196,196, +196, 96,160, 87, 38,236,130, 6, 33, 57, 57,185,133, 43,183,158,191,211, 22,249, 59,248,219,203, 52,196,167,210,223, 67,252,201, +241,151,135, 71,140, 24, 57, 32, 4, 91,246,255,250,105, 72, 8,217, 15, 0,174,142,178,229,175, 13, 15, 64, 98, 90, 41,162,175, +169,142, 39,166,211,223,159,196, 53, 57, 22,110,174, 78, 10, 64, 32,133,206,200, 50, 14, 14,205,151, 61,224, 64,161,232, 56, 31, + 19, 70,223,243,233,217,201,199,135, 82,166, 38, 99,112, 45, 94,127, 62,197, 55, 34,212,195,183,122,203,203, 12,135,167,247, 2, + 92,131, 30,219, 63,209, 55,220,230,204,251, 51,103,244, 26, 62,242,101,185, 68,225, 10,174, 42, 27,230,146, 59, 40, 78, 63, 15, +131, 60, 28,133, 57, 25,216,127,244,231,242,164,116,117,133, 80, 40, 56, 43,114,244,152,123,238, 92,122,163,222,161, 90,244, 66, +172,248,120,241,130,225,251,247,236,115,148, 43,251,226,193,209, 97,101, 82,161, 89,230,238, 21,136, 42,198,158, 93,189,237,184, +147, 22, 88,217,156,142, 78, 91,113,232, 92,244, 47,227,218,123,246,177,207,136, 63, 14,157,206, 8,131, 25, 8,235,214, 31, 44, + 71,165, 68, 64, 56, 7,161,144,168,213, 37, 32,102, 78,125,233,102, 70,222,229,235,105, 66,131,160,121,237,186,136, 36,194,153, + 35, 7,117, 1,216, 42, 60,255,108, 24,214,109,139,158, 1, 96,146, 53, 26,127,129,154, 65,217, 42, 80,160, 79,168, 63,249,142, + 2,125,226, 78,173, 11,238, 62,116, 14, 96,133, 7, 43,204,159, 12,237, 20,172,220,190,238,211, 5, 46, 46,238, 62, 66,176, 85, + 32, 76, 5,229, 74,126,135, 72,251, 0, 14,222,195,193, 58,246,198,166,111, 87, 87,114, 28,221,223,146, 18, 21, 60, 60,255,100, +244,122,253,161,149, 43, 87,186,140, 24, 81,157,237, 94, 89, 89,137, 43, 87,174, 96,235,214,173,176,181,253,227,239, 36,165, 20, +195,134, 13, 3,165,212,101,201,146, 37,135, 0,244,106, 76,179,119,239,222, 35,215,174, 93,251, 48, 34, 34,226, 1,170,107, 28, + 73, 0, 8, 1,208,115,231,206, 9, 0,160, 71,143, 30,236,181,107,215, 56, 0,116,252,248,241, 98, 59, 59,187, 14,149,149,149, + 23,172,157,127,173,129, 37,149, 74,145,155,155,251,216, 70,150, 88, 44,126,164, 39,145, 72,144,155,155,107,149,145,197, 48,140, +232,196,137, 19,184,121,243, 38,150,118,237,138, 89,158,158,112,117,117,197,133, 11, 23, 64, 41,133,173,173, 45, 74, 74, 74,176, +127,255,126,244,239,223, 31, 12,195, 52,235,193, 2,128, 35, 71,142, 32, 46, 46, 14,203,186,119,199, 12, 91, 91, 56, 57, 57, 33, + 38, 38, 6, 0, 32,147,201,144,155,155,139,115,231,206, 33, 50, 50,178,165, 75,255,159,199, 98, 3, 43,146, 16, 17,241, 65,107, +179,169, 10,148,161, 0,129, 50, 36,132, 72, 18, 19,173,255,150, 32, 0, 62,220,176,237,248,240,117, 11,158, 39,147, 95,234,170, +252,228,155,243,211, 0,224,205,177,129, 94, 10,153, 8, 27,246, 39, 82, 1,240,161,181,186, 13, 17, 18, 66, 36, 2, 1,166, 61, +219, 59, 8,170, 34, 35,210, 30,150,255,154,152, 78, 45,218,210,137,222, 57, 1,187, 14,197,100,175,223,254,231,140,193,237, 71, +226, 30,174,217,169, 79,162,160,112,146,139,131, 39, 61,255,116,179, 89,132, 61,194,100,111,207,155, 51,167,215,168, 87,231,202, +205, 57,135, 97,200, 60, 1,176, 58,232,180, 4, 21, 76,123,228, 61,204,193,210,117,251,178, 13,102,193, 43, 55, 18,245, 86, 25, +150,201,201,180, 50, 36,128,140, 94,249,249,226,179,159, 45, 93, 98, 39,203,141,174, 16,139,160, 21,184,246, 19, 47, 95,188, 81, +164, 41, 55,190,152,154, 69, 53,205,233, 24, 4, 88,249,249,154, 47,135,191, 53, 97,116, 82,160, 79,164, 43,155,159,230,170, 43, + 47, 47,216,123, 42,174, 53,170,191, 57, 18, 0, 72,205, 40, 70, 97,137,150, 97, 25,243, 5,123, 19, 62, 73,200,177,192, 27, 88, + 67,128, 7,105, 53,122,120,231, 87, 91, 57, 73, 81,165, 45,133,187,179, 4,131,251,180,123, 53,192,131,204, 75, 83, 83,171,106, +140,212,165,118,139, 48,118,235,128, 96,112,166, 96,202,153, 97,204,218,109,189, 14, 48,103,206,184, 54,142, 46,182, 70, 1, 97, +181,128,216, 25,144,182, 34, 2,185, 31,132,114, 95,100,166,220, 96,230,188, 51,174, 56, 51, 51,255,123, 55,138,199,206,228,225, +225,249,167,145,149,149,245,218,194,133, 11, 47,247,236,217,211,195,205,205, 13, 97, 97, 97, 56,118,236, 24,222,127,255, 15,103, +124,120,120, 56, 0,160,184,184, 24,159,127,254,121,190, 74,165,122,173, 41,205,132,132,132,164,221,187,119,247,233,220,185,179, + 81, 34,145,148,162,198,200,202,202,202, 18,105,181, 90, 98, 52, 26,169,173,173, 45, 39,147,201,204, 99,198,140, 49, 93,187,118, +173,131, 86,171,205,106,201,252,107,141,161,238,221,187,223, 45, 43, 43, 43, 39,132, 60,118, 9,135, 90,227, 42, 56, 56,184,149, +209,104,100, 1,148,180,164,132, 3,195, 48,232,222,189, 59,206, 93,188,129, 83, 23,239,162,178, 48, 13,227, 95, 28,140,224,224, + 96,156, 62,125,186,165,211,171,214, 60,119, 25, 49, 55,238, 67,157,149,136, 9, 47,191,128,160,160, 32,156, 59,103,113,133, 36, +158, 6, 16, 1, 64,115, 46,185,142,109, 72, 23,143, 48,233,174, 15,159,111, 23, 34, 10,251, 24, 68, 36,199,225,237,199,122, 47, +248,236,187,164, 78, 94,100,252, 93, 11,178,189,234, 82, 19,152,188,239,118, 98,240,171,207,247,243,193,150, 31, 21, 31, 1,192, +216,103,253,113, 45,177, 16, 87,227, 11,246, 37,180,176,102, 81, 93, 58,121, 16, 5,108,177,239,243,185,163, 34,219,120,183,198, +214, 31, 46,131, 80, 28,178,228, 92, 74, 41,237,217,217, 23,235,183,215,207, 24,244,244, 93,179, 83,159,116,250,183,138,161, 0, +240, 92, 47,219, 83, 17, 29, 93,124,155,243,100,216,136, 5,147,135, 62,255,154,156, 81,159, 6, 87,242, 35,196, 82, 9,170,180, + 44,242, 10, 12,168, 82,200,241,235,165, 11, 85,149, 58,102,206,157, 20,166, 69, 94,187,196, 52,154, 22, 30, 72, 30,106,171,170, + 60,237, 92,218,105, 5, 4,180,210, 40,166,113,137,185,218,132, 44,122,223, 18,141,212, 84,106,236,229, 77,250,110,218,249,227, + 98,177, 88, 58, 86, 40, 4,113,119,178,109,245,221,134,101,176,183,183, 3,101, 52,160,134, 34,140,126,243,179,194,187, 15, 76, +254, 0, 16, 24, 72,236,250,117,145,236, 20, 9, 72,206,175, 55,141,139,154,187, 6, 17, 98,234,248,231,187,136, 57,179, 22, 51, +151, 28,192,166,229,207, 99,194,200,142,226, 19,191, 38, 79, 5,240, 73, 75,214, 14, 0,224,170,183, 8,123, 77,190,152, 68,128, +203, 20,232,115,227,248,242, 96,192,242,157,199,110,221,136, 88, 36, 34, 29, 59,122, 25,197,108,206,126, 16, 27, 47, 42,116,139, + 4,108, 59, 16,106, 23,134,175, 55, 44,174,220,178,117,235, 25,142, 96,105, 82, 70,211, 37, 47,120,120,254, 87,161,148,166, 57, + 57, 57, 13, 25, 54,108, 88,244,233,211,167, 93,194,194,170,219,205,197,197,197, 1,192,163,173, 40,181, 90,141, 87, 94,121,165, + 40, 47, 47,111, 8,165,180,201,152, 94,141, 70,147,126,248,240, 97,143,170,170,170,136, 69,139, 22,169,219,182,109,171, 49,155, +205, 84,163,209,128, 97, 24,218,170, 85, 43,113,183,110,221, 72,104,104,104, 85,116,116,180,107,118,118,182, 6, 64,102, 75,230, +255,214, 91,111,225,167,159,126, 2, 0, 60,137,186, 88, 18,137, 4,195,134, 13,243,186,114,229, 74,110,141,102,139,235, 98, 81, + 74,113,231,206, 29, 92, 74, 97, 33,181,117, 70,102, 82, 5,206,253,124, 20,227, 39, 79, 1,195,180, 60, 90,225,246,237,219,216, +127,238, 54, 60,188,218,161,220,112, 7, 71,142, 28,193,180,105,211, 30, 75,179, 37,252,147,182, 7,129, 58, 30,172,134, 22,212, +174, 29,145,202,140, 88, 50,248, 41,175,185, 99, 6,182, 19, 50, 58, 21, 56,142,131, 16,128,155,189, 0,219,182,108,242,255,241, +240,201,216, 78,190,194, 47, 97,228, 62,188,171,166, 58,139,175, 44,192,146,181, 59,126, 27,187,123,217, 51,162,105, 47, 5,187, + 0,128, 68, 44,192,134,125, 9, 12, 4, 88,242, 56,139,234,229, 77,108, 42, 37,152,220,218,207,241,163, 5,239, 12,119,137,236, + 25,136, 11,177,241,248,114, 79,236, 69,169, 51,118, 89,170, 67, 57,230, 79, 1,237,213,199, 26,112,126, 53,144, 89, 88, 31,150, +163,173,165, 10, 55,232, 51, 79, 66, 36,149,129, 97, 76, 40, 84,235,144,145,207,193, 70, 41,198,181, 59, 89, 85, 47,188, 58,250, +132,165,115,171, 15, 33,132,244, 9,183, 81, 46, 89,190,218,187,170, 74,195, 84,148, 21, 49, 34, 73,172, 72, 33,151, 89, 18,215, +240,136,216, 28,170,127, 38, 92,210, 13,148, 19,202,132, 84,183, 96,206, 68,219,220,228,211,104,223, 74, 5, 2, 10,185,114, 56, +236,109,133,146,190, 93, 36, 15, 1,192,207,213, 81,250,249, 39,239, 59,206,158,183,244, 82,115,218, 33, 33, 68,210, 41,176,245, +236,176,246, 46,184,112,245, 30, 46, 94,207, 74,184,248,123,114,104,255, 30, 74, 4,250, 59,205, 10, 9, 33, 43, 91,226, 17, 5, +240,104,139,176, 54,139, 48,204,159,132, 70,140, 88,212, 96,246, 96, 99,248,221, 4,151,236, 79, 65,136, 16, 20, 4,208,231,130, +201,222, 13,161,255, 12,122,232,232,242,170,173, 91,182, 46, 75,204,176, 46,233,130,135,231,127,145,178,178,178, 59, 10,133, 98, +112,151, 46, 93,118,204,156, 57,211,254,213, 87, 95, 85,190,245,214, 91, 2, 0, 80,171,213,220,250,245,235, 85, 95,125,245, 85, +121, 81, 81,209, 36,147,201,116,183, 57,189,154,192,156, 43,219,182,109, 43,188,124,249,114,232, 83, 79, 61,165,136,136,136,224, +220,221,221, 37, 58,157,142,205,206,206,174,138,141,141,101, 83, 82, 82, 28,203,202,202, 82, 0,164,182,100,251, 94,169, 84, 66, + 32, 16,124,226,227,227,179, 56, 55, 55,183,211,147,136,193,106,223,190,189, 18, 64,138,151,151, 87,123,107,183, 7,235, 35, 18, +137, 80, 90, 90, 10, 77, 78, 42,116,197, 69, 8, 18,234, 16,238,226, 6,123,123,251,199, 50,134,202,203,203, 33, 50,168,145,118, + 39, 11,101,249,153, 8,105,211, 29,182,182,182, 48, 24, 12, 45,214,108, 41,255, 20,227, 10,104, 98,139, 48,212,135, 76,115,150, + 98,253,196, 49,254, 18,255, 54,222, 48, 22,198,225, 86,106, 37, 22,125,223, 35, 81, 40,177, 55, 76,127,253,217,110,253, 7,181, +194, 51,145, 61, 72,219, 54, 78,179, 86,174,220,248,175, 80, 95,242,126,194, 67,186,193,146, 11, 39,164,210,244,142,254,100,235, +249,235,185, 83,189, 91, 85,129,130,226,252,141, 60,220, 77, 45,221,122, 47,157, 54,152,186,219,232, 92,219,147, 65, 34, 34, 56, + 64, 89,106,227,104,111,171, 9,239, 23,236, 54,168, 79,103,193,144,254, 17,144,136,128,203, 87,111, 99,206,242, 67,191,115, 82, + 58, 60, 46,206,178,237, 65, 80,238, 47,134, 83,117,198, 32,243,167,140, 65, 74, 41, 5,199,160,185,122,147, 66, 1,201,215,170, +111,180,150,218,135,192, 84,252, 43,212,234, 74, 36,164,153, 80, 9, 31,148,230,228,128, 82,246,225,146, 37, 63,182,248,127,136, +155,155,155,187,127,135,192,118, 95,109, 57, 8,147,161, 28,105,137,219, 81, 89,145,143,229, 43,126,110,231,237,237,253, 76, 78, + 78,206, 5, 75,181, 8, 72, 96,244,175,251,220, 65, 1,161, 72,134, 19,155,127, 64,145, 72, 14, 55, 71, 9, 56,125, 1, 38,191, + 61,222,113,216,240,241,142, 0,240, 48,245, 54,124, 93, 44,179,171, 77,101,136, 26, 59, 41,200, 9,172, 14,187,142,220,214, 11, + 8,134,236,250, 57, 33,181,127, 55, 39,155,177,207,182,113,254,100, 83,217,139, 0,246,181,100,253,148, 99,255,148, 69,216,146, +236,193, 31, 41,101, 59,250,147,212,125,231, 10,237,198, 12,235, 42,151,136, 8,161,250, 92,112, 68, 66, 54,124,179, 77, 35, 37, +216,220,146,185,241,240,252, 47,162,211,233,226, 8, 33,157, 62,248,224,131, 87, 22, 46, 92,216,207,214,214,214, 31, 0,180, 90, +109,186,217,108,190, 8, 96, 31,165,244,175, 53,110, 26,161,198, 96, 74, 33,132,164,167,166,166,122,236,218,181,203, 9,128, 77, +205,175,245, 0,202, 0,168,173,209,172, 79,173, 49,165, 84, 42, 23,183, 84,163, 62,181,198,148,151,151, 87,251,150,156, 47, 20, + 10, 89,129,160,186,179,143, 76, 38,195,165, 75,151, 48,180, 79, 95,220, 62,151,133, 96, 15, 31,244, 31, 63, 17, 71,206,159,135, + 80, 40,172, 29,111,213,125, 68, 36, 18,225,242,229,203,120,105, 68, 36,142, 28, 57,130,128,238, 93, 48, 99,198, 12,252,242,203, + 47, 16,137,248,110,122,143, 67,227,175, 30,197, 39,103, 15,124, 38, 1,103,198,193,189,171,112,246,186,206,120, 63, 23, 31, 6, +229, 96,253, 65,104,184,130,162,159,166,158,136, 73,251,226,141, 73, 35, 20, 3,158,121, 22, 3,250,245, 23,133,118,121,230, 35, + 0,143, 12, 44, 66, 72, 88, 83,181, 50, 88, 51,150,109,254, 41,105,202,129,147,201, 4,140, 6,227,158,143,160,172, 25,203,154, +154,112, 67,154,142, 10,187, 3,151, 47,197, 58,131,173, 68,126,198,121,155,214, 30,254, 0, 53,227,193,131,100,124,189,237, 8, + 23, 19,123,127,183, 81,136,153,169,137, 84,107,169, 38, 0,128, 99,224,104, 39,253, 75,198,160,147, 92, 28,252, 92, 47,219, 83, +148, 82,106,175, 16, 7, 55, 84, 27,171,190,166,222,204,109,222,189,115,203,234, 55,223,124,203,182,216,144,139,228,236, 4,232, +133, 94, 16, 42,218, 33,225,198,233,170, 42, 51,215,108,233,136,166, 94,207,162,162,162,130,184, 27, 37, 56,176, 99, 5,204,102, + 3, 10,242,170,109,212, 60,117, 5, 28, 28,188, 98,173,209, 52, 49, 92,121,212,232,201, 18,185, 13,228,227,199, 14,151,166,170, + 12,232, 26,100, 15, 0,160,166, 34, 36,197, 92, 66,127,247,234, 96,200,212, 36, 33,124,159, 82, 90, 52, 79,123,123,201,204,161, +125,189,144,158,149,143, 75,113,185, 59,211,114,169, 42,192,139,236, 76,125, 88, 54,117, 84,127, 95,172,219,157, 56, 3,141, 24, + 88,141,105,214,100, 11,246, 1, 53,131, 50,122, 80,160, 79,152, 63, 9,181, 36,115,176, 33, 77,145, 0,175,174, 61,144,185,232, + 96, 76,225,168,185,111,245,117,232,221,107,168, 20,156,153,106,116, 6,115, 98, 58,173,104,137,230,227,194,107,242,154,255,173, +154, 53,198,206,238,154,159, 39,169,169, 66,189,186, 76,143,163, 9,252,121, 59, 80,165, 82, 9,149, 74, 37,219, 92,144,187, 5, +154, 87,235, 60, 62, 89,227,189,106,210,139,213,128,166,170,103,207,158, 46, 35, 71,142, 4,195, 48, 72, 73, 73, 65, 86, 86, 22, + 70,190, 49, 9,206,206,206,184,154,152,136,148,148, 20, 44, 94,188, 24, 12,195,224,218,181,107,127,169,200, 94, 95, 83, 44, 22, +155,186,116,233, 34,121,225,133, 23,192, 48, 12,210,210,210,144,153,153,137, 25, 51,102,192,209,209, 17,137,137,137, 72, 75, 75, +195,226,197,139, 97, 48, 24,144,158,158,254,151,157,133,127,199,103,233,159, 70,227, 6, 22, 1, 11,206,140,242,235, 75,240,221, +113,152, 76, 12,130, 19,178,105, 70,157, 17, 27, 59,123,147, 99,119, 18,146,210,227,174, 14,144,162,226, 46, 0, 88,245,205, 33, + 57,155,230, 69, 4,137, 52, 96, 52, 14, 40, 60,133,140, 92, 77,101,114, 54,205,179,118, 17,148, 99, 9, 88, 29, 80,126, 3, 71, +142,199, 64,102,115, 11,215,111, 38,177, 87,226,146, 15, 8, 40,150, 37,102,208, 7,214,107, 82,216,117, 91,143,137,207,167, 86, +103, 12, 82, 51, 40,199,192,177,247, 62, 76,122,254,105,223,136, 96, 39, 95,112,102, 80,106,134,243,192,243,192, 34,155, 38,245, +174,197, 27,182,244, 13,183,121, 81, 83, 81,212,243,217,254,145,182,173, 2,199,162,252, 65, 34, 18,110,158,173,186,113, 55, 57, +246, 90,188,161, 89, 3,171, 41,188,188,188,250, 13, 28, 24,132,113, 19, 23,192,100, 40, 67, 90,194, 54,104, 42,242,113,233, 55, + 59, 36, 61,172,232, 5,224,130,165, 90, 87,226,205,161, 0,208,167,147,228,161,131,212,216,250,181,151, 70, 64, 38,210,131, 51, +107, 64, 76, 69, 72, 45, 49,149,191,184, 36,135, 5, 0,133, 13, 17,217,138,202, 29, 44,209, 13, 9,112,237,160,144,152,177,235, +104, 2, 56, 82,221,102,137, 35,216,184,235, 88,234,212,101,211,187, 34, 36,192,185, 75,237, 6,188,165,115,165,192,191,110,252, +188, 52, 88,159,240, 17, 40,103,198,229, 47,156,131,251,126, 80,250, 47,180,176,194,250,221, 84,154, 11, 96,106,199, 54,100,211, +172, 79,127,249,168,123, 88, 98,159,247,166,142,114, 0,225, 27,163,243,240,240,252,253,232,116,186, 41,243,230,205,219, 36, 20, + 10, 91, 1, 32,148, 82, 24, 12, 6,209,214,173, 91,197, 12,195, 8,132, 66, 33,107, 99, 99,195,196,197,197,153, 57,142, 43, 52, +153, 76, 83,154,211, 52, 26,141,169, 95,127,253,117, 59,179,217,252, 40,227,208, 96, 48, 96,247,238,221, 48, 24, 12,144,201,100, +176,179,179, 67, 90, 90, 26, 8, 33, 38,150,101, 83,255,173,139,252,135,210,212, 77, 99,105,239,168, 37, 75, 64, 65, 64,240,113, + 61,227, 10, 0,112, 39,135,170, 66,125,200,156,208,240,103,170, 99,166, 8,150, 90, 59, 1, 61,203,190, 20,209, 45,112, 63, 0, + 24, 56,118,130,181,231, 3, 64,133,190,106,108,120,143, 94, 7, 56, 74, 69, 12, 75,183, 10, 4,248, 73, 15,220, 75, 77,111, 62, +115,174, 49, 84,121,101,113, 67,251, 56,210,218, 22, 56,143,182, 5,107,202, 49, 80, 74,255,104, 67,183,200, 6, 69,197,134,102, +163,169, 47,221,210, 63,215, 35, 76,246,246,233, 11, 55, 39,179, 28,109, 45, 20,144,124,189,153,219,252,184,198, 21, 0,228,228, +228, 92, 8, 9, 32,103,238,244,241,120,206,173,166,204,106, 81, 25, 80, 84,142, 51, 57, 57,154, 11, 45,209, 44,173, 50,143, 90, +248,197,209,159,165, 34,161, 8,160,224,184,234,245,234, 77,108, 73,173, 17,214,249,255,216, 59,239,240, 40,170,182,141,223,103, +182,101,147,108,122,221,146,132, 36, 36, 33,161,134,208, 67, 7, 33,161,136, 32,138,136, 40,136, 40,160,188,190,160,130, 2, 34, + 2, 2,162,136, 8, 34,160, 47,160, 72, 47, 74,239, 77, 58,129,132, 18, 66, 11,105,155,205,166,144,190,125,103,206,247, 71,216, + 24, 32,101, 3, 40,202, 55,191,235,218,107,179, 83,238,125,102,119, 51,115,207,115,206,115, 78, 56, 81,124,248,163,117,157, 64, + 64,210,235,210, 59,115, 73,243,205,144, 15, 15,124,112,229,102,225,143,119,178, 42,238,124,238,100,209,203, 97, 74, 50,237, 86, +102,233, 7,151,111, 22,126, 85,223,126, 19, 4, 88,210,250,249,233, 15, 45,171,143, 70,117, 36,167,211, 68, 0, 3,155, 4,147, +231,134,140,249,110, 34, 33,245,187, 91,230,225,225,249,119, 99,203, 98, 49, 12,243,232,197, 55, 15, 96,203, 98, 1,184, 89,143, +125,206, 0,104,246,164, 98, 0,128,132,132,132, 2, 0, 5, 79, 82,147,231, 97,200, 95, 57,140,207,179,144,226,126, 66,154,204, + 99,202,113,213,104,214, 72,120,120, 56,189,121,243,166, 93,157, 5,255,165,159, 39,175,201,107,242,154,188,230,227,104,254, 21, +231,228,199,237,156, 77,171,209,124, 34,252, 91, 52,159, 53,248,102,143,191,135, 58, 7, 54,125,146,220,184,113,227,153,169,194, +224,225,225,225,249, 11,248, 43,206,201,252,160,195, 60,247,241,184, 46,158,135,135,135,135,135,135,135,135,231, 1, 8,128,166, +213,173,168, 79,234,143, 16, 82,173, 70,109,212,165,207,107,242,154,188, 38,175,201,107,242,154,188,230,179,167, 89,151,246,179, +210,244,200,247,193,226, 53,121, 77, 94,147,215,228, 53,121, 77, 94,243,169,107, 62,107,240, 77,132, 60, 60, 60, 60, 60, 60, 60, + 60, 79, 24,222, 96,241,240,240,240,240,240,240,240, 60, 97,120,131,197,195,195,195,195,195,195,195,243,132,225, 13, 22, 15, 15, + 15, 15, 15, 15, 15,207, 19,134, 55, 88, 60, 60, 60, 60, 60, 60, 60, 60, 79,152,191,180,138,144,135,135,135,135,135,135,135,231, +255, 35, 12, 0, 16, 66,232,189, 71,151,167, 28, 15, 15, 15, 15, 15, 15, 15,207,255, 67,158, 53, 47, 82, 57, 85, 14,165,148, 16, + 66, 40, 30,127, 62, 37, 30, 30, 30, 30, 30, 30, 30,158,122,243, 44,121,145,202, 62, 88,247, 14,168,235, 83,140,133,135,135,135, +135,135,135,231,255, 49,207,146, 23,185, 47,131,245, 52, 3,225,225,225,225,225,225,225,249,255,205,179,228, 69,248, 42, 66, 30, + 30, 30, 30, 30, 30, 30,158, 39, 12, 95, 69,200,195,195,195,195,195,195,195,243,132,225, 51, 88, 60, 60, 60, 60, 60, 60, 60, 60, + 79,152,191,212, 96, 17, 66,154,242,154,188, 38,175,201,107,242,154,188, 38,175,201,107,254,127,131,207, 96,241,240,240,240,240, +240,240,240, 60, 97,120,131,197,195,195,195,195,195,195,195,243,132,225, 13, 22, 15, 15, 15, 15, 15, 15, 15,207, 19,134, 55, 88, + 60, 60, 60, 60, 60, 60, 60, 60, 79, 24,222, 96,241,240,240,240,240,240,240,240, 60, 97, 8,128,106, 43, 1, 40,165,151,237, 22, +121,132,106,130,186,244,121, 77, 94,147,215,228, 53,121, 77, 94,147,215,124,246, 52,235,210,174,143,255,248, 39,243,151, 14, 52, + 74, 8,105,250,164, 63, 40, 94,147,215,228, 53,121, 77, 94,147,215,228, 53,159, 61,205,103, 13,190,137,144,135,135,135,135,135, +135,135,231, 9,243,212, 12, 22, 33,132, 33,132, 8,239, 61, 24, 66,200, 99, 79,240,248, 87,104,242,240,240,252, 51, 33, 15,240, +180,227,225,225,249, 55,115,254,252,121,154,159,159, 79,229,114,249, 53, 66,200,152,167, 29,207,179,128,240, 73,138, 53,242,117, +108,215, 32,192,167,239,238,243,233, 83,106,219,142, 16,194, 40,149,202,185, 62, 62, 62, 99,116, 58,157, 1, 0,101, 24,134, 70, + 69, 69,129, 16, 2,219,185,146,101,217,188,107,215,174,217,213,254,251, 36, 53, 35, 34, 34,206, 51, 12,163,170,122,206,174,235, +111,142,227,178,174, 94,189,218,170,174, 56,229,114,121,111,134, 97, 38,215,181, 29,199,113,115, 53, 26,205,222,218,182,105,214, +172,217, 5,103,103,103, 63,134, 97,106,188,184, 84,109, 2,182, 90,173, 84,167,211,105,175, 92,185,210,178,174,247,127, 16,165, + 82, 57,133, 82,218, 18,192, 42,141, 70,179,139, 82,202,214, 87,227, 1,189, 23, 41,165, 83, 1,128, 16, 50, 75,173, 86,111,174, +207,254,225,225,225,231,197, 98,177, 74, 32, 16,144,123, 26,247,173,127,240, 53,199,113,212,100, 50,101,165,164,164,212,249, 29, +241,252,243, 33,132,144,128,128,128,104, 63, 63,191, 96,189, 94,207, 2, 64,147, 38, 77,168, 64, 32,184,111, 59,179,217,108,190, +118,237,218,174,167, 18, 36, 15,207,191,136,253,251,247, 99,244,232,209,184,116,233, 82,163, 93,187,118,125,175, 80, 40,198,105, + 52,154,110,148,210,188,167, 29,219,191,149, 39,102,176,194,228,178, 70,254,222, 94, 59,230,205,158, 1, 0, 53, 26, 44, 66, 8, + 35,151,203,231,117,234,212,105,228,154, 53,107,156,183,110,221,234, 28, 28, 28, 12,177, 88, 12,129, 64, 0,129, 64, 0,134, 97, + 32, 16, 8, 48, 96,192, 0,187,238, 74, 31,212, 60,120,240,160,115, 68, 68, 68,229, 69,150, 82, 90,105,178,250,244,233, 83,167, + 38,195, 48,170, 11, 23, 46,248, 74,165,210,202,253, 57,142,187,239, 65, 41,173,124,176, 44,139, 78,157, 58,217, 19, 42, 24,134, +153,156,156,156,220,185,188,188,252, 62, 13,219,123,216,254,238,220,185, 51, 0,212,106,176, 24,134, 81,156, 56,126,208,151,152, + 83, 1,235, 93, 80,129, 39, 32, 9, 1, 24,135,106,183,191,123,247, 46,186,117,235, 38,168,118,101, 29,248,248,248, 12, 63,114, +228, 72,216,157, 59,119, 94,248,226,139, 47, 10, 20, 10,197,247, 0,126,202,206,206,206,124, 20, 61, 74,233,172,212,212,212,112, + 74, 41, 66, 67, 67,103, 2,168,151,193, 18, 8, 4,170,253,251,247,251, 74, 36,146,202,239,185,166,103,150,101, 97, 54,155, 17, + 23, 23,103,125,148, 88,121,254, 89,216,204, 85,124,124,124,208,210,165, 75,133,201,201,201,194,168,168, 40,176, 44, 91,249,224, + 56,174, 94,255,151, 60, 60,255, 31, 9, 26,244,227,247,156,213,124, 47, 91,229, 14, 96, 57, 74, 75, 75, 49,106,212, 40,252,246, +219,111, 81,237,218,181,155, 11, 96,228,211,140,241,223,204, 19, 49, 88, 13,149,142, 74, 23, 7,231,125,203,126,248,142, 88, 74, +181, 30, 53,109, 71, 8, 97,252,253,253,103,117,234,212,233,181, 53,107,214,120, 16, 66,112,240,189, 55,225,110, 54, 64,241,233, +151,240,240,246,129,105,242,104,184,176, 86, 52, 59,148,104,215,123, 87,167,153,146,146,130,187,119,239,194,199,199, 7, 78, 78, + 78,112,112,112,128, 88, 44,134, 68, 34,177, 87, 19, 82,169, 20,251,247,239,135, 80, 40,172,124, 8, 4,130,106, 95,251,249,249, +217,247, 65,161, 34, 51, 21, 25, 25,217,252,250,245,235,174,133,133,133,104,223,190,125, 9, 33, 36,201,182,158, 82,218, 60, 41, + 41,201,213, 94, 61, 98, 78, 69, 89,198, 15,160,133,155, 1,247, 65, 96, 93,135,192,128,144,251, 46, 50, 54, 83,200,178,143,158, +116,202,203,203, 51, 31, 59,118, 12,209,209,209, 88,191,126,189, 87, 97, 97,225,167,171, 86,173,154,170, 80, 40,166,100,103,103, +207,125, 4, 73, 79, 0, 72, 73, 73, 1,128, 26,127, 51,181, 33,145, 72,112,250,244,105, 80, 74, 43, 77, 57,195, 48, 96, 24, 6, +219,111,122,163,220,196, 64,167,189,140,241,253,131, 16, 28, 28,252, 80, 86,139,231,223, 7, 33,132,200,229,242,230,189,122,245, + 10, 88,186,116,169, 24, 0, 46, 95,190, 12,141, 70, 3, 95, 95, 95, 72,165, 82,136, 68, 34, 8, 4, 2,136,197,226,167, 29, 46, + 15,207, 63, 26,206,106, 30,211,162, 85,135,202,215,171,247, 47,130,209,173, 37,212,159,125,134,133, 11, 23, 34, 60, 60,188,205, + 83, 12,239, 95,207, 99, 27,172,166,129,110,238, 14, 68,180,239,199,165, 11, 36, 48,151,123,164,156, 59,129, 38,241,111, 3,184, +191,212,242, 94, 31, 9,198,207,207,111,236,218,181,107, 93,109, 23,187, 8,194,194, 29,102, 52,104,220, 24, 78,110,238,208, 90, +205,160, 22, 51, 36, 98,113,181, 23, 68,123, 52, 25,134,129, 72, 36,186,239, 33,145, 72, 80, 53,219, 81,147,102, 85,108, 38,106, +255,254,253,176, 88, 44, 24, 60,120,112,181,102,171, 58,106,210,212,104, 52,123,149, 74,101, 18,165,180, 51,199,113, 32,132, 36, +169,213,234, 46,182,245,114,185,188,119,139, 22, 45, 38,115, 28,247,144,105,121, 80,147, 82, 10, 88, 11, 64,239,174,133, 75,251, +124,148,156,242, 6,113,238, 9, 22, 65,184,124, 51, 7, 7,207,167, 33,255,110, 25, 98, 34,124,209,171,125, 40, 56,142,179, 59, +206,170, 40, 20,138,240,198,141, 27, 71, 90, 44, 22, 28, 59,118, 12, 44,203,162, 89,179,102, 24, 49, 98, 4,179,104,209,162, 17, + 0,238,139,213,206,202,146,196,132,132,132,158, 57, 57, 57, 0,112,169,174,141,171,211, 36,132,224,231,159,127,134,193, 96,120, +104,123,143, 46, 95,224,131, 65, 65, 24,241,222,106,124,121,125, 35,150, 44, 89,114, 95,115,105, 61,226,172, 23,188,230, 95,175, + 41,151,203, 67,150, 47, 95, 46,170,186, 76, 44, 22, 87,102,193,171,102,195, 31,108, 50,252, 59,227,228, 53,121,205,127,186, 38, + 35, 20, 47, 77, 60,127,114, 12, 0,148, 36,111,193,127,134,118, 64,105,233, 77,188,243,206, 52,168,213,106,220,184,113, 35,225, +239,140,243, 89,163,210, 29, 16, 66, 40,165,180, 94,183,248, 42, 21,145,186,176,142, 59,190,255,102,174,155,139,204,201,231,252, +190,109, 72, 79,207,169,117, 31,157, 78,103,250,237,183,223,176,111,220, 72,132, 19, 43, 60, 62,157, 15, 95,133, 2,197, 35, 7, +160,204, 98, 70,195,221,103,225, 32,147, 65,226, 44,179, 59,227,160,211,233, 76,135, 15, 31,198,149, 43, 87, 32, 20, 10, 33,147, +201,224,236,236, 12, 7, 7,135, 74, 99,101, 59, 1,219,171, 73, 41,133, 80, 40,196,229,203,151,145,158,158, 14,119,119,119,156, + 56,113, 2, 61,123,246,188,207, 92, 9, 4,130,251,250,120,217,139,173,105,241, 65,238,245,187,170,181,105,240, 62, 68,222,128, +231,107, 40, 61,173, 0, 60,134,193, 66,221,192, 81, 14, 23,111, 22,224,237, 97,125, 1, 0, 99,167,254,128,158,109,131, 43,155, + 32,235,131, 82,169,124,187,121,243,230, 11,198,140, 25,195, 56, 59, 59,195,104, 52,194,104, 52, 34, 37, 37, 5, 94, 94, 94,112, +114,114,122,164, 52, 1,165,244,142, 66,161,128, 84, 42, 5,165,244,206,163,104, 16, 66,176, 97,195,134,106,215,189,177,224, 42, +132, 21,221,179,176,116,233, 82, 88,173, 86,212,247,247,205,243,207, 68,167,211,177,201,201,201,162,196,196, 68, 8, 4, 2,184, +186,186,194,201,201, 9, 98,177, 24, 14, 14, 14,149,198,138,207, 96,241,240,212, 78,250,150, 81, 99, 9, 33, 51, 3, 3, 3,143, +254, 48,103, 78, 88,143, 30, 61, 0, 0, 7, 15, 30,196,255,134, 14,197,103,192,240, 69,132,104,198, 83,250,241,223, 21,211,163, +120,145,127, 42, 66,224,207, 3,170,207,129, 17, 66, 72, 67, 63,151,141, 51, 62,121, 55, 56, 48, 36,212,255,204,206, 13, 72, 77, + 85, 67,171, 45,172,118,251,123,111,192, 17, 66,184,144,144, 16,184, 90, 12,112,163, 38,248,202, 21,112,241,244, 66,161,229, 94, +230,202,217, 25, 18,103,153, 93, 39,199,170,154,141, 27, 55,134, 86,171,133, 88, 44,134, 76, 38,131,139,139, 75,165,193,178,153, + 43,123, 79,184,132, 16,112, 28, 7,161, 80,136,164,164, 36,116,236,216, 17, 1, 1, 1, 88,191,126, 61,122,247,238,253, 80, 22, +235, 81,154,158,108,125,174,108,216, 58,191,219,211,185,253, 62, 36, 13, 97,117,121, 25,140, 83, 15,152,169, 43,140, 84,126,175, + 73,144, 98,231, 89, 45,174,167,231,223,215, 92,104, 47, 42,149, 74, 33,149, 74, 87,207,156, 57,179,123,171, 86,173, 96, 54,155, + 1, 0, 78, 78, 78, 48, 26,141, 16,137, 68, 48,155,205,208,235,245,106,251,143,250,201, 97,251,204,247,237,219, 7, 66, 72,165, +209,181, 53, 21,150,107, 50, 49, 98,252, 26, 72,132, 64, 82, 82, 18, 34, 35, 35,159, 70,152, 60,127, 17, 17, 17, 17,200,205,205, +133, 64, 32,128,139,139, 11,155,116,163, 79, 0, 0, 32, 0, 73, 68, 65, 84,156,157,157,209,168, 81, 35,100,102,102,222,151,197, +226,225,225,169, 29,129, 64, 48,119,219,182,109, 97, 82,169, 20,179,103,207,134,139,139, 11, 78,207,156,137,255,137,197,112, 4, +176,212,108,158, 12,224,111, 49, 88,143,226, 69,254,201, 60,114, 19,161, 74,165,250,186, 93,108,219,206, 33,141, 91, 75,207,236, +217,130,155, 55,210,145,159, 95, 12, 10,232,107,217,141, 18, 66,168, 72, 36,130,239, 71,159, 35,176, 89, 51,232, 70,191,136, 66, +139, 25,161, 59, 79,195, 65, 38,195,181,231, 90,130,154, 76,232,148,172,181,215,184, 80, 66, 8, 5, 0,111,111,111,136,197, 98, + 72,165, 82, 72,165,210,202,190, 87, 85, 31,246,154, 33,142,227, 80, 82, 82,130, 59,119,238, 96,244,232,209,112,114,114, 2, 33, + 4, 90,173, 22, 65, 65, 65, 16, 8, 4, 80,171,213, 56,116,232, 16, 66, 66, 66, 32,145, 72,234,245, 99,168,210,169,189,185, 82, +169, 60, 74, 8,105,126,254,252,121,215, 86,173, 90, 1,245,201, 96, 17, 49,140, 8, 2, 11, 21, 56,250,103, 95, 43,139,245,254, +254,220, 54,147,101, 15,254,254,254, 81, 77,155, 54, 61,245,221,119,139, 92,124,125,253,192,113, 44, 44, 22, 11,138,139, 75,160, +211,233, 16, 24, 24, 8,103,103,103, 58,127,254,124,194,178,236,210,122, 28,246, 19,197,102,168,108, 25, 68, 91,255, 43,134, 97, + 48,254,249, 64, 20, 22,186, 64, 32,168,120,109,239,177,243,252,179,161,148,210,166, 77,155, 82,129, 64, 0, 95, 95,223, 74, 51, + 37, 18, 85,180, 24,250,249,249,161,164,164, 4, 2,129,160,114, 25, 15, 15, 79,205,132,135,135,199, 40,149, 74,188,255,254,251, + 48,172, 93,139, 50, 0,253, 0,108,187,119, 83,237, 2, 76,124,170, 1,254,139,121, 36,131,165, 82,169,222,109,209,162,197,168, + 21,171,214,200,230, 77,251,168,164, 48,249,146,192,164, 55, 59, 27, 45, 22,211, 45, 77,193,162,154,246,163,148,210,200,200,200, +138,187, 78,119, 15, 56,185,186,193,248, 64,230,138,154, 76,224,204, 38,136,237, 60, 57,218, 52, 41,165,112,116,116,132, 68, 34, +169, 54,115, 85,159, 12, 22, 0, 20, 21, 21, 97,195,134, 13,104,211,166, 13,156,156,156, 32, 16, 8,208,188,121,115, 36, 39, 39, + 35, 52, 52, 20, 0,176,109,219, 54, 12, 26, 52, 8, 55,111,222, 68, 84, 84,148,204,110,113,252,217, 68,184,111,223, 62, 87, 74, +105,103, 74, 41,242,242, 30,173, 26,150,101, 89,148,151,151, 99,223,190,125,200,206,206,134,191,191, 63,138,139, 93,224,170,168, + 48, 21, 85,171, 31,237,129, 16,242,209,155,111,190,233, 34,147,201,192,178, 86,136, 68,162, 74,227, 42, 18,137,145,146,146,130, +161, 67,135, 22,167,165,165,125,152,157,157,189,182,190,241, 18, 66,136, 74, 37,247, 43, 46, 46, 68,105, 73, 17, 4, 2, 4, 16, + 66, 4,143, 50,244, 3,195, 48,149,207,182, 7, 33, 4, 98,145, 0,254,126, 62,149, 29,223,239,101,239,254,245,119, 68, 60, 21, +176, 44,139,115,231,206,225,216,177, 99,248,227,143, 63,112,231,206,159,173,204,174,174,174,216,191,127, 63,186,117,235,246, 20, + 35,228,225,249,119,112,227,198,141,179,233,233,233,145,211,166, 77,195, 74,165, 18, 46, 46, 46,152, 48,125,250, 41,171,213,218, +161,238,189,121,106, 67, 8, 0,245, 73,201,169, 84,170,129,114,185,124,222,154, 53,107, 28,179,179,179,161, 8,111,226,186,125, +211, 6,163,175, 76,172,215,220, 45,124,253,162,186,172,206,114,123,134, 97, 96,157, 57, 1, 5, 86, 19,130,183,159,132,131, 76, +134,235,189, 91,129,154, 76,232,144,144, 6, 7,153, 12, 66,169, 99,189, 15,166,186,140, 85,213,135,237, 98, 92, 23, 38,147,201, +189,103,207,158,232,209,163, 7, 94,124,241,197,202,166,192,232,232,104,172, 91,183, 14, 3, 7, 14, 68, 98, 98, 34, 20, 10, 5, + 26, 53,106,132, 70,141, 26,225,240,225,195,245,138,213,150,193,234,221,187,119, 9, 33, 36,137, 82,218,252,236,217,179,118, 87, + 15,218, 52,128, 10, 3,181,111,223, 62,244,237,219, 23,161,161,161,184,112,225, 2,246,127, 62, 31, 66,153, 55,192,248,130,114, +180, 50,179,101, 79, 31, 44,177, 88,220, 49, 36, 36, 4, 57, 57, 90, 56, 56, 56,192,195,195, 29,142,142,142,112,112,144, 98,206, +156, 57,220,242,229,203, 23, 19, 66, 62,207,206,206,190, 91,175,131, 6,160, 82,169, 26,182,104,209,226,231,215,135, 15,107,235, +229,229, 13, 63, 63, 57, 38, 79,250, 56,110,237,186,245, 87,148, 74,229, 43,106,181,186,206, 14,239, 54, 8, 33, 48,153, 76, 16, + 8, 4,216,118,221, 7,229, 38,130,146,172, 4,252,231,249,160, 74,179,101,107,234,181, 13,127,193,243,108,192,178,108,229,119, + 92, 29, 53,117,112,231,225,225,185, 31,150,101, 39, 15, 24, 48,160,245,236,217,179,163, 38, 76,152, 0, 0, 80, 40, 20,237, 21, + 10,197,213,191,123, 28,172,103,169,121, 16,168,146,193,170,235,192,186,118,237,186,194, 98,177,188,224,236,236,236, 49,106,212, + 40,115,126,126, 62,182,110,221,138,255,253,239,127,186,114,139,224,124, 81,129,117,248,237,236,178,172,186,222,208,214,148, 35, +182, 88, 64,173,127,102,174, 56,163,177, 50,147, 37,114,116,170,215, 65, 16, 66, 64, 41,173,214, 84,217, 50, 89,245, 57,217, 58, + 56, 56, 20,253,241,199, 31,190, 89, 89, 89,247,117,104, 15, 14, 14, 6, 0,156, 61,123, 22,167, 79,159,198, 43,175,188, 2,161, + 80, 8,177, 88,140,164,164,164,210,250,196,108, 51, 60,182, 42, 66,185, 92,222,187,109,219,182,213, 86, 15,218,163,149,145,145, +129,208,208, 80, 24,141, 70,184,187,187,163, 64,115, 7, 25,119, 82,161, 51, 94, 71,136,191, 20,185,185,185,112,112,168,126,124, +172, 7, 97, 89,150,181, 93,184,140, 70, 35, 52,154, 28, 40, 20, 10,252,242,203, 26,172, 88,177,226,149,236,236,236,141,245,141, +145, 16, 34,148,203,229, 19,251,245,235, 55,235,133, 23, 94, 16,234,202,203, 64,185, 10,195, 35,150,136,241,237,183,223, 54, 58, +116,232,208, 69,165, 82,249,133, 84, 42,157,117,235,214, 45, 83, 29,122, 0,128,149, 43, 87, 2, 0,156,218, 77,199,228,151, 26, +224,181,177,171,241,245,215, 91,238, 59, 86,129, 64,128, 25, 51,102,212, 55,100,158,127, 56, 61,123,246, 68,239,222,189, 43,155, + 9,189,189,189, 97, 54,155, 97,181, 90,121,115,197,195, 99, 7, 65,131,126,252, 94,213,127,201, 24, 0,152,248,237, 65, 76,153, +249, 13,134,189,216, 27, 35, 70,140,120,106,227, 96, 61, 75, 38,235,190, 38,194, 90,204,213, 27, 30, 30, 30, 67, 71,142, 28,233, +120,246,236, 89,204,156, 57, 83,184,127,255,126,243,185,115,231,172, 44,203, 78, 84,171,213,203,234,243,166, 12,195, 32,100,205, + 78, 40,252,253,113, 35,174,245,125,153,171,163,205, 85,224,140, 70, 60,151, 90, 92,239,131,177, 53,101,217,140,149,205, 92,213, + 52,148, 66,109,216,238,128, 31, 28,247,234,157,119,222,193,138, 21, 43,208,161, 67, 7,132,133,133, 65, 40, 20, 86, 54, 75,213, +135, 7, 59,185,215,187,122,176, 10, 44,203, 34, 48, 48, 16,151, 46, 93,130,155,155, 27,126,254,249,103, 4,168,148, 24,222, 43, + 24, 38,147, 9, 22,139, 5,229,229,229,182, 12, 86,157,129,114, 28,119,101,235,214,173,161, 47,189,244, 18, 21, 10,133,196,104, + 52, 2, 0, 22, 45, 90,148,155,157,157, 93,175, 1, 65,129,138, 81,219, 67, 66, 66,126,122,229,149, 87, 92, 26, 53,106, 4,173, + 86,139, 51,103, 78,225,227,143, 39,159, 17,137,132,134,184,248, 62, 93,163,162,154, 96,236,216,177, 76,116,116,244,212,143, 63, +254,120, 98, 64, 64,192,136,204,204,204,234, 75, 4,239, 65, 8,193,186,117,235, 0, 0,111,126,123, 13, 38,147, 5, 64, 69,213, +160,191,191,255,125,219,222,186,117,139,175, 34,124,134, 96, 89,246,190,106, 65,155,161,226,205, 21, 15,143,253,220, 55, 14, 86, +171, 14, 56,177,101, 62,214, 93, 15,132,122,230,204,167, 58, 14,214,179,114,174,174,211,121,180,109,219,214,197,104, 52,126,251, +223,255,254,215,177,188,188, 28,249,249,249, 40, 40, 40,192,153, 51,103,246, 91, 44,150,255,104,181,218, 26, 75,236, 73, 53,179, +109,219, 42,190, 60,125,124,225, 32,115, 1, 53,153, 42, 51, 87, 98, 39,103,112, 70, 35, 56,179, 9,168,161, 57,167, 38, 77, 66, +200, 67, 89, 43,123,205,213,131,154,182,140, 88,117,131,138, 6, 4, 4,224,139, 47,190,120,104,152, 6,123,226, 4, 42,170, 5, + 9, 33,205, 1, 84,118,114,151,203,229,189,237,169, 28,172, 73,147,227, 56,116,233,210, 5,251,247,239,199,165, 75,151,192, 48, + 12,226,227,227, 65, 8,129,155,155, 27,132, 66, 97,165,153,179, 21, 4,212,166,201,178,236,107,255,251,223,255, 62,216,189,123, +247, 71,239,189,247,158, 99,231,206,157,109,253,188,242, 40,165,117,118,228,122, 80,147,227,184,207,146,146,146, 92,172, 86, 43, +102,207,158,141,243,231,207,151,223,186,117,235,191, 26,141,230, 39, 74, 41,149,203,229,195,110,223,190,179,228,211, 79, 63,117, +233,222,189, 59,206,158, 61, 43, 13, 8, 8,248, 20,192,134,154, 52,109,156, 57,115, 6, 2,129, 0,214,187,233, 24, 59,121, 61, +100, 78, 34,164,164,164,160,160,160,160,242,183, 86, 83, 83, 82, 77,154,143, 3,175,249,247,105, 86, 53, 87, 34,145, 8,122,189, +222, 46,115,245, 44, 28, 59,175,201,107, 62, 9,205,199, 25, 7,235,175,136,243, 89,163, 78,247,161,211,233,102, 70, 68, 68, 72, +146,147,147,113,235,214, 45, 92,191,126, 29, 44,203,222,204,202,202,234,247,168,111,202, 48, 12,220,220,220, 32,145, 72,208,254, +146, 26, 18,177, 24, 18,231,138, 62,226,207,165, 22, 3,148,130,145,216,215,156, 85, 85,243,193, 49,175, 30,167,138,136,101,217, +202, 17,218,109, 6,174,186,106,181,250,102,174, 24,134,153,124,234,212, 41,215,244,244,116, 80, 74,177,101,203, 22,215, 23, 95, +124,113, 50, 30, 33,123, 69, 41, 69, 65, 65, 1, 56,142,131, 72, 36, 66,247,238,221,209,178,101, 75,148,149,149,129,101,217,202, +230, 75,177, 88, 92,175, 42, 66,173, 86,171, 3, 48,195,199,199,103,217,212,169, 83,103, 52,109,218,116,212,251,239,191,207,224, + 17,139, 34, 8, 33, 86,171,213,138,141, 27, 55, 98,243,230,205,165,148,210,136,236,236,236,202, 1,211, 52, 26,205, 26, 63, 63, +191,253, 3, 7, 14,188,121,251,246,109,215,226,226, 98, 0,168,115, 90, 27,157, 78,135,176,176, 48,176, 44,139,121, 99, 85, 40, + 45,109, 6,150,101, 97,181, 90,225,228,228,116,223, 20, 68,252, 40,238,207, 30, 85,205, 21,223,231,138,135,167,254,164,111, 25, + 53, 22,192, 88, 66,200, 43,211,167, 79, 95, 59,118,236, 88,112, 28,135, 35, 71,142, 96,201,164, 73,248,140,101,135, 47, 34, 68, + 55,158,210,177, 79, 59,214,127, 35, 53, 94, 48,219,180,105,211,160,188,188,252,103,139,197, 18,205,113,156,228,232,209,163, 48, + 24, 12, 72, 78, 78,214,115, 28,183,233, 49,222, 51, 61, 62, 62,158,121,112,190,184,234, 96, 89,214,222,206,117,233, 61,123,246, +124, 98,154, 28,199,101, 85,157,195,172, 38,221,170,175,173, 86,107,157,253,207,238,105,207,109,223,190,253, 67,203,236,217,183, + 26,173,212, 30, 61,122,152,171, 46,171,218,145,187,186, 78,221, 44,203,218, 21, 39, 0,228,229,229,105, 1,188, 45,151,203, 23, +142, 24, 49, 98, 58,128,155,143, 18, 39, 33,100, 86, 84, 84,212,212,138, 63,201, 76,181, 90,253,208,104,180, 90,173, 54, 79,169, + 84,142, 10, 8, 8,168,156, 0,186, 54, 77,142,227, 82,159,123,238, 57,115,109,223, 9,128,251, 50, 87, 28,199,217,125,236, 60, +255, 92, 8, 33,101, 15,254, 15,213, 4,165,244,225, 97,254,121,120,120,238,195, 65, 44, 30, 62,110,220, 56,252,242,203, 47,216, +186,112, 33,122,103,101, 97,157, 88, 12, 71,177, 24, 75,205,230, 49, 0,120,131,245, 8,212,104,176, 74, 75, 75,191,184,123,247, +110,187,146,146, 18,107,106,106,170,158, 16, 98, 37,132,232, 57,142,251,156,227,184, 31, 30,245, 13,175, 94,189,106,223,153,241, + 41,106, 94,189,122,181,213,147,212,171,202,227,244,181,122,144,171, 87,175,254, 45,101,180, 26,141, 38, 5,192,144, 71,221, 95, +173, 86,111,134, 29,147, 57,219,187, 29, 0, 92,187,118,141, 47, 33,254,127,202,165, 75,151, 14, 61,237, 24,120,120,158, 37, 18, + 47, 93,234, 13, 0,241,241,241,208, 79,172, 24,246,106,245,159,227, 96, 61,181,177, 14, 31,160, 53, 0,159,123,127,231, 3, 72, + 1, 16, 3,192, 17,128, 17, 64, 25, 0,239, 42,219, 23,220, 91,103, 91,127, 12,128,229,239, 10, 22, 0,106, 28,183, 32, 37, 37, +229,149,188,188, 60,161,201,100,114, 96, 89,214,201,106,181,186, 90, 44, 22,127,150,101,151, 82,190,222,157,135,135,135,135,135, +231,153, 32, 34, 34,130,120,123,123,147,136,136, 8, 50,149,210,251, 30,255,160,230, 65, 31, 66,200, 14, 66,200,142,143, 63,254, +184, 27,128, 14, 31,127,252,113,155,123,175, 91, 1,240,182,173, 39,132,236, 0,224,245,192,250, 22,127,119,192,246, 13, 12,197, +195,195,195,195,195,195,195,243,148,161,148,246,155, 59,119,238, 23, 0, 4,115,231,206,253,162,202,107, 80, 74,251, 85,125,126, + 96,189, 79,205,170,127, 13, 4, 64,211,234, 86,212,167, 58,128, 16, 82,173, 70,109,212,165,207,107,242,154,188, 38,175,201,107, +242,154,188,230,179,167, 89,151,118, 13,251,247, 37,132,236,160,148,246,171,250, 92,101,159,126,247, 52,119, 84,253,251,129,245, + 59,235,115, 28,143,141,173,210,234,175,120, 0,104,202,107,242,154,188, 38,175,201,107,242,154,188, 38,175,249,152,143,190, 21, +150,165,230,231,154,254,174,178,236,239,140,183,150,178,251, 77,155, 4,234, 40,184, 74, 28,157,196, 0, 96,210,235,204,202,100, +148, 96,240,224,122,207, 23,199,195,195,195,195,195,195,195,243,184, 16, 66,118, 76,158, 60,249,147,167, 29,135, 61, 84,111,176, + 54,109, 18,228,183,114,242, 22, 26, 11, 35, 88,171, 57, 18, 0,132, 12,189,150,223,202,227,186,247,166, 77,249, 79,218,100,197, +199,199,127, 66, 41,245, 19,137, 68, 59,253,253,253,143, 44, 91,182,236,111,237,233,207, 83, 73,157,125,242, 98, 98, 98, 60,140, + 70,227,124,142,227,186,223,155,231,239,136, 88, 44,254,224,226,197,139,119, 1,212, 56,208, 86, 80, 80,208,218,208,208,208, 8, + 90, 1, 0,220, 55, 46,151,109,153,109,125, 70, 70,198,141,204,204,204, 87,237, 13, 60, 48, 48, 48, 88, 42,149,190, 65, 8,137, +186,167,147,108, 48, 24, 86,101,100,100,212, 56, 16,238,179,138, 66,161,112,164,148,190, 32, 18,137, 94,247,244,244,108,147,151, +151,247,153, 90,173,254,230, 81,180, 8, 33, 66, 0, 19,221,221,221, 95,113,119,119, 15,185,123,247,238,237,146,146,146, 13, 0, +190,166,148,214,249,127, 58,243, 93,101,187,206,125,186, 76, 59,182,235,232,204,105,139,213,167, 31, 92, 63,227, 3,133, 87,247, + 30,177,211,118,239, 60,249,249, 23,139,213,245,154,219,146, 16,194,224,207,223, 44,135,123, 63,159,250,104,252,157, 40, 20,138, +104, 0,147, 88,150, 21, 49, 12,243,141, 70,163,249,227,105,199, 84, 23,145,145,145, 31, 73, 36,146, 49, 12,195,220,214,106,181, + 35,179,179,179,159,200, 80, 39,132, 16, 38, 40, 40,200, 37, 61, 61,189,148,218, 49,120, 49, 79, 5,237,219,183,215,154,205,102, +223,218,182, 17,139,197,185,167, 78,157,242,251,187, 98,250, 27,201,167,247,154,254, 0,228, 2, 16,220,123,109,186,247,172,173, +178, 76, 91,195,250,191,149,106, 13,150, 58, 10,174, 66, 99, 97, 68,129,246,234,144, 60,205,197,151, 1,192, 71, 30,189,193,203, +175,241,122,117,148,196,220, 58,114,144, 76,228, 36,252, 94, 32, 16, 69, 27, 76, 70,111,145, 80,148,111,182, 90, 46, 50, 38, 58, + 86,115,109, 75,134, 61,111,220,191,127,255, 8, 0,110, 45, 91,182, 60,103, 50,153,218,124,243,205, 55,242,205,155, 55, 55, 79, + 72, 72, 24,250,252,243,207,111,167,148,238,221,190,125,187,190, 62, 7, 67,186,118, 21,250, 22,121, 14, 23, 8,133,253, 1, 52, +167, 20, 0, 17, 36,113, 22,243,206, 92,143,130, 85,244,200,145, 58, 7,175,172,137,246, 49, 94, 17,132, 51,127, 40, 18,208, 78, + 22,150, 28,167,140,120,254,169,132,130,235,246,238, 31, 24,168,232, 41, 17,146, 31, 1,192,100,165,163, 50, 50,178, 15, 60,206, +118,213,161, 80, 40,158, 3,176,134, 16, 34, 2,176,148,101,217,109, 90,173, 54,145, 82,250,200,199, 93,149,198,141, 27,251, 16, + 66,146, 22, 44, 88,224,213,182,109, 91, 1,199,113, 56,116,232,208,171, 83,167, 78,237,221,164, 73,147,166, 87,174, 92,201,173, +105,223,208,208,208,136,131, 7, 15,182,216,179,103, 15, 58,116,232, 0,142,227,192,113, 28,220,221,221,241,251,239,191,163,109, +219,182,149,203,252,252,252,208,165, 75, 23,187,227, 10, 13, 13,125, 33,186,101,235,241,255,253,112,146,159,175,151,183,139,149, +181,154,213,106,141, 98,225, 55,243,218,133,134,134,126,127,251,246,237,109,245, 61, 86, 66, 8, 81,169, 84, 67, 68, 34, 81, 63, + 0, 81,247, 22, 39, 91, 44,150, 29, 89, 89, 89,235,237,189,144,183,104,209,226, 24,195, 48, 13,234,243,222, 44,203,102, 36, 37, + 37,117,172,111,204, 0,160, 84, 42, 95, 82, 42,149,255,107,215,174,157, 83,116,116, 52,196, 98, 49,190,252,242,203,137, 0,106, + 53, 88, 54, 35,229,228,228, 52,196,217,217, 57,180,172,172,236,150, 94,175,223, 44,145, 72,122,126,251,237,183, 1,177,177,177, + 46, 90,173,150, 8, 4, 2,191,237,219,183, 15,255,238,187,239,122, 19, 66,122,212,245,219, 42,188,205, 77,115, 16, 69,118, 42, +188,117,120, 26,128,248, 7,215, 91, 13,210,215, 5,162,128,126, 2,122, 33, 19,192,215,246, 30, 39, 33,132, 81,169, 84,223,250, +249,249,141,208,235,245, 6, 66, 8, 37,132,208,102,205,154,217,214, 3, 0, 76, 38, 83, 97, 74, 74, 74,163,218,180,130,219,123, +158, 23, 48, 2, 85, 77,235, 89,142,205,186,115,234,238, 99, 15,221, 66, 41,125, 63, 49, 49,113,176, 80, 40, 36, 45, 90,180,112, + 38,132,244,182,215, 92, 40, 20,138, 8, 66,200, 20, 74,233, 57,141, 70,243, 61,165,148, 85, 42,149,221, 40,165, 31, 1, 0, 33, +228, 75,181, 90,125, 24, 0,148, 74,229,247, 97, 97, 97,207,223,188,121,115,169, 90,173,174,117, 60,185,218, 8, 15, 15, 31,251, +159,255,252,103,250,152, 49, 99, 28, 11, 10, 10,130,122,245,234,245, 43,128, 78,117,238, 88, 11, 49, 49, 49,162,156,156,156,137, +205,155, 55,127,175,117,235,214,242,171, 87,175,230, 40, 20,138, 69,254,254,254, 95, 39, 36, 36,212,105,216,155, 55,111,174, 16, + 10,133, 35, 0, 12, 71,197, 5,116, 29,128, 85, 23, 46, 92,184,253, 56,113,253, 91, 48,155,205,190, 7,102, 77, 3, 17, 8, 32, +237,212, 19, 28,199, 33,127,254,116, 88,239,230,195,123,214, 34, 88,173, 86,244,236,217,179, 86, 3,246, 47,230,236,211, 14,160, +190, 84,107,176, 36,142, 78, 98,214,106,142,204,211, 92,124,185, 77,220, 34, 55, 0, 56,187,103,252,203, 94,202, 38,151, 37, 66, +167,235, 14,174,210, 45,131,250,247,140, 30,220,175, 11, 81,201,125,145,165,201,245,251,105,221,222,184, 29,123, 15,111, 65,197, +184, 20,117, 82, 82, 82, 50, 59, 40, 40,200,231,224,193,131,105, 18,137,196, 81, 42,149,146,151, 94,122,201,113,232,208,161,141, + 15, 29, 58, 20,186,103,207,158,193, 3, 6, 12,216, 35, 22,139,119,110,220,184,177,176, 46, 61,191,102, 3, 27,251, 11,253, 55, + 13,120, 33,190, 65,223,231,124, 37, 65,254, 62,224, 56, 41, 82, 82,205,129,251,143, 95,136,219,181,103,223,135,190,141, 7,190, +148,123,117,235, 37,123, 63,156,166, 77,221,220, 29, 25, 58,193, 81, 66, 95,137,235,212, 56,184,127,124, 7, 18,210, 48, 4,215, +147,175,135, 30, 62,122,110, 68,183, 54, 46,119,244, 38,178, 78,207,145, 5,151, 47, 23, 23,213,166, 37, 17,146,149, 73, 87,110, + 42, 88,150,197,151,243,190,216, 63,101,202,148,202,209,213,109, 15,150,101,209,183,239, 0,124,245,213, 87, 48, 26,141,104, 29, +221,100, 37, 0,165,189,241, 2,248,245,234,213,171, 94, 58,157, 14,123,246,236,249, 88,163,209,124,188,119,239, 94,141, 66,161, +248, 80,163,209,172,123, 2,119,247,139,151, 46, 93,234,213,166, 77, 27,129,249,222, 24, 41,177,177,177,130, 79, 62,249,196,115, +206,156, 57, 11, 1,188, 82,211,142,148, 82,186,103,207, 30,252,252,243,207,249,243,230,205,203, 2, 0,111,111,111,229,171,175, +190,234,179,102,205,154,188, 5, 11, 22,100, 81, 74,225,229,229,165, 26, 50,100,136,143,189,161, 6, 4, 4,132,196,180,110, 59, +126,213,202,149,109,139,239,222, 53,252,184, 96,233, 5,163,208, 65, 23, 20, 21, 33,158, 54,125,150,219,231,159,126,252,118, 64, + 64,192,229,204,204,204, 84,123, 15, 82, 46,151, 7, 54,104,208, 96,203, 39,159,124,210,180, 99,199,142, 34, 95, 95, 95,104,181, + 90,164,164,164, 52, 61,113,226,196, 11,219,182,109,155, 40,151,203, 7,105, 52,154, 58,111, 38, 40,165,225,191,125,249,133,175, +131,151, 55, 56,139, 5, 30,205,162, 43,215,101, 31,218, 11,206, 98, 1,103,177, 32,160,239, 11,182,237,209,173, 91,183, 71, 26, +146, 92,165, 82, 41, 34, 34, 34,126,153, 60,121,178,216,104, 52,226,226,197,139, 56,117,234, 20,151,155,155, 91,235, 64,182,132, + 16, 33, 33,100,223,244,233,211, 85, 29, 59,118,116,201,207,207, 7,203,178,222,219,182,109, 27,219,178,101, 75, 87,149, 74, 37, + 89,189,122,181,109,134, 0,207,208,208, 80,207,161, 67,135,154,126,254,249,231,137, 0,230, 85,167, 57,243, 93,101,187,162, 91, +220,180, 28, 97,104, 92,163, 86,111, 32, 71,184, 55,110, 66,111,249,110,247, 80,166, 50,147, 21,223,176,161, 75, 72,164,211, 36, +153,107, 83,207, 98,245,254, 73,241, 13, 27,174,216,125,235, 86,157,147,166, 19, 66, 24,165, 82,249,109,159, 62,125, 94, 93,186, +116,169, 83,114,114,178, 83, 84, 84, 20, 56,142,131,213,106, 5,203,178,182,121, 55, 81,117,192,224,154, 16, 48, 2,213,137, 45, + 87,124, 29, 29, 29, 43,255, 15,109,207,229,229,229,232,253,122,187, 58, 53,236,129,227, 56,137,237,119,109,181, 90,165, 0, 68, + 0,106,157,212,188, 10, 51, 78,158, 60,249,210,238,221,187,135,205,154, 53, 43, 28,192,187, 28,199, 77, 75, 78, 78,238, 2, 0, + 81, 81, 81, 18, 0,135, 21, 10,197,200, 49, 99,198,140, 25, 55,110, 28, 94,127,253,245,105,132,144,217,143,250,127, 47,145, 72, + 62,125,231,157,119, 28, 45, 22, 11, 28, 29, 29, 97, 54,155, 27, 62,138,142,141,198,141, 27,139,117, 58,221,230, 25, 51,102,244, + 27, 48, 96,128,109, 10, 47,255, 99,199,142,205,249,224,131, 15, 58,196,196,196, 12,172,201,100,197,196,196, 68, 3,248, 60, 44, + 44,172,247,235,175,191, 46,136,141,141, 69, 89, 89, 25,246,237,219, 55,101,203,150, 45, 83, 98, 98, 98, 78, 2,152,150,144,144, +112,228,113, 98,124,224, 61,211, 1, 4,222,123,153,145,144,144, 16,244,164,180, 31, 7,129,204, 5, 41,131,186, 33, 52,185, 0, + 0,144,243,253,124, 0,128,235,167, 95, 61,205,176,120,170,225,145,166, 62,209,233,116, 45, 63, 30, 63, 28, 12, 83,113,151, 24, + 22, 18,136, 57,159,140, 38,191,237,216,219,178,182,253,218,183,111,191,128,101,217,112, 79, 79,207, 15, 13, 6,131,116,225,194, +133, 82,181, 90, 29,185,121,243,102,154,152,152, 8,177, 88, 12, 55, 55, 55,116,239,222,221, 33, 46, 46,174,225,201,147, 39, 3, +183,108,217, 50,160,111,223,190,171,118,238,220,185,189, 38, 93,239,102,207,135,251,249,248, 31,253,106,214, 91,158, 77, 67, 66, + 97,178, 88,144,149,171, 6,133, 4,254,190,206, 24,246, 66, 11,113,108, 43,113,216,215, 75, 14, 30,241,107, 58,160,179,246,242, +111, 87,234, 58,198, 78, 49,206,103, 7,118,105, 24,243,124,239, 14, 76, 88, 84, 99,136, 29,156, 42,215, 53,107,217, 18,205, 90, +182, 36,163, 71,151,134, 36, 94, 72,156,186,231,224,153, 79, 58,197, 56, 39, 28, 79, 40,175,121, 98, 76, 10, 7,219,220,105,131, + 94,124, 25, 17, 17, 17,247,157,204,109,127,167,165,165,129, 16,130,252,252,124,112, 20,146,186,226,124, 16,157, 78,135,211,167, + 79,163, 69,139, 22,232,213,171, 23, 94,121,229, 21,249,182,109,219,126, 93,188,120,113, 23, 0,163,235,171, 87, 21,150,101, 99, + 91,182,108, 41, 48,155,205, 16, 8, 4, 40, 40, 40, 64,106,106, 42, 66, 67, 67, 5, 44,203,118,173,109, 95, 74, 41, 58,116,232, +128,121,243,230,101, 29, 61,122,180, 37, 0,116,238,220,249, 66,219,182,109,125, 22, 44, 88,144,117,252,248,241, 24, 0,136,141, +141, 77,104,213,170,149,221,229,180, 78, 78, 78,111,190,255,223, 15,124,138,239, 22,234, 45,165,165,102, 25,199, 90, 93,165, 34, + 82,146, 87, 80,116, 39,211, 85,247,230,152,241,194, 79, 39, 79,120, 19,128, 93,109,246,114,185, 60, 48, 50, 50,242,236,138, 21, + 43,124,189,188,188, 80, 84, 84,132,130,130, 2,156, 61,123, 22, 28,199, 33, 46, 46,206,161,101,243,230, 45,191, 94,176,224,148, + 92, 46,111,111,143,201,114,240,242,198,230, 46, 21,255, 26, 47,221,174, 56, 41, 18, 66,176,231,149,254,149,219, 12, 77,175,152, +220, 92, 42,149, 62,242,180, 62,148,210,246,177,177,177, 98, 0,152, 56,113, 98, 73,121,121,249, 28, 66,200,175,217,217,217,234, + 58,118,157, 56,117,234, 84,101, 72, 72, 72,208,175,191,254,138,178,178, 50, 0,240, 13, 9, 9, 65,120,120, 56,123,244,232, 81, + 68, 68, 68,192,197,197, 5, 71,143, 30,197,233,211,167, 17, 29, 29,237, 34, 22,139, 95, 70, 13, 6,171,115,159, 46,211, 28, 68, +145,157, 26,181,122, 3, 50, 87, 57, 86,172, 93,143,148,243,171, 58, 25, 45,215,166,125,242,174,242, 53, 1,117,120, 67, 25, 46, +155, 28,220,170,171, 87, 88,147, 1,104, 16,115,209,219,200, 30, 75,157, 54, 46,116,174, 80,106, 88, 61,253,171,236,130,234,116, + 9, 33,140,191,191,255,252,248,248,248,151,150, 46, 93,234, 14, 0,151, 46, 93, 66, 78, 78, 14,124,124,124, 32,149, 74, 33, 18, +137, 32, 20, 10,235, 53, 85,150,163,163, 35, 52, 26, 13,108, 55, 14, 44,203,162,180,180,180,114,210,240, 25, 51, 8, 51,125,186, +125,217, 38,185, 92,222,177,101,203,150,107, 84, 42, 85, 64,213,229,241,241,241, 24, 61,122, 52,202,203,203, 17, 29, 29, 29,235, +231,231,103,124,235,173,183,192,113, 28,180, 90,109,217,165, 75,151,158, 83,171,213,103,106, 56,110,125, 78, 78, 14,198,140, 25, +131,140,140,140,113, 10,133, 34,157, 97, 24,169, 68, 34,177,173,151, 40, 20,138,136,136,136,136,111,223,122,235, 45,164,165,165, +225,250,245,235,103, 31,231,166,202,193,193,161,156,101, 89, 95,171,213, 10,189, 94,143,184,184, 56,105,100,100,164, 86, 36, 18, + 93, 43, 42, 42, 26,150,153,153,169,177, 71,135, 16, 34,148,203,229,254, 34,145,104,233,248,241,227,251,116,233,210, 5,215,174, + 93,195,158, 61,123,240,252,243,207,163,107,215,174,152, 50,101, 74,223,105,211,166, 77, 4, 80,211,205,192,166,205,155, 55, 7, +171, 84,170,202, 41,145, 92, 93, 93,241,230,155,111, 98,248,240,225,216,181,107, 87,135, 47,190,248, 98,115,215,174, 93,125,143, + 60, 70, 75,197, 3, 4, 38, 36, 84, 76,197, 23, 19, 19, 19, 88,199,182,127, 27, 14,173, 58, 32, 52,185, 0,183,163,188, 0,160, +210,104,217, 94, 67, 89,235,101,152,231,111,164, 90,131,101,210,235,204, 66,134, 94,243,145, 71,111, 56,187,103,124,101, 19, 33, +172,244,154,201,172, 51, 3, 0,203, 81,148,232,172,112,116, 96,144,166, 41,197,229,219,249, 15,233,208, 7, 74, 45,117, 58,221, +127, 23, 45, 90,132, 47,191,252, 50, 94,175,215,151,165,166,166,106,202,202,202,202,135, 13, 27, 70, 68, 34, 17, 78,156, 56,129, + 59,119,238,160, 89,179,102,112,119,119, 71,199,142, 29,197,189,122,245, 10, 24, 57,114,228,107, 0,182, 87,167, 73, 94,122, 73, + 32,151, 56,252, 62,127,214, 16, 79, 34,184,142,235, 25, 69,104,168,106, 3, 47,183, 0,168,243,202,144,112,117, 23,174,223,218, +137,134,170, 64,140,126,181,161,251, 55, 63,228,237, 32, 49,111, 55,164, 9,127,246,243,122, 80, 19, 0,164, 98,182,245,103,139, + 18,193,150,223, 2,181,100,128,154, 31,154,221, 5, 78,238, 1,136,108,225, 7, 39,137, 15,115, 41,249,155,214,181, 29,187,209, + 74, 63,154, 61,115,198, 79,205,163, 99, 80, 92, 92,140,239,190,251,174,210, 88, 81, 74, 43,239,184,219,181,107, 7,139,197,130, +159,126,250, 9, 22,174, 34,253, 95, 91,156, 15, 48,180,109,219,182,235, 41,165, 18, 71, 71,199,156, 22, 45, 90, 4,189,251,238, +187,194, 33, 67,134, 64,175,215,191, 37,151,203,247,106, 52,154,173,245,212, 4, 0, 52,104,208,160, 99,215,174, 93, 29, 5, 2, + 1,204,102, 51,138,139,139,145,149,149,133,212,212, 84,120,123,123, 3, 85,250,111,213,164,249,224, 92,136,148, 82,106, 59,254, + 42,203, 42, 63, 23,123,226, 36,132, 68,122,184,123, 56,255,248,245,210,243, 62, 14, 2,226, 29,160, 32, 98, 87,119, 33, 35,115, +113,160, 2,129, 62, 40, 64,225, 66, 8,137,172,110,223,135,126, 75,132,144, 6, 13, 26,108, 89,185,114,165,175, 72, 36, 2,203, +178,240,241,241, 65,106,106, 42,138,138,138, 80, 90, 90,138,212,107,201, 8, 86,169,240,159,209,163,228, 51,190, 90,176,133, 16, +210,170,234, 69,172,186, 56, 57,203,253, 55,229, 53, 25,168,154,150,219,251, 29,113, 28,119, 39, 59, 59, 27, 78, 78, 78,136,138, +138,146,157, 59,119,238,184, 90,173,174,214, 92, 85,213,148, 74,165, 47,199,198,198,186,172, 93,187, 22, 49, 49, 49,112,115,115, +195,225,195,135,113,233,210, 37,152,205,102,166,180,180, 20, 50,153, 12,115,231,206, 69, 96, 96, 32,138,139,139,145,158,158,238, + 37, 18,137,188,107,210, 60,182,235,232,204,194,219,135,167,229, 8,246,198,173, 88,187, 30,111, 13, 29, 2,127,235,237,227, 30, + 13,153,153,241,125, 59,124, 42, 16, 5,244,115,118,105,234, 17,222,116, 0,196, 18, 25,222,253,232,115, 92,191,252,187,135,174, +244,210, 56,214,146, 25, 0,224, 63, 15,106,146,138, 15,136, 81, 40, 20,163,150, 45, 91,230, 98, 91,206, 48, 12, 68, 34,209,125, +198,202, 54, 25,123,117,159,105,117,159, 39,203,178, 48,155,205, 48,155,205,224, 56, 14,121,121,121, 40, 45, 45,133,135,135, 71, +197, 6,211, 1, 2, 66, 40,170, 55, 44, 85, 53, 25,134, 25,182,126,253,250, 0, 39, 39,167,135,182,203,204,204, 68,113,113, 49, +156,157,157,225,238,238, 14,139,197, 2,171,213, 10,163,209, 40,235,218,181,235, 88, 0,103,170,211, 20, 8, 4, 19,198,140, 25, + 19,187, 99,199,142,208, 89,179,102,193,108, 54,207,207,203,203,131,205,160,117,236,216,177, 29,165, 52,101,252,248,241, 0,128, + 25, 51,102, 88,202,202,202,222,177,231,216,171,195,207,207,175,113,255,254,253, 61, 14, 28, 56,128,142, 29, 59,194,104, 52, 98, +236,216,177,174,163, 70,141,114, 61,121,242,164,207,194,133, 11, 87, 3,232, 89,155,102, 76, 76,140, 72,171,213, 78, 26, 54,108, +216,196,158, 61,123,186,229,231,231,195,193,193, 1, 27, 54,108,192,143, 63,254,184,219,108, 54, 79,221,188,121,243,236,229,203, +151,199, 13, 24, 48, 0,203,151, 47, 31, 79, 8,249,146, 82,202, 85,163,169, 8, 8, 8, 64, 82, 82, 18, 60, 60, 60,224,237,237, +141,226,226, 98,156, 62,125, 26,103,207,158, 69,100,100, 36, 8, 33, 30,168,184,166, 85,107,176,106,137, 51, 29,143,152,169,178, +247,243,172, 15,117,105,218, 42,212,108,103, 72,150,173,232, 18,205, 2,168,201, 77,219, 19, 39, 33, 68,168, 80, 40, 6,184,187, +187,143,163,148, 10, 11, 11, 11,151, 57, 57, 57,109,186,117,235, 86,181, 89,214,191,226,216,159, 53,132, 0, 64, 8,177,125, 47, + 93, 41,165, 71,149,201, 40,201,111,229,113,221,203,175,241,122, 47,101,147,138, 15,209, 74,175, 9, 28, 60,174,251,157,215,149, + 0,128,217, 66,113,242, 90, 33,146,110,106,145,116, 35, 7, 50,105,221,119,221, 94, 94, 94,232,208,161, 3,126,251,237, 55,100, +102,102,202,230,206,157, 27,110, 54,155,205,253,251,247,207,110,208,160, 65, 97,199,142, 29, 33, 18,137,112,230,204, 25,148,148, +148, 64, 32, 16, 64, 34,145,128,227,184, 26, 51,109,190, 55,216, 55, 94, 31,221, 50,212,219,157,193,246, 19,123,209, 46,114, 32, +156, 28, 68,200, 43,212,131, 33, 4,183,238, 28, 0,203, 58, 35,241, 90, 6,218, 55,117, 70,167,182,110,170,178,131,119, 71, 3, + 88, 98,207, 7,100, 86, 31,129,164,193, 32, 64,218, 4,212,116, 11,156, 73, 13, 42,242, 69,185, 78,138,252,180,116, 92, 59,189, + 9,212,170,171, 83, 39, 51, 51,251,127, 10,133,162,227,145,225,111,188,193,113, 28,230,205,155,119,228,198,141, 27,221,170,110, +211,176, 97,195,195, 83,166, 76,233, 90, 88, 88,136,189,123,247,174,202,206,206, 94,105, 79,140, 54,178,179,179, 15, 0,240,180, +189,150,203,229,129, 23, 46, 92, 88,251,203, 47,191,180,127,237,181,215,176,113,227,198, 15, 1,108,173, 89,225, 97,198,143, 31, + 47,250,237,183,223,122, 59, 58, 58,126, 55,109,218, 52,153,201,100,130, 70,163, 65, 78, 78, 78,101,182,237,202,149, 43,172, 80, + 40, 60, 89,155, 78,117,166,201,182,252,193,155,236,123,203,236,189,243, 46, 51, 89, 44, 70,231, 0,133,165,255,128,222,205, 46, +157,189,120,221,209,211,147,105,214, 58,186,241,181,155,105, 9,164,162, 9,198,174,102, 24,149, 74, 53,100,250,244,233,205, 92, + 93, 93,193,113, 28,220,220,220,144,151,151, 87,105, 40, 77,165, 37, 48,151, 20, 35, 41, 61, 21, 29,187,118, 71,175,246,237,162, +118, 90, 44, 67, 0,172,171, 77,215,179,121,203,202,204,213,198, 80,175,202,229,175,164, 21, 85, 26,128, 93,109,194,224, 32,115, + 70,211,247, 63,182,243,176, 31, 70,163,209, 92, 8, 10, 10,218, 21, 23, 23,215,103,244,232,209, 76, 78, 78,206, 30, 63, 63,191, + 88,173, 86,123,181,182,253,100, 50, 89,195,252,252,124,148,150,150,194,205,205, 13, 11, 23, 46,132,175,175, 47,116, 58, 29,206, +157, 59, 71, 85, 42, 21, 57,124,248, 48,148, 74, 37, 10, 10, 10, 96, 54,155,161,211,233,114, 76, 38, 83,141,125, 36,239, 53, 3, +198, 79,232, 37,223,157,114,126, 85, 39, 37, 82,207, 13,254,176,211,141,196,179,215, 51, 15, 29, 60, 49,211,106,144,102, 22,101, +237,159, 20,210, 58,209,123,220,135, 51,176,120,254,116,164,156, 57,122,215, 47,176,116, 9, 75,140,171, 98,123,215, 28,175, 78, +167, 51, 36, 39, 39,187, 36, 38, 38,130, 97, 24,184,186,186,194,217,217,185,114, 98,115,155,185, 18, 10,237, 79,208,219,110,112, +108,230, 42, 47, 47, 15,183,210,175, 99,243,161,213,176, 88, 45,222, 43,219,186,230,132,138,197, 73,222,197,228,147,252,203,244, + 66,109, 90,148,210,101,175,188,242,202, 16,165, 82,233, 82,117,121,139, 22, 45,240,234,171,175, 98,207,158, 61, 56,127,254,252, +125, 55, 88,121,121,121, 26,150,101, 87,213,164,153,145,145, 81,164, 82,169,226, 70,141, 26,149,176,117,235, 86,215,175,190,250, +170,114, 98,115, 91,179,168,237,121,237,218,181, 72, 72, 72,152,150,147,147,115,205,238, 15,160, 10,254,254,254,145,253,251,247, + 63,182,100,201, 18,119,173, 86,139,252,252,124,148,151,151, 67, 36, 18,193,106,181, 34, 44, 44,140,176, 44, 27, 92,155, 70,227, +198,141,197, 12,195,252,126,232,208,161,222,225,225,225, 0, 0,139,197,130, 19, 39, 78, 96,244,232,209, 5, 78, 78, 78, 47,167, +165,165,149, 43, 20,138, 41, 59,118,236,136,107,209,162, 5,154, 53,107,230,159,155,155,235, 2,160,184, 58, 77, 91,150,223,246, +253,252,244,211, 79,149,235, 12,134,138, 41, 39, 77, 38, 19,105,221,186,117,240,185,115,231,234, 83,220, 82, 83,166, 42,163,202, +107,187,250, 22,255, 29,164,255,178, 2,105,159,188,135,160,227, 41, 0,128,132,198, 21, 93,174,130,142, 38, 87,108, 48,124,120, +189,244, 20, 10,133, 23,165,244,173,158, 61,123,190, 31, 23, 23,231, 35,151,203,225,229,229,133, 75,151, 46,197,238,221,187,247, + 59,149, 74,245, 3,203,178, 63,216,147,173,127, 92, 30,244, 34,127,245,251,253,213, 84,158,129, 40,165,228,222,193, 17, 12, 30, +204,122,111,218,148,175,142,146,152, 37, 66,167,235, 0, 96, 50,235,204,126,231,117, 21,195, 52,204, 92, 11, 10, 10,150,187,151, +109,160, 20,172,157,117, 32,134,107, 47,130, 43,250, 29,190, 30, 3,176,124,249, 86,228,230,230,138, 23, 46, 92,216, 96,235,214, +173,170, 97,195,134,101,132,133,133, 21,119,239,222, 29,171, 87,175,134,191,191, 63, 76, 38, 19, 56,142,171,209,189,185,120,178, +131,219, 54, 11, 19, 92, 79,191,132, 86,225, 47, 34, 88,222, 17,183,212,197, 3,211, 49,224, 0, 0, 32, 0, 73, 68, 65, 84, 40, + 44, 53,162,160, 88,143,136,136, 15,161,189,171, 67, 73,185, 1,151, 82,126,133, 74, 30,194, 8, 68,183,226, 96,167,193, 50,222, + 90, 3, 99,234,122,136,229,221, 32, 9, 25, 2,145,119,123,100,166, 28,193,197, 3, 11,144,117,227, 15, 80,142,133, 95, 64,181, + 9,146,135,160,148,126,182,104,209,162, 97,115,230,204, 17,190,247,222,123, 93,149, 74,101, 87,181, 90,125, 4, 0,148, 74,101, +215, 49, 99,198,116,117,113,113,193,236,217,179, 45,148,210,207,236, 18,173, 5,141, 70,147,161, 84, 42,199, 29, 56,112, 32,113, +228,200,145,136,140,140,108, 73, 8, 97,236,233, 88, 27, 22, 22, 54, 90, 34,145,140,176, 90,173,225, 67,135, 14,101,222,122,235, + 45,153,175,175, 47,210,210,210, 96, 52, 26,193, 48, 12,196, 98, 49,174, 92,185,194,253,254,251,239,197, 98,177,120,124, 93,154, + 28,199,193,219,219, 91,217,169, 83,167, 4, 0,240,244,244, 84,113, 28, 7, 47, 47, 47, 85,135, 14, 29, 18, 0,192,195,195, 67, + 89,157, 17,171, 9,179,217,124, 46, 35, 61, 61, 34,182, 83,172,252,216,249,171, 23, 6,189,208,175, 27, 35,100,152, 59,233,154, +115, 62, 94,158,206, 39, 78,254, 81, 98, 54,155,207,217,163, 37, 18,137,250,117,236,216, 81, 88, 88, 88, 8,133, 66,129,188,188, + 60,168,213,106, 88, 44, 22, 24,138, 11, 97, 46, 41,129,185,184, 8, 84, 87,134,219,231,206, 32, 42, 64,233,176,175,162, 19,124, +173, 6,203,230, 21,171,155,152,218,182,204,193, 69, 6, 71, 23,151,202,230, 15,123, 81, 40, 20, 3, 92, 93, 93, 39,149,150,150, +238, 82,171,213,179, 76, 38,211,187,115,230,204,105,253,249,231,159,123, 79,154, 52,201,117,210,164, 73, 27, 27, 52,104, 16,157, +150,150,102,172, 73,163,172,172,236,150,197, 98,241, 2,224,119,240,224, 65,248,248,248,160,164,164, 4, 22,139, 5,122,189,222, +228,225,225, 33, 45, 40, 40,128,193, 96,128,201,100,130,171,171, 43, 18, 18, 18,238, 90,173,214, 26,155,237,109,184, 55,100,102, + 26, 45,215,166,121, 54,118, 86,179,212,171, 75,169,158, 43,156,254, 85,246, 76, 0, 95,199, 55,108,184,194,196, 29, 77,189,126, +249, 55,143,212,115,135,239,102,223,208,133,174,216,121,187,198, 62, 88,180,226, 36,197, 17, 66,104,163, 70,141,144,151,151, 7, +129, 64, 0,103,103,103,200,100, 50, 68, 70, 70, 34, 51, 51,243,145, 13, 86, 85,115,117,224,212, 14,228,151,105,176, 98,254, 90, + 40,253, 3, 24, 0, 62,234,156,204,231, 70, 78,124,169,109, 72, 71,143, 57,169,127, 20,214,216,175, 45, 59, 59,251, 34, 0,215, +170,203,148, 74,101, 55, 15, 15,143, 67,102,179, 25,105,105,105,216,183,111, 95,215,172,172,172,163,118, 7, 8, 32, 43, 43,235, +182, 82,169,140,123,225,133, 23, 86, 55,107,214,172, 33,165, 20,145,145,145, 24, 48, 96, 0, 54,111,222,140,171, 87,175,162,164, +164,132, 59,126,252,248, 74,141, 70,243, 72, 29,114,228,114,121,163,190,125,251,254,177,120,241, 98,143,252,252,124, 24, 12, 6, +148,149,149, 97,211,166, 77,136,141,141,133, 84, 42,197,162, 69,139, 74,172, 86,235,226,154, 52, 26, 55,110, 44,166,148,254,182, +117,235,214,222,161,161,161,184,118,237, 26,142, 31, 63, 14, 31, 31, 31, 56, 58, 58,162,127,255,254, 94,235,215,175,127,183,113, +227,198, 11, 68, 34,209,204, 62,125,250,128,101, 89,156, 63,127, 94,147,158,158, 94,227,247,111,203,212, 84,135,193, 96, 0,165, + 20, 22,139,101, 33,195, 48, 47,199,196,196,244, 74, 72, 72,120,172, 78,209,255,148, 62, 87, 0,160, 82,169,154,136, 68,162,255, +120,120,120, 32, 47, 47, 15, 69, 28, 32,187, 91, 81,116, 91,124,239,116,121,247,238,221,202,115, 77,120,120,248, 78,189, 94,255, + 73, 86, 86, 86,141, 89, 38,165, 82,217,220,201,201,233,253,254,253,251, 15,235,219,183,175,192,108, 54, 99,199,142, 29, 88,188, +120, 49,226,226,226, 16, 22, 22,134, 15, 63,252,208,205,104, 52, 78,222,179,103,207,164,168,168,168, 61,165,165,165, 31,215,166, +249, 36,184,207,139,252,203,169, 60, 3,221, 59,160, 63,251,209, 12, 30,204, 42,129, 66, 0,240,247,247,247,246,244,244, 92,204, +178,108, 55,124,250, 41, 92,132,110, 72,187,117, 3,165,133, 28, 44, 38, 35, 56,142,130,214,236,129,238,131, 43,250, 29,174,157, + 41, 74,142, 17,152,205,102,248,250,250, 98,238,220,185, 40, 46, 46, 22,142, 28, 57, 50,120,198,140, 25, 23, 13, 6, 3,202,203, +203,161,215,235,161,215,235,107, 53, 88, 98,169,177, 89,144, 95, 56, 74,245,109,224, 36,145,160,160,196,136,194, 82, 35,242,139, + 12,216,242,219, 80, 24,245, 58, 88, 77, 38,176,102, 43,100,126, 3, 17,230,217, 13,192, 77,187, 70,166,173, 76,162,112, 86,152, +213,251, 97, 86,239,135, 83,139, 41,248,109,209,107,247,109,103,181,218,215,228,175,209,104, 50, 20, 10,197,247, 35, 70,140, 24, +255,194, 11, 47,224,135, 31,126,248, 18, 64, 43, 0,144,201,100, 95, 14, 28, 56, 16, 87,174, 92,193,177, 99,199,150, 62,169,187, + 5, 74,169,151,167,167, 39, 24,134,129, 78,167, 51,214,101,174, 54,109,218, 68,102,204,152,177,167,127,255,254,237,223,125,247, + 93, 39,127,127,127, 80, 74, 97, 50,153,144,149,149, 5,134, 97, 80, 84, 84,132,159,126,250,169,252,252,249,243, 84, 34,145,156, + 20,137, 68,111, 95,185,114, 37,187,174, 88, 60, 60, 60, 48,116,232, 80,159, 54,109,218,248, 84,173, 24,124,249,229,151,125, 90, +181,106, 85,185, 76,165,170,177,160,235, 33, 12, 6,195, 79,179,103, 78,235,246,203,154, 13,145,141, 34,195, 60,118,237, 59,124, +193,203,203,213, 49, 56, 56,212,161,184,168,200,184,120,225,124, 97,121,121,249,255,236,148,139,242,246,246, 70, 78, 78, 14,110, +222,188, 9,163,209, 88,209,132,163, 43,131,169,168, 8,230,226, 66,192,160,135,132,101, 97,204,215, 34, 56, 52, 24,248,179,194, +176, 86,170,154,169,170,203,108,207,142,110,174,144, 56, 59, 67, 32,170,190, 89,171, 58,228,114,121, 76,203,150, 45, 55, 44, 95, +190, 92, 60, 97,194,132,182, 13, 26, 52, 88,156,147,147,147,174, 82,169,122,204,159, 63,255,236,172, 89,179, 28,134, 13, 27,214, +104,217,178,101,175, 3, 88, 86,147,142,193, 96,216,176,107,215,174, 87, 3, 3, 3,253, 46, 95,190, 12,131,193, 0,142,227, 16, + 31, 31, 15, 0, 82,219,118, 41, 41, 41,122,189, 94,175,189,114,229, 74,105,122,122,186, 25,118, 84,253, 77, 91,172, 62, 61,225, + 37,213, 32,185, 92,113, 74,226, 16, 20,194,232, 18, 6, 78,120, 73,245,213,130,141, 89,134,221,183,110,149, 78, 27, 23, 58, 87, + 87,122,121,156,135,170,124,201,146,237, 53,155,171, 42,208,123, 21,131,240,246,246,174,108, 18, 20,139,197, 0, 0, 63, 63, 63, + 20, 23, 23,215,218, 68, 88, 29, 44,203,162,184,184, 24,197,197,197,184,113,231, 26,242, 74, 53,216,191,238, 20, 88,150,173,204, +142, 40,252, 84, 56,176,238,172, 75,215,193,173, 63,241,106, 78, 14, 23, 36, 81,187,140, 59, 0, 48, 12,243,254,139, 47,190, 8, +179,217,140, 1, 3, 6, 96,237,218,181,239, 3, 56,106,239,254, 54,212,106,245,105, 66, 72,248,205,155, 55, 93, 45, 22,203,243, +253,251,247, 95,213,167, 79, 31,156, 58,117, 10, 7, 15, 30,236,106, 50,153,174,179, 44,171,151,203,229,115,228,114,185, 47, 33, +100, 78,118,118,118,173,213,206, 17, 17, 17,195, 92, 92, 92,102, 59, 58, 58,150,246,233,211, 71, 97,203, 92,149,151,151,195,106, +181, 34, 43, 43, 11,187,119,239,214,236,218,181, 75, 67, 41,117, 42, 43, 43,155,158,145,145,177,169, 58,173,152,152, 24,145,197, + 98,217,246,251,239,191,199,133,134,134,226,232,209,163,152, 55,111, 30, 26, 54,108,136,149, 43, 87,162, 67,135, 14, 8, 14, 14, +134,167,167,231,127, 74, 74, 74,218,207,155, 55,175, 79,203,150, 45,177,117,235, 86,228,230,230,126, 87,219,249,169,182,243,172, + 94,175, 7,165, 20,221,187,119, 31, 61, 97,194, 4,244,239,223,127, 95,171, 86,173,218,156, 63,127,254,134, 29, 31,235, 63, 50, + 83,101, 67,161, 80,204,237,217,179,231,164,230,205,155, 99,205,154, 53, 48,182,234, 8,231,149,219,113,185, 95, 44, 40, 0,197, +202,223, 0, 0,151,159,175, 40,232, 8,238, 49, 24,147, 38, 77,234, 51,112,224,192, 64, 0, 77,106,208,252,234,181,215, 94,155, +248,218,107,175,225,194,133, 11, 88,182,108, 25, 46, 94,188, 88,121,205,179, 88, 44, 72, 78, 78, 70,114,114, 50,228,114, 57,250, +245,235, 71,222,126,251,237,248,248,248,120, 31,220,187,102,253, 85, 60,228, 69,254,197, 84,159,193,170,130,191,191,191,183,135, +135,199,149,197,139, 23,123,181,109,219, 86, 96,181, 90,113,240,208, 33,124,240,222, 72,196,245, 27, 7,131, 81, 2,171,129,128, + 21,203,236,123, 71,215,126, 40, 57, 70,192,201,250,192,100, 50, 97,244, 90, 49,220,137, 22, 11,223,240, 3, 0,162,215,235, 97, + 52, 26,161,215,235, 81, 94, 94,142,242,242,114,176, 44, 91,227, 89,178,180,200,217,108,182,112, 80,231,166, 35, 75,115, 25,110, +178, 64, 80, 38, 0,218,187, 58, 16,248,194, 98, 72, 1,119,239, 31,211,168,207, 66,185,241,241, 76, 49, 91,250,112, 49, 26,199, +217,223,167,146,101,217,217,243,231,207, 31,189,120,241, 98,135,113,227,198,197, 40, 20,138,231, 1, 96,226,196,137, 49, 82,169, + 20, 75,150, 44, 49,178, 44, 59,251,177,130,188, 7, 33, 68,160, 84, 42,223,239,220,185, 51, 74, 74, 74,112,229,202,149, 29,117, +237, 51,101,202,148,177, 47,190,248, 98,251, 25, 51,102, 56, 25, 12, 6,232,116, 21,205,159,197,197,197, 40, 47, 47,135, 86,171, +197,196,137, 19, 11,205,102,243,152, 59,119,238,108,182, 55, 22, 74, 41,126,255,253,119,252,242,203, 47,247, 85, 12,190,252,242, +203, 62,107,215,174,205, 93,180,104,145,154, 82, 74, 61, 61, 61, 85,131, 7, 15,246,181,183,133, 48, 59, 59, 91,175, 80, 40,198, +207,154, 61,235,215,175,230,207,247,189, 91, 80,120, 93, 44,113, 52, 56, 57, 58,120, 78,250, 96, 38,213,106,181, 19,181, 90,109, +221,109,184,247, 40, 44, 44, 68,106,106, 42, 28, 29, 29, 33, 22,139,193,234,202,192,149,151,195, 88, 88, 0,198,100,132, 3,203, +194,211,201, 1, 1,126,126, 8,244,181,175, 47,190,230,240, 62,236, 30, 82, 49,124,139,173, 89,144, 16,130, 61, 29, 26, 65, 34, +115,134, 84, 38, 67,199,109,199, 1,160,194, 40, 44, 92, 94,167,166,191,191,191,183, 66,161,248,253,187,239,190, 19,231,231,231, +227,202,149, 43,137,105,105,105,197,158,158,158, 46, 34,145,136,187,113,227,198,129,148,148,148,126,193,193,193,160,148,214, 85, +253,245,245,150, 45, 91,158,139,141,141,181, 6, 7, 7, 59,231,229,229, 5, 22, 22, 22, 18,141,230,254, 62,204,231,206,157,147, +102,100,100,232, 56,142,219,138,138,113,176,234,252,225, 79,120, 73, 37, 61,121, 1,227,187,120, 7, 55,119,243,105,142,124,203, +197,230,167, 19,115,198, 79,120, 73,181,104,193,198, 44, 3, 75,140,171, 88, 75,102,128, 80,106, 88, 93,231, 65,163, 34,139,213, +184,113, 99, 80, 74,113,238,220, 57, 28, 63,126, 28,199,143, 31, 71, 90, 90, 90,229, 54,110,110,110,216,191,127, 63,186,117,235, + 86,139,210,253,232,116, 58,200,229,114,184,187,187, 99,235,145,159,241,227, 87,107, 43, 59,186,219,200,207,207,135,147,147, 19, +102,127,176, 64, 54,242,163,193, 51, 1,244,178, 71, 59, 32, 32, 32, 36, 54, 54,182,175,159,159, 31, 10, 11, 11,225,227,227,131, +214,173, 91,247,247,243,243, 11,214,106,181,143, 52, 78,155,201,100, 26,219,173, 91,183, 89, 19, 39, 78,132,197, 98,193,144, 33, + 67,144,154,154,186,225,246,237,219, 11,131,130,130,198,143, 27, 55,206,207,219,219, 27, 99,199,142,117, 6, 48,168, 38,157,200, +200,200,255, 78,158, 60,249,139,225,195,135, 59, 88, 44, 22, 28, 60,120,176, 50, 75,109,181, 90,145,158,158,142,233,211,167,107, + 74, 74, 74,186,100,101,101,221,170, 43,174,156,156,156,137,219,182,109,139,143,136,136,192,158, 61,123, 48,102,204,152,157, 50, +153,172, 73,223,190,125, 3,157,157,157,145,152,152, 8,179,217, 12,185, 92,238, 55,121,242,228,126,189,123,247,198,129, 3, 7, + 48,115,230,204, 29,254,254,254,181, 26,118,150,101, 33, 20, 10, 97,121,160, 79,163, 64, 32,192,197,139, 23,209,189,123,119, 76, +154, 52, 9, 0,112,224,192, 1,215, 94,189,122, 93,238,218,181,171,235,145, 35, 71,106,204,222, 2, 53,103,170,254, 41, 85,132, +206,206,206, 35, 86,174, 92,137,155, 55,111,226,143, 63,254, 64, 65, 65, 1, 76, 38, 19,138,185,138, 62, 87, 14,247, 50, 87, 84, + 25,132, 14, 19, 63,193, 43,253, 6, 65,163,209,128, 97, 24,239,154, 52, 9, 33,195, 62,249,228, 19,236,222,189, 27,115,231,206, + 69, 73, 73, 73,181,219, 57, 58, 58,162,117,235,214,136,142,142, 70,106,106, 42, 0,212,168,249,164,120, 38, 51, 88, 53,225,225, +225,177,240,251,239,191,247,138,141,141, 21,148,151,151,131,227, 56,180,111,215, 14,175,191,241, 58,246,110,221, 4,121, 72, 55, + 8, 12,142,176,186, 60,220,161,179, 58,216,128, 85,184,123,247, 46, 28, 28, 28, 32,189,215,161, 52, 41,171, 50,189, 11,131,193, + 80,105,174,108,207,181, 97, 53, 73, 18,146,111,179, 1, 37,101, 23,113, 38,225, 23, 88, 76, 38, 4,135,127, 12,163,213, 27,206, +190,111, 66,111,254, 29,230,162,138,202, 93,137,107, 87,104,181,249, 0,136, 93, 41,206,234, 46,242,156,254,225,206,238, 28,107, +191,193,210,106,181,121,114,185,252,235,139, 23, 47, 78,137,143,143,199,143, 63,254, 56,151, 82,138, 62,125,250,224,220,185,115, + 72, 76, 76,252, 90,171,213,230,217, 45, 88, 3,132, 16,161,191,191,255, 79, 75,150, 44,233,227,231,231,135, 45, 91,182,128, 82, + 90,167, 33,146, 72, 36,111,141, 31, 63,222,201,150,197,144, 72, 36,208,235,245,200,201,201,129,217,108,198,214,173, 91,141, 38, +147,105, 66, 90, 90,154,221,230, 10,168,184, 48,182,105,211, 6, 11, 22, 44,200,250,227,143, 63, 98, 0,160, 67,135, 14, 9,173, + 90,181,242, 89,180,104,145,250,244,233,211, 49, 0,208,182,109,219,243,209,209,209,245, 26,199, 37, 59, 59, 59, 43, 34, 34,226, +150,222, 96, 16,121,120,121,234, 92,156, 37,180,164,180,148, 73, 74,186,160,209,106,181,105,117, 43, 84,146,124,229,202,149,166, +106,181, 26,233,233,233, 96,117,101, 96,140, 70, 16,163, 30, 61,218,183,131, 35, 40, 28,192, 65,204, 89, 32, 18, 8, 81, 90, 90, + 6, 0,201,117,137, 86,237,228,110, 51, 87,132, 16, 72,101, 50, 72, 92,100,112,144,201, 42,215, 1,213,255,238, 30,196,209,209, +241,215,101,203,150,201,229,114, 57,190,249,230, 27,200,229,242,200,158, 61,123,234,186,116,233,226,232,237,237,141,136,136, 8, +180,106,213, 10,135, 15, 31, 6, 33,164,214, 11, 35,165,212, 74, 8,233,245,199, 31,127, 76, 60,121,242,228, 75, 10,133,130, 12, + 31, 62, 28,113,113,113,112,112,112,128, 94,175, 71, 97, 97, 33,118,238,220, 73, 88,150,109, 9, 0,254,254,254, 65, 13, 26, 52, + 88, 75, 8,201,186,115,231,206,203, 15,106,254, 48,187,185,162, 84,207,141,148,251, 43, 6,117,233, 29,220,172,123,239,158, 8, + 9,239,129,238,189, 51, 1, 96,174,183,232,206,144, 47,167, 52,221, 26, 28,224,185,242,228,182, 3,159,118,140,239, 54,117,198, +120,207,153,211, 23,221,181,103,152,134,202,139, 45,195, 48,213,102,169, 4, 2, 1, 24,198,190,185,236, 89,142,205,138,123,163, +125,229,107,139,213,236,173,244, 15, 96,108,153, 43, 0, 40, 41, 41, 65, 70, 70, 6, 44, 22, 11,188,188,188, 96,177,152,155,219, + 37, 14,128,101,217,241, 67,134, 12, 33, 6,131, 1, 19, 39, 78,196,252,249,243, 49, 96,192, 0,114,230,204,153,241, 0,222,183, + 87,199,134, 66,161,152, 63,118,236,216,137, 35, 70,140, 64, 81, 81, 17, 14, 29, 58,132,110,221,186,225,251,239,191,247, 57,116, +232,208, 23, 29, 58,116,128, 64, 32,192,254,253,251, 97, 54,155, 83,106,211,146, 72, 36,239, 13, 31, 62,220, 33, 51, 51, 19, 98, +177, 24,173, 90,181, 66, 86, 86, 22,202,203,203,145,155,155,139,207, 63,255, 60,167,184,184,184,171, 90,173,174,211, 92, 17, 66, +152, 78,157, 58,253, 39, 44, 44, 12, 7, 15, 30,196,216,177, 99,119, 59, 59, 59, 15, 42, 44, 44,124,219,104, 52, 46,234,215,175, + 31, 58,116,232,128,148,148, 20,244,239,223, 31,173, 91,183,198,161, 67,135, 48,105,210,164,157, 78, 78, 78, 47,214, 49, 14,214, +141, 35, 71,142, 52,109,213,170, 21,202,203,203, 81, 90, 90, 10,145, 72, 4,119,119,119, 36, 39, 39, 35, 60, 60, 28,147, 38, 77, +194,130, 5, 11, 48, 97,194, 4,174, 87,175, 94, 86,179,217, 44,182, 85, 89, 62, 34,255,136, 42,194,242,242,114,170,209,104,224, +234,234,138,141, 27, 55,226,210,129,189,216,245,222,155,144, 78,157, 15, 74, 41,178,102, 77, 70,247,143,166,162, 93,226,109,104, + 52, 26,172, 94,189, 26, 12,195, 84, 86,196, 86, 7,165, 20,197,197,197,136,142,142,198,185,115,231,176,122,245,106,124,243,205, + 55,149,217, 90,145, 72,132,174, 93,187,226,185,231,158,195,141, 27, 55,176,108,217, 50,184,186,186,214,168,199, 83, 61, 66,160, +194, 49, 86,125,174, 10,199,113,221, 91,183,110, 45, 40, 43, 43,131,193, 96,128, 86,171,197,157, 59,119,224,232,232, 8,117,110, + 6,218, 52, 44, 67, 14, 49,225,202,197,235, 44, 17,136, 46,214,246,102,182, 74, 29,147,201,132,164,164,164,138,210,247,240, 57, +149,157,159,239,245,249,128,193, 96,192,145, 35, 71,168,163,163, 35,156,157,157, 73,109,109,239,156,213,184,251,240,137,196, 62, +175, 13,236, 46,217,127,228, 71, 88,140, 86,148, 25,221, 81,110, 48,161, 84, 47,130,201,161, 55, 8, 57, 14, 70,224,128, 14,209, + 13,113,232,143, 27, 6,214, 98,222, 99,215,167, 67, 89, 8, 60,155,131,189,155,244,231,251,233,239,191,171, 23, 59,200,192,218, +217, 68,104, 67, 42,149,206,255,250,235,175,223,251,233,167,159, 92,222,126,251,237, 8,219,197, 98,201,146, 37,165, 82,169,116, +126,189,196, 30,224, 94, 73,244,107,177,177,177,159, 79,159, 62, 93, 25, 29, 29,141,132,132, 4,204,153, 51,103,103, 78, 78,206, +111,117,237,111, 50,153, 84, 94, 94, 94, 40, 43, 43,131, 68, 34, 1,203,178,200,205,205, 69, 70, 70, 6, 28, 28, 28,112,246,236, + 89, 83, 80, 80,208,150, 71,137,205,158, 14,237, 85, 43, 42,235,131,163,152,139,153,250,209,232, 48,131, 65,223,184,180,180,212, + 42, 20, 10,133, 14, 34,214,238,177,175, 0,192, 98,177,236, 56,126,252,248, 11, 29, 59,118,116,184,158,116, 17,230,226, 98, 88, + 74,138, 32,102,173,240,140,137, 6, 99, 50,128,152, 44, 80, 70, 81,232,139,156,113,226,194,109,139,197, 98,169, 51, 43,104, 51, + 88,140, 64,112,127,191, 43, 87, 23, 72,100, 21, 6,171,234,114, 82, 71,187,150,159,159,159, 83,124,124,124,143,150, 45, 91,130, + 82,138,249,243,231,195,100, 50, 73, 44, 22, 11, 44, 22, 11,204,102, 51, 74, 75, 75,177,121,243,102,252,252,243,207, 39,220,220, +220,234, 44,150,160,148, 90, 85, 42,213,187, 28,199,249, 90,173, 86,179,143,143,143,120,195,134, 13,144, 74,165, 96, 24, 6,209, +209,209,144, 74,165, 70,133, 66, 97,190, 23,131,229,235,175,191, 22,142, 26, 53, 74, 92,157, 94,139, 54, 17, 31,176,212,171,139, +196, 33, 40,216,205,167, 57, 66,194,123, 0, 0,158,235, 55, 18, 33, 97, 1, 40,206, 75, 10, 49, 25,211, 7, 10, 72,129,199, 47, +167,212,201,157,156,154,142, 40,200, 58,114, 29,192, 79,213,233, 61,244,153,114, 28,122,244,232,129, 94,189,122, 85, 54, 7,250, +250,250,194,100, 50,193,106,181,218,109,174, 0,192, 54,136,232,140, 25,132,193,116, 96,101, 91,151, 28, 0,149,233,201,226,226, + 98,100,102,102, 34, 61, 61, 29, 64,197,121,138,163,246,221, 93, 43, 20, 10,199,144,144,144, 55,154, 52,105,130, 67,135, 14, 33, + 41, 41, 73,125,244,232, 81,101,155, 54,109,160, 82,169, 70, 40, 20,138, 79,178,179,179,237, 30, 80,217,199,199,199,185, 83,167, + 78,239,141, 24, 49, 2, 41, 41, 41,152, 52,105, 82, 65, 78, 78,206,214, 29, 59,118,140,250,239,127,255,203,116,233,210, 5,185, +185,185,248,225,135, 31,216,179,103,207,126,229,225,225,241,121,109,122, 28,199,165,102,103,103, 55, 48, 24, 12, 40, 40, 40,128, +109, 72,134, 61,123,246, 96,239,222,189,218,162,162,162,174,217,217,217, 55,237,137, 45, 40, 40,200, 37, 38, 38,198,239,250,245, +235, 88,183,110, 29,204,102,243,212,180,180, 52,179,155,155,219,154, 37, 75,150, 76, 15, 13, 13,245,236,220,185, 51, 58,116,232, + 0, 74, 41,182,111,223,142,207, 62,251,108,167,163,163,227,160,171, 87,175,214,236, 6, 42, 24, 56,115,230,204,153,222,222,222, + 47,191,250,234,171, 76, 76, 76, 12,206,159, 63, 15,150,101,209,163, 71,143, 74,115,181,103,207,158, 95,247,236,217, 51, 24,128, + 88, 38,147, 73,235,202, 94, 1, 0, 33,164, 63, 0, 91,134, 64, 71, 41,173,179,111,225,223,141,193, 96,192,245,235,215,225,231, +231,135,176, 54,237, 49,233,242, 29, 28, 63,121, 10,148, 82,116,188,114, 7,101,101,229, 88,185,114, 37, 18, 18, 18, 32, 16, 8, + 16, 26, 26, 90,167,166,217,108,198,205,155, 55,145,151,151,135, 1, 3, 6, 96,216,176, 97,248,242,203, 47, 97, 54,155, 49,101, +202, 20,220,189,123, 23,203,151, 47,199,205,155, 55, 33, 20, 10, 33,147,217,217, 74,245, 24,212,230, 69,254,141,216,213, 11,212, +106,181,130,227, 56,100,103,103,227,220,185,115,184,115,231, 14,156,157,157,161,183,114,220,119,167, 19, 57,134,136,212, 44,197, + 31,212,138,143,106,211, 41, 47, 47,167, 22,139,133, 8,133, 66,156, 60,121, 18,183,110,221,130,107, 24,173,204, 94, 89, 44, 22, + 24,141, 70,232,116, 58,136, 68,162,178, 83,167, 78,165,157, 63,127, 62, 68, 40, 20,214, 88, 5,150, 27, 46, 88,181,255,192,193, + 15, 98,162, 27, 71,244,236,242, 25,118,236,248, 20, 69, 37, 37, 40, 55, 10, 81,166, 55,163,220, 64,161,112,105,136,182,205, 91, + 34,175,192,132, 27, 87, 18,178,242,197,158,117,182,193, 88, 88,166,248,215,197,111,187, 61, 63,120, 44,164,254,157, 97,186,179, + 1,156, 94, 91,105,176,196, 82, 23,184,122, 7,162,164, 76,143, 19,201,169,176,176, 76,181,149, 47,213,145,154,154, 90,162, 80, + 40,102,159, 56,113, 98,158,173,242,231,216,177, 99,184,125,251,246,236,236,236,236,234,115,181, 53,160, 80, 40,122, 2, 88, 11, + 64,234,235,235,171,125,251,237,183,229,189,122,245,146,118,233,210, 5, 2,129, 0, 23, 46, 92,192,219,111,191,189, 79, 38,147, + 13,178,167, 50, 79, 34,145,104,139,139,139,221, 28, 28, 28, 96,177, 88,144,147,147,131,148,148, 20,232,245,122,104,181, 90, 16, + 66,178,143, 28, 57, 82,175, 17,246,129, 63,135, 95,168,138,173, 42,232, 65,234, 89, 69, 8,149, 74,213,165, 79, 92,151,166, 95, + 45, 88, 4,189,174, 12,103, 79,237, 64,225,221,124, 44, 91,177,165,153, 74,165,234, 98,111,103,226,172,172,172,245, 91,182,108, +153,216,162, 73,147,150,161, 1, 1,184,148,126, 7, 98,142,133,132,101, 33, 48, 25,192,176, 70,168,154, 82, 48,140, 12,218,156, + 82, 44,221,119,232,114, 86, 86,214,250,186,116,149,241,207, 99,104,122, 49, 8, 33,216,215,169, 49,164, 50, 25,196, 50,103,116, +216,124,164,210, 84,165,205,253, 16, 98,103, 25, 60, 90,215, 61, 48,166, 86,171,213,133,133,133,157,191,118,237, 90,235, 70,141, + 26, 97,198,140, 25,200,204,204, 4,165, 20,185,185,185,134,188,188, 60,117, 65, 65, 65, 26, 33,100,107,118,118,246, 10,123,138, + 26, 0,128,227, 56,223,237,219,183, 3,128, 24, 0, 14, 30, 60, 8,133, 66, 1, 55, 55, 55,148,148,148, 96,248,240,225, 14,211, +166, 77, 3, 0, 92,184,112, 65, 36,149, 74,107,212,186,114, 49,229,235,194, 18, 90,200,148, 39, 12,202,183, 94,108,214,189,119, + 22,158,235, 55, 2,251,119,172,196,161,189, 7,224, 45,186,147,202, 58,150,237,206, 75,205, 47,213,148,135,255,208,184,213, 40, + 65,118,217,222,101,227, 6,120, 8, 85,114,110,227,228,239,107, 31,184,151, 82, 10,129, 64,240, 80,135,246,250,154,171,170, 76, +159, 78, 57, 2, 66, 66, 68,194,139,234,156,204,222, 10, 63, 85,229,205, 69, 70, 70, 6, 50, 51, 51, 17, 22, 22,134, 59,233,183, + 33,145,136,107,189,153,172, 18,231,171,253,250,245,115, 49,153, 76,216,182,109,155,149, 16,210,111,251,246,237,231, 91,180,104, + 33,236,214,173,155,203,202,149, 43, 95, 5,176,162, 30, 97, 58,203,100, 50,177,197, 98,193,170, 85,171,160, 86,171,187,228,228, +228, 36, 43, 20,138, 31,222,121,231,157,239,163,162,162,194,146,147,147,111,232,245,250,177,217,217,217, 73,117,137, 21, 21, 21, +189, 30, 23, 23,183,145,227,184,160,216,216, 88,231,161, 67,135,186, 82, 74, 17, 21, 21,133, 93,187,118,101,103,103,103,219,211, +135, 9, 0,144,158,158, 94,122,252,248,113,109,227,198,141,253,228,114, 57,196, 98,241, 92,185, 92, 62, 75, 38,147,125,213,191, +127,127,207, 13, 27, 54, 96,211,166, 77,112,118,118, 70,106,106,106,246,181,107,215, 22,250,251,251,127,107,207, 8,238, 9, 9, + 9,169, 0,134,182,105,211,230,179,111,190,249,102, 42,195, 48,175,237,219,183,175,114,172, 51,155,185, 10, 14, 14,126,125,227, +198,141,195,236,141,249, 30, 78,182, 33, 7, 8, 33, 85,251,231,254, 83,250,102, 89, 76, 38, 19,188,188,188,144,151,151,135,220, +220, 92, 4, 6, 6,162,125,251,246,176, 88, 44,248,109,199, 78, 28, 63,126, 28,148, 82,120,123,123,195,213,213, 21,137,137,137, + 0, 80, 91,245,176,197,108, 54,195,211,211, 19, 69, 69, 69, 72, 76, 76,132,175,175, 47, 38, 76,152, 0,147,201,132, 13, 27, 54, +224,226,197,139, 96, 24, 6, 62, 62, 62,112,113,113,193,197,139, 23,235,210,228,121,128, 58, 13,150, 64, 32, 56,124,248,240,225, +193,205,155, 55, 23,222,184,113, 3, 55,110, 84,252,191,233,245,122,171, 80,128, 77,218,164,109, 67,107,218,151, 16,210,180,234, + 88, 25, 18,137,100,233,224,193,131,199,142, 28, 57, 18,227,198,141, 3,195, 48,248,233,130, 17, 25, 25, 28,204,102, 51,180, 90, + 45, 46, 93,186, 68, 91,183,110, 77, 56,142, 51,119,237,218,245,173,132,132,132, 54, 2,129,160,164, 38, 77,186,113, 35,235,221, +236,249, 1, 75,150,174, 56,249,198, 27,111,120, 62, 63, 96, 9, 46, 92,189,130,162,242,138, 86, 38,133,183, 51,218, 54,250, 16, +185, 5, 70,236,221,189,163,144,179, 26, 94,164,151,215, 89,106,139, 19, 0,242,116,122,223, 31, 86,111,153,191,110,243,214,183, + 70,191, 62, 84,218,181,235,235, 16,149, 94, 2, 91,144, 0, 69,120, 44,136,192, 9,103, 18, 47, 32,233,102,166, 65,103, 16,172, + 40, 49,235, 63,172, 75,179, 42, 12,195,124,183,124,233,162, 47,246,236, 63, 34, 48,155,205,232, 19,215,131,101, 24,230,187,218, +190,139,234, 52,157,156,156,214, 37, 38, 38,122, 26,141, 70,100,101,101,133, 68, 68, 68,128, 82,138,244,244,116, 44, 92,184,208, +186,107,215,174, 37, 82,169,116, 82, 77,119,136, 15,106, 90, 44,150,181,171, 86,173,250,248,221,119,223,149,230,230,230,226,218, +181,107, 40, 47, 47,135,217,108, 70, 66, 66,130,193, 98,177,212, 90, 49, 87, 83,156, 54,131,229,233,233,169,108,215,174,157,173, +138, 80,201,113, 28, 60, 60, 60, 84,109,218,180, 57, 15, 0,110,110,110,213, 86, 17,214,246,121,102,101,101, 29, 13,111, 24,136, + 85, 43, 22,192,108, 54, 66,163, 78, 7, 0,228, 23, 20,163, 54,115,245,208,111,137, 82, 42,151,203, 7,125,179,112,225,255,177, +119,230,113, 81, 85,239, 31,255,156,123,103,135, 1, 17,100, 27,192, 61, 77, 16, 69, 64,113, 43,113, 43, 51,115,169,204, 37,151, + 44, 45,247,114,203,165,114, 23,210, 50,119, 77,203,180, 82,203, 45,203, 29, 83,220, 21,217, 20, 81,113,151,101, 64, 64,100, 17, +102,159,123,126,127,192, 16,203,108, 40,125,179,126,247,253,122,241,154,185,219,231,158, 59,119,152,249,204,115,158,243,156, 11, + 99, 71, 12,243,122,169, 91,119,164, 93, 78,132, 54, 47, 7,140,209, 0, 33, 21,160, 36, 91,134,135, 15,159, 96,201,193, 99,217, + 42,181,186,154,105,181,212,206,242,110, 65,103, 39, 72,228,114,136,203,162, 86,166,109, 98,185, 19,132,142,114,176, 34,145,185, +100,248,106,154, 37, 37, 37,111,141, 25, 51,230,242,193,131, 7,235, 14, 25, 50, 4,125,251,246,141,207,207,207,239,154,151,103, +187,139,205,146, 38,195, 48,217,189,123,247,246,208,106,181,134, 65,131, 6, 9,114,115,115, 97, 26, 98, 95, 84, 84,132, 67,135, + 14,225,197, 23, 75,103,157,185,122,245, 42, 2, 2, 2, 44,106,126, 48,227, 74, 6,128,133, 83, 6,250,126,117, 33, 49,107, 18, +128,200,198, 47,248,226,248,145, 99, 56,125,252,220,204,246,129,220,170,215,135,182, 91, 32,237,246,206,244,128,144, 15, 88,185, +179, 55,182,238,217,205, 38,199,125,183, 88, 93,156,212, 4,192,116, 75,237, 36,132,148,206, 84, 95,193, 92, 9, 4, 2,148,148, +148,216,101,174,172,189,151, 40, 40,173, 87, 72, 62, 27, 57,101, 96,135, 63,119, 92,116,114,116,116, 44,207,249,105,218,180, 41, + 4, 66, 1,190,223,187,186, 56, 63, 63,247,115,123, 52, 29, 29, 29, 39,116,237,218, 21,119,238,220,193,229,203,151,119, 43,149, +202,203, 10,133, 98,247,221,187,119, 7,181,107,215, 14,191,252,242,203, 4, 88, 48, 88,150, 52, 77, 21,235,203,162,189,121, 0, +160, 84, 42, 19, 1,216, 44, 57, 95, 85,179,172, 88,104, 39, 0,240,247,247, 79, 27, 48, 96,128,179,193, 96, 64,153,121,118,179, + 32, 99, 86,147, 82,202, 41, 20,138,149, 49, 49, 49, 17,109,218,180,193,224,193,131,123,198,198,198,246, 12, 10, 10, 66,147, 38, + 77,240,248,241, 99, 68, 71, 71,255,196,113,220, 71,153,153,153,106,107, 63,162, 44, 93,123, 76, 76,204, 45, 0,195, 67, 66, 66, +222, 17, 8, 4,112,118,118,102, 51, 50, 50,216,163, 71,143, 2,192,152,157, 59,119, 90,236,238,176,245,153, 92, 21,123,114,174, +106,170,105, 15, 85, 53, 9, 33,115, 70,140, 24,177,225,195, 15, 63,148,182,107,215, 14, 5, 5, 5,229,166,255,224,193,131, 40, + 27,137, 13, 55, 55, 55,220,186,117, 11,123,247,238,213, 22, 20, 20,172, 16,137, 68,145,214, 52,135, 15, 31, 94, 73,211,100,222, +246,239,223, 15,211, 32, 18, 55, 55, 55,220,188,121, 19,123,246,236, 81, 23, 20, 20, 44,215,106,181, 75,255,206,107,255,175, 97, +211, 96,229,229,229, 77,158, 53,107, 86,215,247,223,127,223, 77,165, 82,177,245,234,213,131, 82,169, 52, 28, 57,114, 36,175,168, +168,104,114, 77, 78,118,238,220,185,241,125,250,244, 89,177,121,243,230,141, 27, 55,110,236, 50,120,240, 96, 12,239,221, 27,227, + 58, 56, 66,163,209,128, 16,130, 35, 71,142,220, 56,113,226, 68, 99,145, 72,164,153, 59,119, 46, 7,160,218, 4,177, 85,201,189, +242,251, 77,207, 86, 3,186,172, 90,189,110, 87,112,104,251, 6, 13, 27, 53,148,116,242,171, 3,157,222,136,135,217,143,112,242, + 92,178,230,102,114, 98, 26,167,211, 14,204, 78,182, 93,197, 29, 0,146,147,169, 14,192,228,128, 0,231,249, 75,215,111, 91,255, +227,206,221, 3, 70, 15,126, 83, 16,210,170, 43,238,101,237,195,169,216, 19,134,199, 69,116,111,145,150, 29,155,156, 92,104,115, + 42,159,170,164,167,167,171, 95,104,228, 83,160, 86,171, 93,239,221,187,135,135,153,202,194,244,244, 12,181,237, 35, 43,195,113, + 28, 52, 26, 13,238,220,185,131, 99,199,142, 33, 62, 62, 30,103,207,158,213, 29, 61,122,116, 51,195, 48,139, 45, 21,154,180, 68, + 96, 96,224,151,223,125,247,221,219, 70,163,177, 73,120,120,184,212,213,213, 21,185,185,185,136,137,137,209, 38, 36, 36,220, 9, + 12, 12, 92,106, 91,197, 60, 94, 94, 94, 24, 56,112,160, 71, 72, 72,136,135,105,196,160,159,159, 31,222,122,235, 45,143,160,160, +160,242,117,245,235,215, 55, 91, 51,203, 18,101, 17, 44,140,252,224, 19,168, 84, 79,112,225,220,126,228,231,229,226,252,165, 20, +212, 36,130, 5,148,142,244,244,246,246,110,191,104,197,170, 61,189,194,218,250, 55, 87,120, 73,220, 26, 53,132,163,187, 23,242, + 30, 61,194,133,196,219,250, 53, 81, 39,147, 84,106,181, 93, 83,229, 0,165,247,200, 52,202, 45, 96,210, 76, 48, 12, 83, 62, 11, +130,105,187,115,104,103, 48, 2, 33,140, 20,208,233,116, 54,163,119, 74,165, 50,221,199,199,231,173,137, 19, 39,254,185,101,203, + 22, 38, 60, 60,188,205,239,191,255,254, 76,147,230,166,167,167,251, 2,128, 66,161, 40,116,118,118, 22,188,247,222,123,208,235, +245, 40, 41, 41, 65, 97, 97, 33, 30, 61,122,164,249,248,227,143, 37, 0, 32, 18,137,244,189,122,245,178,249,249,177,124,103,186, +122,202, 64,223, 85,245,132,247, 6, 21,228, 92,110, 92, 79,120,239,110,251, 64,110,213,242,157,233,234, 47, 63,172,187, 40, 35, + 39, 58, 69,249,228,200,183, 91,247,236,102, 71, 12,120,203,232, 45,191, 57,179,158, 31,118,118,237,107,187,189, 85, 13,214,211, + 70,174,170,146,155, 68,227, 27,119,168, 19,209,117, 96,187,217,139,166,126, 45,175,231, 94, 15, 6,131, 1,119, 83,239, 96,243, +158, 53,197, 69,154,199,139, 31, 37,211, 88,123,180, 26, 55,110,220,136,101, 89,236,219,183, 15, 0, 76,165, 13,214, 28, 58,116, +104,208,208,161, 67, 81,191,126,253,128,134, 13, 27, 74,172,149,209,168,138, 41,226, 95,211,110,116, 91, 16, 66,238, 36, 38, 38, +250,248,248,248,144, 29, 59,118, 60,209,233,116,243,106,170,225,229,229,245,245,129, 3, 7, 94,162,148,246, 10, 14, 14, 70,131, + 6, 13, 0, 0,201,201,201, 56,125,250,244,246,140,140,140,145,246, 70, 84,109, 64, 9, 33, 40, 44, 44, 52,213, 53,209,201,229, +242,167,213, 45,169, 16,185,178,123, 64,204,255,138,140,140,140, 31, 61, 61, 61,143,204,155, 55,239,139,166, 77,155,126, 52,102, +204, 24,182,121,243,230, 40, 40, 40,128,179,179, 51,188,189,189,145,145,145,129, 31,127,252,209,152,157,157,189,153, 97,152,249, + 74,165,210,234,168,110,107,154,117,235,214,133,183,183, 55,210,211,211, 77,154, 27,245,122,253,130,156,156,156,255,249,100,201, +255,118,136, 61,255,164,101,101, 26, 86, 26,141,198,174, 64,105, 84, 43, 47, 47,111,114, 86, 86, 86,245,242,237, 21,197,173, 56, +220, 62,125,250, 52,205,205,205,221,168,211,233,186,244,237,219, 23,131, 7, 15,198, 27,111,188,129,193,131, 7,179,166,168,213, +190,125,251,170, 21,202,179,166,105,154,236,153, 97, 69,125, 40,165,173, 1, 16,194, 48, 54, 39,123,182,199,137, 7, 7, 56, 55, +145, 73,184, 77, 50, 49,215, 89,165,101,206,168, 52,204,232,248,228, 66,139, 19,140,218,163, 89, 54,177,243,207, 0,160,209,211, + 97,105,105,202, 40,107,251,155,211, 44,235, 34,220, 65, 8, 97, 41,165,171, 41,165, 59,188,189,189,239,216, 19,118, 55,163,201, + 0,165,197, 69,143, 29, 59,246, 5, 33,100,152, 70,163,113,151, 72, 36, 57,148,210,159,122,244,232,177, 96,213,170, 85,214,116, + 57, 75,237,244,243,243,219,166, 80, 40,154, 1,168,150,115,101,122, 52,173, 47,171, 71,116, 59, 61, 61,125,168,181,107,175, 72, +211, 38,190, 71,154, 52,242,121,165, 73, 35, 5, 0,224,206, 61, 37,238,220,203, 56,122,251, 78,186,197,146,149, 86,223, 75,228, +175,201,158, 73, 89, 41, 6,106,199,100,207, 85, 53, 91,182,108, 25,203,178,150, 39, 18, 54, 7,199,113,202,164,164,164,242,249, + 46,172,181, 83,161, 80, 12,241,243,243,139, 84, 42,149,123,210,210,210, 62,177,247, 28, 54, 52, 59, 50, 12,115,144,227, 56, 89, +197,245, 12,195,100,155, 76,152,151,151, 87, 3,137, 68, 82, 41,201,221,154,230,210, 57,129,159,119,234,242,210,128,179, 39, 79, +239,157,177, 56,105, 97,197,109, 19, 6,184,142, 26, 58,126,242,210,109,107, 87,206, 88,179, 55,175, 82, 73, 13,115,154,173, 91, +183,142, 6,208,172,108,187,213,235, 52, 26,141,202,164,164,164, 74,195,202,237,253,229,237,214,154,180,117,113,172,183, 80,171, +211, 5, 49, 4, 84, 40, 18, 37,230,231,231,126,110,206, 92, 89,210,244,245,245,141,124,225,133, 23, 38,223,190,125,123,123, 90, + 90,218,251,166,245, 10,133,226,171,134, 13, 27,142, 79, 75, 75, 91,147,150,150, 54,189,234,113,150, 52, 27, 55,110,236, 28, 20, + 20,244,120,254,252,249,204,220,185,115, 17, 19, 19,227,154,158,158,110,247, 15, 60,107,215,222,160, 65, 3, 47,169, 84,186,149, +227,184, 38, 70,163,113,237,157, 59,119,236,154,124,187,170,102, 64, 64,128, 40, 63, 63,127,178,159,159,223, 20, 79, 79, 79, 19, + 69,177,168, 0, 0, 32, 0, 73, 68, 65, 84,207,135, 15, 31, 62, 72, 77, 77,141,200,202,202,250,206, 94,115,101,207, 61, 10, 9, + 9,209, 0,165,211,137,217,147,111,245,191,136, 54,253,221,154,190,190,190, 77, 56,142, 91, 28, 20, 20,244,246,168, 81,163,200, +181,107,215, 16, 21, 21,133,251,247,239,239,165,148,206,182,212,165, 91, 83,205, 35, 71,142,208, 7, 15, 30,236,100, 24,230,179, +244,244,116,179,223,115,124, 4,203, 14,202,190,216,254,150, 63, 0,129,182,246,121,253,245,215,155,182,107,215, 46,186, 85,171, + 86, 92,171, 86,173,138,106, 67,243,239,104,167,233,175, 75,151,122,142,181,173,249,119,180,243, 41, 53,153,103,252,251,199,175, +253,133, 23, 94,160, 40,243,112,207,193,235,201,107,150,253,173, 95,212, 74,113,241,216, 59,223,108,250, 50,208,167,234,182,121, + 19,235, 58,253,185,239,205,165,243, 38,214,117,250,167,219,249,119,104, 2, 96, 44,172, 39, 79,163,233,231,231,183,161,127,255, +254, 70, 63, 63,191,141,207,243,181, 3, 32, 13, 26, 52,144,252, 27,238,209,191, 77,211,211,211, 51,212,219,219,251, 15,111,111, +239, 63,124,124,124,218,213,178,230,111, 94, 94, 94,193,255,196,181,255,215,254,158,106,178,231,218,100,255,254,253,183, 1,132, +247,237,219,215,131,101,217,218,154,164,243,111, 35, 58, 58,199,122,221,136,127, 55,181, 17,186,255, 71,185,121,243,230,127, 98, +244,201,127,141,143,230, 92, 86, 2,248,164, 93,247,234,219,202, 74, 51,204,232,102, 71,183,224,191, 17,106, 33,106, 67,203,190, +165,106, 74,106,106,234, 71, 10,133, 98, 74, 77, 70, 31,254, 19,148, 93,159,221, 93,159, 60,246,147,149,149, 21, 11,224, 13,155, + 59,254,195,154,255,223,249,199, 13,150,137,223,127,255, 61,251,159,110, 3, 15, 15, 15,207,191,129,231,221, 92,241,240,240,148, + 86, 74, 53, 59,109, 12,173, 65,223,106,149,161,173,118, 97, 75,159,215,228, 53,121, 77, 94,147,215,228, 53,121,205,255,158,166, + 45,237,154,248,143,231, 25,187,146,220,159, 90,252, 63,144, 84,200,107,242,154,188, 38,175,201,107,242,154,188,230,223,175,249, + 95,163,118,198, 53,243,240, 88, 97,245,104,226,179,122, 52,241,249,187,246,231,225,225,225,225,225,121,222,120,110,114,176,106, +139,208,208,208, 0, 74,233, 80, 66,200,219, 0, 64, 41,221, 69, 8,217, 22, 27, 27,107, 87, 5, 90,153, 76,150,165, 86,171, 61, + 0, 64, 42,149,102,171,213,106,239, 10,155, 73,133, 63,160,116,174, 77,211,168, 53,139,161,192,198,141, 27,103,105, 52, 26,123, +230,215, 75, 32,132,196,115, 28, 23, 39,151,203,207,220,188,121, 51,197,158, 54, 3, 64,207,158, 61, 63,114,116,116,252, 92,165, + 82, 45, 61,114,228,200, 74,123,143,123, 90, 8, 33, 97,126, 10,175, 31,244, 6, 29,151,149,157, 55,135, 82,106,118, 26,158,117, +239,147, 8, 1, 41, 45, 26,185,238,125,178,108,220,247,116,150, 53,221,154,238,111,165,125,161, 66,161,112,130,167,167,231,107, +233,233,233,177, 0,102, 80, 74,249, 42,196, 60, 60, 60, 60, 60,255, 19,106,100,176, 58,132,184, 53, 39,156,110,186,144,165, 47, +233,141,228, 52,101, 68,203,206,199, 61,178,219, 4,152, 67,161, 80,248, 17, 66,194, 41,165,254, 12,195, 92,225, 56,238,168, 82, +169,124, 84, 19,141,144,144, 16, 63, 0,131, 1, 12,105,223,190,125,224,216,177, 99,241,194, 11, 47, 64,173, 86, 35, 38, 38,102, +230,207, 63,255, 60, 51, 36, 36, 36, 9,165, 83,202,236,136,139,139, 75,179,164,165, 86,171, 61, 76, 94,137, 16,226,241,246,219, +111,199,144,191, 38,225, 37,166,201,101, 41,165, 23, 0,156, 39,132,156,219,177, 99, 71,250,139, 30,178,246, 13,253,220, 95, 63, + 20,251, 96, 78, 85, 77,141, 70,227,145,240,199, 94, 80,131, 17, 79, 50, 82,209,244,205,193,229,219,162,222,236, 14, 90, 92, 8, +161, 68,148,208,245,247,115,241, 0,226, 82, 83, 83,227,235,215,175,159, 98, 77,179, 42,109,218,180, 89, 48,111,222,188,122,125, +251,246,157, 0,192,162,193,170,137,166, 37, 8, 33,146,246,161,173, 79,252,177,123,135, 20,132, 65,255, 1,111,111, 39,132, 12, +167, 85, 38,147, 94,247, 30,241, 36, 44,166,143,253,120, 44, 11, 0,235, 86,172,159,177, 98, 24, 89,245,241, 79, 52,203,199,199, +167, 43,165,116, 70,153,222,210,140,140,140, 19,235,222, 35,158, 96,240,233,216,143,199, 18, 0, 88,191, 98,253,244,117,239,145, +149,227,126,160, 53, 42,112, 71, 8, 25, 55,114,228,200, 85,139, 23, 47,102,203,138,240,245, 10, 8, 8,104, 78, 8, 9,160,148, +242,201,193, 60, 60, 60, 60, 60,127, 59, 54, 13, 86, 96, 96, 29, 23, 25, 67,167,200,196,116,112,175,151, 2, 26,189,241, 90, 71, +210,184,105, 99,164, 92, 75,105,114,226,228,165,247,186,182,115,186,167,210,146, 29, 42,142, 44, 79, 74,178, 62,127,216,231,163, +137,222, 96, 40, 61,167, 64, 0,227,214,163,190,123,123,244,232,209,104,212,168, 81, 8, 14, 14, 70,108,108,108,215,157, 59,119, + 78,246,243,243,187,164,215,235, 15, 74, 36,146,104, 91, 21,142, 67, 66, 66, 34,125,124,124,102, 76,157, 58,149,132,134,134, 66, + 34,145,148,111,147,203,229,232,222,189, 59,186,119,239,142,172,172,172,192,232,232,232,192,109,219,182, 69,132,132,132, 44,141, +139,139,155,105,207, 11,244,249,231,159,135,152, 89,125,132, 16,114,155, 97,152,184, 22, 45, 90,164,191,224, 45,127,209,211,221, +109,255,151,139,231, 3,128, 69,227,242,219,171, 29, 1,160,146,193,210,229, 62,132,212, 73,158, 32,146,201,226, 1,196, 1,136, +175, 95,191,126,130,189,154, 0, 16, 30, 30, 46,113,114,114, 34,148, 82,180,107,215,206,245,213, 87, 95, 77, 97, 24,102,229,161, + 67,135,214, 87,220,175, 38,154, 54, 8,155, 55,125,188, 40,247, 78, 2,174,159, 59,138,126, 33, 62,210,248,171, 55, 22, 1,216, +109,237, 32, 66, 24,102, 75,108,189,153, 31, 3,147, 57,142,251,252,218,181,107, 93, 0,192,223,223, 95, 12,224,196,214,152,186, +189, 71,118, 44,120,234, 50, 11,132, 16, 17,203,178,107,183,110,221,250,193,240,225,195,241,224,193, 3,156, 57,115, 6,114,185, + 28, 11, 22, 44,104, 56,117,234,212, 8, 0, 53,154,125,128,135,135,135,135,135,231,105,176,106,176, 94, 10,113,140, 25,208,165, +105, 72,223, 87, 59, 50, 47,248, 7, 64, 36,113, 40,223,214, 42, 56, 24,173,130,131,201,152, 49, 69,141, 19,227, 19, 63, 59,252, +231,197,217, 47,133, 56,198,157,142, 43,110,103, 73,207, 96,128, 32, 98,241, 54, 0,192,214, 77, 67,217,148,148,148, 70, 50,217, + 95,197,162,187,116,233,130, 46, 93,186, 48, 17, 17, 17, 97, 39, 78,156, 8,219,177, 99,135,206,199,199,103, 69, 70, 70,198, 78, + 43,205,156,177,115,231, 78,194,178, 44, 88,150,181,184,147,151,151, 23,122,246,236, 9, 47, 47, 47, 50,125,250,244, 25, 0,204, + 26, 44,169, 84,154, 77, 8,241, 0,128,186,117,235, 26,231,205,155,151, 72,203, 0, 0,142,227, 46,176, 44,123,158, 16,114, 97, +207,158, 61, 25, 77,125,100, 62, 78, 18,135,163, 27, 55,172,134,190,240,161,171,165,243,151, 40,211, 75,159, 84,169, 60, 45,118, +116, 72, 16, 59, 58,198,139,229,242, 56, 0,241, 0, 18,236,213, 4, 74,205,149, 76, 38, 59,181, 97,195,134,186, 0, 48,113,226, + 68,151,146,146, 18,151,209,163, 71,207, 4, 80,110,176,106,162,105, 9, 66,136,203, 75, 29, 66,239,175,138,252,194, 57, 56,172, + 51, 46,236, 90,135,252,252, 98, 20, 23,149,128,227,184,106, 51,255,142,251,129, 62, 92,247, 62, 89,182,238,155,245,159, 18,134, + 33, 65,175,206,192,171,174,116,146, 66,161,184, 74, 8, 17,138,197, 98,147,174,192,215,215, 87,209,188,121,155,101, 47,116,126, + 17,235, 87,174, 5,229, 56, 10, 96,153,189,209, 43, 66,136,135,147,147,211,190,163, 71,143,134,181,109,219, 22, 23, 46, 92,192, +157, 59,119, 48,126,252,120,237,248,241,227, 69, 35, 70,140, 32, 83,166, 76,153, 72, 8,217, 69, 41, 61,251, 52,215,207,195,195, +195,195,195, 99, 47, 86, 13,150, 84,100,108, 59,111, 85, 34,140,197,183, 65,245,169,160,186,172,106,251, 56,184,248,161, 69,144, + 39, 28,196,238,204,149,107,223,180,173,184,205,214, 8, 3,147,185,218,245,181,162,165,170, 56, 83, 4, 0, 50, 71,111,221, 91, + 83, 50,174,182,109,219, 22,238,238,238,162,115,231,206, 77, 1, 80,110,176,204,104, 18,237,229, 88, 92,127,163, 19,154, 94,207, +131,131,131, 3, 76, 95,220, 38, 82, 82, 82,112,234,212, 41, 60,120,240, 0, 77,154, 52, 1,254,202,161,170,166,169, 82,169,188, +122,245,234, 21,189,116,233,210,151, 35, 35, 35,175,108,223,190, 61,156, 82,106,118,126,170,192,250,117, 92,196, 84,120,116,211, +250,111,132,208, 22,187,222,184,116, 22, 45, 95,251,208,108, 59, 27,189,241, 22,198,230,151,118, 61,254, 26,160,128,212, 89, 14, +137,220, 41,161,231,145, 75,229,145, 43, 0, 9,246,106,118,235,214,237, 61,129, 64, 48, 7, 64,157,111,191,253,214,197,197,197, +133,217,183,111,159,110,195,134, 13, 69, 34,145, 72, 75, 8, 89,242, 52,237,180,134,144,101, 23,126, 53,111,186,179, 3, 99, 64, +252,193,159,144,254, 32, 21,151,111,101,232,127, 57,157,108,212,234,141,163,204,189,158,227,190,167,179,166, 14,144,252, 16,155, +217,228,143, 62,115,199, 55, 91,212,215, 19, 58,157,110, 83, 78, 78, 14, 70,143, 30, 13,142,227,208,185,115,231, 78,148,210,140, + 73,147, 38,161, 73,147, 38,216,244,251,205, 18, 65,225,197,240,159,255, 44,140, 53,167, 89, 21, 66, 72, 96,131, 6, 13,142,158, + 56,113,194,211,199,199, 7,209,209,209,200,202,202,130,183,183, 55,198,143, 31, 47,142,140,140,220, 90, 88, 88, 56,112,241,226, +197,210,164,164,164, 29,132, 16,191, 50,207, 92,235, 35, 96,120, 77, 94,147,215,228, 53,121,205,191,133,182, 0,220, 1,228, 0, +184, 84,101, 25,101,207, 97,102, 57, 23,165,223,249, 21, 39, 47,207, 69,105,254,180, 59, 0, 35,128, 24, 0, 53,158, 83,216, 22, + 2, 0, 32,132,116, 1, 16, 13, 96, 62,165,116, 94,213,157,116, 25,209, 16, 55,124, 19,144,182, 4,213,222, 6,167,205, 0, 21, +122,160,184, 68,138,220,251, 15,112,253,194, 46, 80,131,237, 57, 50, 5, 2, 24, 86,175, 24, 42,112,114, 0, 68, 18,119, 93, 81, + 81, 17, 28, 29, 29,161, 42,206, 20,141, 24, 93, 30,217, 18,157, 56,113, 2,113,113,113, 80, 40, 20,229,109,180, 6,213,150,246, + 34,106,181, 90,104,181, 90,100,245,110, 7,199,246, 47,227,241,176,241, 56,118,236, 24,114,114,114, 32, 18,137, 32, 18,137, 96, + 48,216, 46, 22,207,148,205,196,107, 10, 90,153,219,199,215,151, 72,157,140,178,253,171,151, 47,113,118,150, 59,120,198, 30,253, + 13, 15, 30, 84, 55,160,230, 16, 59, 58, 64, 44,115, 72, 16, 59,202, 42,153,171,154,104,178, 44,187, 96,247,238,221, 62, 26,141, + 6, 34,145, 8,187,118,237,210,109,217,178,229,106,113,113,241, 75,113,113,113,229,121, 70,207,210,206,170,184,185,187, 31,120, +243,221, 15,199, 47,122,191, 39, 84,197,106,236, 61,157,140, 63,175,220,235, 11,224, 12,165,212, 98,133,251,175,247,106,110,249, +248,248,116, 31, 61,122,116,194,158, 61,123,234,125,245,213, 87, 48, 26,141, 48, 24, 12, 48, 24, 12,229,207,141, 70, 35,182,111, +223,142, 51, 23,147, 39, 41,149,133,118, 77,166, 75, 8, 81, 52,106,212,232,216,197,139, 23,221, 29, 28, 28, 16, 21, 21,133,252, +252,124,140, 27, 55,174, 60,114,149,159,159, 63,120,253,250,245,111,221,191,127,255,171,211,167, 79, 63, 2,192, 2,120,238,103, + 13,224,225,225,225,249,255,132, 13, 47,226, 78, 8,217, 79, 41,237, 3,160, 7, 0,113,133,101, 16, 66,246, 3, 64,213,229,153, + 51,103,206,142,136,136,184,106, 90, 54,237, 51,107,214,172,150,145,145,145, 75, 58,116,232,176,227,220,185,115,119,241,119, 25, + 44, 0,209,148, 82,139,185, 47,154,219, 63, 67,115,247, 23,136,188,187, 66,220,120, 16,132,245, 58, 32,237, 70, 52, 18,142, 45, + 71,250,205, 51,160,156, 17,158,126, 45,108,158,108,225, 38, 42, 84, 40, 20,113, 74,165, 18,241,241,241,184,125,251, 54,164,210, +106, 61, 75,248,243,207, 63, 1, 0,158,158,158,118, 93,132,184,109, 39,248, 37,102, 34, 45,168,116,192,159, 95, 98, 38, 0, 96, +201,172, 89, 16,139,197, 16,137, 68,229,251, 26,141, 70,155,122,164, 44,171,189,172, 91,176,218,232, 64, 66, 8,105,234,233,180, +115,238,204, 9, 13, 26, 53,121, 65,113,241,192,175,184,123, 55, 3, 15, 31,218,119,127, 36,114,199, 4,137,147, 99,188, 88,246, + 87,183,224, 83,104,254, 58,112,224,192,247, 6, 12, 24, 32,107,223,190,189,228,251,239,191,207,175,106,174,158,181,157, 21,241, +246,246,126,245,245,215, 95, 63, 48,102,204, 24,244,235,213, 3, 67, 59,251,211,244,236, 2, 21,128, 40, 74,169,205, 23, 53, 35, + 35, 35,195,199,199,167,231,155,111,190,249,115,203,150, 45,253, 41,165,104,209,162, 5,250,245,235,135,221,187,119, 35, 57, 57, + 25, 69, 69, 69,186,211,167, 79,175, 80, 42,149,155,109,233,149, 93,159, 67,221,186,117, 15, 31, 63,126,220,221,193,193, 1, 71, +143, 30, 69, 73, 73, 73,181,200,213,146, 37, 75,164,247,238,221, 91,115,228,200,145,134, 40,157, 23,142, 55, 87, 60, 60, 60, 60, +207, 31, 86,189, 8, 80,106,156, 40,165,125, 42, 26,166,170, 70,203,244,220,180, 95, 68, 68, 68,249,178,233,152,200,200,200, 37, + 21,150,109, 71,136,158, 2,147,193, 10, 39,132, 80, 0,225,148,210,147, 21,119, 40,175, 62,192, 25,160,203,136,130, 46, 35, 10, + 14, 65,115,176,111,213,176, 74, 66,246, 68,134,204,161, 86,171, 33, 20,187,233,182,110, 26, 42, 2, 0, 35,117,212, 85, 59,183, + 13,106, 82, 44,213,158,118, 18, 66,152, 10,186,213,204,131,175,175,239,215, 29, 58,133,117,126,161, 85, 59,135,139,135,247,224, +214,205, 7,200,205, 45, 0, 40,212,150, 52,163, 6,189,134,226, 59, 41,144, 57, 59, 39,188,122, 60,177, 82,228,234,105, 52,163, +162,162,166,117,232,208,225,243, 93,187,118, 41,155, 52,105, 34, 17, 8, 4,186,138,230,234,105,219, 89, 17,133, 66,209, 73, 32, + 16, 28,101, 24, 70,214,171, 87, 47, 76,154, 52, 9, 43, 87,174, 52,112, 66,105,159,245,135, 99, 7, 62,209,232,230,216, 99,174, + 76,100,100,100, 92, 6, 16,208,176, 97, 67,137,193, 96,232,250,198, 27,111, 28,236,221,187, 55,206,159, 63,143, 99,199,142, 53, +211,233,116,153,101,231, 93, 0,192,147, 97,152,165, 86,102,114,103, 68, 34,209,142, 99,199,142,181, 84, 40, 20,136,138,138, 66, + 73, 73, 73,121,228,106,228,200,145,149, 34, 87,231,206,157,123, 4,222, 92,241,240,240,240, 60,207, 88,244, 34, 38, 76,166,169, +170,201,178,135, 10,230, 75, 53,115,230,204,217,132,144,253,101, 17, 46, 21, 0,229,179, 55,191, 50,130,178, 6,159, 44, 61, 55, +161,168,146,159,100, 14, 99,209,221,106,235, 56,238,233,191,183,154,245, 56,114, 85, 38,147, 97,253,250,245,112,112,248, 43,145, +222, 94,227, 84,124,112, 15,210,198,191, 91, 30,185, 50, 69,178,240,234,136,106,251,218,105,176, 76, 17,172, 11,168,210, 69,232, +235,235, 59,161,117,235,214,239,111,220,242,179, 83,228,231, 51, 10, 10,175, 95, 21,168, 75, 52,142, 26,189, 65,119,251, 97,174, +197,242, 8,134,194,124, 72, 28, 29, 19,132, 14, 50,115,230,234,169, 52,207,159, 63,175,238,222,189,251, 15, 75,150, 44,105,207, +113,220,150,218,104,167, 9,133, 66,209,201,205,205,237,200,154, 53,107,100, 50,153, 12, 26,141, 6, 75,151, 46,197,159,127,254, +217, 39, 51, 51,243, 8,128, 35,182, 52, 44,161,211,233, 62,232,209,163,199, 55,211,166, 77,131, 94,175,199,160, 65,131,112,255, +254,253,163,183,110,221, 90,233,235,235, 59,109,220,184,113,138,122,245,234, 97,236,216,177, 34, 0, 35, 45,200,124,185,109,219, +182, 62, 65, 65, 65, 56,121,242, 36, 10, 10, 10,224,237,237,141, 9, 19, 38,136, 35, 34, 34,182, 22, 21, 21, 13,140,136,136,224, + 35, 87, 60, 60, 60, 60,255, 18,236,245, 34, 21, 35, 81, 53,212, 55, 29, 39,140,136,136,184, 26, 17, 17, 81, 41,194, 85,219,152, +114,176, 76, 78, 38,220, 76,131,170, 29,196,169,170,231,240,112, 70,251,191,187,236, 53, 78,246,116,231, 1,127,229, 96, 85,133, + 84, 25,177, 71, 8,169, 73, 14,214, 17, 74,233, 57, 84, 48, 88,190,190,190,253,189,188,188,190,220,182,109,155, 76,169, 84,194, +183,121, 96,157, 3,187,127,209,120, 58, 74,212,233,121,121, 35, 18, 51,158,236,178,164,201,169,139, 19,164,142,242,120,169,131, +188,170,185,122,106, 77, 0,248,243,207, 63,167, 86, 93,247,172,154, 10,133,162, 83,189,122,245,142,172, 89,179,198, 65,169, 84, + 66, 36, 18, 65, 46,151,227,248,241,227, 40, 51, 87, 79,141,175,175,239,188,137, 19, 39,206, 29, 57,114, 36, 30, 63,126,140, 99, +199,142,161,107,215,174, 88,179,102, 77,131,227,199,143,127,211,177, 99, 71,176, 44,139,168,168, 40,232,245,250,155,230, 52, 8, + 33, 3,198,140, 25, 51,237,173,183,222, 66, 76, 76, 12, 50, 51, 51, 49,118,236, 88,237,132, 9, 19,202,115,174,214,173, 91,247, +214,189,123,247,248,200, 21, 15, 15, 15,207,191, 4,107, 94,164, 10, 7, 0,188,110, 90,168, 24,205,170,104,190, 76, 17,170,138, +203, 85,247, 47,219,110, 87,175, 78, 77, 49, 69,176, 44, 71,173,168, 17,172,107,107, 24,243, 46,151,175,226, 84,153,149,118, 17, + 73,228, 48,218, 97, 92, 62, 31, 77,244, 51,135, 66,240,227, 2, 6, 66,177,155,174, 89,143, 35, 87, 45,237, 43,151,203,193,113, +102,243,203,171, 98, 20,245,126,139,109,250,106,127,220,105,229, 5,170,215,149, 71,178, 48,187,252,117, 5, 33, 4, 34,145, 8, + 90,173, 22, 48,211,237, 87,133, 24, 66,200,125,150,101,207, 83, 74,105,120,120,248, 38,189, 94,223, 95, 46,151,215, 29, 61,122, +180, 46, 55, 55, 23,123,247,238,197, 15, 63,252,160,122,162, 19,196, 62,126,164, 31,118, 71,249, 36,221,138, 94,194,235, 39,175, + 86,138, 92,213,130,102, 53,106, 67, 83,161, 80,116,242,240,240, 40, 55, 87, 18,137, 4,114,185, 28, 25, 25, 25, 16, 8, 4,207, + 84,164,179, 97,195,134,146,176,176,176, 79, 71,140, 24,129,235,215,175, 99,230,204,153,153, 74,165,114,207,190,125,251,198, 78, +153, 50, 69,208,165, 75, 23,100,103,103, 99,195,134, 13,250,152,152,152, 37, 89, 89, 89,203,204,233, 8, 4,130, 15, 22, 46, 92, + 72,149, 74, 37,185,115,231, 78,165,200, 85, 97, 97,225,192,136,136, 8,233,221,187,119,249,200, 21, 15, 15, 15,207,191, 8, 27, +249, 87,185,101,230,233,161,153,101,182,130,177,170,186,156, 93,101, 25, 0,180, 85,182, 39,214,206, 21, 84,198,234, 8, 61,189, +145, 41,216,182,230,195, 58,125,223, 30, 7,169,215,203,208,222,251, 21,156,234, 97,185,193, 18, 73,157,224, 92,175, 62, 10,159, +168,112,246,218, 93,232,141, 76,129, 53, 61,131, 1,130,137, 31,255, 53, 90,208,197,197, 5, 5, 5, 5,149, 34, 90, 14, 14, 14, + 80, 40, 20, 40, 44, 44,196,174, 93,187, 96,171,102, 17,165,116,225,136, 17, 35,190, 24, 55,110, 28,211,116,200, 40, 60,185,112, +186,210,118, 66, 8,164, 82, 41,100, 50, 25, 50, 50, 50,112,227,198, 13,142, 82,186,208,154, 38, 33,228, 34,195, 48, 9, 59,118, +236, 72, 15, 15, 15, 31, 89,183,110,221, 33,163, 70,141,146,197,196,196, 96,225,194,133,130,168,168, 40,221,165, 75,151, 12, 70, +163,113,106, 70, 70,198, 6,107, 90,101,122, 85,205,213, 51,107, 86,165, 54, 52, 21, 10, 69, 71,133, 66,113,100,229,202,149, 14, + 89, 89, 89,144, 72, 36,112,114,114, 66,106,106, 42, 22, 46, 92, 88,108, 48, 24,122,213,180, 93, 85,144, 56, 58, 58, 74,244,122, + 61,182,108,217,130,140,140,140, 14,153,153,153,169, 94, 94, 94, 27, 62,250,232,163, 85,254,254,254, 45,110,220,184,113,243,201, +147, 39,227,179,178,178,174, 91, 18,113,113,113,233,224,238,238, 78,206,159, 63,143,177, 99,199,106, 39, 78,156, 88,158,115,197, + 71,174,120,120,120,120,254,147,196,216, 88,126,238,176,106,176,114, 74, 84, 30, 27,182,238, 89,182, 99,247,222,209, 99, 70, 12, +145,134,135,143,128,176,232, 10,140,143,226,160,104,214, 9,132,117,192,197,132,120, 92,190,157,166, 46, 81,179,155, 10,117,170, +233, 21,143,183, 53,219,118, 65, 65, 1, 26, 54,108,136,163,155, 94,108,169, 85,103,139,130, 93, 1,130, 58,186,168,227,189,175, +158, 58,117,234, 9,128, 77,205,154, 53,171, 84,100,180,170,102,124,124,252,252, 54,109,218,236,155, 53,107, 86, 68,179,102,205, +122,141, 89,176, 22,162,143, 71, 64,149,124, 25, 14,225, 3,225,226,226,130,188,188, 60,196,198,198,162,168,168,232, 48,165,116, + 86, 66, 66,194, 21,107,154,148,210, 11, 45, 90,180, 72, 15, 11, 11,115,210,106,181, 43, 63,249,228, 19, 89,113,113, 49,114,115, +115,241,232,209, 35, 92,188,120, 49, 74,175,215, 79,126,248,240,225, 61, 75,215, 86, 81,147,227,184,114,115, 85, 91,154, 21,169, + 45, 77, 71, 71,199,233,123,247,238,173, 20,185,122,240,224, 1, 22, 44, 88, 80,172, 86,171,123, 41,149, 74,187, 10,116, 90,187, +239, 28,199,193, 96, 48,128, 82, 10,177, 88, 92, 8, 0,101,102,170,187,189,154,185,185,185,209,247,239,223,239,231,232,232,136, +137, 19, 39,138,151, 44, 89,178,181,160,160,160,198,145,171,127,203, 12,243,188, 38,175,201,107,242,154,255, 31, 52,255,107, 88, + 53, 88,201,201, 84, 7, 96,114, 64,128,243,252,165,235,183,173,255,113,231,238, 1,163, 7,191, 41, 8,105,213, 21,247,178,246, +225, 84,236, 9,195,227, 34,186,183, 72,203,142, 77, 78, 46,180, 57,246, 95, 32,128, 97,214,156,161, 2, 0, 16, 10, 97,152,221, +167, 79,116,203,150, 45, 59,247, 13,202, 22,141,157, 88, 26,217, 90,191,122,168, 40, 58, 58,122,167, 68, 34,249,246,238,221,187, +133,246, 92, 68,153, 97,122,173,109,219,182, 47, 79,155, 54,237,203,222,141,124,219, 13,232, 16, 14,161, 80,136, 75,151, 46, 33, + 47, 47, 47,134, 97,152, 79,227,227,227, 79,217,163,183,111,223,190,116, 0, 40, 41, 41, 89,216,172, 89, 51,241,181,107,215,112, +251,246,109,164,164,164,192,104, 52,222, 74, 79, 79,175, 81, 66,156, 84, 42,189, 8,224,106,109,106, 86,164,182, 52, 85, 42,213, +146, 69,139, 22,189, 50,127,254,124,137,147,147, 19, 18, 18, 18, 48,127,254,252, 26,153, 43, 91, 80, 74,161,215,235,107, 52,242, +211, 12,159, 6, 5, 5,189,184,104,209,162,102,101,185, 92,124,228,138,135,135,135,135,231,185,194,174,201,158,203,204,211, 59, +193, 1,206, 77,150,172,253,121,147, 76,204,117, 86,105,153, 51, 42, 13, 51, 58, 62,185,208,236, 48,122,115, 44,220, 68,133, 21, +151, 23, 0, 8, 8, 8,112, 76,243,194, 19,211,186,180,135,128, 82,169, 92,106,175,102, 69, 46, 93,186,116, 10, 64, 88,112,112, +240,128,131,132,204, 6,238,130, 82,186, 36, 62, 62,126,111, 77,116,218,181,107,215,176,184,184,248, 71,157, 78,215,134,227, 56, +241,201,147, 39,161, 86,171,113,237,218, 53, 21,199,113, 86, 19,196,205,113,247,238,221,171,181,173,249,119,180, 51, 61, 61,253, +146, 66,161,232, 65, 8, 57,246,233,167,159, 74,106, 26,185,178,133,171,171,107, 73, 86, 86,214, 35,181, 90,237,246,240,225, 67, +173,171,171,235, 83,213, 30,161,148,222, 34,132,180,250,228,147, 79, 22, 76,155, 54,109,250,151, 95,126, 41,226,115,174,120,120, +120,120,120,158, 39,236, 50, 88, 38,202,204, 84,120,120,184,187,227,153,115, 57, 22, 43,119,215,132,228,228,228,226,207, 71,147, +242,200,150, 64,240,236, 21,182,203, 12, 85,141, 76, 85, 69,138,138,138,150,228,229,229,181, 47, 44, 44, 52,220,187,119, 79, 69, + 8, 49, 16, 66, 84, 28,199, 45,224, 56,174,198,249, 81,255, 38, 77,165, 82,121,214,203,203,235,165,179,103,207, 78, 41, 46, 46, + 94,163, 84, 42,207, 61,141,142, 57,226,226,226,244,222,222,222,239,190,241,198, 27,163, 56,142,219,144,145,145,161,127, 90, 45, + 74,169, 22,192,167,132,144, 61, 87,174, 92,249,245,220,185,115,153,224,205, 21, 15, 15, 15, 15,207,115, 66,141, 12,150,137,232, +232,218, 49, 87, 38,170, 70,182,254,105,110,220,184, 49, 24,192,224,255,143,154, 0,144,149,149, 21,251,119,232, 2, 64,102,102, +230, 81, 0, 71,107, 75,143, 82,122,137, 16,210, 8,165,163, 68,120,115,197,195,195,195,195,243, 92,240, 84, 6,139,135,231,121, +162,108, 74, 35,222, 92,241,240,240,240,240, 60, 55, 16, 0,129,230, 54,212,100,116, 0, 33,196,172,134, 53,108,233,243,154,188, + 38,175,201,107,242,154,188, 38,175,249,223,211,180,165,253, 95, 25,157, 72,158,113, 52,151,117,241,127,201,208, 80, 94,147,215, +228, 53,121, 77, 94,147,215,228, 53,255, 89,205,255, 26,204, 63,221, 0, 30, 30, 30, 30, 30, 30, 30,158,255, 26, 53,206,193,106, +215,174,221, 11, 0, 16, 19, 19,115,171,246,155, 83, 10, 33,100,130,183,183,247,232,214,173, 91,251,139, 68, 34,166,160,160, 96, +126,116,116,244,124,115,251, 6, 5, 5,197,190,242,202, 43, 77, 78,156, 56,161, 45, 59, 22, 21, 31,141, 70, 99,122,108,108,108, +232,223,213, 86, 30,235,120,123,123, 31,145, 74,165, 13, 74, 11,140, 82, 24, 56, 35,140, 28,133,209,200, 65,111,164,208,105,213, + 15, 52,197, 5,175, 62,149,118,155, 55,235, 27,141, 92, 4, 5, 93, 79, 40, 25, 75, 9, 93, 79, 40,249,136, 50,100, 61,225,232, +135, 16, 24,190,130, 65, 48, 77,192, 9,231, 40,147,119,166,213,246,181,253, 19,204,159, 63,255,153,126, 20,205,157, 59,215,236, +252, 83,193,193,193,251,165, 82,105, 83, 75,199,149,148,148,100, 38, 38, 38,118,125,150,115, 63,239,120,121,121,189,204, 48,204, +106, 0, 45,171,108,186, 14, 96,178, 82,169,252,243, 31,104,150, 85, 60, 60, 60, 78,177, 44,219,172,184,164,164,184,168,176,176, +137,147,147,211, 29,153,131,163,163,209, 96,188,153,155,155,253,242, 63,221, 62, 30,158,255,207,216, 52, 88, 33, 33, 33,205, 1, +116, 33,132,116,161,148,190,220,162, 69, 11,207,146,146, 18,132,132,132, 60, 36,132,156, 42,155,253,250,100, 92, 92, 92, 74,109, + 52,136,101,217,101, 43, 87,174,156, 58,113,226,196,114,147,148,148,100, 57, 10,201,178,172,111,100,100,100,157,212,212, 84,136, + 68, 34,136,197,226,242, 63,150,101,209,190,125,251, 26,157,223,213,213,213,201,195,195, 99, 62, 33,100, 32,195, 48,172,173,253, + 57,142, 51, 82, 74,119,102,103,103,207,205,203,203, 43,170,201,185,218,134,182,214, 3,196,194, 57,168,241, 82,236,101,171,163, + 43, 95,124,241,197, 88,129, 64,224, 11,152,159,216,218,220,115,163,209,152,126,245,234, 85,187, 12,167,171,171,171,147,212,193, + 97, 58, 97, 4, 61, 64,185, 22,165, 98,204,117,202, 25,142,169, 75, 74,150,217,115,189, 18,137,164, 65, 92,124,124,179,228, 27, +119,209,164,113,125,104,117, 6,104,180,122,236, 59,118, 9, 65,254,141,208,183,119, 79,123,154, 98, 22, 3, 71,230,205,153, 48, +172,219,146,213,219,219,206,158, 56, 68,190,100,245,246,208,217, 19,135, 56, 45, 89,179, 61,116,206,164,161, 78,139, 86,111, 11, +157, 51,105,104,157,197,171,183,105, 1,124,240, 52,231,120,191, 85,131, 98,198,104,144,152,219,198,177, 2,205,247, 87, 30, 56, + 62,245, 5, 60, 3, 75,150, 44,105,174,211,233,174,141, 28, 20,186,176,197, 11, 30,217,230,246, 41, 40,200,246,184,125, 61,246, +115, 8, 69,254,254,237,102, 91,253,255, 20,137, 68,141, 79,157, 58,213,204, 84,105,223,104, 52,194,104, 52,194, 96, 48, 64,171, +213,226,173,183,222,170,149, 1, 49,161,161,161,163, 40,165,139, 1, 16, 66,200,162,216,216,216, 53, 79,171, 69, 8,145, 11, 4, +130, 79,196, 98,113, 23,131,193,224, 15, 0, 66,161,240,154, 70,163, 57,105, 48, 24,190,161,148, 62,177,165, 81, 17,134, 97, 86, +196,196,196, 4, 56, 57, 57, 65,167,211,149, 79, 12,207,178,108,139,176,176,176,181, 0,154,217,171,229,235,235, 27, 75, 8,241, +173,201,249, 41,165,233,233,233,233, 53,250, 49,200,178,108,179,251,169, 74,143,134,245, 21, 0, 0, 7, 7, 71,199, 75, 73,247, + 60, 66, 90, 54,172,137, 12, 15, 15,207,223,128,197, 15,205,144,144,144,131, 0,186,180,104,209, 66,214,179,103, 79, 4, 7, 7, +163, 65,131, 6,144, 74,165, 0,128,188,188, 60,207,228,228,228,119, 18, 18, 18,222, 57,127,254, 60, 66, 66, 66, 84, 0,206,196, +197,197,153,141, 70,244,120,227,165,137, 82,185,100, 37, 0,228,100, 60,202, 76,191,147,189, 58, 51, 51,115, 25,165,180,252, 23, + 53, 33,164,201,200,145, 35,167, 76,154, 52, 9,251,247,239,199,246,237,219,161,209,104, 80, 80, 80,128,232,232,104,179,237, 52, + 26,141,233,195,135, 15, 23,164,164,164, 24,202, 52, 80,241,209,104, 52,214,104,194,100, 15, 15,143,249,131, 6, 13,250, 56, 32, + 32,160,124, 90, 23,189, 94, 95,254,248,248,241, 99, 76,153, 50, 5, 64,105, 85,114,142,227,112,252,248,241,137, 51,102,204, 0, +128, 79,204,105,246,236,210, 52, 86, 64,136,175,233, 66, 57,142, 75,143, 58,117, 39, 20, 32,236,165,216,196, 74,206,200,148, 19, +215,174,109, 27,155,230, 78, 32, 16,248,198,199,199,123,136, 68, 34,187,174,141,227, 56, 4, 7, 7,219,181,175,143,143, 79, 87, + 71,185,243,246, 1,131,223,175,219, 38, 56, 88,232,171,240,134,222, 96,192,221,123,169,237, 18, 19,226,218, 28,253,227,151,209, + 62, 62, 62, 67, 50, 50, 50, 78, 88,211,209, 27, 57, 36, 94,189,133,168, 51,241,120, 67, 36, 69,137, 90,139,162, 18, 45,126,252, +253, 44,210,179,173, 78, 93,105,149,176,176, 48, 31, 71, 65,189,176, 73, 31,244,119,252,106,221, 86,199, 73, 31,244,199,215,235, +127, 44,127,156,248,126, 63, 44, 91,183, 85, 62,233,253,126, 88,189,225,135, 14, 97, 97, 97, 62, 23, 47, 94,204,176,164,103,233, + 30, 49, 70,131,100, 83,114, 6, 11, 0, 57, 27, 54, 64,247,240, 33, 20,115,231, 2, 0,198,180,244, 53,107,188, 44, 17, 24, 24, + 88,110,136,173, 97, 48, 24,210,147,146,146, 44,126,209,154,204,149,193, 96,160, 2,129,224,243,211,135,230,239,234,216,174,121, +165, 23, 51,229,102, 74,157,121, 95,204,125,251,215,195, 69,244,157, 94, 78,215,174,197, 44,177,106,178, 56,142, 99, 52, 26, 13, +110,222,188,105,182,202, 62,195, 48,182, 38, 72, 55, 75,120,120,184,164,184,184,120,155, 92, 46,111, 93, 92, 92, 60,138, 82,250, + 69,116,116,180, 39,195, 48,232,209,163,199, 23,161,161,161,247, 36, 18,201, 58,181, 90,157, 32,151,203,135, 68, 71, 71,107,236, +209, 37,132,188,236,228,228,244,227,111,191,253, 86, 55, 56, 56,152,201,205,205, 69,163, 70,141,144,151,151,215,238,212,169, 83, + 33,239,191,255,254,251,132,144,225,148, 82,187,102,111, 40,227, 69, 71, 71, 71, 58, 98,196, 8, 98, 52,254,117,185,223,127,255, + 61, 66,154, 62,108, 58,246,109, 89,137, 90, 71, 11, 78, 95,150,126, 68, 25,122,230,254,253,124,139,111, 96, 66,136,239,252, 77, +147, 61,196, 98, 49,244,122,125,249, 31,229, 0, 80,128,114, 0,229, 40, 40, 5, 64, 9, 56, 35,135,175,103,109,170, 65, 83, 43, +227,224,232,232,224,229,229,253, 80,230,224,224,240,247,101,213,242,240,240,212, 4,107,191, 74, 95,139,142,142,134,193, 96,128, +147,147, 19, 88,182,242,247,189,171,171, 43, 94,126,249,101,132,133,133,161, 71,143, 30,184,113,227,134,236,203, 47,191,180, 24, +142, 24, 58,181, 15,252,154,121, 2, 0, 40,165,222,167,247,199, 71,124, 55,127,119, 61, 0,211, 42,236, 54,106,204,152, 49,228, +209,163, 71, 24, 56,112,224, 41,141, 70,211,143, 82,106,117,186,156,196,196,196, 90,237,254, 35,132, 12,244,246,246,198,142, 29, + 59,160,213,106,171,109,119,118,118,198,213,171, 87,203,151, 89,150, 69,155, 54,109, 88, 66,200, 64, 88, 48, 88, 12, 33,190,135, +162,111,121,152,150, 7,245,109, 35,122,165, 75,211,135, 2, 70, 76, 1,144, 57,115,230, 0, 40, 53, 87,148, 82, 44, 88,176,192, +238,246,138, 68, 34, 92,191,126, 29, 44,203,226, 78,231,230, 0,128,192,248, 52,176, 44,139,196,214,165,191,106, 59,220,124, 12, +129, 64, 0,185, 92,110,151,166,143,143, 79,184,167,183,239,111,179,230, 70, 56,169,245, 20, 7,142,199, 32, 85, 25, 5, 74, 41, +188, 61, 92,209, 49, 36, 88,232,223,170,181,199,230,181,203,126,243,241,241,233,151,145,145, 97,222,253, 2, 48, 24,140,240,111, +222, 24, 91,126, 59,133,197,235,118,225, 81,161, 26, 69, 37,165,175,107,143, 14, 1,248,254,107,187, 47,181, 18, 44,203, 46,107, +209,184,177,223,150, 95,143,160, 99,251,118,216,242,235, 97,116,104,223, 14, 91,118,150, 46,111,221,121, 4, 47,117, 8,195,214, +157, 71, 16,232,223,172,254,163,251, 5,203, 96,165,182, 87,181,123,212,175,244, 30, 53, 98, 69, 4, 40,189, 55,247,199,142, 5, +128,114,131, 85, 83, 76,134,216,214,126,214, 76,112, 5,115,133,236,236,108,146,159,159, 79, 93, 92, 92,222,174,104,178, 76,230, +234,151, 67,133, 80,165,172, 38, 63,255,124,146,123,247,221, 46,215,174,197, 44,241, 7,230,154,157, 68, 91,167,211,221,123,229, +149, 87, 40, 0,104,181, 90, 31,177, 88, 92,201,181,115, 28,167,232,212,169, 83, 53,131,102,171,235,176,184,184,120,219,206,157, + 59, 7,120,122,122,162, 95,191,126, 71, 3, 2, 2,196, 14, 14, 14, 56,116,232, 16,124,125,125,235, 57, 59, 59, 31,140,136,136, +192,242,229,203,235, 31, 61,122,116, 59,128, 1,182, 94, 31, 66, 72,143,174, 93,187,238,216,191,127,191, 84, 36, 18, 65,165, 82, +225,234,213,171,168, 83,167, 14,196, 98, 49,250,245,235,199,118,236,216,209,173,107,215,174,187, 9, 33, 67, 40,165,199,108,105, +154, 80,169, 84,116,214,172, 89,112,112,112,128,163,163, 99,249,159, 76,108, 36,235,231, 53,150,125, 28,153, 37,155, 51,227,221, +200,141,155,255, 56, 81,191,126,157, 47, 82, 83, 11,242, 45,105,249,178,173, 48,115,218, 76, 0, 0,195, 48, 16,139,197,149,162, +236,166,231, 34,145, 8,109,218,180,177,217, 54,127,127,255, 13, 44,203,186, 87, 92,199, 48, 12,251,249,103,179, 13, 87,174,222, +112,212, 27,224,168,214,234,177,104,193, 23, 6,150, 97,217,192,192,192,189,148,210,156,171, 87,175,126,100,239,245,243,240,240, +212, 30, 86,195,254,114,185, 28,151, 46, 93, 2, 33, 4, 78, 78, 78,112,118,118, 70,157, 58,117, 80, 88, 88,136,228,228,100, 92, +191,126, 29,247,238,221, 3,195, 48,104,210,164, 9, 80, 90,246,161,156,138, 35, 12,182,125,189, 31, 82,185, 4,132, 0,109,123, +182, 70,104,183, 32, 36, 93,188, 51, 89,161, 80,108, 82, 42,149, 55, 9, 33,130,192,192,192,247,219,183,111,143,229,203,151, 67, +163,209,124, 99,206, 92,153, 27,181,240,209, 0,225,105,145,128,241,211, 25,184,180, 13,123,245, 47,181,105,211, 38, 54, 56, 56, +184,209,149, 43, 87,244, 64,105, 52,171,106, 55, 89,197,188,172,170,154,185,185,185,224, 56,179,169, 42,213,224, 56, 14,249,249, +213, 63, 99,171, 76, 30, 93,105,219,162,136,229, 46, 69, 5,217, 88,184,244, 39,232,245,122, 76,157, 58, 21, 28,199,129,227, 56, + 24,141, 70, 60,126,252, 24, 48,243, 51,180,106, 59, 77,215,196,178,108, 37, 3,108,107,217,154,166,187,187,187,163, 68,234,176, +125,218,156,133, 78,151, 83,210,177,255,120, 12, 40,165,216,183,241, 11, 0, 64,191, 49, 11,144,145,153,131,142, 33, 45, 48,242, +195, 79,156, 86, 68,204,217,238,238,238,222, 52, 39,231,175,226,179, 21, 53,245, 6, 14,187, 14,159, 71,230,163, 39, 24, 62,160, + 27, 52, 90, 61,178, 31,102,226,135,117, 95, 97,220,123,123, 80, 87, 46,243,106,210,164, 73, 74,197,215,200,201,201,137, 85,171, +213,167, 82, 82, 82, 62, 48,167, 9, 0,122,189,254,181, 89, 31,143,198,138, 77,187,208,178,137, 39,246, 71, 93, 64,219,192, 6, + 56,120, 60, 6, 29, 90, 53,194,225,147,177,232, 24,212, 4, 39,206, 39, 97,242, 71,239, 98,250,228, 83,175, 89,187,246,106,247, +104,201,114,151,162,194,108, 28, 88,178, 21,217,107,214,224,193,196,137,104, 91,246,158,184,196, 48, 16,249,248, 0,206,182, 95, + 79,115, 92,191,126, 29, 26, 77,245, 64,141, 68, 34, 65,139, 22, 45,172,106,154, 34, 87, 15, 31, 62, 36, 15, 31, 62,132,163,163, + 35,185,118, 53,201,232,223, 50,240,109, 99,222,175,155, 0,160, 52,114, 85,136,146, 27,171,160,186,185, 26,162,252, 43,204,198, + 5, 31,106,199,124,241,237, 53,148,253,143, 86,109,103, 98, 98, 98,249,235,211,190,125,251,235,103,206,156,121,177, 66, 20, 24, + 6,131, 65,100, 48, 24,154,153,186, 13, 13, 69,136,103,115, 0, 0, 32, 0, 73, 68, 65, 84, 6, 3, 52, 26, 13,134, 12, 25, 82, +254,198, 50,119,237, 50,153,172,181,167,167, 39, 46, 94,188,136,121,243,230,137, 91,182,108,137,155, 55,111,130, 97, 24,140, 26, + 53, 10, 1, 1, 1,200,201,201, 65,219,182,109,113,250,244,233,106, 46,195,204,123,222,201,209,209,113,243, 31,127,252, 33,101, + 24, 6, 69, 69, 69,224, 56, 14,157, 58,117, 2, 33, 4, 87,174, 92,193,103,159,125,134, 61,123,246,224,183,223,126,147,133,132, +132,108, 38,132,248, 83, 74,139, 44,105, 86, 60,157, 70,163,161, 82,169, 20, 82,169, 20, 18,137, 4, 18,137, 4, 34,145, 8, 42, + 45,139, 15,231,222,211, 8, 37,114,174,117,171, 38, 77,199,141, 25,192, 44,140,252,225, 56,128,125,150, 52,149,244, 42, 92, 91, + 18, 28,253, 33, 22,253,198,190, 12,145, 80, 12,145, 80, 4,177, 72, 12, 97,217,115,145, 80, 4,177, 80, 2,182,158,186,122, 99, +170,104, 10,133,194,122,241,241,241, 46, 21,255,151, 13, 6,195,181,137, 19, 39, 54, 25,208,183,143,231,175,123,246,179,195, 6, +245, 51,122,121,122,228,166,165, 61,184, 5,192, 37, 36, 36,132, 90,211,172, 13,120, 77, 94,243,127, 68, 91, 0, 21,127, 96,104, + 1,136,203,158,231,162,244,179,205,173,202,122, 0,200, 41,123,116,183,176,156, 11, 32, 25,128,127,217, 58, 35,128, 24, 0, 54, +231, 87,182,133, 0, 0, 8, 33,229,255,132,148, 82, 82,117, 39, 74, 41, 10, 11, 11, 81, 88, 88,136,180,180, 52,172, 95,191, 30, + 66,161, 16, 2,129, 0, 2,129, 0, 12,195,148,231, 43, 88,226,216, 31,167, 87, 3, 88, 29, 18, 18, 34,252,238,252,174,131,115, +182, 76,238, 30,214, 51,132,141,141,186,242, 54,128, 69, 0, 94, 27, 49, 98, 68, 61, 0,216,186,117,107, 46,128, 67,246, 94,132, + 72,192,248,173, 90,249, 83,253, 73,147,135, 1, 40,205,203,218,180,105, 83,221,244,244,244, 74,191, 18, 69, 34,145,205,188, 44, + 74,233,206, 91,183,110,125,236,237,237, 93,254, 69, 82,177,155,208, 96, 48, 64, 42,149,150,155, 33,141, 70,131,109,219,182, 25, + 40,165, 59,173,104, 34,229,234,159,184,121,245, 4,140, 70,174,146,153, 82,171,213,152, 55,111, 94,121,244, 10, 0,198,150, 69, + 74,236,197, 90,228,138,101, 89,156,105, 82,234, 4,122,231,208,106,185, 90, 85, 17,138,165, 83,123,191,249,174,171,129,178,229, +230,170,244, 26, 74,205,133, 88, 40,128, 76, 34,196,205, 59,105,104,228, 19,130,238,189,250,215, 61,118,112,247, 84, 0,102, 7, + 33,232,141, 28,122,135,135, 96,221,142, 19, 40,124,162, 70, 97,126, 30,114,211,174,227,218,229, 24,136,197, 98, 92,184,112,193, +169, 78, 29, 23,167,198,141, 27,193,104,228,112,230, 66, 44, 28, 28,100,216,177,253,231, 70, 13, 26, 53,198,131,123,119,205,230, + 78,113, 28, 39,232, 24,234,143,194,220, 84, 8, 4, 2,116, 12,110, 10,129, 64,128, 78, 33,205,192,178, 44, 58,183,125, 17, 44, +203,162, 75, 88, 0,154, 54,109, 10,142,227,172,254,152,160,148, 34, 37,233, 79,164, 36,159, 0,229, 56, 24,185,210,238, 95, 10, + 64,151,153, 89,253,186,178,178, 64,157,109, 6,163,204,158,231,211, 79, 63,205, 87, 42,149,186,170,219, 20, 10,133,104,207,158, + 61, 46,214, 74,167,136, 68, 34,127,129, 64,112, 45, 47, 47,143,115,112,112, 96,140, 70, 3,231,223, 50,144, 61,125,104,126,249, +220,147,243, 22,204,223,245, 78, 47,231,183,127,250,225, 15, 42,114,239, 68, 8, 43, 49,140,254,226, 91, 49,132, 34,127,123,218, +104,234, 46,188,113,227,134,205, 73,185,205,125, 94, 84,164,184,184,120,100,191,126,253,142,126,244,209, 71, 82,160,244,199,139, + 64, 32, 40, 55,253,183,111,223, 6,195, 48,216,184,113, 35, 52, 26,141,205, 55,190, 64, 32,248,120,247,238,221,117,196, 98,113, +185,185,162,148,130,101, 89, 92,191,126, 29, 95,127,253, 53, 70,140, 24,129,212,212, 84,120,123,123, 99,234,212,169,242,200,200, +200,143, 81, 58,245,169, 45, 46,107,181,218, 80,153, 76, 6,137, 68, 2,147,209, 2,128,184,219,158, 73,119,239,222,109,213,160, + 65, 61,175, 70, 1, 87,126, 15,239,220, 58,200,205,205,165, 3,202, 12,150, 57,228, 79,234,163, 40, 69,128, 46, 93,186,224,228, +201, 83,232,211,167, 15,140, 34, 17, 56,177, 24,156, 88, 12, 42, 18, 1, 98, 49,136, 88, 12,234,224, 96, 71,243, 64, 89,150, 69, + 86, 86, 86,165,117, 99,198,140,121,240,238,187,239,122, 0, 20, 74,101, 6,253,228,227, 73, 25,185,185,185,212,211,211,211, 30, + 77, 30,158,231, 6, 27, 94,196,157, 16,178,191,194,246, 62,166,229,153, 51,103,206,142,136,136,184, 74, 8,217, 95,113,189,105, +191, 50,237,253,230,150,203,142,117,155, 53,107, 86, 96,100,100,228,146, 14, 29, 58,236, 56,119,238,220, 93,212,150,193,162,148, + 18, 66, 8,181,245, 97,105,194,220,151,180, 45,131,101, 34, 46, 46, 78,239,227,227,243,221,245,216,187,221, 95, 12,109, 6,153, +163,164, 39, 33,100,181, 68, 34,249,100,248,240,225,184,112,225, 2,146,146,146,190,167, 53,152,246, 68,103,224,210, 38, 77, 30, + 6,157,129, 75, 3, 74, 35, 84, 83,167, 78, 21,157, 57,115, 70,103,106,111,213, 8,150, 37,173,236,236,236,185, 49, 49, 49,176, +150,228,254,206, 59,239,148, 63,175,152,228,110, 73,147,114, 20, 58,157, 30,197,197,170, 82, 99, 85,246,229,109, 52, 26, 81, 92, + 92,140, 65,131, 6,149,155, 46,142,227,144,157,109, 54,103,217, 38, 12,195,216, 29,185,178,168,193,178,175,182, 14, 10, 22, 30, + 63,119,185,210,151,107,255, 15, 23, 65, 44, 42, 53, 87, 50,169, 8, 50,137, 16,105,202,135,104,225,223, 82,116, 50,106,255,171, +176,100,176, 12, 70,172,254, 57, 10, 32, 4,187,246, 31, 71,104, 35, 7,204,255,236, 83, 12, 28, 56, 16, 98,177, 20,187,119,239, +196,178,181, 91, 48,182, 65, 3, 80, 0, 97,161,109,176,116,195, 14, 44, 92,176,128,217,249,235,174,206,182,218, 43, 20, 10,193, +178,108,249,151,118,213, 71,150,101,109,154, 4,160,236, 30,233,245, 40, 41, 86,193,200,113,224, 56, 10,202,113, 0,165,240, 89, +188, 24, 62,139, 23,227, 18, 83, 58,128, 47,160,184, 24, 42,149, 10, 8,111,109,231,171, 90,118, 14, 74,161,213,106,161, 84, 42, +117,137,137,137,213,190,253,130,130,130, 30,106,181, 90,171,237,157, 61,123,118,202,146, 37, 75,252, 93, 93, 93,175, 93,190,156, +168,111,221, 58, 72, 88, 53, 7,171,121,179,230, 5,243, 22,204,223, 53,236,189, 55,222,222,240,217, 96,195, 71,115,127, 20,216, +147,232,110, 66,167,211,221,235,209,163,135, 93,169, 60, 42,149, 42,203,210,182,208,208,208, 81,132,144,197,205,155, 55,151,116, +235,214, 13,167, 78,157,194,226,197,139, 57,131,193,144, 11, 0, 29, 59,118,116, 95,184,112, 33, 73, 78, 78,134,139,139, 11,178, +179,179,183,132,134,134, 46,180,150,248, 46, 22,139,195,219,182,109,203,104, 52,154,242, 31, 37, 12,195,224,250,245,235,136,140, +140,196,144, 33, 67,208,188,121,243,242,255,173,174, 93,187, 10, 87,173, 90, 21, 14, 59, 12, 22,195, 48,147,187,119,239,254, 21, + 74, 71, 17, 86,252,144,187, 6, 96, 58, 0, 60,120,144,155, 53,228,173,142, 87,187,119, 9, 14,109,218,200,199,219,154,222, 35, +225,109,120, 7,203, 32, 18,138, 48, 98, 70, 95,236,223,191, 31,227,231,189, 91, 22,201, 42,141, 96, 9,133, 34,136,132, 98,136, +221,159,110, 34,130,178,207, 17,226,236, 92, 7, 0, 80,167, 78,233,163,209,104, 36, 0, 40,195, 48,124, 74, 22,207,191, 6,123, +188,136,201, 32, 85, 92, 38,132,236,143,136,136,232, 83,117, 93, 69, 51,101,238,121,197, 99, 35, 35, 35,151, 84,208, 46,169,141, +235,169,181,169,114,244,122,235,243,246,118,235,214,109,162,147,147,211, 74, 0, 8, 13, 13,197,253,179, 25,184,127, 54, 3,254, + 47,182,236, 20, 28, 20,154, 63,100,200, 16,184,185,185, 97,250,244,233, 20,192,230,154,156,123,195, 94,253, 75, 21,151, 19, 18, + 18,158, 58, 47,171,108,100,220, 39,176,144, 79,245, 52, 80, 74,161,215,233, 81, 92,162,134, 78,167,131, 94,111,132,193, 96, 68, + 72,128, 19,126,252,246, 83,104,181, 58,232,141,165,235, 74, 35,101, 70, 72, 68, 26,116,105,239,167, 7, 97, 84, 39,207, 63, 48, +211, 25,245, 23, 45,227, 82,193,178, 44, 46, 7,249, 0,168, 30,185,234,169,212,217,109,180, 40,103,124,209,211,211, 3,169,135, + 47, 2, 0,228, 14, 82, 28,217,186, 16,142, 14,165,191,228, 95, 27, 49,187,212,100, 73, 68,208,233,180,240,240,108, 8,131, 81, +255,162, 37, 61,131, 94,167,109,221,204, 7, 46, 78, 50, 36, 94, 58,143, 79, 38,124,128, 81,163,222,135, 72,234,132,147, 39, 79, + 32, 85,153,141,219,233,143, 49, 97,238, 58,232,245, 70,232, 12, 70,232, 13, 28, 86,252,176, 31, 58,163,109,103, 36, 18,137, 48, +117,234, 84,153,165,237, 59,118,236, 80,217,101,176,104,153, 9, 46, 81, 65,163,214, 64,171, 43,189, 23,198,198, 66, 44,250,236, + 93,232,245,122,168, 6,119,128, 78,175,135,113,242, 0,232,116, 58,164, 57, 8,152,206,161, 10, 61, 8,163, 58,115, 41,221,234, + 61, 50,157,195,154,129,162,148,154,237, 58,172,138,201,100,181,110, 29,116,109,196,160,208,136,179,231, 46,229,156, 61,119,169, +218,126,141,155,135,222,249,104,209,142, 89, 53, 49, 87, 64,229,238,194,103,193,148,208, 46,151,203,145,146,146, 2,150,101, 65, + 8,121, 20, 23, 23,231, 9, 0,243,230,205,203, 21, 10,133,110, 44,203,226,227,143, 63, 6,203,178,238,227,199,143,255, 28,128, + 69,131,101, 48, 24,252,157,156,156, 80, 84, 84, 84,254, 58,138,197, 98,204,156, 57, 19,195,134, 13, 43, 55, 87, 98,177, 24, 91, +182,108, 65, 72, 72, 8,180, 90,173, 93,145,187,244,244,244, 75, 0, 94,178,181, 31,199,113,165,221,172, 28,103,245,141, 37, 47, +246,131,250,158, 24, 70,145, 8, 59,246,237,195,176, 97,195, 32, 22, 75,202, 35, 87, 16,137, 64,196, 98, 48, 34, 17,140,108,141, +198, 75,152,218,129,194,194, 66,118,203,150, 45,141, 91,182,108, 73, 40,128, 22, 45, 2,200,254, 3, 7,234,203,229,242,187,174, +174,174,213,162,164, 60, 60,255,118, 42, 26,164,218,208,154, 57,115,230,108, 0,116,230,204,153,179, 77,203, 17, 17, 17, 42, 0, +202,103,213,175, 53,131,101, 43,130,181,124,249,114,180,106,213,202,226,118, 74, 41, 86,173, 90,133, 31,127,252,113, 57,165,244, + 78, 77,206,253, 97,127,225, 69, 7,153,200,187, 68,165,203,252,246, 55,125, 88, 80, 80, 80,108,135, 14, 29, 26,199,198,198, 90, +140, 96, 89,170,141,245,119,148,105,160,148, 66,171,211,163,164, 68, 5,181, 86,139, 41,159,174,181,231,178,136, 78, 91, 36,120, +189,215,203, 22,205, 67, 77,114,176,108,117, 13, 86, 68,175, 55,192,228, 1,158,148,168,209,117,200, 76, 92,250,125, 37, 0,148, +155, 43,153, 68, 8,169, 88, 8,134, 0, 4,150,181,245,170,194,190, 51, 38,126,112,122,253,247, 63,250,246,127,121, 52, 38, 77, +154, 4,129,216, 1,117,221,220, 97, 48, 82,212, 87,120,224,118,250, 99,236, 94,243,105, 89,218, 25,197,203, 67,231, 97,249,103, +163,177,108,158,237, 95,245, 44,203, 98,205,154, 53,170,170, 81,171,138,145, 44,123, 40, 55, 88,197, 42,168, 52, 90, 76,155,181, +206,158,195, 74,239,209,171, 47, 89,188, 71, 85, 49, 55,112,162, 98, 27,108, 69,176, 76,204,158, 61, 59, 5, 0, 11, 0,150,190, + 69, 37,110,128,127,167,222,159,217,219,182,191, 3,142,227,112,224,192,129,106,209,213,138,152,238,153, 61, 63, 2, 56,142,195, +131, 7, 15,144,148,148,132, 14, 29, 58,160,160,160, 0, 2, 0, 83,175, 92, 65,192,240,225,208,148,165, 46,136,197, 98,140, 25, + 51,166,150,175,166,140,178, 55, 60, 37,214,111, 84,177, 67, 58, 60, 3, 37,216, 28,185, 23, 19, 23,140,128,123, 11, 41,190,158, +181,177,124,251,178,239,230,149,229, 97,137, 33,181,111,252, 73, 37, 10, 11, 11, 5, 95,125,253,117,235,176,118,237,101,195, 70, +140, 98,180, 6, 14,139,190, 92,201,254,186,125,171,219,214,173, 63,201,164, 82,233,181,154,171,242,240, 60,223,212,150,185, 50, +105,153, 34, 88, 17, 17, 17, 87, 35, 34, 34,170, 69,195,158, 5,155,223, 62, 44,203,162,226,144,229,170, 16, 66,236,202,193,154, + 50,101, 10,156,156,156,204,110,211,233,116,244,242,229,203,201,153,153,153,155, 40,165, 53,174,139, 35, 22, 50,158,203,191,250, +193,119,210,228, 97, 28, 80, 58, 90,107,237,218,181, 46,166, 28,172,138,121, 88,182,114,176, 60, 60, 60,230, 47, 93,186,116,210, +107,175,189,198, 48,204, 95, 53, 29, 77,221, 17, 21,187,242, 56,142,131, 94,175,199, 31,127,252, 49, 41, 34, 34, 2,176, 16,245, +162,180,180,251,169,184, 68, 5,181,166,244, 11,246,118,210, 46,115,187,154, 59,216,230, 46,166,200, 85,251,148, 60,179,145,171, +195,158,165, 95, 92,189,115,108,107, 17,134, 77,185,247, 32,173,157, 87, 61, 23, 60, 46,120, 2, 73, 89,183,160, 9,147,185,146, + 73, 68,168, 91, 71,142,188, 71,217, 16, 10,133, 22,163, 35,148,210, 7,132,144,151, 6, 13,232,125,148, 97, 5,210,138,219,132, + 50,103,135,168,179, 87,234, 62,124, 92, 2,174,194,117,114,148, 98,226, 66,251,130,152, 66,161, 16,227,199,143,183,104,112,246, +237,219,167,178, 71,167,178,193, 42,141, 34,217,125,143,236,196,158, 8,150,189, 6,171, 42,166,209,133, 34,145,200,191,204,124, +217, 77, 80, 80,208, 33, 7, 7,135, 70,246,238,111,111,209, 81, 66,200,130,110,221,186, 45,246,245,245,245,248,232,163,143,136, + 64, 32, 64,104,104,104,189, 47,190,248,162, 0, 0,252,253,253,157,128,210,207,152, 21, 43, 86,224,218,181,107, 57,132,144,133, +214, 52,197, 98,241,245, 58,117,234,132,118,235,214, 13, 5, 5, 5, 72, 77, 77,133, 92, 46, 71,192,215, 95,227,202,184,113, 8, +218,176, 1, 76,183,110, 0, 74, 7, 13, 92,185,114, 5, 18,137,196,236,200, 73, 0,240,241,241, 9,163,148, 46, 5,208, 9,127, +117, 11, 82, 0,103, 9, 33, 51, 50, 50, 50, 46, 86, 59,136, 33, 12, 0, 24,109, 68, 88,197, 5,158,208,164, 73, 48,114,228, 72, +136, 68, 98, 64, 44,198,180,105,211, 42,124, 30,137,193,150,229, 99,113, 70,177, 53, 41, 0,149,243, 83, 0, 64,171,213, 18,137, + 88, 44, 25,241,222,251,204,140,105,159,112,122,131,129, 19, 8,132,204,212, 57, 75,152,155, 55,146, 36,197,197,197, 12,169,201, + 47, 43, 30,158,127, 1,230,114,169,202,162, 80,150,200,169,152,151,101,201,160, 85,204,201, 2, 96, 87,185, 24, 91,148, 27, 44, + 51,125,158, 55, 19, 19, 19,155,181,108,217, 18,169,169,169,102, 71,202, 1, 40, 29,194, 44,147,225,214,173, 91, 0,112,211,210, +137,142, 31, 63,190, 26,192,106,211,178, 66,161,232, 16, 62, 48,252,108, 80,183, 96,236,250,230,215,130,204,204,204, 32, 83, 77, + 44, 66, 8, 81, 40, 20,195,132, 98,193, 59, 77, 3,235,119, 49,114,220,210,227,191,159, 49,155,227, 3, 84,207,193, 50, 24, 12, + 79,157,131, 69, 8, 25,248,218,107,175, 49,201,201,201, 24, 52,104, 16,126,250,233, 39, 75,187, 98,216,176, 97,216,177, 99, 7, + 94,125,245, 85, 38, 50, 50,210, 98,153, 6, 74, 1,189,206,128,226, 18, 53,212,234, 90,185,111,102,121,214,200, 21, 0, 80,206, +112,236, 74, 66, 92,155, 86, 33, 29,132,247,210,178, 32, 21, 11, 43, 25, 44, 7,137, 8, 82, 73,233, 58, 47,247,186,136, 57,119, + 82,103, 48,232,173, 14,131,167,148, 62,128,153, 34,141, 18,167,122, 41, 61, 59,181,170,107,238,152,229,179, 70,160,213, 47,203, +109,182, 87, 40, 20,226,251,239,191, 87, 89,138, 94,217,251, 26, 80,138,242, 46,194, 18, 85,237,222, 35, 79, 79, 79,119, 15, 15, +143,245, 46, 46, 46, 82, 83,238,144,165,237,214, 34, 92,150,168, 82, 23,235,218,146, 37, 75,106,100,178,196, 98,113,163,179,103, +207, 54, 51,229, 5, 90,123,212,106,181,120,231,157,119,236, 10, 11,198,198,198,110, 14, 14, 14,190,237,238,238, 30,213,177, 99, + 71, 73,114,114, 50, 22, 45, 90, 68,132, 66,161, 51, 80,250,127, 89, 84, 84, 4,129, 64,128,199,143, 31,131, 16, 50, 50, 54, 54, +246,176, 53, 77,141, 70, 19, 29, 29, 29,221,166,111,223,190,236,181,107,215, 32, 16, 8,192,113, 28, 52,237,219, 35,104,195, 6, + 36,125,242, 9, 94,190,119, 15, 26,189, 30, 82,169, 20,135, 15, 31,214,149,148,148, 88, 44, 35, 34, 22,139, 55,158, 63,127,190, +165, 84, 42,133, 78,167, 3,199,113, 96, 24,134,176, 44,219,185,101,203,150,171, 80, 58,114,169,156, 70,141, 60, 60,198,127,208, +251, 69, 35,199, 25, 51,148, 57, 57, 22,100, 1, 0, 90,167, 28,184,251, 75,202,243,173, 68, 66, 17, 68,130, 82, 99,101,138, 92, +137,132, 34,136, 68, 98, 72,196,118,117,225,211,170,239, 29, 83,238,149,163,163, 3,247,194, 11, 47, 36,223,188,117, 59, 0, 0, + 83,167,142,139,221,121,177, 60, 60,207, 19, 86,242,175,114,170,152, 35,109,133,229, 28,148,206,173,220,167,236, 57, 42, 60,191, + 4,160,109,149,125, 77,219,181, 85, 30, 77,219, 19,107,227, 90,172,125, 80,246,254,224,131, 15, 54,188,242,202, 43,221,167, 78, +157, 10,185, 92,142,204,204,204,242,127, 90,177, 88, 12, 63, 63, 63,168, 84, 42,156, 58,117, 10,249,249,249,199, 1,124,104,239, +137, 51, 51, 51, 47,220, 74,184,249,168,115,223, 48, 55,255,176, 23, 93,210, 83,210,219, 3, 56, 71, 8, 33, 62, 62, 62,223, 13, +254,228,181,247,186,190,217, 14, 34,177, 16,105,183, 44,230,209, 2,168,158,131,245, 44,181,177, 24,134, 97, 9, 33, 24, 52,104, +144, 93,251, 15, 30, 60, 24, 39, 79,158,132,181,238,196,210, 46, 66, 29, 74,138, 85, 40,169, 69,131, 69, 8,129,209,104, 44,143, + 92,153,254,122, 42,117, 96, 24,166,220, 88,188,150,109, 95,201, 9, 0, 80,151,148, 44, 59,125,108,223,152, 23, 3, 90,187,119, + 8,110,142,155,119,211,176,108,246, 95, 93, 45,211,198, 14,198,150, 29,127, 64,225,229, 6,141,234, 9,142, 28,252,163,160,176, +176,112,217,211, 94,195,150,189, 39, 1, 0, 47, 13,173, 60, 70, 96,208,199, 43,236, 58, 94, 32, 16, 96,212,168, 81, 22, 35, 88, + 81, 81, 81,170,138,145, 72, 75,152,238, 81,113,177, 26, 37, 42,187,130, 94,118,161, 80, 40,130,218,183,111, 31,245,237,183,223, +186,213,171, 87, 15, 74,165,178,146,193, 82, 40, 20, 65, 97, 97, 97, 81,223,126,251,173,155,187,187, 59, 82, 83, 83,237, 46, 17, + 2, 84,174,139,149,147,147, 67, 30, 63,126,204,213,173, 91,183, 70, 38,139, 97, 24,104, 52, 26, 92,187,102, 95,143, 82, 77,138, +142, 54,106,212,232,167,149, 43, 87, 74,238,223,191, 15,189, 94,143,228,228,228,106,131, 16, 88,150,197,204,153, 51, 49,103,206, +156,245, 0, 26, 88,211, 51, 24, 12,223, 12, 31, 62,252,131,140,140,140,186,158,158,158,200,204,204,132, 72, 36, 2,165, 20,164, +107, 87,188,116,247, 46,116, 70, 35,100, 50, 25,110,220,184,129, 77,155, 54, 21,235,116,186,111,204,105, 53,109,218, 84,204, 48, + 76, 51,145, 72,132,119,223,125,183,210,182,173, 91,183,162,131,255,227,208, 15,223, 20, 63, 49, 82,145,230, 9,252, 15, 49, 12, + 67, 38,140,238,221,188,115,135, 86,129, 87,147,239,221, 86,102,231,157,181,214, 86, 97,129, 27,116, 74, 9, 32, 18,253,149,111, + 85,150,115,197,138,197,229, 35, 10,169, 88, 12, 78,108, 95,177,224,138,166,137, 16, 2, 55, 55, 55,205,138,111,150, 73, 28, 29, + 29,141, 0,224, 36,119, 52,254,186,117, 45,220, 92, 93, 53,213,220, 24, 15,207,191,155,234,137,166,255,155, 99,159, 26,139, 6, + 43, 46, 46,238, 46,128, 30,193,193,193, 67, 79,157, 58,181,124,202,148, 41,238,157, 59,119, 70, 94, 94, 30, 26, 52,104, 0,111, +111,111,196,198,198, 34, 49, 49, 49,151, 82, 58, 53, 54, 54,182, 90,168,199,218,108,219,148, 82,170, 80, 40,118,234, 74, 74,198, + 5,117,126, 17, 39,119,157,142,240,246,246,254,208,215,215,119,242,136, 89,125,223, 11,239,223, 22, 41,241,247,112,225,232, 21, +100,166,230, 98,228, 75, 51, 44,106,218,147,131, 85,241,177,106, 14, 86, 69, 77,142,227,140, 90,173, 22,191,252,242,139, 93, 38, +107,251,246,237, 80,171,213,224, 56,174,210,151, 78, 69, 77, 35,103, 36, 78,206,238,240,169,239, 15,157,182, 24, 28,103,255, 47, +203,138,159,144,230,174,221, 96, 48, 96,254,252,249,152, 62,125, 58, 22, 46,180,220,187, 34, 16, 8,176,118,109,245,220,175,170, +154,121,121,121, 69, 10,133, 98,216,142,239, 87,238, 26, 58,122,146,147,111,199, 32,108,254,245, 32,244, 58, 61,164, 18, 1,234, + 58,203,241, 66, 35, 31,104,213, 37, 88,183,122,121,161, 90,173, 26, 86, 53,247,172, 38,179,172,143, 28,208, 5, 95,110,250, 29, +167,183,253, 21,160,124,105,232, 92,252,252,213, 68, 4, 7,255, 96, 85,211,104, 52, 66, 40, 20, 98,219,182,109, 42, 75,163, 9, + 89,150,133, 37,131, 85,245, 30, 57, 59,187,195,183, 97, 0,180,234, 39,181,118,143,220,220,220,166,127,247,221,119,110, 42,149, + 10,215,175, 95,199,245,235,215, 65, 8,185, 86,117,123,113,113, 49,146,146,146, 76, 38,167,146,211,177,246,122,154, 34, 87, 57, + 57, 57, 36, 51, 51, 19, 14, 14, 14,204,229,203,151,213,173, 91,183,190,134,178, 28, 45, 91,215,174,209,104,238,119,239,222,221, +236,126, 26,141,198, 71, 34,145, 84,154,178,201, 84,116,180,106, 87,161,185,118,166,165,165, 37,172, 92,185,178,126,243,230,205, +177,113,227, 70,141,147,147,147,120,202,148, 41, 96, 89,150,172, 88,177,130,230,229,229,233,102,206,156, 41, 62,115,230, 12,138, +139,139, 19,172,181, 19, 0, 40,165, 69,132,144, 49, 29, 59,118,252,241,208,161, 67,178,102,205,154,161,160,160,116, 0,229,150, + 45, 91, 48, 97,194, 4,200,100, 50,164,164,164,160, 95,191,126, 37, 37, 37, 37, 99, 42,214,192,170,168,105, 48, 24,136, 80, 40, +164, 28,199,225,179,207, 62,171, 84, 88,212,193,193, 1, 50,177, 17,223, 46,104,226,248,201,151, 89,142,147,198, 13, 31, 14, 0, + 70,142, 51, 94, 77,190,119,251,219,205,191,159, 0,112,202, 82, 59, 1,128,171, 83,128,122,205, 74, 35, 88, 66, 83,205, 43,145, +164,210,232,193,210, 58, 88,165,117,177,108, 93,123,213, 84, 12, 87, 87, 87, 67, 72, 72,112,178, 74,165, 98, 77, 94,170, 94,189, +122, 73,101,251, 82, 63, 63, 63, 45,170, 84,212,171,201,255,166,189,240,154,188, 38,143,121,108,134,250,227,227,227,183, 5, 6, + 6, 30,138,140,140,140,220,187,119,239,232, 73,147, 38, 17,103,103,103,236,220,185,147,230,229,229,253, 32, 22,139,167,159, 63, +127,254,169,234, 69, 80, 74,183,156,249,227,194,216, 33,159,188, 65, 38,125, 53,178, 83, 66,116,210,181,214,157,154,161, 85,199, +102,136, 61,158,140,181,179,119,252,100,208, 27,190,200,204,204, 76,181,166, 99, 79, 14,150,233, 79, 32, 16,216,172,131,181,119, +239,222, 73,189,123,247,102, 98, 98, 98,170,229, 92, 85,204,195,138,138,138,130, 78,167,195,206,157, 59, 57,107,117,176, 56, 96, +223, 55, 95,125, 49,226,251,173, 7,196, 12,209,225,252,169,221, 40,120,108, 61, 42, 39, 18, 9,241,243,246,125, 58,129,128,189, + 97,165,173, 15,226,226,226,220,190,252,242, 75,150, 97, 24,172, 93,187,182, 82,228,170, 42, 87,174, 92,225,244,122,189,205,123, +165, 84, 42,163,188,188,188, 6,111,248,102,193,150,174,175,246,117,105,209,162,165,192,195,163, 62, 4, 12,131,252,188, 28, 92, +186,112,198,112,248,192,111,249, 90,173,118,164, 82,169,140,178,165,103,141,136,111,127, 51,187,254,173, 73,214,187, 7, 25,134, + 49,232,245,122,129,163,163, 35, 12, 6,131, 89,115,213,189,123,119,217,217,179,103, 85, 58,157, 14, 44,203, 90,117, 76,165,247, +104,238,136,239,127,172,221,123,100, 52, 26,253, 31, 63,126,140,226,226, 98,196,198,198,210,181,107,215,230,228,231,231,207,174, +184, 61, 47, 47, 15, 69, 69, 69,184,116,233, 18,221,184,113, 99, 78, 97, 97,161,181,124,130, 42,109, 40,173,139,245,248,241, 99, +206,193,193,129,209,235,245,250,214,173, 91, 75, 69, 34,251,106, 94, 1, 64, 66, 66, 66, 47, 75,219, 58,117,234,116,243,236,217, +179, 47, 84,156,155,208, 96, 48,136, 52, 26, 77,179,126,253,250,217,252,252,144,201,100, 67,118,239,222,189, 77, 42,149,182, 82, +171,213, 31,100,103,103,111, 1, 80,159,101, 89,220,186,117, 43,215, 96, 48, 12,252,236,179,207,190, 47, 46, 46,190, 34,151,203, +135,218,211, 94, 74,233, 97, 66,200,208,128,128,128,205,243,230,205,115, 12, 15, 15, 23, 42, 20, 10,132,132,132, 32, 37, 37, 5, + 7, 14, 28,208,173, 91,183,174,164,164,164,100, 20,165,212,226,251, 83, 32, 16, 80, 0,196, 96, 48, 84,154,195, 84, 44, 22, 67, + 40, 20,162, 68,195, 96,244,103,119, 84, 28,132,170, 37,203,126, 58, 64, 41,136, 50, 51, 55, 55,235, 97,254, 69,129, 94,127,234, +190,178,200,234, 92, 79,198, 92, 7, 52,116, 14, 4,240, 87,154, 2,195, 49, 32, 58, 2,214,200,130,213,179, 32, 2, 65,105,116, +203,190,233,174,168,193, 96, 64,159, 62,125,176,127,255,126,244,239,223,159,194, 74,174,200,254,253,251, 45,254,184,224,225,225, +249,251,177, 43,151, 34, 41, 41, 41, 31,192,135,109,219,182,221, 58,113,226,196,253, 28,199, 9, 57,142,123, 61, 33, 33,225,244, +179,156, 60, 51, 51, 51, 78,161, 80,204,118,247,113,137,232, 53,180, 19, 90,182,109, 0,163,193,136,179, 7, 19,240,195,146,223, +118,164,167,165,191, 71, 43,204, 85,104, 9,123,114,176, 42, 62,218,170,131,181,104,209, 34, 44, 94,188,184,198,163, 8, 45,237, +115,238, 82,198,135, 29, 66,189,125,223,234,219,233, 85,134, 16,170,177,146,103, 67, 8,168, 41,211, 66, 32, 96,111,156,188,144, +102,177,216, 82, 86, 86, 86,247,113,227,198,253,201, 48, 76,131,191,142,183,156,111,100, 52, 26, 51, 31, 61,122,244,138,173,107, + 42,211, 62,228,235,235,219,252,228,225,223,103,157, 57,118, 40,220,104,212, 53, 37, 32, 16,137, 68,183,245, 70, 67,180, 94,171, +141, 72, 79, 79,127,230, 66,108,179, 62,236,143, 7,202, 92, 8, 4,108,105,237,169,178,219,189,123,213, 20, 4, 7,255,108,241, + 56,137, 68,114,104,243,230,205,125,134, 15, 31, 78, 4, 2, 65,121,183,155,233,250, 25,134,193,133, 11, 23, 84, 90,173, 22, 63, +252,240, 3,149,201,100, 86, 11,215,254, 93,247,232,201,147, 39,163,250,245,235,183, 5,128, 4,192,173,130,130,130,143,148, 74, +101,122,197,237,253,251,247,223, 2, 64, 66, 8,169,182,221, 22,166,146, 13,117,235,214,189, 86, 22,185,146, 62, 77,162,187, 37, + 56,142, 99, 45,117, 31,218,211, 85, 88, 54,183,224,155,166,229,208,208,208, 5, 99,199,142,173, 56,217,243, 41, 0, 77,106,218, + 46, 74,105, 20, 33,164,229,103,159,125, 54, 89, 38,147,117, 85,169, 84, 45, 0,192,193,193,225,122, 73, 73,201, 9,157, 78,183, +146, 82,106,113, 26, 27, 0,184,125,251,182,182,113,227,198, 41, 6,131, 33,208,195,195,163,124,244,161, 88, 92, 26, 77,186,112, +221, 53, 54, 35, 35,163,173, 53, 13, 43,237, 75,183, 22, 81,182,116,140,181,237, 90,173, 54,231,220,185,115,174,199,142, 29, 99, +141, 70, 35, 14, 31, 62, 92,254,163,207, 92,111,224,157, 59,119,160,213,106,171,151,136,231,225,225,249,159, 64,254,206,110,122, +123, 67,136, 10,133, 98,144,212, 81, 50,174, 65,115,239,214,202,187,217,201, 69,249, 37, 63,103,102,102,126, 75, 41,173,246, 1, +254,111, 9,117,242,154,182, 53,197, 14,206, 71, 8, 43,106, 96,105, 59, 53,234, 30,104, 75, 10, 95, 53,167, 25, 22, 22,230, 35, + 18,137,150,105, 52,154,215,172, 85,105,103, 89,214, 32,147,201, 14,169,213,234,233, 85, 39,123,254, 55,190,158,243,231,207, 55, + 27,146,176,119, 20,225,220,185,115, 77, 3, 73,236,106,103, 80, 80,208, 9, 7, 7, 7,179, 5, 53, 75, 74, 74, 82, 19, 19, 19, +203, 13,251, 63,249,122,154, 70,203,217,147,119, 84, 81,243,169, 70, 17, 62, 67, 59,107, 66, 85, 77, 95, 95, 95,169,179,179,243, + 50,134, 97,172, 22, 56, 53,193,113,156, 54, 59, 59,123, 74,110,110,110,121, 40,246,223,248,158,231, 53,255,255,104,254,215,168, +181, 58, 88,207,130, 82,169,252, 5,192, 47,255,116, 59,120,254,183,152,204,211,211, 80,102,150, 44, 78,222,252, 95,197,100,144, +204,172,191, 14, 88, 41, 72,246,148,216, 83,142,225,121,224,105, 19,186,203, 12,148,205,226,162,207, 3,233,233,233,106, 0, 19, +254,233,118,240,240,240,216, 7,223, 65,207,195,195,195,195,195,195,195, 83,203, 16, 0,129,230, 54,212, 36,244, 71, 8, 49,171, + 97, 13, 91,250,188, 38,175,201,107,242,154,188, 38,175,201,107,254,247, 52,109,105,255, 87,186, 30,159,139, 28, 44, 94,147,215, +228, 53,121, 77, 94,147,215,228, 53,255,127,107,254,215,224,187, 8,121,120,120,120,120,120,120,120,106, 25,187, 13,150,220,203, +223,223,189, 97,208, 22, 87,191,214,151, 93,253, 90, 95,118,111, 24,180, 69,238,229,111,119,173,157,255, 18, 10,133, 66,230,237, +237, 61,180,126,253,250, 81,109,218,180, 41,244,241,241, 49, 59, 69, 14,143,117,194, 9, 17, 12, 38,100,252, 8, 66, 82, 71, 16, +146, 58,152,144,241,225,132, 60, 23, 3, 47,106,147,133, 19,124,218,159, 62,252,238,161,133, 19,124,204, 22, 96,155, 63, 77,225, +118,246,200, 59, 43,103, 79,240,113,173,141,243, 17, 66,156, 60, 61, 61, 55,122,121,121,221,247,244,244,124,224,233,233,185,153, + 16, 82,167, 54,180,121,120,120,120,120,236,195,174, 47, 51,215, 6,173, 62,240,111,241,226,244, 5,115,103, 17, 31, 47,119, 7, +189,193,168,187,119, 63, 61, 96,238,162,200, 93,174, 13, 90, 45,207,123,112,229,187,154,158,152, 16, 66,124,125,125, 7, 9,133, +194, 62, 0, 76, 70,237,154, 94,175,223,159,158,158,254,139,189,163,130, 90,183,110,125,134,101,217,250, 53, 57, 55,199,113,247, + 19, 19, 19, 95,174,105,155, 1,192,199,199,103,160,143,143,207,230,246,237,219, 59,180,105,211, 6, 34,145, 8, 75,151, 46,157, + 10,192,236,116, 28,230, 32,225,225, 2,143,124,215,225,172, 64,240, 6,128,214,148, 2, 32,236,101, 78,175, 59,144, 93,247,209, + 22, 26, 29,109, 87, 25,113,111,111,239,217,132,144,145, 40, 29, 86,254,157, 82,169,124,234, 41,107,172,161, 80, 40,252, 8, 33, + 93, 41,165, 45, 24,134,185,194,113,220, 81,165, 82,249,232, 89,117, 61,129, 15, 59,118,238,188,114,196,212,169,172,234,212, 41, +172,220,188,121, 5, 10, 11, 1,160,122,201,121, 43, 16, 66, 72, 88, 88,155,183,157,156,208,135, 0,193, 32, 32, 12,104, 66, 94, + 62,115,240,210,165,248, 95,236,169,165,102,137,144,144,144, 3, 0,122,151, 45, 30,140,139,139,123,189,166, 26,143,239,112,159, + 75,132, 45, 94,122,124,251,196,231, 0, 94,171,186,221,160,150,142, 96,133,126,125, 88, 26,159, 6,224,235,167,109, 43, 0, 16, + 66, 28,220,221,221, 47,255,246,219,111,190, 97, 97, 97, 2, 0,136,141,141, 29,222,167, 79,159,110,101, 33,253,194,103,209,127, + 90, 58,116,232, 80,215, 96, 48,108,101, 9,105,207,113,156, 11, 0, 48, 12,147,111,164,244,130, 64, 32, 24,241,180,197,138,121, +120,120,120,158, 87,108, 26, 44,185,103,139,128,150, 45,253,167, 30,222,187,213, 47, 63, 47, 95,189,118,217,150,120,149, 64, 92, +210, 40,160,153,104,213,242, 47, 93, 38,124, 60,237, 99,185,103,139,139, 79, 30, 94, 79,182,247,164,222,222,222,245, 27, 54,108, +184,103,246,236,217,129,157, 59,119, 22,122,120,120,224,225,195,135,184,113,227, 70,224,217,179,103,251,255,246,219,111, 83,189, +189,189,223,180, 85,193, 29, 0, 28,197,162,198,191,124,185,196, 75,236, 82, 23,212,104,128, 75,203, 32, 0, 0,229, 56,100, 70, + 71,129,211,235, 65, 57, 35,124,123,245, 45, 93, 79, 41,218,181,107,103,223,196, 95, 85,240,245,245, 85, 52,111,222,252,167,153, + 51,103,138, 52, 26, 13, 18, 18, 18,112,254,252,121, 46, 59, 59, 59,210, 94, 13,207, 86, 3, 2,188, 4, 94,187,250,245,127,173, +225,235, 61, 61,196, 13,188,220,193,113, 82,220,184,171,171, 31,117, 58,190,215,193,195, 71,167,123, 4, 12, 24,152,157,188,247, +138, 53,157,192,192,192,246, 12,195, 44,206,200, 40, 45,237,164, 80, 40,150,134,133,133,125, 81,113,159,170, 30,149,227, 56, 8, + 4,130,135, 37, 37, 37,131,146,146,146,226,205,233,126, 62,154,232, 13,134,210,247,133, 64, 0,227,214,163,190,123,123,244,232, +209,104,212,168, 81, 8, 14, 14, 70,108,108,108,215,157, 59,119, 78,246,243,243,187,164,215,235, 15, 74, 36,146,232,251,247,239, + 63,213, 4,139, 34, 96,198,136,169, 83, 89,249,253,251,144, 39, 36,224,221,194, 66,193,151,192, 12,212,192, 96,133,132,132, 52, +126,165, 71,240,174,254,111,118,241,247,242, 10, 16, 9,133,245, 64, 41,133, 94,159,215, 60, 39,231,218,219,117,234, 96,102,187, +118,237,222,138,137,137,185,101,143, 94,219,182,109, 61, 57,142,219, 64, 41, 21, 17, 66, 38, 2,232,125,248,240, 97, 24,141, 70, +188,254,250,235,189, 67, 66, 66, 26, 83, 74, 87,203,229,114,170, 82,169,222,191,116,233,210, 67, 75, 90, 11, 39,248,180,207,191, +205,125,158, 37,104,210,235,197,208,145,200, 18, 28,233, 53,229, 85,239, 67, 46, 77,152,133,159,175,201,184, 0, 0,175, 53,109, +234,212,184,133,195,167,114,231, 64,215,130,140,168, 79, 95,107,218,116,211,161,219,183,139, 44,105,218, 66,161, 80, 44,219,186, +117,171, 95,251,246,237,203,139,228,182,105,211,134, 93,186,116,169,207,148, 41, 83, 86, 0,120,207, 78,157,230,110,110,110, 71, + 56,142,211, 92,189,122,181,185,105,189, 71,208,155, 29,221,156, 28,187,231, 60, 46, 58,149,123,245,183,147,246,104,133,134,134, +142, 18, 49,255,199,222,121,135, 71, 81,117, 97,252,189,179,125,179,155, 77, 79,216, 77,161, 36,132, 18, 2,132,132, 94, 2,138, + 72, 9,130, 10, 40, 69,138,130, 72,147, 15, 69,193, 70,149, 32, 72, 71,138,160,128,128, 32, 77,145, 46,189,151, 36,212, 0, 9, + 73, 8,164,247,158,205,182,153,251,253,145,108, 12, 49,201,110, 40,130, 58,191,231,217,103,103,118,102,222, 57, 51, 41,243,238, +185,247,158,203,124,191,248,139, 9,130,166, 45, 90,192,198,217, 21,134,228,100, 20,153,140,142, 23,175,221,234,243,205,146,239, + 51,130,130,130,198,132,133,133,253, 88,219,235,229,225,225,225,121, 81,177,104,176,164, 82,201,180, 25,159,127, 74,114,178,114, +181,134,130,124,131, 13,213,155, 84, 54, 50,146,159,158,145,123, 95,101, 83, 60,101,242, 36,217,167,211, 62,159, 6, 96,168, 37, + 45,160,212, 92, 53,105,210,228,242,186,117,235, 92, 29, 29, 29,145,151,151,135,172,172, 44, 92,190,124, 25,148, 82,244,234,213, + 75,218,178,121,243, 86,139,151, 44,185,160, 86,171,219, 91, 50, 89, 66,145,144,136, 20, 10,236, 10,110, 5, 70, 44,198,155,119, + 82, 0, 0,212,104,192,161,183,251, 2, 0, 4, 18, 9, 6, 69,167, 3, 0,100, 50,153, 53, 97, 86, 9,165,180,125,199,142, 29, +197, 0,240,209, 71, 31,229, 23, 21, 21,133, 18, 66,182, 38, 39, 39, 39, 89, 58, 22, 0,156,155,191,230,235,230, 82,231,212,183, +115, 71, 59,250, 55,240,134,222,104, 68, 98,122, 18, 40, 36,168,227,170,192,208,254, 45,197, 29,131,196, 13, 23,125,119,236,164, +155,127,191, 46,105, 55,127,187, 85,157,150, 66,161,216,180,116,233, 82,252,242,203, 47, 0,128, 19, 39, 78,192,215,215, 87, 97, + 41,134,187,119,239,122,143, 24, 49, 98, 27,128,134, 85,109, 55,153, 32, 12,253,122, 43, 0, 96,211,186, 33,130,168,168,168,250, +114,249,159,115, 41, 7, 7, 7, 35, 56, 56,152, 9, 13, 13,109,123,226,196,137,182,219,182,109, 51,184,187,187, 47, 77, 74, 74, +170,118,170,160,154,208,158, 62, 13,229,213,171,192,233,211,150,119,174, 68, 64, 64,128, 87,179,102, 46, 23, 22,125,251,149,203, +239,251,110,225,219,111,127, 68, 76, 76, 12, 0,192,219,219, 27, 67, 6, 15, 20,109,221,178,166,217,180,105, 51,207, 7, 6, 6, +118, 10, 15, 15,183, 88,221,156,227,184, 53,161,161,161,175, 41,149, 74, 76,155, 54, 45,170, 65,131, 6, 80,169, 84, 88,187,118, + 45, 28, 28, 28, 96, 52, 26,163, 22, 44, 88, 32, 76, 78, 78,198,242,229,203,127,192,159,217,173,191,208,165,119,240,151, 82, 81, +147,206,141,131, 70, 64,169, 82, 99,221,207,219,113, 55,108, 99,103,157,241,206,151,159, 77,112, 31, 38,160,210, 17,238,190,202, +105,245,131,186, 58, 53,108,214, 15,245, 2,175, 58,235,216,211,113, 95,142,247,158, 47,148,149,108,154,241,237, 95,179,132,100, +224, 78,129,127,254, 21,199,155,127, 40,178, 40, 45, 47, 26, 74, 80, 86, 3,171,142, 90,211,174,113, 81, 38, 0, 0, 32, 0, 73, + 68, 65, 84, 55, 56, 56, 88, 0,148, 26,236,248,248,120,232,245,122,248,249,249, 49,122,189,222,170,154, 86, 26,141,166, 81,151, + 46, 93,206,110,222,188,217,169,115,231,206, 25, 21,183,213,113,178,127,245,212,238,165,147,190, 94,182,165,137,171,223,235,185, +150,190, 8, 4, 5, 5,141,106,222,200,123,253,210, 5, 51,136,160, 40, 17, 66,251, 44,128,203, 66,202,182, 31, 0, 27, 71,244, + 25, 59, 5,173,219,182, 21, 76,154,252,217,250,214,173, 91,211, 43, 87,174,108,168, 73,143,135,135,135,231,159,130, 69,131,197, + 81,174,133,139,139,163,108,249,194,141, 97,106, 25, 67,234,120,104,136, 68,101, 47,132, 82, 33,101, 4, 34,173,183,183,135,152, +163, 92,149, 83,133, 84, 30, 97, 64, 8, 33,245,234,213,219,189, 97,195, 6, 87,145, 72, 4,142,227,224,226,226,130,184,184, 56, +228,228,228,160,176,176, 16, 49,183,111,163,158,167, 7, 38,141, 25,173,158,243,237,162,221,132,144,160,138,205,133,149, 53, 41, + 71,193,153, 30,109, 81, 35,132,160,170,246,197,234,166,145,177,118, 36, 4,199,113,247,147,147,147, 97, 99, 99,131,166, 77,155, + 42,175, 92,185,114, 38,201,156, 66,178,116,237, 3, 7, 10,212, 18,233,222,133,115,223,114, 36,130, 40, 68, 61,204,133,143, 71, + 27, 56,217,121, 34, 41,163, 16,225,145, 7, 16, 21,179, 31, 62, 30, 94, 24, 51,196,199,126,201,154,140,125, 36,240,125, 31, 26, +190,214, 88,149,102, 65, 65,129,210,203,203, 11,238,238,238,224, 56, 14, 44,203,226,214,173, 91,229,203,230,249, 18,205,203, 75, +183,158,131,131, 32, 19,111,189,222, 27,217,217,217, 74,107,175,221,108,174,118, 46,210, 52,211, 22,165,136, 1, 64,174, 80, 27, +222,156,146,116,171,117,235,214,112,113,113, 17,159, 63,127,126, 10,128,114,131,101,237,253, 52, 0, 11,150,109,216,176,124,104, + 94, 30, 3, 0,235, 9,225, 12,165, 85,181, 45,223, 79, 66, 72,143, 87, 2,246, 44, 89,242,165, 11,161,145,112,180,251, 6,151, + 47, 63,128,193, 80,250,147,207,202, 74,199,196,241,249, 16, 10,109,177,104,209, 12,167, 65,111,125,176,171,172,137,140,171, 78, +179,236, 51,241,157, 59,119,208,172, 89, 51,108,219,182, 77, 40, 16, 8,112,233,210, 37,200,229,114,140, 24, 49, 2,254,254,254, + 66,185, 92,142, 51,103,206, 32, 63, 63,255, 47,191, 80, 21, 53, 79, 31, 56, 53, 39, 39,246,196,151,169,130,195, 61,215,253,188, + 29,163, 7,191,133, 58,166,216, 51, 14, 62,204,156, 94,125, 58,124, 37, 16,121,134, 40,108,253, 29,124,253,251, 65, 44, 81, 98, +194, 39,179, 17,117,115,175, 67,113,193,141,241,172, 49,193, 19,192,135,149, 53,233,142, 1,236,226,141,174,129, 71,189, 34,234, +106, 2,223,191,148, 18,241,253,245, 63,207,222, 84, 8, 70,107, 95,118, 12,238,221,187,135,152,152, 24, 8, 4, 2,104,181,218, + 71, 38, 10,174,168,217,170, 85,171,247, 89,150,253, 10, 0,244,122,253, 70, 55, 55,183, 81, 43, 86,172,112, 18, 8,254,156, 41, +202,156,185,202,206,205,207, 57,127,229,214,221, 41,239, 15,232,122,250,226,205, 4,251,150,253, 31,230, 94,251, 53,175,170,251, +217,190,125,123, 7,137, 64,240,253,178,111,103, 17, 54,246, 24,164, 77,187, 66,168,244, 5,107, 76, 66, 73, 78, 33,180,113,169, + 48,172, 93, 9,239,177,147,177,112,193,215,100,240,176,119,191,247,241,241,217, 29, 83, 33,131,247, 44, 70, 41,241,154,188, 38, +175,249, 98,106,254,219,176,104,176, 8, 97,242, 13, 6,163, 72,229,233,110,124,243,141, 46,205, 35, 46,221,140, 82, 58,218, 49, + 45,219, 52,247,187, 25,149, 24, 14, 19,107, 32,132,177,170, 95,135,135,135,199, 91, 51,102,204,104,174, 82,169,192,113, 28,236, +236,236,144,145,145, 1,131,193,128,252,252,124,232, 10, 11, 96, 40,200,199,181,135,241,232,212,181, 43, 94,105,223,190,233, 1, +163,241, 45, 0,219,170,211,100, 25, 1,117,106,213, 6, 3, 99,179,192, 25,244,216,225,237, 4,160, 52,107,245,118,124, 46, 8, + 33, 96,245, 58, 28,104,211, 16, 82,165, 2, 45,166, 86, 59,101,160, 69, 82, 82, 82, 34,234,214,173,123,176,103,207,158,189,198, +140, 25,195,164,166,166, 30,114,115,115,235,152,150,150,102,177,121,212, 53,154, 29, 49,124, 76, 43,111,103,123, 6,191,159, 59, +140,118, 77, 94,135,141, 84,132,140, 28, 45, 24, 66, 16,115,255, 40, 88, 86,129,107,119, 30,162,189,191, 2,157,219,218,121, 20, + 30,203, 30,131,234,155,203, 72, 78, 78, 14,210,211,211, 97, 52, 26, 97, 50,153, 48, 96,224, 64,108,218,184, 17, 69, 69, 69, 40, + 41, 41,129, 94,175, 7,199,149,250,137,212,140, 66, 92,190,118, 8, 65,205, 27, 1, 53, 84,252, 22, 10, 97, 90,177,116,136,208, +214, 6, 16, 75, 93, 12, 5, 5, 5, 80, 40, 20,208, 22,165,136,135,143, 46,207,108,137, 79,156, 56,129,240,240,112,104, 52, 26, +224, 49,103, 4,136, 1,190,191,207,178, 95,244,218,179,199,245,220,158, 61,220,197,223,127, 79,148, 22, 20,172,181,230,216,182, +109, 3, 6, 76,152,208,167,169, 92, 38, 71,226,195,165,104,210, 68,140,143,254,231,132,208,111, 50, 1, 0,147, 38,120, 32, 40, +200, 9,249,185, 59,225,236,250, 25, 62,154,210,223,167,176,144,190, 3, 96, 99, 77,186,132,144,137, 91,182,108,137,234,209,163, +135, 48, 34, 34, 2, 82,169, 20,114,185, 28, 50,153, 12,114,185, 28,169,169,169,208,235,245,216,177, 99,135,169,172, 9,177, 90, +202,154, 1,123, 77,233,161, 62,120, 55,108, 99,103,119, 38,238, 90,255, 41, 29,238, 71, 92,186, 86,120,252,216,185, 57,166, 18, + 89, 66,110,226, 31,159, 54,104,125,205,121,252,212, 89, 88,185,112, 6,238, 94, 58,149,237,230, 85,240, 29, 75,116, 27, 59, 86, + 81,231,190,107,215, 89,194,113, 95, 12, 54,142, 27,245,166,221, 62,245,249,209,251,132,200, 76,203,190,241, 45, 98, 47,107,165, +190,205,134, 53,106, 64,244,199,143, 31,151,119,233,210, 5, 90,173, 22, 0, 32, 16, 8,176,101,203, 22,206,100, 50,157,168, 42, + 78,163,209,248, 85,120,120,184,186,184,184, 24,131, 7, 15,158, 52,115,230, 76,133, 72, 36, 2, 0,176,108,233,108, 85,230,204, +213,220, 37, 63, 29,158,252,213,119, 39, 14,111,251, 70, 51,119,218,168,174, 67, 39,124,125, 2,192,161,170,116, 77, 38,211,166, + 37,223, 76, 23, 72,237, 13, 32,173,123,192,144,174,197,131,245, 99,160,207,211,162,209,156,217, 0,196,208, 27, 4,216,215,127, + 32, 4,142, 26,188,215,165,163,112,237,169,179,155, 0,244,175,233,190,242,240,240,252, 39,105, 13,192,165,108, 57, 19,165,207, + 49, 39, 0,230, 44,187, 11, 0, 61, 0, 73,133, 99, 42,175, 87,220,183,242,122,197,229, 76,148,246,109,118, 1,192, 2,184, 12, +160,214,253, 68, 25, 0, 32,132,148, 39,124, 42, 46, 3, 0,199,113,167, 99, 98,227,181, 93,131,131,212, 39, 46, 71, 71,244,124, +253,149, 54, 93, 94,106,219, 46, 45, 43, 63,182,142,139, 74,113,254,210, 69, 41,199,113, 86,181,239,136, 68,162,144, 78,157, 58, + 9,115,114,114, 96, 99, 99,131,140,140, 12, 36, 37, 37,193, 96, 48, 64,155,151, 11, 93,110, 14,180, 57,217, 48, 22,228, 34,230, +202, 37, 52,246,114,151,150,117,130,183,138,202, 25, 42,243, 12,246,132, 97, 32, 83,217, 66,174, 82, 65, 32,168, 93,101, 10,141, + 70,211,175, 73,147, 38, 23,221,221,221,191, 0, 0,189, 94, 63, 62, 52, 52, 52,147, 82,138, 79, 63,253, 84,165, 82,169,118,212, +171, 87, 79,106, 73,199,214,145, 29,208,182,121, 67, 65,212,131, 27, 8,242,125, 19,245,213, 93, 16,147,148,135,140,188, 18,164, +102, 23,161, 81,163,169,112,209,140,134, 93,157,177,184,113, 55, 1,234, 58,245, 25,129, 72,220,179, 38,205,212,212,212, 71,214, +127,222,186, 21,197,197,197,104,216,176, 33,222,126,251,109,124,242,201, 39,120,235,173,183,160,209,104,208,185,161, 16,163,134, + 13, 64,122,122,122,141,113,206, 89, 71, 69,243,183,170, 35,134,207,160, 17, 13, 95, 62,120, 43, 38, 38, 6, 81, 81,127,109, 89, + 59,118,236, 24,242,242,242,202, 31,192,214,224,230,230, 54, 93,173, 86, 95, 87,171,213,183,212,106,245,129, 52,141,230,142,209, +219,219,173, 99,255,254,196,111,208, 32, 65,130, 66, 65,238,123,122, 42, 45, 43, 1, 42, 21,250, 4, 5,117,146,228,230,252, 8, +160,212, 68,142, 26,233,130,179,167,154,225,220,153, 64, 76,156,224, 13,134,200, 64, 24, 49,138,139,142,193,175,153,191,216,214, +150,214,248,187, 84,214,161, 61,182, 89,179,102,194, 15, 62,248, 0, 82,169, 20,155, 54,109,194,234,213,171,177,120,241, 98, 68, + 69, 69,161,110,221,186, 80,171,213,112,115,115, 19, 2,136, 45, 59,166, 70,236,125,152, 57, 58,227,157, 51, 14,190,138, 88,194, +184,118,208,153,100,111,206,248, 54, 57,107,206,119,177,139,238,223,213,122,223,185,116, 42, 43,234,230,111, 92,220,149, 19,153, +201,209,133,222,115,190,139, 93, 52,111,101, 82,118, 85, 90,167, 78,205, 96,127, 61,112,202, 80, 84, 88, 44,236,215,235,101,237, +216,145,111, 55,114,180,105,188, 5,238, 61, 2,234,121,170,135,205,152,183, 92,255,222, 7,147, 13,235,127,248,145, 22, 20, 20, + 32, 63, 63, 31,203,150, 45, 51,253,254,251,239, 73, 44,203, 78,174, 38, 68, 1, 0,152, 76, 38, 12, 28, 56, 80, 33,151,203,145, +144,144, 80,158, 5, 5,128,148,140,172, 27,231,174,220,188, 51,101,236,192,224, 34,157, 78,119,248,100,216,109, 63,223,186, 30, +132,208,122,213, 93,183,128,144,118,205, 90,180, 0,165,185, 96,132, 94, 72,252,233, 91,104, 83,179, 81,156,145, 13, 70,164,128, + 17, 50, 24,168, 4,178, 22,109,240, 32,252, 42,220,148, 42, 8, 9,233,104,233,126,242,240,240,252, 59,169,201,139, 0,112, 33, +132,236, 35,132,236,155, 62,125,122, 55, 0, 78,132,144,125, 40, 53, 65, 46,101,203, 18,243, 62,213,172,187, 84,212,169,116,108, +197,101,231,233,211,167,191, 68, 8,217,215,161, 67,135, 97, 40, 53,114,181,198,162,219, 16,148,232, 67,167,127, 49,131, 81, 41, + 37,182,126, 77,235, 59,252,126,228,116,196,185,139, 87,111,219,218,200,164,133, 69, 69,146,197, 43, 86,123,145, 98,173,181,157, +188,155, 58, 59, 59,195, 96, 48,224,222,189,123, 72, 76, 76,132,193, 96,128,169,184, 8,186,220, 92,148,228,228,128, 43, 46,132, +152,229,160,205,204,128,131, 76, 2,252, 57,194,176, 90, 40,165,229,102,170, 34,230,117, 66, 8,100, 42, 91, 72,108,149, 96,132, +130,170, 36,170, 68,173, 86, 7, 6, 4, 4,252,114,252,248,241,182,157, 58,117,154, 83,175, 94, 61,187,212,212,212, 7,105,105, +105, 47, 47, 92,184, 80,231,226,226,130,161, 67,135, 54, 54, 26,141,195, 45,105,137,101,186,230,117,221,124,225,229,214, 15, 26, +167,118,200,202,215, 33, 35, 87,139,212,172, 98,108,223,245, 54,254, 56,248, 54,174,158, 25,134,123,151, 70, 33,171, 72, 5,153, + 99, 55, 0,180,198, 10,186, 23, 47, 94,196,154, 53,107,202, 95, 43, 87,174, 68,118,118, 54,154, 53,107,134,132,132, 4, 28, 58, +116, 8,169,169,169,112,113,113,193,213,171, 87,177,118,237, 90, 92,186,100,213,220,181,143, 80, 82, 82, 2,145,196,201,176,105, +221, 16,108, 90, 55, 4, 44, 85, 24,204,219,106, 83,168,150, 97,152, 17, 41,253,251, 55, 79,177,183,247,107,209,162, 69,175, 65, +131, 6,121,183,109,219,182,124,187,143,143,143,151, 80, 40, 76,213,104, 52,235, 53, 26, 77, 64,141, 98, 28,109,229,224,216, 20, +122,221, 29, 0, 0, 33, 66, 16, 34,197, 75,175,220, 70,199,206,225, 48, 24, 37, 32,140, 20, 12,145,193,100,202,130,202,214, 13, +148, 90,172, 72,220,251,208,161, 67, 88,179,102, 13,226,226,226,202,155, 71, 67, 66, 66, 38, 14, 30, 60,120, 55,203,178,216,183, +111, 31,126,253,245, 87, 52,104,208, 0, 1, 1, 1, 48, 24, 12,213,246,193, 50,243,229,202,164,139, 91, 23, 31,124, 91,100,178, + 15,144, 72,235, 54, 96, 10,108,250,141,239,234,162, 0,128,131, 49, 49, 5,110, 94, 5,243,139, 11,110, 62,116,240, 40,250,198, + 82, 7,119, 74, 65,195,162,110, 93,218,182,235, 72, 94, 90,102,150,168, 85, 75,127,237,215,179,166,138,235,213,111,184, 96,198, +167,227,220,146,242,101,121,175, 76, 58,120,103,247,161,203,133,239,140, 26, 99,122,119,204,132,146,195, 71,142,237,225, 56,174, + 69,117, 35, 8, 57,142, 67, 74, 74, 10,110,222,188,137,184,184, 56,100,102,102, 34, 35, 35, 3, 5, 5, 5,229,205,138, 54, 5, +249,251, 87,110,248,253,154, 66, 46,183,105,219,220,215,235, 82, 68,100,186, 66, 46,183,241,173,239,213,136,144,170, 39,160,230, + 56,206,190,244, 30, 18, 20,220, 60,141,146,236, 2,104,115, 11,161,205, 46,132,206, 32, 64,137,142, 65,137,129,129,115,231, 30, + 40, 44,210,162, 36, 59, 23, 28,165, 14,150,238, 39, 15, 15,207,127, 23, 74,105,200,252,249,243,231,213,180,189,194,187,190,210, + 58, 8, 33,251, 40,165, 33,148,210,144, 50, 51, 5,243,231, 21,117,230,207,159, 63,143, 82, 26,114,254,252,249,159, 1, 20, 63, + 78,172, 22,155,118, 50, 51,163, 10, 85, 46,126,111, 76,254,244,171, 3, 91,214, 45,119,205,206,206,137, 18,203,228, 37, 50,153, +196,241,147, 79,103,217, 23, 21,231,189, 81,152,109,253,168,167,156,156,156,242,135,151, 88, 44, 6, 91, 92, 4, 86, 91,140,146, +156, 44, 16,131, 14, 98,150,133,163,141, 13,188, 52,110,168,231, 86,199,162,158,128, 99, 73,242, 31, 7,112,120,216,235,143, 52, + 11,114, 6, 61, 14,117,104, 12,137, 82, 1,185,189, 3, 58,253,122, 6, 0, 32, 22,139,129, 25,223, 88,212,173, 83,167,142,179, + 70,163,217,187, 98,197, 10,113,102,102, 38,110,221,186,117, 45, 62, 62, 62,207,209,209,209, 86, 36, 18,113,209,209,209, 71,239, +222,189, 27, 82,191,126,125, 80, 74,125, 44,233, 21,228, 42, 12, 6, 35,135,164,244, 7, 72, 76,185, 9, 59,165, 23, 40,227,137, +180,236, 98, 16,184,194, 88,114,183,188, 47,153, 78,155,136, 34,157,117,243,246, 26, 12, 6, 24,141, 70, 24,141, 70,232,245,122, +188,243,206, 59, 56,127,225, 2,182,254,122, 18, 9, 9, 9,104, 80,199, 6,111,191, 53, 16, 45, 91,182, 68, 88, 88,152, 85,154, + 85,225,219,253,240, 45,185, 92,142,213,171, 87,195,198,198,166,252,115,107, 13,150, 90,173, 94,212,164, 73,147,134,119,139,138, + 16,121,231, 14,218, 12, 28, 8, 0, 56,123,246,108,249, 62, 90,173, 22, 67,134, 12,145,196,197,197,189,123,231,206,157,119,213, +106,245,226,148,148,148,143,170,211,220,191,255, 2,198,142,141, 68, 70, 70,105,102,119,251,207,126,229,219,238,199, 25,208,179, + 79,105,203,149,189,189, 61, 22, 45,178,110,182, 7,150,101,177,118,237, 90,200,229,242,114,131, 37, 22,139, 59, 78,153, 50,229, +141,170,246,247,243,243,171,234,227, 71,152, 50,208, 67,118,245,129,124,188, 93,195,250,254,118, 46, 45,144,105,186,218, 60, 34, + 41,117,226,148,129, 30, 75, 23,239, 72, 44, 97,137,110, 35,107, 76,240, 20,202, 74, 54, 89, 19, 99,204,193,229,122,135, 6,239, +111, 74, 77,207,251,124,194,152,161, 78,246, 14,110,133,235, 87,132,218, 51, 12,131,223,195,245, 57,205,188,157, 28,250,181, 91, + 86, 56,246,127, 95, 70,232, 77, 15, 38, 34, 97,223, 93,160,202,110,137, 0, 74, 13, 86, 82, 82, 18, 50, 51, 51,241,240,225, 67, +100,100,100,128, 16,130,140,140,140, 90,101, 40, 43, 67, 8,129, 62, 49, 9,169,123,126, 64,157, 33, 67,209,104,246,108,112,156, + 8,218, 98, 19,118,118,126, 25,249,121, 90,232, 57, 2,251,192, 14,120,101,223, 25, 48,156, 9,184,112,254,177,207,199,195,195, +243,239,135, 16,178,111,218,180,105,159, 89,185,251, 81, 0, 86,149,214,169,108,184,166, 77,155,246,153,249, 92,161,161,161, 90, + 0,201,181,141,213,170,190, 51,249, 25,145,177, 78,117, 91,164, 20, 22,107,101, 14,142, 14,197,182, 74, 9,205,203,205, 19,220, +185, 23, 85, 82,152,114,239,110, 45,206,119,251,214,173, 91,254, 73, 73, 73,120,248,224, 1,140,197, 69, 32,122, 29, 80,162, 69, +247,206, 29, 33, 3, 32, 35,128,152, 51, 64, 32,144,160,176, 48, 31, 0,110, 91, 18,229,140,229,253,192, 31,109, 22,180,181,133, + 68,169,128, 84,101, 91,190,205, 90,228,114,249,214,181,107,215,170,213,106, 53,150, 44, 89, 2,181, 90,221,164,123,247,238,197, +193,193,193,114,103,103,103, 52,106,212, 8, 65, 65, 65, 56,113,226, 4, 8, 33, 49,150,244, 76,122, 73,248,237, 88,214, 51,191, +240, 42, 46,133,111,134, 81,175, 71,125,223,233,208,153,156,161,112,125, 23, 90,195, 94, 24,114, 79, 2, 0, 36,170,174, 72, 75, +203, 4, 64,106,236, 68, 88,217,220, 80, 74,113,253,250,117,108,220,115, 22, 94, 77,187, 34, 53,251, 16,110,222, 12,131,155,195, + 17,248,250, 53,131,177,194,125,178,132,181,198,201,218, 7, 48, 33,100,200,244,233,211,145, 39,151, 3,125,250, 64, 28, 27, 11, +131,193,128,118,237,218,161,117,235,214, 0,128,118,237,218, 65, 32, 16,160, 97,195,134,112,116,116,196,238,221,187,135, 0,168, +210, 96, 81, 66,174,114,108, 86, 19,111,111,239,114,131,181,233,167, 12, 68,132,117, 7,129, 4,203, 87,254,249, 35,241,242,242, + 66,106,106, 28, 8,177,216, 41,243, 64,159, 62,125,122, 59, 56, 56, 96,228,200,145,144,203,229,120,253,245,215,161,213,106, 7, + 1,192,252,249,243, 49,125,250,116, 0,192,140, 25, 51, 48,115,230, 76, 20, 23, 23, 87, 91,162, 98,205,215, 45, 52, 5, 90,110, +148, 90,173,121,189,155,115,253, 22, 47,189,218, 29, 13,124, 95,198, 75,175, 38, 0,192, 60,103,209,253,129, 11, 62,247,223, 83, +223,211,113,195,249, 95,143,126,213,169, 87,183, 47,102, 77,114,156, 51, 99,121,182,197, 47, 44,185,247,191, 47,184, 35,234,187, +116,249, 26,211,146, 25,159, 77,145, 62,200, 52,100, 39,231,112,133, 10,169,208,214,199, 13,202,137,159,204,137, 75, 78,190,247, + 49, 18,142, 88, 28, 57,201,178, 44,226,226,226,160,211,233,192,178, 44,116, 58, 29, 10, 11, 11,145,152,152, 88,254,243,213, 42, + 84, 61, 39,140,236,219,178, 72,171, 45,190,116, 35,250,225, 23,147,134,182, 47,210,106,139,163,239, 63,140,162,116, 89,149,117, +198, 8, 33,185,197, 5,133,142,250, 2, 35,114,175, 69,193,249,165,186,208,155, 8,116, 38, 1,178, 51, 11, 96, 96, 1, 35, 35, +130,199,128,119, 96, 34, 66,228,103,164,130, 33,132,175,135,197,195,195, 83, 45,102, 35, 20, 26, 26,106,117,247,161,218,106, 3, + 64,104,104,232,173,208,208,208, 39, 58,151,217, 96,117,173,208,222,217,181,242, 78,132, 16, 18,208,194,203,125,222,103,111,104, +140, 70,125,147,194,194, 66, 86, 40,148, 8, 61,237,180,169,149,247,173, 9,163,209,184,239,204,153, 51,253, 59,119,238, 44,141, +190,113, 13,186,188, 60,232,242,114, 33,230, 76,112,148, 5,129, 49,234, 65,244, 58,184, 55,230,160,205,151,225,194,149,187, 70, +163,209,184,175, 38, 77, 10, 74, 57, 83,169,113, 96, 24,193, 35, 77,133, 82, 91, 37, 36, 74, 37,164, 74,219, 42,155, 16,171,195, +205,205,205,166, 87,175, 94, 47,183,106,213, 10,148, 82, 44, 92,184, 16,122,189, 94, 98,206, 20, 25, 12, 6, 20, 20, 20, 96,215, +174, 93,248,233,167,159,206,217,217,217, 89, 28, 90,206,153,116, 7, 79,156,187,214,123,216,235, 47, 73,254, 56,185, 30, 70,157, + 9,133, 58,123, 20,149,232, 81,160, 21, 65, 47,125, 21,132,156, 1, 35,144,162, 67,128, 15,142,159,141, 46, 97,141,134, 42, 59, + 15,255,229, 30,148,153, 33, 66, 8,116, 58, 29,210,211, 51,144, 93,112, 2, 40, 72,130,179,161, 0,133,247, 99, 16,240,206,112, +232,245,122,139, 90, 95,142, 38,198,105, 67, 32,252,105, 54, 3,145,196,201,224,219,253,112,181,165, 34,148, 74,101,121, 31, 29, +107,200,207,207,199,230,205,155,209,174, 93, 59, 4, 7, 7, 35, 41, 41, 9,177,177,177,232,221,251,207, 86,182,107,215,174, 33, + 34, 34, 2, 62, 62, 53, 39, 5,243,243,233,129,236,236,123, 3,251,245,235, 39,190,120,241, 34, 40,165,240,245,181,131,202, 86, + 9,194, 72,209,180,169, 11,128,187, 32,132,160,107,215,174, 48, 24,146, 77, 69, 69, 56, 80,147,102,120,120,120,159,192,192,192, + 6, 70,163, 49,202,223,223, 95,152,154,154,138, 1, 3, 6, 96,251,246,237, 0,128,105,211,166, 97,218,180,105,143, 28, 83, 88, + 88, 88, 82,157, 94,203, 54,141, 62,102,169, 83,176, 68, 90,183,129,157, 75, 11, 52,240,125, 25, 0,240, 74,200, 40, 52,104,232, +137,188,140,235, 13,244,186, 7,175, 11, 72,150,195,150,139, 73,145,157,109,252, 71,102, 38,156,140, 6, 96,177,112, 47,165,148, + 18, 66,210, 30,138, 84,191,236,252,109,223,251,125,251,190, 38, 52,178,156,201,223, 75,104,183,125,247,254,244,164, 7, 15,151, +225,225,145, 91, 21,247,175, 78,139,101, 89, 54, 55, 55, 23, 74,165, 18,177,177,177,186,190,125,251, 74,181, 90, 45,162,163,163, +203, 13,150,171,179,163, 95,199,214,254, 77,230, 46,249,233,176, 66, 42,149,190,218, 53,168,105,100,244,131, 68, 74, 73,124,181, +186,148, 94,140,190,125,187,143,139,179, 23, 82, 78,158,135,162, 83, 47,232,116, 4, 37, 6, 14,122, 22, 48, 9,196,176,107,217, + 6,114,239,166,224, 40,112,251,198, 53,152, 40, 61,103,233,218,121,120,120,254,181,212,232, 69,128,210, 12, 86,251,246,237,183, + 1,127,102,153,204,203, 0,116, 0,106,234, 19,157, 81,209, 68,153,155, 13,171, 59, 79, 37,221, 90, 35, 44, 59,201, 41,212, 48, +178,204,217,217,217,181,105,227,102,222,235,126, 88, 15,131, 46, 15,177,145, 27, 80, 84,144,134, 47,231, 93,240,241,240,240, 8, + 78, 76, 76, 60,101,205,201, 18, 19, 19,183,239,222,189,251,163,150,205,154,181,170,231,225,129,235,241,247, 33,166, 44,196, 44, + 11,198,160,131,144,213,195,195,143, 3,195, 40,144,154, 90,128,181,135,142,221, 76, 76, 76,220, 94,147, 38, 75, 4,240,236,251, + 38, 6,191,210, 7,212,104,192,145,206,126,144, 41,149,144,218,219,163,195,174,147,165, 37, 27, 76, 70,196,207,159, 10,177, 66, + 9,199,118, 85,254,204, 30, 33, 45, 45,173,184, 97,195,134, 97,119,238,220,105,221,184,113, 99,204,154, 53, 11, 9, 9, 9,160, +148, 34, 61, 61,189, 36, 35, 35, 35, 41, 43, 43, 43,158, 16,178, 39, 57, 57,121,157, 53,149,194,211,125, 5, 27,255, 56,122,236, +227,192, 0,191, 70,221,131,103, 98,223,190,175,144,155,159,143, 34,157, 16,133, 90, 3,138, 74, 40, 52,182, 62,104,219,162, 21, + 50,178,244,136,190, 21,158,152, 41,118,252,222,154,251,106,134, 16,130,107,215,174,161,174, 35, 65,100, 84, 4,156, 75,178,209, +216, 94,137, 86,157, 58, 35, 46, 46, 14,128,229,204,148,201, 4,225,196,201,127,142, 22,180,183,183, 71, 94, 94,222, 35,199,217, +216,216, 64,163,209, 32, 63, 63, 31, 59,119,238, 4,181,238,161,104,212,235,245,104,210,164, 9,174, 92,185,130,163, 71,143,226, +165,151, 94, 66,151, 46, 93,112,242,228, 73,132,133,133, 33, 34, 34, 2,132, 16, 56, 57, 57,153,179,109,213,166,220, 46, 95,190, +182, 67,169, 36,211, 71,142,252,192,127,232,208,161,216,181,107, 27, 70,141,108, 12,194, 72, 65,136, 20,175,245,109,130,217,115, +194,208,182,109, 87, 56, 59,139,113,244,232,173, 56,161,208,238, 39, 75, 65, 82, 74, 87, 44, 88,176, 64, 40,147,201,160,215,235, + 81, 88, 88,136,172,172,210,114, 84, 85,101,176,180, 90,109,181,133,213,110, 93,189,187, 40, 39,159,230, 48,197,225,175,103, 26, +175,182,120,233,213, 68,188, 18, 50, 18,127,236,219,128,227,135,143,194, 89,116, 63,142,149, 23, 30,204,136,203, 44, 72, 46,244, + 93,235, 23,244,158, 32,165,232,240,154,241,253, 28, 4, 30,106,110,199,180, 85,121,185,150,226,205,142,220,188,119, 47,197,107, +157,218,181,241,105,238,165,145,100,103,165, 99,247,111, 7,111, 25,238,239,218,135,210,102, 65,107, 82,145,179,151, 47, 95,254, + 21, 0,112, 28,183,113,201,146, 37,239,125,252,241,199, 46, 73, 73, 73,229, 6, 43, 61, 51,251,120,135, 62, 19,217,172,220, 60, +253,143, 75, 62, 25, 32,151, 73, 37, 95,204,255,241,164, 81,128,139,213,137, 10,133,194,225,159,173,218,146,177,115,199, 6,129, +139, 76,140,179,159,206, 64,236,177, 19, 48, 16, 49, 94, 61,114, 9,122, 3,139,252,244, 44, 28, 31, 57, 14, 14,106, 71, 28,200, +138,102,243, 10,242, 45,246,103,228,225,225,249,119, 98,193,139,100, 84, 48, 68,217, 0,226, 67, 67, 67, 51, 43,100,151, 50, 0, + 92, 3,208,178,108,191,140, 74,199,101, 0,184, 2,160,117, 5,157,140,178,243,134, 84, 90,214, 87,218,231,218,227, 92,143, 85, + 77,132,153,153,153,233,151,195,110,226,220, 31,171, 97, 50,234,144,151, 93, 90,251, 51, 57,173, 4, 42,149,234, 66,117,199, 85, +158,109,155, 82, 74,213,106,245, 27, 75,150, 46,189,248,254,240, 97,117,186,188,252, 50, 30,220,184, 14, 93,118, 38, 4, 44, 11, + 1, 17,161, 48, 83,134,180,212,124,132,238, 61,152,174, 45, 41,121,163,242, 55,239,170,102,240, 54,119,114,167,132, 64,102,167, +130, 84,161,128,212, 78,245,103,198,138, 16, 72,148,182, 16, 41,148, 16,136, 43,142,216,172, 94,179,184,184,248,205, 49, 99,198, + 92, 63,112,224,128,195,224,193,131,241,218,107,175, 69,228,230,230,118,203,206,182,220,124, 83,229,181,239,216,193, 58, 55,127, +173,223,119,171,215,157, 31, 49, 98,132,227,107,253,190, 67, 68,228, 45,228, 22,185, 2, 0, 52,206, 10,180,109, 60, 21,233, 89, + 58, 28, 62,184, 47,135, 51,149,188, 73,111,110, 51, 86,167, 73, 41,165,206,206,206,143,100,229, 4, 2, 1, 78,158, 60,137, 15, + 63,252, 16,206,182, 39, 81, 16, 31,139,230,157,131,241,202,208,225, 24, 53,106, 20, 4, 2, 1,156,156,156,128, 10, 15, 93, 75, + 51,162,231,229,229,161, 94,189,122, 56,178,174,113, 51,125, 73,186,184,149, 35, 64, 96,103,248,227,120,239, 91,167, 79,159, 46, + 4,176,206,215,215,247,145, 34,163, 85,105, 18, 66, 62,159, 55,111,222,234,142, 29, 59,202,149, 74, 37,124,125,125,113,238,220, + 57,156, 59,119, 14,103,206,148,246,143,115,114,114,130,163,163, 35,114,115,115,145,144,144,160, 37,132,124, 94,237,253,164,148, +107,221,186,117,255, 63,254,216,115,169,111,223, 55,156,123,246,108,143, 58,117, 10, 96, 50,101,130, 48, 98, 72,101,174, 88,183, +110, 62,210,211,178,113,254,194,133,236,194, 66,225,155, 97, 97,143, 78, 65, 84, 77,156,134, 67,135, 14, 65, 38,147, 97,215,174, + 93, 38, 55, 55, 55,161,189,189, 61,128,170, 51, 88, 37, 37, 37,210, 74,199,151,107,190,247,201,141, 36, 0,115,166, 12,244,248, +246,252,173,180,254, 0,182, 54,104,232,129,227,135,143,226,204,241,243,211,218,249,115,203,251, 12,105, 51, 91,246,210,160,169, +126,129,239, 9,148, 42, 53, 54,237,222, 37,136, 12, 95,255,117, 73,209, 77,111, 0, 83, 45,252,140, 40, 0, 20,166,167, 77, 15, + 93,188,114, 99,232,172,175,228, 11,151,173, 74,214,102,166,126,134,210,161,149,180,226,126,213,197, 25, 27, 27,187, 22, 64,121, +121, 12,141, 70,179,121,254,252,249,167,135, 13, 27,230, 98,206, 80,166,223,250,237, 2,128, 11,254,221,222,253,178, 67,235,102, +141,191, 94,182,229,240,195,132,180, 45,185,145,165, 53,176,170,138,243,194,133, 11, 57, 65, 65, 65, 99,166,126, 58,115,253,172, +217, 51, 72,147,201,211, 16,117,238, 10,116, 90, 3, 12, 84, 0, 35, 8,194,231, 46,134,173,139, 10,103,105, 54,213, 9,152,209, + 49,149, 58,249, 91,250,253,124, 28,120, 77, 94,147,215,124, 49, 53, 45,112,165,138,207,170,154, 73,163,242,126,150,214,159, 25, + 86, 25, 44,119,119,247, 46,175,188,220, 14, 29, 95,249, 0, 6, 93, 46, 98,111,253,136,194,130, 52,184,215,145, 34,246, 97,126, +123, 0,167,172, 61, 97, 74, 74,202, 67,181, 90,221,238,235,165,203,119,191,218,166,117, 83, 95,119,181,212,190, 94, 93, 40, 92, +221,144,153,145,129, 75,225, 81,198, 85,135,143,223,212,150,148, 88, 53, 85, 14,199,113,148, 82, 10,177, 88, 12, 42, 16,192,111, +226,167, 96, 24,166,210,104, 65, 2, 85, 80, 39, 48, 66, 17,140, 86,246, 25, 74, 78, 78, 78,116,119,119,127,115,226,196,137,199, + 54,110,220,200,116,237,218, 53, 96,239,222,189,143, 61,167, 29, 0,100,222,216, 27,237,214,252,245,224,229, 43, 86,237,108, 21, +212,174,110,189,250,245,164, 29, 61,237, 96, 48,178, 72, 75,207,194,169,243,145,186,232,200,107, 9,156, 65, 63, 48, 61,178,250, + 42,238, 0, 96, 52, 26, 31,106, 52, 26,183,153, 51,103,194,100, 50,129,101, 89,152, 76, 38,100,102,102, 34, 34, 34, 2,129,237, +218,163,201,187,239, 33, 59, 59, 27, 63,252,240, 3, 60, 60, 60,208,187,119,111, 20, 20, 20,224,244,233,211,213,222, 87,161, 16, +166,233,159, 15, 17, 2,128, 72, 4,211,103, 33, 33, 39,155, 53,107,214,233,181,150,233,226, 15, 38,150,102,182,190,153, 63, 68, +124,242,228,201, 29, 82,169,116,109, 92, 92, 92,141, 53,208,124,124,124, 36, 37, 37, 37, 1,148, 82, 97,126,126,254, 82,157, 78, + 55, 98,202,148, 41,234, 5, 11, 22,160, 69,139, 22,200,204,204,132,163,163, 35,212,106, 53, 10, 11, 11, 17, 23, 23,199, 26, 12, +134, 53, 44,203,206, 78, 75, 75,203,168, 73,251,202,149, 43,247, 91,181,106,213, 62, 45,117,245,238, 15,198,246,240, 53, 26,131, + 36, 42,187,206,160,212,132,220,156, 4, 16,122,221,176,231,215, 99, 49,185,185,130, 55,194,194,194,162,107,210, 50,195, 48,204, +216,223,127,255, 29,230,169,114,146,147,147, 99, 25,166,116,144, 92, 85, 25, 44,107, 88,188, 35,177, 4,192,207,223,254,175,253, +228,188,140,235,141,156, 69,247,227,218,249,115,203, 23,239, 72, 44,249,230,125,135,185, 73, 25, 39,163,146, 11, 15,175,221,180, +123,151, 96,248,235,111,178,106,101,244, 52,103, 79,236,232,246, 90,205,186,148, 82,218,178,101, 75, 47,134,201,174,159,158,117, + 55,108,212,232,247, 7,217,137,181, 7, 90,184,103, 54, 52,185,249,201, 34, 35, 35,227,203,118,179,126,168, 39,128,228,228,228, + 40,141, 70,211,101,209,162, 69,135, 81, 41, 53,158,158,153,125,188,125,200, 4,154,155,155,119, 53, 61,242,183, 26,171,184, 3, + 64, 88, 88,216,143, 65, 65, 65,120,103,216,168,239, 71,191, 59, 70,224, 63,233, 19, 36,158, 56, 6,152,140, 72, 57,115, 10, 54, +182, 44,246,101,198,179,197, 2,102, 76, 88, 88, 24, 95,197,157,135,135,231, 95, 3,177,246,127,175,143,183,199, 97,239,250,238, + 61,188,235,107, 0, 0,177,247,147, 17,123, 63,233, 72, 76,108, 98, 21,229, 16,203,196,107,112,184, 21, 39,123, 38,101,165, 24, +168, 21,147, 61, 87,214,244,247,247,143, 96, 24, 70, 99,213, 69,148,193,178,108,226,173, 91,183,130,172,137, 83,163,209, 12,246, +244,244,156,159,156,156,188, 59, 33, 33,225,127,214,158,163,198,107, 47,155,236,153, 17,136, 67, 40,165, 45, 0, 16,194, 48, 22, + 39,123,174,168,233,238,238,222, 92, 46,151,175, 21, 10,133, 94, 40, 75,169,154,111,153,193, 96, 16,228,229,229,201,244,122,189, + 0, 0, 17,139,197, 38,165, 82, 89, 34, 18,137, 76, 44,203, 62, 52, 26,141,239, 39, 37, 37,221,176, 20,167, 25, 63, 63, 63, 69, + 72,208,237, 66,243, 20, 58,211, 63, 31,130,208, 13,180,218, 38,229,138,154,247,238,221,107,228,224,224,240, 22, 33,100, 0,165, +180,113, 65, 65,129,238,171,175,190,186,122,234,212,169,124, 47, 47,175,158,157, 59,119, 38,215,175, 95, 71,124,124, 60, 45, 44, + 44,220,201, 48,204,231,137,137,137,177,181,186,159,132, 48, 29, 58, 4,188,109,171, 68, 31,142,162, 37, 64, 9, 33,228, 70, 97, + 33, 57,160, 86,215,223,178, 99,199,142, 42, 93,181, 53,215, 30, 24, 24,184,191,176,176,176,119,116,116,213,254,140, 16, 2, 74, +255,188, 23, 53,105,126,251,121,243,207,219, 7,119,122,243,220,169, 51,123, 62,249,250,230,156,138,219, 38,188,238, 56,106,200, +248, 15, 23,108,253,110,217, 39, 43,247,100, 63, 50, 39, 95,117,154,129,129,129, 13, 0,188, 77, 41,109, 70, 8,241,229, 56,200, + 8,161,217,132,144, 72,142,227,174,113, 28,247,251,245,235,215,171, 28,249,242,119,127,163,173, 56,217, 51, 97, 89,123,150, 16, +171, 38,123,254,167,124,243,230, 53,121, 77, 94,147,167, 50, 86, 87,224, 54, 27, 41, 95, 95, 95,122,239,222,189, 71, 30, 42,143, + 67,153,129,218,134, 26,170,180, 91,195,205,155, 55, 91, 61,201,241,150, 72, 78, 78,254, 25,192,207, 79, 83,179,204, 64,253, 88, +246,122, 44,202, 12, 82, 91,139, 59, 62, 5, 34, 35, 35,139,190, 28, 77,202, 51, 91, 66, 33,170, 52,128, 85,209,163, 71,143, 7, + 6,131,225, 40,128, 68, 0,246, 0,178,141, 70,227,161,140,140,140,180, 58,117,234, 4, 61,120,240,224, 75, 0,224, 56,110, 78, +106,106,234, 99,213,145, 40,235, 3,183,181,236,245, 84, 9, 15, 15,239,163,209,104, 34,156,156,156,124, 74, 74, 74, 36, 37, 37, + 37,162,138,191,251,114,185,188,198, 44, 91, 69,236, 84,216, 36, 32, 89, 78, 14, 42,242,151, 76,141,179, 59,118,105,139,110, 54, +114,118,199,174, 90,196, 22, 23, 16, 16,176,153, 97,152,250, 28,199,185, 1, 80, 81,138, 76, 74,105, 38,203,178,137, 55,110,220, +168,245,176,226,103, 69,153,129,122,234,163,126,120,120,120,120, 94, 84,106, 61,197, 73,116,116,244, 19, 25, 43,158,127, 38,115, +214, 81,209,227, 28, 23, 31, 31,175, 3,112,190,236,245, 8,101,134,170,239, 19,134,246,204, 73, 78, 78,126, 42, 38,190,172, 79, +214,255,218,188,252,215,109,101,165, 25, 62,121,201, 66,179, 96,101,174, 94,189,250, 16,128,197,166,116, 30, 30, 30, 30,158,191, +151,218,205, 27,195,195,195,195,195,195,195,195,195, 99, 17, 2,160,202, 18,215,181,105, 91, 37,196,226, 20, 36,181,214,231, 53, +121, 77, 94,147,215,228, 53,121, 77, 94,243,223,167,105, 73,251,223,210,183,203,234, 78,238,143, 37,254, 15,233, 88,199,107,242, +154,188, 38,175,201,107,242,154,188,230,243,213,252,183,193, 55, 17,242,240,240,240,240,240,240,240, 60,101,120,131,197,195,195, +195,195,195,195,195,243,148,225, 13, 22, 15, 15, 15, 15, 15, 15, 15,207, 83,134, 55, 88, 60, 60, 60, 60, 60, 60, 60, 60, 79, 25, +222, 96,241,240,240,240,240,240,240,240, 60,101,158,233, 40, 66, 30, 30, 30, 30, 30, 30, 30,158,255, 34,124, 6,139,135,135,135, +135,135,135,135,231, 41,195, 0, 0, 33,132, 86,124,231,225,225,225,225,225,225,225,249, 59,249,183,121, 17, 62,131,197,195,195, +195,195,195,195,195,243,148,225, 13, 22, 15, 15, 15, 15, 15, 15, 15,207, 83,198,108,176,186,150,165,228,186, 62,207, 96,120,120, +120,120,120,120,120,254,179,252,171,188, 72,249, 40, 66, 66, 8,165,148,146,231, 28, 15, 15, 15, 15, 15, 15, 15,207,127,148,127, +147, 23,225,203, 52,240,240,240,240,240,240,240,240, 60,101,158,105, 31, 44, 66,136, 63,175,201,107,242,154,188, 38,175,201,107, +242,154,188,230,127, 13,190,147, 59, 15, 15, 15, 15, 15, 15, 15,207, 83,134, 55, 88, 60, 60, 60, 60, 60, 60, 60, 60, 79, 25,222, + 96,241,240,240,240,240,240,240,240, 60,101,120,131,197,195,195,195,195,195,195,195,243,148,225, 13, 22, 15, 15, 15, 15, 15, 15, + 15,207, 83,134, 0,168,114, 36, 0,165,244,166,213, 34,143, 49,154,192,146, 62,175,201,107,242,154,188, 38,175,201,107,242,154, +255, 62, 77, 75,218,181,241, 31, 47, 50,207,180, 14, 22, 33,196,255,105,223, 40, 94,147,215,228, 53,121, 77, 94,147,215,228, 53, +255,125,154,255, 54,248, 38, 66, 30, 30, 30, 30, 30, 30, 30,158,167, 12,111,176, 30, 3, 66,200, 59,132,144, 67,132,144,155,132, +144,195,132,144,119,158, 64, 75, 78, 8,153, 86, 65,239, 32, 33,228, 19, 66,136,244,105,198,204,243,116, 33,132, 8,158,119, 12, + 60, 60, 21,209,104, 52,141,252,252,252,194, 53, 26, 77,163,231, 29, 11, 15, 15, 15, 32,172,110,131,143,143,207,121,134, 97, 26, + 48, 76,169, 7, 35,228,207,169,129,204,203,149,223, 41,165,113,145,145,145, 29,170,211,108,208,160, 65,185, 38,195, 48, 32,132, +128, 97, 24, 24,141, 70, 91,129, 64, 80, 80,149, 38,203,178,137,119,239,222, 13,122,130,107,124,170, 16, 66, 54, 59, 56, 56, 24, + 87,173, 90,245, 93,171, 86,173, 26,102,103,103, 23,141, 25, 51,230, 85, 66, 72,119, 74,233,176, 90,106,249, 19, 66,126,106,221, +186,245,238, 9, 19, 38,236,240,243,243,179, 45, 42, 42,146,110,223,190,189,206,154, 53,107,206, 16, 66, 70, 81, 74, 35,159,213, +181,240,212, 30,181, 90,221,138, 16,178,210,215,215, 55, 72,163,209, 92, 1, 48, 62, 57, 57,249,218,243,142,235,191, 4, 33,228, + 61,137, 68, 91,165,206,121, 0, 0, 32, 0, 73, 68, 65, 84,210,211,215,215,183,141, 78,167,203,137,139,139,187,204,178,236, 87, +148,210,212,167,164,111, 7,224, 43,169, 84,218,214,199,199,199, 51, 58, 58, 58,193, 96, 48, 92, 2, 48,155, 82,154,247, 52,206, +241,180,209,104, 52,141,218,182,109,123,118,222,188,121, 78,211,167, 79, 63,171,209,104, 58, 37, 39, 39, 71, 61,239,184,120, 94, +124,188,188,188,236,139,138,138,214, 51, 12,211, 74, 38,147,213,177,181,181,133, 82,169, 76,149, 74,165, 87,109,108,108,222,221, +191,127,127,238,243,142,241,159, 74,181, 6, 75, 32, 16,120, 92,190,124,217,213,214,214, 22, 44,203,130,227, 56,112, 28, 7, 74, +105,249,187, 25, 74, 41, 88,150, 69,183,110,221, 12, 53,158, 76, 40,244, 12, 15, 15,119, 85, 42,149,229,159, 25, 12, 6,180,104, +209,130,139,136,136,112,149,201,100,143,236,175,215,235, 17, 24, 24,248,194, 76,150, 72, 8, 25,234,228,228,164,127,240,224, 97, +251, 18,157,161,195,184,169,115,190,122,235,181, 96,187, 11, 23, 46, 48,125,251,246, 21, 17, 66,222,161,148,254,100,165,150,156, + 16,242,195, 23, 95,124, 49, 95, 40,182,113,221,121,224,188,112,197,218,173, 9,254, 77,235,147,201, 19,199,217, 76,154, 52,233, +114,147, 38, 77,126, 36,132,116,166,148,234,158,245,181,241, 88,134, 16, 34,244,244,244,252, 45, 52, 52,212, 61, 53, 37, 5,139, +151, 44,105, 7, 96, 21,128,118,207, 59,182,255, 10,132,144,105,179,102,205, 10, 29, 50,100, 8, 76, 38, 19,180, 90,173, 38, 38, + 38,166,217, 23, 95,124,241, 58, 33,164, 13,165, 52,246, 9,245, 93,124,125,125,239, 76,158, 60,217,177, 77,155, 54, 96, 24, 6, +185,185,185,154,179,103,207,182,251,225,135, 31,222, 33,132, 52,161,148,102, 60,129, 62,227,228,228, 52, 9, 64, 55,142,227,164, + 0, 46,229,228,228,204,165,148,214,248,191,211, 18, 14, 14, 14, 91,190,253,246, 91, 39,169, 84,138, 13, 27, 54, 56, 13, 26, 52, +232,140, 70,163,233,204,155, 44,158,154,112,118,118,126,175,160,160,224, 59, 27, 27, 27,177,189,189, 61,228,114, 57,196, 98, 49, + 36, 18,137,151,131,131,131,151, 82,169,236, 61,120,240,224,241, 63,255,252,243,250,231, 29,235, 63,145,106, 13, 22,195, 48,144, +203,229,216,190,125, 59, 4, 2, 1,196, 98, 49, 68, 34, 17, 68, 34,209, 35,203,230,117, 79, 79, 79,139, 39, 51,103,165,246,238, +221, 11, 59, 59, 59,168, 84, 42, 52,109,218, 20,132, 16, 72,165, 82, 28, 61,122,244, 17,221,160,160,160, 71, 50,103,127, 7, 3, +187, 19, 10, 0, 59,150, 54, 41, 93,159,124, 7,230,245, 62, 93,148,232, 59,100,222,155,197, 58, 99, 23, 74,137, 54, 53,199,152, + 61,123,225,119,145, 1,205,154,146, 95,126,249, 37,208,217,217,121, 48, 0,171, 12, 22,128, 15,219,180,105,179,215, 4,137,219, +168, 17, 35, 71,140,100,136,233,141,145, 31,205, 58, 27, 17,147,179,222,175,213,214,140,140,196,177, 43, 86,172,136, 26, 55,110, +220, 36, 0, 11,172,141,191,117,235,214, 15, 57,142,243, 4, 0,129, 64,144, 41,151,203,213, 39, 79,158, 52,213,226, 22, 60, 19, + 8, 33, 26, 0, 11, 1, 24, 1,124, 67, 41,189, 83, 97, 91, 35,177, 88,188,192, 96, 48,100, 3,152, 65, 41, 77,120, 94,113,214, +132,187,187,123,147, 97,195,134, 57,103,101,100, 96,241,146, 37,230,143,131, 8, 33, 2, 74, 41,251,119,198, 18, 24, 24,216, 64, + 38,147, 45, 4,208, 74,167,211,185, 3,128, 92, 46, 79,162,148,238,209,106,181,159,135,135,135,107, 31, 71,151, 16,226, 9,160, + 25, 74, 71, 24, 87, 5, 93,176, 96, 65,212,212,169, 83,227,254,110, 77, 66, 72, 61, 55, 55,183,121, 3, 7, 14,196,254,253,251, +113,224,192, 1,163, 76, 38, 19,142, 24, 49,130,140, 31, 63,222, 97,242,228,201,189, 1, 44,179, 54,174,106,232, 61,107,214, 44, +199,166, 77,155, 98,231,206,157,184,118,237,154,182, 81,163, 70,242,224,224, 96, 8, 4, 2,199,207, 63,255,188, 23,128,141,181, + 17, 44,107,238,159, 4,160,155, 64, 32,232, 60, 98,196, 8,211,196,137, 19, 69, 12,195, 24,151, 46, 93,234,178,126,253,250,183, +156,157,157, 91,101,102,102, 22, 62,110,208, 57, 57, 57,115,231,204,153,179,105,229,202,149,182,177,177,177,152, 53,107,150,243, +132, 9, 19, 78,105, 52,154, 96,222,100, 85,143, 64, 32, 48,112, 28, 39, 2, 32,163,148,234, 44,173, 63,231,112,159, 42, 78, 78, + 78, 31,228,228,228,172,210,104, 52,112,113,113, 41,127,214,114, 28,135,162,162, 34,104,181, 90, 52,104,208, 64,220,180,105,211, +117, 19, 38, 76, 16,173, 92,185,114,245,115, 14,249, 31,135,144, 16, 18, 76, 41, 61,101,254,192,188, 78, 8, 1,199,113, 16,137, + 68, 16, 8, 4, 16, 10,133,229,198,167,226,178,249, 85,149, 17,170, 60,194,128, 97, 24, 82, 80, 80, 80,110,174,236,236,236,202, + 51, 97, 70,163,241, 47,154, 44,203,130, 97, 24, 90,147,230,211,160,162,230,142,165, 77,176, 49,108,234,219, 27,195, 74,215,123, + 13, 41,125,223, 24, 6, 28,189, 52,118,225,130,213, 29, 61, 63,156,187, 33, 52, 43, 43, 55,221,207,195,197, 52,120, 72,112, 93, + 73,102, 90,166, 83,253,250, 33, 0,210,107, 17,103,167,177, 99,199,238,220,121,226,158, 66, 42,149, 72, 4, 12, 4,141,188, 27, +136,220, 85, 13, 29, 93, 94,109, 35,137,143,141, 61,243,206, 59,239,140, 29, 55,110,156, 19,202, 12,150, 53,215, 78, 41, 85, 31, + 57,114, 4, 66,161, 16,221,187,119,119, 64,169,137,174,214, 96, 61,235,251, 89,129, 47,210,210,210,222, 46, 41, 41, 65, 80, 80, +208,107,132,144,110,148,210,171,132,144,230,253,250,245, 59,179, 99,199, 14,219,136,136, 8,180,107,215, 78, 14, 96,208,115,140, +243, 47,104, 52,154, 35, 0, 94, 17, 8, 4,208,151,148,232, 23, 46, 90, 84,113,115, 88, 69,115,245,119,196, 25, 16, 16,208,196, +198,198,230,252,162, 69,139, 84,126,126,126, 68, 36, 18,193,100, 50, 33, 58, 58,218,115,243,230,205,239, 95,185,114,165, 87, 96, + 96,160, 95,120,120,184,209, 90,205, 10, 52, 59,115,230, 76,145,183,183,119,149,134,177,184,184, 88,224,237,237,221, 21,192, 95, +204,208,223,160,153,152,150,150,214,255,149, 87, 94, 25,155,154,154,122,199,100, 50,125, 10,192,223,217,217, 57,226,205, 55,223, +132, 92, 46,239, 6, 43, 12, 86, 77, 63, 35, 87, 87,215,126, 29, 58,116,192,202,149, 43,241,205, 55,223,116,167,148, 30, 35,132, +188,156,159,159,127,244,181,215, 94,131,189,189,125,127, 84, 97,176,170,211, 36,132,248, 73,165,210,141, 63,255,252,179,210,219, +219,219, 91, 44, 22, 51,222,222,222,200,206,206, 70, 73, 73,137,116,238,220,185,205,101, 50,217,181,101,203,150,109, 4,240,134, +181,113, 86, 68,163,209, 52,106,211,166,205,186, 41, 83,166,216,238,219,183, 15,190,190,190,200,207,207,199,168, 81,163, 92,151, + 47, 95,126, 82,163,209,116, 53,155,172,191,251,239,136, 16,146, 7, 64, 5,192,190, 54,205,171, 53,220,207, 60, 0,229,253, 83, + 69, 34, 17,164, 82, 41,100, 50, 25,100, 50, 25,226,226,226,118, 9, 4,130,145, 40,253, 34,103, 81,147,252,249,224,106, 73, 8, +185, 44, 16, 8,106, 92,167,148,114,214,196,249, 36, 88, 81, 54,193,131, 16,178, 20, 64, 55,148,246,163, 62,229,234,234,250, 97, +106,106,234, 3,107, 53, 53, 26,141, 83, 97, 97,225, 50,141, 70, 3, 87, 87, 87, 0,128, 64, 32, 64, 80, 80, 16, 74, 74, 74,112, +235,214, 45,112, 28,135,152,152, 24,168, 84, 42, 52,111,222,124,217,172, 89,179,118,206,152, 49, 35,203,218, 56,107, 75,117, 94, +228,105,158,227,239, 70, 8,224, 36, 74,127,207,204, 23,115, 18,101,223, 52, 89,150, 45, 55, 88,149,205, 79,101,195, 69, 8, 1, +165,180,198,116, 19, 33,132,209,235,245,229,230, 74,165, 82,149,155, 51,147,201, 84,165,193,122, 92, 28, 28, 28, 14,231,230,230, + 46,161,148, 30,121,156,227, 71,140, 24,241,151,254, 28,211,166, 77, 75,200,200,200, 96,251,117,106, 36,253,233,167,253, 89,239, +132,116,173,227,231,227,209, 88,225,228,218,178,184,184,248, 10, 0, 81, 45, 78,225,238,231,231,103,187,250,231, 83,233, 67, 38, + 45,156,237,225,166,100, 91,251,186,169,124, 28, 21, 18, 39,153,208,100, 79, 77,185, 54, 54, 54,205, 0,100, 89, 84,170,132,157, +157, 29,246,238,221, 91,219,195,158, 53, 14, 90,173, 22, 57, 57, 57, 88,179,102,141,106,236,216,177, 39, 8, 33, 31,246,235,215, +111,229,206,157, 59, 21,185,185,185, 48, 24, 12, 0,240, 88,153,151,103,204, 28, 7, 7,135, 46,221,186,117,147,108,251,229, 23, + 9,165,180, 8, 0, 5, 80, 72, 41,157,240,119, 7, 35,147,201, 62,158, 59,119,174,202,207,207,143,100,102,102,130, 82, 10,134, + 97,224,236,236,140,169, 83,167,202, 62,255,252,115,247,168,168,168,207, 0,204,122, 12,121, 82,157, 17, 2, 0, 27, 27, 27, 22, +181, 31, 28, 83,165,166,201,100, 34, 29, 59,118,156,154,153,153,217, 92,171,213,126,109, 73,132, 82,106, 2,176,183,236, 85, 42, + 76,200,181, 59,119,238,104,133, 66,161,188,126,253,250,109,107, 25,215, 95,104,212,168, 81,123,145, 72,132, 75,151, 46,233, 0, +156, 42,251,248,212,245,235,215,117,111,188,241,134,212,211,211,179,189,181, 90,132, 16,169, 84, 42,221,120,239,222,189,198,106, +181, 90,126,241,226, 69,180,104,209, 2,153,153,153, 72, 77, 77, 69, 97, 97, 33, 82, 83, 83,241,238,187,239,186, 46, 94,188, 88, +109,141,166, 70,163,105,228,227,227,243,135,179,179,179,156, 82, 10, 74, 41,250,244,233, 35, 90,176, 96,129,109, 98, 98, 34, 76, + 38, 19,166, 79,159,142,144,144, 16, 56, 56, 56, 96,228,200,145,110,235,214,173,219, 2, 32,176,246,119,227,169,146, 43, 18,137, +160, 80, 40,236,115,115,115,159,164, 31,155, 20,128, 4, 0,132, 66, 97,185,185,146, 74,165,144, 74,255,253,227,130, 8, 33,238, +132,144, 72,145, 72, 36, 85, 40, 20, 98,134, 97,160, 80, 40, 94,245,240,240,184,245,206, 59,239,248,255,244,211, 79,241,214,232, +148,148,148,252, 36,151,203, 69, 46, 46, 46, 0,128, 30, 61,122, 96,196,136, 17,200,200,200,224,146,147,147,209,184,113, 99,230, +212,169, 83, 72, 75, 75,195,181,107,215,208,186,117,107,145,163,163,227, 79, 0,122, 61,195,203,171,214,139,252, 83,169,216, 68, +248,151,139,225, 56,238, 17,115, 85, 85,230,170, 98, 6,203, 82,115, 30, 33, 4, 44,203,162, 78,157, 58,176,177,177,129,141,141, + 77,249, 54,179,153,171,248,162,148, 62,118, 19, 97,195,134, 13, 95,178,177,177,233, 76, 8,121,141, 82,122,212,218,227, 6, 78, +190, 83,158,181,170, 76,203,150, 45,207, 79,159, 62,189,231,241,227,199,115,218,183,104,192, 73,147, 19,178,108, 28,156, 91, 16, + 23,215,238,227, 70,143,185, 0,224,231, 90,132,152, 92, 82, 82, 34,173, 87,135,209, 38,231,229,235, 27,168,236,236, 27,216, 41, +109,234, 57,219, 57, 57,200, 36,140,194,205, 85, 99, 52, 26,115, 1, 36, 91, 18,170,216, 44, 40,147,201,244,132, 16,161,189,189, + 61,236,236,236, 12, 57, 57, 57, 37,129,129,129,144, 72, 36,153, 98,177,216,234,230,194, 54,109,218,164,177, 44,235, 90,211, 62, + 98,177, 56,253,194,133, 11,110, 86, 93, 45,240,121,203,150, 45,131, 87,173, 90,229,226,235,235,139, 53,107,214,168,118,238,220, +185,113,203,150, 45,200,205,205,197,253,251,247, 49,106,212,168,124,148, 54, 35,190, 80, 56, 58, 58,158, 29, 48, 96, 0,214,175, + 95, 79,203,190, 68, 40, 8, 33, 45,236,236,236,238, 70, 70, 70, 62, 81,223,153,199,129, 97,152, 87, 27, 55,110, 76,242,242,242, + 64, 41,133, 64, 32,120,228, 53,117,234, 84,249,187,239,190,251, 69,251,246,237,167,138, 68,162,124,147,201,180,173,176,176,240, +235,155, 55,111,190, 80,157, 85, 59,119,238,252,191,132,132,132,144,186,117,235,254,254,184, 26,148, 82,218,186,117,107, 61,165, + 84, 46, 16, 8,106,243, 5,167, 74,204,163, 67, 89,150, 45, 41, 51,116,160,148,154, 2, 3, 3, 75, 80,250,112,175,205,232,209, + 73, 59,118,236,176, 85,171,213,114,173, 86,139,216,216, 88, 4, 6, 6,162,160,160, 0, 69, 69, 69, 40, 46, 46,134,193, 96, 64, + 94, 94,158, 61,203,178,122,107, 4, 29, 29, 29,183,108,222,188,217,195,195,195, 3, 70,163, 17, 70,163, 17, 69, 69, 69, 56,117, +234, 20,116, 58, 29,140, 70, 35, 26, 55,110,140,249,243,231,151,140, 31, 63, 94,246,203, 47,191,164,107,181,218,161,181,190, 17, + 79, 25,129, 64, 0,169, 84, 10,145, 72,148,235,229,229, 5,134, 97,100,241,241,241,143,211,228,166, 2,144, 47, 20, 10, 37, 21, +141,149, 76, 38,195,205,155, 55,183, 87,151,189,170, 14, 90,169, 16,164,165,245,231, 13, 33,100,169, 72, 36,146, 58, 57, 57,137, +205,159, 25, 12, 6,177,131,131, 3,234,214,173,187, 18, 64,111, 43,117, 2,156,156,156, 64, 8,129, 88, 44,198,232,209,163,113, +249,242,229, 61,137,137,137,239,164,167,167,163,176,176,240, 39,149, 74,245,122,122,122, 58, 88,150, 69,124,124, 60, 90,182,108, + 25,240,204, 46,236, 81,254,241,198,202,140, 16, 40, 77,197, 85,124, 47, 91, 6,165,212, 98,230,170,166, 38,194,202, 24, 12, 6, +101, 72, 72, 8,103, 54, 99,230, 81,132, 0, 8,203,178, 16,139,197,143,104,150, 25,172,199,250, 5,151, 74,165,232,221,187,183, +204,198,198,230,215, 50,147,117,252,113,116, 0, 96,239,206,173,110, 11,102, 76,159,225,168,169,239,243,217,103,159, 9,123,245, +234,117,116,219,182,109,173,157, 59,189,212,243,244,177,237,110,107, 62,221,251,251,246,237,219, 11,172,237,224, 94,198,185, 61, +123,246,168, 63,158, 56, 78, 28, 28, 28,188,107,120,243, 41, 66,181,132,179,117,148,138, 5, 54, 2, 33, 35,245,172,215,243,216, +169,211, 41, 0, 78, 91, 18,162,148,170,143, 30, 61, 10,123,123,123, 0,144,232,245,122,216,219,219, 99,205,154, 53, 50,149, 74, + 5,149, 74,133, 14, 29, 58, 56,136,197,226, 26,155, 11, 43,194,178,172,235,201,147, 39,161, 84, 42, 81, 84, 84, 4,157, 78, 7, +147,201, 4, 74,105,249, 55,199,174, 93,187,214,104,192, 42,197, 24, 75, 8,233, 50,110,220,184,211,171, 86,173,114,241,241,241, +193,236,217,179,145,149,149,133,135, 15, 31, 98,232,208,161,249,113,113,113,221, 42,246,205,122, 17,104,222,188, 57, 61,119,238, + 28, 14, 30, 60,136,190,125,251,146,189,123,247, 26, 88,150, 21, 39, 37, 37,221,120, 94, 49,153, 76, 38, 91,137, 68, 2,163,209, + 8,161, 80, 88,222,132,111, 54, 88,238,238,238,248,227,143, 63,132,197,197,197,194,172,172, 44,155, 31,126,248, 97, 98, 88, 88, +152, 26,192,224,231, 21, 51, 0,172, 94,189,186,238,232,209,163, 31, 10,133, 66,218,179,103,207, 97, 15, 30, 60,232,175, 86,171, +143,157, 56,113, 98, 17,128, 90,151, 22,240,247,247, 15, 19, 8, 4, 30, 0,196,191,254,250,171,145,101, 89,113,243,230,205,211, +204,153, 29,243,179,209,100, 50, 37, 70, 69, 69, 89, 28,137,236,239,239, 31, 38,147,201,196,223,127,255,189,177,164,164, 68,220, +162, 69,139,180, 10, 58,226,223,126,251,205,104, 52, 26,197,141, 27, 55, 14,179,114,100,115,215,182,109,219,214,205,205,205,133, +157,157, 29, 10, 11, 11, 17, 22, 22, 6, 63, 63, 63, 36, 39, 39,131, 97, 24,216,219,219, 99,245,234,213,197,132,144,108,107,174, + 57, 59, 59,123,232,228,201,147,207,108,223,190,221, 89, 32, 16,224,193,131, 7,200,206,206,134,189,189, 61, 54,111,222,140,122, +245,234,225,232,209,163,217, 44,203,190,183,126,253,250, 47,180, 90,237,208,231,221, 7,139, 97,152,114, 35, 84,193, 16,149,180, +107,215, 14,231,206,157,219, 90, 27, 83, 68, 41,213,155,155, 5, 43, 54, 13, 74,165, 82, 8, 4,130, 90, 55,121,176, 44, 43, 38, +132, 4,224,207, 86,155, 26,215, 95, 0,130, 21, 10,133,184,242,135, 57, 57, 57,226,198,141, 27,119,182, 86, 68, 42,149, 58,201, +229,242, 82,193,224, 96,164,167,167,179,222,222,222,111, 13, 26, 52,200, 8, 0,239,191,255,254, 91, 25, 25, 25, 37, 70,163, 81, + 32, 20, 10,145,145,145,129, 6, 13, 26, 56, 61,181,171,168,134,170,188,200, 63, 25, 33,165,148, 16, 66,104,197,119,243, 70,115, + 31,172,154, 50, 87,230,109,102,163, 84,211,201, 24,134,201, 13, 15, 15, 87, 40, 20,138,242,207,140, 70, 35, 2, 2, 2, 56,142, +227, 72,229,115, 61, 73, 6, 75, 42,149,194,222,222, 30,131, 7, 15,182, 73, 74, 74,218, 8,192,195,154,227, 74,251, 96,253,185, +190,119,231, 86,183,181,223,204, 94,185, 98,193, 92,167,152,131, 27,176,126,249,183,172, 66,161,140,104,217,178,101,151,188,188, + 60,157,189, 66,135,212, 44,236,164,148,110,177, 54, 54, 66, 8, 3, 96,251,133, 11, 23,174,246,232,209,227,194,253,251,247, 29, + 30,220,187,119, 86,165, 47, 44, 84,122,214, 55,137, 93,221,250,105, 13, 70,225,128, 1, 3,220, 0, 44,183, 66, 15, 28,199, 97, +255,254,253,176,181,181,133, 74,165,130,189,189, 61,204,230,234,113,137,139,139, 67, 98, 98, 34, 20, 10, 5, 20, 10, 5,148, 74, + 37,148, 74, 37, 36, 18,201, 35,217, 71,107,161,148, 70, 17, 66, 62,220,189,123,247,182,208,208, 80,228,228,228,160,168,168, 8, + 51,102,204, 64,108,108,236,100, 74,233,213,199, 14,246, 25,208,162, 69, 11,122,225,194, 5,156, 61,123, 22, 69, 69, 69, 88,185, +114, 37,212,106,245, 75, 0,190,124,158,113,113, 28, 39, 54,151, 58, 97, 24,230, 47, 25, 44,179,217,146,203,229,112,118,118,198, +244,233,211,197,253,250,245, 11,121,158, 49, 47, 88,176,160,225,210,165, 75,127,216,180,105,211,193,161, 67,135,254,114,243,230, +205,145,118,118,118, 55,142, 31, 63, 62, 87, 42,149,114,150, 21,254,138, 80, 40,244,184,122,245,106, 69,147, 47, 98, 89,214,134, +101, 89,152, 76, 38, 24,141, 70, 20, 23, 23,163,123,247,238, 86,235, 93,190,124,217, 6, 0,190,252,242, 75, 17, 0, 27,142,227, + 80, 81, 79,171,213,138, 94,126,249,101,171,254,151, 0,208, 56, 56, 56,136, 30, 62,124, 8,147,201,132, 86,173, 90, 97,245,234, +213, 24, 52,104, 16,154, 53,107,134,130,130, 2, 68, 70, 70, 98,227,198,141, 14, 98,177,248, 77,107, 4,147,147,147,163, 52, 26, + 77,231,183,222,122,235,252,182,109,219, 28,234,214,173,139,196,196, 68, 36, 39, 39,195,199,199, 7,203,151, 47, 47,162,148,118, + 44, 51, 85,191, 89, 25,231, 51,131, 97,152,114, 19, 84,213,235,113, 48,153, 76, 42,153, 76,150, 47,147,201, 36,102,163,117,229, +202,149, 90,103,175,204, 84,254,191, 99,105,253,121, 98,254, 31,108, 52, 62,122,153, 10,133, 2,190,190,190, 86,235, 40, 20, 10, + 98,126,198, 26,141, 70,164,164,164,176, 55,111,222,100, 91,181,106, 5, 0, 80,171,213,236,197,139, 23, 89,157, 78, 39,176,181, +181, 5, 0,216,219,219, 63, 83,147, 89,147, 23,249,167, 98,110, 34, 60, 93,233,189, 60,131,101, 54, 60, 53,117,114, 23, 10,133, +214, 26, 44, 8, 4, 2, 28, 58,116, 8, 74,165, 18,182,182,182,104,210,164,116,180,158, 57, 91, 86, 57, 43,246,184, 6, 75, 34, +145,192,206,206, 14, 71,142, 28, 41,185,118,237,218,232,199,209, 48,155,171,249, 95,207,114,202,186,125, 1,137,201, 41,200, 74, + 51,132,157,187, 25,127, 24,192, 97, 0,192,237,166,167,208,244,182,213,230,170,169,139, 77,203,118,190,117,126,235,246, 74, 79, +247,254,195,199, 49,227,199,143,111, 63, 98,196,136,236, 97,195,134, 77,146,203,229,205, 76, 38, 83,206,209, 83,167,226, 7, 14, + 28,232,148,151,151, 55,130, 82,106,177, 79,146, 64, 32, 72,233,209,163,135, 39, 0,216,218,218,234,127,252,241, 71,137,189,189, + 61,134, 12, 25, 82,146,154,154, 42, 43,187, 31, 57,176, 50,123, 5, 0, 66,161, 48,253,189,247,222,171, 49, 67, 37,145, 72,210, +107,218, 94, 25, 66, 72, 64, 72, 72,200,186,237,219,183, 35, 43, 43, 11, 69, 69, 69, 16,139,197, 88,184,112, 33, 30, 62,124,184, +140, 16,114,243, 69,249,103,214,178,101, 75,122,233,210, 37,220,184,113, 3, 58,157, 14,163, 71,143,174,216,199,176,199,115, 13, + 14, 32, 73, 73, 73,216,188,121, 51, 88,150,197,208,161, 67, 81,175, 94,189,114,131,149,154,154,138, 31,127,252, 17, 44,203,226, +189,247,222,131,151,151, 23,140, 70,163,172,107,215,174,194,231, 53,162,116,202,148, 41, 49,123,246,236, 57,152,144,144,208,235, +155,111,190, 9, 38,132,112, 83,167, 78,157,175, 82,169,158,104,244,101, 78, 94, 1,238,222,123, 0,147,201, 84,229,203,197,217, +177,214,122,209,177, 15, 97, 50,177,229, 26, 44,251,167,158,147, 99,173,244,146,178,179,179,125, 5, 2,129,248,222,189,123,168, + 91,183, 46,218,180,105,131,121,243,230, 33, 35, 35, 3, 38,147, 9,174,174,174,156,209,104,140,208,235,245, 22, 51,213,102, 82, + 82, 82,138,179,178,178,138,222,123,239, 61,251,117,235,214, 17, 95, 95, 95,220,191,127, 31, 34,145, 8,182,182,182,197,119,238, +220,121, 97, 70, 13, 86,206, 92,153, 95,101,153, 43, 6,192,239, 0,106,101,176, 41,165,122, 79, 79,207, 71,250, 95, 61, 78,246, +234, 89,241, 44, 71, 38,250,250,250,158, 82,169, 84, 33,119,238,220,121, 36,139, 53,120,240, 96,131,143,143,207, 25,107,117, 84, + 42, 85,142, 68, 34,113, 42, 41, 41,193,133, 11, 23,208,164, 73, 19,113, 94, 94, 94, 40, 33,100, 26, 0,180,104,209, 34, 52, 45, + 45, 77,236,238,238, 14, 0,104,220,184, 49,242,242,242,114,172,169, 22,240,132,252,197,139,252,147, 17, 2, 0,165, 52,184,226, +187,153,202, 77,132, 53,153, 44,115, 65,210,154, 32,132, 64,171,213,150,103, 68, 20, 10, 5, 56,142,123,164, 57,178,178,193,170, + 60,138,208, 90,164, 82, 41, 78,156, 56, 81,178,118,237,218, 1,148,210,195,214, 30, 87,177, 15,214,247,139,231, 46, 48,155,171, +235,103,255,192,111,119,242, 50,167,206, 91,188,244,113,226, 1, 0, 63, 23, 69,139, 58,110,206, 39, 23, 47,156,175, 74,186,116, + 16,191,172, 93, 76,175, 95,190,220,250,131,203,151,223,252,224,131, 15, 28, 81,218,223, 42, 9,192, 89, 0,203,172, 49, 87, 0, +112,241,226, 69, 47,243,114,155, 54,109,140, 42,149, 10, 74,165, 18, 25, 25, 25, 98,165, 82, 41, 59,121,242,100,173,251, 58, 92, +186,116,201,218,190, 85, 86, 65, 8,105,212,183,111,223,211,187,118,237, 82,228,230,230, 34, 62, 62, 30,159,124,242, 9,190,251, +238, 59,168, 84, 42,236,223,191,223, 54, 36, 36,228, 36, 33,164, 3,125,206,197, 85, 3, 2, 2,232,149, 43, 87, 16, 31, 31, 15, +147,201,132,254,253,251, 91, 28,192,241,119,194,113, 28,157, 60,121, 50,214,173, 91, 7,134, 97, 48,124,248,112,228,231,231,151, +111,119,116,116,172,106,155, 0, 22, 70,148, 62, 75,132, 66, 33, 61,117,234,212, 55,193,193,193, 72, 72, 72,232, 21, 24, 24,184, + 98,228,200,145, 73, 79,170,235, 96,103,139,150,126,222,208,233,116,208,233,116,208,104, 52, 40, 40, 40, 64, 76, 76, 12,116, 58, + 29,220, 92,237,107,173, 23,208,172, 33,244,122, 61,116, 58, 29, 92, 93, 93, 81, 84, 84,132,251,247,239, 67,167,211,193,197,197, +161, 54,114,167,206,158, 61, 91,183,123,247,238,141, 35, 35, 35,113,250,244,105,232,245,122, 4, 4, 4, 32, 58, 58, 26,237,219, +183, 71,126,126,254,165, 43, 87,174, 88, 61, 34,133, 16,226,249,234,171,175,158,216,186,117,171,211,150, 45, 91,244,111,188,241, +134,100,246,236,217, 68,165, 82, 33, 45, 45,237,145,250,132, 47, 2,149,141, 85, 88, 88,216,118,177, 88, 76, 1, 60, 86,182,201, + 76, 66, 66,130,180,121,243,230, 58,169, 84, 42, 57,127,254,124,173,154, 25,159, 53, 79, 58, 50,177, 38, 26, 54,108, 56,217,195, +195,163,123,171, 86,173, 16, 25, 25, 41,150, 74,165, 24, 54,108,152,161,119,239,222, 6,161, 80,104,245,128, 27,153, 76,118,219, +214,214,182,139, 78,167,131, 94,175,199,209,163, 71,225,232,232,248, 73, 72, 72,200,135, 41, 41, 41, 72, 78, 78,150, 72,165,210, +242, 44,121,183,110,221,144,157,157,125,219, 90,253,199,165, 58, 47,242, 79,165,218, 58, 88,149, 51, 88, 53, 53, 15, 90,107,176, + 24,134,129, 94,175,135,141,141, 77,185,193,170, 88, 41,254,113, 52,171,227,234,213,171,231, 99, 99, 99, 23, 81, 74, 15, 60,206, +241, 59,182,108, 82,219,113,197,158,201,151, 14,224,238,245, 48,236,137,204,205,156, 58,111,241,196,215, 6, 12, 73,171,184,223, +192,201,119,176,195,138, 46,244,141, 92, 21,254,238,110, 78, 39, 23, 47,156,175,202,186,125, 1,247,110,132,225,192,165,196,112, + 29,165,209, 0, 44,142,160,170, 13,230,182,245, 23, 9,169, 84, 58,217, 60, 90, 48, 54, 54, 22, 67,135, 14,205,141,143,143, 31, +215,191,127,255,239, 14, 31, 62,236,224,224,224,128, 35, 71,142,216,122,122,122,134, 2,120,110,205, 89,132, 16,202,178, 44,178, +178, 74, 7,111,118,236,216,241,133, 50, 87, 0, 16, 22, 22, 38,238,219,183,239, 49, 0, 47,221,190,125, 27, 28,199,157, 15, 15, + 15,239,104,222, 94,211, 54, 43,224, 10, 10, 10, 68,182,182,182, 85, 62,172,196, 98,177, 24,181,204, 56, 84,212, 60,119,238,220, +252, 69,139, 22,237,249,232,163,143,238, 61,161, 38,128,191,102,176, 66, 66, 66, 80,162, 51, 34, 49, 45, 15, 38,147, 9,197,250, + 52,203, 34,149,244, 42,102,176, 66, 66, 66,160, 45,209,227, 97, 74, 54, 76, 38, 19, 10, 75,106,149, 40, 89, 62,120,240,224, 1, +231,206,157,203,110,220,184,177,227,149, 43, 87,144,158,158, 14,163,209,136,151, 94,122, 9, 82,169,244, 65,104,104,168, 24, 86, +116, 3, 0, 0, 66,136,205, 43,175,188,114,120,219,182,109,117,206,159, 63, 15,189, 94,207,133,133,133,221, 31, 51,102,140,234, +221,119,223,117, 42,189,141, 47, 22,102, 99,117,251,246,109,179,177, 26,142,167,100,132,204, 25,172,255, 18, 91,182,108, 73,218, +176, 97,131,159, 90,173, 94, 58,108,216,176,110, 26,141,134,145, 72, 36,167,132, 66,225,135, 0, 30, 88,171, 35,149, 74, 71, 58, + 56, 56,196, 8, 4, 2, 65, 82, 82, 18,238,221,187, 7,129, 64, 0, 74,169, 68,171,213,194,205,205, 13, 2, 65,233,120,142,193, +131, 7,195,195,195,131,141,142,142, 30,249,140, 46,235, 95, 75,181, 6,203,204,156, 57,115,176,118,237, 90,188,255,254,251, 53, +238, 87, 86, 22,224,145, 7, 17,169, 52,219,182,121, 20,225,204,153, 51, 31, 57,206,220, 20, 56,110,220,184, 71, 52,127,253,245, +215,191, 52, 17, 86,214,172,142,152,152,152, 96, 75,251, 84,165,105,238,131, 53,112,232,240,148,149,243,103,220,216,184,247, 88, +243, 20, 45, 77,153, 58,111,241,148,202,230,202, 90,205,166,117,148, 77, 61, 92,157, 78, 45, 90, 56,223,206,156, 13,219, 22,145, +154, 7, 19,173,249,166,214,160, 89, 29, 34,145, 40,165, 67,135, 14,158,128,117,205,130,214,222,207,218, 80,149,166, 78,167,195, +197,139, 23, 1, 0,163, 70,141,202,141,143,143,239, 66, 41,189, 69, 8,185,221,179,103,207, 83,135, 14, 29,114, 40,251,246, 93, +101, 89,138,191, 43, 78,160,116, 68,171, 80, 40,132,175,175,111,173,205,213,223, 21,103, 74, 74,202,251, 99,199,142, 93,171,211, +233,132, 69, 69, 69,239, 91,187,205, 82,156, 59,118,236,184,231,235,235, 27,140,234, 75, 49,112, 0, 46, 60,137,230,210,165, 75, + 1,160,241,147,104,154,169,156,193,218,190,125, 59, 88,150,133,135,155, 29,116, 58, 29, 42,246,247,180, 70,179,114, 6,235,151, + 95,126, 1,199,113,240, 82, 59, 66,167,211, 85,219,247,176, 42, 77, 74,169,142, 16, 50,178, 67,135, 14, 63,205,157, 59, 55,174, + 73,147, 38,158, 29, 58,116,112,200,206,206, 78,191,122,245,106,252,218,181,107,149, 38,147,105,100,117,205, 68,149, 53,157,156, +156, 22,111,218,180,201,227,246,237,219, 72, 74, 74,194,146, 37, 75, 30,100,100,100,244, 22, 10,133,210, 21, 43, 86,156,236,211, +167,143,155,201,100,170, 49, 91,253,119,254, 29, 1, 64,114,114,242, 94,148,150,175,169,149,177,178, 38,206,203,151, 47,255, 82, +166,125,192, 26,237,191,235,218,159,116,100,162,165, 56, 71,142, 28,153,136, 74, 53,211,106, 27,231,145, 35, 71,226,223,126,251, +237, 57,254,254,254, 51,149, 74, 37,162,162,162,202,203, 34,153,191,160, 19, 66, 48,112,224, 64,124,240,193, 7, 56,114,228,200, +156, 1, 3, 6,196,215,164,201,243, 87,170, 53, 88, 44,203, 38,196,199,199,171, 55,109,218, 36, 32,132, 96,243,230,205,168,220, +177,214,252, 14, 0, 23, 47, 94, 52, 81, 74, 99,106, 58, 25,203,178, 9, 97, 97, 97,110, 27, 54,108, 16,201,229,114, 72,165, 82, + 36, 39, 39,131,227, 56, 46, 45, 45,141,217,186,117,235, 35,157,117, 47, 92,184, 96, 50, 24, 12, 15,159,242, 53, 91,205,153,200, + 7, 31, 30,218,191,199,185,125,187, 46,185, 42, 71,199, 42,141,138,185,226,123, 77, 40,108, 85,243, 23, 45,156,111,111, 54, 87, +219, 35, 82,115, 75,116,108,183,219, 25,197,215,159,118,204,231,206,157,243,178,188,215,115, 97, 70,112,112, 48, 7,192, 25,192, + 23,180, 52,115,135, 50,147,213,206,215,215,247, 35, 0,114, 0, 51,158, 87,128,132, 16,202,113, 92,121,230,244, 69,203, 92, 85, + 36, 60, 60, 60, 14,192,203,181,221,102,137, 1, 3, 6,196, 2,120,162,233,102,254, 14, 77, 51,217,185,249,136,185,159, 84, 54, +149, 23, 11,246, 65,106,133,254, 83, 70,100,231,215,174,140, 92, 78, 94, 1, 98,238, 39,130,227,104,169, 30,155, 84,222,201,221, +100, 50, 33, 51,183,118,101,218, 40,165,145,132,144,246,159,126,250,233, 36, 0,157, 0,120, 1,120,136,210,110, 0,203,173,237, +131, 35, 18,137, 58, 45, 93,186,180, 55,195, 48,204,197,139, 23,117, 11, 23, 46, 76,200,200,200,232, 71, 41,125, 8, 0, 26,141, +166,235,175,191,254,186,229, 69, 40,201, 80,137,225,255, 80,237,199,230,159, 50, 50,113,219,182,109,179,198,141, 27, 39,108,219, +182,237,103,173, 91,183,102,238,223,191,143,244,244,244,242, 47,151,175,190,250, 42,234,214,173,203, 29, 56,112, 96,222,235,175, +191,254, 56, 53,245,254,243, 84,107,176, 50, 51, 51, 95, 29, 62,124,248, 31, 12,195,212, 55,103,145,170,123, 7, 0,142,227,226, +211,210,210,106, 44, 66,150,153,153,249,234,140, 25, 51,254, 16, 10,133,229,154, 44,203,234,178,178,178,198, 13, 28, 56,112,149, + 72, 36, 42,175, 20, 87, 54, 50,238, 65, 74, 74,202,223,218,161,184,114, 29,172,158,125, 94,207,124, 82, 77,133, 4,222, 9, 23, +247,227,222,141,112,108,143, 72,205, 41,208,179, 93,163, 50,138,254, 83,206,159, 82,154, 14, 96, 92, 53,219,238, 1,168, 85, 54, +239, 89,240,111, 26,189,242, 95,192,100, 50, 37,118,127,169,107,121, 73, 6,115, 98,160,242, 58,203,178,137,214,234,189,220, 45, +184, 90, 29,243,178,181,122,102,202, 76,212, 2,212, 98,202,171,202, 8, 4,130,143,218,182,109, 43,248,232,163,143,210, 14, 30, + 60,120, 44, 39, 39,103, 10,165,180,216,188,189,108,212,224,243, 46, 38,202, 83,198, 63,101,100,226,170, 85,171,190,252,228,147, + 79, 54,106, 52,154,205,157, 58,117,106,236,227,227,163,178,181,181, 69,126,126,126, 65,118,118,246,221,253,251,247, 15, 29, 62, +124,184,213,211, 98,241, 60, 74,181, 6, 43, 35, 35,163, 8,128,213, 85,139,173,193,130,102,221,167,121,174, 39, 97, 68,208,194, +109,184,189,240,145,121, 8, 1, 84,191,110,161, 15, 86, 74,102,254, 7,115, 55,238,255, 86,103,162,156,193,196,141,138, 74, 47, +122,174,157,184,121,170,135, 55, 87,255, 28,110,222,188,105, 77, 45,170,231,166,247, 52,209,235,245, 31,118,232,208, 97, 25,203, +178,139,140, 70,227,217,231, 29, 15,207,191,135, 5, 11, 22,196,161,236,185, 60,112,224, 64, 1, 0,236,216,177,227,133, 25,149, + 89,129,214, 0, 92, 0,152, 39, 91,119, 1,160, 71,105,101,255, 12, 0, 87,158, 83, 92,213, 98,177, 15,214,127,141, 29, 71,255, +124,192, 86, 54, 78,150,214,171,227,110,106,225, 41,240,223, 46,121,120,120, 30,147,178,166,192,126,207, 59, 14,158,127, 55, 47, +168,177, 50,227, 66, 8,217, 71, 41, 13, 1, 0,243,114,197,207, 94, 52, 30,127,152, 30, 15, 15, 15, 15, 15, 15, 15, 15, 79,149, + 16, 0,254, 85,109,168,205,232, 0, 66, 72,149, 26, 53, 97, 73,159,215,228, 53,121, 77, 94,147,215,228, 53,121,205,127,159,166, + 37,237,106,142,239, 99, 33,131,181,191,182,113, 62,107,200,179, 44, 76,247,119, 15, 9,230, 53,121, 77, 94,147,215,228, 53,121, + 77, 94,243,159,169,105,129,127,156,193,226,251, 96,241,240,240,240,240,240,240,188,232,104,167, 77,155,246, 25, 33,100, 31, 0, + 76,155, 54,237,179,231, 29,144, 37,120,131,197,195,195,195, 83, 1,141, 70,211, 23,192, 44,148,118,161, 8, 77, 78, 78,254,229, + 57,135,196,195,243, 84,113,113,113, 81, 56, 57, 57, 29, 99, 24,166, 46,240,104,201,165,202,197,189, 1,128,227,184,148,236,236, +236, 30,169,169,169,213,150, 45,122, 22,154,149, 56, 31, 26, 26, 90, 28, 26, 26,106,238,208,158,129,210, 86,184, 16,252, 57,178, +240,133,162,214, 6,107, 90,143,250,157, 53,238,238, 91,115,179,178, 34,116,197, 5,239,206, 59,150,148,253, 56, 39, 38,132, 56, + 73, 36,146,183, 20, 10, 69,119, 74,169,183, 64, 32,184,147,151,151,119,212,104, 52,110,163,148, 22, 62,142, 38, 15,207,211, 36, + 32, 32,160,185, 68, 34,249,132, 16,210,206,100, 50,121,136, 68,162,100, 0,151,116, 58,221,194,136,136,136,136,231, 29, 31,207, +211,129, 16,194,168,213,234,101,246,246,246,109,115,115,115,135, 2,248, 44, 42, 42,170, 5,195, 48,240,243,243,251, 76,163,209, +196,216,218,218,174, 47, 40, 40, 56,159,146,146,242, 33,173,197,220,113, 60, 47, 46, 62, 62, 62, 97, 12,195,120, 84,156,174,205, + 76,117, 53, 31, 41,165,113,145,145,145, 29,170,211,244,240,240,240, 86,169, 84,171, 0,180,174,202, 84, 84,164,172,123,206,149, +252,252,252,113,137,137,137, 85, 22,226,117,116,116,180,117,117,117,157, 69, 8, 25,200, 48,140,192,210, 53,113, 28,199, 82, 74, +119,164,167,167,207,200,206,206, 46,168,110, 63, 39, 39,167,163,167, 79,159,110,237,236,236,108,177, 44,141,201,100, 66, 98, 98, +162, 75, 72, 72,200,105, 0,213, 86,214,126, 22,154,149,208, 3,184,108,229,190, 47, 4,181, 54, 88,132,197,176,119, 71, 15,119, +207, 77,136,114,223,180,237, 80,163,207, 95,173,219,245,235,195, 15, 82,107,163, 33,151,203,223,242,247,247, 95,190,124,249,114, +167,250,245,235, 19,185, 92,142,148,148,148, 38,215,174, 93,123,125,230,204,153, 51, 68, 34,209, 72,163,209,248, 71,109, 99,123, + 36, 78, 66,236, 29,149,194, 79,178, 10,140,211,159, 68,135,231,191,199,192,129, 3, 5, 9, 9, 9, 51,157,157,157, 63,254,244, +211, 79,165, 13, 26, 52,128, 82,169, 68,122,122,186, 87,116,116,180,231,170, 85,171,250,118,232,208, 97,133, 88, 44,254,252,228, +201,147,207,101,242,100,158,167,135, 90,173, 94,118,250,244,233, 9, 26,141, 6, 29, 59,118, 60, 31, 16, 16,160,178,177,177,193, +193,131, 7,225,237,237,221,204,206,206,238,210,154, 53,107, 68,179,102,205,106,185,123,247,110, 0,152,248,188, 99,230,121,114, + 24,134,241,136,136,136,112,181,177,177, 1,203,178,101,179, 1,112,160,148,150,191,155, 41, 43, 48,139,110,221,186, 25,106,210, +148,201,100,223,221,184,113,163,187,121,134, 19,243,177,213,145,156,156,220,189, 91,183,110,223, 1,168,178,160,182,171,171,235, +172, 65,131, 6, 77,110,214,172, 89,249, 84,115, 28,199,149,191,103,102,102, 98,252,248,241,229,231,224, 56, 14,167, 79,159,158, +244,191,255,253, 15, 0,254, 87,195,181,215,117,118,118, 38,150,166,192,155, 57,115, 38,102,206,156,137,229,203,151, 19,161, 80, + 88,227,204,233,207, 66,243,159, 78,237, 13, 22,232,129, 3, 59,127,121, 55, 36,184, 49, 25,209,175,149,239,150,189, 97, 23,166, +117,111,208,101,254,209,184, 4,107,142,151,203,229,147,198,142, 29, 59,127,246,236,217,178,187,119,239, 34, 50, 50, 18, 38,147, + 9, 74,165, 18,205,155, 55,103, 14, 28, 56,160,158, 52,105,210, 78,137, 68, 50, 74,175,215,239,174,253, 37,149, 82,199, 65,176, + 80, 33, 23, 12,145, 8,133,151,244, 38,147,213,179,213,255,157,180,109,219,246,136,209,104,252, 38, 34, 34,226,196,243,142,197, + 90, 2, 3, 3, 59,138,197,226, 25, 18,137,164,231,191,213, 92, 60,120,240, 96, 70,231,206,157, 63,158, 57,115,166,244,254,253, +251,136,138,138, 66, 74, 74, 10,234,215,175,143,250,245,235,147,229,203,151,203, 86,172, 88, 49,241,218,181,107, 12,128,169,214, +234, 18, 66,152, 58,117,234,188,247,242,203, 47,191,233,236,236,108,151,148,148,148,119,238,220,185,223, 82, 82, 82,190,167,148, + 62,214,189, 36,132, 48,206,206,206, 35, 66, 66, 66,222,116, 74,241,242,177, 0, 0, 25, 53, 73, 68, 65, 84,116,116,116, 76, 73, + 73,201, 62,118,236,216,111,233,233,233,235,159, 36,211, 66, 8, 81, 3,104, 1,192,169,236,163,148,122,245,234,221,186,127,255, +126,250, 83,212, 76,174, 87,175, 94,228,227,104,186,184,184, 40,132, 66,225, 47,132, 16, 77,117,251, 80, 74,147, 77, 38,211,160, +178, 2,199,213,162, 82,169,218,169,213,106, 92,186,116, 9, 95,124,241,133, 99,183,110,221, 16, 29, 29, 13,134, 97,240,241,199, + 31, 19, 63, 63, 63, 81,106,106, 42,130,130,130,112,244,232,209,106,179, 23, 60,127,133, 16,178, 3,128, 61,128,193,148,210,204, + 10,159, 59, 3,248, 21, 64, 58,165,180, 86,243,234, 61, 77,228,114, 57,126,254,249,103,136, 68, 34,136,197, 98,228,228,228,192, +221,221, 29, 98,177, 24, 34,145,168,252, 37, 22,139,225,233,233,105, 81,143,227,254,223,222,153, 71, 69,113,166,107,252,249,170, +170,187,122, 7, 26, 65, 64, 80, 80, 65, 65, 65, 17, 16,140,122, 53, 49,152,184,141, 38,113, 25, 39,137,154,113,137,193, 61,198, + 16, 69,130, 43,142,142,163,137,113, 4,163, 68,163,102, 49, 30, 39, 99,226,141, 26,146, 25, 73,226,130,178,196,157,237, 10, 42, + 40, 59, 34, 75, 87,111, 85,247, 15,232, 22, 9, 75, 55, 65, 81,211,191,115,234,208,221,213,253,244, 91, 13,116, 61,245,126,239, +247,126,124, 40, 77,211,168,170,170,130,209,104, 52, 47,179,116,247,238, 93, 8,130, 0,150,101,205,143,155,246,241, 60, 31,218, +156, 30, 33,100,114,151, 46, 93,240,197, 23, 95, 64,171,213,254,102,191,157,157, 29, 46, 94,188, 95,103, 78,211, 52, 2, 3, 3, + 41, 66,200,100,180, 96,176, 8, 33, 2, 0,204,158, 61,251,129,229,233, 26,111,166,181,131, 5, 65, 48, 47, 33,246, 40, 53,159, +116, 90, 52, 88,203,159,239, 17,225, 31, 20,248,119,150, 21,201,120,163, 30,188, 65, 15,255,128, 94,224,121, 3,254, 47,239, 54, +122,118,102,241,215,209,222,158,251, 78,100, 94, 92,241, 66,175,176,216, 19,153, 25, 13, 95,223,120,134, 1, 33,196,107,224,192, +129,171,215,173, 91, 39,253,225,135, 31,112,237,218, 53,196,198,198, 2, 0, 20, 10, 5,190,251,238, 59, 24,141, 70,108,217,178, + 69, 53,106,212,168, 29,132,144,147,130, 32,148,181,164,217, 20,132, 16,207, 97, 33, 30, 19, 14,111, 30, 38,241,127,249,208, 7, +132,144,163,130, 32, 52,219, 64,237, 97,204,132,176, 68,211, 96, 48,140, 20,137, 68,131,131,130,130,254,100,137,201,234,168, 56, + 77, 4, 7, 7, 15, 17,137, 68,199,116, 58,157,156,101, 89, 6,205, 44, 36,221,209,113,254, 30,205, 1, 3, 6,244,115,116,116, +124, 39, 38, 38, 70,114,230,204, 25,148,151,151,163,168,168, 8,139, 22, 45, 66, 92, 92, 28,252,253,253,161, 80, 40,176, 96,193, + 2,233,188,121,243, 34, 6, 14, 28,248,213,185,115,231,206,183, 22, 39, 33,132, 26, 62,124,248,231,251,247,239,239,110, 48, 24, + 40, 0,208,235,245,234,188,188,188,233,203,151, 47, 31, 78, 8,249, 75,115, 38,171, 37,205,193,131, 7,239, 63,112,224,128, 55, +203,178, 84,253,151,181,243,180,105,211,102, 70, 69, 69, 61, 71, 8,121,181,185,191,251,150, 62, 79, 66,200, 0,185, 92,222, 39, + 34, 34,162,100,194,132, 9,249, 0,144,146,146, 66,210,210,210,134,172, 94,189, 58, 55, 38, 38,166,201,101, 62, 90,209, 12,150, +203,229,190,243,231,207, 47, 30, 51,102, 76,129, 88, 44,230,207,156, 57, 67, 95,188,120,113,104,108,108,108,206,138, 21, 43,154, + 92,151,179, 57, 77,145, 72,244,229,225,195,135,135,187,187,187, 27, 1, 8,245,239, 33, 16, 66, 4,138,162, 4,138,162,144,147, +147,227, 53,105,210,164,207, 0,140,111, 73,179,162,162, 98,250,208,161, 67,147, 86,174, 92,233, 8, 0, 73, 73, 73, 96, 24,198, +124, 66,184,118,237, 26, 56,142,195,182,109,219,116,247,238,221,155,101,237,177,183,149,167, 68,179, 43,128, 80, 0, 63, 18, 66, + 70, 8,130, 80, 82,111,174,254, 3,160, 47,128, 95, 58, 42, 78,138,162, 96, 52, 26,205, 38,234,251,239,191, 71, 92, 92, 28,190, +248,226, 11,184,187,187, 63, 96,176, 68, 34, 81,147,117, 68, 77,156,227, 0,212, 13,129, 25,141, 70, 36, 39, 39, 99,247,238,221, +232,220,185, 51,156, 58,117,130,147,179, 51,194,194,194, 96,202,154, 25,141,198,223,232, 54,214, 44, 41, 41, 1,207, 91,118,173, + 36, 8, 2, 42, 43, 43, 91,141,211, 68, 75, 70,168,225,214,204,123,181,187,230,211, 70,139, 6,203,205,213, 41,106,210,196,145, + 50, 24, 13,128,174, 26,208,213, 64,208,213, 64,208, 86,131,176, 50, 8,122, 13, 20,116, 41,222,124,222,197,238,208,233,194, 43, +239,141,240, 28,251,183, 31,243,142, 53,167,103,103,103, 23,189,115,231, 78,251, 11, 23, 46, 32, 35, 35, 3, 91,183,110,197,154, + 53,107,204, 87, 14,227,199,143,199,169, 83,167,160,213,106,177,114,229, 74,199,200,200,200,249,168, 43, 54,181, 10,215, 78, 76, +220,193,125,219, 28, 29,101, 37,248,235,132,115,157,254,121, 48, 55, 2,192, 71,214,234, 60, 10, 34, 35, 35,229,155, 54,109,250, +198, 82,147,213, 81, 4, 7, 7, 15,145, 72, 36,199,162,163,163, 21,209,209,209,237,210,237, 55, 56, 56,216,159, 97,152, 47,245, +122,253,210,212,212,212,227,237,161,249,123,145, 72, 36, 11,223,121,231, 29,233,173, 91,183, 80, 81, 81, 1,137, 68,242,192,151, +155, 68, 34, 1, 69, 81, 96, 89, 22,211,166, 77,147, 38, 36, 36,188, 13, 96,106,107,186,174,174,174,179,246,237,219,215, 93,167, +211, 81,213,213,213, 16,139,197, 16,139,197,232,215,175, 31,189,108,217,178,174,139, 23, 47,158, 11, 96,187, 53,177,170,213,234, +233,251,247,239,247,102, 89,150,186,125,251, 54,134, 12, 25,130,179,103,207, 34, 44, 44,140, 94,182,108, 89,183, 5, 11, 22,204, + 1, 16,103,141, 38, 33,196, 77, 46,151,251, 39, 37, 37,221,236,210,229,126,114,168,123,247,238,194,232,209,163,203, 50, 50, 50, +124, 83, 83, 83, 75,131,130,130, 44,202, 88,215,107,186,203,229,114,191,227,199,143,223, 94,179,102,205,243,113,113,113, 19, 0, + 32, 52, 52,244, 72,108,108,236, 15,165,165,165,125,147,147,147, 75, 67, 67, 67,243,173, 8,181,147,171,171,171, 33, 34, 34, 66, +213,120, 71, 76, 76, 12, 86,175, 94,141,189,123,247,150, 2,232,220,146, 72,151, 46, 93,254, 68, 81,212,106,127,127,127,187, 17, + 35, 70, 32, 41, 41, 9, 11, 22, 44,224,244,122,125, 38, 0,132,135,135,247, 94,181,106, 21,155,154,154, 10,181, 90, 45,186,125, +251,246, 39, 93,186,116,177, 21,190, 91,206, 4, 0,255, 5,224,143, 58,147, 53, 5,192, 33, 0,125, 0,100, 0,152,212,129,177, +153, 13, 86,126,126, 62, 18, 18, 18, 16, 27, 27,139, 94,189,122, 65,167,211,129, 97, 24,179,185, 98, 24, 6,132, 16,139,151,210, + 50, 26,141, 56,119,238, 28,246,237,219,135,149, 81, 81, 80,169,234,254, 76,117, 58, 29,202,202,203, 33,149, 74,205, 38,172, 37, + 4, 65,248, 42, 43, 43,107,177,187,187,187,121,152,178,225, 16, 33, 0, 40,149, 74,240, 60, 15,131,193, 0,142,227,176,107,215, + 46,131, 32, 8, 95,181,164,107, 50,117, 52, 77, 99,201,146, 37,224,184,251,107,142,247,239,223, 31, 0,224,229,229,133,192,192, + 64,243,125, 83,134,202, 18,205,221, 67,250,161,182,193,179,125, 87,109, 6, 0,120,120,120,192,215,215, 23,110,110,110, 22,105, + 62,233, 48, 64,221, 65, 10, 77, 44,116,123,231, 78,209,198,189,241,159,108,102, 69,148, 40,124,176, 47,212, 18, 3,136,220, 17, +226,225,239,129, 56,120, 2, 0,132,178, 28,104,143,191,135, 41,129, 37,212, 62,142,254,122,245,104,111,231,152,239,178,155, 44, +174,163, 40,106, 80,183,110,221,144,148,148,132,238,221,187, 35, 58, 58, 26,126,126,126,144,203,229, 40, 44, 44, 68,117,117, 53, + 20, 10, 5,140, 70, 35,130,130,130,104,149, 74,245, 28,172, 52, 88,132,144,160, 89, 83,194, 66, 25, 59, 63, 12, 25,245, 12, 78, +236, 24,174,216,251,109,193,114, 66,200, 39, 13, 23, 71,125, 92,120,233,165,151, 80, 88, 88, 40,223,191,127,127,155, 77, 86, 88, + 88,216, 9,131,193, 48,178,181,231,201,100,178,255,252,244,211, 79, 35,172,213, 55,153,171,132,132, 4,133,131,131, 67,147, 87, +114,109,208,244,103, 24,230,231,233,211,167,219,237,223,191,255, 95, 65, 65, 65, 47, 63, 14, 38,139, 16, 50,184, 71,143, 30,184, +113,227, 6, 10, 11, 11,193,113, 28, 10, 11, 11, 1, 0,183,110,221,130,135,135, 7,212,106, 53, 60, 60, 60,208,187,119,111, 66, + 81, 84,152, 37,186,207, 61,247,220, 4, 0, 84, 78, 78, 14,138,139,139, 97,111,111, 15,133, 66, 1,119,119,119,140, 24, 49,130, +241,246,246, 30, 3, 43, 13,214,232,209,163, 39,202,229,114, 42, 47, 47, 15,185,185,185,224, 56, 14,153,153,153,176,183,183, 71, +120,120,184,200,219,219,123, 28,172, 52, 88, 0, 2,230,204,153, 83,212,208, 92,153, 80, 40, 20,196,215,215,183,204,193,193, 33, + 4,128,197, 6, 11, 64,192,130, 5, 11, 10, 55,108,216, 48, 44, 49, 49, 49,210,244, 96, 98, 98,226,187, 0,176,125,251,246, 36, + 71, 71,199, 16, 0,214, 24, 44, 8,130,192,207,156, 57, 51,139,101, 89,152, 54,147,113,221,188,121, 51, 40,138,178,183, 64,102, + 69, 70, 70, 70,127,165, 82,137,140,140, 12,208, 52, 13, 66, 72, 86, 65, 65, 65,127, 0,136,140,140,204,214,104, 52, 61, 53, 26, + 13, 38, 77,154, 68,198,142, 29,219,111,235,214,173, 81, 0, 30, 11,131, 69, 8, 25, 8, 96, 11,234, 10,128,163, 4, 65, 56,219, +193, 33, 61,128, 32, 8,133,132,144,103,113,223,100,165, 1,144,160,206, 92, 61, 43, 8, 66, 97, 71,197, 70, 8, 1,207,243, 96, + 24, 6,155, 55,111,134, 78,167,195,129, 3, 7,112,232,208, 33, 80, 20, 5, 66, 8, 8, 33,176,179,179,195,135, 31,126,104,190, +111, 9, 6,131, 1,123,246,236,193,123,145,145,102,115, 5, 0, 98,177, 24,174, 46, 46,232,228,228,132,156,156,156, 86, 13, 86, + 81, 81, 81, 76,114,114, 50, 90, 42,114,127,229,149,251, 35,172, 13,139,220, 45,137,147,166,105,112, 28,135,145, 35,239,159, 62, +230,207,159,111,190, 93, 94, 94,110,250,159, 0,177,240,224,105,154, 70,173, 0,188, 36,189,255,216,152,165, 75,205,183, 75, 74, + 74,154,213,108,206,139, 60,169,180,152,193, 98,135,230,109,191,126,138, 10,156, 60,238,153, 25,142,118, 50,240,247, 10, 32,126, +126, 21, 46,148,201,241, 65,124,221,185,112,241,164, 32, 4,140, 92, 7,238,147, 23, 48,194, 75,203,126,146, 42, 91, 6, 32,186, + 41, 61, 39, 39, 39, 39,131,193, 0,138,162,160, 80, 40,224,232,232, 8,153, 76,134,146,146, 18, 44, 92,184, 16,199,142, 29,131, + 86,171,133, 88, 44, 70,143, 30, 61,160,211,233,122, 90,123, 64,174,106,102,247,214,205,177, 14,165, 57,159, 33,229, 90, 5,228, +246, 30,136,154, 19,162, 94,181,227,124, 12,128,119,173,213,123, 20,244,237,219, 23,139, 22, 45,146,127,244,209, 71,109, 50, 89, + 6,131, 97, 45,195, 48, 67,150, 46, 93, 42,155, 52,233,183, 23,132,151, 47, 95,198,220,185,115,107,107,106,106,214, 91, 27, 91, +112,112,240, 16,150,101,143,237,222,189, 91, 97,111,111,143, 27, 55,110, 88, 43,209,148,166, 63,195, 48, 63,111,219,182,205,174, +103,207,158, 16,137, 68,210, 61,123,246, 60, 22, 38,203, 96, 48,116,147,203,229, 40, 41, 41,193,226,197,139, 31, 40, 80, 53, 13, +103, 3, 64, 70, 70, 6, 60, 60, 60,160,209,104,220, 45,209,117,116,116, 84, 11,130,128,217,179,103,227,230,205,251,222,196,221, +221, 29, 55,111,222,132,193, 96,112,180, 54, 86,181, 90,237,168,215,235, 49,124,248,112,104, 52, 26, 0,192,148, 41, 83, 32, 18, +137, 80, 84, 84, 4,157, 78,215,169, 21,137,166,112, 26, 59,118,108, 65,115, 59, 21, 10,133, 94,173, 86,123, 89,169,217,105,220, +184,113,249, 59,119,238, 28,223,120, 71,114,114,242,120,123,123,251, 68, 71, 71, 71, 95,171, 35, 5,120,137, 68, 2,137, 68, 2, +145, 72, 4,150,101, 33,145, 72,192,178, 44, 68, 34, 17,104,154,182,104, 92,133,231,121, 28, 61,122, 20, 20, 69, 61, 48,116, 17, + 29, 29,253,166,131,131,131,203,201,147, 39,205, 23,128, 85, 85, 85,240,241,241,233, 17, 30, 30,158,126,231,206,157,220,203,151, + 47,191,220,134,184,219,147,191, 3, 48,213,133,197, 1, 8,236,192, 88,154,164,222,100, 77, 6,112, 30,117,230, 74, 11, 96, 98, + 71,154, 43, 19, 38,131,101,250, 63,151, 74,165, 8, 10, 10, 50,155, 41, 66, 8,106,106,106,204, 67,132,150,158,244,239,222,189, + 11, 55, 55, 55,168, 84, 42,248,244,234,133,172,204, 76, 0, 48,223,102, 89, 22, 64,157, 17,107,137,250,153,128, 75,208, 66, 61, + 85, 91, 48,101,142, 24,166,229, 50,108, 55, 55, 55,240, 60,111, 50,150,173,101,176, 44,210,116,114,114, 66, 85, 85,149, 69,154, + 79, 58, 12, 0, 52,229, 24, 87,175, 38, 20,119,170,123,194,228, 49,161, 51,250,120, 40,192,149,228,128, 85,118, 2,113,240,194, + 7,241,199,113, 37,183,174, 52,234,131, 67,169,216,187,252, 69, 16,185, 35,220,106,175, 65, 37,149,188,140,102, 12, 86,105,105, +105,149, 78,167,115,148,201,100, 96, 24, 6, 98,177, 24, 37, 37, 37,120,255,253,247,113,240,224, 65,120,121,121,193, 96, 48,128, +101, 89, 20, 23, 23, 67, 44, 22, 91, 53, 59,145, 97,200,216, 85,139, 70,119, 87,116,234,133,210,212, 53,117, 15,218, 5, 97,206, + 20,154,253,199,190, 75,211, 9, 33,255, 16, 4,161,205, 69,186, 15, 11,165, 82,137,192,192, 64,188,250,234,171,242, 3, 7, 14, +124, 10,192,195,154,215,167,164,164,252, 18, 28, 28,252,194,150, 45, 91, 78,220,190,125, 91, 54, 96,192, 0, 40,149, 74, 40,149, + 74,228,228,228, 96,205,154, 53, 26,142,227,198,181, 37, 59,198, 48,204,158,153, 51,103, 42,236,236,236,144,147,147, 3, 71, 71, +171,125,192, 3, 4, 7, 7,251,139, 68,162,159,183,109,219,102,231,237,237,141,171, 87,175, 34, 56, 56, 24,174,174,174,210, 13, + 27, 54,116,184,201, 18,139,197,183,138,139,139,189,187,118,237,138,132,132, 4, 80, 20,133,130,130, 2, 68, 69, 69, 97,195,134, + 13, 8, 11, 11,131, 74,165, 66,215,174, 93,145,149,149, 5,169, 84,122,219, 18,221,252,252,252, 50, 0,157,143, 29, 59,134,226, +226,251, 45, 91, 60, 61, 61, 81, 86, 86, 6,142,227, 74,173,141, 53, 63, 63,191, 20,128, 75,122,122, 58,114,115,115, 49,106,212, + 40,124,253,245,215, 8, 9, 9,129,209,104,132, 94,175,183, 90, 19,128,145,166,233,102,191,244,234,175, 56,213, 86,106, 26, 90, +210, 68, 93,191, 41,107, 53, 33, 8,130,208,156,185, 98, 89, 22,173,188,167,137, 88, 63, 63,191,213, 61,122,244,232, 19, 21, 21, + 37, 98, 24, 6, 67,135, 14,237,189,108,217,178, 60,153, 76,214,233,189,247,222,147, 55,241, 26, 25,128,254,125,250,244, 81, 88, + 27,243, 67,160, 97,150,238,177,156,116, 66, 8,233,140,186,140, 31, 11, 64, 87,255,243, 11, 83, 77, 86, 7,198, 5,158,231, 33, + 22,139,177,106,213, 42,188,245,214, 91,112,113,113, 65,100,100, 36, 24,134, 49,111, 64, 93, 86,198,148,213,178, 4, 65, 16,224, +210,185,197,209,105,115,145,123, 75, 60,172, 54, 13, 38, 51,100, 73, 45, 84,131,108, 83,139,207,107, 15,205,167, 41,123, 5, 52, + 51, 68,104, 54, 87,163,130,103,248,121,200,144,150,122, 17, 1,174,122, 8, 34, 81,243, 74, 70, 61,136, 88, 1, 7, 25,211,172, + 57, 32,132,164,230,230,230,122, 58, 56, 56, 64,167,211,129,101, 89, 4, 4, 4,224,244,233,211,224, 56, 14, 90,173, 22, 18,137, + 4, 98,177, 24,151, 46, 93,130, 78,167, 75,178,244, 64, 8, 33,180,139,154,222,246,238,138, 53, 42,228, 39,192, 65,197,226,185, + 65,222,128,162, 15,232,234,107,216,178,114,156,227,155, 81, 95,127, 0, 11,234,101, 30, 53, 74,165, 18,121,121,121,248,252,243, +207,107, 56,142,155,222, 22, 13,147,201, 58,120,240,224, 9, 7, 7, 7, 89, 88, 88, 24, 50, 51, 51,177,126,253,122, 13,199,113, + 99,219, 90,223,101, 48, 24,222,216,181,107,215, 49,131,193,160, 48,153,139,182, 98,202, 92, 45, 92,184, 80,229,227,227,131,236, +236,108,216,219,219, 67,165, 82,161,123,247,238,112,115,115,147, 46, 92,184,176, 67, 77, 22,207,243,167,178,179,179,123,250,249, +249,145,222,189,123,131,101, 89,184,187,215, 37,169,250,247,239, 15, 63, 63, 63,136,197, 98, 0, 64,118,118, 54, 96, 97, 95,150, +159,126,250,233,223, 25, 25, 25,179, 66, 66, 66,104, 87, 87,215, 7,102, 39,109,216,176, 65,151,151,151,103,245, 50, 15, 63,254, +248,227,215, 23, 47, 94,156, 61,116,232, 80, 70,173, 86, 67, 34,145, 32, 32, 32, 0,110,110,110, 88,191,126,189,238,250,245,235, +109, 89, 58,226, 70,122,122,186,180, 87,175, 94, 77,142, 93, 40,149, 74, 21, 0,107, 51, 15,183, 82, 82, 82,196,131, 6, 13, 58, +242,221,119,223,249, 55,220, 17, 26, 26,122, 68,169, 84,218, 3,176,200,168, 54,130,111, 56, 52,216,112,168,144,101, 89, 48, 12, +211,106, 6,171,160,160,224, 27, 87, 87,215,255,115,113,113,249,101,240,224,193,246,231,207,159, 71,116,116,180,152,227,184,110, +137,137,137, 0,154,110,146, 40, 8, 2,170,171,171,165,191,217,241,232, 89, 12, 96, 43, 0, 57,128,200, 86,158,251,200, 33,132, +184,160,174,160,221, 23,117,195,130, 83, 80,103,182, 76, 53, 89, 29,106,178,120,158,135, 72, 36,130,175,175, 47,150, 44, 89,130, +141, 27, 55, 34, 34, 34, 2, 62, 62, 62,166,248,205, 53, 88,245, 51,222, 44, 58,241,139,197, 98,184,184,186, 66,175,215,155,179, + 87, 0,144,149,153, 9,134, 97,192,243, 60, 56,142,107,117,136,176,115,231,206,171, 55,109,218,180,112,244,232,209, 84,195, 25, +119,130, 32,152,219, 73, 52,220,244,122, 61,190,249,230,155,133, 27, 54,108, 0, 44,200,122,209, 52,141,254,253,251, 63, 48, 44, +184,125,251,253, 74,133,160,160, 32,132,135,135, 91, 53,219,143,166,105,248,174,218,252,192,176,224,255, 58,223,255,216,186, 78, +155, 3,159,245,219,154,212,124,218,134, 8,155,252,212,116,167, 61,215, 77,122, 49,112,134,159,187, 4,233,169,151,240,109,242, +237,107, 37, 37, 21,224, 11, 47,130, 47,190,138,197,147,130,208,199,203, 17,125,188, 28,177,120, 82, 16,248,162, 75, 16,202,115, + 32, 72,213, 40,170, 38,205, 14, 47,148,149,149,253,125,237,218,181,229,106,181, 26, 82,169, 20, 44,203,226,214,173, 91,232,219, +183,175,249,126,253,149, 39,162,163,163,139,139,139,139,227, 45, 61, 16,133,140,154,179, 49,106,170,139, 88,162, 2,202,146, 96, +103,167, 68, 66,252,102,128, 43, 0, 40, 22,127, 10, 15,164,221, 92, 28, 70, 16, 66,122,183,229,131,122,152,220,184,113, 3,171, + 86,173,170,169,173,173,253, 93,133,238, 41, 41, 41,191,232,116,186, 23,226,227,227,107,191,253,246,219,223,109,174, 76,154,122, +189,126,212,167,159,126, 90,125,227,198, 13, 40,149,202,182, 74, 65, 44, 22,191,103, 48, 24,236,182,110,221,202,143, 28, 57,210, + 56,111,222, 60,227, 27,111,188, 97,124,229,149, 87,140,225,225,225,198,185,115,231, 26, 57,142,147,200,229,242, 77,109,126,147, +223, 9,199,113,219,227,226,226, 52, 20, 69, 65,169, 84,130,101, 89, 56, 59, 59, 3,168, 51,194,166, 19,185, 78,167,195,142, 29, + 59,106,107,107,107, 63,176, 68,183,180,180, 52, 97,217,178,101,215, 79,156, 56,161, 55,205,242, 41, 40, 40,192,250,245,235,117, +241,241,241,249, 21, 21, 21, 31, 91, 27,107,101,101,229,158,119,223,125, 55,247,232,209,163,122,138,162, 80, 94, 94, 14, 7, 7, + 7,172, 95,191, 94,247,241,199, 31,231,223,187,119,207,106,205,103,158,121, 38, 59, 63, 63, 95,197,113,220,111,178, 63, 34,145, +136, 72,165,210, 80, 0, 63, 90,163, 25, 18, 18,146,157,155,155,107,183,110,221,186,147,225,225,225, 27, 85, 42, 85,166, 74,165, +202, 12, 15, 15,223,180, 99,199,142,255,212,107, 38, 90, 27, 43, 69, 81,102,131,101, 26, 42, 52,101,177,234, 51, 89, 22, 13, 17, +250,249,249,125,182,111,223, 62,251,204,204, 76, 84, 86, 86, 34, 45, 45, 13,169,169,169,230,161, 92,211,201,172,225, 6, 0, 53, + 53, 53, 50,107, 99,110,111, 4, 65,248,175, 32, 8,253, 5, 65,240, 22, 4,225,113,156, 36,115, 8,247,205,213,179,245, 51,207, +158,173,191,239, 15,224,223, 29, 21, 88,253,144,159,249, 98,103,234,212,169, 72, 76, 76,132,143,143,143,217, 84, 53,156, 69,104, +141,201, 48, 26,141, 8, 8, 8, 0,167,213, 62, 96,208, 25,134,129,179,179, 51,178,179,179, 97, 48, 24, 90,205, 96, 17, 66, 38, +143, 30, 61,154,186,124,249, 50,252,252,252,144,154,154,138,212,212, 84,164,165,165, 33, 61, 61, 29, 23, 46, 92,192,165, 75,151, +112,229,202, 21, 4, 7, 7, 35, 47, 47, 15, 47,190,248,162,169, 77, 67, 75, 88,149,109,178, 48,123,247, 48, 52,159,104,204, 67, +132, 13,127,186,168, 21,111,244,113, 99,144,158,126, 5, 71, 82,202,246, 18, 66, 29, 78,189,206,125,251, 98,143,123,208, 29,252, + 11, 2, 38,239,199,222,229, 47, 2, 0,248,162, 75,208,125,245, 58,136,220, 9, 89,149, 10,212,106, 43,154,189,106, 22, 4, 33, + 89,173, 86,127,185,111,223,190,153, 51,102,204, 96,121,158,135, 76, 38,195,219,111,191,109,238, 17, 66,211, 52, 34, 34, 34,170, +138,138,138,182, 10,130,144,109,201, 65, 16, 66,100,238,206,236,202,215,102, 71, 75,113,115, 39, 64,137, 81,130, 1,232, 63,108, + 38,138,114, 79, 3,213, 87, 0, 34, 70,252,223,102, 57,141,127,227, 31, 31, 3,248,159,223,251,193,181, 23, 87,175, 94, 69, 76, + 76,204,239, 54, 87, 38, 76,153,172, 35, 71,142,124,202,113,220,236,118,212, 28,181,113,227,198, 99,157, 59,119,110,243,176,136, +187,187,251,180,146,146,146,153, 22, 60,181,195,134, 58, 82, 83, 83, 83, 7, 13, 26, 20,183,117,235,214,136, 69,139, 22, 73,101, + 50, 25,236,236,236,144,145,145,129,110,221,186, 1, 0,106,107,107,177,124,249,242, 90,189, 94,191,247,220,185,115,167, 45,209, + 21, 4,129, 39,132,188, 54,119,238,220, 89,189,123,247, 30,207,243,124, 39,173, 86, 91,154,151,151,119,244,222,189,123,109,234, +131, 85,175,249,234, 91,111,189, 53,163, 87,175, 94, 19,117, 58, 93, 39,131,193, 80,122,243,230,205, 35,149,149,149, 9,109,209, + 60,117,234, 84,241,238,221,187,115,238,220,185,211,215,205,205,237,174,189,189,189, 86,171,213,210, 74,165, 82,197,178,108, 48, +128,211, 0,174, 88,163,121,238,220,185,194,248,248,248, 92,142,227,122,239,218,181, 43, 73,161, 80,252, 64, 8, 33, 98,177, 88, +173, 80, 40,158, 3,112, 18, 64,150,181,177, 82, 20,197, 55, 52, 84, 13,179, 88, 98,177, 24,132, 16,139, 12, 86,118,118,246, 47, +107,215,174,237,215,163, 71, 15,196,199,199,151, 41,149, 74,213,196,137, 19,153,187,119,239, 18,160,249, 12, 86,109,109,237,227, +144,193,122,220, 41, 69, 93,150,119,130,169,230,170, 65,225,251, 33, 0, 21, 29, 25,156, 32, 8, 15, 24,169,110,221,186, 61, 96, +170, 26,238,179,198, 96, 25, 12, 6,136,197, 98, 48, 12, 3, 87, 55, 55,179,153, 19, 4, 1,153, 89, 89, 40, 47, 47, 55,183,105, +104, 9,138,162,104, 66, 8,254,252,231, 63, 91,244,190, 83,167, 78,197,201,147, 39,209,218,112, 98,195, 25,127, 94, 94, 45,151, + 84,154, 12, 19, 69, 81, 22,207, 34,244,240,104,185,202,165, 57,205,198, 94,228, 73,167,201,106,180,130,178,154,117,187,255,149, +182,188,160,210,112, 88, 50, 56,111,201,170, 85, 16,150, 63,239,117,194, 67,193,190,208,135,202, 7,247,241, 80, 16,187,186,147, +141, 80, 85, 0,162,112, 69,185,168, 27,190, 73,189,115,135, 18,209, 45,102, 31, 42, 42, 42, 22,127,248,225,135,244,177, 99,199, + 38,199,198,198, 58,248,250,250,226,181,215, 94,131, 86,171,197,133, 11, 23, 48,119,238,220,178,226,226,226,157, 21, 21, 21, 27, + 45, 61, 8, 39, 59,230,253, 15, 86,188,208,137,226,171,128,202, 20,128,177,135,147,163, 10,191,158, 79, 2,238,158, 7, 40, 49, + 64,177, 8, 25,224,135,254,254,222,126,132,144,161,130, 32,252,108,213, 39,245,144,120,243,205, 55,219,205, 92,153, 72, 73, 73, +249, 5, 64,143,246,210, 51,105, 6, 7, 7,143, 90,186,116,233, 49,158,231,155,170, 75,105,149,175,190,250,202, 8,160, 93, 90, + 60, 60, 76,244,122,253,242,203,151, 47, 99,254,252,249,111,189,254,250,235, 50, 95, 95, 95,120,122,122, 34, 51, 51, 19, 25, 25, + 25,136,139,139,211,240, 60,159, 80, 81, 81,241,142, 53,186,245, 61,169,118,214,111,237, 66,125, 51,209, 79,234,183,118, 97,214, +172, 89, 23,179,178,178,202,220,221,221,195,104,154,238,135,186, 70,145,183,235,223,195,106, 35, 4, 0,115,231,206, 77,207,201, +201, 41,113,117,117, 13, 19,139,197,222,245,154,249, 0, 18,218,168, 89,250,235,175,191,122,135,134,134,242, 52, 77, 11, 34,145, + 72,168, 63, 25, 10, 12,195, 8,132, 16,225,248,241,227, 82, 0,173,214, 92,222,186,117,107,225,222,189,123, 5,165, 82, 25, 86, + 85, 85,245, 26,128, 79,107,107,107, 67, 43, 42,234,206,253,205,117,226,214,104, 52,146, 54,196,253,135, 66, 16,132,151,154,121, +188, 16,192,208, 71, 28, 78,147,172, 93,187, 22, 59,119,238, 68,107, 29,200,143, 28, 57, 2,180, 50, 68,104,250, 91, 49,213, 87, +105,181, 90, 92,190,124, 25,132, 16,243,253,134, 77, 70,141, 70, 99,139,157,222,121,158, 55,106,181, 90,124,249,229,151, 22,153, +172,207, 63,255, 28, 26,141, 6, 60,207, 91,244, 61, 91,223,152, 20,229,229,229,230,214, 9, 65, 65, 65,230,253, 58, 93,139,141, +235,155,213,244,245,245, 69, 73, 73, 9,156,156,156, 0,212, 13, 11,154, 48, 84,183,216,247,247,169,130,180,244,203,109,200,234, +103,189,236, 53, 12,245,175, 64,119,254,217, 16, 79, 9,156, 28,164,160, 69, 18, 84,106, 8, 46, 23,104,240,243,149,202,155, 70, +131, 48,110,253, 15,215, 45,106, 16, 71, 8, 25,228,230,230,182,194,104, 52,250, 83, 20, 37, 23, 4,161,138,166,233,180,130,130, +130,213,130, 32, 92,178,230, 32, 28, 84,116,150, 90, 65,219,139, 88, 86, 48, 26,120, 0, 20, 64, 81, 0,161, 0,208,245, 63,235, +238,215,214,234,196, 70,158, 28, 46, 44, 46,105,178, 97,224,163,100,216,176, 97, 39,170,171,171,159,184, 78,238, 50,153, 44,134, +166,233,167,182,147,187,137,129, 3, 7,134,200,100,178, 21, 60,207, 15,212,104, 52,174, 50,153,172,144, 16,114,254,222,189,123, +127, 75, 75, 75, 59,211,209,241,253,145,105,207, 78,238,141, 49, 45,246,236,228,228,212,235,215, 95,127,149, 54,204, 96, 53,252, +190,180,102, 86,153,141,199,143, 62,125,250,156,253,236,179,207, 66,186,117,235, 70,153, 10,174, 41,138, 50,111,166, 97, 44, 83, +182,229,204,153, 51,134,121,243,230,157, 78, 79, 79, 31,214,156,166,143,143,207,137,196,196,196,145, 13, 51, 84, 38, 35,213,248, +182,209,104, 68, 77, 77, 13, 98, 98, 98,190,207,202,202,106,114,169, 28, 63, 63,191,173, 43, 87,174, 92, 56,102,204, 24,138,162, +168,223,212, 92, 53,174,195,210,233,116, 56,124,248, 48,191,103,207,158,109, 87,175, 94,109,182, 6,107,192,128, 1, 55,211,210, +210, 60, 76, 45, 19, 26,111,141,103,212, 2,192,160, 65,131,110,159, 61,123,182,217,255,183,135,161,249,164, 99,177,193, 2,234, +102, 16, 69,142,240,156, 66, 64, 77,166, 8, 31, 0, 66, 88, 94, 64, 6, 1, 78,176, 82,237,142,152,111, 10,106, 27, 61, 63,160, +189, 59,242,218, 52,109,154, 29,161, 73, 8,161, 4, 11,150,158,233,232, 56,109,154,237,167,233,227,227,147,149,149,149,229,221, +130,142,217, 96, 61,109,199,254, 71,208,116,118,118, 86, 56, 59, 59,255, 64, 81,148,167,201, 68, 55,247, 19, 0,120,158,207, 45, + 44, 44,124,190,176,176,176,166, 57, 77, 15, 15,143,158, 82,169,244,159, 60,207,135,182, 86, 95, 36,212, 45, 21,147,172,209,104, +230, 53, 92,236,185,161,102,123,205, 34,108, 28,167,191,191,127,118,114,114,114, 79,153, 76,246, 64, 93, 97,227, 99, 54,113,253, +250,117, 76,156, 56, 49, 47, 61, 61,221,171,193,243,218, 93,243,105,195,170,181, 8,133,186, 79,236,203,250,205,134,141, 63, 12, +150,152, 43, 27, 79, 23,181,181,181,229,206,206,206, 85, 26,141, 70,196,113,156,200, 96, 48, 60,112,130,147,201,100,197,205,189, +214,198,227, 79,125,102,211,162, 70,193,150, 82,111,148,154,204, 70,181,133,135,213, 7,171,188,188,124,220,192,129, 3,143, 51, + 12, 35,105,108,126,154, 50, 67, 70,163, 81, 83, 90, 90, 58,234, 81,107, 62,233, 88,189,216,179, 13, 27, 54,108,252, 17,200,207, +207,111,215,147,175, 13, 27,143, 11, 5, 5, 5, 25, 0, 60, 31,119,205, 39,157,167,123, 41,107, 27, 54,108,216,176, 97,195,134, +141, 14,192,102,176,108,216,176, 97,195,134, 13, 27, 54,218, 25,155,193,178, 97,195,134, 13, 27, 54,108,216,104,103,108, 6,203, +134, 13, 27, 54,108,216,176, 97,163,157,249,127,251,242,228,233,243, 39,139,130, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130, 0}; diff --git a/source/blender/editors/datafiles/prvicons.c b/source/blender/editors/datafiles/prvicons.c index 2a470e056cf..2c606230345 100644 --- a/source/blender/editors/datafiles/prvicons.c +++ b/source/blender/editors/datafiles/prvicons.c @@ -1,304 +1,409 @@ /* DataToC output of file <prvicons> */ -int datatoc_prvicons_size= 9534; +int datatoc_prvicons_size= 12878; char datatoc_prvicons[]= { -137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0,192, 0, 0, 0,192, 8, 6, 0, 0, 0, 82, -220,108, 7, 0, 0, 0, 1,115, 82, 71, 66, 0,174,206, 28,233, 0, 0, 0, 6, 98, 75, 71, 68, 0,255, 0,255, 0,255,160,189, -167,147, 0, 0, 0, 9,112, 72, 89,115, 0, 0, 11, 19, 0, 0, 11, 19, 1, 0,154,156, 24, 0, 0, 0, 7,116, 73, 77, 69, 7, -217, 3, 14, 12, 53, 26, 8,211, 40, 12, 0, 0, 0, 29,116, 69, 88,116, 67,111,109,109,101,110,116, 0, 67,114,101, 97,116,101, -100, 32,119,105,116,104, 32, 84,104,101, 32, 71, 73, 77, 80,239,100, 37,110, 0, 0, 32, 0, 73, 68, 65, 84,120,218,237,125,123, -120, 20, 85,182,239,175, 30, 93,213,121,116, 58, 47, 72, 32, 64,194, 0,137,134, 16, 68, 6, 6, 66, 8,207,235, 1,230,160,131, -115,124,220, 17,189,119,230,206,225, 19,207,232,204,248, 64, 16,197,232,213,113, 12,160,163, 40,122, 70, 4, 6,225,115,102,206, -209, 15,225,158,163, 3,142,142, 56, 38,228, 33, 4, 3, 73, 32, 60, 66, 72, 32,129,188, 31,221,233, 71, 85,221, 63,160,234, 84, - 63,211,143,170,238,228,176,127,223,215, 95, 63,170,171,123,213,174,223, 90,123,173,181,215,222, 27, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,184, 14,234,102,186,216, 89,179,102,165,139,162,120, 24, 64,158, 94,255, -193,113, 92, 91, 89, 89, 89,186, 30,191, 61,121,242,100, 62, 41, 41,105,142, 32, 8, 38,189,228, 55, 24, 12,182,242,242,242,195, - 55, 11, 39,216,155,133, 64, 55,100,255,242,181,215, 94,227,138,138,138, 80, 85, 85,133,140,140, 12, 24,141, 70, 48, 12, 3,138, -162, 64,211,244,127, 89, 6,138,242,251, 90,253,153,252,222, 98,177, 96,233,210,165,105,122,145, 63, 49, 49,113,238,150, 45, 91, -232,162,162, 34, 28, 59,118, 12, 25, 25, 25,224, 56, 14, 44,123,253, 54, 50, 12,227,243,124,127,199,100,216,237,118, 44, 92,184, -144,191,153,140, 34, 27, 44,129,182,110,221,202, 45, 88,176, 64, 33, 16,207,243, 96, 24, 6, 52, 77,123,144, 99, 40,226,184,191, -214,139, 64,178,236, 91,182,108,225,139,138,138, 38, 2, 64, 85, 85, 21, 6, 7, 7,145,144,144, 0,150,101,149,107,144,175,195, -215,195,223,241, 11, 23, 46, 64, 79,242,191,250,234,171,116, 81, 81, 81, 44, 0, 84, 84, 84, 32, 47, 47, 15,137,137,137,138,252, -106,146,203, 74,225, 78,126, 95,159, 51, 12,163,155,252, 35, 94, 1,212, 4, 90,176, 96,193, 68, 0, 40, 47, 47, 71, 94, 94, 30, -204,102,179, 79, 2,185,147,101,168, 99,231,207,159,215,203,237,249,114,243,230,205,252,194,133, 11, 39,202,159,211, 52, 13, 81, - 20, 93, 20,208, 31,185, 3, 85, 12, 61,201,191,120,241,226,216, 64, 44,122, 40,228,191, 89,193,134, 74, 32,134, 97, 32, 73,146, - 79, 2, 5, 75,126,249,181, 30,228, 47, 41, 41, 49, 46, 90,180, 40,203,151, 75, 16, 14,249,245,146,221, 31,249,221,201,172,190, -158, 80,201,239,254,123, 68, 1,194, 32, 80,168,228,215,146, 68,106,217, 23, 47, 94,156,229,205, 39, 14,150,224,129, 28,139, 4, -249, 3, 33, 49, 33,127,152, 10, 16, 40,129,100,119, 34, 88,242,251,250, 94, 36,200, 47,223,116, 57,232,213,138,252, 90,201, 63, - 20,249,229,246,247,229,186,132, 74,254,155,209, 21, 98, 67, 37,144,193, 96, 8,217,210,235,233, 2,169, 93, 54,247, 94, 75, 13, -158,247, 76,118, 4,235,239,235,161, 0,129,144,223,151,252,196,242,107,160, 0,129, 18,136,227, 56,175,228, 9,135,252,234, 52, -100,184,217, 30,117,188, 2, 0, 54,155, 13,141,141,141,104,106,106, 66,103,103,167, 75,250, 51, 92,171,175,149,252,254,200,111, -179,217,112,225,194, 5, 52, 53, 53,161,171,171, 11,177,177,177, 30,100, 15,135,252, 55,107, 32,204, 6, 67, 32,249, 6,116,118, -118, 34, 38, 38,198, 37,127, 30,109,242, 3,128, 40,138,135,111,228,249, 39,138,162,136,150,150, 22,212,213,213,225,244,233,211, -104,111,111, 71, 66, 66, 2,146,147,147, 97, 54,155, 97, 50,153, 60, 20, 32,220, 88, 32, 92, 36, 37, 37,205,185,145,231,143, 21, - 4, 1, 45, 45, 45,168,175,175, 71, 67, 67, 3,218,219,219, 97, 50,153,144,148,148,132,196,196, 68,152, 76, 38,176, 44,235, 65, -252,112,200,127,211,187, 64,162, 40, 30,190,145,231, 87, 8, 84, 91, 91,171, 16,200,100, 50, 33, 57, 57, 25,137,137,137,136,139, -139,115,201,255,135, 75,126,141, 92,136,188,220,220, 92,108,223,190, 29, 13, 13, 13, 96, 24, 6,105,105,105, 72, 73, 73,193,216, -177, 99,149, 65, 35,142,227, 96, 52, 26, 21, 2, 13,149,255, 15,230, 88, 56, 16, 4,193,148,155,155,139,183,223,126, 27,231,207, -159, 7,195, 48, 24, 53,106, 20, 82, 83, 83,145,159,159, 15,150,101,193,243, 60, 56,142, 83,198, 95,124, 89,125, 66,254,208, 92, -160,188,169, 83,167,226,173,183,222, 66, 67, 67, 3, 88,150, 69, 90, 90, 26,146,147,147, 49,109,218, 52,133, 64, 60,207,195,104, - 52,194, 96, 48,128,101, 89,205,200,175,133, 21,237,235,235, 67,124,124, 60,138,138,138,144,152,152,168, 4,233,234, 96,221, 96, - 48,120,144,200, 23,201, 35,157, 5,234,237,237,133,201,100, 66, 97, 97, 33,146,146,146, 60,200, 45,203,203,243,188, 34,191,183, - 94,128,144, 63,196, 24,160,183,183, 23,113,113,113, 10,129,220, 51, 61, 52, 77, 43, 74,192,243,188,242, 62,216,108,143,175, 99, -225, 34, 46, 46, 14,249,249,249, 16, 4, 65,137, 77,212,207, 52, 77,131, 97, 24, 24, 12, 6,229,217, 91, 15, 16,106, 32, 28, 46, - 18, 18, 18, 48,125,250,116, 69,126, 95,153, 31,119,242, 19,183, 71, 35, 5,144, 9,228, 62, 74,170, 38, 16,203,178, 10,113, 56, -142,115, 33, 80,184, 46, 81,216, 23,116,195,197,145, 36,201, 43,249,229,255, 83, 91,126,173, 98, 1, 45,228,151,173,187,211,233, - 28,146,180, 90,146, 95,118, 7,111,122, 5,144,173,187, 40,138, 30, 55, 86, 38,250,147,123,175,225,211,138, 86, 8,162, 20,210, -159,246,239, 95,161, 91, 26, 84,125, 35,101, 37, 80, 63,220, 7,192,130,177,252,145, 8,132,189,213,245,248,203,238,120, 35,127, - 32,113,129,191,239,220,244, 10,160,190, 1,238, 55,153,166,105,252,105,195,237,232, 24, 0,254, 87, 73, 37,190,172,190,170,156, -219,189,255, 71, 48,199, 25, 92,126,175,173,107, 16,223,157,239,193, 75,251,234,112,164,230,154,223,148,169, 22, 80,187, 82, 90, -167, 56,135, 74,127,106,117, 13,129,100,117, 66, 33, 54, 33,191, 39,104, 95, 4,146,173,139,252,144, 3, 94,134, 97,208,209,209, - 1,214,217,131, 23, 30,204,113, 57,183,179,163, 3,237,237,237,232,232,232, 64,103,103, 39,186,186,186, 16,195,216, 49,239, 86, - 19, 62, 47, 41,196,242,217,233,126, 7,156,180,136, 1,180, 28,213, 13,134,252,122, 21,195, 69,138,252, 55,107, 44,224, 83, 1, -134,242,221, 69, 81, 68, 70,162,251,205,242, 78,104, 65, 16, 96,183,217,240,220, 3,183,250,253, 15,173,160, 21,249, 3, 77,143, -234, 85, 16, 71,200, 31, 5, 23,200, 87,208,232, 77, 17,226, 88,215, 27,206,120, 33,132,250,253,237,147, 76, 88,124,219,104, 93, -201,239, 79,126, 45, 21, 67,175, 58, 32,119,191, 62, 28,242, 7, 26, 71,144, 44, 80,144, 46,132,175,238,158,166,135,174,243, 57, -252,234,124, 8,130,160, 43,249,135,122,232,161, 24,122,129,144, 63, 10, 61,128,123, 16, 25,232,192, 21,195, 12,237, 58,233, 73, -126, 95,242,235, 29, 11, 16,242,255, 55,139, 1, 66, 29,184,162,189,156,247, 96,201, 49,175,196,209,139,252,122,184, 60,145, 38, -191, 58, 11, 71,200, 63, 76, 98,128, 64, 6,174, 24,198,245,152,213, 46,226,179,170,171, 17, 35,191,187,252,122,250,251,122, 90, -126, 45,130, 89, 66,126, 13, 99,128, 64,235,247,153, 27, 89, 19,135, 32,161,165,221,138,205,255,126, 14, 22,155, 16,113,242,171, - 21, 64,175, 64, 56,146,196, 39,228,143, 98, 12, 16, 76, 9,115,194,221,159,249, 37,165,222,228, 15, 38, 11, 20,205, 73, 47,129, -248,253,132,252, 81,238, 1, 2, 73,131,186,147, 65, 58,124, 15, 0,192,238, 20,113,233,170, 5,191,249,176, 30, 59, 63,187, 16, - 81,242, 7,146, 9,138,102,173, 79,168, 10, 65,200, 31,161, 32, 56, 80,203,239,141, 16, 86,171, 21, 54,155, 13, 16,157,200, 28, -109,196, 27,143, 76, 71, 44,207, 16,242, 19,242,143, 60, 5, 8,165,126,223, 93, 49, 98,121, 6, 63,252,193,152,136, 95, 20, 33, - 63, 33,127, 84,210,160,222,206,251,243,115,115,163, 78,254,112,102,124, 17,242,223,164,105,208, 80,234,247,189, 29, 83, 47,158, - 21, 13, 37, 8,135,248,209, 32,127, 48,196, 38, 19,220,117, 10,130, 67,157,194,168,231, 18,129,161, 40, 0, 33, 63, 65,216, 49, - 64, 80, 35,193,132,252,218, 90, 39, 66,254,232,198, 0, 67,145,191,215,226,116, 57,215,253,125,212, 46,106, 4,147, 95, 38, 53, - 33,127,148,123,128, 64,252,255, 51, 45, 3, 46,231,213, 94,236,141,250, 5,133, 90,219, 79, 44, 63, 81, 0,175, 22,212, 23,249, - 47,180, 90,240,236,238, 90,151,243,214,191, 95,131,186,166,225,167, 4,129, 16,127,184,144,223, 23,177, 9,249, 35, 24, 4, 15, - 69,254, 5, 79,126,141,163,117,157, 30, 63,246,117, 77, 59,166,254,252, 16,242,191,103,198,161,223, 22, 97,116, 34, 31,117, 5, - 32,228, 39, 8, 74, 1, 2,201, 4,149,189,185,100,200, 31,142, 70,250,147,144,159, 64,147, 30, 96,168,165, 66,228, 37, 83,134, -173, 95, 23, 0,241, 35, 89,158, 17,174, 34, 16,242, 71, 33, 8,142,196, 58,254,145, 12,130, 9,249, 9, 2, 82,128,145, 76,254, - 64,148,128,144,159, 32,172, 24, 96,184,195,110,183,227,236,217,179, 94,253,124,189,201,111, 48, 24,194,254, 13,167,211,137,134, -134, 6,175, 10,160, 55,220,247,124,184, 41, 21,192,225,112,224,220,185,115, 81, 9, 22,195, 37, 16,207,243,109,243,231,207, 79, -139,102,131,242, 60,223, 22,234,185, 49, 49, 49,182,130,130,130,168,238,211, 27, 19, 19, 99,187,153, 20,192,133,213, 5, 5, 5, -173, 54,155, 45,234, 4, 42, 45, 45, 77, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,129, 38, - 8, 42,185,127, 99, 31,225,195, 0,242,244, 18,136,227,184,182,178,178, 50, 93,210,160,179,102,205,202, 23, 69,177, 28,128, 81, - 71,249,197,178,178, 50, 70, 39,249, 71,122,251, 15, 59,249,217, 32,133,255,242,198, 62,194,168,170,170,194,184,113,227,192,243, -188,178, 85,170,251,128, 89,176,175,173, 86, 43,150, 44, 89,146,166, 35,249, 43,183,110,221, 74,233, 44, 63,173, 35,121,148,246, -175,172,172, 68, 70, 70,134,135,252,190,228,243, 54,127,219,253,243,190,190, 62, 44, 95,190, 60, 77, 79,249,111,108,100, 62,108, -248,195, 6, 35,252,150, 45, 91,248, 5, 11, 22, 76, 4,128,170,170, 42,216,108, 54,152,205,102,101,235, 36,127, 19,105, 2, 41, - 83, 62,127,254, 60,244, 36,255,230,205,155,233, 5, 11, 22,176, 35, 80,254,116, 81, 20,191,220,188,121,179,210,254,229,229,229, -152, 58,117, 42, 18, 18, 18,188,202, 31,202,242,143, 23, 46, 92,208, 85,254, 45, 91,182,240, 69, 69, 69,195,138, 63,108, 48,194, - 47, 92,184,112,162,114, 34,203,186,212,252, 7, 34, 96, 36,118, 89,244, 71,254, 69,139, 22,177, 35, 80,254,116, 81, 20,191,124, -245,213, 87,249, 69,139, 22, 41,237,207, 48,140,178,149,173, 86,107,159,234, 77,254,225,200, 31, 54, 64,203, 99, 92,184,112, 97, -150,250,152, 92, 88,230,190, 21,105,184, 59,174,235, 65,254,146,146, 18, 23,242,143, 32,249,101,242, 27,151, 44, 89,226,209,254, -238,174, 64,160,147,128, 34,181,240,239, 72,224, 15, 29,136,240,139, 22, 45,202,242,208,156, 27,126, 91, 32,141, 31, 76,119,166, - 7,249, 23, 47, 94,204,142, 64,249,125,146, 95,238, 1, 2,149, 63, 26,171,224,141, 20,254,176,161, 8,175,190, 0, 45,133,215, -234, 6, 12, 69,254, 17, 32,191, 95,242,123, 35,144, 22,228,215,170, 92, 60, 16,254, 28, 56,112, 0,102,179, 25, 70,163, 17, 44, -203,186,244,104,238,138,225, 45,104,151,229,125,250,233,167,181, 85, 0, 55,159, 45,203,215,137,114,233,178,183,110, 56, 28, 82, -233,229,243,123,147,223, 91,214, 97, 24,200,175,248,252,190,200,175,110,127,111,132, 9,101, 85, 12,173, 98,152, 64,249,115,223, -125,247, 33, 35, 35, 3,102,179, 25, 28,199,193, 96, 48, 40,189, 90, 36,219,159, 13, 36, 96, 1, 0,155,205,134,198,198, 70, 52, - 53, 53,161,171,171, 75,209,220, 96, 27, 93,207, 46,216, 31,249,189,201,207, 48, 12,174, 94,189,170,108, 6, 62,126,252,248, 33, -229, 60,119,238,156,226,187,222,122,235,173, 90,203,175,100,123,212, 1,175, 44,255,133, 11, 23,112,241,226, 69,180,183,183, 35, - 38, 38,198,107,230, 39, 28,242,107, 37,191, 55,254,244,247,247,163,186,186, 26,199,142, 29,195,201,147, 39, 49, 48, 48,128,184, -184, 56,151, 13,216, 3,181,252,234, 9, 78,235,215,175,215, 78, 1, 68, 81, 60,124, 35, 79, 59, 81, 20, 69,180,180,180,160,190, -190, 30,167, 79,159, 70, 71, 71, 7,226,227,227,145,146,146, 2,179,217,140,132,132, 4, 69,232, 64,211,111,122,103, 81, 68, 81, - 44,191,145,231,103, 3,149,191,170,170, 10, 63,254,241,143,113,240,224, 65,165, 87,240,230, 87,202,159,151,150,150,226,167, 63, -253, 41,118,237,218,133,220,220, 92,173,229, 63,124, 35,207, 63, 81, 20, 69, 52, 55, 55,163,174,174, 14,245,245,245,104,111,111, - 71,124,124, 60,146,146,146,144,148,148,132,184,184, 56, 15,139, 25, 77,242, 7,195,159,229,203,151, 35, 41, 41, 9, 38,147, 9, -177,177,177,202, 88,128, 47, 62, 69, 50, 11,148,151,155,155,139,237,219,183,227,236,217,179, 96, 24, 6,163, 71,143, 70,106,106, - 42,198,142, 29, 11,142,227,192,178, 44,120,158, 87,122, 0,117, 47,160,197, 70,116, 97,194, 56,117,234,212,160,228, 63,118,236, - 24,142, 31, 63, 14,138,162,144,158,158,238,211,250, 40, 75,194,148,149,161,180,180, 20,146, 36,225,231, 63,255,185,214,242,231, -229,230,230,226,173,183,222, 66, 67, 67, 3,104,154, 86,228,207,203,203, 83,172, 37,207,243,136,137,137, 81,222, 15,163, 93, 47, -125,242,231,155,111,190, 1, 69, 81,202, 70,224, 44,203, 42,110,143, 58, 6, 8,196,242,171,123,128, 13, 27, 54,132,213,254, 30, - 62,114,127,127, 63, 76, 38, 19, 22, 44, 88,128,196,196, 68, 23, 63, 83, 94, 94,208, 96, 48,192, 96, 48,128,231,121,208, 52,173, -108,235,169,133, 59, 20, 46,130,149,191,178,178, 82,249,206,209,163, 71, 21,247, 70,126,200,239,213,159,203,175,245,144,191,175, -175, 15,177,177,177, 40, 44, 44,132,217,108,246, 32,128, 76, 24,142,227,192,113,156,210,246,129, 14, 34,233, 29,195,248,106,255, -181,107,215,122,180,191,209,104, 84, 94,187, 43, 65,164,248,227,161, 0,113,113,113,152, 62,125, 58, 4, 65, 80,114,180,234,220, -173, 76,120,131,193,160, 92,140, 63, 95, 52,216,207,195, 69,176,242,159, 59,119, 14,205,205,205, 24, 55,110, 92, 80, 36, 53,153, - 76,186,200, 31, 27, 27,139,105,211,166, 65, 20, 69,143,129, 34,185,205,100,249,213,214, 83, 62, 22,110, 76,160, 87,251,255,254, -247,191,247,112, 39,101,222,248,202, 0,249,139, 7,228,199,198,141, 27,181, 85, 0,185,107, 82,167,217,188,237, 28,175,182,252, -222,172,191, 32, 8,104,105,105,193,165, 75,151,208,218,218,138,246,246,118,116,117,117, 97, 96, 96, 0, 91,183,110,213,237, 6, - 4, 43, 63, 0,133,252,197,197,197,160,105, 26, 5, 5, 5,200,205,205, 69, 74, 74, 10, 58, 58, 58, 80, 91, 91,139,210,210, 82, -136,162,136,226,226, 98,152, 76, 38,159, 89, 23, 45,228,231, 56,206,101,241, 49, 95,139, 21,171, 13,207,156, 57,115,208,214,118, -125, 62,126,122,122, 58, 42, 43, 43, 67, 42,141,208,171,253,127,245,171, 95, 5,197,159,168,100,129,228, 1, 22,121, 57, 14,111, -221,188,250, 61,195, 48,232,237,237, 69, 83, 83, 19,174, 92,185,130,107,215,174,161,171,171, 11,189,189,189,176, 88, 44,232,237, -237, 69, 79, 79, 15,186,187,187,209,211,211,163,188,126,237,181,215,116, 27,132, 9, 86,126,247,209,201,135, 30,122, 8,153,153, -153,202,103, 99,198,140,193,152, 49, 99, 48,121,242,100,236,217,179,199,229,251,122,200, 47,251,199,178,187,229,111,165,110,153, - 72,221,221,221,200,202,202, 66,125,125, 61, 0, 96,249,242,229,232,237,237, 69,114,114,114,196,199, 0,124,181,255,182,109,219, -188, 38, 22,220,173,251,186,117,235, 34,186,119,179,135, 2,200,141,170, 30,110,247, 39,200,203, 47,191,236, 65,240,158,158, 30, -244,245,245, 65, 20, 69, 36, 36, 36, 96,202,148, 41,152, 57,115, 38,178,179,179,241,194, 11, 47,232,122, 19,130,149, 31, 0,218, -218,218,144,150,150,134,130,130, 2, 23,242, 83, 20,165,184, 33,153,153,153, 40, 40, 40, 0,112,189,234, 48, 38, 38, 70, 23,249, -229,223,241, 70,126, 81, 20,241,248,227,143,227,242,229,203,120,241,197, 23,145,151,151, 7,154,166,209,211,211,131,185,115,231, -226,210,165, 75, 74,111,208,221,221,141,148,148, 20, 80, 20,133, 83,167, 78, 97,221,186,117,152, 48, 97, 2,222,125,247, 93,151, - 49, 16,173, 51, 65,190,218,255,241,199, 31,215,101,224, 49,220,246,247,187, 71, 88, 32,130,236,221,187, 23, 52, 77, 99,252,248, -241,152, 50,101, 10,230,205,155,135, 41, 83,166, 32, 59, 59, 27,217,217,217, 74,102, 69, 62,199,151, 2,104,185,104, 85,176,169, -191,180,180,235, 21,180,185,185,185, 30,131, 75,106,200,199, 99, 98, 98,188, 22,112,105, 37,187,175,209,221, 39,158,120, 2, 51, -103,206,196,139, 47,190,136, 13, 27, 54, 32, 61, 61, 29,171, 87,175,198, 31,255,248, 71,204,153, 51, 7,253,253,253,160,105, 26, -185,185,185,216,181,107, 23, 86,175, 94,141,125,251,246, 65, 16, 4,236,217,179, 7, 31,127,252, 49,214,174, 93,139,247,223,127, - 95,215, 82, 14,138,162, 80, 83, 83, 3,150,101, 49,109,218, 52, 77,139,221,180, 54,158, 67,238, 20, 31, 72,212,125,233,210, 37, - 24,141,198,128, 9,167,247,114,133,193,202, 47, 35, 37, 37, 69,121,237, 30, 64,187, 31,119,143, 41,180,132,175,118,148, 45,191, - 40,138,216,177, 99, 7,254,246,183,191, 97,211,166, 77, 88,179,102, 13, 86,172, 88,129,227,199,143,131,166,105,220,117,215, 93, - 72, 72, 72,192, 7, 31,124,128,181,107,215, 34, 53, 53, 21, 3, 3, 3,184,243,206, 59,113,224,192, 1,221, 75, 57,104,154, 6, -207,243,184,229,150, 91,192,178, 44, 4, 65,208, 44, 77,174,181,241,244,187, 83,124,160, 89, 27, 95,228,247,213,192,122,146, 63, - 20,249, 59, 58, 58,148,128,119,204, 24,223,251, 26,119,116,116, 0,184,190,252, 34,199,113,186,173, 53,234, 75,129, 95,122,233, - 37,172, 95,191, 30,239,191,255, 62,190,249,230, 27,228,231,231,227,147, 79, 62,193,229,203,151, 81, 89, 89,137,193,193, 65, 24, -141, 70,212,214,214, 98,234,212,169,152, 61,123, 54,218,218,218, 80, 87, 87,135,156,156, 28, 60,247,220,115, 74, 2, 66,175, 44, -156,252, 59,185,185,185, 46,228,127,227,141, 55, 92,140, 74,176,163,190,190,142, 61,255,252,243,225,197, 92,129, 16,104,168,192, - 35,216, 52,167,158,245,243,161,200, 47, 91,246,218,218, 90, 69, 1,212,191, 33,199, 1,181,181,215,119,196,145,215,208,212,131, -252,254,218, 53, 55, 55, 23,227,198,141,195, 23, 95,124,129, 25, 51,102,160,166,166, 6,181,181,181,168,175,175,199,161, 67,135, -148,193,167,153, 51,103, 98,245,234,213,200,201,201,193,192,192, 0, 82, 82, 82,112,233,210, 37,196,199,199, 99,250,244,233,186, -142, 3,168,127, 71,109,249,221, 99,128,112, 75,102,180,226, 15, 27,172, 31,234,205,122, 7, 27,169,235,189,208,110,176,242,203, - 40, 45, 45,197,228,201,147,145,153,153,233,177,193,199,197,139, 23, 81, 90, 90, 10,189, 49,148,171,120,255,253,247,163,184,184, - 24,251,247,239, 71,109,109, 45,246,239,223,143, 35, 71,142,224,217,103,159,197,220,185,215, 55, 37,175,168,168,192, 83, 79, 61, -133, 95,255,250,215, 88,185,114, 37, 56,142,195,198,141, 27,241,232,163,143, 70,164, 28,218, 91,251,191,254,250,235, 30, 61, 64, - 56,150, 95,126,189,105,211, 38,253, 20, 32, 16,237, 12,212,213,240, 53,103, 85, 79, 5, 8, 84,126,249,198,136,162,136, 61,123, -246,248, 29, 7,240, 21, 31,232,165,192,114, 15,212,219,219,139,174,174, 46,236,219,183, 15,107,214,172,193,149, 43, 87, 80, 95, - 95,143, 35, 71,142,224,171,175,190, 66, 98, 98,162,242,253,204,204, 76, 44, 91,182, 12,133,133,133, 40, 42, 42, 66, 90, 90, 26, -150, 46, 93,138, 15, 62,248, 0,107,214,172, 65,106,106, 42,146,146,146,116,155,203,224,173,253,159,120,226, 9,205,252,125, 45, -101,101,195,201,160, 4, 59, 33, 35, 18,107,243,135, 42,191, 60, 16, 22,204, 13,142,148, 2, 20, 20, 20, 32, 43, 43, 11,115,230, -204, 65, 97, 97, 33, 86,172, 88,129,202,202, 74, 28, 62,124, 24,207, 62,251,172, 11,249,229,135,217,108,198,166, 77,155,176,111, -223, 62,108,220,184, 17, 75,150, 44, 65,107,107, 43, 94,127,253,117, 28, 63,126, 28,237,237,237,184,112,225,130,110, 46,144,251, -227,181,215, 94,115,153,253, 21,142,229, 87,255,151, 46, 61, 64,176, 89,148,104,104,174, 30, 89,160,225, 0,111,174, 98,107,107, - 43,234,235,235,209,220,220,140,254,254,126,156, 56,113, 2, 14,135, 3, 13, 13, 13,152, 59,119,174,207, 54, 47, 40, 40,192,219, -111,191,141,146,146, 18,180,180,180,224,238,187,239, 6,207,243,136,139,139,195,232,209,163,117,115,129,188,181,255,147, 79, 62, - 57,172, 44,191,166, 89,160,225, 68,254, 80,228,183, 88, 44,136,141,141, 13,184, 20, 66, 20, 69, 93,123, 51, 95,164, 84,143,254, -202,243, 1,134,234,245,212, 37,198,238, 50,235, 57, 6,227, 46,215,214,173, 91,189,246,112,161, 88,126,221,123,128, 96, 6, 46, -134,186, 1,209,218, 89, 38, 24,249, 99, 99, 99,131, 42,133,208,155,252,238,237,154,158,158,142,101,203,150, 97,238,220,185,200, -205,205,197, 93,119,221,133,179,103,207, 98,246,236,217,168,168,168, 64,102,102,166,215,107, 59,122,244, 40, 86,174, 92, 9,171, -213,138,184,184, 56,236,222,189, 27, 13, 13, 13,168,169,169, 65, 70, 70,134,174,110,169,187, 44,235,214,173,139,234, 76,181,144, - 71,130,135, 10, 36,253,165, 65,171,171,171,241,209, 71, 31,225,242,229,203,184,120,241, 34,146,147,147,135, 21,249,221, 27, 86, - 93, 10,161, 14,144,221, 75, 33, 34, 33,191,250, 58, 42, 43, 43,209,219,219,139,238,238,110,252,225, 15,127, 0,199,113,152, 55, -111, 30, 30,122,232, 33,252,242,151,191,196,178,101,203,148,210,105,249,218,250,250,250, 80, 92, 92,140,242,242,114,216,108, 54, - 28, 56,112, 0,221,221,221,216,180,105, 19, 82, 82, 82,144,156,156,172, 43,249, 43, 42, 42,192, 48, 12,230,204,153, 3, 0,216, -188,121,179,207, 94, 34, 88,203,175,107, 15, 16,108,142,214,155, 2,136,162,136,157, 59,119,162,167,167, 7,113,113,113,176, 90, -173,104,106,106, 82,234,237,135, 11,249,101,249,229,218, 30,117, 41,132, 76,124,245, 56,128,124, 92, 79, 23,200,151,251,150,156, -156,140,212,212, 84, 60,240,192, 3, 88,191,126, 61, 86,174, 92,137,236,236,108,172, 91,183, 14,133,133,133,216,180,105, 19, 10, - 10, 10, 64, 81, 20,142, 30, 61,138,226,226, 98,188,247,222,123,136,143,143,135,197, 98,193,238,221,187,177,123,247,110,100,103, -103, 71,196,242,115, 28,135,156,156, 28,165,174, 73, 61,121, 61,152,146,109,189,225, 51, 8,246, 38, 88, 77, 77, 13, 14, 30, 60, -136, 43, 87,174,224,226,197,139, 72, 74, 74,242,122,179, 94,121,229, 21, 52, 54, 54, 98,194,132, 9,232,233,233, 65, 71, 71, 7, -172, 86, 43, 4, 65, 64,122,186,254,187, 31, 5,187,140,134, 92,219,227,173,212, 65, 61, 30, 32, 31,215, 59,155,229, 79,238, 61, -123,246,224,209, 71, 31, 69,103,103, 39, 58, 59, 59,177,114,229, 74,204,159, 63, 31,251,246,237,195,246,237,219,193, 48, 12, 86, -174, 92,137,242,242,114,196,199,199, 43, 3, 96,171, 87,175,198,142, 29, 59,240,230,155,111,234, 46, 63, 77,211,152, 53,107,150, - 75, 81, 95, 73, 73,201,144, 22, 63, 80,203, 31,177, 30, 64, 93,219,255,225,135, 31,194, 98,177, 32, 33, 33, 1,141,141,141,104, -110,110, 70, 69, 69,133, 11, 33,228,155,244,167, 63,253, 9, 6,131, 1,231,206,157,131,197, 98, 65, 91, 91, 27,186,187,187, 33, - 8, 2, 30,124,240,193,168,165, 65,135,202, 2,169, 75, 33,220,201, 47, 31,143,180, 11,167,150,251,228,201,147,104,110,110,198, -146, 37, 75,112,250,244,105,140, 31, 63, 30, 38,147, 9, 70,163, 17,207, 60,243, 12, 94,121,229, 21, 80, 20, 5,139,197, 2,187, -221, 14,171,213,170,244, 0,247,222,123, 47, 86,173, 90,133, 19, 39, 78, 96,198,140, 25, 17, 73, 66,168,211,158,235,215,175, 31, - 50, 22,139,164,229, 15, 56, 6,160, 40, 10,191,251,221,239,208,210,210,226,215,162,171,133, 55,153, 76, 74, 53,160, 32, 8,112, - 56, 28,144, 36, 9,207, 61,247, 28, 54,110,220, 24,149,177, 0,127, 89, 32,185,182, 71, 93, 10,225, 45, 14,144, 75, 33,244,118, -129,124,201,253,244,211, 79,227,253,247,223, 71,111,111, 47, 38, 79,158,140,207, 62,251, 12,239,188,243, 14,126,246,179,159, 97, -249,242,229,104,105,105, 81, 50, 68, 7, 14, 28, 80, 42, 66,239,189,247, 94,176, 44,139,226,226, 98, 60,246,216, 99,248,250,235, -175, 35,222,254, 37, 37, 37, 62,107,129,130,181,252,186,103,129,220,133,255,232,163,143,192,113,156, 87,139,254,192, 3, 15,120, -104,238,222,189,123,241,212, 83, 79,161,169,169, 9,241,241,241, 72, 78, 78,198,134, 13, 27, 48,107,214,172,168, 90, 80, 95,150, - 71,174,237, 9,180, 20, 34, 82, 46,144,187,220,227,199,143,199, 39,159,124,130, 21, 43, 86,224,225,135, 31,198,164, 73,147,176, -109,219, 54,236,217,179, 7, 29, 29, 29,184,239,190,251, 64, 81, 20,118,237,218,133,238,238,110,236,222,189, 27, 59,118,236,192, -170, 85,171, 80, 92, 92,140, 67,135, 14,185,100,184, 34,217,254, 27, 54,108, 24, 86,150, 63,168, 32, 56, 62, 62, 30,167, 78,157, -242,176,232, 27, 55,110,116,153,147, 41, 99,210,164, 73,248,248,227,143,163, 58,144, 20,108, 29,144,108,217, 3, 41,133,136,196, - 53,120,147,253,221,119,223,197, 35,143, 60,130,131, 7, 15, 98,235,214,173,184,237,182,219, 64, 81, 20,214,172, 89,131,173, 91, -183, 42,138,220,208,208,128, 77,155, 54, 33, 59, 59, 27,219,182,109, 67,117,117, 53, 30,123,236, 49,100,102,102, 98,247,238,221, - 81,105,255,223,254,246,183, 67, 86,131,134,242, 95,186,245, 0,106,225,119,238,220,137,103,158,121, 70, 9,168,212, 22,125, 56, -142,168, 6,187, 12,139,236,210, 4, 90, 10,161,183, 11,228, 75,118,131,193,128, 29, 59,118,120, 28, 79, 77, 77, 69,117,117,181, - 50,158,241,221,119,223, 33, 37, 37, 69,249,222,140, 25, 51,116,119,123,134,186,134,103,158,121,102, 88,142,200, 7,148, 5,154, - 52,105, 18,254,252,231, 63,143,152,114,130, 96,179, 64,193,146, 57, 26, 89, 32,127,228, 73, 74, 74, 66, 71, 71, 7, 70,141, 26, - 5, 0,200,200,200, 80,166, 67, 14,151,246,255,205,111,126,227,115, 12, 32,146, 22, 63,164, 44,208, 72,172,165, 9, 69,254, 64, - 75, 33,134,147,252,242,231,234,194,182,104,141,190,251,147,255,217,103,159, 29,150,252, 9, 40, 8,214,107,246, 80,180,131, 96, -119,151, 38,208, 82,136, 72,215, 2, 5, 90, 54, 16,109,242,143, 68,254,208, 55, 59,249,213, 46,141,123, 41,132,250,123,234, 82, -136, 72,186, 64,234,133,163, 8,249, 93,241,194, 11, 47,192,233,116,234,215, 3,140, 52,242,135, 43,127,160,165, 16,195, 33,139, - 53, 28,201, 31,105,254,132, 59, 31,216,107, 15, 48, 84, 38, 98, 36, 32, 88,249,229,244,102,160,165, 16,122,167, 67, 71, 50,249, - 71, 26,127, 60,122, 0,135,195,129,115,231,206,249, 92,193, 75, 79,168, 55,125, 8, 21,161,200, 47,187, 52,238,171, 66,200,121, -107, 89, 9,228, 82, 8,249,251,103,206,156,209, 92,254,129,129, 1,156, 63,127, 62,160,149, 52,180, 38, 86,180,218, 63,154,252, -113,145,170,160,160,160,213,102,179,165, 69, 83, 35,121,158,111, 43, 45, 45, 13,169, 98,110,238,220,185,130,221,110,167,163, 44, -191, 88, 90, 90,202,132, 40,127,171,221,110, 31,177,237, 63,210,249, 67, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64,240,223, 21, 20,105, 2,130, 72,225,198, 62,194,135, 1,228,233,245, 31, 28,199,181,149,149,149, 5,156, 6,101,201,109, - 33,136, 32,249,191,188,177,143, 48,170,170,170,144,145,145,161,108, 88,238, 62, 73,201,125, 65, 48,247,215,222,150, 73,180, 88, - 44, 88,186,116,105, 80,227, 16, 68, 1, 8, 34, 70,254, 45, 91,182,240, 69, 69, 69, 19, 1,160,170,170, 10,131,131,131, 72, 72, - 72, 80, 54,201, 14,164,240,207,223,241, 11, 23, 46, 4, 45,155,203,168,169,209,104, 44,166,105,218, 1, 64, 10,228, 65, 81,148, - 13,192, 6,114,139, 9,134, 34,255,230,205,155,249,133, 11, 23, 78, 84,136, 71,211, 46, 53, 85,129,204,226,211,125,167,120,187, -221,190,177,166,166,134,157, 56, 81,145,211, 99,114,184, 26,205,205,205,214,156,156,156,231, 1,188, 66,110, 53,129, 47,242,151, -148,148, 24, 23, 45, 90,148,165, 62,166,222,161, 83,171,237,147, 66,129,139, 2,136,162,200,102,101,101,161,183,183,215,163,226, -209,155, 34,164,165,165, 93, 3, 48,153,220,106, 2,127,228, 95,188,120,113,150,251,113,245,222,192, 90,238, 29, 22,150, 2,168, - 20,193,239, 68, 3, 89, 25, 4, 65, 16,201,173, 38, 8,150,252, 0,148, 29,238,229, 30, 64,171,141,243,194,138, 1,124, 89,123, -121,211,102,249,161,238, 49, 0, 12, 2,200, 32,183,157,192,221,231,247, 69,126, 0,224,121,222,227,179, 96,253,125, 93,118,138, -111,110,110,198,145, 35, 71, 48, 48, 48,160,144, 93, 77,122,245,103, 44,203,166,254,226, 23,191,232,123,231,157,119, 46,250,136, - 21, 40, 47, 10, 69,121, 81, 56,151,207,104,154,118,114, 28,247,242,224,224, 96, 49,161,212,200,204,246,168, 3, 94, 0,176,217, -108,104,108,108, 68, 83, 83, 19, 58, 59, 59, 93,210,159,195,106,163,108,134, 97, 16, 19, 19,227, 98,237,125, 41, 0,128,132,123, -238,185, 7,143, 60,242,136, 18, 51,200, 19, 72,124,229,113,213, 83, 13,221,143,201,104,106,106, 98,151, 47, 95,190, 17, 0, 81, -128, 17, 4, 81, 20, 15,223,200,243, 79, 20, 69, 17, 45, 45, 45,168,171,171,195,233,211,167,209,222,222,142,132,132, 4, 36, 39, - 39,195,108, 54,195,100, 50,121, 40, 64,184,177, 64,216, 65, 48, 0, 56,157, 78,244,247,247,163,191,191,223, 27,225, 61,148,161, -172,172, 76,209,102,111,110,148,183,158,193,215,111,202,207, 61, 61, 61,178,123, 69, 48,178,144,151,155,155,139,237,219,183,163, -161,161, 1, 12,195, 32, 45, 45, 13, 41, 41, 41, 24, 59,118, 44, 56,142, 3,203,178,224, 56, 14, 70,163, 17, 44,203, 42,177,128, - 86,129,176, 38, 61, 64,108,108,172,203,142,136, 67,244, 2,144, 36,201,231,247,135, 58,207,219,177, 72, 45, 65, 72,160, 61,250, -250,250, 16, 31, 31,143,162,162, 34, 36, 38, 38,202, 46,173,242, 44,175,112,199,113, 28,120,158, 7,195, 48, 16,122,175,161,225, -173,255,141,254,150,179,136, 73, 29,131, 49,119, 60,140,177,119,252,159,232,100,129,156, 78, 39,250,250,250,208,215,215, 23,176, - 5,215,138,248,242,179,197, 98, 33, 76, 26,161,136,139,139, 67,126,126, 62, 4, 65,240,234,234,210, 52, 13,134, 97, 96, 48, 24, -148,231,150,175,246, 34, 65,186,134,249,247, 44,133,197, 98,199,241, 67,111, 97,160,177, 26,217,255,252, 6, 40, 47,113,130,150, - 89, 32, 15, 5,144,151,215, 22, 69, 81, 83, 82, 7,115, 44,220,181, 94, 8,162, 7,217,197,241,182, 16,174,154,180, 12,195, 40, -229, 15,163,231,174,194,201,191,238, 68,231,229, 22,140,190,117, 38, 10, 87,164,225,196,223,171,112,226,133,229,152,246,244,191, -129, 55,167, 6,181, 15,181,102, 49, 64, 36, 20,192, 91,207, 66,122,128,145,173, 0, 44,203, 42,247,211,215,174,149,234,116,103, -220,184, 91, 48,245,233,127,199,177, 45,247, 35,207, 1,140,187,125, 62,110,191, 99, 9,206,125, 91,137,111,215,207,199,109, 27, -247, 35,126,194,173,250,151, 66,200, 49,128,209,104,132, 32, 8, 97, 19, 62,212,243,237,118, 59, 97,210, 8,133,175,101, 91, 36, -135, 13,151,246,174, 71,111,221,223, 33,216,108,144, 36, 17,144, 36, 72,162,120,253, 53, 0,138,166,241,221,183,103, 64,153, 51, - 48,238,214,169,152, 52,243, 7, 72, 72, 78,194,177,231,151, 97,234,163,239, 97,244,172,229, 67,238, 86,170, 73, 15, 48, 48, 48, -224, 17, 3,132, 74,106,111,239,135, 58,207,106,181, 18, 38,141, 96, 5,240,182,150, 81,235, 95,222, 69,220, 96, 51,110,255,209, - 63,128,229, 56, 80, 52, 11,138, 97,111, 60, 51, 0,197, 0, 20,125,253,193,242,144,156, 54,192, 97,193,168,239,229,160, 48,105, - 20,202,255,245, 23, 24,184,180, 22,147,254,105,157,223, 77, 54, 52,235, 1,100, 63, 92, 38,103, 93, 93, 29,170,171,171, 49, 56, - 56, 8,187,221, 14,135,195, 1,187,221,238,242,218,225,112,104,150,193,161,105, 90, 20, 69, 81,242,209,200, 86, 73,146, 54, 2, -120,157, 80,110,120, 42,129, 90, 1,104,154,134,104,183, 34, 54, 54, 6, 28,108,160, 4, 1,144, 88, 64, 50, 0, 52, 11, 9, 70, - 64, 24, 0,104,246,186, 34, 56, 44,128, 36, 1, 6, 35,224,180, 33, 46,209,140,249,247,172, 66,213,103, 31,160,191,177, 6,183, - 61,245, 1, 40,138,214, 47, 11,228,173, 7, 56,121,242, 36,246,238,221,139,212,212,212, 72,181,163,207, 97,189,150,150,150,152, -217,179,103,191,234,116, 58,137, 2, 12, 99, 5, 80, 19, 52,109,209, 67,104,220,245,107,156, 62,118,200,165, 22,128,102, 12,184, -117,217, 61,152, 48,214, 4, 26, 34, 40,134,189,113,235, 69, 72,130, 19, 0, 5, 8,118, 24, 40, 96,206,157,255,136,227,127,253, - 18,117,239, 61,137,105,107,223,208,100,217, 69,175, 89, 32,163,209, 8,135,195,225,226,150,112, 28,135,212,212, 84, 52, 53, 53, -185, 28, 11, 7,254, 74,173,253,161,175,175, 15, 78,167,211, 64,168, 54,124, 93, 32,247, 71, 76, 90, 22,114, 55,236, 87,122, 4, -123, 71, 11,106,183,254, 79,228,204,153,143,140,172, 81,144,108,189,160, 24, 14, 84,242, 36,208, 19,139, 64, 37,100, 0, 20, 13, -169,251, 34,196,179,159, 67,188, 82, 13, 88, 59, 49,125,225, 2,124,179,255, 0, 46, 29,154,129,204,101, 63, 11,123,217, 69, 15, - 5, 16, 4,193,101, 36,216,221, 87,183,219,237,176,217,108, 81,109,100,185,119, 34, 24,158,240, 87,229, 73,211, 52,250,206,126, -139,134,119, 30,198,237, 63,188, 11, 73,102, 14,210,192, 53,128, 53,130,154,184, 0, 76,246, 10, 80,234,169,145,105,121,160, 71, - 79,133,112,250, 63,225, 60,177, 15,204, 96, 59,102, 47, 91,130, 35,127,120, 6, 19,254,199,131,160, 13,124,120, 89, 43,111,194, -199,196,196,192,233,116,186, 88,104,185,122,207,189, 34, 52, 26,136,246,255, 19, 4, 31, 4,203,228,191,250,247,127,195,229,131, -175, 99,238,170, 31, 35,150,177, 0,150, 94,128,225,129,132,113,160, 38,255, 3, 4, 81,196,153,166, 78,212, 54,118,194, 50,232, -196,196,177, 9,152,153, 61, 26,252,148,101,144,202,182, 65,104,248, 11,184, 81, 57, 24, 53,126, 2,174, 30,251, 28, 99,126,240, - 67,109, 21, 64, 16, 4, 12, 12, 12,184,140, 3,184,247, 2,132,128, 4,193, 4,193, 20, 69,129,166, 40, 52,126, 88,140,193,179, -101,152,183,234, 71,224,108, 87, 33, 57,132,235,214,158, 18, 32,101, 21, 65, 16, 37,156,187,220,141,191, 84, 52,193, 41,136, 56, -118,230, 42,206,182,116,227,159,255,113, 42, 30,186,227, 22, 72,115, 31, 7, 26,254, 2,169,255, 42,198,140,189, 13,151, 14,239, -210, 94, 1,228, 24, 64,206,197,203,100,231,121,222,235,156, 0,210, 3, 16,248,235, 1,228, 12, 80,237,155, 63,131,137, 19, 48, -251,142,133, 96,196, 1, 88,185,116, 56, 41, 30,241,150, 6, 80,160, 32,198,141,129,228,116,162,236, 84, 43, 46,119, 12,160,170, -190, 21,253,214,235,177,230,159,191,108,192,143, 11,179,192,143,206, 7, 77,209,144,172, 93, 48,103, 36,160,174,186, 50,108,121, -253,246, 0,106,178,169,139,221,136, 2, 16, 4,154, 5,114,116,181,226, 84,201, 63, 33, 51, 39, 27,147,110,153, 0, 56, 7,208, -221,231, 64,233,199,251, 48,239,254,135, 0,138,129, 36,216, 33, 56,157,144, 4, 1, 45,215,250,240, 85,245, 37,168,111,177,145, - 99, 0, 73,132,195,233, 0,127,253, 15,192, 24, 56, 56,172,253,218, 43, 0, 77,211,224,121, 30, 70,163,209,174,244, 93,155, 0, - 0, 4,137, 73, 68, 65, 84,133,112,242,123,162, 0, 4,129,246, 2,131, 87, 47,226,228,203,119, 34,191,168, 16,233,163,227, 1, -209,137,182,214, 30,156,248,219, 87,136, 31,151, 3,199, 64, 15, 40, 51, 3,105,112, 0, 98,199, 89, 88, 17,139, 41, 99, 99,225, -126,123, 23, 79, 31, 3, 65,112, 2, 45,223, 2,146, 8, 24, 98, 97,119, 72,136, 73, 14,127, 43, 2,143, 92,187, 60, 14, 32,247, - 2,253,253,253,202,236,176,225,244, 32, 24,222,228,167, 40, 10, 13,255,250, 47,200,159, 63, 15,105,137, 20, 36,198,128,198,243, -173, 56, 89, 86,137, 89,175,124,137,180,194,123,208,121,249, 50,192, 39, 92, 31,248,250,250, 21,216,172, 22,204,201, 78,194,125, - 69,153, 24,101, 54,194, 28,103,192,178,239,143,197,157,115,198,194,225,112,128,173,120,227, 58,105, 19, 51,209,221,213,135,164, - 91,230,106,223, 3,200, 35,193,118,187,221, 37,240,245, 54,135, 51, 90, 86,153, 40,192,200, 80, 2,103,239, 53, 36,143,155, 7, - 73,178,227,244,137,211,104,191,218,141,217,175, 30,129, 33, 62, 17,227, 22,175, 70,217,255,123, 27, 89,121,121,160, 91,190, 5, -107,237,130,177,244, 37,244,205,122, 26,119, 23,140,197,221, 5, 99,255, 43,150,128, 8, 67,197, 27, 48, 52,253, 13,160, 89,136, - 99,102,226,204,127,124,133,121,175,188,169,189, 2, 56,157, 78, 88, 44, 22, 12, 12, 12,184,144, 77,174,239, 38, 22,152, 32,208, - 30, 32,225,150, 2,148,127,250, 57, 28,150,126,152, 38,127, 31,183,255,223, 63,129, 49,240,215, 39,197,196,153, 49,126,249, 26, -156, 59,245, 53,110,201,248, 62,132,115,159, 35,254,228, 78,112,173, 85,232,207, 95, 3,123,106, 62, 68,138, 1,215, 81,131,248, - 83,127, 0,127,165,236,186,245, 31, 55, 27,205, 45, 93, 24,117,219, 18,196,103, 76,209, 39, 6,144,103,235,168, 21,128,196, 0, - 4,193, 42,193, 45, 15,191, 5, 75,115, 61, 56, 83, 50,140, 41, 99, 61,198, 5, 38,174,252, 23,124,245,200,187, 48, 39, 23, 96, - 76,222, 61, 16, 78,255, 39,184,246,239,144,252,197, 47, 60,127,148,225,192, 76, 94,138, 46,167, 25,167, 43,190,192,226,237,199, - 53,145,213,107, 22,200,106,181,122,237, 1,252,213,242, 19, 5, 32,112, 87, 0,154,166, 97,202,156,234,187,126,159,143, 65,225, -230,175, 81,245,210, 42,116,143, 78, 70,206,109, 15,129,106, 61, 6,169,175, 21, 82,223, 21, 64, 20, 64,197,167,129, 50,141, 1, -149,158,143,198,243, 87,208,120,178, 12,133,175,254, 21,198,228,116,125, 20,192,189, 7,144, 9, 23, 19, 19, 67,122, 0,130,160, -200, 31,200, 92,222,152,212, 12,204,127,173, 12,167,222,123, 2,127, 63,240, 23,140,157, 50, 5, 73,163, 38,195,148,147, 14,138, -166,209,223,126, 13, 61,215,218,113,249,175, 21, 48,142,202,194,226,119,190, 3, 27, 19,175,153,188, 94,123, 0,139,197, 2,139, -197,226, 98,241, 29, 14,135, 50, 97, 93,239, 73,235, 67, 17,156, 76,154, 31,222, 8,122,133, 7,214,128,252, 71,182,161,239, 82, - 61, 58, 78,254, 29,205,213,135,209,241,197, 62, 72,130, 19, 73,217,223, 71,202,140, 59, 48,253,174, 66, 36, 77,153,169,185,172, - 62,199, 1,228,145, 95,181, 98, 72,146, 4,167,211,169,217,156,221, 80, 45, 57,153, 51, 60, 50,130,224, 96, 22,181,162, 40, 10, -230,204, 92,152, 51,115,241,189, 31,174,137,152,188, 94,123, 0,155,205,230,210, 3,200,100, 21, 69, 17, 14,135, 67,119, 2, 14, -165, 24, 54,155, 13, 20, 69,137,196, 21, 26, 25, 74, 16, 8,249, 35,177,147,252,144, 10,192,178,108,255,213,171, 87,227, 71,143, - 30,237, 82, 10, 33,138, 34,210,210,210,148, 50,137,104, 90,127, 73,146,112,229,202, 21,240, 60,127,105,112,112,144,176,109,152, - 43,192,112, 38,191,135, 2, 24,141,198,147,135, 15, 31,158,179,116,233, 82,212,213,213, 65, 16, 4,101,121,148,217,179,103,163, -171,171, 43,104,235,175,181,149,150, 36, 9, 53, 53, 53,131,162, 40,150, 17,170, 17,242,107,170, 0, 14,135, 99,211,206,157, 59, -255, 99,213,170, 85,134,159,252,228, 39, 56,115,230, 12, 40,138, 66, 78, 78, 14,210,211,211,113,252,248,241,168,251,255,151, 47, - 95,198,167,159,126,234,176,219,237,207, 19,186,141,188, 32, 56,156,133,108,117, 87, 0,155,205,118,152,231,249,119, 86,174, 92, -185,118,237,218,181,134, 69,139, 22, 33, 61, 61, 29, 61, 61, 61, 40, 47, 47, 15,105,185, 18, 45,122, 0, 65, 16,208,214,214,134, -154,154, 26,235,193,131, 7, 5, 81, 20,127, 13,224, 12,161,218,200, 9,130,135, 35,249,125,107, 5,203, 46,141,141,141, 61,202, -178,108, 63, 2,220, 47, 76,207, 7, 69, 81, 2,207,243,141, 6,131,225, 67, 0,217,132,102,195, 19, 51,103,206,148,156, 78,167, -100,177, 88, 36,171,213, 42, 13, 14, 14, 74, 54,155, 77,178,219,237,146,195,225,144,156, 78,167, 36,138,162,110,143,250,250,122, -105,230,204,153, 65, 89, 92,175, 43, 48, 59,157,206,207,157, 78,231,231,195,165, 97, 37, 73,138,250, 60,100,130,192, 96,183,219, -113,246,236, 89,175,126,190,222,150,223, 96, 8,126,157, 4,178, 4, 57,129,102,224,121,190,109,254,252,249,105,209,150,129,220, - 9, 2, 2, 2, 2, 2, 2, 2, 2,191,248,255, 88,111,246,205,191, 63,162, 3, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130, +137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, + 68, 82, 0, 0, 0,192, 0, 0, 0,192, 8, 6, 0, 0, 0, 82,220,108, 7, 0, 0, 0, 4,115, 66, 73, 84, 8, 8, 8, 8,124, + 8,100,136, 0, 0, 0, 9,112, 72, 89,115, 0, 0, 13,215, 0, 0, 13,215, 1, 66, 40,155,120, 0, 0, 0, 25,116, 69, 88,116, + 83,111,102,116,119, 97,114,101, 0,119,119,119, 46,105,110,107,115, 99, 97,112,101, 46,111,114,103,155,238, 60, 26, 0, 0, 32, + 0, 73, 68, 65, 84,120,156,237,125,121,124, 20, 85,186,246, 83, 85,221,213, 91, 58, 59, 36, 16, 32, 48, 64,192,128, 65, 68, 17, + 66, 8,171, 10, 40,174, 51, 46, 31,200,111,116,188, 92,113, 70,199,141, 77, 16,163, 51,138,128,224, 40,138,203,160, 32,202,117, +197, 65,244,122, 85, 28, 29, 81,194,146, 24, 64, 48, 4, 66, 32, 9, 9, 16,204,218,221,233,164,151,170,250,254,232, 84,165,186, +187,186,187,122,203, 98,215,195,175, 72,117, 45,167,158,115,234,121,207,121,207,123, 78, 85, 17, 28,199, 65,129,130, 88, 5,217, +221, 4, 20, 40,232, 78, 40, 6,160, 32,166,161, 24,128,130,152,134, 98, 0, 10, 98, 26,138, 1, 40,136,105, 40, 6,160, 32,166, +161, 24,128,130,152,134, 98, 0, 10, 98, 26,138, 1, 40,136,105, 40, 6,160, 32,166,161, 24,128,130,152,134, 98, 0, 10, 98, 26, +138, 1, 40,136,105, 40, 6,160, 32,166,161, 24,128,130,152,134, 98, 0, 10, 98, 26,138, 1, 40,136,105, 40, 6,160, 32,166,161, + 24,128,130,152,134, 98, 0, 10, 98, 26,138, 1, 40,136,105, 40, 6,160, 32,166,161, 24,128,130,152,134, 98, 0, 10, 98, 26,138, + 1, 40,136,105, 40, 6,160, 32,166,161, 24,128,130,152,134, 98, 0, 10, 98, 26,138, 1, 40,136,105, 40, 6,160, 32,166,161, 24, +128,130,152,134, 98, 0, 10, 98, 26,138, 1, 40,136,105, 40, 6,160, 32,166,161, 24,128,130,152,134, 98, 0, 10, 98, 26,138, 1, + 40,136,105, 40, 6,160, 32,166,161, 24,128,130,152,134, 98, 0, 10, 98, 26,138, 1, 40,136,105, 40, 6,160, 32,166,161, 24,128, +130,152,134, 98, 0, 10, 98, 26,138, 1, 40,136,105, 40, 6,160, 32,166,161, 24,128,130,152,134, 98, 0, 10, 98, 26,138, 1, 40, +136,105,168,186,155, 64, 87, 98,252,248,241,233, 44,203,238, 6, 48, 58, 90,215,160,105,186,174,176,176, 48, 61, 26,105, 15, 31, + 62, 92,147,148,148, 52,129, 97, 24, 99, 52,210, 7, 0,181, 90,109,219,191,127,255,238,104,165,223,211, 16,148, 1,244,102, 1, +117,112,255,110,253,250,245,244,148, 41, 83, 80, 92, 92,140,140,140, 12,104,181, 90, 80, 20, 5,130, 32, 64,146,157, 13, 34, 65, + 16,126,215,197,219,248,223, 86,171, 21, 51,103,206, 76,139, 52,119,192, 37,254,196,196,196,137,207, 61,247, 28, 57,125,250,116, +148,148,148, 32, 35, 35, 3, 52, 77, 67,165,114,221, 70,138,162,124,158,239,111, 31, 15,187,221,142,169, 83,167,106, 34, 70,186, + 23, 64,182, 1,248, 18,144, 70,163, 1, 69, 81, 32, 73,210, 75, 28,129,132,227,185, 30, 45, 1,241,220,159,127,254,121,205,148, + 41, 83,134, 0, 64,113,113, 49,218,219,219, 17, 31, 31, 15,149, 74, 37,228,129,207,135,175,197,223,254, 51,103,206, 68,154, 58, +128, 78,241,175, 89,179,134,156, 62,125,186, 30, 0, 14, 30, 60,136,209,163, 71, 35, 49, 49, 81,224, 47, 22, 57,111, 20, 0,100, +109,167, 40, 42,106,252,123, 50,100, 25,128,148,128, 14, 28, 56,128,209,163, 71, 35, 33, 33,193,167,128, 60,197, 18,104,223,233, +211,167, 35,158, 65,158,251,186,117,235, 52, 83,167, 78, 29,194,111, 39, 73, 18, 44,203, 10,199, 5, 18,183, 92,195,136, 52,164, +196, 15,248,175,209, 67, 17,127,172, 34,160, 1,248, 18, 16, 69, 81,224, 56, 78, 56, 78,142,192,229,236,139, 36,120,238,107,215, +174,213, 78,155, 54,109,176,120,159,248,166,135, 35,254,104,113, 7,124,139, 31,112, 23,179, 56, 63,161,138,223, 51,189, 88,129, +223, 92,135, 42,160, 80,197, 31, 73, 17,137,185, 79,159, 62,125,176,231,126,222,239,143,148,248, 35,205,223,159,248,121,254,158, +235,138,248,131,135,207,156,203, 21, 16,128,144,196,239,235,184, 72, 32, 16,119,192,117,211,249, 78,111,164,196, 31, 41,254,129, +196, 15,192,203,231,247,220, 39,206,167,212,246, 64, 70, 19, 43,144, 52, 0, 57, 2, 82,171,213, 33,215,244,209,116,129,196, 46, +155,103,171, 37,134, 70,163,241,186, 94,176,254,126, 52, 12, 64,142,248,121,254, 82, 80,106,254,224,224, 85, 2,114, 5, 68,211, +180,219, 13,247, 39,144, 96, 12, 35, 28,136, 59,235,226,254, 10, 0,216,108, 54, 84, 86, 86,162,186,186, 26,141,141,141,208,106, +181,146, 66, 14,183, 35, 28, 14,252,137,223,102,179,225,204,153, 51,168,174,174, 70, 83, 83, 19,244,122,189,151,216,195, 17,127, + 44,214,254,128,135, 1,200, 17, 80, 85, 85, 21, 26, 27, 27,161,211,233, 4, 65, 68,162,230, 15, 87, 60, 0,192,178,236,238, 13, + 27, 54,208,249,249,249, 67, 88,150, 69,109,109, 45,142, 31, 63,142, 19, 39, 78,160,190,190, 30,241,241,241, 72, 78, 78, 70, 66, + 66, 2,140, 70,163, 91, 63, 32, 18,125,129,112,145,148,148, 52,225,249,231,159, 39,243,243,243,245, 12,195,160,182,182, 22,101, +101,101, 40, 47, 47, 71,125,125, 61,140, 70, 35,146,146,146,144,152,152, 8,163,209, 8,149, 74,229, 37,124, 32,116,241,199,162, + 17,184,149, 4,203,178,187, 59,226,252,130,128, 74, 75, 75, 5, 1, 25,141, 70, 36, 39, 39, 35, 49, 49, 17, 6,131,193, 45,254, + 31,174,248, 35,228, 66,140,206,206,206,198,166, 77,155, 80, 94, 94, 14,138,162,144,150,150,134,148,148, 20,244,239,223, 95, 24, + 52,162,105, 26, 90,173, 86, 16, 80,160,248,127, 48,251,194, 1,195, 48,198,236,236,108,188,242,202, 43, 56,125,250, 52, 40,138, + 66,159, 62,125,144,154,154,138,156,156, 28,168, 84, 42,104, 52, 26,208, 52, 45,140,191,248,170,245, 1, 69,252,114,224,233, 2, +141, 30, 53,106, 20, 94,126,249,101,148,151,151, 67,165, 82, 33, 45, 45, 13,201,201,201,184,244,210, 75, 5, 1,105, 52, 26,104, +181, 90,168,213,106,168, 84,170,136,137, 63, 18,181,168,217,108, 70, 92, 92, 28,242,243,243,145,152,152, 8, 0, 66,235,194, 95, + 75,173, 86,123,137,200,151,200,187, 58, 10,100, 50,153, 96, 52, 26,145,151,151,135,164,164, 36, 97,187,120,180,151,162, 40,104, + 52, 26,129,191, 84, 43,160,136, 95, 30,188,250, 0, 38,147, 9, 6,131, 65, 16, 16,127, 83,197,238, 14,111, 4, 26,141, 70,248, + 29,108,180,199,215,190,112, 97, 48, 24,144,147,147, 3,134, 97, 0,120,143, 64,147, 36, 9,138,162,160, 86,171,133,191, 82, 45, + 64,168, 29,225,112, 17, 31, 31,143, 49, 99,198, 8,252,197, 16,215,248,158,226, 87,220,158,208,224,101, 0,188,128, 60, 71, 73, +197, 2, 82,169, 84,130,112,104,154,118, 19, 80,184, 46, 81,216, 25,234,112,113, 56,142,147, 20, 63,127, 61,113,205, 31,169,190, + 64, 36,248,243,181,187,211,233, 12, 40,218, 72,138,159,119, 7, 99, 13, 94, 57,230,107,119,150,101,189,110, 44, 47,244,130,215, +255,141,226, 95,106,193,136,140, 36, 24, 28,221,185,210,167,168,194,133,248, 70,242, 70, 32, 94, 60, 7,192,130,169,249,187,162, + 35, 44, 53,175,199, 95,116, 71, 74,252,114,250, 5,254,142,137, 37, 72, 26,128,248, 6,120,222,100,146, 36,241,236, 3,179,209, +208,210,134,231,222,250, 22, 37,199,107,133,115,119,191,177, 8, 70,131,123,120,177,201,212,134, 83,213,191, 98,243,142,125,248, +169,180, 90, 50,205, 72,137,159, 79,219,215, 0, 87, 36,230,250,248,218,199, 95, 47, 18,144, 19,213, 9, 69,216,138,248,189,225, +229,116,243, 55,148,175, 93,248,133,239,240,242,219,211, 83,227,177,240,247, 19,221,206,165, 36,106,212,212,164, 56, 76,188,236, +119,216,252,183,121,152, 60,110,152,112,141,104,245, 1,194,169,189,195, 17,127,180, 38,195,117,149,248, 99,181, 47,224,211, 0, +124, 9, 64,188, 62, 36, 35,197,237, 92, 74,229,219,151, 86, 81, 20, 22,221,145,239,247, 26,145, 66,164,196, 47, 55, 60, 26,233, + 86,140,135, 34,254,232, 67,178,253,227,111,100, 32, 67, 48, 26,180,110,231, 81, 18,130, 16,255, 30, 51, 98, 0,174,202, 25, 18, + 85,241,251,227, 31, 73,195,144,218, 30, 9,120,250,245,252, 54, 32, 60, 97, 43,226,151,134,151, 1,200,185,233,190,106,188, 64, +157, 74,146, 36,241,246,234, 63, 70, 93,252,129,150,104, 24, 70,180,160,136, 63,186,144,108, 1, 60, 59,145,114, 7,174, 40, 74, +126,216, 51, 26,226,247,197, 63, 18,181,190, 34,254,223, 38, 36,251, 0,114, 69,236, 41, 96, 74,226,216, 71,215,238,232, 82,241, + 71,195,229,233,106,241,139,163,112,138,248,163, 11,217,125, 0, 57, 3, 87, 36,229,222, 7,104,183, 59,177,167,184,188,203,196, +239,201, 63, 18,226,247,183, 47,218, 80,196, 31,125,200,234, 3,248,243,235,197,224,195,160, 78,134, 69, 93,189, 9,111,124,188, + 23,109, 54, 71,151,139, 95,108, 0,209,234, 8, 71, 19, 82,177,121, 69,252,209, 65,192, 62, 64,160, 78,173, 24, 99,110,121, 86, +242, 34, 93, 37,126,241,245, 0,255, 81,160,112, 12, 35,154,144, 18,169, 34,254,232,193,103, 11, 0, 4, 14,131,122,138,225,216, +167, 79,128, 32, 8, 48, 44,135,186,122, 19, 94,251,240, 7,236,248,186,164, 75,197, 47,206, 67,164,107,253,174,112,123, 60,161, +136, 63,186,144, 84,165,156,154, 95, 74, 16,252, 62, 90,173,194,160,254, 41, 88,117,255,245,208,105,212,138,248, 67,132, 34,254, +232,195,167, 1,200, 17,191,167, 40, 60,247, 25,116, 26, 76,187,106,100,151,100,196, 31,127, 69,252, 10,124, 33, 96, 39, 56,152, + 48,168,212,121, 27, 87,222,217,101,153,145,226, 31,174,191,175,136,255,183, 13,159, 97, 80, 57,226,151,114,129,124,237,235, 74, + 68,170,214,239,206, 60, 4, 35,126,229, 1,247,208, 33,217, 2,200,245,255,125,245, 1,186, 83, 56, 60, 15, 69,252, 10,228, 32, + 96, 31, 32, 24, 23, 72, 17,127,100,161,136, 63,250,240, 59, 21, 34,144,248, 45, 86,155,219,185,158,191,187, 11,189, 89,252,188, +168, 21,241,119, 13,100,133, 65,125,185, 68,167,107,234,221,206, 43,175,186,216, 37,164,253,193,159,240,123,186,248,121, 40,226, +239, 58, 72, 26,128, 28,241,215, 92,104,194, 11,111,127,227,118,222,218, 55,191,196,169,234,158,103, 4,114,132,223, 83,196, 47, +134, 34,254,232,195,111, 24,212,151,248,239,124,108, 51, 14, 29, 63,235,149, 88,209,209, 74, 92,123,239, 63, 48,242,119,233,216, +246,220, 61, 72, 73,140,235,146, 76,120, 66, 17,191, 2,185,240, 25, 6,245, 23, 9,250, 96,195,194, 30,209,225,149,130, 34,126, + 5,193, 32,232, 48,168,248,119, 79,133, 28,225,119,229,244,140, 80,161,136, 63,250, 8, 42, 12,218, 27,196, 47,167,198, 87,196, +175,128,135,236, 48,104,111, 16, 63, 15, 69,252, 10,228, 34,232, 62, 64, 79,135,221,110,199,169, 83,167, 36,253,252,104,139, 95, +173, 86,135,157,134,211,233, 68,121,121, 57,128,174,127,105, 21, 77,211, 93,122,189,158, 0,175, 18,118, 56, 28,168,168,168,232, +150,206, 98,184, 2,210,104, 52,117,147, 39, 79,142,202,119,122,131,225, 16,234,185, 58,157,206,150,155,155,219,173,223,233,213, +233,116, 61, 99, 52,179,139, 64,136,191,244, 56,105,210,164, 11, 54,155,173,219, 5,180,119,239,222,168,124,105, 93,129, 2, 79, +184, 25,128, 2, 5,177,134,158,223, 35, 84,160, 32,138, 80, 12, 64, 65, 76, 67, 49, 0, 5, 49, 13,197, 0, 20,196, 52, 20, 3, + 80, 16,211, 8,106,164,165,227, 59,194,187, 1,140,142, 18, 31,208, 52, 93, 87, 88, 88, 24,149, 48,168,194, 63, 48, 98,141,191, +108, 3,224, 63,162,221,241, 29, 97, 20, 23, 23, 99,192,128, 1,208,104, 52,194,167, 82, 61, 7,204,130, 93,111,107,107,195,140, + 25, 51,162, 50, 14,193,243,239,248,144,118,175,229,207,151,127, 81, 81, 17, 50, 50, 50,188,248,251,226,231, 57,144, 41,181,221, +108, 54, 99,246,236,217, 49, 85,254,178, 12, 64,252, 5,249, 41, 83,166, 12, 1,128,226,226, 98,216,108, 54, 36, 36, 36, 8,159, + 78, 10,244, 58,244, 64,251, 78,159, 62, 29, 12,119,217, 16,243,207,207,207,239,181,252,215,173, 91, 39,148,255,129, 3, 7, 48, +106,212, 40,196,199,199, 75,242,151, 51, 29,220,115,255,153, 51,103,162,202,191, 39,150,127, 64, 3, 16,147,159, 58,117,234, 16, +225, 68,149, 10,226, 65, 52, 57, 4,229,100, 42,210,248,173,240, 95,179,102,141,102,218,180,105, 2,127,138,162,132, 79,217, 6, +203,213,215,254,104,160,167,151,191, 95, 3, 16,213, 60,218,169, 83,167, 14, 22,239,227, 39,150,121,126,138, 52, 28,242,145,190, + 9,191, 21,254,107,214,172,209,206,152, 49,195,139,191,248,122,114,133, 31,232,152,104,240,239,201,229,239, 51, 10, 36, 38, 63, +109,218,180,193,158,251,121,191, 13, 8, 92,248,193, 52,103,145,194,111,133,191,148,248, 1, 87, 11, 32,151,191,220,188,196, 98, +249, 75,182, 0,129,200,139, 51, 16, 73,242,145,186, 1,191, 21,254,190,196, 47,230, 15,200,251, 14,130,156, 99, 34, 53, 93, 92, + 78,249,239,218,181, 11, 9, 9, 9,208,106,181, 80,169, 84,110, 45,154,167, 97,120,110, 19,231,121,233,210,165,145, 53, 0, 15, +159, 77,146, 60,224,154,186,236,121, 81,185, 5, 30,205, 38,248,183,194,127,205,154, 53, 26, 95,226, 23,243,231,121, 75,241,151, + 43,124,241, 49,145,226, 31,168,252,111,191,253,118, 12, 24, 48, 0,241,241,241,160,105, 26,106,181, 90,104,213,186,178,252,221, + 12,192, 87,135, 5, 0,108, 54, 27,170,170,170, 80, 85, 85,133,166,166, 38,104,181, 90, 47,194,225,146, 15,247, 6, 4,226, 95, + 89, 89,137,234,234,106, 55,254, 23, 47, 94, 20, 62, 6, 62,112,224,192,128, 60, 43, 42, 42, 0,184,124,215, 75, 46,185, 36, 42, +252,215,173, 91,231,214,225,229,249,159, 57,115, 6, 85, 85, 85,168,175,175,135, 78,167,147,245,174,163, 96, 91,134, 72,240,151, + 42,127,139,197,130,195,135, 15,163,164,164, 4,199,142, 29, 67,107,107, 43, 12, 6,131,219, 7,216,229,214,252,252, 58, 73,146, + 88,182,108, 89,228, 12,128,101,217,221, 29,113,218, 33, 44,203,162,182,182, 22,101,101,101, 56,113,226, 4, 26, 26, 26, 16, 23, + 23,135,148,148, 20, 36, 36, 36, 32, 62, 62, 94, 32, 45, 55,252, 22,237, 40, 74, 40,252,139,139,139,113,235,173,183,226,179,207, + 62, 19,106, 85, 41,191,146,223, 94, 88, 88,136,187,239,190, 27, 91,182,108, 65,118,118,118,196,249,119,196,249,135,176, 44,139, +154,154, 26, 28, 63,126, 28,101,101,101,168,175,175, 71, 92, 92, 28,146,146,146,144,148,148, 4,131,193,224,183, 2,234,106,241, + 7, 83,254,179,103,207, 70, 82, 82, 18,140, 70, 35,244,122,189, 48, 22,224, 75, 79,209,212,143,167, 11, 52, 58, 59, 59, 27,155, + 54,109,194,169, 83,167, 64, 81, 20,250,246,237,139,212,212, 84,244,239,223, 31, 52, 77, 67,165, 82, 65,163,209, 8,190,155,216, +151, 14,245,149,132, 17,188, 9, 65,243, 47, 41, 41,193,161, 67,135, 64, 16, 4,210,211,211,125,214, 62,252,178,111,223, 62, 20, + 22, 22,130,227, 56,220,123,239,189, 81,225,255,242,203, 47,163,188,188, 28, 36, 73, 10,252, 71,143, 30, 45,212,150, 26,141, 6, + 58,157, 78,248, 29,138,248,125,237,143, 4,127,169,242,223,187,119, 47, 8,130, 16, 62, 4,174, 82,169, 4,183, 71,220, 7,144, + 83,243,139, 91,128,229,203,151,135, 85,254, 94,125, 0,139,197, 2,163,209,136, 41, 83,166, 32, 49, 49, 81,216,206, 23, 26, 73, +146, 80,171,213, 80,171,213,208,104, 52, 32, 73, 82,248,172,103,176,133, 29,141, 78,100,176,252,139,138,138,132, 99,246,239,223, + 15,192,229,222,240, 11,255, 91,188,157, 95,143, 6,127,179,217, 12,189, 94,143,188,188, 60, 36, 36, 36,120, 9,128, 23, 12, 77, +211,160,105, 90, 40,123,185,131, 72,129,246,135, 11, 95,229,191,104,209, 34,175,242,215,106,181,194,186,167, 17,116,149,126,188, + 12,192, 96, 48, 96,204,152, 49, 96, 24, 70,136,209,242,224, 51, 64, 81, 20,212,106,181,144, 25,169, 81,200, 80,200, 71,226, 6, + 4,203,191,162,162, 2, 53, 53, 53, 24, 48, 96,128,236,107,152,205,102, 24,141,198,168,240,215,235,245,184,244,210, 75,193,178, +172,215, 64, 17, 95,102, 60,127,113,237,201,239, 11,183, 79, 16, 46,124,149,255, 27,111,188,225,102,204,252,125, 16,115,231,247, +121,254,245,181,141, 32, 8,172, 88,177, 34,178, 6,192, 55, 77,226, 48, 27, 31, 30, 19, 23,162,184,230,151,170,253, 25,134, 65, +109,109, 45,206,158, 61,139, 11, 23, 46,160,190,190, 30, 77, 77, 77,104,109,109,197,250,245,235,163,118, 3,130,229, 15, 64, 16, +127, 65, 65, 1, 72,146, 68,110,110, 46,178,179,179,145,146,146,130,134,134, 6,148,150,150,162,176,176, 16, 44,203,162,160,160, + 0, 70,163,209, 45,189, 72,243,167,105, 26, 44,203,122, 9,198, 83,196,226,138,103,194,132, 9,168,171,115, 61,143,159,158,158, +142,162,162, 34,217,125, 51,241,254, 72,240,151, 42,255,135, 30,122, 40, 40,253,132, 82,121, 70,196, 0,248, 90, 5,144,110,230, +197,191, 41,138,130,201,100, 66,117,117, 53,206,159, 63,143, 95,127,253, 21, 77, 77, 77, 48,153, 76,176, 90,173, 48,153, 76,104, +105,105, 65,115,115, 51, 90, 90, 90,132,245, 13, 27, 54, 68, 69, 60,161,240, 23,131, 36, 73, 44, 88,176, 0,153,153,153,194,182, +126,253,250,161, 95,191,126, 24, 54,108, 24,182,109,219,230,118,124, 52,248,243,254, 49,239,110,249, 18,191, 88, 72,205,205,205, + 24, 60,120, 48,202,202,202, 0, 0,179,103,207,134,201,100, 66,114,114,114,151,138, 31,240, 93,254, 27, 55,110,244, 42, 43,169, +218,125,201,146, 37, 33,247, 37, 67,129,151, 1,240,133,202,175, 7, 34,242,204, 51,207,120, 9,188,165,165, 5,102,179, 25, 44, +203, 34, 62, 62, 30,195,135, 15,199,184,113,227,144,149,149,133,167,158,122, 42,170, 55, 33, 88,254, 0, 80, 87, 87,135,180,180, + 52,228,230,230,186,137,159, 32, 8,193, 13,201,204,204, 68,110,110, 46, 0,215,172, 67,157, 78, 23, 21,254,124, 58, 82,226,103, + 89, 22,143, 60,242, 8,206,157, 59,135,167,159,126, 26,163, 71,143, 6, 73,146,104,105,105,193,196,137, 19,113,246,236, 89,161, + 53,104,110,110, 70, 74, 74, 10, 8,130,192, 47,191,252,130, 37, 75,150, 96,208,160, 65,120,237,181,215,220,198, 64, 60,175, 17, + 46,124,149,255, 35,143, 60, 18,118,237, 30, 13, 35,246,251,141, 48, 57, 68,222,125,247, 93,144, 36,137,129, 3, 7, 98,248,240, +225,152, 52,105, 18,134, 15, 31,142,172,172, 44,100,101,101, 9,145, 21,254, 28, 95, 6, 16,169, 26, 40, 88,254, 0,144,150,230, +154, 65,155,157,157,237,150,134, 39,248,253, 58,157,206,235, 58,145,226, 47,174, 17, 61,111,248,163,143, 62,138,113,227,198,225, +233,167,159,198,242,229,203,145,158,158,142,249,243,231,227,253,247,223,199,132, 9, 19, 96,177, 88, 64,146, 36,178,179,179,177, +101,203, 22,204,159, 63, 31,219,183,111, 7,195, 48,216,182,109, 27, 62,249,228, 19, 44, 90,180, 8,111,190,249,166, 79, 81, 69, + 42, 15, 71,143, 30,133, 74,165,194,165,151, 94, 42,108,235,105,226, 7,100,124, 41, 62, 16, 9, 0, 56,123,246, 44,180, 90,173, +108,193, 69, 83,252,161,240,231,145,146,146, 34,172,123,118,160, 61,247,139,211,143, 52,127, 95,229,200,215,252, 44,203, 98,243, +230,205,248,207,127,254,131, 85,171, 86, 97,225,194,133,152, 51,103, 14, 14, 29, 58, 4,146, 36,113,227,141, 55, 34, 62, 62, 30, +239,188,243, 14, 22, 45, 90,132,212,212, 84,180,182,182,226,134, 27,110,192,174, 93,187,100,151, 71,168, 32, 73, 18, 26,141, 6, + 35, 71,142,132, 74,165, 2,195, 48, 97, 9, 60,154,238,155,223, 47,197,203, 33, 1,192,167,248,125, 21,112, 52,197, 31, 10,255, +134,134, 6,161,195,219,175, 95, 63,159,105, 55, 52, 52, 0,112,189,126,145,166,233,168,240, 7,124, 27,240,223,255,254,119, 44, + 91,182, 12,111,190,249, 38,246,238,221,139,156,156, 28,124,250,233,167, 56,119,238, 28,138,138,138,208,222,222, 14,173, 86,139, +210,210, 82,140, 26, 53, 10,227,199,143, 71, 93, 93, 29,142, 31, 63,142, 17, 35, 70,224,137, 39,158, 16, 2, 16,209,138,194,241, +233,100,103,103,187,137,255,197, 23, 95,116,171, 84, 60,239,145,231, 54,185,251,158,124,242,201,176,248,202, 50,128, 64, 29,143, + 96,172,150, 63, 94,236,131, 71, 18,161,240,231,107,246,210,210, 82,193, 0,196,105,240,253,128,210,210, 82, 0,157,239,208,140, +134,248,253,149,107,118,118, 54, 6, 12, 24,128,111,191,253, 22, 99,199,142,197,209,163, 71, 81, 90, 90,138,178,178, 50,124,253, +245,215,194,224,211,184,113,227, 48,127,254,124,140, 24, 49, 2,173,173,173, 72, 73, 73,193,217,179,103, 17, 23, 23,135, 49, 99, +198, 68,117, 28, 64,156,142,184,230,247,236, 3, 4,186, 55,114,195,185,225,194,103, 31,128,255, 27,168,105, 18,103, 90,174,224, +162, 37,254, 80,249,243, 40, 44, 44,196,176, 97,195,144,153,153, 9,207, 55,230, 85, 85, 85,161,176,176, 48,106,156,197,220,125, + 25, 0, 73,146,184,227,142, 59, 80, 80, 80,128,157, 59,119,162,180,180, 20, 59,119,238,196,158, 61,123,176,114,229, 74, 76,156, + 56, 17, 0,112,240,224, 65, 44, 94,188, 24, 15, 63,252, 48,230,206,157, 11,154,166,177, 98,197, 10, 60,240,192, 3, 81, 31, 7, +224,121,243,127,249,235,189,240,194, 11, 94, 45, 64, 56, 53, 63,191,190,106,213,170,176,184,250, 53, 0, 57,214, 41, 38, 37,199, +114,197,233, 71, 11,193,242,231,111, 12,203,178,216,182,109,155,223,113, 0,241,241,209,230,207,115,228, 56, 14, 38,147, 9, 77, + 77, 77,216,190,125, 59, 22, 46, 92,136,243,231,207,163,172,172, 12,123,246,236,193,247,223,127,143,196,196, 68,225,248,204,204, + 76,204,154, 53, 11,121,121,121,200,207,207, 71, 90, 90, 26,102,206,156,137,119,222,121, 7, 11, 23, 46, 68,106,106, 42,146,146, +146,162,210, 1, 22,243, 23,167,255,232,163,143,202,210, 72, 87,213,252, 60,252,126, 35, 76, 14, 65,241, 57, 93, 21,107,246,135, + 80,249, 3,174,129, 48,185,215,136, 38, 60,203, 53, 55, 55, 23,131, 7, 15,198,132, 9, 19,144,151,151,135, 57,115,230,160,168, +168, 8,187,119,239,198,202,149, 43,221,196,207, 47, 9, 9, 9, 88,181,106, 21,182,111,223,142, 21, 43, 86, 96,198,140, 25,184, +112,225, 2, 94,120,225, 5, 28, 58,116, 8,245,245,245, 56,115,230, 76,196, 91, 0, 95,229,190, 97,195, 6,183,167,191, 60,243, + 41, 62, 55,208, 62,241,181,162,210, 2, 4, 27, 69,233, 14,203,245,135, 80,163, 64, 61, 1, 98, 94, 60,223, 11, 23, 46,160,172, +172, 12, 53, 53, 53,176, 88, 44, 56,114,228, 8, 28, 14, 7,202,203,203, 49,113,226, 68,159,101,158,155,155,139, 87, 94,121, 5, +107,215,174, 69,109,109, 45,110,185,229, 22,104, 52, 26, 24, 12, 6,244,237,219, 87,242,156, 72, 64,170,252, 31,123,236,177, 30, + 85,243,243,136, 72, 20,168, 39,137, 63, 20,254, 86,171, 21,122,189, 94,246, 84, 8,150,101,163,218,154,249, 18, 37,159, 15,146, + 36,161,211,233,132,145,108,127,101, 47,158, 98,236,201, 89, 92, 54,145,230,238,201,107,253,250,245,110,199,120,254, 13,166,230, + 23,167, 19,149, 22,192,147,188, 63, 95,218,243,216,238, 20,127,168,252,245,122, 61, 0,249, 83, 33,162, 45,126,207,114, 77, 79, + 79,199,172, 89,179, 48,113,226, 68,100,103,103,227,198, 27,111,196,169, 83,167, 48,126,252,120, 28, 60,120, 16,153,153,153,146, +121,219,191,127, 63,230,206,157,139,182,182, 54, 24, 12, 6,108,221,186, 21,229,229,229, 56,122,244, 40, 50, 50, 50, 34, 46,126, +207,124,136,185, 44, 89,178, 36,232, 90,191, 43,244, 19,112, 36, 56, 80, 71,210,243,120,241,254,195,135, 15, 99,199,142, 29, 56, +119,238, 28,170,170,170,144,156,156, 28,181,140,132,195,159,135,120, 42, 4,191, 79,106, 42, 68, 87,240, 23,231,163,168,168, 8, + 38,147, 9,205,205,205,120,251,237,183, 65,211, 52, 38, 77,154,132, 5, 11, 22,224,175,127,253, 43,102,205,154, 37, 76,157,230, +243,102, 54,155, 81, 80, 80,128, 3, 7, 14,192,102,179, 97,215,174, 93,104,110,110,198,170, 85,171,144,146,146,130,228,228,228, +168,138,255,224,193,131,160, 40, 10, 19, 38, 76, 0, 0,172, 91,183,206,109,191,191, 26,223,243, 24,127,215,137,120, 11, 16,140, +120,124, 25, 0,203,178,120,235,173,183,208,210,210, 2,131,193,128,182,182, 54, 84, 87, 87, 11,243,237,163,137, 80,248,243,115, +123,196, 83, 33,120,225, 19, 68,231, 56, 0,191, 63,154, 46,144, 84,153,146, 36,137,228,228,100,164,166,166, 98,222,188,121, 88, +182,108, 25,230,206,157,139,172,172, 44, 44, 89,178, 4,121,121,121, 88,181,106, 21,114,115,115, 65, 16, 4,246,239,223,143,130, +130, 2,252,243,159,255, 68, 92, 92, 28,172, 86, 43,182,110,221,138,173, 91,183, 34, 43, 43,171, 75,106,126,154,166, 49, 98,196, + 8, 97, 94,147,248,225,117,185, 46,115, 87,120, 14, 62, 59,193, 82,196,142, 30, 61,138,207, 62,251, 12,231,207,159, 71, 85, 85, + 21,146,146,146,220, 50,205,147, 95,189,122, 53, 42, 43, 43, 49,104,208, 32,180,180,180,160,161,161, 1,109,109,109, 96, 24, 6, +233,233,209,255,250, 81, 48,157, 45,160,115,110,143,212, 84, 7,241,120, 0,191, 63,218,209, 44,127,188,183,109,219,134, 7, 30, +120, 0,141,141,141,104,108,108,196,220,185,115, 49,121,242,100,108,223,190, 29,155, 54,109, 2, 69, 81,152, 59,119, 46, 14, 28, + 56,128,184,184, 56, 97, 0,108,254,252,249,216,188,121, 51, 94,122,233,165,168,243, 39, 73, 18, 87, 94,121,165, 32,126,130, 32, +176,118,237, 90, 33,111,129,254,202, 21,126,212, 91, 0,126, 97, 24, 6,239,189,247, 30,172, 86, 43,226,227,227, 81, 89, 89,137, +154,154, 26, 28, 60,120, 80,200, 48,255,151, 32, 8,124,240,193, 7, 80,171,213,168,168,168,128,213,106, 69, 93, 93, 29,154,155, +155,193, 48, 12,238,186,235,174,176, 8, 7,130,220,154, 69,170,160,197, 83, 33, 60,197,207,239,239, 10,248,226,125,236,216, 49, +212,212,212, 96,198,140, 25, 56,113,226, 4, 6, 14, 28, 8,163,209, 8,173, 86,139,199, 31,127, 28,171, 87,175, 6, 65, 16,176, + 90,173,176,219,237,104,107,107, 19, 90,128,219,110,187, 13, 55,223,124, 51,142, 28, 57,130,177, 99,199, 70,157, 59,224,254,210, +171,101,203,150, 5,236,139,117,101,205,207, 67,214,108,208,127,252,227, 31,168,173,173,245, 91,163,139,201, 27,141, 70, 97, 54, + 32,195, 48,112, 56, 28,224, 56, 14, 79, 60,241, 4, 86,172, 88, 17,245, 76,201, 21, 63, 95,208,252,220, 30,241, 84, 8, 62, 29, + 0, 94, 83, 33,162,237, 2,249,226,189,116,233, 82,188,249,230,155, 48,153, 76, 24, 54,108, 24,190,252,242, 75,188,250,234,171, +184,231,158,123, 48,123,246,108,212,214,214, 10, 17,162, 93,187,118, 9, 51, 66,111,187,237, 54,168, 84, 42, 20, 20, 20,224,193, + 7, 31,196, 15, 63,252, 16, 21,238,190,242,192,183, 0,190,230, 2,137,207, 9,246, 58, 81, 27, 9, 22, 47, 59,118,236, 0, 77, +211,146, 53,250,188,121,243,188, 44,247,221,119,223,197,226,197,139, 81, 93, 93,141,184,184, 56, 36, 39, 39, 99,249,242,229,184, +242,202, 43,195, 34, 43, 23,114,197,207,139,152,159,219, 35,119, 42, 68, 87,185, 64,158,188, 7, 14, 28,136, 79, 63,253, 20,115, +230,204,193,125,247,221,135,161, 67,135, 98,227,198,141,216,182,109, 27, 26, 26, 26,112,251,237,183,131, 32, 8,108,217,178, 5, +205,205,205,216,186,117, 43, 54,111,222,140,155,111,190, 25, 5, 5, 5,248,250,235,175,221, 34, 92,209,230, 47,206,199,242,229, +203,123, 84,205,207, 67, 86, 39, 56, 46, 46, 14,191,252,242,139, 87,141,190, 98,197, 10,183,103, 50,121, 12, 29, 58, 20,159,124, +242, 73,151,102,196, 31,127,127,226, 23, 67,238, 84,136,174,200,131, 20,247,215, 94,123, 13,247,223,127, 63, 62,251,236, 51,172, + 95,191, 30,151, 93,118, 25, 8,130,192,194,133, 11,177,126,253,122,193,144,203,203,203,177,106,213, 42,100,101,101, 97,227,198, +141, 56,124,248, 48, 30,124,240, 65,100,102,102, 98,235,214,173, 81,231, 46, 85,254,207, 61,247, 92,192,217,160,161, 92, 43,106, + 45,128,152,252, 91,111,189,133,199, 31,127, 92,232, 80,137,107,244,238,178, 92,127,144, 35,126, 49,111,222,165,145, 59, 21, 34, +218, 46,144, 47,238,106,181, 26,155, 55,111,246,218,159,154,154,138,195,135, 15, 11,227, 25, 63,255,252, 51, 82, 82, 82,132,227, +198,142, 29, 27,117,183, 39, 80, 30, 30,127,252,113,191, 21, 83,119, 65, 86, 20,104,232,208,161,248,240,195, 15,123, 28,121, 95, + 8, 54, 10, 20,172,152,187, 35, 10,228, 79, 60, 73, 73, 73,104,104,104, 64,159, 62,125, 0, 0, 25, 25, 25,194,227,144,221, 1, + 41,142,207, 62,251,172, 91,222,248,245, 96, 16,137, 26,223, 19, 65, 77,134,235, 13,226, 15,135,191,220,169, 16, 61,137, 63,191, + 93, 60,177,173,187, 70,223,253,241, 95,185,114,101,143,212,143,172, 78,176,191, 8, 74, 79, 68,176,252,121,151, 70,238, 84,136, +174,158, 11,228, 47, 15,190,142,235, 78,244, 38,253,120,221,197,222, 68, 94, 10,161,240,231,197,236, 57, 21, 66,124,156,120, 42, + 68, 87,186, 64,188, 97, 42,226,247,198, 83, 79, 61, 5,167,211, 25, 86, 26,126, 91,128,222, 38,126, 30,161,242,151, 59, 21, 34, +154, 8,165,214,239, 41,226,231,209, 85,250, 9,247,121, 96,192,199, 23, 98,122,179,248,129,224,249,243,225, 77,185, 83, 33,162, + 29, 14,237,205,226, 7,122,151,126,188, 90, 0,135,195,129,138,138, 10, 55,194, 93, 69, 94,173, 86,135,157, 70, 40,252,121,151, +198,243,173, 16,124,220,154, 55, 2,126, 42, 4,127,252,201,147, 39, 35,206,191,181,181, 21,167, 79,159,246, 18,141,167,224, 61, +183, 69, 2,221, 85,254,145, 66, 40,252, 9,113, 13, 55,105,210,164, 11, 54,155, 45, 42,223,137,149, 11,141, 70, 83,183,119,239, +222,144,102,204,245,118,254,185,185,185, 23,236,118,123,175,229,223, 27,203,159,240, 28,242, 87,160, 32,150, 16,253,167,212, 21, + 40,232,193, 80, 12, 64, 65, 76, 67, 49, 0, 5, 49, 13,197, 0, 20,196, 52, 20, 3, 80, 16,211,240,249, 90, 20, 5, 10, 34,141, +142,239, 8,239, 6, 48, 58, 90,215,160,105,186,174,176,176, 80,118, 24, 84, 49, 0, 5, 93, 2,254, 35,218, 29,223, 65, 70,113, +113, 49, 50, 50, 50,220, 62,184, 46,158, 99, 37, 30, 56,147, 90,247, 28, 88, 35, 8,215,179,208, 51,103,206, 12,106, 28, 66, 49, + 0, 5, 81,135,248, 11,242, 83,166, 76, 25, 2, 0,197,197,197,104,111,111, 71,124,124,188,240,145,108, 57, 19,255,252,237, 63, +115,230, 76,208,220, 84, 6,131,174,192,102,179,175, 96, 24, 86,150, 49, 16, 4, 97,231, 56,174,128,227,184,213, 65, 95, 45, 10, + 48, 24, 12,227,108, 54,219, 88,134, 97,228,246,103, 88, 0,197, 28,199, 29,142, 38, 47,185,232,237,252, 3,129, 23,255,186,117, +235, 52, 83,167, 78, 29,194,111, 39, 73,210,109, 78, 85, 32,113,203, 53,140, 96, 65,218,108,246, 21,101,199,143,170, 28,118, 43, +228, 44,167, 78,158,112, 0, 8,127, 26, 94,132, 96,179,217,198,158, 56,254, 51,105,183,183, 66,206, 82, 94, 94,206, 2, 24,215, +221,188,121,244,118,254,254,192,139,127,237,218,181,218,105,211,166, 13, 17,239, 19,127,161, 51, 28,241,139, 91,141, 80,160, 98, + 24, 86,149, 57,120, 8,218, 90, 27,193, 50, 76,199,230,206,233, 17,158, 19, 37,250,165, 39, 95, 0, 48, 52,164,171, 69, 1, 12, +195,144,131, 6, 15,134,205,218, 4,198,193, 4, 60, 62, 35, 61,197, 10, 32, 62,250,204,228,161,183,243,247, 5,177,248,167, 79, +159, 62,216,115,191,248,219,192,225,136, 63,220,217,166,130,219,195, 48, 78,176,172,143,135, 11, 68, 86,192,114,108,224,187,212, + 13, 96, 28, 12, 88, 56,164,119,138,102, 47, 51,140,179, 71, 78,126,234,237,252,197, 8, 36,126, 0,194, 23,238, 1,223,143, 81, +134, 98, 24,193,194,197,128, 47, 82, 78,188,112,194,199,154,221,254,113,172, 10, 64, 59, 65, 16, 25, 65, 95, 45,218, 96,221, 23, +134, 95,208,185,128, 98, 9, 0, 12, 65, 16,134,238, 35,234, 3,189,157, 63,220,125,126, 95,226, 7, 0,141, 70, 35, 25,201,241, +116,107,130, 53,140, 96,161, 2, 0, 83,115, 29, 74,246,125,140, 54,107,179,203, 22, 56, 81,165, 47,172,187, 86, 40, 74,213,103, +241,226,135,219, 55,108,120,169, 74,165,162,132, 99, 68,135, 19,158, 27, 57, 14, 94,204, 56,142,115,219, 70,145,164, 83,163, 85, + 61,211,218,106, 43, 8, 54, 19, 45, 77, 23, 81, 82,184,195,229, 70,248, 59,144, 5, 8,138,210, 45, 94,252, 16,179, 97,195,198, +255,199,127,209, 92, 26,157, 41, 49,140, 55,127, 79, 80, 20,197,106, 52,228,161,214, 86,251, 79,242,153,187,208,219,249,243, 16, + 71,123,196, 29, 94, 0,176,217,108,168,172,172, 68,117,117, 53, 26, 27, 27,161,213,106, 37,133, 28,110, 71, 56, 88,168, 92,153, + 39, 96, 48,104, 65,145,122,240, 66,119, 25,130, 32,125,215, 95,215,111,227,194, 63,206,197, 99, 15,223, 15,134,115,181,205, 4, +231, 29,155,237,140,215,138,174,198,111,115,219,228,250, 85, 85, 85,165,186,114,194,140, 21, 0, 10,130,205,132,154, 36, 97, 52, +106,161,166,244,194, 54, 22, 0, 24,119, 57,117,252, 82,255,247, 31,111,192, 99, 15,255, 5, 12,239, 91,116,252,161, 36, 10,208, +109, 11,229,181, 91,216, 88, 93,125,134, 28, 63,225,234,177, 0,130, 22, 80,111,231, 47,112,102,217,221, 27, 54,108,160,243,243, +243,135,176, 44,139,218,218, 90, 28, 63,126, 28, 39, 78,156, 64,125,125, 61,226,227,227,145,156,156,140,132,132, 4, 24,141, 70, +183,126, 64, 36,250, 2,161, 64, 5, 0, 78, 39,139, 22,147, 21,214, 86,139,203,245,225,247,186,173, 11,255,225,208,193, 47,161, +209,197,129, 36, 41,247, 22, 2,238,221,103,183, 71, 13,196,173, 4,231,214, 58, 0,224,208,212,220, 2,150,149, 23,138,245,132, +131,101,209,210, 98,133,213,106, 6, 24,248,169, 69, 93, 74, 41, 41,250, 18, 90,109, 7,127,184,185,216, 34, 48, 96,124, 61,249, + 40,113,129,166,150, 22, 4, 17,202,116, 67,111,231, 47,194,232,236,236,108,108,218,180, 9,229,229,229,160, 40, 10,105,105,105, + 72, 73, 73, 65,255,254,253, 65,211, 52, 84, 42, 21,104,154,134, 86,171,133, 74,165, 18,250, 2,145,234, 8, 7, 11, 21, 0,144, + 20, 1,131, 65, 3,138,208, 74,138, 83,122,221, 9,116,116,218,196, 45, 4, 33, 58,151,112,115,131, 56,209,118,215, 89, 28, 0, +162, 35, 93,130,179, 7, 77,158, 7, 69, 2,250, 56, 13, 72, 82, 15,136, 98,203,110,247,159, 17,254,235,248,223, 33,240, 39, 37, + 78, 96, 1, 80,110,189, 79,183, 63,240, 82, 17,107, 11,145,125,239,231, 47,134,217,108, 70, 92, 92, 28,242,243,243,145,152,152, +232,226,231,241, 14, 80,181, 90, 13,154,166,161,209,104, 64, 81, 20, 24,211,175, 40,127,249,143,176,212,158,130, 46,181, 31,250, + 93,115, 31,250, 95,243,167,174,139, 2, 49, 78, 22, 38, 83, 43,172, 22,139, 80,143,187,215,222,156,100,205, 46, 54, 10,215,111, + 79,227,113,107, 56, 60,210,117,191,134,217,210, 22, 52,121, 30,140,131,129,185,197, 2,171,197,210,113,203, 61,110,174,140, 90, + 21,112,211,158,248, 84,209,201,190, 83, 49,155,219,229,145,149, 64,111,231, 47,134,193, 96, 64, 78, 78, 14,152, 14,247,173,211, + 21,238,124, 11, 31, 69, 81, 80,171,213,194,223,218,239,223, 69, 60,247, 43, 38,255, 97, 38,172, 86, 59, 14,125,253, 50, 90, 43, + 15, 35,235,191, 94, 4,225,225, 38, 69, 58, 10,212,209, 2,144, 48,232, 52, 32, 56,109,199,102,119,113,250,111, 21, 60,143,247, + 45,114, 78,212,187,246,236, 99,216,237, 97,188,223, 69, 77, 65,175,215, 0,208,116,110,115,171, 13,189,107, 66,247, 85,207,218, + 80,114,213,245,203,171, 38,117,193,102,243, 17,194,148,131,222,206, 95, 4,222,197,145,122, 17,174, 88,180, 20, 69, 9,211, 31, +250, 78,188, 25,199,254,253, 22, 26,207,213,162,239, 37,227,144, 55, 39, 13, 71,126, 44,198,145,167,102,227,210,165, 31, 65,147, +144, 42,187, 35, 28, 52, 95, 0, 96,156, 12, 90,204,109,104,181, 88, 0,248, 18,185,184, 54,247, 45,108,241, 73, 82, 29,105,222, +245, 17,210,233, 88,111,181,134,222, 2,176, 14,166,195,135,118,241,247,245,214, 18,198,253, 63, 63, 9,138,255,120, 39, 38,149, + 78,123,123,232, 46, 68,111,231, 47, 6,239,215, 3,238, 31,200, 16, 11,223, 51,220,105, 24, 48, 18,163,150,126,140,146,231,239, +192,104, 7, 48,224,242,201,184,252,154, 25,168,248,169, 8, 63, 45,155,140,203, 86,236, 68,220,160, 75,162,210, 17,118,181, 0, + 36, 9,189,222,213, 2,136,197,233,202,132,235, 64, 95,181, 55,159,209,206, 51,208,233, 50,137,211,233,248,143,115, 75,164, 51, + 93,135, 35,244, 22,128,164, 40,232,245, 90,184,213,160, 0, 14, 20,151, 99, 79,225, 73,152,173, 54, 56,108,237,176,182, 59, 96, +179, 57,208,222,110,131,205,214,142,246,246,200,212,122, 60, 58,110,238, 66,169,125,106,181,154,205,201,201, 42, 43, 46, 62,246, +227,111,141,191, 24, 4, 0, 10, 53, 0, 0, 17,191, 73, 68, 65, 84,226,112,164, 88,160,156,195,134,179,239, 46,131,233,248,143, + 96,108, 54,112, 28,235,210, 9,203,186,214, 1, 16, 36,137,159,127, 58, 9, 34, 33, 3, 3, 46, 25,133,161,227,174, 66,124,114, + 18, 74,158,156,133, 81, 15,252, 19,125,175,156,237, 55,252, 25,122, 11,192, 48, 48,153,172,104,181,180,186,251,254, 98,209,139, + 5,223,241,191,103,132, 72,236,239,187, 27,140,111,215,135, 95, 55,183,134,238,131,178, 12,131, 22,139, 21, 86,179,213,109,251, +158,194, 50,124,248,225,199, 72, 77,237,214, 55,117, 0, 0,206, 84,158, 33,115, 46,155, 48, 18,128,151,128,122, 59,127, 49,196, +174,136, 88,164, 23,190,122, 13,134,246, 26, 92,126,211,181, 80,209, 52, 8, 82, 5,130, 82,117,252,165, 0,130, 2, 8,210,181, +168, 52,224,156, 54,192, 97, 69,159,223,141, 64, 94, 82, 31, 28,120,253, 47,104, 61,187, 8, 67,127,191, 68, 82,252, 97,183, 0, + 6, 61, 13,112, 90, 55,113, 30, 58,114, 26, 63,236, 43,131,181,205, 14,155,205, 1,187,221, 1, 91,199,226, 90,119,194,102,115, + 8, 29,158,112, 65,146, 36, 75, 16,132,228, 80, 63, 65, 16,109, 28,199,173,224, 56,238, 5,175,243, 0, 24,245, 26,128,209,186, +109, 87,171, 73,164,166,166,162,241,226, 47,112, 48,145,173, 45,131,133,181,165, 30, 14,135, 67, 50,204, 24,152,127, 25, 88, 38, + 50,157,212, 80,225,143,191, 39, 60, 13,128, 36, 73,176,246, 54,232,245, 58,208,176,129, 96, 24,128, 83, 1,156, 26, 32, 85,224, +160, 5,152, 86,128, 84,185, 12,193, 97,117,233, 80,173, 5,156, 54, 24, 18, 19, 48,249, 15, 55,163,248,203,119, 96,169, 60,138, +203, 22,191, 3,130,144, 14,157, 6,139,206, 22,192, 98,133,197,212, 10,113,205,190,191,184, 28,239,125,176, 3,169, 41,169, 65, + 39, 28, 34,124, 22,112, 77,109,141, 46,123,212, 21,107, 0,120, 25,128,131,101,209, 98,182,194,220, 98,133,187,127, 76,129, 1, +224,112,216,224,112, 88, 61, 79,235, 82,248,187,190, 63,254,252,185,172,163,123, 13, 32,152,242,147,234,244,166, 77, 91,128,202, + 45, 15,227, 68,201,215,110, 35,161, 36,165,198, 37,179,254,128, 65,253,141, 32,193,130,160, 84,112,201,128, 5,199, 56, 1, 16, + 0, 99,135,154, 0, 38,220,112, 61, 14,253,251, 59, 28,255,231, 99,184,116,209,139, 97,139, 31, 16,181, 0, 58,157, 6,156,211, +229,131,242, 46, 11, 77,107, 92,239,200,175, 43, 5,227,236,222, 27, 96, 51, 91,224,112, 58, 37,223,125, 71,145, 36,244,122, 53, +224,112,241,231, 71, 72, 53, 90,254,240,224, 90,168,214,214,118,234,182,249, 75,238,254,240,221,181, 91, 12, 6,173,159,147,131, + 72,215,207,161,254,248,243,145,127, 70,162, 51,235, 15,255,251,229,143,253,223,125,239,139, 73,167, 42,170,178,109,237,118,131, +205,238,212,165, 36,199,159,203, 28,216,175,226,134, 27,166, 29,188,243, 15,215, 86, 6,149,160,204,172,250,234,164,234,210, 6, + 35,123,249, 78,161, 69,176, 55,212,162,116,253,157, 24, 49, 97, 50, 50, 6,247, 1,103, 51,129,160,104, 16,201, 67, 65, 14,201, + 7, 17,159, 1, 16, 36,184,230, 42,176,167,190, 1,123,254, 48,208,214,136, 49, 83,167, 96,239,206, 93, 56,251,245, 88,100,206, +186, 39, 44,241, 3, 66, 11,192,194,108,178,194, 98,110,117,243,203,217,142,206,137,211,209, 6,167,195, 51, 74, 35,233,169, 68, + 13, 38, 83,179,207,125, 12,203,194,220, 98,133,197, 98,113, 15,110, 48,162,152, 95, 16,110,218, 29, 11,150, 46, 56, 89, 94, 53, +238,142, 5, 75,153,207, 62,220,176, 37, 84,206, 98,176,126, 4, 28, 73,254, 53,181, 23,181,127,186,255,111,127,172, 56, 83,227, +245, 45,212,139,191, 54, 13,190,248,107,211,224,162,146,210,233,255,243,254, 23, 7, 86, 63,185,104,199,232, 81,195, 77,225,242, +247,132,191, 89,158, 36, 73,194,124,234, 39,148,191,122, 31, 46,159,115, 35,146, 18,105,112,173,191, 2, 42, 45,136, 33, 83, 64, +101,205, 1, 33,126, 52, 50,109, 52,200,190,163,192,156,248, 2,206, 35,219, 65,181,215, 99,252,172, 25,216,243,246,227, 24,116, +245, 93, 32,213, 26, 95, 52,228,113,117, 17, 38,160,215,209,208,235, 53, 48,232, 53, 48,232,181,208,235, 53,208,105, 93, 31, 93, +115,205, 10,101,187,117, 1,231,251, 6,184,106, 80, 23,103, 99,199,162,215,107,160,213,187,124,106,214,115,154,165,159,101,233, +170,141,147, 79, 85,156, 29,195,113, 28,121,170,226,236,152,165,171, 54, 78,150,123,174,255,197,183,128, 35,201,255,238, 69, 79, +221, 35, 37,126, 15, 16,199,203,206, 76, 88,176,240,169,197,199,126, 41,143, 15,151,191, 91,194,126, 98,244, 36, 73,226,226,143, + 31,161,226,159,127,193,132,155,111, 69,146,222, 14, 88,235, 93,247, 54,126, 0,136, 97,215,130, 97, 89,148, 86,214,227,227,255, +156,196,182, 47, 75,241,195,207, 53,176,218, 28,192,240, 89,224,172,141,112,254,252, 62,232,243,133,232, 51,112, 16, 46,150,124, + 35,139,147, 63,116,182, 0,150, 54,152, 76, 86,239, 57, 59, 28,231, 34,232, 71,128, 82,224, 34,220, 66,112,254,106, 80, 7,139, + 22,139, 21,150, 22, 15, 63,149,101,248, 89,101, 96,101,220,192,175,191, 61,144,254,213,238,125,179, 29, 14,167, 14, 0, 28, 14, +167,238,171,221,251,102, 79,155, 58,182,252,154,233, 87, 93, 8,135,191, 63, 4,230,223,241, 83, 70, 30, 30,252,243,109, 59, 31, + 91,246, 82, 54,195,176,234, 97, 67, 7,254,116,253,156,188, 31,114, 39,142, 62,103,212,235,156,187,191, 43, 26,180,235,243, 31, +243, 78, 85,156,189, 2, 0, 76,230,214,190,119,223,255,183,135,118,127,254,210,179,241, 70, 67,120, 95,154, 16, 65, 42, 10, 68, + 18, 4, 42,223, 43, 64, 91,121, 33, 38,221,124, 19,104,219,175,224, 28, 78, 16, 36, 5, 16, 12,184,193,249, 96, 88, 14, 21,231, +154,241,213,193,106, 56, 25, 22, 37, 39, 47,226, 84,109, 51,254,235,250, 81, 88,112,205, 72,112, 19, 31, 1,202,191, 2,103,185, +136,126,253, 47,195,217,221, 91,208,239,170,235,194,226,218,209, 7, 32,160,213,209, 96,156,180, 56,242, 9,157,150,239, 19,116, +198,106, 35,135, 32, 13,196,223,245, 41, 64,175,209,128,213,187,119, 17, 52, 26, 45, 4,217, 4,160,223,216,100, 86, 63,249,244, +230, 63, 89, 90,219,220, 62, 18, 96,105,109, 75,121,242,233,205,127,186, 98, 76,246,218,228, 36, 99,200,161, 36,198,223, 55, 5, +252,242, 7, 0, 6,172,204,231,144,174,187, 58,247,220,161,146,147,111, 3,192,202,165,127, 44, 18,239, 27,122,247,128,227,247, +221,125,243,241,213, 27,222,249,105,235, 59,159,255, 23,199,113,100, 83,147, 57,163,224,239,111, 78,222,176,250,193,239,252, 38, + 44,243,155, 8,158, 97, 80, 62, 2, 84,250,210,221, 48,210, 44,174,186,118, 26, 40,214,138, 54, 58, 29, 78, 66,131, 56,107, 57, + 8, 16, 96, 13,253,192, 57,157,216,247,203, 5,156,107,104, 69,113,217, 5, 88,218, 92,197,253,225,119,229,184, 53,111, 48, 52, +125,115, 64, 18, 36,184,182, 38, 36,100,196,227,248,225, 34,127, 84,100,129, 4, 92, 45,128,197,210, 14,147,169, 13, 45,102, 43, + 76, 29, 11,195,176,252, 67, 48, 81, 88, 56, 25,139,251,241,190,192, 50, 12, 44, 86, 43,204,102, 27, 90,204, 86, 97, 17, 68,195, + 6,110,226,231,221,179,234, 79,109,109,237,241, 6,131,174, 65,156,182,193,160,107,104,107,107,143,159,119,207,170, 63,185,218, +145,208, 22,191,179,121,252,242,103, 59,140,199,247, 98,179,181,147, 31,124,188,123, 48,255,123,229,210, 5, 69, 43,151, 46, 40, +242,117,252,242, 71,230,149,204,156,118,197, 78,254,250,223,124,123,112,142,205,214, 78, 30, 63, 81, 97,252,223,175, 10,251, 75, +157, 19, 76, 24, 65,236,242,216,155,206,227,231, 85, 87, 35, 61, 85,143,156,241,217,160,156,173,104,110,105,199,119, 91, 94, 3, +107,109, 2, 8, 10, 28, 99, 7,227,116,130, 97, 24,212,254,106,198,247,135,207, 10,226, 7, 0, 45, 77, 1, 28, 11,135,195,193, + 95, 0,148,154,134,163,205, 18, 4, 43,105, 8, 45,128, 78,171,134,211, 78, 67, 60, 98,165,211,209, 29,235,209,104, 1,130,131, + 63, 3, 32, 41, 10, 26,173, 26, 14,155, 26, 64,103, 45,170,215,119,214,160,129,198, 42, 62,255,120,237,107,252,250, 37,227,230, +189,206,175, 23,239,217,252,184,112, 80, 56,227, 29,126, 78, 13,151,255,226, 21, 47, 79,255,110,207,161,217,159,127, 85,184,247, +173, 77,203,254, 69,146,100,192,230,245,169,199,239,253,246,187, 61, 37,215, 57,157,140,166,221,102,143,159,124,237,253,171,218, +172, 54,227, 93,119,206,122,103,214,204, 43,207,121,243,151,159,119,222, 0,218, 47, 86,225,216, 51, 55, 32, 39, 63, 15,233,125, +227, 0,214,137,186, 11, 45, 56,242,159,239, 17, 55, 96, 4, 28,173, 45, 32, 18, 40,112,237,173, 96, 27, 78,161, 13,122, 12,239, +175,135,231,173,158, 62,166, 31, 24,198, 9,212,254,228,242, 4,212,122,216, 29, 28,116,201,225, 15, 16, 10,125, 0,139,165, 13, + 38, 97, 36,210, 53,215,135, 97, 59,134,171, 59,106,227,238,132,191,235,179, 12, 3,171,217, 6,179,104, 36,149, 5, 58, 69, 35, +199, 7,242,157,122,136,231,201, 79, 71, 30,127,105, 56,156, 78,162,168,228,196, 4,155,221, 17, 87,244,211,241, 25, 87,223,240, +240,224, 87, 95,124,236,141,172,161, 3, 37,171,199,186,186, 70,205,194,191,174,157,223,216,104, 74,227, 56, 78, 8,183, 52, 55, + 91,250,245,237,147,120,250,209, 7,239,240,241,186,149,224, 92, 32,130, 32, 80,254,250,159,145, 51,121, 18,210, 18, 9,112,148, + 26, 85,167, 47,160,226,200, 49, 92,185,250, 59, 92, 60,248, 57, 26,203,191, 66,106,223, 75, 0,243, 5,224,135,213,176, 93,251, + 38, 38,100, 37,225,246,252, 76,124,123,164, 14,118, 39,131,137,151,244,193, 13, 19,250,195,225,112, 64,115,240, 69, 0, 0,153, +152,137,230, 38, 51,146, 70, 78,148,197,201, 31,132, 22, 64,163, 85, 67,111,231,163, 62, 0,192, 65,175,227,127,247,132, 22,192, +247,245, 73, 0,106,173, 26,250,142, 56,186,203, 93,101, 93,177,117,184,220, 8,132,250, 44,127,132,222, 1,224,207,135,247,207, +223,181,238, 75,128, 79, 63,251, 86,110, 83,179,185,159,235, 60, 86,117,238,124,253,136,187,238,253,219,226,249,183, 95,253,241, + 3,247,221,122,212,243,248,180,180, 68,219,204,169,227, 14,190,251,193,238,223, 51, 12, 43, 52, 55, 36, 73, 58,243,115,199,252, +232,235, 58,193, 56, 65,188, 1, 56, 77,191, 34,121,192, 36,112,156, 29, 39,142,156, 64,253,197,102,140, 95,179, 7,234,184, 68, + 12,152, 62, 31,251, 62,127, 5,131, 71,143, 6, 89,251, 19, 84,109, 77,208, 22,254, 29,230, 43,151,226,150,220,254,184, 37,183, +127,103, 95, 2, 44,212, 7, 95,132,186,250, 63, 0,169, 2,219,111, 28, 78,254,239,247,152,180,250, 37,217,156,124,193,245, 68, + 24,223, 7,224,107,160, 14, 3,112, 58, 88,215,143, 16,162, 64,129, 16,108,140,200,159, 1, 56, 88,192,106,110, 71,139, 91, 20, +133, 5,239, 50,178,108,176,195, 72,226, 84, 34,133, 80,249,119, 60, 14,239,195,128,246, 20, 30,201, 19, 63, 73, 71, 81,164,131, + 86,171,108,223,252,231,167,241,183,221, 56,229,100, 90, 90,146,215, 52,207, 7, 22,222,116,244,218, 25, 87,156, 89,244,240, 11, + 11, 47,212, 53, 13,101, 89, 86,149,152, 24,119,126,229,210,187, 10,125, 26,170,204,130, 16,183, 0,241, 35,115,113,224,255,190, +129,195,106,129,113,216, 21,184,252,111, 31,128, 82,187, 30,134, 87, 27, 18, 48,112,246, 66, 84,252,242, 3, 70,102, 92, 1,166, +226, 27,196, 29,123, 11,244,133, 98, 88,114, 22,194,158,154, 3,150,160, 64, 55, 28, 69,220, 47,111, 67,115,126, 31, 0,128, 28, + 48, 30, 53,181, 77,232,115,217, 12,196,101, 12,151, 71,202, 15, 68,125, 0, 26, 14, 59,237,166, 76,157,142, 6,135,158,209, 2, +120, 57,134, 34, 80, 36,160,213,171,225,112,184, 71, 81,244, 90,181,104, 80, 41, 68,254,161,158,231,153,140,223,145, 96, 63,252, +225,106, 17,164, 6,162, 54,188,252,209,101, 45, 45,173,125, 19,227, 13,231,155, 77,173,253, 0,128, 32, 8,246, 95,239, 61,189, +142,143, 88,249, 26,192, 26, 54,180,191,229,203,157,107, 94,184,247,254,231,111, 62,114,180, 98,210,149,151,143,216,175, 86,147, +156,111,165,203, 47, 7,222, 0, 70,222,247, 50,172, 53,101,160,141,201,208,166,244,247, 26, 23, 24, 50,247,207,248,254,254,215, +144,144,156,139,126,163,255, 0,230,196, 23,160,235,127, 70,242,183,127,145, 40, 36, 26,212,176,153,104,114, 38,224,196,193,111, + 49,125,211, 33,217,124,252, 65, 5, 0, 44,195,194, 98,109,135,217,220, 57,218,203,193,213, 55,112,245, 1,196,157,208,174, 29, + 1, 22,248,248, 49, 64,134,101, 97,182,218,208, 98,113,143,163, 59,120,241, 50,242, 7,114, 0,128,166, 85,173,118,187,211, 0, + 0,159,127, 85, 56,224,250,107,175,170,113,187,158,236,148,228,157,229,151, 63,223,127,145,176,160,236,172,204,139,255,179,121, +121,193,144,193,233,173,185, 87, 63,180,166,221,102,143,119, 58, 25,205, 83,207,108,157,254,226,154,251,191, 10,196,136, 2,184, + 45,175, 60,250,201, 71, 59,247,148,220, 48,103, 98,181, 63, 43, 13,102,194,163, 56, 10,100,204, 28,229,123,254,190, 70,135,188, +117, 63,160,248,239, 55,163,185,111, 50, 70, 92,182, 0,196,133, 18,112,230, 11,224,204,231, 1,150, 1, 17,151, 6,194,216, 15, + 68,122, 14, 42, 79,159, 71,229,177,125,200, 91,243,111,104,147, 67,250,142,159, 23, 72, 0, 32, 72, 2, 90,141, 10, 58, 45, 13, +157, 86, 13,173, 86, 13,157, 70, 13, 93, 71, 13, 20, 94,248, 50,130,163,193, 62,115, 65, 66,175, 38,161,215,104,161,215,168, 59, +151, 14,254, 12, 24,183,119,235, 4, 90, 18,226, 13, 23,249,164, 55,109,222,117,227,174,175, 14, 12, 16,239,143, 56, 2,241,103, +164,121, 94, 61, 99,220,185,225, 89, 3,205, 42, 90,205, 78,155, 50,230, 11, 62,185,127,239, 57,124,211,154,141, 31, 93,238, 43, +127,207,108,120,255,202,191,173,251,159,171,248,223,183,220,148, 95,169,162,213,172,191, 50,145, 11, 57, 79,110,137,247,233, 82, + 51, 48,121,195, 62,112, 41, 35,241,227,174,175, 80,209,148,136,166,164, 60, 48, 87, 60, 0,118,194, 35,104, 73,191, 6, 85,214, +126, 40,252,247, 65, 52, 90, 40, 76,127,245,103,196,103, 70,238,131,229,157, 45, 64,107,187,240, 92, 46, 63, 25,206,238,100, 59, +126, 69,218, 5, 10,190, 21,241,123,125, 7, 11,139,213, 6, 75, 71, 13,202,223, 48,135,184,214, 10,226,227,214,151,102,255,238, +208,183,123, 14, 13, 1,128,170,179, 23,115,150, 63,185, 57,103,249,147,155, 37,143,253,185,240,245,255,150,151,106, 56,252, 25, +255,231, 3, 88,185,100,222, 15,251, 15, 30,159,220,212,108,201,224, 56,142,220,182,253,235,255,222,187,239, 88,241,245,215,142, +255,113, 90,126, 78,181,213,106, 87,237, 59, 88,218,255,139,221, 69,147, 43, 78,159, 31, 7,128,163,212, 4,179,244,161,219,139, +195,230,239,129,160,223,240,160, 82, 35,231,254,141, 48,159, 45, 67,195,177, 31, 81,115,120, 55, 26,190,221, 14,142,113, 34, 41, +235, 10,164,140,189, 6, 99,110,204, 67,210,240,200,191, 18, 85, 5,116,180, 0,180, 26,118,173,218,109, 50,156, 94,199,191,227, +170,179, 19,220, 53, 14,144,212, 85,252,143,164,106,212,106,104, 52,158, 62, 52,127, 86,112, 46,208, 51, 79, 44,248,230,250,219, + 43,198, 53, 52,154, 50, 3, 31, 45, 51, 93,127,209, 36, 57,252, 3, 68,163,140,122,218,185,105,195, 3,255, 88,248,224,139,139, +205, 22,107, 95, 0,168, 56,125,238,138, 23, 95,221,121,197,139,175,238,148, 58,133,248,225,199, 99, 19,150, 62,248,123,153, 6, + 16,222, 92,160, 64,207,242, 18, 4,129,132,204,108, 36,100,102,227,119,215, 73, 62,148, 22, 21,144, 4, 65,176,237,237, 54,180, +181,219, 97,182,180,193, 98,105,131,197,226,106, 13, 56,182,195,165, 97,157,238,147,210,162,190,112, 94,139,211,233, 4, 65, 16, + 82, 86,192,217,218,219, 97,181, 57, 96,177,182,187, 22, 75, 59, 44, 22,107,135,102, 92, 35,136,193, 44, 52, 77, 50,255,122,119, +229,154,105,121, 57,159,244, 73, 77, 56, 67,171, 85,173,190, 10, 80,110,154, 86,215, 51,183, 82,150, 29,144,191,220, 80,236,168, +145, 3, 77,111,188,244,192,186,145,195, 7,236,247,113, 45, 1, 67, 50,211, 15,189,254,210,131,210,205,154,143,124, 6, 74,147, + 71, 40,226, 15,103, 74,115, 56, 80, 25,244,154, 95, 79,148,157, 72,235,155,214, 31,214,214, 70, 97, 46, 16,195, 48, 72, 73, 27, + 8,198,233,128,169,165, 81, 56, 33,208,135,181,229,124,119, 59,208, 68, 57,207,107,112, 28,135,242,138, 90,104,181,244, 89,207, + 99, 13, 6,109,123, 89, 89,185, 46,173,111, 63, 88,173,141, 66, 69,197,178, 14,100,244,205, 0,227,112,160,165,165, 62, 48, 41, + 15, 16, 20,152,167,159,152,255, 21, 0,191,157, 73,171,156,135,201, 89, 6,149,213,231,161,211,209, 94,134, 20,144, 63,203,160, +197,220, 36,155,247,144,193,233,166,173,175, 63,186,101,231,231,251,190,251,191,221,197,227,107,106,235,135, 54,183, 88, 50, 84, + 42,170, 77,163, 81, 91,134, 14, 78, 47,253,253, 13,121,123,103, 76,205, 57, 7, 0, 86,171,188, 7, 93, 42, 42,206,195, 32,193, + 95, 10,189, 69,252, 0,160,210,106,212, 37, 31,239,216, 49,251,207,247,223,139,227,165,135, 93,115, 50, 88, 14, 14, 7,131,153, +179,167,163,169,241, 28,204,226,232, 68, 32, 3,144,113,209,192, 70,228,109, 0,133, 7,142,183, 51, 12,187,207,243, 88, 61, 77, +215,239,248,100,199,192, 69,139,238, 69, 89,217, 97, 48, 14, 7, 28, 44,224,112,176,152, 49,107, 38,154,154,106, 96,181,118,239, +195, 60, 96, 89, 20, 30, 56,193,112, 28, 91,231,185,203, 47,255,235,102,162,165,177, 86, 38,127,247,198,241,154,233, 99, 42,175, +153, 62,166,210,215,209,178, 12, 87,148,244,190,226,147, 12, 35,193,223, 19,189, 73,252, 0,160,210,171,201,191,124,188,227,179, +147,191,191,245, 22,234,206,187, 30,193,201,178, 18, 48, 12,131,172,145, 99,209,167, 79, 95, 28, 41,250, 20,182,246,206, 41, 18, +129, 16,168, 5, 8, 36,126,169, 99,206,214,214,227,227, 79,247, 58,236,118,231,147,158,199, 38, 16,170,189, 31,237,248,236,246, + 91,111,185,137,184,253,174, 71, 81, 94, 86, 2,134,113, 32,107,228,229,232,155,154,134, 35,197,187,130,124,229, 71,228,227, 60, +181,181,245,248,104,231, 94,214,225,112,122,249,219,126,249,167,245, 67,217,225,207, 96,179,186,119,142,187, 26,213,213,245,120, +127,199, 30, 73,254, 82,144, 35,252, 80, 94,100, 27, 13, 16, 28,199, 97,208,160,212, 69, 13,245,150,141,119,222,113, 3, 53,247, +250,235,144, 53,252,119,104, 53,215,227,116,121, 17,236,182,206,218, 95,142,120, 3,217,136, 44, 3, 0, 7,134, 97,113,225, 98, + 51,142, 28,171,108,219,249,249, 65,134, 97,157, 15, 57,157,220,155, 82,199,103,102,166,100,215,215, 91, 39,253,191, 59,230, 18, + 55,204,189, 14,195,135, 14,133,213, 90,143,202,242, 98,180,183,119,207,179,192, 44,203,224,124, 93, 11, 74,142,156,113,238,216, +181,143,115, 56, 28,251, 56,142, 43,147, 58,182,147,255, 77,196, 77,115,175, 67, 86,214, 96, 88,173, 77,168,174, 40,129, 35, 66, +252,131, 53, 30,150,101,112,254,124, 19, 14, 29, 57,229,124,239, 95,254,249,243,184,226,138, 43,184, 3, 7, 14,192,102,179,117, +139,248, 79,158, 60,137,121,243,230,161,184,184, 88,118,179, 66,240,130, 76, 72, 72, 24,166,166,216,151,219,237,206,203,172, 86, + 91, 31,241, 68,169,238, 0, 65,128,165,105,245, 89,150,101,247, 57, 28,204,147, 28,199,157,244,119,124, 74, 74, 74, 60,197, 57, +243,172,118,123, 74,107,107,187, 22, 8,252, 74,240, 40,131,211,209,116, 43,199,178,117,237, 78,103, 49,199,113, 45,254, 14,238, +237,252,129, 78, 3,176,219,237,221, 82,243,135, 98, 0,194, 28,146,150,150,150, 83, 0,102, 69,133, 89, 23,160,161,161,193, 4, +224,139,128, 7,246, 80,244,118,254, 60,236,118, 59, 78,157, 58, 37,233,231, 71,219,237, 81,171, 37,223,153,224, 23,202,103, 82, + 21, 68, 12, 26,141,166,110,242,228,201,221,250, 22, 47,141, 70, 19,176,163, 46, 6, 33,203,175, 87,160,224, 55,138,158,209, 21, + 87,160,160,155,160, 24,128,130,152,198,255, 7,109, 43,244, 49, 78,182, 48,112, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130, 0}; diff --git a/source/blender/editors/gpencil/Makefile b/source/blender/editors/gpencil/Makefile index bb76c9c2b23..f4c1cd246f4 100644 --- a/source/blender/editors/gpencil/Makefile +++ b/source/blender/editors/gpencil/Makefile @@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS) CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(OPENGL_HEADERS) -CPPFLAGS += -I$(NAN_BMFONT)/include CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include CPPFLAGS += -I$(NAN_ELBEEM)/include diff --git a/source/blender/editors/gpencil/SConscript b/source/blender/editors/gpencil/SConscript index 6c47b2f69ff..af3cbdb901d 100644 --- a/source/blender/editors/gpencil/SConscript +++ b/source/blender/editors/gpencil/SConscript @@ -5,7 +5,7 @@ sources = env.Glob('*.c') incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' -incs += ' #/intern/guardedalloc #intern/bmfont ../../gpu' +incs += ' #/intern/guardedalloc ../../gpu' incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern' env.BlenderLib ( 'bf_editors_gpencil', sources, Split(incs), [], libtype=['core'], priority=[45] ) diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index b467450673d..e5868338f75 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -37,8 +37,6 @@ #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" -#include "BMF_Api.h" - #include "BLI_arithb.h" #include "BLI_blenlib.h" @@ -53,6 +51,7 @@ #include "BKE_blender.h" #include "BKE_context.h" #include "BKE_global.h" +#include "BKE_gpencil.h" #include "BKE_sequence.h" #include "BKE_utildefines.h" @@ -102,7 +101,7 @@ void gp_ui_renamelayer_cb (void *gpd_arg, void *gpl_arg) bGPdata *gpd= (bGPdata *)gpd_arg; bGPDlayer *gpl= (bGPDlayer *)gpl_arg; - BLI_uniquename(&gpd->layers, gpl, "GP_Layer", offsetof(bGPDlayer, info[0]), 128); + BLI_uniquename(&gpd->layers, gpl, "GP_Layer", '.', offsetof(bGPDlayer, info[0]), 128); gpencil_layer_setactive(gpd, gpl); scrarea_queue_winredraw(curarea); @@ -132,8 +131,10 @@ void gp_ui_delstroke_cb (void *gpd, void *gpl) { bGPDframe *gpf= gpencil_layer_getframe(gpl, CFRA, 0); + if (gpf->framenum != CFRA) return; + gpencil_layer_setactive(gpd, gpl); - gpencil_frame_delete_laststroke(gpf); + gpencil_frame_delete_laststroke(gpl, gpf); scrarea_queue_winredraw(curarea); } @@ -871,6 +872,7 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy glDisable(GL_LINE_SMOOTH); // smooth lines /* show info for debugging the status of gpencil */ +#if 0 if ( ((dflag & GP_DRAWDATA_NOSTATUS)==0) && (gpd->flag & GP_DATA_DISPINFO) ) { char printable[256]; short xmax; @@ -904,10 +906,10 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy /* only draw it if view is wide enough (assume padding of 20 is enough for now) */ if (winx > (xmax + 20)) { - glRasterPos2i(winx-xmax, winy-20); - BMF_DrawString(G.fonts, printable); + BLF_draw_default(winx-xmax, winy-20, 0.0f, printable); } } +#endif /* restore initial gl conditions */ glLineWidth(1.0); diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c index 33ab06c0f67..beb4ed06810 100644 --- a/source/blender/editors/gpencil/editaction_gpencil.c +++ b/source/blender/editors/gpencil/editaction_gpencil.c @@ -33,8 +33,6 @@ #include "MEM_guardedalloc.h" -#include "BMF_Api.h" - #include "BLI_arithb.h" #include "BLI_blenlib.h" @@ -51,6 +49,7 @@ #include "BKE_utildefines.h" #include "BKE_blender.h" #include "BKE_fcurve.h" +#include "BKE_gpencil.h" #include "BIF_gl.h" #include "BIF_glutil.h" @@ -67,6 +66,8 @@ #include "gpencil_intern.h" +#if 0 // XXX disabled until grease pencil code stabilises again + /* XXX */ static void actdata_filter() {} // is now ANIM_animdata_filter() static void BIF_undo_push() {} @@ -506,7 +507,8 @@ void paste_gpdata (Scene *scene) ScrArea *sa; /* get area that gp-data comes from */ - sa= gpencil_data_findowner((bGPdata *)ale->owner); + //sa= gpencil_data_findowner((bGPdata *)ale->owner); + sa = NULL; /* this should be the right frame... as it may be a pre-existing frame, * must make sure that only compatible stroke types get copied over @@ -737,3 +739,4 @@ void mirror_gplayer_frames (bGPDlayer *gpl, Scene *scene, short mode) } /* ***************************************** */ +#endif // XXX disabled until Grease Pencil code stabilises again... diff --git a/source/blender/editors/gpencil/gpencil.c b/source/blender/editors/gpencil/gpencil_edit.c index 7a251f2c252..bad86c170ab 100644 --- a/source/blender/editors/gpencil/gpencil.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -1,5 +1,5 @@ /** - * $Id$ + * $Id: gpencil.c 19758 2009-04-16 13:10:08Z aligorith $ * * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -33,8 +33,6 @@ #include "MEM_guardedalloc.h" -#include "BMF_Api.h" - #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" @@ -58,6 +56,7 @@ #include "BKE_context.h" #include "BKE_curve.h" #include "BKE_global.h" +#include "BKE_gpencil.h" #include "BKE_image.h" #include "BKE_library.h" #include "BKE_utildefines.h" @@ -88,251 +87,8 @@ static int get_activedevice() {return 0;} #define L_MOUSE 0 #define R_MOUSE 0 -/* XXX */ - /* ************************************************** */ -/* GENERAL STUFF */ - -/* --------- Memory Management ------------ */ - -/* Free strokes belonging to a gp-frame */ -void free_gpencil_strokes (bGPDframe *gpf) -{ - bGPDstroke *gps, *gpsn; - - /* error checking */ - if (gpf == NULL) return; - - /* free strokes */ - for (gps= gpf->strokes.first; gps; gps= gpsn) { - gpsn= gps->next; - - /* free stroke memory arrays, then stroke itself */ - if (gps->points) MEM_freeN(gps->points); - BLI_freelinkN(&gpf->strokes, gps); - } -} - -/* Free all of a gp-layer's frames */ -void free_gpencil_frames (bGPDlayer *gpl) -{ - bGPDframe *gpf, *gpfn; - - /* error checking */ - if (gpl == NULL) return; - - /* free frames */ - for (gpf= gpl->frames.first; gpf; gpf= gpfn) { - gpfn= gpf->next; - - /* free strokes and their associated memory */ - free_gpencil_strokes(gpf); - BLI_freelinkN(&gpl->frames, gpf); - } -} - -/* Free all of the gp-layers for a viewport (list should be &gpd->layers or so) */ -void free_gpencil_layers (ListBase *list) -{ - bGPDlayer *gpl, *gpln; - - /* error checking */ - if (list == NULL) return; - - /* delete layers*/ - for (gpl= list->first; gpl; gpl= gpln) { - gpln= gpl->next; - - /* free layers and their data */ - free_gpencil_frames(gpl); - BLI_freelinkN(list, gpl); - } -} - -/* Free gp-data and all it's related data */ -void free_gpencil_data (bGPdata *gpd) -{ - /* free layers then data itself */ - free_gpencil_layers(&gpd->layers); - MEM_freeN(gpd); -} - -/* -------- Container Creation ---------- */ - -/* add a new gp-frame to the given layer */ -bGPDframe *gpencil_frame_addnew (bGPDlayer *gpl, int cframe) -{ - bGPDframe *gpf, *gf; - short state=0; - - /* error checking */ - if ((gpl == NULL) || (cframe <= 0)) - return NULL; - - /* allocate memory for this frame */ - gpf= MEM_callocN(sizeof(bGPDframe), "bGPDframe"); - gpf->framenum= cframe; - - /* find appropriate place to add frame */ - if (gpl->frames.first) { - for (gf= gpl->frames.first; gf; gf= gf->next) { - /* check if frame matches one that is supposed to be added */ - if (gf->framenum == cframe) { - state= -1; - break; - } - - /* if current frame has already exceeded the frame to add, add before */ - if (gf->framenum > cframe) { - BLI_insertlinkbefore(&gpl->frames, gf, gpf); - state= 1; - break; - } - } - } - - /* check whether frame was added successfully */ - if (state == -1) { - MEM_freeN(gpf); - printf("Error: frame (%d) existed already for this layer \n", cframe); - } - else if (state == 0) { - /* add to end then! */ - BLI_addtail(&gpl->frames, gpf); - } - - /* return frame */ - return gpf; -} - -/* add a new gp-layer and make it the active layer */ -bGPDlayer *gpencil_layer_addnew (bGPdata *gpd) -{ - bGPDlayer *gpl; - - /* check that list is ok */ - if (gpd == NULL) - return NULL; - - /* allocate memory for frame and add to end of list */ - gpl= MEM_callocN(sizeof(bGPDlayer), "bGPDlayer"); - - /* add to datablock */ - BLI_addtail(&gpd->layers, gpl); - - /* set basic settings */ - gpl->color[3]= 0.9f; - gpl->thickness = 3; - - /* auto-name */ - sprintf(gpl->info, "GP_Layer"); - BLI_uniquename(&gpd->layers, gpl, "GP_Layer", offsetof(bGPDlayer, info[0]), 128); - - /* make this one the active one */ - gpencil_layer_setactive(gpd, gpl); - - /* return layer */ - return gpl; -} - -/* add a new gp-datablock */ -bGPdata *gpencil_data_addnew (void) -{ - bGPdata *gpd; - - /* allocate memory for a new block */ - gpd= MEM_callocN(sizeof(bGPdata), "GreasePencilData"); - - /* initial settings */ - gpd->flag = (GP_DATA_DISPINFO|GP_DATA_EXPAND); - - return gpd; -} - -/* -------- Data Duplication ---------- */ - -/* make a copy of a given gpencil frame */ -bGPDframe *gpencil_frame_duplicate (bGPDframe *src) -{ - bGPDstroke *gps, *gpsd; - bGPDframe *dst; - - /* error checking */ - if (src == NULL) - return NULL; - - /* make a copy of the source frame */ - dst= MEM_dupallocN(src); - dst->prev= dst->next= NULL; - - /* copy strokes */ - dst->strokes.first = dst->strokes.last= NULL; - for (gps= src->strokes.first; gps; gps= gps->next) { - /* make copy of source stroke, then adjust pointer to points too */ - gpsd= MEM_dupallocN(gps); - gpsd->points= MEM_dupallocN(gps->points); - - BLI_addtail(&dst->strokes, gpsd); - } - - /* return new frame */ - return dst; -} - -/* make a copy of a given gpencil layer */ -bGPDlayer *gpencil_layer_duplicate (bGPDlayer *src) -{ - bGPDframe *gpf, *gpfd; - bGPDlayer *dst; - - /* error checking */ - if (src == NULL) - return NULL; - - /* make a copy of source layer */ - dst= MEM_dupallocN(src); - dst->prev= dst->next= NULL; - - /* copy frames */ - dst->frames.first= dst->frames.last= NULL; - for (gpf= src->frames.first; gpf; gpf= gpf->next) { - /* make a copy of source frame */ - gpfd= gpencil_frame_duplicate(gpf); - BLI_addtail(&dst->frames, gpfd); - - /* if source frame was the current layer's 'active' frame, reassign that too */ - if (gpf == dst->actframe) - dst->actframe= gpfd; - } - - /* return new layer */ - return dst; -} - -/* make a copy of a given gpencil datablock */ -bGPdata *gpencil_data_duplicate (bGPdata *src) -{ - bGPDlayer *gpl, *gpld; - bGPdata *dst; - - /* error checking */ - if (src == NULL) - return NULL; - - /* make a copy of the base-data */ - dst= MEM_dupallocN(src); - - /* copy layers */ - dst->layers.first= dst->layers.last= NULL; - for (gpl= src->layers.first; gpl; gpl= gpl->next) { - /* make a copy of source layer and its data */ - gpld= gpencil_layer_duplicate(gpl); - BLI_addtail(&dst->layers, gpld); - } - - /* return new */ - return dst; -} +/* XXX - OLD DEPRECEATED CODE... */ /* ----------- GP-Datablock API ------------- */ @@ -483,210 +239,6 @@ ScrArea *gpencil_data_findowner (bGPdata *gpd) return NULL; } -/* -------- GP-Frame API ---------- */ - -/* delete the last stroke of the given frame */ -void gpencil_frame_delete_laststroke (bGPDframe *gpf) -{ - bGPDstroke *gps= (gpf) ? gpf->strokes.last : NULL; - - /* error checking */ - if (ELEM(NULL, gpf, gps)) - return; - - /* free the stroke and its data */ - MEM_freeN(gps->points); - BLI_freelinkN(&gpf->strokes, gps); -} - -/* -------- GP-Layer API ---------- */ - -/* get the appropriate gp-frame from a given layer - * - this sets the layer's actframe var (if allowed to) - * - extension beyond range (if first gp-frame is after all frame in interest and cannot add) - */ -bGPDframe *gpencil_layer_getframe (bGPDlayer *gpl, int cframe, short addnew) -{ - bGPDframe *gpf = NULL; - short found = 0; - - /* error checking */ - if (gpl == NULL) return NULL; - if (cframe <= 0) cframe = 1; - - /* check if there is already an active frame */ - if (gpl->actframe) { - gpf= gpl->actframe; - - /* do not allow any changes to layer's active frame if layer is locked */ - if (gpl->flag & GP_LAYER_LOCKED) - return gpf; - /* do not allow any changes to actframe if frame has painting tag attached to it */ - if (gpf->flag & GP_FRAME_PAINT) - return gpf; - - /* try to find matching frame */ - if (gpf->framenum < cframe) { - for (; gpf; gpf= gpf->next) { - if (gpf->framenum == cframe) { - found= 1; - break; - } - else if ((gpf->next) && (gpf->next->framenum > cframe)) { - found= 1; - break; - } - } - - /* set the appropriate frame */ - if (addnew) { - if ((found) && (gpf->framenum == cframe)) - gpl->actframe= gpf; - else - gpl->actframe= gpencil_frame_addnew(gpl, cframe); - } - else if (found) - gpl->actframe= gpf; - else - gpl->actframe= gpl->frames.last; - } - else { - for (; gpf; gpf= gpf->prev) { - if (gpf->framenum <= cframe) { - found= 1; - break; - } - } - - /* set the appropriate frame */ - if (addnew) { - if ((found) && (gpf->framenum == cframe)) - gpl->actframe= gpf; - else - gpl->actframe= gpencil_frame_addnew(gpl, cframe); - } - else if (found) - gpl->actframe= gpf; - else - gpl->actframe= gpl->frames.first; - } - } - else if (gpl->frames.first) { - /* check which of the ends to start checking from */ - const int first= ((bGPDframe *)(gpl->frames.first))->framenum; - const int last= ((bGPDframe *)(gpl->frames.last))->framenum; - - if (abs(cframe-first) > abs(cframe-last)) { - /* find gp-frame which is less than or equal to cframe */ - for (gpf= gpl->frames.last; gpf; gpf= gpf->prev) { - if (gpf->framenum <= cframe) { - found= 1; - break; - } - } - } - else { - /* find gp-frame which is less than or equal to cframe */ - for (gpf= gpl->frames.first; gpf; gpf= gpf->next) { - if (gpf->framenum <= cframe) { - found= 1; - break; - } - } - } - - /* set the appropriate frame */ - if (addnew) { - if ((found) && (gpf->framenum == cframe)) - gpl->actframe= gpf; - else - gpl->actframe= gpencil_frame_addnew(gpl, cframe); - } - else if (found) - gpl->actframe= gpf; - else { - /* unresolved errogenous situation! */ - printf("Error: cannot find appropriate gp-frame \n"); - /* gpl->actframe should still be NULL */ - } - } - else { - /* currently no frames (add if allowed to) */ - if (addnew) - gpl->actframe= gpencil_frame_addnew(gpl, cframe); - else { - /* don't do anything... this may be when no frames yet! */ - /* gpl->actframe should still be NULL */ - } - } - - /* return */ - return gpl->actframe; -} - -/* delete the given frame from a layer */ -void gpencil_layer_delframe (bGPDlayer *gpl, bGPDframe *gpf) -{ - /* error checking */ - if (ELEM(NULL, gpl, gpf)) - return; - - /* free the frame and its data */ - free_gpencil_strokes(gpf); - BLI_freelinkN(&gpl->frames, gpf); - gpl->actframe = NULL; -} - -/* get the active gp-layer for editing */ -bGPDlayer *gpencil_layer_getactive (bGPdata *gpd) -{ - bGPDlayer *gpl; - - /* error checking */ - if (ELEM(NULL, gpd, gpd->layers.first)) - return NULL; - - /* loop over layers until found (assume only one active) */ - for (gpl=gpd->layers.first; gpl; gpl=gpl->next) { - if (gpl->flag & GP_LAYER_ACTIVE) - return gpl; - } - - /* no active layer found */ - return NULL; -} - -/* set the active gp-layer */ -void gpencil_layer_setactive (bGPdata *gpd, bGPDlayer *active) -{ - bGPDlayer *gpl; - - /* error checking */ - if (ELEM3(NULL, gpd, gpd->layers.first, active)) - return; - - /* loop over layers deactivating all */ - for (gpl=gpd->layers.first; gpl; gpl=gpl->next) - gpl->flag &= ~GP_LAYER_ACTIVE; - - /* set as active one */ - active->flag |= GP_LAYER_ACTIVE; -} - -/* delete the active gp-layer */ -void gpencil_layer_delactive (bGPdata *gpd) -{ - bGPDlayer *gpl= gpencil_layer_getactive(gpd); - - /* error checking */ - if (ELEM(NULL, gpd, gpl)) - return; - - /* free layer */ - free_gpencil_frames(gpl); - BLI_freelinkN(&gpd->layers, gpl); -} - /* ************************************************** */ /* GREASE-PENCIL EDITING - Tools */ @@ -698,7 +250,7 @@ void gpencil_delete_laststroke (bGPdata *gpd, int cfra) bGPDlayer *gpl= gpencil_layer_getactive(gpd); bGPDframe *gpf= gpencil_layer_getframe(gpl, cfra, 0); - gpencil_frame_delete_laststroke(gpf); + gpencil_frame_delete_laststroke(gpl, gpf); } /* delete the active frame */ @@ -970,6 +522,7 @@ static void gp_stroke_to_bonechain (bGPDlayer *gpl, bGPDstroke *gps, bArmature * } /* convert a given grease-pencil layer to a 3d-curve representation (using current view if appropriate) */ +// XXX depreceated... we now have etch-a-ton for this... static void gp_layer_to_armature (bGPdata *gpd, bGPDlayer *gpl, Scene *scene, View3D *v3d, short mode) { bGPDframe *gpf= gpencil_layer_getframe(gpl, scene->r.cfra, 0); @@ -1068,21 +621,6 @@ void gpencil_convert_operation (short mode) BIF_undo_push("GPencil Convert"); } -/* display a menu for converting grease-pencil strokes */ -void gpencil_convert_menu (void) -{ - bGPdata *gpd= gpencil_data_getactive(NULL); - short mode; - - /* only show menu if it will be relevant */ - if (gpd == NULL) return; - - mode= pupmenu("Grease Pencil Convert %t|Active Layer To Path%x1|Active Layer to Bezier%x2|Active Layer to Armature%x3"); - if (mode <= 0) return; - - gpencil_convert_operation(mode); -} - /* ************************************************** */ /* GREASE-PENCIL EDITING MODE - Painting */ @@ -1797,7 +1335,7 @@ static void gp_session_initpaint (bContext *C, tGPsdata *p) if (p->gpd == NULL) { short ok; - p->gpd= gpencil_data_addnew(); + p->gpd= gpencil_data_addnew("GPencil"); ok= gpencil_data_setactive(p->sa, p->gpd); /* most of the time, the following check isn't needed */ diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h index 38cee1e559c..721d8544225 100644 --- a/source/blender/editors/gpencil/gpencil_intern.h +++ b/source/blender/editors/gpencil/gpencil_intern.h @@ -32,7 +32,7 @@ /******************************************************* */ /* FILTERED ACTION DATA - TYPES */ -/* XXX */ +/* XXX - TODO: replace this with the modern bAnimListElem... */ /* This struct defines a structure used for quick access */ typedef struct bActListElem { struct bActListElem *next, *prev; diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h index 63bd451132d..5c611365a7e 100644 --- a/source/blender/editors/include/BIF_glutil.h +++ b/source/blender/editors/include/BIF_glutil.h @@ -137,6 +137,8 @@ void glaDrawPixelsSafe_to32(float fx, float fy, int img_w, int img_h, int row_w, void glaDrawPixelsTex (float x, float y, int img_w, int img_h, int format, void *rect); +void glaDrawPixelsTexScaled(float x, float y, int img_w, int img_h, int format, void *rect, float scaleX, float scaleY); + /* 2D Drawing Assistance */ /** Define a 2D area (viewport, scissor, matrices) for OpenGL rendering. diff --git a/source/blender/editors/include/BIF_transform.h b/source/blender/editors/include/BIF_transform.h index d16ac563eb3..e02202eb8e0 100644 --- a/source/blender/editors/include/BIF_transform.h +++ b/source/blender/editors/include/BIF_transform.h @@ -37,7 +37,7 @@ struct ListBase; struct wmEvent; struct bContext; struct Object; -struct uiMenuItem; +struct uiLayout; void transform_keymap_for_space(struct wmWindowManager *wm, struct ListBase *keymap, int spaceid); void transform_operatortypes(void); @@ -114,7 +114,7 @@ int BIF_menuselectTransformOrientation(void); void BIF_selectTransformOrientation(struct bContext *C, struct TransformOrientation *ts); void BIF_selectTransformOrientationValue(struct bContext *C, int orientation); -void BIF_menuTransformOrientation(struct bContext *C, struct uiMenuItem *head, void *arg); +void BIF_menuTransformOrientation(struct bContext *C, struct uiLayout *layout, void *arg); char * BIF_menustringTransformOrientation(const struct bContext *C, char *title); /* the returned value was allocated and needs to be freed after use */ int BIF_countTransformOrientation(const struct bContext *C); diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 0210e3d6a85..efc0a0b9a57 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -64,6 +64,7 @@ typedef struct bAnimContext { struct Scene *scene; /* active scene */ struct Object *obact; /* active object */ + ListBase *markers; /* active set of markers */ } bAnimContext; /* Main Data container types */ diff --git a/source/blender/editors/include/ED_fileselect.h b/source/blender/editors/include/ED_fileselect.h index bb5ced66428..7cbef4984d7 100644 --- a/source/blender/editors/include/ED_fileselect.h +++ b/source/blender/editors/include/ED_fileselect.h @@ -62,6 +62,19 @@ typedef struct FileSelectParams { #define FILE_LAYOUT_HOR 1 #define FILE_LAYOUT_VER 2 +#define MAX_FILE_COLUMN 8 + +typedef enum FileListColumns { + COLUMN_NAME = 0, + COLUMN_DATE, + COLUMN_TIME, + COLUMN_SIZE, + COLUMN_MODE1, + COLUMN_MODE2, + COLUMN_MODE3, + COLUMN_OWNER +} FileListColumns; + typedef struct FileLayout { /* view settings - XXX - move into own struct */ @@ -78,7 +91,7 @@ typedef struct FileLayout short width; short height; short flag; - + float column_widths[MAX_FILE_COLUMN]; } FileLayout; FileSelectParams* ED_fileselect_get_params(struct SpaceFile *sfile); diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index f3f054c2b6f..ad8124c89d7 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -52,32 +52,13 @@ typedef struct tGPspoint { float pressure; /* pressure of tablet at this point */ } tGPspoint; -/* ------------ Grease-Pencil API ------------------ */ - -void free_gpencil_strokes(struct bGPDframe *gpf); -void free_gpencil_frames(struct bGPDlayer *gpl); -void free_gpencil_layers(struct ListBase *list); -void free_gpencil_data(struct bGPdata *gpd); - -struct bGPDframe *gpencil_frame_addnew(struct bGPDlayer *gpl, int cframe); -struct bGPDlayer *gpencil_layer_addnew(struct bGPdata *gpd); -struct bGPdata *gpencil_data_addnew(void); - -struct bGPDframe *gpencil_frame_duplicate(struct bGPDframe *src); -struct bGPDlayer *gpencil_layer_duplicate(struct bGPDlayer *src); -struct bGPdata *gpencil_data_duplicate(struct bGPdata *gpd); +/* ------------ Grease-Pencil Depreceated Stuff ------------------ */ struct bGPdata *gpencil_data_getactive(struct ScrArea *sa); short gpencil_data_setactive(struct ScrArea *sa, struct bGPdata *gpd); struct ScrArea *gpencil_data_findowner(struct bGPdata *gpd); -void gpencil_frame_delete_laststroke(struct bGPDframe *gpf); - -struct bGPDframe *gpencil_layer_getframe(struct bGPDlayer *gpl, int cframe, short addnew); -void gpencil_layer_delframe(struct bGPDlayer *gpl, struct bGPDframe *gpf); -struct bGPDlayer *gpencil_layer_getactive(struct bGPdata *gpd); -void gpencil_layer_setactive(struct bGPdata *gpd, struct bGPDlayer *active); -void gpencil_layer_delactive(struct bGPdata *gpd); +/* ------------ Grease-Pencil Editing API ------------------ */ void gpencil_delete_actframe(struct bGPdata *gpd, int cfra); void gpencil_delete_laststroke(struct bGPdata *gpd, int cfra); @@ -90,6 +71,7 @@ void gpencil_convert_menu(void); short gpencil_do_paint(struct bContext *C); +/* ------------ Grease-Pencil Drawing API ------------------ */ /* drawgpencil.c */ void draw_gpencil_2dimage(struct bContext *C, struct ImBuf *ibuf); diff --git a/source/blender/editors/include/ED_keyframes_edit.h b/source/blender/editors/include/ED_keyframes_edit.h index 1da1196a462..77e95dc77de 100644 --- a/source/blender/editors/include/ED_keyframes_edit.h +++ b/source/blender/editors/include/ED_keyframes_edit.h @@ -30,6 +30,7 @@ #define ED_KEYFRAMES_EDIT_H struct bAnimContext; +struct bAnimListElem; struct FCurve; struct BezTriple; struct Scene; @@ -107,7 +108,16 @@ typedef short (*BeztEditFunc)(BeztEditData *bed, struct BezTriple *bezt); /* ---------------- Looping API --------------------- */ /* functions for looping over keyframes */ -short ANIM_fcurve_keys_bezier_loop(BeztEditData *bed, struct FCurve *Fcu, BeztEditFunc bezt_ok, BeztEditFunc bezt_cb, FcuEditFunc fcu_cb); + /* function for working with F-Curve data only (i.e. when filters have been chosen to explicitly use this) */ +short ANIM_fcurve_keys_bezier_loop(BeztEditData *bed, struct FCurve *fcu, BeztEditFunc bezt_ok, BeztEditFunc bezt_cb, FcuEditFunc fcu_cb); + /* function for working with any type (i.e. one of the known types) of animation channel + * - filterflag is bDopeSheet->flag (DOPESHEET_FILTERFLAG) + */ +short ANIM_animchannel_keys_bezier_loop(BeztEditData *bed, struct bAnimListElem *ale, BeztEditFunc bezt_ok, BeztEditFunc bezt_cb, FcuEditFunc fcu_cb, int filterflag); + /* same as above, except bAnimListElem wrapper is not needed... + * - keytype is eAnim_KeyType + */ +short ANIM_animchanneldata_keys_bezier_loop(BeztEditData *bed, void *data, int keytype, BeztEditFunc bezt_ok, BeztEditFunc bezt_cb, FcuEditFunc fcu_cb, int filterflag); /* functions for making sure all keyframes are in good order */ void ANIM_editkeyframes_refresh(struct bAnimContext *ac); @@ -124,6 +134,11 @@ BeztEditFunc ANIM_editkeyframes_select(short mode); BeztEditFunc ANIM_editkeyframes_handles(short mode); BeztEditFunc ANIM_editkeyframes_ipo(short mode); +/* ----------- BezTriple Callback (Assorted Utilities) ---------- */ + +short bezt_calc_average(BeztEditData *bed, struct BezTriple *bezt); +short bezt_to_cfraelem(BeztEditData *bed, struct BezTriple *bezt); + /* ************************************************ */ /* Destructive Editing API (keyframes_general.c) */ diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index b2846fc0bd9..fbb469f8d43 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -33,13 +33,30 @@ struct ID; struct KeyingSet; +struct bAction; struct FCurve; struct BezTriple; +struct bPoseChannel; +struct bConstraint; + +struct bContext; struct wmOperatorType; /* ************ Keyframing Management **************** */ +/* Get (or add relevant data to be able to do so) the Active Action for the given + * Animation Data block, given an ID block where the Animation Data should reside. + */ +struct bAction *verify_adt_action(struct ID *id, short add); + +/* Get (or add relevant data to be able to do so) F-Curve from the given Action. + * This assumes that all the destinations are valid. + */ +struct FCurve *verify_fcurve(struct bAction *act, const char group[], const char rna_path[], const int array_index, short add); + +/* -------- */ + /* Lesser Keyframing API call: * Use this when validation of necessary animation data isn't necessary as it already * exists, and there is a beztriple that can be directly copied into the array. @@ -58,17 +75,74 @@ void insert_vert_fcurve(struct FCurve *fcu, float x, float y, short flag); * Use this to create any necessary animation data, and then insert a keyframe * using the current value being keyframed, in the relevant place. Returns success. */ -short insertkey(struct ID *id, const char group[], const char rna_path[], int array_index, float cfra, short flag); +short insert_keyframe(struct ID *id, struct bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short flag); /* Main Keyframing API call: * Use this to delete keyframe on current frame for relevant channel. Will perform checks just in case. */ -short deletekey(struct ID *id, const char group[], const char rna_path[], int array_index, float cfra, short flag); +short delete_keyframe(struct ID *id, struct bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short flag); +/* -------- */ + +/* Main Keyframe Management operators: + * These handle keyframes management from various spaces. They only make use of + * Keying Sets. + */ +void ANIM_OT_insert_keyframe(struct wmOperatorType *ot); +void ANIM_OT_delete_keyframe(struct wmOperatorType *ot); + +/* Main Keyframe Management operators: + * These handle keyframes management from various spaces. They will handle the menus + * required for each space. + */ +void ANIM_OT_insert_keyframe_menu(struct wmOperatorType *ot); +void ANIM_OT_delete_keyframe_menu(struct wmOperatorType *ot); // xxx unimplemented yet +void ANIM_OT_delete_keyframe_old(struct wmOperatorType *ot); // xxx rename and keep? + +/* Keyframe managment operators for UI buttons. */ +void ANIM_OT_insert_keyframe_button(struct wmOperatorType *ot); +void ANIM_OT_delete_keyframe_button(struct wmOperatorType *ot); + +/* ************ Keying Sets ********************** */ + +/* temporary struct to gather data combos to keyframe + * (is used by modify_keyframes for 'relative' KeyingSets, provided via the dsources arg) + */ +typedef struct bCommonKeySrc { + struct bCommonKeySrc *next, *prev; + + /* general data/destination-source settings */ + struct ID *id; /* id-block this comes from */ + + /* specific cases */ + struct bPoseChannel *pchan; + struct bConstraint *con; +} bCommonKeySrc; + +/* -------- */ + +/* mode for modify_keyframes */ +enum { + MODIFYKEY_MODE_INSERT = 0, + MODIFYKEY_MODE_DELETE, +} eModifyKey_Modes; + +/* Keyframing Helper Call - use the provided Keying Set to Add/Remove Keyframes */ +int modify_keyframes(struct bContext *C, struct ListBase *dsources, struct bAction *act, struct KeyingSet *ks, short mode, float cfra); + +/* -------- */ /* Generate menu of KeyingSets */ char *ANIM_build_keyingsets_menu(struct ListBase *list, short for_edit); +/* Get the first builtin KeyingSet with the given name, which occurs after the given one (or start of list if none given) */ +struct KeyingSet *ANIM_builtin_keyingset_get_named(struct KeyingSet *prevKS, char name[]); + +/* Initialise builtin KeyingSets on startup */ +void init_builtin_keyingsets(void); + +/* -------- */ + /* KeyingSet Editing Operators: * These can add a new KeyingSet and/or add 'destinations' to the KeyingSets, * acting as a means by which they can be added outside the Outliner. @@ -76,19 +150,21 @@ char *ANIM_build_keyingsets_menu(struct ListBase *list, short for_edit); void ANIM_OT_keyingset_add_new(struct wmOperatorType *ot); void ANIM_OT_keyingset_add_destination(struct wmOperatorType *ot); -/* Main Keyframe Management operators: - * These handle keyframes management from various spaces. They only make use of - * Keying Sets. +/* ************ Drivers ********************** */ + +/* Main Driver Management API calls: + * Add a new driver for the specified property on the given ID block */ -void ANIM_OT_insert_keyframe(struct wmOperatorType *ot); -void ANIM_OT_delete_keyframe(struct wmOperatorType *ot); +short ANIM_add_driver (struct ID *id, const char rna_path[], int array_index, short flag); -/* Main Keyframe Management operators (legacy style): - * These handle keyframes management from various spaces. They will handle the menus - * required for each space. +/* Main Driver Management API calls: + * Remove the driver for the specified property on the given ID block (if available) */ -void ANIM_OT_insert_keyframe_old(struct wmOperatorType *ot); -void ANIM_OT_delete_keyframe_old(struct wmOperatorType *ot); +short ANIM_remove_driver (struct ID *id, const char rna_path[], int array_index, short flag); + +/* Driver management operators for UI buttons */ +void ANIM_OT_add_driver_button(struct wmOperatorType *ot); +void ANIM_OT_remove_driver_button(struct wmOperatorType *ot); /* ************ Auto-Keyframing ********************** */ /* Notes: diff --git a/source/blender/editors/include/ED_markers.h b/source/blender/editors/include/ED_markers.h index 0e9a82083a6..048bbbd7463 100644 --- a/source/blender/editors/include/ED_markers.h +++ b/source/blender/editors/include/ED_markers.h @@ -28,6 +28,11 @@ #ifndef ED_MARKERS_H #define ED_MARKERS_H +struct wmWindowManager; +struct bContext; +struct TimeMarker; + +/* Drawing API ------------------------------ */ /* flags for drawing markers */ enum { @@ -35,11 +40,18 @@ enum { DRAW_MARKERS_LOCAL = (1<<1) }; -struct wmWindowManager; -struct bContext; - void draw_markers_time(const struct bContext *C, int flag); -int find_nearest_marker_time(ListBase *markers, float dx); + +/* Backend API ----------------------------- */ + +struct TimeMarker *ED_markers_find_nearest_marker(ListBase *markers, float x); +int ED_markers_find_nearest_marker_time(ListBase *markers, float x); + +void ED_markers_get_minmax(ListBase *markers, short sel, float *first, float *last); + +void ED_markers_make_cfra_list(ListBase *markers, ListBase *lb, short sel); + +/* Operators ------------------------------ */ /* called in screen_ops.c:ED_operatortypes_screen() */ void ED_marker_operatortypes(void); diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index fb31d9813c3..e8800f8d029 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -43,6 +43,7 @@ struct bDeformGroup; struct MDeformWeight; struct MDeformVert; struct Scene; +struct Mesh; struct MCol; struct UvVertMap; struct UvMapVert; diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 847120a5804..2484b558b04 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -53,6 +53,10 @@ void ED_region_pixelspace(struct ARegion *ar); void ED_region_init(struct bContext *C, struct ARegion *ar); void ED_region_tag_redraw(struct ARegion *ar); void ED_region_tag_redraw_partial(struct ARegion *ar, struct rcti *rct); +void ED_region_panels_init(struct wmWindowManager *wm, struct ARegion *ar); +void ED_region_panels(const struct bContext *C, struct ARegion *ar, int vertical, char *context); +void ED_region_header_init(struct ARegion *ar); +void ED_region_header(const struct bContext *C, struct ARegion *ar); /* spaces */ void ED_spacetypes_init(void); diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index 7002524be7e..7ccbf1ff18d 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -45,6 +45,7 @@ void ED_editors_exit (struct bContext *C); void ED_undo_push (struct bContext *C, char *str); void ED_undo_push_op (struct bContext *C, struct wmOperator *op); void ED_undo_pop (struct bContext *C); +void ED_undo_redo (struct bContext *C); void ED_OT_undo (struct wmOperatorType *ot); void ED_OT_redo (struct wmOperatorType *ot); diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 4170158e3b4..640d16be43f 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -93,7 +93,7 @@ void viewray(struct ARegion *ar, struct View3D *v3d, short mval[2], float ray_st int get_view3d_viewplane(struct View3D *v3d, struct RegionView3D *rv3d, int winxi, int winyi, rctf *viewplane, float *clipsta, float *clipend, float *pixsize); int get_view3d_ortho(struct View3D *v3d, struct RegionView3D *rv3d); -void view3d_get_object_project_mat(struct RegionView3D *v3d, struct Object *ob, float pmat[4][4], float vmat[4][4]); +void view3d_get_object_project_mat(struct RegionView3D *v3d, struct Object *ob, float pmat[4][4]); void view3d_project_float(struct ARegion *a, float *vec, float *adr, float mat[4][4]); /* drawobject.c itterators */ @@ -124,7 +124,6 @@ short view3d_opengl_select(struct ViewContext *vc, unsigned int *buffer, unsigne void view3d_set_viewcontext(struct bContext *C, struct ViewContext *vc); void view3d_operator_needs_opengl(const struct bContext *C); void view3d_get_view_aligned_coordinate(struct ViewContext *vc, float *fp, short mval[2]); -void view3d_get_object_project_mat(struct RegionView3D *v3d, struct Object *ob, float pmat[4][4], float vmat[4][4]);; void view3d_get_transformation(struct ViewContext *vc, struct Object *ob, struct bglMats *mats); /* XXX should move to arithb.c */ diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index f7d21d0374c..61fd6cb0b79 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -43,25 +43,28 @@ struct wmOperator; struct AutoComplete; struct bContext; struct Panel; +struct PanelType; struct PointerRNA; struct PropertyRNA; struct ReportList; +struct rcti; +struct rctf; +struct uiStyle; +struct uiFontStyle; +struct ColorBand; typedef struct uiBut uiBut; typedef struct uiBlock uiBlock; typedef struct uiPopupBlockHandle uiPopupBlockHandle; +typedef struct uiLayout uiLayout; /* Defines */ /* uiBlock->dt */ -#define UI_EMBOSS 0 /* use one of the themes for drawing */ -#define UI_EMBOSSN 1 /* Nothing */ -#define UI_EMBOSSM 2 /* Minimal builtin emboss, also for logic buttons */ -#define UI_EMBOSSP 3 /* Pulldown */ -#define UI_EMBOSSR 4 /* Rounded */ -#define UI_EMBOSST 5 /* Table */ - -#define UI_EMBOSSX 0 /* for a python file, which i can't change.... duh! */ +#define UI_EMBOSS 0 /* use widget style for drawing */ +#define UI_EMBOSSN 1 /* Nothing, only icon and/or text */ +#define UI_EMBOSSP 2 /* Pulldown menu style */ +#define UI_EMBOSST 3 /* Table */ /* uiBlock->direction */ #define UI_TOP 1 @@ -87,7 +90,6 @@ typedef struct uiPopupBlockHandle uiPopupBlockHandle; #define UI_BLOCK_MOVEMOUSE_QUIT 128 #define UI_BLOCK_KEEP_OPEN 256 #define UI_BLOCK_POPUP 512 -#define UI_BLOCK_2_50 1024 /* XXX 2.5 migration flag */ /* uiPopupBlockHandle->menuretval */ #define UI_RETURN_CANCEL 1 /* cancel all menus cascading */ @@ -96,10 +98,6 @@ typedef struct uiPopupBlockHandle uiPopupBlockHandle; /* block->flag bits 12-15 are identical to but->flag bits */ -/* block->font, for now: bold = medium+1 */ -#define UI_HELV 0 -#define UI_HELVB 1 - /* panel controls */ #define UI_PNL_TRANSP 1 #define UI_PNL_SOLID 2 @@ -110,25 +108,33 @@ typedef struct uiPopupBlockHandle uiPopupBlockHandle; #define UI_PNL_UNSTOW 256 #define UI_PNL_SCALE 512 -/* warning the first 4 flags are internal */ +/* warning the first 6 flags are internal */ /* but->flag */ -#define UI_TEXT_LEFT 16 -#define UI_ICON_LEFT 32 -#define UI_ICON_RIGHT 64 +#define UI_TEXT_LEFT 64 +#define UI_ICON_LEFT 128 +#define UI_ICON_SUBMENU 256 /* control for button type block */ -#define UI_MAKE_TOP 128 -#define UI_MAKE_DOWN 256 -#define UI_MAKE_LEFT 512 -#define UI_MAKE_RIGHT 1024 - /* dont draw hilite on mouse over */ -#define UI_NO_HILITE 2048 +#define UI_MAKE_TOP 512 +#define UI_MAKE_DOWN 1024 +#define UI_MAKE_LEFT 2048 +#define UI_MAKE_RIGHT 4096 + /* button align flag, for drawing groups together */ -#define UI_BUT_ALIGN (15<<12) -#define UI_BUT_ALIGN_TOP (1<<12) -#define UI_BUT_ALIGN_LEFT (1<<13) -#define UI_BUT_ALIGN_RIGHT (1<<14) -#define UI_BUT_ALIGN_DOWN (1<<15) -#define UI_BUT_DISABLED (1<<16) +#define UI_BUT_ALIGN (15<<14) +#define UI_BUT_ALIGN_TOP (1<<14) +#define UI_BUT_ALIGN_LEFT (1<<15) +#define UI_BUT_ALIGN_RIGHT (1<<16) +#define UI_BUT_ALIGN_DOWN (1<<17) + +#define UI_BUT_DISABLED (1<<18) + /* dont draw hilite on mouse over */ +#define UI_NO_HILITE (1<<19) +#define UI_BUT_ANIMATED (1<<20) +#define UI_BUT_ANIMATED_KEY (1<<21) +#define UI_BUT_DRIVEN (1<<22) + +#define UI_PANEL_WIDTH 340 +#define UI_COMPACT_PANEL_WIDTH 160 /* Button types, bits stored in 1 value... and a short even! - bits 0-4: bitnr (0-31) @@ -183,6 +189,7 @@ typedef struct uiPopupBlockHandle uiPopupBlockHandle; #define FTPREVIEW (35<<9) #define NUMABS (36<<9) #define HMENU (37<<9) +#define TOGBUT (38<<9) #define BUTTYPE (63<<9) /* Drawing @@ -198,51 +205,23 @@ void uiRoundRect(float minx, float miny, float maxx, float maxy, float rad); void uiDrawMenuBox(float minx, float miny, float maxx, float maxy, short flag, short direction); void uiDrawBoxShadow(unsigned char alpha, float minx, float miny, float maxx, float maxy); -/* Menus - * - * These functions are used by popup menus, toolbox and header menus. They - * assume uiMenuItem head is already created, which is done by uiMenuButton - * for header menus, or can be done with uiPupMenuBegin for popups. These - * functions do not use uiDefBut functions in order to simplify creating - * them, and to permit other types of menus (radial, ..) in the future. */ - -typedef struct uiMenuItem uiMenuItem; +/* Menu Callbacks */ -typedef void (*uiMenuCreateFunc)(struct bContext *C, uiMenuItem *head, void *arg1); +typedef void (*uiMenuCreateFunc)(struct bContext *C, struct uiLayout *layout, void *arg1); typedef void (*uiMenuHandleFunc)(struct bContext *C, void *arg, int event); -void uiMenuFunc(uiMenuItem *head, uiMenuHandleFunc handlefunc, void *argv); -void uiMenuContext(uiMenuItem *head, int opcontext); - -void uiMenuItemVal(uiMenuItem *head, const char *name, int icon, int argval); - -void uiMenuItemEnumO(uiMenuItem *head, const char *name, int icon, char *opname, char *propname, int value); -void uiMenuItemBooleanO(uiMenuItem *head, const char *name, int icon, char *opname, char *propname, int value); -void uiMenuItemsEnumO(uiMenuItem *head, char *opname, char *propname); -void uiMenuItemIntO(uiMenuItem *head, const char *name, int icon, char *opname, char *propname, int value); -void uiMenuItemFloatO(uiMenuItem *head, const char *name, int icon, char *opname, char *propname, float value); -void uiMenuItemStringO(uiMenuItem *head, const char *name, int icon, char *opname, char *propname, char *value); -void uiMenuItemO(uiMenuItem *head, int icon, char *opname); - -void uiMenuItemBooleanR(uiMenuItem *head, struct PointerRNA *ptr, char *propname); -void uiMenuItemEnumR(uiMenuItem *head, struct PointerRNA *ptr, char *propname, int value); -void uiMenuItemsEnumR(uiMenuItem *head, struct PointerRNA *ptr, char *propname); - -void uiMenuLevel(uiMenuItem *head, const char *name, uiMenuCreateFunc newlevel); -void uiMenuLevelEnumO(uiMenuItem *head, char *opname, char *propname); -void uiMenuLevelEnumR(uiMenuItem *head, struct PointerRNA *ptr, char *propname); - -void uiMenuSeparator(uiMenuItem *head); - /* Popup Menus * * Functions used to create popup menus. For more extended menus the * uiPupMenuBegin/End functions can be used to define own items with - * the uiMenu functions inbetween. If it is a simple confirmation menu + * the uiItem functions inbetween. If it is a simple confirmation menu * or similar, popups can be created with a single function call. */ -uiMenuItem *uiPupMenuBegin(const char *title, int icon); -void uiPupMenuEnd(struct bContext *C, struct uiMenuItem *head); +typedef struct uiPopupMenu uiPopupMenu; + +uiPopupMenu *uiPupMenuBegin(struct bContext *C, const char *title, int icon); +void uiPupMenuEnd(struct bContext *C, struct uiPopupMenu *head); +struct uiLayout *uiPupMenuLayout(uiPopupMenu *head); void uiPupMenuOkee(struct bContext *C, char *opname, char *str, ...); void uiPupMenuSaveOver(struct bContext *C, struct wmOperator *op, char *filename); @@ -273,30 +252,23 @@ void uiPupBlockO(struct bContext *C, uiBlockCreateFunc func, void *arg, char *op * * */ -uiBlock *uiBeginBlock(const struct bContext *C, struct ARegion *region, char *name, short dt, short font); +uiBlock *uiBeginBlock(const struct bContext *C, struct ARegion *region, const char *name, short dt); void uiEndBlock(const struct bContext *C, uiBlock *block); void uiDrawBlock(const struct bContext *C, struct uiBlock *block); uiBlock *uiGetBlock(char *name, struct ARegion *ar); +void uiBlockSetEmboss(uiBlock *block, short dt); + void uiFreeBlock(const struct bContext *C, uiBlock *block); void uiFreeBlocks(const struct bContext *C, struct ListBase *lb); void uiFreeInactiveBlocks(const struct bContext *C, struct ListBase *lb); +void uiBlockSetRegion(uiBlock *block, struct ARegion *region); + void uiBlockSetButLock(uiBlock *block, int val, char *lockstr); void uiBlockClearButLock(uiBlock *block); -/* Appearance/Cruft - * - * These functions should mostly dissappear ideally, or become internal. - * Font handling could move to blenfont/, and appearance could be dictated - * better by high level information instead of spread out all over. */ - -void uiSetCurFont(uiBlock *block, int index); -void *uiSetCurFont_ext(float aspect); -void uiDefFont(unsigned int index, void *xl, void *large, void *medium, void *small); -void *uiBlockGetCurFont (uiBlock *block); - /* automatic aligning, horiz or verical */ void uiBlockBeginAlign(uiBlock *block); void uiBlockEndAlign(uiBlock *block); @@ -307,10 +279,7 @@ void uiPopupBoundsBlock(uiBlock *block, int addval, int mx, int my); void uiMenuPopupBoundsBlock(uiBlock *block, int addvall, int mx, int my); int uiBlocksGetYMin (struct ListBase *lb); -int uiBlockGetCol (uiBlock *block); -void uiBlockSetCol (uiBlock *block, int col); -void uiBlockSetEmboss (uiBlock *block, int emboss); void uiBlockSetDirection (uiBlock *block, int direction); void uiBlockFlipOrder (uiBlock *block); void uiBlockSetFlag (uiBlock *block, int flag); @@ -322,8 +291,6 @@ int uiButGetRetVal (uiBut *but); void uiButSetFlag (uiBut *but, int flag); void uiButClearFlag (uiBut *but, int flag); -void uiAutoBlock(uiBlock *block, float minx, float miny, float sizex, float sizey, int flag); - /* Buttons * * Functions to define various types of buttons in a block. Postfixes: @@ -433,9 +400,10 @@ uiBut *uiDefIconTextBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, void uiDefKeyevtButS(uiBlock *block, int retval, char *str, short x1, short y1, short x2, short y2, short *spoin, char *tip); void uiBlockPickerButtons(struct uiBlock *block, float *col, float *hsv, float *old, char *hexcol, char mode, short retval); +void uiBlockColorbandButtons(struct uiBlock *block, struct ColorBand *coba, struct rctf *butr, int event); uiBut *uiDefAutoButR(uiBlock *block, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, char *name, int icon, int x1, int y1, int x2, int y2); -int uiDefAutoButsRNA(const struct bContext *C, uiBlock *block, struct PointerRNA *ptr); +void uiDefAutoButsRNA(const struct bContext *C, uiLayout *layout, struct PointerRNA *ptr); /* Links * @@ -494,22 +462,11 @@ void autocomplete_end(AutoComplete *autocpl, char *autoname); * could use a good cleanup, though how they will function in 2.5 is * not clear yet so we postpone that. */ -extern void uiNewPanelTabbed(char *, char *); -extern int uiNewPanel(const struct bContext *C, struct ARegion *ar, uiBlock *block, char *panelname, char *tabname, int ofsx, int ofsy, int sizex, int sizey); -extern void uiFreePanels(struct ListBase *lb); -extern void uiDrawPanels(const struct bContext *C, int re_align); - -extern void uiSetPanelsView2d(struct ARegion *ar); -extern void uiMatchPanelsView2d(struct ARegion *ar); - -extern void uiNewPanelHeight(struct uiBlock *block, int sizey); -extern void uiNewPanelTitle(struct uiBlock *block, char *str); -extern uiBlock *uiFindOpenPanelBlockName(struct ListBase *lb, char *name); -extern int uiAlignPanelStep(struct ScrArea *sa, struct ARegion *ar, float fac); -extern void uiPanelControl(int); -extern void uiSetPanelHandler(int); +void uiBeginPanels(const struct bContext *C, struct ARegion *ar); +void uiEndPanels(const struct bContext *C, struct ARegion *ar); -struct Panel *uiPanelFromBlock(struct uiBlock *block); +struct Panel *uiBeginPanel(struct ARegion *ar, uiBlock *block, struct PanelType *pt, int *open); +void uiEndPanel(uiBlock *block, int width, int height); /* Handlers * @@ -566,67 +523,78 @@ uiBut *uiDefMenuTogR(uiBlock *block, struct PointerRNA *ptr, char *propname, cha * - Template: predefined layouts for buttons with a number of slots, each * slot can contain multiple items. * - Item: item to put in a template slot, being either an RNA property, - * operator, label or menu currently. */ + * operator, label or menu. Also regular buttons can be used when setting + * uiBlockCurLayout. */ /* layout */ #define UI_LAYOUT_HORIZONTAL 0 #define UI_LAYOUT_VERTICAL 1 -typedef struct uiLayout uiLayout; +#define UI_LAYOUT_PANEL 0 +#define UI_LAYOUT_HEADER 1 +#define UI_LAYOUT_MENU 2 -uiLayout *uiLayoutBegin(int dir, int x, int y, int w, int h); -void uiLayoutContext(uiLayout *layout, int opcontext); -void uiLayoutEnd(const struct bContext *C, uiBlock *block, uiLayout *layout, int *x, int *y); +#define UI_UNIT_X 20 +#define UI_UNIT_Y 20 -/* vertical button templates */ -#define UI_TSLOT_COLUMN_1 0 -#define UI_TSLOT_COLUMN_2 1 -#define UI_TSLOT_COLUMN_3 2 -#define UI_TSLOT_COLUMN_4 3 -#define UI_TSLOT_COLUMN_5 4 -#define UI_TSLOT_COLUMN_MAX 5 +uiLayout *uiBlockLayout(uiBlock *block, int dir, int type, int x, int y, int size, int em, struct uiStyle *style); +void uiBlockSetCurLayout(uiBlock *block, uiLayout *layout); +void uiBlockLayoutResolve(const struct bContext *C, uiBlock *block, int *x, int *y); +float uiBlockAspect(uiBlock *block); /* temporary */ -#define UI_TSLOT_LR_LEFT 0 -#define UI_TSLOT_LR_RIGHT 1 +void uiLayoutContext(uiLayout *layout, int opcontext); +void uiLayoutFunc(uiLayout *layout, uiMenuHandleFunc handlefunc, void *argv); +uiBlock *uiLayoutBlock(uiLayout *layout); -void uiTemplateLeftRight(uiLayout *layout); -void uiTemplateColumn(uiLayout *layout); -uiLayout *uiTemplateStack(uiLayout *layout); +/* layout specifiers */ +uiLayout *uiLayoutRow(uiLayout *layout, int align); +uiLayout *uiLayoutColumn(uiLayout *layout, int align); +uiLayout *uiLayoutColumnFlow(uiLayout *layout, int number, int align); +uiLayout *uiLayoutBox(uiLayout *layout); +uiLayout *uiLayoutFree(uiLayout *layout, int align); +uiLayout *uiLayoutSplit(uiLayout *layout); -/* horizontal header templates */ -#define UI_TSLOT_HEADER 0 +uiBlock *uiLayoutFreeBlock(uiLayout *layout); -void uiTemplateHeaderMenus(uiLayout *layout); -void uiTemplateHeaderButtons(uiLayout *layout); -void uiTemplateHeaderID(uiLayout *layout, struct PointerRNA *ptr, char *propname, int flag, uiIDPoinFunc func); -void uiTemplateSetColor(uiLayout *layout, int color); +/* templates */ +void uiTemplateHeader(uiLayout *layout, struct bContext *C); +void uiTemplateHeaderID(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname, + char *newop, char *openop, char *unlinkop); /* items */ -void uiItemO(uiLayout *layout, int slot, const char *name, int icon, char *opname); -void uiItemEnumO(uiLayout *layout, int slot, const char *name, int icon, char *opname, char *propname, int value); -void uiItemsEnumO(uiLayout *layout, int slot, char *opname, char *propname); -void uiItemBooleanO(uiLayout *layout, int slot, const char *name, int icon, char *opname, char *propname, int value); -void uiItemIntO(uiLayout *layout, int slot, const char *name, int icon, char *opname, char *propname, int value); -void uiItemFloatO(uiLayout *layout, int slot, const char *name, int icon, char *opname, char *propname, float value); -void uiItemStringO(uiLayout *layout, int slot, const char *name, int icon, char *opname, char *propname, char *value); -void uiItemFullO(uiLayout *layout, int slot, const char *name, int icon, char *idname, IDProperty *properties, int context); - -void uiItemR(uiLayout *layout, int slot, const char *name, int icon, struct PointerRNA *ptr, char *propname); -void uiItemFullR(uiLayout *layout, int slot, const char *name, int icon, struct PointerRNA *ptr, char *propname, int index); - -void uiItemLabel(uiLayout *layout, int slot, const char *name, int icon); - -void uiItemMenu(uiLayout *layout, int slot, const char *name, int icon, uiMenuCreateFunc func); - -/* utilities */ -#define UI_PANEL_WIDTH 340 -#define UI_COMPACT_PANEL_WIDTH 160 - -typedef void (*uiHeaderCreateFunc)(const struct bContext *C, uiLayout *layout); -typedef void (*uiPanelCreateFunc)(const struct bContext *C, uiLayout *layout); - -void uiRegionPanelLayout(const struct bContext *C, struct ARegion *ar, int vertical, char *context); -void uiRegionHeaderLayout(const struct bContext *C, struct ARegion *ar); +void uiItemO(uiLayout *layout, char *name, int icon, char *opname); +void uiItemEnumO(uiLayout *layout, char *name, int icon, char *opname, char *propname, int value); +void uiItemsEnumO(uiLayout *layout, char *opname, char *propname); +void uiItemBooleanO(uiLayout *layout, char *name, int icon, char *opname, char *propname, int value); +void uiItemIntO(uiLayout *layout, char *name, int icon, char *opname, char *propname, int value); +void uiItemFloatO(uiLayout *layout, char *name, int icon, char *opname, char *propname, float value); +void uiItemStringO(uiLayout *layout, char *name, int icon, char *opname, char *propname, char *value); +void uiItemFullO(uiLayout *layout, char *name, int icon, char *idname, struct IDProperty *properties, int context); + +void uiItemR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, int expand, int slider); +void uiItemFullR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int expand, int slider); +void uiItemEnumR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, int value); +void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, char *propname); + +void uiItemL(uiLayout *layout, char *name, int icon); /* label */ +void uiItemM(uiLayout *layout, struct bContext *C, char *name, int icon, char *menuname); /* menu */ +void uiItemV(uiLayout *layout, char *name, int icon, int argval); /* value */ +void uiItemS(uiLayout *layout); /* separator */ + +void uiItemMenuF(uiLayout *layout, char *name, int icon, uiMenuCreateFunc func); +void uiItemMenuEnumO(uiLayout *layout, char *name, int icon, char *opname, char *propname); +void uiItemMenuEnumR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname); + +/* Animation */ + +void uiAnimContextProperty(const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop, int *index); + +/* Styled text draw */ +void uiStyleFontSet(struct uiFontStyle *fs); +void uiStyleFontDraw(struct uiFontStyle *fs, struct rcti *rect, char *str); + +int UI_GetStringWidth(char *str); // XXX temp +void UI_DrawString(float x, float y, char *str); // XXX temp #endif /* UI_INTERFACE_H */ diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index e6c2dfb31e7..09635f3d914 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -213,7 +213,7 @@ typedef enum { ICON_OBJECT_DATA, ICON_MESH_DATA, ICON_CURVE_DATA, - ICON_MBALL_DATA, + ICON_META_DATA, ICON_LATTICE_DATA, ICON_LAMP_DATA, ICON_MATERIAL_DATA, @@ -239,11 +239,11 @@ typedef enum { ICON_IMAGE_DATA, ICON_FILE, ICON_FCURVE, - ICON_FONT, + ICON_FONT_DATA, ICON_RENDER_RESULT, - ICON_BLANK080A, - ICON_BLANK080B, - ICON_BLANK080C, + ICON_SURFACE_DATA, + ICON_EMPTY_DATA, + ICON_SETTINGS, ICON_BLANK080D, ICON_BLANK080E, ICON_BLANK080F, @@ -319,7 +319,7 @@ typedef enum { ICON_BLANK127b, /* OUTLINER */ - ICON_BLANK128, + ICON_OUTLINER_DATA_EMPTY, ICON_OUTLINER_DATA_MESH, ICON_OUTLINER_DATA_CURVE, ICON_OUTLINER_DATA_LATTICE, @@ -355,7 +355,7 @@ typedef enum { ICON_MOD_SOFT, ICON_MOD_SUBSURF, ICON_HOOK, - ICON_MOD_PARTICLEINSTANCE, + ICON_MOD_PHYSICS, ICON_MOD_PARTICLES, ICON_MOD_BOOLEAN, ICON_MOD_EDGESPLIT, @@ -366,19 +366,19 @@ typedef enum { ICON_MOD_LATTICE, ICON_BLANK143, ICON_MOD_ARMATURE, - ICON_BLANK147, - ICON_BLANK148, - ICON_BLANK149, - ICON_BLANK150, - ICON_BLANK151, - ICON_BLANK152, - ICON_BLANK152b, + ICON_MOD_SHRINKWRAP, + ICON_MOD_CAST, + ICON_MOD_MESHDEFORM, + ICON_MOD_BEVEL, + ICON_MOD_SMOOTH, + ICON_MOD_SIMPLEDEFORM, + ICON_MOD_MASK, - /* available */ - ICON_BLANK153, - ICON_BLANK154, - ICON_BLANK155, - ICON_BLANK156, + /* MODIFIERS */ + ICON_MOD_CLOTH, + ICON_MOD_EXPLODE, + ICON_MOD_FLUIDSIM, + ICON_MOD_MULTIRES, ICON_BLANK157, ICON_BLANK158, ICON_BLANK159, @@ -498,14 +498,14 @@ typedef enum { ICON_SNAP_VERTEX, ICON_SNAP_EDGE, ICON_SNAP_FACE, - ICON_BLANK218b, + ICON_SNAP_VOLUME, ICON_STICKY_UVS_LOC, ICON_STICKY_UVS_DISABLE, ICON_STICKY_UVS_VERT, ICON_CLIPUV_DEHLT, ICON_CLIPUV_HLT, ICON_BLANK219, - ICON_BLANK220, + ICON_SNAP_PEEL_OBJECT, ICON_BLANK221, ICON_BLANK222, ICON_BLANK223, @@ -612,7 +612,7 @@ typedef enum { ICON_BOOKMARKS, ICON_FONTPREVIEW, ICON_FILTER, - ICON_BLANK285E, + ICON_NEWFOLDER, ICON_BLANK285F, ICON_FILE_PARENT, ICON_FILE_REFRESH, @@ -652,7 +652,7 @@ typedef enum { ICON_BLANK314, ICON_BLANK315, ICON_BLANK316, - ICON_BLANK316b, + ICON_DISK_DRIVE, /* SHADING / TEXT */ ICON_MATPLANE, @@ -794,45 +794,31 @@ typedef enum { } BIFColorID; -/* XXX WARNING: this is saved in file, so do not change order! */ enum { - TH_AUTO, /* for buttons, to signal automatic color assignment */ - -// uibutton colors - TH_BUT_OUTLINE, - TH_BUT_NEUTRAL, - TH_BUT_ACTION, - TH_BUT_SETTING, - TH_BUT_SETTING1, - TH_BUT_SETTING2, - TH_BUT_NUM, - TH_BUT_TEXTFIELD, - TH_BUT_POPUP, - TH_BUT_TEXT, - TH_BUT_TEXT_HI, - TH_MENU_BACK, - TH_MENU_ITEM, - TH_MENU_HILITE, - TH_MENU_TEXT, - TH_MENU_TEXT_HI, - - TH_BUT_DRAWTYPE, - TH_REDALERT, - TH_CUSTOM, - - TH_BUT_TEXTFIELD_HI, - TH_ICONFILE, - + TH_THEMEUI, // common colors among spaces TH_BACK, TH_TEXT, TH_TEXT_HI, + TH_TITLE, + TH_HEADER, TH_HEADERDESEL, + TH_HEADER_TEXT, + TH_HEADER_TEXT_HI, + + /* float panels */ TH_PANEL, + TH_PANEL_TEXT, + TH_PANEL_TEXT_HI, + + TH_BUTBACK, + TH_BUTBACK_TEXT, + TH_BUTBACK_TEXT_HI, + TH_SHADE1, TH_SHADE2, TH_HILITE, @@ -947,16 +933,13 @@ void UI_GetColorPtrBlendShade3ubv(char *cp1, char *cp2, char *col, float fac, in // get pointer from RNA pointer int UI_GetIconRNA(struct PointerRNA *ptr); -struct ScrArea; - // internal (blender) usage only, for init and set active -void UI_SetTheme(struct ScrArea *sa); -void ui_theme_init_userdef (void); -void ui_resources_init (void); -void ui_resources_free (void); +void UI_SetTheme(int spacetype, int regionid); /* only for buttons in theme editor! */ char *UI_ThemeGetColorPtr(struct bTheme *btheme, int spacetype, int colorid); char *UI_ThemeColorsPup(int spacetype); +void UI_make_axis_color(char *src_col, char *dst_col, char axis); + #endif /* UI_ICONS_H */ diff --git a/source/blender/editors/include/UI_text.h b/source/blender/editors/include/UI_text.h deleted file mode 100644 index 860fd5e15aa..00000000000 --- a/source/blender/editors/include/UI_text.h +++ /dev/null @@ -1,53 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifndef UI_TEXT_H -#define UI_TEXT_H - -struct BMF_Font; - -void set_interface_font(char *str); /* headerbuttons.c */ -void start_interface_font(void); /* headerbuttons.c */ - -char *fontsize_pup(void); - -int UI_DrawString(struct BMF_Font* font, char *str, int translate); -float UI_GetStringWidth(struct BMF_Font* font, char *str, int translate); -void UI_GetBoundingBox(struct BMF_Font* font, char* str, int translate, rctf* bbox); - -void UI_set_international(int international); -int UI_get_international(void); - -void UI_RasterPos(float x, float y); -void UI_SetScale(float aspect); -void ui_text_init_userdef(void); - - -#endif /* UI_TEXT_H */ - diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h index 0650a5611dc..7ff312151c5 100644 --- a/source/blender/editors/include/UI_view2d.h +++ b/source/blender/editors/include/UI_view2d.h @@ -54,8 +54,6 @@ enum { V2D_COMMONVIEW_LIST, /* headers (this is basically the same as listview, but no y-panning) */ V2D_COMMONVIEW_HEADER, - /* ui listviews, tries to wrap tot inside region width */ - V2D_COMMONVIEW_LIST_UI, /* ui region containing panels */ V2D_COMMONVIEW_PANELS_UI, } eView2D_CommonViewTypes; diff --git a/source/blender/editors/interface/Makefile b/source/blender/editors/interface/Makefile index fa9550041c5..dfc8187de49 100644 --- a/source/blender/editors/interface/Makefile +++ b/source/blender/editors/interface/Makefile @@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS) CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(OPENGL_HEADERS) -CPPFLAGS += -I$(NAN_BMFONT)/include CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include CPPFLAGS += -I../../windowmanager @@ -48,7 +47,6 @@ CPPFLAGS += -I../../blenlib CPPFLAGS += -I../../makesdna CPPFLAGS += -I../../makesrna CPPFLAGS += -I../../imbuf -CPPFLAGS += -I../../ftfont CPPFLAGS += -I../../blenfont # own include diff --git a/source/blender/editors/interface/SConscript b/source/blender/editors/interface/SConscript index 38cb876beb7..bac3742c12f 100644 --- a/source/blender/editors/interface/SConscript +++ b/source/blender/editors/interface/SConscript @@ -3,15 +3,16 @@ Import ('env') sources = env.Glob('*.c') +for source in env.Glob('*_api.c'): + sources.remove(source) + incs = '../include ../../blenlib ../../blenfont ../../blenkernel ../../makesdna ../../imbuf' -incs += ' ../../makesrna ../../windowmanager #/intern/guardedalloc #intern/bmfont' +incs += ' ../../makesrna ../../windowmanager #/intern/guardedalloc' incs += ' #/extern/glew/include' defs = [] if env['WITH_BF_INTERNATIONAL']: - incs += ' ../../ftfont' defs.append('INTERNATIONAL') - defs.append('FTGL_STATIC_LIBRARY') env.BlenderLib ( 'bf_editors_interface', sources, Split(incs), Split(defs), libtype=['core'], priority=[110] ) diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 7396edd3025..b4c2969c955 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -33,6 +33,7 @@ #include "DNA_ID.h" #include "DNA_listBase.h" +#include "DNA_scene_types.h" #include "DNA_screen_types.h" #include "DNA_texture_types.h" #include "DNA_userdef_types.h" @@ -51,13 +52,9 @@ #include "BIF_gl.h" #include "BIF_glutil.h" -#include "UI_interface.h" -#include "UI_text.h" +#include "BLF_api.h" -#include "BMF_Api.h" -#ifdef INTERNATIONAL -#include "FTF_Api.h" -#endif +#include "UI_interface.h" #include "ED_screen.h" @@ -83,10 +80,7 @@ */ static void ui_free_but(const bContext *C, uiBut *but); - -/* ************ GLOBALS ************* */ - -static uiFont UIfont[UI_ARRAY]; // no init needed +static void ui_rna_ID_autocomplete(bContext *C, char *str, void *arg_but); /* ************* translation ************** */ @@ -207,7 +201,7 @@ void ui_window_to_region(const ARegion *ar, int *x, int *y) /* ******************* block calc ************************* */ -static void ui_block_translate(uiBlock *block, int x, int y) +void ui_block_translate(uiBlock *block, int x, int y) { uiBut *bt; @@ -226,19 +220,21 @@ static void ui_block_translate(uiBlock *block, int x, int y) static void ui_text_bounds_block(uiBlock *block, float offset) { + uiStyle *style= U.uistyles.first; // XXX pass on as arg uiBut *bt; int i = 0, j, x1addval= offset, nextcol; - bt= block->buttons.first; - while(bt) { + uiStyleFontSet(&style->widget); + + for(bt= block->buttons.first; bt; bt= bt->next) { if(bt->type!=SEPR) { - int transopts= ui_translate_buttons(); - if(bt->type==TEX || bt->type==IDPOIN) transopts= 0; - j= UI_GetStringWidth(bt->font, bt->drawstr, transopts); + //int transopts= ui_translate_buttons(); + //if(bt->type==TEX || bt->type==IDPOIN) transopts= 0; + + j= BLF_width(bt->drawstr); if(j > i) i = j; } - bt= bt->next; } /* cope with multi collumns */ @@ -396,68 +392,6 @@ void uiMenuPopupBoundsBlock(uiBlock *block, int addval, int mx, int my) block->my= my; } -void ui_autofill(uiBlock *block) -{ - uiBut *but; - float *maxw, *maxh, startx = 0, starty, height = 0; - float totmaxh; - int rows=0, /* cols=0, */ i, lasti; - - /* first count rows */ - but= block->buttons.last; - rows= but->x1+1; - - /* calculate max width / height for each row */ - maxw= MEM_callocN(sizeof(float)*rows, "maxw"); - maxh= MEM_callocN(sizeof(float)*rows, "maxh"); - but= block->buttons.first; - while(but) { - i= but->x1; - if( maxh[i] < but->y2) maxh[i]= but->y2; - maxw[i] += but->x2; - but= but->next; - } - - totmaxh= 0.0; - for(i=0; i<rows; i++) totmaxh+= maxh[i]; - - /* apply widths/heights */ - starty= block->maxy; - but= block->buttons.first; - lasti= -1; - while(but) { - // signal for aligning code - but->flag |= UI_BUT_ALIGN_DOWN; - - i= but->x1; - - if(i!=lasti) { - startx= block->minx; - height= (maxh[i]*(block->maxy-block->miny))/totmaxh; - starty-= height; - lasti= i; - } - - but->y1= starty+but->aspect; - but->y2= but->y1+height-but->aspect; - - but->x2= (but->x2*(block->maxx-block->minx))/maxw[i]; - but->x1= startx+but->aspect; - - startx+= but->x2; - but->x2+= but->x1-but->aspect; - - ui_check_but(but); - - but= but->next; - } - - uiBlockEndAlign(block); - - MEM_freeN(maxw); MEM_freeN(maxh); - block->autofill= 0; -} - /* ************** LINK LINE DRAWING ************* */ /* link line drawing is not part of buttons or theme.. so we stick with it here */ @@ -473,7 +407,7 @@ static void ui_draw_linkline(uiBut *but, uiLinkLine *line) vec2[0]= (line->to->x1+line->to->x2)/2.0; vec2[1]= (line->to->y1+line->to->y2)/2.0; - if(line->flag & UI_SELECT) UI_ThemeColorShade(but->themecol, 80); + if(line->flag & UI_SELECT) glColor3ub(100,100,100); else glColor3ub(0,0,0); fdrawline(vec1[0], vec1[1], vec2[0], vec2[1]); } @@ -510,7 +444,7 @@ static int ui_but_equals_old(uiBut *but, uiBut *oldbut) if(but->funcN != oldbut->funcN) return 0; if(oldbut->func_arg1 != oldbut && but->func_arg1 != oldbut->func_arg1) return 0; if(oldbut->func_arg2 != oldbut && but->func_arg2 != oldbut->func_arg2) return 0; - if(!but->funcN && (but->poin != oldbut->poin || but->pointype != oldbut->pointype)) return 0; + if(!but->funcN && ((but->poin != oldbut->poin && (uiBut*)oldbut->poin != oldbut) || but->pointype != oldbut->pointype)) return 0; return 1; } @@ -568,10 +502,10 @@ void ui_menu_block_set_keymaps(const bContext *C, uiBlock *block) return; for(but=block->buttons.first; but; but=but->next) { - if(but->opname) { + if(but->optype) { prop= (but->opptr)? but->opptr->data: NULL; - if(WM_key_event_operator_string(C, but->opname, but->opcontext, prop, buf, sizeof(buf))) { + if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, buf, sizeof(buf))) { butstr= MEM_mallocN(strlen(but->str)+strlen(buf)+2, "menu_block_set_keymaps"); strcpy(butstr, but->str); strcat(butstr, "|"); @@ -590,6 +524,7 @@ void ui_menu_block_set_keymaps(const bContext *C, uiBlock *block) void uiEndBlock(const bContext *C, uiBlock *block) { uiBut *but; + Scene *scene= CTX_data_scene(C); /* inherit flags from 'old' buttons that was drawn here previous, based * on matching buttons, we need this to make button event handling non @@ -600,8 +535,8 @@ void uiEndBlock(const bContext *C, uiBlock *block) ui_check_but(but); /* temp? Proper check for greying out */ - if(but->opname) { - wmOperatorType *ot= WM_operatortype_find(but->opname); + if(but->optype) { + wmOperatorType *ot= but->optype; if(ot==NULL || (ot->poll && ot->poll((bContext *)C)==0)) { but->flag |= UI_BUT_DISABLED; but->lock = 1; @@ -611,6 +546,8 @@ void uiEndBlock(const bContext *C, uiBlock *block) /* only update soft range while not editing */ if(but->rnaprop && !(but->editval || but->editstr || but->editvec)) ui_set_but_soft_range(but, ui_get_but_val(but)); + + ui_but_anim_flag(but, (scene)? scene->r.cfra: 0.0f); } if(block->oldblock) { @@ -622,6 +559,8 @@ void uiEndBlock(const bContext *C, uiBlock *block) } /* handle pending stuff */ + if(block->layouts.first) uiBlockLayoutResolve(C, block, NULL, NULL); + ui_block_do_align(block); if(block->flag & UI_BLOCK_LOOP) ui_menu_block_set_keymaps(C, block); /* after keymaps! */ @@ -629,7 +568,6 @@ void uiEndBlock(const bContext *C, uiBlock *block) else if(block->dobounds == 2) ui_text_bounds_block(block, 0.0f); else if(block->dobounds) ui_popup_bounds_block(C, block, (block->dobounds == 4)); - if(block->autofill) ui_autofill(block); if(block->minx==0.0 && block->maxx==0.0) uiBoundsBlock(block, 0); if(block->flag & UI_BUT_ALIGN) uiBlockEndAlign(block); @@ -638,11 +576,53 @@ void uiEndBlock(const bContext *C, uiBlock *block) /* ************** BLOCK DRAWING FUNCTION ************* */ +void ui_fontscale(short *points, float aspect) +{ + if(aspect < 0.9f || aspect > 1.1f) { + float pointsf= *points; + + /* for some reason scaling fonts goes too fast compared to widget size */ + aspect= sqrt(aspect); + pointsf /= aspect; + + if(aspect > 1.0) + *points= ceil(pointsf); + else + *points= floor(pointsf); + } +} + +/* project button or block (but==NULL) to pixels in regionspace */ +static void ui_but_to_pixelrect(rcti *rect, const ARegion *ar, uiBlock *block, uiBut *but) +{ + float gx, gy; + float getsizex, getsizey; + + getsizex= ar->winx; + getsizey= ar->winy; + + gx= (but?but->x1:block->minx) + (block->panel?block->panel->ofsx:0.0f); + gy= (but?but->y1:block->miny) + (block->panel?block->panel->ofsy:0.0f); + + rect->xmin= floor(getsizex*(0.5+ 0.5*(gx*block->winmat[0][0]+ gy*block->winmat[1][0]+ block->winmat[3][0]))); + rect->ymin= floor(getsizey*(0.5+ 0.5*(gx*block->winmat[0][1]+ gy*block->winmat[1][1]+ block->winmat[3][1]))); + + gx= (but?but->x2:block->maxx) + (block->panel?block->panel->ofsx:0.0f); + gy= (but?but->y2:block->maxy) + (block->panel?block->panel->ofsy:0.0f); + + rect->xmax= floor(getsizex*(0.5+ 0.5*(gx*block->winmat[0][0]+ gy*block->winmat[1][0]+ block->winmat[3][0]))); + rect->ymax= floor(getsizey*(0.5+ 0.5*(gx*block->winmat[0][1]+ gy*block->winmat[1][1]+ block->winmat[3][1]))); + +} + +/* uses local copy of style, to scale things down, and allow widgets to change stuff */ void uiDrawBlock(const bContext *C, uiBlock *block) { + uiStyle style= *((uiStyle *)U.uistyles.first); // XXX pass on as arg ARegion *ar; uiBut *but; - + rcti rect; + /* get menu region or area region */ ar= CTX_wm_menu(C); if(!ar) @@ -654,16 +634,38 @@ void uiDrawBlock(const bContext *C, uiBlock *block) /* we set this only once */ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + /* scale fonts */ + ui_fontscale(&style.paneltitle.points, block->aspect); + ui_fontscale(&style.grouplabel.points, block->aspect); + ui_fontscale(&style.widgetlabel.points, block->aspect); + ui_fontscale(&style.widget.points, block->aspect); + + /* scale block min/max to rect */ + ui_but_to_pixelrect(&rect, ar, block, NULL); + + /* pixel space for AA widgets */ + wmPushMatrix(); + wmLoadIdentity(); + + wmOrtho2(-0.01f, ar->winx-0.01f, -0.01f, ar->winy-0.01f); + + /* back */ if(block->flag & UI_BLOCK_LOOP) - uiDrawMenuBox(block->minx, block->miny, block->maxx, block->maxy, block->flag, block->direction); + ui_draw_menu_back(&style, block, &rect); else if(block->panel) - ui_draw_panel(ar, block); + ui_draw_aligned_panel(ar, &style, block, &rect); if(block->drawextra) block->drawextra(C, block); - for(but= block->buttons.first; but; but= but->next) - ui_draw_but(ar, but); - + /* widgets */ + for(but= block->buttons.first; but; but= but->next) { + ui_but_to_pixelrect(&rect, ar, block, but); + ui_draw_but(ar, &style, but, &rect); + } + + /* restore matrix */ + wmPopMatrix(); + ui_draw_links(block); } @@ -692,6 +694,7 @@ static void ui_is_but_sel(uiBut *but) case KEYEVT: if (value==-1) push= 1; break; + case TOGBUT: case TOG: case TOGR: case TOG3: @@ -939,65 +942,6 @@ void uiBlockClearButLock(uiBlock *block) /* *************************************************************** */ -/* XXX 2.50 no button editing */ - -#if 0 -static void setup_file(uiBlock *block) -{ - uiBut *but; - FILE *fp; - - fp= fopen("butsetup","w"); - if(fp==NULL); - else { - but= block->buttons.first; - while(but) { - ui_check_but(but); - fprintf(fp,"%d,%d,%d,%d %s %s\n", (int)but->x1, (int)but->y1, (int)( but->x2-but->x1), (int)(but->y2-but->y1), but->str, but->tip); - but= but->next; - } - fclose(fp); - } -} - - -static void edit_but(uiBlock *block, uiBut *but, uiEvent *uevent) -{ - short dx, dy, mval[2], mvalo[2], didit=0; - - getmouseco_sc(mvalo); - while(TRUE) { - if( !(get_mbut() & L_MOUSE) ) break; - - getmouseco_sc(mval); - dx= (mval[0]-mvalo[0]); - dy= (mval[1]-mvalo[1]); - - if(dx!=0 || dy!=0) { - mvalo[0]= mval[0]; - mvalo[1]= mval[1]; - - cpack(0xc0c0c0); - glRectf(but->x1-2, but->y1-2, but->x2+2, but->y2+2); - - if((uevent->qual & LR_SHIFTKEY)==0) { - but->x1 += dx; - but->y1 += dy; - } - but->x2 += dx; - but->y2 += dy; - - ui_draw_but(ar, but); - ui_block_flush_back(but->block); - didit= 1; - - } - /* idle for this poor code */ - else PIL_sleep_ms(30); - } - if(didit) setup_file(block); -} -#endif /* XXX 2.50 no links supported yet */ #if 0 @@ -1180,8 +1124,8 @@ void ui_get_but_vectorf(uiBut *but, float *vec) vec[0]= vec[1]= vec[2]= 0.0f; - if(RNA_property_type(&but->rnapoin, prop) == PROP_FLOAT) { - tot= RNA_property_array_length(&but->rnapoin, prop); + if(RNA_property_type(prop) == PROP_FLOAT) { + tot= RNA_property_array_length(prop); tot= MIN2(tot, 3); for(a=0; a<tot; a++) @@ -1214,8 +1158,8 @@ void ui_set_but_vectorf(uiBut *but, float *vec) if(but->rnaprop) { prop= but->rnaprop; - if(RNA_property_type(&but->rnapoin, prop) == PROP_FLOAT) { - tot= RNA_property_array_length(&but->rnapoin, prop); + if(RNA_property_type(prop) == PROP_FLOAT) { + tot= RNA_property_array_length(prop); tot= MIN2(tot, 3); for(a=0; a<tot; a++) @@ -1239,7 +1183,7 @@ int ui_is_but_float(uiBut *but) if(but->pointype==FLO && but->poin) return 1; - if(but->rnaprop && RNA_property_type(&but->rnapoin, but->rnaprop) == PROP_FLOAT) + if(but->rnaprop && RNA_property_type(but->rnaprop) == PROP_FLOAT) return 1; return 0; @@ -1256,21 +1200,21 @@ double ui_get_but_val(uiBut *but) if(but->rnaprop) { prop= but->rnaprop; - switch(RNA_property_type(&but->rnapoin, prop)) { + switch(RNA_property_type(prop)) { case PROP_BOOLEAN: - if(RNA_property_array_length(&but->rnapoin, prop)) + if(RNA_property_array_length(prop)) value= RNA_property_boolean_get_index(&but->rnapoin, prop, but->rnaindex); else value= RNA_property_boolean_get(&but->rnapoin, prop); break; case PROP_INT: - if(RNA_property_array_length(&but->rnapoin, prop)) + if(RNA_property_array_length(prop)) value= RNA_property_int_get_index(&but->rnapoin, prop, but->rnaindex); else value= RNA_property_int_get(&but->rnapoin, prop); break; case PROP_FLOAT: - if(RNA_property_array_length(&but->rnapoin, prop)) + if(RNA_property_array_length(prop)) value= RNA_property_float_get_index(&but->rnapoin, prop, but->rnaindex); else value= RNA_property_float_get(&but->rnapoin, prop); @@ -1320,21 +1264,21 @@ void ui_set_but_val(uiBut *but, double value) prop= but->rnaprop; if(RNA_property_editable(&but->rnapoin, prop)) { - switch(RNA_property_type(&but->rnapoin, prop)) { + switch(RNA_property_type(prop)) { case PROP_BOOLEAN: - if(RNA_property_array_length(&but->rnapoin, prop)) + if(RNA_property_array_length(prop)) RNA_property_boolean_set_index(&but->rnapoin, prop, but->rnaindex, value); else RNA_property_boolean_set(&but->rnapoin, prop, value); break; case PROP_INT: - if(RNA_property_array_length(&but->rnapoin, prop)) + if(RNA_property_array_length(prop)) RNA_property_int_set_index(&but->rnapoin, prop, but->rnaindex, value); else RNA_property_int_set(&but->rnapoin, prop, value); break; case PROP_FLOAT: - if(RNA_property_array_length(&but->rnapoin, prop)) + if(RNA_property_array_length(prop)) RNA_property_float_set_index(&but->rnapoin, prop, but->rnaindex, value); else RNA_property_float_set(&but->rnapoin, prop, value); @@ -1401,32 +1345,217 @@ void ui_set_but_val(uiBut *but, double value) ui_is_but_sel(but); } +int ui_get_but_string_max_length(uiBut *but) +{ + if(but->type == TEX) + return but->hardmax; + else if(but->type == IDPOIN) + return sizeof(((ID*)NULL)->name)-2; + else + return UI_MAX_DRAW_STR; +} + void ui_get_but_string(uiBut *but, char *str, int maxlen) { - if(but->rnaprop) { - char *buf; - - buf= RNA_property_string_get_alloc(&but->rnapoin, but->rnaprop, str, maxlen); + if(but->rnaprop && ELEM(but->type, TEX, IDPOIN)) { + PropertyType type; + char *buf= NULL; + + type= RNA_property_type(but->rnaprop); + + if(type == PROP_STRING) { + /* RNA string */ + buf= RNA_property_string_get_alloc(&but->rnapoin, but->rnaprop, str, maxlen); + } + else if(type == PROP_POINTER) { + /* RNA pointer */ + PointerRNA ptr= RNA_property_pointer_get(&but->rnapoin, but->rnaprop); + PropertyRNA *nameprop; - if(buf != str) { + if(ptr.data && (nameprop = RNA_struct_name_property(ptr.type))) + buf= RNA_property_string_get_alloc(&ptr, nameprop, str, maxlen); + else + BLI_strncpy(str, "", maxlen); + } + else + BLI_strncpy(str, "", maxlen); + + if(buf && buf != str) { /* string was too long, we have to truncate */ BLI_strncpy(str, buf, maxlen); MEM_freeN(buf); } } - else + else if(but->type == IDPOIN) { + /* ID pointer */ + ID *id= *(but->idpoin_idpp); + + if(id) BLI_strncpy(str, id->name+2, maxlen); + else BLI_strncpy(str, "", maxlen); + + return; + } + else if(but->type == TEX) { + /* string */ BLI_strncpy(str, but->poin, maxlen); + return; + } + else { + /* number */ + double value; + + value= ui_get_but_val(but); + if(ui_is_but_float(but)) { + if(but->a2) { /* amount of digits defined */ + if(but->a2==1) BLI_snprintf(str, maxlen, "%.1f", value); + else if(but->a2==2) BLI_snprintf(str, maxlen, "%.2f", value); + else if(but->a2==3) BLI_snprintf(str, maxlen, "%.3f", value); + else BLI_snprintf(str, maxlen, "%.4f", value); + } + else + BLI_snprintf(str, maxlen, "%.3f", value); + } + else + BLI_snprintf(str, maxlen, "%d", (int)value); + } } -void ui_set_but_string(uiBut *but, const char *str) +static void ui_rna_ID_collection(bContext *C, uiBut *but, PointerRNA *ptr, PropertyRNA **prop) { - if(but->rnaprop) { - if(RNA_property_editable(&but->rnapoin, but->rnaprop)) - RNA_property_string_set(&but->rnapoin, but->rnaprop, str); + CollectionPropertyIterator iter; + PropertyRNA *iterprop, *iprop; + StructRNA *srna; + + /* look for collection property in Main */ + RNA_pointer_create(NULL, &RNA_Main, CTX_data_main(C), ptr); + + iterprop= RNA_struct_iterator_property(ptr->type); + RNA_property_collection_begin(ptr, iterprop, &iter); + *prop= NULL; + + for(; iter.valid; RNA_property_collection_next(&iter)) { + iprop= iter.ptr.data; + + /* if it's a collection and has same pointer type, we've got it */ + if(RNA_property_type(iprop) == PROP_COLLECTION) { + srna= RNA_property_pointer_type(iprop); + + if(RNA_property_pointer_type(but->rnaprop) == srna) { + *prop= iprop; + break; + } + } } - else + + RNA_property_collection_end(&iter); +} + +/* autocomplete callback for RNA pointers */ +static void ui_rna_ID_autocomplete(bContext *C, char *str, void *arg_but) +{ + uiBut *but= arg_but; + AutoComplete *autocpl; + CollectionPropertyIterator iter; + PointerRNA ptr; + PropertyRNA *prop, *nameprop; + char *name; + + if(str[0]==0) return; + + /* get the collection */ + ui_rna_ID_collection(C, but, &ptr, &prop); + if(prop==NULL) return; + + autocpl= autocomplete_begin(str, ui_get_but_string_max_length(but)); + RNA_property_collection_begin(&ptr, prop, &iter); + + /* loop over items in collection */ + for(; iter.valid; RNA_property_collection_next(&iter)) { + if(iter.ptr.data && (nameprop = RNA_struct_name_property(iter.ptr.type))) { + name= RNA_property_string_get_alloc(&iter.ptr, nameprop, NULL, 0); + + if(name) { + /* test item name */ + autocomplete_do_name(autocpl, name); + MEM_freeN(name); + } + } + } + + RNA_property_collection_end(&iter); + autocomplete_end(autocpl, str); +} + +int ui_set_but_string(bContext *C, uiBut *but, const char *str) +{ + if(but->rnaprop && ELEM(but->type, TEX, IDPOIN)) { + if(RNA_property_editable(&but->rnapoin, but->rnaprop)) { + PropertyType type; + + type= RNA_property_type(but->rnaprop); + + if(type == PROP_STRING) { + /* RNA string */ + RNA_property_string_set(&but->rnapoin, but->rnaprop, str); + return 1; + } + else if(type == PROP_POINTER) { + /* RNA pointer */ + PointerRNA ptr, rptr; + PropertyRNA *prop; + + /* XXX only ID pointers at the moment, needs to support + * custom collection too for bones, vertex groups, .. */ + ui_rna_ID_collection(C, but, &ptr, &prop); + + if(prop && RNA_property_collection_lookup_string(&ptr, prop, str, &rptr)) { + RNA_property_pointer_set(&but->rnapoin, but->rnaprop, rptr); + return 1; + } + else + return 0; + } + } + } + else if(but->type == IDPOIN) { + /* ID pointer */ + but->idpoin_func(C, (char*)str, but->idpoin_idpp); + return 1; + } + else if(but->type == TEX) { + /* string */ BLI_strncpy(but->poin, str, but->hardmax); + return 1; + } + else { + double value; + + /* XXX 2.50 missing python api */ +#if 0 + if(BPY_button_eval(str, &value)) { + BKE_report(CTX_reports(C), RPT_WARNING, "Invalid Python expression, check console"); + value = 0.0f; /* Zero out value on error */ + + if(str[0]) + return 0; + } +#else + value= atof(str); +#endif + + if(!ui_is_but_float(but)) value= (int)value; + if(but->type==NUMABS) value= fabs(value); + + /* not that we use hard limits here */ + if(value<but->hardmin) value= but->hardmin; + if(value>but->hardmax) value= but->hardmax; + + ui_set_but_val(but, value); + return 1; + } + + return 0; } static double soft_range_round_up(double value, double max) @@ -1461,7 +1590,7 @@ void ui_set_but_soft_range(uiBut *but, double value) double softmin, softmax, step, precision; if(but->rnaprop) { - type= RNA_property_type(&but->rnapoin, but->rnaprop); + type= RNA_property_type(but->rnaprop); if(type == PROP_INT) { int imin, imax, istep; @@ -1514,82 +1643,6 @@ void ui_set_but_soft_range(uiBut *but, double value) } } -/* ******************* Font ********************/ - -static void ui_set_ftf_font(float aspect) -{ -#ifdef INTERNATIONAL - if(aspect<1.15) { - FTF_SetFontSize('l'); - } - else if(aspect<1.59) { - FTF_SetFontSize('m'); - } - else { - FTF_SetFontSize('s'); - } -#endif -} - -void uiSetCurFont(uiBlock *block, int index) -{ - ui_set_ftf_font(block->aspect); - - if(block->aspect<0.60) { - block->curfont= UIfont[index].xl; - } - else if(block->aspect<1.15) { - block->curfont= UIfont[index].large; - } - else if(block->aspect<1.59) { - block->curfont= UIfont[index].medium; - } - else { - block->curfont= UIfont[index].small; - } - - if(block->curfont==NULL) block->curfont= UIfont[index].large; - if(block->curfont==NULL) block->curfont= UIfont[index].medium; - if(block->curfont==NULL) printf("error block no font %s\n", block->name); - -} - -/* called by node editor */ -void *uiSetCurFont_ext(float aspect) -{ - void *curfont; - - ui_set_ftf_font(aspect); - - if(aspect<0.60) { - curfont= UIfont[0].xl; - } - else if(aspect<1.15) { - curfont= UIfont[0].large; - } - else if(aspect<1.59) { - curfont= UIfont[0].medium; - } - else { - curfont= UIfont[0].small; - } - - if(curfont==NULL) curfont= UIfont[0].large; - if(curfont==NULL) curfont= UIfont[0].medium; - - return curfont; -} - -void uiDefFont(unsigned int index, void *xl, void *large, void *medium, void *small) -{ - if(index>=UI_ARRAY) return; - - UIfont[index].xl= xl; - UIfont[index].large= large; - UIfont[index].medium= medium; - UIfont[index].small= small; -} - /* ******************* Free ********************/ static void ui_free_link(uiLink *link) @@ -1632,9 +1685,6 @@ void uiFreeBlock(const bContext *C, uiBlock *block) ui_free_but(C, but); } - if(block->panel) { - block->panel->active= 0; - } BLI_freelistN(&block->saferct); MEM_freeN(block); @@ -1669,21 +1719,18 @@ void uiFreeInactiveBlocks(const bContext *C, ListBase *lb) } } -uiBlock *uiBeginBlock(const bContext *C, ARegion *region, char *name, short dt, short font) +void uiBlockSetRegion(uiBlock *block, ARegion *region) { ListBase *lb; - uiBlock *block, *oldblock= NULL; - wmWindow *window; - int getsizex, getsizey; + uiBlock *oldblock= NULL; - window= CTX_wm_window(C); lb= ®ion->uiblocks; /* each listbase only has one block with this name, free block * if is already there so it can be rebuilt from scratch */ if(lb) { for (oldblock= lb->first; oldblock; oldblock= oldblock->next) - if (BLI_streq(oldblock->name, name)) + if (BLI_streq(oldblock->name, block->name)) break; if (oldblock) { @@ -1691,30 +1738,32 @@ uiBlock *uiBeginBlock(const bContext *C, ARegion *region, char *name, short dt, oldblock->panel= NULL; } } - - block= MEM_callocN(sizeof(uiBlock), "uiBlock"); + block->oldblock= oldblock; - block->active= 1; /* at the beginning of the list! for dynamical menus/blocks */ if(lb) BLI_addhead(lb, block); +} - BLI_strncpy(block->name, name, sizeof(block->name)); +uiBlock *uiBeginBlock(const bContext *C, ARegion *region, const char *name, short dt) +{ + uiBlock *block; + wmWindow *window; + int getsizex, getsizey; -#if 0 - /* draw win */ - block->win= win; - /* window where queue event should be added, pretty weak this way! - this is because the 'mainwin' pup menu's */ - block->winq= mywinget(); -#endif + window= CTX_wm_window(C); + block= MEM_callocN(sizeof(uiBlock), "uiBlock"); + block->active= 1; block->dt= dt; - block->themecol= TH_AUTO; + BLI_strncpy(block->name, name, sizeof(block->name)); + + if(region) + uiBlockSetRegion(block, region); /* window matrix and aspect */ - if(region->swinid) { + if(region && region->swinid) { wm_subwindow_getmatrix(window, region->swinid, block->winmat); wm_subwindow_getsize(window, region->swinid, &getsizex, &getsizey); @@ -1734,8 +1783,6 @@ uiBlock *uiBeginBlock(const bContext *C, ARegion *region, char *name, short dt, block->flag |= UI_BLOCK_LOOP; /* tag as menu */ } - uiSetCurFont(block, font); - return block; } @@ -1751,14 +1798,17 @@ uiBlock *uiGetBlock(char *name, ARegion *ar) return NULL; } +void uiBlockSetEmboss(uiBlock *block, short dt) +{ + block->dt= dt; +} + void ui_check_but(uiBut *but) { /* if something changed in the button */ - ID *id; double value; float okwidth; int transopts= ui_translate_buttons(); - short pos; ui_is_but_sel(but); @@ -1841,7 +1891,7 @@ void ui_check_but(uiBut *but) } if(but->rnaprop) { - PropertySubType pstype = RNA_property_subtype(&but->rnapoin, but->rnaprop); + PropertySubType pstype = RNA_property_subtype(but->rnaprop); if (pstype == PROP_PERCENTAGE) strcat(but->drawstr, "%"); @@ -1866,11 +1916,6 @@ void ui_check_but(uiBut *but) break; case IDPOIN: - id= *(but->idpoin_idpp); - strcpy(but->drawstr, but->str); - if(id) strcat(but->drawstr, id->name+2); - break; - case TEX: if(!but->editstr) { char str[UI_MAX_DRAW_STR]; @@ -1908,92 +1953,10 @@ void ui_check_but(uiBut *but) strcpy(but->drawstr, but->str); strcat(but->drawstr, but->editstr); } - - if(but->drawstr[0]) { - but->strwidth= but->aspect*UI_GetStringWidth(but->font, but->drawstr, transopts); - // here should be check for less space for icon offsets... - if(but->type==MENU) okwidth -= 15; - } - else - but->strwidth= 0; - - /* automatic width */ - if(but->x2==0.0f && but->x1 > 0.0f) { - but->x2= (but->x1+but->strwidth+6); - } - - if(but->strwidth==0) but->drawstr[0]= 0; - else if(but->block->flag & UI_BLOCK_LOOP); // no clip string, uiTextBoundsBlock is used (hack!) - else { - - /* calc but->ofs, to draw the string shorter if too long */ - but->ofs= 0; - - while(but->strwidth > (int)okwidth ) { - if ELEM3(but->type, NUM, NUMABS, TEX) { // only these cut off left - but->ofs++; - but->strwidth= but->aspect*UI_GetStringWidth(but->font, but->drawstr+but->ofs, transopts); - - /* textbut exception */ - if(but->editstr && but->pos != -1) { - pos= but->pos+strlen(but->str); - if(pos-1 < but->ofs) { - pos= but->ofs-pos+1; - but->ofs -= pos; - if(but->ofs<0) { - but->ofs= 0; - pos--; - } - but->drawstr[ strlen(but->drawstr)-pos ]= 0; - } - } - } - else { - but->drawstr[ strlen(but->drawstr)-1 ]= 0; - but->strwidth= but->aspect*UI_GetStringWidth(but->font, but->drawstr, transopts); - } - - if(but->strwidth < 10) break; - } - } + /* text clipping moved to widget drawing code itself */ } -static int ui_auto_themecol(uiBut *but) -{ - if(but->block->flag & UI_BLOCK_LOOP) - return TH_MENU_ITEM; - - switch(but->type) { - case BUT: - return TH_BUT_ACTION; - case ROW: - case TOG: - case TOG3: - case TOGR: - case TOGN: - case BUT_TOGDUAL: - return TH_BUT_SETTING; - case SLI: - case NUM: - case NUMSLI: - case NUMABS: - case HSVSLI: - return TH_BUT_NUM; - case TEX: - return TH_BUT_TEXTFIELD; - case PULLDOWN: - case HMENU: - case BLOCK: - case MENU: - case BUTM: - return TH_BUT_POPUP; - case ROUNDBOX: - return TH_PANEL; - default: - return TH_BUT_NEUTRAL; - } -} void uiBlockBeginAlign(uiBlock *block) { @@ -2001,7 +1964,9 @@ void uiBlockBeginAlign(uiBlock *block) if(block->flag & UI_BUT_ALIGN) uiBlockEndAlign(block); block->flag |= UI_BUT_ALIGN_DOWN; - /* buttons declared after this call will this align flag */ + block->alignnr++; + + /* buttons declared after this call will get this align nr */ // XXX flag? } static int buts_are_horiz(uiBut *but1, uiBut *but2) @@ -2017,42 +1982,38 @@ static int buts_are_horiz(uiBut *but1, uiBut *but2) void uiBlockEndAlign(uiBlock *block) { + block->flag &= ~UI_BUT_ALIGN; // all 4 flags +} + +int ui_but_can_align(uiBut *but) +{ + return !ELEM(but->type, LABEL, ROUNDBOX); +} + +static void ui_block_do_align_but(uiBlock *block, uiBut *first, int nr) +{ uiBut *prev, *but=NULL, *next; int flag= 0, cols=0, rows=0; - int theme= UI_GetThemeValue(TH_BUT_DRAWTYPE); - - if ( !(ELEM4(theme, TH_MINIMAL, TH_SHADED, TH_ROUNDED, TH_ROUNDSHADED)) ) { - block->flag &= ~UI_BUT_ALIGN; // all 4 flags - return; - } - /* auto align: - - go back to first button of align start (ALIGN_DOWN) - - compare triples, and define flags - */ - prev= block->buttons.last; - while(prev) { - if( (prev->flag & UI_BUT_ALIGN_DOWN)) but= prev; - else break; - - if(but && but->next) { + /* auto align */ + + for(but=first; but && but->alignnr == nr; but=but->next) { + if(but->next && but->next->alignnr == nr) { if(buts_are_horiz(but, but->next)) cols++; else rows++; } - - prev= prev->prev; } - if(but==NULL) return; - + /* rows==0: 1 row, cols==0: 1 collumn */ /* note; how it uses 'flag' in loop below (either set it, or OR it) is confusing */ - prev= NULL; - while(but) { + for(but=first, prev=NULL; but && but->alignnr == nr; prev=but, but=but->next) { next= but->next; - + if(next && next->alignnr != nr) + next= NULL; + /* clear old flag */ - but->flag &= ~UI_BUT_ALIGN_DOWN; + but->flag &= ~UI_BUT_ALIGN; if(flag==0) { /* first case */ if(next) { @@ -2081,15 +2042,16 @@ void uiBlockEndAlign(uiBlock *block) else if(buts_are_horiz(but, next)) { /* check if this is already second row */ if( prev && buts_are_horiz(prev, but)==0) { + flag &= ~UI_BUT_ALIGN_LEFT; flag |= UI_BUT_ALIGN_TOP; /* exception case: bottom row */ if(rows>0) { uiBut *bt= but; - while(bt) { - if(bt->next && buts_are_horiz(bt, bt->next)==0 ) break; + while(bt && bt->alignnr == nr) { + if(bt->next && bt->next->alignnr == nr && buts_are_horiz(bt, bt->next)==0 ) break; bt= bt->next; } - if(bt==0) flag= UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_RIGHT; + if(bt==0 || bt->alignnr != nr) flag= UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_RIGHT; } } else flag |= UI_BUT_ALIGN_LEFT; @@ -2099,6 +2061,10 @@ void uiBlockEndAlign(uiBlock *block) flag |= UI_BUT_ALIGN_TOP; } else { /* next button switches to new row */ + + if(prev && buts_are_horiz(prev, but)) + flag |= UI_BUT_ALIGN_LEFT; + if( (flag & UI_BUT_ALIGN_TOP)==0) { /* stil top row */ if(prev) flag= UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_LEFT; @@ -2141,35 +2107,30 @@ void uiBlockEndAlign(uiBlock *block) } } } - - prev= but; - but= next; } - - block->flag &= ~UI_BUT_ALIGN; // all 4 flags } -#if 0 -static void uiBlockEndAligno(uiBlock *block) +void ui_block_do_align(uiBlock *block) { uiBut *but; - - /* correct last defined button */ - but= block->buttons.last; - if(but) { - /* vertical align case */ - if( (block->flag & UI_BUT_ALIGN) == (UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_DOWN) ) { - but->flag &= ~UI_BUT_ALIGN_DOWN; - } - /* horizontal align case */ - if( (block->flag & UI_BUT_ALIGN) == (UI_BUT_ALIGN_LEFT|UI_BUT_ALIGN_RIGHT) ) { - but->flag &= ~UI_BUT_ALIGN_RIGHT; + int nr; + + /* align buttons with same align nr */ + for(but=block->buttons.first; but;) { + if(but->alignnr) { + nr= but->alignnr; + ui_block_do_align_but(block, but, nr); + + /* skip with same number */ + for(; but && but->alignnr == nr; but=but->next); + + if(!but) + break; } - /* else do nothing, manually provided flags */ + else + but= but->next; } - block->flag &= ~UI_BUT_ALIGN; // all 4 flags } -#endif /* ui_def_but is the function that draws many button types @@ -2186,12 +2147,8 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short short slen; if(type & BUTPOIN) { /* a pointer is required */ - if(poin==NULL) { - /* if pointer is zero, button is removed and not drawn */ - UI_ThemeColor(block->themecol); - glRects(x1, y1, x1+x2, y1+y2); + if(poin==NULL) return NULL; - } } but= MEM_callocN(sizeof(uiBut), "uiBut"); @@ -2202,8 +2159,6 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short but->bitnr= type & 31; but->icon = 0; - BLI_addtail(&block->buttons, but); - but->retval= retval; if( strlen(str)>=UI_MAX_NAME_STR-1 ) { but->str= MEM_callocN( strlen(str)+2, "uiDefBut"); @@ -2215,14 +2170,9 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short } but->x1= x1; but->y1= y1; - if(block->autofill) { - but->x2= x2; - but->y2= y2; - } - else { - but->x2= (x1+x2); - but->y2= (y1+y2); - } + but->x2= (x1+x2); + but->y2= (y1+y2); + but->poin= poin; but->hardmin= but->softmin= min; but->hardmax= but->softmax= max; @@ -2230,24 +2180,20 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short but->a2= a2; but->tip= tip; - but->font= block->curfont; - but->lock= block->lock; but->lockstr= block->lockstr; + but->dt= block->dt; - but->aspect= block->aspect; - but->win= block->win; + but->aspect= 1.0f; //XXX block->aspect; but->block= block; // pointer back, used for frontbuffer status, and picker - if(block->themecol==TH_AUTO) but->themecol= ui_auto_themecol(but); - else but->themecol= block->themecol; + if((block->flag & UI_BUT_ALIGN) && ui_but_can_align(but)) + but->alignnr= block->alignnr; but->func= block->func; but->func_arg1= block->func_arg1; but->func_arg2= block->func_arg2; - ui_set_embossfunc(but, block->dt); - but->pos= -1; /* cursor invisible */ if(ELEM(but->type, NUM, NUMABS)) { /* add a space to name */ @@ -2266,7 +2212,7 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short rgb_to_hsv(rgb[0], rgb[1], rgb[2], but->hsv, but->hsv+1, but->hsv+2); } - if((block->flag & UI_BLOCK_LOOP) || ELEM8(but->type, HSVSLI , NUMSLI, MENU, TEX, LABEL, IDPOIN, BLOCK, BUTM)) { + if((block->flag & UI_BLOCK_LOOP) || ELEM6(but->type, MENU, TEX, LABEL, IDPOIN, BLOCK, BUTM)) { but->flag |= UI_TEXT_LEFT; } @@ -2274,9 +2220,6 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short but->flag |= UI_ICON_LEFT; } - if(but->type==ROUNDBOX) - but->flag |= UI_NO_HILITE; - but->flag |= (block->flag & UI_BUT_ALIGN); if(block->flag & UI_BLOCK_NO_HILITE) but->flag |= UI_NO_HILITE; @@ -2287,6 +2230,16 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short } } + if(but->type == ROUNDBOX) { + but->flag |= UI_NO_HILITE; + BLI_addhead(&block->buttons, but); + } + else + BLI_addtail(&block->buttons, but); + + if(block->curlayout) + ui_layout_add_but(block->curlayout, but); + return but; } @@ -2300,7 +2253,7 @@ uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, char *str, short x1, prop= RNA_struct_find_property(ptr, propname); if(prop) { - proptype= RNA_property_type(ptr, prop); + proptype= RNA_property_type(prop); /* use rna values if parameters are not specified */ if(!str) { @@ -2312,7 +2265,7 @@ uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, char *str, short x1, RNA_property_enum_items(ptr, prop, &item, &totitem); dynstr= BLI_dynstr_new(); - BLI_dynstr_appendf(dynstr, "%s%%t", RNA_property_ui_name(ptr, prop)); + BLI_dynstr_appendf(dynstr, "%s%%t", RNA_property_ui_name(prop)); for(i=0; i<totitem; i++) BLI_dynstr_appendf(dynstr, "|%s %%x%d", item[i].name, item[i].value); str= BLI_dynstr_get_cstring(dynstr); @@ -2330,10 +2283,10 @@ uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, char *str, short x1, str= (char*)item[i].name; if(!str) - str= (char*)RNA_property_ui_name(ptr, prop); + str= (char*)RNA_property_ui_name(prop); } else - str= (char*)RNA_property_ui_name(ptr, prop); + str= (char*)RNA_property_ui_name(prop); } if(!tip) { @@ -2354,7 +2307,7 @@ uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, char *str, short x1, } if(!tip) - tip= (char*)RNA_property_ui_description(ptr, prop); + tip= (char*)RNA_property_ui_description(prop); if(min == max || a1 == -1 || a2 == -1) { if(proptype == PROP_INT) { @@ -2389,7 +2342,7 @@ uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, char *str, short x1, } else if(proptype == PROP_STRING) { min= 0; - max= RNA_property_string_maxlength(ptr, prop); + max= RNA_property_string_maxlength(prop); if(max == 0) /* interface code should ideally support unlimited length */ max= UI_MAX_DRAW_STR; } @@ -2405,10 +2358,13 @@ uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, char *str, short x1, but->rnapoin= *ptr; but->rnaprop= prop; - if(RNA_property_array_length(&but->rnapoin, but->rnaprop)) + if(RNA_property_array_length(but->rnaprop)) but->rnaindex= index; else but->rnaindex= 0; + + if(type == IDPOIN) + uiButSetCompleteFunc(but, ui_rna_ID_autocomplete, but); } if (!prop || !RNA_property_editable(&but->rnapoin, prop)) { @@ -2440,7 +2396,7 @@ uiBut *ui_def_but_operator(uiBlock *block, int type, char *opname, int opcontext } but= ui_def_but(block, type, -1, str, x1, y1, x2, y2, NULL, 0, 0, 0, 0, tip); - but->opname= opname; + but->optype= ot; but->opcontext= opcontext; if(!ot) { @@ -2807,7 +2763,7 @@ uiBut *uiDefMenuSep(uiBlock *block) uiBut *uiDefMenuSub(uiBlock *block, uiBlockCreateFunc func, char *name) { int y= ui_menu_y(block) - MENU_ITEM_HEIGHT; - return uiDefIconTextBlockBut(block, func, NULL, ICON_RIGHTARROW_THIN, name, 0, y, MENU_WIDTH, MENU_ITEM_HEIGHT-1, ""); + return uiDefIconTextBlockBut(block, func, NULL, ICON_BLANK1, name, 0, y, MENU_WIDTH, MENU_ITEM_HEIGHT-1, ""); } uiBut *uiDefMenuTogR(uiBlock *block, PointerRNA *ptr, char *propname, char *propvalue, char *name) @@ -2821,7 +2777,7 @@ uiBut *uiDefMenuTogR(uiBlock *block, PointerRNA *ptr, char *propname, char *prop prop= RNA_struct_find_property(ptr, propname); if(prop) { - type= RNA_property_type(ptr, prop); + type= RNA_property_type(prop); if(type == PROP_BOOLEAN) { if(RNA_property_boolean_get(ptr, prop)) @@ -2860,17 +2816,6 @@ uiBut *uiDefMenuTogR(uiBlock *block, PointerRNA *ptr, char *propname, char *prop /* END Button containing both string label and icon */ -void uiAutoBlock(uiBlock *block, float minx, float miny, float sizex, float sizey, int flag) -{ - block->minx= minx; - block->maxx= minx+sizex; - block->miny= miny; - block->maxy= miny+sizey; - - block->autofill= flag; /* also check for if it has to be done */ - -} - void uiSetButLink(uiBut *but, void **poin, void ***ppoin, short *tot, int from, int to) { uiLink *link; @@ -2898,18 +2843,6 @@ int uiBlocksGetYMin(ListBase *lb) return min; } -int uiBlockGetCol(uiBlock *block) -{ - return block->themecol; -} -void uiBlockSetCol(uiBlock *block, int col) -{ - block->themecol= col; -} -void uiBlockSetEmboss(uiBlock *block, int emboss) -{ - block->dt= emboss; -} void uiBlockSetDirection(uiBlock *block, int direction) { block->direction= direction; @@ -2955,23 +2888,22 @@ void uiBlockSetFlag(uiBlock *block, int flag) { block->flag|= flag; } + void uiBlockClearFlag(uiBlock *block, int flag) { block->flag&= ~flag; } + void uiBlockSetXOfs(uiBlock *block, int xofs) { block->xofs= xofs; } -void* uiBlockGetCurFont(uiBlock *block) -{ - return block->curfont; -} void uiButSetFlag(uiBut *but, int flag) { but->flag|= flag; } + void uiButClearFlag(uiBut *but, int flag) { but->flag&= ~flag; @@ -2984,9 +2916,9 @@ int uiButGetRetVal(uiBut *but) PointerRNA *uiButGetOperatorPtrRNA(uiBut *but) { - if(but->opname && !but->opptr) { + if(but->optype && !but->opptr) { but->opptr= MEM_callocN(sizeof(PointerRNA), "uiButOpPtr"); - WM_operator_properties_create(but->opptr, but->opname); + WM_operator_properties_create(but->opptr, but->optype->idname); } return but->opptr; @@ -3081,7 +3013,7 @@ uiBut *uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, in but->flag|= UI_HAS_ICON; but->flag|= UI_ICON_LEFT; - but->flag|= UI_ICON_RIGHT; + but->flag|= UI_ICON_SUBMENU; but->menu_create_func= func; ui_check_but(but); @@ -3094,11 +3026,13 @@ uiBut *uiDefIconTextBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, { uiBut *but= ui_def_but(block, BLOCK, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); - but->icon= (BIFIconID) icon; + /* XXX temp, old menu calls pass on icon arrow, which is now UI_ICON_SUBMENU flag */ + if(icon!=ICON_RIGHTARROW_THIN) { + but->icon= (BIFIconID) icon; + but->flag|= UI_ICON_LEFT; + } but->flag|= UI_HAS_ICON; - - but->flag|= UI_ICON_LEFT; - but->flag|= UI_ICON_RIGHT; + but->flag|= UI_ICON_SUBMENU; but->block_create_func= func; ui_check_but(but); @@ -3115,7 +3049,7 @@ uiBut *uiDefIconBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int but->flag|= UI_HAS_ICON; but->flag|= UI_ICON_LEFT; - but->flag|= UI_ICON_RIGHT; + but->flag|= UI_ICON_SUBMENU; but->block_create_func= func; ui_check_but(but); @@ -3133,24 +3067,18 @@ void uiDefKeyevtButS(uiBlock *block, int retval, char *str, short x1, short y1, void UI_init(void) { - uiDefFont(UI_HELVB, - BMF_GetFont(BMF_kHelveticaBold14), - BMF_GetFont(BMF_kHelveticaBold12), - BMF_GetFont(BMF_kHelveticaBold10), - BMF_GetFont(BMF_kHelveticaBold8)); - uiDefFont(UI_HELV, - BMF_GetFont(BMF_kHelvetica12), - BMF_GetFont(BMF_kHelvetica12), - BMF_GetFont(BMF_kHelvetica10), - BMF_GetFont(BMF_kHelveticaBold8)); - ui_resources_init(); } -void UI_init_userdef() +/* after reading userdef file */ +void UI_init_userdef(void) { - ui_text_init_userdef(); + /* fix saved themes */ + init_userdef_do_versions(); + /* set default colors in default theme */ ui_theme_init_userdef(); + + uiStyleInit(); } void UI_exit(void) diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c new file mode 100644 index 00000000000..4a26db29160 --- /dev/null +++ b/source/blender/editors/interface/interface_anim.c @@ -0,0 +1,172 @@ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "MEM_guardedalloc.h" + +#include "DNA_anim_types.h" +#include "DNA_scene_types.h" +#include "DNA_screen_types.h" + +#include "BLI_listbase.h" + +#include "BKE_animsys.h" +#include "BKE_context.h" +#include "BKE_fcurve.h" + +#include "RNA_access.h" +#include "RNA_types.h" + +#include "UI_interface.h" + +#include "WM_api.h" +#include "WM_types.h" + +#include "interface_intern.h" + +void ui_but_anim_flag(uiBut *but, float cfra) +{ + but->flag &= ~(UI_BUT_ANIMATED|UI_BUT_ANIMATED_KEY|UI_BUT_DRIVEN); + + if(but->rnaprop && but->rnapoin.id.data) { + AnimData *adt= BKE_animdata_from_id(but->rnapoin.id.data); + FCurve *fcu; + char *path; + + if (adt) { + if ((adt->action && adt->action->curves.first) || (adt->drivers.first)) { + /* XXX this function call can become a performance bottleneck */ + path= RNA_path_from_ID_to_property(&but->rnapoin, but->rnaprop); + + if (path) { + /* animation takes priority over drivers */ + if (adt->action && adt->action->curves.first) { + fcu= list_find_fcurve(&adt->action->curves, path, but->rnaindex); + + if (fcu) { + but->flag |= UI_BUT_ANIMATED; + + if (on_keyframe_fcurve(fcu, cfra)) + but->flag |= UI_BUT_ANIMATED_KEY; + } + } + + /* if not animated, check if driven */ + if ((but->flag & UI_BUT_ANIMATED)==0 && (adt->drivers.first)) { + fcu= list_find_fcurve(&adt->drivers, path, but->rnaindex); + + if (fcu) + but->flag |= UI_BUT_DRIVEN; + } + + MEM_freeN(path); + } + } + } + } +} + +void uiAnimContextProperty(const bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop, int *index) +{ + ARegion *ar= CTX_wm_region(C); + uiBlock *block; + uiBut *but; + + if(ar) { + for(block=ar->uiblocks.first; block; block=block->next) { + for(but=block->buttons.first; but; but= but->next) { + if(but->active && but->rnapoin.id.data) { + *ptr= but->rnapoin; + *prop= but->rnaprop; + *index= but->rnaindex; + return; + } + } + } + } +} + +void ui_but_anim_insert_keyframe(bContext *C) +{ + /* this operator calls uiAnimContextProperty above */ + WM_operator_name_call(C, "ANIM_OT_insert_keyframe_button", WM_OP_INVOKE_DEFAULT, NULL); +} + +void ui_but_anim_delete_keyframe(bContext *C) +{ + /* this operator calls uiAnimContextProperty above */ + WM_operator_name_call(C, "ANIM_OT_delete_keyframe_button", WM_OP_INVOKE_DEFAULT, NULL); +} + +void ui_but_anim_add_driver(bContext *C) +{ + /* this operator calls uiAnimContextProperty above */ + WM_operator_name_call(C, "ANIM_OT_add_driver_button", WM_OP_INVOKE_DEFAULT, NULL); +} + +void ui_but_anim_remove_driver(bContext *C) +{ + /* this operator calls uiAnimContextProperty above */ + WM_operator_name_call(C, "ANIM_OT_remove_driver_button", WM_OP_INVOKE_DEFAULT, NULL); +} + +// TODO: refine the logic for adding/removing drivers... +void ui_but_anim_menu(bContext *C, uiBut *but) +{ + uiPopupMenu *pup; + uiLayout *layout; + int length; + + if(but->rnapoin.data && but->rnaprop) { + pup= uiPupMenuBegin(C, RNA_property_ui_name(but->rnaprop), 0); + layout= uiPupMenuLayout(pup); + + length= RNA_property_array_length(but->rnaprop); + + if(but->flag & UI_BUT_ANIMATED_KEY) { + if(length) { + uiItemBooleanO(layout, "Replace Keyframes", 0, "ANIM_OT_insert_keyframe_button", "all", 1); + uiItemBooleanO(layout, "Replace Single Keyframe", 0, "ANIM_OT_insert_keyframe_button", "all", 0); + uiItemBooleanO(layout, "Delete Keyframes", 0, "ANIM_OT_delete_keyframe_button", "all", 1); + uiItemBooleanO(layout, "Delete Single Keyframe", 0, "ANIM_OT_delete_keyframe_button", "all", 0); + } + else { + uiItemBooleanO(layout, "Replace Keyframe", 0, "ANIM_OT_insert_keyframe_button", "all", 0); + uiItemBooleanO(layout, "Delete Keyframe", 0, "ANIM_OT_delete_keyframe_button", "all", 0); + } + } + else if(RNA_property_animateable(&but->rnapoin, but->rnaprop)) { + if(length) { + uiItemBooleanO(layout, "Insert Keyframes", 0, "ANIM_OT_insert_keyframe_button", "all", 1); + uiItemBooleanO(layout, "Insert Single Keyframe", 0, "ANIM_OT_insert_keyframe_button", "all", 0); + } + else + uiItemBooleanO(layout, "Insert Keyframe", 0, "ANIM_OT_insert_keyframe_button", "all", 0); + } + + if(but->flag & UI_BUT_DRIVEN) { + uiItemS(layout); + + if(length) { + uiItemBooleanO(layout, "Remove Driver", 0, "ANIM_OT_remove_driver_button", "all", 1); + uiItemBooleanO(layout, "Remove Single Driver", 0, "ANIM_OT_remove_driver_button", "all", 0); + } + else + uiItemBooleanO(layout, "Remove Driver", 0, "ANIM_OT_remove_driver_button", "all", 0); + } + else if(RNA_property_animateable(&but->rnapoin, but->rnaprop)) { + uiItemS(layout); + + if(length) { + uiItemBooleanO(layout, "Add Driver", 0, "ANIM_OT_add_driver_button", "all", 1); + uiItemBooleanO(layout, "Add Single Driver", 0, "ANIM_OT_add_driver_button", "all", 0); + } + else + uiItemBooleanO(layout, "Add Driver", 0, "ANIM_OT_add_driver_button", "all", 0); + } + + uiPupMenuEnd(C, pup); + } +} + diff --git a/source/blender/editors/interface/interface_api.c b/source/blender/editors/interface/interface_api.c new file mode 100644 index 00000000000..b593aef2208 --- /dev/null +++ b/source/blender/editors/interface/interface_api.c @@ -0,0 +1,193 @@ +/** + * $Id: + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2009 Blender Foundation. + * All rights reserved. + * + * + * Contributor(s): Blender Foundation + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include <stdlib.h> +#include <stdio.h> + +#include "RNA_define.h" +#include "RNA_types.h" + +#include "UI_interface.h" + +static void api_ui_item_common(FunctionRNA *func) +{ + RNA_def_string(func, "text", "", 0, "", "Override automatic text of the item."); + RNA_def_int(func, "icon", 0, 0, INT_MAX, "", "Override automatic icon of the item.", 0, INT_MAX); +} + +static void api_ui_item_op_common(FunctionRNA *func) +{ + PropertyRNA *parm; + + api_ui_item_common(func); + parm= RNA_def_string(func, "operator", "", 0, "", "Identifier of the operator."); + RNA_def_property_flag(parm, PROP_REQUIRED); +} + +void RNA_api_ui_layout(StructRNA *srna) +{ + FunctionRNA *func; + PropertyRNA *parm; + + /* simple layout specifiers */ + func= RNA_def_function(srna, "row", "uiLayoutRow"); + parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in."); + RNA_def_function_return(func, parm); + RNA_def_boolean(func, "align", 0, "", "Align buttons to each other."); + + func= RNA_def_function(srna, "column", "uiLayoutColumn"); + parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in."); + RNA_def_function_return(func, parm); + RNA_def_boolean(func, "align", 0, "", "Align buttons to each other."); + + func= RNA_def_function(srna, "column_flow", "uiLayoutColumnFlow"); + parm= RNA_def_int(func, "columns", 0, 0, INT_MAX, "", "Number of columns, 0 is automatic.", 0, INT_MAX); + parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in."); + RNA_def_function_return(func, parm); + RNA_def_boolean(func, "align", 0, "", "Align buttons to each other."); + + /* box layout */ + func= RNA_def_function(srna, "box", "uiLayoutBox"); + parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in."); + RNA_def_function_return(func, parm); + + /* split layout */ + func= RNA_def_function(srna, "split", "uiLayoutSplit"); + parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in."); + RNA_def_function_return(func, parm); + + /* items */ + func= RNA_def_function(srna, "itemR", "uiItemR"); + api_ui_item_common(func); + parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property."); + RNA_def_property_flag(parm, PROP_REQUIRED); + parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data."); + RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail."); + RNA_def_boolean(func, "slider", 0, "", "Use slider for numeric values."); + + func= RNA_def_function(srna, "items_enumR", "uiItemsEnumR"); + parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property."); + RNA_def_property_flag(parm, PROP_REQUIRED); + parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data."); + RNA_def_property_flag(parm, PROP_REQUIRED); + + func= RNA_def_function(srna, "item_menu_enumR", "uiItemMenuEnumR"); + api_ui_item_common(func); + parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property."); + RNA_def_property_flag(parm, PROP_REQUIRED); + parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data."); + RNA_def_property_flag(parm, PROP_REQUIRED); + + /*func= RNA_def_function(srna, "item_enumR", "uiItemEnumR"); + api_ui_item_common(func); + parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property."); + RNA_def_property_flag(parm, PROP_REQUIRED); + parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data."); + RNA_def_property_flag(parm, PROP_REQUIRED); + parm= RNA_def_string(func, "value", "", 0, "", "Enum property value."); + RNA_def_property_flag(parm, PROP_REQUIRED);*/ + + func= RNA_def_function(srna, "itemO", "uiItemO"); + api_ui_item_op_common(func); + + /*func= RNA_def_function(srna, "item_enumO", "uiItemEnumO"); + api_ui_item_op_common(func); + parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator."); + RNA_def_property_flag(parm, PROP_REQUIRED); + parm= RNA_def_string(func, "value", "", 0, "", "Enum property value."); + RNA_def_property_flag(parm, PROP_REQUIRED);*/ + + func= RNA_def_function(srna, "items_enumO", "uiItemsEnumO"); + parm= RNA_def_string(func, "operator", "", 0, "", "Identifier of the operator."); + RNA_def_property_flag(parm, PROP_REQUIRED); + parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator."); + RNA_def_property_flag(parm, PROP_REQUIRED); + + func= RNA_def_function(srna, "item_menu_enumO", "uiItemMenuEnumO"); + api_ui_item_op_common(func); + parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator."); + RNA_def_property_flag(parm, PROP_REQUIRED); + + func= RNA_def_function(srna, "item_booleanO", "uiItemBooleanO"); + api_ui_item_op_common(func); + parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator."); + RNA_def_property_flag(parm, PROP_REQUIRED); + parm= RNA_def_boolean(func, "value", 0, "", "Value of the property to call the operator with."); + RNA_def_property_flag(parm, PROP_REQUIRED); + + func= RNA_def_function(srna, "item_intO", "uiItemIntO"); + api_ui_item_op_common(func); + parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator."); + RNA_def_property_flag(parm, PROP_REQUIRED); + parm= RNA_def_int(func, "value", 0, INT_MIN, INT_MAX, "", "Value of the property to call the operator with.", INT_MIN, INT_MAX); + RNA_def_property_flag(parm, PROP_REQUIRED); + + func= RNA_def_function(srna, "item_floatO", "uiItemFloatO"); + api_ui_item_op_common(func); + parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator."); + RNA_def_property_flag(parm, PROP_REQUIRED); + parm= RNA_def_float(func, "value", 0, -FLT_MAX, FLT_MAX, "", "Value of the property to call the operator with.", -FLT_MAX, FLT_MAX); + RNA_def_property_flag(parm, PROP_REQUIRED); + + func= RNA_def_function(srna, "item_stringO", "uiItemStringO"); + api_ui_item_op_common(func); + parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator."); + RNA_def_property_flag(parm, PROP_REQUIRED); + parm= RNA_def_string(func, "value", "", 0, "", "Value of the property to call the operator with."); + RNA_def_property_flag(parm, PROP_REQUIRED); + + func= RNA_def_function(srna, "itemL", "uiItemL"); + api_ui_item_common(func); + + func= RNA_def_function(srna, "itemM", "uiItemM"); + parm= RNA_def_pointer(func, "context", "Context", "", "Current context."); + RNA_def_property_flag(parm, PROP_REQUIRED); + api_ui_item_common(func); + parm= RNA_def_string(func, "menu", "", 0, "", "Identifier of the menu."); + RNA_def_property_flag(parm, PROP_REQUIRED); + + func= RNA_def_function(srna, "itemS", "uiItemS"); + + /* templates */ + func= RNA_def_function(srna, "template_header", "uiTemplateHeader"); + parm= RNA_def_pointer(func, "context", "Context", "", "Current context."); + RNA_def_property_flag(parm, PROP_REQUIRED); + + func= RNA_def_function(srna, "template_header_ID", "uiTemplateHeaderID"); + parm= RNA_def_pointer(func, "context", "Context", "", "Current context."); + RNA_def_property_flag(parm, PROP_REQUIRED); + parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property."); + RNA_def_property_flag(parm, PROP_REQUIRED); + parm= RNA_def_string(func, "property", "", 0, "", "Identifier of pointer property in data."); + RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_string(func, "new", "", 0, "", "Operator identifier to create a new ID block."); + RNA_def_string(func, "open", "", 0, "", "Operator identifier to open a new ID block."); + RNA_def_string(func, "unlink", "", 0, "", "Operator identifier to unlink the ID block."); +} + diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index fc2f5a15122..955abe1aecd 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -48,12 +48,6 @@ #include "UI_interface.h" #include "UI_interface_icons.h" -#include "UI_text.h" - -#include "BMF_Api.h" -#ifdef INTERNATIONAL -#include "FTF_Api.h" -#endif #include "interface_intern.h" @@ -67,10 +61,7 @@ void uiSetRoundBox(int type) /* Not sure the roundbox function is the best place to change this * if this is undone, its not that big a deal, only makes curves edges * square for the */ - if (UI_GetThemeValue(TH_BUT_DRAWTYPE) == TH_MINIMAL) - roundboxtype= 0; - else - roundboxtype= type; + roundboxtype= type; /* flags to set which corners will become rounded: @@ -83,10 +74,7 @@ void uiSetRoundBox(int type) int uiGetRoundBox(void) { - if (ELEM3(UI_GetThemeValue(TH_BUT_DRAWTYPE), TH_MINIMAL, TH_SHADED, TH_OLDSKOOL)) - return 0; - else - return roundboxtype; + return roundboxtype; } void gl_round_box(int mode, float minx, float miny, float maxx, float maxy, float rad) @@ -156,55 +144,9 @@ static void round_box_shade_col(float *col1, float *col2, float fac) glColor3fv(col); } -/* only for headers */ -static void gl_round_box_topshade(float minx, float miny, float maxx, float maxy, float rad) -{ - float vec[7][2]= {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293}, - {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}}; - char col[7]= {140, 165, 195, 210, 230, 245, 255}; - int a; - char alpha=255; - - if(roundboxtype & UI_RB_ALPHA) alpha= 128; - - /* mult */ - for(a=0; a<7; a++) { - vec[a][0]*= rad; vec[a][1]*= rad; - } - - /* shades from grey->white->grey */ - glBegin(GL_LINE_STRIP); - - if(roundboxtype & 3) { - /* corner right-top */ - glColor4ub(140, 140, 140, alpha); - glVertex2f( maxx, maxy-rad); - for(a=0; a<7; a++) { - glColor4ub(col[a], col[a], col[a], alpha); - glVertex2f( maxx-vec[a][1], maxy-rad+vec[a][0]); - } - glColor4ub(225, 225, 225, alpha); - glVertex2f( maxx-rad, maxy); - - - /* corner left-top */ - glVertex2f( minx+rad, maxy); - for(a=0; a<7; a++) { - glColor4ub(col[6-a], col[6-a], col[6-a], alpha); - glVertex2f( minx+rad-vec[a][0], maxy-vec[a][1]); - } - glVertex2f( minx, maxy-rad); - } - else { - glColor4ub(225, 225, 225, alpha); - glVertex2f( minx, maxy); - glVertex2f( maxx, maxy); - } - - glEnd(); -} /* linear horizontal shade within button or in outline */ +/* view2d scrollers use it */ void gl_round_box_shade(int mode, float minx, float miny, float maxx, float maxy, float rad, float shadetop, float shadedown) { float vec[7][2]= {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293}, @@ -228,10 +170,8 @@ void gl_round_box_shade(int mode, float minx, float miny, float maxx, float maxy coldown[1]= color[1]+shadedown; if(coldown[1]<0.0) coldown[1]= 0.0; coldown[2]= color[2]+shadedown; if(coldown[2]<0.0) coldown[2]= 0.0; - if (UI_GetThemeValue(TH_BUT_DRAWTYPE) != TH_MINIMAL) { - glShadeModel(GL_SMOOTH); - glBegin(mode); - } + glShadeModel(GL_SMOOTH); + glBegin(mode); /* start with corner right-bottom */ if(roundboxtype & 4) { @@ -313,6 +253,7 @@ void gl_round_box_shade(int mode, float minx, float miny, float maxx, float maxy } /* linear vertical shade within button or in outline */ +/* view2d scrollers use it */ void gl_round_box_vertical_shade(int mode, float minx, float miny, float maxx, float maxy, float rad, float shadeLeft, float shadeRight) { float vec[7][2]= {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293}, @@ -336,10 +277,8 @@ void gl_round_box_vertical_shade(int mode, float minx, float miny, float maxx, f colRight[1]= color[1]+shadeRight; if(colRight[1]<0.0) colRight[1]= 0.0; colRight[2]= color[2]+shadeRight; if(colRight[2]<0.0) colRight[2]= 0.0; - if (UI_GetThemeValue(TH_BUT_DRAWTYPE) != TH_MINIMAL) { - glShadeModel(GL_SMOOTH); - glBegin(mode); - } + glShadeModel(GL_SMOOTH); + glBegin(mode); /* start with corner right-bottom */ if(roundboxtype & 4) { @@ -430,10 +369,8 @@ void uiRoundRect(float minx, float miny, float maxx, float maxy, float rad) } /* set antialias line */ - if (UI_GetThemeValue(TH_BUT_DRAWTYPE) != TH_MINIMAL) { - glEnable( GL_LINE_SMOOTH ); - glEnable( GL_BLEND ); - } + glEnable( GL_LINE_SMOOTH ); + glEnable( GL_BLEND ); gl_round_box(GL_LINE_LOOP, minx, miny, maxx, maxy, rad); @@ -486,124 +423,20 @@ void uiRoundBox(float minx, float miny, float maxx, float maxy, float rad) gl_round_box(GL_POLYGON, minx, miny, maxx, maxy, rad); /* set antialias line */ - if (UI_GetThemeValue(TH_BUT_DRAWTYPE) != TH_MINIMAL) { - glEnable( GL_LINE_SMOOTH ); - glEnable( GL_BLEND ); - } - - gl_round_box(GL_LINE_LOOP, minx, miny, maxx, maxy, rad); - - glDisable( GL_BLEND ); - glDisable( GL_LINE_SMOOTH ); -} - -void uiTriangleFakeAA(float x1, float y1, float x2, float y2, float x3, float y3, float asp) -{ - float color[4], alpha; - float jitter; - int i, passes=4; - - /* get the colour and divide up the alpha */ - glGetFloatv(GL_CURRENT_COLOR, color); - alpha = color[3]; - color[3]= alpha/(float)passes; - glColor4fv(color); - - /* set the 'jitter amount' */ - jitter = 0.65/(float)passes * asp; - + glEnable( GL_LINE_SMOOTH ); glEnable( GL_BLEND ); - /* draw lots of lines on top of each other */ - for (i=passes; i>=(-passes); i--) { - glBegin(GL_TRIANGLES); - - /* 'point' first, then two base vertices */ - glVertex2f(x1, y1+(i*jitter)); - glVertex2f(x2, y2+(i*jitter)); - glVertex2f(x3, y3+(i*jitter)); - glEnd(); - } + gl_round_box(GL_LINE_LOOP, minx, miny, maxx, maxy, rad); glDisable( GL_BLEND ); - - color[3] = alpha; - glColor4fv(color); -} - -/* for headers and floating panels */ -void uiRoundBoxEmboss(float minx, float miny, float maxx, float maxy, float rad, int active) -{ - float color[4]; - - if(roundboxtype & UI_RB_ALPHA) { - glGetFloatv(GL_CURRENT_COLOR, color); - color[3]= 0.5; - glColor4fv(color); - glEnable( GL_BLEND ); - } - - /* solid part */ - //if(active) - // gl_round_box_shade(GL_POLYGON, minx, miny, maxx, maxy, rad, 0.10, -0.05); - // else - /* shading doesnt work for certain buttons yet (pulldown) need smarter buffer caching (ton) */ - gl_round_box(GL_POLYGON, minx, miny, maxx, maxy, rad); - - /* set antialias line */ - if (UI_GetThemeValue(TH_BUT_DRAWTYPE) != TH_MINIMAL) { - glEnable( GL_LINE_SMOOTH ); - glEnable( GL_BLEND ); - } - - /* top shade */ - gl_round_box_topshade(minx+1, miny+1, maxx-1, maxy-1, rad); - - /* total outline */ - if(roundboxtype & UI_RB_ALPHA) glColor4ub(0,0,0, 128); else glColor4ub(0,0,0, 200); - gl_round_box(GL_LINE_LOOP, minx, miny, maxx, maxy, rad); - glDisable( GL_LINE_SMOOTH ); - - /* bottom shade for header down */ - if((roundboxtype & 12)==12) { - glColor4ub(0,0,0, 80); - fdrawline(minx+rad-1.0, miny+1.0, maxx-rad+1.0, miny+1.0); - } - glDisable( GL_BLEND ); } -/* ************** safe rasterpos for pixmap alignment with pixels ************* */ - -void ui_rasterpos_safe(float x, float y, float aspect) -{ - float vals[4], remainder; - int doit=0; - - glRasterPos2f(x, y); - glGetFloatv(GL_CURRENT_RASTER_POSITION, vals); - - remainder= vals[0] - floor(vals[0]); - if(remainder > 0.4 && remainder < 0.6) { - if(remainder < 0.5) x -= 0.1*aspect; - else x += 0.1*aspect; - doit= 1; - } - remainder= vals[1] - floor(vals[1]); - if(remainder > 0.4 && remainder < 0.6) { - if(remainder < 0.5) y -= 0.1*aspect; - else y += 0.1*aspect; - doit= 1; - } - - if(doit) glRasterPos2f(x, y); - - UI_RasterPos(x, y); - UI_SetScale(aspect); -} /* ************** generic embossed rect, for window sliders etc ************* */ + +/* text_draw.c uses this */ void uiEmboss(float x1, float y1, float x2, float y2, int sel) { @@ -625,1925 +458,14 @@ void uiEmboss(float x1, float y1, float x2, float y2, int sel) } -/* ************** GENERIC ICON DRAW, NO THEME HERE ************* */ - -/* icons have been standardized... and this call draws in untransformed coordinates */ -#define ICON_HEIGHT 16.0f - -void ui_draw_icon(uiBut *but, BIFIconID icon, int blend) -{ - float xs=0, ys=0, aspect, height; - - /* this icon doesn't need draw... */ - if(icon==ICON_BLANK1) return; - - /* we need aspect from block, for menus... these buttons are scaled in uiPositionBlock() */ - aspect= but->block->aspect; - if(aspect != but->aspect) { - /* prevent scaling up icon in pupmenu */ - if (aspect < 1.0f) { - height= ICON_HEIGHT; - aspect = 1.0f; - - } - else - height= ICON_HEIGHT/aspect; - } - else - height= ICON_HEIGHT; - - if(but->flag & UI_ICON_LEFT) { - if (but->type==BUT_TOGDUAL) { - if (but->drawstr[0]) { - xs= but->x1-1.0; - } else { - xs= (but->x1+but->x2- height)/2.0; - } - } - else if (but->block->flag & UI_BLOCK_LOOP) { - xs= but->x1+1.0; - } - else if ((but->type==ICONROW) || (but->type==ICONTEXTROW)) { - xs= but->x1+3.0; - } - else { - xs= but->x1+4.0; - } - ys= (but->y1+but->y2- height)/2.0; - } - if(but->flag & UI_ICON_RIGHT) { - xs= but->x2-17.0; - ys= (but->y1+but->y2- height)/2.0; - } - if (!((but->flag & UI_ICON_RIGHT) || (but->flag & UI_ICON_LEFT))) { - xs= (but->x1+but->x2- height)/2.0; - ys= (but->y1+but->y2- height)/2.0; - } - - glEnable(GL_BLEND); - - /* calculate blend color */ - if ELEM3(but->type, TOG, ROW, TOGN) { - if(but->flag & UI_SELECT); - else if(but->flag & UI_ACTIVE); - else blend= -60; - } - if (but->flag & UI_BUT_DISABLED) blend = -100; - - UI_icon_draw_aspect_blended(xs, ys, icon, aspect, blend); - - glDisable(GL_BLEND); -} - - -/* ************** DEFAULT THEME, SHADED BUTTONS ************* */ - - -#define M_WHITE UI_ThemeColorShade(colorid, 80) - -#define M_ACT_LIGHT UI_ThemeColorShade(colorid, 55) -#define M_LIGHT UI_ThemeColorShade(colorid, 45) -#define M_HILITE UI_ThemeColorShade(colorid, 25) -#define M_LMEDIUM UI_ThemeColorShade(colorid, 10) -#define M_MEDIUM UI_ThemeColor(colorid) -#define M_LGREY UI_ThemeColorShade(colorid, -20) -#define M_GREY UI_ThemeColorShade(colorid, -45) -#define M_DARK UI_ThemeColorShade(colorid, -80) - -#define M_NUMTEXT UI_ThemeColorShade(colorid, 25) -#define M_NUMTEXT_ACT_LIGHT UI_ThemeColorShade(colorid, 35) - -#define MM_WHITE UI_ThemeColorShade(TH_BUT_NEUTRAL, 120) - -/* Used for the subtle sunken effect around buttons. - * One option is to hardcode to white, with alpha, however it causes a - * weird 'building up' efect, so it's commented out for now. - */ - -#define MM_WHITE_OP UI_ThemeColorShadeAlpha(TH_BACK, 55, -100) -#define MM_WHITE_TR UI_ThemeColorShadeAlpha(TH_BACK, 55, -255) - -#define MM_LIGHT UI_ThemeColorShade(TH_BUT_OUTLINE, 45) -#define MM_MEDIUM UI_ThemeColor(TH_BUT_OUTLINE) -#define MM_GREY UI_ThemeColorShade(TH_BUT_OUTLINE, -45) -#define MM_DARK UI_ThemeColorShade(TH_BUT_OUTLINE, -80) - -/* base shaded button */ -static void shaded_button(float x1, float y1, float x2, float y2, float asp, int colorid, int flag, int mid) -{ - /* 'mid' arg determines whether the button is in the middle of - * an alignment group or not. 0 = not middle, 1 = is in the middle. - * Done to allow cleaner drawing - */ - - /* *** SHADED BUTTON BASE *** */ - glShadeModel(GL_SMOOTH); - glBegin(GL_QUADS); - - if(flag & UI_SELECT) { - if(flag & UI_ACTIVE) M_MEDIUM; - else M_LGREY; - } else { - if(flag & UI_ACTIVE) M_LIGHT; - else M_HILITE; - } - - glVertex2f(x1,y1); - glVertex2f(x2,y1); - - if(flag & UI_SELECT) { - if(flag & UI_ACTIVE) M_LGREY; - else M_GREY; - } else { - if(flag & UI_ACTIVE) M_ACT_LIGHT; - else M_LIGHT; - } - - glVertex2f(x2,(y2-(y2-y1)/3)); - glVertex2f(x1,(y2-(y2-y1)/3)); - glEnd(); - - - glShadeModel(GL_FLAT); - glBegin(GL_QUADS); - - if(flag & UI_SELECT) { - if(flag & UI_ACTIVE) M_LGREY; - else M_GREY; - } else { - if(flag & UI_ACTIVE) M_ACT_LIGHT; - else M_LIGHT; - } - - glVertex2f(x1,(y2-(y2-y1)/3)); - glVertex2f(x2,(y2-(y2-y1)/3)); - glVertex2f(x2,y2); - glVertex2f(x1,y2); - - glEnd(); - /* *** END SHADED BUTTON BASE *** */ - - /* *** INNER OUTLINE *** */ - /* left */ - if(!(flag & UI_SELECT)) { - glShadeModel(GL_SMOOTH); - glBegin(GL_LINES); - M_MEDIUM; - glVertex2f(x1+1,y1+2); - M_WHITE; - glVertex2f(x1+1,y2); - glEnd(); - } - - /* right */ - if(!(flag & UI_SELECT)) { - glShadeModel(GL_SMOOTH); - glBegin(GL_LINES); - M_MEDIUM; - glVertex2f(x2-1,y1+2); - M_WHITE; - glVertex2f(x2-1,y2); - glEnd(); - } - - glShadeModel(GL_FLAT); - - /* top */ - if(flag & UI_SELECT) { - if(flag & UI_ACTIVE) M_LGREY; - else M_GREY; - } else { - if(flag & UI_ACTIVE) M_WHITE; - else M_WHITE; - } - - fdrawline(x1, (y2-1), x2, (y2-1)); - - /* bottom */ - if(flag & UI_SELECT) { - if(flag & UI_ACTIVE) M_MEDIUM; - else M_LGREY; - } else { - if(flag & UI_ACTIVE) M_LMEDIUM; - else M_MEDIUM; - } - fdrawline(x1, (y1+1), x2, (y1+1)); - /* *** END INNER OUTLINE *** */ - - /* *** OUTER OUTLINE *** */ - if (mid) { - // we draw full outline, its not AA, and it works better button mouse-over hilite - MM_DARK; - - // left right - fdrawline(x1, y1, x1, y2); - fdrawline(x2, y1, x2, y2); - - // top down - fdrawline(x1, y2, x2, y2); - fdrawline(x1, y1, x2, y1); - } else { - MM_DARK; - gl_round_box(GL_LINE_LOOP, x1, y1, x2, y2, 1.5); - } - /* END OUTER OUTLINE */ -} - -/* base flat button */ -static void flat_button(float x1, float y1, float x2, float y2, float asp, int colorid, int flag, int mid) -{ - /* 'mid' arg determines whether the button is in the middle of - * an alignment group or not. 0 = not middle, 1 = is in the middle. - * Done to allow cleaner drawing - */ - - /* *** FLAT TEXT/NUM FIELD *** */ - glShadeModel(GL_FLAT); - if(flag & UI_SELECT) { - if(flag & UI_ACTIVE) M_LGREY; - else M_GREY; - } - else { - if(flag & UI_ACTIVE) M_NUMTEXT_ACT_LIGHT; - else M_NUMTEXT; - } - - glRectf(x1, y1, x2, y2); - /* *** END FLAT TEXT/NUM FIELD *** */ - - /* *** OUTER OUTLINE *** */ - if (mid) { - // we draw full outline, its not AA, and it works better button mouse-over hilite - MM_DARK; - - // left right - fdrawline(x1, y1, x1, y2); - fdrawline(x2, y1, x2, y2); - - // top down - fdrawline(x1, y2, x2, y2); - fdrawline(x1, y1, x2, y1); - } else { - MM_DARK; - gl_round_box(GL_LINE_LOOP, x1, y1, x2, y2, 1.5); - } - /* END OUTER OUTLINE */ -} - -/* shaded round button */ -static void round_button_shaded(int type, int colorid, float asp, float x1, float y1, float x2, float y2, int flag, int rad) -{ - int alpha_offs= (flag & UI_BUT_DISABLED)?UI_DISABLED_ALPHA_OFFS:0; - float shadefac; - - /* emboss */ - glColor4f(1.0f, 1.0f, 1.0f, 0.08f); - uiRoundRectFakeAA(x1+1, y1-1, x2, y2-1, rad, asp); - - /* colour shading */ - if (flag & UI_SELECT) { - shadefac = -0.05; - if(flag & UI_ACTIVE) UI_ThemeColorShade(colorid, -40); - else UI_ThemeColorShade(colorid, -30); - } else { - shadefac = 0.05; - if(flag & UI_ACTIVE) UI_ThemeColorShade(colorid, +30); - else UI_ThemeColorShade(colorid, +20); - } - /* end colour shading */ - - - /* the shaded base */ - gl_round_box_shade(GL_POLYGON, x1, y1, x2, y2, rad, shadefac, -shadefac); - - /* outline */ - UI_ThemeColorBlendShadeAlpha(TH_BUT_OUTLINE, TH_BACK, 0.1, -40, alpha_offs); - - uiRoundRectFakeAA(x1, y1, x2, y2, rad, asp); - /* end outline */ -} - -/* base round flat button */ -static void round_button_flat(int colorid, float asp, float x1, float y1, float x2, float y2, int flag, float rad) -{ - int alpha_offs= (flag & UI_BUT_DISABLED)?UI_DISABLED_ALPHA_OFFS:0; - - /* emboss */ - //glColor4f(1.0f, 1.0f, 1.0f, 0.08f); - //uiRoundRectFakeAA(x1+1, y1-1, x2, y2-1, rad, asp); - - /* colour shading */ - if(flag & UI_SELECT) { - if (flag & UI_ACTIVE) UI_ThemeColorShade(colorid, -30); - else UI_ThemeColorShade(colorid, -45); - } - else { - if(flag & UI_ACTIVE) UI_ThemeColorShade(colorid, 35); - else UI_ThemeColorShade(colorid, 25); - } - - /* the solid base */ - gl_round_box(GL_POLYGON, x1, y1, x2, y2, rad); - - /* outline */ - UI_ThemeColorBlendShadeAlpha(TH_BUT_OUTLINE, TH_BACK, 0.1, -30, alpha_offs); - uiRoundRectFakeAA(x1, y1, x2, y2, rad, asp); -} - -static void ui_checkmark_box(int colorid, float x1, float y1, float x2, float y2) -{ - uiSetRoundBox(15); - UI_ThemeColorShade(colorid, -5); - gl_round_box_shade(GL_POLYGON, x1+4, (y1+(y2-y1)/2)-5, x1+14, (y1+(y2-y1)/2)+4, 2, -0.04, 0.03); - - UI_ThemeColorShade(colorid, -30); - gl_round_box(GL_LINE_LOOP, x1+4, (y1+(y2-y1)/2)-5, x1+14, (y1+(y2-y1)/2)+4, 2); - -} -static void ui_checkmark(float x1, float y1, float x2, float y2) -{ - glEnable( GL_LINE_SMOOTH ); - glEnable( GL_BLEND ); - glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); - glLineWidth(1.5); - - glBegin( GL_LINE_STRIP ); - glVertex2f(x1+5, (y1+(y2-y1)/2)-1); - glVertex2f(x1+8, (y1+(y2-y1)/2)-4); - glVertex2f(x1+13, (y1+(y2-y1)/2)+5); - glEnd(); - - glLineWidth(1.0); - glDisable( GL_BLEND ); - glDisable( GL_LINE_SMOOTH ); -} - -static void ui_draw_toggle_checkbox(int flag, int type, int colorid, float x1, float y1, float x2, float y2) -{ - if (!(flag & UI_HAS_ICON)) { - /* check to see that there's room for the check mark - * draw a check mark, or if it's a TOG3, draw a + or - */ - if (x2 - x1 > 20) { - ui_checkmark_box(colorid, x1, y1, x2, y2); - - /* TOG3 is handled with ui_tog3_invert() - * remember to update checkmark drawing there too*/ - if((flag & UI_SELECT) && (type != TOG3)) { - UI_ThemeColorShade(colorid, -140); - - ui_checkmark(x1, y1, x2, y2); - } - /* draw a dot: alternate, for layers etc. */ - } else if(flag & UI_SELECT) { - uiSetRoundBox(15); - UI_ThemeColorShade(colorid, -60); - - glPushMatrix(); - glTranslatef((x1+(x2-x1)/2), (y1+(y2-y1)/2), 0.0); - - /* circle */ - glutil_draw_filled_arc(0.0, M_PI*2.0, 2, 16); - - glEnable( GL_LINE_SMOOTH ); - glEnable( GL_BLEND ); - glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); - - /* smooth outline */ - glutil_draw_lined_arc(0.0, M_PI*2.0, 2, 16); - - glDisable( GL_BLEND ); - glDisable( GL_LINE_SMOOTH ); - - glPopMatrix(); - } - } -} - - -/* small side double arrow for iconrow */ -static void ui_iconrow_arrows(float x1, float y1, float x2, float y2) -{ - glEnable( GL_POLYGON_SMOOTH ); - glEnable( GL_BLEND ); - - glShadeModel(GL_FLAT); - glBegin(GL_TRIANGLES); - glVertex2f((short)x2-2,(short)(y2-(y2-y1)/2)+1); - glVertex2f((short)x2-6,(short)(y2-(y2-y1)/2)+1); - glVertex2f((short)x2-4,(short)(y2-(y2-y1)/2)+4); - glEnd(); - - glBegin(GL_TRIANGLES); - glVertex2f((short)x2-2,(short)(y2-(y2-y1)/2) -1); - glVertex2f((short)x2-6,(short)(y2-(y2-y1)/2) -1); - glVertex2f((short)x2-4,(short)(y2-(y2-y1)/2) -4); - glEnd(); - - glDisable( GL_BLEND ); - glDisable( GL_POLYGON_SMOOTH ); -} - -/* side double arrow for menu */ -static void ui_menu_arrows(float x1, float y1, float x2, float y2, float asp) -{ - /* 'point' first, then two base vertices */ - uiTriangleFakeAA(x2-9, (y2-(y2-y1)/2)+6, - x2-6, (y2-(y2-y1)/2)+2, - x2-12, (y2-(y2-y1)/2)+2, asp); - - uiTriangleFakeAA(x2-9, (y2-(y2-y1)/2)-6, - x2-6, (y2-(y2-y1)/2)-2, - x2-12, (y2-(y2-y1)/2)-2, asp); -} - -/* left/right arrows for number fields */ -static void ui_num_arrows(float x1, float y1, float x2, float y2, float asp) -{ - if( x2-x1 > 25) { // 25 is a bit arbitrary, but small buttons cant have arrows - - /* 'point' first, then two base vertices */ - uiTriangleFakeAA(x1+4, y2-(y2-y1)/2, - x1+9, y2-(y2-y1)/2+3, - x1+9, y2-(y2-y1)/2-3, asp); - - uiTriangleFakeAA(x2-4, y2-(y2-y1)/2, - x2-9, y2-(y2-y1)/2+3, - x2-9, y2-(y2-y1)/2-3, asp); - } -} - - -/* changing black/white for TOG3 buts */ -static void ui_tog3_invert(float x1, float y1, float x2, float y2, int seltype) -{ - - if (seltype == 0) { - UI_ThemeColorShade(TH_BUT_SETTING, -120); - - glEnable( GL_LINE_SMOOTH ); - glEnable( GL_BLEND ); - glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); - glLineWidth(1.0); - - fdrawline(x1+10, (y1+(y2-y1)/2+4), x1+10, (y1+(y2-y1)/2)-4); - fdrawline(x1+6, (y1+(y2-y1)/2), x1+14, (y1+(y2-y1)/2)); - - glLineWidth(1.0); - glDisable( GL_BLEND ); - glDisable( GL_LINE_SMOOTH ); - } else { - /* horiz line */ - UI_ThemeColorShade(TH_BUT_SETTING, -120); - - glEnable( GL_LINE_SMOOTH ); - glEnable( GL_BLEND ); - glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); - glLineWidth(1.0); - - fdrawline(x1+6, (y1+(y2-y1)/2), x1+14, (y1+(y2-y1)/2)); - - glLineWidth(1.0); - glDisable( GL_BLEND ); - glDisable( GL_LINE_SMOOTH ); - - } -} - -/* roundshaded button/popup menu/iconrow drawing code */ -static void ui_roundshaded_button(int type, int colorid, float asp, float x1, float y1, float x2, float y2, int flag) -{ - float rad, maxrad; - int align= (flag & UI_BUT_ALIGN); - int alpha_offs= (flag & UI_BUT_DISABLED)?UI_DISABLED_ALPHA_OFFS:0; - - /* rounded corners */ - if (ELEM4(type, MENU, ROW, ICONROW, ICONTEXTROW)) maxrad = 5.0; - else maxrad= 10.0; - - rad= (y2-y1)/2.0; - if (rad>(x2-x1)/2) rad = (x2-x1)/2; - if (rad > maxrad) rad = maxrad; - - /* end rounded corners */ - - /* alignment */ - if(align) { - switch(align) { - case UI_BUT_ALIGN_TOP: - uiSetRoundBox(12); - break; - case UI_BUT_ALIGN_DOWN: - uiSetRoundBox(3); - break; - case UI_BUT_ALIGN_LEFT: - uiSetRoundBox(6); - break; - case UI_BUT_ALIGN_RIGHT: - uiSetRoundBox(9); - break; - - case UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_RIGHT: - uiSetRoundBox(1); - break; - case UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_LEFT: - uiSetRoundBox(2); - break; - case UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_RIGHT: - uiSetRoundBox(8); - break; - case UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_LEFT: - uiSetRoundBox(4); - break; - - default: - uiSetRoundBox(0); - break; - } - } - else { - uiSetRoundBox(15); - } - /* end alignment */ - - - /* draw the base button */ - round_button_shaded(type, colorid, asp, x1, y1, x2, y2, flag, rad); - - /* *** EXTRA DRAWING FOR SPECIFIC CONTROL TYPES *** */ - switch(type) { - case ICONROW: - case ICONTEXTROW: - /* iconrow double arrow */ - if(flag & UI_SELECT) { - UI_ThemeColorShadeAlpha(colorid, -80, alpha_offs); - } else { - UI_ThemeColorShadeAlpha(colorid, -45, alpha_offs); - } - ui_iconrow_arrows(x1, y1, x2, y2); - /* end iconrow double arrow */ - break; - case MENU: - /* menu double arrow */ - if(flag & UI_SELECT) { - UI_ThemeColorShadeAlpha(colorid, -110, alpha_offs); - } else { - UI_ThemeColorShadeAlpha(colorid, -80, alpha_offs); - } - ui_menu_arrows(x1, y1, x2, y2, asp); - /* end menu double arrow */ - break; - } -} - -static void ui_roundshaded_flat(int type, int colorid, float asp, float x1, float y1, float x2, float y2, int flag) -{ - float rad, maxrad; - int align= (flag & UI_BUT_ALIGN); - int alpha_offs= (flag & UI_BUT_DISABLED)?UI_DISABLED_ALPHA_OFFS:0; - - /* rounded corners */ - if (type == TEX) maxrad = 5.0; - else maxrad= 10.0; - - rad= (y2-y1)/2.0; - if (rad>(x2-x1)/2) rad = (x2-x1)/2; - if (maxrad) { - if (rad > maxrad) rad = maxrad; - } - /* end rounded corners */ - - /* alignment */ - if(align) { - switch(align) { - case UI_BUT_ALIGN_TOP: - uiSetRoundBox(12); - break; - case UI_BUT_ALIGN_DOWN: - uiSetRoundBox(3); - break; - case UI_BUT_ALIGN_LEFT: - uiSetRoundBox(6); - break; - case UI_BUT_ALIGN_RIGHT: - uiSetRoundBox(9); - break; - - case UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_RIGHT: - uiSetRoundBox(1); - break; - case UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_LEFT: - uiSetRoundBox(2); - break; - case UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_RIGHT: - uiSetRoundBox(8); - break; - case UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_LEFT: - uiSetRoundBox(4); - break; - - default: - uiSetRoundBox(0); - break; - } - } - else { - uiSetRoundBox(15); - } - /* end alignment */ - - /* draw the base button */ - round_button_flat(colorid, asp, x1, y1, x2, y2, flag, rad); - - /* *** EXTRA DRAWING FOR SPECIFIC CONTROL TYPES *** */ - switch(type) { - case TOG: - case TOGN: - case TOG3: - ui_draw_toggle_checkbox(flag, type, colorid, x1, y1, x2, y2); - break; - case NUM: - /* side arrows */ - if(flag & UI_SELECT) { - if(flag & UI_ACTIVE) UI_ThemeColorShadeAlpha(colorid, -70, alpha_offs); - else UI_ThemeColorShadeAlpha(colorid, -70, alpha_offs); - } else { - if(flag & UI_ACTIVE) UI_ThemeColorShadeAlpha(colorid, -40, alpha_offs); - else UI_ThemeColorShadeAlpha(colorid, -20, alpha_offs); - } - - ui_num_arrows(x1, y1, x2, y2, asp); - /* end side arrows */ - break; - } -} - -/* roundshaded theme callback */ -static void ui_draw_roundshaded(int type, int colorid, float aspect, float x1, float y1, float x2, float y2, int flag) -{ - - switch(type) { - case TOG: - case TOGN: - case TOG3: - case SLI: - case NUMSLI: - case HSVSLI: - case TEX: - case IDPOIN: - case NUM: - ui_roundshaded_flat(type, colorid, aspect, x1, y1, x2, y2, flag); - break; - case ICONROW: - case ICONTEXTROW: - case MENU: - default: - ui_roundshaded_button(type, colorid, aspect, x1, y1, x2, y2, flag); - } - -} - -/* button/popup menu/iconrow drawing code */ -static void ui_default_button(int type, int colorid, float asp, float x1, float y1, float x2, float y2, int flag) -{ - int align= (flag & UI_BUT_ALIGN); - int alpha_offs= (flag & UI_BUT_DISABLED)?UI_DISABLED_ALPHA_OFFS:0; - - if(align) { - - /* *** BOTTOM OUTER SUNKEN EFFECT *** */ - if (!((align == UI_BUT_ALIGN_DOWN) || - (align == (UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_RIGHT)) || - (align == (UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_LEFT)))) { - glEnable(GL_BLEND); - MM_WHITE_OP; - fdrawline(x1, y1-1, x2, y1-1); - glDisable(GL_BLEND); - } - /* *** END BOTTOM OUTER SUNKEN EFFECT *** */ - - switch(align) { - case UI_BUT_ALIGN_TOP: - uiSetRoundBox(12); - - /* last arg in shaded_button() determines whether the button is in the middle of - * an alignment group or not. 0 = not middle, 1 = is in the middle. - * Done to allow cleaner drawing - */ - - shaded_button(x1, y1, x2, y2, asp, colorid, flag, 0); - break; - case UI_BUT_ALIGN_DOWN: - uiSetRoundBox(3); - shaded_button(x1, y1, x2, y2, asp, colorid, flag, 0); - break; - case UI_BUT_ALIGN_LEFT: - - /* RIGHT OUTER SUNKEN EFFECT */ - glEnable(GL_BLEND); - glShadeModel(GL_SMOOTH); - glBegin(GL_LINES); - MM_WHITE_OP; - glVertex2f(x2+1,y1); - MM_WHITE_TR; - glVertex2f(x2+1,y2); - glEnd(); - glDisable(GL_BLEND); - - uiSetRoundBox(6); - shaded_button(x1, y1, x2, y2, asp, colorid, flag, 0); - break; - case UI_BUT_ALIGN_RIGHT: - - /* LEFT OUTER SUNKEN EFFECT */ - glEnable(GL_BLEND); - glShadeModel(GL_SMOOTH); - glBegin(GL_LINES); - MM_WHITE_OP; - glVertex2f(x1-1,y1); - MM_WHITE_TR; - glVertex2f(x1-1,y2); - glEnd(); - glDisable(GL_BLEND); - - uiSetRoundBox(9); - shaded_button(x1, y1, x2, y2, asp, colorid, flag, 0); - break; - - case UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_RIGHT: - uiSetRoundBox(1); - shaded_button(x1, y1, x2, y2, asp, colorid, flag, 0); - break; - case UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_LEFT: - uiSetRoundBox(2); - shaded_button(x1, y1, x2, y2, asp, colorid, flag, 0); - break; - case UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_RIGHT: - - /* LEFT OUTER SUNKEN EFFECT */ - glEnable(GL_BLEND); - glShadeModel(GL_SMOOTH); - glBegin(GL_LINES); - MM_WHITE_OP; - glVertex2f(x1-1,y1); - MM_WHITE_TR; - glVertex2f(x1-1,y2); - glEnd(); - glDisable(GL_BLEND); - - uiSetRoundBox(8); - shaded_button(x1, y1, x2, y2, asp, colorid, flag, 0); - break; - case UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_LEFT: - - /* RIGHT OUTER SUNKEN EFFECT */ - glEnable(GL_BLEND); - glShadeModel(GL_SMOOTH); - glBegin(GL_LINES); - MM_WHITE_OP; - glVertex2f(x2+1,y1); - MM_WHITE_TR; - glVertex2f(x2+1,y2); - glEnd(); - glDisable(GL_BLEND); - - uiSetRoundBox(4); - shaded_button(x1, y1, x2, y2, asp, colorid, flag, 0); - break; - - default: - shaded_button(x1, y1, x2, y2, asp, colorid, flag, 1); - break; - } - } - else { - glEnable(GL_BLEND); - glShadeModel(GL_SMOOTH); - - /* BOTTOM OUTER SUNKEN EFFECT */ - MM_WHITE_OP; - fdrawline(x1, y1-1, x2, y1-1); - - /* LEFT OUTER SUNKEN EFFECT */ - glBegin(GL_LINES); - MM_WHITE_OP; - glVertex2f(x1-1,y1); - MM_WHITE_TR; - glVertex2f(x1-1,y2); - glEnd(); - - /* RIGHT OUTER SUNKEN EFFECT */ - glBegin(GL_LINES); - MM_WHITE_OP; - glVertex2f(x2+1,y1); - MM_WHITE_TR; - glVertex2f(x2+1,y2); - glEnd(); - - glDisable(GL_BLEND); - - uiSetRoundBox(15); - shaded_button(x1, y1, x2, y2, asp, colorid, flag, 0); - } - - /* *** EXTRA DRAWING FOR SPECIFIC CONTROL TYPES *** */ - switch(type) { - case ICONROW: - case ICONTEXTROW: - /* DARKENED AREA */ - glEnable(GL_BLEND); - - glColor4ub(0, 0, 0, 30); - glRectf(x2-9, y1, x2, y2); - - glDisable(GL_BLEND); - /* END DARKENED AREA */ - - /* ICONROW DOUBLE-ARROW */ - UI_ThemeColorShadeAlpha(colorid, -80, alpha_offs); - ui_iconrow_arrows(x1, y1, x2, y2); - /* END ICONROW DOUBLE-ARROW */ - break; - case MENU: - /* DARKENED AREA */ - glEnable(GL_BLEND); - - glColor4ub(0, 0, 0, 30); - glRectf(x2-18, y1, x2, y2); - - glDisable(GL_BLEND); - /* END DARKENED AREA */ - - /* MENU DOUBLE-ARROW */ - UI_ThemeColorShadeAlpha(colorid, -80, alpha_offs); - ui_menu_arrows(x1, y1, x2, y2, asp); - /* MENU DOUBLE-ARROW */ - break; - } -} - -/* number/text field drawing code */ -static void ui_default_flat(int type, int colorid, float asp, float x1, float y1, float x2, float y2, int flag) -{ - int align= (flag & UI_BUT_ALIGN); - int alpha_offs= (flag & UI_BUT_DISABLED)?UI_DISABLED_ALPHA_OFFS:0; - - if(align) { - - /* *** BOTTOM OUTER SUNKEN EFFECT *** */ - if (!((align == UI_BUT_ALIGN_DOWN) || - (align == (UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_RIGHT)) || - (align == (UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_LEFT)))) { - glEnable(GL_BLEND); - MM_WHITE_OP; - fdrawline(x1, y1-1, x2, y1-1); - glDisable(GL_BLEND); - } - /* *** END BOTTOM OUTER SUNKEN EFFECT *** */ - - switch(align) { - case UI_BUT_ALIGN_TOP: - uiSetRoundBox(12); - - /* last arg in shaded_button() determines whether the button is in the middle of - * an alignment group or not. 0 = not middle, 1 = is in the middle. - * Done to allow cleaner drawing - */ - - flat_button(x1, y1, x2, y2, asp, colorid, flag, 0); - break; - case UI_BUT_ALIGN_DOWN: - uiSetRoundBox(3); - flat_button(x1, y1, x2, y2, asp, colorid, flag, 0); - break; - case UI_BUT_ALIGN_LEFT: - - /* RIGHT OUTER SUNKEN EFFECT */ - glEnable(GL_BLEND); - glShadeModel(GL_SMOOTH); - glBegin(GL_LINES); - MM_WHITE_OP; - glVertex2f(x2+1,y1); - MM_WHITE_TR; - glVertex2f(x2+1,y2); - glEnd(); - glDisable(GL_BLEND); - - uiSetRoundBox(6); - flat_button(x1, y1, x2, y2, asp, colorid, flag, 0); - break; - case UI_BUT_ALIGN_RIGHT: - - /* LEFT OUTER SUNKEN EFFECT */ - glEnable(GL_BLEND); - glShadeModel(GL_SMOOTH); - glBegin(GL_LINES); - MM_WHITE_OP; - glVertex2f(x1-1,y1); - MM_WHITE_TR; - glVertex2f(x1-1,y2); - glEnd(); - glDisable(GL_BLEND); - - uiSetRoundBox(9); - flat_button(x1, y1, x2, y2, asp, colorid, flag, 0); - break; - - case UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_RIGHT: - uiSetRoundBox(1); - flat_button(x1, y1, x2, y2, asp, colorid, flag, 0); - break; - case UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_LEFT: - uiSetRoundBox(2); - flat_button(x1, y1, x2, y2, asp, colorid, flag, 0); - break; - case UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_RIGHT: - - /* LEFT OUTER SUNKEN EFFECT */ - glEnable(GL_BLEND); - glShadeModel(GL_SMOOTH); - glBegin(GL_LINES); - MM_WHITE_OP; - glVertex2f(x1-1,y1); - MM_WHITE_TR; - glVertex2f(x1-1,y2); - glEnd(); - glDisable(GL_BLEND); - - uiSetRoundBox(8); - flat_button(x1, y1, x2, y2, asp, colorid, flag, 0); - break; - case UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_LEFT: - - /* RIGHT OUTER SUNKEN EFFECT */ - glEnable(GL_BLEND); - glShadeModel(GL_SMOOTH); - glBegin(GL_LINES); - MM_WHITE_OP; - glVertex2f(x2+1,y1); - MM_WHITE_TR; - glVertex2f(x2+1,y2); - glEnd(); - glDisable(GL_BLEND); - - uiSetRoundBox(4); - flat_button(x1, y1, x2, y2, asp, colorid, flag, 0); - break; - - default: - flat_button(x1, y1, x2, y2, asp, colorid, flag, 1); - break; - } - } - else { - - glEnable(GL_BLEND); - glShadeModel(GL_SMOOTH); - - /* BOTTOM OUTER SUNKEN EFFECT */ - MM_WHITE_OP; - fdrawline(x1, y1-1, x2, y1-1); - - /* LEFT OUTER SUNKEN EFFECT */ - glBegin(GL_LINES); - MM_WHITE_OP; - glVertex2f(x1-1,y1); - MM_WHITE_TR; - glVertex2f(x1-1,y2); - glEnd(); - - /* RIGHT OUTER SUNKEN EFFECT */ - glBegin(GL_LINES); - MM_WHITE_OP; - glVertex2f(x2+1,y1); - MM_WHITE_TR; - glVertex2f(x2+1,y2); - glEnd(); - - glDisable(GL_BLEND); - - uiSetRoundBox(15); - flat_button(x1, y1, x2, y2, asp, colorid, flag, 0); - } - - /* *** EXTRA DRAWING FOR SPECIFIC CONTROL TYPES *** */ - switch(type) { - case NUM: - case NUMABS: - /* SIDE ARROWS */ - /* left */ - if(flag & UI_SELECT) { - if(flag & UI_ACTIVE) UI_ThemeColorShadeAlpha(colorid, -80, alpha_offs); - else UI_ThemeColorShadeAlpha(colorid, -80, alpha_offs); - } else { - if(flag & UI_ACTIVE) UI_ThemeColorShadeAlpha(colorid, -45, alpha_offs); - else UI_ThemeColorShadeAlpha(colorid, -20, alpha_offs); - } - - ui_num_arrows(x1, y1, x2, y2, asp); - /* END SIDE ARROWS */ - } -} - -/* default theme callback */ -static void ui_draw_default(int type, int colorid, float aspect, float x1, float y1, float x2, float y2, int flag) -{ - - switch(type) { - case TEX: - case IDPOIN: - case NUM: - case NUMABS: - ui_default_flat(type, colorid, aspect, x1, y1, x2, y2, flag); - break; - case ICONROW: - case ICONTEXTROW: - case MENU: - default: - ui_default_button(type, colorid, aspect, x1, y1, x2, y2, flag); - } - -} - - -/* *************** OLDSKOOL THEME ***************** */ - -static void ui_draw_outlineX(float x1, float y1, float x2, float y2, float asp1) -{ - float vec[2]; - - glBegin(GL_LINE_LOOP); - vec[0]= x1+asp1; vec[1]= y1-asp1; - glVertex2fv(vec); - vec[0]= x2-asp1; - glVertex2fv(vec); - vec[0]= x2+asp1; vec[1]= y1+asp1; - glVertex2fv(vec); - vec[1]= y2-asp1; - glVertex2fv(vec); - vec[0]= x2-asp1; vec[1]= y2+asp1; - glVertex2fv(vec); - vec[0]= x1+asp1; - glVertex2fv(vec); - vec[0]= x1-asp1; vec[1]= y2-asp1; - glVertex2fv(vec); - vec[1]= y1+asp1; - glVertex2fv(vec); - glEnd(); - -} - - -static void ui_draw_oldskool(int type, int colorid, float asp, float x1, float y1, float x2, float y2, int flag) -{ - int alpha_offs= (flag & UI_BUT_DISABLED)?UI_DISABLED_ALPHA_OFFS:0; - /* paper */ - if(flag & UI_SELECT) { - if(flag & UI_ACTIVE) UI_ThemeColorShade(colorid, -40); - else UI_ThemeColorShade(colorid, -30); - } - else { - if(flag & UI_ACTIVE) UI_ThemeColorShade(colorid, +30); - else UI_ThemeColorShade(colorid, +20); - } - - glRectf(x1+1, y1+1, x2-1, y2-1); - - x1+= asp; - x2-= asp; - y1+= asp; - y2-= asp; - - /* below */ - if(flag & UI_SELECT) UI_ThemeColorShade(colorid, 0); - else UI_ThemeColorShade(colorid, -30); - fdrawline(x1, y1, x2, y1); - - /* right */ - fdrawline(x2, y1, x2, y2); - - /* top */ - if(flag & UI_SELECT) UI_ThemeColorShade(colorid, -30); - else UI_ThemeColorShade(colorid, 0); - fdrawline(x1, y2, x2, y2); - - /* left */ - fdrawline(x1, y1, x1, y2); - - /* outline */ - glColor3ub(0,0,0); - ui_draw_outlineX(x1, y1, x2, y2, asp); - - - /* special type decorations */ - switch(type) { - case NUM: - case NUMABS: - if(flag & UI_SELECT) UI_ThemeColorShadeAlpha(colorid, -60, alpha_offs); - else UI_ThemeColorShadeAlpha(colorid, -30, alpha_offs); - ui_num_arrows(x1, y1, x2, y2, asp); - break; - - case ICONROW: - case ICONTEXTROW: - if(flag & UI_ACTIVE) UI_ThemeColorShadeAlpha(colorid, 0, alpha_offs); - else UI_ThemeColorShadeAlpha(colorid, -10, alpha_offs); - glRectf(x2-9, y1+asp, x2-asp, y2-asp); - - UI_ThemeColorShadeAlpha(colorid, -50, alpha_offs); - ui_iconrow_arrows(x1, y1, x2, y2); - break; - - case MENU: - if(flag & UI_ACTIVE) UI_ThemeColorShadeAlpha(colorid, 0, alpha_offs); - else UI_ThemeColorShadeAlpha(colorid, -10, alpha_offs); - glRectf(x2-17, y1+asp, x2-asp, y2-asp); - - UI_ThemeColorShadeAlpha(colorid, -50, alpha_offs); - ui_menu_arrows(x1, y1, x2, y2, asp); - break; - } - -} - -static void ui_draw_round(int type, int colorid, float asp, float x1, float y1, float x2, float y2, int flag) -{ - float rad, maxrad=7.0; - int align= (flag & UI_BUT_ALIGN), curshade; - int alpha_offs= (flag & UI_BUT_DISABLED)?UI_DISABLED_ALPHA_OFFS:0; - - /* rounded corners */ - rad= (y2-y1)/2.0; - if (rad>(x2-x1)/2) rad = (x2-x1)/2; - if (maxrad) { - if (rad > maxrad) rad = maxrad; - } - /* end rounded corners */ - - /* paper */ - if(flag & UI_SELECT) { - if(flag & UI_ACTIVE) curshade= -40; - else curshade= -30; - } - else { - if(flag & UI_ACTIVE) curshade= 30; - else curshade= +20; - } - - UI_ThemeColorShade(colorid, curshade); - - /* alignment */ - if(align) { - switch(align) { - case UI_BUT_ALIGN_TOP: - uiSetRoundBox(12); - break; - case UI_BUT_ALIGN_DOWN: - uiSetRoundBox(3); - break; - case UI_BUT_ALIGN_LEFT: - uiSetRoundBox(6); - break; - case UI_BUT_ALIGN_RIGHT: - uiSetRoundBox(9); - break; - - case UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_RIGHT: - uiSetRoundBox(1); - break; - case UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_LEFT: - uiSetRoundBox(2); - break; - case UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_RIGHT: - uiSetRoundBox(8); - break; - case UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_LEFT: - uiSetRoundBox(4); - break; - - default: - uiSetRoundBox(0); - break; - } - } - else { - uiSetRoundBox(15); - } - /* end alignment */ - - /* draw the base button */ - round_button_flat(colorid, asp, x1, y1, x2, y2, flag, rad); - - /* special type decorations */ - switch(type) { - case TOG: - case TOGN: - case TOG3: - ui_draw_toggle_checkbox(flag, type, colorid, x1, y1, x2, y2); - break; - case NUM: - case NUMABS: - UI_ThemeColorShadeAlpha(colorid, curshade-60, alpha_offs); - ui_num_arrows(x1, y1, x2, y2, asp); - break; - - case ICONROW: - case ICONTEXTROW: - UI_ThemeColorShadeAlpha(colorid, curshade-60, alpha_offs); - ui_iconrow_arrows(x1, y1, x2, y2); - break; - - case MENU: - case BLOCK: - UI_ThemeColorShadeAlpha(colorid, curshade-60, alpha_offs); - ui_menu_arrows(x1, y1, x2, y2, asp); - break; - } -} - -/* *************** MINIMAL THEME ***************** */ - -// theme can define an embosfunc and sliderfunc, text+icon drawing is standard, no theme. - - - -/* super minimal button as used in logic menu */ -static void ui_draw_minimal(int type, int colorid, float asp, float x1, float y1, float x2, float y2, int flag) -{ - int alpha_offs= (flag & UI_BUT_DISABLED)?UI_DISABLED_ALPHA_OFFS:0; - - /* too much space between buttons */ - - if (type==TEX || type==IDPOIN) { - x1+= asp; - x2-= (asp*2); - //y1+= asp; - y2-= asp; - } else { - /* Less space between buttons looks nicer */ - y2-= asp; - x2-= asp; - } - - /* paper */ - if(flag & UI_SELECT) { - if(flag & UI_ACTIVE) UI_ThemeColorShade(colorid, -40); - else UI_ThemeColorShade(colorid, -30); - } - else { - if(flag & UI_ACTIVE) UI_ThemeColorShade(colorid, +20); - else UI_ThemeColorShade(colorid, +10); - } - - glRectf(x1, y1, x2, y2); - - if (type==TEX || type==IDPOIN) { - UI_ThemeColorShade(colorid, -60); - - /* top */ - fdrawline(x1, y2, x2, y2); - /* left */ - fdrawline(x1, y1, x1, y2); - - - /* text underline, some */ - UI_ThemeColorShade(colorid, +50); - glEnable(GL_LINE_STIPPLE); - glLineStipple(1, 0x8888); - fdrawline(x1+(asp*2), y1+(asp*3), x2-(asp*2), y1+(asp*3)); - glDisable(GL_LINE_STIPPLE); - - - UI_ThemeColorShade(colorid, +60); - /* below */ - fdrawline(x1, y1, x2, y1); - /* right */ - fdrawline(x2, y1, x2, y2); - - } else { - if(flag & UI_SELECT) { - UI_ThemeColorShade(colorid, -60); - - /* top */ - fdrawline(x1, y2, x2, y2); - /* left */ - fdrawline(x1, y1, x1, y2); - UI_ThemeColorShade(colorid, +40); - - /* below */ - fdrawline(x1, y1, x2, y1); - /* right */ - fdrawline(x2, y1, x2, y2); - } - else { - UI_ThemeColorShade(colorid, +40); - - /* top */ - fdrawline(x1, y2, x2, y2); - /* left */ - fdrawline(x1, y1, x1, y2); - - UI_ThemeColorShade(colorid, -60); - /* below */ - fdrawline(x1, y1, x2, y1); - /* right */ - fdrawline(x2, y1, x2, y2); - } - } - - /* special type decorations */ - switch(type) { - case NUM: - case NUMABS: - if(flag & UI_SELECT) UI_ThemeColorShadeAlpha(colorid, -60, alpha_offs); - else UI_ThemeColorShadeAlpha(colorid, -30, alpha_offs); - ui_num_arrows(x1, y1, x2, y2, asp); - break; - - case ICONROW: - case ICONTEXTROW: - if(flag & UI_ACTIVE) UI_ThemeColorShadeAlpha(colorid, 0, alpha_offs); - else UI_ThemeColorShadeAlpha(colorid, -10, alpha_offs); - glRectf(x2-9, y1+asp, x2-asp, y2-asp); - - UI_ThemeColorShadeAlpha(colorid, -50, alpha_offs); - ui_iconrow_arrows(x1, y1, x2, y2); - break; - - case MENU: - case BLOCK: - if(flag & UI_ACTIVE) UI_ThemeColorShadeAlpha(colorid, 0, alpha_offs); - else UI_ThemeColorShadeAlpha(colorid, -10, alpha_offs); - glRectf(x2-17, y1+asp, x2-asp, y2-asp); - - UI_ThemeColorShadeAlpha(colorid, -50, alpha_offs); - ui_menu_arrows(x1, y1, x2, y2, asp); - break; - } - - -} - - -/* fac is the slider handle position between x1 and x2 */ -static void ui_draw_slider(int colorid, float fac, float aspect, float x1, float y1, float x2, float y2, int flag) -{ - int alpha_offs= (flag & UI_BUT_DISABLED)?UI_DISABLED_ALPHA_OFFS:0; - float maxrad= 10.0; - float rad; - int origround, round = uiGetRoundBox(); - - rad= (y2-y1)/2.0; - if (rad>(x2-x1)/2) rad = (x2-x1)/2; - if (rad > maxrad) rad = maxrad; - - if(flag & UI_ACTIVE) UI_ThemeColorShade(colorid, -75); - else UI_ThemeColorShade(colorid, -45); - - origround = round; - round &= ~(2|4); - uiSetRoundBox(round); - - if (fac < rad) { - /* if slider end is in the left end cap */ - float ofsy; - float start_rad; - - start_rad = fac; - ofsy = (origround!=0) ? ((rad - fac) * 0.5) : 0.f; /* shrink in Y if rounded but */ - - gl_round_box(GL_POLYGON, x1, y1+ofsy, x1+fac, y2-ofsy, start_rad); - - } else if ( (fac >= rad) && (x1+fac < x2 - rad) ) { - /* if the slider is in the middle */ - - gl_round_box(GL_POLYGON, x1, y1, x1+fac, y2, rad); - - } else if (x1+fac >= x2-rad) { - /* if the slider is in the right end cap */ - float extx, ofsy; - float end_rad; - - /* draw the full slider area at 100% */ - uiSetRoundBox(origround); - gl_round_box(GL_POLYGON, x1, y1, x2, y2, rad); - - /* don't draw anything else if the slider is completely full */ - if (x2 - (x1+fac) < 0.05f) - return; - - /* tricky to trim off right end curve by drawing over it */ - extx = ((x1 + fac) - (x2 - rad)) * aspect; /* width of extension bit */ - end_rad = rad - extx - 1.0; - ofsy = (origround!=0) ? (extx * 0.4) : 0.f; /* shrink in Y if rounded but */ - - if (end_rad > 1.0) { - - if(flag & UI_SELECT) UI_ThemeColorShade(colorid, -20); - else UI_ThemeColorShade(colorid, -0); - - round = origround; - round &= ~(1|8); - uiSetRoundBox(round); - gl_round_box(GL_POLYGON, x1+fac-1.0, y1+ofsy, x2-1.0, y2-ofsy, end_rad); - } - - /* trace over outline again, to cover up inaccuracies */ - UI_ThemeColorBlendShadeAlpha(TH_BUT_OUTLINE, TH_BACK, 0.1, -30, alpha_offs); - uiSetRoundBox(origround); - uiRoundRectFakeAA(x1, y1, x2, y2, rad, aspect); - } - - - -} - -/* ************** STANDARD MENU DRAWING FUNCTION ************* */ - - -static void ui_shadowbox(float minx, float miny, float maxx, float maxy, float shadsize, unsigned char alpha) -{ - glEnable(GL_BLEND); - glShadeModel(GL_SMOOTH); - - /* right quad */ - glBegin(GL_POLYGON); - glColor4ub(0, 0, 0, alpha); - glVertex2f(maxx, miny); - glVertex2f(maxx, maxy-0.3*shadsize); - glColor4ub(0, 0, 0, 0); - glVertex2f(maxx+shadsize, maxy-0.75*shadsize); - glVertex2f(maxx+shadsize, miny); - glEnd(); - - /* corner shape */ - glBegin(GL_POLYGON); - glColor4ub(0, 0, 0, alpha); - glVertex2f(maxx, miny); - glColor4ub(0, 0, 0, 0); - glVertex2f(maxx+shadsize, miny); - glVertex2f(maxx+0.7*shadsize, miny-0.7*shadsize); - glVertex2f(maxx, miny-shadsize); - glEnd(); - - /* bottom quad */ - glBegin(GL_POLYGON); - glColor4ub(0, 0, 0, alpha); - glVertex2f(minx+0.3*shadsize, miny); - glVertex2f(maxx, miny); - glColor4ub(0, 0, 0, 0); - glVertex2f(maxx, miny-shadsize); - glVertex2f(minx+0.5*shadsize, miny-shadsize); - glEnd(); - - glDisable(GL_BLEND); - glShadeModel(GL_FLAT); -} - -void uiDrawBoxShadow(unsigned char alpha, float minx, float miny, float maxx, float maxy) -{ - /* accumulated outline boxes to make shade not linear, is more pleasant */ - ui_shadowbox(minx, miny, maxx, maxy, 11.0, (20*alpha)>>8); - ui_shadowbox(minx, miny, maxx, maxy, 7.0, (40*alpha)>>8); - ui_shadowbox(minx, miny, maxx, maxy, 5.0, (80*alpha)>>8); - -} - -// background for pulldowns, pullups, and other drawing temporal menus.... -// has to be made themable still (now only color) - -void uiDrawMenuBox(float minx, float miny, float maxx, float maxy, short flag, short direction) -{ - char col[4]; - int rounded = ELEM(UI_GetThemeValue(TH_BUT_DRAWTYPE), TH_ROUNDED, TH_ROUNDSHADED); - - UI_GetThemeColor4ubv(TH_MENU_BACK, col); - - if (rounded) { - if (flag & UI_BLOCK_POPUP) { - uiSetRoundBox(15); - miny -= 4.0; - maxy += 4.0; - } - else if (direction == UI_DOWN) { - uiSetRoundBox(12); - miny -= 4.0; - } else if (direction == UI_TOP) { - uiSetRoundBox(3); - maxy += 4.0; - } else { - uiSetRoundBox(0); - } - } - - if( (flag & UI_BLOCK_NOSHADOW)==0) { - /* accumulated outline boxes to make shade not linear, is more pleasant */ - ui_shadowbox(minx, miny, maxx, maxy, 11.0, (20*col[3])>>8); - ui_shadowbox(minx, miny, maxx, maxy, 7.0, (40*col[3])>>8); - ui_shadowbox(minx, miny, maxx, maxy, 5.0, (80*col[3])>>8); - } - glEnable(GL_BLEND); - glColor4ubv((GLubyte *)col); - - if (rounded) { - gl_round_box(GL_POLYGON, minx, miny, maxx, maxy, 4.0); - } else { - glRectf(minx, miny, maxx, maxy); - } - glDisable(GL_BLEND); -} - - - -/* pulldown menu item */ -static void ui_draw_pulldown_item(int type, int colorid, float asp, float x1, float y1, float x2, float y2, int flag) -{ - char col[4]; - - UI_GetThemeColor4ubv(TH_MENU_BACK, col); - if(col[3]!=255) { - glEnable(GL_BLEND); - } - - if((flag & UI_ACTIVE) && type!=LABEL) { - UI_ThemeColor4(TH_MENU_HILITE); - glRectf(x1, y1, x2, y2); - - - } else { - UI_ThemeColor4(colorid); // is set at TH_MENU_ITEM when pulldown opened. - glRectf(x1, y1, x2, y2); - } - - glDisable(GL_BLEND); -} - -/* pulldown menu calling button */ -static void ui_draw_pulldown_round(int type, int colorid, float asp, float x1, float y1, float x2, float y2, int flag) -{ - - if(flag & UI_ACTIVE) { - UI_ThemeColor(TH_MENU_HILITE); - - uiSetRoundBox(15); - gl_round_box(GL_POLYGON, x1, y1+3, x2, y2-3, 7.0); - - glEnable( GL_LINE_SMOOTH ); - glEnable( GL_BLEND ); - gl_round_box(GL_LINE_LOOP, x1, y1+3, x2, y2-3, 7.0); - glDisable( GL_LINE_SMOOTH ); - glDisable( GL_BLEND ); - - } else { - UI_ThemeColor(colorid); // is set at TH_MENU_ITEM when pulldown opened. - glRectf(x1-1, y1+2, x2+1, y2-2); - } - -} - /* ************** TEXT AND ICON DRAWING FUNCTIONS ************* */ -#define BUT_TEXT_NORMAL 0 -#define BUT_TEXT_SUNKEN 1 - -void ui_draw_text(uiBut *but, float x, float y, int sunken) -{ - int alpha_offs= (but->flag & UI_BUT_DISABLED)?UI_DISABLED_ALPHA_OFFS:0; - int transopts; - int len; - float ypos = (sunken==BUT_TEXT_SUNKEN) ? (y-1) : y; - char *cpoin; - - if(but->type==LABEL && but->hardmin!=0.0) { - UI_ThemeColor(TH_BUT_TEXT_HI); - } - else if(but->dt==UI_EMBOSSP) { - if((but->flag & UI_ACTIVE) && but->type!=LABEL) { // LABEL = title in pulldowns - UI_ThemeColorShadeAlpha(TH_MENU_TEXT_HI, 0, alpha_offs); - } else { - UI_ThemeColorShadeAlpha(TH_MENU_TEXT, 0, alpha_offs); - } - } - else { - if(but->flag & UI_SELECT) { - UI_ThemeColorShadeAlpha(TH_BUT_TEXT_HI, 0, alpha_offs); - } else { - UI_ThemeColorShadeAlpha(TH_BUT_TEXT, 0, alpha_offs); - } - } - - if (sunken == BUT_TEXT_SUNKEN) { - float curcol[4]; - - glGetFloatv(GL_CURRENT_COLOR, curcol); /* returns four components: r,g,b,a */ - - /* only draw embossed text if the text color is darker than 0.5 mid-grey */ - if ((curcol[0] + curcol[1] + curcol[2]) * 0.3f < 0.5f) - glColor4f(0.6f, 0.6f, 0.6f, 0.3f); - else - return; - } - - ui_rasterpos_safe(x, ypos, but->aspect); - if(but->type==IDPOIN) transopts= 0; // no translation, of course! - else transopts= ui_translate_buttons(); - - /* cut string in 2 parts */ - cpoin= strchr(but->drawstr, '|'); - if(cpoin) *cpoin= 0; - -#ifdef INTERNATIONAL - if (but->type == FTPREVIEW) - FTF_DrawNewFontString (but->drawstr+but->ofs, FTF_INPUT_UTF8); - else - UI_DrawString(but->font, but->drawstr+but->ofs, transopts); -#else - UI_DrawString(but->font, but->drawstr+but->ofs, transopts); -#endif - - /* part text right aligned */ - if(cpoin) { - len= UI_GetStringWidth(but->font, cpoin+1, ui_translate_buttons()); - ui_rasterpos_safe( but->x2 - len*but->aspect-3, ypos, but->aspect); - UI_DrawString(but->font, cpoin+1, ui_translate_buttons()); - *cpoin= '|'; - } -} - -/* draws text and icons for buttons */ -void ui_draw_text_icon(uiBut *but) -{ - float x, y; - short t, pos, ch; - short selsta_tmp, selend_tmp, selsta_draw, selwidth_draw; - - /* check for button text label */ - if (but->type == ICONTEXTROW) { - ui_draw_icon(but, (BIFIconID) (but->icon+but->iconadd), 0); - } - else { - - /* text button selection and cursor */ - if(but->editstr && but->pos != -1) { - - if ((but->selend - but->selsta) > 0) { - /* text button selection */ - selsta_tmp = but->selsta + strlen(but->str); - selend_tmp = but->selend + strlen(but->str); - - if(but->drawstr[0]!=0) { - ch= but->drawstr[selsta_tmp]; - but->drawstr[selsta_tmp]= 0; - - selsta_draw = but->aspect*UI_GetStringWidth(but->font, but->drawstr+but->ofs, ui_translate_buttons()) + 3; - - but->drawstr[selsta_tmp]= ch; - - - ch= but->drawstr[selend_tmp]; - but->drawstr[selend_tmp]= 0; - - selwidth_draw = but->aspect*UI_GetStringWidth(but->font, but->drawstr+but->ofs, ui_translate_buttons()) + 3; - - but->drawstr[selend_tmp]= ch; - - UI_ThemeColor(TH_BUT_TEXTFIELD_HI); - glRects(but->x1+selsta_draw+1, but->y1+2, but->x1+selwidth_draw+1, but->y2-2); - } - } else { - /* text cursor */ - pos= but->pos+strlen(but->str); - if(pos >= but->ofs) { - if(but->drawstr[0]!=0) { - ch= but->drawstr[pos]; - but->drawstr[pos]= 0; - - t= but->aspect*UI_GetStringWidth(but->font, but->drawstr+but->ofs, ui_translate_buttons()) + 3; - - but->drawstr[pos]= ch; - } - else t= 3; - - glColor3ub(255,0,0); - glRects(but->x1+t, but->y1+2, but->x1+t+2, but->y2-2); - } - } - } - - if(but->type==BUT_TOGDUAL) { - int dualset= 0; - if(but->pointype==SHO) - dualset= BTST( *(((short *)but->poin)+1), but->bitnr); - else if(but->pointype==INT) - dualset= BTST( *(((int *)but->poin)+1), but->bitnr); - - ui_draw_icon(but, ICON_DOT, dualset?0:-100); - } - - if(but->drawstr[0]!=0) { - int tog3= 0; - - /* If there's an icon too (made with uiDefIconTextBut) then draw the icon - and offset the text label to accomodate it */ - - if ( (but->flag & UI_HAS_ICON) && (but->flag & UI_ICON_LEFT) ) - { - ui_draw_icon(but, but->icon, 0); - - if(but->editstr || (but->flag & UI_TEXT_LEFT)) x= but->x1 + but->aspect*UI_icon_get_width(but->icon)+5.0; - else x= (but->x1+but->x2-but->strwidth+1)/2.0; - } - else - { - if(but->editstr || (but->flag & UI_TEXT_LEFT)) - x= but->x1+4.0; - else if ELEM3(but->type, TOG, TOGN, TOG3) - x= but->x1+18.0; /* offset for checkmark */ - else - x= (but->x1+but->x2-but->strwidth+1)/2.0; - } - - /* tog3 button exception; draws with glColor! */ - if(but->type==TOG3 && (but->flag & UI_SELECT)) { - - if( but->pointype==CHA ) { - if( BTST( *(but->poin+2), but->bitnr )) tog3= 1; - } - else if( but->pointype ==SHO ) { - short *sp= (short *)but->poin; - if( BTST( sp[1], but->bitnr )) tog3= 1; - } - - ui_tog3_invert(but->x1,but->y1,but->x2,but->y2, tog3); - if (tog3) glColor3ub(255, 255, 0); - } - - /* position and draw */ - y = (but->y1+but->y2- 9.0)/2.0; - - if (ELEM(but->type, LABEL, PULLDOWN) && !(but->flag & UI_ACTIVE)) - ui_draw_text(but, x, y, BUT_TEXT_SUNKEN); - - ui_draw_text(but, x, y, BUT_TEXT_NORMAL); - - } - /* if there's no text label, then check to see if there's an icon only and draw it */ - else if( but->flag & UI_HAS_ICON ) { - ui_draw_icon(but, (BIFIconID) (but->icon+but->iconadd), 0); - } - } -} - -static void ui_draw_but_COL(uiBut *but) -{ - float col[3]; - char colr, colg, colb; - - ui_get_but_vectorf(but, col); - - colr= floor(255.0*col[0]+0.5); - colg= floor(255.0*col[1]+0.5); - colb= floor(255.0*col[2]+0.5); - - /* exception... hrms, but can't simply use the emboss callback for this now. */ - /* this button type needs review, and nice integration with rest of API here */ - /* XXX 2.50 bad U global access */ - if(but->embossfunc == ui_draw_round) { - char *cp= UI_ThemeGetColorPtr(U.themes.first, 0, TH_CUSTOM); - cp[0]= colr; cp[1]= colg; cp[2]= colb; - but->flag &= ~UI_SELECT; - but->embossfunc(but->type, TH_CUSTOM, but->aspect, but->x1, but->y1, but->x2, but->y2, but->flag); - } - else - { - - glColor3ub(colr, colg, colb); - glRectf((but->x1), (but->y1), (but->x2), (but->y2)); - glColor3ub(0, 0, 0); - fdrawbox((but->x1), (but->y1), (but->x2), (but->y2)); - } -} - -/* draws in resolution of 20x4 colors */ -static void ui_draw_but_HSVCUBE(uiBut *but) -{ - int a; - float h,s,v; - float dx, dy, sx1, sx2, sy, x, y; - float col0[4][3]; // left half, rect bottom to top - float col1[4][3]; // right half, rect bottom to top - - h= but->hsv[0]; - s= but->hsv[1]; - v= but->hsv[2]; - - /* draw series of gouraud rects */ - glShadeModel(GL_SMOOTH); - - if(but->a1==0) { // H and V vary - hsv_to_rgb(0.0, s, 0.0, &col1[0][0], &col1[0][1], &col1[0][2]); - hsv_to_rgb(0.0, s, 0.333, &col1[1][0], &col1[1][1], &col1[1][2]); - hsv_to_rgb(0.0, s, 0.666, &col1[2][0], &col1[2][1], &col1[2][2]); - hsv_to_rgb(0.0, s, 1.0, &col1[3][0], &col1[3][1], &col1[3][2]); - x= h; y= v; - } - else if(but->a1==1) { // H and S vary - hsv_to_rgb(0.0, 0.0, v, &col1[0][0], &col1[0][1], &col1[0][2]); - hsv_to_rgb(0.0, 0.333, v, &col1[1][0], &col1[1][1], &col1[1][2]); - hsv_to_rgb(0.0, 0.666, v, &col1[2][0], &col1[2][1], &col1[2][2]); - hsv_to_rgb(0.0, 1.0, v, &col1[3][0], &col1[3][1], &col1[3][2]); - x= h; y= s; - } - else if(but->a1==2) { // S and V vary - hsv_to_rgb(h, 0.0, 0.0, &col1[0][0], &col1[0][1], &col1[0][2]); - hsv_to_rgb(h, 0.333, 0.0, &col1[1][0], &col1[1][1], &col1[1][2]); - hsv_to_rgb(h, 0.666, 0.0, &col1[2][0], &col1[2][1], &col1[2][2]); - hsv_to_rgb(h, 1.0, 0.0, &col1[3][0], &col1[3][1], &col1[3][2]); - x= v; y= s; - } - else { // only hue slider - hsv_to_rgb(0.0, 1.0, 1.0, &col1[0][0], &col1[0][1], &col1[0][2]); - VECCOPY(col1[1], col1[0]); - VECCOPY(col1[2], col1[0]); - VECCOPY(col1[3], col1[0]); - x= h; y= 0.5; - } - - for(dx=0.0; dx<1.0; dx+= 0.05) { - // previous color - VECCOPY(col0[0], col1[0]); - VECCOPY(col0[1], col1[1]); - VECCOPY(col0[2], col1[2]); - VECCOPY(col0[3], col1[3]); - - // new color - if(but->a1==0) { // H and V vary - hsv_to_rgb(dx, s, 0.0, &col1[0][0], &col1[0][1], &col1[0][2]); - hsv_to_rgb(dx, s, 0.333, &col1[1][0], &col1[1][1], &col1[1][2]); - hsv_to_rgb(dx, s, 0.666, &col1[2][0], &col1[2][1], &col1[2][2]); - hsv_to_rgb(dx, s, 1.0, &col1[3][0], &col1[3][1], &col1[3][2]); - } - else if(but->a1==1) { // H and S vary - hsv_to_rgb(dx, 0.0, v, &col1[0][0], &col1[0][1], &col1[0][2]); - hsv_to_rgb(dx, 0.333, v, &col1[1][0], &col1[1][1], &col1[1][2]); - hsv_to_rgb(dx, 0.666, v, &col1[2][0], &col1[2][1], &col1[2][2]); - hsv_to_rgb(dx, 1.0, v, &col1[3][0], &col1[3][1], &col1[3][2]); - } - else if(but->a1==2) { // S and V vary - hsv_to_rgb(h, 0.0, dx, &col1[0][0], &col1[0][1], &col1[0][2]); - hsv_to_rgb(h, 0.333, dx, &col1[1][0], &col1[1][1], &col1[1][2]); - hsv_to_rgb(h, 0.666, dx, &col1[2][0], &col1[2][1], &col1[2][2]); - hsv_to_rgb(h, 1.0, dx, &col1[3][0], &col1[3][1], &col1[3][2]); - } - else { // only H - hsv_to_rgb(dx, 1.0, 1.0, &col1[0][0], &col1[0][1], &col1[0][2]); - VECCOPY(col1[1], col1[0]); - VECCOPY(col1[2], col1[0]); - VECCOPY(col1[3], col1[0]); - } - - // rect - sx1= but->x1 + dx*(but->x2-but->x1); - sx2= but->x1 + (dx+0.05)*(but->x2-but->x1); - sy= but->y1; - dy= (but->y2-but->y1)/3.0; - - glBegin(GL_QUADS); - for(a=0; a<3; a++, sy+=dy) { - glColor3fv(col0[a]); - glVertex2f(sx1, sy); - - glColor3fv(col1[a]); - glVertex2f(sx2, sy); - - glColor3fv(col1[a+1]); - glVertex2f(sx2, sy+dy); - - glColor3fv(col0[a+1]); - glVertex2f(sx1, sy+dy); - } - glEnd(); - } - - glShadeModel(GL_FLAT); - - /* cursor */ - x= but->x1 + x*(but->x2-but->x1); - y= but->y1 + y*(but->y2-but->y1); - CLAMP(x, but->x1+3.0, but->x2-3.0); - CLAMP(y, but->y1+3.0, but->y2-3.0); - - fdrawXORcirc(x, y, 3.1); - - /* outline */ - glColor3ub(0, 0, 0); - fdrawbox((but->x1), (but->y1), (but->x2), (but->y2)); -} +#if 0 #ifdef INTERNATIONAL static void ui_draw_but_CHARTAB(uiBut *but) { /* XXX 2.50 bad global access */ -#if 0 /* Some local variables */ float sx, sy, ex, ey; float width, height; @@ -2573,17 +495,17 @@ static void ui_draw_but_CHARTAB(uiBut *but) charmax = G.charmax = 0xffff; /* Calculate the size of the button */ - width = abs(but->x2 - but->x1); - height = abs(but->y2 - but->y1); + width = abs(rect->xmax - rect->xmin); + height = abs(rect->ymax - rect->ymin); butw = floor(width / 12); buth = floor(height / 6); /* Initialize variables */ - sx = but->x1; - ex = but->x1 + butw; - sy = but->y1 + height - buth; - ey = but->y1 + height; + sx = rect->xmin; + ex = rect->xmin + butw; + sy = rect->ymin + height - buth; + ey = rect->ymin + height; cs = G.charstart; @@ -2619,7 +541,7 @@ static void ui_draw_but_CHARTAB(uiBut *but) glShadeModel(GL_SMOOTH); glColor3ub(200, 200, 200); - glRectf((but->x1), (but->y1), (but->x2), (but->y2)); + glRectf((rect->xmin), (rect->ymin), (rect->xmax), (rect->ymax)); glColor3ub(0, 0, 0); for(y = 0; y < 6; y++) @@ -2697,8 +619,8 @@ static void ui_draw_but_CHARTAB(uiBut *but) /* Add the y position and reset x position */ sy -= buth; ey -= buth; - sx = but->x1; - ex = but->x1 + butw; + sx = rect->xmin; + ex = rect->xmin + butw; } glShadeModel(GL_FLAT); @@ -2720,14 +642,14 @@ static void ui_draw_but_CHARTAB(uiBut *but) /* resets the font size */ if(G.ui_international == TRUE) { - uiSetCurFont(but->block, UI_HELV); + // uiSetCurFont(but->block, UI_HELV); } -#endif } #endif // INTERNATIONAL +#endif -static void ui_draw_but_COLORBAND(uiBut *but) +void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *wcol, rcti *rect) { ColorBand *coba; CBData *cbd; @@ -2738,10 +660,10 @@ static void ui_draw_but_COLORBAND(uiBut *but) coba= (ColorBand *)(but->editcoba? but->editcoba: but->poin); if(coba==NULL) return; - x1= but->x1; - y1= but->y1; - sizex= but->x2-x1; - sizey= but->y2-y1; + x1= rect->xmin; + y1= rect->ymin; + sizex= rect->xmax-x1; + sizey= rect->ymax-y1; /* first background, to show tranparency */ dx= sizex/12.0; @@ -2854,7 +776,7 @@ static void ui_draw_but_COLORBAND(uiBut *but) glEnd(); } -static void ui_draw_but_NORMAL(uiBut *but) +void ui_draw_but_NORMAL(uiBut *but, uiWidgetColors *wcol, rcti *rect) { static GLuint displist=0; int a, old[8]; @@ -2866,9 +788,9 @@ static void ui_draw_but_NORMAL(uiBut *but) glGetMaterialfv(GL_FRONT, GL_DIFFUSE, diff); /* backdrop */ - UI_ThemeColor(TH_BUT_NEUTRAL); + glColor3ubv(wcol->inner); uiSetRoundBox(15); - gl_round_box(GL_POLYGON, but->x1, but->y1, but->x2, but->y2, 5.0f); + gl_round_box(GL_POLYGON, rect->xmin, rect->ymin, rect->xmax, rect->ymax, 5.0f); /* sphere color */ glMaterialfv(GL_FRONT, GL_DIFFUSE, diffn); @@ -2894,10 +816,10 @@ static void ui_draw_but_NORMAL(uiBut *but) /* transform to button */ glPushMatrix(); - glTranslatef(but->x1 + 0.5f*(but->x2-but->x1), but->y1+ 0.5f*(but->y2-but->y1), 0.0f); - size= (but->x2-but->x1)/200.f; + glTranslatef(rect->xmin + 0.5f*(rect->xmax-rect->xmin), rect->ymin+ 0.5f*(rect->ymax-rect->ymin), 0.0f); + size= (rect->xmax-rect->xmin)/200.f; glScalef(size, size, size); - + if(displist==0) { GLUquadricObj *qobj; @@ -2916,13 +838,22 @@ static void ui_draw_but_NORMAL(uiBut *but) else glCallList(displist); /* restore */ - glPopMatrix(); glDisable(GL_LIGHTING); glDisable(GL_CULL_FACE); glMaterialfv(GL_FRONT, GL_DIFFUSE, diff); - glDisable(GL_LIGHT7); + /* AA circle */ + glEnable(GL_BLEND); + glEnable(GL_LINE_SMOOTH ); + glColor3ubv(wcol->inner); + glutil_draw_lined_arc(0.0f, M_PI*2.0, 100.0f, 32); + glDisable(GL_BLEND); + glDisable(GL_LINE_SMOOTH ); + + /* matrix after circle */ + glPopMatrix(); + /* enable blender light */ for(a=0; a<8; a++) { if(old[a]) @@ -2930,38 +861,45 @@ static void ui_draw_but_NORMAL(uiBut *but) } } -static void ui_draw_but_curve_grid(uiBut *but, float zoomx, float zoomy, float offsx, float offsy, float step) +static void ui_draw_but_curve_grid(rcti *rect, float zoomx, float zoomy, float offsx, float offsy, float step) { float dx, dy, fx, fy; glBegin(GL_LINES); dx= step*zoomx; - fx= but->x1 + zoomx*(-offsx); - if(fx > but->x1) fx -= dx*( floor(fx-but->x1)); - while(fx < but->x2) { - glVertex2f(fx, but->y1); - glVertex2f(fx, but->y2); + fx= rect->xmin + zoomx*(-offsx); + if(fx > rect->xmin) fx -= dx*( floor(fx-rect->xmin)); + while(fx < rect->xmax) { + glVertex2f(fx, rect->ymin); + glVertex2f(fx, rect->ymax); fx+= dx; } dy= step*zoomy; - fy= but->y1 + zoomy*(-offsy); - if(fy > but->y1) fy -= dy*( floor(fy-but->y1)); - while(fy < but->y2) { - glVertex2f(but->x1, fy); - glVertex2f(but->x2, fy); + fy= rect->ymin + zoomy*(-offsy); + if(fy > rect->ymin) fy -= dy*( floor(fy-rect->ymin)); + while(fy < rect->ymax) { + glVertex2f(rect->xmin, fy); + glVertex2f(rect->xmax, fy); fy+= dy; } glEnd(); } -static void ui_draw_but_CURVE(ARegion *ar, uiBut *but) +static void glColor3ubvShade(char *col, int shade) +{ + glColor3ub(col[0]-shade>0?col[0]-shade:0, + col[1]-shade>0?col[1]-shade:0, + col[2]-shade>0?col[2]-shade:0); +} + +void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect) { CurveMapping *cumap; CurveMap *cuma; CurveMapPoint *cmp; - float fx, fy, dx, dy, fac[2], zoomx, zoomy, offsx, offsy; + float fx, fy, fac[2], zoomx, zoomy, offsx, offsy; GLint scissor[4]; int a; @@ -2970,46 +908,42 @@ static void ui_draw_but_CURVE(ARegion *ar, uiBut *but) /* need scissor test, curve can draw outside of boundary */ glGetIntegerv(GL_VIEWPORT, scissor); - fx= but->x1; fy= but->y1; - ui_block_to_window_fl(ar, but->block, &fx, &fy); - dx= but->x2; dy= but->y2; - ui_block_to_window_fl(ar, but->block, &dx, &dy); - glScissor((int)floor(fx), (int)floor(fy), (int)ceil(dx-fx), (int)ceil(dy-fy)); + glScissor(ar->winrct.xmin + rect->xmin, ar->winrct.ymin+rect->ymin, rect->xmax-rect->xmin, rect->ymax-rect->ymin); /* calculate offset and zoom */ - zoomx= (but->x2-but->x1-2.0*but->aspect)/(cumap->curr.xmax - cumap->curr.xmin); - zoomy= (but->y2-but->y1-2.0*but->aspect)/(cumap->curr.ymax - cumap->curr.ymin); + zoomx= (rect->xmax-rect->xmin-2.0*but->aspect)/(cumap->curr.xmax - cumap->curr.xmin); + zoomy= (rect->ymax-rect->ymin-2.0*but->aspect)/(cumap->curr.ymax - cumap->curr.ymin); offsx= cumap->curr.xmin-but->aspect/zoomx; offsy= cumap->curr.ymin-but->aspect/zoomy; /* backdrop */ if(cumap->flag & CUMA_DO_CLIP) { - UI_ThemeColorShade(TH_BUT_NEUTRAL, -20); - glRectf(but->x1, but->y1, but->x2, but->y2); - UI_ThemeColor(TH_BUT_NEUTRAL); - glRectf(but->x1 + zoomx*(cumap->clipr.xmin-offsx), - but->y1 + zoomy*(cumap->clipr.ymin-offsy), - but->x1 + zoomx*(cumap->clipr.xmax-offsx), - but->y1 + zoomy*(cumap->clipr.ymax-offsy)); + glColor3ubvShade(wcol->inner, -20); + glRectf(rect->xmin, rect->ymin, rect->xmax, rect->ymax); + glColor3ubv(wcol->inner); + glRectf(rect->xmin + zoomx*(cumap->clipr.xmin-offsx), + rect->ymin + zoomy*(cumap->clipr.ymin-offsy), + rect->xmin + zoomx*(cumap->clipr.xmax-offsx), + rect->ymin + zoomy*(cumap->clipr.ymax-offsy)); } else { - UI_ThemeColor(TH_BUT_NEUTRAL); - glRectf(but->x1, but->y1, but->x2, but->y2); + glColor3ubv(wcol->inner); + glRectf(rect->xmin, rect->ymin, rect->xmax, rect->ymax); } /* grid, every .25 step */ - UI_ThemeColorShade(TH_BUT_NEUTRAL, -16); - ui_draw_but_curve_grid(but, zoomx, zoomy, offsx, offsy, 0.25f); + glColor3ubvShade(wcol->inner, -16); + ui_draw_but_curve_grid(rect, zoomx, zoomy, offsx, offsy, 0.25f); /* grid, every 1.0 step */ - UI_ThemeColorShade(TH_BUT_NEUTRAL, -24); - ui_draw_but_curve_grid(but, zoomx, zoomy, offsx, offsy, 1.0f); + glColor3ubvShade(wcol->inner, -24); + ui_draw_but_curve_grid(rect, zoomx, zoomy, offsx, offsy, 1.0f); /* axes */ - UI_ThemeColorShade(TH_BUT_NEUTRAL, -50); + glColor3ubvShade(wcol->inner, -50); glBegin(GL_LINES); - glVertex2f(but->x1, but->y1 + zoomy*(-offsy)); - glVertex2f(but->x2, but->y1 + zoomy*(-offsy)); - glVertex2f(but->x1 + zoomx*(-offsx), but->y1); - glVertex2f(but->x1 + zoomx*(-offsx), but->y2); + glVertex2f(rect->xmin, rect->ymin + zoomy*(-offsy)); + glVertex2f(rect->xmax, rect->ymin + zoomy*(-offsy)); + glVertex2f(rect->xmin + zoomx*(-offsx), rect->ymin); + glVertex2f(rect->xmin + zoomx*(-offsx), rect->ymax); glEnd(); /* cfra option */ @@ -3017,8 +951,8 @@ static void ui_draw_but_CURVE(ARegion *ar, uiBut *but) if(cumap->flag & CUMA_DRAW_CFRA) { glColor3ub(0x60, 0xc0, 0x40); glBegin(GL_LINES); - glVertex2f(but->x1 + zoomx*(cumap->sample[0]-offsx), but->y1); - glVertex2f(but->x1 + zoomx*(cumap->sample[0]-offsx), but->y2); + glVertex2f(rect->xmin + zoomx*(cumap->sample[0]-offsx), rect->ymin); + glVertex2f(rect->xmin + zoomx*(cumap->sample[0]-offsx), rect->ymax); glEnd(); }*/ /* sample option */ @@ -3029,8 +963,8 @@ static void ui_draw_but_CURVE(ARegion *ar, uiBut *but) glColor3ub(240, 240, 240); glBegin(GL_LINES); - glVertex2f(but->x1 + zoomx*(lum-offsx), but->y1); - glVertex2f(but->x1 + zoomx*(lum-offsx), but->y2); + glVertex2f(rect->xmin + zoomx*(lum-offsx), rect->ymin); + glVertex2f(rect->xmin + zoomx*(lum-offsx), rect->ymax); glEnd(); } else { @@ -3042,14 +976,14 @@ static void ui_draw_but_CURVE(ARegion *ar, uiBut *but) glColor3ub(100, 100, 240); glBegin(GL_LINES); - glVertex2f(but->x1 + zoomx*(cumap->sample[cumap->cur]-offsx), but->y1); - glVertex2f(but->x1 + zoomx*(cumap->sample[cumap->cur]-offsx), but->y2); + glVertex2f(rect->xmin + zoomx*(cumap->sample[cumap->cur]-offsx), rect->ymin); + glVertex2f(rect->xmin + zoomx*(cumap->sample[cumap->cur]-offsx), rect->ymax); glEnd(); } }*/ /* the curve */ - UI_ThemeColorBlend(TH_TEXT, TH_BUT_NEUTRAL, 0.35); + glColor3ubv(wcol->item); glEnable(GL_LINE_SMOOTH); glEnable(GL_BLEND); glBegin(GL_LINE_STRIP); @@ -3060,23 +994,23 @@ static void ui_draw_but_CURVE(ARegion *ar, uiBut *but) /* first point */ if((cuma->flag & CUMA_EXTEND_EXTRAPOLATE)==0) - glVertex2f(but->x1, but->y1 + zoomy*(cmp[0].y-offsy)); + glVertex2f(rect->xmin, rect->ymin + zoomy*(cmp[0].y-offsy)); else { - fx= but->x1 + zoomx*(cmp[0].x-offsx + cuma->ext_in[0]); - fy= but->y1 + zoomy*(cmp[0].y-offsy + cuma->ext_in[1]); + fx= rect->xmin + zoomx*(cmp[0].x-offsx + cuma->ext_in[0]); + fy= rect->ymin + zoomy*(cmp[0].y-offsy + cuma->ext_in[1]); glVertex2f(fx, fy); } for(a=0; a<=CM_TABLE; a++) { - fx= but->x1 + zoomx*(cmp[a].x-offsx); - fy= but->y1 + zoomy*(cmp[a].y-offsy); + fx= rect->xmin + zoomx*(cmp[a].x-offsx); + fy= rect->ymin + zoomy*(cmp[a].y-offsy); glVertex2f(fx, fy); } /* last point */ if((cuma->flag & CUMA_EXTEND_EXTRAPOLATE)==0) - glVertex2f(but->x2, but->y1 + zoomy*(cmp[CM_TABLE].y-offsy)); + glVertex2f(rect->xmax, rect->ymin + zoomy*(cmp[CM_TABLE].y-offsy)); else { - fx= but->x1 + zoomx*(cmp[CM_TABLE].x-offsx - cuma->ext_out[0]); - fy= but->y1 + zoomy*(cmp[CM_TABLE].y-offsy - cuma->ext_out[1]); + fx= rect->xmin + zoomx*(cmp[CM_TABLE].x-offsx - cuma->ext_out[0]); + fy= rect->ymin + zoomy*(cmp[CM_TABLE].y-offsy - cuma->ext_out[1]); glVertex2f(fx, fy); } glEnd(); @@ -3092,8 +1026,8 @@ static void ui_draw_but_CURVE(ARegion *ar, uiBut *but) UI_ThemeColor(TH_TEXT_HI); else UI_ThemeColor(TH_TEXT); - fac[0]= but->x1 + zoomx*(cmp[a].x-offsx); - fac[1]= but->y1 + zoomy*(cmp[a].y-offsy); + fac[0]= rect->xmin + zoomx*(cmp[a].x-offsx); + fac[1]= rect->ymin + zoomy*(cmp[a].y-offsy); bglVertex2fv(fac); } bglEnd(); @@ -3103,218 +1037,63 @@ static void ui_draw_but_CURVE(ARegion *ar, uiBut *but) glScissor(scissor[0], scissor[1], scissor[2], scissor[3]); /* outline */ - UI_ThemeColor(TH_BUT_OUTLINE); - fdrawbox(but->x1, but->y1, but->x2, but->y2); + glColor3ubv(wcol->outline); + fdrawbox(rect->xmin, rect->ymin, rect->xmax, rect->ymax); } -static void ui_draw_sepr(uiBut *but) -{ - float y = but->y1 + (but->y2 - but->y1)*0.5; - - UI_ThemeColorBlend(TH_MENU_TEXT, TH_MENU_BACK, 0.85); - fdrawline(but->x1, y, but->x2, y); -} -static void ui_draw_roundbox(uiBut *but) -{ - glEnable(GL_BLEND); - - UI_ThemeColorShadeAlpha(but->themecol, but->a2, but->a2); +/* ****************************************************** */ - uiSetRoundBox(but->a1); - gl_round_box(GL_POLYGON, but->x1, but->y1, but->x2, but->y2, but->hardmin); - glDisable(GL_BLEND); -} - - -/* nothing! */ -static void ui_draw_nothing(int type, int colorid, float asp, float x1, float y1, float x2, float y2, int flag) -{ -} - -/* minimal drawing for table items */ -static void ui_draw_table(int type, int colorid, float asp, float x1, float y1, float x2, float y2, int flag) +static void ui_shadowbox(float minx, float miny, float maxx, float maxy, float shadsize, unsigned char alpha) { - int background= 1; - int alpha_offs= (flag & UI_BUT_DISABLED)?UI_DISABLED_ALPHA_OFFS:0; - - /* paper */ - if(flag & UI_SELECT) { - if(flag & UI_ACTIVE) glColor4f(0, 0, 0, 0.2f); - else glColor4f(0, 0, 0, 0.1f); - } - else { - if(flag & UI_ACTIVE) glColor4f(1.0f, 1.0f, 1.0f, 0.2f); - else background= 0; - } + glEnable(GL_BLEND); + glShadeModel(GL_SMOOTH); - if(background) { - glEnable(GL_BLEND); - glRectf(x1, y1, x2, y2); - glDisable(GL_BLEND); - } + /* right quad */ + glBegin(GL_POLYGON); + glColor4ub(0, 0, 0, alpha); + glVertex2f(maxx, miny); + glVertex2f(maxx, maxy-0.3*shadsize); + glColor4ub(0, 0, 0, 0); + glVertex2f(maxx+shadsize, maxy-0.75*shadsize); + glVertex2f(maxx+shadsize, miny); + glEnd(); - /* special type decorations */ - switch(type) { - case NUM: - case NUMABS: - if(flag & UI_SELECT) UI_ThemeColorShadeAlpha(colorid, -120, alpha_offs); - else UI_ThemeColorShadeAlpha(colorid, -90, alpha_offs); - ui_num_arrows(x1, y1, x2, y2, asp); - break; - - case TOG: - ui_checkmark_box(colorid, x1, y1, x2, y2); - - if(flag & UI_SELECT) { - UI_ThemeColorShadeAlpha(colorid, -140, alpha_offs); - ui_checkmark(x1, y1, x2, y2); - } - break; - - case ICONROW: - case ICONTEXTROW: - UI_ThemeColorShadeAlpha(colorid, -120, alpha_offs); - ui_iconrow_arrows(x1, y1, x2, y2); - break; - - case MENU: - case BLOCK: - UI_ThemeColorShadeAlpha(colorid, -120, alpha_offs); - ui_menu_arrows(x1, y1, x2, y2, asp); - break; - } -} - -/* ************** EXTERN, called from interface.c ************* */ -/* ************** MAIN CALLBACK FUNCTION ************* */ - -void ui_set_embossfunc(uiBut *but, int drawtype) -{ - // this aded for evaluating textcolor for example - but->dt= drawtype; - - // not really part of standard minimal themes, just make sure it is set - but->sliderfunc= ui_draw_slider; - - // standard builtin first: - if(but->type==LABEL || but->type==ROUNDBOX) but->embossfunc= ui_draw_nothing; - else if(ELEM(but->type, PULLDOWN, HMENU) && !(but->block->flag & UI_BLOCK_LOOP)) - but->embossfunc= ui_draw_pulldown_round; - else if(drawtype==UI_EMBOSSM) but->embossfunc= ui_draw_minimal; - else if(drawtype==UI_EMBOSSN) but->embossfunc= ui_draw_nothing; - else if(drawtype==UI_EMBOSSP) but->embossfunc= ui_draw_pulldown_item; - else if(drawtype==UI_EMBOSSR) but->embossfunc= ui_draw_round; - else if(drawtype==UI_EMBOSST) but->embossfunc= ui_draw_table; - else { - int theme= UI_GetThemeValue(TH_BUT_DRAWTYPE); - - switch(theme) { - - case TH_SHADED: - but->embossfunc= ui_draw_default; - break; - case TH_ROUNDED: - but->embossfunc= ui_draw_round; - break; - case TH_OLDSKOOL: - but->embossfunc= ui_draw_oldskool; - break; - case TH_MINIMAL: - but->embossfunc= ui_draw_minimal; - break; - case TH_ROUNDSHADED: - default: - but->embossfunc= ui_draw_roundshaded; - // but->sliderfunc= ui_default_slider; - break; - } - } + /* corner shape */ + glBegin(GL_POLYGON); + glColor4ub(0, 0, 0, alpha); + glVertex2f(maxx, miny); + glColor4ub(0, 0, 0, 0); + glVertex2f(maxx+shadsize, miny); + glVertex2f(maxx+0.7*shadsize, miny-0.7*shadsize); + glVertex2f(maxx, miny-shadsize); + glEnd(); - // note: if you want aligning, adapt the call uiBlockEndAlign in interface.c + /* bottom quad */ + glBegin(GL_POLYGON); + glColor4ub(0, 0, 0, alpha); + glVertex2f(minx+0.3*shadsize, miny); + glVertex2f(maxx, miny); + glColor4ub(0, 0, 0, 0); + glVertex2f(maxx, miny-shadsize); + glVertex2f(minx+0.5*shadsize, miny-shadsize); + glEnd(); + + glDisable(GL_BLEND); + glShadeModel(GL_FLAT); } -void ui_draw_but(ARegion *ar, uiBut *but) +void uiDrawBoxShadow(unsigned char alpha, float minx, float miny, float maxx, float maxy) { - double value; - float x1, x2, y1, y2, fac; - int type; - - if(but==NULL) return; - - if(but->block->flag & UI_BLOCK_2_50) { - extern void ui_draw_but_new(ARegion *ar, uiBut *but); // XXX - - ui_draw_but_new(ar, but); - return; - } - - switch (but->type) { - - case NUMSLI: - case HSVSLI: - type= (but->editstr)? TEX: but->type; - but->embossfunc(type, but->themecol, but->aspect, but->x1, but->y1, but->x2, but->y2, but->flag); - - x1= but->x1; - x2= but->x2; - y1= but->y1; - y2= but->y2; - - value= ui_get_but_val(but); - fac= (value-but->softmin)*(x2-x1)/(but->softmax - but->softmin); - - but->sliderfunc(but->themecol, fac, but->aspect, x1, y1, x2, y2, but->flag); - ui_draw_text_icon(but); - break; - - case SEPR: - ui_draw_sepr(but); - break; - - case COL: - ui_draw_but_COL(but); // black box with color - break; - - case HSVCUBE: - ui_draw_but_HSVCUBE(but); // box for colorpicker, three types - break; - -#ifdef INTERNATIONAL - case CHARTAB: - value= ui_get_but_val(but); - ui_draw_but_CHARTAB(but); - break; -#endif - - case LINK: - case INLINK: - ui_draw_icon(but, but->icon, 0); - break; - - case ROUNDBOX: - ui_draw_roundbox(but); - break; - - case BUT_COLORBAND: - ui_draw_but_COLORBAND(but); - break; - case BUT_NORMAL: - ui_draw_but_NORMAL(but); - break; - case BUT_CURVE: - ui_draw_but_CURVE(ar, but); - break; - - default: - type= (but->editstr)? TEX: but->type; - but->embossfunc(type, but->themecol, but->aspect, but->x1, but->y1, but->x2, but->y2, but->flag); - ui_draw_text_icon(but); + /* accumulated outline boxes to make shade not linear, is more pleasant */ + ui_shadowbox(minx, miny, maxx, maxy, 11.0, (20*alpha)>>8); + ui_shadowbox(minx, miny, maxx, maxy, 7.0, (40*alpha)>>8); + ui_shadowbox(minx, miny, maxx, maxy, 5.0, (80*alpha)>>8); - } } + void ui_dropshadow(rctf *rct, float radius, float aspect, int select) { float rad; diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 4220d9c2781..ea5eb354b54 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -51,7 +51,9 @@ #include "ED_screen.h" #include "UI_interface.h" -#include "UI_text.h" + +#include "BLF_api.h" + #include "interface_intern.h" #include "RNA_access.h" @@ -149,7 +151,7 @@ typedef struct uiAfterFunc { void *butm_func_arg; int a2; - const char *opname; + wmOperatorType *optype; int opcontext; PointerRNA *opptr; @@ -220,7 +222,7 @@ static void ui_apply_but_func(bContext *C, uiBut *but) * handling is done, i.e. menus are closed, in order to avoid conflicts * with these functions removing the buttons we are working with */ - if(but->func || but->funcN || block->handle_func || (but->type == BUTM && block->butm_func) || but->opname || but->rnaprop) { + if(but->func || but->funcN || block->handle_func || (but->type == BUTM && block->butm_func) || but->optype || but->rnaprop) { after= MEM_callocN(sizeof(uiAfterFunc), "uiAfterFunc"); after->func= but->func; @@ -240,14 +242,14 @@ static void ui_apply_but_func(bContext *C, uiBut *but) after->a2= but->a2; } - after->opname= but->opname; + after->optype= but->optype; after->opcontext= but->opcontext; after->opptr= but->opptr; after->rnapoin= but->rnapoin; after->rnaprop= but->rnaprop; - but->opname= NULL; + but->optype= NULL; but->opcontext= 0; but->opptr= NULL; @@ -278,8 +280,8 @@ static void ui_apply_but_funcs_after(bContext *C) if(after.butm_func) after.butm_func(C, after.butm_func_arg, after.a2); - if(after.opname) - WM_operator_name_call(C, after.opname, after.opcontext, after.opptr); + if(after.optype) + WM_operator_name_call(C, after.optype->idname, after.opcontext, after.opptr); if(after.opptr) { WM_operator_properties_free(after.opptr); MEM_freeN(after.opptr); @@ -309,8 +311,10 @@ static void ui_apply_but_BUTM(bContext *C, uiBut *but, uiHandleButtonData *data) static void ui_apply_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data) { - if(but->type == COL) - ui_set_but_vectorf(but, data->vec); + if(but->type == COL) { + if(but->a1 != -1) // this is not a color picker (weak!) + ui_set_but_vectorf(but, data->vec); + } else if(ELEM3(but->type, MENU, ICONROW, ICONTEXTROW)) ui_set_but_val(but, data->value); @@ -393,7 +397,7 @@ static void ui_apply_but_TEX(bContext *C, uiBut *but, uiHandleButtonData *data) if(!data->str) return; - ui_set_but_string(but, data->str); + ui_set_but_string(C, but, data->str); ui_check_but(but); /* give butfunc the original text too */ @@ -409,30 +413,17 @@ static void ui_apply_but_TEX(bContext *C, uiBut *but, uiHandleButtonData *data) static void ui_apply_but_NUM(bContext *C, uiBut *but, uiHandleButtonData *data) { if(data->str) { - /* XXX 2.50 missing python api */ -#if 0 - if(BPY_button_eval(data->str, &data->value)) { - BKE_report(CTX_reports(C), RPT_WARNING, "Invalid Python expression, check console"); - data->value = 0.0f; /* Zero out value on error */ - - if(data->str[0]) { - data->cancel= 1; /* invalidate return value if eval failed, except when string was null */ - return; - } + if(ui_set_but_string(C, but, data->str)) { + data->value= ui_get_but_val(but); + } + else { + data->cancel= 1; + return; } -#else - data->value= atof(data->str); -#endif - - if(!ui_is_but_float(but)) data->value= (int)data->value; - if(but->type==NUMABS) data->value= fabs(data->value); - - /* not that we use hard limits here */ - if(data->value<but->hardmin) data->value= but->hardmin; - if(data->value>but->hardmax) data->value= but->hardmax; } + else + ui_set_but_val(but, data->value); - ui_set_but_val(but, data->value); ui_check_but(but); ui_apply_but_func(C, but); @@ -506,7 +497,7 @@ static void ui_apply_but_CURVE(bContext *C, uiBut *but, uiHandleButtonData *data static void ui_apply_but_IDPOIN(bContext *C, uiBut *but, uiHandleButtonData *data) { - but->idpoin_func(C, data->str, but->idpoin_idpp); + ui_set_but_string(C, but, data->str); ui_check_but(but); ui_apply_but_func(C, but); data->retval= but->retval; @@ -575,6 +566,7 @@ static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleBut case TEX: ui_apply_but_TEX(C, but, data); break; + case TOGBUT: case TOG: case TOGR: case ICONTOG: @@ -661,7 +653,8 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data, if(mode=='v') { /* extract first line from clipboard in case of multi-line copies */ - char *p = WM_clipboard_text_get(0); + char *p, *pbuf= WM_clipboard_text_get(0); + p= pbuf; if(p) { int i = 0; while (*p && *p!='\r' && *p!='\n' && i<UI_MAX_DRAW_STR) { @@ -669,7 +662,7 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data, p++; } buf[i]= 0; - MEM_freeN(p); + MEM_freeN(pbuf); } } @@ -820,14 +813,17 @@ static int ui_textedit_delete_selection(uiBut *but, uiHandleButtonData *data) static void ui_textedit_set_cursor_pos(uiBut *but, uiHandleButtonData *data, short x) { + uiStyle *style= U.uistyles.first; // XXX pass on as arg char *origstr; - + + uiStyleFontSet(&style->widget); + origstr= MEM_callocN(sizeof(char)*(data->maxlen+1), "ui_textedit origstr"); BLI_strncpy(origstr, but->drawstr, data->maxlen+1); but->pos= strlen(origstr)-but->ofs; - while((but->aspect*UI_GetStringWidth(but->font, origstr+but->ofs, 0) + but->x1) > x) { + while((BLF_width(origstr+but->ofs) + but->x1) > x) { if (but->pos <= 0) break; but->pos--; origstr[but->pos+but->ofs] = 0; @@ -1139,42 +1135,9 @@ static void ui_textedit_begin(uiBut *but, uiHandleButtonData *data) } /* retrieve string */ - if(but->type == TEX) { - data->maxlen= but->hardmax; - data->str= MEM_callocN(sizeof(char)*(data->maxlen+1), "textedit str"); - - ui_get_but_string(but, data->str, data->maxlen+1); - } - else if(but->type == IDPOIN) { - ID *id; - - data->maxlen= 22; - data->str= MEM_callocN(sizeof(char)*(data->maxlen+1), "textedit str"); - - id= *but->idpoin_idpp; - if(id) BLI_strncpy(data->str, id->name+2, data->maxlen+1); - else data->str[0]= 0; - } - else { - double value; - - data->maxlen= UI_MAX_DRAW_STR; - data->str= MEM_callocN(sizeof(char)*(data->maxlen+1), "textedit str"); - - value= ui_get_but_val(but); - if(ui_is_but_float(but)) { - if(but->a2) { /* amount of digits defined */ - if(but->a2==1) sprintf(data->str, "%.1f", value); - else if(but->a2==2) sprintf(data->str, "%.2f", value); - else if(but->a2==3) sprintf(data->str, "%.3f", value); - else sprintf(data->str, "%.4f", value); - } - else sprintf(data->str, "%.3f", value); - } - else { - sprintf(data->str, "%d", (int)value); - } - } + data->maxlen= ui_get_but_string_max_length(but); + data->str= MEM_callocN(sizeof(char)*(data->maxlen+1), "textedit str"); + ui_get_but_string(but, data->str, data->maxlen+1); data->origstr= BLI_strdup(data->str); data->selextend= 0; @@ -2639,12 +2602,39 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event) if(but->flag & UI_BUT_DISABLED) return WM_UI_HANDLER_BREAK; - /* handle copy-paste */ if(data->state == BUTTON_STATE_HIGHLIGHT) { + /* handle copy-paste */ if(ELEM(event->type, CKEY, VKEY) && event->val==KM_PRESS && (event->ctrl || event->oskey)) { ui_but_copy_paste(C, but, data, (event->type == CKEY)? 'c': 'v'); return WM_UI_HANDLER_BREAK; } + /* handle keyframeing */ + else if(event->type == IKEY && event->val == KM_PRESS) { + if(event->alt) + ui_but_anim_delete_keyframe(C); + else + ui_but_anim_insert_keyframe(C); + + ED_region_tag_redraw(CTX_wm_region(C)); + + return WM_UI_HANDLER_BREAK; + } + /* handle driver adding */ + else if(event->type == DKEY && event->val == KM_PRESS) { + if(event->alt) + ui_but_anim_remove_driver(C); + else + ui_but_anim_add_driver(C); + + ED_region_tag_redraw(CTX_wm_region(C)); + + return WM_UI_HANDLER_BREAK; + } + /* handle menu */ + else if(event->type == RIGHTMOUSE && event->val == KM_PRESS) { + ui_but_anim_menu(C, but); + return WM_UI_HANDLER_BREAK; + } } /* verify if we can edit this button */ @@ -2672,6 +2662,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event) case KEYEVT: retval= ui_do_but_KEYEVT(C, but, data, event); break; + case TOGBUT: case TOG: case TOGR: case ICONTOG: @@ -2778,6 +2769,11 @@ static uiBut *ui_but_find_activated(ARegion *ar) return NULL; } +int ui_button_is_active(ARegion *ar) +{ + return (ui_but_find_activated(ar) != NULL); +} + static void ui_blocks_set_tooltips(ARegion *ar, int enable) { uiBlock *block; @@ -2845,8 +2841,13 @@ static uiBut *ui_but_find_mouse_over(ARegion *ar, int x, int y) ui_window_to_block(ar, block, &mx, &my); for(but=block->buttons.first; but; but= but->next) { - /* give precedence to already activated buttons */ + if(but->flag & UI_NO_HILITE) + continue; + if(but->type==LABEL) + continue; + if(ui_but_contains_pt(but, mx, my)) + /* give precedence to already activated buttons */ if(!butover || (!butover->active && but->active)) butover= but; } @@ -2983,7 +2984,7 @@ static void button_activate_init(bContext *C, ARegion *ar, uiBut *but, uiButtonA data= MEM_callocN(sizeof(uiHandleButtonData), "uiHandleButtonData"); data->window= CTX_wm_window(C); data->region= ar; - data->interactive= 1; + data->interactive= but->type==BUT_CURVE?0:1; // XXX temp data->state = BUTTON_STATE_INIT; /* activate button */ @@ -3789,8 +3790,8 @@ static int ui_handler_popup(bContext *C, wmEvent *event, void *userdata) if(temp.menuretval == UI_RETURN_OK) { if(temp.popup_func) temp.popup_func(C, temp.popup_arg, temp.retvalue); - if(temp.opname) - WM_operator_name_call(C, temp.opname, temp.opcontext, NULL); + if(temp.optype) + WM_operator_name_call(C, temp.optype->idname, temp.opcontext, NULL); } else if(temp.cancel_func) temp.cancel_func(temp.popup_arg); diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index f2f0582a5e2..1b23967a32d 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -813,7 +813,7 @@ static void icon_set_image(ID *id, DrawInfo *di, PreviewImage* prv_img, int mipl } else if (GS(id->name) == ID_MA) { Material* mat = (Material*)id; - if (mat->mode & MA_HALO) { + if (mat->material_type == MA_TYPE_HALO) { set_alpha( (char*) ri.rect, ri.pr_rectx, ri.pr_recty, 255); } } @@ -831,7 +831,9 @@ static void icon_set_image(ID *id, DrawInfo *di, PreviewImage* prv_img, int mipl static void icon_draw_rect(float x, float y, int w, int h, float aspect, int rw, int rh, unsigned int *rect) { - ui_rasterpos_safe(x, y, aspect); + + glRasterPos2f(x, y); + // XXX ui_rasterpos_safe(x, y, aspect); if((w<1 || h<1)) { // XXX - TODO 2.5 verify whether this case can happen diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index 7f26f4fa89e..13c9d09aff1 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -38,9 +38,49 @@ struct bContext; struct IDProperty; struct uiHandleButtonData; struct wmEvent; +struct wmOperatorType; struct wmWindow; +struct uiStyle; +struct uiWidgetColors; +struct uiLayout; + +/* ****************** general defines ************** */ + +/* visual types for drawing */ +/* for time being separated from functional types */ +typedef enum { + /* standard set */ + UI_WTYPE_LABEL, + UI_WTYPE_TOGGLE, + UI_WTYPE_OPTION, + UI_WTYPE_RADIO, + UI_WTYPE_NUMBER, + UI_WTYPE_SLIDER, + UI_WTYPE_EXEC, + + /* strings */ + UI_WTYPE_NAME, + UI_WTYPE_NAME_LINK, + UI_WTYPE_POINTER_LINK, + UI_WTYPE_FILENAME, + + /* menus */ + UI_WTYPE_MENU_RADIO, + UI_WTYPE_MENU_POINTER_LINK, + + UI_WTYPE_PULLDOWN, + UI_WTYPE_MENU_ITEM, + UI_WTYPE_MENU_BACK, + + /* specials */ + UI_WTYPE_ICON, + UI_WTYPE_SWATCH, + UI_WTYPE_RGB_PICKER, + UI_WTYPE_NORMAL + +} uiWidgetTypeEnum; + -/* general defines */ #define UI_MAX_DRAW_STR 400 #define UI_MAX_NAME_STR 64 @@ -55,12 +95,12 @@ struct wmWindow; #define UI_MOUSE_OVER 2 #define UI_ACTIVE 4 #define UI_HAS_ICON 8 +#define UI_TEXTINPUT 16 + /* warn: rest of uiBut->flag in UI_interface.h */ /* internal panel drawing defines */ #define PNL_GRID 4 -#define PNL_DIST 8 -#define PNL_SAFETY 8 #define PNL_HEADER 20 /* panel->flag */ @@ -82,9 +122,6 @@ typedef struct { short xofs, yofs; } uiIconImage; -typedef struct { - void *xl, *large, *medium, *small; -} uiFont; typedef struct uiLinkLine { /* only for draw/edit */ struct uiLinkLine *next, *prev; @@ -108,6 +145,7 @@ typedef struct { struct uiBut { struct uiBut *next, *prev; short type, pointype, bit, bitnr, retval, strwidth, ofs, pos, selsta, selend; + short alignnr; int flag; char *str; @@ -138,9 +176,6 @@ struct uiBut { char *tip, *lockstr; - int themecol; /* themecolor id */ - void *font; - BIFIconID icon; short but_align; /* aligning buttons, horiz/vertical */ short lock, win; @@ -162,7 +197,7 @@ struct uiBut { int rnaindex; /* Operator data */ - const char *opname; + struct wmOperatorType *optype; int opcontext; struct IDProperty *opproperties; struct PointerRNA *opptr; @@ -182,10 +217,13 @@ struct uiBut { struct uiBlock { uiBlock *next, *prev; - + ListBase buttons; Panel *panel; uiBlock *oldblock; + + ListBase layouts; + struct uiLayout *curlayout; char name[UI_MAX_NAME_STR]; @@ -194,6 +232,8 @@ struct uiBlock { float minx, miny, maxx, maxy; float aspect; + short alignnr; + uiButHandleFunc func; void *func_arg1; void *func_arg2; @@ -207,14 +247,10 @@ struct uiBlock { /* extra draw function for custom blocks */ void (*drawextra)(); - int themecol; /* themecolor id */ - - short font; /* indices */ int afterval, flag; - void *curfont; - short autofill, win, winq, direction, dt; - short auto_open, in_use, pad; + short direction, dt; + short auto_open, in_use; double auto_open_last; int lock; @@ -230,7 +266,6 @@ struct uiBlock { uiPopupBlockHandle *handle; // handle int tooltipdisabled; // to avoid tooltip after click - int handler; // for panels in other windows than buttonswin... just event code int active; // to keep blocks while drawing and free them afterwards }; @@ -246,6 +281,8 @@ extern int ui_translate_buttons(void); extern int ui_translate_menus(void); extern int ui_translate_tooltips(void); +void ui_fontscale(short *points, float aspect); + extern void ui_block_to_window_fl(const struct ARegion *ar, uiBlock *block, float *x, float *y); extern void ui_block_to_window(const struct ARegion *ar, uiBlock *block, int *x, int *y); extern void ui_block_to_window_rct(const struct ARegion *ar, uiBlock *block, rctf *graph, rcti *winr); @@ -258,17 +295,20 @@ extern void ui_set_but_val(uiBut *but, double value); extern void ui_set_but_hsv(uiBut *but); extern void ui_get_but_vectorf(uiBut *but, float *vec); extern void ui_set_but_vectorf(uiBut *but, float *vec); + extern void ui_get_but_string(uiBut *but, char *str, int maxlen); -extern void ui_set_but_string(uiBut *but, const char *str); +extern int ui_set_but_string(struct bContext *C, uiBut *but, const char *str); +extern int ui_get_but_string_max_length(uiBut *but); extern void ui_set_but_soft_range(uiBut *but, double value); extern void ui_check_but(uiBut *but); -extern void ui_autofill(uiBlock *block); extern int ui_is_but_float(uiBut *but); extern void ui_update_block_buts_hsv(uiBlock *block, float *hsv); extern void ui_bounds_block(uiBlock *block); +extern void ui_block_translate(uiBlock *block, int x, int y); +extern void ui_block_do_align(uiBlock *block); /* interface_regions.c */ @@ -285,7 +325,7 @@ struct uiPopupBlockHandle { void *popup_arg; /* for operator popups */ - const char *opname; + struct wmOperatorType *optype; int opcontext; ScrArea *ctx_area; ARegion *ctx_region; @@ -322,25 +362,52 @@ void autocomplete_end(struct AutoComplete *autocpl, char *autoname); /* interface_panel.c */ extern int ui_handler_panel_region(struct bContext *C, struct wmEvent *event); -extern void ui_draw_panel(struct ARegion *ar, uiBlock *block); +extern void ui_draw_aligned_panel(struct ARegion *ar, struct uiStyle *style, uiBlock *block, rcti *rect); /* interface_draw.c */ -extern void ui_set_embossfunc(uiBut *but, int drawtype); -extern void ui_draw_but(ARegion *ar, uiBut *but); -extern void ui_rasterpos_safe(float x, float y, float aspect); -extern void ui_draw_tria_icon(float x, float y, float aspect, char dir); -extern void ui_draw_anti_x(float x1, float y1, float x2, float y2); extern void ui_dropshadow(rctf *rct, float radius, float aspect, int select); extern void gl_round_box(int mode, float minx, float miny, float maxx, float maxy, float rad); extern void gl_round_box_shade(int mode, float minx, float miny, float maxx, float maxy, float rad, float shadetop, float shadedown); extern void gl_round_box_vertical_shade(int mode, float minx, float miny, float maxx, float maxy, float rad, float shadeLeft, float shadeRight); -void ui_draw_icon(uiBut *but, BIFIconID icon, int blend); -void ui_draw_text(uiBut *but, float x, float y, int sunken); +void ui_draw_but_COLORBAND(uiBut *but, struct uiWidgetColors *wcol, rcti *rect); +void ui_draw_but_NORMAL(uiBut *but, struct uiWidgetColors *wcol, rcti *rect); +void ui_draw_but_CURVE(ARegion *ar, uiBut *but, struct uiWidgetColors *wcol, rcti *rect); + /* interface_handlers.c */ extern void ui_button_active_cancel(const struct bContext *C, uiBut *but); +extern int ui_button_is_active(struct ARegion *ar); + +/* interface_widgets.c */ +void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y3); +void ui_draw_menu_back(struct uiStyle *style, uiBlock *block, rcti *rect); +extern void ui_draw_but(ARegion *ar, struct uiStyle *style, uiBut *but, rcti *rect); + /* theme color init */ +struct ThemeUI; +void ui_widget_color_init(struct ThemeUI *tui); + +/* interface_style.c */ +void uiStyleInit(void); + +/* resources.c */ +void init_userdef_do_versions(void); +void ui_theme_init_userdef(void); +void ui_resources_init(void); +void ui_resources_free(void); + +/* interface_layout.c */ +void ui_layout_add_but(struct uiLayout *layout, uiBut *but); +int ui_but_can_align(uiBut *but); + +/* interface_anim.c */ +void ui_but_anim_flag(uiBut *but, float cfra); +void ui_but_anim_insert_keyframe(struct bContext *C); +void ui_but_anim_delete_keyframe(struct bContext *C); +void ui_but_anim_add_driver(struct bContext *C); +void ui_but_anim_remove_driver(struct bContext *C); +void ui_but_anim_menu(struct bContext *C, uiBut *but); #endif diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index f6f5bae5fa5..56183bfb314 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -1,3 +1,26 @@ +/** + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Contributor(s): Blender Foundation 2009. + * + * ***** END GPL LICENSE BLOCK ***** + */ #include <limits.h> #include <math.h> @@ -9,13 +32,16 @@ #include "DNA_ID.h" #include "DNA_scene_types.h" #include "DNA_screen_types.h" +#include "DNA_userdef_types.h" #include "DNA_windowmanager_types.h" #include "BLI_listbase.h" +#include "BLI_string.h" #include "BKE_context.h" #include "BKE_global.h" #include "BKE_idprop.h" +#include "BKE_library.h" #include "BKE_screen.h" #include "BKE_utildefines.h" @@ -34,170 +60,300 @@ #include "WM_api.h" #include "WM_types.h" -/************************ Structs and Defines *************************/ +#include "interface_intern.h" -#define COLUMN_SPACE 5 -#define TEMPLATE_SPACE 5 -#define STACK_SPACE 5 -#define BUTTON_SPACE_X 5 -#define BUTTON_SPACE_Y 2 +/************************ Structs and Defines *************************/ #define RNA_NO_INDEX -1 +#define RNA_ENUM_VALUE -2 + +#define EM_SEPR_X 6 +#define EM_SEPR_Y 6 + +/* uiLayoutRoot */ + +typedef struct uiLayoutRoot { + struct uiLayoutRoot *next, *prev; + + int type; + int opcontext; + + int emw, emh; + + uiMenuHandleFunc handlefunc; + void *argv; + + uiStyle *style; + uiBlock *block; + uiLayout *layout; +} uiLayoutRoot; /* Item */ typedef enum uiItemType { - ITEM_OPERATOR, - ITEM_RNA_PROPERTY, - ITEM_MENU, - ITEM_LABEL + ITEM_BUTTON, + + ITEM_LAYOUT_ROW, + ITEM_LAYOUT_COLUMN, + ITEM_LAYOUT_COLUMN_FLOW, + ITEM_LAYOUT_ROW_FLOW, + ITEM_LAYOUT_BOX, + ITEM_LAYOUT_FREE, + ITEM_LAYOUT_SPLIT, + + ITEM_LAYOUT_ROOT +#if 0 + TEMPLATE_COLUMN_FLOW, + TEMPLATE_SPLIT, + TEMPLATE_BOX, + + TEMPLATE_HEADER, + TEMPLATE_HEADER_ID +#endif } uiItemType; -enum uiItemFlag { - ITEM_ICON, - ITEM_TEXT -}; - typedef struct uiItem { - struct uiItem *next, *prev; + void *next, *prev; uiItemType type; - int slot; - - const char *name; - int icon; } uiItem; -typedef struct uiItemRNA { +typedef struct uiButtonItem { uiItem item; + uiBut *but; +} uiButtonItem; - PointerRNA ptr; - PropertyRNA *prop; - int index; -} uiItemRNA; - -typedef struct uiItemOp { +struct uiLayout { uiItem item; - wmOperatorType *ot; - IDProperty *properties; - int context; -} uiItemOp; + uiLayoutRoot *root; + ListBase items; -typedef struct uiItemLMenu { - uiItem item; + int x, y, w, h; + int space; + int align; +}; - uiMenuCreateFunc func; -} uiItemLMenu; +typedef struct uiLayoutItemFlow { + uiLayout litem; + int number; + int totcol; +} uiLayoutItemFlow; -/* Template */ +typedef struct uiLayoutItemSplt { + uiLayout litem; + int number; + int lr; +} uiLayoutItemSplt; -typedef enum uiTemplateType { - TEMPLATE_COLUMN, - TEMPLATE_LR, - TEMPLATE_STACK, +typedef struct uiLayoutItemBx { + uiLayout litem; +} uiLayoutItemBx; - TEMPLATE_HEADER_MENUS, - TEMPLATE_HEADER_BUTTONS, - TEMPLATE_HEADER_ID -} uiTemplateType; +typedef struct uiLayoutItemRoot { + uiLayout litem; +} uiLayoutItemRoot; -typedef struct uiTemplate { - struct uiTemplate *next, *prev; - uiTemplateType type; +/************************** Item ***************************/ - ListBase items; - int color; -} uiTemplate; +static char *ui_item_name_add_colon(char *name, char namestr[UI_MAX_NAME_STR]) +{ + int len= strlen(name); -typedef struct uiTemplateStck { - uiTemplate template; - uiLayout *sublayout; -} uiTemplateStck; + if(len != 0 && len+1 < UI_MAX_NAME_STR) { + BLI_strncpy(namestr, name, UI_MAX_NAME_STR); + namestr[len]= ':'; + namestr[len+1]= '\0'; + return namestr; + } -typedef struct uiTemplateHeadID { - uiTemplate template; + return name; +} - PointerRNA ptr; - char *propname; - int flag; - uiIDPoinFunc func; -} uiTemplateHeadID; +#define UI_FIT_EXPAND 1 -/* Layout */ +static int ui_item_fit(int item, int pos, int all, int available, int spacing, int last, int flag) +{ + /* available == 0 is unlimited */ -struct uiLayout { - ListBase templates; - int opcontext; - int dir; - int x, y, w, h; -}; + if(available != 0 && all > available-spacing) { + /* contents is bigger than available space */ + if(last) + return available-pos; + else + return (item*(available-spacing))/all; + } + else { + /* contents is smaller or equal to available space */ + if(available != 0 && (flag & UI_FIT_EXPAND)) { + if(last) + return available-pos; + else + return (item*(available-spacing))/all; + } + else + return item; + } +} -void ui_layout_free(uiLayout *layout); -void ui_layout_end(const bContext *C, uiBlock *block, uiLayout *layout, int *x, int *y); +/* variable button size in which direction? */ +#define UI_ITEM_VARY_X 1 +#define UI_ITEM_VARY_Y 2 -/************************** Item ***************************/ +static int ui_layout_vary_direction(uiLayout *layout) +{ + return (layout->root->type == UI_LAYOUT_HEADER)? UI_ITEM_VARY_X: UI_ITEM_VARY_Y; +} + +/* estimated size of text + icon */ +static int ui_text_icon_width(uiLayout *layout, char *name, int icon) +{ + int variable = ui_layout_vary_direction(layout) == UI_ITEM_VARY_X; -static int ui_item_fit(int item, int all, int available) + if(icon && strcmp(name, "") == 0) + return UI_UNIT_X; /* icon only */ + else if(icon) + return (variable)? UI_GetStringWidth(name) + UI_UNIT_X: 10*UI_UNIT_X; /* icon + text */ + else + return (variable)? UI_GetStringWidth(name) + UI_UNIT_X: 10*UI_UNIT_X; /* text only */ +} + +static void ui_item_size(uiItem *item, int *r_w, int *r_h) { - if(all > available) - return (item*available)/all; + if(item->type == ITEM_BUTTON) { + uiButtonItem *bitem= (uiButtonItem*)item; + + if(r_w) *r_w= bitem->but->x2 - bitem->but->x1; + if(r_h) *r_h= bitem->but->y2 - bitem->but->y1; + } + else { + uiLayout *litem= (uiLayout*)item; + + if(r_w) *r_w= litem->w; + if(r_h) *r_h= litem->h; + } +} + +static void ui_item_offset(uiItem *item, int *r_x, int *r_y) +{ + if(item->type == ITEM_BUTTON) { + uiButtonItem *bitem= (uiButtonItem*)item; + + if(r_x) *r_x= bitem->but->x1; + if(r_y) *r_y= bitem->but->y1; + } + else { + if(r_x) *r_x= 0; + if(r_y) *r_y= 0; + } +} + +static void ui_item_position(uiItem *item, int x, int y, int w, int h) +{ + if(item->type == ITEM_BUTTON) { + uiButtonItem *bitem= (uiButtonItem*)item; + + bitem->but->x1= x; + bitem->but->y1= y; + bitem->but->x2= x+w; + bitem->but->y2= y+h; + + ui_check_but(bitem->but); /* for strlen */ + } + else { + uiLayout *litem= (uiLayout*)item; + + litem->x= x; + litem->y= y+h; + litem->w= w; + litem->h= h; + } +} + +/******************** Special RNA Items *********************/ + +static int ui_layout_local_dir(uiLayout *layout) +{ + switch(layout->item.type) { + case ITEM_LAYOUT_ROW: + case ITEM_LAYOUT_ROOT: + return UI_LAYOUT_HORIZONTAL; + case ITEM_LAYOUT_COLUMN: + case ITEM_LAYOUT_COLUMN_FLOW: + case ITEM_LAYOUT_SPLIT: + case ITEM_LAYOUT_FREE: + case ITEM_LAYOUT_BOX: + default: + return UI_LAYOUT_VERTICAL; + } +} + +static uiLayout *ui_item_local_sublayout(uiLayout *test, uiLayout *layout, int align) +{ + uiLayout *sub; + + if(ui_layout_local_dir(test) == UI_LAYOUT_HORIZONTAL) + sub= uiLayoutRow(layout, align); + else + sub= uiLayoutColumn(layout, align); - return all; + sub->space= 0; + return sub; } /* create buttons for an item with an RNA array */ -static void ui_item_array(uiBlock *block, uiItemRNA *rnaitem, int len, int x, int y, int w, int h) +static void ui_item_array(uiLayout *layout, uiBlock *block, char *name, int icon, PointerRNA *ptr, PropertyRNA *prop, int len, int x, int y, int w, int h, int expand, int slider) { + uiStyle *style= layout->root->style; + uiBut *but; PropertyType type; PropertySubType subtype; - char *name; + uiLayout *sub; int a; /* retrieve type and subtype */ - type= RNA_property_type(&rnaitem->ptr, rnaitem->prop); - subtype= RNA_property_subtype(&rnaitem->ptr, rnaitem->prop); + type= RNA_property_type(prop); + subtype= RNA_property_subtype(prop); - /* create label */ - if(rnaitem->item.name) - name= (char*)rnaitem->item.name; - else - name= (char*)RNA_property_ui_name(&rnaitem->ptr, rnaitem->prop); + sub= ui_item_local_sublayout(layout, layout, 1); + uiBlockSetCurLayout(block, sub); + /* create label */ if(strcmp(name, "") != 0) - uiDefBut(block, LABEL, 0, name, x, y + h - YIC, w, YIC, NULL, 0.0, 0.0, 0, 0, ""); + uiDefBut(block, LABEL, 0, name, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); /* create buttons */ - uiBlockBeginAlign(block); - if(type == PROP_BOOLEAN && len == 20) { /* special check for layer layout */ - int butw, buth; + int butw, buth, unit; - butw= ui_item_fit(XIC, XIC*10 + BUTTON_SPACE_X, w); - buth= MIN2(YIC, butw); + uiBlockSetCurLayout(block, uiLayoutFree(layout, 0)); - y += 2*(YIC - buth); + unit= UI_UNIT_X*0.75; + butw= unit; + buth= unit; uiBlockBeginAlign(block); for(a=0; a<5; a++) - uiDefAutoButR(block, &rnaitem->ptr, rnaitem->prop, a, "", ICON_BLANK1, x + butw*a, y+buth, butw, buth); + uiDefAutoButR(block, ptr, prop, a, "", ICON_BLANK1, x + butw*a, y+buth, butw, buth); for(a=0; a<5; a++) - uiDefAutoButR(block, &rnaitem->ptr, rnaitem->prop, a+10, "", ICON_BLANK1, x + butw*a, y, butw, buth); + uiDefAutoButR(block, ptr, prop, a+10, "", ICON_BLANK1, x + butw*a, y, butw, buth); uiBlockEndAlign(block); - x += 5*butw + BUTTON_SPACE_X; + x += 5*butw + style->buttonspacex; uiBlockBeginAlign(block); for(a=0; a<5; a++) - uiDefAutoButR(block, &rnaitem->ptr, rnaitem->prop, a+5, "", ICON_BLANK1, x + butw*a, y+buth, butw, buth); + uiDefAutoButR(block, ptr, prop, a+5, "", ICON_BLANK1, x + butw*a, y+buth, butw, buth); for(a=0; a<5; a++) - uiDefAutoButR(block, &rnaitem->ptr, rnaitem->prop, a+15, "", ICON_BLANK1, x + butw*a, y, butw, buth); + uiDefAutoButR(block, ptr, prop, a+15, "", ICON_BLANK1, x + butw*a, y, butw, buth); uiBlockEndAlign(block); } else if(subtype == PROP_MATRIX) { /* matrix layout */ int row, col; + uiBlockSetCurLayout(block, uiLayoutFree(layout, 1)); + len= ceil(sqrt(len)); h /= len; @@ -208,797 +364,1391 @@ static void ui_item_array(uiBlock *block, uiItemRNA *rnaitem, int len, int x, in col= a%len; row= a/len; - uiDefAutoButR(block, &rnaitem->ptr, rnaitem->prop, a, "", 0, x + w*col, y+(row-a-1)*YIC, w, YIC); + but= uiDefAutoButR(block, ptr, prop, a, "", 0, x + w*col, y+(row-a-1)*UI_UNIT_Y, w, UI_UNIT_Y); + if(slider && but->type==NUM) + but->type= NUMSLI; } } else if(len <= 4 && ELEM3(subtype, PROP_ROTATION, PROP_VECTOR, PROP_COLOR)) { - /* layout for known array subtypes */ - static char vectoritem[4]= {'X', 'Y', 'Z', 'W'}; - static char quatitem[4]= {'W', 'X', 'Y', 'Z'}; - static char coloritem[4]= {'R', 'G', 'B', 'A'}; - char str[3]; - - for(a=0; a<len; a++) { - if(len == 4 && subtype == PROP_ROTATION) - str[0]= quatitem[a]; - else if(subtype == PROP_VECTOR || subtype == PROP_ROTATION) - str[0]= vectoritem[a]; - else - str[0]= coloritem[a]; - - if(type == PROP_BOOLEAN) { - str[1]= '\0'; + if(subtype == PROP_COLOR) + uiDefAutoButR(block, ptr, prop, -1, "", 0, 0, 0, w, UI_UNIT_Y); + + if(subtype != PROP_COLOR || expand) { + /* layout for known array subtypes */ + static char vectoritem[4]= {'X', 'Y', 'Z', 'W'}; + static char quatitem[4]= {'W', 'X', 'Y', 'Z'}; + static char coloritem[4]= {'R', 'G', 'B', 'A'}; + char str[3]; + + for(a=0; a<len; a++) { + if(len == 4 && subtype == PROP_ROTATION) + str[0]= quatitem[a]; + else if(subtype == PROP_VECTOR || subtype == PROP_ROTATION) + str[0]= vectoritem[a]; + else + str[0]= coloritem[a]; + + if(type == PROP_BOOLEAN) { + str[1]= '\0'; + } + else { + str[1]= ':'; + str[2]= '\0'; + } + + but= uiDefAutoButR(block, ptr, prop, a, str, 0, 0, 0, w, UI_UNIT_Y); + if(slider && but->type==NUM) + but->type= NUMSLI; } - else { - str[1]= ':'; - str[2]= '\0'; - } - - uiDefAutoButR(block, &rnaitem->ptr, rnaitem->prop, a, str, 0, x, y+(len-a-1)*YIC, w, YIC); + } + else if(subtype == PROP_COLOR && len == 4) { + but= uiDefAutoButR(block, ptr, prop, 3, "A:", 0, 0, 0, w, UI_UNIT_Y); + if(slider && but->type==NUM) + but->type= NUMSLI; } } else { - /* default array layout */ - for(a=0; a<len; a++) - uiDefAutoButR(block, &rnaitem->ptr, rnaitem->prop, a, "", 0, x, y+(len-a-1)*YIC, w, YIC); + for(a=0; a<len; a++) { + but= uiDefAutoButR(block, ptr, prop, a, "", 0, 0, 0, w, UI_UNIT_Y); + if(slider && but->type==NUM) + but->type= NUMSLI; + } } - uiBlockEndAlign(block); + uiBlockSetCurLayout(block, layout); } -/* create lable + button for RNA property */ -static void ui_item_with_label(uiBlock *block, uiItemRNA *rnaitem, int x, int y, int w, int h) +static void ui_item_enum_row(uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int x, int y, int w, int h) { - char *name; - int butw; + const EnumPropertyItem *item; + int a, totitem, itemw; + const char *propname; - if(rnaitem->item.name) - name= (char*)rnaitem->item.name; - else - name= (char*)RNA_property_ui_name(&rnaitem->ptr, rnaitem->prop); - - if(strcmp(name, "") != 0) { - butw= GetButStringLength(name); - uiDefBut(block, LABEL, 0, name, x, y, butw, h, NULL, 0.0, 0.0, 0, 0, ""); + propname= RNA_property_identifier(prop); + RNA_property_enum_items(ptr, prop, &item, &totitem); - x += butw; - w -= butw; + uiBlockSetCurLayout(block, ui_item_local_sublayout(layout, layout, 1)); + for(a=0; a<totitem; a++) { + itemw= ui_text_icon_width(block->curlayout, (char*)item[a].name, 0); + uiDefButR(block, ROW, 0, NULL, 0, 0, itemw, h, ptr, propname, -1, 0, item[a].value, -1, -1, NULL); } - - uiDefAutoButR(block, &rnaitem->ptr, rnaitem->prop, rnaitem->index, "", rnaitem->item.icon, x, y, w, h); + uiBlockSetCurLayout(block, layout); } -/* create buttons for an arbitrary item */ -static void ui_item_buts(uiBlock *block, uiItem *item, int x, int y, int w, int h) +/* create label + button for RNA property */ +static void ui_item_with_label(uiLayout *layout, uiBlock *block, char *name, int icon, PointerRNA *ptr, PropertyRNA *prop, int index, int x, int y, int w, int h) { - if(item->type == ITEM_RNA_PROPERTY) { - /* RNA property */ - uiItemRNA *rnaitem= (uiItemRNA*)item; - PropertyType type; - int len; - - /* retrieve info */ - type= RNA_property_type(&rnaitem->ptr, rnaitem->prop); - len= RNA_property_array_length(&rnaitem->ptr, rnaitem->prop); - - /* array property */ - if(rnaitem->index == RNA_NO_INDEX && len > 0) - ui_item_array(block, rnaitem, len, x, y, w, h); - /* property with separate label */ - else if(type == PROP_ENUM || type == PROP_STRING || type == PROP_POINTER) - ui_item_with_label(block, rnaitem, x, y, w, h); - /* single button */ - else - uiDefAutoButR(block, &rnaitem->ptr, rnaitem->prop, rnaitem->index, (char*)item->name, item->icon, x, y, w, h); - } - else if(item->type == ITEM_OPERATOR) { - /* operator */ - uiItemOp *opitem= (uiItemOp*)item; + uiLayout *sub; + PropertySubType subtype; - if(item->icon && item->name) - uiDefIconTextButO(block, BUT, opitem->ot->idname, opitem->context, item->icon, (char*)item->name, x, y, w, h, NULL); - else if(item->icon) - uiDefIconButO(block, BUT, opitem->ot->idname, opitem->context, item->icon, x, y, w, h, NULL); - /* text only */ - else - uiDefButO(block, BUT, opitem->ot->idname, opitem->context, (char*)item->name, x, y, w, h, NULL); - } - else if(item->type == ITEM_MENU) { - /* menu */ - uiItemLMenu *menuitem= (uiItemLMenu*)item; + sub= uiLayoutRow(layout, 0); + uiBlockSetCurLayout(block, sub); - uiDefMenuBut(block, menuitem->func, NULL, (char*)item->name, x, y-2, w-3, h+4, ""); + if(strcmp(name, "") != 0) { + w= w/2; + uiDefBut(block, LABEL, 0, name, x, y, w, h, NULL, 0.0, 0.0, 0, 0, ""); } - else if(item->type == ITEM_LABEL) { - /* label */ - if(item->icon && item->name) - uiDefIconTextBut(block, LABEL, 0, item->icon, (char*)item->name, x, y, w, h, NULL, 0.0, 0.0, 0, 0, ""); - else if(item->icon) - uiDefIconBut(block, LABEL, 0, item->icon, x, y, w, h, NULL, 0.0, 0.0, 0, 0, ""); - else if((char*)item->name) - uiDefBut(block, LABEL, 0, (char*)item->name, x, y, w, h, NULL, 0.0, 0.0, 0, 0, ""); - } - else { - /* separator */ - uiDefBut(block, SEPR, 0, "", x, y, w, h, NULL, 0.0, 0.0, 0, 0, ""); - } -} + subtype= RNA_property_subtype(prop); -/* estimated size of text + icon */ -static int ui_text_icon_width(const char *name, int icon) -{ - if(icon && name && strcmp(name, "") == 0) - return XIC; /* icon only */ - else if(icon && name) - return XIC + GetButStringLength((char*)name); /* icon + text */ - else if(name) - return GetButStringLength((char*)name); /* text only */ + if(subtype == PROP_FILEPATH || subtype == PROP_DIRPATH) { + uiBlockSetCurLayout(block, uiLayoutRow(sub, 1)); + uiDefAutoButR(block, ptr, prop, index, "", icon, x, y, w-UI_UNIT_X, h); + uiDefIconBut(block, BUT, 0, ICON_FILESEL, x, y, UI_UNIT_X, h, NULL, 0.0f, 0.0f, 0.0f, 0.0f, "DUMMY file select button"); /* XXX */ + } else - return 0; + uiDefAutoButR(block, ptr, prop, index, "", icon, x, y, w, h); + + uiBlockSetCurLayout(block, layout); } -/* estimated size of an item */ -static void ui_item_size(uiItem *item, int *r_w, int *r_h) +/********************* Button Items *************************/ + +/* disabled item */ +static void ui_item_disabled(uiLayout *layout, char *name) { - const char *name; - int w, h; + uiBlock *block= layout->root->block; + uiBut *but; + int w; - if(item->type == ITEM_RNA_PROPERTY) { - /* RNA property */ - uiItemRNA *rnaitem= (uiItemRNA*)item; - PropertyType type; - PropertySubType subtype; - int len; - - name= item->name; - if(!name) - name= RNA_property_ui_name(&rnaitem->ptr, rnaitem->prop); - - w= ui_text_icon_width(name, item->icon); - h= YIC; - - /* arbitrary extended width by type */ - type= RNA_property_type(&rnaitem->ptr, rnaitem->prop); - subtype= RNA_property_subtype(&rnaitem->ptr, rnaitem->prop); - len= RNA_property_array_length(&rnaitem->ptr, rnaitem->prop); - - if(type == PROP_BOOLEAN && !item->icon) - w += XIC; - else if(type == PROP_INT || type == PROP_FLOAT) - w += 2*XIC; - else if(type == PROP_STRING) - w += 8*XIC; - - /* increase height for arrays */ - if(rnaitem->index == RNA_NO_INDEX && len > 0) { - if(name && strcmp(name, "") == 0 && item->icon == 0) - h= 0; - - if(type == PROP_BOOLEAN && len == 20) - h += 2*YIC; - else if(subtype == PROP_MATRIX) - h += ceil(sqrt(len))*YIC; - else - h += len*YIC; - } - } - else if(item->type == ITEM_OPERATOR) { - /* operator */ - uiItemOp *opitem= (uiItemOp*)item; + uiBlockSetCurLayout(block, layout); - name= item->name; - if(!name) - name= opitem->ot->name; + if(!name) + name= ""; - w= ui_text_icon_width(name, item->icon); - h= YIC; - } - else { - /* other */ - w= ui_text_icon_width(item->name, item->icon); - h= YIC; - } + w= ui_text_icon_width(layout, name, 0); - if(r_w) *r_w= w; - if(r_h) *r_h= h; + but= uiDefBut(block, LABEL, 0, (char*)name, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); + but->flag |= UI_BUT_DISABLED; + but->lock = 1; + but->lockstr = ""; } -static void ui_item_free(uiItem *item) +/* operator items */ +void uiItemFullO(uiLayout *layout, char *name, int icon, char *idname, IDProperty *properties, int context) { - if(item->type == ITEM_OPERATOR) { - uiItemOp *opitem= (uiItemOp*)item; + uiBlock *block= layout->root->block; + wmOperatorType *ot= WM_operatortype_find(idname); + uiBut *but; + int w; - if(opitem->properties) { - IDP_FreeProperty(opitem->properties); - MEM_freeN(opitem->properties); - } + if(!ot) { + ui_item_disabled(layout, idname); + return; + } + + if(!name) + name= ot->name; + if(layout->root->type == UI_LAYOUT_MENU && !icon) + icon= ICON_BLANK1; + + /* create button */ + uiBlockSetCurLayout(block, layout); + + w= ui_text_icon_width(layout, name, icon); + + if(icon && strcmp(name, "") != 0) + but= uiDefIconTextButO(block, BUT, ot->idname, context, icon, (char*)name, 0, 0, w, UI_UNIT_Y, NULL); + else if(icon) + but= uiDefIconButO(block, BUT, ot->idname, context, icon, 0, 0, w, UI_UNIT_Y, NULL); + else + but= uiDefButO(block, BUT, ot->idname, context, (char*)name, 0, 0, w, UI_UNIT_Y, NULL); + + /* assign properties */ + if(properties) { + PointerRNA *opptr= uiButGetOperatorPtrRNA(but); + opptr->data= properties; } } -/* operator items */ -void uiItemFullO(uiLayout *layout, int slot, const char *name, int icon, char *idname, IDProperty *properties, int context) +static char *ui_menu_enumpropname(char *opname, char *propname, int retval) { - uiTemplate *template= layout->templates.last; - wmOperatorType *ot= WM_operatortype_find(idname); - uiItemOp *opitem; + wmOperatorType *ot= WM_operatortype_find(opname); + PointerRNA ptr; + PropertyRNA *prop; - if(!ot) - return; + if(!ot || !ot->srna) + return ""; - opitem= MEM_callocN(sizeof(uiItemOp), "uiItemOp"); + RNA_pointer_create(NULL, ot->srna, NULL, &ptr); + prop= RNA_struct_find_property(&ptr, propname); - opitem->item.name= name; - opitem->item.icon= icon; - opitem->item.type= ITEM_OPERATOR; - opitem->item.slot= slot; + if(prop) { + const EnumPropertyItem *item; + int totitem, i; - opitem->ot= ot; - opitem->properties= properties; - opitem->context= context; + RNA_property_enum_items(&ptr, prop, &item, &totitem); - BLI_addtail(&template->items, opitem); + for (i=0; i<totitem; i++) { + if(item[i].value==retval) + return (char*)item[i].name; + } + } + + return ""; } -void uiItemEnumO(uiLayout *layout, int slot, const char *name, int icon, char *opname, char *propname, int value) +void uiItemEnumO(uiLayout *layout, char *name, int icon, char *opname, char *propname, int value) { PointerRNA ptr; WM_operator_properties_create(&ptr, opname); RNA_enum_set(&ptr, propname, value); - uiItemFullO(layout, slot, name, icon, opname, ptr.data, layout->opcontext); + if(!name) + name= ui_menu_enumpropname(opname, propname, value); + + uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext); } -void uiItemsEnumO(uiLayout *layout, int slot, char *opname, char *propname) +void uiItemsEnumO(uiLayout *layout, char *opname, char *propname) { wmOperatorType *ot= WM_operatortype_find(opname); PointerRNA ptr; PropertyRNA *prop; - if(!ot || !ot->srna) + if(!ot || !ot->srna) { + ui_item_disabled(layout, opname); return; + } RNA_pointer_create(NULL, ot->srna, NULL, &ptr); prop= RNA_struct_find_property(&ptr, propname); - if(prop && RNA_property_type(&ptr, prop) == PROP_ENUM) { + if(prop && RNA_property_type(prop) == PROP_ENUM) { const EnumPropertyItem *item; int totitem, i; RNA_property_enum_items(&ptr, prop, &item, &totitem); for(i=0; i<totitem; i++) - uiItemEnumO(layout, slot, "", 0, opname, propname, item[i].value); + uiItemEnumO(layout, NULL, 0, opname, propname, item[i].value); } } -void uiItemBooleanO(uiLayout *layout, int slot, const char *name, int icon, char *opname, char *propname, int value) +void uiItemBooleanO(uiLayout *layout, char *name, int icon, char *opname, char *propname, int value) { PointerRNA ptr; WM_operator_properties_create(&ptr, opname); RNA_boolean_set(&ptr, propname, value); - uiItemFullO(layout, slot, name, icon, opname, ptr.data, layout->opcontext); + uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext); } -void uiItemIntO(uiLayout *layout, int slot, const char *name, int icon, char *opname, char *propname, int value) +void uiItemIntO(uiLayout *layout, char *name, int icon, char *opname, char *propname, int value) { PointerRNA ptr; WM_operator_properties_create(&ptr, opname); RNA_int_set(&ptr, propname, value); - uiItemFullO(layout, slot, name, icon, opname, ptr.data, layout->opcontext); + uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext); } -void uiItemFloatO(uiLayout *layout, int slot, const char *name, int icon, char *opname, char *propname, float value) +void uiItemFloatO(uiLayout *layout, char *name, int icon, char *opname, char *propname, float value) { PointerRNA ptr; WM_operator_properties_create(&ptr, opname); RNA_float_set(&ptr, propname, value); - uiItemFullO(layout, slot, name, icon, opname, ptr.data, layout->opcontext); + uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext); } -void uiItemStringO(uiLayout *layout, int slot, const char *name, int icon, char *opname, char *propname, char *value) +void uiItemStringO(uiLayout *layout, char *name, int icon, char *opname, char *propname, char *value) { PointerRNA ptr; WM_operator_properties_create(&ptr, opname); RNA_string_set(&ptr, propname, value); - uiItemFullO(layout, slot, name, icon, opname, ptr.data, layout->opcontext); + uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext); } -void uiItemO(uiLayout *layout, int slot, const char *name, int icon, char *opname) +void uiItemO(uiLayout *layout, char *name, int icon, char *opname) { - uiItemFullO(layout, slot, name, icon, opname, NULL, layout->opcontext); + uiItemFullO(layout, name, icon, opname, NULL, layout->root->opcontext); } /* RNA property items */ -void uiItemFullR(uiLayout *layout, int slot, const char *name, int icon, PointerRNA *ptr, char *propname, int index) + +static void ui_item_rna_size(uiLayout *layout, char *name, int icon, PropertyRNA *prop, int index, int *r_w, int *r_h) +{ + PropertyType type; + PropertySubType subtype; + int len, w, h; + + w= ui_text_icon_width(layout, name, icon); + h= UI_UNIT_Y; + + /* arbitrary extended width by type */ + type= RNA_property_type(prop); + subtype= RNA_property_subtype(prop); + len= RNA_property_array_length(prop); + + if(type == PROP_STRING) + w += 10*UI_UNIT_X; + + /* increase height for arrays */ + if(index == RNA_NO_INDEX && len > 0) { + if(strcmp(name, "") == 0 && icon == 0) + h= 0; + + if(type == PROP_BOOLEAN && len == 20) + h += 2*UI_UNIT_Y; + else if(subtype == PROP_MATRIX) + h += ceil(sqrt(len))*UI_UNIT_Y; + else + h += len*UI_UNIT_Y; + } + else if(ui_layout_vary_direction(layout) == UI_ITEM_VARY_X) { + if(type == PROP_BOOLEAN && strcmp(name, "") != 0) + w += UI_UNIT_X; + } + + *r_w= w; + *r_h= h; +} + +void uiItemFullR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, PropertyRNA *prop, int index, int value, int expand, int slider) +{ + uiBlock *block= layout->root->block; + uiBut *but; + PropertyType type; + char namestr[UI_MAX_NAME_STR]; + int len, w, h; + + if(!ptr->data || !prop) + return; + + uiBlockSetCurLayout(block, layout); + + /* retrieve info */ + type= RNA_property_type(prop); + len= RNA_property_array_length(prop); + + /* set name and icon */ + if(!name) + name= (char*)RNA_property_ui_name(prop); + + if(ELEM5(type, PROP_INT, PROP_FLOAT, PROP_STRING, PROP_ENUM, PROP_POINTER)) + name= ui_item_name_add_colon(name, namestr); + if(type == PROP_BOOLEAN && len) + name= ui_item_name_add_colon(name, namestr); + + if(layout->root->type == UI_LAYOUT_MENU) { + if(type == PROP_BOOLEAN) + icon= (RNA_property_boolean_get(ptr, prop))? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT; + else if(type == PROP_ENUM && index == RNA_ENUM_VALUE) + icon= (RNA_property_enum_get(ptr, prop) == value)? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT; + } + + /* get size */ + ui_item_rna_size(layout, name, icon, prop, index, &w, &h); + + /* array property */ + if(index == RNA_NO_INDEX && len > 0) + ui_item_array(layout, block, name, icon, ptr, prop, len, 0, 0, w, h, expand, slider); + /* enum item */ + else if(type == PROP_ENUM && index == RNA_ENUM_VALUE) { + char *identifier= (char*)RNA_property_identifier(prop); + + if(icon && strcmp(name, "") != 0) + uiDefIconTextButR(block, ROW, 0, icon, name, 0, 0, w, h, ptr, identifier, -1, 0, value, -1, -1, NULL); + else if(icon) + uiDefIconButR(block, ROW, 0, icon, 0, 0, w, h, ptr, identifier, -1, 0, value, -1, -1, NULL); + else + uiDefButR(block, ROW, 0, name, 0, 0, w, h, ptr, identifier, -1, 0, value, -1, -1, NULL); + } + /* expanded enum */ + else if(type == PROP_ENUM && expand) + ui_item_enum_row(layout, block, ptr, prop, 0, 0, w, h); + /* property with separate label */ + else if(type == PROP_ENUM || type == PROP_STRING || type == PROP_POINTER) + ui_item_with_label(layout, block, name, icon, ptr, prop, index, 0, 0, w, h); + /* single button */ + else { + but= uiDefAutoButR(block, ptr, prop, index, (char*)name, icon, 0, 0, w, h); + + if(slider && but->type==NUM) + but->type= NUMSLI; + } +} + +void uiItemR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, char *propname, int expand, int slider) { - uiTemplate *template= layout->templates.last; PropertyRNA *prop; - uiItemRNA *rnaitem; - + + if(!ptr->data || !propname) + return; + prop= RNA_struct_find_property(ptr, propname); - if(!prop) + + if(!prop) { + ui_item_disabled(layout, propname); + printf("uiItemR: property not found: %s\n", propname); return; - - rnaitem= MEM_callocN(sizeof(uiItemRNA), "uiItemRNA"); + } - rnaitem->item.name= name; - rnaitem->item.icon= icon; - rnaitem->item.type= ITEM_RNA_PROPERTY; - rnaitem->item.slot= slot; + uiItemFullR(layout, name, icon, ptr, prop, RNA_NO_INDEX, 0, expand, slider); +} - rnaitem->ptr= *ptr; - rnaitem->prop= prop; - rnaitem->index= index; +void uiItemEnumR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, int value) +{ + PropertyRNA *prop; + + if(!ptr->data || !propname) + return; + + prop= RNA_struct_find_property(ptr, propname); + + if(!prop) { + ui_item_disabled(layout, propname); + printf("uiItemEnumR: property not found: %s\n", propname); + return; + } - BLI_addtail(&template->items, rnaitem); + uiItemFullR(layout, name, icon, ptr, prop, RNA_ENUM_VALUE, value, 0, 0); } -void uiItemR(uiLayout *layout, int slot, const char *name, int icon, PointerRNA *ptr, char *propname) +void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, char *propname) { - uiItemFullR(layout, slot, name, icon, ptr, propname, RNA_NO_INDEX); + PropertyRNA *prop; + + prop= RNA_struct_find_property(ptr, propname); + + if(!prop) { + ui_item_disabled(layout, propname); + return; + } + + if(RNA_property_type(prop) == PROP_ENUM) { + const EnumPropertyItem *item; + int totitem, i; + + RNA_property_enum_items(ptr, prop, &item, &totitem); + + for(i=0; i<totitem; i++) + uiItemEnumR(layout, (char*)item[i].name, 0, ptr, propname, item[i].value); + } } /* menu item */ -void uiItemMenu(uiLayout *layout, int slot, const char *name, int icon, uiMenuCreateFunc func) +static void ui_item_menutype_func(bContext *C, uiLayout *layout, void *arg_mt) { - uiTemplate *template= layout->templates.last; - uiItemLMenu *menuitem= MEM_callocN(sizeof(uiItemLMenu), "uiItemLMenu"); + MenuType *mt= (MenuType*)arg_mt; + Menu menu = {0}; + + menu.type= mt; + menu.layout= layout; + mt->draw(C, &menu); +} + +static void ui_item_menu(uiLayout *layout, char *name, int icon, uiMenuCreateFunc func, void *arg, void *argN) +{ + uiBlock *block= layout->root->block; + uiBut *but; + int w, h; + + uiBlockSetCurLayout(block, layout); + + if(layout->root->type == UI_LAYOUT_HEADER) + uiBlockSetEmboss(block, UI_EMBOSSP); + + if(!name) + name= ""; + if(layout->root->type == UI_LAYOUT_MENU && !icon) + icon= ICON_BLANK1; - menuitem->item.name= name; - menuitem->item.icon= icon; - menuitem->item.type= ITEM_MENU; - menuitem->item.slot= slot; + w= ui_text_icon_width(layout, name, icon); + h= UI_UNIT_Y; - menuitem->func= func; + if(layout->root->type == UI_LAYOUT_HEADER) /* ugly .. */ + w -= 3; - BLI_addtail(&template->items, menuitem); + if(icon) + but= uiDefIconTextMenuBut(block, func, arg, icon, (char*)name, 0, 0, w, h, ""); + else + but= uiDefMenuBut(block, func, arg, (char*)name, 0, 0, w, h, ""); + + if(argN) { /* ugly .. */ + but->poin= (char*)but; + but->func_argN= argN; + } + + if(layout->root->type == UI_LAYOUT_HEADER) + uiBlockSetEmboss(block, UI_EMBOSS); +} + +void uiItemM(uiLayout *layout, bContext *C, char *name, int icon, char *menuname) +{ + ARegion *ar= CTX_wm_region(C); + MenuType *mt; + + if(!menuname) + return; + + for(mt=ar->type->menutypes.first; mt; mt=mt->next) { + if(strcmp(menuname, mt->idname) == 0) { + if(!name) + name= mt->label; + if(layout->root->type == UI_LAYOUT_MENU && !icon) + icon= ICON_BLANK1; + ui_item_menu(layout, name, icon, ui_item_menutype_func, mt, NULL); + break; + } + } } /* label item */ -void uiItemLabel(uiLayout *layout, int slot, const char *name, int icon) +void uiItemL(uiLayout *layout, char *name, int icon) { - uiTemplate *template= layout->templates.last; - uiItem *item= MEM_callocN(sizeof(uiItem), "uiItem"); + uiBlock *block= layout->root->block; + uiBut *but; + int w; - item->name= name; - item->icon= icon; - item->type= ITEM_LABEL; - item->slot= slot; + uiBlockSetCurLayout(block, layout); - BLI_addtail(&template->items, item); + if(!name) + name= ""; + if(layout->root->type == UI_LAYOUT_MENU && !icon) + icon= ICON_BLANK1; + + w= ui_text_icon_width(layout, name, icon); + + if(icon && strcmp(name, "") != 0) + but= uiDefIconTextBut(block, LABEL, 0, icon, (char*)name, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); + else if(icon) + but= uiDefIconBut(block, LABEL, 0, icon, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); + else + but= uiDefBut(block, LABEL, 0, (char*)name, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); } -/**************************** Template ***************************/ +/* value item */ +void uiItemV(uiLayout *layout, char *name, int icon, int argval) +{ + /* label */ + uiBlock *block= layout->root->block; + float *retvalue= (block->handle)? &block->handle->retvalue: NULL; + int w; + + uiBlockSetCurLayout(block, layout); + + if(!name) + name= ""; + if(layout->root->type == UI_LAYOUT_MENU && !icon) + icon= ICON_BLANK1; + + w= ui_text_icon_width(layout, name, icon); -/* multi-column layout */ -static void ui_layout_column(uiLayout *layout, uiBlock *block, uiTemplate *template, int *x, int *y, int w, int h) + if(icon && strcmp(name, "") != 0) + uiDefIconTextButF(block, BUTM, 0, icon, (char*)name, 0, 0, w, UI_UNIT_Y, retvalue, 0.0, 0.0, 0, argval, ""); + else if(icon) + uiDefIconButF(block, BUTM, 0, icon, 0, 0, w, UI_UNIT_Y, retvalue, 0.0, 0.0, 0, argval, ""); + else + uiDefButF(block, BUTM, 0, (char*)name, 0, 0, w, UI_UNIT_Y, retvalue, 0.0, 0.0, 0, argval, ""); +} + +/* separator item */ +void uiItemS(uiLayout *layout) { - uiItem *item; - int col, totcol= 0, colx, coly, colw, miny, itemw, itemh; + uiBlock *block= layout->root->block; - /* compute number of columns */ - for(item=template->items.first; item; item=item->next) - totcol= MAX2(item->slot+1, totcol); - - if(totcol == 0) + uiBlockSetCurLayout(block, layout); + uiDefBut(block, SEPR, 0, "", 0, 0, EM_SEPR_X, EM_SEPR_Y, NULL, 0.0, 0.0, 0, 0, ""); +} + +/* level items */ +void uiItemMenuF(uiLayout *layout, char *name, int icon, uiMenuCreateFunc func) +{ + if(!func) return; - - colx= *x; - colw= (w - (totcol-1)*COLUMN_SPACE)/totcol; - miny= *y; - /* create column per column */ - for(col=0; col<totcol; col++) { - coly= *y; + ui_item_menu(layout, name, icon, func, NULL, NULL); +} - for(item=template->items.first; item; item=item->next) { - if(item->slot != col) - continue; +typedef struct MenuItemLevel { + int opcontext; + char *opname; + char *propname; + PointerRNA rnapoin; +} MenuItemLevel; - ui_item_size(item, &itemw, &itemh); +static void menu_item_enum_opname_menu(bContext *C, uiLayout *layout, void *arg) +{ + MenuItemLevel *lvl= (MenuItemLevel*)(((uiBut*)arg)->func_argN); - coly -= itemh + BUTTON_SPACE_Y; - ui_item_buts(block, item, colx, coly, colw, itemh); - } + uiLayoutContext(layout, WM_OP_EXEC_REGION_WIN); + uiItemsEnumO(layout, lvl->opname, lvl->propname); +} - colx += colw + COLUMN_SPACE; - miny= MIN2(miny, coly); +void uiItemMenuEnumO(uiLayout *layout, char *name, int icon, char *opname, char *propname) +{ + wmOperatorType *ot= WM_operatortype_find(opname); + MenuItemLevel *lvl; + + if(!ot || !ot->srna) { + ui_item_disabled(layout, opname); + return; } - *y= miny; + if(!name) + name= ot->name; + if(layout->root->type == UI_LAYOUT_MENU && !icon) + icon= ICON_BLANK1; + + lvl= MEM_callocN(sizeof(MenuItemLevel), "MenuItemLevel"); + lvl->opname= opname; + lvl->propname= propname; + lvl->opcontext= layout->root->opcontext; + + ui_item_menu(layout, name, icon, menu_item_enum_opname_menu, NULL, lvl); } -/* left-right layout, with buttons aligned on both sides */ -static void ui_layout_lr(uiLayout *layout, uiBlock *block, uiTemplate *template, int *x, int *y, int w, int h) +static void menu_item_enum_rna_menu(bContext *C, uiLayout *layout, void *arg) +{ + MenuItemLevel *lvl= (MenuItemLevel*)(((uiBut*)arg)->func_argN); + + uiLayoutContext(layout, lvl->opcontext); + uiItemsEnumR(layout, &lvl->rnapoin, lvl->propname); +} + +void uiItemMenuEnumR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname) +{ + MenuItemLevel *lvl; + PropertyRNA *prop; + + prop= RNA_struct_find_property(ptr, propname); + if(!prop) { + ui_item_disabled(layout, propname); + return; + } + + if(!name) + name= (char*)RNA_property_ui_name(prop); + if(layout->root->type == UI_LAYOUT_MENU && !icon) + icon= ICON_BLANK1; + + lvl= MEM_callocN(sizeof(MenuItemLevel), "MenuItemLevel"); + lvl->rnapoin= *ptr; + lvl->propname= propname; + lvl->opcontext= layout->root->opcontext; + + ui_item_menu(layout, name, icon, menu_item_enum_rna_menu, NULL, lvl); +} + +/**************************** Layout Items ***************************/ + +/* single-row layout */ +static void ui_litem_estimate_row(uiLayout *litem) +{ + uiItem *item; + int itemw, itemh; + + litem->w= 0; + litem->h= 0; + + for(item=litem->items.first; item; item=item->next) { + ui_item_size(item, &itemw, &itemh); + + litem->w += itemw; + litem->h= MAX2(itemh, litem->h); + + if(item->next) + litem->w += litem->space; + } +} + +static void ui_litem_layout_row(uiLayout *litem) { uiItem *item; - int totw= 0, maxh= 0, itemw, itemh, leftx, rightx; + int neww, itemw, itemh, x, y, w, tot= 0, totw= 0, extra=0, available=0; + + x= litem->x; + y= litem->y; + w= litem->w; - /* estimate total width of buttons */ - for(item=template->items.first; item; item=item->next) { + for(item=litem->items.first; item; item=item->next) { ui_item_size(item, &itemw, &itemh); totw += itemw; - maxh= MAX2(maxh, itemh); + tot++; } if(totw == 0) return; - /* create buttons starting from left and right */ - leftx= *x; - rightx= *x + w; + /* two step to enforce minimum button with .. could be better */ + for(item=litem->items.first; item; item=item->next) { + ui_item_size(item, &itemw, &itemh); + + itemw= ui_item_fit(itemw, x-litem->x, totw, w, (tot-1)*litem->space, !item->next, UI_FIT_EXPAND); + x += itemw; + + if(itemw < UI_UNIT_X) + extra += UI_UNIT_X - itemw; + else + available += itemw - UI_UNIT_X; + + if(item->next) + x += litem->space; + } + + x= litem->x; - for(item=template->items.first; item; item=item->next) { + for(item=litem->items.first; item; item=item->next) { ui_item_size(item, &itemw, &itemh); - itemw= ui_item_fit(itemw, totw+BUTTON_SPACE_X, w); - if(item->slot == UI_TSLOT_LR_LEFT) { - ui_item_buts(block, item, leftx, *y-itemh, itemw, itemh); - leftx += itemw; - } - else { - rightx -= itemw; - ui_item_buts(block, item, rightx, *y-itemh, itemw, itemh); + neww= ui_item_fit(itemw, x-litem->x, totw, w, (tot-1)*litem->space, !item->next, UI_FIT_EXPAND); + if(neww < UI_UNIT_X) { + if(item->next) + itemw= UI_UNIT_X; + else + itemw= litem->w - (x-litem->x); } + else + itemw= ui_item_fit(itemw, x-litem->x, totw, w-extra, (tot-1)*litem->space, !item->next, UI_FIT_EXPAND); + + ui_item_position(item, x, y-itemh, itemw, itemh); + x += itemw; + + if(item->next) + x += litem->space; } - *y -= maxh; + litem->w= x - litem->x; + litem->h= litem->y - y; + litem->x= x; + litem->y= y; } -/* element in a stack layout */ -static void ui_layout_stack(const bContext *C, uiLayout *layout, uiBlock *block, uiTemplate *template, int *x, int *y, int w, int h) +/* single-column layout */ +static void ui_litem_estimate_column(uiLayout *litem) { - uiTemplateStck *stack= (uiTemplateStck*)template; - int starty, startx; + uiItem *item; + int itemw, itemh; + + litem->w= 0; + litem->h= 0; - startx= *x; - starty= *y; + for(item=litem->items.first; item; item=item->next) { + ui_item_size(item, &itemw, &itemh); + + litem->w= MAX2(litem->w, itemw); + litem->h += itemh; + + if(item->next) + litem->h += litem->space; + } +} + +static void ui_litem_layout_column(uiLayout *litem) +{ + uiItem *item; + int itemh, x, y; - /* some extra padding */ - stack->sublayout->x= *x + STACK_SPACE; - stack->sublayout->w= w - 2*STACK_SPACE; - stack->sublayout->y= *y - STACK_SPACE; - stack->sublayout->h= h; + x= litem->x; + y= litem->y; - /* do layout for elements in sublayout */ - ui_layout_end(C, block, stack->sublayout, NULL, y); + for(item=litem->items.first; item; item=item->next) { + ui_item_size(item, NULL, &itemh); + + y -= itemh; + ui_item_position(item, x, y, litem->w, itemh); + + if(item->next) + y -= litem->space; + } + + litem->h= litem->y - y; + litem->x= x; + litem->y= y; +} + +/* root layout */ +static void ui_litem_estimate_root(uiLayout *litem) +{ + /* nothing to do */ +} + +static void ui_litem_layout_root(uiLayout *litem) +{ + if(litem->root->type == UI_LAYOUT_HEADER) + ui_litem_layout_row(litem); + else + ui_litem_layout_column(litem); +} + +/* box layout */ +static void ui_litem_estimate_box(uiLayout *litem) +{ + uiStyle *style= litem->root->style; + + ui_litem_estimate_column(litem); + litem->w += 2*style->boxspace; + litem->h += 2*style->boxspace; +} + +static void ui_litem_layout_box(uiLayout *litem) +{ + uiStyle *style= litem->root->style; + int w, h; + + w= litem->w; + h= litem->h; + + litem->x += style->boxspace; + litem->y -= style->boxspace; + + if(w != 0) litem->w -= 2*style->boxspace; + if(h != 0) litem->h -= 2*style->boxspace; + + ui_litem_layout_column(litem); + + litem->x -= style->boxspace; + litem->y -= style->boxspace; + + if(w != 0) litem->w += 2*style->boxspace; + if(h != 0) litem->h += 2*style->boxspace; /* roundbox around the sublayout */ - uiDefBut(block, ROUNDBOX, 0, "", startx, *y, w, starty - *y, NULL, 7.0, 0.0, 3, 20, ""); + uiDefBut(litem->root->block, ROUNDBOX, 0, "", litem->x, litem->y, litem->w, litem->h, NULL, 7.0, 0.0, 3, 20, ""); } -static void ui_layout_header_buttons(uiLayout *layout, uiBlock *block, uiTemplate *template, int *x, int *y, int w, int h) +/* multi-column layout, automatically flowing to the next */ +static void ui_litem_estimate_column_flow(uiLayout *litem) { + uiStyle *style= litem->root->style; + uiLayoutItemFlow *flow= (uiLayoutItemFlow*)litem; uiItem *item; - int itemw, itemh; - - uiBlockBeginAlign(block); + int col, x, y, emh, emy, miny, itemw, itemh, maxw=0; + int toth, totitem; + + /* compute max needed width and total height */ + toth= 0; + totitem= 0; + for(item=litem->items.first; item; item=item->next) { + ui_item_size(item, &itemw, &itemh); + maxw= MAX2(maxw, itemw); + toth += itemh; + totitem++; + } - for(item=template->items.first; item; item=item->next) { + if(flow->number <= 0) { + /* auto compute number of columns, not very good */ + if(maxw == 0) { + flow->totcol= 1; + return; + } + + flow->totcol= MAX2(litem->root->emw/maxw, 1); + flow->totcol= MIN2(flow->totcol, totitem); + } + else + flow->totcol= flow->number; + + /* compute sizes */ + x= 0; + y= 0; + emy= 0; + miny= 0; + + maxw= 0; + emh= toth/flow->totcol; + + /* create column per column */ + col= 0; + for(item=litem->items.first; item; item=item->next) { ui_item_size(item, &itemw, &itemh); - ui_item_buts(block, item, *x, *y, itemw, itemh); - *x += itemw; + + y -= itemh + style->buttonspacey; + miny= MIN2(miny, y); + emy -= itemh; + maxw= MAX2(itemw, maxw); + + /* decide to go to next one */ + if(col < flow->totcol-1 && emy <= -emh) { + x += maxw + litem->space; + maxw= 0; + y= 0; + col++; + } } - uiBlockEndAlign(block); + litem->h= litem->y - miny; } -static void ui_layout_header_menus(const bContext *C, uiLayout *layout, uiBlock *block, uiTemplate *template, int *x, int *y, int w, int h) +static void ui_litem_layout_column_flow(uiLayout *litem) { - ScrArea *sa= CTX_wm_area(C); + uiStyle *style= litem->root->style; + uiLayoutItemFlow *flow= (uiLayoutItemFlow*)litem; + uiItem *item; + int col, x, y, w, emh, emy, miny, itemw, itemh; + int toth, totitem; - *x= ED_area_header_standardbuttons(C, block, *y); + /* compute max needed width and total height */ + toth= 0; + totitem= 0; + for(item=litem->items.first; item; item=item->next) { + ui_item_size(item, &itemw, &itemh); + toth += itemh; + totitem++; + } - if((sa->flag & HEADER_NO_PULLDOWN)==0) { - uiBlockSetEmboss(block, UI_EMBOSSP); - ui_layout_header_buttons(layout, block, template, x, y, w, h); + /* compute sizes */ + x= litem->x; + y= litem->y; + emy= 0; + miny= 0; + + w= litem->w; + emh= toth/flow->totcol; + + /* create column per column */ + col= 0; + for(item=litem->items.first; item; item=item->next) { + ui_item_size(item, NULL, &itemh); + itemw= ui_item_fit(1, x-litem->x, flow->totcol, w, (flow->totcol-1)*style->columnspace, col == flow->totcol-1, UI_FIT_EXPAND); + + y -= itemh; + emy -= itemh; + ui_item_position(item, x, y, itemw, itemh); + y -= style->buttonspacey; + miny= MIN2(miny, y); + + /* decide to go to next one */ + if(col < flow->totcol-1 && emy <= -emh) { + x += itemw + style->columnspace; + y= litem->y; + col++; + } } - uiBlockSetEmboss(block, UI_EMBOSS); + litem->h= litem->y - miny; + litem->x= x; + litem->y= miny; } -static void ui_layout_header_id(const bContext *C, uiLayout *layout, uiBlock *block, uiTemplate *template, int *x, int *y, int w, int h) +/* free layout */ +static void ui_litem_estimate_free(uiLayout *litem) { - uiTemplateHeadID *idtemplate= (uiTemplateHeadID*)template; - PointerRNA idptr; + uiItem *item; + int itemx, itemy, itemw, itemh, minx, miny; + + minx= 1e6; + miny= 1e6; + litem->w= 0; + litem->h= 0; + + for(item=litem->items.first; item; item=item->next) { + ui_item_offset(item, &itemx, &itemy); + ui_item_size(item, &itemw, &itemh); - idptr= RNA_pointer_get(&idtemplate->ptr, idtemplate->propname); + minx= MIN2(minx, itemx); + miny= MIN2(miny, itemy); - *x= uiDefIDPoinButs(block, CTX_data_main(C), NULL, (ID*)idptr.data, ID_TXT, NULL, *x, *y, - idtemplate->func, UI_ID_BROWSE|UI_ID_RENAME|UI_ID_ADD_NEW|UI_ID_OPEN|UI_ID_DELETE); + litem->w= MAX2(litem->w, itemx+itemw); + litem->h= MAX2(litem->h, itemy+itemh); + } + + litem->w -= minx; + litem->h -= miny; } -void ui_template_free(uiTemplate *template) +static void ui_litem_layout_free(uiLayout *litem) { uiItem *item; + float scalex=1.0f, scaley=1.0f; + int x, y, newx, newy, itemx, itemy, itemh, itemw, minx, miny, totw, toth; + + minx= 1e6; + miny= 1e6; + totw= 0; + toth= 0; + + for(item=litem->items.first; item; item=item->next) { + ui_item_offset(item, &itemx, &itemy); + ui_item_size(item, &itemw, &itemh); + + minx= MIN2(minx, itemx); + miny= MIN2(miny, itemy); - if(template->type == TEMPLATE_STACK) { - uiTemplateStck *stack= (uiTemplateStck*)template; - ui_layout_free(stack->sublayout); + totw= MAX2(totw, itemx+itemw); + toth= MAX2(toth, itemy+itemh); } - for(item=template->items.first; item; item=item->next) - ui_item_free(item); + totw -= minx; + toth -= miny; + + if(litem->w && totw > litem->w) + scalex= (float)litem->w/(float)totw; + if(litem->h && toth > litem->h) + scaley= (float)litem->h/(float)toth; + + x= litem->x; + y= litem->y - scaley*toth; - BLI_freelistN(&template->items); + for(item=litem->items.first; item; item=item->next) { + ui_item_offset(item, &itemx, &itemy); + ui_item_size(item, &itemw, &itemh); + + if(scalex != 1.0f) { + newx= itemx*scalex; + itemw= (itemx + itemw)*scalex - newx; + itemx= newx; + } + + if(scaley != 1.0f) { + newy= itemy*scaley; + itemh= (itemy + itemh)*scaley - newy; + itemy= newy; + } + + ui_item_position(item, x+itemx-minx, y+itemy-miny, itemw, itemh); + } + + litem->w= scalex*totw; + litem->h= litem->y - y; + litem->x= x + litem->w; + litem->y= y; } -/* template create functions */ -void uiTemplateColumn(uiLayout *layout) +/* split layout */ +static void ui_litem_estimate_split(uiLayout *litem) { - uiTemplate *template; + ui_litem_estimate_row(litem); +} + +static void ui_litem_layout_split(uiLayout *litem) +{ + uiItem *item; + int itemh, x, y, w, tot=0, colw=0; - template= MEM_callocN(sizeof(uiTemplate), "uiTemplate"); - template->type= TEMPLATE_COLUMN; + x= litem->x; + y= litem->y; + w= litem->w; - BLI_addtail(&layout->templates, template); + for(item=litem->items.first; item; item=item->next) + tot++; + + if(tot == 0) + return; + + colw= (litem->w - (tot-1)*litem->space)/tot; + colw= MAX2(colw, 0); + + for(item=litem->items.first; item; item=item->next) { + ui_item_size(item, NULL, &itemh); + + ui_item_position(item, x, y-itemh, colw, itemh); + x += colw; + + if(item->next) + x += litem->space; + } + + litem->w= x - litem->x; + litem->h= litem->y - y; + litem->x= x; + litem->y= y; } +/* layout create functions */ +uiLayout *uiLayoutRow(uiLayout *layout, int align) +{ + uiLayout *litem; + + litem= MEM_callocN(sizeof(uiLayout), "uiLayoutRow"); + litem->item.type= ITEM_LAYOUT_ROW; + litem->root= layout->root; + litem->align= align; + litem->space= (align)? 0: layout->root->style->buttonspacex; + BLI_addtail(&layout->items, litem); + + uiBlockSetCurLayout(layout->root->block, litem); -void uiTemplateLeftRight(uiLayout *layout) + return litem; +} + +uiLayout *uiLayoutColumn(uiLayout *layout, int align) { - uiTemplate *template; + uiLayout *litem; - template= MEM_callocN(sizeof(uiTemplate), "uiTemplate"); - template->type= TEMPLATE_LR; + litem= MEM_callocN(sizeof(uiLayout), "uiLayoutColumn"); + litem->item.type= ITEM_LAYOUT_COLUMN; + litem->root= layout->root; + litem->align= align; + litem->space= (litem->align)? 0: layout->root->style->buttonspacey; + BLI_addtail(&layout->items, litem); - BLI_addtail(&layout->templates, template); + uiBlockSetCurLayout(layout->root->block, litem); + + return litem; } -uiLayout *uiTemplateStack(uiLayout *layout) +uiLayout *uiLayoutColumnFlow(uiLayout *layout, int number, int align) { - uiTemplateStck *stack; + uiLayoutItemFlow *flow; + + flow= MEM_callocN(sizeof(uiLayoutItemFlow), "uiLayoutItemFlow"); + flow->litem.item.type= ITEM_LAYOUT_COLUMN_FLOW; + flow->litem.root= layout->root; + flow->litem.align= align; + flow->litem.space= (flow->litem.align)? 0: layout->root->style->columnspace; + flow->number= number; + BLI_addtail(&layout->items, flow); - stack= MEM_callocN(sizeof(uiTemplateStck), "uiTemplateStck"); - stack->template.type= TEMPLATE_STACK; - stack->sublayout= uiLayoutBegin(layout->dir, 0, 0, 0, 0); - BLI_addtail(&layout->templates, stack); + uiBlockSetCurLayout(layout->root->block, &flow->litem); - return stack->sublayout; + return &flow->litem; } -void uiTemplateHeaderMenus(uiLayout *layout) +uiLayout *uiLayoutBox(uiLayout *layout) { - uiTemplate *template; + uiLayoutItemBx *box; - template= MEM_callocN(sizeof(uiTemplate), "uiTemplate"); - template->type= TEMPLATE_HEADER_MENUS; + box= MEM_callocN(sizeof(uiLayoutItemBx), "uiLayoutItemBx"); + box->litem.item.type= ITEM_LAYOUT_BOX; + box->litem.root= layout->root; + box->litem.space= layout->root->style->columnspace; + BLI_addtail(&layout->items, box); - BLI_addtail(&layout->templates, template); + uiBlockSetCurLayout(layout->root->block, &box->litem); + + return &box->litem; } -void uiTemplateHeaderButtons(uiLayout *layout) +uiLayout *uiLayoutFree(uiLayout *layout, int align) { - uiTemplate *template; + uiLayout *litem; + + litem= MEM_callocN(sizeof(uiLayout), "uiLayoutFree"); + litem->item.type= ITEM_LAYOUT_FREE; + litem->root= layout->root; + litem->align= align; + BLI_addtail(&layout->items, litem); - template= MEM_callocN(sizeof(uiTemplate), "uiTemplate"); - template->type= TEMPLATE_HEADER_BUTTONS; + uiBlockSetCurLayout(layout->root->block, litem); - BLI_addtail(&layout->templates, template); + return litem; } -void uiTemplateHeaderID(uiLayout *layout, PointerRNA *ptr, char *propname, int flag, uiIDPoinFunc func) +uiBlock *uiLayoutFreeBlock(uiLayout *layout) { - uiTemplateHeadID *idtemplate; + uiBlock *block; - idtemplate= MEM_callocN(sizeof(uiTemplateHeadID), "uiTemplateHeadID"); - idtemplate->template.type= TEMPLATE_HEADER_ID; - idtemplate->ptr= *ptr; - idtemplate->propname= propname; - idtemplate->flag= flag; - idtemplate->func= func; + block= uiLayoutBlock(layout); + uiLayoutFree(layout, 0); - BLI_addtail(&layout->templates, idtemplate); + return block; } -void uiTemplateSetColor(uiLayout *layout, int color) +uiLayout *uiLayoutSplit(uiLayout *layout) { - uiTemplate *template= layout->templates.last; + uiLayout *litem; - template->color= color; + litem= uiLayoutRow(layout, 0); + litem->item.type = ITEM_LAYOUT_SPLIT; + litem->root= layout->root; + litem->space= layout->root->style->columnspace; + + uiBlockSetCurLayout(layout->root->block, litem); + + return litem; } /********************** Layout *******************/ -static void ui_layout_templates(const bContext *C, uiBlock *block, uiLayout *layout) +static void ui_item_estimate(uiItem *item) { - uiTemplate *template; - int oldcolor= 0; + uiItem *subitem; - for(template=layout->templates.first; template; template=template->next) { - if(template->color) { - oldcolor= uiBlockGetCol(block); - uiBlockSetCol(block, template->color); - } + if(item->type != ITEM_BUTTON) { + uiLayout *litem= (uiLayout*)item; + + for(subitem=litem->items.first; subitem; subitem=subitem->next) + ui_item_estimate(subitem); - switch(template->type) { - case TEMPLATE_COLUMN: - ui_layout_column(layout, block, template, &layout->x, &layout->y, layout->w, layout->h); + if(litem->items.first == NULL) + return; + + switch(litem->item.type) { + case ITEM_LAYOUT_COLUMN: + ui_litem_estimate_column(litem); + break; + case ITEM_LAYOUT_COLUMN_FLOW: + ui_litem_estimate_column_flow(litem); break; - case TEMPLATE_LR: - ui_layout_lr(layout, block, template, &layout->x, &layout->y, layout->w, layout->h); + case ITEM_LAYOUT_ROW: + ui_litem_estimate_row(litem); break; - case TEMPLATE_STACK: - ui_layout_stack(C, layout, block, template, &layout->x, &layout->y, layout->w, layout->h); + case ITEM_LAYOUT_BOX: + ui_litem_estimate_box(litem); break; - case TEMPLATE_HEADER_MENUS: - ui_layout_header_menus(C, layout, block, template, &layout->x, &layout->y, layout->w, layout->h); + case ITEM_LAYOUT_ROOT: + ui_litem_estimate_root(litem); break; - case TEMPLATE_HEADER_BUTTONS: - ui_layout_header_buttons(layout, block, template, &layout->x, &layout->y, layout->w, layout->h); + case ITEM_LAYOUT_FREE: + ui_litem_estimate_free(litem); break; - case TEMPLATE_HEADER_ID: - ui_layout_header_id(C, layout, block, template, &layout->x, &layout->y, layout->w, layout->h); + case ITEM_LAYOUT_SPLIT: + ui_litem_estimate_split(litem); + break; + default: break; } + } +} - if(template->color) - uiBlockSetCol(block, oldcolor); +static void ui_item_align(uiLayout *litem, int nr) +{ + uiItem *item; + uiButtonItem *bitem; - if(layout->dir == UI_LAYOUT_HORIZONTAL) - layout->x += TEMPLATE_SPACE; + for(item=litem->items.first; item; item=item->next) { + if(item->type == ITEM_BUTTON) { + bitem= (uiButtonItem*)item; + if(ui_but_can_align(bitem->but)) + bitem->but->alignnr= nr; + } else - layout->y -= TEMPLATE_SPACE; + ui_item_align((uiLayout*)item, nr); + } +} + +static void ui_item_layout(uiItem *item, int align) +{ + uiItem *subitem; + + if(item->type != ITEM_BUTTON) { + uiLayout *litem= (uiLayout*)item; + + if(litem->items.first == NULL) + return; + + if(litem->align && !align) + ui_item_align(litem, ++litem->root->block->alignnr); + + switch(litem->item.type) { + case ITEM_LAYOUT_COLUMN: + ui_litem_layout_column(litem); + break; + case ITEM_LAYOUT_COLUMN_FLOW: + ui_litem_layout_column_flow(litem); + break; + case ITEM_LAYOUT_ROW: + ui_litem_layout_row(litem); + break; + case ITEM_LAYOUT_BOX: + ui_litem_layout_box(litem); + break; + case ITEM_LAYOUT_ROOT: + ui_litem_layout_root(litem); + break; + case ITEM_LAYOUT_FREE: + ui_litem_layout_free(litem); + break; + case ITEM_LAYOUT_SPLIT: + ui_litem_layout_split(litem); + break; + default: + break; + } + + for(subitem=litem->items.first; subitem; subitem=subitem->next) + ui_item_layout(subitem, litem->align || align); } } -void ui_layout_end(const bContext *C, uiBlock *block, uiLayout *layout, int *x, int *y) +static void ui_layout_items(const bContext *C, uiBlock *block, uiLayout *layout) { - ui_layout_templates(C, block, layout); + ui_item_estimate(&layout->item); + ui_item_layout(&layout->item, 0); +} + +static void ui_layout_end(const bContext *C, uiBlock *block, uiLayout *layout, int *x, int *y) +{ + if(layout->root->handlefunc) + uiBlockSetButmFunc(block, layout->root->handlefunc, layout->root->argv); + + ui_layout_items(C, block, layout); if(x) *x= layout->x; if(y) *y= layout->y; - - /* XXX temp, migration flag for drawing code */ - uiBlockSetFlag(block, UI_BLOCK_2_50); } -void ui_layout_free(uiLayout *layout) +static void ui_layout_free(uiLayout *layout) { - uiTemplate *template; + uiItem *item, *next; - for(template=layout->templates.first; template; template=template->next) - ui_template_free(template); + for(item=layout->items.first; item; item=next) { + next= item->next; + + if(item->type == ITEM_BUTTON) + MEM_freeN(item); + else + ui_layout_free((uiLayout*)item); + } - BLI_freelistN(&layout->templates); MEM_freeN(layout); } -uiLayout *uiLayoutBegin(int dir, int x, int y, int w, int h) +uiLayout *uiBlockLayout(uiBlock *block, int dir, int type, int x, int y, int size, int em, uiStyle *style) { uiLayout *layout; + uiLayoutRoot *root; + + root= MEM_callocN(sizeof(uiLayoutRoot), "uiLayoutRoot"); + root->type= type; + root->style= style; + root->block= block; + root->opcontext= WM_OP_INVOKE_REGION_WIN; layout= MEM_callocN(sizeof(uiLayout), "uiLayout"); - layout->opcontext= WM_OP_INVOKE_REGION_WIN; - layout->dir= dir; + layout->item.type= ITEM_LAYOUT_ROOT; + layout->x= x; layout->y= y; - layout->w= w; - layout->h= h; + layout->root= root; + layout->space= style->templatespace; + + if(type == UI_LAYOUT_MENU) + layout->space= 0; + if(dir == UI_LAYOUT_HORIZONTAL) { + layout->h= size; + layout->root->emh= em*UI_UNIT_Y; + } + else { + layout->w= size; + layout->root->emw= em*UI_UNIT_X; + } + + block->curlayout= layout; + root->layout= layout; + BLI_addtail(&block->layouts, root); + return layout; } -void uiLayoutContext(uiLayout *layout, int opcontext) +uiBlock *uiLayoutBlock(uiLayout *layout) { - layout->opcontext= opcontext; + return layout->root->block; } -void uiLayoutEnd(const bContext *C, uiBlock *block, uiLayout *layout, int *x, int *y) +void uiBlockSetCurLayout(uiBlock *block, uiLayout *layout) { - ui_layout_end(C, block, layout, x, y); - ui_layout_free(layout); + block->curlayout= layout; } -/* Utilities */ - -void uiRegionPanelLayout(const bContext *C, ARegion *ar, int vertical, char *context) +void ui_layout_add_but(uiLayout *layout, uiBut *but) { - uiBlock *block; - PanelType *pt; - Panel *panel; - float col[3]; - int xco, yco, x=0, y=0, w; - - // XXX this only hides cruft - - /* clear */ - UI_GetThemeColor3fv(TH_HEADER, col); - glClearColor(col[0], col[1], col[2], 0.0); - glClear(GL_COLOR_BUFFER_BIT); - - /* set view2d view matrix for scrolling (without scrollers) */ - UI_view2d_view_ortho(C, &ar->v2d); + uiButtonItem *bitem; - for(pt= ar->type->paneltypes.first; pt; pt= pt->next) { - if(context) - if(!pt->context || strcmp(context, pt->context) != 0) - continue; - - if(pt->draw && (!pt->poll || pt->poll(C))) { - w= (ar->type->minsizex)? ar->type->minsizex-22: UI_PANEL_WIDTH-22; - - block= uiBeginBlock(C, ar, pt->idname, UI_EMBOSS, UI_HELV); - if(uiNewPanel(C, ar, block, pt->name, pt->name, x, y, w, 0)==0) return; - - panel= uiPanelFromBlock(block); - panel->type= pt; - panel->layout= uiLayoutBegin(UI_LAYOUT_VERTICAL, x, y, w, 0); - - pt->draw(C, panel); - - uiLayoutEnd(C, block, panel->layout, &xco, &yco); - uiEndBlock(C, block); - - panel->layout= NULL; - uiNewPanelHeight(block, y - yco + 6); + bitem= MEM_callocN(sizeof(uiButtonItem), "uiButtonItem"); + bitem->item.type= ITEM_BUTTON; + bitem->but= but; + BLI_addtail(&layout->items, bitem); +} - if(vertical) - y += yco; - else - x += xco; - } - } +void uiLayoutContext(uiLayout *layout, int opcontext) +{ + layout->root->opcontext= opcontext; +} - uiDrawPanels(C, 1); - uiMatchPanelsView2d(ar); - - /* restore view matrix? */ - UI_view2d_view_restore(C); +void uiLayoutFunc(uiLayout *layout, uiMenuHandleFunc handlefunc, void *argv) +{ + layout->root->handlefunc= handlefunc; + layout->root->argv= argv; } -void uiRegionHeaderLayout(const bContext *C, ARegion *ar) +void uiBlockLayoutResolve(const bContext *C, uiBlock *block, int *x, int *y) { - uiBlock *block; - uiLayout *layout; - HeaderType *ht; - float col[3]; - int xco, yco; + uiLayoutRoot *root; - // XXX this only hides cruft - - /* clear */ - if(ED_screen_area_active(C)) - UI_GetThemeColor3fv(TH_HEADER, col); - else - UI_GetThemeColor3fv(TH_HEADERDESEL, col); - - glClearColor(col[0], col[1], col[2], 0.0); - glClear(GL_COLOR_BUFFER_BIT); - - /* set view2d view matrix for scrolling (without scrollers) */ - UI_view2d_view_ortho(C, &ar->v2d); + if(x) *x= 0; + if(y) *y= 0; - xco= 8; - yco= 3; + block->curlayout= NULL; - /* draw all headers types */ - for(ht= ar->type->headertypes.first; ht; ht= ht->next) { - block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS, UI_HELV); - layout= uiLayoutBegin(UI_LAYOUT_HORIZONTAL, xco, yco, 0, 24); + for(root=block->layouts.first; root; root=root->next) { + /* NULL in advance so we don't interfere when adding button */ + ui_layout_end(C, block, root->layout, x, y); + ui_layout_free(root->layout); + } - if(ht->draw) - ht->draw(C, layout); + BLI_freelistN(&block->layouts); - uiLayoutEnd(C, block, layout, &xco, &yco); - uiEndBlock(C, block); - uiDrawBlock(C, block); + /* XXX silly trick, interface_templates.c doesn't get linked + * because it's not used by other files in this module? */ + { + void ui_template_fix_linking(); + ui_template_fix_linking(); } +} - /* always as last */ - UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin); - - /* restore view matrix? */ - UI_view2d_view_restore(C); +float uiBlockAspect(uiBlock *block) +{ + return block->aspect; /* temporary */ } diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 17a58f8b616..539f18c2cd8 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -20,17 +20,12 @@ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. * All rights reserved. * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. + * Contributor(s): Blender Foundation, 2003-2009 full recode. * * ***** END GPL LICENSE BLOCK ***** */ -/* - a full doc with API notes can be found in bf-blender/blender/doc/interface_API.txt - - */ +/* a full doc with API notes can be found in bf-blender/blender/doc/interface_API.txt */ #include <math.h> #include <stdlib.h> @@ -61,16 +56,20 @@ #include "ED_screen.h" #include "UI_interface.h" -#include "UI_text.h" #include "UI_view2d.h" #include "interface_intern.h" -/* Defines */ +/*********************** defines and structs ************************/ #define ANIMATION_TIME 0.30 #define ANIMATION_INTERVAL 0.02 +#define PNL_LAST_ADDED 1 +#define PNL_ACTIVE 2 +#define PNL_WAS_ACTIVE 4 +#define PNL_ANIM_ALIGN 8 + typedef enum uiHandlePanelState { PANEL_STATE_DRAG, PANEL_STATE_DRAG_SCALE, @@ -92,15 +91,14 @@ typedef struct uiHandlePanelData { int startsizex, startsizey; } uiHandlePanelData; -static void panel_activate_state(bContext *C, Panel *pa, uiHandlePanelState state); - -/* ******************************** */ +static void panel_activate_state(const bContext *C, Panel *pa, uiHandlePanelState state); -/* temporary code to remove all sbuts stuff from panel code */ +/*********************** space specific code ************************/ +/* temporary code to remove all sbuts stuff from panel code */ static int panel_aligned(ScrArea *sa, ARegion *ar) { - if(sa->spacetype==SPACE_BUTS) { + if(sa->spacetype==SPACE_BUTS && ar->regiontype == RGN_TYPE_WINDOW) { SpaceButs *sbuts= sa->spacedata.first; return sbuts->align; } @@ -110,46 +108,63 @@ static int panel_aligned(ScrArea *sa, ARegion *ar) return 0; } -/* ************** panels ************* */ - -static void copy_panel_offset(Panel *pa, Panel *papar) +static int panels_re_align(ScrArea *sa, ARegion *ar, Panel **r_pa) { - /* with respect to sizes... papar is parent */ + Panel *pa; + int active= 0; - pa->ofsx= papar->ofsx; - pa->ofsy= papar->ofsy + papar->sizey-pa->sizey; -} + *r_pa= NULL; -/* global... but will be NULLed after each 'newPanel' call */ -static char *panel_tabbed=NULL, *group_tabbed=NULL; + if(sa->spacetype==SPACE_BUTS && ar->regiontype == RGN_TYPE_WINDOW) { + SpaceButs *sbuts= sa->spacedata.first; -void uiNewPanelTabbed(char *panelname, char *groupname) -{ - panel_tabbed= panelname; - group_tabbed= groupname; -} + if(sbuts->align) + if(sbuts->re_align || sbuts->mainbo!=sbuts->mainb || sbuts->tabo!=sbuts->tab[sbuts->mainb]) + return 1; + } + else if(ar->regiontype==RGN_TYPE_UI) + return 1; -/* another global... */ -static int pnl_control= UI_PNL_TRANSP; + /* in case panel is added or disappears */ + for(pa=ar->panels.first; pa; pa=pa->next) { + if((pa->runtime_flag & PNL_WAS_ACTIVE) && !(pa->runtime_flag & PNL_ACTIVE)) + return 1; + if(!(pa->runtime_flag & PNL_WAS_ACTIVE) && (pa->runtime_flag & PNL_ACTIVE)) + return 1; + if(pa->activedata) + active= 1; + } -void uiPanelControl(int control) -{ - pnl_control= control; + /* in case we need to do an animation (size changes) */ + for(pa=ar->panels.first; pa; pa=pa->next) { + if(pa->runtime_flag & PNL_ANIM_ALIGN) { + if(!active) + *r_pa= pa; + return 1; + } + } + + return 0; } -/* another global... */ -static int pnl_handler= 0; +/****************************** panels ******************************/ -void uiSetPanelHandler(int handler) +static void ui_panel_copy_offset(Panel *pa, Panel *papar) { - pnl_handler= handler; + /* with respect to sizes... papar is parent */ + + pa->ofsx= papar->ofsx; + pa->ofsy= papar->ofsy + papar->sizey-pa->sizey; } -/* ofsx/ofsy only used for new panel definitions */ -/* return 1 if visible (create buttons!) */ -int uiNewPanel(const bContext *C, ARegion *ar, uiBlock *block, char *panelname, char *tabname, int ofsx, int ofsy, int sizex, int sizey) +Panel *uiBeginPanel(ARegion *ar, uiBlock *block, PanelType *pt, int *open) { - Panel *pa; + uiStyle *style= U.uistyles.first; + Panel *pa, *patab, *palast, *panext; + char *panelname= pt->label; + char *tabname= pt->label; + char *hookname= NULL; + int newpanel; /* check if Panel exists, then use that one */ for(pa=ar->panels.first; pa; pa=pa->next) @@ -157,38 +172,33 @@ int uiNewPanel(const bContext *C, ARegion *ar, uiBlock *block, char *panelname, if(strncmp(pa->tabname, tabname, UI_MAX_NAME_STR)==0) break; - if(pa) { - /* scale correction */ - if(pa->control & UI_PNL_SCALE); - else { - pa->sizex= sizex; - if(pa->sizey != sizey) { - pa->ofsy+= (pa->sizey - sizey); // check uiNewPanelHeight() - pa->sizey= sizey; - } - } + newpanel= (pa == NULL); + + if(!newpanel) { + pa->type= pt; } else { /* new panel */ pa= MEM_callocN(sizeof(Panel), "new panel"); - BLI_addtail(&ar->panels, pa); - strncpy(pa->panelname, panelname, UI_MAX_NAME_STR); - strncpy(pa->tabname, tabname, UI_MAX_NAME_STR); + pa->type= pt; + BLI_strncpy(pa->panelname, panelname, UI_MAX_NAME_STR); + BLI_strncpy(pa->tabname, tabname, UI_MAX_NAME_STR); - pa->ofsx= ofsx & ~(PNL_GRID-1); - pa->ofsy= ofsy & ~(PNL_GRID-1); - pa->sizex= sizex; - pa->sizey= sizey; + pa->ofsx= 0; + pa->ofsy= style->panelouter; + pa->sizex= 0; + pa->sizey= 0; + + BLI_addtail(&ar->panels, pa); /* make new Panel tabbed? */ - if(panel_tabbed && group_tabbed) { - Panel *papar; - for(papar= ar->panels.first; papar; papar= papar->next) { - if(papar->active && papar->paneltab==NULL) { - if( strncmp(panel_tabbed, papar->panelname, UI_MAX_NAME_STR)==0) { - if( strncmp(group_tabbed, papar->tabname, UI_MAX_NAME_STR)==0) { - pa->paneltab= papar; - copy_panel_offset(pa, papar); + if(hookname) { + for(patab= ar->panels.first; patab; patab= patab->next) { + if((patab->runtime_flag & PNL_ACTIVE) && patab->paneltab==NULL) { + if(strncmp(hookname, patab->panelname, UI_MAX_NAME_STR)==0) { + if(strncmp(tabname, patab->tabname, UI_MAX_NAME_STR)==0) { + pa->paneltab= patab; + ui_panel_copy_offset(pa, patab); break; } } @@ -197,14 +207,58 @@ int uiNewPanel(const bContext *C, ARegion *ar, uiBlock *block, char *panelname, } } + /* if a new panel is added, we insert it right after the panel + * that was last added. this way new panels are inserted in the + * right place between versions */ + for(palast=ar->panels.first; palast; palast=palast->next) + if(palast->runtime_flag & PNL_LAST_ADDED) + break; + + if(newpanel) { + pa->sortorder= (palast)? palast->sortorder+1: 0; + + for(panext=ar->panels.first; panext; panext=panext->next) + if(panext != pa && panext->sortorder >= pa->sortorder) + panext->sortorder++; + } + + if(palast) + palast->runtime_flag &= ~PNL_LAST_ADDED; + + /* assign to block */ block->panel= pa; - block->handler= pnl_handler; - pa->active= 1; - pa->control= pnl_control; + pa->runtime_flag |= PNL_ACTIVE|PNL_LAST_ADDED; + + *open= 0; + + if(pa->paneltab) return pa; + if(pa->flag & PNL_CLOSED) return pa; + + *open= 1; + pa->drawname[0]= 0; /* otherwise closes panels show wrong title */ + return pa; +} + +void uiEndPanel(uiBlock *block, int width, int height) +{ + Panel *pa= block->panel; + + if(pa->sizex != width || pa->sizey != height) { + pa->runtime_flag |= PNL_ANIM_ALIGN; + pa->ofsy += pa->sizey-height; + } + + pa->sizex= width; + pa->sizey= height; +} + +#if 0 +void uiPanelToMouse(const bContext *C, Panel *pa) +{ /* global control over this feature; UI_PNL_TO_MOUSE only called for hotkey panels */ if(U.uiflag & USER_PANELPINNED); - else if(pnl_control & UI_PNL_TO_MOUSE) { + else if(pa->control & UI_PNL_TO_MOUSE) { int mx, my; mx= CTX_wm_window(C)->eventstate->x; @@ -216,51 +270,13 @@ int uiNewPanel(const bContext *C, ARegion *ar, uiBlock *block, char *panelname, if(pa->flag & PNL_CLOSED) pa->flag &= ~PNL_CLOSED; } - if(pnl_control & UI_PNL_UNSTOW) { + if(pa->control & UI_PNL_UNSTOW) { if(pa->flag & PNL_CLOSEDY) { pa->flag &= ~PNL_CLOSED; } } - - /* clear ugly globals */ - panel_tabbed= group_tabbed= NULL; - pnl_handler= 0; - pnl_control= UI_PNL_TRANSP; // back to default - - if(pa->paneltab) return 0; - if(pa->flag & PNL_CLOSED) return 0; - - /* the 'return 0' above makes this to be in end. otherwise closes panels show wrong title */ - pa->drawname[0]= 0; - - return 1; -} - -Panel *uiPanelFromBlock(uiBlock *block) -{ - return block->panel; -} - -void uiFreePanels(ListBase *lb) -{ - BLI_freelistN(lb); -} - -void uiNewPanelHeight(uiBlock *block, int sizey) -{ - if(sizey<0) sizey= 0; - - if(block->panel) { - block->panel->ofsy+= (block->panel->sizey - sizey); - block->panel->sizey= sizey; - } -} - -void uiNewPanelTitle(uiBlock *block, char *str) -{ - if(block->panel) - BLI_strncpy(block->panel->drawname, str, UI_MAX_NAME_STR); } +#endif static int panel_has_tabs(ARegion *ar, Panel *panel) { @@ -269,7 +285,7 @@ static int panel_has_tabs(ARegion *ar, Panel *panel) if(panel==NULL) return 0; while(pa) { - if(pa->active && pa->paneltab==panel) { + if((pa->runtime_flag & PNL_ACTIVE) && pa->paneltab==panel) { return 1; } pa= pa->next; @@ -277,124 +293,28 @@ static int panel_has_tabs(ARegion *ar, Panel *panel) return 0; } -static void ui_scale_panel_block(uiBlock *block) +static void ui_offset_panel_block(uiBlock *block) { + uiStyle *style= U.uistyles.first; uiBut *but; - float facx= 1.0, facy= 1.0; - int centerx= 0, topy=0, tabsy=0; - - if(block->panel==NULL) return; + int ofsy; - if(block->autofill) ui_autofill(block); - /* buttons min/max centered, offset calculated */ + /* compute bounds and offset */ ui_bounds_block(block); - if( block->maxx-block->minx > block->panel->sizex - 2*PNL_SAFETY ) { - facx= (block->panel->sizex - (2*PNL_SAFETY))/( block->maxx-block->minx ); - } - else centerx= (block->panel->sizex-( block->maxx-block->minx ) - 2*PNL_SAFETY)/2; - - // tabsy= PNL_HEADER*panel_has_tabs(block->panel); - if( (block->maxy-block->miny) > block->panel->sizey - 2*PNL_SAFETY - tabsy) { - facy= (block->panel->sizey - (2*PNL_SAFETY) - tabsy)/( block->maxy-block->miny ); - } - else topy= (block->panel->sizey- 2*PNL_SAFETY - tabsy) - ( block->maxy-block->miny ) ; - - but= block->buttons.first; - while(but) { - but->x1= PNL_SAFETY+centerx+ facx*(but->x1-block->minx); - but->y1= PNL_SAFETY+topy + facy*(but->y1-block->miny); - but->x2= PNL_SAFETY+centerx+ facx*(but->x2-block->minx); - but->y2= PNL_SAFETY+topy + facy*(but->y2-block->miny); - if(facx!=1.0) ui_check_but(but); /* for strlen */ - but= but->next; + ofsy= block->panel->sizey - style->panelspace; + + for(but= block->buttons.first; but; but=but->next) { + but->y1 += ofsy; + but->y2 += ofsy; } block->maxx= block->panel->sizex; block->maxy= block->panel->sizey; block->minx= block->miny= 0.0; - -} - -// for 'home' key -void uiSetPanelsView2d(ARegion *ar) -{ - Panel *pa; - uiBlock *block; - View2D *v2d; - float minx=10000, maxx= -10000, miny=10000, maxy= -10000; - int done=0; - - v2d= &ar->v2d; - - for(pa= ar->panels.first; pa; pa=pa->next) { - if(pa->active && pa->paneltab==NULL) { - done= 1; - if(pa->ofsx < minx) minx= pa->ofsx; - if(pa->ofsx+pa->sizex > maxx) maxx= pa->ofsx+pa->sizex; - if(pa->ofsy < miny) miny= pa->ofsy; - if(pa->ofsy+pa->sizey+PNL_HEADER > maxy) maxy= pa->ofsy+pa->sizey+PNL_HEADER; - } - } - - if(done) { - v2d->tot.xmin= minx-PNL_DIST; - v2d->tot.xmax= maxx+PNL_DIST; - v2d->tot.ymin= miny-PNL_DIST; - v2d->tot.ymax= maxy+PNL_DIST; - } - else { - v2d->tot.xmin= 0; - v2d->tot.xmax= 1280; - v2d->tot.ymin= 0; - v2d->tot.ymax= 228; - - /* no panels, but old 'loose' buttons, as in old logic editor */ - for(block= ar->uiblocks.first; block; block= block->next) { - //XXX 2.50 if(block->win==sa->win) { - if(block->minx < v2d->tot.xmin) v2d->tot.xmin= block->minx; - if(block->maxx > v2d->tot.xmax) v2d->tot.xmax= block->maxx; - if(block->miny < v2d->tot.ymin) v2d->tot.ymin= block->miny; - if(block->maxy > v2d->tot.ymax) v2d->tot.ymax= block->maxy; - //XXX } - } - } } -// make sure the panels are not outside 'tot' area -void uiMatchPanelsView2d(ARegion *ar) -{ - Panel *pa; - uiBlock *block; - View2D *v2d; - int done=0; - - v2d= &ar->v2d; - - for(pa= ar->panels.first; pa; pa=pa->next) { - if(pa->active && pa->paneltab==NULL) { - done= 1; - if(pa->ofsx < v2d->tot.xmin) v2d->tot.xmin= pa->ofsx; - if(pa->ofsx+pa->sizex > v2d->tot.xmax) - v2d->tot.xmax= pa->ofsx+pa->sizex; - if(pa->ofsy < v2d->tot.ymin) v2d->tot.ymin= pa->ofsy; - if(pa->ofsy+pa->sizey+PNL_HEADER > v2d->tot.ymax) - v2d->tot.ymax= pa->ofsy+pa->sizey+PNL_HEADER; - } - } - - if(done==0) { - /* no panels, but old 'loose' buttons, as in old logic editor */ - for(block= ar->uiblocks.first; block; block= block->next) { - //XXX 2.50 if(block->win==sa->win) { - if(block->minx < v2d->tot.xmin) v2d->tot.xmin= block->minx; - if(block->maxx > v2d->tot.xmax) v2d->tot.xmax= block->maxx; - if(block->miny < v2d->tot.ymin) v2d->tot.ymin= block->miny; - if(block->maxy > v2d->tot.ymax) v2d->tot.ymax= block->maxy; - //XXX } - } - } -} +/**************************** drawing *******************************/ /* extern used by previewrender */ void uiPanelPush(uiBlock *block) @@ -410,50 +330,27 @@ void uiPanelPop(uiBlock *block) glPopMatrix(); } -uiBlock *uiFindOpenPanelBlockName(ListBase *lb, char *name) +/* triangle 'icon' for panel header */ +void ui_draw_tria_icon(float x, float y, char dir) { - uiBlock *block; - - for(block= lb->first; block; block= block->next) { - if(block->panel && block->panel->active && block->panel->paneltab==NULL) { - if(block->panel->flag & PNL_CLOSED); - else if(strncmp(name, block->panel->panelname, UI_MAX_NAME_STR)==0) break; - } + if(dir=='h') { + ui_draw_anti_tria(x-1, y, x-1, y+11.0, x+9, y+6.25); + } + else { + ui_draw_anti_tria(x-3, y+10, x+8-1, y+10, x+4.25-2, y); } - return block; -} - -static void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y3) -{ - // we draw twice, anti polygons not widely supported... - glBegin(GL_POLYGON); - glVertex2f(x1, y1); - glVertex2f(x2, y2); - glVertex2f(x3, y3); - glEnd(); - - /* set antialias line */ - glEnable( GL_LINE_SMOOTH ); - glEnable( GL_BLEND ); - - glBegin(GL_LINE_LOOP); - glVertex2f(x1, y1); - glVertex2f(x2, y2); - glVertex2f(x3, y3); - glEnd(); - - glDisable( GL_LINE_SMOOTH ); - glDisable( GL_BLEND ); } -/* triangle 'icon' for panel header */ -void ui_draw_tria_icon(float x, float y, float aspect, char dir) +/* triangle 'icon' inside rect */ +void ui_draw_tria_rect(rctf *rect, char dir) { if(dir=='h') { - ui_draw_anti_tria( x, y+1, x, y+10.0, x+8, y+6.25); + float half= 0.5f*(rect->ymax - rect->ymin); + ui_draw_anti_tria(rect->xmin, rect->ymin, rect->xmin, rect->ymax, rect->xmax, rect->ymin+half); } else { - ui_draw_anti_tria( x-2, y+9, x+8-2, y+9, x+4.25-2, y+1); + float half= 0.5f*(rect->xmax - rect->xmin); + ui_draw_anti_tria(rect->xmin, rect->ymax, rect->xmax, rect->ymax, rect->xmin+half, rect->ymin); } } @@ -461,8 +358,8 @@ void ui_draw_anti_x(float x1, float y1, float x2, float y2) { /* set antialias line */ - glEnable( GL_LINE_SMOOTH ); - glEnable( GL_BLEND ); + glEnable(GL_LINE_SMOOTH); + glEnable(GL_BLEND); glLineWidth(2.0); @@ -471,367 +368,264 @@ void ui_draw_anti_x(float x1, float y1, float x2, float y2) glLineWidth(1.0); - glDisable( GL_LINE_SMOOTH ); - glDisable( GL_BLEND ); + glDisable(GL_LINE_SMOOTH); + glDisable(GL_BLEND); } /* x 'icon' for panel header */ static void ui_draw_x_icon(float x, float y) { - UI_ThemeColor(TH_TEXT_HI); - ui_draw_anti_x( x, y, x+9.375, y+9.375); + ui_draw_anti_x(x, y, x+9.375, y+9.375); } -#if 0 -static void ui_set_panel_pattern(char dir) +#define PNL_ICON 20 + +static void ui_draw_panel_scalewidget(rcti *rect) { - static int firsttime= 1; - static GLubyte path[4*32], patv[4*32]; - int a,b,i=0; - - if(firsttime) { - firsttime= 0; - for(a=0; a<128; a++) patv[a]= 0x33; - for(a=0; a<8; a++) { - for(b=0; b<4; b++) path[i++]= 0xff; /* 1 scanlines */ - for(b=0; b<12; b++) path[i++]= 0x0; /* 3 lines */ - } - } - glEnable(GL_POLYGON_STIPPLE); - if(dir=='h') glPolygonStipple(path); - else glPolygonStipple(patv); + float xmin, xmax, dx; + float ymin, ymax, dy; + + xmin= rect->xmax-PNL_HEADER+2; + xmax= rect->xmax-3; + ymin= rect->ymin+3; + ymax= rect->ymin+PNL_HEADER-2; + + dx= 0.5f*(xmax-xmin); + dy= 0.5f*(ymax-ymin); + + glEnable(GL_BLEND); + glColor4ub(255, 255, 255, 50); + fdrawline(xmin, ymin, xmax, ymax); + fdrawline(xmin+dx, ymin, xmax, ymax-dy); + + glColor4ub(0, 0, 0, 50); + fdrawline(xmin, ymin+1, xmax, ymax+1); + fdrawline(xmin+dx, ymin+1, xmax, ymax-dy+1); + glDisable(GL_BLEND); } -#endif -static char *ui_block_cut_str(uiBlock *block, char *str, short okwidth) +static void ui_draw_panel_dragwidget(rctf *rect) { - short width, ofs=strlen(str); - static char str1[128]; + float xmin, xmax, dx; + float ymin, ymax, dy; - if(ofs>127) return str; + xmin= rect->xmin; + xmax= rect->xmax; + ymin= rect->ymin; + ymax= rect->ymax; - width= block->aspect*UI_GetStringWidth(block->curfont, str, ui_translate_buttons()); - - if(width <= okwidth) return str; - strcpy(str1, str); + dx= 0.333f*(xmax-xmin); + dy= 0.333f*(ymax-ymin); - while(width > okwidth && ofs>0) { - ofs--; - str1[ofs]= 0; - - width= block->aspect*UI_GetStringWidth(block->curfont, str1, 0); - - if(width < 10) break; - } - return str1; + glEnable(GL_BLEND); + glColor4ub(255, 255, 255, 50); + fdrawline(xmin, ymax, xmax, ymin); + fdrawline(xmin+dx, ymax, xmax, ymin+dy); + fdrawline(xmin+2*dx, ymax, xmax, ymin+2*dy); + + glColor4ub(0, 0, 0, 50); + fdrawline(xmin, ymax+1, xmax, ymin+1); + fdrawline(xmin+dx, ymax+1, xmax, ymin+dy+1); + fdrawline(xmin+2*dx, ymax+1, xmax, ymin+2*dy+1); + glDisable(GL_BLEND); } -#define PNL_ICON 20 -#define PNL_DRAGGER 20 - - -static void ui_draw_panel_header(ARegion *ar, uiBlock *block) +static void ui_draw_aligned_panel_header(ARegion *ar, uiStyle *style, uiBlock *block, rcti *rect) { - Panel *pa, *panel= block->panel; + Panel *panel= block->panel; + Panel *pa; + rcti hrect; float width; int a, nr= 1, pnl_icons; char *activename= panel->drawname[0]?panel->drawname:panel->panelname; - char *panelname, *str; + char *panelname; /* count */ for(pa= ar->panels.first; pa; pa=pa->next) - if(pa->active) + if(pa->runtime_flag & PNL_ACTIVE) if(pa->paneltab==panel) nr++; - - pnl_icons= PNL_ICON+8; - if(panel->control & UI_PNL_CLOSE) pnl_icons+= PNL_ICON; - + + /* + 0.001f to avoid flirting with float inaccuracy */ + if(panel->control & UI_PNL_CLOSE) pnl_icons=(panel->labelofs+2*PNL_ICON+5)/block->aspect + 0.001f; + else pnl_icons= (panel->labelofs+PNL_ICON+5)/block->aspect + 0.001f; + if(nr==1) { - // full header - UI_ThemeColorShade(TH_HEADER, -30); - uiSetRoundBox(3); - uiRoundBox(block->minx, block->maxy, block->maxx, block->maxy+PNL_HEADER, 8); - + /* active tab */ /* draw text label */ - UI_ThemeColor(TH_TEXT_HI); - ui_rasterpos_safe(4.0f+block->minx+pnl_icons, block->maxy+5.0f, block->aspect); - UI_DrawString(block->curfont, activename, ui_translate_buttons()); + UI_ThemeColor(TH_TITLE); + + hrect= *rect; + hrect.xmin= rect->xmin+pnl_icons; + uiStyleFontDraw(&style->paneltitle, &hrect, activename); + return; } - // tabbed, full header brighter - //UI_ThemeColorShade(TH_HEADER, 0); - //uiSetRoundBox(3); - //uiRoundBox(block->minx, block->maxy, block->maxx, block->maxy+PNL_HEADER, 8); - a= 0; - width= (panel->sizex - 3 - pnl_icons - PNL_ICON)/nr; + width= (rect->xmax-rect->xmin - 3 - pnl_icons - PNL_ICON)/nr; for(pa= ar->panels.first; pa; pa=pa->next) { panelname= pa->drawname[0]?pa->drawname:pa->panelname; - if(a == 0) - activename= panelname; - if(pa->active==0); - else if(pa==panel) { + if((pa->runtime_flag & PNL_ACTIVE) && (pa==panel || pa->paneltab==panel)) { + float col[3]; + + UI_GetThemeColor3fv(TH_TITLE, col); + /* active tab */ - - /* draw the active tab */ - uiSetRoundBox(3); - UI_ThemeColorShade(TH_HEADER, -3); - uiRoundBox(2+pnl_icons+a*width, panel->sizey-1, pnl_icons+(a+1)*width, panel->sizey+PNL_HEADER-3, 8); - - /* draw the active text label */ - UI_ThemeColor(TH_TEXT); - ui_rasterpos_safe(16+pnl_icons+a*width, panel->sizey+4, block->aspect); - if(panelname != activename && strstr(panelname, activename) == panelname) - str= ui_block_cut_str(block, panelname+strlen(activename), (short)(width-10)); + if(pa==panel) + glColor4f(col[0], col[1], col[2], 1.0f); else - str= ui_block_cut_str(block, panelname, (short)(width-10)); - UI_DrawString(block->curfont, str, ui_translate_buttons()); - - a++; - } - else if(pa->paneltab==panel) { - /* draw an inactive tab */ - uiSetRoundBox(3); - UI_ThemeColorShade(TH_HEADER, -60); - uiRoundBox(2+pnl_icons+a*width, panel->sizey, pnl_icons+(a+1)*width, panel->sizey+PNL_HEADER-3, 8); + glColor4f(col[0], col[1], col[2], 0.5f); + + hrect= *rect; + hrect.xmin= rect->xmin+pnl_icons + a*width; + hrect.xmax= hrect.xmin + width; + uiStyleFontDraw(&style->paneltitle, &hrect, panelname); - /* draw an inactive tab label */ - UI_ThemeColorShade(TH_TEXT_HI, -40); - ui_rasterpos_safe(16+pnl_icons+a*width, panel->sizey+4, block->aspect); - if(panelname != activename && strstr(panelname, activename) == panelname) - str= ui_block_cut_str(block, panelname+strlen(activename), (short)(width-10)); - else - str= ui_block_cut_str(block, panelname, (short)(width-10)); - UI_DrawString(block->curfont, str, ui_translate_buttons()); - a++; } } - - // dragger - /* - uiSetRoundBox(15); - UI_ThemeColorShade(TH_HEADER, -70); - uiRoundBox(panel->sizex-PNL_ICON+5, panel->sizey+5, panel->sizex-5, panel->sizey+PNL_HEADER-5, 5); - */ - } -static void ui_draw_panel_scalewidget(uiBlock *block) +static void rectf_scale(rctf *rect, float scale) { - float xmin, xmax, dx; - float ymin, ymax, dy; - - xmin= block->maxx-PNL_HEADER+2; - xmax= block->maxx-3; - ymin= block->miny+3; - ymax= block->miny+PNL_HEADER-2; - - dx= 0.5f*(xmax-xmin); - dy= 0.5f*(ymax-ymin); - - glEnable(GL_BLEND); - glColor4ub(255, 255, 255, 50); - fdrawline(xmin, ymin, xmax, ymax); - fdrawline(xmin+dx, ymin, xmax, ymax-dy); - - glColor4ub(0, 0, 0, 50); - fdrawline(xmin, ymin+block->aspect, xmax, ymax+block->aspect); - fdrawline(xmin+dx, ymin+block->aspect, xmax, ymax-dy+block->aspect); - glDisable(GL_BLEND); + float centx= 0.5f*(rect->xmin+rect->xmax); + float centy= 0.5f*(rect->ymin+rect->ymax); + float sizex= 0.5f*scale*(rect->xmax - rect->xmin); + float sizey= 0.5f*scale*(rect->ymax - rect->ymin); + + rect->xmin= centx - sizex; + rect->xmax= centx + sizex; + rect->ymin= centy - sizey; + rect->ymax= centy + sizey; } -void ui_draw_panel(ARegion *ar, uiBlock *block) +/* panel integrated in buttonswindow, tool/property lists etc */ +void ui_draw_aligned_panel(ARegion *ar, uiStyle *style, uiBlock *block, rcti *rect) { - Panel *panel= block->panel; + Panel *panel= block->panel, *prev; + rcti headrect; + rctf itemrect; int ofsx; - char *panelname= panel->drawname[0]?panel->drawname:panel->panelname; if(panel->paneltab) return; + /* calculate header rect */ + /* + 0.001f to prevent flicker due to float inaccuracy */ + headrect= *rect; + headrect.ymin= headrect.ymax; + headrect.ymax= headrect.ymin + floor(PNL_HEADER/block->aspect + 0.001f); + + /* divider only when there's a previous panel */ + prev= panel->prev; + while(prev) { + if(prev->runtime_flag & PNL_ACTIVE) break; + prev= prev->prev; + } + + if(panel->sortorder != 0) { + float minx= rect->xmin+5.0f/block->aspect; + float maxx= rect->xmax-5.0f/block->aspect; + float y= headrect.ymax; + + glEnable(GL_BLEND); + glColor4f(0.0f, 0.0f, 0.0f, 0.5f); + fdrawline(minx, y+1, maxx, y+1); + glColor4f(1.0f, 1.0f, 1.0f, 0.25f); + fdrawline(minx, y, maxx, y); + glDisable(GL_BLEND); + } + + /* title */ + if(!(panel->flag & PNL_CLOSEDX)) { + ui_draw_aligned_panel_header(ar, style, block, &headrect); + + /* itemrect smaller */ + itemrect.xmax= headrect.xmax - 5.0f/block->aspect; + itemrect.xmin= itemrect.xmax - (headrect.ymax-headrect.ymin); + itemrect.ymin= headrect.ymin; + itemrect.ymax= headrect.ymax; + rectf_scale(&itemrect, 0.8f); + ui_draw_panel_dragwidget(&itemrect); + } + /* if the panel is minimized vertically: - * (------) - */ + * (------) + */ if(panel->flag & PNL_CLOSEDY) { - /* draw a little rounded box, the size of the header */ - uiSetRoundBox(15); - UI_ThemeColorShade(TH_HEADER, -30); - uiRoundBox(block->minx, block->maxy, block->maxx, block->maxy+PNL_HEADER, 8); - /* title */ - ofsx= PNL_ICON+8; - if(panel->control & UI_PNL_CLOSE) ofsx+= PNL_ICON; - UI_ThemeColor(TH_TEXT_HI); - ui_rasterpos_safe(4+block->minx+ofsx, block->maxy+5, block->aspect); - UI_DrawString(block->curfont, panelname, ui_translate_buttons()); - - /* border */ - if(panel->flag & PNL_SELECT) { - UI_ThemeColorShade(TH_HEADER, -120); - uiRoundRect(block->minx, block->maxy, block->maxx, block->maxy+PNL_HEADER, 8); - } + /* if it's being overlapped by a panel being dragged */ if(panel->flag & PNL_OVERLAP) { UI_ThemeColor(TH_TEXT_HI); - uiRoundRect(block->minx, block->maxy, block->maxx, block->maxy+PNL_HEADER, 8); + uiRoundRect(rect->xmin, rect->ymax, rect->xmax, rect->ymax+PNL_HEADER, 8); } - + } - /* if the panel is minimized horizontally: - * /-\ - * | - * | - * | - * \_/ - */ else if(panel->flag & PNL_CLOSEDX) { - char str[4]; - int a, end, ofs; - /* draw a little rounded box, the size of the header, rotated 90 deg */ - uiSetRoundBox(15); - UI_ThemeColorShade(TH_HEADER, -30); - uiRoundBox(block->minx, block->miny, block->minx+PNL_HEADER, block->maxy+PNL_HEADER, 8); - - /* title, only the initial character for now */ - UI_ThemeColor(TH_TEXT_HI); - str[1]= 0; - end= strlen(panelname); - ofs= 20; - for(a=0; a<end; a++) { - str[0]= panelname[a]; - if( isupper(str[0]) ) { - ui_rasterpos_safe(block->minx+5, block->maxy-ofs, block->aspect); - UI_DrawString(block->curfont, str, 0); - ofs+= 15; - } - } - - /* border */ - if(panel->flag & PNL_SELECT) { - UI_ThemeColorShade(TH_HEADER, -120); - uiRoundRect(block->minx, block->miny, block->minx+PNL_HEADER, block->maxy+PNL_HEADER, 8); - } - if(panel->flag & PNL_OVERLAP) { - UI_ThemeColor(TH_TEXT_HI); - uiRoundRect(block->minx, block->miny, block->minx+PNL_HEADER, block->maxy+PNL_HEADER, 8); - } - } /* an open panel */ else { - /* all panels now... */ - if(panel->control & UI_PNL_SOLID) { - UI_ThemeColorShade(TH_HEADER, -30); - - uiSetRoundBox(3); - uiRoundBox(block->minx, block->maxy, block->maxx, block->maxy+PNL_HEADER, 8); - - glEnable(GL_BLEND); - UI_ThemeColor4(TH_PANEL); - - uiSetRoundBox(12); - /* bad code... but its late :) */ - if(strcmp(block->name, "image_panel_preview")==0) - uiRoundRect(block->minx, block->miny, block->maxx, block->maxy, 8); - else - uiRoundBox(block->minx, block->miny, block->maxx, block->maxy, 8); - - // glRectf(block->minx, block->miny, block->maxx, block->maxy); - - /* shadow */ - /* - glColor4ub(0, 0, 0, 40); - - fdrawline(block->minx+2, block->miny-1, block->maxx+1, block->miny-1); - fdrawline(block->maxx+1, block->miny-1, block->maxx+1, block->maxy+7); - - glColor4ub(0, 0, 0, 10); - - fdrawline(block->minx+3, block->miny-2, block->maxx+2, block->miny-2); - fdrawline(block->maxx+2, block->miny-2, block->maxx+2, block->maxy+6); - - */ - - glDisable(GL_BLEND); - } - /* floating panel */ - else if(panel->control & UI_PNL_TRANSP) { - UI_ThemeColorShade(TH_HEADER, -30); - uiSetRoundBox(3); - uiRoundBox(block->minx, block->maxy, block->maxx, block->maxy+PNL_HEADER, 8); - - glEnable(GL_BLEND); - UI_ThemeColor4(TH_PANEL); - glRectf(block->minx, block->miny, block->maxx, block->maxy); - - glDisable(GL_BLEND); - } - /* draw the title, tabs, etc in the header */ - ui_draw_panel_header(ar, block); - /* in some occasions, draw a border */ if(panel->flag & PNL_SELECT) { if(panel->control & UI_PNL_SOLID) uiSetRoundBox(15); else uiSetRoundBox(3); - UI_ThemeColorShade(TH_HEADER, -120); - uiRoundRect(block->minx, block->miny, block->maxx, block->maxy+PNL_HEADER, 8); + UI_ThemeColorShade(TH_BACK, -120); + uiRoundRect(rect->xmin, rect->ymin, rect->xmax, headrect.ymax+1, 8); } if(panel->flag & PNL_OVERLAP) { if(panel->control & UI_PNL_SOLID) uiSetRoundBox(15); else uiSetRoundBox(3); UI_ThemeColor(TH_TEXT_HI); - uiRoundRect(block->minx, block->miny, block->maxx, block->maxy+PNL_HEADER, 8); + uiRoundRect(rect->xmin, rect->ymin, rect->xmax, headrect.ymax+1, 8); } if(panel->control & UI_PNL_SCALE) - ui_draw_panel_scalewidget(block); - - /* and a soft shadow-line for now */ - /* - glEnable( GL_BLEND ); - glColor4ub(0, 0, 0, 50); - fdrawline(block->maxx, block->miny, block->maxx, block->maxy+PNL_HEADER/2); - fdrawline(block->minx, block->miny, block->maxx, block->miny); - glDisable(GL_BLEND); - */ - + ui_draw_panel_scalewidget(rect); } /* draw optional close icon */ ofsx= 6; if(panel->control & UI_PNL_CLOSE) { - - ui_draw_x_icon(block->minx+2+ofsx, block->maxy+5); + + UI_ThemeColor(TH_TEXT); + ui_draw_x_icon(rect->xmin+2+ofsx, rect->ymax+2); ofsx= 22; } - + /* draw collapse icon */ + UI_ThemeColor(TH_TEXT); + + /* itemrect smaller */ + itemrect.xmin= headrect.xmin + 5.0f/block->aspect; + itemrect.xmax= itemrect.xmin + (headrect.ymax-headrect.ymin); + itemrect.ymin= headrect.ymin; + itemrect.ymax= headrect.ymax; - UI_ThemeColor(TH_TEXT_HI); + rectf_scale(&itemrect, 0.5f); if(panel->flag & PNL_CLOSEDY) - ui_draw_tria_icon(block->minx+6+ofsx, block->maxy+5, block->aspect, 'h'); + ui_draw_tria_rect(&itemrect, 'h'); else if(panel->flag & PNL_CLOSEDX) - ui_draw_tria_icon(block->minx+7, block->maxy+2, block->aspect, 'h'); + ui_draw_tria_rect(&itemrect, 'h'); else - ui_draw_tria_icon(block->minx+6+ofsx, block->maxy+5, block->aspect, 'v'); + ui_draw_tria_rect(&itemrect, 'v'); + + } -/* ------------ panel alignment ---------------- */ - +/************************** panel alignment *************************/ /* this function is needed because uiBlock and Panel itself dont change sizey or location when closed */ @@ -839,6 +633,7 @@ static int get_panel_real_ofsy(Panel *pa) { if(pa->flag & PNL_CLOSEDY) return pa->ofsy+pa->sizey; else if(pa->paneltab && (pa->paneltab->flag & PNL_CLOSEDY)) return pa->ofsy+pa->sizey; + else if(pa->paneltab) return pa->paneltab->ofsy; else return pa->ofsy; } @@ -849,13 +644,12 @@ static int get_panel_real_ofsx(Panel *pa) else return pa->ofsx+pa->sizex; } - typedef struct PanelSort { Panel *pa, *orig; } PanelSort; /* note about sorting; - the sortcounter has a lower value for new panels being added. + the sortorder has a lower value for new panels being added. however, that only works to insert a single panel, when more new panels get added the coordinates of existing panels and the previously stored to-be-insterted panels do not match for sorting */ @@ -864,10 +658,10 @@ static int find_leftmost_panel(const void *a1, const void *a2) { const PanelSort *ps1=a1, *ps2=a2; - if( ps1->pa->ofsx > ps2->pa->ofsx) return 1; - else if( ps1->pa->ofsx < ps2->pa->ofsx) return -1; - else if( ps1->pa->sortcounter > ps2->pa->sortcounter) return 1; - else if( ps1->pa->sortcounter < ps2->pa->sortcounter) return -1; + if(ps1->pa->ofsx > ps2->pa->ofsx) return 1; + else if(ps1->pa->ofsx < ps2->pa->ofsx) return -1; + else if(ps1->pa->sortorder > ps2->pa->sortorder) return 1; + else if(ps1->pa->sortorder < ps2->pa->sortorder) return -1; return 0; } @@ -877,78 +671,92 @@ static int find_highest_panel(const void *a1, const void *a2) { const PanelSort *ps1=a1, *ps2=a2; - if( ps1->pa->ofsy < ps2->pa->ofsy) return 1; - else if( ps1->pa->ofsy > ps2->pa->ofsy) return -1; - else if( ps1->pa->sortcounter > ps2->pa->sortcounter) return 1; - else if( ps1->pa->sortcounter < ps2->pa->sortcounter) return -1; + if(ps1->pa->ofsy+ps1->pa->sizey < ps2->pa->ofsy+ps2->pa->sizey) return 1; + else if(ps1->pa->ofsy+ps1->pa->sizey > ps2->pa->ofsy+ps2->pa->sizey) return -1; + else if(ps1->pa->sortorder > ps2->pa->sortorder) return 1; + else if(ps1->pa->sortorder < ps2->pa->sortorder) return -1; + + return 0; +} + +static int compare_panel(const void *a1, const void *a2) +{ + const PanelSort *ps1=a1, *ps2=a2; + + if(ps1->pa->sortorder > ps2->pa->sortorder) return 1; + else if(ps1->pa->sortorder < ps2->pa->sortorder) return -1; return 0; } /* this doesnt draw */ /* returns 1 when it did something */ -int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac) +int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac, int drag) { + uiStyle *style= U.uistyles.first; Panel *pa; PanelSort *ps, *panelsort, *psnext; - static int sortcounter= 0; int a, tot=0, done; int align= panel_aligned(sa, ar); - /* count active, not tabbed Panels */ - for(pa= ar->panels.first; pa; pa= pa->next) { - if(pa->active && pa->paneltab==NULL) tot++; - } + /* count active, not tabbed panels */ + for(pa= ar->panels.first; pa; pa= pa->next) + if((pa->runtime_flag & PNL_ACTIVE) && pa->paneltab==NULL) + tot++; if(tot==0) return 0; /* extra; change close direction? */ for(pa= ar->panels.first; pa; pa= pa->next) { - if(pa->active && pa->paneltab==NULL) { - if( (pa->flag & PNL_CLOSEDX) && (align==BUT_VERTICAL) ) + if((pa->runtime_flag & PNL_ACTIVE) && pa->paneltab==NULL) { + if((pa->flag & PNL_CLOSEDX) && (align==BUT_VERTICAL)) pa->flag ^= PNL_CLOSED; - - else if( (pa->flag & PNL_CLOSEDY) && (align==BUT_HORIZONTAL) ) + else if((pa->flag & PNL_CLOSEDY) && (align==BUT_HORIZONTAL)) pa->flag ^= PNL_CLOSED; - } } - panelsort= MEM_callocN( tot*sizeof(PanelSort), "panelsort"); + /* sort panels */ + panelsort= MEM_callocN(tot*sizeof(PanelSort), "panelsort"); - /* fill panelsort array */ ps= panelsort; for(pa= ar->panels.first; pa; pa= pa->next) { - if(pa->active && pa->paneltab==NULL) { + if((pa->runtime_flag & PNL_ACTIVE) && pa->paneltab==NULL) { ps->pa= MEM_dupallocN(pa); ps->orig= pa; ps++; } } - if(align==BUT_VERTICAL) - qsort(panelsort, tot, sizeof(PanelSort), find_highest_panel); + if(drag) { + /* while we are dragging, we sort on location and update sortorder */ + if(align==BUT_VERTICAL) + qsort(panelsort, tot, sizeof(PanelSort), find_highest_panel); + else + qsort(panelsort, tot, sizeof(PanelSort), find_leftmost_panel); + + for(ps=panelsort, a=0; a<tot; a++, ps++) + ps->orig->sortorder= a; + } else - qsort(panelsort, tot, sizeof(PanelSort), find_leftmost_panel); + /* otherwise use sortorder */ + qsort(panelsort, tot, sizeof(PanelSort), compare_panel); /* no smart other default start loc! this keeps switching f5/f6/etc compatible */ ps= panelsort; - ps->pa->ofsx= PNL_DIST; - if(align==BUT_VERTICAL) - ps->pa->ofsy= -ps->pa->sizey-PNL_HEADER-PNL_DIST; - else - ps->pa->ofsy= -ps->pa->sizey-PNL_HEADER-PNL_DIST; // XXX was 0; - - for(a=0 ; a<tot-1; a++, ps++) { + ps->pa->ofsx= 0; + ps->pa->ofsy= -ps->pa->sizey-PNL_HEADER-style->panelouter; + + for(a=0; a<tot-1; a++, ps++) { psnext= ps+1; if(align==BUT_VERTICAL) { - psnext->pa->ofsx = ps->pa->ofsx; - psnext->pa->ofsy = get_panel_real_ofsy(ps->pa) - psnext->pa->sizey-PNL_HEADER-PNL_DIST; + psnext->pa->ofsx= ps->pa->ofsx; + psnext->pa->ofsy= get_panel_real_ofsy(ps->pa) - psnext->pa->sizey-PNL_HEADER-style->panelouter; } else { - psnext->pa->ofsx = get_panel_real_ofsx(ps->pa)+PNL_DIST; - psnext->pa->ofsy = ps->pa->ofsy + ps->pa->sizey - psnext->pa->sizey; + psnext->pa->ofsx= get_panel_real_ofsx(ps->pa); + psnext->pa->ofsy= ps->pa->ofsy + ps->pa->sizey - psnext->pa->sizey; } } @@ -966,17 +774,9 @@ int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac) } /* copy locations to tabs */ - for(pa= ar->panels.first; pa; pa= pa->next) { - if(pa->paneltab && pa->active) { - copy_panel_offset(pa, pa->paneltab); - } - } - - /* set counter, used for sorting with newly added panels */ - sortcounter++; for(pa= ar->panels.first; pa; pa= pa->next) - if(pa->active) - pa->sortcounter= sortcounter; + if(pa->paneltab && (pa->runtime_flag & PNL_ACTIVE)) + ui_panel_copy_offset(pa, pa->paneltab); /* free panelsort array */ for(ps= panelsort, a=0; a<tot; a++, ps++) @@ -987,7 +787,7 @@ int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac) } -static void ui_do_animate(bContext *C, Panel *panel) +static void ui_do_animate(const bContext *C, Panel *panel) { uiHandlePanelData *data= panel->activedata; ScrArea *sa= CTX_wm_area(C); @@ -999,36 +799,49 @@ static void ui_do_animate(bContext *C, Panel *panel) fac= MIN2(fac, 1.0f); /* for max 1 second, interpolate positions */ - if(uiAlignPanelStep(sa, ar, fac)) + if(uiAlignPanelStep(sa, ar, fac, 0)) ED_region_tag_redraw(ar); else fac= 1.0f; - if(fac == 1.0f) { + if(fac >= 1.0f) { panel_activate_state(C, panel, PANEL_STATE_EXIT); return; } } +void uiBeginPanels(const bContext *C, ARegion *ar) +{ + Panel *pa; + + /* set all panels as inactive, so that at the end we know + * which ones were used */ + for(pa=ar->panels.first; pa; pa=pa->next) { + if(pa->runtime_flag & PNL_ACTIVE) + pa->runtime_flag= PNL_WAS_ACTIVE; + else + pa->runtime_flag= 0; + } +} + /* only draws blocks with panels */ -void uiDrawPanels(const bContext *C, int re_align) +void uiEndPanels(const bContext *C, ARegion *ar) { ScrArea *sa= CTX_wm_area(C); - ARegion *ar= CTX_wm_region(C); uiBlock *block; - Panel *panot, *panew, *patest; + Panel *panot, *panew, *patest, *pa; - /* scaling contents */ + /* offset contents */ for(block= ar->uiblocks.first; block; block= block->next) if(block->active && block->panel) - ui_scale_panel_block(block); + ui_offset_panel_block(block); /* consistancy; are panels not made, whilst they have tabs */ for(panot= ar->panels.first; panot; panot= panot->next) { - if(panot->active==0) { // not made + if((panot->runtime_flag & PNL_ACTIVE)==0) { // not made for(panew= ar->panels.first; panew; panew= panew->next) { - if(panew->active) { + if((panew->runtime_flag & PNL_ACTIVE)) { if(panew->paneltab==panot) { // panew is tab in notmade pa break; } @@ -1048,105 +861,24 @@ void uiDrawPanels(const bContext *C, int re_align) } } - /* re-align */ - if(re_align) uiAlignPanelStep(sa, ar, 1.0); - - if(sa->spacetype!=SPACE_BUTS) { -#if 0 // XXX make float panel exception - SpaceLink *sl= sa->spacedata.first; - for(block= ar->uiblocks.first; block; block= block->next) { - if(block->active && block->panel && block->panel->active && block->panel->paneltab == NULL) { - float dx=0.0, dy=0.0, minx, miny, maxx, maxy, miny_panel; - - minx= sl->blockscale*block->panel->ofsx; - maxx= sl->blockscale*(block->panel->ofsx+block->panel->sizex); - miny= sl->blockscale*(block->panel->ofsy+block->panel->sizey); - maxy= sl->blockscale*(block->panel->ofsy+block->panel->sizey+PNL_HEADER); - miny_panel= sl->blockscale*(block->panel->ofsy); - - /* check to see if snapped panels have been left out in the open by resizing a window - * and if so, offset them back to where they belong */ - if (block->panel->snap) { - if (((block->panel->snap) & PNL_SNAP_RIGHT) && - (maxx < (float)sa->winx)) { - - dx = sa->winx-maxx; - block->panel->ofsx+= dx/sl->blockscale; - } - if (((block->panel->snap) & PNL_SNAP_TOP) && - (maxy < (float)sa->winy)) { - - dy = sa->winy-maxy; - block->panel->ofsy+= dy/sl->blockscale; - } - - /* reset these vars with updated panel offset distances */ - minx= sl->blockscale*block->panel->ofsx; - maxx= sl->blockscale*(block->panel->ofsx+block->panel->sizex); - miny= sl->blockscale*(block->panel->ofsy+block->panel->sizey); - maxy= sl->blockscale*(block->panel->ofsy+block->panel->sizey+PNL_HEADER); - miny_panel= sl->blockscale*(block->panel->ofsy); - } else - /* reset to no snapping */ - block->panel->snap = PNL_SNAP_NONE; - - - /* clip panels (headers) for non-butspace situations (maybe make optimized event later) */ - - /* check left and right edges */ - if (minx < PNL_SNAP_DIST) { - dx = -minx; - block->panel->snap |= PNL_SNAP_LEFT; - } - else if (maxx > ((float)sa->winx - PNL_SNAP_DIST)) { - dx= sa->winx-maxx; - block->panel->snap |= PNL_SNAP_RIGHT; - } - if( minx + dx < 0.0) dx= -minx; // when panel cant fit, put it fixed here - - /* check top and bottom edges */ - if ((miny_panel < PNL_SNAP_DIST) && (miny_panel > -PNL_SNAP_DIST)) { - dy= -miny_panel; - block->panel->snap |= PNL_SNAP_BOTTOM; - } - if(miny < PNL_SNAP_DIST) { - dy= -miny; - block->panel->snap |= PNL_SNAP_BOTTOM; - } - else if(maxy > ((float)sa->winy - PNL_SNAP_DIST)) { - dy= sa->winy-maxy; - block->panel->snap |= PNL_SNAP_TOP; - } - if( miny + dy < 0.0) dy= -miny; // when panel cant fit, put it fixed here - - - block->panel->ofsx+= dx/sl->blockscale; - block->panel->ofsy+= dy/sl->blockscale; - - /* copy locations */ - for(patest= ar->panels.first; patest; patest= patest->next) { - if(patest->paneltab==block->panel) copy_panel_offset(patest, block->panel); - } - - } - } -#endif + /* re-align, possibly with animation */ + if(panels_re_align(sa, ar, &pa)) { + if(pa) + panel_activate_state(C, pa, PANEL_STATE_ANIMATION); + else + uiAlignPanelStep(sa, ar, 1.0, 0); } /* draw panels, selected on top */ for(block= ar->uiblocks.first; block; block=block->next) { if(block->active && block->panel && !(block->panel->flag & PNL_SELECT)) { - uiPanelPush(block); uiDrawBlock(C, block); - uiPanelPop(block); } } for(block= ar->uiblocks.first; block; block=block->next) { if(block->active && block->panel && (block->panel->flag & PNL_SELECT)) { - uiPanelPush(block); uiDrawBlock(C, block); - uiPanelPop(block); } } } @@ -1162,18 +894,18 @@ static void check_panel_overlap(ARegion *ar, Panel *panel) for(pa=ar->panels.first; pa; pa=pa->next) { pa->flag &= ~PNL_OVERLAP; if(panel && (pa != panel)) { - if(pa->paneltab==NULL && pa->active) { + if(pa->paneltab==NULL && (pa->runtime_flag & PNL_ACTIVE)) { float safex= 0.2, safey= 0.2; - if( pa->flag & PNL_CLOSEDX) safex= 0.05; + if(pa->flag & PNL_CLOSEDX) safex= 0.05; else if(pa->flag & PNL_CLOSEDY) safey= 0.05; - else if( panel->flag & PNL_CLOSEDX) safex= 0.05; + else if(panel->flag & PNL_CLOSEDX) safex= 0.05; else if(panel->flag & PNL_CLOSEDY) safey= 0.05; - if( pa->ofsx > panel->ofsx- safex*panel->sizex) - if( pa->ofsx+pa->sizex < panel->ofsx+ (1.0+safex)*panel->sizex) - if( pa->ofsy > panel->ofsy- safey*panel->sizey) - if( pa->ofsy+pa->sizey < panel->ofsy+ (1.0+safey)*panel->sizey) + if(pa->ofsx > panel->ofsx- safex*panel->sizex) + if(pa->ofsx+pa->sizex < panel->ofsx+ (1.0+safex)*panel->sizex) + if(pa->ofsy > panel->ofsy- safey*panel->sizey) + if(pa->ofsy+pa->sizey < panel->ofsy+ (1.0+safey)*panel->sizey) pa->flag |= PNL_OVERLAP; } } @@ -1187,7 +919,7 @@ static void test_add_new_tabs(ARegion *ar) pa= ar->panels.first; while(pa) { - if(pa->active) { + if(pa->runtime_flag & PNL_ACTIVE) { if(pa->flag & PNL_SELECT) pasel= pa; if(pa->flag & PNL_OVERLAP) palap= pa; } @@ -1200,7 +932,7 @@ static void test_add_new_tabs(ARegion *ar) pa= ar->panels.first; while(pa) { if(pa->paneltab==pasel) { - copy_panel_offset(pa, pasel); + ui_panel_copy_offset(pa, pasel); } pa= pa->next; } @@ -1212,13 +944,13 @@ static void test_add_new_tabs(ARegion *ar) palap->paneltab= pasel; /* the selected panel gets coords of overlapped one */ - copy_panel_offset(pasel, palap); + ui_panel_copy_offset(pasel, palap); /* and its tabs */ pa= ar->panels.first; while(pa) { if(pa->paneltab == pasel) { - copy_panel_offset(pa, palap); + ui_panel_copy_offset(pa, palap); } pa= pa->next; } @@ -1233,9 +965,9 @@ static void test_add_new_tabs(ARegion *ar) } } -/* ------------ panel drag ---------------- */ +/************************ panel dragging ****************************/ -static void ui_do_drag(bContext *C, wmEvent *event, Panel *panel) +static void ui_do_drag(const bContext *C, wmEvent *event, Panel *panel) { uiHandlePanelData *data= panel->activedata; ScrArea *sa= CTX_wm_area(C); @@ -1252,13 +984,11 @@ static void ui_do_drag(bContext *C, wmEvent *event, Panel *panel) if(data->state == PANEL_STATE_DRAG_SCALE) { panel->sizex = MAX2(data->startsizex+dx, UI_PANEL_MINX); - if(data->startsizey-dy < UI_PANEL_MINY) { + if(data->startsizey-dy < UI_PANEL_MINY) dy= -UI_PANEL_MINY+data->startsizey; - } - panel->sizey = data->startsizey-dy; - - panel->ofsy= data->startofsy+dy; + panel->sizey= data->startsizey-dy; + panel->ofsy= data->startofsy+dy; } else { /* reset the panel snapping, to allow dragging away from snapped edges */ @@ -1268,13 +998,13 @@ static void ui_do_drag(bContext *C, wmEvent *event, Panel *panel) panel->ofsy = data->startofsy+dy; check_panel_overlap(ar, panel); - if(align) uiAlignPanelStep(sa, ar, 0.2); + if(align) uiAlignPanelStep(sa, ar, 0.2, 1); } ED_region_tag_redraw(ar); } -static void ui_do_untab(bContext *C, wmEvent *event, Panel *panel) +static void ui_do_untab(const bContext *C, wmEvent *event, Panel *panel) { uiHandlePanelData *data= panel->activedata; ARegion *ar= CTX_wm_region(C); @@ -1303,20 +1033,20 @@ static void ui_do_untab(bContext *C, wmEvent *event, Panel *panel) } } -/* region level panel interaction */ +/******************* region level panel interaction *****************/ -static void panel_clicked_tabs(bContext *C, ScrArea *sa, ARegion *ar, uiBlock *block, int mousex) +static void panel_clicked_tabs(const bContext *C, ScrArea *sa, ARegion *ar, uiBlock *block, int mousex) { Panel *pa, *tabsel=NULL, *panel= block->panel; int nr= 1, a, width, ofsx; ofsx= PNL_ICON; - if(block->panel->control & UI_PNL_CLOSE) ofsx+= PNL_ICON; + if(block->panel->type && (block->panel->control & UI_PNL_CLOSE)) ofsx+= PNL_ICON; /* count */ for(pa= ar->panels.first; pa; pa=pa->next) if(pa!=panel) - if(pa->active && pa->paneltab==panel) + if((pa->runtime_flag & PNL_ACTIVE) && pa->paneltab==panel) nr++; if(nr==1) return; @@ -1326,8 +1056,8 @@ static void panel_clicked_tabs(bContext *C, ScrArea *sa, ARegion *ar, uiBlock *b width= (int)((float)(panel->sizex - ofsx-10)/nr); pa= ar->panels.first; while(pa) { - if(pa==panel || (pa->active && pa->paneltab==panel)) { - if( (mousex > ofsx+a*width) && (mousex < ofsx+(a+1)*width) ) { + if(pa==panel || ((pa->runtime_flag & PNL_ACTIVE) && pa->paneltab==panel)) { + if((mousex > ofsx+a*width) && (mousex < ofsx+(a+1)*width)) { tabsel= pa; break; } @@ -1351,9 +1081,16 @@ static void panel_clicked_tabs(bContext *C, ScrArea *sa, ARegion *ar, uiBlock *b pa= pa->next; } + /* copy locations to tabs */ + for(pa= ar->panels.first; pa; pa= pa->next) { + if(pa->paneltab && pa->runtime_flag & PNL_ACTIVE) { + ui_panel_copy_offset(pa, pa->paneltab); + } + } + /* panels now differ size.. */ if(panel_aligned(sa, ar)) - uiAlignPanelStep(sa, ar, 1.0); + panel_activate_state(C, tabsel, PANEL_STATE_ANIMATION); ED_region_tag_redraw(ar); } @@ -1363,7 +1100,7 @@ static void panel_clicked_tabs(bContext *C, ScrArea *sa, ARegion *ar, uiBlock *b /* this function is supposed to call general window drawing too */ /* also it supposes a block has panel, and isnt a menu */ -static void ui_handle_panel_header(bContext *C, uiBlock *block, int mx, int my) +static void ui_handle_panel_header(const bContext *C, uiBlock *block, int mx, int my) { ScrArea *sa= CTX_wm_area(C); ARegion *ar= CTX_wm_region(C); @@ -1372,21 +1109,22 @@ static void ui_handle_panel_header(bContext *C, uiBlock *block, int mx, int my) /* mouse coordinates in panel space! */ + /* XXX weak code, currently it assumes layout style for location of widgets */ + /* check open/collapsed button */ if(block->panel->flag & PNL_CLOSEDX) { if(my >= block->maxy) button= 1; } else if(block->panel->control & UI_PNL_CLOSE) { - if(mx <= block->minx+PNL_ICON-2) button= 2; - else if(mx <= block->minx+2*PNL_ICON+2) button= 1; + if(mx <= block->minx+10+PNL_ICON-2) button= 2; + else if(mx <= block->minx+10+2*PNL_ICON+2) button= 1; } - else if(mx <= block->minx+PNL_ICON+2) { + else if(mx <= block->minx+10+PNL_ICON+2) { button= 1; } if(button) { if(button==2) { // close - //XXX 2.50 rem_blockhandler(sa, block->handler); ED_region_tag_redraw(ar); } else { // collapse @@ -1435,88 +1173,97 @@ int ui_handler_panel_region(bContext *C, wmEvent *event) { ARegion *ar= CTX_wm_region(C); uiBlock *block; - int retval, mx, my, inside_header= 0, inside_scale= 0; + int retval, mx, my, inside_header= 0, inside_scale= 0, inside; retval= WM_UI_HANDLER_CONTINUE; + /* buttons get priority */ + if(ui_button_is_active(ar)) + return retval; + for(block=ar->uiblocks.last; block; block=block->prev) { mx= event->x; my= event->y; ui_window_to_block(ar, block, &mx, &my); /* check if inside boundbox */ + inside= 0; + if(block->panel && block->panel->paneltab==NULL) if(block->minx <= mx && block->maxx >= mx) if(block->miny <= my && block->maxy+PNL_HEADER >= my) - break; - } - - if(!block) - return retval; + inside= 1; - /* clicked at panel header? */ - if(block->panel->flag & PNL_CLOSEDX) { - if(block->minx <= mx && block->minx+PNL_HEADER >= mx) - inside_header= 1; - } - else if((block->maxy <= my) && (block->maxy+PNL_HEADER >= my)) { - inside_header= 1; - } - else if(block->panel->control & UI_PNL_SCALE) { - if(block->maxx-PNL_HEADER <= mx) - if(block->miny+PNL_HEADER >= my) - inside_scale= 1; - } + if(inside) { + /* clicked at panel header? */ + if(block->panel->flag & PNL_CLOSEDX) { + if(block->minx <= mx && block->minx+PNL_HEADER >= mx) + inside_header= 1; + } + else if((block->maxy <= my) && (block->maxy+PNL_HEADER >= my)) { + inside_header= 1; + } + else if(block->panel->control & UI_PNL_SCALE) { + if(block->maxx-PNL_HEADER <= mx) + if(block->miny+PNL_HEADER >= my) + inside_scale= 1; + } - if(event->val!=KM_PRESS) - return retval; + if(event->val==KM_PRESS) { + if(event->type == LEFTMOUSE) { + if(inside_header) { + ui_handle_panel_header(C, block, mx, my); + break; + } + else if(inside_scale && !(block->panel->flag & PNL_CLOSED)) { + panel_activate_state(C, block->panel, PANEL_STATE_DRAG_SCALE); + break; + } + } + else if(event->type == ESCKEY) { + /*XXX 2.50 if(block->handler) { + rem_blockhandler(sa, block->handler); + ED_region_tag_redraw(ar); + retval= WM_UI_HANDLER_BREAK; + }*/ + } + else if(event->type==PADPLUSKEY || event->type==PADMINUS) { + int zoom=0; + + /* if panel is closed, only zoom if mouse is over the header */ + if (block->panel->flag & (PNL_CLOSEDX|PNL_CLOSEDY)) { + if (inside_header) + zoom=1; + } + else + zoom=1; - if(event->type == LEFTMOUSE) { - if(inside_header) - ui_handle_panel_header(C, block, mx, my); - else if(inside_scale && !(block->panel->flag & PNL_CLOSED)) - panel_activate_state(C, block->panel, PANEL_STATE_DRAG_SCALE); - } - else if(event->type == ESCKEY) { - /*XXX 2.50 if(block->handler) { - rem_blockhandler(sa, block->handler); - ED_region_tag_redraw(ar); - retval= WM_UI_HANDLER_BREAK; - }*/ - } - else if(event->type==PADPLUSKEY || event->type==PADMINUS) { - int zoom=0; - - /* if panel is closed, only zoom if mouse is over the header */ - if (block->panel->flag & (PNL_CLOSEDX|PNL_CLOSEDY)) { - if (inside_header) - zoom=1; - } - else - zoom=1; #if 0 // XXX make float panel exception? - if(zoom) { - ScrArea *sa= CTX_wm_area(C); - SpaceLink *sl= sa->spacedata.first; - - if(sa->spacetype!=SPACE_BUTS) { - if(!(block->panel->control & UI_PNL_SCALE)) { - if(event->type==PADPLUSKEY) sl->blockscale+= 0.1; - else sl->blockscale-= 0.1; - CLAMP(sl->blockscale, 0.6, 1.0); - - ED_region_tag_redraw(ar); - retval= WM_UI_HANDLER_BREAK; - } + if(zoom) { + ScrArea *sa= CTX_wm_area(C); + SpaceLink *sl= sa->spacedata.first; + + if(sa->spacetype!=SPACE_BUTS) { + if(!(block->panel->control & UI_PNL_SCALE)) { + if(event->type==PADPLUSKEY) sl->blockscale+= 0.1; + else sl->blockscale-= 0.1; + CLAMP(sl->blockscale, 0.6, 1.0); + + ED_region_tag_redraw(ar); + retval= WM_UI_HANDLER_BREAK; + } + } + } +#endif + } } } -#endif } return retval; } -/* window level modal panel interaction */ +/**************** window level modal panel interaction **************/ static int ui_handler_panel(bContext *C, wmEvent *event, void *userdata) { @@ -1525,7 +1272,15 @@ static int ui_handler_panel(bContext *C, wmEvent *event, void *userdata) /* verify if we can stop */ if(event->type == LEFTMOUSE && event->val!=KM_PRESS) { - panel_activate_state(C, panel, PANEL_STATE_ANIMATION); + ScrArea *sa= CTX_wm_area(C); + ARegion *ar= CTX_wm_region(C); + int align= panel_aligned(sa, ar); + + if(align) + panel_activate_state(C, panel, PANEL_STATE_ANIMATION); + else + panel_activate_state(C, panel, PANEL_STATE_EXIT); + return WM_UI_HANDLER_BREAK; } else if(event->type == MOUSEMOVE) { @@ -1541,7 +1296,9 @@ static int ui_handler_panel(bContext *C, wmEvent *event, void *userdata) ui_do_drag(C, event, panel); } - if(data->state == PANEL_STATE_ANIMATION) + data= panel->activedata; + + if(data && data->state == PANEL_STATE_ANIMATION) return WM_UI_HANDLER_CONTINUE; else return WM_UI_HANDLER_BREAK; @@ -1554,12 +1311,12 @@ static void ui_handler_remove_panel(bContext *C, void *userdata) panel_activate_state(C, pa, PANEL_STATE_EXIT); } -static void panel_activate_state(bContext *C, Panel *pa, uiHandlePanelState state) +static void panel_activate_state(const bContext *C, Panel *pa, uiHandlePanelState state) { uiHandlePanelData *data= pa->activedata; wmWindow *win= CTX_wm_window(C); ARegion *ar= CTX_wm_region(C); - + if(data && data->state == state) return; diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index d64ad75a48a..847c0a02ee4 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -32,6 +32,7 @@ #include "DNA_screen_types.h" #include "DNA_view2d_types.h" +#include "DNA_userdef_types.h" #include "DNA_windowmanager_types.h" #include "BLI_arithb.h" @@ -41,6 +42,7 @@ #include "BKE_context.h" #include "BKE_report.h" #include "BKE_screen.h" +#include "BKE_texture.h" #include "BKE_utildefines.h" #include "WM_api.h" @@ -54,9 +56,10 @@ #include "BIF_gl.h" #include "UI_interface.h" -#include "UI_text.h" #include "UI_view2d.h" +#include "BLF_api.h" + #include "ED_screen.h" #include "interface_intern.h" @@ -64,11 +67,9 @@ #define MENU_BUTTON_HEIGHT 20 #define MENU_SEPR_HEIGHT 6 #define B_NOP -1 -#define MENU_SHADOW_LEFT -1 -#define MENU_SHADOW_BOTTOM -10 -#define MENU_SHADOW_RIGHT 10 -#define MENU_SHADOW_TOP 1 -#define MENU_ROUNDED_TOP 5 +#define MENU_SHADOW_SIDE 8 +#define MENU_SHADOW_BOTTOM 10 +#define MENU_TOP 8 /*********************** Menu Data Parsing ********************* */ @@ -251,42 +252,21 @@ void ui_remove_temporary_region(bContext *C, bScreen *sc, ARegion *ar) /************************* Creating Tooltips **********************/ typedef struct uiTooltipData { - rctf bbox; - struct BMF_Font *font; + rcti bbox; + uiFontStyle fstyle; char *tip; - float aspect; } uiTooltipData; static void ui_tooltip_region_draw(const bContext *C, ARegion *ar) { - uiTooltipData *data; - int x1, y1, x2, y2; + uiTooltipData *data= ar->regiondata; - data= ar->regiondata; - - x1= ar->winrct.xmin; - y1= ar->winrct.ymin; - x2= ar->winrct.xmax; - y2= ar->winrct.ymax; - - /* draw background */ - glEnable(GL_BLEND); - glColor4f(0.15f, 0.15f, 0.15f, 0.85f); - - uiSetRoundBox(15); - uiRoundBox(data->bbox.xmin, 2, data->bbox.xmax+10, y2-y1-2, 5.0f); + ui_draw_menu_back(U.uistyles.first, NULL, &data->bbox); /* draw text */ glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - - /* set the position for drawing text +6 in from the left edge, and leaving - * an equal gap between the top of the background box and the top of the - * string's bbox, and the bottom of the background box, and the bottom of - * the string's bbox */ - ui_rasterpos_safe(5, ((y2-data->bbox.ymax)+(y1+data->bbox.ymin))/2 - data->bbox.ymin - y1, data->aspect); - UI_SetScale(1.0); - - UI_DrawString(data->font, data->tip, ui_translate_tooltips()); + uiStyleFontSet(&data->fstyle); + uiStyleFontDraw(&data->fstyle, &data->bbox, data->tip); } static void ui_tooltip_region_free(ARegion *ar) @@ -301,9 +281,12 @@ static void ui_tooltip_region_free(ARegion *ar) ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) { + uiStyle *style= U.uistyles.first; // XXX pass on as arg static ARegionType type; ARegion *ar; uiTooltipData *data; + float fonth, fontw, aspect= but->block->aspect; + float x1f, x2f, y1f, y2f; int x1, x2, y1, y2, winx, winy, ofsx, ofsy; if(!but->tip || strlen(but->tip)==0) @@ -320,9 +303,14 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) /* create tooltip data */ data= MEM_callocN(sizeof(uiTooltipData), "uiTooltipData"); data->tip= BLI_strdup(but->tip); - data->font= but->font; - data->aspect= but->aspect; - UI_GetBoundingBox(data->font, data->tip, ui_translate_tooltips(), &data->bbox); + + /* set font, get bb */ + data->fstyle= style->widget; /* copy struct */ + data->fstyle.align= UI_STYLE_TEXT_CENTER; + ui_fontscale(&data->fstyle.points, aspect); + uiStyleFontSet(&data->fstyle); + fontw= aspect * BLF_width(data->tip); + fonth= aspect * BLF_height(data->tip); ar->regiondata= data; @@ -330,19 +318,19 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) ofsx= (but->block->panel)? but->block->panel->ofsx: 0; ofsy= (but->block->panel)? but->block->panel->ofsy: 0; - x1= (but->x1+but->x2)/2 + ofsx; - x2= x1+but->aspect*((data->bbox.xmax-data->bbox.xmin) + 8); - y2= but->y1-10 + ofsy; - y1= y2-but->aspect*((data->bbox.ymax+(data->bbox.ymax-data->bbox.ymin))); - - y2 += 8; - x2 += 4; - + x1f= (but->x1+but->x2)/2.0f + ofsx - 16.0f*aspect; + x2f= x1f + fontw + 16.0f*aspect; + y2f= but->y1 + ofsy - 15.0f*aspect; + y1f= y2f - fonth - 10.0f*aspect; + + /* copy to int, gets projected if possible too */ + x1= x1f; y1= y1f; x2= x2f; y2= y2f; + if(butregion) { /* XXX temp, region v2ds can be empty still */ if(butregion->v2d.cur.xmin != butregion->v2d.cur.xmax) { - UI_view2d_to_region_no_clip(&butregion->v2d, x1, y1, &x1, &y1); - UI_view2d_to_region_no_clip(&butregion->v2d, x2, y2, &x2, &y2); + UI_view2d_to_region_no_clip(&butregion->v2d, x1f, y1f, &x1, &y1); + UI_view2d_to_region_no_clip(&butregion->v2d, x2f, y2f, &x2, &y2); } x1 += butregion->winrct.xmin; @@ -368,11 +356,18 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) y1 += 36; y2 += 36; } + + /* widget rect, in region coords */ + data->bbox.xmin= MENU_SHADOW_SIDE; + data->bbox.xmax= x2-x1 + MENU_SHADOW_SIDE; + data->bbox.ymin= MENU_SHADOW_BOTTOM; + data->bbox.ymax= y2-y1 + MENU_SHADOW_BOTTOM; - ar->winrct.xmin= x1; - ar->winrct.ymin= y1; - ar->winrct.xmax= x2; - ar->winrct.ymax= y2; + /* region bigger for shadow */ + ar->winrct.xmin= x1 - MENU_SHADOW_SIDE; + ar->winrct.xmax= x2 + MENU_SHADOW_SIDE; + ar->winrct.ymin= y1 - MENU_SHADOW_BOTTOM; + ar->winrct.ymax= y2 + MENU_TOP; /* adds subwindow */ ED_region_init(C, ar); @@ -630,6 +625,7 @@ uiPopupBlockHandle *ui_popup_block_create(bContext *C, ARegion *butregion, uiBut /* create area region */ ar= ui_add_temporary_region(CTX_wm_screen(C)); + handle->region= ar; memset(&type, 0, sizeof(ARegionType)); type.draw= ui_block_region_draw; @@ -637,15 +633,21 @@ uiPopupBlockHandle *ui_popup_block_create(bContext *C, ARegion *butregion, uiBut UI_add_region_handlers(&ar->handlers); - handle->region= ar; - ar->regiondata= handle; - /* create ui block */ if(create_func) block= create_func(C, handle->region, arg); else block= handle_create_func(C, handle, arg); - block->handle= handle; + + if(block->handle) { + memcpy(block->handle, handle, sizeof(uiPopupBlockHandle)); + MEM_freeN(handle); + handle= block->handle; + } + else + block->handle= handle; + + ar->regiondata= handle; if(!block->endblock) uiEndBlock(C, block); @@ -677,10 +679,10 @@ uiPopupBlockHandle *ui_popup_block_create(bContext *C, ARegion *butregion, uiBut /* the block and buttons were positioned in window space as in 2.4x, now * these menu blocks are regions so we bring it back to region space. * additionally we add some padding for the menu shadow or rounded menus */ - ar->winrct.xmin= block->minx + MENU_SHADOW_LEFT; - ar->winrct.xmax= block->maxx + MENU_SHADOW_RIGHT; - ar->winrct.ymin= block->miny + MENU_SHADOW_BOTTOM; - ar->winrct.ymax= block->maxy + MENU_SHADOW_TOP + MENU_ROUNDED_TOP; + ar->winrct.xmin= block->minx - MENU_SHADOW_SIDE; + ar->winrct.xmax= block->maxx + MENU_SHADOW_SIDE; + ar->winrct.ymin= block->miny - MENU_SHADOW_BOTTOM; + ar->winrct.ymax= block->maxy + MENU_TOP; block->minx -= ar->winrct.xmin; block->maxx -= ar->winrct.xmin; @@ -701,6 +703,9 @@ uiPopupBlockHandle *ui_popup_block_create(bContext *C, ARegion *butregion, uiBut /* get winmat now that we actually have the subwindow */ wmSubWindowSet(window, ar->swinid); + // XXX ton, AA pixel space... + wmOrtho2(0.0, (float)ar->winrct.xmax-ar->winrct.xmin+1, 0.0, (float)ar->winrct.ymax-ar->winrct.ymin+1); + wm_subwindow_getmatrix(window, ar->swinid, block->winmat); /* notify change and redraw */ @@ -728,10 +733,8 @@ uiBlock *ui_block_func_MENU(bContext *C, uiPopupBlockHandle *handle, void *arg_b int width, height, boxh, columns, rows, startx, starty, x1, y1, xmax, a; /* create the block */ - block= uiBeginBlock(C, handle->region, "menu", UI_EMBOSSP, UI_HELV); - block->dt= UI_EMBOSSP; + block= uiBeginBlock(C, handle->region, "menu", UI_EMBOSSP); block->flag= UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_NUMSELECT; - block->themecol= TH_MENU_ITEM; /* compute menu data */ md= decompose_menu_string(but->str); @@ -756,12 +759,12 @@ uiBlock *ui_block_func_MENU(bContext *C, uiPopupBlockHandle *handle, void *arg_b /* size and location */ if(md->title) - width= 1.5*aspect*strlen(md->title)+UI_GetStringWidth(block->curfont, md->title, ui_translate_menus()); + width= 1.5*aspect*strlen(md->title)+UI_GetStringWidth(md->title); else width= 0; for(a=0; a<md->nitems; a++) { - xmax= aspect*UI_GetStringWidth(block->curfont, md->items[a].str, ui_translate_menus()); + xmax= aspect*UI_GetStringWidth(md->items[a].str); if(md->items[a].icon) xmax += 20*aspect; if(xmax>width) @@ -786,14 +789,13 @@ uiBlock *ui_block_func_MENU(bContext *C, uiPopupBlockHandle *handle, void *arg_b if(md->title) { uiBut *bt; - uiSetCurFont(block, block->font+1); + if (md->titleicon) { bt= uiDefIconTextBut(block, LABEL, 0, md->titleicon, md->title, startx, (short)(starty+rows*boxh), (short)width, (short)boxh, NULL, 0.0, 0.0, 0, 0, ""); } else { bt= uiDefBut(block, LABEL, 0, md->title, startx, (short)(starty+rows*boxh), (short)width, (short)boxh, NULL, 0.0, 0.0, 0, 0, ""); bt->flag= UI_TEXT_LEFT; } - uiSetCurFont(block, block->font); } for(a=0; a<md->nitems; a++) { @@ -839,9 +841,8 @@ uiBlock *ui_block_func_ICONROW(bContext *C, uiPopupBlockHandle *handle, void *ar uiBlock *block; int a; - block= uiBeginBlock(C, handle->region, "menu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, handle->region, "menu", UI_EMBOSSP); block->flag= UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_NUMSELECT; - block->themecol= TH_MENU_ITEM; for(a=(int)but->hardmin; a<=(int)but->hardmax; a++) { uiDefIconButF(block, BUTM|FLO, B_NOP, but->icon+(a-but->hardmin), 0, (short)(18*a), (short)(but->x2-but->x1-4), 18, &handle->retvalue, (float)a, 0.0, 0, 0, ""); @@ -861,21 +862,20 @@ uiBlock *ui_block_func_ICONTEXTROW(bContext *C, uiPopupBlockHandle *handle, void MenuData *md; int width, xmax, ypos, a; - block= uiBeginBlock(C, handle->region, "menu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, handle->region, "menu", UI_EMBOSSP); block->flag= UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_NUMSELECT; - block->themecol= TH_MENU_ITEM; md= decompose_menu_string(but->str); /* size and location */ /* expand menu width to fit labels */ if(md->title) - width= 2*strlen(md->title)+UI_GetStringWidth(block->curfont, md->title, ui_translate_menus()); + width= 2*strlen(md->title)+UI_GetStringWidth(md->title); else width= 0; for(a=0; a<md->nitems; a++) { - xmax= UI_GetStringWidth(block->curfont, md->items[a].str, ui_translate_menus()); + xmax= UI_GetStringWidth(md->items[a].str); if(xmax>width) width= xmax; } @@ -899,9 +899,8 @@ uiBlock *ui_block_func_ICONTEXTROW(bContext *C, uiPopupBlockHandle *handle, void if(md->title) { uiBut *bt; - uiSetCurFont(block, block->font+1); + bt= uiDefBut(block, LABEL, 0, md->title, 0, ypos, (short)width, 19, NULL, 0.0, 0.0, 0, 0, ""); - uiSetCurFont(block, block->font); bt->flag= UI_TEXT_LEFT; } @@ -1056,18 +1055,17 @@ static void ui_update_block_buts_hex(uiBlock *block, char *hexcol) /* callback to copy from/to palette */ static void do_palette_cb(bContext *C, void *bt1, void *col1) { + wmWindow *win= CTX_wm_window(C); uiBut *but1= (uiBut *)bt1; float *col= (float *)col1; float *fp, hsv[3]; fp= (float *)but1->poin; - /* XXX 2.50 bad access, how to solve? - * - if( (get_qual() & LR_CTRLKEY) ) { + if(win->eventstate->ctrl) { VECCOPY(fp, col); } - else*/ { + else { VECCOPY(col, fp); } @@ -1202,15 +1200,11 @@ void uiBlockPickerButtons(uiBlock *block, float *col, float *hsv, float *old, ch // the cube intersection bt= uiDefButF(block, HSVCUBE, retval, "", 0,DPICK+BPICK,FPICK,FPICK, col, 0.0, 0.0, 2, 0, ""); - uiButSetFlag(bt, UI_NO_HILITE); bt= uiDefButF(block, HSVCUBE, retval, "", 0,0,FPICK,BPICK, col, 0.0, 0.0, 3, 0, ""); - uiButSetFlag(bt, UI_NO_HILITE); // palette - uiBlockSetEmboss(block, UI_EMBOSSP); - bt=uiDefButF(block, COL, retval, "", FPICK+DPICK, 0, BPICK,BPICK, old, 0.0, 0.0, -1, 0, "Old color, click to restore"); uiButSetFunc(bt, do_palette_cb, bt, col); uiDefButF(block, COL, retval, "", FPICK+DPICK, BPICK+DPICK, BPICK,60-BPICK-DPICK, col, 0.0, 0.0, -1, 0, "Active color"); @@ -1225,8 +1219,6 @@ void uiBlockPickerButtons(uiBlock *block, float *col, float *hsv, float *old, ch } uiBlockEndAlign(block); - uiBlockSetEmboss(block, UI_EMBOSS); - // buttons rgb_to_hsv(col[0], col[1], col[2], hsv, hsv+1, hsv+2); sprintf(hexcol, "%02X%02X%02X", (unsigned int)(col[0]*255.0), (unsigned int)(col[1]*255.0), (unsigned int)(col[2]*255.0)); @@ -1266,9 +1258,8 @@ uiBlock *ui_block_func_COL(bContext *C, uiPopupBlockHandle *handle, void *arg_bu static float hsvcol[3], oldcol[3]; static char hexcol[128]; - block= uiBeginBlock(C, handle->region, "colorpicker", UI_EMBOSS, UI_HELV); + block= uiBeginBlock(C, handle->region, "colorpicker", UI_EMBOSS); block->flag= UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_KEEP_OPEN; - block->themecol= TH_BUT_NUM; VECCOPY(handle->retvec, but->editvec); uiBlockPickerButtons(block, handle->retvec, hsvcol, oldcol, hexcol, 'p', 0); @@ -1280,6 +1271,90 @@ uiBlock *ui_block_func_COL(bContext *C, uiPopupBlockHandle *handle, void *arg_bu return block; } +/* ******************** Color band *************** */ + +static int vergcband(const void *a1, const void *a2) +{ + const CBData *x1=a1, *x2=a2; + + if( x1->pos > x2->pos ) return 1; + else if( x1->pos < x2->pos) return -1; + return 0; +} + +static void colorband_pos_cb(bContext *C, void *coba_v, void *unused_v) +{ + ColorBand *coba= coba_v; + int a; + + if(coba->tot<2) return; + + for(a=0; a<coba->tot; a++) coba->data[a].cur= a; + qsort(coba->data, coba->tot, sizeof(CBData), vergcband); + for(a=0; a<coba->tot; a++) { + if(coba->data[a].cur==coba->cur) { + /* if(coba->cur!=a) addqueue(curarea->win, REDRAW, 0); */ /* button cur */ + coba->cur= a; + break; + } + } +} + +static void colorband_add_cb(bContext *C, void *coba_v, void *unused_v) +{ + ColorBand *coba= coba_v; + + if(coba->tot < MAXCOLORBAND-1) coba->tot++; + coba->cur= coba->tot-1; + + colorband_pos_cb(C, coba, NULL); +// BIF_undo_push("Add colorband"); + +} + +static void colorband_del_cb(bContext *C, void *coba_v, void *unused_v) +{ + ColorBand *coba= coba_v; + int a; + + if(coba->tot<2) return; + + for(a=coba->cur; a<coba->tot; a++) { + coba->data[a]= coba->data[a+1]; + } + if(coba->cur) coba->cur--; + coba->tot--; + +// BIF_undo_push("Delete colorband"); +// BIF_preview_changed(ID_TE); +} + +void uiBlockColorbandButtons(uiBlock *block, ColorBand *coba, rctf *butr, int event) +{ + CBData *cbd; + uiBut *bt; + float unit= (butr->xmax-butr->xmin)/14.0f; + float xs= butr->xmin; + + cbd= coba->data + coba->cur; + + uiBlockBeginAlign(block); + uiDefButF(block, COL, event, "", xs,butr->ymin+20.0f,2.0f*unit,20, &(cbd->r), 0, 0, 0, 0, ""); + uiDefButF(block, NUM, event, "A:", xs+2.0f*unit,butr->ymin+20.0f,4.0f*unit,20, &(cbd->a), 0.0f, 1.0f, 10, 2, ""); + bt= uiDefBut(block, BUT, event, "Add", xs+6.0f*unit,butr->ymin+20.0f,2.0f*unit,20, NULL, 0, 0, 0, 0, "Adds a new color position to the colorband"); + uiButSetFunc(bt, colorband_add_cb, coba, NULL); + bt= uiDefBut(block, BUT, event, "Del", xs+8.0f*unit, butr->ymin+20.0f, 2.0f*unit, 20, NULL, 0, 0, 0, 0, "Deletes the active position"); + uiButSetFunc(bt, colorband_del_cb, coba, NULL); + + uiDefButS(block, MENU, event, "Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4", + xs + 10.0f*unit, butr->ymin+20.0f, unit*4.0f, 20, &coba->ipotype, 0.0, 0.0, 0, 0, "Sets interpolation type"); + + uiDefBut(block, BUT_COLORBAND, event, "", xs, butr->ymin, butr->xmax-butr->xmin, 20.0f, coba, 0, 0, 0, 0, ""); + uiBlockEndAlign(block); + +} + + /* ******************** PUPmenu ****************** */ static int pupmenu_set= 0; @@ -1334,9 +1409,8 @@ uiBlock *ui_block_func_PUPMENU(bContext *C, uiPopupBlockHandle *handle, void *ar height= 0; /* block stuff first, need to know the font */ - block= uiBeginBlock(C, handle->region, "menu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, handle->region, "menu", UI_EMBOSSP); uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1|UI_BLOCK_NUMSELECT); - block->themecol= TH_MENU_ITEM; block->direction= UI_DOWN; md= decompose_menu_string(info->instr); @@ -1346,13 +1420,13 @@ uiBlock *ui_block_func_PUPMENU(bContext *C, uiPopupBlockHandle *handle, void *ar /* size and location, title slightly bigger for bold */ if(md->title) { - width= 2*strlen(md->title)+UI_GetStringWidth(uiBlockGetCurFont(block), md->title, ui_translate_buttons()); + width= 2*strlen(md->title)+UI_GetStringWidth(md->title); width /= columns; } else width= 0; for(a=0; a<md->nitems; a++) { - xmax= UI_GetStringWidth(uiBlockGetCurFont(block), md->items[a].str, ui_translate_buttons()); + xmax= UI_GetStringWidth(md->items[a].str); if(xmax>width) width= xmax; if(strcmp(md->items[a].str, "%l")==0) height+= PUP_LABELH; @@ -1418,7 +1492,6 @@ uiBlock *ui_block_func_PUPMENU(bContext *C, uiPopupBlockHandle *handle, void *ar if(md->title) { uiBut *bt; char titlestr[256]; - uiSetCurFont(block, UI_HELVB); if(md->titleicon) { width+= 20; @@ -1429,7 +1502,6 @@ uiBlock *ui_block_func_PUPMENU(bContext *C, uiPopupBlockHandle *handle, void *ar bt= uiDefBut(block, LABEL, 0, md->title, startx, (short)(starty+height), columns*width, MENU_BUTTON_HEIGHT, NULL, 0.0, 0.0, 0, 0, ""); bt->flag= UI_TEXT_LEFT; } - uiSetCurFont(block, UI_HELV); //uiDefBut(block, SEPR, 0, "", startx, (short)(starty+height)-MENU_SEPR_HEIGHT, width, MENU_SEPR_HEIGHT, NULL, 0.0, 0.0, 0, 0, ""); } @@ -1498,9 +1570,8 @@ uiBlock *ui_block_func_PUPMENUCOL(bContext *C, uiPopupBlockHandle *handle, void height= 0; /* block stuff first, need to know the font */ - block= uiBeginBlock(C, handle->region, "menu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, handle->region, "menu", UI_EMBOSSP); uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1|UI_BLOCK_NUMSELECT); - block->themecol= TH_MENU_ITEM; block->direction= UI_DOWN; md= decompose_menu_string(info->instr); @@ -1521,13 +1592,13 @@ uiBlock *ui_block_func_PUPMENUCOL(bContext *C, uiPopupBlockHandle *handle, void /* size and location, title slightly bigger for bold */ if(md->title) { - width= 2*strlen(md->title)+UI_GetStringWidth(uiBlockGetCurFont(block), md->title, ui_translate_buttons()); + width= 2*strlen(md->title)+UI_GetStringWidth(md->title); width /= columns; } else width= 0; for(a=0; a<md->nitems; a++) { - xmax= UI_GetStringWidth(uiBlockGetCurFont(block), md->items[a].str, ui_translate_buttons()); + xmax= UI_GetStringWidth(md->items[a].str); if(xmax>width) width= xmax; } @@ -1592,7 +1663,6 @@ uiBlock *ui_block_func_PUPMENUCOL(bContext *C, uiPopupBlockHandle *handle, void /* here we go! */ if(md->title) { uiBut *bt; - uiSetCurFont(block, UI_HELVB); if(md->titleicon) { } @@ -1600,7 +1670,6 @@ uiBlock *ui_block_func_PUPMENUCOL(bContext *C, uiPopupBlockHandle *handle, void bt= uiDefBut(block, LABEL, 0, md->title, startx, (short)(starty+rows*MENU_BUTTON_HEIGHT), columns*width, MENU_BUTTON_HEIGHT, NULL, 0.0, 0.0, 0, 0, ""); bt->flag= UI_TEXT_LEFT; } - uiSetCurFont(block, UI_HELV); } for(a=0; a<md->nitems; a++) { @@ -1643,48 +1712,13 @@ uiBlock *ui_block_func_PUPMENUCOL(bContext *C, uiPopupBlockHandle *handle, void /* prototype */ static uiBlock *ui_block_func_MENU_ITEM(bContext *C, uiPopupBlockHandle *handle, void *arg_info); -#define MAX_MENU_STR 64 - -/* type, internal */ -#define MENU_ITEM_TITLE 0 -#define MENU_ITEM_ITEM 1 -#define MENU_ITEM_SEPARATOR 2 -#define MENU_ITEM_OPNAME 10 -#define MENU_ITEM_OPNAME_BOOL 11 -#define MENU_ITEM_OPNAME_ENUM 12 -#define MENU_ITEM_OPNAME_INT 13 -#define MENU_ITEM_OPNAME_FLOAT 14 -#define MENU_ITEM_OPNAME_STRING 15 -#define MENU_ITEM_RNA_BOOL 20 -#define MENU_ITEM_RNA_ENUM 21 -#define MENU_ITEM_LEVEL 30 -#define MENU_ITEM_LEVEL_OPNAME_ENUM 31 -#define MENU_ITEM_LEVEL_RNA_ENUM 32 - -struct uiMenuItem { - struct uiMenuItem *next, *prev; - - int type; - int icon; - char name[MAX_MENU_STR]; - - char *opname; /* static string */ - char *propname; /* static string */ - - int retval, enumval, boolval, intval; - float fltval; - char *strval; - int opcontext; - uiMenuHandleFunc eventfunc; - void *argv; - uiMenuCreateFunc newlevel; - PointerRNA rnapoin; - - ListBase items; +struct uiPopupMenu { + uiBlock *block; + uiLayout *layout; }; typedef struct uiMenuInfo { - uiMenuItem *head; + uiPopupMenu *pup; int mx, my, popup, slideout; int startx, starty; } uiMenuInfo; @@ -1725,204 +1759,29 @@ typedef struct MenuItemLevel { PointerRNA rnapoin; } MenuItemLevel; -/* make a menu level from enum properties */ -static void menu_item_enum_opname_menu(bContext *C, uiMenuItem *head, void *arg) -{ - MenuItemLevel *lvl= (MenuItemLevel*)(((uiBut*)arg)->func_argN); - - head->opcontext= lvl->opcontext; - uiMenuItemsEnumO(head, lvl->opname, lvl->propname); -} - -static void menu_item_enum_rna_menu(bContext *C, uiMenuItem *head, void *arg) -{ - MenuItemLevel *lvl= (MenuItemLevel*)(((uiBut*)arg)->func_argN); - - head->opcontext= lvl->opcontext; - uiMenuItemsEnumR(head, &lvl->rnapoin, lvl->propname); -} - static uiBlock *ui_block_func_MENU_ITEM(bContext *C, uiPopupBlockHandle *handle, void *arg_info) { uiBlock *block; - uiBut *but; uiMenuInfo *info= arg_info; - uiMenuItem *head, *item; - MenuItemLevel *lvl; + uiPopupMenu *pup; ScrArea *sa; ARegion *ar; - static int counter= 0; - int width, height, icon; - int startx, starty, x1, y1; - char str[16]; - head= info->head; - height= 0; + pup= info->pup; + block= pup->block; /* block stuff first, need to know the font */ - sprintf(str, "tb %d", counter++); - block= uiBeginBlock(C, handle->region, str, UI_EMBOSSP, UI_HELV); - uiBlockSetButmFunc(block, head->eventfunc, head->argv); - block->themecol= TH_MENU_ITEM; + uiBlockSetRegion(block, handle->region); block->direction= UI_DOWN; - width= 50; // fixed with, uiMenuPopupBoundsBlock will compute actual width - - for(item= head->items.first; item; item= item->next) { - if(0) height+= PUP_LABELH; // XXX sepr line - else height+= MENU_BUTTON_HEIGHT; - } - - startx= 0; - starty= 0; - - /* here we go! */ - if(head->name[0]) { - char titlestr[256]; - uiSetCurFont(block, UI_HELVB); - - if(head->icon) { - width+= 20; - sprintf(titlestr, " %s", head->name); - uiDefIconTextBut(block, LABEL, 0, head->icon, titlestr, startx, (short)(starty+height), width, MENU_BUTTON_HEIGHT, NULL, 0.0, 0.0, 0, 0, ""); - } - else { - but= uiDefBut(block, LABEL, 0, head->name, startx, (short)(starty+height), width, MENU_BUTTON_HEIGHT, NULL, 0.0, 0.0, 0, 0, ""); - but->flag= UI_TEXT_LEFT; - } - uiSetCurFont(block, UI_HELV); - - //uiDefBut(block, SEPR, 0, "", startx, (short)(starty+height)-MENU_SEPR_HEIGHT, width, MENU_SEPR_HEIGHT, NULL, 0.0, 0.0, 0, 0, ""); - } - - x1= startx; - y1= starty + height - MENU_BUTTON_HEIGHT; // - MENU_SEPR_HEIGHT; - - for(item= head->items.first; item; item= item->next) { - - if(item->type==MENU_ITEM_LEVEL) { - uiDefIconTextMenuBut(block, item->newlevel, NULL, ICON_RIGHTARROW_THIN, item->name, x1, y1, width+16, MENU_BUTTON_HEIGHT-1, NULL); - y1 -= MENU_BUTTON_HEIGHT; - } - else if(item->type==MENU_ITEM_LEVEL_OPNAME_ENUM) { - but= uiDefIconTextMenuBut(block, menu_item_enum_opname_menu, NULL, ICON_RIGHTARROW_THIN, item->name, x1, y1, width+16, MENU_BUTTON_HEIGHT-1, NULL); - - /* XXX warning, abuse of func_arg! */ - lvl= MEM_callocN(sizeof(MenuItemLevel), "MenuItemLevel"); - lvl->opname= item->opname; - lvl->propname= item->propname; - lvl->opcontext= item->opcontext; - - but->poin= (char*)but; - but->func_argN= lvl; - - y1 -= MENU_BUTTON_HEIGHT; - } - else if(item->type==MENU_ITEM_LEVEL_RNA_ENUM) { - but= uiDefIconTextMenuBut(block, menu_item_enum_rna_menu, NULL, ICON_RIGHTARROW_THIN, item->name, x1, y1, width+16, MENU_BUTTON_HEIGHT-1, NULL); - - /* XXX warning, abuse of func_arg! */ - lvl= MEM_callocN(sizeof(MenuItemLevel), "MenuItemLevel"); - lvl->rnapoin= item->rnapoin; - lvl->propname= item->propname; - lvl->opcontext= item->opcontext; - - but->poin= (char*)but; - but->func_argN= lvl; - - y1 -= MENU_BUTTON_HEIGHT; - } - else if(item->type==MENU_ITEM_OPNAME_BOOL) { - but= uiDefIconTextButO(block, BUTM, item->opname, item->opcontext, item->icon, item->name, x1, y1, width+16, MENU_BUTTON_HEIGHT-1, ""); - RNA_boolean_set(uiButGetOperatorPtrRNA(but), item->propname, item->boolval); - - y1 -= MENU_BUTTON_HEIGHT; - } - else if(item->type==MENU_ITEM_OPNAME_ENUM) { - const char *name; - char bname[64]; - - /* If no name is given, use the enum name */ - if (item->name[0] == '\0') - name= ui_menu_enumpropname(item->opname, item->propname, item->enumval); - else - name= item->name; - - BLI_strncpy(bname, name, sizeof(bname)); - - but= uiDefIconTextButO(block, BUTM, item->opname, item->opcontext, item->icon, bname, x1, y1, width+16, MENU_BUTTON_HEIGHT-1, ""); - RNA_enum_set(uiButGetOperatorPtrRNA(but), item->propname, item->enumval); - - y1 -= MENU_BUTTON_HEIGHT; - } - else if(item->type==MENU_ITEM_OPNAME_INT) { - but= uiDefIconTextButO(block, BUTM, item->opname, head->opcontext, item->icon, item->name, x1, y1, width+16, MENU_BUTTON_HEIGHT-1, ""); - RNA_int_set(uiButGetOperatorPtrRNA(but), item->propname, item->intval); - - y1 -= MENU_BUTTON_HEIGHT; - } - else if(item->type==MENU_ITEM_OPNAME_FLOAT) { - but= uiDefIconTextButO(block, BUTM, item->opname, item->opcontext, item->icon, item->name, x1, y1, width+16, MENU_BUTTON_HEIGHT-1, ""); - RNA_float_set(uiButGetOperatorPtrRNA(but), item->propname, item->fltval); - - y1 -= MENU_BUTTON_HEIGHT; - } - else if(item->type==MENU_ITEM_OPNAME_STRING) { - but= uiDefIconTextButO(block, BUTM, item->opname, item->opcontext, item->icon, item->name, x1, y1, width+16, MENU_BUTTON_HEIGHT-1, ""); - RNA_string_set(uiButGetOperatorPtrRNA(but), item->propname, item->strval); - - y1 -= MENU_BUTTON_HEIGHT; - } - else if(item->type==MENU_ITEM_OPNAME) { - uiDefIconTextButO(block, BUTM, item->opname, item->opcontext, item->icon, NULL, x1, y1, width+16, MENU_BUTTON_HEIGHT-1, NULL); - y1 -= MENU_BUTTON_HEIGHT; - } - else if(item->type==MENU_ITEM_RNA_BOOL) { - PropertyRNA *prop= RNA_struct_find_property(&item->rnapoin, item->propname); - - if(prop && RNA_property_type(&item->rnapoin, prop) == PROP_BOOLEAN) { - icon= (RNA_property_boolean_get(&item->rnapoin, prop))? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT; - uiDefIconTextButR(block, TOG, 0, icon, NULL, x1, y1, width+16, MENU_BUTTON_HEIGHT-1, &item->rnapoin, item->propname, 0, 0, 0, 0, 0, NULL); - } - else { - uiBlockSetButLock(block, 1, ""); - uiDefIconTextBut(block, BUT, 0, ICON_BLANK1, item->propname, x1, y1, width+16, MENU_BUTTON_HEIGHT-1, NULL, 0.0, 0.0, 0, 0, ""); - uiBlockClearButLock(block); - } - - y1 -= MENU_BUTTON_HEIGHT; - } - else if(item->type==MENU_ITEM_RNA_ENUM) { - PropertyRNA *prop= RNA_struct_find_property(&item->rnapoin, item->propname); - - if(prop && RNA_property_type(&item->rnapoin, prop) == PROP_ENUM) { - icon= (RNA_property_enum_get(&item->rnapoin, prop) == item->enumval)? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT; - uiDefIconTextButR(block, ROW, 0, icon, NULL, x1, y1, width+16, MENU_BUTTON_HEIGHT-1, &item->rnapoin, item->propname, 0, 0, item->enumval, 0, 0, NULL); - } - else { - uiBlockSetButLock(block, 1, ""); - uiDefIconTextBut(block, BUT, 0, ICON_BLANK1, item->propname, x1, y1, width+16, MENU_BUTTON_HEIGHT-1, NULL, 0.0, 0.0, 0, 0, ""); - uiBlockClearButLock(block); - } - - y1 -= MENU_BUTTON_HEIGHT; - } - else if(item->type == MENU_ITEM_ITEM) { - uiDefIconTextButF(block, BUTM, B_NOP, item->icon, item->name, x1, y1, width+16, MENU_BUTTON_HEIGHT-1, &handle->retvalue, 0.0, 0.0, 0, item->retval, ""); - y1 -= MENU_BUTTON_HEIGHT; - } - else { - uiDefBut(block, SEPR, 0, "", x1, y1, width+16, MENU_SEPR_HEIGHT-1, NULL, 0.0, 0.0, 0, 0, ""); - y1 -= MENU_SEPR_HEIGHT; - } - } + uiBlockLayoutResolve(C, block, NULL, NULL); if(info->popup) { uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_NUMSELECT|UI_BLOCK_RET_1); uiBlockSetDirection(block, UI_DOWN); /* here we set an offset for the mouse position */ - uiMenuPopupBoundsBlock(block, 1, 0, -height+MENU_BUTTON_HEIGHT/2); + uiMenuPopupBoundsBlock(block, 1, 0, 1.5*MENU_BUTTON_HEIGHT); } else { /* for a header menu we set the direction automatic */ @@ -1952,263 +1811,72 @@ static uiBlock *ui_block_func_MENU_ITEM(bContext *C, uiPopupBlockHandle *handle, uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut *but, uiMenuCreateFunc menu_func, void *arg) { + uiStyle *style= U.uistyles.first; uiPopupBlockHandle *handle; - uiMenuItem *head; + uiPopupMenu *pup; uiMenuInfo info; - head= MEM_callocN(sizeof(uiMenuItem), "menu dummy"); - head->opcontext= WM_OP_INVOKE_REGION_WIN; + pup= MEM_callocN(sizeof(uiPopupMenu), "menu dummy"); + pup->block= uiBeginBlock(C, NULL, "ui_popup_menu_create", UI_EMBOSSP); + pup->layout= uiBlockLayout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, style); + uiLayoutContext(pup->layout, WM_OP_INVOKE_REGION_WIN); + + /* create in advance so we can let buttons point to retval already */ + pup->block->handle= MEM_callocN(sizeof(uiPopupBlockHandle), "uiPopupBlockHandle"); - menu_func(C, head, arg); + menu_func(C, pup->layout, arg); memset(&info, 0, sizeof(info)); - info.head= head; + info.pup= pup; info.slideout= (but && (but->block->flag & UI_BLOCK_LOOP)); handle= ui_popup_block_create(C, butregion, but, NULL, ui_block_func_MENU_ITEM, &info); - BLI_freelistN(&head->items); - MEM_freeN(head); + MEM_freeN(pup); return handle; } /*************************** Menu Creating API **************************/ -/* internal add func */ -static uiMenuItem *ui_menu_add_item(uiMenuItem *head, const char *name, int icon, int argval) -{ - uiMenuItem *item= MEM_callocN(sizeof(uiMenuItem), "menu item"); - - BLI_strncpy(item->name, name, MAX_MENU_STR); - if(icon) - item->icon= icon; - else - item->icon= ICON_BLANK1; - item->retval= argval; - - item->opcontext= head->opcontext; - - BLI_addtail(&head->items, item); - - return item; -} - -/* set callback for regular items */ -void uiMenuFunc(uiMenuItem *head, void (*eventfunc)(bContext *, void *, int), void *argv) -{ - head->eventfunc= eventfunc; - head->argv= argv; -} -/* optionally set different context for all items in one level */ -void uiMenuContext(uiMenuItem *head, int opcontext) -{ - head->opcontext= opcontext; -} - - -/* regular item, with retval */ -void uiMenuItemVal(uiMenuItem *head, const char *name, int icon, int argval) -{ - uiMenuItem *item= ui_menu_add_item(head, name, icon, argval); - - item->type = MENU_ITEM_ITEM; -} - -/* regular operator item */ -void uiMenuItemO(uiMenuItem *head, int icon, char *opname) -{ - uiMenuItem *item= ui_menu_add_item(head, "", icon, 0); - - item->opname= opname; // static! - item->type = MENU_ITEM_OPNAME; -} - -/* single operator item with property */ -void uiMenuItemEnumO(uiMenuItem *head, const char *name, int icon, char *opname, char *propname, int value) -{ - uiMenuItem *item= ui_menu_add_item(head, name, icon, 0); - - item->opname= opname; // static! - item->propname= propname; // static! - item->enumval= value; - item->type = MENU_ITEM_OPNAME_ENUM; -} - -/* single operator item with property */ -void uiMenuItemIntO(uiMenuItem *head, const char *name, int icon, char *opname, char *propname, int value) -{ - uiMenuItem *item= ui_menu_add_item(head, name, icon, 0); - - item->opname= opname; // static! - item->propname= propname; // static! - item->intval= value; - item->type = MENU_ITEM_OPNAME_INT; -} - -/* single operator item with property */ -void uiMenuItemFloatO(uiMenuItem *head, const char *name, int icon, char *opname, char *propname, float value) -{ - uiMenuItem *item= ui_menu_add_item(head, name, icon, 0); - - item->opname= opname; // static! - item->propname= propname; // static! - item->fltval= value; - item->type = MENU_ITEM_OPNAME_FLOAT; -} - -/* single operator item with property */ -void uiMenuItemBooleanO(uiMenuItem *head, const char *name, int icon, char *opname, char *propname, int value) -{ - uiMenuItem *item= ui_menu_add_item(head, name, icon, 0); - - item->opname= opname; // static! - item->propname= propname; // static! - item->boolval= value; - item->type = MENU_ITEM_OPNAME_BOOL; -} - -/* single operator item with property */ -void uiMenuItemStringO(uiMenuItem *head, const char *name, int icon, char *opname, char *propname, char *value) -{ - uiMenuItem *item= ui_menu_add_item(head, name, icon, 0); - - item->opname= opname; // static! - item->propname= propname; // static! - item->strval= value; - item->type = MENU_ITEM_OPNAME_STRING; -} - -/* add all operator items with property */ -void uiMenuItemsEnumO(uiMenuItem *head, char *opname, char *propname) -{ - wmOperatorType *ot= WM_operatortype_find(opname); - PointerRNA ptr; - PropertyRNA *prop; - - if(!ot || !ot->srna) - return; - - RNA_pointer_create(NULL, ot->srna, NULL, &ptr); - prop= RNA_struct_find_property(&ptr, propname); - - if(prop && RNA_property_type(&ptr, prop) == PROP_ENUM) { - const EnumPropertyItem *item; - int totitem, i; - - RNA_property_enum_items(&ptr, prop, &item, &totitem); - - for (i=0; i<totitem; i++) - uiMenuItemEnumO(head, "", 0, opname, propname, item[i].value); - } -} - -/* rna property toggle */ -void uiMenuItemBooleanR(uiMenuItem *head, PointerRNA *ptr, char *propname) -{ - uiMenuItem *item= ui_menu_add_item(head, "", 0, 0); - - item->propname= propname; // static! - item->rnapoin= *ptr; - item->type = MENU_ITEM_RNA_BOOL; -} +/*************************** Popup Menu API **************************/ -void uiMenuItemEnumR(uiMenuItem *head, PointerRNA *ptr, char *propname, int value) +/* only return handler, and set optional title */ +uiPopupMenu *uiPupMenuBegin(bContext *C, const char *title, int icon) { - uiMenuItem *item= ui_menu_add_item(head, "", 0, 0); + uiStyle *style= U.uistyles.first; + uiPopupMenu *pup= MEM_callocN(sizeof(uiPopupMenu), "menu start"); + uiBut *but; - item->propname= propname; // static! - item->rnapoin= *ptr; - item->enumval= value; - item->type = MENU_ITEM_RNA_ENUM; -} + pup->block= uiBeginBlock(C, NULL, "uiPupMenuBegin", UI_EMBOSSP); + pup->layout= uiBlockLayout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, style); + uiLayoutContext(pup->layout, WM_OP_EXEC_REGION_WIN); -/* add all rna items with property */ -void uiMenuItemsEnumR(uiMenuItem *head, PointerRNA *ptr, char *propname) -{ - PropertyRNA *prop; - - prop= RNA_struct_find_property(ptr, propname); + /* create in advance so we can let buttons point to retval already */ + pup->block->handle= MEM_callocN(sizeof(uiPopupBlockHandle), "uiPopupBlockHandle"); - if(prop && RNA_property_type(ptr, prop) == PROP_ENUM) { - const EnumPropertyItem *item; - int totitem, i; + /* create title button */ + if(title && title[0]) { + char titlestr[256]; - RNA_property_enum_items(ptr, prop, &item, &totitem); + if(icon) { + sprintf(titlestr, " %s", title); + uiDefIconTextBut(pup->block, LABEL, 0, icon, titlestr, 0, 0, 200, MENU_BUTTON_HEIGHT, NULL, 0.0, 0.0, 0, 0, ""); + } + else { + but= uiDefBut(pup->block, LABEL, 0, (char*)title, 0, 0, 200, MENU_BUTTON_HEIGHT, NULL, 0.0, 0.0, 0, 0, ""); + but->flag= UI_TEXT_LEFT; + } - for (i=0; i<totitem; i++) - uiMenuItemEnumR(head, ptr, propname, item[i].value); + //uiDefBut(block, SEPR, 0, "", startx, (short)(starty+height)-MENU_SEPR_HEIGHT, width, MENU_SEPR_HEIGHT, NULL, 0.0, 0.0, 0, 0, ""); } -} - -/* generic new menu level */ -void uiMenuLevel(uiMenuItem *head, const char *name, uiMenuCreateFunc newlevel) -{ - uiMenuItem *item= ui_menu_add_item(head, name, 0, 0); - - item->type = MENU_ITEM_LEVEL; - item->newlevel= newlevel; -} - -/* make a new level from enum properties */ -void uiMenuLevelEnumO(uiMenuItem *head, char *opname, char *propname) -{ - uiMenuItem *item= ui_menu_add_item(head, "", 0, 0); - wmOperatorType *ot; - - item->type = MENU_ITEM_LEVEL_OPNAME_ENUM; - ot= WM_operatortype_find(opname); - if(ot) - BLI_strncpy(item->name, ot->name, MAX_MENU_STR); - - item->opname= opname; // static! - item->propname= propname; // static! -} - -/* make a new level from enum properties */ -void uiMenuLevelEnumR(uiMenuItem *head, PointerRNA *ptr, char *propname) -{ - uiMenuItem *item= ui_menu_add_item(head, "", 0, 0); - PropertyRNA *prop; - - item->type = MENU_ITEM_LEVEL_RNA_ENUM; - prop= RNA_struct_find_property(ptr, propname); - if(prop) - BLI_strncpy(item->name, RNA_property_ui_name(ptr, prop), MAX_MENU_STR); - item->rnapoin= *ptr; - item->propname= propname; // static! -} - -/* separator */ -void uiMenuSeparator(uiMenuItem *head) -{ - uiMenuItem *item= ui_menu_add_item(head, "", 0, 0); - - item->type = MENU_ITEM_SEPARATOR; -} - -/*************************** Popup Menu API **************************/ - -/* only return handler, and set optional title */ -uiMenuItem *uiPupMenuBegin(const char *title, int icon) -{ - uiMenuItem *item= MEM_callocN(sizeof(uiMenuItem), "menu start"); - - item->type = MENU_ITEM_TITLE; - item->opcontext= WM_OP_EXEC_REGION_WIN; - item->icon= icon; - - /* NULL is no title */ - if(title) - BLI_strncpy(item->name, title, MAX_MENU_STR); - - return item; + return pup; } /* set the whole structure to work */ -void uiPupMenuEnd(bContext *C, uiMenuItem *head) +void uiPupMenuEnd(bContext *C, uiPopupMenu *pup) { wmWindow *window= CTX_wm_window(C); uiMenuInfo info; @@ -2218,7 +1886,7 @@ void uiPupMenuEnd(bContext *C, uiMenuItem *head) info.popup= 1; info.mx= window->eventstate->x; info.my= window->eventstate->y; - info.head= head; + info.pup= pup; menu= ui_popup_block_create(C, NULL, NULL, NULL, ui_block_func_MENU_ITEM, &info); menu->popup= 1; @@ -2226,8 +1894,12 @@ void uiPupMenuEnd(bContext *C, uiMenuItem *head) UI_add_popup_handlers(C, &window->handlers, menu); WM_event_add_mousemove(C); - BLI_freelistN(&head->items); - MEM_freeN(head); + MEM_freeN(pup); +} + +uiLayout *uiPupMenuLayout(uiPopupMenu *pup) +{ + return pup->layout; } /* ************** standard pupmenus *************** */ @@ -2396,7 +2068,7 @@ void uiPupBlockO(bContext *C, uiBlockCreateFunc func, void *arg, char *opname, i handle= ui_popup_block_create(C, NULL, NULL, func, NULL, arg); handle->popup= 1; - handle->opname= opname; + handle->optype= (opname)? WM_operatortype_find(opname): NULL; handle->opcontext= opcontext; UI_add_popup_handlers(C, &window->handlers, handle); diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c new file mode 100644 index 00000000000..34f4d7294ee --- /dev/null +++ b/source/blender/editors/interface/interface_style.c @@ -0,0 +1,267 @@ +/** +* ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2009 Blender Foundation. + * All rights reserved. + * + * Contributor(s): Blender Foundation + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include <limits.h> +#include <math.h> +#include <stdlib.h> +#include <string.h> + +#include "MEM_guardedalloc.h" + +#include "DNA_ID.h" +#include "DNA_screen_types.h" +#include "DNA_userdef_types.h" +#include "DNA_windowmanager_types.h" + +#include "BLI_arithb.h" +#include "BLI_listbase.h" +#include "BLI_rect.h" +#include "BLI_string.h" + +#include "BKE_context.h" +#include "BKE_global.h" +#include "BKE_utildefines.h" + +#include "BIF_gl.h" +#include "BIF_glutil.h" + +#include "BLF_api.h" + +#include "UI_interface.h" +#include "UI_interface_icons.h" +#include "UI_resources.h" +#include "UI_view2d.h" + +#include "ED_datafiles.h" +#include "ED_util.h" +#include "ED_types.h" + +#include "interface_intern.h" + + +/* style + theme + layout-engine = UI */ + +/* + This is a complete set of layout rules, the 'state' of the Layout + Engine. Multiple styles are possible, defined via C or Python. Styles + get a name, and will typically get activated per region type, like + "Header", or "Listview" or "Toolbar". Properties of Style definitions + are: + + - default collumn properties, internal spacing, aligning, min/max width + - button alignment rules (for groups) + - label placement rules + - internal labeling or external labeling default + - default minimum widths for buttons/labels (in amount of characters) + - font types, styles and relative sizes for Panel titles, labels, etc. + +*/ + + +/* ********************************************** */ + +static uiStyle *ui_style_new(ListBase *styles, const char *name) +{ + uiStyle *style= MEM_callocN(sizeof(uiStyle), "new style"); + + BLI_addtail(styles, style); + BLI_strncpy(style->name, name, MAX_STYLE_NAME); + + style->paneltitle.uifont_id= UIFONT_DEFAULT; + style->paneltitle.points= 13; + style->paneltitle.shadow= 5; + style->paneltitle.shadx= 2; + style->paneltitle.shady= -2; + style->paneltitle.shadowalpha= 0.25f; + style->paneltitle.shadowcolor= 0.0f; + + style->grouplabel.uifont_id= UIFONT_DEFAULT; + style->grouplabel.points= 12; + style->grouplabel.shadow= 3; + style->grouplabel.shadx= 1; + style->grouplabel.shady= -1; + style->grouplabel.shadowalpha= 0.25f; + + style->widgetlabel.uifont_id= UIFONT_DEFAULT; + style->widgetlabel.points= 11; + style->widgetlabel.shadow= 3; + style->widgetlabel.shadx= 1; + style->widgetlabel.shady= -1; + style->widgetlabel.shadowalpha= 0.3f; + style->widgetlabel.shadowcolor= 1.0f; + + style->widget.uifont_id= UIFONT_DEFAULT; + style->widget.points= 11; + style->widget.shadowalpha= 0.25f; + + style->columnspace= 5; + style->templatespace= 5; + style->boxspace= 5; + style->buttonspacex= 5; + style->buttonspacey= 2; + style->panelspace= 8; + style->panelouter= 4; + + return style; +} + +static uiFont *uifont_to_blfont(int id) +{ + uiFont *font= U.uifonts.first; + + for(; font; font= font->next) { + if(font->uifont_id==id) { + return font; + } + } + return U.uifonts.first; +} + +/* *************** draw ************************ */ + +static void ui_font_shadow_draw(uiFontStyle *fs, int x, int y, char *str) +{ + float color[4]; + + glGetFloatv(GL_CURRENT_COLOR, color); + + glColor4f(fs->shadowcolor, fs->shadowcolor, fs->shadowcolor, fs->shadowalpha); + + BLF_blur(fs->shadow); + BLF_position(x+fs->shadx, y+fs->shady, 0.0f); + BLF_draw(str); + BLF_blur(0); + + glColor4fv(color); +} + +void uiStyleFontDraw(uiFontStyle *fs, rcti *rect, char *str) +{ + float height; + int xofs=0, yofs; + + uiStyleFontSet(fs); + + height= BLF_height("A"); + yofs= floor( 0.5f*(rect->ymax - rect->ymin - height)); + + if(fs->align==UI_STYLE_TEXT_CENTER) + xofs= floor( 0.5f*(rect->xmax - rect->xmin - BLF_width(str))); + else if(fs->align==UI_STYLE_TEXT_RIGHT) + xofs= rect->xmax - rect->xmin - BLF_width(str); + + /* clip is very strict, so we give it some space */ + BLF_clipping(rect->xmin-4, rect->ymin-4, rect->xmax+4, rect->ymax+4); + BLF_enable(BLF_CLIPPING); + + if(fs->shadow) + ui_font_shadow_draw(fs, rect->xmin+xofs, rect->ymin+yofs, str); + + BLF_position(rect->xmin+xofs, rect->ymin+yofs, 0.0f); + BLF_draw(str); + + BLF_disable(BLF_CLIPPING); +} + +/* ************** helpers ************************ */ + +/* temporarily, does widget font */ +int UI_GetStringWidth(char *str) +{ + uiStyle *style= U.uistyles.first; + + uiStyleFontSet(&style->widget); + return BLF_width(str); +} + +/* temporarily, does widget font */ +void UI_DrawString(float x, float y, char *str) +{ + uiStyle *style= U.uistyles.first; + + uiStyleFontSet(&style->widget); + BLF_position(x, y, 0.0f); + BLF_draw(str); +} + +/* ************** init exit ************************ */ + +/* called on each .B.blend read */ +/* reading without uifont will create one */ +void uiStyleInit(void) +{ + uiFont *font= U.uifonts.first; + uiStyle *style= U.uistyles.first; + + /* recover from uninitialized dpi */ + CLAMP(U.dpi, 72, 240); + + /* default builtin */ + if(font==NULL) { + font= MEM_callocN(sizeof(uiFont), "ui font"); + BLI_addtail(&U.uifonts, font); + + strcpy(font->filename, "default"); + font->uifont_id= UIFONT_DEFAULT; + } + + for(font= U.uifonts.first; font; font= font->next) { + + if(font->uifont_id==UIFONT_DEFAULT) { + font->blf_id= BLF_load_mem("default", (unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size); + } + else { + font->blf_id= BLF_load(font->filename); + if(font->blf_id == -1) + font->blf_id= BLF_load_mem("default", (unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size); + } + + if (font->blf_id == -1) + printf("uiStyleInit error, no fonts available\n"); + else { + BLF_set(font->blf_id); + /* ? just for speed to initialize? + * Yes, this build the glyph cache and create + * the texture. + */ + BLF_size(11, U.dpi); + BLF_size(12, U.dpi); + BLF_size(14, U.dpi); + } + } + + if(style==NULL) { + ui_style_new(&U.uistyles, "Default Style"); + } +} + +void uiStyleFontSet(uiFontStyle *fs) +{ + uiFont *font= uifont_to_blfont(fs->uifont_id); + + BLF_set(font->blf_id); + BLF_size(fs->points, U.dpi); +} + diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c new file mode 100644 index 00000000000..8969e2b69ae --- /dev/null +++ b/source/blender/editors/interface/interface_templates.c @@ -0,0 +1,238 @@ +/** + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Contributor(s): Blender Foundation 2009. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include <stdlib.h> + +#include "MEM_guardedalloc.h" + +#include "BLI_string.h" + +#include "BKE_context.h" +#include "BKE_library.h" +#include "BKE_utildefines.h" + +#include "ED_screen.h" + +#include "RNA_access.h" + +#include "WM_api.h" +#include "WM_types.h" + +#include "UI_interface.h" +#include "UI_resources.h" + +void ui_template_fix_linking() +{ +} + +/********************** Header Template *************************/ + +void uiTemplateHeader(uiLayout *layout, bContext *C) +{ + uiBlock *block; + + block= uiLayoutFreeBlock(layout); + ED_area_header_standardbuttons(C, block, 0); +} + +/******************* Header ID Template ************************/ + +typedef struct TemplateHeaderID { + PointerRNA ptr; + PropertyRNA *prop; + + int flag; + short browse; + + char newop[256]; + char openop[256]; + char unlinkop[256]; +} TemplateHeaderID; + +static void template_header_id_cb(bContext *C, void *arg_litem, void *arg_event) +{ + TemplateHeaderID *template= (TemplateHeaderID*)arg_litem; + PointerRNA idptr= RNA_property_pointer_get(&template->ptr, template->prop); + ID *idtest, *id= idptr.data; + ListBase *lb= wich_libbase(CTX_data_main(C), ID_TXT); + int nr, event= GET_INT_FROM_POINTER(arg_event); + + if(event == UI_ID_BROWSE && template->browse == 32767) + event= UI_ID_ADD_NEW; + else if(event == UI_ID_BROWSE && template->browse == 32766) + event= UI_ID_OPEN; + + switch(event) { + case UI_ID_BROWSE: { + if(template->browse== -2) { + /* XXX implement or find a replacement + * activate_databrowse((ID *)G.buts->lockpoin, GS(id->name), 0, B_MESHBROWSE, &template->browse, do_global_buttons); */ + return; + } + if(template->browse < 0) + return; + + for(idtest=lb->first, nr=1; idtest; idtest=idtest->next, nr++) { + if(nr==template->browse) { + if(id == idtest) + return; + + id= idtest; + RNA_id_pointer_create(id, &idptr); + RNA_property_pointer_set(&template->ptr, template->prop, idptr); + RNA_property_update(C, &template->ptr, template->prop); + /* XXX */ + + break; + } + } + break; + } +#if 0 + case UI_ID_DELETE: + id= NULL; + break; + case UI_ID_FAKE_USER: + if(id) { + if(id->flag & LIB_FAKEUSER) id->us++; + else id->us--; + } + else return; + break; +#endif + case UI_ID_PIN: + break; + case UI_ID_ADD_NEW: + WM_operator_name_call(C, template->newop, WM_OP_INVOKE_REGION_WIN, NULL); + break; + case UI_ID_OPEN: + WM_operator_name_call(C, template->openop, WM_OP_INVOKE_REGION_WIN, NULL); + break; +#if 0 + case UI_ID_ALONE: + if(!id || id->us < 1) + return; + break; + case UI_ID_LOCAL: + if(!id || id->us < 1) + return; + break; + case UI_ID_AUTO_NAME: + break; +#endif + } +} + +static void template_header_ID(bContext *C, uiBlock *block, TemplateHeaderID *template) +{ + uiBut *but; + TemplateHeaderID *duptemplate; + PointerRNA idptr; + ListBase *lb; + int x= 0, y= 0; + + idptr= RNA_property_pointer_get(&template->ptr, template->prop); + lb= wich_libbase(CTX_data_main(C), ID_TXT); + + uiBlockBeginAlign(block); + if(template->flag & UI_ID_BROWSE) { + char *extrastr, *str; + + if((template->flag & UI_ID_ADD_NEW) && (template->flag && UI_ID_OPEN)) + extrastr= "OPEN NEW %x 32766 |ADD NEW %x 32767"; + else if(template->flag & UI_ID_ADD_NEW) + extrastr= "ADD NEW %x 32767"; + else if(template->flag & UI_ID_OPEN) + extrastr= "OPEN NEW %x 32766"; + else + extrastr= NULL; + + duptemplate= MEM_dupallocN(template); + IDnames_to_pupstring(&str, NULL, extrastr, lb, idptr.data, &duptemplate->browse); + + but= uiDefButS(block, MENU, 0, str, x, y, UI_UNIT_X, UI_UNIT_Y, &duptemplate->browse, 0, 0, 0, 0, "Browse existing choices, or add new"); + uiButSetNFunc(but, template_header_id_cb, duptemplate, SET_INT_IN_POINTER(UI_ID_BROWSE)); + x+= UI_UNIT_X; + + MEM_freeN(str); + } + + /* text button with name */ + if(idptr.data) { + char name[64]; + + text_idbutton(idptr.data, name); + but= uiDefButR(block, TEX, 0, name, x, y, UI_UNIT_X*6, UI_UNIT_Y, &idptr, "name", -1, 0, 0, -1, -1, NULL); + uiButSetNFunc(but, template_header_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_RENAME)); + x += UI_UNIT_X*6; + + /* delete button */ + if(template->flag & UI_ID_DELETE) { + but= uiDefIconButO(block, BUT, template->unlinkop, WM_OP_EXEC_REGION_WIN, ICON_X, x, y, UI_UNIT_X, UI_UNIT_Y, NULL); + x += UI_UNIT_X; + } + } + uiBlockEndAlign(block); +} + +void uiTemplateHeaderID(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname, char *newop, char *openop, char *unlinkop) +{ + TemplateHeaderID *template; + uiBlock *block; + PropertyRNA *prop; + + if(!ptr->data) + return; + + prop= RNA_struct_find_property(ptr, propname); + + if(!prop) { + printf("uiTemplateHeaderID: property not found: %s\n", propname); + return; + } + + template= MEM_callocN(sizeof(TemplateHeaderID), "TemplateHeaderID"); + template->ptr= *ptr; + template->prop= prop; + template->flag= UI_ID_BROWSE|UI_ID_RENAME; + + if(newop) { + template->flag |= UI_ID_ADD_NEW; + BLI_strncpy(template->newop, newop, sizeof(template->newop)); + } + if(openop) { + template->flag |= UI_ID_OPEN; + BLI_strncpy(template->openop, openop, sizeof(template->openop)); + } + if(unlinkop) { + template->flag |= UI_ID_DELETE; + BLI_strncpy(template->unlinkop, unlinkop, sizeof(template->unlinkop)); + } + + block= uiLayoutFreeBlock(layout); + template_header_ID(C, block, template); + + MEM_freeN(template); +} + diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c index 429b2de0227..4521bd57a3a 100644 --- a/source/blender/editors/interface/interface_utils.c +++ b/source/blender/editors/interface/interface_utils.c @@ -55,6 +55,8 @@ #include "WM_api.h" #include "WM_types.h" +#include "interface_intern.h" + #define DEF_BUT_WIDTH 150 #define DEF_ICON_BUT_WIDTH 20 #define DEF_BUT_HEIGHT 20 @@ -88,7 +90,7 @@ int UI_GetIconRNA(PointerRNA *ptr) else if(rnatype == &RNA_Curve) return ICON_CURVE_DATA; else if(rnatype == &RNA_MetaBall) - return ICON_MBALL_DATA; + return ICON_META_DATA; else if(rnatype == &RNA_MetaElement) return ICON_OUTLINER_DATA_META; else if(rnatype == &RNA_Lattice) @@ -140,7 +142,7 @@ int UI_GetIconRNA(PointerRNA *ptr) else if(rnatype == &RNA_Brush) return ICON_BRUSH_DATA; else if(rnatype == &RNA_VectorFont) - return ICON_FONT; + return ICON_FONT_DATA; else if(rnatype == &RNA_Library) return ICON_LIBRARY_DATA_DIRECT; else if(rnatype == &RNA_Action) @@ -202,7 +204,7 @@ int UI_GetIconRNA(PointerRNA *ptr) else if(rnatype == &RNA_BooleanModifier) return ICON_MOD_BOOLEAN; else if(rnatype == &RNA_ParticleInstanceModifier) - return ICON_MOD_PARTICLEINSTANCE; + return ICON_MOD_PARTICLES; else if(rnatype == &RNA_ParticleSystemModifier) return ICON_MOD_PARTICLES; else if(rnatype == &RNA_EdgeSplitModifier) @@ -213,6 +215,30 @@ int UI_GetIconRNA(PointerRNA *ptr) return ICON_MOD_UVPROJECT; else if(rnatype == &RNA_DisplaceModifier) return ICON_MOD_DISPLACE; + else if(rnatype == &RNA_ShrinkwrapModifier) + return ICON_MOD_SHRINKWRAP; + else if(rnatype == &RNA_CastModifier) + return ICON_MOD_CAST; + else if(rnatype == &RNA_MeshDeformModifier) + return ICON_MOD_MESHDEFORM; + else if(rnatype == &RNA_BevelModifier) + return ICON_MOD_BEVEL; + else if(rnatype == &RNA_SmoothModifier) + return ICON_MOD_SMOOTH; + else if(rnatype == &RNA_SimpleDeformModifier) + return ICON_MOD_SIMPLEDEFORM; + else if(rnatype == &RNA_MaskModifier) + return ICON_MOD_MASK; + else if(rnatype == &RNA_ClothModifier) + return ICON_MOD_CLOTH; + else if(rnatype == &RNA_ExplodeModifier) + return ICON_MOD_EXPLODE; + else if(rnatype == &RNA_CollisionModifier) + return ICON_MOD_PHYSICS; + else if(rnatype == &RNA_FluidSimulationModifier) + return ICON_MOD_FLUIDSIM; + else if(rnatype == &RNA_MultiresModifier) + return ICON_MOD_MULTIRES; else return ICON_DOT; } @@ -220,17 +246,17 @@ int UI_GetIconRNA(PointerRNA *ptr) uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int index, char *name, int icon, int x1, int y1, int x2, int y2) { uiBut *but=NULL; - const char *propname= RNA_property_identifier(ptr, prop); - int arraylen= RNA_property_array_length(ptr, prop); + const char *propname= RNA_property_identifier(prop); + int arraylen= RNA_property_array_length(prop); - switch(RNA_property_type(ptr, prop)) { + switch(RNA_property_type(prop)) { case PROP_BOOLEAN: { int value, length; if(arraylen && index == -1) return NULL; - length= RNA_property_array_length(ptr, prop); + length= RNA_property_array_length(prop); if(length) value= RNA_property_boolean_get_index(ptr, prop, index); @@ -248,10 +274,10 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind case PROP_INT: case PROP_FLOAT: if(arraylen && index == -1) { - if(RNA_property_subtype(ptr, prop) == PROP_COLOR) + if(RNA_property_subtype(prop) == PROP_COLOR) but= uiDefButR(block, COL, 0, name, x1, y1, x2, y2, ptr, propname, 0, 0, 0, -1, -1, NULL); } - else if(RNA_property_subtype(ptr, prop) == PROP_PERCENTAGE) + else if(RNA_property_subtype(prop) == PROP_PERCENTAGE) but= uiDefButR(block, NUMSLI, 0, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); else but= uiDefButR(block, NUM, 0, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); @@ -264,35 +290,14 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind break; case PROP_POINTER: { PointerRNA pptr; - PropertyRNA *nameprop; - char *text, *descr, textbuf[256]; int icon; pptr= RNA_property_pointer_get(ptr, prop); - descr= (char*)RNA_property_ui_description(ptr, prop); - if(!pptr.type) - pptr.type= RNA_property_pointer_type(ptr, prop); - + pptr.type= RNA_property_pointer_type(prop); icon= UI_GetIconRNA(&pptr); - if(pptr.data == NULL) { - but= uiDefIconTextBut(block, LABEL, 0, icon, "", x1, y1, x2, y2, NULL, 0, 0, 0, 0, ""); - } - else { - nameprop= RNA_struct_name_property(&pptr); - - if(nameprop) { - text= RNA_property_string_get_alloc(&pptr, nameprop, textbuf, sizeof(textbuf)); - but= uiDefIconTextBut(block, LABEL, 0, icon, text, x1, y1, x2, y2, NULL, 0, 0, 0, 0, descr); - if(text != textbuf) - MEM_freeN(text); - } - else { - text= (char*)RNA_struct_ui_name(&pptr); - but= uiDefIconTextBut(block, LABEL, 0, icon, text, x1, y1, x2, y2, NULL, 0, 0, 0, 0, descr); - } - } + but= uiDefIconTextButR(block, IDPOIN, 0, icon, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); break; } case PROP_COLLECTION: { @@ -310,39 +315,61 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind return but; } -int uiDefAutoButsRNA(const bContext *C, uiBlock *block, PointerRNA *ptr) +void uiDefAutoButsRNA(const bContext *C, uiLayout *layout, PointerRNA *ptr) { CollectionPropertyIterator iter; PropertyRNA *iterprop, *prop; - uiLayout *layout; + uiLayout *split; char *name; - int x= 0, y= 0; - - layout= uiLayoutBegin(UI_LAYOUT_VERTICAL, x, y, DEF_BUT_WIDTH*2, 0); - uiTemplateColumn(layout); - uiItemLabel(layout, UI_TSLOT_COLUMN_1, (char*)RNA_struct_ui_name(ptr), 0); + uiItemL(layout, (char*)RNA_struct_ui_name(ptr->type), 0); - iterprop= RNA_struct_iterator_property(ptr); + iterprop= RNA_struct_iterator_property(ptr->type); RNA_property_collection_begin(ptr, iterprop, &iter); for(; iter.valid; RNA_property_collection_next(&iter)) { prop= iter.ptr.data; - if(strcmp(RNA_property_identifier(ptr, prop), "rna_type") == 0) + if(strcmp(RNA_property_identifier(prop), "rna_type") == 0) continue; - uiTemplateColumn(layout); + split = uiLayoutSplit(layout); + + name= (char*)RNA_property_ui_name(prop); - name= (char*)RNA_property_ui_name(ptr, prop); - uiItemLabel(layout, UI_TSLOT_COLUMN_1, name, 0); - uiItemR(layout, UI_TSLOT_COLUMN_2, "", 0, ptr, (char*)RNA_property_identifier(ptr, prop)); + uiItemL(uiLayoutColumn(split, 0), name, 0); + uiItemFullR(uiLayoutColumn(split, 0), "", 0, ptr, prop, -1, 0, 0, 0); } RNA_property_collection_end(&iter); - uiLayoutEnd(C, block, layout, &x, &y); +} - return -y; +/* temp call, single collumn, test for toolbar only */ +void uiDefAutoButsRNA_single(const bContext *C, uiLayout *layout, PointerRNA *ptr) +{ + CollectionPropertyIterator iter; + PropertyRNA *iterprop, *prop; + uiLayout *col; + char *name; + + uiItemL(layout, (char*)RNA_struct_ui_name(ptr->type), 0); + + iterprop= RNA_struct_iterator_property(ptr->type); + RNA_property_collection_begin(ptr, iterprop, &iter); + + for(; iter.valid; RNA_property_collection_next(&iter)) { + prop= iter.ptr.data; + + if(strcmp(RNA_property_identifier(prop), "rna_type") == 0) + continue; + + name= (char*)RNA_property_ui_name(prop); + col= uiLayoutColumn(layout, 1); + uiItemL(col, name, 0); + uiItemFullR(col, "", 0, ptr, prop, -1, 0, 0, 0); + } + + RNA_property_collection_end(&iter); } /***************************** ID Utilities *******************************/ @@ -377,11 +404,11 @@ static void idpoin_cb(bContext *C, void *arg_params, void *arg_event) else return; break; case UI_ID_BROWSE: { - if(id==0) id= lb->first; - if(id==0) return; + /* ID can be NULL, if nothing was assigned yet */ + if(lb->first==NULL) return; if(params->browsenr== -2) { - /* XXX implement or find a replacement + /* XXX implement or find a replacement (ID can be NULL!) * activate_databrowse((ID *)G.buts->lockpoin, GS(id->name), 0, B_MESHBROWSE, ¶ms->browsenr, do_global_buttons); */ return; } @@ -438,7 +465,7 @@ int uiDefIDPoinButs(uiBlock *block, Main *bmain, ID *parid, ID *id, int id_code, uiBut *but; uiIDPoinParams *params, *dup_params; char *str=NULL, str1[10]; - int len, oldcol, add_addbutton=0; + int len, add_addbutton=0; /* setup struct that we will pass on with the buttons */ params= MEM_callocN(sizeof(uiIDPoinParams), "uiIDPoinParams"); @@ -450,14 +477,15 @@ int uiDefIDPoinButs(uiBlock *block, Main *bmain, ID *parid, ID *id, int id_code, /* create buttons */ uiBlockBeginAlign(block); - oldcol= uiBlockGetCol(block); + /* XXX solve? if(id && id->us>1) uiBlockSetCol(block, TH_BUT_SETTING1); if((events & UI_ID_PIN) && *pin_p) uiBlockSetCol(block, TH_BUT_SETTING2); - + */ + /* pin button */ if(id && (events & UI_ID_PIN)) { but= uiDefIconButS(block, ICONTOG, (events & UI_ID_PIN), ICON_KEY_DEHLT, x, y ,DEF_ICON_BUT_WIDTH,DEF_BUT_HEIGHT, pin_p, 0, 0, 0, 0, "Keeps this view displaying the current data regardless of what object is selected"); @@ -507,37 +535,24 @@ int uiDefIDPoinButs(uiBlock *block, Main *bmain, ID *parid, ID *id, int id_code, MEM_freeN(str); } - uiBlockSetCol(block, oldcol); - /* text button with name */ if(id) { - /* name */ + /* XXX solve? if(id->us > 1) uiBlockSetCol(block, TH_BUT_SETTING1); - - /* pinned data? */ + */ + /* pinned data? if((events & UI_ID_PIN) && *pin_p) uiBlockSetCol(block, TH_BUT_SETTING2); - - /* redalert overrides pin color */ + */ + /* redalert overrides pin color if(id->us<=0) uiBlockSetCol(block, TH_REDALERT); - + */ uiBlockSetButLock(block, id->lib!=0, "Can't edit external libdata"); /* name button */ - if(GS(id->name)==ID_SCE) - strcpy(str1, "SCE:"); - else if(GS(id->name)==ID_SCE) - strcpy(str1, "SCR:"); - else if(GS(id->name)==ID_MA && ((Material*)id)->use_nodes) - strcpy(str1, "NT:"); - else { - str1[0]= id->name[0]; - str1[1]= id->name[1]; - str1[2]= ':'; - str1[3]= 0; - } + text_idbutton(id, str1); if(GS(id->name)==ID_IP) len= 110; else if((y) && (GS(id->name)==ID_AC)) len= 100; // comes from button panel (poselib) @@ -611,7 +626,6 @@ int uiDefIDPoinButs(uiBlock *block, Main *bmain, ID *parid, ID *id, int id_code, } /* add new button */ else if(add_addbutton) { - uiBlockSetCol(block, oldcol); if(parid) uiBlockSetButLock(block, parid->lib!=0, "Can't edit external libdata"); dup_params= MEM_dupallocN(params); but= uiDefButS(block, TOG, 0, "Add New", x, y, 110, DEF_BUT_HEIGHT, &dup_params->browsenr, params->browsenr, 32767.0, 0, 0, "Add new data block"); @@ -619,7 +633,6 @@ int uiDefIDPoinButs(uiBlock *block, Main *bmain, ID *parid, ID *id, int id_code, x+= 110; } - uiBlockSetCol(block, oldcol); uiBlockEndAlign(block); MEM_freeN(params); @@ -934,7 +947,7 @@ static uiBlock *curvemap_clipping_func(struct bContext *C, struct ARegion *ar, v uiBlock *block; uiBut *bt; - block= uiBeginBlock(C, ar, "curvemap_clipping_func", UI_EMBOSS, UI_HELV); + block= uiBeginBlock(C, ar, "curvemap_clipping_func", UI_EMBOSS); /* use this for a fake extra empy space around the buttons */ uiDefBut(block, LABEL, 0, "", -4, 16, 128, 106, NULL, 0, 0, 0, 0, ""); @@ -994,7 +1007,7 @@ static uiBlock *curvemap_tools_func(struct bContext *C, struct ARegion *ar, void uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "curvemap_tools_func", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "curvemap_tools_func", UI_EMBOSS); uiBlockSetButmFunc(block, curvemap_tools_dofunc, cumap_v); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Reset View", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, ""); diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index be7bb5c09d8..18b39518ee6 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -31,8 +31,8 @@ #include "MEM_guardedalloc.h" #include "DNA_ID.h" -#include "DNA_scene_types.h" #include "DNA_screen_types.h" +#include "DNA_userdef_types.h" #include "DNA_windowmanager_types.h" #include "BLI_arithb.h" @@ -41,30 +41,20 @@ #include "BKE_context.h" #include "BKE_global.h" -#include "BKE_idprop.h" #include "BKE_utildefines.h" -#include "RNA_access.h" - #include "BIF_gl.h" +#include "BIF_glutil.h" + +#include "BLF_api.h" #include "UI_interface.h" #include "UI_interface_icons.h" #include "UI_resources.h" -#include "UI_text.h" #include "UI_view2d.h" #include "ED_util.h" #include "ED_types.h" -#include "ED_screen.h" - -#include "WM_api.h" -#include "WM_types.h" - -#include "BMF_Api.h" -#ifdef INTERNATIONAL -#include "FTF_Api.h" -#endif #include "interface_intern.h" @@ -94,17 +84,14 @@ typedef struct uiWidgetTrias { } uiWidgetTrias; -typedef struct uiWidgetColors { - float outline[3]; - float inner[3]; - float inner_sel[3]; - float item[3]; - float text[3]; - float text_sel[3]; - short shaded; - float shadetop, shadedown; - -} uiWidgetColors; +typedef struct uiWidgetStateColors { + char inner_anim[4]; + char inner_anim_sel[4]; + char inner_key[4]; + char inner_key_sel[4]; + char inner_driven[4]; + char inner_driven_sel[4]; +} uiWidgetStateColors; typedef struct uiWidgetBase { @@ -113,11 +100,33 @@ typedef struct uiWidgetBase { float inner_v[64][2]; float inner_uv[64][2]; + short inner, outline, emboss; /* set on/off */ + uiWidgetTrias tria1; uiWidgetTrias tria2; } uiWidgetBase; +/* uiWidgetType: for time being only for visual appearance, + later, a handling callback can be added too +*/ +typedef struct uiWidgetType { + + /* pointer to theme color definition */ + uiWidgetColors *wcol_theme; + + /* converted colors for state */ + uiWidgetColors wcol; + + void (*state)(struct uiWidgetType *, int state); + void (*draw)(uiWidgetColors *, rcti *, int state, int roundboxalign); + void (*custom)(uiBut *, uiWidgetColors *, rcti *, int state, int roundboxalign); + void (*text)(uiFontStyle *, uiWidgetColors *, uiBut *, rcti *); + +} uiWidgetType; + + +/* *********************** draw data ************************** */ static float cornervec[9][2]= {{0.0, 0.0}, {0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293}, {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}, {1.0, 1.0}}; @@ -151,21 +160,132 @@ static float check_tria_vert[6][2]= { static int check_tria_face[4][3]= { {3, 2, 4}, {3, 4, 5}, {1, 0, 3}, {0, 2, 3}}; +/* ************************************************* */ + +void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y3) +{ + float color[4]; + int j; + + glEnable(GL_BLEND); + glGetFloatv(GL_CURRENT_COLOR, color); + color[3]= 0.125; + glColor4fv(color); + + /* for each AA step */ + for(j=0; j<8; j++) { + glTranslatef(1.0*jit[j][0], 1.0*jit[j][1], 0.0f); + + glBegin(GL_POLYGON); + glVertex2f(x1, y1); + glVertex2f(x2, y2); + glVertex2f(x3, y3); + glEnd(); + + glTranslatef(-1.0*jit[j][0], -1.0*jit[j][1], 0.0f); + } + glDisable(GL_BLEND); + +} -static void widget_init(uiWidgetBase *wt) +static void widget_init(uiWidgetBase *wtb) { - wt->totvert= wt->halfwayvert= 0; - wt->tria1.tot= 0; - wt->tria2.tot= 0; + wtb->totvert= wtb->halfwayvert= 0; + wtb->tria1.tot= 0; + wtb->tria2.tot= 0; + + wtb->inner= 1; + wtb->outline= 1; + wtb->emboss= 1; +} + +/* helper call, makes shadow rect, with 'sun' above menu, so only shadow to left/right/bottom */ +/* return tot */ +static int round_box_shadow_edges(float (*vert)[2], rcti *rect, float rad, int roundboxalign, float step) +{ + float vec[9][2]; + float minx, miny, maxx, maxy; + int a, tot= 0; + + rad+= step; + + if(2.0f*rad > rect->ymax-rect->ymin) + rad= 0.5f*(rect->ymax-rect->ymin); + + minx= rect->xmin-step; + miny= rect->ymin-step; + maxx= rect->xmax+step; + maxy= rect->ymax+step; + + /* mult */ + for(a=0; a<9; a++) { + vec[a][0]= rad*cornervec[a][0]; + vec[a][1]= rad*cornervec[a][1]; + } + + /* start with left-top, anti clockwise */ + if(roundboxalign & 1) { + for(a=0; a<9; a++, tot++) { + vert[tot][0]= minx+rad-vec[a][0]; + vert[tot][1]= maxy-vec[a][1]; + } + } + else { + for(a=0; a<9; a++, tot++) { + vert[tot][0]= minx; + vert[tot][1]= maxy; + } + } + + if(roundboxalign & 8) { + for(a=0; a<9; a++, tot++) { + vert[tot][0]= minx+vec[a][1]; + vert[tot][1]= miny+rad-vec[a][0]; + } + } + else { + for(a=0; a<9; a++, tot++) { + vert[tot][0]= minx; + vert[tot][1]= miny; + } + } + + if(roundboxalign & 4) { + for(a=0; a<9; a++, tot++) { + vert[tot][0]= maxx-rad+vec[a][0]; + vert[tot][1]= miny+vec[a][1]; + } + } + else { + for(a=0; a<9; a++, tot++) { + vert[tot][0]= maxx; + vert[tot][1]= miny; + } + } + + if(roundboxalign & 2) { + for(a=0; a<9; a++, tot++) { + vert[tot][0]= maxx-vec[a][1]; + vert[tot][1]= maxy-rad+vec[a][0]; + } + } + else { + for(a=0; a<9; a++, tot++) { + vert[tot][0]= maxx; + vert[tot][1]= maxy; + } + } + return tot; } -static void round_box_edges(uiWidgetBase *wt, int roundboxtype, rcti *rect, float rad) + +static void round_box_edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, float rad) { float vec[9][2], veci[9][2]; float minx= rect->xmin, miny= rect->ymin, maxx= rect->xmax, maxy= rect->ymax; - float radi= rad - 1.0f; /* rad inner */ + float radi; /* rad inner */ float minxi= minx + 1.0f; /* boundbox inner */ float maxxi= maxx - 1.0f; float minyi= miny + 1.0f; @@ -174,6 +294,11 @@ static void round_box_edges(uiWidgetBase *wt, int roundboxtype, rcti *rect, floa float facyi= 1.0f/(maxyi-minyi); int a, tot= 0; + if(2.0f*rad > rect->ymax-rect->ymin) + rad= 0.5f*(rect->ymax-rect->ymin); + + radi= rad - 1.0f; + /* mult */ for(a=0; a<9; a++) { veci[a][0]= radi*cornervec[a][0]; @@ -183,7 +308,7 @@ static void round_box_edges(uiWidgetBase *wt, int roundboxtype, rcti *rect, floa } /* corner left-bottom */ - if(roundboxtype & 8) { + if(roundboxalign & 8) { for(a=0; a<9; a++, tot++) { wt->inner_v[tot][0]= minxi+veci[a][1]; @@ -210,7 +335,7 @@ static void round_box_edges(uiWidgetBase *wt, int roundboxtype, rcti *rect, floa } /* corner right-bottom */ - if(roundboxtype & 4) { + if(roundboxalign & 4) { for(a=0; a<9; a++, tot++) { wt->inner_v[tot][0]= maxxi-radi+veci[a][0]; @@ -239,7 +364,7 @@ static void round_box_edges(uiWidgetBase *wt, int roundboxtype, rcti *rect, floa wt->halfwayvert= tot; /* corner right-top */ - if(roundboxtype & 2) { + if(roundboxalign & 2) { for(a=0; a<9; a++, tot++) { wt->inner_v[tot][0]= maxxi-veci[a][1]; @@ -266,7 +391,7 @@ static void round_box_edges(uiWidgetBase *wt, int roundboxtype, rcti *rect, floa } /* corner left-top */ - if(roundboxtype & 1) { + if(roundboxalign & 1) { for(a=0; a<9; a++, tot++) { wt->inner_v[tot][0]= minxi+radi-veci[a][0]; @@ -338,7 +463,7 @@ static void widget_trias_draw(uiWidgetTrias *tria) static void widget_menu_trias(uiWidgetTrias *tria, rcti *rect) { - float centx, centy, size; + float centx, centy, size, asp; int a; /* center position and size */ @@ -346,6 +471,11 @@ static void widget_menu_trias(uiWidgetTrias *tria, rcti *rect) centy= rect->ymin + 0.5f*(rect->ymax-rect->ymin); size= 0.4f*(rect->ymax-rect->ymin); + /* XXX exception */ + asp= ((float)rect->xmax-rect->xmin)/((float)rect->ymax-rect->ymin); + if(asp > 1.2f && asp < 2.6f) + centx= rect->xmax - 0.3f*(rect->ymax-rect->ymin); + for(a=0; a<6; a++) { tria->vec[a][0]= size*menu_tria_vert[a][0] + centx; tria->vec[a][1]= size*menu_tria_vert[a][1] + centy; @@ -376,105 +506,112 @@ static void widget_check_trias(uiWidgetTrias *tria, rcti *rect) /* prepares shade colors */ -static void shadecolors(float *coltop, float *coldown, float *color, float shadetop, float shadedown) +static void shadecolors4(char *coltop, char *coldown, char *color, short shadetop, short shadedown) { - float hue, sat, val, valshade; - - rgb_to_hsv(color[0], color[1], color[2], &hue, &sat, &val); - valshade= CLAMPIS(val+shadetop, 0.0f, 1.0f); - hsv_to_rgb(hue, sat, valshade, coltop, coltop+1, coltop+2); + coltop[0]= CLAMPIS(color[0]+shadetop, 0, 255); + coltop[1]= CLAMPIS(color[1]+shadetop, 0, 255); + coltop[2]= CLAMPIS(color[2]+shadetop, 0, 255); + coltop[3]= color[3]; - valshade= CLAMPIS(val+shadedown, 0.0f, 1.0f); - hsv_to_rgb(hue, sat, valshade, coldown, coldown+1, coldown+2); + coldown[0]= CLAMPIS(color[0]+shadedown, 0, 255); + coldown[1]= CLAMPIS(color[1]+shadedown, 0, 255); + coldown[2]= CLAMPIS(color[2]+shadedown, 0, 255); + coldown[3]= color[3]; } -static void round_box_shade_col(float *col1, float *col2, float fac) +static void round_box_shade_col4(char *col1, char *col2, float fac) { - float col[4]; + int faci, facm; + char col[4]; + + faci= floor(255.1f*fac); + facm= 255-faci; - col[0]= (fac*col1[0] + (1.0-fac)*col2[0]); - col[1]= (fac*col1[1] + (1.0-fac)*col2[1]); - col[2]= (fac*col1[2] + (1.0-fac)*col2[2]); - col[3]= 1; + col[0]= (faci*col1[0] + facm*col2[0])>>8; + col[1]= (faci*col1[1] + facm*col2[1])>>8; + col[2]= (faci*col1[2] + facm*col2[2])>>8; + col[3]= (faci*col1[3] + facm*col2[3])>>8; - glColor4fv(col); + glColor4ubv(col); } -static void widget_draw(uiWidgetBase *wt, uiWidgetColors *wcol, int state) +static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol) { - float *inner= wcol->inner; int j, a; - if(state & UI_SELECT) - inner= wcol->inner_sel; - glEnable(GL_BLEND); /* backdrop non AA */ - if(wcol->shaded==0) { - /* filled center, solid */ - glColor3fv(inner); - glBegin(GL_POLYGON); - for(a=0; a<wt->totvert; a++) - glVertex2fv(wt->inner_v[a]); - glEnd(); - } - else { - float col1[3], col2[3]; - - shadecolors(col1, col2, inner, wcol->shadetop, wcol->shadedown); - - glShadeModel(GL_SMOOTH); - glBegin(GL_POLYGON); - for(a=0; a<wt->totvert; a++) { - round_box_shade_col(col1, col2, wt->inner_uv[a][1]); - glVertex2fv(wt->inner_v[a]); + if(wtb->inner) { + if(wcol->shaded==0) { + /* filled center, solid */ + glColor4ubv(wcol->inner); + glBegin(GL_POLYGON); + for(a=0; a<wtb->totvert; a++) + glVertex2fv(wtb->inner_v[a]); + glEnd(); + } + else { + char col1[4], col2[4]; + + shadecolors4(col1, col2, wcol->inner, wcol->shadetop, wcol->shadedown); + + glShadeModel(GL_SMOOTH); + glBegin(GL_POLYGON); + for(a=0; a<wtb->totvert; a++) { + round_box_shade_col4(col1, col2, wtb->inner_uv[a][1]); + glVertex2fv(wtb->inner_v[a]); + } + glEnd(); + glShadeModel(GL_FLAT); } - glEnd(); - glShadeModel(GL_FLAT); } /* for each AA step */ - for(j=0; j<8; j++) { - glTranslatef(1.0*jit[j][0], 1.0*jit[j][1], 0.0f); + if(wtb->outline) { + for(j=0; j<8; j++) { + glTranslatef(1.0*jit[j][0], 1.0*jit[j][1], 0.0f); + + /* outline */ + glColor4ub(wcol->outline[0], wcol->outline[1], wcol->outline[2], 32); + glBegin(GL_QUAD_STRIP); + for(a=0; a<wtb->totvert; a++) { + glVertex2fv(wtb->outer_v[a]); + glVertex2fv(wtb->inner_v[a]); + } + glVertex2fv(wtb->outer_v[0]); + glVertex2fv(wtb->inner_v[0]); + glEnd(); - /* outline */ - glColor4f(wcol->outline[0], wcol->outline[1], wcol->outline[0], 0.125); - glBegin(GL_QUAD_STRIP); - for(a=0; a<wt->totvert; a++) { - glVertex2fv(wt->outer_v[a]); - glVertex2fv(wt->inner_v[a]); - } - glVertex2fv(wt->outer_v[0]); - glVertex2fv(wt->inner_v[0]); - glEnd(); - - /* emboss bottom shadow */ - glColor4f(1.0f, 1.0f, 1.0f, 0.02f); - glBegin(GL_QUAD_STRIP); - for(a=0; a<wt->halfwayvert; a++) { - glVertex2fv(wt->outer_v[a]); - glVertex2f(wt->outer_v[a][0], wt->outer_v[a][1]-1.0f); + /* emboss bottom shadow */ + if(wtb->emboss) { + glColor4f(1.0f, 1.0f, 1.0f, 0.02f); + glBegin(GL_QUAD_STRIP); + for(a=0; a<wtb->halfwayvert; a++) { + glVertex2fv(wtb->outer_v[a]); + glVertex2f(wtb->outer_v[a][0], wtb->outer_v[a][1]-1.0f); + } + glEnd(); + } + + glTranslatef(-1.0*jit[j][0], -1.0*jit[j][1], 0.0f); } - glEnd(); - - glTranslatef(-1.0*jit[j][0], -1.0*jit[j][1], 0.0f); } /* decoration */ - if(wt->tria1.tot || wt->tria2.tot) { + if(wtb->tria1.tot || wtb->tria2.tot) { /* for each AA step */ for(j=0; j<8; j++) { glTranslatef(1.0*jit[j][0], 1.0*jit[j][1], 0.0f); - if(wt->tria1.tot) { - glColor4f(wcol->item[0], wcol->item[1], wcol->item[2], 0.125); - widget_trias_draw(&wt->tria1); + if(wtb->tria1.tot) { + glColor4ub(wcol->item[0], wcol->item[1], wcol->item[2], 32); + widget_trias_draw(&wtb->tria1); } - if(wt->tria2.tot) { - glColor4f(wcol->item[0], wcol->item[1], wcol->item[2], 0.125); - widget_trias_draw(&wt->tria2); + if(wtb->tria2.tot) { + glColor4ub(wcol->item[0], wcol->item[1], wcol->item[2], 32); + widget_trias_draw(&wtb->tria2); } glTranslatef(-1.0*jit[j][0], -1.0*jit[j][1], 0.0f); @@ -487,50 +624,162 @@ static void widget_draw(uiWidgetBase *wt, uiWidgetColors *wcol, int state) /* *********************** text/icon ************************************** */ -static void widget_draw_text(uiBut *but, float x, float y) + +/* icons have been standardized... and this call draws in untransformed coordinates */ +#define ICON_HEIGHT 16.0f + +static void widget_draw_icon(uiBut *but, BIFIconID icon, int blend, rcti *rect) { - int transopts; - int len; - char *cpoin; + float xs=0, ys=0, aspect, height; + + /* this icon doesn't need draw... */ + if(icon==ICON_BLANK1 && (but->flag & UI_ICON_SUBMENU)==0) return; + + /* we need aspect from block, for menus... these buttons are scaled in uiPositionBlock() */ + aspect= but->block->aspect; + if(aspect != but->aspect) { + /* prevent scaling up icon in pupmenu */ + if (aspect < 1.0f) { + height= ICON_HEIGHT; + aspect = 1.0f; + + } + else + height= ICON_HEIGHT/aspect; + } + else + height= ICON_HEIGHT; + + /* calculate blend color */ + if ELEM3(but->type, TOG, ROW, TOGN) { + if(but->flag & UI_SELECT); + else if(but->flag & UI_ACTIVE); + else blend= -60; + } + + glEnable(GL_BLEND); + + if(icon && icon!=ICON_BLANK1) { + if(but->flag & UI_ICON_LEFT) { + if (but->type==BUT_TOGDUAL) { + if (but->drawstr[0]) { + xs= rect->xmin-1.0; + } else { + xs= (rect->xmin+rect->xmax- height)/2.0; + } + } + else if (but->block->flag & UI_BLOCK_LOOP) { + xs= rect->xmin+1.0; + } + else if ((but->type==ICONROW) || (but->type==ICONTEXTROW)) { + xs= rect->xmin+3.0; + } + else { + xs= rect->xmin+4.0; + } + ys= (rect->ymin+rect->ymax- height)/2.0; + } + else { + xs= (rect->xmin+rect->xmax- height)/2.0; + ys= (rect->ymin+rect->ymax- height)/2.0; + } - ui_rasterpos_safe(x, y, but->aspect); - if(but->type==IDPOIN) transopts= 0; // no translation, of course! - else transopts= ui_translate_buttons(); + UI_icon_draw_aspect_blended(xs, ys, icon, aspect, blend); + } - /* cut string in 2 parts */ - cpoin= strchr(but->drawstr, '|'); - if(cpoin) *cpoin= 0; + if(but->flag & UI_ICON_SUBMENU) { + xs= rect->xmax-17.0; + ys= (rect->ymin+rect->ymax- height)/2.0; + + UI_icon_draw_aspect_blended(xs, ys, ICON_RIGHTARROW_THIN, aspect, blend); + } -#ifdef INTERNATIONAL - if (but->type == FTPREVIEW) - FTF_DrawNewFontString (but->drawstr+but->ofs, FTF_INPUT_UTF8); + glDisable(GL_BLEND); +} + +/* sets but->ofs to make sure text is correctly visible */ +static void ui_text_leftclip(uiFontStyle *fstyle, uiBut *but, rcti *rect) +{ + int okwidth= rect->xmax-rect->xmin; + + /* need to set this first */ + uiStyleFontSet(fstyle); + + but->strwidth= BLF_width(but->drawstr); + but->ofs= 0; + + while(but->strwidth > okwidth ) { + + but->ofs++; + but->strwidth= BLF_width(but->drawstr+but->ofs); + + /* textbut exception */ + if(but->editstr && but->pos != -1) { + int pos= but->pos+strlen(but->str); + + if(pos-1 < but->ofs) { + pos= but->ofs-pos+1; + but->ofs -= pos; + if(but->ofs<0) { + but->ofs= 0; + pos--; + } + but->drawstr[ strlen(but->drawstr)-pos ]= 0; + } + } + + if(but->strwidth < 10) break; + } +} + +static void widget_draw_text(uiFontStyle *fstyle, uiBut *but, rcti *rect) +{ +// int transopts; + char *cpoin = NULL; + +// ui_rasterpos_safe(x, y, but->aspect); +// if(but->type==IDPOIN) transopts= 0; // no translation, of course! +// else transopts= ui_translate_buttons(); + + /* cut string in 2 parts - only for menu entries */ + if(ELEM5(but->type, SLI, NUM, TEX, NUMSLI, NUMABS)==0) { + cpoin= strchr(but->drawstr, '|'); + if(cpoin) *cpoin= 0; + } + + if(but->editstr || (but->flag & UI_TEXT_LEFT)) + fstyle->align= UI_STYLE_TEXT_LEFT; else - UI_DrawString(but->font, but->drawstr+but->ofs, transopts); -#else - UI_DrawString(but->font, but->drawstr+but->ofs, transopts); -#endif + fstyle->align= UI_STYLE_TEXT_CENTER; + uiStyleFontDraw(fstyle, rect, but->drawstr+but->ofs); + /* part text right aligned */ if(cpoin) { - len= UI_GetStringWidth(but->font, cpoin+1, ui_translate_buttons()); - ui_rasterpos_safe( but->x2 - len*but->aspect-3, y, but->aspect); - UI_DrawString(but->font, cpoin+1, ui_translate_buttons()); + fstyle->align= UI_STYLE_TEXT_RIGHT; + rect->xmax-=5; + uiStyleFontDraw(fstyle, rect, cpoin+1); *cpoin= '|'; } } /* draws text and icons for buttons */ -static void widget_draw_text_icon(uiBut *but, rcti *rect, float *col) +static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *but, rcti *rect) { - float x, y; short t, pos, ch; short selsta_tmp, selend_tmp, selsta_draw, selwidth_draw; if(but==NULL) return; + /* cutting off from left part */ + if ELEM3(but->type, NUM, NUMABS, TEX) { + ui_text_leftclip(fstyle, but, rect); + } + else but->ofs= 0; + /* check for button text label */ if (but->type == ICONTEXTROW) { - ui_draw_icon(but, (BIFIconID) (but->icon+but->iconadd), 0); + widget_draw_icon(but, (BIFIconID) (but->icon+but->iconadd), 0, rect); } else { @@ -546,7 +795,9 @@ static void widget_draw_text_icon(uiBut *but, rcti *rect, float *col) ch= but->drawstr[selsta_tmp]; but->drawstr[selsta_tmp]= 0; - selsta_draw = but->aspect*UI_GetStringWidth(but->font, but->drawstr+but->ofs, ui_translate_buttons()) + 3; + uiStyleFontSet(fstyle); + + selsta_draw = BLF_width(but->drawstr+but->ofs) + 3; but->drawstr[selsta_tmp]= ch; @@ -554,11 +805,11 @@ static void widget_draw_text_icon(uiBut *but, rcti *rect, float *col) ch= but->drawstr[selend_tmp]; but->drawstr[selend_tmp]= 0; - selwidth_draw = but->aspect*UI_GetStringWidth(but->font, but->drawstr+but->ofs, ui_translate_buttons()) + 3; + selwidth_draw = BLF_width(but->drawstr+but->ofs) + 3; but->drawstr[selend_tmp]= ch; - UI_ThemeColor(TH_BUT_TEXTFIELD_HI); + glColor3ubv(wcol->item); glRects(rect->xmin+selsta_draw+1, rect->ymin+2, rect->xmin+selwidth_draw+1, rect->ymax-2); } } else { @@ -569,7 +820,9 @@ static void widget_draw_text_icon(uiBut *but, rcti *rect, float *col) ch= but->drawstr[pos]; but->drawstr[pos]= 0; - t= but->aspect*UI_GetStringWidth(but->font, but->drawstr+but->ofs, ui_translate_buttons()) + 3; + uiStyleFontSet(fstyle); + + t= BLF_width(but->drawstr+but->ofs) + 3; but->drawstr[pos]= ch; } @@ -588,7 +841,7 @@ static void widget_draw_text_icon(uiBut *but, rcti *rect, float *col) else if(but->pointype==INT) dualset= BTST( *(((int *)but->poin)+1), but->bitnr); - ui_draw_icon(but, ICON_DOT, dualset?0:-100); + widget_draw_icon(but, ICON_DOT, dualset?0:-100, rect); } if(but->drawstr[0]!=0) { @@ -596,33 +849,24 @@ static void widget_draw_text_icon(uiBut *but, rcti *rect, float *col) /* If there's an icon too (made with uiDefIconTextBut) then draw the icon and offset the text label to accomodate it */ - if ( (but->flag & UI_HAS_ICON) && (but->flag & UI_ICON_LEFT) ) - { - ui_draw_icon(but, but->icon, 0); + if (but->flag & UI_HAS_ICON) { + widget_draw_icon(but, but->icon, 0, rect); - if(but->editstr || (but->flag & UI_TEXT_LEFT)) x= rect->xmin + but->aspect*UI_icon_get_width(but->icon)+5.0; - else x= (rect->xmin+rect->xmax-but->strwidth+1)/2.0; - } - else - { - if(but->editstr || (but->flag & UI_TEXT_LEFT)) - x= rect->xmin+4.0; - else if ELEM3(but->type, TOG, TOGN, TOG3) - x= rect->xmin+28.0; /* offset for checkmark */ - else - x= (rect->xmin+rect->xmax-but->strwidth+1)/2.0; + rect->xmin += UI_icon_get_width(but->icon); + + if(but->editstr || (but->flag & UI_TEXT_LEFT)) + rect->xmin += 5; } + else if(but->flag & UI_TEXT_LEFT) + rect->xmin += 5; - /* position and draw */ - y = (rect->ymin+rect->ymax- 9.0)/2.0; - - glColor3fv(col); - widget_draw_text(but, x, y); + glColor3ubv(wcol->text); + widget_draw_text(fstyle, but, rect); } /* if there's no text label, then check to see if there's an icon only and draw it */ else if( but->flag & UI_HAS_ICON ) { - ui_draw_icon(but, (BIFIconID) (but->icon+but->iconadd), 0); + widget_draw_icon(but, (BIFIconID) (but->icon+but->iconadd), 0, rect); } } } @@ -631,157 +875,638 @@ static void widget_draw_text_icon(uiBut *but, rcti *rect, float *col) /* *********************** widget types ************************************* */ -/* + +/* uiWidgetStateColors + char inner_anim[4]; + char inner_anim_sel[4]; + char inner_key[4]; + char inner_key_sel[4]; + char inner_driven[4]; + char inner_driven_sel[4]; + +*/ + +static struct uiWidgetStateColors wcol_state= { + {115, 190, 76, 255}, + {90, 166, 51, 255}, + {240, 235, 100, 255}, + {148, 204, 76, 255}, + {180, 0, 255, 255}, + {153, 0, 230, 255} +}; + +/* uiWidgetColors float outline[3]; - float inner[3]; - float select[3]; + float inner[4]; + float inner_sel[4]; float item[3]; + float text[3]; + float text_sel[3]; + short shaded; float shadetop, shadedown; */ static struct uiWidgetColors wcol_num= { - {0.1f, 0.1f, 0.1f}, - {0.7f, 0.7f, 0.7f}, - {0.6f, 0.6f, 0.6f}, - {0.35f, 0.35f, 0.35f}, + {25, 25, 25, 255}, + {180, 180, 180, 255}, + {153, 153, 153, 255}, + {90, 90, 90, 255}, + + {0, 0, 0, 255}, + {255, 255, 255, 255}, - {0.0f, 0.0f, 0.0f}, - {1.0f, 1.0f, 1.0f}, + 1, + -20, 0 +}; + +static struct uiWidgetColors wcol_numslider= { + {25, 25, 25, 255}, + {180, 180, 180, 255}, + {153, 153, 153, 255}, + {128, 128, 128, 255}, + + {0, 0, 0, 255}, + {255, 255, 255, 255}, 1, - -0.08f, 0.0f + -20, 0 }; static struct uiWidgetColors wcol_text= { - {0.1f, 0.1f, 0.1f}, - {0.6f, 0.6f, 0.6f}, - {0.6f, 0.6f, 0.6f}, - {0.35f, 0.35f, 0.35f}, + {25, 25, 25, 255}, + {153, 153, 153, 255}, + {153, 153, 153, 255}, + {90, 90, 90, 255}, - {0.0f, 0.0f, 0.0f}, - {1.0f, 1.0f, 1.0f}, + {0, 0, 0, 255}, + {255, 255, 255, 255}, 1, - 0.0f, 0.1f + 0, 25 }; +static struct uiWidgetColors wcol_option= { + {0, 0, 0, 255}, + {70, 70, 70, 255}, + {70, 70, 70, 255}, + {255, 255, 255, 255}, + + {0, 0, 0, 255}, + {255, 255, 255, 255}, + + 1, + 15, -15 +}; + +/* button that shows popup */ static struct uiWidgetColors wcol_menu= { - {0.0f, 0.0f, 0.0f}, - {0.25f, 0.25f, 0.25f}, - {0.25f, 0.25f, 0.25f}, - {1.0f, 1.0f, 1.0f}, + {0, 0, 0, 255}, + {70, 70, 70, 255}, + {70, 70, 70, 255}, + {255, 255, 255, 255}, - {1.0f, 1.0f, 1.0f}, - {0.0f, 0.0f, 0.0f}, + {255, 255, 255, 255}, + {204, 204, 204, 255}, 1, - 0.1f, -0.08f + 15, -15 +}; + +/* button that starts pulldown */ +static struct uiWidgetColors wcol_pulldown= { + {0, 0, 0, 255}, + {63, 63, 63, 255}, + {86, 128, 194, 255}, + {255, 255, 255, 255}, + + {0, 0, 0, 255}, + {0, 0, 0, 255}, + + 0, + 25, -20 +}; + +/* button inside menu */ +static struct uiWidgetColors wcol_menu_item= { + {0, 0, 0, 255}, + {0, 0, 0, 0}, + {86, 128, 194, 255}, + {255, 255, 255, 255}, + + {255, 255, 255, 255}, + {0, 0, 0, 255}, + + 0, + 38, 0 }; -static struct uiWidgetColors wcol_row= { - {0.0f, 0.0f, 0.0f}, - {0.25f, 0.25f, 0.25f}, - {0.34f, 0.5f, 0.76f}, - {1.0f, 1.0f, 1.0f}, +/* backdrop menu + title text color */ +static struct uiWidgetColors wcol_menu_back= { + {0, 0, 0, 255}, + {25, 25, 25, 230}, + {46, 124, 217, 204}, + {255, 255, 255, 255}, - {1.0f, 1.0f, 1.0f}, - {0.0f, 0.0f, 0.0f}, + {255, 255, 255, 255}, + {0, 0, 0, 255}, + + 0, + 25, -20 +}; + + +static struct uiWidgetColors wcol_radio= { + {0, 0, 0, 255}, + {70, 70, 70, 255}, + {86, 128, 194, 255}, + {255, 255, 255, 255}, + + {255, 255, 255, 255}, + {0, 0, 0, 255}, 1, - 0.1f, -0.1f + 15, -15 }; static struct uiWidgetColors wcol_regular= { - {0.1f, 0.1f, 0.1f}, - {0.6f, 0.6f, 0.6f}, - {0.4f, 0.4f, 0.4f}, - {0.1f, 0.1f, 0.1f}, + {25, 25, 25, 255}, + {153, 153, 153, 255}, + {100, 100, 100, 255}, + {25, 25, 25, 255}, - {0.0f, 0.0f, 0.0f}, - {1.0f, 1.0f, 1.0f}, + {0, 0, 0, 255}, + {255, 255, 255, 255}, 0, - 0.0f, 0.0f + 0, 0 }; -static struct uiWidgetColors wcol_regular2= { - {0.1f, 0.1f, 0.1f}, - {0.6f, 0.6f, 0.6f}, - {0.4f, 0.4f, 0.4f}, - {0.1f, 0.1f, 0.1f}, +static struct uiWidgetColors wcol_tool= { + {25, 25, 25, 255}, + {153, 153, 153, 255}, + {100, 100, 100, 255}, + {25, 25, 25, 255}, - {0.0f, 0.0f, 0.0f}, - {1.0f, 1.0f, 1.0f}, + {0, 0, 0, 255}, + {255, 255, 255, 255}, 1, - 0.1f, -0.1f + 25, -25 }; +/* called for theme init (new theme) and versions */ +void ui_widget_color_init(ThemeUI *tui) +{ + + tui->wcol_regular= wcol_regular; + tui->wcol_tool= wcol_tool; + tui->wcol_radio= wcol_radio; + tui->wcol_text= wcol_text; + tui->wcol_option= wcol_option; + tui->wcol_num= wcol_num; + tui->wcol_numslider= wcol_numslider; + tui->wcol_menu= wcol_menu; + tui->wcol_pulldown= wcol_pulldown; + tui->wcol_menu_back= wcol_menu_back; + tui->wcol_menu_item= wcol_menu_item; + + tui->iconfile[0]= 0; +} + +/* ************ button callbacks, state ***************** */ + +/* copy colors from theme, and set changes in it based on state */ +static void widget_state(uiWidgetType *wt, int state) +{ + wt->wcol= *(wt->wcol_theme); + + if(state & UI_SELECT) { + if(state & UI_BUT_ANIMATED_KEY) + QUATCOPY(wt->wcol.inner, wcol_state.inner_key_sel) + else if(state & UI_BUT_ANIMATED) + QUATCOPY(wt->wcol.inner, wcol_state.inner_anim_sel) + else if(state & UI_BUT_DRIVEN) + QUATCOPY(wt->wcol.inner, wcol_state.inner_driven_sel) + else + QUATCOPY(wt->wcol.inner, wt->wcol.inner_sel) + + VECCOPY(wt->wcol.text, wt->wcol.text_sel); + + /* only flip shade if it's not "pushed in" already */ + if(wt->wcol.shaded && wt->wcol.shadetop>wt->wcol.shadedown) { + SWAP(short, wt->wcol.shadetop, wt->wcol.shadedown); + } + } + else { + if(state & UI_BUT_ANIMATED_KEY) + QUATCOPY(wt->wcol.inner, wcol_state.inner_key) + else if(state & UI_BUT_ANIMATED) + QUATCOPY(wt->wcol.inner, wcol_state.inner_anim) + else if(state & UI_BUT_DRIVEN) + QUATCOPY(wt->wcol.inner, wcol_state.inner_driven) + + if(state & UI_ACTIVE) { /* mouse over? */ + wt->wcol.inner[0]= wt->wcol.inner[0]>=240? 255 : wt->wcol.inner[0]+15; + wt->wcol.inner[1]= wt->wcol.inner[1]>=240? 255 : wt->wcol.inner[1]+15; + wt->wcol.inner[2]= wt->wcol.inner[2]>=240? 255 : wt->wcol.inner[2]+15; + } + } +} + +/* labels use theme colors for text */ +static void widget_state_label(uiWidgetType *wt, int state) +{ + /* call this for option button */ + widget_state(wt, state); + + if(state & UI_SELECT) + UI_GetThemeColor4ubv(TH_TEXT_HI, wt->wcol.text); + else + UI_GetThemeColor4ubv(TH_TEXT, wt->wcol.text); + +} + + +/* special case, button that calls pulldown */ +static void widget_state_pulldown(uiWidgetType *wt, int state) +{ + wt->wcol= *(wt->wcol_theme); + + QUATCOPY(wt->wcol.inner, wt->wcol.inner_sel); + VECCOPY(wt->wcol.outline, wt->wcol.inner); + + if(state & UI_ACTIVE) + VECCOPY(wt->wcol.text, wt->wcol.text_sel); +} + +/* special case, menu items */ +static void widget_state_menu_item(uiWidgetType *wt, int state) +{ + wt->wcol= *(wt->wcol_theme); + + if(state & UI_BUT_DISABLED) { + wt->wcol.text[0]= 0.5f*(wt->wcol.text[0]+wt->wcol.text_sel[0]); + wt->wcol.text[1]= 0.5f*(wt->wcol.text[1]+wt->wcol.text_sel[1]); + wt->wcol.text[2]= 0.5f*(wt->wcol.text[2]+wt->wcol.text_sel[2]); + } + else if(state & UI_ACTIVE) { + QUATCOPY(wt->wcol.inner, wt->wcol.inner_sel); + VECCOPY(wt->wcol.text, wt->wcol.text_sel); + + wt->wcol.shaded= 1; + } +} + + +/* ************ menu backdrop ************************* */ + +/* outside of rect, rad to left/bottom/right */ +static void widget_softshadow(rcti *rect, int roundboxalign, float radin, float radout) +{ + uiWidgetBase wtb; + rcti rect1= *rect; + float alpha, alphastep; + int step, tot, a; + + /* prevent tooltips to not show round shadow */ + if( 2.0f*radout > 0.2f*(rect1.ymax-rect1.ymin) ) + rect1.ymax -= 0.2f*(rect1.ymax-rect1.ymin); + else + rect1.ymax -= 2.0f*radout; + + /* inner part */ + tot= round_box_shadow_edges(wtb.inner_v, &rect1, radin, roundboxalign & 12, 0.0f); + + /* inverse linear shadow alpha */ + alpha= 0.15; + alphastep= 0.67; + + for(step= 1; step<=radout; step++, alpha*=alphastep) { + round_box_shadow_edges(wtb.outer_v, &rect1, radin, 15, (float)step); + + glColor4f(0.0f, 0.0f, 0.0f, alpha); + + glBegin(GL_QUAD_STRIP); + for(a=0; a<tot; a++) { + glVertex2fv(wtb.outer_v[a]); + glVertex2fv(wtb.inner_v[a]); + } + glEnd(); + } + +} + +static void widget_menu_back(uiWidgetColors *wcol, rcti *rect, int flag, int direction) +{ + uiWidgetBase wtb; + int roundboxalign= 15; + + widget_init(&wtb); + + /* menu is 2nd level or deeper */ + if (flag & UI_BLOCK_POPUP) { + rect->ymin -= 4.0; + rect->ymax += 4.0; + } + else if (direction == UI_DOWN) { + roundboxalign= 12; + rect->ymin -= 4.0; + } + else if (direction == UI_TOP) { + roundboxalign= 3; + rect->ymax += 4.0; + } + + glEnable(GL_BLEND); + widget_softshadow(rect, roundboxalign, 5.0f, 8.0f); + + round_box_edges(&wtb, roundboxalign, rect, 5.0f); + wtb.emboss= 0; + widgetbase_draw(&wtb, wcol); + + glDisable(GL_BLEND); +} + +/* ************ custom buttons, old stuff ************** */ + +/* draws in resolution of 20x4 colors */ +static void ui_draw_but_HSVCUBE(uiBut *but, rcti *rect) +{ + int a; + float h,s,v; + float dx, dy, sx1, sx2, sy, x, y; + float col0[4][3]; // left half, rect bottom to top + float col1[4][3]; // right half, rect bottom to top + + h= but->hsv[0]; + s= but->hsv[1]; + v= but->hsv[2]; + + /* draw series of gouraud rects */ + glShadeModel(GL_SMOOTH); + + if(but->a1==0) { // H and V vary + hsv_to_rgb(0.0, s, 0.0, &col1[0][0], &col1[0][1], &col1[0][2]); + hsv_to_rgb(0.0, s, 0.333, &col1[1][0], &col1[1][1], &col1[1][2]); + hsv_to_rgb(0.0, s, 0.666, &col1[2][0], &col1[2][1], &col1[2][2]); + hsv_to_rgb(0.0, s, 1.0, &col1[3][0], &col1[3][1], &col1[3][2]); + x= h; y= v; + } + else if(but->a1==1) { // H and S vary + hsv_to_rgb(0.0, 0.0, v, &col1[0][0], &col1[0][1], &col1[0][2]); + hsv_to_rgb(0.0, 0.333, v, &col1[1][0], &col1[1][1], &col1[1][2]); + hsv_to_rgb(0.0, 0.666, v, &col1[2][0], &col1[2][1], &col1[2][2]); + hsv_to_rgb(0.0, 1.0, v, &col1[3][0], &col1[3][1], &col1[3][2]); + x= h; y= s; + } + else if(but->a1==2) { // S and V vary + hsv_to_rgb(h, 0.0, 0.0, &col1[0][0], &col1[0][1], &col1[0][2]); + hsv_to_rgb(h, 0.333, 0.0, &col1[1][0], &col1[1][1], &col1[1][2]); + hsv_to_rgb(h, 0.666, 0.0, &col1[2][0], &col1[2][1], &col1[2][2]); + hsv_to_rgb(h, 1.0, 0.0, &col1[3][0], &col1[3][1], &col1[3][2]); + x= v; y= s; + } + else { // only hue slider + hsv_to_rgb(0.0, 1.0, 1.0, &col1[0][0], &col1[0][1], &col1[0][2]); + VECCOPY(col1[1], col1[0]); + VECCOPY(col1[2], col1[0]); + VECCOPY(col1[3], col1[0]); + x= h; y= 0.5; + } + + for(dx=0.0; dx<1.0; dx+= 0.05) { + // previous color + VECCOPY(col0[0], col1[0]); + VECCOPY(col0[1], col1[1]); + VECCOPY(col0[2], col1[2]); + VECCOPY(col0[3], col1[3]); + + // new color + if(but->a1==0) { // H and V vary + hsv_to_rgb(dx, s, 0.0, &col1[0][0], &col1[0][1], &col1[0][2]); + hsv_to_rgb(dx, s, 0.333, &col1[1][0], &col1[1][1], &col1[1][2]); + hsv_to_rgb(dx, s, 0.666, &col1[2][0], &col1[2][1], &col1[2][2]); + hsv_to_rgb(dx, s, 1.0, &col1[3][0], &col1[3][1], &col1[3][2]); + } + else if(but->a1==1) { // H and S vary + hsv_to_rgb(dx, 0.0, v, &col1[0][0], &col1[0][1], &col1[0][2]); + hsv_to_rgb(dx, 0.333, v, &col1[1][0], &col1[1][1], &col1[1][2]); + hsv_to_rgb(dx, 0.666, v, &col1[2][0], &col1[2][1], &col1[2][2]); + hsv_to_rgb(dx, 1.0, v, &col1[3][0], &col1[3][1], &col1[3][2]); + } + else if(but->a1==2) { // S and V vary + hsv_to_rgb(h, 0.0, dx, &col1[0][0], &col1[0][1], &col1[0][2]); + hsv_to_rgb(h, 0.333, dx, &col1[1][0], &col1[1][1], &col1[1][2]); + hsv_to_rgb(h, 0.666, dx, &col1[2][0], &col1[2][1], &col1[2][2]); + hsv_to_rgb(h, 1.0, dx, &col1[3][0], &col1[3][1], &col1[3][2]); + } + else { // only H + hsv_to_rgb(dx, 1.0, 1.0, &col1[0][0], &col1[0][1], &col1[0][2]); + VECCOPY(col1[1], col1[0]); + VECCOPY(col1[2], col1[0]); + VECCOPY(col1[3], col1[0]); + } + + // rect + sx1= rect->xmin + dx*(rect->xmax-rect->xmin); + sx2= rect->xmin + (dx+0.05)*(rect->xmax-rect->xmin); + sy= rect->ymin; + dy= (rect->ymax-rect->ymin)/3.0; + + glBegin(GL_QUADS); + for(a=0; a<3; a++, sy+=dy) { + glColor3fv(col0[a]); + glVertex2f(sx1, sy); + + glColor3fv(col1[a]); + glVertex2f(sx2, sy); + + glColor3fv(col1[a+1]); + glVertex2f(sx2, sy+dy); + + glColor3fv(col0[a+1]); + glVertex2f(sx1, sy+dy); + } + glEnd(); + } + + glShadeModel(GL_FLAT); + + /* cursor */ + x= rect->xmin + x*(rect->xmax-rect->xmin); + y= rect->ymin + y*(rect->ymax-rect->ymin); + CLAMP(x, rect->xmin+3.0, rect->xmax-3.0); + CLAMP(y, rect->ymin+3.0, rect->ymax-3.0); + + fdrawXORcirc(x, y, 3.1); + + /* outline */ + glColor3ub(0, 0, 0); + fdrawbox((rect->xmin), (rect->ymin), (rect->xmax), (rect->ymax)); +} + + +/* ************ button callbacks, draw ***************** */ -static void widget_numbut(uiBut *but, rcti *rect, int state, int roundboxtype) +static void widget_numbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) { - uiWidgetBase wt; + uiWidgetBase wtb; - widget_init(&wt); + widget_init(&wtb); /* fully rounded */ - round_box_edges(&wt, roundboxtype, rect, 0.5f*(rect->ymax - rect->ymin)); + round_box_edges(&wtb, roundboxalign, rect, 0.5f*(rect->ymax - rect->ymin)); /* decoration */ - widget_num_tria(&wt.tria1, rect, 0.6f, 0); - widget_num_tria(&wt.tria2, rect, 0.6f, 'r'); + if(!(state & UI_TEXTINPUT)) { + widget_num_tria(&wtb.tria1, rect, 0.6f, 0); + widget_num_tria(&wtb.tria2, rect, 0.6f, 'r'); + } + widgetbase_draw(&wtb, wcol); - widget_draw(&wt, &wcol_num, state); + /* text space */ + rect->xmin += (rect->ymax-rect->ymin); + rect->xmax -= (rect->ymax-rect->ymin); - if(state & UI_SELECT) - widget_draw_text_icon(but, rect, wcol_num.text_sel); - else - widget_draw_text_icon(but, rect, wcol_num.text); } -static void widget_textbut(uiBut *but, rcti *rect, int state, int roundboxtype) +static void widget_numslider(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) { - uiWidgetBase wt; + uiWidgetBase wtb, wtb1; + rcti rect1; + double value; + float offs, fac; + char outline[3]; + int slideralign; - widget_init(&wt); + widget_init(&wtb); + widget_init(&wtb1); - /* half rounded */ - round_box_edges(&wt, roundboxtype, rect, 4.0f); + /* backdrop first */ - /* XXX button state */ - widget_draw(&wt, &wcol_text, state); + /* fully rounded */ + offs= 0.5f*(rect->ymax - rect->ymin); + round_box_edges(&wtb, roundboxalign, rect, offs); - widget_draw_text_icon(but, rect, wcol_text.text); + wtb.outline= 0; + widgetbase_draw(&wtb, wcol); + + /* slider part */ + rect1= *rect; + + value= ui_get_but_val(but); + fac= (value-but->softmin)*(rect1.xmax - rect1.xmin - offs)/(but->softmax - but->softmin); + + rect1.xmax= rect1.xmin + fac + offs; + slideralign = roundboxalign; + slideralign &= ~(2|4); + round_box_edges(&wtb1, slideralign, &rect1, offs); + + VECCOPY(outline, wcol->outline); + VECCOPY(wcol->outline, wcol->item); + VECCOPY(wcol->inner, wcol->item); + SWAP(short, wcol->shadetop, wcol->shadedown); + + widgetbase_draw(&wtb1, wcol); + VECCOPY(wcol->outline, outline); + SWAP(short, wcol->shadetop, wcol->shadedown); + + /* outline */ + wtb.outline= 1; + wtb.inner= 0; + widgetbase_draw(&wtb, wcol); + +} + +static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) +{ + uiWidgetBase wtb; + float col[4]; + + widget_init(&wtb); + + /* half rounded */ + round_box_edges(&wtb, roundboxalign, rect, 4.0f); + + ui_get_but_vectorf(but, col); + wcol->inner[0]= FTOCHAR(col[0]); + wcol->inner[1]= FTOCHAR(col[1]); + wcol->inner[2]= FTOCHAR(col[2]); + + widgetbase_draw(&wtb, wcol); + } -static void widget_menubut(uiBut *but, rcti *rect, int state, int roundboxtype) +static void widget_textbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) { - uiWidgetBase wt; + uiWidgetBase wtb; - widget_init(&wt); + widget_init(&wtb); /* half rounded */ - round_box_edges(&wt, roundboxtype, rect, 4.0f); + round_box_edges(&wtb, roundboxalign, rect, 4.0f); - /* XXX button state */ + widgetbase_draw(&wtb, wcol); + +} + + +static void widget_menubut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) +{ + uiWidgetBase wtb; + + widget_init(&wtb); + + /* half rounded */ + round_box_edges(&wtb, roundboxalign, rect, 4.0f); /* decoration */ - widget_menu_trias(&wt.tria1, rect); + widget_menu_trias(&wtb.tria1, rect); - widget_draw(&wt, &wcol_menu, state); + widgetbase_draw(&wtb, wcol); + + /* text space */ + rect->xmax -= (rect->ymax-rect->ymin); + +} - widget_draw_text_icon(but, rect, wcol_menu.text); +static void widget_pulldownbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) +{ + if(state & UI_ACTIVE) { + uiWidgetBase wtb; + + widget_init(&wtb); + + /* fully rounded */ + round_box_edges(&wtb, roundboxalign, rect, 0.5f*(rect->ymax - rect->ymin)); + + widgetbase_draw(&wtb, wcol); + } } -static void widget_togbut(uiBut *but, rcti *rect, int state, int roundboxtype) +static void widget_menu_itembut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) +{ + uiWidgetBase wtb; + + widget_init(&wtb); + + /* not rounded, no outline */ + wtb.outline= 0; + round_box_edges(&wtb, 0, rect, 0.0f); + + widgetbase_draw(&wtb, wcol); +} + + +static void widget_optionbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) { - uiWidgetBase wt; + uiWidgetBase wtb; rcti recttemp= *rect; int delta; - widget_init(&wt); + widget_init(&wtb); /* square */ recttemp.xmax= recttemp.xmin + (recttemp.ymax-recttemp.ymin); @@ -794,131 +1519,185 @@ static void widget_togbut(uiBut *but, rcti *rect, int state, int roundboxtype) recttemp.ymax-= delta; /* half rounded */ - round_box_edges(&wt, roundboxtype, &recttemp, 4.0f); - - /* button state */ + round_box_edges(&wtb, 15, &recttemp, 4.0f); /* decoration */ if(state & UI_SELECT) { - widget_check_trias(&wt.tria1, &recttemp); + widget_check_trias(&wtb.tria1, &recttemp); } - widget_draw(&wt, &wcol_menu, state); - - if(state & UI_SELECT) - widget_draw_text_icon(but, rect, wcol_menu.text); - else - widget_draw_text_icon(but, rect, wcol_menu.text_sel); + widgetbase_draw(&wtb, wcol); + + /* text space */ + rect->xmin += (rect->ymax-rect->ymin)*0.7 + delta; } -static void widget_rowbut(uiBut *but, rcti *rect, int state, int roundboxtype) +static void widget_radiobut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) { - uiWidgetBase wt; + uiWidgetBase wtb; - widget_init(&wt); + widget_init(&wtb); /* half rounded */ - round_box_edges(&wt, roundboxtype, rect, 4.0f); + round_box_edges(&wtb, roundboxalign, rect, 4.0f); - widget_draw(&wt, &wcol_row, state); + widgetbase_draw(&wtb, wcol); - widget_draw_text_icon(but, rect, wcol_row.text); } -static void widget_but(uiBut *but, rcti *rect, int state, int roundboxtype) +static void widget_but(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) { - uiWidgetBase wt; + uiWidgetBase wtb; - widget_init(&wt); + widget_init(&wtb); /* half rounded */ - round_box_edges(&wt, roundboxtype, rect, 4.0f); + round_box_edges(&wtb, roundboxalign, rect, 4.0f); - widget_draw(&wt, &wcol_regular, state); + widgetbase_draw(&wtb, wcol); - widget_draw_text_icon(but, rect, wcol_regular.text); } -static void widget_roundbut(uiBut *but, rcti *rect, int state, int roundboxtype) +static void widget_roundbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) { - uiWidgetBase wt; + uiWidgetBase wtb; - widget_init(&wt); + widget_init(&wtb); /* fully rounded */ - round_box_edges(&wt, roundboxtype, rect, 0.5f*(rect->ymax - rect->ymin)); - - widget_num_tria(&wt.tria1, rect, 0.6f, 0); - - widget_draw(&wt, &wcol_regular2, state); - - widget_draw_text_icon(but, rect, wcol_regular2.text); + round_box_edges(&wtb, roundboxalign, rect, 0.5f*(rect->ymax - rect->ymin)); + widgetbase_draw(&wtb, wcol); } -/* test function only */ -void drawnewstuff() +static void widget_disabled(rcti *rect) { - rcti rect; - - rect.xmin= 10; rect.xmax= 10+100; - rect.ymin= -30; rect.ymax= -30+18; - widget_numbut(NULL, &rect, 0, 15); + float col[4]; - rect.xmin= 120; rect.xmax= 120+100; - rect.ymin= -30; rect.ymax= -30+20; - widget_numbut(NULL, &rect, 0, 15); + glEnable(GL_BLEND); - rect.xmin= 10; rect.xmax= 10+100; - rect.ymin= -60; rect.ymax= -60+20; - widget_menubut(NULL, &rect, 0, 15); + /* can't use theme TH_BACK or TH_PANEL... undefined */ + glGetFloatv(GL_COLOR_CLEAR_VALUE, col); + glColor4f(col[0], col[1], col[2], 0.5f); + glRectf(rect->xmin, rect->ymin, rect->xmax, rect->ymax); - rect.xmin= 120; rect.xmax= 120+100; - widget_but(NULL, &rect, 0, 15); - - rect.xmin= 10; rect.xmax= 10+100; - rect.ymin= -90; rect.ymax= -90+20; - widget_rowbut(NULL, &rect, 1, 9); - - rect.xmin= 109; rect.xmax= 110+100; - rect.ymin= -90; rect.ymax= -90+20; - widget_rowbut(NULL, &rect, 0, 6); - - rect.xmin= 240; rect.xmax= 240+30; - rect.ymin= -90; rect.ymax= -90+30; - widget_roundbut(NULL, &rect, 0, 15); + glDisable(GL_BLEND); } -/* ************ new color and style definition ********************* */ -/* - -- minimum width definition? - -- Types - * Icon toggle button - * Row button (exclusive "enum" values) - * Option button (also "bit flags") - * Tool/Operator button - * Number button - * Number slider - - * Text string button (to rename data) - * File name button (separate design?) - * Linkage "Library" button (Object, Material, Parent, etc) - * Linkage data name button (Bone, Vgroup) - - * Popup settings button, with optional text, icon or both. - * Popup linkage button (Materials, Bones, etc) - * Pulldown menu button (to invoke pulldown) - * Pulldown menu item (and menu backdrop + title) - - * Button-less icons (open-close triangle, delete cross, ...) - * Color picker Swatch - * Color picker fields - * Normal button (rotatable sphere) +static uiWidgetType *widget_type(uiWidgetTypeEnum type) +{ + bTheme *btheme= U.themes.first; + static uiWidgetType wt; + + /* defaults */ + wt.wcol_theme= &btheme->tui.wcol_regular; + wt.state= widget_state; + wt.draw= widget_but; + wt.custom= NULL; + wt.text= widget_draw_text_icon; + + switch(type) { + case UI_WTYPE_LABEL: + wt.draw= NULL; + wt.state= widget_state_label; + break; + + case UI_WTYPE_TOGGLE: + break; + + case UI_WTYPE_OPTION: + wt.wcol_theme= &btheme->tui.wcol_option; + wt.draw= widget_optionbut; + wt.state= widget_state_label; + break; + + case UI_WTYPE_RADIO: + wt.wcol_theme= &btheme->tui.wcol_radio; + wt.draw= widget_radiobut; + break; + + case UI_WTYPE_NUMBER: + wt.wcol_theme= &btheme->tui.wcol_num; + wt.draw= widget_numbut; + break; + + case UI_WTYPE_SLIDER: + wt.wcol_theme= &btheme->tui.wcol_numslider; + wt.custom= widget_numslider; + break; + + case UI_WTYPE_EXEC: + wt.wcol_theme= &btheme->tui.wcol_tool; + wt.draw= widget_roundbut; + break; + + + /* strings */ + case UI_WTYPE_NAME: + wt.wcol_theme= &btheme->tui.wcol_text; + wt.draw= widget_textbut; + break; + + case UI_WTYPE_NAME_LINK: + break; + + case UI_WTYPE_POINTER_LINK: + break; + + case UI_WTYPE_FILENAME: + break; + + + /* start menus */ + case UI_WTYPE_MENU_RADIO: + wt.wcol_theme= &btheme->tui.wcol_menu; + wt.draw= widget_menubut; + break; + + case UI_WTYPE_MENU_POINTER_LINK: + wt.wcol_theme= &btheme->tui.wcol_menu; + wt.draw= widget_menubut; + break; + + + case UI_WTYPE_PULLDOWN: + wt.wcol_theme= &btheme->tui.wcol_pulldown; + wt.draw= widget_pulldownbut; + wt.state= widget_state_pulldown; + break; + + /* in menus */ + case UI_WTYPE_MENU_ITEM: + wt.wcol_theme= &btheme->tui.wcol_menu_item; + wt.draw= widget_menu_itembut; + wt.state= widget_state_menu_item; + break; + + case UI_WTYPE_MENU_BACK: + wt.wcol_theme= &btheme->tui.wcol_menu_back; + wt.draw= widget_menu_back; + break; + + /* specials */ + case UI_WTYPE_ICON: + wt.draw= NULL; + break; + + case UI_WTYPE_SWATCH: + wt.custom= widget_swatch; + break; + + case UI_WTYPE_RGB_PICKER: + break; + + case UI_WTYPE_NORMAL: + break; + } + + return &wt; +} -*/ static int widget_roundbox_set(uiBut *but, rcti *rect) { @@ -965,82 +1744,142 @@ static int widget_roundbox_set(uiBut *but, rcti *rect) return 15; } - -/* widget classification - -- state: - UI_MOUSE_OVER: on mouse over - UI_ACTIVE: while using it - UI_SELECT: internal state (toggle, row) - -- drawtype - CUSTOM: no widget class, entirely free within rect - WIDGET: part of the standard widget set - -- text placement, split? - -- widget color style hint - - outline - - interior col - - interior slider color? - - shade factors - - decoration color - - text colors - -- callbacks - - widget_draw() - - widget_text_icon() - - - -*/ - - -void ui_draw_but_new(ARegion *ar, uiBut *but) +/* conversion from old to new buttons, so still messy */ +void ui_draw_but(ARegion *ar, uiStyle *style, uiBut *but, rcti *rect) { - rcti rect; - int roundboxtype, state; - - /* XXX project later */ - rect.xmin= but->x1; - rect.xmax= but->x2; - rect.ymin= but->y1; - rect.ymax= but->y2; - - roundboxtype= widget_roundbox_set(but, &rect); - state= but->flag; - - switch (but->type) { - case LABEL: - widget_draw_text_icon(but, &rect, wcol_regular2.text); - break; - case NUM: - widget_numbut(but, &rect, state, roundboxtype); - break; - case ROW: - widget_rowbut(but, &rect, state, roundboxtype); - break; - case TEX: - widget_textbut(but, &rect, state, roundboxtype); - break; - case TOG: - case TOGN: - case TOG3: - if (!(state & UI_HAS_ICON)) - widget_togbut(but, &rect, state, roundboxtype); - else - widget_but(but, &rect, state, roundboxtype); - break; - case MENU: - case BLOCK: - widget_menubut(but, &rect, state, roundboxtype); - break; + bTheme *btheme= U.themes.first; + ThemeUI *tui= &btheme->tui; + uiFontStyle *fstyle= &style->widget; + uiWidgetType *wt= NULL; + + /* handle menus seperately */ + if(but->dt==UI_EMBOSSP) { + switch (but->type) { + case LABEL: + widget_draw_text_icon(&style->widgetlabel, &tui->wcol_menu_back, but, rect); + break; + case SEPR: + break; + + default: + wt= widget_type(UI_WTYPE_MENU_ITEM); + } + } + else if(but->dt==UI_EMBOSSN) { + /* "nothing" */ + wt= widget_type(UI_WTYPE_ICON); + } + else { + + switch (but->type) { + case LABEL: + if(but->block->flag & UI_BLOCK_LOOP) + widget_draw_text_icon(&style->widgetlabel, &tui->wcol_menu_back, but, rect); + else { + wt= widget_type(UI_WTYPE_LABEL); + fstyle= &style->widgetlabel; + } + break; + case SEPR: + break; + case BUT: + wt= widget_type(UI_WTYPE_EXEC); + break; + case NUM: + wt= widget_type(UI_WTYPE_NUMBER); + break; + case NUMSLI: + case HSVSLI: + wt= widget_type(UI_WTYPE_SLIDER); + break; + case ROW: + wt= widget_type(UI_WTYPE_RADIO); + break; + case TEX: + wt= widget_type(UI_WTYPE_NAME); + break; + case TOGBUT: + wt= widget_type(UI_WTYPE_TOGGLE); + break; + case TOG: + case TOGN: + case TOG3: + if (!(but->flag & UI_HAS_ICON)) { + wt= widget_type(UI_WTYPE_OPTION); + but->flag |= UI_TEXT_LEFT; + } + else + wt= widget_type(UI_WTYPE_TOGGLE); + break; + case MENU: + case BLOCK: + case ICONTEXTROW: + wt= widget_type(UI_WTYPE_MENU_RADIO); + break; + + case PULLDOWN: + case HMENU: + wt= widget_type(UI_WTYPE_PULLDOWN); + break; - default: - widget_but(but, &rect, state, roundboxtype); + case BUTM: + wt= widget_type(UI_WTYPE_MENU_ITEM); + break; + + case COL: + wt= widget_type(UI_WTYPE_SWATCH); + break; + + // XXX four old button types + case HSVCUBE: + ui_draw_but_HSVCUBE(but, rect); + break; + case BUT_COLORBAND: + ui_draw_but_COLORBAND(but, &tui->wcol_regular, rect); + break; + case BUT_NORMAL: + ui_draw_but_NORMAL(but, &tui->wcol_regular, rect); + break; + case BUT_CURVE: + ui_draw_but_CURVE(ar, but, &tui->wcol_regular, rect); + break; + + default: + wt= widget_type(UI_WTYPE_TOGGLE); + } } + if(wt) { + rcti disablerect= *rect; /* rect gets clipped smaller for text */ + int roundboxalign, state; + + roundboxalign= widget_roundbox_set(but, rect); + state= but->flag; + if(but->editstr) state |= UI_TEXTINPUT; + + wt->state(wt, state); + if(wt->custom) + wt->custom(but, &wt->wcol, rect, state, roundboxalign); + else if(wt->draw) + wt->draw(&wt->wcol, rect, state, roundboxalign); + wt->text(fstyle, &wt->wcol, but, rect); + + if(state & UI_BUT_DISABLED) + if(but->dt!=UI_EMBOSSP) + widget_disabled(&disablerect); + } } - +void ui_draw_menu_back(uiStyle *style, uiBlock *block, rcti *rect) +{ + uiWidgetType *wt= widget_type(UI_WTYPE_MENU_BACK); + + wt->state(wt, 0); + if(block) + wt->draw(&wt->wcol, rect, block->flag, block->direction); + else + wt->draw(&wt->wcol, rect, 0, 0); + +} diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 039ebcc91f9..1cb58c986d0 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -40,30 +40,38 @@ #include "MEM_guardedalloc.h" + +#include "DNA_curve_types.h" #include "DNA_listBase.h" #include "DNA_userdef_types.h" #include "DNA_screen_types.h" #include "DNA_space_types.h" +#include "BLI_blenlib.h" + #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" +#include "BKE_DerivedMesh.h" +#include "BKE_global.h" +#include "BKE_main.h" +#include "BKE_texture.h" #include "BKE_utildefines.h" #include "BIF_gl.h" +#include "UI_interface.h" #include "UI_resources.h" #include "UI_interface_icons.h" -//#include "UI_icons.h" -#include "BLI_blenlib.h" +#include "interface_intern.h" /* global for themes */ typedef void (*VectorDrawFunc)(int x, int y, int w, int h, float alpha); static bTheme *theme_active=NULL; static int theme_spacetype= SPACE_VIEW3D; - +static int theme_regionid= RGN_TYPE_WINDOW; void ui_resources_init(void) { @@ -86,7 +94,6 @@ char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) static char error[4]={240, 0, 240, 255}; static char alert[4]={240, 60, 60, 255}; static char headerdesel[4]={0,0,0,255}; - static char custom[4]={0,0,0,255}; char *cp= error; @@ -96,51 +103,9 @@ char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) if(colorid < TH_THEMEUI) { switch(colorid) { - case TH_BUT_OUTLINE: - cp= btheme->tui.outline; break; - case TH_BUT_NEUTRAL: - cp= btheme->tui.neutral; break; - case TH_BUT_ACTION: - cp= btheme->tui.action; break; - case TH_BUT_SETTING: - cp= btheme->tui.setting; break; - case TH_BUT_SETTING1: - cp= btheme->tui.setting1; break; - case TH_BUT_SETTING2: - cp= btheme->tui.setting2; break; - case TH_BUT_NUM: - cp= btheme->tui.num; break; - case TH_BUT_TEXTFIELD: - cp= btheme->tui.textfield; break; - case TH_BUT_TEXTFIELD_HI: - cp= btheme->tui.textfield_hi; break; - case TH_BUT_POPUP: - cp= btheme->tui.popup; break; - case TH_BUT_TEXT: - cp= btheme->tui.text; break; - case TH_BUT_TEXT_HI: - cp= btheme->tui.text_hi; break; - case TH_MENU_BACK: - cp= btheme->tui.menu_back; break; - case TH_MENU_ITEM: - cp= btheme->tui.menu_item; break; - case TH_MENU_HILITE: - cp= btheme->tui.menu_hilite; break; - case TH_MENU_TEXT: - cp= btheme->tui.menu_text; break; - case TH_MENU_TEXT_HI: - cp= btheme->tui.menu_text_hi; break; - - case TH_BUT_DRAWTYPE: - cp= &btheme->tui.but_drawtype; break; - case TH_ICONFILE: - cp= btheme->tui.iconfile; break; - case TH_REDALERT: cp= alert; break; - case TH_CUSTOM: - cp= custom; break; } } else { @@ -198,11 +163,46 @@ char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) switch(colorid) { case TH_BACK: - cp= ts->back; break; + if(theme_regionid==RGN_TYPE_WINDOW) + cp= ts->back; + else if(theme_regionid==RGN_TYPE_CHANNELS) + cp= ts->list; + else if(theme_regionid==RGN_TYPE_HEADER) + cp= ts->header; + else + cp= ts->button; + break; case TH_TEXT: - cp= ts->text; break; + if(theme_regionid==RGN_TYPE_WINDOW) + cp= ts->text; + else if(theme_regionid==RGN_TYPE_CHANNELS) + cp= ts->list_text; + else if(theme_regionid==RGN_TYPE_HEADER) + cp= ts->header_text; + else + cp= ts->button_text; + break; case TH_TEXT_HI: - cp= ts->text_hi; break; + if(theme_regionid==RGN_TYPE_WINDOW) + cp= ts->text_hi; + else if(theme_regionid==RGN_TYPE_CHANNELS) + cp= ts->list_text_hi; + else if(theme_regionid==RGN_TYPE_HEADER) + cp= ts->header_text_hi; + else + cp= ts->button_text_hi; + break; + case TH_TITLE: + if(theme_regionid==RGN_TYPE_WINDOW) + cp= ts->title; + else if(theme_regionid==RGN_TYPE_CHANNELS) + cp= ts->list_title; + else if(theme_regionid==RGN_TYPE_HEADER) + cp= ts->header_title; + else + cp= ts->button_title; + break; + case TH_HEADER: cp= ts->header; break; case TH_HEADERDESEL: @@ -213,8 +213,25 @@ char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) headerdesel[2]= cp[2]>10?cp[2]-10:0; cp= headerdesel; break; + case TH_HEADER_TEXT: + cp= ts->header_text; break; + case TH_HEADER_TEXT_HI: + cp= ts->header_text_hi; break; + case TH_PANEL: cp= ts->panel; break; + case TH_PANEL_TEXT: + cp= ts->panel_text; break; + case TH_PANEL_TEXT_HI: + cp= ts->panel_text_hi; break; + + case TH_BUTBACK: + cp= ts->button; break; + case TH_BUTBACK_TEXT: + cp= ts->button_text; break; + case TH_BUTBACK_TEXT_HI: + cp= ts->button_text_hi; break; + case TH_SHADE1: cp= ts->shade1; break; case TH_SHADE2: @@ -340,11 +357,56 @@ char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) return cp; } +#define SETCOLTEST(col, r, g, b, a) if(col[3]==0) {col[0]=r; col[1]=g; col[2]= b; col[3]= a;} + +/* use this call to init new variables in themespace, if they're same for all */ +static void ui_theme_init_new_do(ThemeSpace *ts) +{ + SETCOLTEST(ts->header_text, 0, 0, 0, 255); + SETCOLTEST(ts->header_title, 0, 0, 0, 255); + SETCOLTEST(ts->header_text_hi, 255, 255, 255, 255); + + SETCOLTEST(ts->panel_text, 0, 0, 0, 255); + SETCOLTEST(ts->panel_title, 0, 0, 0, 255); + SETCOLTEST(ts->panel_text_hi, 255, 255, 255, 255); + + SETCOLTEST(ts->button, 145, 145, 145, 245); + SETCOLTEST(ts->button_title, 0, 0, 0, 255); + SETCOLTEST(ts->button_text, 0, 0, 0, 255); + SETCOLTEST(ts->button_text_hi, 255, 255, 255, 255); + + SETCOLTEST(ts->list, 165, 165, 165, 255); + SETCOLTEST(ts->list_title, 0, 0, 0, 255); + SETCOLTEST(ts->list_text, 0, 0, 0, 255); + SETCOLTEST(ts->list_text_hi, 255, 255, 255, 255); +} + +static void ui_theme_init_new(bTheme *btheme) +{ + ui_theme_init_new_do(&btheme->tbuts); + ui_theme_init_new_do(&btheme->tv3d); + ui_theme_init_new_do(&btheme->tfile); + ui_theme_init_new_do(&btheme->tipo); + ui_theme_init_new_do(&btheme->tinfo); + ui_theme_init_new_do(&btheme->tsnd); + ui_theme_init_new_do(&btheme->tact); + ui_theme_init_new_do(&btheme->tnla); + ui_theme_init_new_do(&btheme->tseq); + ui_theme_init_new_do(&btheme->tima); + ui_theme_init_new_do(&btheme->timasel); + ui_theme_init_new_do(&btheme->text); + ui_theme_init_new_do(&btheme->toops); + ui_theme_init_new_do(&btheme->ttime); + ui_theme_init_new_do(&btheme->tnode); + +} + #define SETCOL(col, r, g, b, a) col[0]=r; col[1]=g; col[2]= b; col[3]= a; +#define SETCOLF(col, r, g, b, a) col[0]=r*255; col[1]=g*255; col[2]= b*255; col[3]= a*255; -/* initialize +/* initialize default theme, can't be edited Note: when you add new colors, created & saved themes need initialized - in usiblender.c, search for "versionfile" + use function below, init_userdef_do_versions() */ void ui_theme_init_userdef(void) { @@ -361,43 +423,26 @@ void ui_theme_init_userdef(void) strcpy(btheme->name, "Default"); } - UI_SetTheme(NULL); // make sure the global used in this file is set + UI_SetTheme(0, 0); // make sure the global used in this file is set /* UI buttons */ - SETCOL(btheme->tui.outline, 130, 130, 130, 255); - SETCOL(btheme->tui.neutral, 165, 165, 165, 255); - SETCOL(btheme->tui.action, 165, 165, 165, 255); - SETCOL(btheme->tui.setting, 165, 165, 165, 255); - SETCOL(btheme->tui.setting1, 165, 165, 165, 255); - SETCOL(btheme->tui.setting2, 165, 165, 165, 255); - SETCOL(btheme->tui.num, 165, 165, 165, 255); - SETCOL(btheme->tui.textfield, 143, 142, 143, 255); - SETCOL(btheme->tui.textfield_hi,255, 151, 26, 255); - SETCOL(btheme->tui.popup, 174, 174, 174, 255); - - SETCOL(btheme->tui.text, 0,0,0, 255); - SETCOL(btheme->tui.text_hi, 255, 255, 255, 255); - - SETCOL(btheme->tui.menu_back, 220, 220, 220, 235); - SETCOL(btheme->tui.menu_item, 255, 255, 255, 20); - SETCOL(btheme->tui.menu_hilite, 110, 110, 110, 255); - SETCOL(btheme->tui.menu_text, 0, 0, 0, 255); - SETCOL(btheme->tui.menu_text_hi, 255, 255, 255, 255); - - btheme->tui.but_drawtype= TH_ROUNDSHADED; - BLI_strncpy(btheme->tui.iconfile, "", sizeof(btheme->tui.iconfile)); + ui_widget_color_init(&btheme->tui); + /* common (new) variables */ + ui_theme_init_new(btheme); + /* space view3d */ - SETCOL(btheme->tv3d.back, 90, 90, 90, 255); + SETCOLF(btheme->tv3d.back, 0.225, 0.225, 0.225, 1.0); SETCOL(btheme->tv3d.text, 0, 0, 0, 255); SETCOL(btheme->tv3d.text_hi, 255, 255, 255, 255); - SETCOL(btheme->tv3d.header, 185, 185, 185, 255); + + SETCOLF(btheme->tv3d.header, 0.45, 0.45, 0.45, 1.0); SETCOL(btheme->tv3d.panel, 165, 165, 165, 127); - + SETCOL(btheme->tv3d.shade1, 160, 160, 160, 100); SETCOL(btheme->tv3d.shade2, 0x7f, 0x70, 0x70, 100); - SETCOL(btheme->tv3d.grid, 74, 74, 74 , 255); + SETCOLF(btheme->tv3d.grid, 0.251, 0.251, 0.251, 1.0); SETCOL(btheme->tv3d.wire, 0x0, 0x0, 0x0, 255); SETCOL(btheme->tv3d.lamp, 0, 0, 0, 40); SETCOL(btheme->tv3d.select, 241, 88, 0, 255); @@ -427,19 +472,16 @@ void ui_theme_init_userdef(void) /* to have something initialized */ btheme->tbuts= btheme->tv3d; - SETCOL(btheme->tbuts.back, 0x82, 0x82, 0x82, 255); - SETCOL(btheme->tbuts.header, 185, 185, 185, 255); + SETCOLF(btheme->tbuts.back, 0.45, 0.45, 0.45, 1.0); SETCOL(btheme->tbuts.panel, 0x82, 0x82, 0x82, 255); - /* space ipo */ - /* to have something initialized */ + /* graph editor */ btheme->tipo= btheme->tv3d; - + SETCOLF(btheme->tipo.back, 0.42, 0.42, 0.42, 1.0); + SETCOLF(btheme->tipo.list, 0.4, 0.4, 0.4, 1.0); SETCOL(btheme->tipo.grid, 94, 94, 94, 255); - SETCOL(btheme->tipo.back, 120, 120, 120, 255); - SETCOL(btheme->tipo.header, 185, 185, 185, 255); SETCOL(btheme->tipo.panel, 255, 255, 255, 150); - SETCOL(btheme->tipo.shade1, 172, 172, 172, 100); + SETCOL(btheme->tipo.shade1, 150, 150, 150, 100); /* scrollbars */ SETCOL(btheme->tipo.shade2, 0x70, 0x70, 0x70, 100); SETCOL(btheme->tipo.vertex, 0, 0, 0, 255); SETCOL(btheme->tipo.vertex_select, 255, 133, 0, 255); @@ -455,13 +497,17 @@ void ui_theme_init_userdef(void) SETCOL(btheme->tipo.group, 79, 101, 73, 255); SETCOL(btheme->tipo.group_active, 135, 177, 125, 255); + /* dopesheet */ + btheme->tact= btheme->tipo; + SETCOL(btheme->tact.strip, 12, 10, 10, 128); + SETCOL(btheme->tact.strip_select, 255, 140, 0, 255); + /* space file */ /* to have something initialized */ btheme->tfile= btheme->tv3d; SETCOL(btheme->tfile.back, 90, 90, 90, 255); SETCOL(btheme->tfile.text, 250, 250, 250, 255); SETCOL(btheme->tfile.text_hi, 15, 15, 15, 255); - SETCOL(btheme->tfile.header, 185, 185, 185, 255); SETCOL(btheme->tfile.panel, 180, 180, 180, 255); // bookmark/ui regions SETCOL(btheme->tfile.active, 130, 130, 130, 255); // selected files SETCOL(btheme->tfile.hilite, 255, 140, 25, 255); // selected files @@ -472,31 +518,13 @@ void ui_theme_init_userdef(void) SETCOL(btheme->tfile.scene, 250, 250, 250, 255); - /* space action */ - btheme->tact= btheme->tv3d; - SETCOL(btheme->tact.back, 116, 116, 116, 255); - SETCOL(btheme->tact.text, 0, 0, 0, 255); - SETCOL(btheme->tact.text_hi, 255, 255, 255, 255); - SETCOL(btheme->tact.header, 185, 185, 185, 255); - SETCOL(btheme->tact.grid, 94, 94, 94, 255); - SETCOL(btheme->tact.face, 166, 166, 166, 255); // RVK - SETCOL(btheme->tact.shade1, 172, 172, 172, 255); // sliders - SETCOL(btheme->tact.shade2, 74, 74, 74, 100); // bar - SETCOL(btheme->tact.hilite, 255, 160, 0, 100); // bar - SETCOL(btheme->tact.strip_select, 255, 160, 0, 255); - SETCOL(btheme->tact.strip, 78, 78, 78, 255); - SETCOL(btheme->tact.group, 79, 101, 73, 255); - SETCOL(btheme->tact.group_active, 135, 177, 125, 255) - SETCOL(btheme->tact.ds_channel, 82, 96, 110, 255); - SETCOL(btheme->tact.ds_subchannel, 124, 137, 150, 255); - + /* space nla */ btheme->tnla= btheme->tv3d; SETCOL(btheme->tnla.back, 116, 116, 116, 255); SETCOL(btheme->tnla.text, 0, 0, 0, 255); SETCOL(btheme->tnla.text_hi, 255, 255, 255, 255); - SETCOL(btheme->tnla.header, 185, 185, 185, 255); SETCOL(btheme->tnla.grid, 94, 94, 94, 255); SETCOL(btheme->tnla.shade1, 172, 172, 172, 255); // sliders SETCOL(btheme->tnla.shade2, 84, 44, 31, 100); // bar @@ -533,7 +561,6 @@ void ui_theme_init_userdef(void) SETCOL(btheme->timasel.active, 195, 195, 195, 255); /* active tile */ SETCOL(btheme->timasel.grid, 94, 94, 94, 255); /* active file text */ SETCOL(btheme->timasel.back, 110, 110, 110, 255); - SETCOL(btheme->timasel.header, 185, 185, 185, 255); SETCOL(btheme->timasel.shade1, 94, 94, 94, 255); /* bar */ SETCOL(btheme->timasel.shade2, 172, 172, 172, 255); /* sliders */ SETCOL(btheme->timasel.hilite, 17, 27, 60, 100); /* selected tile */ @@ -557,17 +584,17 @@ void ui_theme_init_userdef(void) /* space oops */ btheme->toops= btheme->tv3d; - SETCOL(btheme->toops.back, 153, 153, 153, 255); - + SETCOLF(btheme->toops.back, 0.45, 0.45, 0.45, 1.0); + /* space info */ btheme->tinfo= btheme->tv3d; SETCOL(btheme->tinfo.back, 153, 153, 153, 255); /* space sound */ btheme->tsnd= btheme->tv3d; - SETCOL(btheme->tsnd.back, 153, 153, 153, 255); + SETCOLF(btheme->tsnd.back, 0.45, 0.45, 0.45, 1.0); + SETCOLF(btheme->tsnd.grid, 0.36, 0.36, 0.36, 1.0); SETCOL(btheme->tsnd.shade1, 173, 173, 173, 255); // sliders - SETCOL(btheme->tsnd.grid, 140, 140, 140, 255); /* space time */ btheme->ttime= btheme->tsnd; // same as sound space @@ -583,188 +610,19 @@ void ui_theme_init_userdef(void) } -char *UI_ThemeColorsPup(int spacetype) -{ - char *cp= MEM_callocN(32*32, "theme pup"); - char *str = cp; - - if(spacetype==0) { - str += sprintf(str, "Outline %%x%d|", TH_BUT_OUTLINE); - str += sprintf(str, "Neutral %%x%d|", TH_BUT_NEUTRAL); - str += sprintf(str, "Action %%x%d|", TH_BUT_ACTION); - str += sprintf(str, "Setting %%x%d|", TH_BUT_SETTING); - str += sprintf(str, "Special Setting 1%%x%d|", TH_BUT_SETTING1); - str += sprintf(str, "Special Setting 2 %%x%d|", TH_BUT_SETTING2); - str += sprintf(str, "Number Input %%x%d|", TH_BUT_NUM); - str += sprintf(str, "Text Input %%x%d|", TH_BUT_TEXTFIELD); - str += sprintf(str, "Text Input Highlight %%x%d|", TH_BUT_TEXTFIELD_HI); - str += sprintf(str, "Popup %%x%d|", TH_BUT_POPUP); - str += sprintf(str, "Text %%x%d|", TH_BUT_TEXT); - str += sprintf(str, "Text Highlight %%x%d|", TH_BUT_TEXT_HI); - str += sprintf(str, "%%l|"); - str += sprintf(str, "Menu Background %%x%d|", TH_MENU_BACK); - str += sprintf(str, "Menu Item %%x%d|", TH_MENU_ITEM); - str += sprintf(str, "Menu Item Highlight %%x%d|", TH_MENU_HILITE); - str += sprintf(str, "Menu Text %%x%d|", TH_MENU_TEXT); - str += sprintf(str, "Menu Text Highlight %%x%d|", TH_MENU_TEXT_HI); - str += sprintf(str, "%%l|"); - str += sprintf(str, "Drawtype %%x%d|", TH_BUT_DRAWTYPE); - str += sprintf(str, "%%l|"); - str += sprintf(str, "Icon File %%x%d|", TH_ICONFILE); - } - else { - // first defaults for each space - str += sprintf(str, "Background %%x%d|", TH_BACK); - str += sprintf(str, "Text %%x%d|", TH_TEXT); - str += sprintf(str, "Text Highlight %%x%d|", TH_TEXT_HI); - str += sprintf(str, "Header %%x%d|", TH_HEADER); - - switch(spacetype) { - case SPACE_VIEW3D: - str += sprintf(str, "Panel %%x%d|", TH_PANEL); - str += sprintf(str, "%%l|"); - str += sprintf(str, "Grid %%x%d|", TH_GRID); - str += sprintf(str, "Wire %%x%d|", TH_WIRE); - str += sprintf(str, "Lamp %%x%d|", TH_LAMP); - str += sprintf(str, "Object Selected %%x%d|", TH_SELECT); - str += sprintf(str, "Object Active %%x%d|", TH_ACTIVE); - str += sprintf(str, "Object Grouped %%x%d|", TH_GROUP); - str += sprintf(str, "Object Grouped Active %%x%d|", TH_GROUP_ACTIVE); - str += sprintf(str, "Transform %%x%d|", TH_TRANSFORM); - str += sprintf(str, "%%l|"); - str += sprintf(str, "Vertex %%x%d|", TH_VERTEX); - str += sprintf(str, "Vertex Selected %%x%d|", TH_VERTEX_SELECT); - str += sprintf(str, "Vertex Size %%x%d|", TH_VERTEX_SIZE); - str += sprintf(str, "Edge Selected %%x%d|", TH_EDGE_SELECT); - str += sprintf(str, "Edge Seam %%x%d|", TH_EDGE_SEAM); - str += sprintf(str, "Edge Sharp %%x%d|", TH_EDGE_SHARP); - str += sprintf(str, "Edge UV Face Select %%x%d|", TH_EDGE_FACESEL); - str += sprintf(str, "Face (transp) %%x%d|", TH_FACE); - str += sprintf(str, "Face Selected (transp) %%x%d|", TH_FACE_SELECT); - str += sprintf(str, "Face Dot Selected %%x%d|", TH_FACE_DOT); - str += sprintf(str, "Face Dot Size %%x%d|", TH_FACEDOT_SIZE); - str += sprintf(str, "Active Vert/Edge/Face %%x%d|", TH_EDITMESH_ACTIVE); - str += sprintf(str, "Normal %%x%d|", TH_NORMAL); - str += sprintf(str, "Bone Solid %%x%d|", TH_BONE_SOLID); - str += sprintf(str, "Bone Pose %%x%d", TH_BONE_POSE); - str += sprintf(str, "Current Frame %%x%d", TH_CFRAME); - break; - case SPACE_IPO: - str += sprintf(str, "Panel %%x%d|", TH_PANEL); - str += sprintf(str, "%%l|"); - str += sprintf(str, "Grid %%x%d|", TH_GRID); - str += sprintf(str, "Window Sliders %%x%d|", TH_SHADE1); - str += sprintf(str, "Ipo Channels %%x%d|", TH_SHADE2); - str += sprintf(str, "Vertex %%x%d|", TH_VERTEX); - str += sprintf(str, "Vertex Selected %%x%d|", TH_VERTEX_SELECT); - str += sprintf(str, "Vertex Size %%x%d|", TH_VERTEX_SIZE); - str += sprintf(str, "Current Frame %%x%d", TH_CFRAME); - break; - case SPACE_FILE: - str += sprintf(str, "Selected file %%x%d", TH_HILITE); - break; - case SPACE_NLA: - //str += sprintf(str, "Panel %%x%d|", TH_PANEL); - str += sprintf(str, "%%l|"); - str += sprintf(str, "Grid %%x%d|", TH_GRID); - str += sprintf(str, "View Sliders %%x%d|", TH_SHADE1); - str += sprintf(str, "Bars %%x%d|", TH_SHADE2); - str += sprintf(str, "Bars selected %%x%d|", TH_HILITE); - str += sprintf(str, "Strips %%x%d|", TH_STRIP); - str += sprintf(str, "Strips selected %%x%d|", TH_STRIP_SELECT); - str += sprintf(str, "Current Frame %%x%d", TH_CFRAME); - break; - case SPACE_ACTION: - //str += sprintf(str, "Panel %%x%d|", TH_PANEL); - str += sprintf(str, "%%l|"); - str += sprintf(str, "Grid %%x%d|", TH_GRID); - str += sprintf(str, "RVK Sliders %%x%d|", TH_FACE); - str += sprintf(str, "View Sliders %%x%d|", TH_SHADE1); - str += sprintf(str, "Channels %%x%d|", TH_SHADE2); - str += sprintf(str, "Channels Selected %%x%d|", TH_HILITE); - str += sprintf(str, "Long Key %%x%d|", TH_STRIP); - str += sprintf(str, "Long Key selected %%x%d|", TH_STRIP_SELECT); - str += sprintf(str, "Current Frame %%x%d", TH_CFRAME); - break; - case SPACE_IMAGE: - str += sprintf(str, "%%l|"); - str += sprintf(str, "Vertex %%x%d|", TH_VERTEX); - str += sprintf(str, "Vertex Selected %%x%d|", TH_VERTEX_SELECT); - str += sprintf(str, "Vertex Size %%x%d|", TH_VERTEX_SIZE); - str += sprintf(str, "Face %%x%d|", TH_FACE); - str += sprintf(str, "Face Selected %%x%d", TH_FACE_SELECT); - break; - case SPACE_SEQ: - str += sprintf(str, "Grid %%x%d|", TH_GRID); - str += sprintf(str, "Window Sliders %%x%d|", TH_SHADE1); - str += sprintf(str, "%%l|"); - str += sprintf(str, "Movie Strip %%x%d|", TH_SEQ_MOVIE); - str += sprintf(str, "Image Strip %%x%d|", TH_SEQ_IMAGE); - str += sprintf(str, "Scene Strip %%x%d|", TH_SEQ_SCENE); - str += sprintf(str, "Audio Strip %%x%d|", TH_SEQ_AUDIO); - str += sprintf(str, "Effect Strip %%x%d|", TH_SEQ_EFFECT); - str += sprintf(str, "Plugin Strip %%x%d|", TH_SEQ_PLUGIN); - str += sprintf(str, "Transition Strip %%x%d|", TH_SEQ_TRANSITION); - str += sprintf(str, "Meta Strip %%x%d|", TH_SEQ_META); - str += sprintf(str, "Current Frame %%x%d", TH_CFRAME); - break; - case SPACE_SOUND: - str += sprintf(str, "Grid %%x%d|", TH_GRID); - str += sprintf(str, "Window Slider %%x%d|", TH_SHADE1); - str += sprintf(str, "Current Frame %%x%d", TH_CFRAME); - break; - case SPACE_BUTS: - str += sprintf(str, "Panel %%x%d|", TH_PANEL); - break; - case SPACE_IMASEL: - str += sprintf(str, "Tiles %%x%d|", TH_PANEL); - str += sprintf(str, "Scrollbar %%x%d|", TH_SHADE1); - str += sprintf(str, "Scroll Handle %%x%d|", TH_SHADE2); - str += sprintf(str, "Selected File %%x%d|", TH_HILITE); - str += sprintf(str, "Active File %%x%d|", TH_ACTIVE); - str += sprintf(str, "Active File Text%%x%d|", TH_GRID); - break; - case SPACE_TEXT: - str += sprintf(str, "Scroll Bar %%x%d|", TH_SHADE1); - str += sprintf(str, "Selected Text %%x%d|", TH_SHADE2); - str += sprintf(str, "Cursor %%x%d|", TH_HILITE); - str += sprintf(str, "%%l|"); - str += sprintf(str, "Syntax Builtin %%x%d|", TH_SYNTAX_B); - str += sprintf(str, "Syntax Special %%x%d|", TH_SYNTAX_V); - str += sprintf(str, "Syntax Comment %%x%d|", TH_SYNTAX_C); - str += sprintf(str, "Syntax Strings %%x%d|", TH_SYNTAX_L); - str += sprintf(str, "Syntax Numbers %%x%d|", TH_SYNTAX_N); - break; - case SPACE_TIME: - str += sprintf(str, "Grid %%x%d|", TH_GRID); - str += sprintf(str, "Current Frame %%x%d", TH_CFRAME); - break; - case SPACE_NODE: - str += sprintf(str, "Wires %%x%d|", TH_WIRE); - str += sprintf(str, "Wires Select %%x%d|", TH_EDGE_SELECT); - str += sprintf(str, "%%l|"); - str += sprintf(str, "Node Backdrop %%x%d|", TH_NODE); - str += sprintf(str, "In/Out Node %%x%d|", TH_NODE_IN_OUT); - str += sprintf(str, "Convertor Node %%x%d|", TH_NODE_CONVERTOR); - str += sprintf(str, "Operator Node %%x%d|", TH_NODE_OPERATOR); - str += sprintf(str, "Group Node %%x%d|", TH_NODE_GROUP); - break; - } - } - return cp; -} -void UI_SetTheme(ScrArea *sa) +void UI_SetTheme(int spacetype, int regionid) { - if(sa==NULL) { // called for safety, when delete themes + if(spacetype==0) { // called for safety, when delete themes theme_active= U.themes.first; theme_spacetype= SPACE_VIEW3D; + theme_regionid= RGN_TYPE_WINDOW; } else { // later on, a local theme can be found too theme_active= U.themes.first; - theme_spacetype= sa->spacetype; - + theme_spacetype= spacetype; + theme_regionid= regionid; } } @@ -985,3 +843,417 @@ void UI_GetColorPtrBlendShade3ubv(char *cp1, char *cp2, char *col, float fac, in col[2] = b; } +void UI_make_axis_color(char *src_col, char *dst_col, char axis) +{ + switch(axis) + { + case 'x': + case 'X': + dst_col[0]= src_col[0]>219?255:src_col[0]+36; + dst_col[1]= src_col[1]<26?0:src_col[1]-26; + dst_col[2]= src_col[2]<26?0:src_col[2]-26; + break; + case 'y': + case 'Y': + dst_col[0]= src_col[0]<46?0:src_col[0]-36; + dst_col[1]= src_col[1]>189?255:src_col[1]+66; + dst_col[2]= src_col[2]<46?0:src_col[2]-36; + break; + default: + dst_col[0]= src_col[0]<26?0:src_col[0]-26; + dst_col[1]= src_col[1]<26?0:src_col[1]-26; + dst_col[2]= src_col[2]>209?255:src_col[2]+46; + } +} + +/* ************************************************************* */ + +/* patching UserDef struct and Themes */ +void init_userdef_do_versions(void) +{ +// countall(); + + /* the UserDef struct is not corrected with do_versions() .... ugh! */ + if(U.wheellinescroll == 0) U.wheellinescroll = 3; + if(U.menuthreshold1==0) { + U.menuthreshold1= 5; + U.menuthreshold2= 2; + } + if(U.tb_leftmouse==0) { + U.tb_leftmouse= 5; + U.tb_rightmouse= 5; + } + if(U.mixbufsize==0) U.mixbufsize= 2048; + if (BLI_streq(U.tempdir, "/")) { + char *tmp= getenv("TEMP"); + + strcpy(U.tempdir, tmp?tmp:"/tmp/"); + } + if (U.savetime <= 0) { + U.savetime = 1; +// XXX error(".B.blend is buggy, please consider removing it.\n"); + } + /* transform widget settings */ + if(U.tw_hotspot==0) { + U.tw_hotspot= 14; + U.tw_size= 20; // percentage of window size + U.tw_handlesize= 16; // percentage of widget radius + } + if(U.pad_rot_angle==0) + U.pad_rot_angle= 15; + + if(U.flag & USER_CUSTOM_RANGE) + vDM_ColorBand_store(&U.coba_weight); /* signal for derivedmesh to use colorband */ + + if (G.main->versionfile <= 191) { + strcpy(U.plugtexdir, U.textudir); + strcpy(U.sounddir, "/"); + } + + /* patch to set Dupli Armature */ + if (G.main->versionfile < 220) { + U.dupflag |= USER_DUP_ARM; + } + + /* added seam, normal color, undo */ + if (G.main->versionfile <= 234) { + bTheme *btheme; + + U.uiflag |= USER_GLOBALUNDO; + if (U.undosteps==0) U.undosteps=32; + + for(btheme= U.themes.first; btheme; btheme= btheme->next) { + /* check for alpha==0 is safe, then color was never set */ + if(btheme->tv3d.edge_seam[3]==0) { + SETCOL(btheme->tv3d.edge_seam, 230, 150, 50, 255); + } + if(btheme->tv3d.normal[3]==0) { + SETCOL(btheme->tv3d.normal, 0x22, 0xDD, 0xDD, 255); + } + if(btheme->tv3d.face_dot[3]==0) { + SETCOL(btheme->tv3d.face_dot, 255, 138, 48, 255); + btheme->tv3d.facedot_size= 4; + } + } + } + if (G.main->versionfile <= 235) { + /* illegal combo... */ + if (U.flag & USER_LMOUSESELECT) + U.flag &= ~USER_TWOBUTTONMOUSE; + } + if (G.main->versionfile <= 236) { + bTheme *btheme; + /* new space type */ + for(btheme= U.themes.first; btheme; btheme= btheme->next) { + /* check for alpha==0 is safe, then color was never set */ + if(btheme->ttime.back[3]==0) { + btheme->ttime = btheme->tsnd; // copy from sound + } + if(btheme->text.syntaxn[3]==0) { + SETCOL(btheme->text.syntaxn, 0, 0, 200, 255); /* Numbers Blue*/ + SETCOL(btheme->text.syntaxl, 100, 0, 0, 255); /* Strings red */ + SETCOL(btheme->text.syntaxc, 0, 100, 50, 255); /* Comments greenish */ + SETCOL(btheme->text.syntaxv, 95, 95, 0, 255); /* Special */ + SETCOL(btheme->text.syntaxb, 128, 0, 80, 255); /* Builtin, red-purple */ + } + } + } + if (G.main->versionfile <= 237) { + bTheme *btheme; + /* bone colors */ + for(btheme= U.themes.first; btheme; btheme= btheme->next) { + /* check for alpha==0 is safe, then color was never set */ + if(btheme->tv3d.bone_solid[3]==0) { + SETCOL(btheme->tv3d.bone_solid, 200, 200, 200, 255); + SETCOL(btheme->tv3d.bone_pose, 80, 200, 255, 80); + } + } + } + if (G.main->versionfile <= 238) { + bTheme *btheme; + /* bone colors */ + for(btheme= U.themes.first; btheme; btheme= btheme->next) { + /* check for alpha==0 is safe, then color was never set */ + if(btheme->tnla.strip[3]==0) { + SETCOL(btheme->tnla.strip_select, 0xff, 0xff, 0xaa, 255); + SETCOL(btheme->tnla.strip, 0xe4, 0x9c, 0xc6, 255); + } + } + } + if (G.main->versionfile <= 239) { + bTheme *btheme; + + for(btheme= U.themes.first; btheme; btheme= btheme->next) { + /* Lamp theme, check for alpha==0 is safe, then color was never set */ + if(btheme->tv3d.lamp[3]==0) { + SETCOL(btheme->tv3d.lamp, 0, 0, 0, 40); +/* TEMPORAL, remove me! (ton) */ + U.uiflag |= USER_PLAINMENUS; + } + + } + if(U.obcenter_dia==0) U.obcenter_dia= 6; + } + if (G.main->versionfile <= 241) { + bTheme *btheme; + for(btheme= U.themes.first; btheme; btheme= btheme->next) { + /* Node editor theme, check for alpha==0 is safe, then color was never set */ + if(btheme->tnode.syntaxn[3]==0) { + /* re-uses syntax color storage */ + btheme->tnode= btheme->tv3d; + SETCOL(btheme->tnode.edge_select, 255, 255, 255, 255); + SETCOL(btheme->tnode.syntaxl, 150, 150, 150, 255); /* TH_NODE, backdrop */ + SETCOL(btheme->tnode.syntaxn, 129, 131, 144, 255); /* in/output */ + SETCOL(btheme->tnode.syntaxb, 127,127,127, 255); /* operator */ + SETCOL(btheme->tnode.syntaxv, 142, 138, 145, 255); /* generator */ + SETCOL(btheme->tnode.syntaxc, 120, 145, 120, 255); /* group */ + } + /* Group theme colors */ + if(btheme->tv3d.group[3]==0) { + SETCOL(btheme->tv3d.group, 0x10, 0x40, 0x10, 255); + SETCOL(btheme->tv3d.group_active, 0x66, 0xFF, 0x66, 255); + } + /* Sequence editor theme*/ + if(btheme->tseq.movie[3]==0) { + SETCOL(btheme->tseq.movie, 81, 105, 135, 255); + SETCOL(btheme->tseq.image, 109, 88, 129, 255); + SETCOL(btheme->tseq.scene, 78, 152, 62, 255); + SETCOL(btheme->tseq.audio, 46, 143, 143, 255); + SETCOL(btheme->tseq.effect, 169, 84, 124, 255); + SETCOL(btheme->tseq.plugin, 126, 126, 80, 255); + SETCOL(btheme->tseq.transition, 162, 95, 111, 255); + SETCOL(btheme->tseq.meta, 109, 145, 131, 255); + } + } + + /* set defaults for 3D View rotating axis indicator */ + /* since size can't be set to 0, this indicates it's not saved in .B.blend */ + if (U.rvisize == 0) { + U.rvisize = 15; + U.rvibright = 8; + U.uiflag |= USER_SHOW_ROTVIEWICON; + } + + } + if (G.main->versionfile <= 242) { + bTheme *btheme; + + for(btheme= U.themes.first; btheme; btheme= btheme->next) { + /* long keyframe color */ + /* check for alpha==0 is safe, then color was never set */ + if(btheme->tact.strip[3]==0) { + SETCOL(btheme->tv3d.edge_sharp, 255, 32, 32, 255); + SETCOL(btheme->tact.strip_select, 0xff, 0xff, 0xaa, 204); + SETCOL(btheme->tact.strip, 0xe4, 0x9c, 0xc6, 204); + } + + /* IPO-Editor - Vertex Size*/ + if(btheme->tipo.vertex_size == 0) { + btheme->tipo.vertex_size= 3; + } + } + } + if (G.main->versionfile <= 243) { + /* set default number of recently-used files (if not set) */ + if (U.recent_files == 0) U.recent_files = 10; + } + if (G.main->versionfile < 245 || (G.main->versionfile == 245 && G.main->subversionfile < 3)) { + bTheme *btheme; + for(btheme= U.themes.first; btheme; btheme= btheme->next) { + SETCOL(btheme->tv3d.editmesh_active, 255, 255, 255, 128); + } + if(U.coba_weight.tot==0) + init_colorband(&U.coba_weight, 1); + } + if ((G.main->versionfile < 245) || (G.main->versionfile == 245 && G.main->subversionfile < 11)) { + bTheme *btheme; + for (btheme= U.themes.first; btheme; btheme= btheme->next) { + /* these should all use the same colour */ + SETCOL(btheme->tv3d.cframe, 0x60, 0xc0, 0x40, 255); + SETCOL(btheme->tipo.cframe, 0x60, 0xc0, 0x40, 255); + SETCOL(btheme->tact.cframe, 0x60, 0xc0, 0x40, 255); + SETCOL(btheme->tnla.cframe, 0x60, 0xc0, 0x40, 255); + SETCOL(btheme->tseq.cframe, 0x60, 0xc0, 0x40, 255); + SETCOL(btheme->tsnd.cframe, 0x60, 0xc0, 0x40, 255); + SETCOL(btheme->ttime.cframe, 0x60, 0xc0, 0x40, 255); + } + } + if ((G.main->versionfile < 245) || (G.main->versionfile == 245 && G.main->subversionfile < 11)) { + bTheme *btheme; + for (btheme= U.themes.first; btheme; btheme= btheme->next) { + /* these should all use the same color */ + SETCOL(btheme->tv3d.cframe, 0x60, 0xc0, 0x40, 255); + SETCOL(btheme->tipo.cframe, 0x60, 0xc0, 0x40, 255); + SETCOL(btheme->tact.cframe, 0x60, 0xc0, 0x40, 255); + SETCOL(btheme->tnla.cframe, 0x60, 0xc0, 0x40, 255); + SETCOL(btheme->tseq.cframe, 0x60, 0xc0, 0x40, 255); + SETCOL(btheme->tsnd.cframe, 0x60, 0xc0, 0x40, 255); + SETCOL(btheme->ttime.cframe, 0x60, 0xc0, 0x40, 255); + } + } + if ((G.main->versionfile < 245) || (G.main->versionfile == 245 && G.main->subversionfile < 13)) { + bTheme *btheme; + for (btheme= U.themes.first; btheme; btheme= btheme->next) { + /* action channel groups (recolor anyway) */ + SETCOL(btheme->tact.group, 0x39, 0x7d, 0x1b, 255); + SETCOL(btheme->tact.group_active, 0x7d, 0xe9, 0x60, 255); + + /* bone custom-color sets */ + // FIXME: this check for initialised colors is bad + if (btheme->tarm[0].solid[3] == 0) { + /* set 1 */ + SETCOL(btheme->tarm[0].solid, 0x9a, 0x00, 0x00, 255); + SETCOL(btheme->tarm[0].select, 0xbd, 0x11, 0x11, 255); + SETCOL(btheme->tarm[0].active, 0xf7, 0x0a, 0x0a, 255); + /* set 2 */ + SETCOL(btheme->tarm[1].solid, 0xf7, 0x40, 0x18, 255); + SETCOL(btheme->tarm[1].select, 0xf6, 0x69, 0x13, 255); + SETCOL(btheme->tarm[1].active, 0xfa, 0x99, 0x00, 255); + /* set 3 */ + SETCOL(btheme->tarm[2].solid, 0x1e, 0x91, 0x09, 255); + SETCOL(btheme->tarm[2].select, 0x59, 0xb7, 0x0b, 255); + SETCOL(btheme->tarm[2].active, 0x83, 0xef, 0x1d, 255); + /* set 4 */ + SETCOL(btheme->tarm[3].solid, 0x0a, 0x36, 0x94, 255); + SETCOL(btheme->tarm[3].select, 0x36, 0x67, 0xdf, 255); + SETCOL(btheme->tarm[3].active, 0x5e, 0xc1, 0xef, 255); + /* set 5 */ + SETCOL(btheme->tarm[4].solid, 0xa9, 0x29, 0x4e, 255); + SETCOL(btheme->tarm[4].select, 0xc1, 0x41, 0x6a, 255); + SETCOL(btheme->tarm[4].active, 0xf0, 0x5d, 0x91, 255); + /* set 6 */ + SETCOL(btheme->tarm[5].solid, 0x43, 0x0c, 0x78, 255); + SETCOL(btheme->tarm[5].select, 0x54, 0x3a, 0xa3, 255); + SETCOL(btheme->tarm[5].active, 0x87, 0x64, 0xd5, 255); + /* set 7 */ + SETCOL(btheme->tarm[6].solid, 0x24, 0x78, 0x5a, 255); + SETCOL(btheme->tarm[6].select, 0x3c, 0x95, 0x79, 255); + SETCOL(btheme->tarm[6].active, 0x6f, 0xb6, 0xab, 255); + /* set 8 */ + SETCOL(btheme->tarm[7].solid, 0x4b, 0x70, 0x7c, 255); + SETCOL(btheme->tarm[7].select, 0x6a, 0x86, 0x91, 255); + SETCOL(btheme->tarm[7].active, 0x9b, 0xc2, 0xcd, 255); + /* set 9 */ + SETCOL(btheme->tarm[8].solid, 0xf4, 0xc9, 0x0c, 255); + SETCOL(btheme->tarm[8].select, 0xee, 0xc2, 0x36, 255); + SETCOL(btheme->tarm[8].active, 0xf3, 0xff, 0x00, 255); + /* set 10 */ + SETCOL(btheme->tarm[9].solid, 0x1e, 0x20, 0x24, 255); + SETCOL(btheme->tarm[9].select, 0x48, 0x4c, 0x56, 255); + SETCOL(btheme->tarm[9].active, 0xff, 0xff, 0xff, 255); + /* set 11 */ + SETCOL(btheme->tarm[10].solid, 0x6f, 0x2f, 0x6a, 255); + SETCOL(btheme->tarm[10].select, 0x98, 0x45, 0xbe, 255); + SETCOL(btheme->tarm[10].active, 0xd3, 0x30, 0xd6, 255); + /* set 12 */ + SETCOL(btheme->tarm[11].solid, 0x6c, 0x8e, 0x22, 255); + SETCOL(btheme->tarm[11].select, 0x7f, 0xb0, 0x22, 255); + SETCOL(btheme->tarm[11].active, 0xbb, 0xef, 0x5b, 255); + /* set 13 */ + SETCOL(btheme->tarm[12].solid, 0x8d, 0x8d, 0x8d, 255); + SETCOL(btheme->tarm[12].select, 0xb0, 0xb0, 0xb0, 255); + SETCOL(btheme->tarm[12].active, 0xde, 0xde, 0xde, 255); + /* set 14 */ + SETCOL(btheme->tarm[13].solid, 0x83, 0x43, 0x26, 255); + SETCOL(btheme->tarm[13].select, 0x8b, 0x58, 0x11, 255); + SETCOL(btheme->tarm[13].active, 0xbd, 0x6a, 0x11, 255); + /* set 15 */ + SETCOL(btheme->tarm[14].solid, 0x08, 0x31, 0x0e, 255); + SETCOL(btheme->tarm[14].select, 0x1c, 0x43, 0x0b, 255); + SETCOL(btheme->tarm[14].active, 0x34, 0x62, 0x2b, 255); + } + } + } + if ((G.main->versionfile < 245) || (G.main->versionfile == 245 && G.main->subversionfile < 16)) { + U.flag |= USER_ADD_VIEWALIGNED|USER_ADD_EDITMODE; + } + if ((G.main->versionfile < 247) || (G.main->versionfile == 247 && G.main->subversionfile <= 2)) { + bTheme *btheme; + + /* adjust themes */ + for (btheme= U.themes.first; btheme; btheme= btheme->next) { + char *col; + + /* IPO Editor: Handles/Vertices */ + col = btheme->tipo.vertex; + SETCOL(btheme->tipo.handle_vertex, col[0], col[1], col[2], 255); + col = btheme->tipo.vertex_select; + SETCOL(btheme->tipo.handle_vertex_select, col[0], col[1], col[2], 255); + btheme->tipo.handle_vertex_size= btheme->tipo.vertex_size; + + /* Sequence/Image Editor: colors for GPencil text */ + col = btheme->tv3d.bone_pose; + SETCOL(btheme->tseq.bone_pose, col[0], col[1], col[2], 255); + SETCOL(btheme->tima.bone_pose, col[0], col[1], col[2], 255); + col = btheme->tv3d.vertex_select; + SETCOL(btheme->tseq.vertex_select, col[0], col[1], col[2], 255); + } + } + if (G.main->versionfile < 250) { + bTheme *btheme; + + for(btheme= U.themes.first; btheme; btheme= btheme->next) { + /* this was not properly initialized in 2.45 */ + if(btheme->tima.face_dot[3]==0) { + SETCOL(btheme->tima.editmesh_active, 255, 255, 255, 128); + SETCOL(btheme->tima.face_dot, 255, 133, 0, 255); + btheme->tima.facedot_size= 2; + } + + /* DopeSheet - (Object) Channel color */ + SETCOL(btheme->tact.ds_channel, 82, 96, 110, 255); + SETCOL(btheme->tact.ds_subchannel, 124, 137, 150, 255); + /* DopeSheet - Group Channel color (saner version) */ + SETCOL(btheme->tact.group, 79, 101, 73, 255); + SETCOL(btheme->tact.group_active, 135, 177, 125, 255); + + /* Graph Editor - (Object) Channel color */ + SETCOL(btheme->tipo.ds_channel, 82, 96, 110, 255); + SETCOL(btheme->tipo.ds_subchannel, 124, 137, 150, 255); + /* Graph Editor - Group Channel color */ + SETCOL(btheme->tipo.group, 79, 101, 73, 255); + SETCOL(btheme->tipo.group_active, 135, 177, 125, 255); + } + + /* adjust grease-pencil distances */ + U.gp_manhattendist= 1; + U.gp_euclideandist= 2; + + /* adjust default interpolation for new IPO-curves */ + U.ipo_new= BEZT_IPO_BEZ; + } + + if (G.main->versionfile < 250 || (G.main->versionfile == 250 && G.main->subversionfile < 1)) { + bTheme *btheme; + + for(btheme= U.themes.first; btheme; btheme= btheme->next) { + + /* common (new) variables, it checks for alpha==0 */ + ui_theme_init_new(btheme); + + if(btheme->tui.wcol_num.outline[3]==0) + ui_widget_color_init(&btheme->tui); + } + } + + /* GL Texture Garbage Collection (variable abused above!) */ + if (U.textimeout == 0) { + U.texcollectrate = 60; + U.textimeout = 120; + } + if (U.memcachelimit <= 0) { + U.memcachelimit = 32; + } + if (U.frameserverport == 0) { + U.frameserverport = 8080; + } + + /* funny name, but it is GE stuff, moves userdef stuff to engine */ +// XXX space_set_commmandline_options(); + /* this timer uses U */ +// XXX reset_autosave(); + +} + + + diff --git a/source/blender/editors/interface/text.c b/source/blender/editors/interface/text.c deleted file mode 100644 index c3dc40e59ef..00000000000 --- a/source/blender/editors/interface/text.c +++ /dev/null @@ -1,276 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is written by Rob Haarsma (phase) - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/* XXX 2.50 this file must be cleanup still, using globals etc. */ - -#include <string.h> -#include <stdlib.h> - -#include "MEM_guardedalloc.h" - -#include "DNA_listBase.h" -#include "DNA_userdef_types.h" -#include "DNA_vec_types.h" - -#include "BKE_global.h" /* G */ -#include "BKE_utildefines.h" - -#include "BLI_blenlib.h" -#include "BLI_linklist.h" /* linknode */ - -#include "BIF_gl.h" -#include "UI_text.h" -#include "BLF_api.h" - -#include "ED_datafiles.h" - -#include "BMF_Api.h" - -#ifdef WITH_ICONV -#include "iconv.h" - -void string_to_utf8(char *original, char *utf_8, char *code) -{ - size_t inbytesleft=strlen(original); - size_t outbytesleft=512; - size_t rv=0; - iconv_t cd; - - cd=iconv_open("UTF-8", code); - - if (cd == (iconv_t)(-1)) { - printf("iconv_open Error"); - *utf_8='\0'; - return ; - } - rv=iconv(cd, &original, &inbytesleft, &utf_8, &outbytesleft); - if (rv == (size_t) -1) { - printf("iconv Error\n"); - return ; - } - *utf_8 = '\0'; - iconv_close(cd); -} -#endif // WITH_ICONV - -#ifdef INTERNATIONAL -#include "FTF_Api.h" -#endif - -void UI_RasterPos(float x, float y) -{ -#ifdef INTERNATIONAL - FTF_SetPosition(x, y); -#endif // INTERNATIONAL -} - -void UI_SetScale(float aspect) -{ -#ifdef INTERNATIONAL - FTF_SetScale(aspect); -#endif // INTERNATIONAL -} - -void ui_text_init_userdef(void) -{ - int id; - - id= BLF_load_mem("default", (unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size); - if (id == -1) - printf("Warning can't load built-in font ??\n"); - else { - BLF_set(id); - BLF_size(12, 72); - BLF_size(11, 96); - BLF_size(14, 96); - } - -#ifdef INTERNATIONAL - if(U.transopts & USER_DOTRANSLATE) - start_interface_font(); - else - G.ui_international= FALSE; -#else // INTERNATIONAL - G.ui_international= FALSE; -#endif -} - -int UI_DrawString(BMF_Font* font, char *str, int translate) -{ -#ifdef INTERNATIONAL - if(G.ui_international == TRUE) { - if(translate) - { -#ifdef WITH_ICONV - if(translate & CONVERT_TO_UTF8) { - char utf_8[512]; - char *code; - - code= BLF_lang_find_code(U.language); - if (lme) { - if (!strcmp(code, "ja_JP")) - string_to_utf8(str, utf_8, "Shift_JIS"); /* Japanese */ - else if (!strcmp(code, "zh_CN")) - string_to_utf8(str, utf_8, "GB2312"); /* Chinese */ - } - return FTF_DrawString(utf_8, FTF_INPUT_UTF8); - } - else -#endif // WITH_ICONV - return FTF_DrawString(str, FTF_USE_GETTEXT | FTF_INPUT_UTF8); - } - else - return FTF_DrawString(str, FTF_NO_TRANSCONV | FTF_INPUT_UTF8); - } else { - return BMF_DrawString(font, str); - } -#else // INTERNATIONAL - return BMF_DrawString(font, str); -#endif -} - -float UI_GetStringWidth(BMF_Font* font, char *str, int translate) -{ - float rt; - -#ifdef INTERNATIONAL - if(G.ui_international == TRUE) - if(translate && (U.transopts & USER_TR_BUTTONS)) - rt= FTF_GetStringWidth(str, FTF_USE_GETTEXT | FTF_INPUT_UTF8); - else - rt= FTF_GetStringWidth(str, FTF_NO_TRANSCONV | FTF_INPUT_UTF8); - else - rt= BMF_GetStringWidth(font, str); -#else - rt= BMF_GetStringWidth(font, str); -#endif - - return rt; -} - -void UI_GetBoundingBox(struct BMF_Font* font, char* str, int translate, rctf *bbox) -{ -#ifdef INTERNATIONAL - float dummy; - if(G.ui_international == TRUE) - if(translate && (U.transopts & USER_TR_BUTTONS)) - FTF_GetBoundingBox(str, &bbox->xmin, &bbox->ymin, &dummy, &bbox->xmax, &bbox->ymax, &dummy, FTF_USE_GETTEXT | FTF_INPUT_UTF8); - else - FTF_GetBoundingBox(str, &bbox->xmin, &bbox->ymin, &dummy, &bbox->xmax, &bbox->ymax, &dummy, FTF_NO_TRANSCONV | FTF_INPUT_UTF8); - else - BMF_GetStringBoundingBox(font, str, &bbox->xmin, &bbox->ymin, &bbox->xmax, &bbox->ymax); -#else - BMF_GetStringBoundingBox(font, str, &bbox->xmin, &bbox->ymin, &bbox->xmax, &bbox->ymax); -#endif -} - -#ifdef INTERNATIONAL - -char *fontsize_pup(void) -{ - static char string[1024]; - char formatstring[1024]; - - strcpy(formatstring, "Choose Font Size: %%t|%s %%x%d|%s %%x%d|%s %%x%d|%s %%x%d|%s %%x%d|%s %%x%d|%s %%x%d|%s %%x%d|%s %%x%d"); - - sprintf(string, formatstring, - "Font Size: 8", 8, - "Font Size: 9", 9, - "Font Size: 10", 10, - "Font Size: 11", 11, - "Font Size: 12", 12, - "Font Size: 13", 13, - "Font Size: 14", 14, - "Font Size: 15", 15, - "Font Size: 16", 16 - ); - - return (string); -} - -/* called from fileselector */ -void set_interface_font(char *str) -{ - - /* this test needed because fileselect callback can happen after disable AA fonts */ - if(U.transopts & USER_DOTRANSLATE) { - if(FTF_SetFont((unsigned char*)str, 0, U.fontsize)) { - BLF_lang_set(U.language); - if(strlen(str) < FILE_MAXDIR) strcpy(U.fontname, str); - G.ui_international = TRUE; - } - else { - U.fontname[0]= 0; - FTF_SetFont((unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size, U.fontsize); - G.ui_international = TRUE; // this case will switch to standard font - /* XXX 2.50 bad call okee("Invalid font selection - reverting to built-in font."); */ - } - /* XXX 2.50 bad call allqueue(REDRAWALL, 0); */ - } -} - -void start_interface_font(void) -{ - int result = 0; - - if(U.transopts & USER_USETEXTUREFONT) - FTF_SetMode(FTF_TEXTUREFONT); - else - FTF_SetMode(FTF_PIXMAPFONT); - - if(U.fontsize && U.fontname[0] ) { // we have saved user settings + fontpath - - // try loading font from U.fontname = full path to font in usersettings - result = FTF_SetFont((unsigned char*)U.fontname, 0, U.fontsize); - } - else if(U.fontsize) { // user settings, default - result = FTF_SetFont((unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size, U.fontsize); - } - - if(result==0) { // use default - U.language= 0; - U.fontsize= 11; - U.encoding= 0; - U.fontname[0]= 0; - result = FTF_SetFont((unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size, U.fontsize); - } - - if(result) { - BLF_lang_set(U.language); - G.ui_international = TRUE; - } - else { - printf("no font found for international support\n"); - G.ui_international = FALSE; - U.transopts &= ~USER_DOTRANSLATE; - U.fontsize = 0; - } - - /* XXX 2.50 bad call allqueue(REDRAWALL, 0); */ -} - -#endif /* INTERNATIONAL */ - diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index d81d9eb79ca..f2fc2deefbb 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -47,13 +47,14 @@ #include "BIF_gl.h" #include "BIF_glutil.h" +#include "BLF_api.h" + #include "ED_screen.h" +#include "UI_interface.h" #include "UI_resources.h" -#include "UI_text.h" #include "UI_view2d.h" -#include "UI_interface.h" #include "interface_intern.h" /* *********************************************************************** */ @@ -231,32 +232,11 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy) } break; - /* ui listviews, tries to wrap 'tot' inside region width */ - case V2D_COMMONVIEW_LIST_UI: - { - /* for now, aspect ratio should be maintained, and zoom is clamped within sane default limits */ - v2d->keepzoom= (V2D_KEEPASPECT|V2D_KEEPZOOM); - v2d->minzoom= 0.5f; - v2d->maxzoom= 2.0f; - - v2d->align= (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_POS_Y); - v2d->keeptot= V2D_KEEPTOT_BOUNDS; - - v2d->tot.xmin= 0.0f; - v2d->tot.xmax= 336.f; // XXX 320 width + 2 x PNL_DIST - - v2d->tot.ymax= 0.0f; - v2d->tot.ymin= -336.0f*((float)winy)/(float)winx; - - v2d->cur= v2d->tot; - } - break; - - /* panels view, with free/horizontal/vertical align */ + /* panels view, with horizontal/vertical align */ case V2D_COMMONVIEW_PANELS_UI: { /* for now, aspect ratio should be maintained, and zoom is clamped within sane default limits */ - v2d->keepzoom= (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_KEEPASPECT|V2D_KEEPZOOM); + v2d->keepzoom= (V2D_KEEPASPECT|V2D_KEEPZOOM); v2d->minzoom= 0.5f; v2d->maxzoom= 2.0f; @@ -421,6 +401,14 @@ void UI_view2d_curRect_validate(View2D *v2d) /* special exception for Outliner (and later channel-lists): * - Currently, no actions need to be taken here... */ + + if (winy < v2d->oldwiny) { + float temp = v2d->oldwiny - winy; + + cur->ymin += temp; + cur->ymax += temp; + } + } else { /* landscape window: correct for y */ @@ -439,18 +427,28 @@ void UI_view2d_curRect_validate(View2D *v2d) /* resize from centerpoint */ if (width != curwidth) { - temp= (cur->xmax + cur->xmin) * 0.5f; - dh= width * 0.5f; - - cur->xmin = temp - dh; - cur->xmax = temp + dh; + if (v2d->keepofs & V2D_LOCKOFS_X) { + cur->xmax += width - (cur->xmax - cur->xmin); + } + else { + temp= (cur->xmax + cur->xmin) * 0.5f; + dh= width * 0.5f; + + cur->xmin = temp - dh; + cur->xmax = temp + dh; + } } if (height != curheight) { - temp= (cur->ymax + cur->ymin) * 0.5f; - dh= height * 0.5f; - - cur->ymin = temp - dh; - cur->ymax = temp + dh; + if (v2d->keepofs & V2D_LOCKOFS_Y) { + cur->ymax += height - (cur->ymax - cur->ymin); + } + else { + temp= (cur->ymax + cur->ymin) * 0.5f; + dh= height * 0.5f; + + cur->ymin = temp - dh; + cur->ymax = temp + dh; + } } } @@ -845,8 +843,14 @@ void UI_view2d_view_ortho(const bContext *C, View2D *v2d) /* pixel offsets (-0.375f) are needed to get 1:1 correspondance with pixels for smooth UI drawing, * but only applied where requsted */ - xofs= (v2d->flag & V2D_PIXELOFS_X) ? 0.375f : 0.0f; - yofs= (v2d->flag & V2D_PIXELOFS_Y) ? 0.375f : 0.0f; + /* XXX ton: fix this! */ + xofs= 0.0; // (v2d->flag & V2D_PIXELOFS_X) ? 0.375f : 0.0f; + yofs= 0.0; // (v2d->flag & V2D_PIXELOFS_Y) ? 0.375f : 0.0f; + + /* XXX brecht: instead of zero at least use a tiny offset, otherwise + * pixel rounding is effectively random due to float inaccuracy */ + xofs= 0.001f; + yofs= 0.001f; /* apply mask-based adjustments to cur rect (due to scrollers), to eliminate scaling artifacts */ view2d_map_cur_using_mask(v2d, &curmasked); @@ -870,8 +874,9 @@ void UI_view2d_view_orthoSpecial(const bContext *C, View2D *v2d, short xaxis) /* pixel offsets (-0.375f) are needed to get 1:1 correspondance with pixels for smooth UI drawing, * but only applied where requsted */ - xofs= (v2d->flag & V2D_PIXELOFS_X) ? 0.375f : 0.0f; - yofs= (v2d->flag & V2D_PIXELOFS_Y) ? 0.375f : 0.0f; + /* XXX temp (ton) */ + xofs= 0.0f; // (v2d->flag & V2D_PIXELOFS_X) ? 0.375f : 0.0f; + yofs= 0.0f; // (v2d->flag & V2D_PIXELOFS_Y) ? 0.375f : 0.0f; /* apply mask-based adjustments to cur rect (due to scrollers), to eliminate scaling artifacts */ view2d_map_cur_using_mask(v2d, &curmasked); @@ -1363,8 +1368,7 @@ static void scroll_printstr(View2DScrollers *scrollers, Scene *scene, float x, f } /* draw it */ - ui_rasterpos_safe(x, y, 1.0); - UI_DrawString(G.fonts, str, 0); // XXX check this again when new text-drawing api is done + BLF_draw_default(x, y, 0.0f, str); } /* local defines for scrollers drawing */ diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 6da9512f9e0..bd1c734b870 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -54,6 +54,12 @@ #include "UI_resources.h" #include "UI_view2d.h" +static int view2d_poll(bContext *C) +{ + ARegion *ar= CTX_wm_region(C); + + return (ar != NULL) && (ar->v2d.flag & V2D_IS_INITIALISED); +} /* ********************************************************* */ /* VIEW PANNING OPERATOR */ @@ -110,8 +116,8 @@ static int view_pan_init(bContext *C, wmOperator *op) vpd->v2d= v2d; /* calculate translation factor - based on size of view */ - winx= (float)(ar->winrct.xmax - ar->winrct.xmin); - winy= (float)(ar->winrct.ymax - ar->winrct.ymin); + winx= (float)(ar->winrct.xmax - ar->winrct.xmin + 1); + winy= (float)(ar->winrct.ymax - ar->winrct.ymin + 1); vpd->facx= (v2d->cur.xmax - v2d->cur.xmin) / winx; vpd->facy= (v2d->cur.ymax - v2d->cur.ymin) / winy; @@ -489,12 +495,22 @@ static void view_zoomstep_apply(bContext *C, wmOperator *op) /* only resize view on an axis if change is allowed */ if ((v2d->keepzoom & V2D_LOCKZOOM_X)==0) { - v2d->cur.xmin += dx; - v2d->cur.xmax -= dx; + if (v2d->keepofs & V2D_LOCKOFS_X) { + v2d->cur.xmax -= 2*dx; + } + else { + v2d->cur.xmin += dx; + v2d->cur.xmax -= dx; + } } if ((v2d->keepzoom & V2D_LOCKZOOM_Y)==0) { - v2d->cur.ymin += dy; - v2d->cur.ymax -= dy; + if (v2d->keepofs & V2D_LOCKOFS_Y) { + v2d->cur.ymax -= 2*dy; + } + else { + v2d->cur.ymin += dy; + v2d->cur.ymax -= dy; + } } /* validate that view is in valid configuration after this operation */ @@ -635,12 +651,22 @@ static void view_zoomdrag_apply(bContext *C, wmOperator *op) /* only move view on an axis if change is allowed */ if ((v2d->keepzoom & V2D_LOCKZOOM_X)==0) { - v2d->cur.xmin += dx; - v2d->cur.xmax -= dx; + if (v2d->keepofs & V2D_LOCKOFS_X) { + v2d->cur.xmax -= 2*dx; + } + else { + v2d->cur.xmin += dx; + v2d->cur.xmax -= dx; + } } if ((v2d->keepzoom & V2D_LOCKZOOM_Y)==0) { - v2d->cur.ymin += dy; - v2d->cur.ymax -= dy; + if (v2d->keepofs & V2D_LOCKOFS_Y) { + v2d->cur.ymax -= 2*dy; + } + else { + v2d->cur.ymin += dy; + v2d->cur.ymax -= dy; + } } /* validate that view is in valid configuration after this operation */ @@ -1187,15 +1213,8 @@ static int scroller_activate_modal(bContext *C, wmOperator *op, wmEvent *event) static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event) { ARegion *ar= CTX_wm_region(C); - View2D *v2d= NULL; + View2D *v2d= &ar->v2d; short in_scroller= 0; - - /* firstly, check context to see if mouse is actually in region */ - // XXX isn't this the job of poll() callbacks which can't check events, but only context? - if (ar == NULL) - return OPERATOR_PASS_THROUGH;//OPERATOR_CANCELLED; - else - v2d= &ar->v2d; /* check if mouse in scrollbars, if they're enabled */ in_scroller= UI_view2d_mouse_in_scrollers(C, v2d, event->x, event->y); @@ -1241,6 +1260,70 @@ void VIEW2D_OT_scroller_activate(wmOperatorType *ot) /* api callbacks */ ot->invoke= scroller_activate_invoke; ot->modal= scroller_activate_modal; + ot->poll= view2d_poll; +} + +/* ********************************************************* */ +/* RESET */ + +static int reset_exec(bContext *C, wmOperator *op) +{ + ARegion *ar= CTX_wm_region(C); + View2D *v2d= &ar->v2d; + int winx, winy; + + /* zoom 1.0 */ + winx= (float)(v2d->mask.xmax - v2d->mask.xmin + 1); + winy= (float)(v2d->mask.ymax - v2d->mask.ymin + 1); + + v2d->cur.xmax= v2d->cur.xmin + winx; + v2d->cur.ymax= v2d->cur.ymin + winy; + + /* align */ + if(v2d->align) { + /* posx and negx flags are mutually exclusive, so watch out */ + if ((v2d->align & V2D_ALIGN_NO_POS_X) && !(v2d->align & V2D_ALIGN_NO_NEG_X)) { + v2d->cur.xmax= 0.0f; + v2d->cur.xmin= v2d->winx; + } + else if ((v2d->align & V2D_ALIGN_NO_NEG_X) && !(v2d->align & V2D_ALIGN_NO_POS_X)) { + v2d->cur.xmax= v2d->cur.xmax - v2d->cur.xmin; + v2d->cur.xmin= 0.0f; + } + + /* - posx and negx flags are mutually exclusive, so watch out */ + if ((v2d->align & V2D_ALIGN_NO_POS_Y) && !(v2d->align & V2D_ALIGN_NO_NEG_Y)) { + v2d->cur.ymax= 0.0f; + v2d->cur.ymin= -v2d->winy; + } + else if ((v2d->align & V2D_ALIGN_NO_NEG_Y) && !(v2d->align & V2D_ALIGN_NO_POS_Y)) { + v2d->cur.ymax= v2d->cur.ymax - v2d->cur.ymin; + v2d->cur.ymin= 0.0f; + } + } + + /* validate that view is in valid configuration after this operation */ + UI_view2d_curRect_validate(v2d); + + /* request updates to be done... */ + ED_area_tag_redraw(CTX_wm_area(C)); + UI_view2d_sync(CTX_wm_screen(C), CTX_wm_area(C), v2d, V2D_LOCK_COPY); + + return OPERATOR_FINISHED; +} + +void VIEW2D_OT_reset(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Reset View"; + ot->idname= "VIEW2D_OT_reset"; + + /* api callbacks */ + ot->exec= reset_exec; + ot->poll= view2d_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } /* ********************************************************* */ @@ -1262,6 +1345,8 @@ void ui_view2d_operatortypes(void) WM_operatortype_append(VIEW2D_OT_zoom_border); WM_operatortype_append(VIEW2D_OT_scroller_activate); + + WM_operatortype_append(VIEW2D_OT_reset); } void UI_view2d_keymap(wmWindowManager *wm) @@ -1300,12 +1385,15 @@ void UI_view2d_keymap(wmWindowManager *wm) /* scrollers */ WM_keymap_add_item(keymap, "VIEW2D_OT_scroller_activate", LEFTMOUSE, KM_PRESS, 0, 0); - + /* Alternative keymap for buttons listview */ keymap= WM_keymap_listbase(wm, "View2D Buttons List", 0, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_pan", MIDDLEMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_down", WHEELDOWNMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_up", WHEELUPMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_zoom", MIDDLEMOUSE, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_zoom_out", PADMINUS, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_zoom_in", PADPLUSKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_reset", HOMEKEY, KM_PRESS, 0, 0); } diff --git a/source/blender/editors/mesh/Makefile b/source/blender/editors/mesh/Makefile index 60b1fa1c329..650771519cd 100644 --- a/source/blender/editors/mesh/Makefile +++ b/source/blender/editors/mesh/Makefile @@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS) CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(OPENGL_HEADERS) -CPPFLAGS += -I$(NAN_BMFONT)/include CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include CPPFLAGS += -I$(NAN_ELBEEM)/include diff --git a/source/blender/editors/mesh/SConscript b/source/blender/editors/mesh/SConscript index bd6d355d84c..80536b5e431 100644 --- a/source/blender/editors/mesh/SConscript +++ b/source/blender/editors/mesh/SConscript @@ -5,7 +5,7 @@ sources = env.Glob('*.c') incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' -incs += ' #/intern/guardedalloc #intern/bmfont ../../gpu' +incs += ' #/intern/guardedalloc ../../gpu' incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern' incs += ' ../../bmesh ' diff --git a/source/blender/editors/mesh/bmesh_tools.c b/source/blender/editors/mesh/bmesh_tools.c index ec655862c28..dfcb4b06eb4 100644 --- a/source/blender/editors/mesh/bmesh_tools.c +++ b/source/blender/editors/mesh/bmesh_tools.c @@ -77,8 +77,6 @@ #include "WM_api.h" #include "WM_types.h" -#include "BMF_Api.h" - #include "ED_mesh.h" #include "ED_view3d.h" #include "ED_util.h" @@ -102,9 +100,9 @@ static int subdivide_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); Scene *scene = CTX_data_scene(C); + BMEditMesh *em= ((Mesh *)obedit->data)->edit_btmesh; - BM_esubdivideflag(obedit, ((Mesh *)obedit->data)->edit_btmesh->bm, - 1, 0.0, scene->toolsettings->editbutflag, 1, 0); + BM_esubdivideflag(obedit, em->bm, 1, 0.0, scene->toolsettings->editbutflag, 1, 0); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); @@ -218,11 +216,13 @@ void MESH_OT_subdivide_smooth(wmOperatorType *ot) static int subdivs_invoke(bContext *C, wmOperator *op, wmEvent *event) { - uiMenuItem *head; + uiPopupMenu *pup; + uiLayout *layout; - head= uiPupMenuBegin("Subdivision Type", 0); - uiMenuItemsEnumO(head, "MESH_OT_subdivs", "type"); - uiPupMenuEnd(C, head); + pup= uiPupMenuBegin(C, "Subdivision Type", 0); + layout= uiPupMenuLayout(pup); + uiItemsEnumO(layout, "MESH_OT_subdivs", "type"); + uiPupMenuEnd(C, pup); return OPERATOR_CANCELLED; } @@ -276,11 +276,9 @@ void MESH_OT_subdivs(wmOperatorType *ot) /* this is temp, the ops are different, but they are called from subdivs, so all the possible props should be here as well*/ RNA_def_int(ot->srna, "number_cuts", 4, 1, 10, "Number of Cuts", "", 1, INT_MAX); RNA_def_float(ot->srna, "random_factor", 5.0, 0.0f, FLT_MAX, "Random Factor", "", 0.0f, 1000.0f); - RNA_def_float(ot->srna, "smoothness", 1.0f, 0.0f, 1000.0f, "Smoothness", "", 0.0f, FLT_MAX); - + RNA_def_float(ot->srna, "smoothness", 1.0f, 0.0f, 1000.0f, "Smoothness", "", 0.0f, FLT_MAX); } - /* individual face extrude */ /* will use vertex normals for extrusion directions, so *nor is unaffected */ short EDBM_Extrude_face_indiv(BMEditMesh *em, short flag, float *nor) diff --git a/source/blender/editors/mesh/bmeshutils.c b/source/blender/editors/mesh/bmeshutils.c index 2d15644cbde..1a5ea2e2b75 100644 --- a/source/blender/editors/mesh/bmeshutils.c +++ b/source/blender/editors/mesh/bmeshutils.c @@ -77,8 +77,6 @@ #include "WM_api.h" #include "WM_types.h" -#include "BMF_Api.h" - #include "ED_mesh.h" #include "ED_view3d.h" #include "ED_util.h" diff --git a/source/blender/editors/mesh/bmeshutils_mods.c b/source/blender/editors/mesh/bmeshutils_mods.c index e3dbfe7fbe0..5c0a25348c5 100644 --- a/source/blender/editors/mesh/bmeshutils_mods.c +++ b/source/blender/editors/mesh/bmeshutils_mods.c @@ -1030,7 +1030,7 @@ static int loop_multiselect(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void MESH_OT_select_loop_multi(wmOperatorType *ot) +void MESH_OT_loop_multi_select(wmOperatorType *ot) { /* identifiers */ ot->name= "Multi Select Loops"; @@ -1110,7 +1110,7 @@ static int mesh_select_loop_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_FINISHED; } -void MESH_OT_select_loop(wmOperatorType *ot) +void MESH_OT_loop_select(wmOperatorType *ot) { /* identifiers */ ot->name= "Loop Select"; @@ -1211,7 +1211,7 @@ static int mesh_shortest_path_select_invoke(bContext *C, wmOperator *op, wmEvent return OPERATOR_FINISHED; } -void MESH_OT_select_path_shortest(wmOperatorType *ot) +void MESH_OT_select_shortest_path(wmOperatorType *ot) { /* identifiers */ ot->name= "Shortest Path Select"; diff --git a/source/blender/editors/mesh/editdeform.c b/source/blender/editors/mesh/editdeform.c index d6dd9522a6f..3019aabf371 100644 --- a/source/blender/editors/mesh/editdeform.c +++ b/source/blender/editors/mesh/editdeform.c @@ -94,7 +94,7 @@ void sel_verts_defgroup (Object *obedit, int select) case OB_MESH: { Mesh *me= ob->data; - EditMesh *em = EM_GetEditMesh(me); + EditMesh *em = BKE_mesh_get_editmesh(me); for (eve=em->verts.first; eve; eve=eve->next){ dvert= CustomData_em_get(&em->vdata, eve->data, CD_MDEFORMVERT); @@ -114,7 +114,7 @@ void sel_verts_defgroup (Object *obedit, int select) if(select) EM_select_flush(em); // vertices to edges/faces else EM_deselect_flush(em); - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); } break; case OB_LATTICE: @@ -398,7 +398,7 @@ void del_defgroup (Object *ob) /* Make sure that any verts with higher indices are adjusted accordingly */ if(ob->type==OB_MESH) { Mesh *me= ob->data; - EditMesh *em = EM_GetEditMesh(me); + EditMesh *em = BKE_mesh_get_editmesh(me); EditVert *eve; MDeformVert *dvert; @@ -410,7 +410,7 @@ void del_defgroup (Object *ob) if (dvert->dw[i].def_nr > (ob->actdef-1)) dvert->dw[i].def_nr--; } - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); } else if(ob->type==OB_LATTICE) { Lattice *lt= def_get_lattice(ob); @@ -724,7 +724,7 @@ void assign_verts_defgroup (Object *obedit, float weight) case OB_MESH: { Mesh *me= ob->data; - EditMesh *em = EM_GetEditMesh(me); + EditMesh *em = BKE_mesh_get_editmesh(me); if (!CustomData_has_layer(&em->vdata, CD_MDEFORMVERT)) EM_add_data_layer(em, &em->vdata, CD_MDEFORMVERT); @@ -764,7 +764,7 @@ void assign_verts_defgroup (Object *obedit, float weight) } } } - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); } break; case OB_LATTICE: @@ -888,7 +888,7 @@ void remove_verts_defgroup (Object *obedit, int allverts) case OB_MESH: { Mesh *me= ob->data; - EditMesh *em = EM_GetEditMesh(me); + EditMesh *em = BKE_mesh_get_editmesh(me); for (eve=em->verts.first; eve; eve=eve->next){ dvert= CustomData_em_get(&em->vdata, eve->data, CD_MDEFORMVERT); @@ -918,7 +918,7 @@ void remove_verts_defgroup (Object *obedit, int allverts) } } } - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); } break; case OB_LATTICE: diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c index ac4a8ecbb62..5cf0a0b1de6 100644 --- a/source/blender/editors/mesh/editmesh.c +++ b/source/blender/editors/mesh/editmesh.c @@ -1401,22 +1401,22 @@ static int mesh_separate_selected(Scene *scene, Base *editbase) obedit= editbase->object; me= obedit->data; - em= EM_GetEditMesh(me); + em= BKE_mesh_get_editmesh(me); if(me->key) { error("Can't separate with vertex keys"); - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); return 0; } if(em->selected.first) BLI_freelistN(&(em->selected)); /* clear the selection order */ - EM_selectmode_set(em); // enforce full consistant selection flags + EM_selectmode_set(em); // enforce full consistent selection flags EM_stats_update(em); if(em->totvertsel==0) { - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); return 0; } @@ -1486,7 +1486,7 @@ static int mesh_separate_selected(Scene *scene, Base *editbase) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); DAG_object_flush_update(scene, basenew->object, OB_RECALC_DATA); - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); return 1; } @@ -1495,7 +1495,7 @@ static int mesh_separate_selected(Scene *scene, Base *editbase) static int mesh_separate_material(Scene *scene, Base *editbase) { Mesh *me= editbase->object->data; - EditMesh *em= EM_GetEditMesh(me); + EditMesh *em= BKE_mesh_get_editmesh(me); unsigned char curr_mat; for (curr_mat = 1; curr_mat < editbase->object->totcol; ++curr_mat) { @@ -1505,12 +1505,12 @@ static int mesh_separate_material(Scene *scene, Base *editbase) editmesh_select_by_material(em, curr_mat); /* and now separate */ if(0==mesh_separate_selected(scene, editbase)) { - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); return 0; } } - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); return 1; } @@ -1522,11 +1522,11 @@ static int mesh_separate_loose(Scene *scene, Base *editbase) int doit= 1; me= editbase->object->data; - em= EM_GetEditMesh(me); + em= BKE_mesh_get_editmesh(me); if(me->key) { error("Can't separate with vertex keys"); - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); return 0; } @@ -1543,7 +1543,7 @@ static int mesh_separate_loose(Scene *scene, Base *editbase) doit= mesh_separate_selected(scene, editbase); } - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); return 1; } @@ -1733,15 +1733,3 @@ void em_setup_viewcontext(bContext *C, ViewContext *vc) vc->em= me->edit_btmesh; } } - -EditMesh *EM_GetEditMesh(Mesh *me) -{ - return bmesh_to_editmesh(me->edit_btmesh->bm); -} - -void EM_EndEditMesh(Mesh *me, EditMesh *em) -{ - BM_Free_Mesh(me->edit_btmesh->bm); - me->edit_btmesh->bm = editmesh_to_bmesh(em); - TM_RecalcTesselation(me->edit_btmesh); -} diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index 588771071fa..a1ea37dfea3 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -343,18 +343,18 @@ int make_fgon(EditMesh *em, wmOperator *op, int make) static int make_fgon_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)); + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); if( make_fgon(em, op, 1) ) { DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -375,18 +375,18 @@ void MESH_OT_fgon_make(struct wmOperatorType *ot) static int clear_fgon_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)); + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); if( make_fgon(em, op, 0) ) { DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -827,7 +827,7 @@ static void addedgeface_mesh(EditMesh *em, wmOperator *op) static int addedgeface_mesh_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)); + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); addedgeface_mesh(em, op); @@ -835,15 +835,15 @@ static int addedgeface_mesh_exec(bContext *C, wmOperator *op) DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } -void MESH_OT_add_edge_face(wmOperatorType *ot) +void MESH_OT_edge_face_add(wmOperatorType *ot) { /* identifiers */ ot->name= "Make Edge/Face"; - ot->idname= "MESH_OT_add_edge_face"; + ot->idname= "MESH_OT_edge_face_add"; /* api callbacks */ ot->exec= addedgeface_mesh_exec; @@ -1025,7 +1025,7 @@ static void make_prim(Object *obedit, int type, float mat[4][4], int tot, int se * fill - end capping, and option to fill in circle * cent[3] - center of the data. * */ - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)); + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); EditVert *eve, *v1=NULL, *v2, *v3, *v4=NULL, *vtop, *vdown; float phi, phid, vec[3]; float q[4], cmat[3][3], nor[3]= {0.0, 0.0, 0.0}; @@ -1307,7 +1307,7 @@ static void make_prim(Object *obedit, int type, float mat[4][4], int tot, int se if(type!=0 && type!=13) righthandfaces(em, 1); /* otherwise monkey has eyes in wrong direction */ - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } @@ -1363,11 +1363,11 @@ static int add_primitive_plane_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void MESH_OT_add_primitive_plane(wmOperatorType *ot) +void MESH_OT_primitive_plane_add(wmOperatorType *ot) { /* identifiers */ ot->name= "Add Plane"; - ot->idname= "MESH_OT_add_primitive_plane"; + ot->idname= "MESH_OT_primitive_plane_add"; /* api callbacks */ ot->exec= add_primitive_plane_exec; @@ -1393,11 +1393,11 @@ static int add_primitive_cube_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void MESH_OT_add_primitive_cube(wmOperatorType *ot) +void MESH_OT_primitive_cube_add(wmOperatorType *ot) { /* identifiers */ ot->name= "Add Cube"; - ot->idname= "MESH_OT_add_primitive_cube"; + ot->idname= "MESH_OT_primitive_cube_add"; /* api callbacks */ ot->exec= add_primitive_cube_exec; @@ -1423,11 +1423,11 @@ static int add_primitive_circle_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void MESH_OT_add_primitive_circle(wmOperatorType *ot) +void MESH_OT_primitive_circle_add(wmOperatorType *ot) { /* identifiers */ ot->name= "Add Circle"; - ot->idname= "MESH_OT_add_primitive_circle"; + ot->idname= "MESH_OT_primitive_circle_add"; /* api callbacks */ ot->exec= add_primitive_circle_exec; @@ -1458,11 +1458,11 @@ static int add_primitive_cylinder_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void MESH_OT_add_primitive_cylinder(wmOperatorType *ot) +void MESH_OT_primitive_cylinder_add(wmOperatorType *ot) { /* identifiers */ ot->name= "Add Cylinder"; - ot->idname= "MESH_OT_add_primitive_cylinder"; + ot->idname= "MESH_OT_primitive_cylinder_add"; /* api callbacks */ ot->exec= add_primitive_cylinder_exec; @@ -1493,11 +1493,11 @@ static int add_primitive_tube_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void MESH_OT_add_primitive_tube(wmOperatorType *ot) +void MESH_OT_primitive_tube_add(wmOperatorType *ot) { /* identifiers */ ot->name= "Add Tube"; - ot->idname= "MESH_OT_add_primitive_tube"; + ot->idname= "MESH_OT_primitive_tube_add"; /* api callbacks */ ot->exec= add_primitive_tube_exec; @@ -1528,11 +1528,11 @@ static int add_primitive_cone_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void MESH_OT_add_primitive_cone(wmOperatorType *ot) +void MESH_OT_primitive_cone_add(wmOperatorType *ot) { /* identifiers */ ot->name= "Add Cone"; - ot->idname= "MESH_OT_add_primitive_cone"; + ot->idname= "MESH_OT_primitive_cone_add"; /* api callbacks */ ot->exec= add_primitive_cone_exec; @@ -1565,11 +1565,11 @@ static int add_primitive_grid_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void MESH_OT_add_primitive_grid(wmOperatorType *ot) +void MESH_OT_primitive_grid_add(wmOperatorType *ot) { /* identifiers */ ot->name= "Add Grid"; - ot->idname= "MESH_OT_add_primitive_grid"; + ot->idname= "MESH_OT_primitive_grid_add"; /* api callbacks */ ot->exec= add_primitive_grid_exec; @@ -1598,11 +1598,11 @@ static int add_primitive_monkey_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void MESH_OT_add_primitive_monkey(wmOperatorType *ot) +void MESH_OT_primitive_monkey_add(wmOperatorType *ot) { /* identifiers */ ot->name= "Add Monkey"; - ot->idname= "MESH_OT_add_primitive_monkey"; + ot->idname= "MESH_OT_primitive_monkey_add"; /* api callbacks */ ot->exec= add_primitive_monkey_exec; @@ -1628,11 +1628,11 @@ static int add_primitive_uvsphere_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void MESH_OT_add_primitive_uv_sphere(wmOperatorType *ot) +void MESH_OT_primitive_uv_sphere_add(wmOperatorType *ot) { /* identifiers */ ot->name= "Add UV Sphere"; - ot->idname= "MESH_OT_add_primitive_uv_sphere"; + ot->idname= "MESH_OT_primitive_uv_sphere_add"; /* api callbacks */ ot->exec= add_primitive_uvsphere_exec; @@ -1663,11 +1663,11 @@ static int add_primitive_icosphere_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void MESH_OT_add_primitive_ico_sphere(wmOperatorType *ot) +void MESH_OT_primitive_ico_sphere_add(wmOperatorType *ot) { /* identifiers */ ot->name= "Add Ico Sphere"; - ot->idname= "MESH_OT_add_primitive_ico_sphere"; + ot->idname= "MESH_OT_primitive_ico_sphere_add"; /* api callbacks */ ot->exec= add_primitive_icosphere_exec; diff --git a/source/blender/editors/mesh/editmesh_lib.c b/source/blender/editors/mesh/editmesh_lib.c index ea6a5442072..98d69419fdb 100644 --- a/source/blender/editors/mesh/editmesh_lib.c +++ b/source/blender/editors/mesh/editmesh_lib.c @@ -550,7 +550,7 @@ void EM_select_flush(EditMesh *em) EM_nfaces_selected(em); } -/* when vertices or edges can be selected, also make fgon consistant */ +/* when vertices or edges can be selected, also make fgon consistent */ static void check_fgons_selection(EditMesh *em) { EditFace *efa, *efan; @@ -741,7 +741,7 @@ void EM_convertsel(EditMesh *em, short oldmode, short selectmode) EM_nfaces_selected(em); } -/* when switching select mode, makes sure selection is consistant for editing */ +/* when switching select mode, makes sure selection is consistent for editing */ /* also for paranoia checks to make sure edge or face mode works */ void EM_selectmode_set(EditMesh *em) { @@ -1883,7 +1883,7 @@ void adduplicateflag(EditMesh *em, int flag) EditFace *efa, *newfa, *act_efa = EM_get_actFace(em, 0); EM_clear_flag_all(em, 128); - EM_selectmode_set(em); // paranoia check, selection now is consistant + EM_selectmode_set(em); // paranoia check, selection now is consistent /* vertices first */ for(eve= em->verts.last; eve; eve= eve->prev) { diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c index 51c19261de8..7f1d56aee73 100644 --- a/source/blender/editors/mesh/editmesh_loop.c +++ b/source/blender/editors/mesh/editmesh_loop.c @@ -61,6 +61,7 @@ editmesh_loop: tools with own drawing subloops, select, knife, subdiv #include "BKE_mesh.h" #include "BKE_object.h" #include "BKE_utildefines.h" +#include "BKE_tessmesh.h" #include "PIL_time.h" @@ -784,8 +785,8 @@ static float bm_seg_intersect(BMEdge *e, CutCurve *c, int len, char mode, static int knife_cut_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - BMesh *bm; - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)), *em2; + BMEditMesh *em= (((Mesh *)obedit->data))->edit_btmesh; + BMesh *bm = em->bm; ARegion *ar= CTX_wm_region(C); BMVert *bv; BMIter iter; @@ -798,9 +799,8 @@ static int knife_cut_exec(bContext *C, wmOperator *op) int len=0, isected, flag, i; short numcuts=1, mode= RNA_int_get(op->ptr, "type"); - if (EM_nvertices_selected(em) < 2) { + if (bm->totvertsel < 2) { error("No edges are selected to operate on"); - EM_EndEditMesh(obedit->data, em); return OPERATOR_CANCELLED;; } @@ -814,12 +814,9 @@ static int knife_cut_exec(bContext *C, wmOperator *op) RNA_END; if(len<2) { - EM_EndEditMesh(obedit->data, em); return OPERATOR_CANCELLED; } - bm = editmesh_to_bmesh(em); - /*the floating point coordinates of verts in screen space will be stored in a hash table according to the vertices pointer*/ gh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp); for(bv=BMIter_New(&iter, bm, BM_VERTS_OF_MESH, NULL);bv;bv=BMIter_Step(&iter)){ @@ -869,17 +866,8 @@ static int knife_cut_exec(bContext *C, wmOperator *op) //else if (mode==KNIFE_MULTICUT) esubdivideflag(obedit, em, SELECT, 0, B_KNIFE, numcuts, SUBDIV_SELECT_ORIG); //else esubdivideflag(obedit, em, SELECT, 0, B_KNIFE|B_PERCENTSUBD, 1, SUBDIV_SELECT_ORIG); - BLI_ghash_free(gh, NULL, (GHashValFreeFP)MEM_freeN); - - free_editMesh(em); - - em2 = bmesh_to_editmesh(bm); - *em = *em2; - - MEM_freeN(em2); - BM_Free_Mesh(bm); + BLI_ghash_free(gh, NULL, (GHashValFreeFP)WMEM_freeN); - EM_EndEditMesh(obedit->data, em); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c index d7f1d4b479d..8758eb9d914 100644 --- a/source/blender/editors/mesh/editmesh_mods.c +++ b/source/blender/editors/mesh/editmesh_mods.c @@ -490,7 +490,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); Mesh *me= obedit->data; - EditMesh *em= EM_GetEditMesh(me); + EditMesh *em= BKE_mesh_get_editmesh(me); int selcount = similar_face_select__internal(scene, em, RNA_int_get(op->ptr, "type")); @@ -498,19 +498,19 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) /* here was an edge-mode only select flush case, has to be generalized */ EM_selectmode_flush(em); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); return OPERATOR_FINISHED; } - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); return OPERATOR_CANCELLED; } -void MESH_OT_select_face_similar(wmOperatorType *ot) +void MESH_OT_faces_select_similar(wmOperatorType *ot) { /* identifiers */ ot->name= "Similar Face Select"; - ot->idname= "MESH_OT_select_face_similar"; + ot->idname= "MESH_OT_faces_select_similar"; /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -751,7 +751,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); Mesh *me= obedit->data; - EditMesh *em= EM_GetEditMesh(me); + EditMesh *em= BKE_mesh_get_editmesh(me); int selcount = similar_edge_select__internal(scene, em, RNA_int_get(op->ptr, "type")); @@ -759,19 +759,19 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) /* here was an edge-mode only select flush case, has to be generalized */ EM_selectmode_flush(em); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); return OPERATOR_FINISHED; } - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); return OPERATOR_CANCELLED; } -void MESH_OT_select_edge_similar(wmOperatorType *ot) +void MESH_OT_edges_select_similar(wmOperatorType *ot) { /* identifiers */ ot->name= "Similar Edge Select"; - ot->idname= "MESH_OT_select_edge_similar"; + ot->idname= "MESH_OT_edges_select_similar"; /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -806,7 +806,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op) Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); Mesh *me= obedit->data; - EditMesh *em= EM_GetEditMesh(me); + EditMesh *em= BKE_mesh_get_editmesh(me); EditVert *eve, *base_eve=NULL; unsigned int selcount=0; /* count how many new edges we select*/ @@ -833,7 +833,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op) } if (!ok || !deselcount) { /* no data selected OR no more data to select*/ - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); return 0; } @@ -864,7 +864,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op) selcount++; deselcount--; if (!deselcount) {/*have we selected all posible faces?, if so return*/ - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); return selcount; } } @@ -882,7 +882,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op) selcount++; deselcount--; if (!deselcount) {/*have we selected all posible faces?, if so return*/ - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); return selcount; } } @@ -896,7 +896,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op) CD_MDEFORMVERT); if (!base_dvert || base_dvert->totweight == 0) { - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); return selcount; } @@ -914,7 +914,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op) selcount++; deselcount--; if (!deselcount) { /*have we selected all posible faces?, if so return*/ - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); return selcount; } break; @@ -929,19 +929,19 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op) if(selcount) { WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); return OPERATOR_FINISHED; } - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); return OPERATOR_CANCELLED; } -void MESH_OT_select_vertex_similar(wmOperatorType *ot) +void MESH_OT_vertices_select_similar(wmOperatorType *ot) { /* identifiers */ ot->name= "Similar Vertex Select"; - ot->idname= "MESH_OT_select_vertex_similar"; + ot->idname= "MESH_OT_vertices_select_similar"; /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1650,7 +1650,7 @@ static void edgering_select(EditMesh *em, EditEdge *startedge, int select) static int loop_multiselect(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)); + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); EditEdge *eed; EditEdge **edarray; int edindex, edfirstcount; @@ -1689,16 +1689,16 @@ static int loop_multiselect(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } #if 0 //moved to bmeshutils_mods.c -void MESH_OT_select_loop_multi(wmOperatorType *ot) +void MESH_OT_loop_multi_select(wmOperatorType *ot) { /* identifiers */ ot->name= "Multi Select Loops"; - ot->idname= "MESH_OT_select_loop_multi"; + ot->idname= "MESH_OT_loop_multi_select"; /* api callbacks */ ot->exec= loop_multiselect; @@ -1991,7 +1991,7 @@ void selectconnected_mesh_all(EditMesh *em) static int select_linked_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh(obedit->data); + EditMesh *em= BKE_mesh_get_editmesh(obedit->data); if( RNA_boolean_get(op->ptr, "limit") ) { ViewContext vc; @@ -2003,7 +2003,7 @@ static int select_linked_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -2132,13 +2132,13 @@ void EM_hide_mesh(EditMesh *em, int swap) static int hide_mesh_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)); + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); EM_hide_mesh(em, RNA_boolean_get(op->ptr, "unselected")); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -2198,13 +2198,13 @@ void EM_reveal_mesh(EditMesh *em) static int reveal_mesh_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)); + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); EM_reveal_mesh(em); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -2258,7 +2258,7 @@ static int select_sharp_edges_exec(bContext *C, wmOperator *op) * small enough, select the edge */ Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)); + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); EditEdge *eed; EditFace *efa; EditFace **efa1; @@ -2270,7 +2270,7 @@ static int select_sharp_edges_exec(bContext *C, wmOperator *op) if(em->selectmode==SCE_SELECT_FACE) { BKE_report(op->reports, RPT_ERROR, "Doesn't work in face selection mode"); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -2350,15 +2350,15 @@ static int select_sharp_edges_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); //TODO is this needed ? - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } -void MESH_OT_select_sharp_edges(wmOperatorType *ot) +void MESH_OT_edges_select_sharp(wmOperatorType *ot) { /* identifiers */ ot->name= "Select Sharp Edges"; - ot->idname= "MESH_OT_select_sharp_edges"; + ot->idname= "MESH_OT_edges_select_sharp"; /* api callbacks */ ot->exec= select_sharp_edges_exec; @@ -2511,21 +2511,21 @@ static void select_linked_flat_faces(EditMesh *em, wmOperator *op, float sharpne static int select_linked_flat_faces_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)); + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); select_linked_flat_faces(em, op, RNA_float_get(op->ptr, "sharpness")); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } -void MESH_OT_select_linked_flat_faces(wmOperatorType *ot) +void MESH_OT_faces_select_linked_flat(wmOperatorType *ot) { /* identifiers */ ot->name= "Select Linked Flat Faces"; - ot->idname= "MESH_OT_select_linked_flat_faces"; + ot->idname= "MESH_OT_faces_select_linked_flat"; /* api callbacks */ ot->exec= select_linked_flat_faces_exec; @@ -2611,13 +2611,13 @@ void select_non_manifold(EditMesh *em, wmOperator *op ) static int select_non_manifold_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)); + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); select_non_manifold(em, op); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -2674,13 +2674,13 @@ void EM_select_swap(EditMesh *em) /* exported for UV */ static int select_invert_mesh_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)); + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); EM_select_swap(em); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -2711,12 +2711,12 @@ void EM_toggle_select_all(EditMesh *em) /* exported for UV */ static int toggle_select_all_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)); + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); EM_toggle_select_all(em); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -2797,7 +2797,7 @@ void EM_select_more(EditMesh *em) static int select_more(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)) ; + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)) ; EM_select_more(em); @@ -2805,7 +2805,7 @@ static int select_more(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -2887,14 +2887,14 @@ void EM_select_less(EditMesh *em) static int select_less(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)); + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); EM_select_less(em); // if (EM_texFaceCheck(em)) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -2957,13 +2957,13 @@ static void selectrandom_mesh(EditMesh *em, float perc) /* randomly selects a us static int mesh_select_random_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)); + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); selectrandom_mesh(em, RNA_float_get(op->ptr,"percent")); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -3047,13 +3047,13 @@ static int mesh_selection_type_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)); + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); mesh_selection_type(CTX_data_scene(C), em, RNA_enum_get(op->ptr,"type")); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -3081,7 +3081,8 @@ void MESH_OT_selection_type(wmOperatorType *ot) static int editmesh_mark_seam(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)); + + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); Mesh *me= ((Mesh *)obedit->data); EditEdge *eed; int clear = RNA_boolean_get(op->ptr, "clear"); @@ -3112,7 +3113,8 @@ static int editmesh_mark_seam(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -3135,7 +3137,8 @@ void MESH_OT_mark_seam(wmOperatorType *ot) static int editmesh_mark_sharp(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)); + + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); Mesh *me= ((Mesh *)obedit->data); int set = RNA_boolean_get(op->ptr, "set"); EditEdge *eed; @@ -3161,7 +3164,8 @@ static int editmesh_mark_sharp(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -3556,7 +3560,8 @@ void righthandfaces(EditMesh *em, int select) /* makes faces righthand turning * static int righthandfaces_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)); + + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); /* 'standard' behaviour - check if selected, then apply relevant selection */ @@ -3565,15 +3570,15 @@ static int righthandfaces_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); //TODO is this needed ? - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } -void MESH_OT_consistant_normals(wmOperatorType *ot) +void MESH_OT_normals_make_consistent(wmOperatorType *ot) { /* identifiers */ - ot->name= "Make Normals Consistant"; - ot->idname= "MESH_OT_consistant_normals"; + ot->name= "Make Normals Consistent"; + ot->idname= "MESH_OT_normals_make_consistent"; /* api callbacks */ ot->exec= righthandfaces_exec; @@ -3767,7 +3772,7 @@ static int smooth_vertex(bContext *C, wmOperator *op) Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); Mesh *me= obedit->data; - EditMesh *em= EM_GetEditMesh(me); + EditMesh *em= (EditMesh *)me; EditVert *eve, *eve_mir = NULL; EditEdge *eed; @@ -3776,8 +3781,9 @@ static int smooth_vertex(bContext *C, wmOperator *op) int teller=0; ModifierData *md= obedit->modifiers.first; + if(em==NULL) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -3787,8 +3793,9 @@ static int smooth_vertex(bContext *C, wmOperator *op) if(eve->f & SELECT) teller++; eve= eve->next; } + if(teller==0) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -3903,16 +3910,16 @@ static int smooth_vertex(bContext *C, wmOperator *op) // DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); #endif return OPERATOR_FINISHED; } -void MESH_OT_smooth_vertex(wmOperatorType *ot) +void MESH_OT_vertices_smooth(wmOperatorType *ot) { /* identifiers */ ot->name= "Smooth Vertex"; - ot->idname= "MESH_OT_smooth_vertex"; + ot->idname= "MESH_OT_vertices_smooth"; /* api callbacks */ ot->exec= smooth_vertex; @@ -4029,21 +4036,21 @@ static int vertices_to_sphere_exec(bContext *C, wmOperator *op) Object *obedit= CTX_data_edit_object(C); View3D *v3d = CTX_wm_view3d(C); Scene *scene = CTX_data_scene(C); - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)); + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); vertices_to_sphere(scene, v3d, obedit, em, RNA_float_get(op->ptr,"percent")); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } -void MESH_OT_vertices_to_sphere(wmOperatorType *ot) +void MESH_OT_vertices_transform_to_sphere(wmOperatorType *ot) { /* identifiers */ ot->name= "Vertices to Sphere"; - ot->idname= "MESH_OT_vertices_to_sphere"; + ot->idname= "MESH_OT_vertices_transform_to_sphere"; /* api callbacks */ ot->exec= vertices_to_sphere_exec; @@ -4079,7 +4086,7 @@ void flipface(EditMesh *em, EditFace *efa) static int flip_editnormals(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)); + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); EditFace *efa; efa= em->faces.first; @@ -4093,7 +4100,7 @@ static int flip_editnormals(bContext *C, wmOperator *op) /* update vertex normals too */ recalc_editnormals(em); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 139fa29ddf9..766615f0c7c 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -84,8 +84,6 @@ editmesh_tool.c: UI called tools for editmesh, geometry changes here, otherwise #include "WM_api.h" #include "WM_types.h" -#include "BMF_Api.h" - #include "ED_mesh.h" #include "ED_view3d.h" #include "ED_util.h" @@ -490,7 +488,7 @@ static int removedoublesflag_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); Scene *scene = CTX_data_scene(C); - EditMesh *em= EM_GetEditMesh(((Mesh *)obedit->data)); + EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); char msg[100]; int cnt = removedoublesflag(em,1,0,scene->toolsettings->doublimit); @@ -503,7 +501,7 @@ static int removedoublesflag_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -704,10 +702,65 @@ void extrude_mesh(Object *obedit, EditMesh *em, wmOperator *op) } +#if 0 +//need to see if this really had new stuff I should merge over +<<<<<<< .working +======= +// XXX should be a menu item +static int mesh_extrude_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + Object *obedit= CTX_data_edit_object(C); + EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); + + extrude_mesh(obedit,em, op); + + RNA_int_set(op->ptr, "mode", TFM_TRANSLATION); + WM_operator_name_call(C, "TFM_OT_transform", WM_OP_INVOKE_REGION_WIN, op->ptr); + + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); + + BKE_mesh_end_editmesh(obedit->data, em); + return OPERATOR_FINISHED; +} + +/* extrude without transform */ +static int mesh_extrude_exec(bContext *C, wmOperator *op) +{ + Object *obedit= CTX_data_edit_object(C); + EditMesh *em= BKE_mesh_get_editmesh(obedit->data); + + extrude_mesh(obedit,em, op); + + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); + + BKE_mesh_end_editmesh(obedit->data, em); + return OPERATOR_FINISHED; +} + + +void MESH_OT_extrude(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Extrude Mesh"; + ot->idname= "MESH_OT_extrude"; + + /* api callbacks */ + ot->invoke= mesh_extrude_invoke; + ot->exec= mesh_extrude_exec; + ot->poll= ED_operator_editmesh; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* to give to transform */ + RNA_def_int(ot->srna, "mode", TFM_TRANSLATION, 0, INT_MAX, "Mode", "", 0, INT_MAX); +} +#endif + static int split_mesh(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh *)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); WM_cursor_wait(1); @@ -722,7 +775,7 @@ static int split_mesh(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); // DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -740,6 +793,71 @@ void MESH_OT_split(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } +#if 0 +//this also showed up in a merge, need to check if it +//needs changes ported over to new extrude code too +static int extrude_repeat_mesh(bContext *C, wmOperator *op) +{ + Object *obedit= CTX_data_edit_object(C); + EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); + + RegionView3D *rv3d = CTX_wm_region_view3d(C); + + int steps = RNA_int_get(op->ptr,"steps"); + + float offs = RNA_float_get(op->ptr,"offset"); + + float dvec[3], tmat[3][3], bmat[3][3], nor[3]= {0.0, 0.0, 0.0}; + short a; + + /* dvec */ + dvec[0]= rv3d->persinv[2][0]; + dvec[1]= rv3d->persinv[2][1]; + dvec[2]= rv3d->persinv[2][2]; + Normalize(dvec); + dvec[0]*= offs; + dvec[1]*= offs; + dvec[2]*= offs; + + /* base correction */ + Mat3CpyMat4(bmat, obedit->obmat); + Mat3Inv(tmat, bmat); + Mat3MulVecfl(tmat, dvec); + + for(a=0; a<steps; a++) { + extrudeflag(obedit, em, SELECT, nor); + translateflag(em, SELECT, dvec); + } + + recalc_editnormals(em); + + EM_fgon_flags(em); + + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); + +// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); + BKE_mesh_end_editmesh(obedit->data, em); + return OPERATOR_FINISHED; +} + +void MESH_OT_extrude_repeat(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Extrude Repeat Mesh"; + ot->idname= "MESH_OT_extrude_repeat"; + + /* api callbacks */ + ot->exec= extrude_repeat_mesh; + ot->poll= ED_operator_editmesh; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* props */ + RNA_def_float(ot->srna, "offset", 2.0f, 0.0f, 100.0f, "Offset", "", 0.0f, FLT_MAX); + RNA_def_int(ot->srna, "steps", 10, 0, 180, "Steps", "", 0, INT_MAX); +} +#endif /* ************************** spin operator ******************** */ static int spin_mesh(bContext *C, float *dvec, int steps, float degr, int dupli ) @@ -747,7 +865,7 @@ static int spin_mesh(bContext *C, float *dvec, int steps, float degr, int dupli Object *obedit= CTX_data_edit_object(C); View3D *v3d = CTX_wm_view3d(C); Scene *scene = CTX_data_scene(C); - EditMesh *em= EM_GetEditMesh((Mesh *)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); RegionView3D *rv3d= CTX_wm_region_view3d(C); EditVert *eve,*nextve; float nor[3]= {0.0f, 0.0f, 0.0f}; @@ -830,7 +948,7 @@ static int spin_mesh(bContext *C, float *dvec, int steps, float degr, int dupli DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return ok; } @@ -871,7 +989,7 @@ void MESH_OT_spin(wmOperatorType *ot) static int screw_mesh_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh *)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); EditVert *eve,*v1=0,*v2=0; EditEdge *eed; float dvec[3], nor[3]; @@ -907,7 +1025,7 @@ static int screw_mesh_exec(bContext *C, wmOperator *op) } if(v1==NULL || v2==NULL) { BKE_report(op->reports, RPT_ERROR, "You have to select a string of connected vertices too"); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -926,16 +1044,16 @@ static int screw_mesh_exec(bContext *C, wmOperator *op) if(spin_mesh(C, dvec, turns*steps, 360.0f*turns, 0)) { WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } else { BKE_report(op->reports, RPT_ERROR, "No valid vertices are selected"); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } void MESH_OT_screw(wmOperatorType *ot) @@ -1012,10 +1130,10 @@ static int delete_mesh(Object *obedit, wmOperator *op, int event) int count; char *str="Erase"; - if(event<1) return; + if(event<1) return OPERATOR_CANCELLED; if (event != 7 && event != 5) - em= EM_GetEditMesh((Mesh *)obedit->data); + em= BKE_mesh_get_editmesh((Mesh *)obedit->data); if(event==10 ) { str= "Erase Vertices"; @@ -1024,7 +1142,7 @@ static int delete_mesh(Object *obedit, wmOperator *op, int event) erase_vertices(em, &em->verts); EM_fgon_flags(em); // redo flags and indices for fgons - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } else if(event==7) { if (!EDBM_CallOpf(bem, op, "dissolveverts verts=%hv",BM_SELECT)) @@ -1032,14 +1150,14 @@ static int delete_mesh(Object *obedit, wmOperator *op, int event) } else if(event==6) { if(!EdgeLoopDelete(em, op)) { - EM_EndEditMesh(obedit->data, em); - return; + BKE_mesh_end_editmesh(obedit->data, em); + return OPERATOR_CANCELLED; } str= "Erase Edge Loop"; EM_fgon_flags(em); // redo flags and indices for fgons - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } else if(event==4) { str= "Erase Edges & Faces"; @@ -1084,7 +1202,7 @@ static int delete_mesh(Object *obedit, wmOperator *op, int event) } EM_fgon_flags(em); // redo flags and indices for fgons - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } else if(event==1) { str= "Erase Edges"; @@ -1131,14 +1249,14 @@ static int delete_mesh(Object *obedit, wmOperator *op, int event) } EM_fgon_flags(em); // redo flags and indices for fgons - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } else if(event==2) { str="Erase Faces"; delfaceflag(em, SELECT); EM_fgon_flags(em); // redo flags and indices for fgons - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } else if(event==3) { str= "Erase All"; @@ -1148,7 +1266,7 @@ static int delete_mesh(Object *obedit, wmOperator *op, int event) if(em->selected.first) BLI_freelistN(&(em->selected)); EM_fgon_flags(em); // redo flags and indices for fgons - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } else if(event==5) { if (!EDBM_CallOpf(bem, op, "del geom=%hf context=%d", @@ -1156,7 +1274,8 @@ static int delete_mesh(Object *obedit, wmOperator *op, int event) return OPERATOR_CANCELLED; str= "Erase Only Faces"; } - + + return OPERATOR_FINISHED; // DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); } @@ -2515,11 +2634,13 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beaut } } } - sort[hold]->f &= ~SELECT; - sort[hold]->f2 |= EDGENEW; - length[hold] = -1; - } - } + if (hold > -1) { + sort[hold]->f &= ~SELECT; + sort[hold]->f2 |= EDGENEW; + length[hold] = -1; + } + } + } // Beauty Long Edges else { @@ -2536,13 +2657,15 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beaut } } } - sort[hold]->f &= ~SELECT; - sort[hold]->f2 |= EDGENEW; - length[hold] = -1; - } - } + if (hold > -1) { + sort[hold]->f &= ~SELECT; + sort[hold]->f2 |= EDGENEW; + length[hold] = -1; + } + } + } } - } + } } gh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp); @@ -3167,11 +3290,9 @@ void join_triangles(EditMesh *em) if(v1 && v2 && v3 && v4){ /*test if simple island first. This mimics 2.42 behaviour and the tests are less restrictive.*/ if(efaa[0]->tmp.l == 1 && efaa[1]->tmp.l == 1){ - if( convex(v1->co, v2->co, v3->co, v4->co) ){ - eed->f1 |= T2QJOIN; - efaa[0]->f1 = 1; //mark for join - efaa[1]->f1 = 1; //mark for join - } + eed->f1 |= T2QJOIN; + efaa[0]->f1 = 1; //mark for join + efaa[1]->f1 = 1; //mark for join } else{ @@ -3415,10 +3536,6 @@ static void edge_rotate(EditMesh *em, wmOperator *op, EditEdge *eed,int dir) if(numshared > 1) return; - /* coplaner faces only please */ - if(Inpf(face[0]->n,face[1]->n) <= 0.000001) - return; - /* we want to construct an array of vertex indicis in both faces, starting at the last vertex of the edge being rotated. - first we find the two vertices that lie on the rotating edge @@ -3549,7 +3666,7 @@ static void edge_rotate(EditMesh *em, wmOperator *op, EditEdge *eed,int dir) static int edge_rotate_selected(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh *)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); int dir = RNA_int_get(op->ptr,"dir"); // dir == 2 when clockwise and ==1 for counter CW. EditEdge *eed; @@ -3588,7 +3705,7 @@ static int edge_rotate_selected(bContext *C, wmOperator *op) else { BKE_report(op->reports, RPT_ERROR, "Select one edge or two adjacent faces"); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } } @@ -3604,7 +3721,7 @@ static int edge_rotate_selected(bContext *C, wmOperator *op) else { BKE_report(op->reports, RPT_ERROR, "Select one edge or two adjacent faces"); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -3616,7 +3733,7 @@ static int edge_rotate_selected(bContext *C, wmOperator *op) // DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -3745,7 +3862,7 @@ useless: GHash *vertgh; SlideVert *tempsv; - float perc = 0, percp = 0,vertdist; // XXX, projectMat[4][4], viewMat[4][4]; + float perc = 0, percp = 0,vertdist; // XXX, projectMat[4][4]; float shiftlabda= 0.0f,len = 0.0f; int i = 0,j, numsel, numadded=0, timesthrough = 0, vertsel=0, prop=1, cancel = 0,flip=0; int wasshift = 0; @@ -3765,7 +3882,7 @@ useless: // initNumInput(&num); -// view3d_get_object_project_mat(curarea, obedit, projectMat, viewMat); +// view3d_get_object_project_mat(curarea, obedit, projectMat); mvalo[0] = -1; mvalo[1] = -1; numsel =0; @@ -4672,11 +4789,11 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) ARegion *ar= CTX_wm_region(C); RegionView3D *rv3d= ar->regiondata; Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh *)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); EditVert *eve, *nextve; EditEdge *eed, *seed= NULL; EditFace *efa, *sefa= NULL; - float projectMat[4][4], vec[3], dist, mindist, viewMat[4][4]; + float projectMat[4][4], vec[3], dist, mindist; short doit= 1, *mval= event->mval; // XXX ,propmode,prop; @@ -4688,7 +4805,7 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) /* select flush... vertices are important */ EM_selectmode_set(em); - view3d_get_object_project_mat(rv3d, obedit, projectMat, viewMat); + view3d_get_object_project_mat(rv3d, obedit, projectMat); /* find best face, exclude triangles and break on face select or faces with 2 edges select */ mindist= 1000000.0f; @@ -4716,12 +4833,12 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) if(efa) { BKE_report(op->reports, RPT_ERROR, "Can't perform ripping with faces selected this way"); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } if(sefa==NULL) { BKE_report(op->reports, RPT_ERROR, "No proper selection or faces included"); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -4786,7 +4903,7 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) if(seed==NULL) { // never happens? BKE_report(op->reports, RPT_ERROR, "No proper edge found to start"); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -4876,7 +4993,7 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) // scene->prop_mode = propmode; // XXX scene->proportional = prop; - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); #endif return OPERATOR_FINISHED; } @@ -5818,7 +5935,7 @@ void pathselect(EditMesh *em, wmOperator *op) static int region_to_loop(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh *)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); EditEdge *eed; EditFace *efa; @@ -5851,7 +5968,7 @@ static int region_to_loop(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -5996,7 +6113,7 @@ static int loop_bisect(EditMesh *em, Collection *edgecollection){ static int loop_to_region(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh *)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); EditFace *efa; @@ -6028,7 +6145,7 @@ static int loop_to_region(bContext *C, wmOperator *op) // if (EM_texFaceCheck()) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -6053,7 +6170,7 @@ void MESH_OT_loop_to_region(wmOperatorType *ot) static int mesh_rotate_uvs(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh *)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); EditFace *efa; short change = 0, ccw; @@ -6063,7 +6180,7 @@ static int mesh_rotate_uvs(bContext *C, wmOperator *op) if (!EM_texFaceCheck(em)) { BKE_report(op->reports, RPT_ERROR, "mesh has no uv/image layers"); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -6120,14 +6237,14 @@ static int mesh_rotate_uvs(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } static int mesh_mirror_uvs(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh *)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); EditFace *efa; short change = 0, altaxis; @@ -6137,7 +6254,7 @@ static int mesh_mirror_uvs(bContext *C, wmOperator *op) if (!EM_texFaceCheck(em)) { BKE_report(op->reports, RPT_ERROR, "mesh has no uv/image layers"); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -6209,14 +6326,14 @@ static int mesh_mirror_uvs(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } static int mesh_rotate_colors(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh *)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); EditFace *efa; short change = 0, ccw; @@ -6225,7 +6342,7 @@ static int mesh_rotate_colors(bContext *C, wmOperator *op) if (!EM_vertColorCheck(em)) { BKE_report(op->reports, RPT_ERROR, "mesh has no color layers"); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -6265,7 +6382,7 @@ static int mesh_rotate_colors(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -6273,7 +6390,7 @@ static int mesh_rotate_colors(bContext *C, wmOperator *op) static int mesh_mirror_colors(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh *)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); EditFace *efa; short change = 0, altaxis; @@ -6282,7 +6399,7 @@ static int mesh_mirror_colors(bContext *C, wmOperator *op) if (!EM_vertColorCheck(em)) { BKE_report(op->reports, RPT_ERROR, "Mesh has no color layers"); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -6321,15 +6438,15 @@ static int mesh_mirror_colors(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } -void MESH_OT_rotate_uvs(wmOperatorType *ot) +void MESH_OT_uvs_rotate(wmOperatorType *ot) { /* identifiers */ ot->name= "Rotate UVs"; - ot->idname= "MESH_OT_rotate_uvs"; + ot->idname= "MESH_OT_uvs_rotate"; /* api callbacks */ ot->exec= mesh_rotate_uvs; @@ -6339,11 +6456,11 @@ void MESH_OT_rotate_uvs(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -void MESH_OT_mirror_uvs(wmOperatorType *ot) +void MESH_OT_uvs_mirror(wmOperatorType *ot) { /* identifiers */ ot->name= "Mirror UVs"; - ot->idname= "MESH_OT_mirror_uvs"; + ot->idname= "MESH_OT_uvs_mirror"; /* api callbacks */ ot->exec= mesh_mirror_uvs; @@ -6353,11 +6470,11 @@ void MESH_OT_mirror_uvs(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -void MESH_OT_rotate_colors(wmOperatorType *ot) +void MESH_OT_colors_rotate(wmOperatorType *ot) { /* identifiers */ ot->name= "Rotate Colors"; - ot->idname= "MESH_OT_rotate_colors"; + ot->idname= "MESH_OT_colors_rotate"; /* api callbacks */ ot->exec= mesh_rotate_colors; @@ -6367,11 +6484,11 @@ void MESH_OT_rotate_colors(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -void MESH_OT_mirror_colors(wmOperatorType *ot) +void MESH_OT_colors_mirror(wmOperatorType *ot) { /* identifiers */ ot->name= "Mirror Colors"; - ot->idname= "MESH_OT_mirror_colors"; + ot->idname= "MESH_OT_colors_mirror"; /* api callbacks */ ot->exec= mesh_mirror_colors; @@ -6380,6 +6497,7 @@ void MESH_OT_mirror_colors(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } + /* ************************************* */ /* note; the EM_selectmode_set() calls here illustrate how badly constructed it all is... from before the @@ -6630,14 +6748,14 @@ static void fill_mesh(EditMesh *em) static int fill_mesh_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh *)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); fill_mesh(em); DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -6659,13 +6777,13 @@ void MESH_OT_fill(wmOperatorType *ot) static int beauty_fill_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh *)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); beauty_fill(em); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -6683,7 +6801,7 @@ void MESH_OT_beauty_fill(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -static int convert_quads_to_tris_exec(bContext *C, wmOperator *op) +static int quads_convert_to_tris_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); BMEditMesh *em= ((Mesh *)obedit->data)->edit_btmesh; @@ -6697,41 +6815,41 @@ static int convert_quads_to_tris_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void MESH_OT_convert_quads_to_tris(wmOperatorType *ot) +void MESH_OT_quads_convert_to_tris(wmOperatorType *ot) { /* identifiers */ ot->name= "Quads to Tris"; - ot->idname= "MESH_OT_convert_quads_to_tris"; + ot->idname= "MESH_OT_quads_convert_to_tris"; /* api callbacks */ - ot->exec= convert_quads_to_tris_exec; + ot->exec= quads_convert_to_tris_exec; ot->poll= ED_operator_editmesh; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -static int convert_tris_to_quads_exec(bContext *C, wmOperator *op) +static int tris_convert_to_quads_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh *)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); join_triangles(em); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } -void MESH_OT_convert_tris_to_quads(wmOperatorType *ot) +void MESH_OT_tris_convert_to_quads(wmOperatorType *ot) { /* identifiers */ ot->name= "Tris to Quads"; - ot->idname= "MESH_OT_convert_tris_to_quads"; + ot->idname= "MESH_OT_tris_convert_to_quads"; /* api callbacks */ - ot->exec= convert_tris_to_quads_exec; + ot->exec= tris_convert_to_quads_exec; ot->poll= ED_operator_editmesh; /* flags */ @@ -6741,13 +6859,13 @@ void MESH_OT_convert_tris_to_quads(wmOperatorType *ot) static int edge_flip_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh *)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); edge_flip(em); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -6768,13 +6886,13 @@ void MESH_OT_edge_flip(wmOperatorType *ot) static int mesh_faces_shade_smooth_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh *)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); mesh_set_smooth_faces(em,1); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -6795,13 +6913,13 @@ void MESH_OT_faces_shade_smooth(wmOperatorType *ot) static int mesh_faces_shade_solid_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh *)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); mesh_set_smooth_faces(em,0); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h index 4f58ee5fea0..7e4d2fd6f06 100644 --- a/source/blender/editors/mesh/mesh_intern.h +++ b/source/blender/editors/mesh/mesh_intern.h @@ -111,18 +111,18 @@ void em_setup_viewcontext(struct bContext *C, struct ViewContext *vc); void MESH_OT_separate(struct wmOperatorType *ot); /* ******************* editmesh_add.c */ -void MESH_OT_add_primitive_plane(struct wmOperatorType *ot); -void MESH_OT_add_primitive_cube(struct wmOperatorType *ot); -void MESH_OT_add_primitive_circle(struct wmOperatorType *ot); -void MESH_OT_add_primitive_cylinder(struct wmOperatorType *ot); -void MESH_OT_add_primitive_tube(struct wmOperatorType *ot); -void MESH_OT_add_primitive_cone(struct wmOperatorType *ot); -void MESH_OT_add_primitive_grid(struct wmOperatorType *ot); -void MESH_OT_add_primitive_monkey(struct wmOperatorType *ot); -void MESH_OT_add_primitive_uv_sphere(struct wmOperatorType *ot); -void MESH_OT_add_primitive_ico_sphere(struct wmOperatorType *ot); +void MESH_OT_primitive_plane_add(struct wmOperatorType *ot); +void MESH_OT_primitive_cube_add(struct wmOperatorType *ot); +void MESH_OT_primitive_circle_add(struct wmOperatorType *ot); +void MESH_OT_primitive_cylinder_add(struct wmOperatorType *ot); +void MESH_OT_primitive_tube_add(struct wmOperatorType *ot); +void MESH_OT_primitive_cone_add(struct wmOperatorType *ot); +void MESH_OT_primitive_grid_add(struct wmOperatorType *ot); +void MESH_OT_primitive_monkey_add(struct wmOperatorType *ot); +void MESH_OT_primitive_uv_sphere_add(struct wmOperatorType *ot); +void MESH_OT_primitive_ico_sphere_add(struct wmOperatorType *ot); void MESH_OT_dupli_extrude_cursor(struct wmOperatorType *ot); -void MESH_OT_add_edge_face(struct wmOperatorType *ot); +void MESH_OT_edge_face_add(struct wmOperatorType *ot); void MESH_OT_fgon_make(struct wmOperatorType *ot); void MESH_OT_fgon_clear(struct wmOperatorType *ot); @@ -183,7 +183,7 @@ extern struct EditFace *EM_face_from_faces(EditMesh *em, struct EditFace *efa1, void MESH_OT_knife_cut(struct wmOperatorType *ot); /* ******************* editmesh_mods.c */ -void MESH_OT_select_loop(struct wmOperatorType *ot); +void MESH_OT_loop_select(struct wmOperatorType *ot); void MESH_OT_select_all_toggle(struct wmOperatorType *ot); void MESH_OT_bmesh_test(struct wmOperatorType *ot); void MESH_OT_select_more(struct wmOperatorType *ot); @@ -194,20 +194,20 @@ void MESH_OT_select_linked(struct wmOperatorType *ot); void MESH_OT_select_linked_pick(struct wmOperatorType *ot); void MESH_OT_hide(struct wmOperatorType *ot); void MESH_OT_reveal(struct wmOperatorType *ot); -void MESH_OT_consistant_normals(struct wmOperatorType *ot); -void MESH_OT_select_linked_flat_faces(struct wmOperatorType *ot); -void MESH_OT_select_sharp_edges(struct wmOperatorType *ot); -void MESH_OT_select_path_shortest(struct wmOperatorType *ot); -void MESH_OT_select_vertex_similar(struct wmOperatorType *ot); -void MESH_OT_select_edge_similar(struct wmOperatorType *ot); -void MESH_OT_select_face_similar(struct wmOperatorType *ot); +void MESH_OT_normals_make_consistent(struct wmOperatorType *ot); +void MESH_OT_faces_select_linked_flat(struct wmOperatorType *ot); +void MESH_OT_edges_select_sharp(struct wmOperatorType *ot); +void MESH_OT_select_shortest_path(struct wmOperatorType *ot); +void MESH_OT_vertices_select_similar(struct wmOperatorType *ot); +void MESH_OT_edges_select_similar(struct wmOperatorType *ot); +void MESH_OT_faces_select_similar(struct wmOperatorType *ot); void MESH_OT_select_random(struct wmOperatorType *ot); -void MESH_OT_vertices_to_sphere(struct wmOperatorType *ot); +void MESH_OT_vertices_transform_to_sphere(struct wmOperatorType *ot); void MESH_OT_selection_type(struct wmOperatorType *ot); -void MESH_OT_select_loop_multi(struct wmOperatorType *ot); +void MESH_OT_loop_multi_select(struct wmOperatorType *ot); void MESH_OT_mark_seam(struct wmOperatorType *ot); void MESH_OT_mark_sharp(struct wmOperatorType *ot); -void MESH_OT_smooth_vertex(struct wmOperatorType *ot); +void MESH_OT_vertices_smooth(struct wmOperatorType *ot); void MESH_OT_flip_editnormals(struct wmOperatorType *ot); extern EditEdge *findnearestedge(struct ViewContext *vc, int *dist); @@ -254,8 +254,8 @@ void MESH_OT_screw(struct wmOperatorType *ot); void MESH_OT_fill(struct wmOperatorType *ot); void MESH_OT_beauty_fill(struct wmOperatorType *ot); -void MESH_OT_convert_quads_to_tris(struct wmOperatorType *ot); -void MESH_OT_convert_tris_to_quads(struct wmOperatorType *ot); +void MESH_OT_quads_convert_to_tris(struct wmOperatorType *ot); +void MESH_OT_tris_convert_to_quads(struct wmOperatorType *ot); void MESH_OT_edge_flip(struct wmOperatorType *ot); void MESH_OT_faces_shade_smooth(struct wmOperatorType *ot); void MESH_OT_faces_shade_solid(struct wmOperatorType *ot); @@ -265,10 +265,10 @@ void MESH_OT_edge_rotate(struct wmOperatorType *ot); void MESH_OT_loop_to_region(struct wmOperatorType *ot); void MESH_OT_region_to_loop(struct wmOperatorType *ot); -void MESH_OT_rotate_uvs(struct wmOperatorType *ot); -void MESH_OT_mirror_uvs(struct wmOperatorType *ot); -void MESH_OT_rotate_colors(struct wmOperatorType *ot); -void MESH_OT_mirror_colors(struct wmOperatorType *ot); +void MESH_OT_uvs_rotate(struct wmOperatorType *ot); +void MESH_OT_uvs_mirror(struct wmOperatorType *ot); +void MESH_OT_colors_rotate(struct wmOperatorType *ot); +void MESH_OT_colors_mirror(struct wmOperatorType *ot); void MESH_OT_delete(struct wmOperatorType *ot); void MESH_OT_rip(struct wmOperatorType *ot); diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index f5e3f12bc6d..e61deb1d554 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -45,6 +45,7 @@ #include "BKE_context.h" #include "BKE_global.h" +#include "BKE_mesh.h" #include "BKE_utildefines.h" #include "BKE_mesh.h" @@ -66,11 +67,11 @@ static int mesh_add_duplicate_exec(bContext *C, wmOperator *op) { Object *ob= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh(ob->data); + EditMesh *em= BKE_mesh_get_editmesh(ob->data); adduplicateflag(em, SELECT); - EM_EndEditMesh(ob->data, em); + BKE_mesh_end_editmesh(ob->data, em); return OPERATOR_FINISHED; } @@ -119,24 +120,24 @@ void ED_operatortypes_mesh(void) WM_operatortype_append(MESH_OT_selection_type); WM_operatortype_append(MESH_OT_hide); WM_operatortype_append(MESH_OT_reveal); - WM_operatortype_append(MESH_OT_consistant_normals); + WM_operatortype_append(MESH_OT_normals_make_consistent); WM_operatortype_append(MESH_OT_subdivide); WM_operatortype_append(MESH_OT_subdivide_multi); WM_operatortype_append(MESH_OT_subdivide_multi_fractal); WM_operatortype_append(MESH_OT_subdivide_smooth); WM_operatortype_append(MESH_OT_subdivs); - WM_operatortype_append(MESH_OT_select_linked_flat_faces); - WM_operatortype_append(MESH_OT_select_sharp_edges); - WM_operatortype_append(MESH_OT_add_primitive_plane); - WM_operatortype_append(MESH_OT_add_primitive_cube); - WM_operatortype_append(MESH_OT_add_primitive_circle); - WM_operatortype_append(MESH_OT_add_primitive_cylinder); - WM_operatortype_append(MESH_OT_add_primitive_tube); - WM_operatortype_append(MESH_OT_add_primitive_cone); - WM_operatortype_append(MESH_OT_add_primitive_grid); - WM_operatortype_append(MESH_OT_add_primitive_monkey); - WM_operatortype_append(MESH_OT_add_primitive_uv_sphere); - WM_operatortype_append(MESH_OT_add_primitive_ico_sphere); + WM_operatortype_append(MESH_OT_faces_select_linked_flat); + WM_operatortype_append(MESH_OT_edges_select_sharp); + WM_operatortype_append(MESH_OT_primitive_plane_add); + WM_operatortype_append(MESH_OT_primitive_cube_add); + WM_operatortype_append(MESH_OT_primitive_circle_add); + WM_operatortype_append(MESH_OT_primitive_cylinder_add); + WM_operatortype_append(MESH_OT_primitive_tube_add); + WM_operatortype_append(MESH_OT_primitive_cone_add); + WM_operatortype_append(MESH_OT_primitive_grid_add); + WM_operatortype_append(MESH_OT_primitive_monkey_add); + WM_operatortype_append(MESH_OT_primitive_uv_sphere_add); + WM_operatortype_append(MESH_OT_primitive_ico_sphere_add); WM_operatortype_append(MESH_OT_fgon_clear); WM_operatortype_append(MESH_OT_fgon_make); WM_operatortype_append(MESH_OT_duplicate_add); @@ -145,22 +146,22 @@ void ED_operatortypes_mesh(void) WM_operatortype_append(MESH_OT_spin); WM_operatortype_append(MESH_OT_screw); - WM_operatortype_append(MESH_OT_vertices_to_sphere); + WM_operatortype_append(MESH_OT_vertices_transform_to_sphere); WM_operatortype_append(MESH_OT_split); WM_operatortype_append(MESH_OT_extrude_repeat); WM_operatortype_append(MESH_OT_edge_rotate); WM_operatortype_append(MESH_OT_loop_to_region); WM_operatortype_append(MESH_OT_region_to_loop); - WM_operatortype_append(MESH_OT_rotate_uvs); - WM_operatortype_append(MESH_OT_mirror_uvs); - WM_operatortype_append(MESH_OT_rotate_colors); - WM_operatortype_append(MESH_OT_mirror_colors); + WM_operatortype_append(MESH_OT_uvs_rotate); + WM_operatortype_append(MESH_OT_uvs_mirror); + WM_operatortype_append(MESH_OT_colors_rotate); + WM_operatortype_append(MESH_OT_colors_mirror); WM_operatortype_append(MESH_OT_fill); WM_operatortype_append(MESH_OT_beauty_fill); - WM_operatortype_append(MESH_OT_convert_quads_to_tris); - WM_operatortype_append(MESH_OT_convert_tris_to_quads); + WM_operatortype_append(MESH_OT_quads_convert_to_tris); + WM_operatortype_append(MESH_OT_tris_convert_to_quads); WM_operatortype_append(MESH_OT_edge_flip); WM_operatortype_append(MESH_OT_faces_shade_smooth); WM_operatortype_append(MESH_OT_faces_shade_solid); @@ -169,16 +170,16 @@ void ED_operatortypes_mesh(void) WM_operatortype_append(MESH_OT_separate); WM_operatortype_append(MESH_OT_dupli_extrude_cursor); - WM_operatortype_append(MESH_OT_select_loop); - WM_operatortype_append(MESH_OT_add_edge_face); - WM_operatortype_append(MESH_OT_select_path_shortest); - WM_operatortype_append(MESH_OT_select_vertex_similar); - WM_operatortype_append(MESH_OT_select_edge_similar); - WM_operatortype_append(MESH_OT_select_face_similar); - WM_operatortype_append(MESH_OT_select_loop_multi); + WM_operatortype_append(MESH_OT_loop_select); + WM_operatortype_append(MESH_OT_edge_face_add); + WM_operatortype_append(MESH_OT_select_shortest_path); + WM_operatortype_append(MESH_OT_vertices_select_similar); + WM_operatortype_append(MESH_OT_edges_select_similar); + WM_operatortype_append(MESH_OT_faces_select_similar); + WM_operatortype_append(MESH_OT_loop_multi_select); WM_operatortype_append(MESH_OT_mark_seam); WM_operatortype_append(MESH_OT_mark_sharp); - WM_operatortype_append(MESH_OT_smooth_vertex); + WM_operatortype_append(MESH_OT_vertices_smooth); WM_operatortype_append(MESH_OT_flip_editnormals); WM_operatortype_append(MESH_OT_knife_cut); @@ -195,16 +196,16 @@ void ED_keymap_mesh(wmWindowManager *wm) /* selecting */ /* standard mouse selection goes via space_view3d */ - WM_keymap_add_item(keymap, "MESH_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_ALT, 0); - kmi= WM_keymap_add_item(keymap, "MESH_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0); + WM_keymap_add_item(keymap, "MESH_OT_loop_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0); + kmi= WM_keymap_add_item(keymap, "MESH_OT_loop_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0); RNA_boolean_set(kmi->ptr, "extend", 1); - kmi= WM_keymap_add_item(keymap, "MESH_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_ALT|KM_CTRL, 0); + kmi= WM_keymap_add_item(keymap, "MESH_OT_loop_select", SELECTMOUSE, KM_PRESS, KM_ALT|KM_CTRL, 0); RNA_boolean_set(kmi->ptr, "ring", 1); - kmi= WM_keymap_add_item(keymap, "MESH_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT|KM_CTRL, 0); + kmi= WM_keymap_add_item(keymap, "MESH_OT_loop_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT|KM_CTRL, 0); RNA_boolean_set(kmi->ptr, "extend", 1); RNA_boolean_set(kmi->ptr, "ring", 1); - WM_keymap_add_item(keymap, "MESH_OT_select_path_shortest", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "MESH_OT_select_shortest_path", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "MESH_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "MESH_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); @@ -216,11 +217,11 @@ void ED_keymap_mesh(wmWindowManager *wm) WM_keymap_add_item(keymap, "MESH_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0); RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "deselect", 1); - RNA_float_set(WM_keymap_add_item(keymap, "MESH_OT_select_linked_flat_faces", FKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0)->ptr,"sharpness",135.0); - RNA_float_set(WM_keymap_add_item(keymap, "MESH_OT_select_sharp_edges", SKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0)->ptr,"sharpness",135.0); + RNA_float_set(WM_keymap_add_item(keymap, "MESH_OT_faces_select_linked_flat", FKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0)->ptr,"sharpness",135.0); + RNA_float_set(WM_keymap_add_item(keymap, "MESH_OT_edges_select_sharp", SKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0)->ptr,"sharpness",135.0); WM_keymap_add_item(keymap, "MESH_OT_select_random", SPACEKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "MESH_OT_vertices_to_sphere", SKEY, KM_PRESS, KM_CTRL|KM_SHIFT , 0); + WM_keymap_add_item(keymap, "MESH_OT_vertices_transform_to_sphere", SKEY, KM_PRESS, KM_CTRL|KM_SHIFT , 0); WM_keymap_add_item(keymap, "MESH_OT_mark_seam", ONEKEY, KM_PRESS, KM_CTRL , 0); RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_mark_seam", ONEKEY, KM_PRESS, KM_ALT , 0)->ptr,"clear",1); @@ -229,9 +230,9 @@ void ED_keymap_mesh(wmWindowManager *wm) RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_mark_sharp", TWOKEY, KM_PRESS, KM_ALT , 0)->ptr,"set",1); /* temp hotkeys! */ - WM_keymap_add_item(keymap, "MESH_OT_select_vertex_similar", GKEY, KM_PRESS, KM_SHIFT, 0); - WM_keymap_add_item(keymap, "MESH_OT_select_edge_similar", GKEY, KM_PRESS, KM_SHIFT2|KM_CTRL, 0); - WM_keymap_add_item(keymap, "MESH_OT_select_face_similar", GKEY, KM_PRESS, KM_SHIFT|KM_CTRL2, 0); + WM_keymap_add_item(keymap, "MESH_OT_vertices_select_similar", GKEY, KM_PRESS, KM_SHIFT, 0); + WM_keymap_add_item(keymap, "MESH_OT_edges_select_similar", GKEY, KM_PRESS, KM_SHIFT2|KM_CTRL, 0); + WM_keymap_add_item(keymap, "MESH_OT_faces_select_similar", GKEY, KM_PRESS, KM_SHIFT|KM_CTRL2, 0); /* selection mode */ WM_keymap_add_item(keymap, "MESH_OT_selection_type", TABKEY, KM_PRESS, KM_CTRL, 0); @@ -242,9 +243,9 @@ void ED_keymap_mesh(wmWindowManager *wm) WM_keymap_add_item(keymap, "MESH_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); /* tools */ - WM_keymap_add_item(keymap, "MESH_OT_consistant_normals", NKEY, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_consistant_normals", NKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0)->ptr, "inside", 1); - WM_keymap_add_item(keymap, "MESH_OT_smooth_vertex", THREEKEY, KM_PRESS, KM_CTRL , 0); + WM_keymap_add_item(keymap, "MESH_OT_normals_make_consistent", NKEY, KM_PRESS, KM_CTRL, 0); + RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_normals_make_consistent", NKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0)->ptr, "inside", 1); + WM_keymap_add_item(keymap, "MESH_OT_vertices_smooth", THREEKEY, KM_PRESS, KM_CTRL , 0); WM_keymap_add_item(keymap, "MESH_OT_flip_editnormals", THREEKEY, KM_PRESS, KM_ALT , 0); WM_keymap_add_item(keymap, "MESH_OT_subdivs", WKEY, KM_PRESS, 0, 0); // this is the menu @@ -260,8 +261,8 @@ void ED_keymap_mesh(wmWindowManager *wm) WM_keymap_add_item(keymap, "VIEW3D_OT_editmesh_face_toolbox", FKEY, KM_PRESS, KM_CTRL, 0); /* operators below are in this toolbox */ WM_keymap_add_item(keymap, "MESH_OT_fill", FKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "MESH_OT_beauty_fill", FKEY, KM_PRESS, KM_ALT, 0); - WM_keymap_add_item(keymap, "MESH_OT_convert_quads_to_tris", TKEY, KM_PRESS, KM_CTRL, 0); - WM_keymap_add_item(keymap, "MESH_OT_convert_tris_to_quads", JKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_add_item(keymap, "MESH_OT_quads_convert_to_tris", TKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "MESH_OT_tris_convert_to_quads", JKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "MESH_OT_split", FOURKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "MESH_OT_extrude_repeat", FOURKEY, KM_PRESS, KM_ALT, 0); @@ -270,15 +271,15 @@ void ED_keymap_mesh(wmWindowManager *wm) WM_keymap_add_item(keymap, "MESH_OT_loop_to_region",SIXKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "MESH_OT_region_to_loop",SIXKEY, KM_PRESS, KM_ALT, 0); - WM_keymap_add_item(keymap, "MESH_OT_rotate_uvs",SEVENKEY, KM_PRESS, KM_CTRL, 0); - WM_keymap_add_item(keymap, "MESH_OT_mirror_uvs",SEVENKEY, KM_PRESS, KM_ALT, 0); - WM_keymap_add_item(keymap, "MESH_OT_rotate_colors",EIGHTKEY, KM_PRESS, KM_CTRL, 0); - WM_keymap_add_item(keymap, "MESH_OT_mirror_colors",EIGHTKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_add_item(keymap, "MESH_OT_uvs_rotate",SEVENKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "MESH_OT_uvs_mirror",SEVENKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_add_item(keymap, "MESH_OT_colors_rotate",EIGHTKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "MESH_OT_colors_mirror",EIGHTKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "MESH_OT_rip",VKEY, KM_PRESS, 0, 0); /* add/remove */ - WM_keymap_add_item(keymap, "MESH_OT_add_edge_face", FKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "MESH_OT_edge_face_add", FKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "MESH_OT_duplicate_add", DKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "OBJECT_OT_mesh_add", AKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "MESH_OT_separate", PKEY, KM_PRESS, KM_SHIFT, 0); diff --git a/source/blender/editors/object/Makefile b/source/blender/editors/object/Makefile index 9011f566bc6..c0312023bfd 100644 --- a/source/blender/editors/object/Makefile +++ b/source/blender/editors/object/Makefile @@ -37,7 +37,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS) CPPFLAGS += -I$(OPENGL_HEADERS) -CPPFLAGS += -I$(NAN_BMFONT)/include CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include CPPFLAGS += -I../../windowmanager diff --git a/source/blender/editors/object/SConscript b/source/blender/editors/object/SConscript index 6af1713348b..0b7a4e41192 100644 --- a/source/blender/editors/object/SConscript +++ b/source/blender/editors/object/SConscript @@ -5,7 +5,7 @@ sources = env.Glob('*.c') incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc' -incs += ' #/intern/guardedalloc #intern/bmfont' +incs += ' #/intern/guardedalloc' incs += ' ../../makesrna ../../python ../../bmesh' defs = [] diff --git a/source/blender/editors/object/editconstraint.c b/source/blender/editors/object/editconstraint.c index c8d8ece30dc..d0e487f98c7 100644 --- a/source/blender/editors/object/editconstraint.c +++ b/source/blender/editors/object/editconstraint.c @@ -379,6 +379,8 @@ void add_constraint (Scene *scene, View3D *v3d, short only_IK) nr= pupmenu("Add Constraint to Active Bone%t|Child Of%x19|Transformation%x20|%l|Copy Location%x1|Copy Rotation%x2|Copy Scale%x8|%l|Limit Location%x13|Limit Rotation%x14|Limit Scale%x15|Limit Distance%x21|%l|Track To%x3|Floor%x4|Locked Track%x5|Stretch To%x7|%l|Action%x16|Script%x18"); else if ((obsel) && (obsel->type==OB_CURVE)) nr= pupmenu("Add Constraint to Active Object%t|Child Of%x19|Transformation%x20|%l|Copy Location%x1|Copy Rotation%x2|Copy Scale%x8|%l|Limit Location%x13|Limit Rotation%x14|Limit Scale%x15|Limit Distance%x21|%l|Track To%x3|Floor%x4|Locked Track%x5|Follow Path%x6|Clamp To%x17|Stretch To%x7|%l|Action%x16|Script%x18"); + else if ((obsel) && (obsel->type==OB_MESH)) + nr= pupmenu("Add Constraint to Active Object%t|Child Of%x19|Transformation%x20|%l|Copy Location%x1|Copy Rotation%x2|Copy Scale%x8|%l|Limit Location%x13|Limit Rotation%x14|Limit Scale%x15|Limit Distance%x21|%l|Track To%x3|Floor%x4|Locked Track%x5|Shrinkwrap%x22|Stretch To%x7|%l|Action%x16|Script%x18"); else if (obsel) nr= pupmenu("Add Constraint to Active Object%t|Child Of%x19|Transformation%x20|%l|Copy Location%x1|Copy Rotation%x2|Copy Scale%x8|%l|Limit Location%x13|Limit Rotation%x14|Limit Scale%x15|Limit Distance%x21|%l|Track To%x3|Floor%x4|Locked Track%x5|Stretch To%x7|%l|Action%x16|Script%x18"); else @@ -387,6 +389,8 @@ void add_constraint (Scene *scene, View3D *v3d, short only_IK) else { if ((obsel) && (obsel->type==OB_CURVE)) nr= pupmenu("Add Constraint to Active Object%t|Child Of%x19|Transformation%x20|%l|Copy Location%x1|Copy Rotation%x2|Copy Scale%x8|%l|Limit Location%x13|Limit Rotation%x14|Limit Scale%x15|Limit Distance%x21|%l|Track To%x3|Floor%x4|Locked Track%x5|Follow Path%x6|Clamp To%x17|%l|Action%x16|Script%x18"); + else if ((obsel) && (obsel->type==OB_MESH)) + nr= pupmenu("Add Constraint to Active Object%t|Child Of%x19|Transformation%x20|%l|Copy Location%x1|Copy Rotation%x2|Copy Scale%x8|%l|Limit Location%x13|Limit Rotation%x14|Limit Scale%x15|Limit Distance%x21|%l|Track To%x3|Floor%x4|Locked Track%x5|Shrinkwrap%x22|%l|Action%x16|Script%x18"); else if (obsel) nr= pupmenu("Add Constraint to Active Object%t|Child Of%x19|Transformation%x20|%l|Copy Location%x1|Copy Rotation%x2|Copy Scale%x8|%l|Limit Location%x13|Limit Rotation%x14|Limit Scale%x15|Limit Distance%x21|%l|Track To%x3|Floor%x4|Locked Track%x5|%l|Action%x16|Script%x18"); else @@ -489,6 +493,7 @@ void add_constraint (Scene *scene, View3D *v3d, short only_IK) } else if (nr==20) con = add_new_constraint(CONSTRAINT_TYPE_TRANSFORM); else if (nr==21) con = add_new_constraint(CONSTRAINT_TYPE_DISTLIMIT); + else if (nr==22) con = add_new_constraint(CONSTRAINT_TYPE_SHRINKWRAP); if (con==NULL) return; /* paranoia */ diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 48bc3750f61..99314cf55b2 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -121,8 +121,6 @@ #include "ED_util.h" #include "ED_view3d.h" -#include "BMF_Api.h" - #include "BIF_transform.h" #include "UI_interface.h" @@ -365,31 +363,31 @@ static int object_add_mesh_exec(bContext *C, wmOperator *op) switch(RNA_enum_get(op->ptr, "type")) { case 0: - WM_operator_name_call(C, "MESH_OT_add_primitive_plane", WM_OP_INVOKE_REGION_WIN, NULL); + WM_operator_name_call(C, "MESH_OT_primitive_plane_add", WM_OP_INVOKE_REGION_WIN, NULL); break; case 1: - WM_operator_name_call(C, "MESH_OT_add_primitive_cube", WM_OP_INVOKE_REGION_WIN, NULL); + WM_operator_name_call(C, "MESH_OT_primitive_cube_add", WM_OP_INVOKE_REGION_WIN, NULL); break; case 2: - WM_operator_name_call(C, "MESH_OT_add_primitive_circle", WM_OP_INVOKE_REGION_WIN, NULL); + WM_operator_name_call(C, "MESH_OT_primitive_circle_add", WM_OP_INVOKE_REGION_WIN, NULL); break; case 3: - WM_operator_name_call(C, "MESH_OT_add_primitive_uv_sphere", WM_OP_INVOKE_REGION_WIN, NULL); + WM_operator_name_call(C, "MESH_OT_primitive_uv_sphere_add", WM_OP_INVOKE_REGION_WIN, NULL); break; case 4: - WM_operator_name_call(C, "MESH_OT_add_primitive_ico_sphere", WM_OP_INVOKE_REGION_WIN, NULL); + WM_operator_name_call(C, "MESH_OT_primitive_ico_sphere_add", WM_OP_INVOKE_REGION_WIN, NULL); break; case 5: - WM_operator_name_call(C, "MESH_OT_add_primitive_cylinder", WM_OP_INVOKE_REGION_WIN, NULL); + WM_operator_name_call(C, "MESH_OT_primitive_cylinder_add", WM_OP_INVOKE_REGION_WIN, NULL); break; case 6: - WM_operator_name_call(C, "MESH_OT_add_primitive_cone", WM_OP_INVOKE_REGION_WIN, NULL); + WM_operator_name_call(C, "MESH_OT_primitive_cone_add", WM_OP_INVOKE_REGION_WIN, NULL); break; case 7: - WM_operator_name_call(C, "MESH_OT_add_primitive_grid", WM_OP_INVOKE_REGION_WIN, NULL); + WM_operator_name_call(C, "MESH_OT_primitive_grid_add", WM_OP_INVOKE_REGION_WIN, NULL); break; case 8: - WM_operator_name_call(C, "MESH_OT_add_primitive_monkey", WM_OP_INVOKE_REGION_WIN, NULL); + WM_operator_name_call(C, "MESH_OT_primitive_monkey_add", WM_OP_INVOKE_REGION_WIN, NULL); break; } /* userdef */ @@ -406,7 +404,7 @@ static int object_add_mesh_exec(bContext *C, wmOperator *op) void OBJECT_OT_mesh_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Mesh"; + ot->name= "Mesh"; ot->description = "Add a mesh object to the scene."; ot->idname= "OBJECT_OT_mesh_add"; @@ -463,14 +461,16 @@ static int object_add_curve_exec(bContext *C, wmOperator *op) static int object_add_curve_invoke(bContext *C, wmOperator *op, wmEvent *event) { Object *obedit= CTX_data_edit_object(C); - uiMenuItem *head; + uiPopupMenu *pup; + uiLayout *layout; - head= uiPupMenuBegin(op->type->name, 0); + pup= uiPupMenuBegin(C, op->type->name, 0); + layout= uiPupMenuLayout(pup); if(!obedit || obedit->type == OB_CURVE) - uiMenuItemsEnumO(head, op->type->idname, "type"); + uiItemsEnumO(layout, op->type->idname, "type"); else - uiMenuItemsEnumO(head, "OBJECT_OT_surface_add", "type"); - uiPupMenuEnd(C, head); + uiItemsEnumO(layout, "OBJECT_OT_surface_add", "type"); + uiPupMenuEnd(C, pup); return OPERATOR_CANCELLED; } @@ -478,7 +478,7 @@ static int object_add_curve_invoke(bContext *C, wmOperator *op, wmEvent *event) void OBJECT_OT_curve_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Curve"; + ot->name= "Curve"; ot->description = "Add a curve object to the scene."; ot->idname= "OBJECT_OT_curve_add"; @@ -536,7 +536,7 @@ static int object_add_surface_exec(bContext *C, wmOperator *op) void OBJECT_OT_surface_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Surface"; + ot->name= "Surface"; ot->description = "Add a surface object to the scene."; ot->idname= "OBJECT_OT_surface_add"; @@ -573,7 +573,7 @@ static int object_add_text_exec(bContext *C, wmOperator *op) void OBJECT_OT_text_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Text"; + ot->name= "Text"; ot->description = "Add a text object to the scene"; ot->idname= "OBJECT_OT_text_add"; @@ -618,7 +618,7 @@ static int object_armature_add_exec(bContext *C, wmOperator *op) void OBJECT_OT_armature_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Armature"; + ot->name= "Armature"; ot->description = "Add an armature object to the scene."; ot->idname= "OBJECT_OT_armature_add"; @@ -633,20 +633,21 @@ void OBJECT_OT_armature_add(wmOperatorType *ot) static int object_primitive_add_invoke(bContext *C, wmOperator *op, wmEvent *event) { - uiMenuItem *head= uiPupMenuBegin("Add Object", 0); + uiPopupMenu *pup= uiPupMenuBegin(C, "Add Object", 0); + uiLayout *layout= uiPupMenuLayout(pup); - uiMenuLevelEnumO(head, "OBJECT_OT_mesh_add", "type"); - uiMenuLevelEnumO(head, "OBJECT_OT_curve_add", "type"); - uiMenuLevelEnumO(head, "OBJECT_OT_surface_add", "type"); - uiMenuItemO(head, 0, "OBJECT_OT_text_add"); - uiMenuItemEnumO(head, "", 0, "OBJECT_OT_object_add", "type", OB_MBALL); - uiMenuItemEnumO(head, "", 0, "OBJECT_OT_object_add", "type", OB_CAMERA); - uiMenuItemEnumO(head, "", 0, "OBJECT_OT_object_add", "type", OB_LAMP); - uiMenuItemEnumO(head, "", 0, "OBJECT_OT_object_add", "type", OB_EMPTY); - uiMenuItemO(head, 0, "OBJECT_OT_armature_add"); - uiMenuItemEnumO(head, "", 0, "OBJECT_OT_object_add", "type", OB_LATTICE); + uiItemMenuEnumO(layout, NULL, ICON_OUTLINER_OB_MESH, "OBJECT_OT_mesh_add", "type"); + uiItemMenuEnumO(layout, NULL, ICON_OUTLINER_OB_CURVE, "OBJECT_OT_curve_add", "type"); + uiItemMenuEnumO(layout, NULL, ICON_OUTLINER_OB_SURFACE, "OBJECT_OT_surface_add", "type"); + uiItemO(layout, NULL, ICON_OUTLINER_OB_FONT, "OBJECT_OT_text_add"); + uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_META, "OBJECT_OT_object_add", "type", OB_MBALL); + uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_CAMERA, "OBJECT_OT_object_add", "type", OB_CAMERA); + uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_LAMP, "OBJECT_OT_object_add", "type", OB_LAMP); + uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_EMPTY, "OBJECT_OT_object_add", "type", OB_EMPTY); + uiItemO(layout, NULL, ICON_OUTLINER_OB_ARMATURE, "OBJECT_OT_armature_add"); + uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_LATTICE, "OBJECT_OT_object_add", "type", OB_LATTICE); - uiPupMenuEnd(C, head); + uiPupMenuEnd(C, pup); /* this operator is only for a menu, not used further */ return OPERATOR_CANCELLED; @@ -921,7 +922,7 @@ static int return_editmesh_vgroup(Object *obedit, EditMesh *em, char *name, floa static void select_editmesh_hook(Object *ob, HookModifierData *hmd) { Mesh *me= ob->data; - EditMesh *em= EM_GetEditMesh(me); + EditMesh *em= BKE_mesh_get_editmesh(me); EditVert *eve; int index=0, nr=0; @@ -933,7 +934,7 @@ static void select_editmesh_hook(Object *ob, HookModifierData *hmd) } EM_select_flush(em); - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); } static int return_editlattice_indexar(Lattice *editlatt, int *tot, int **indexar, float *cent) @@ -1106,15 +1107,16 @@ int hook_getIndexArray(Object *obedit, int *tot, int **indexar, char *name, floa case OB_MESH: { Mesh *me= obedit->data; - EditMesh *em = EM_GetEditMesh(me); + EditMesh *em = BKE_mesh_get_editmesh(me); /* check selected vertices first */ if( return_editmesh_indexar(em, tot, indexar, cent_r)) { - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); return 1; } else { int ret = return_editmesh_vgroup(obedit, em, name, cent_r); - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); + return ret; } } case OB_CURVE: @@ -1483,16 +1485,29 @@ void OBJECT_OT_track_clear(wmOperatorType *ot) RNA_def_enum(ot->srna, "type", prop_clear_track_types, 0, "Type", ""); } +/* *****************Selection Operators******************* */ +static EnumPropertyItem prop_select_types[] = { + {0, "EXCLUSIVE", "Exclusive", ""}, + {1, "EXTEND", "Extend", ""}, + {0, NULL, NULL, NULL} +}; -/* ***************************** */ /* ****** Select by Type ****** */ static int object_select_by_type_exec(bContext *C, wmOperator *op) { - short obtype; + short obtype, seltype; obtype = RNA_enum_get(op->ptr, "type"); + seltype = RNA_enum_get(op->ptr, "seltype"); + if (seltype == 0) { + CTX_DATA_BEGIN(C, Base*, base, visible_bases) { + ED_base_object_select(base, BA_DESELECT); + } + CTX_DATA_END; + } + CTX_DATA_BEGIN(C, Base*, base, visible_bases) { if(base->object->type==obtype) { ED_base_object_select(base, BA_SELECT); @@ -1520,7 +1535,8 @@ void OBJECT_OT_select_by_type(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_enum(ot->srna, "type", prop_object_types, 0, "Type", ""); + RNA_def_enum(ot->srna, "seltype", prop_select_types, 0, "Selection", "Extend selection or clear selection then select"); + RNA_def_enum(ot->srna, "type", prop_object_types, 1, "Type", ""); } /* ****** selection by links *******/ @@ -1544,7 +1560,7 @@ static int object_select_linked_exec(bContext *C, wmOperator *op) Tex *tex=0; int a, b; int nr = RNA_enum_get(op->ptr, "type"); - short changed = 0; + short changed = 0, seltype; /* events (nr): * Object Ipo: 1 * ObData: 2 @@ -1553,7 +1569,15 @@ static int object_select_linked_exec(bContext *C, wmOperator *op) * DupliGroup: 5 * PSys: 6 */ + + seltype = RNA_enum_get(op->ptr, "seltype"); + if (seltype == 0) { + CTX_DATA_BEGIN(C, Base*, base, visible_bases) { + ED_base_object_select(base, BA_DESELECT); + } + CTX_DATA_END; + } ob= OBACT; if(ob==0){ @@ -1588,65 +1612,63 @@ static int object_select_linked_exec(bContext *C, wmOperator *op) else return OPERATOR_CANCELLED; CTX_DATA_BEGIN(C, Base*, base, visible_bases) { - if (!(base->flag & SELECT)) { - if(nr==1) { - // XXX old animation system - //if(base->object->ipo==ipo) base->flag |= SELECT; - //changed = 1; - } - else if(nr==2) { - if(base->object->data==obdata) base->flag |= SELECT; - changed = 1; - } - else if(nr==3 || nr==4) { - ob= base->object; - - for(a=1; a<=ob->totcol; a++) { - mat1= give_current_material(ob, a); - if(nr==3) { - if(mat1==mat) base->flag |= SELECT; - changed = 1; - } - else if(mat1 && nr==4) { - for(b=0; b<MAX_MTEX; b++) { - if(mat1->mtex[b]) { - if(tex==mat1->mtex[b]->tex) { - base->flag |= SELECT; - changed = 1; - break; - } + if(nr==1) { + // XXX old animation system + //if(base->object->ipo==ipo) base->flag |= SELECT; + //changed = 1; + } + else if(nr==2) { + if(base->object->data==obdata) base->flag |= SELECT; + changed = 1; + } + else if(nr==3 || nr==4) { + ob= base->object; + + for(a=1; a<=ob->totcol; a++) { + mat1= give_current_material(ob, a); + if(nr==3) { + if(mat1==mat) base->flag |= SELECT; + changed = 1; + } + else if(mat1 && nr==4) { + for(b=0; b<MAX_MTEX; b++) { + if(mat1->mtex[b]) { + if(tex==mat1->mtex[b]->tex) { + base->flag |= SELECT; + changed = 1; + break; } } } } } - else if(nr==5) { - if(base->object->dup_group==ob->dup_group) { - base->flag |= SELECT; - changed = 1; - } + } + else if(nr==5) { + if(base->object->dup_group==ob->dup_group) { + base->flag |= SELECT; + changed = 1; } - else if(nr==6) { - /* loop through other, then actives particles*/ - ParticleSystem *psys; - ParticleSystem *psys_act; - - for(psys=base->object->particlesystem.first; psys; psys=psys->next) { - for(psys_act=ob->particlesystem.first; psys_act; psys_act=psys_act->next) { - if (psys->part == psys_act->part) { - base->flag |= SELECT; - changed = 1; - break; - } - } - - if (base->flag & SELECT) { + } + else if(nr==6) { + /* loop through other, then actives particles*/ + ParticleSystem *psys; + ParticleSystem *psys_act; + + for(psys=base->object->particlesystem.first; psys; psys=psys->next) { + for(psys_act=ob->particlesystem.first; psys_act; psys_act=psys_act->next) { + if (psys->part == psys_act->part) { + base->flag |= SELECT; + changed = 1; break; } } + + if (base->flag & SELECT) { + break; + } } - base->object->flag= base->flag; } + base->object->flag= base->flag; } CTX_DATA_END; @@ -1674,6 +1696,7 @@ void OBJECT_OT_select_linked(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; RNA_def_enum(ot->srna, "type", prop_select_linked_types, 0, "Type", ""); + RNA_def_enum(ot->srna, "seltype", prop_select_types, 1, "Selection", "Extend selection or clear selection then select"); } /* ****** selection by layer *******/ @@ -1681,8 +1704,17 @@ void OBJECT_OT_select_linked(wmOperatorType *ot) static int object_select_by_layer_exec(bContext *C, wmOperator *op) { unsigned int layernum; + short seltype; + seltype = RNA_enum_get(op->ptr, "seltype"); layernum = RNA_int_get(op->ptr, "layer"); + + if (seltype == 0) { + CTX_DATA_BEGIN(C, Base*, base, visible_bases) { + ED_base_object_select(base, BA_DESELECT); + } + CTX_DATA_END; + } CTX_DATA_BEGIN(C, Base*, base, visible_bases) { if(base->lay == (1<< (layernum -1))) @@ -1712,6 +1744,7 @@ void OBJECT_OT_select_by_layer(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; RNA_def_int(ot->srna, "layer", 1, 1, 20, "Layer", "", 1, 20); + RNA_def_enum(ot->srna, "seltype", prop_select_types, 1, "Selection", "Extend selection or clear selection then select"); } /* ****** invert selection *******/ @@ -1798,11 +1831,20 @@ void OBJECT_OT_select_all_toggle(wmOperatorType *ot) static int object_select_random_exec(bContext *C, wmOperator *op) { float percent; + short seltype; + + seltype = RNA_enum_get(op->ptr, "seltype"); + if (seltype == 0) { + CTX_DATA_BEGIN(C, Base*, base, visible_bases) { + ED_base_object_select(base, BA_DESELECT); + } + CTX_DATA_END; + } percent = RNA_float_get(op->ptr, "percent"); CTX_DATA_BEGIN(C, Base*, base, visible_bases) { - if ((!base->flag & SELECT && BLI_frand() < percent)) { + if (BLI_frand() < percent) { ED_base_object_select(base, BA_SELECT); } } @@ -1829,6 +1871,7 @@ void OBJECT_OT_select_random(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; RNA_def_float_percentage(ot->srna, "percent", 0.5f, 0.0f, 1.0f, "Percent", "percentage of objects to randomly select", 0.0001f, 1.0f); + RNA_def_enum(ot->srna, "seltype", prop_select_types, 1, "Selection", "Extend selection or clear selection then select"); } /* ******** Clear object Translation *********** */ @@ -2212,7 +2255,7 @@ void make_vertex_parent(Scene *scene, Object *obedit, View3D *v3d) if(obedit->type==OB_MESH) { Mesh *me= obedit->data; - EditMesh *em = EM_GetEditMesh(me); + EditMesh *em = BKE_mesh_get_editmesh(me); eve= em->verts.first; while(eve) { @@ -2227,7 +2270,7 @@ void make_vertex_parent(Scene *scene, Object *obedit, View3D *v3d) eve= eve->next; } - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); } else if(ELEM(obedit->type, OB_SURF, OB_CURVE)) { ListBase *editnurb= curve_get_editcurve(obedit); @@ -2581,26 +2624,27 @@ static int parent_set_exec(bContext *C, wmOperator *op) static int parent_set_invoke(bContext *C, wmOperator *op, wmEvent *event) { Object *ob= CTX_data_active_object(C); - uiMenuItem *head= uiPupMenuBegin("Set Parent To", 0); + uiPopupMenu *pup= uiPupMenuBegin(C, "Set Parent To", 0); + uiLayout *layout= uiPupMenuLayout(pup); - uiMenuContext(head, WM_OP_EXEC_DEFAULT); - uiMenuItemEnumO(head, "", 0, "OBJECT_OT_parent_set", "type", PAR_OBJECT); + uiLayoutContext(layout, WM_OP_EXEC_DEFAULT); + uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_OBJECT); /* ob becomes parent, make the associated menus */ if(ob->type==OB_ARMATURE) { - uiMenuItemEnumO(head, "", 0, "OBJECT_OT_parent_set", "type", PAR_ARMATURE); - uiMenuItemEnumO(head, "", 0, "OBJECT_OT_parent_set", "type", PAR_BONE); + uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_ARMATURE); + uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_BONE); } else if(ob->type==OB_CURVE) { - uiMenuItemEnumO(head, "", 0, "OBJECT_OT_parent_set", "type", PAR_CURVE); - uiMenuItemEnumO(head, "", 0, "OBJECT_OT_parent_set", "type", PAR_FOLLOW); - uiMenuItemEnumO(head, "", 0, "OBJECT_OT_parent_set", "type", PAR_PATH_CONST); + uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_CURVE); + uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_FOLLOW); + uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_PATH_CONST); } else if(ob->type == OB_LATTICE) { - uiMenuItemEnumO(head, "", 0, "OBJECT_OT_parent_set", "type", PAR_LATTICE); + uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_LATTICE); } - uiPupMenuEnd(C, head); + uiPupMenuEnd(C, pup); return OPERATOR_CANCELLED; } @@ -2847,7 +2891,7 @@ static int object_center_set_exec(bContext *C, wmOperator *op) if(obedit->type==OB_MESH) { Mesh *me= obedit->data; - EditMesh *em = EM_GetEditMesh(me); + EditMesh *em = BKE_mesh_get_editmesh(me); for(eve= em->verts.first; eve; eve= eve->next) { if(v3d->around==V3D_CENTROID) { @@ -2875,7 +2919,7 @@ static int object_center_set_exec(bContext *C, wmOperator *op) recalc_editnormals(em); tot_change++; DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); } } @@ -3035,7 +3079,7 @@ static int object_center_set_exec(bContext *C, wmOperator *op) nu= nu1; while(nu) { - if( (nu->type & 7)==1) { + if( (nu->type & 7)==CU_BEZIER) { a= nu->pntsu; while (a--) { VecSubf(nu->bezt[a].vec[0], nu->bezt[a].vec[0], cent); @@ -3159,7 +3203,6 @@ void ED_object_exit_editmode(bContext *C, int flag) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - Object *ob; int freedata = flag & EM_FREEDATA; if(obedit==NULL) return; @@ -3208,22 +3251,20 @@ void ED_object_exit_editmode(bContext *C, int flag) // if(freedata) BLI_freelistN(&editelems); } - ob= obedit; - - /* for example; displist make is different in editmode */ - if(freedata) obedit= NULL; - scene->obedit= obedit; // XXX for context - - /* also flush ob recalc, doesn't take much overhead, but used for particles */ - DAG_object_flush_update(scene, ob, OB_RECALC_OB|OB_RECALC_DATA); + /* freedata only 0 now on file saves */ + if(freedata) { + /* for example; displist make is different in editmode */ + scene->obedit= NULL; // XXX for context + + /* also flush ob recalc, doesn't take much overhead, but used for particles */ + DAG_object_flush_update(scene, obedit, OB_RECALC_OB|OB_RECALC_DATA); - if(obedit==NULL) // XXX && (flag & EM_FREEUNDO)) ED_undo_push(C, "Editmode"); - if(flag & EM_WAITCURSOR) waitcursor(0); + if(flag & EM_WAITCURSOR) waitcursor(0); - WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, scene); - + WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, scene); + } } @@ -4298,14 +4339,12 @@ static void copymenu_properties(Scene *scene, View3D *v3d, Object *ob) prop= prop->next; } - if(tot==0) { - error("No properties in the active object to copy"); - return; - } - str= MEM_callocN(50 + 33*tot, "copymenu prop"); - strcpy(str, "Copy Property %t|Replace All|Merge All|%l"); + if (tot) + strcpy(str, "Copy Property %t|Replace All|Merge All|%l"); + else + strcpy(str, "Copy Property %t|Clear All (no properties on active)"); tot= 0; prop= ob->prop.first; @@ -4608,7 +4647,8 @@ void copy_attr(Scene *scene, View3D *v3d, short event) base->object->formfactor = ob->formfactor; base->object->damping= ob->damping; base->object->rdamping= ob->rdamping; - base->object->mass= ob->mass; + base->object->min_vel= ob->min_vel; + base->object->max_vel= ob->max_vel; if (ob->gameflag & OB_BOUNDS) { base->object->boundtype = ob->boundtype; } @@ -5152,7 +5192,7 @@ static void apply_objects_internal(Scene *scene, View3D *v3d, int apply_scale, i nu= cu->nurb.first; while(nu) { - if( (nu->type & 7)==1) { + if( (nu->type & 7)==CU_BEZIER) { a= nu->pntsu; bezt= nu->bezt; while(a--) { diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h index 1c56b0c7115..7203f56b40f 100644 --- a/source/blender/editors/object/object_intern.h +++ b/source/blender/editors/object/object_intern.h @@ -84,5 +84,8 @@ void GROUP_OT_objects_remove(struct wmOperatorType *ot); void GROUP_OT_objects_add_active(struct wmOperatorType *ot); void GROUP_OT_objects_remove_active(struct wmOperatorType *ot); +/* object_modifier.c */ +void OBJECT_OT_modifier_add(struct wmOperatorType *ot); + #endif /* ED_OBJECT_INTERN_H */ diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c new file mode 100644 index 00000000000..b430cdd67bc --- /dev/null +++ b/source/blender/editors/object/object_modifier.c @@ -0,0 +1,98 @@ +/** + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * Contributor(s): Blender Foundation, 2009 + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include <stdio.h> +#include <stdlib.h> + +#include "DNA_modifier_types.h" +#include "DNA_object_types.h" +#include "DNA_scene_types.h" + +#include "BLI_listbase.h" + +#include "BKE_context.h" +#include "BKE_depsgraph.h" +#include "BKE_modifier.h" + +#include "RNA_access.h" +#include "RNA_define.h" +#include "RNA_enum_types.h" + +#include "ED_screen.h" + +#include "WM_api.h" +#include "WM_types.h" + +#include "object_intern.h" + +/********************* add modifier operator ********************/ + +static int modifier_add_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + Object *ob = CTX_data_active_object(C); + ModifierData *md; + int type= RNA_enum_get(op->ptr, "type"); + ModifierTypeInfo *mti = modifierType_getInfo(type); + + if(mti->flags&eModifierTypeFlag_RequiresOriginalData) { + md = ob->modifiers.first; + + while(md && modifierType_getInfo(md->type)->type==eModifierTypeType_OnlyDeform) + md = md->next; + + BLI_insertlinkbefore(&ob->modifiers, md, modifier_new(type)); + } + else + BLI_addtail(&ob->modifiers, modifier_new(type)); + + DAG_object_flush_update(scene, ob, OB_RECALC_DATA); + WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); + + return OPERATOR_FINISHED; +} + +void OBJECT_OT_modifier_add(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Add Modifier"; + ot->description = "Add a modifier to the active object."; + ot->idname= "OBJECT_OT_modifier_add"; + + /* api callbacks */ + ot->invoke= WM_menu_invoke; + ot->exec= modifier_add_exec; + + ot->poll= ED_operator_object_active; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* XXX only some types should be here */ + RNA_def_enum(ot->srna, "type", modifier_type_items, 0, "Type", ""); +} + diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index 8cbf9bf5287..e668c494fba 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -98,6 +98,8 @@ void ED_operatortypes_object(void) WM_operatortype_append(OBJECT_OT_armature_add); WM_operatortype_append(OBJECT_OT_object_add); WM_operatortype_append(OBJECT_OT_primitive_add); + + WM_operatortype_append(OBJECT_OT_modifier_add); } void ED_keymap_object(wmWindowManager *wm) @@ -136,7 +138,7 @@ void ED_keymap_object(wmWindowManager *wm) WM_keymap_verify_item(keymap, "OBJECT_OT_duplicate_add", DKEY, KM_PRESS, KM_SHIFT, 0); // XXX this should probably be in screen instead... here for testing purposes in the meantime... - Aligorith - WM_keymap_verify_item(keymap, "ANIM_OT_insert_keyframe_old", IKEY, KM_PRESS, 0, 0); + WM_keymap_verify_item(keymap, "ANIM_OT_insert_keyframe_menu", IKEY, KM_PRESS, 0, 0); WM_keymap_verify_item(keymap, "ANIM_OT_delete_keyframe_old", IKEY, KM_PRESS, KM_ALT, 0); WM_keymap_verify_item(keymap, "GROUP_OT_group_create", GKEY, KM_PRESS, KM_CTRL, 0); diff --git a/source/blender/editors/physics/Makefile b/source/blender/editors/physics/Makefile index bd2dbc65f91..a71ea9e2083 100644 --- a/source/blender/editors/physics/Makefile +++ b/source/blender/editors/physics/Makefile @@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS) CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(OPENGL_HEADERS) -CPPFLAGS += -I$(NAN_BMFONT)/include CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include CPPFLAGS += -I$(NAN_ELBEEM)/include diff --git a/source/blender/editors/physics/SConscript b/source/blender/editors/physics/SConscript index 241962442d4..5718ae0c217 100644 --- a/source/blender/editors/physics/SConscript +++ b/source/blender/editors/physics/SConscript @@ -5,7 +5,7 @@ sources = env.Glob('*.c') incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' -incs += ' #/intern/guardedalloc #intern/bmfont ../../gpu' +incs += ' #/intern/guardedalloc ../../gpu' incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern' env.BlenderLib ( 'bf_editors_physics', sources, Split(incs), [], libtype=['core'], priority=[45] ) diff --git a/source/blender/editors/physics/editparticle.c b/source/blender/editors/physics/editparticle.c index 33d1bd66676..1c2b3c6b309 100644 --- a/source/blender/editors/physics/editparticle.c +++ b/source/blender/editors/physics/editparticle.c @@ -1,5 +1,5 @@ /* - * $Id: editparticle.c $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -1821,7 +1821,7 @@ void PARTICLE_OT_rekey(wmOperatorType *ot) /* api callbacks */ ot->exec= rekey_exec; - // XXX show buttons ot->invoke= rekey_invoke; + ot->invoke= WM_operator_redo; ot->poll= PE_poll; /* flags */ @@ -3839,19 +3839,21 @@ void PE_change_act_psys(Scene *scene, Object *ob, ParticleSystem *psys) static int specials_menu_invoke(bContext *C, wmOperator *op, wmEvent *event) { Scene *scene= CTX_data_scene(C); - uiMenuItem *head; + uiPopupMenu *pup; + uiLayout *layout; - head= uiPupMenuBegin("Specials", 0); + pup= uiPupMenuBegin(C, "Specials", 0); + layout= uiPupMenuLayout(pup); - uiMenuItemO(head, 0, "PARTICLE_OT_rekey"); + uiItemO(layout, NULL, 0, "PARTICLE_OT_rekey"); if(scene->selectmode & SCE_SELECT_POINT) { - uiMenuItemO(head, 0, "PARTICLE_OT_subdivide"); - uiMenuItemO(head, 0, "PARTICLE_OT_select_first"); - uiMenuItemO(head, 0, "PARTICLE_OT_select_last"); + uiItemO(layout, NULL, 0, "PARTICLE_OT_subdivide"); + uiItemO(layout, NULL, 0, "PARTICLE_OT_select_first"); + uiItemO(layout, NULL, 0, "PARTICLE_OT_select_last"); } - uiMenuItemO(head, 0, "PARTICLE_OT_remove_doubles"); + uiItemO(layout, NULL, 0, "PARTICLE_OT_remove_doubles"); - uiPupMenuEnd(C, head); + uiPupMenuEnd(C, pup); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/physics/physics_intern.h b/source/blender/editors/physics/physics_intern.h index 9ca4f864e48..e03649575cb 100644 --- a/source/blender/editors/physics/physics_intern.h +++ b/source/blender/editors/physics/physics_intern.h @@ -1,7 +1,5 @@ -/* BIF_editparticle.h - * - * - * $Id: BIF_editparticle.h $ +/* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/editors/preview/Makefile b/source/blender/editors/preview/Makefile index 84514d73570..c44da6753f3 100644 --- a/source/blender/editors/preview/Makefile +++ b/source/blender/editors/preview/Makefile @@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS) CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(OPENGL_HEADERS) -CPPFLAGS += -I$(NAN_BMFONT)/include CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include CPPFLAGS += -I$(NAN_ELBEEM)/include diff --git a/source/blender/editors/preview/SConscript b/source/blender/editors/preview/SConscript index dcc80e8c626..922232822ff 100644 --- a/source/blender/editors/preview/SConscript +++ b/source/blender/editors/preview/SConscript @@ -5,7 +5,7 @@ sources = env.Glob('*.c') incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' -incs += ' #/intern/guardedalloc #intern/bmfont ../../gpu' +incs += ' #/intern/guardedalloc ../../gpu' incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern' incs += ' ../../blenloader' diff --git a/source/blender/editors/preview/previewrender.c b/source/blender/editors/preview/previewrender.c index 407674163a6..1d5d809a9ee 100644 --- a/source/blender/editors/preview/previewrender.c +++ b/source/blender/editors/preview/previewrender.c @@ -349,7 +349,7 @@ static Scene *preview_prepare_scene(Scene *scene, int id_type, ShaderPreview *sp if(sp->pr_method==PR_ICON_RENDER) { - if (mat->mode & MA_HALO) { + if (mat->material_type == MA_TYPE_HALO) { sce->lay= 1<<MA_FLAT; } else { diff --git a/source/blender/editors/screen/CMakeLists.txt b/source/blender/editors/screen/CMakeLists.txt index 42480f65268..4ed1e59a87f 100644 --- a/source/blender/editors/screen/CMakeLists.txt +++ b/source/blender/editors/screen/CMakeLists.txt @@ -33,7 +33,7 @@ SET(INC ../../windowmanager ../../editors/include ../../../../intern/guardedalloc ../../../../intern/memutil ../../blenlib ../../makesdna ../../makesrna ../../blenkernel - ../../include ../../../../intern/bmfont ../../imbuf + ../../include ../../imbuf ../../render/extern/include ../../../../intern/bsp/extern ../../radiosity/extern/include ../../../intern/decimation/extern ../../blenloader @@ -45,9 +45,7 @@ SET(INC ../../windowmanager ) IF(WITH_INTERNATIONAL) - SET(INC ${INC} ../../ftfont) ADD_DEFINITIONS(-DINTERNATIONAL) - ADD_DEFINITIONS(-DFTGL_STATIC_LIBRARY) ENDIF(WITH_INTERNATIONAL) IF(WITH_OPENEXR) diff --git a/source/blender/editors/screen/Makefile b/source/blender/editors/screen/Makefile index d18d15d00d9..cf6e692c304 100644 --- a/source/blender/editors/screen/Makefile +++ b/source/blender/editors/screen/Makefile @@ -37,7 +37,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS) CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(OPENGL_HEADERS) -CPPFLAGS += -I$(NAN_BMFONT)/include # not very neat.... CPPFLAGS += -I../../windowmanager @@ -49,6 +48,7 @@ CPPFLAGS += -I../../makesrna CPPFLAGS += -I../../imbuf CPPFLAGS += -I../../python CPPFLAGS += -I../../render/extern/include +CPPFLAGS += -I../../blenfont CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include # own include diff --git a/source/blender/editors/screen/SConscript b/source/blender/editors/screen/SConscript index c291533790a..3972efd8eed 100644 --- a/source/blender/editors/screen/SConscript +++ b/source/blender/editors/screen/SConscript @@ -3,10 +3,10 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenlib ../../blenkernel ../../blenfont ../../makesdna ../../imbuf' incs += ' ../../blenloader ../../windowmanager ../../python ../../makesrna' incs += ' ../../render/extern/include' -incs += ' #/intern/guardedalloc #/extern/glew/include #intern/bmfont' +incs += ' #/intern/guardedalloc #/extern/glew/include' defs = '' diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 5c481652db1..cf72eaf2cdd 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -31,6 +31,9 @@ #include "MEM_guardedalloc.h" +#include "DNA_screen_types.h" +#include "DNA_userdef_types.h" + #include "BLI_blenlib.h" #include "BLI_arithb.h" #include "BLI_rand.h" @@ -50,13 +53,12 @@ #include "BIF_gl.h" #include "BIF_glutil.h" +#include "BLF_api.h" #include "UI_interface.h" #include "UI_resources.h" #include "UI_view2d.h" -#include "BMF_Api.h" - #ifndef DISABLE_PYTHON #include "BPY_extern.h" #endif @@ -65,12 +67,15 @@ /* general area and region code */ -static void region_draw_emboss(ARegion *ar) +static void region_draw_emboss(ARegion *ar, rcti *scirct) { - short winx, winy; + rcti rect; - winx= ar->winrct.xmax-ar->winrct.xmin; - winy= ar->winrct.ymax-ar->winrct.ymin; + /* translate scissor rect to region space */ + rect.xmin= scirct->xmin - ar->winrct.xmin; + rect.ymin= scirct->ymin - ar->winrct.ymin; + rect.xmax= scirct->xmax - ar->winrct.xmin; + rect.ymax= scirct->ymax - ar->winrct.ymin; /* set transp line */ glEnable( GL_BLEND ); @@ -78,19 +83,19 @@ static void region_draw_emboss(ARegion *ar) /* right */ glColor4ub(0,0,0, 50); - sdrawline(winx, 0, winx, winy); + sdrawline(rect.xmax, rect.ymin, rect.xmax, rect.ymax); /* bottom */ glColor4ub(0,0,0, 80); - sdrawline(0, 0, winx, 0); + sdrawline(rect.xmin, rect.ymin, rect.xmax, rect.ymin); /* top */ glColor4ub(255,255,255, 60); - sdrawline(0, winy, winx, winy); + sdrawline(rect.xmin, rect.ymax, rect.xmax, rect.ymax); /* left */ glColor4ub(255,255,255, 50); - sdrawline(0, 0, 0, winy); + sdrawline(rect.xmin, rect.ymin, rect.xmin, rect.ymax); glDisable( GL_BLEND ); } @@ -161,6 +166,27 @@ void ED_area_overdraw_flush(bContext *C, ScrArea *sa, ARegion *ar) } } +static void area_draw_azone(short x1, short y1, short x2, short y2) +{ + float xmin = x1; + float xmax = x2-2; + float ymin = y1-1; + float ymax = y2-3; + + float dx= 0.3f*(xmax-xmin); + float dy= 0.3f*(ymax-ymin); + + glColor4ub(255, 255, 255, 80); + fdrawline(xmin, ymax, xmax, ymin); + fdrawline(xmin, ymax-dy, xmax-dx, ymin); + fdrawline(xmin, ymax-2*dy, xmax-2*dx, ymin); + + glColor4ub(0, 0, 0, 150); + fdrawline(xmin, ymax+1, xmax+1, ymin); + fdrawline(xmin, ymax-dy+1, xmax-dx+1, ymin); + fdrawline(xmin, ymax-2*dy+1, xmax-2*dx+1, ymin); +} + /* only exported for WM */ void ED_area_overdraw(bContext *C) { @@ -179,8 +205,7 @@ void ED_area_overdraw(bContext *C) for(az= sa->actionzones.first; az; az= az->next) { if(az->do_draw) { if(az->type==AZONE_TRI) { - glColor4ub(0, 0, 0, 70); - sdrawtrifill(az->x1, az->y1, az->x2, az->y2); + area_draw_azone(az->x1, az->y1, az->x2, az->y2); } az->do_draw= 0; } @@ -190,49 +215,74 @@ void ED_area_overdraw(bContext *C) } +/* get scissor rect, checking overlapping regions */ +static void region_scissor_winrct(ARegion *ar, rcti *winrct) +{ + *winrct= ar->winrct; + + if(ELEM(ar->alignment, RGN_OVERLAP_LEFT, RGN_OVERLAP_RIGHT)) + return; + + while(ar->prev) { + ar= ar->prev; + + if(ar->flag & RGN_FLAG_HIDDEN); + else if(ar->alignment==RGN_OVERLAP_LEFT) { + winrct->xmin= ar->winrct.xmax + 1; + } + else if(ar->alignment==RGN_OVERLAP_RIGHT) { + winrct->xmax= ar->winrct.xmin - 1; + } + else break; + } +} + /* only exported for WM */ void ED_region_do_draw(bContext *C, ARegion *ar) { wmWindow *win= CTX_wm_window(C); ScrArea *sa= CTX_wm_area(C); ARegionType *at= ar->type; - + rcti winrct; + + /* checks other overlapping regions */ + region_scissor_winrct(ar, &winrct); + /* if no partial draw rect set, full rect */ if(ar->drawrct.xmin == ar->drawrct.xmax) - ar->drawrct= ar->winrct; - - /* extra clip for safety */ - ar->drawrct.xmin= MAX2(ar->winrct.xmin, ar->drawrct.xmin); - ar->drawrct.ymin= MAX2(ar->winrct.ymin, ar->drawrct.ymin); - ar->drawrct.xmax= MIN2(ar->winrct.xmax, ar->drawrct.xmax); - ar->drawrct.ymax= MIN2(ar->winrct.ymax, ar->drawrct.ymax); + ar->drawrct= winrct; + else { + /* extra clip for safety */ + ar->drawrct.xmin= MAX2(winrct.xmin, ar->drawrct.xmin); + ar->drawrct.ymin= MAX2(winrct.ymin, ar->drawrct.ymin); + ar->drawrct.xmax= MIN2(winrct.xmax, ar->drawrct.xmax); + ar->drawrct.ymax= MIN2(winrct.ymax, ar->drawrct.ymax); + } /* note; this sets state, so we can use wmOrtho and friends */ wmSubWindowScissorSet(win, ar->swinid, &ar->drawrct); + UI_SetTheme(sa?sa->spacetype:0, ar->type?ar->type->regionid:0); + /* optional header info instead? */ if(ar->headerstr) { float col[3]; - UI_SetTheme(sa); UI_GetThemeColor3fv(TH_HEADER, col); glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); - UI_ThemeColor(TH_MENU_TEXT); - glRasterPos2i(20, 6); - BMF_DrawString(G.font, ar->headerstr); + UI_ThemeColor(TH_TEXT); + BLF_draw_default(20, 6, 0.0f, ar->headerstr); } else if(at->draw) { - UI_SetTheme(sa); at->draw(C, ar); - UI_SetTheme(NULL); } - if(sa) - region_draw_emboss(ar); - uiFreeInactiveBlocks(C, &ar->uiblocks); + if(sa) + region_draw_emboss(ar, &winrct); + /* XXX test: add convention to end regions always in pixel space, for drawing of borders/gestures etc */ ED_region_pixelspace(ar); @@ -646,6 +696,8 @@ void ED_region_init(bContext *C, ARegion *ar) /* refresh can be called before window opened */ region_subwindow(CTX_wm_manager(C), CTX_wm_window(C), ar); + ar->winx= ar->winrct.xmax - ar->winrct.xmin + 1; + ar->winy= ar->winrct.ymax - ar->winrct.ymin + 1; } @@ -875,9 +927,6 @@ int ED_area_header_standardbuttons(const bContext *C, uiBlock *block, int yco) uiBut *but; int xco= 8; - if(ED_screen_area_active(C)) uiBlockSetCol(block, TH_HEADER); - else uiBlockSetCol(block, TH_HEADERDESEL); - but= uiDefIconTextButC(block, ICONTEXTROW, 0, ICON_VIEW3D, windowtype_pup(), xco, yco, XIC+10, YIC, &(sa->butspacetype), 1.0, SPACEICONMAX, 0, 0, @@ -904,6 +953,195 @@ int ED_area_header_standardbuttons(const bContext *C, uiBlock *block, int yco) } xco+=XIC; + uiBlockSetEmboss(block, UI_EMBOSS); + return xco; } +/************************ standard UI regions ************************/ + +void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *context) +{ + uiStyle *style= U.uistyles.first; + uiBlock *block; + PanelType *pt; + Panel *panel; + View2D *v2d= &ar->v2d; + float col[3]; + int xco, yco, x, y, miny=0, w, em, header, triangle, open; + + if(vertical) { + w= v2d->cur.xmax - v2d->cur.xmin; + em= (ar->type->minsizex)? 10: 20; + } + else { + w= UI_PANEL_WIDTH; + em= (ar->type->minsizex)? 10: 20; + } + + header= 20; // XXX + triangle= 22; + x= 0; + y= -style->panelouter; + + /* create panels */ + uiBeginPanels(C, ar); + + /* set view2d view matrix for scrolling (without scrollers) */ + UI_view2d_view_ortho(C, v2d); + + for(pt= ar->type->paneltypes.first; pt; pt= pt->next) { + /* verify context */ + if(context) + if(!pt->context || strcmp(context, pt->context) != 0) + continue; + + /* draw panel */ + if(pt->draw && (!pt->poll || pt->poll(C, pt))) { + block= uiBeginBlock(C, ar, pt->idname, UI_EMBOSS); + panel= uiBeginPanel(ar, block, pt, &open); + + if(vertical) + y -= header; + + if(pt->draw_header && (open || vertical)) { + /* for enabled buttons */ + panel->layout= uiBlockLayout(block, UI_LAYOUT_HORIZONTAL, UI_LAYOUT_HEADER, + triangle, header+style->panelspace, header, 1, style); + + pt->draw_header(C, panel); + + uiBlockLayoutResolve(C, block, &xco, &yco); + panel->labelofs= xco - triangle; + panel->layout= NULL; + } + + if(open) { + panel->type= pt; + panel->layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, + style->panelspace, 0, w-2*style->panelspace, em, style); + + pt->draw(C, panel); + + uiBlockLayoutResolve(C, block, &xco, &yco); + panel->layout= NULL; + + yco -= 2*style->panelspace; + uiEndPanel(block, w, -yco); + } + else + yco= 0; + + uiEndBlock(C, block); + + if(vertical) { + y += yco-style->panelouter; + } + else { + x += w; + miny= MIN2(y, yco-style->panelouter-header); + } + } + } + + if(vertical) + x += w; + else + y= miny; + + /* in case there are no panels */ + if(x == 0 || y == 0) { + x= UI_PANEL_WIDTH; + y= UI_PANEL_WIDTH; + } + + /* clear */ + UI_GetThemeColor3fv(TH_BACK, col); + glClearColor(col[0], col[1], col[2], 0.0); + glClear(GL_COLOR_BUFFER_BIT); + + /* before setting the view */ + if(vertical) { + v2d->keepofs |= V2D_LOCKOFS_X; + v2d->keepofs &= ~V2D_LOCKOFS_Y; + } + else { + v2d->keepofs &= ~V2D_LOCKOFS_X; + v2d->keepofs |= V2D_LOCKOFS_Y; + } + + UI_view2d_totRect_set(v2d, x, -y); + + /* set the view */ + UI_view2d_view_ortho(C, v2d); + + /* this does the actual drawing! */ + uiEndPanels(C, ar); + + /* restore view matrix */ + UI_view2d_view_restore(C); +} + +void ED_region_panels_init(wmWindowManager *wm, ARegion *ar) +{ + ListBase *keymap; + + UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_PANELS_UI, ar->winx, ar->winy); + + keymap= WM_keymap_listbase(wm, "View2D Buttons List", 0, 0); + WM_event_add_keymap_handler(&ar->handlers, keymap); +} + +void ED_region_header(const bContext *C, ARegion *ar) +{ + uiStyle *style= U.uistyles.first; + uiBlock *block; + uiLayout *layout; + HeaderType *ht; + Header header = {0}; + float col[3]; + int xco, yco; + + /* clear */ + if(ED_screen_area_active(C)) + UI_GetThemeColor3fv(TH_HEADER, col); + else + UI_GetThemeColor3fv(TH_HEADERDESEL, col); + + glClearColor(col[0], col[1], col[2], 0.0); + glClear(GL_COLOR_BUFFER_BIT); + + /* set view2d view matrix for scrolling (without scrollers) */ + UI_view2d_view_ortho(C, &ar->v2d); + + xco= 8; + yco= HEADERY-3; + + /* draw all headers types */ + for(ht= ar->type->headertypes.first; ht; ht= ht->next) { + block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS); + layout= uiBlockLayout(block, UI_LAYOUT_HORIZONTAL, UI_LAYOUT_HEADER, xco, yco, HEADERY-6, 1, style); + + if(ht->draw) { + header.type= ht; + header.layout= layout; + ht->draw(C, &header); + } + + uiBlockLayoutResolve(C, block, &xco, &yco); + uiEndBlock(C, block); + uiDrawBlock(C, block); + } + + /* always as last */ + UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin); + + /* restore view matrix? */ + UI_view2d_view_restore(C); +} + +void ED_region_header_init(ARegion *ar) +{ + UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy); +} + diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 74e0bc3852e..a81a52fd544 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -419,7 +419,7 @@ static int get_cached_work_texture(int *w_r, int *h_r) return texid; } -void glaDrawPixelsTex(float x, float y, int img_w, int img_h, int format, void *rect) +void glaDrawPixelsTexScaled(float x, float y, int img_w, int img_h, int format, void *rect, float scaleX, float scaleY) { unsigned char *uc_rect= (unsigned char*) rect; float *f_rect= (float *)rect; @@ -460,13 +460,13 @@ void glaDrawPixelsTex(float x, float y, int img_w, int img_h, int format, void * glVertex2f(rast_x, rast_y); glTexCoord2f((float) (subpart_w-1)/tex_w, 0); - glVertex2f(rast_x+subpart_w*xzoom, rast_y); + glVertex2f(rast_x+subpart_w*xzoom*scaleX, rast_y); glTexCoord2f((float) (subpart_w-1)/tex_w, (float) (subpart_h-1)/tex_h); - glVertex2f(rast_x+subpart_w*xzoom, rast_y+subpart_h*yzoom); + glVertex2f(rast_x+subpart_w*xzoom*scaleX, rast_y+subpart_h*yzoom*scaleY); glTexCoord2f(0, (float) (subpart_h-1)/tex_h); - glVertex2f(rast_x, rast_y+subpart_h*yzoom); + glVertex2f(rast_x, rast_y+subpart_h*yzoom*scaleY); glEnd(); glDisable(GL_TEXTURE_2D); } @@ -477,6 +477,11 @@ void glaDrawPixelsTex(float x, float y, int img_w, int img_h, int format, void * glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); } +void glaDrawPixelsTex(float x, float y, int img_w, int img_h, int format, void *rect) +{ + glaDrawPixelsTexScaled(x, y, img_w, img_h, format, rect, 1.0f, 1.0f); +} + void glaDrawPixelsSafe_to32(float fx, float fy, int img_w, int img_h, int row_w, float *rectf) { float *rf; @@ -586,8 +591,8 @@ void glaDrawPixelsSafe(float x, float y, int img_w, int img_h, int row_w, int fo void glaDefine2DArea(rcti *screen_rect) { - int sc_w= screen_rect->xmax - screen_rect->xmin; - int sc_h= screen_rect->ymax - screen_rect->ymin; + int sc_w= screen_rect->xmax - screen_rect->xmin + 1; + int sc_h= screen_rect->ymax - screen_rect->ymin + 1; glViewport(screen_rect->xmin, screen_rect->ymin, sc_w, sc_h); glScissor(screen_rect->xmin, screen_rect->ymin, sc_w, sc_h); diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 4df50d01fb1..e7b2b01ebfc 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -47,6 +47,7 @@ #include "BKE_idprop.h" #include "BKE_library.h" #include "BKE_main.h" +#include "BKE_mesh.h" #include "BKE_multires.h" #include "BKE_report.h" #include "BKE_screen.h" @@ -218,14 +219,14 @@ int ED_operator_uvedit(bContext *C) EditMesh *em= NULL; if(obedit && obedit->type==OB_MESH) - em= EM_GetEditMesh((Mesh *)obedit->data); + em= BKE_mesh_get_editmesh((Mesh *)obedit->data); if(em && (em->faces.first) && (CustomData_has_layer(&em->fdata, CD_MTFACE))) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return 1; } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return 0; } @@ -235,14 +236,14 @@ int ED_operator_uvmap(bContext *C) EditMesh *em= NULL; if(obedit && obedit->type==OB_MESH) - em= EM_GetEditMesh((Mesh *)obedit->data); + em= BKE_mesh_get_editmesh((Mesh *)obedit->data); if(em && (em->faces.first)) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return 1; } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return 0; } @@ -1573,19 +1574,21 @@ static int repeat_history_invoke(bContext *C, wmOperator *op, wmEvent *event) { wmWindowManager *wm= CTX_wm_manager(C); wmOperator *lastop; - uiMenuItem *head; + uiPopupMenu *pup; + uiLayout *layout; int items, i; items= BLI_countlist(&wm->operators); if(items==0) return OPERATOR_CANCELLED; - head= uiPupMenuBegin(op->type->name, 0); + pup= uiPupMenuBegin(C, op->type->name, 0); + layout= uiPupMenuLayout(pup); for (i=items-1, lastop= wm->operators.last; lastop; lastop= lastop->prev, i--) - uiMenuItemIntO(head, lastop->type->name, 0, op->type->idname, "index", i); + uiItemIntO(layout, lastop->type->name, 0, op->type->idname, "index", i); - uiPupMenuEnd(C, head); + uiPupMenuEnd(C, pup); return OPERATOR_CANCELLED; } @@ -1623,44 +1626,6 @@ void SCREEN_OT_repeat_history(wmOperatorType *ot) /* ********************** redo operator ***************************** */ -static void redo_last_cb(bContext *C, void *arg_op, void *arg2) -{ - wmOperator *lastop= arg_op; - - if(lastop) { - ED_undo_pop(C); - WM_operator_repeat(C, lastop); - } - -} - -static uiBlock *ui_block_create_redo_last(bContext *C, ARegion *ar, void *arg_op) -{ - wmWindowManager *wm= CTX_wm_manager(C); - wmOperator *op= arg_op; - PointerRNA ptr; - uiBlock *block; - int height; - - block= uiBeginBlock(C, ar, "redo_last_popup", UI_EMBOSS, UI_HELV); - uiBlockClearFlag(block, UI_BLOCK_LOOP); - uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN|UI_BLOCK_RET_1); - uiBlockSetFunc(block, redo_last_cb, arg_op, NULL); - - if(!op->properties) { - IDPropertyTemplate val = {0}; - op->properties= IDP_New(IDP_GROUP, val, "wmOperatorProperties"); - } - - RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr); - height= uiDefAutoButsRNA(C, block, &ptr); - - uiPopupBoundsBlock(block, 4.0f, 0, 0); - uiEndBlock(C, block); - - return block; -} - static int redo_last_invoke(bContext *C, wmOperator *op, wmEvent *event) { wmWindowManager *wm= CTX_wm_manager(C); @@ -1671,10 +1636,8 @@ static int redo_last_invoke(bContext *C, wmOperator *op, wmEvent *event) if((lastop->type->flag & OPTYPE_REGISTER) && (lastop->type->flag & OPTYPE_UNDO)) break; - if(!lastop) - return OPERATOR_CANCELLED; - - uiPupBlock(C, ui_block_create_redo_last, lastop); + if(lastop) + WM_operator_redo_popup(C, lastop); return OPERATOR_CANCELLED; } @@ -1853,27 +1816,28 @@ static void testfunc(bContext *C, void *argv, int arg) printf("arg %d\n", arg); } -static void newlevel1(bContext *C, uiMenuItem *head, void *arg) +static void newlevel1(bContext *C, uiLayout *layout, void *arg) { - uiMenuFunc(head, testfunc, NULL); + uiLayoutFunc(layout, testfunc, NULL); - uiMenuItemVal(head, "First", ICON_PROP_ON, 1); - uiMenuItemVal(head, "Second", ICON_PROP_CON, 2); - uiMenuItemVal(head, "Third", ICON_SMOOTHCURVE, 3); - uiMenuItemVal(head, "Fourth", ICON_SHARPCURVE, 4); + uiItemV(layout, "First", ICON_PROP_ON, 1); + uiItemV(layout, "Second", ICON_PROP_CON, 2); + uiItemV(layout, "Third", ICON_SMOOTHCURVE, 3); + uiItemV(layout, "Fourth", ICON_SHARPCURVE, 4); } static int testing123(bContext *C, wmOperator *op, wmEvent *event) { - uiMenuItem *head= uiPupMenuBegin("Hello world", 0); + uiPopupMenu *pup= uiPupMenuBegin(C, "Hello world", 0); + uiLayout *layout= uiPupMenuLayout(pup); - uiMenuContext(head, WM_OP_EXEC_DEFAULT); - uiMenuItemO(head, ICON_PROP_ON, "SCREEN_OT_region_flip"); - uiMenuItemO(head, ICON_PROP_CON, "SCREEN_OT_screen_full_area"); - uiMenuItemO(head, ICON_SMOOTHCURVE, "SCREEN_OT_region_foursplit"); - uiMenuLevel(head, "Submenu", newlevel1); + uiLayoutContext(layout, WM_OP_EXEC_DEFAULT); + uiItemO(layout, NULL, ICON_PROP_ON, "SCREEN_OT_region_flip"); + uiItemO(layout, NULL, ICON_PROP_CON, "SCREEN_OT_screen_full_area"); + uiItemO(layout, NULL, ICON_SMOOTHCURVE, "SCREEN_OT_region_foursplit"); + uiItemMenuF(layout, "Submenu", 0, newlevel1); - uiPupMenuEnd(C, head); + uiPupMenuEnd(C, pup); /* this operator is only for a menu, not used further */ return OPERATOR_CANCELLED; @@ -2016,7 +1980,7 @@ static ScrArea *biggest_non_image_area(bContext *C) short foundwin= 0; for(sa= sc->areabase.first; sa; sa= sa->next) { - if(sa->winx > 10 && sa->winy > 10) { + if(sa->winx > 30 && sa->winy > 30) { size= sa->winx*sa->winy; if(sa->spacetype == SPACE_BUTS) { if(foundwin == 0 && size > bwmaxsize) { @@ -2483,6 +2447,9 @@ void ED_keymap_screen(wmWindowManager *wm) WM_keymap_verify_item(keymap, "SCREEN_OT_repeat_last", F4KEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "SCREEN_OT_region_flip", F5KEY, KM_PRESS, 0, 0); WM_keymap_verify_item(keymap, "SCREEN_OT_redo_last", F6KEY, KM_PRESS, 0, 0); + + RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_python_file_run", F7KEY, KM_PRESS, 0, 0)->ptr, "filename", "test.py"); + WM_keymap_verify_item(keymap, "SCRIPT_OT_python_run_ui_scripts", F8KEY, KM_PRESS, 0, 0); /* files */ WM_keymap_add_item(keymap, "FILE_OT_exec", RETKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/sculpt_paint/Makefile b/source/blender/editors/sculpt_paint/Makefile index e810f7efbe4..9353116a4bc 100644 --- a/source/blender/editors/sculpt_paint/Makefile +++ b/source/blender/editors/sculpt_paint/Makefile @@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS) CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(OPENGL_HEADERS) -CPPFLAGS += -I$(NAN_BMFONT)/include CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include CPPFLAGS += -I$(NAN_ELBEEM)/include diff --git a/source/blender/editors/sculpt_paint/SConscript b/source/blender/editors/sculpt_paint/SConscript index 3e00453e049..01e1d80c24c 100644 --- a/source/blender/editors/sculpt_paint/SConscript +++ b/source/blender/editors/sculpt_paint/SConscript @@ -5,7 +5,7 @@ sources = env.Glob('*.c') incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' -incs += ' ../../render/extern/include #/intern/guardedalloc #intern/bmfont' +incs += ' ../../render/extern/include #/intern/guardedalloc' incs += ' ../../gpu ../../makesrna' env.BlenderLib ( 'bf_editors_sculpt_paint', sources, Split(incs), [], libtype=['core'], priority=[40] ) diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 1ce5f3a348b..77cd06581fd 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -276,7 +276,6 @@ typedef struct ProjPaintState { float cloneOffset[2]; float projectMat[4][4]; /* Projection matrix, use for getting screen coords */ - float viewMat[4][4]; float viewDir[3]; /* View vector, use for do_backfacecull and for ray casting with an ortho viewport */ float viewPos[3]; /* View location in object relative 3D space, so can compare to verts */ float clipsta, clipend; @@ -753,8 +752,7 @@ static int project_paint_PickColor(const ProjPaintState *ps, float pt[2], float } ibuf = BKE_image_get_ibuf((Image *)tf->tpage, NULL); /* TODO - this may be slow, the only way around it is to have an ibuf index per face */ - - + if (!ibuf) return 0; if (interp) { float x, y; @@ -2972,7 +2970,7 @@ static void project_paint_begin(ProjPaintState *ps) ps->viewDir[1] = 0.0f; ps->viewDir[2] = 1.0f; - view3d_get_object_project_mat(ps->rv3d, ps->ob, ps->projectMat, ps->viewMat); + view3d_get_object_project_mat(ps->rv3d, ps->ob, ps->projectMat); /* viewDir - object relative */ Mat4Invert(ps->ob->imat, ps->ob->obmat); diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c index b87fdf65904..6eae581aa40 100644 --- a/source/blender/editors/space_action/action_draw.c +++ b/source/blender/editors/space_action/action_draw.c @@ -82,7 +82,6 @@ #include "UI_interface.h" #include "UI_interface_icons.h" #include "UI_resources.h" -#include "UI_text.h" #include "UI_view2d.h" #include "ED_anim_api.h" @@ -114,7 +113,6 @@ #endif // XXX old defines for reference only /* XXX */ -extern void ui_rasterpos_safe(float x, float y, float aspect); extern void gl_round_box(int mode, float minx, float miny, float maxx, float maxy, float rad); /********************************** Slider Stuff **************************** */ @@ -138,7 +136,7 @@ static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key) myortho2(-0.375f, curarea->winx-0.375f, G.v2d->cur.ymin, G.v2d->cur.ymax); sprintf(str, "actionbuttonswin %d", curarea->win); - block= uiNewBlock (&curarea->uiblocks, str, UI_EMBOSS, UI_HELV, curarea->win); + block= uiNewBlock (&curarea->uiblocks, str, UI_EMBOSS); x = ACHANNEL_NAMEWIDTH + 1; y = 0.0f; @@ -301,8 +299,7 @@ static void action_icu_buts(SpaceAction *saction) myortho2(-0.375f, curarea->winx-0.375f, G.v2d->cur.ymin, G.v2d->cur.ymax); sprintf(str, "actionbuttonswin %d", curarea->win); - block= uiNewBlock (&curarea->uiblocks, str, - UI_EMBOSS, UI_HELV, curarea->win); + block= uiNewBlock (&curarea->uiblocks, str, UI_EMBOSS); x = (float)ACHANNEL_NAMEWIDTH + 1; y = 0.0f; @@ -501,7 +498,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar) expand= ICON_TRIA_RIGHT; sel = SEL_ACTC(act); - strcpy(name, "Action"); + strcpy(name, act->id.name+2); } break; case ANIMTYPE_FILLMATD: /* object materials (dopesheet) expand widget */ @@ -683,10 +680,14 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar) else mute = ICON_MUTE_IPO_OFF; - if (EDITABLE_FCU(fcu)) - protect = ICON_UNLOCKED; + if (fcu->bezt) { + if (EDITABLE_FCU(fcu)) + protect = ICON_UNLOCKED; + else + protect = ICON_LOCKED; + } else - protect = ICON_LOCKED; + protect = ICON_ZOOMOUT; // XXX editability is irrelevant here, but this icon is temp... sel = SEL_FCU(fcu); @@ -920,8 +921,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar) else UI_ThemeColor(TH_TEXT); offset += 3; - ui_rasterpos_safe(x+offset, y-4, 1.0f); - UI_DrawString(G.font, name, 0); + UI_DrawString(x+offset, y-4, name); /* reset offset - for RHS of panel */ offset = 0; @@ -999,7 +999,7 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar) /* get theme colors */ - UI_GetThemeColor3ubv(TH_SHADE2, col2); + UI_GetThemeColor3ubv(TH_BACK, col2); UI_GetThemeColor3ubv(TH_HILITE, col1); UI_GetThemeColor3ubv(TH_GROUP, col2a); UI_GetThemeColor3ubv(TH_GROUP_ACTIVE, col1a); diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index adb5d749f71..af074ca348d 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -60,6 +60,7 @@ #include "RNA_access.h" #include "RNA_define.h" +#include "RNA_enum_types.h" #include "BKE_action.h" #include "BKE_depsgraph.h" @@ -300,7 +301,7 @@ static int actkeys_copy_exec(bContext *C, wmOperator *op) } } - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -344,7 +345,7 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -410,7 +411,7 @@ static void insert_action_keys(bAnimContext *ac, short mode) /* if there's an id */ if (ale->id) - insertkey(ale->id, ((fcu->grp)?(fcu->grp->name):(NULL)), fcu->rna_path, fcu->array_index, cfra, flag); + insert_keyframe(ale->id, NULL, ((fcu->grp)?(fcu->grp->name):(NULL)), fcu->rna_path, fcu->array_index, cfra, flag); else insert_vert_fcurve(fcu, cfra, fcu->curval, 0); } @@ -440,7 +441,7 @@ static int actkeys_insertkey_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -507,7 +508,7 @@ static int actkeys_duplicate_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; // xxx - start transform @@ -584,7 +585,7 @@ static int actkeys_delete_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -647,7 +648,7 @@ static int actkeys_clean_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -771,7 +772,7 @@ static int actkeys_sample_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -846,7 +847,7 @@ static int actkeys_expo_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -872,14 +873,6 @@ void ACT_OT_keyframes_extrapolation_type_set (wmOperatorType *ot) /* ******************** Set Interpolation-Type Operator *********************** */ -/* defines for set ipo-type for selected keyframes tool */ -EnumPropertyItem prop_actkeys_ipo_types[] = { - {BEZT_IPO_CONST, "CONSTANT", "Constant Interpolation", ""}, - {BEZT_IPO_LIN, "LINEAR", "Linear Interpolation", ""}, - {BEZT_IPO_BEZ, "BEZIER", "Bezier Interpolation", ""}, - {0, NULL, NULL, NULL} -}; - /* this function is responsible for setting interpolation mode for keyframes */ static void setipo_action_keys(bAnimContext *ac, short mode) { @@ -924,7 +917,7 @@ static int actkeys_ipo_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -945,21 +938,11 @@ void ACT_OT_keyframes_interpolation_type (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - RNA_def_enum(ot->srna, "type", prop_actkeys_ipo_types, 0, "Type", ""); + RNA_def_enum(ot->srna, "type", beztriple_interpolation_mode_items, 0, "Type", ""); } /* ******************** Set Handle-Type Operator *********************** */ -/* defines for set handle-type for selected keyframes tool */ -EnumPropertyItem prop_actkeys_handletype_types[] = { - {HD_AUTO, "AUTO", "Auto Handles", ""}, - {HD_VECT, "VECTOR", "Vector Handles", ""}, - {HD_FREE, "FREE", "Free Handles", ""}, - {HD_ALIGN, "ALIGN", "Aligned Handles", ""}, -// {-1, "TOGGLE", "Toggle between Free and Aligned Handles", ""}, - {0, NULL, NULL, NULL} -}; - /* this function is responsible for setting handle-type of selected keyframes */ static void sethandles_action_keys(bAnimContext *ac, short mode) { @@ -1022,7 +1005,7 @@ static int actkeys_handletype_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -1043,7 +1026,7 @@ void ACT_OT_keyframes_handle_type_set (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - RNA_def_enum(ot->srna, "type", prop_actkeys_handletype_types, 0, "Type", ""); + RNA_def_enum(ot->srna, "type", beztriple_handle_type_items, 0, "Type", ""); } /* ************************************************************************** */ @@ -1051,22 +1034,6 @@ void ACT_OT_keyframes_handle_type_set (wmOperatorType *ot) /* ***************** Snap Current Frame Operator *********************** */ -/* helper callback for actkeys_cfrasnap_exec() -> used to help get the average time of all selected beztriples */ -// TODO: if some other code somewhere needs this, it'll be time to port this over to keyframes_edit.c!!! -static short bezt_calc_average(BeztEditData *bed, BezTriple *bezt) -{ - /* only if selected */ - if (bezt->f2 & SELECT) { - /* store average time in float (only do rounding at last step */ - bed->f1 += bezt->vec[1][0]; - - /* increment number of items */ - bed->i1++; - } - - return 0; -} - /* snap current-frame indicator to 'average time' of selected keyframe */ static int actkeys_cfrasnap_exec(bContext *C, wmOperator *op) { @@ -1098,7 +1065,7 @@ static int actkeys_cfrasnap_exec(bContext *C, wmOperator *op) CFRA= (int)floor((bed.f1 / bed.i1) + 0.5f); } - /* set notifier tha things have changed */ + /* set notifier that things have changed */ WM_event_add_notifier(C, NC_SCENE|ND_FRAME, ac.scene); return OPERATOR_FINISHED; @@ -1151,6 +1118,10 @@ static void snap_action_keys(bAnimContext *ac, short mode) memset(&bed, 0, sizeof(BeztEditData)); bed.scene= ac->scene; + if (mode == ACTKEYS_SNAP_NEAREST_MARKER) { + bed.list.first= (ac->markers) ? ac->markers->first : NULL; + bed.list.last= (ac->markers) ? ac->markers->last : NULL; + } /* snap keyframes */ for (ale= anim_data.first; ale; ale= ale->next) { @@ -1189,7 +1160,7 @@ static int actkeys_snap_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -1243,13 +1214,14 @@ static void mirror_action_keys(bAnimContext *ac, short mode) /* for 'first selected marker' mode, need to find first selected marker first! */ // XXX should this be made into a helper func in the API? if (mode == ACTKEYS_MIRROR_MARKER) { - Scene *scene= ac->scene; TimeMarker *marker= NULL; /* find first selected marker */ - for (marker= scene->markers.first; marker; marker=marker->next) { - if (marker->flag & SELECT) { - break; + if (ac->markers) { + for (marker= ac->markers->first; marker; marker=marker->next) { + if (marker->flag & SELECT) { + break; + } } } @@ -1304,7 +1276,7 @@ static int actkeys_mirror_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_action/action_header.c b/source/blender/editors/space_action/action_header.c index c7fafece4ba..fa96e1ea81f 100644 --- a/source/blender/editors/space_action/action_header.c +++ b/source/blender/editors/space_action/action_header.c @@ -255,7 +255,7 @@ static uiBlock *action_keymenu_transformmenu(bContext *C, ARegion *ar, void *arg uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "action_keymenu_transformmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "action_keymenu_transformmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_keymenu_transformmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, @@ -303,7 +303,7 @@ static uiBlock *action_keymenu_snapmenu(bContext *C, ARegion *ar, void *arg_unus short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "action_keymenu_snapmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "action_keymenu_snapmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_keymenu_snapmenu, NULL); if (saction->flag & SACTION_DRAWTIME) { @@ -365,7 +365,7 @@ static uiBlock *action_keymenu_mirrormenu(bContext *C, ARegion *ar, void *arg_un uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "action_keymenu_mirrormenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "action_keymenu_mirrormenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_keymenu_mirrormenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, @@ -419,7 +419,7 @@ static uiBlock *action_keymenu_handlemenu(bContext *C, ARegion *ar, void *arg_un uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "action_keymenu_handlemenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "action_keymenu_handlemenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_keymenu_handlemenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, @@ -471,7 +471,7 @@ static uiBlock *action_keymenu_extendmenu(bContext *C, ARegion *ar, void *arg_un uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "action_keymenu_extendmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "action_keymenu_extendmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_keymenu_extendmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, @@ -520,7 +520,7 @@ static uiBlock *action_keymenu_intpolmenu(bContext *C, ARegion *ar, void *arg_un uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "action_keymenu_intpolmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "action_keymenu_intpolmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_keymenu_intpolmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, @@ -581,7 +581,7 @@ static uiBlock *action_keymenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "action_keymenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "action_keymenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_action_keymenu, NULL); @@ -670,7 +670,7 @@ static uiBlock *action_framemenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "action_framemenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "action_framemenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_action_keymenu, NULL); uiDefIconTextBlockBut(block, action_keymenu_transformmenu, @@ -754,7 +754,7 @@ static uiBlock *action_markermenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "action_markermenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "action_markermenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_markermenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add Marker|M", 0, yco-=20, @@ -825,7 +825,7 @@ static uiBlock *action_channelmenu_posmenu(bContext *C, ARegion *ar, void *arg_u uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "action_channelmenu_posmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "action_channelmenu_posmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_channelmenu_posmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, @@ -879,7 +879,7 @@ static uiBlock *action_channelmenu_groupmenu(bContext *C, ARegion *ar, void *arg uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "action_channelmenu_groupmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "action_channelmenu_groupmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_channelmenu_groupmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, @@ -923,7 +923,7 @@ static uiBlock *action_channelmenu_settingsmenu(bContext *C, ARegion *ar, void * uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "action_channelmenu_settingsmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "action_channelmenu_settingsmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_channelmenu_settingsmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, @@ -979,7 +979,7 @@ static uiBlock *action_channelmenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "action_channelmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "action_channelmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_channelmenu, NULL); uiDefIconTextBlockBut(block, action_channelmenu_groupmenu, @@ -1043,7 +1043,7 @@ static uiBlock *action_gplayermenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "action_gplayermenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "action_gplayermenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_channelmenu, NULL); uiDefIconTextBlockBut(block, action_channelmenu_settingsmenu, @@ -1097,7 +1097,7 @@ static uiBlock *action_selectmenu_columnmenu(bContext *C, ARegion *ar, void *arg uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "action_selectmenu_columnmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "action_selectmenu_columnmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_selectmenu_columnmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, @@ -1208,7 +1208,7 @@ static uiBlock *action_selectmenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "action_selectmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "action_selectmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_selectmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, @@ -1382,7 +1382,7 @@ static uiBlock *action_viewmenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "viewmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "viewmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_viewmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, @@ -1558,31 +1558,45 @@ static void saction_idpoin_handle(bContext *C, ID *id, int event) { SpaceAction *saction= (SpaceAction*)CTX_wm_space_data(C); Object *obact= CTX_data_active_object(C); - // AnimData *adt= BKE_id_add_animdata((ID *)obact); - + + printf("actedit do id: \n"); + switch (event) { case UI_ID_BROWSE: + printf("browse \n"); case UI_ID_DELETE: + printf("browse or delete \n"); saction->action= (bAction*)id; + /* we must set this action to be the one used by active object (if not pinned) */ - if (saction->pin == 0) - obact->adt->action= saction->action; + if (saction->pin == 0) { + AnimData *adt= BKE_id_add_animdata(&obact->id); /* this only adds if non-existant */ + + /* set action */ + printf("\tset action \n"); + adt->action= saction->action; + } ED_area_tag_redraw(CTX_wm_area(C)); ED_undo_push(C, "Assign Action"); break; case UI_ID_RENAME: + printf("actedit rename \n"); break; case UI_ID_ADD_NEW: + printf("actedit addnew \n"); /* XXX not implemented */ break; case UI_ID_OPEN: + printf("actedit open \n"); /* XXX not implemented */ break; case UI_ID_ALONE: + printf("actedit alone \n"); /* XXX not implemented */ break; case UI_ID_PIN: + printf("actedit pin \n"); break; } } @@ -1595,7 +1609,7 @@ void action_header_buttons(const bContext *C, ARegion *ar) uiBlock *block; int xco, yco= 3, xmax; - block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS, UI_HELV); + block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS); uiBlockSetHandleFunc(block, do_action_buttons, NULL); xco= ED_area_header_standardbuttons(C, block, yco); @@ -1606,8 +1620,6 @@ void action_header_buttons(const bContext *C, ARegion *ar) ANIM_animdata_get_context(C, &ac); if ((sa->flag & HEADER_NO_PULLDOWN)==0) { - /* pull down menus */ - uiBlockSetEmboss(block, UI_EMBOSSP); xmax= GetButStringLength("View"); uiDefPulldownBut(block, action_viewmenu, CTX_wm_area(C), @@ -1691,7 +1703,7 @@ void action_header_buttons(const bContext *C, ARegion *ar) /* NAME ETC */ //uiClearButLock(); - /* NAME ETC (it is assumed that */ + /* NAME ETC */ xco= uiDefIDPoinButs(block, CTX_data_main(C), NULL, (ID*)saction->action, ID_AC, &saction->pin, xco, yco, saction_idpoin_handle, UI_ID_BROWSE|UI_ID_RENAME|UI_ID_ADD_NEW|UI_ID_DELETE|UI_ID_FAKE_USER|UI_ID_ALONE|UI_ID_PIN); diff --git a/source/blender/editors/space_action/action_ops.c b/source/blender/editors/space_action/action_ops.c index eedf4868391..49a0befdbe2 100644 --- a/source/blender/editors/space_action/action_ops.c +++ b/source/blender/editors/space_action/action_ops.c @@ -91,13 +91,20 @@ void action_operatortypes(void) static void action_keymap_keyframes (wmWindowManager *wm, ListBase *keymap) { + wmKeymapItem *kmi; + /* action_select.c - selection tools */ /* click-select */ - // TODO: column to alt, left-right to ctrl (for select-linked consistency) WM_keymap_add_item(keymap, "ACT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "ACT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL, 0)->ptr, "column", 1); - RNA_boolean_set(WM_keymap_add_item(keymap, "ACT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1); - RNA_enum_set(WM_keymap_add_item(keymap, "ACT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "left_right", ACTKEYS_LRSEL_TEST); + kmi= WM_keymap_add_item(keymap, "ACT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0); + RNA_boolean_set(kmi->ptr, "column", 1); + kmi= WM_keymap_add_item(keymap, "ACT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0); + RNA_boolean_set(kmi->ptr, "extend", 1); + kmi= WM_keymap_add_item(keymap, "ACT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT|KM_SHIFT, 0); + RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_boolean_set(kmi->ptr, "column", 1); + kmi= WM_keymap_add_item(keymap, "ACT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); + RNA_enum_set(kmi->ptr, "left_right", ACTKEYS_LRSEL_TEST); /* deselect all */ WM_keymap_add_item(keymap, "ACT_OT_keyframes_select_all_toggle", AKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index 5fb39376fd0..d4782418be7 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -74,6 +74,7 @@ #include "ED_keyframing.h" #include "ED_keyframes_draw.h" #include "ED_keyframes_edit.h" +#include "ED_markers.h" #include "ED_screen.h" #include "ED_space_api.h" @@ -83,156 +84,6 @@ #include "action_intern.h" /* ************************************************************************** */ -/* GENERAL STUFF */ - -/* used only by mouse_action. It is used to find the location of the nearest - * keyframe to where the mouse clicked, - */ -// XXX port this to new listview code... -// XXX just merge this into the existing code! -static void *get_nearest_action_key (bAnimContext *ac, int mval[2], float *selx, short *sel, short *ret_type, bActionGroup **par) -{ - ListBase anim_data = {NULL, NULL}; - ListBase anim_keys = {NULL, NULL}; - bAnimListElem *ale; - ActKeyColumn *ak; - View2D *v2d= &ac->ar->v2d; - int filter; - - rctf rectf; - void *data = NULL; - float xmin, xmax, x, y; - int channel_index; - short found = 0; - - /* action-group */ - *par= NULL; - - - UI_view2d_region_to_view(v2d, mval[0], mval[1], &x, &y); - UI_view2d_listview_view_to_cell(v2d, 0, ACHANNEL_STEP, 0, (float)ACHANNEL_HEIGHT_HALF, x, y, NULL, &channel_index); - - /* x-range to check is +/- 7 on either side of mouse click (size of keyframe icon) */ - UI_view2d_region_to_view(v2d, mval[0]-7, mval[1], &rectf.xmin, &rectf.ymin); - UI_view2d_region_to_view(v2d, mval[0]+7, mval[1], &rectf.xmax, &rectf.ymax); - - /* filter data */ - filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CHANNELS); - ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); - - /* get channel */ - ale= BLI_findlink(&anim_data, channel_index); - if (ale == NULL) { - /* channel not found */ - printf("Error: animation channel (index = %d) not found in mouse_action_keys() \n", channel_index); - - BLI_freelistN(&anim_data); - return NULL; - } - - { - /* found match - must return here... */ - Object *nob= ANIM_nla_mapping_get(ac, ale); - ActKeysInc *aki= init_aki_data(ac, ale); - - /* apply NLA-scaling correction? */ - if (nob) { - xmin= get_action_frame(nob, rectf.xmin); - xmax= get_action_frame(nob, rectf.xmax); - } - else { - xmin= rectf.xmin; - xmax= rectf.xmax; - } - - /* make list of keyframes */ - if (ale->key_data) { - switch (ale->datatype) { - case ALE_OB: - { - Object *ob= (Object *)ale->key_data; - ob_to_keylist(ob, &anim_keys, NULL, aki); - } - break; - case ALE_ACT: - { - bAction *act= (bAction *)ale->key_data; - action_to_keylist(act, &anim_keys, NULL, aki); - } - break; - case ALE_FCURVE: - { - FCurve *fcu= (FCurve *)ale->key_data; - fcurve_to_keylist(fcu, &anim_keys, NULL, aki); - } - break; - } - } - else if (ale->type == ANIMTYPE_GROUP) { - bActionGroup *agrp= (bActionGroup *)ale->data; - agroup_to_keylist(agrp, &anim_keys, NULL, aki); - } - else if (ale->type == ANIMTYPE_GPDATABLOCK) { - /* cleanup */ - BLI_freelistN(&anim_data); - - /* this channel currently doens't have any keyframes... must ignore! */ - *ret_type= ANIMTYPE_NONE; - return NULL; - } - else if (ale->type == ANIMTYPE_GPLAYER) { - bGPDlayer *gpl= (bGPDlayer *)ale->data; - gpl_to_keylist(gpl, &anim_keys, NULL, aki); - } - - /* loop through keyframes, finding one that was clicked on */ - for (ak= anim_keys.first; ak; ak= ak->next) { - if (IN_RANGE(ak->cfra, xmin, xmax)) { - *selx= ak->cfra; - found= 1; - break; - } - } - /* no matching keyframe found - set to mean frame value so it doesn't actually select anything */ - if (found == 0) - *selx= ((xmax+xmin) / 2); - - /* figure out what to return */ - if (ac->datatype == ANIMCONT_ACTION) { - *par= ale->owner; /* assume that this is an action group */ - *ret_type= ale->type; - data = ale->data; - } - else if (ac->datatype == ANIMCONT_SHAPEKEY) { - data = ale->key_data; - *ret_type= ANIMTYPE_FCURVE; - } - else if (ac->datatype == ANIMCONT_DOPESHEET) { - data = ale->data; - *ret_type= ale->type; - } - else if (ac->datatype == ANIMCONT_GPENCIL) { - data = ale->data; - *ret_type= ANIMTYPE_GPLAYER; - } - - /* cleanup tempolary lists */ - BLI_freelistN(&anim_keys); - anim_keys.first = anim_keys.last = NULL; - - BLI_freelistN(&anim_data); - - return data; - } - - /* cleanup */ - BLI_freelistN(&anim_data); - - *ret_type= ANIMTYPE_NONE; - return NULL; -} - -/* ************************************************************************** */ /* KEYFRAMES STUFF */ /* ******************** Deselect All Operator ***************************** */ @@ -322,7 +173,7 @@ static int actkeys_deselectall_exec(bContext *C, wmOperator *op) else deselect_action_keys(&ac, 1, SELECT_ADD); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ED_area_tag_redraw(CTX_wm_area(C)); // FIXME... should be updating 'keyframes' data context or so instead! return OPERATOR_FINISHED; @@ -539,21 +390,19 @@ static void markers_selectkeys_between (bAnimContext *ac) bAnimListElem *ale; int filter; - BeztEditFunc select_cb; + BeztEditFunc ok_cb, select_cb; BeztEditData bed; float min, max; /* get extreme markers */ - //get_minmax_markers(1, &min, &max); // FIXME... add back markers api! - min= (float)ac->scene->r.sfra; // xxx temp code - max= (float)ac->scene->r.efra; // xxx temp code - - if (min==max) return; + ED_markers_get_minmax(ac->markers, 1, &min, &max); min -= 0.5f; max += 0.5f; /* get editing funcs + data */ + ok_cb= ANIM_editkeyframes_ok(BEZT_OK_FRAMERANGE); select_cb= ANIM_editkeyframes_select(SELECT_ADD); + memset(&bed, 0, sizeof(BeztEditData)); bed.f1= min; bed.f2= max; @@ -568,11 +417,11 @@ static void markers_selectkeys_between (bAnimContext *ac) if (nob) { ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 0, 1); - ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, select_cb, NULL); + ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, ok_cb, select_cb, NULL); ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 1, 1); } else { - ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, select_cb, NULL); + ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, ok_cb, select_cb, NULL); } } @@ -581,21 +430,6 @@ static void markers_selectkeys_between (bAnimContext *ac) } -/* helper callback for columnselect_action_keys() -> populate list CfraElems with frame numbers from selected beztriples */ -// TODO: if some other code somewhere needs this, it'll be time to port this over to keyframes_edit.c!!! -static short bezt_to_cfraelem(BeztEditData *bed, BezTriple *bezt) -{ - /* only if selected */ - if (bezt->f2 & SELECT) { - CfraElem *ce= MEM_callocN(sizeof(CfraElem), "cfraElem"); - BLI_addtail(&bed->list, ce); - - ce->cfra= bezt->vec[1][0]; - } - - return 0; -} - /* Selects all visible keyframes in the same frames as the specified elements */ static void columnselect_action_keys (bAnimContext *ac, short mode) { @@ -640,9 +474,7 @@ static void columnselect_action_keys (bAnimContext *ac, short mode) break; case ACTKEYS_COLUMNSEL_MARKERS_COLUMN: /* list of selected markers */ - // FIXME: markers api needs to be improved for this first! - //make_marker_cfra_list(&elems, 1); - return; // XXX currently, this does nothing! + ED_markers_make_cfra_list(ac->markers, &bed.list, 1); break; default: /* invalid option */ @@ -659,7 +491,7 @@ static void columnselect_action_keys (bAnimContext *ac, short mode) if (ac->datatype == ANIMCONT_GPENCIL) filter= (ANIMFILTER_VISIBLE); else - filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY); + filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY); ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); for (ale= anim_data.first; ale; ale= ale->next) { @@ -717,7 +549,7 @@ static int actkeys_columnselect_exec(bContext *C, wmOperator *op) else columnselect_action_keys(&ac, mode); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_SELECT); return OPERATOR_FINISHED; @@ -751,7 +583,7 @@ void ACT_OT_keyframes_select_column (wmOperatorType *ot) */ /* defines for left-right select tool */ -static EnumPropertyItem prop_leftright_select_types[] = { +static EnumPropertyItem prop_actkeys_leftright_select_types[] = { {ACTKEYS_LRSEL_TEST, "CHECK", "Check if Select Left or Right", ""}, {ACTKEYS_LRSEL_NONE, "OFF", "Don't select", ""}, {ACTKEYS_LRSEL_LEFT, "LEFT", "Before current frame", ""}, @@ -759,174 +591,32 @@ static EnumPropertyItem prop_leftright_select_types[] = { {0, NULL, NULL, NULL} }; +/* sensitivity factor for frame-selections */ +#define FRAME_CLICK_THRESH 0.1f + /* ------------------- */ /* option 1) select keyframe directly under mouse */ -static void mouse_action_keys (bAnimContext *ac, int mval[2], short selectmode) +static void actkeys_mselect_single (bAnimContext *ac, bAnimListElem *ale, short select_mode, float selx) { - Scene *sce= NULL; - Object *ob= NULL; - bDopeSheet *ads= NULL; - bAction *act= NULL; - bActionGroup *agrp= NULL; - FCurve *fcu= NULL; - bGPdata *gpd = NULL; - bGPDlayer *gpl = NULL; + bDopeSheet *ads= (ac->datatype == ANIMCONT_DOPESHEET) ? ac->data : NULL; + int ds_filter = ((ads) ? (ads->filterflag) : (0)); BeztEditData bed; BeztEditFunc select_cb, ok_cb; - void *anim_channel; - short sel, chan_type = 0; - float selx = 0.0f, selxa; - - /* determine what type of data we are operating on */ - if (ac->datatype == ANIMCONT_ACTION) - act= (bAction *)ac->data; - else if (ac->datatype == ANIMCONT_DOPESHEET) - ads= (bDopeSheet *)ac->data; - else if (ac->datatype == ANIMCONT_GPENCIL) - gpd= (bGPdata *)ac->data; - - /* get channel and selection info */ - anim_channel= get_nearest_action_key(ac, mval, &selx, &sel, &chan_type, &agrp); // xxx... - if (anim_channel == NULL) - return; - - switch (chan_type) { - case ANIMTYPE_FCURVE: - fcu= (FCurve *)anim_channel; - break; - case ANIMTYPE_GROUP: - agrp= (bActionGroup *)anim_channel; - break; -#if 0 // XXX fixme - case ANIMTYPE_DSMAT: - ipo= ((Material *)anim_channel)->ipo; - break; - case ANIMTYPE_DSLAM: - ipo= ((Lamp *)anim_channel)->ipo; - break; - case ANIMTYPE_DSCAM: - ipo= ((Camera *)anim_channel)->ipo; - break; - case ANIMTYPE_DSCUR: - ipo= ((Curve *)anim_channel)->ipo; - break; - case ANIMTYPE_DSSKEY: - ipo= ((Key *)anim_channel)->ipo; - break; -#endif // XXX fixme - case ANIMTYPE_FILLACTD: - act= (bAction *)anim_channel; - break; - case ANIMTYPE_OBJECT: - ob= ((Base *)anim_channel)->object; - break; - case ANIMTYPE_SCENE: - sce= (Scene *)anim_channel; - break; - case ANIMTYPE_GPLAYER: - gpl= (bGPDlayer *)anim_channel; - break; - default: - return; - } - - /* for replacing selection, firstly need to clear existing selection */ - if (selectmode == SELECT_REPLACE) { - selectmode = SELECT_ADD; - - deselect_action_keys(ac, 0, SELECT_SUBTRACT); - - if (ELEM(ac->datatype, ANIMCONT_ACTION, ANIMCONT_DOPESHEET)) { - int filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CHANNELS); /* this should suffice for now */ - - /* deselect all other channels first */ - ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); - - /* Highlight Action-Group or F-Curve? */ - if (agrp) { - agrp->flag |= AGRP_SELECTED; - ANIM_set_active_channel(ac->data, ac->datatype, filter, agrp, ANIMTYPE_GROUP); - } - else if (fcu) { - fcu->flag |= FCURVE_SELECTED; - ANIM_set_active_channel(ac->data, ac->datatype, filter, fcu, ANIMTYPE_FCURVE); - } - } - else if (ac->datatype == ANIMCONT_GPENCIL) { - ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); - - /* Highlight gpencil layer */ - gpl->flag |= GP_LAYER_SELECT; - //gpencil_layer_setactive(gpd, gpl); - } - } /* get functions for selecting keyframes */ - select_cb= ANIM_editkeyframes_select(selectmode); + select_cb= ANIM_editkeyframes_select(select_mode); ok_cb= ANIM_editkeyframes_ok(BEZT_OK_FRAME); memset(&bed, 0, sizeof(BeztEditData)); bed.f1= selx; - /* apply selection to keyframes */ - // XXX use more generic code looper for this stuff... - if (fcu) - ANIM_fcurve_keys_bezier_loop(&bed, fcu, ok_cb, select_cb, NULL); - else if (agrp) { - for (fcu= agrp->channels.first; fcu && fcu->grp==agrp; fcu= fcu->next) - ANIM_fcurve_keys_bezier_loop(&bed, fcu, ok_cb, select_cb, NULL); - } - else if (act) { - for (fcu= act->curves.first; fcu; fcu= fcu->next) - ANIM_fcurve_keys_bezier_loop(&bed, fcu, ok_cb, select_cb, NULL); - } - else if (ob) { - AnimData *adt; - - /* Object's own animation */ - if (ob->adt && ob->adt->action) { - adt= ob->adt; - act= adt->action; - - selxa= get_action_frame(ob, selx); // xxx - bed.f1= selxa; - - for (fcu= act->curves.first; fcu; fcu= fcu->next) - ANIM_fcurve_keys_bezier_loop(&bed, fcu, ok_cb, select_cb, NULL); - } - - /* 'Sub-Object' animation data */ - // TODO... - } - else if (sce) { - World *wo= sce->world; - AnimData *adt; - - /* Scene's own animation */ - if (sce->adt && sce->adt->action) { - adt= sce->adt; - act= adt->action; - - for (fcu= act->curves.first; fcu; fcu= fcu->next) - ANIM_fcurve_keys_bezier_loop(&bed, fcu, ok_cb, select_cb, NULL); - } - - /* World */ - if (wo && wo->adt && wo->adt->action) { - adt= wo->adt; - act= adt->action; - - for (fcu= act->curves.first; fcu; fcu= fcu->next) - ANIM_fcurve_keys_bezier_loop(&bed, fcu, ok_cb, select_cb, NULL); - } - } - //else if (gpl) - // select_gpencil_frame(gpl, (int)selx, selectmode); + /* select the nominated keyframe on the given frame */ + ANIM_animchannel_keys_bezier_loop(&bed, ale, ok_cb, select_cb, NULL, ds_filter); } /* Option 2) Selects all the keyframes on either side of the current frame (depends on which side the mouse is on) */ -static void selectkeys_leftright (bAnimContext *ac, short leftright, short select_mode) +static void actkeys_mselect_leftright (bAnimContext *ac, short leftright, short select_mode) { ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; @@ -936,9 +626,12 @@ static void selectkeys_leftright (bAnimContext *ac, short leftright, short selec BeztEditData bed; Scene *scene= ac->scene; - /* if select mode is replace, deselect all keyframes first */ + /* if select mode is replace, deselect all keyframes (and channels) first */ if (select_mode==SELECT_REPLACE) { - select_mode=SELECT_ADD; + select_mode= SELECT_ADD; + + /* deselect all other channels and keyframes */ + ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); deselect_action_keys(ac, 0, SELECT_SUBTRACT); } @@ -949,10 +642,10 @@ static void selectkeys_leftright (bAnimContext *ac, short leftright, short selec memset(&bed, 0, sizeof(BeztEditFunc)); if (leftright == ACTKEYS_LRSEL_LEFT) { bed.f1 = -MAXFRAMEF; - bed.f2 = (float)(CFRA + 0.1f); + bed.f2 = (float)(CFRA + FRAME_CLICK_THRESH); } else { - bed.f1 = (float)(CFRA - 0.1f); + bed.f1 = (float)(CFRA - FRAME_CLICK_THRESH); bed.f2 = MAXFRAMEF; } @@ -983,7 +676,7 @@ static void selectkeys_leftright (bAnimContext *ac, short leftright, short selec } /* Option 3) Selects all visible keyframes in the same frame as the mouse click */ -static void mouse_columnselect_action_keys (bAnimContext *ac, float selx) +static void actkeys_mselect_column(bAnimContext *ac, short select_mode, float selx) { ListBase anim_data= {NULL, NULL}; bAnimListElem *ale; @@ -996,7 +689,7 @@ static void mouse_columnselect_action_keys (bAnimContext *ac, float selx) memset(&bed, 0, sizeof(BeztEditData)); /* set up BezTriple edit callbacks */ - select_cb= ANIM_editkeyframes_select(SELECT_ADD); + select_cb= ANIM_editkeyframes_select(select_mode); ok_cb= ANIM_editkeyframes_ok(BEZT_OK_FRAME); /* loop through all of the keys and select additional keyframes @@ -1012,7 +705,6 @@ static void mouse_columnselect_action_keys (bAnimContext *ac, float selx) Object *nob= ANIM_nla_mapping_get(ac, ale); /* set frame for validation callback to refer to */ - // XXX have a more sensitive range? if (nob) bed.f1= get_action_frame(nob, selx); else @@ -1042,6 +734,172 @@ static void mouse_columnselect_action_keys (bAnimContext *ac, float selx) /* ------------------- */ +static void mouse_action_keys (bAnimContext *ac, int mval[2], short select_mode, short column) +{ + ListBase anim_data = {NULL, NULL}; + ListBase anim_keys = {NULL, NULL}; + bAnimListElem *ale; + int filter; + + View2D *v2d= &ac->ar->v2d; + int channel_index; + short found = 0; + float selx = 0.0f; + float x, y; + rctf rectf; + + + /* use View2D to determine the index of the channel (i.e a row in the list) where keyframe was */ + UI_view2d_region_to_view(v2d, mval[0], mval[1], &x, &y); + UI_view2d_listview_view_to_cell(v2d, 0, ACHANNEL_STEP, 0, (float)ACHANNEL_HEIGHT_HALF, x, y, NULL, &channel_index); + + /* x-range to check is +/- 7 (in screen/region-space) on either side of mouse click (size of keyframe icon) */ + UI_view2d_region_to_view(v2d, mval[0]-7, mval[1], &rectf.xmin, &rectf.ymin); + UI_view2d_region_to_view(v2d, mval[0]+7, mval[1], &rectf.xmax, &rectf.ymax); + + /* filter data */ + filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CHANNELS); + ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); + + /* try to get channel */ + ale= BLI_findlink(&anim_data, channel_index); + if (ale == NULL) { + /* channel not found */ + printf("Error: animation channel (index = %d) not found in mouse_action_keys() \n", channel_index); + return; + } + else { + /* found match - must return here... */ + Object *nob= ANIM_nla_mapping_get(ac, ale); + ActKeysInc *aki= init_aki_data(ac, ale); + ActKeyColumn *ak; + float xmin, xmax; + + /* apply NLA-scaling correction? */ + if (nob) { + xmin= get_action_frame(nob, rectf.xmin); + xmax= get_action_frame(nob, rectf.xmax); + } + else { + xmin= rectf.xmin; + xmax= rectf.xmax; + } + + /* make list of keyframes */ + if (ale->key_data) { + switch (ale->datatype) { + case ALE_OB: + { + Object *ob= (Object *)ale->key_data; + ob_to_keylist(ob, &anim_keys, NULL, aki); + } + break; + case ALE_ACT: + { + bAction *act= (bAction *)ale->key_data; + action_to_keylist(act, &anim_keys, NULL, aki); + } + break; + case ALE_FCURVE: + { + FCurve *fcu= (FCurve *)ale->key_data; + fcurve_to_keylist(fcu, &anim_keys, NULL, aki); + } + break; + } + } + else if (ale->type == ANIMTYPE_GROUP) { + bActionGroup *agrp= (bActionGroup *)ale->data; + agroup_to_keylist(agrp, &anim_keys, NULL, aki); + } + else if (ale->type == ANIMTYPE_GPDATABLOCK) { + /* cleanup */ + // FIXME:... + BLI_freelistN(&anim_data); + return; + } + else if (ale->type == ANIMTYPE_GPLAYER) { + bGPDlayer *gpl= (bGPDlayer *)ale->data; + gpl_to_keylist(gpl, &anim_keys, NULL, aki); + } + + /* loop through keyframes, finding one that was clicked on */ + for (ak= anim_keys.first; ak; ak= ak->next) { + if (IN_RANGE(ak->cfra, xmin, xmax)) { + selx= ak->cfra; + found= 1; + break; + } + } + + /* remove active channel from list of channels for separate treatment (since it's needed later on) */ + BLI_remlink(&anim_data, ale); + + /* cleanup temporary lists */ + BLI_freelistN(&anim_keys); + anim_keys.first = anim_keys.last = NULL; + + /* free list of channels, since it's not used anymore */ + BLI_freelistN(&anim_data); + } + + /* for replacing selection, firstly need to clear existing selection */ + if (select_mode == SELECT_REPLACE) { + /* reset selection mode for next steps */ + select_mode = SELECT_ADD; + + /* deselect all keyframes */ + deselect_action_keys(ac, 0, SELECT_SUBTRACT); + + /* highlight channel clicked on */ + if (ELEM(ac->datatype, ANIMCONT_ACTION, ANIMCONT_DOPESHEET)) { + /* deselect all other channels first */ + ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); + + /* Highlight Action-Group or F-Curve? */ + if (ale->type == ANIMTYPE_GROUP) { + bActionGroup *agrp= ale->data; + + agrp->flag |= AGRP_SELECTED; + ANIM_set_active_channel(ac->data, ac->datatype, filter, agrp, ANIMTYPE_GROUP); + } + else if (ale->type == ANIMTYPE_FCURVE) { + FCurve *fcu= ale->data; + + fcu->flag |= FCURVE_SELECTED; + ANIM_set_active_channel(ac->data, ac->datatype, filter, fcu, ANIMTYPE_FCURVE); + } + } + else if (ac->datatype == ANIMCONT_GPENCIL) { + ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); + + /* Highlight gpencil layer */ + //gpl->flag |= GP_LAYER_SELECT; + //gpencil_layer_setactive(gpd, gpl); + } + } + + /* only select keyframes if we clicked on a valid channel and hit something */ + if (ale) { + /* apply selection to keyframes */ + if (/*gpl*/0) { + /* grease pencil */ + //select_gpencil_frame(gpl, (int)selx, selectmode); + } + else if (column) { + /* select all keyframes in the same frame as the one we hit on the active channel */ + actkeys_mselect_column(ac, select_mode, selx); + } + else { + /* select the nominated keyframe on the given frame */ + actkeys_mselect_single(ac, ale, select_mode, selx); + } + + /* free this channel */ + MEM_freeN(ale); + } +} + /* handle clicking */ static int actkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *event) { @@ -1049,7 +907,7 @@ static int actkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even Scene *scene; ARegion *ar; View2D *v2d; - short selectmode; + short selectmode, column; int mval[2]; /* get editor data */ @@ -1066,11 +924,13 @@ static int actkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even mval[1]= (event->y - ar->winrct.ymin); /* select mode is either replace (deselect all, then add) or add/extend */ - // XXX this is currently only available for normal select only if (RNA_boolean_get(op->ptr, "extend")) selectmode= SELECT_INVERT; else selectmode= SELECT_REPLACE; + + /* column selection */ + column= RNA_boolean_get(op->ptr, "column"); /* figure out action to take */ if (RNA_enum_get(op->ptr, "left_right")) { @@ -1083,23 +943,14 @@ static int actkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even else RNA_int_set(op->ptr, "left_right", ACTKEYS_LRSEL_RIGHT); - selectkeys_leftright(&ac, RNA_enum_get(op->ptr, "left_right"), selectmode); - } - else if (RNA_boolean_get(op->ptr, "column")) { - /* select all the keyframes that occur on the same frame as where the mouse clicked */ - float x; - - /* figure out where (the frame) the mouse clicked, and set all keyframes in that frame */ - UI_view2d_region_to_view(v2d, mval[0], mval[1], &x, NULL); - mouse_columnselect_action_keys(&ac, x); + actkeys_mselect_leftright(&ac, RNA_enum_get(op->ptr, "left_right"), selectmode); } else { - /* select keyframe under mouse */ - mouse_action_keys(&ac, mval, selectmode); - // XXX activate transform... + /* select keyframe(s) based upon mouse position*/ + mouse_action_keys(&ac, mval, selectmode, column); } - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_BOTH); /* for tweak grab to work */ @@ -1112,7 +963,7 @@ void ACT_OT_keyframes_clickselect (wmOperatorType *ot) ot->name= "Mouse Select Keys"; ot->idname= "ACT_OT_keyframes_clickselect"; - /* api callbacks */ + /* api callbacks - absolutely no exec() this yet... */ ot->invoke= actkeys_clickselect_invoke; ot->poll= ED_operator_areaactive; @@ -1121,9 +972,9 @@ void ACT_OT_keyframes_clickselect (wmOperatorType *ot) /* id-props */ // XXX should we make this into separate operators? - RNA_def_enum(ot->srna, "left_right", NULL /* XXX prop_actkeys_clickselect_items */, 0, "Left Right", ""); // ALTKEY + RNA_def_enum(ot->srna, "left_right", prop_actkeys_leftright_select_types, 0, "Left Right", ""); // CTRLKEY RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY - RNA_def_boolean(ot->srna, "column", 0, "Column Select", ""); // CTRLKEY + RNA_def_boolean(ot->srna, "column", 0, "Column Select", ""); // ALTKEY } /* ************************************************************************** */ diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c index 40e3564e69b..03b2ce9d11c 100644 --- a/source/blender/editors/space_buttons/buttons_header.c +++ b/source/blender/editors/space_buttons/buttons_header.c @@ -29,6 +29,7 @@ #include <string.h> #include <stdio.h> +#include "DNA_object_types.h" #include "DNA_space_types.h" #include "DNA_scene_types.h" #include "DNA_screen_types.h" @@ -40,6 +41,7 @@ #include "BKE_context.h" #include "BKE_screen.h" +#include "BKE_utildefines.h" #include "ED_screen.h" #include "ED_types.h" @@ -66,14 +68,10 @@ static void do_viewmenu(bContext *C, void *arg, int event) ScrArea *sa= CTX_wm_area(C); switch(event) { - case 0: /* panel alignment */ case 1: case 2: sbuts->align= event; - if(event) { - sbuts->re_align= 1; - // uiAlignPanelStep(sa, 1.0); - } + sbuts->re_align= 1; break; } @@ -87,7 +85,7 @@ static uiBlock *dummy_viewmenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "dummy_viewmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "dummy_viewmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_viewmenu, NULL); if (sbuts->align == 1) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Horizontal", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -96,9 +94,6 @@ static uiBlock *dummy_viewmenu(bContext *C, ARegion *ar, void *arg_unused) if (sbuts->align == 2) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Vertical", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Vertical", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); - if (sbuts->align == 0) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Free", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); - else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Free", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); - if(sa->headertype==HEADERTOP) { uiBlockSetDirection(block, UI_DOWN); } @@ -124,6 +119,7 @@ static void do_buttons_buttons(bContext *C, void *arg, int event) WM_event_add_notifier(C, NC_SCENE|ND_FRAME, NULL); break; case B_CONTEXT_SWITCH: + case B_BUTSPREVIEW: ED_area_tag_redraw(CTX_wm_area(C)); break; } @@ -134,10 +130,11 @@ void buttons_header_buttons(const bContext *C, ARegion *ar) { ScrArea *sa= CTX_wm_area(C); SpaceButs *sbuts= (SpaceButs*)CTX_wm_space_data(C); + Object *ob= CTX_data_active_object(C); uiBlock *block; - int xco, yco= 3; + int xco, yco= 3, dataicon= ICON_OBJECT_DATA; - block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS, UI_HELV); + block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS); uiBlockSetHandleFunc(block, do_buttons_buttons, NULL); xco= ED_area_header_standardbuttons(C, block, yco); @@ -145,65 +142,75 @@ void buttons_header_buttons(const bContext *C, ARegion *ar) if((sa->flag & HEADER_NO_PULLDOWN)==0) { int xmax; - /* pull down menus */ - uiBlockSetEmboss(block, UI_EMBOSSP); - xmax= GetButStringLength("View"); uiDefPulldownBut(block, dummy_viewmenu, CTX_wm_area(C), - "View", xco, yco-2, xmax-3, 24, ""); + "View", xco, yco, xmax-3, 20, ""); - xco+=XIC+xmax; + xco+=xmax; + } + // DATA Icons + if(ob) { + switch(ob->type) { + case OB_EMPTY: dataicon= ICON_EMPTY_DATA; break; + case OB_MESH: dataicon= ICON_MESH_DATA; break; + case OB_CURVE: dataicon= ICON_CURVE_DATA; break; + case OB_SURF: dataicon= ICON_SURFACE_DATA; break; + case OB_FONT: dataicon= ICON_FONT_DATA; break; + case OB_MBALL: dataicon= ICON_META_DATA; break; + case OB_LAMP: dataicon= ICON_LAMP_DATA; break; + case OB_CAMERA: dataicon= ICON_CAMERA_DATA; break; + case OB_LATTICE: dataicon= ICON_LATTICE_DATA; break; + case OB_ARMATURE: dataicon= ICON_ARMATURE_DATA; break; + default: break; + } } uiBlockSetEmboss(block, UI_EMBOSS); - uiBlockBeginAlign(block); - uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_GAME, xco, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)CONTEXT_LOGIC, 0, 0, "Logic (F4) "); - uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_SCRIPT, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)CONTEXT_SCRIPT, 0, 0, "Script "); - uiDefIconButS(block, ROW, B_BUTSPREVIEW, ICON_MATERIAL_DATA,xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)CONTEXT_SHADING, 0, 0, "Shading (F5) "); - uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_OBJECT_DATA, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)CONTEXT_OBJECT, 0, 0, "Object (F7) "); - uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_EDIT, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)CONTEXT_EDITING, 0, 0, "Editing (F9) "); - uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_SCENE_DATA, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)CONTEXT_SCENE, 0, 0, "Scene (F10) "); + // if object selection changed, validate button selection + if(ob && (ob->type == OB_LAMP) && ELEM3(sbuts->mainb, (float)BCONTEXT_MATERIAL, (float)BCONTEXT_PARTICLE, (float)BCONTEXT_PHYSICS)) + sbuts->mainb = (float)BCONTEXT_DATA; + + if(ob && (ob->type == OB_EMPTY) && ELEM3(sbuts->mainb, (float)BCONTEXT_MATERIAL, (float)BCONTEXT_TEXTURE, (float)BCONTEXT_PARTICLE)) + sbuts->mainb = (float)BCONTEXT_DATA; + + if((ob && ELEM(ob->type, OB_CAMERA, OB_ARMATURE)) && ELEM4(sbuts->mainb, (float)BCONTEXT_MATERIAL, (float)BCONTEXT_TEXTURE, (float)BCONTEXT_PARTICLE, (float)BCONTEXT_PHYSICS)) + sbuts->mainb = (float)BCONTEXT_DATA; + + if((ob && (ob->type != OB_ARMATURE)) && (sbuts->mainb == (float)BCONTEXT_BONE)) + sbuts->mainb = (float)BCONTEXT_DATA; - xco+= XIC; + if(!ob && !ELEM(sbuts->mainb, (float)BCONTEXT_SCENE, (float)BCONTEXT_WORLD)) + sbuts->mainb = (float)BCONTEXT_WORLD; + + if((ob && ELEM5(ob->type, OB_EMPTY, OB_MBALL, OB_LAMP, OB_CAMERA, OB_ARMATURE)) && (sbuts->mainb == (float) BCONTEXT_MODIFIER)) + sbuts->mainb = (float)BCONTEXT_DATA; - /* select the context to be drawn, per contex/tab the actual context is tested */ - uiBlockSetEmboss(block, UI_EMBOSS); // normal - switch(sbuts->mainb) { - case CONTEXT_SCENE: - uiBlockBeginAlign(block); - uiDefIconButC(block, ROW, B_CONTEXT_SWITCH, ICON_SCENE, xco+=XIC, yco, XIC, YIC, &(sbuts->tab[CONTEXT_SCENE]), 1.0, (float)TAB_SCENE_RENDER, 0, 0, "Render buttons "); - uiDefIconButC(block, ROW, B_CONTEXT_SWITCH, ICON_SEQUENCE, xco+=XIC, yco, XIC, YIC, &(sbuts->tab[CONTEXT_SCENE]), 1.0, (float)TAB_SCENE_SEQUENCER, 0, 0, "Sequencer buttons "); - uiDefIconButC(block, ROW, B_CONTEXT_SWITCH, ICON_ANIM, xco+=XIC, yco, XIC, YIC, &(sbuts->tab[CONTEXT_SCENE]), 1.0, (float)TAB_SCENE_ANIM, 0, 0, "Anim/playback buttons"); - uiDefIconButC(block, ROW, B_CONTEXT_SWITCH, ICON_SOUND, xco+=XIC, yco, XIC, YIC, &(sbuts->tab[CONTEXT_SCENE]), 1.0, (float)TAB_SCENE_SOUND, 0, 0, "Sound block buttons"); - - break; - case CONTEXT_OBJECT: - uiBlockBeginAlign(block); - uiDefIconButC(block, ROW, B_CONTEXT_SWITCH, ICON_OBJECT_DATA, xco+=XIC, yco, XIC, YIC, &(sbuts->tab[CONTEXT_OBJECT]), 1.0, (float)TAB_OBJECT_OBJECT, 0, 0, "Object buttons "); - uiDefIconButC(block, ROW, B_CONTEXT_SWITCH, ICON_PHYSICS, xco+=XIC, yco, XIC, YIC, &(sbuts->tab[CONTEXT_OBJECT]), 1.0, (float)TAB_OBJECT_PHYSICS, 0, 0, "Physics buttons"); - uiDefIconButC(block, ROW, B_CONTEXT_SWITCH, ICON_PARTICLES, xco+=XIC, yco, XIC, YIC, &(sbuts->tab[CONTEXT_OBJECT]), 1.0, (float)TAB_OBJECT_PARTICLE, 0, 0, "Particle buttons"); - - break; - case CONTEXT_SHADING: - uiBlockBeginAlign(block); - uiDefIconButC(block, ROW, B_BUTSPREVIEW, ICON_LAMP, xco+=XIC, yco, XIC, YIC, &(sbuts->tab[CONTEXT_SHADING]), 1.0, (float)TAB_SHADING_LAMP, 0, 0, "Lamp buttons"); - uiDefIconButC(block, ROW, B_BUTSPREVIEW, ICON_MATERIAL, xco+=XIC, yco, XIC, YIC, &(sbuts->tab[CONTEXT_SHADING]), 1.0, (float)TAB_SHADING_MAT, 0, 0, "Material buttons"); - uiDefIconButC(block, ROW, B_BUTSPREVIEW, ICON_TEXTURE, xco+=XIC, yco, XIC, YIC, &(sbuts->tab[CONTEXT_SHADING]), 1.0, (float)TAB_SHADING_TEX, 0, 0, "Texture buttons(F6)"); - uiDefIconButC(block, ROW, B_CONTEXT_SWITCH, ICON_RADIO,xco+=XIC, yco, XIC, YIC, &(sbuts->tab[CONTEXT_SHADING]), 1.0, (float)TAB_SHADING_RAD, 0, 0, "Radiosity buttons"); - uiDefIconButC(block, ROW, B_BUTSPREVIEW, ICON_WORLD, xco+=XIC, yco, XIC, YIC, &(sbuts->tab[CONTEXT_SHADING]), 1.0, (float)TAB_SHADING_WORLD, 0, 0, "World buttons"); - - break; - case CONTEXT_EDITING: - - break; - case CONTEXT_SCRIPT: - - break; - case CONTEXT_LOGIC: - - break; + // Default panels + uiBlockBeginAlign(block); + uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_SCENE, xco, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_SCENE, 0, 0, "Scene"); + uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_WORLD, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_WORLD, 0, 0, "World"); + + // Specific panels, check on active object seletion + if(ob) { + uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_OBJECT_DATA, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_OBJECT, 0, 0, "Object"); + + if(ELEM5(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_LATTICE)) + uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_MODIFIER, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_MODIFIER, 0, 0, "Modifier"); + + uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, dataicon, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_DATA, 0, 0, "Object Data"); + if((ob->type == OB_ARMATURE)) + uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_BONE_DATA, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_BONE, 0, 0, "Bone"); + if(ELEM5(ob->type, OB_MESH, OB_SURF, OB_MBALL, OB_CURVE, OB_FONT)) + uiDefIconButS(block, ROW, B_BUTSPREVIEW, ICON_MATERIAL, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_MATERIAL, 0, 0, "Material"); + if(ELEM6(ob->type, OB_MESH, OB_SURF, OB_MBALL, OB_CURVE, OB_FONT, OB_LAMP)) + uiDefIconButS(block, ROW, B_BUTSPREVIEW, ICON_TEXTURE, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_TEXTURE, 0, 0, "Texture"); + if(ELEM5(ob->type, OB_MESH, OB_SURF, OB_MBALL, OB_CURVE, OB_FONT)) + uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_PARTICLES, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_PARTICLE, 0, 0, "Particles"); + if(ELEM6(ob->type, OB_MESH, OB_SURF, OB_MBALL, OB_CURVE, OB_FONT, OB_EMPTY)) + uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_PHYSICS, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_PHYSICS, 0, 0, "Physics"); } + xco+= XIC; uiBlockEndAlign(block); diff --git a/source/blender/editors/space_buttons/buttons_intern.h b/source/blender/editors/space_buttons/buttons_intern.h index e979e815e18..6050b4f0562 100644 --- a/source/blender/editors/space_buttons/buttons_intern.h +++ b/source/blender/editors/space_buttons/buttons_intern.h @@ -32,33 +32,19 @@ struct ARegion; struct ARegionType; struct bContext; -/* warning: the values of these defines are used in sbuts->tabs[7] */ +/* warning: the values of these defines are used in sbuts->tabs[8] */ /* buts->mainb new */ -#define CONTEXT_SCENE 0 -#define CONTEXT_OBJECT 1 -#define CONTEXT_TYPES 2 -#define CONTEXT_SHADING 3 -#define CONTEXT_EDITING 4 -#define CONTEXT_SCRIPT 5 -#define CONTEXT_LOGIC 6 - -/* buts->tab new */ -#define TAB_SHADING_MAT 0 -#define TAB_SHADING_TEX 1 -#define TAB_SHADING_RAD 2 -#define TAB_SHADING_WORLD 3 -#define TAB_SHADING_LAMP 4 - -#define TAB_OBJECT_OBJECT 0 -#define TAB_OBJECT_PHYSICS 1 -#define TAB_OBJECT_PARTICLE 2 - -#define TAB_SCENE_RENDER 0 -#define TAB_SCENE_WORLD 1 -#define TAB_SCENE_ANIM 2 -#define TAB_SCENE_SOUND 3 -#define TAB_SCENE_SEQUENCER 4 - +#define BCONTEXT_SCENE 0 +#define BCONTEXT_WORLD 1 +#define BCONTEXT_OBJECT 2 +#define BCONTEXT_DATA 3 +#define BCONTEXT_MATERIAL 4 +#define BCONTEXT_TEXTURE 5 +#define BCONTEXT_PARTICLE 6 +#define BCONTEXT_PHYSICS 7 +#define BCONTEXT_GAME 8 +#define BCONTEXT_BONE 9 +#define BCONTEXT_MODIFIER 10 /* buts->scaflag */ #define BUTS_SENS_SEL 1 @@ -73,13 +59,10 @@ struct bContext; #define BUTS_SENS_STATE 512 #define BUTS_ACT_STATE 1024 - /* internal exports only */ /* image_header.c */ void buttons_header_buttons(const struct bContext *C, struct ARegion *ar); -void buttons_scene(const struct bContext *C, struct ARegion *ar); -void buttons_object_register(struct ARegionType *art); #endif /* ED_BUTTONS_INTERN_H */ diff --git a/source/blender/editors/space_buttons/buttons_object.c b/source/blender/editors/space_buttons/buttons_object.c deleted file mode 100644 index 965376b731a..00000000000 --- a/source/blender/editors/space_buttons/buttons_object.c +++ /dev/null @@ -1,216 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#include <stdio.h> -#include <stdlib.h> - -#include "MEM_guardedalloc.h" - -#include "DNA_group_types.h" -#include "DNA_object_types.h" -#include "DNA_screen_types.h" -#include "DNA_space_types.h" - -#include "BLI_listbase.h" - -#include "BKE_context.h" -#include "BKE_group.h" -#include "BKE_main.h" -#include "BKE_screen.h" - -#include "UI_interface.h" -#include "UI_resources.h" - -#include "RNA_access.h" - -#include "WM_types.h" - -static void object_panel_transform(const bContext *C, Panel *pnl) -{ - uiLayout *layout= pnl->layout; - Object *ob= CTX_data_active_object(C); - PointerRNA obptr; - - RNA_id_pointer_create(&ob->id, &obptr); - - uiTemplateColumn(layout); - uiItemR(layout, UI_TSLOT_COLUMN_1, NULL, 0, &obptr, "location"); - uiItemR(layout, UI_TSLOT_COLUMN_2, NULL, 0, &obptr, "rotation"); - uiItemR(layout, UI_TSLOT_COLUMN_3, NULL, 0, &obptr, "scale"); -} - -static void object_panel_groups(const bContext *C, Panel *pnl) -{ - uiLayout *layout= pnl->layout; - Main *bmain= CTX_data_main(C); - Object *ob= CTX_data_active_object(C); - Group *group; - PointerRNA obptr, groupptr; - uiLayout *sublayout; - - RNA_id_pointer_create(&ob->id, &obptr); - - uiTemplateColumn(layout); - uiItemR(layout, UI_TSLOT_COLUMN_1, NULL, 0, &obptr, "pass_index"); - uiItemR(layout, UI_TSLOT_COLUMN_2, NULL, 0, &obptr, "parent"); - - /* uiTemplateLeftRight(layout); - uiItemO(layout, UI_TSLOT_LR_LEFT, NULL, 0, "OBJECT_OT_add_group"); */ - - for(group=bmain->group.first; group; group=group->id.next) { - if(object_in_group(ob, group)) { - RNA_id_pointer_create(&group->id, &groupptr); - - sublayout= uiTemplateStack(layout); - - uiTemplateLeftRight(sublayout); - uiItemR(sublayout, UI_TSLOT_LR_LEFT, NULL, 0, &groupptr, "name"); - // uiItemO(sublayout, UI_TSLOT_LR_RIGHT, "", ICON_X, "OBJECT_OT_remove_group"); - - uiTemplateColumn(sublayout); - uiItemR(sublayout, UI_TSLOT_COLUMN_1, NULL, 0, &groupptr, "layer"); - uiItemR(sublayout, UI_TSLOT_COLUMN_2, NULL, 0, &groupptr, "dupli_offset"); - } - } -} - -static void object_panel_display(const bContext *C, Panel *pnl) -{ - uiLayout *layout= pnl->layout; - Object *ob= CTX_data_active_object(C); - PointerRNA obptr; - - RNA_id_pointer_create(&ob->id, &obptr); - - uiTemplateColumn(layout); - uiItemR(layout, UI_TSLOT_COLUMN_1, "Type", 0, &obptr, "max_draw_type"); - uiItemR(layout, UI_TSLOT_COLUMN_2, "Bounds", 0, &obptr, "draw_bounds_type"); - - uiTemplateColumn(layout); - uiItemLabel(layout, UI_TSLOT_COLUMN_1, "Extra", 0); - uiItemR(layout, UI_TSLOT_COLUMN_1, "Name", 0, &obptr, "draw_name"); - uiItemR(layout, UI_TSLOT_COLUMN_1, "Axis", 0, &obptr, "draw_axis"); - uiItemR(layout, UI_TSLOT_COLUMN_1, "Wire", 0, &obptr, "draw_wire"); - uiItemLabel(layout, UI_TSLOT_COLUMN_2, "", 0); - uiItemR(layout, UI_TSLOT_COLUMN_2, "Texture Space", 0, &obptr, "draw_texture_space"); - uiItemR(layout, UI_TSLOT_COLUMN_2, "X-Ray", 0, &obptr, "x_ray"); - uiItemR(layout, UI_TSLOT_COLUMN_2, "Transparency", 0, &obptr, "draw_transparent"); -} - -static void object_panel_duplication(const bContext *C, Panel *pnl) -{ - uiLayout *layout= pnl->layout; - Object *ob= CTX_data_active_object(C); - PointerRNA obptr; - - RNA_id_pointer_create(&ob->id, &obptr); - - uiTemplateColumn(layout); - uiItemR(layout, UI_TSLOT_COLUMN_1, "Frames", 0, &obptr, "dupli_frames"); - uiItemR(layout, UI_TSLOT_COLUMN_2, "Verts", 0, &obptr, "dupli_verts"); - uiItemR(layout, UI_TSLOT_COLUMN_3, "Faces", 0, &obptr, "dupli_faces"); - uiItemR(layout, UI_TSLOT_COLUMN_4, "Group", 0, &obptr, "use_dupli_group"); - - if(RNA_boolean_get(&obptr, "dupli_frames")) { - uiTemplateColumn(layout); - uiItemR(layout, UI_TSLOT_COLUMN_1, "Start:", 0, &obptr, "dupli_frames_start"); - uiItemR(layout, UI_TSLOT_COLUMN_1, "End:", 0, &obptr, "dupli_frames_end"); - - uiItemR(layout, UI_TSLOT_COLUMN_2, "On:", 0, &obptr, "dupli_frames_on"); - uiItemR(layout, UI_TSLOT_COLUMN_2, "Off:", 0, &obptr, "dupli_frames_off"); - } -} - -static void object_panel_animation(const bContext *C, Panel *pnl) -{ - uiLayout *layout= pnl->layout; - Object *ob= CTX_data_active_object(C); - PointerRNA obptr; - - RNA_id_pointer_create(&ob->id, &obptr); - - uiTemplateColumn(layout); - uiItemLabel(layout, UI_TSLOT_COLUMN_1, "Time Offset:", 0); - uiItemR(layout, UI_TSLOT_COLUMN_1, "Edit", 0, &obptr, "time_offset_edit"); - uiItemR(layout, UI_TSLOT_COLUMN_1, "Particle", 0, &obptr, "time_offset_particle"); - uiItemR(layout, UI_TSLOT_COLUMN_1, "Parent", 0, &obptr, "time_offset_parent"); - uiItemR(layout, UI_TSLOT_COLUMN_1, NULL, 0, &obptr, "slow_parent"); - uiItemR(layout, UI_TSLOT_COLUMN_1, "Offset: ", 0, &obptr, "time_offset"); - - uiItemLabel(layout, UI_TSLOT_COLUMN_2, "Tracking:", 0); - uiItemR(layout, UI_TSLOT_COLUMN_2, "Axis: ", 0, &obptr, "track_axis"); - uiItemR(layout, UI_TSLOT_COLUMN_2, "Up Axis: ", 0, &obptr, "up_axis"); - uiItemR(layout, UI_TSLOT_COLUMN_2, "Rotation", 0, &obptr, "track_rotation"); -} - -void buttons_object_register(ARegionType *art) -{ - PanelType *pt; - - /* panels: transform */ - pt= MEM_callocN(sizeof(PanelType), "spacetype buttons panel"); - pt->idname= "OBJECT_PT_transform"; - pt->name= "Transform"; - pt->context= "object"; - pt->draw= object_panel_transform; - BLI_addtail(&art->paneltypes, pt); - - /* panels: groups */ - pt= MEM_callocN(sizeof(PanelType), "spacetype buttons panel"); - pt->idname= "OBJECT_PT_groups"; - pt->name= "Groups"; - pt->context= "object"; - pt->draw= object_panel_groups; - BLI_addtail(&art->paneltypes, pt); - - /* panels: display */ - pt= MEM_callocN(sizeof(PanelType), "spacetype buttons panel"); - pt->idname= "OBJECT_PT_display"; - pt->name= "Display"; - pt->context= "object"; - pt->draw= object_panel_display; - BLI_addtail(&art->paneltypes, pt); - - /* panels: duplication */ - pt= MEM_callocN(sizeof(PanelType), "spacetype buttons panel"); - pt->idname= "OBJECT_PT_duplication"; - pt->name= "Duplication"; - pt->context= "object"; - pt->draw= object_panel_duplication; - BLI_addtail(&art->paneltypes, pt); - - /* panels: animation */ - pt= MEM_callocN(sizeof(PanelType), "spacetype buttons panel"); - pt->idname= "OBJECT_PT_animation"; - pt->name= "Animation"; - pt->context= "object"; - pt->draw= object_panel_animation; - BLI_addtail(&art->paneltypes, pt); -} - diff --git a/source/blender/editors/space_buttons/buttons_scene.c b/source/blender/editors/space_buttons/buttons_scene.c deleted file mode 100644 index ca645ab1845..00000000000 --- a/source/blender/editors/space_buttons/buttons_scene.c +++ /dev/null @@ -1,333 +0,0 @@ -/** - * $Id: - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2008 Blender Foundation. - * All rights reserved. - * - * - * Contributor(s): Blender Foundation - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#include <stdio.h> -#include <stdlib.h> - -#include "DNA_space_types.h" -#include "DNA_scene_types.h" -#include "DNA_screen_types.h" - -#include "BLI_threads.h" - -#include "BKE_context.h" -#include "BKE_global.h" - -#include "RE_pipeline.h" - -#include "RNA_access.h" -#include "RNA_define.h" - -#include "UI_interface.h" -#include "UI_resources.h" - -#include "WM_types.h" - -#include "buttons_intern.h" - -#define R_DISPLAYIMAGE 0 -#define R_DISPLAYWIN 1 -#define R_DISPLAYSCREEN 2 - -static void render_panel_output(const bContext *C, ARegion *ar) -{ - uiBlock *block; - Scene *scene= CTX_data_scene(C); - //ID *id; - int a,b; - //char *strp; - - block= uiBeginBlock(C, ar, "render_panel_output", UI_EMBOSS, UI_HELV); - if(uiNewPanel(C, ar, block, "Output", "Render", 0, 0, 318, 204)==0) return; - - uiBlockBeginAlign(block); - uiDefIconBut(block, BUT, 0, ICON_FILESEL, 10, 190, 20, 20, 0, 0, 0, 0, 0, "Select the directory/name for saving animations"); - uiDefBut(block, TEX,0,"", 31, 190, 279, 20,scene->r.pic, 0.0,79.0, 0, 0, "Directory/name to save animations, # characters defines the position and length of frame numbers"); - uiDefIconBut(block, BUT,0, ICON_FILESEL, 10, 168, 20, 20, 0, 0, 0, 0, 0, "Select the directory/name for a Backbuf image"); - uiDefBut(block, TEX,0,"", 31, 168, 259, 20,scene->r.backbuf, 0.0,79.0, 0, 0, "Image to use as background for rendering"); - uiDefIconButBitS(block, ICONTOG, R_BACKBUF, 0, ICON_CHECKBOX_HLT-1, 290, 168, 20, 20, &scene->r.bufflag, 0.0, 0.0, 0, 0, "Enable/Disable use of Backbuf image"); - uiBlockEndAlign(block); - - uiDefButBitI(block, TOG, R_EXTENSION, 0, "Extensions", 10, 142, 100, 20, &scene->r.scemode, 0.0, 0.0, 0, 0, "Adds filetype extensions to the filename when rendering animations"); - - uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, R_TOUCH, 0, "Touch", 170, 142, 50, 20, &scene->r.mode, 0.0, 0.0, 0, 0, "Create an empty file before rendering each frame, remove if cancelled (and empty)"); - uiDefButBitI(block, TOG, R_NO_OVERWRITE, 0, "No Overwrite", 220, 142, 90, 20, &scene->r.mode, 0.0, 0.0, 0, 0, "Skip rendering frames when the file exists (image output only)"); - uiBlockEndAlign(block); - - /* SET BUTTON */ - uiBlockBeginAlign(block); - /*XXX id= (ID *)scene->set; - IDnames_to_pupstring(&strp, NULL, NULL, &(G.main->scene), id, &(G.buts->menunr)); - if(strp[0]) - uiDefButS(block, MENU, 0, strp, 10, 114, 20, 20, &(G.buts->menunr), 0, 0, 0, 0, "Scene to link as a Set"); - MEM_freeN(strp);*/ - - if(scene->set) { - uiBlockSetButLock(block, 1, NULL); - //XXX uiDefIDPoinBut(block, test_scenepoin_but, ID_SCE, 0, "", 31, 114, 100, 20, &(scene->set), "Name of the Set"); - uiBlockClearButLock(block); - uiDefIconBut(block, BUT, 0, ICON_X, 132, 114, 20, 20, 0, 0, 0, 0, 0, "Remove Set link"); - } else { - uiDefBut(block, LABEL, 0, "No Set Scene", 31, 114, 200, 20, 0, 0, 0, 0, 0, ""); - } - uiBlockEndAlign(block); - - uiBlockBeginAlign(block); - uiDefIconButBitI(block, TOGN, R_FIXED_THREADS, 0, ICON_AUTO, 10, 63, 20, 20, &scene->r.mode, 0.0, 0.0, 0, 0, "Automatically set the threads to the number of processors on the system"); - if ((scene->r.mode & R_FIXED_THREADS)==0) { - char thread_str[16]; - sprintf(thread_str, " Threads: %d", BLI_system_thread_count()); - uiDefBut(block, LABEL, 0, thread_str, 30, 63,80,20, 0, 0, 0, 0, 0, ""); - } else { - uiDefButS(block, NUM, 0, "Threads:", 30, 63, 80, 20, &scene->r.threads, 1, BLENDER_MAX_THREADS, 0, 0, "Amount of threads for render (takes advantage of multi-core and multi-processor computers)"); - } - uiBlockEndAlign(block); - - uiBlockSetCol(block, TH_AUTO); - - uiBlockBeginAlign(block); - for(b=2; b>=0; b--) - for(a=0; a<3; a++) - uiDefButBitS(block, TOG, 1<<(3*b+a), 800,"", (short)(10+18*a),(short)(10+14*b),16,12, &G.winpos, 0, 0, 0, 0, "Render window placement on screen"); - uiBlockEndAlign(block); - -#ifdef WITH_OPENEXR - uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, R_EXR_TILE_FILE, 0, "Save Buffers", 72, 31, 120, 19, &scene->r.scemode, 0.0, 0.0, 0, 0, "Save tiles for all RenderLayers and used SceneNodes to files in the temp directory (saves memory, allows Full Sampling)"); - if(scene->r.scemode & R_EXR_TILE_FILE) - uiDefButBitI(block, TOG, R_FULL_SAMPLE, 0, "FullSample", 192, 31, 118, 19, &scene->r.scemode, 0.0, 0.0, 0, 0, "Saves for every OSA sample the entire RenderLayer results (Higher quality sampling but slower)"); - uiBlockEndAlign(block); -#endif - - uiDefButS(block, MENU, 0, "Render Display %t|Render Window %x1|Image Editor %x0|Full Screen %x2", - 72, 10, 120, 19, &G.displaymode, 0.0, (float)R_DISPLAYWIN, 0, 0, "Sets render output display"); - - /* Dither control */ - uiDefButF(block, NUM,0, "Dither:", 10,89,100,19, &scene->r.dither_intensity, 0.0, 2.0, 0, 0, "The amount of dithering noise present in the output image (0.0 = no dithering)"); - - /* Toon shading buttons */ - uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, R_EDGE, 0,"Edge", 115, 89, 60, 20, &scene->r.mode, 0, 0, 0, 0, "Enable Toon Edge-enhance"); - //XXX uiDefBlockBut(block, edge_render_menu, NULL, "Edge Settings", 175, 89, 135, 20, "Display Edge settings"); - uiBlockEndAlign(block); - - uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, R_NO_TEX, 0, "Disable Tex", 115, 63, 75, 20, &scene->r.scemode, 0.0, 0.0, 0, 0, "Disables Textures for render"); - uiDefButBitI(block, TOG, R_FREE_IMAGE, 0, "Free Tex Images", 210, 63, 100, 20, &scene->r.scemode, 0.0, 0.0, 0, 0, "Frees all Images used by Textures after each render"); - uiBlockEndAlign(block); - - uiEndBlock(C, block); -} - -static void do_bake_func(bContext *C, void *unused_v, void *unused_p) -{ - //XXX objects_bake_render_ui(0); -} - -static void render_panel_bake(const bContext *C, ARegion *ar) -{ - uiBlock *block; - Scene *scene= CTX_data_scene(C); - uiBut *but; - - block= uiBeginBlock(C, ar, "render_panel_bake", UI_EMBOSS, UI_HELV); - uiNewPanelTabbed("Anim", "Render"); - if(uiNewPanel(C, ar, block, "Bake", "Render", 320, 0, 318, 204)==0) return; - - but= uiDefBut(block, BUT, 0, "BAKE", 10, 150, 190,40, 0, 0, 0, 0, 0, "Start the bake render for selected Objects"); - uiButSetFunc(but, do_bake_func, NULL, NULL); - - uiBlockBeginAlign(block); - uiDefButBitS(block, TOG, R_BAKE_TO_ACTIVE, 0, "Selected to Active", 10,120,190,20,&scene->r.bake_flag, 0.0, 0, 0, 0, "Bake shading on the surface of selected objects to the active object"); - uiDefButF(block, NUM, 0, "Dist:", 10,100,95,20,&scene->r.bake_maxdist, 0.0, 1000.0, 1, 0, "Maximum distance from active object to other object (in blender units)"); - uiDefButF(block, NUM, 0, "Bias:", 105,100,95,20,&scene->r.bake_biasdist, 0.0, 1000.0, 1, 0, "Bias towards faces further away from the object (in blender units)"); - uiBlockEndAlign(block); - - if(scene->r.bake_mode == RE_BAKE_NORMALS) - uiDefButS(block, MENU, 0, "Normal Space %t|Camera %x0|World %x1|Object %x2|Tangent %x3", - 10,70,190,20, &scene->r.bake_normal_space, 0, 0, 0, 0, "Choose normal space for baking"); - else if(scene->r.bake_mode == RE_BAKE_AO || scene->r.bake_mode == RE_BAKE_DISPLACEMENT) { - uiDefButBitS(block, TOG, R_BAKE_NORMALIZE, 0, "Normalized", 10,70,190,20, &scene->r.bake_flag, 0.0, 0, 0, 0, - scene->r.bake_mode == RE_BAKE_AO ? - "Bake ambient occlusion normalized, without taking into acount material settings": - "Normalized displacement value to fit the 'Dist' range" - ); - } - - uiDefButS(block, MENU, 0, "Quad Split Order%t|Quad Split Auto%x0|Quad Split A (0,1,2) (0,2,3)%x1|Quad Split B (1,2,3) (1,3,0)%x2", - 10,10,190,20, &scene->r.bake_quad_split, 0, 0, 0, 0, "Method to divide quads (use A or B for external applications that use a fixed order)"); - -#if 0 - uiBlockBeginAlign(block); - uiDefButBitS(block, TOG, R_BAKE_OSA, 0, "OSA", 10,120,190,20, &scene->r.bake_flag, 0, 0, 0, 0, "Enables Oversampling (Anti-aliasing)"); - uiDefButS(block, ROW,0,"5", 10,100,50,20,&scene->r.bake_osa,2.0,5.0, 0, 0, "Sets oversample level to 5"); - uiDefButS(block, ROW,0,"8", 60,100,45,20,&scene->r.bake_osa,2.0,8.0, 0, 0, "Sets oversample level to 8"); - uiDefButS(block, ROW,0,"11", 105,100,45,20,&scene->r.bake_osa,2.0,11.0, 0, 0, "Sets oversample level to 11"); - uiDefButS(block, ROW,0,"16", 150,100,50,20,&scene->r.bake_osa,2.0,16.0, 0, 0, "Sets oversample level to 16"); -#endif - uiBlockBeginAlign(block); - uiDefButS(block, ROW,0,"Full Render", 210,170,120,20,&scene->r.bake_mode, 1.0, RE_BAKE_ALL, 0, 0, ""); - uiDefButS(block, ROW,0,"Ambient Occlusion",210,150,120,20,&scene->r.bake_mode, 1.0, RE_BAKE_AO, 0, 0, ""); - uiDefButS(block, ROW,0,"Shadow", 210,130,120,20,&scene->r.bake_mode, 1.0, RE_BAKE_SHADOW, 0, 0, ""); - uiDefButS(block, ROW,0,"Normals", 210,110,120,20,&scene->r.bake_mode, 1.0, RE_BAKE_NORMALS, 0, 0, ""); - uiDefButS(block, ROW,0,"Textures", 210,90,120,20,&scene->r.bake_mode, 1.0, RE_BAKE_TEXTURE, 0, 0, ""); - uiDefButS(block, ROW,0,"Displacement", 210,70,120,20,&scene->r.bake_mode, 1.0, RE_BAKE_DISPLACEMENT, 0, 0, ""); - uiBlockEndAlign(block); - - uiDefButBitS(block, TOG, R_BAKE_CLEAR, 0, "Clear", 210,40,120,20,&scene->r.bake_flag, 0.0, 0, 0, 0, "Clear Images before baking"); - - uiDefButS(block, NUM, 0,"Margin:", 210,10,120,20,&scene->r.bake_filter, 0.0, 32.0, 0, 0, "Amount of pixels to extend the baked result with, as post process filter"); - - uiEndBlock(C, block); -} - -static void render_panel_render(const bContext *C, ARegion *ar) -{ - uiBlock *block; - Scene *scene= CTX_data_scene(C); - char str[256]; - - block= uiBeginBlock(C, ar, "render_panel_render", UI_EMBOSS, UI_HELV); - if(uiNewPanel(C, ar, block, "Render", "Render", 320, 0, 318, 204)==0) return; - - uiBlockBeginAlign(block); - uiDefButO(block, BUT, "SCREEN_OT_render", WM_OP_INVOKE_DEFAULT, "RENDER", 369, 164, 191,37, "Render the current frame (F12)"); - -#ifndef DISABLE_YAFRAY - /* yafray: on request, render engine menu is back again, and moved to Render panel */ - uiDefButS(block, MENU, 0, "Rendering Engine %t|Blender Internal %x0|YafRay %x1", - 369, 142, 191, 20, &scene->r.renderer, 0, 0, 0, 0, "Choose rendering engine"); -#else - uiDefButS(block, MENU, 0, "Rendering Engine %t|Blender Internal %x0", - 369, 142, 191, 20, &scene->r.renderer, 0, 0, 0, 0, "Choose rendering engine"); -#endif /* disable yafray */ - - uiBlockBeginAlign(block); - if((scene->r.scemode & R_FULL_SAMPLE) && (scene->r.scemode & R_EXR_TILE_FILE)) - uiDefButBitI(block, TOG, R_OSA, 0, "FSA", 369,109,122,20,&scene->r.mode, 0, 0, 0, 0, "Saves all samples, then composites, and then merges (for best Anti-aliasing)"); - else - uiDefButBitI(block, TOG, R_OSA, 0, "OSA", 369,109,122,20,&scene->r.mode, 0, 0, 0, 0, "Enables Oversampling (Anti-aliasing)"); - uiDefButS(block, ROW,0,"5", 369,88,29,20,&scene->r.osa,2.0,5.0, 0, 0, "Render 5 samples per pixel for smooth edges (Fast)"); - uiDefButS(block, ROW,0,"8", 400,88,29,20,&scene->r.osa,2.0,8.0, 0, 0, "Render 8 samples per pixel for smooth edges (Recommended)"); - uiDefButS(block, ROW,0,"11", 431,88,29,20,&scene->r.osa,2.0,11.0, 0, 0, "Render 11 samples per pixel for smooth edges (High Quality)"); - uiDefButS(block, ROW,0,"16", 462,88,29,20,&scene->r.osa,2.0,16.0, 0, 0, "Render 16 samples per pixel for smooth edges (Highest Quality)"); - uiBlockEndAlign(block); - - uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, R_MBLUR, 0, "MBLUR", 496,109,64,20,&scene->r.mode, 0, 0, 0, 0, "Enables Motion Blur calculation"); - uiDefButF(block, NUM,0,"Bf:", 496,88,64,20,&scene->r.blurfac, 0.01, 5.0, 10, 2, "Sets motion blur factor"); - uiBlockEndAlign(block); - - uiBlockBeginAlign(block); - uiDefButS(block, NUM,0,"Xparts:", 369,46,95,29,&scene->r.xparts,1.0, 512.0, 0, 0, "Sets the number of horizontal parts to render image in (For panorama sets number of camera slices)"); - uiDefButS(block, NUM,0,"Yparts:", 465,46,95,29,&scene->r.yparts,1.0, 64.0, 0, 0, "Sets the number of vertical parts to render image in"); - uiBlockEndAlign(block); - - uiBlockBeginAlign(block); - uiDefButS(block, ROW,800,"Sky", 369,13,35,20,&scene->r.alphamode,3.0,0.0, 0, 0, "Fill background with sky"); - uiDefButS(block, ROW,800,"Premul", 405,13,50,20,&scene->r.alphamode,3.0,1.0, 0, 0, "Multiply alpha in advance"); - uiDefButS(block, ROW,800,"Key", 456,13,35,20,&scene->r.alphamode,3.0,2.0, 0, 0, "Alpha and color values remain unchanged"); - uiBlockEndAlign(block); - - uiDefButS(block, MENU, 0,"Octree resolution %t|64 %x64|128 %x128|256 %x256|512 %x512", 496,13,64,20,&scene->r.ocres,0.0,0.0, 0, 0, "Octree resolution for ray tracing and baking, Use higher values for complex scenes"); - - uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, R_SHADOW, 0,"Shadow", 565,172,52,29, &scene->r.mode, 0, 0, 0, 0, "Enable shadow calculation"); - uiDefButBitI(block, TOG, R_SSS, 0,"SSS", 617,172,32,29, &scene->r.mode, 0, 0, 0, 0, "Enable subsurface scattering map rendering"); - uiDefButBitI(block, TOG, R_PANORAMA, 0,"Pano", 649,172,38,29, &scene->r.mode, 0, 0, 0, 0, "Enable panorama rendering (output width is multiplied by Xparts)"); - uiDefButBitI(block, TOG, R_ENVMAP, 0,"EnvMap", 565,142,52,29, &scene->r.mode, 0, 0, 0, 0, "Enable environment map rendering"); - uiDefButBitI(block, TOG, R_RAYTRACE, 0,"Ray",617,142,32,29, &scene->r.mode, 0, 0, 0, 0, "Enable ray tracing"); - uiDefButBitI(block, TOG, R_RADIO, 0,"Radio", 649,142,38,29, &scene->r.mode, 0, 0, 0, 0, "Enable radiosity rendering"); - uiBlockEndAlign(block); - - uiDefButS(block, NUMSLI, 0, "Size %: ", - 565,109,122,20, - &(scene->r.size), 1.0, 100.0, 0, 0, - "Render at percentage of frame size"); - - uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, R_FIELDS, 0,"Fields", 565,55,60,20,&scene->r.mode, 0, 0, 0, 0, "Enables field rendering"); - uiDefButBitI(block, TOG, R_ODDFIELD, 0,"Odd", 627,55,39,20,&scene->r.mode, 0, 0, 0, 0, "Enables Odd field first rendering (Default: Even field)"); - uiDefButBitI(block, TOG, R_FIELDSTILL, 0,"X", 668,55,19,20,&scene->r.mode, 0, 0, 0, 0, "Disables time difference in field calculations"); - - sprintf(str, "Filter%%t|Box %%x%d|Tent %%x%d|Quad %%x%d|Cubic %%x%d|Gauss %%x%d|CatRom %%x%d|Mitch %%x%d", R_FILTER_BOX, R_FILTER_TENT, R_FILTER_QUAD, R_FILTER_CUBIC, R_FILTER_GAUSS, R_FILTER_CATROM, R_FILTER_MITCH); - uiDefButS(block, MENU, 0,str, 565,34,60,20, &scene->r.filtertype, 0, 0, 0, 0, "Set sampling filter for antialiasing"); - uiDefButF(block, NUM,0,"", 627,34,60,20,&scene->r.gauss,0.5, 1.5, 10, 2, "Sets the filter size"); - - uiDefButBitI(block, TOG, R_BORDER, 0, "Border", 565,13,122,20, &scene->r.mode, 0, 0, 0, 0, "Render a small cut-out of the image (Shift+B to set in the camera view)"); - uiBlockEndAlign(block); - - uiEndBlock(C, block); -} - - -void render_panel_anim(const bContext *C, ARegion *ar) -{ - Scene *scene= CTX_data_scene(C); - uiBlock *block; - uiBut *but; - - block= uiBeginBlock(C, ar, "render_panel_anim", UI_EMBOSS, UI_HELV); - if(uiNewPanel(C, ar, block, "Anim", "Render", 640, 0, 318, 204) == 0) return; - - but= uiDefButO(block, BUT, "SCREEN_OT_render", WM_OP_INVOKE_DEFAULT, "ANIM", 692,142,192,47, "Render the animation to disk from start to end frame, (Ctrl+F12)"); - RNA_boolean_set(uiButGetOperatorPtrRNA(but), "anim", 1); - - uiBlockSetCol(block, TH_BUT_SETTING1); - uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, R_DOSEQ, 0, "Do Sequence",692,114,192,20, &scene->r.scemode, 0, 0, 0, 0, "Enables sequence output rendering (Default: 3D rendering)"); - uiDefButBitI(block, TOG, R_DOCOMP, 0, "Do Composite",692,90,192,20, &scene->r.scemode, 0, 0, 0, 0, "Uses compositing nodes for output rendering"); - uiBlockEndAlign(block); - - uiBlockSetCol(block, TH_AUTO); - uiDefBut(block, BUT, 0, "PLAY",692,50,94,33, 0, 0, 0, 0, 0, "Play rendered images/avi animation (Ctrl+F11), (Play Hotkeys: A-Noskip, P-PingPong)"); - uiDefButS(block, NUM, 0, "rt:",789,50,95,33, &G.rt, -1000.0, 1000.0, 0, 0, "General testing/debug button"); - - uiBlockBeginAlign(block); - uiDefButI(block, NUM,0,"Sta:",692,20,94,24, &scene->r.sfra,1.0,MAXFRAMEF, 0, 0, "The start frame of the animation (inclusive)"); - uiDefButI(block, NUM,0,"End:",789,20,95,24, &scene->r.efra,SFRA,MAXFRAMEF, 0, 0, "The end frame of the animation (inclusive)"); - uiDefButI(block, NUM,0,"Step:",692,0,192,18, &scene->frame_step, 1.0, MAXFRAMEF, 0, 0, "Frame Step"); - uiBlockEndAlign(block); - - uiEndBlock(C, block); -} - -void buttons_scene(const bContext *C, ARegion *ar) -{ - SpaceButs *sbuts= (SpaceButs*)CTX_wm_space_data(C); - int tab= sbuts->tab[CONTEXT_SCENE]; - - if(tab == TAB_SCENE_RENDER) { - render_panel_output(C, ar); - render_panel_render(C, ar); - render_panel_anim(C, ar); - render_panel_bake(C, ar); - } -} - diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index bae318ff454..9f5e0f5974a 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -70,6 +70,7 @@ static SpaceLink *buttons_new(const bContext *C) sbuts= MEM_callocN(sizeof(SpaceButs), "initbuts"); sbuts->spacetype= SPACE_BUTS; sbuts->scaflag= BUTS_SENS_LINK|BUTS_SENS_ACT|BUTS_CONT_ACT|BUTS_ACT_ACT|BUTS_ACT_LINK; + sbuts->align= BUT_AUTO; /* header */ ar= MEM_callocN(sizeof(ARegion), "header for buts"); @@ -128,7 +129,15 @@ static void buttons_free(SpaceLink *sl) /* spacetype; init callback */ static void buttons_init(struct wmWindowManager *wm, ScrArea *sa) { + SpaceButs *sbuts= sa->spacedata.first; + /* auto-align based on size */ + if(sbuts->align == BUT_AUTO || !sbuts->align) { + if(sa->winx > sa->winy) + sbuts->align= BUT_HORIZONTAL; + else + sbuts->align= BUT_VERTICAL; + } } static SpaceLink *buttons_duplicate(SpaceLink *sl) @@ -146,8 +155,7 @@ static void buttons_main_area_init(wmWindowManager *wm, ARegion *ar) { ListBase *keymap; -// ar->v2d.minzoom= ar->v2d.maxzoom= 1.0f; - UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_PANELS_UI, ar->winx, ar->winy); + ED_region_panels_init(wm, ar); /* own keymap */ keymap= WM_keymap_listbase(wm, "Buttons", SPACE_BUTS, 0); /* XXX weak? */ @@ -158,51 +166,32 @@ static void buttons_main_area_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ SpaceButs *sbuts= (SpaceButs*)CTX_wm_space_data(C); - - if(sbuts->mainb == CONTEXT_OBJECT) { - int tab= sbuts->tab[CONTEXT_OBJECT]; - int vertical= (sbuts->align == 2); - - if(tab == TAB_OBJECT_OBJECT) - uiRegionPanelLayout(C, ar, vertical, "object"); - } - else { - View2D *v2d= &ar->v2d; - float col[3], fac; - //int align= 0; - - /* clear and setup matrix */ - UI_GetThemeColor3fv(TH_BACK, col); - glClearColor(col[0], col[1], col[2], 0.0); - glClear(GL_COLOR_BUFFER_BIT); - - UI_view2d_view_ortho(C, v2d); - - /* swapbuffers indicator */ - fac= BLI_frand(); - glColor3f(fac, fac, fac); - glRecti(20, v2d->cur.ymin+2, 30, v2d->cur.ymin+12); - - /* panels */ - if(sbuts->mainb == CONTEXT_SCENE) - buttons_scene(C, ar); - else - drawnewstuff(); - -#if 0 - if(sbuts->align) - if(sbuts->re_align || sbuts->mainbo!=sbuts->mainb || sbuts->tabo!=sbuts->tab[sbuts->mainb]) - align= 1; -#endif - - uiDrawPanels(C, 1); // XXX align); - uiMatchPanelsView2d(ar); - - /* reset view matrix */ - UI_view2d_view_restore(C); - - /* scrollers? */ - } + int vertical= (sbuts->align == BUT_VERTICAL); + + if(sbuts->mainb == BCONTEXT_SCENE) + ED_region_panels(C, ar, vertical, "scene"); + else if(sbuts->mainb == BCONTEXT_WORLD) + ED_region_panels(C, ar, vertical, "world"); + else if(sbuts->mainb == BCONTEXT_OBJECT) + ED_region_panels(C, ar, vertical, "object"); + else if(sbuts->mainb == BCONTEXT_DATA) + ED_region_panels(C, ar, vertical, "data"); + else if(sbuts->mainb == BCONTEXT_MATERIAL) + ED_region_panels(C, ar, vertical, "material"); + else if(sbuts->mainb == BCONTEXT_TEXTURE) + ED_region_panels(C, ar, vertical, "texture"); + else if(sbuts->mainb == BCONTEXT_PARTICLE) + ED_region_panels(C, ar, vertical, "particle"); + else if(sbuts->mainb == BCONTEXT_PHYSICS) + ED_region_panels(C, ar, vertical, "physics"); + else if(sbuts->mainb == BCONTEXT_BONE) + ED_region_panels(C, ar, vertical, "bone"); + else if(sbuts->mainb == BCONTEXT_MODIFIER) + ED_region_panels(C, ar, vertical, "modifier"); + + sbuts->re_align= 0; + sbuts->mainbo= sbuts->mainb; + sbuts->tabo= sbuts->tab[sbuts->mainb]; } void buttons_operatortypes(void) @@ -251,6 +240,17 @@ static void buttons_area_listener(ARegion *ar, wmNotifier *wmn) case NC_SCENE: switch(wmn->data) { case ND_FRAME: + case ND_OB_ACTIVE: + ED_region_tag_redraw(ar); + break; + } + break; + case NC_OBJECT: + switch(wmn->data) { + case ND_TRANSFORM: + case ND_BONE_ACTIVE: + case ND_BONE_SELECT: + case ND_GEOM_SELECT: ED_region_tag_redraw(ar); break; } @@ -279,10 +279,7 @@ void ED_spacetype_buttons(void) art->init= buttons_main_area_init; art->draw= buttons_main_area_draw; art->listener= buttons_area_listener; - art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES; - - buttons_object_register(art); - + art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_FRAMES; BLI_addhead(&st->regiontypes, art); /* regions: header */ diff --git a/source/blender/editors/space_file/Makefile b/source/blender/editors/space_file/Makefile index 480a4ee3889..8f48217473c 100644 --- a/source/blender/editors/space_file/Makefile +++ b/source/blender/editors/space_file/Makefile @@ -37,7 +37,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS) CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(OPENGL_HEADERS) -CPPFLAGS += -I$(NAN_BMFONT)/include # not very neat.... CPPFLAGS += -I../../windowmanager @@ -49,6 +48,7 @@ CPPFLAGS += -I../../makesrna CPPFLAGS += -I../../imbuf CPPFLAGS += -I../../render/extern/include CPPFLAGS += -I../../python +CPPFLAGS += -I../../blenfont CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include # own include diff --git a/source/blender/editors/space_file/SConscript b/source/blender/editors/space_file/SConscript index 8302d6eecef..36e042bdaa6 100644 --- a/source/blender/editors/space_file/SConscript +++ b/source/blender/editors/space_file/SConscript @@ -4,8 +4,8 @@ Import ('env') sources = env.Glob('*.c') incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' -incs += ' ../../blenloader #intern/bmfont ../../makesrna' -incs += ' ../../render/extern/include ' +incs += ' ../../blenloader ../../makesrna ../../blenfont' +incs += ' ../../render/extern/include' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' defs = [] diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index c65c486d4bb..55b2910f769 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -37,7 +37,6 @@ #include "BIF_gl.h" #include "BIF_glutil.h" -#include "BMF_Api.h" #include "BKE_colortools.h" #include "BKE_context.h" @@ -45,12 +44,16 @@ #include "BKE_global.h" #include "BKE_utildefines.h" +#include "BLF_api.h" + #include "DNA_space_types.h" #include "DNA_scene_types.h" #include "DNA_screen_types.h" #include "DNA_userdef_types.h" #include "DNA_windowmanager_types.h" +#include "ED_datafiles.h" + #include "IMB_imbuf_types.h" #include "IMB_imbuf.h" @@ -66,7 +69,6 @@ #include "UI_interface.h" #include "UI_interface_icons.h" #include "UI_resources.h" -#include "UI_text.h" #include "UI_view2d.h" #include "WM_api.h" @@ -90,8 +92,6 @@ enum { B_FS_PARENT, } eFile_ButEvents; -/* XXX very bad, need to check font code */ -static int gFontsize=12; static void do_file_buttons(bContext *C, void *arg, int event) { @@ -127,7 +127,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar) /* HEADER */ sprintf(name, "win %p", ar); - block = uiBeginBlock(C, ar, name, UI_EMBOSS, UI_HELV); + block = uiBeginBlock(C, ar, name, UI_EMBOSS); uiBlockSetHandleFunc(block, do_file_buttons, NULL); /* XXXX @@ -135,8 +135,8 @@ void file_draw_buttons(const bContext *C, ARegion *ar) */ /* space available for load/save buttons? */ - slen = UI_GetStringWidth(G.font, sfile->params->title, 0); - loadbutton= slen > 60 ? slen + 20 : MAX2(80, 20+UI_GetStringWidth(G.font, params->title, 0)); + slen = UI_GetStringWidth(sfile->params->title); + loadbutton= slen > 60 ? slen + 20 : MAX2(80, 20+UI_GetStringWidth(params->title)); if(ar->winx > loadbutton+20) { if(params->title[0]==0) { loadbutton= 0; @@ -150,24 +150,10 @@ void file_draw_buttons(const bContext *C, ARegion *ar) uiDefBut(block, TEX, 0 /* XXX B_FS_DIRNAME */,"", xmin+2, filebuty2, xmax-xmin-loadbutton-4, 21, params->dir, 0.0, (float)FILE_MAXFILE-1, 0, 0, ""); if(loadbutton) { - uiSetCurFont(block, UI_HELV); uiDefBut(block, BUT, B_FS_EXEC, params->title, xmax-loadbutton, filebuty2, loadbutton, 21, params->dir, 0.0, (float)FILE_MAXFILE-1, 0, 0, ""); uiDefBut(block, BUT, B_FS_CANCEL, "Cancel", xmax-loadbutton, filebuty1, loadbutton, 21, params->file, 0.0, (float)FILE_MAXFILE-1, 0, 0, ""); } -#if 0 - /* menu[0] = NULL happens when no .Bfs is there, and first time browse - disallow external directory browsing for databrowse */ - - if(menu[0] && (params->type != FILE_MAIN)) { - uiDefButS(block, MENU, 0 /* B_FS_DIR_MENU */, menu, xmin, filebuty2, fsmenubut_width, 21, ¶ms->menu, 0, 0, 0, 0, ""); - uiDefBut(block, BUT, 0 /* B_FS_BOOKMARK */, "B", xmin, filebuty1, bookmarkbut_width, 21, 0, 0, 0, 0, 0, "Bookmark current directory"); - } - - MEM_freeN(menu); -#endif - - uiEndBlock(C, block); uiDrawBlock(C, block); } @@ -183,8 +169,6 @@ static void draw_tile(short sx, short sy, short width, short height, int colorid UI_ThemeColorShade(colorid, shade); uiSetRoundBox(15); - // glRecti(sx, sy - height, sx + width, sy); - uiRoundBox(sx, sy - height, sx + width, sy, 6); } @@ -198,14 +182,14 @@ static float shorten_string(char* string, float w, int flag) float sw = 0; float pad = 0; - sw = UI_GetStringWidth(G.font, string,0); + sw = file_string_width(string); if (flag == FILE_SHORTEN_FRONT) { char *s = string; BLI_strncpy(temp, "...", 4); - pad = UI_GetStringWidth(G.font, temp,0); + pad = file_string_width(temp); while (s && (sw+pad>w)) { s++; - sw = UI_GetStringWidth(G.font, s,0); + sw = file_string_width(s); shortened = 1; } if (shortened) { @@ -219,7 +203,7 @@ static float shorten_string(char* string, float w, int flag) while (sw>w) { int slen = strlen(string); string[slen-1] = '\0'; - sw = UI_GetStringWidth(G.font, s,0); + sw = file_string_width(s); shortened = 1; } if (shortened) { @@ -270,7 +254,8 @@ static void file_draw_icon(short sx, short sy, int icon, short width, short heig UI_icon_draw_aspect_blended(x, y, icon, 1.f, blend); } -static void file_draw_string(short sx, short sy, const char* string, short width, short height, int flag) + +static void file_draw_string(short sx, short sy, const char* string, float width, short height, int flag) { short soffs; char fname[FILE_MAXFILE]; @@ -284,16 +269,8 @@ static void file_draw_string(short sx, short sy, const char* string, short width x = (float)(sx); y = (float)(sy-height); - // XXX was using ui_rasterpos_safe - glRasterPos2f(x, y); - UI_RasterPos(x, y); - - /* XXX TODO: handling of international fonts. - TODO: proper support for utf8 in languages different from ja_JP abd zh_CH - needs update of iconv in lib/windows to support getting the system language string - */ - UI_DrawString(G.font, fname, 0); - + BLF_position(x, y, 0); + BLF_draw(fname); } void file_calc_previews(const bContext *C, ARegion *ar) @@ -336,7 +313,7 @@ void file_draw_previews(const bContext *C, ARegion *ar) ED_fileselect_layout_tilepos(layout, i, &sx, &sy); sx += v2d->tot.xmin+2; sy = v2d->tot.ymax - sy; - file = filelist_file(files, i); + file = filelist_file(files, i); if (file->flags & ACTIVE) { colorid = TH_HILITE; @@ -358,29 +335,54 @@ void file_draw_previews(const bContext *C, ARegion *ar) } if (imb) { - float fx = ((float)layout->prv_w - (float)imb->x)/2.0f; - float fy = ((float)layout->prv_h - (float)imb->y)/2.0f; - float dx = (fx + 0.5f + sfile->layout->prv_border_x); - float dy = (fy + 0.5f - sfile->layout->prv_border_y); - short xco = (float)sx + dx; - short yco = (float)sy - sfile->layout->prv_h + dy; - + float fx, fy; + float dx, dy; + short xco, yco; + float scaledx, scaledy; + float scale; + short ex, ey; + + if ( (imb->x > layout->prv_w) || (imb->y > layout->prv_h) ) { + if (imb->x > imb->y) { + scaledx = (float)layout->prv_w; + scaledy = ( (float)imb->y/(float)imb->x )*layout->prv_w; + scale = scaledx/imb->x; + } + else { + scaledy = (float)layout->prv_h; + scaledx = ( (float)imb->x/(float)imb->y )*layout->prv_h; + scale = scaledy/imb->y; + } + } else { + scaledx = (float)imb->x; + scaledy = (float)imb->y; + scale = 1.0; + } + ex = (short)scaledx; + ey = (short)scaledy; + fx = ((float)layout->prv_w - (float)ex)/2.0f; + fy = ((float)layout->prv_h - (float)ey)/2.0f; + dx = (fx + 0.5f + sfile->layout->prv_border_x); + dy = (fy + 0.5f - sfile->layout->prv_border_y); + xco = (float)sx + dx; + yco = (float)sy - sfile->layout->prv_h + dy; + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); /* shadow */ if (!is_icon && (file->flags & IMAGEFILE)) - uiDrawBoxShadow(220, xco, yco, xco + imb->x, yco + imb->y); + uiDrawBoxShadow(220, xco, yco, xco + ex, yco + ey); glEnable(GL_BLEND); /* the image */ glColor4f(1.0, 1.0, 1.0, 1.0); - glaDrawPixelsTex(xco, yco, imb->x, imb->y, GL_UNSIGNED_BYTE, imb->rect); + glaDrawPixelsTexScaled(xco, yco, imb->x, imb->y, GL_UNSIGNED_BYTE, imb->rect, scale, scale); /* border */ if (!is_icon && (file->flags & IMAGEFILE)) { glColor4f(0.0f, 0.0f, 0.0f, 0.4f); - fdrawbox(xco, yco, xco + imb->x, yco + imb->y); + fdrawbox(xco, yco, xco + ex, yco + ey); } glDisable(GL_BLEND); @@ -450,17 +452,14 @@ void file_draw_list(const bContext *C, ARegion *ar) if (offset<0) offset=0; /* alternating flat shade background */ - for (i=0; (i <= layout->rows); ++i) + for (i=0; (i <= layout->rows); i+=2) { sx = v2d->cur.xmin; sy = v2d->cur.ymax - i*(layout->tile_h+2*layout->tile_border_y) - layout->tile_border_y; - - if (i % 2) { - UI_ThemeColor(TH_BACK); - } else { - UI_ThemeColorShade(TH_BACK, -7); - } + + UI_ThemeColorShade(TH_BACK, -7); glRectf(v2d->cur.xmin, sy, v2d->cur.xmax, sy+layout->tile_h+2*layout->tile_border_y); + } /* vertical column dividers */ @@ -500,48 +499,47 @@ void file_draw_list(const bContext *C, ARegion *ar) UI_ThemeColor4(TH_TEXT); - - sw = UI_GetStringWidth(G.font, file->relname, 0); + sw = file_string_width(file->relname); file_draw_string(spos, sy, file->relname, sw, layout->tile_h, FILE_SHORTEN_END); - spos += filelist_column_len(sfile->files, COLUMN_NAME) + 10; + spos += layout->column_widths[COLUMN_NAME] + 12; if (params->display == FILE_SHOWSHORT) { if (!(file->type & S_IFDIR)) { - sw = UI_GetStringWidth(G.font, file->size, 0); - spos += filelist_column_len(sfile->files, COLUMN_SIZE) + 10 - sw; - file_draw_string(spos, sy, file->size, sw, layout->tile_h, FILE_SHORTEN_END); + sw = file_string_width(file->size); + spos += layout->column_widths[COLUMN_SIZE] + 12 - sw; + file_draw_string(spos, sy, file->size, sw+1, layout->tile_h, FILE_SHORTEN_END); } } else { #if 0 // XXX TODO: add this for non-windows systems /* rwx rwx rwx */ spos += 20; - sw = UI_GetStringWidth(G.font, file->mode1, 0); + sw = UI_GetStringWidth(file->mode1); file_draw_string(spos, sy, file->mode1, sw, layout->tile_h); spos += 30; - sw = UI_GetStringWidth(G.font, file->mode2, 0); + sw = UI_GetStringWidth(file->mode2); file_draw_string(spos, sy, file->mode2, sw, layout->tile_h); spos += 30; - sw = UI_GetStringWidth(G.font, file->mode3, 0); + sw = UI_GetStringWidth(file->mode3); file_draw_string(spos, sy, file->mode3, sw, layout->tile_h); spos += 30; - sw = UI_GetStringWidth(G.font, file->owner, 0); + sw = UI_GetStringWidth(file->owner); file_draw_string(spos, sy, file->owner, sw, layout->tile_h); #endif - sw = UI_GetStringWidth(G.font, file->date, 0); + sw = file_string_width(file->date); file_draw_string(spos, sy, file->date, sw, layout->tile_h, FILE_SHORTEN_END); - spos += filelist_column_len(sfile->files, COLUMN_DATE) + 10; + spos += layout->column_widths[COLUMN_DATE] + 12; - sw = UI_GetStringWidth(G.font, file->time, 0); + sw = file_string_width(file->time); file_draw_string(spos, sy, file->time, sw, layout->tile_h, FILE_SHORTEN_END); - spos += filelist_column_len(sfile->files, COLUMN_TIME) + 10; + spos += layout->column_widths[COLUMN_TIME] + 12; if (!(file->type & S_IFDIR)) { - sw = UI_GetStringWidth(G.font, file->size, 0); - spos += filelist_column_len(sfile->files, COLUMN_SIZE) + 10 - sw; + sw = file_string_width(file->size); + spos += layout->column_widths[COLUMN_SIZE] + 12 - sw; file_draw_string(spos, sy, file->size, sw, layout->tile_h, FILE_SHORTEN_END); } } @@ -553,20 +551,29 @@ static void file_draw_fsmenu_category(const bContext *C, ARegion *ar, FSMenuCate struct FSMenu* fsmenu = fsmenu_get(); char bookmark[FILE_MAX]; int nentries = fsmenu_get_nentries(fsmenu, category); - int linestep = gFontsize*2.0f; + short sx, sy, xpos, ypos; int bmwidth = ar->v2d.cur.xmax - ar->v2d.cur.xmin - 2*TILE_BORDER_X - ICON_DEFAULT_WIDTH - 4; - int fontsize = gFontsize; + int fontsize = file_font_pointsize(); + int cat_icon; int i; - sx = ar->v2d.cur.xmin + TILE_BORDER_X; sy = *starty; UI_ThemeColor(TH_TEXT_HI); file_draw_string(sx, sy, category_name, bmwidth, fontsize, FILE_SHORTEN_END); - sy -= linestep; + sy -= fontsize*2.0f; + + switch(category) { + case FS_CATEGORY_SYSTEM: + cat_icon = ICON_DISK_DRIVE; break; + case FS_CATEGORY_BOOKMARKS: + cat_icon = ICON_BOOKMARKS; break; + case FS_CATEGORY_RECENT: + cat_icon = ICON_FILE_FOLDER; break; + } for (i=0; i< nentries && (sy > ar->v2d.cur.ymin) ;++i) { char *fname = fsmenu_get_entry(fsmenu, category, i); @@ -576,15 +583,16 @@ static void file_draw_fsmenu_category(const bContext *C, ARegion *ar, FSMenuCate BLI_strncpy(bookmark, fname, FILE_MAX); sl = strlen(bookmark)-1; + if (sl > 1) { while (bookmark[sl] == '\\' || bookmark[sl] == '/') { bookmark[sl] = '\0'; sl--; } + } + if (fsmenu_is_selected(fsmenu, category, i) ) { UI_ThemeColor(TH_HILITE); - //uiSetRoundBox(15); - uiRoundBox(sx, sy - linestep, ar->v2d.cur.xmax - TILE_BORDER_X, sy, 4.0f); - // glRectf(ar->v2d.cur.xmin, sy-linestep, ar->v2d.cur.xmax + 2*TILE_BORDER_X, sy); + uiRoundBox(sx, sy - fontsize*2.0f, ar->v2d.cur.xmax - TILE_BORDER_X, sy, 4.0f); UI_ThemeColor(TH_TEXT); } else { UI_ThemeColor(TH_TEXT_HI); @@ -593,10 +601,10 @@ static void file_draw_fsmenu_category(const bContext *C, ARegion *ar, FSMenuCate xpos = sx; ypos = sy - (TILE_BORDER_Y * 0.5); - file_draw_icon(xpos, ypos, ICON_FILE_FOLDER, ICON_DEFAULT_WIDTH, ICON_DEFAULT_WIDTH); + file_draw_icon(xpos, ypos, cat_icon, ICON_DEFAULT_WIDTH, ICON_DEFAULT_WIDTH); xpos += ICON_DEFAULT_WIDTH + 4; file_draw_string(xpos, ypos, bookmark, bmwidth, fontsize, FILE_SHORTEN_FRONT); - sy -= linestep; + sy -= fontsize*2.0; fsmenu_set_pos(fsmenu, category, i, xpos, ypos); } } @@ -606,9 +614,9 @@ static void file_draw_fsmenu_category(const bContext *C, ARegion *ar, FSMenuCate void file_draw_fsmenu(const bContext *C, ARegion *ar) { - int linestep = gFontsize*2.0f; + int linestep = file_font_pointsize()*2.0f; short sy= ar->v2d.cur.ymax-2*TILE_BORDER_Y; - + file_draw_fsmenu_category(C, ar, FS_CATEGORY_SYSTEM, "SYSTEM", &sy); sy -= linestep; file_draw_fsmenu_category(C, ar, FS_CATEGORY_BOOKMARKS, "BOOKMARKS", &sy); diff --git a/source/blender/editors/space_file/file_header.c b/source/blender/editors/space_file/file_header.c index 54dd7ff15ba..bfa0a553334 100644 --- a/source/blender/editors/space_file/file_header.c +++ b/source/blender/editors/space_file/file_header.c @@ -56,7 +56,6 @@ #include "UI_interface.h" #include "UI_resources.h" #include "UI_view2d.h" -#include "UI_text.h" #include "file_intern.h" #include "filelist.h" @@ -102,7 +101,7 @@ void file_header_buttons(const bContext *C, ARegion *ar) int xco, yco= 3; int xcotitle; - block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS, UI_HELV); + block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS); uiBlockSetHandleFunc(block, do_file_header_buttons, NULL); xco= ED_area_header_standardbuttons(C, block, yco); @@ -111,8 +110,6 @@ void file_header_buttons(const bContext *C, ARegion *ar) if((sa->flag & HEADER_NO_PULLDOWN)==0) { int xmax; - uiBlockSetEmboss(block, UI_EMBOSSP); - xmax= GetButStringLength("View"); uiDefPulldownBut(block, dummy_viewmenu, CTX_wm_area(C), "View", xco, yco-2, xmax-3, 24, ""); @@ -120,9 +117,6 @@ void file_header_buttons(const bContext *C, ARegion *ar) } */ - /* SORT TYPE */ - uiBlockSetEmboss(block, UI_EMBOSSX); - xco += 5; uiBlockBeginAlign(block); @@ -160,25 +154,26 @@ void file_header_buttons(const bContext *C, ARegion *ar) xco+=XIC; } */ + + uiDefIconButBitS(block, TOG, FILE_FILTER, B_FILTERIMASELDIR, ICON_FILTER,xco+=XIC,yco,XIC,YIC, ¶ms->flag, 0, 0, 0, 0, "Filter files"); - uiDefIconButBitS(block, TOG, FILE_FILTER, B_FILTERIMASELDIR, ICON_FILTER,xco+=XIC,0,XIC,YIC, ¶ms->flag, 0, 0, 0, 0, "Filter files"); if (params->flag & FILE_FILTER) { xco+=4; uiBlockBeginAlign(block); - uiDefIconButBitS(block, TOG, IMAGEFILE, B_FILTERIMASELDIR, ICON_FILE_IMAGE,xco+=XIC,0,XIC,YIC, ¶ms->filter, 0, 0, 0, 0, "Show images"); - uiDefIconButBitS(block, TOG, BLENDERFILE, B_FILTERIMASELDIR, ICON_FILE_BLEND,xco+=XIC,0,XIC,YIC, ¶ms->filter, 0, 0, 0, 0, "Show .blend files"); - uiDefIconButBitS(block, TOG, MOVIEFILE, B_FILTERIMASELDIR, ICON_FILE_MOVIE,xco+=XIC,0,XIC,YIC, ¶ms->filter, 0, 0, 0, 0, "Show movies"); - uiDefIconButBitS(block, TOG, PYSCRIPTFILE, B_FILTERIMASELDIR, ICON_FILE_SCRIPT,xco+=XIC,0,XIC,YIC, ¶ms->filter, 0, 0, 0, 0, "Show python scripts"); - uiDefIconButBitS(block, TOG, FTFONTFILE, B_FILTERIMASELDIR, ICON_FILE_FONT,xco+=XIC,0,XIC,YIC, ¶ms->filter, 0, 0, 0, 0, "Show fonts"); - uiDefIconButBitS(block, TOG, SOUNDFILE, B_FILTERIMASELDIR, ICON_FILE_SOUND,xco+=XIC,0,XIC,YIC, ¶ms->filter, 0, 0, 0, 0, "Show sound files"); - uiDefIconButBitS(block, TOG, TEXTFILE, B_FILTERIMASELDIR, ICON_FILE_BLANK,xco+=XIC,0,XIC,YIC, ¶ms->filter, 0, 0, 0, 0, "Show text files"); - uiDefIconButBitS(block, TOG, FOLDERFILE, B_FILTERIMASELDIR, ICON_FILE_FOLDER,xco+=XIC,0,XIC,YIC, ¶ms->filter, 0, 0, 0, 0, "Show folders"); + uiDefIconButBitS(block, TOG, IMAGEFILE, B_FILTERIMASELDIR, ICON_FILE_IMAGE,xco+=XIC,yco,XIC,YIC, ¶ms->filter, 0, 0, 0, 0, "Show images"); + uiDefIconButBitS(block, TOG, BLENDERFILE, B_FILTERIMASELDIR, ICON_FILE_BLEND,xco+=XIC,yco,XIC,YIC, ¶ms->filter, 0, 0, 0, 0, "Show .blend files"); + uiDefIconButBitS(block, TOG, MOVIEFILE, B_FILTERIMASELDIR, ICON_FILE_MOVIE,xco+=XIC,yco,XIC,YIC, ¶ms->filter, 0, 0, 0, 0, "Show movies"); + uiDefIconButBitS(block, TOG, PYSCRIPTFILE, B_FILTERIMASELDIR, ICON_FILE_SCRIPT,xco+=XIC,yco,XIC,YIC, ¶ms->filter, 0, 0, 0, 0, "Show python scripts"); + uiDefIconButBitS(block, TOG, FTFONTFILE, B_FILTERIMASELDIR, ICON_FILE_FONT,xco+=XIC,yco,XIC,YIC, ¶ms->filter, 0, 0, 0, 0, "Show fonts"); + uiDefIconButBitS(block, TOG, SOUNDFILE, B_FILTERIMASELDIR, ICON_FILE_SOUND,xco+=XIC,yco,XIC,YIC, ¶ms->filter, 0, 0, 0, 0, "Show sound files"); + uiDefIconButBitS(block, TOG, TEXTFILE, B_FILTERIMASELDIR, ICON_FILE_BLANK,xco+=XIC,yco,XIC,YIC, ¶ms->filter, 0, 0, 0, 0, "Show text files"); + uiDefIconButBitS(block, TOG, FOLDERFILE, B_FILTERIMASELDIR, ICON_FILE_FOLDER,xco+=XIC,yco,XIC,YIC, ¶ms->filter, 0, 0, 0, 0, "Show folders"); uiBlockEndAlign(block); xco+=XIC; } xcotitle= xco; - xco+= UI_GetStringWidth(G.font, params->title, 0); + xco+= UI_GetStringWidth(params->title); uiBlockSetEmboss(block, UI_EMBOSS); diff --git a/source/blender/editors/space_file/file_intern.h b/source/blender/editors/space_file/file_intern.h index 80b7eb21818..642189ad3fd 100644 --- a/source/blender/editors/space_file/file_intern.h +++ b/source/blender/editors/space_file/file_intern.h @@ -68,5 +68,9 @@ int file_cancel_exec(bContext *C, struct wmOperator *unused); int file_parent_exec(bContext *C, struct wmOperator *unused); int file_hilight_set(SpaceFile *sfile, ARegion *ar, int mx, int my); +/* filesel.c */ +float file_string_width(const char* str); +float file_font_pointsize(); + #endif /* ED_FILE_INTERN_H */ diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 3d845ac4be6..94c023207f5 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -66,7 +66,7 @@ /* ---------- FILE SELECTION ------------ */ -static int find_file_mouse_hor(SpaceFile *sfile, struct ARegion* ar, short x, short y) +static int find_file_mouse(SpaceFile *sfile, struct ARegion* ar, short x, short y) { float fx,fy; int active_file = -1; @@ -77,7 +77,6 @@ static int find_file_mouse_hor(SpaceFile *sfile, struct ARegion* ar, short x, sh active_file = ED_fileselect_layout_offset(sfile->layout, v2d->tot.xmin + fx, v2d->tot.ymax - fy); - printf("FINDFILE %d\n", active_file); if ( (active_file < 0) || (active_file >= numfiles) ) { active_file = -1; @@ -86,24 +85,6 @@ static int find_file_mouse_hor(SpaceFile *sfile, struct ARegion* ar, short x, sh } -static int find_file_mouse_vert(SpaceFile *sfile, struct ARegion* ar, short x, short y) -{ - float fx,fy; - int active_file = -1; - int numfiles = filelist_numfiles(sfile->files); - View2D* v2d = &ar->v2d; - - UI_view2d_region_to_view(v2d, x, y, &fx, &fy); - - active_file = ED_fileselect_layout_offset(sfile->layout, v2d->tot.xmin + fx, v2d->tot.ymax - fy); - - if ( (active_file < 0) || (active_file >= numfiles) ) - { - active_file = -1; - } - return active_file; -} - static void file_deselect_all(SpaceFile* sfile) { int numfiles = filelist_numfiles(sfile->files); @@ -129,13 +110,8 @@ static void file_select(SpaceFile* sfile, ARegion* ar, const rcti* rect, short v int numfiles = filelist_numfiles(sfile->files); params->selstate = NOTACTIVE; - if ( (layout->flag == FILE_LAYOUT_HOR) ) { - first_file = find_file_mouse_hor(sfile, ar, rect->xmin, rect->ymax); - last_file = find_file_mouse_hor(sfile, ar, rect->xmax, rect->ymin); - } else { - first_file = find_file_mouse_vert(sfile, ar, rect->xmin, rect->ymax); - last_file = find_file_mouse_vert(sfile, ar, rect->xmax, rect->ymin); - } + first_file = find_file_mouse(sfile, ar, rect->xmin, rect->ymax); + last_file = find_file_mouse(sfile, ar, rect->xmax, rect->ymin); /* select all valid files between first and last indicated */ if ( (first_file >= 0) && (first_file < numfiles) && (last_file >= 0) && (last_file < numfiles) ) { @@ -147,8 +123,6 @@ static void file_select(SpaceFile* sfile, ARegion* ar, const rcti* rect, short v file->flags &= ~ACTIVE; } } - - printf("Selecting %d %d\n", first_file, last_file); /* make the last file active */ if (last_file >= 0 && last_file < numfiles) { @@ -318,28 +292,11 @@ void FILE_OT_select_all_toggle(wmOperatorType *ot) /* ---------- BOOKMARKS ----------- */ -static void set_active_bookmark(FileSelectParams* params, struct ARegion* ar, short x, short y) -{ - int nentries = fsmenu_get_nentries(fsmenu_get(), FS_CATEGORY_BOOKMARKS); - float fx, fy; - short posy; - - UI_view2d_region_to_view(&ar->v2d, x, y, &fx, &fy); - - posy = ar->v2d.cur.ymax - 2*TILE_BORDER_Y - fy; - posy -= U.fontsize*2.0f; /* header */ - - params->active_bookmark = ((float)posy / (U.fontsize*2.0f)); - if (params->active_bookmark < 0 || params->active_bookmark > nentries) { - params->active_bookmark = -1; - } -} - static int file_select_bookmark_category(SpaceFile* sfile, ARegion* ar, short x, short y, FSMenuCategory category) { struct FSMenu* fsmenu = fsmenu_get(); int nentries = fsmenu_get_nentries(fsmenu, category); - int linestep = U.fontsize*2.0f; + int linestep = file_font_pointsize()*2.0f; short xs, ys; int i; int selected = -1; @@ -448,25 +405,20 @@ void FILE_OT_loadimages(wmOperatorType *ot) int file_hilight_set(SpaceFile *sfile, ARegion *ar, int mx, int my) { FileSelectParams* params; - FileLayout* layout; int numfiles, actfile; if(sfile==NULL || sfile->files==NULL) return 0; numfiles = filelist_numfiles(sfile->files); params = ED_fileselect_get_params(sfile); - layout = ED_fileselect_get_layout(sfile, ar); - if ( (layout->flag == FILE_LAYOUT_HOR)) { - actfile = find_file_mouse_hor(sfile, ar, mx , my); - } else { - actfile = find_file_mouse_vert(sfile, ar, mx, my); - } + actfile = find_file_mouse(sfile, ar, mx , my); if (params && (actfile >= 0) && (actfile < numfiles) ) { params->active_file=actfile; return 1; - } + } + params->active_file= -1; return 0; } diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 1ba84566940..01cdf559c58 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -82,7 +82,7 @@ #include "PIL_time.h" -#include "UI_text.h" +#include "UI_interface.h" #include "filelist.h" @@ -120,7 +120,6 @@ typedef struct FileList short hide_dot; unsigned int filter; short changed; - int columns[MAX_FILE_COLUMN]; ListBase loadimages; ListBase threads; } FileList; @@ -531,7 +530,7 @@ void filelist_loadimage(struct FileList* filelist, int index) dx = imgwidth - ex; dy = imgheight - ey; - IMB_scaleImBuf(imb, ex, ey); + // IMB_scaleImBuf(imb, ex, ey); filelist->filelist[fidx].image = imb; } else { /* prevent loading image twice */ @@ -622,6 +621,7 @@ struct direntry * filelist_file(struct FileList* filelist, int index) return &filelist->filelist[fidx]; } + int filelist_find(struct FileList* filelist, char *file) { int index = -1; @@ -658,15 +658,9 @@ void filelist_setfilter(struct FileList* filelist, unsigned int filter) filelist->filter = filter; } -int filelist_column_len(struct FileList* filelist, FileListColumns column) -{ - return filelist->columns[column]; -} - void filelist_readdir(struct FileList* filelist) { char wdir[FILE_MAX]; - int i; if (!filelist) return; filelist->fidx = 0; @@ -685,34 +679,6 @@ void filelist_readdir(struct FileList* filelist) if (!filelist->threads.first) { BLI_init_threads(&filelist->threads, exec_loadimages, 2); } - - for (i=0; i<MAX_FILE_COLUMN; ++i) { - filelist->columns[i] = 0; - } - - for (i=0; (i < filelist->numfiles); ++i) - { - struct direntry* file = filelist_file(filelist, i); - if (file) { - int len; - len = UI_GetStringWidth(G.font, file->relname,0); - if (len > filelist->columns[COLUMN_NAME]) filelist->columns[COLUMN_NAME] = len; - len = UI_GetStringWidth(G.font, file->date,0); - if (len > filelist->columns[COLUMN_DATE]) filelist->columns[COLUMN_DATE] = len; - len = UI_GetStringWidth(G.font, file->time,0); - if (len > filelist->columns[COLUMN_TIME]) filelist->columns[COLUMN_TIME] = len; - len = UI_GetStringWidth(G.font, file->size,0); - if (len > filelist->columns[COLUMN_SIZE]) filelist->columns[COLUMN_SIZE] = len; - len = UI_GetStringWidth(G.font, file->mode1,0); - if (len > filelist->columns[COLUMN_MODE1]) filelist->columns[COLUMN_MODE1] = len; - len = UI_GetStringWidth(G.font, file->mode2,0); - if (len > filelist->columns[COLUMN_MODE2]) filelist->columns[COLUMN_MODE2] = len; - len = UI_GetStringWidth(G.font, file->mode3,0); - if (len > filelist->columns[COLUMN_MODE3]) filelist->columns[COLUMN_MODE3] = len; - len = UI_GetStringWidth(G.font, file->owner,0); - if (len > filelist->columns[COLUMN_OWNER]) filelist->columns[COLUMN_OWNER] = len; - } - } } int filelist_empty(struct FileList* filelist) diff --git a/source/blender/editors/space_file/filelist.h b/source/blender/editors/space_file/filelist.h index 26a2d46f5a7..4aa8359b068 100644 --- a/source/blender/editors/space_file/filelist.h +++ b/source/blender/editors/space_file/filelist.h @@ -41,19 +41,7 @@ struct FileList; struct direntry; struct BlendHandle; struct Scene; - -#define MAX_FILE_COLUMN 8 - -typedef enum FileListColumns { - COLUMN_NAME = 0, - COLUMN_DATE, - COLUMN_TIME, - COLUMN_SIZE, - COLUMN_MODE1, - COLUMN_MODE2, - COLUMN_MODE3, - COLUMN_OWNER -} FileListColumns; +struct rcti; struct FileList * filelist_new(); void filelist_init_icons(); @@ -78,7 +66,6 @@ struct ImBuf * filelist_getimage(struct FileList* filelist, int index); struct ImBuf * filelist_geticon(struct FileList* filelist, int index); short filelist_changed(struct FileList* filelist); void filelist_readdir(struct FileList* filelist); -int filelist_column_len(struct FileList* filelist, FileListColumns column); int filelist_empty(struct FileList* filelist); void filelist_parent(struct FileList* filelist); diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index a422bda9503..cbd1457e562 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -45,6 +45,7 @@ #include "DNA_space_types.h" #include "DNA_scene_types.h" #include "DNA_screen_types.h" +#include "DNA_userdef_types.h" #include "DNA_windowmanager_types.h" #include "MEM_guardedalloc.h" @@ -58,6 +59,8 @@ #include "BKE_screen.h" #include "BKE_global.h" +#include "BLF_api.h" + #include "DNA_userdef_types.h" #include "ED_screen.h" @@ -144,14 +147,13 @@ int ED_fileselect_layout_offset(FileLayout* layout, int x, int y) offsetx = (x)/(layout->tile_w + 2*layout->tile_border_x); offsety = (y)/(layout->tile_h + 2*layout->tile_border_y); - if (offsetx > layout->columns-1) offsetx = layout->columns-1 ; - if (offsety > layout->rows-1) offsety = layout->rows-1 ; + if (offsetx > layout->columns-1) offsetx = -1 ; + if (offsety > layout->rows-1) offsety = -1 ; if (layout->flag & FILE_LAYOUT_HOR) active_file = layout->rows*offsetx + offsety; else active_file = offsetx + layout->columns*offsety; - printf("OFFSET %d %d %d %d %d\n", x,y, offsetx, offsety, active_file); return active_file; } @@ -166,6 +168,56 @@ void ED_fileselect_layout_tilepos(FileLayout* layout, int tile, short *x, short } } +float file_string_width(const char* str) +{ + uiStyle *style= U.uistyles.first; + uiStyleFontSet(&style->widget); + return BLF_width(str); +} + +float file_font_pointsize() +{ + float s; + char tmp[2] = "X"; + uiStyle *style= U.uistyles.first; + uiStyleFontSet(&style->widget); + s = BLF_height(tmp); + return style->widget.points; +} + +static void column_widths(struct FileList* files, struct FileLayout* layout) +{ + int i; + int numfiles = filelist_numfiles(files); + + for (i=0; i<MAX_FILE_COLUMN; ++i) { + layout->column_widths[i] = 0; + } + + for (i=0; (i < numfiles); ++i) + { + struct direntry* file = filelist_file(files, i); + if (file) { + int len; + len = file_string_width(file->relname); + if (len > layout->column_widths[COLUMN_NAME]) layout->column_widths[COLUMN_NAME] = len; + len = file_string_width(file->date); + if (len > layout->column_widths[COLUMN_DATE]) layout->column_widths[COLUMN_DATE] = len; + len = file_string_width(file->time); + if (len > layout->column_widths[COLUMN_TIME]) layout->column_widths[COLUMN_TIME] = len; + len = file_string_width(file->size); + if (len > layout->column_widths[COLUMN_SIZE]) layout->column_widths[COLUMN_SIZE] = len; + len = file_string_width(file->mode1); + if (len > layout->column_widths[COLUMN_MODE1]) layout->column_widths[COLUMN_MODE1] = len; + len = file_string_width(file->mode2); + if (len > layout->column_widths[COLUMN_MODE2]) layout->column_widths[COLUMN_MODE2] = len; + len = file_string_width(file->mode3); + if (len > layout->column_widths[COLUMN_MODE3]) layout->column_widths[COLUMN_MODE3] = len; + len = file_string_width(file->owner); + if (len > layout->column_widths[COLUMN_OWNER]) layout->column_widths[COLUMN_OWNER] = len; + } + } +} void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar) { @@ -173,11 +225,10 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar) View2D *v2d= &ar->v2d; int maxlen = 0; int numfiles = filelist_numfiles(sfile->files); - + int textheight = file_font_pointsize(); if (sfile->layout == 0) { sfile->layout = MEM_callocN(sizeof(struct FileLayout), "file_layout"); } - if (params->display == FILE_IMGDISPLAY) { sfile->layout->prv_w = 96; sfile->layout->prv_h = 96; @@ -186,7 +237,7 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar) sfile->layout->prv_border_x = 6; sfile->layout->prv_border_y = 6; sfile->layout->tile_w = sfile->layout->prv_w + 2*sfile->layout->prv_border_x; - sfile->layout->tile_h = sfile->layout->prv_h + 2*sfile->layout->prv_border_y + U.fontsize; + sfile->layout->tile_h = sfile->layout->prv_h + 2*sfile->layout->prv_border_y + textheight; sfile->layout->width= (v2d->cur.xmax - v2d->cur.xmin - 2*sfile->layout->tile_border_x); sfile->layout->columns= sfile->layout->width / (sfile->layout->tile_w + 2*sfile->layout->tile_border_x); if(sfile->layout->columns > 0) @@ -204,23 +255,22 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar) sfile->layout->tile_border_y = 2; sfile->layout->prv_border_x = 0; sfile->layout->prv_border_y = 0; - sfile->layout->tile_h = U.fontsize*3/2; + sfile->layout->tile_h = textheight*3/2; sfile->layout->height= v2d->cur.ymax - v2d->cur.ymin; sfile->layout->rows = sfile->layout->height / (sfile->layout->tile_h + 2*sfile->layout->tile_border_y);; + column_widths(sfile->files, sfile->layout); + if (params->display == FILE_SHORTDISPLAY) { - maxlen = filelist_column_len(sfile->files, COLUMN_NAME) + - filelist_column_len(sfile->files, COLUMN_SIZE); + maxlen = sfile->layout->column_widths[COLUMN_NAME] + + sfile->layout->column_widths[COLUMN_SIZE]; maxlen += 20+2*10; // for icon and space between columns } else { - maxlen = filelist_column_len(sfile->files, COLUMN_NAME) + - filelist_column_len(sfile->files, COLUMN_DATE) + - filelist_column_len(sfile->files, COLUMN_TIME) + - filelist_column_len(sfile->files, COLUMN_SIZE) /* + - filelist_column_len(sfile->files, COLUMN_MODE1) + - filelist_column_len(sfile->files, COLUMN_MODE2) + - filelist_column_len(sfile->files, COLUMN_MODE3) + - filelist_column_len(sfile->files, COLUMN_OWNER) */ ; + maxlen = sfile->layout->column_widths[COLUMN_NAME] + + sfile->layout->column_widths[COLUMN_DATE] + + sfile->layout->column_widths[COLUMN_TIME] + + sfile->layout->column_widths[COLUMN_SIZE]; + /* XXX add mode1, mode2, mode3, owner columns for non-windows platforms */ maxlen += 20+4*10; // for icon and space between columns } sfile->layout->tile_w = maxlen + 40; diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c index 6ef946c9697..59e8dcf82e6 100644 --- a/source/blender/editors/space_file/fsmenu.c +++ b/source/blender/editors/space_file/fsmenu.c @@ -47,6 +47,12 @@ #include "BLI_winstuff.h" #endif +#ifdef __APPLE__ +#include <CoreServices/CoreServices.h> + +#include "BKE_utildefines.h" +#endif + #include "fsmenu.h" /* include ourselves */ @@ -303,6 +309,27 @@ void fsmenu_read_file(struct FSMenu* fsmenu, const char *filename) } #endif +#ifdef __APPLE__ + { + OSErr err=noErr; + int i; + + /* loop through all the OS X Volumes, and add them to the SYSTEM section */ + for (i=1; err!=nsvErr; i++) + { + FSRef dir; + unsigned char path[FILE_MAXDIR+FILE_MAXFILE]; + + err = FSGetVolumeInfo(kFSInvalidVolumeRefNum, i, NULL, kFSVolInfoNone, NULL, NULL, &dir); + if (err != noErr) + continue; + + FSRefMakePath(&dir, path, FILE_MAXDIR+FILE_MAXFILE); + fsmenu_insert_entry(fsmenu, FS_CATEGORY_SYSTEM, (char *)path, 1, 0); + } + } +#endif + fp = fopen(filename, "r"); if (!fp) return; diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index 5207d4843f7..a4babaad74c 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -79,6 +79,11 @@ #include "graph_intern.h" // own include +/* XXX */ + +/* temporary definition for limits of float number buttons (FLT_MAX tends to infinity with old system) */ +#define UI_FLT_MAX 10000.0f + /* ******************* graph editor space & buttons ************** */ @@ -99,18 +104,49 @@ static void do_graph_region_buttons(bContext *C, void *arg, int event) //WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob); } -static void graph_panel_properties(const bContext *C, ARegion *ar, short cntrl, bAnimListElem *ale) +static int graph_panel_context(const bContext *C, bAnimListElem **ale, FCurve **fcu) +{ + bAnimContext ac; + bAnimListElem *elem= NULL; + + /* for now, only draw if we could init the anim-context info (necessary for all animation-related tools) + * to work correctly is able to be correctly retrieved. There's no point showing empty panels? + */ + if (ANIM_animdata_get_context(C, &ac) == 0) + return 0; + + /* try to find 'active' F-Curve */ + elem= get_active_fcurve_channel(&ac); + if(elem == NULL) + return 0; + + if(fcu) + *fcu= (FCurve*)elem->data; + if(ale) + *ale= elem; + else + MEM_freeN(elem); + + return 1; +} + +static int graph_panel_poll(const bContext *C, PanelType *pt) { - FCurve *fcu= (FCurve *)ale->data; + return graph_panel_context(C, NULL, NULL); +} + +static void graph_panel_properties(const bContext *C, Panel *pa) +{ + bAnimListElem *ale; + FCurve *fcu; uiBlock *block; char name[128]; - block= uiBeginBlock(C, ar, "graph_panel_properties", UI_EMBOSS, UI_HELV); - if (uiNewPanel(C, ar, block, "Properties", "Graph", 340, 30, 318, 254)==0) return; - uiBlockSetHandleFunc(block, do_graph_region_buttons, NULL); + if(!graph_panel_context(C, &ale, &fcu)) + return; - /* to force height */ - uiNewPanelHeight(block, 204); + block= uiLayoutFreeBlock(pa->layout); + uiBlockSetHandleFunc(block, do_graph_region_buttons, NULL); /* Info - Active F-Curve */ uiDefBut(block, LABEL, 1, "Active F-Curve:", 10, 200, 150, 19, NULL, 0.0, 0.0, 0, 0, ""); @@ -131,6 +167,8 @@ static void graph_panel_properties(const bContext *C, ARegion *ar, short cntrl, * - Access details (ID-block + RNA-Path + Array Index) * - ... */ + + MEM_freeN(ale); } /* ******************* drivers ******************************** */ @@ -141,80 +179,171 @@ static void do_graph_region_driver_buttons(bContext *C, void *arg, int event) { Scene *scene= CTX_data_scene(C); - switch(event) { + switch (event) { case B_IPO_DEPCHANGE: { /* rebuild depsgraph for the new deps */ DAG_scene_sort(scene); - /* TODO: which one? we need some way of sending these updates since curves from non-active ob could be being edited */ - //DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); - //DAG_object_flush_update(scene, ob, OB_RECALC_OB); + /* force an update of depsgraph */ + ED_anim_dag_flush_update(C); } break; } /* default for now */ - //WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob); + WM_event_add_notifier(C, NC_SCENE, scene); +} + +/* callback to remove the active driver */ +static void driver_remove_cb (bContext *C, void *ale_v, void *dummy_v) +{ + bAnimListElem *ale= (bAnimListElem *)ale_v; + ID *id= ale->id; + FCurve *fcu= ale->data; + + /* try to get F-Curve that driver lives on, and ID block which has this AnimData */ + if (ELEM(NULL, id, fcu)) + return; + + /* call API method to remove this driver */ + ANIM_remove_driver(id, fcu->rna_path, fcu->array_index, 0); +} + +/* callback to add a target variable to the active driver */ +static void driver_add_var_cb (bContext *C, void *driver_v, void *dummy_v) +{ + ChannelDriver *driver= (ChannelDriver *)driver_v; + + /* add a new var */ + driver_add_new_target(driver); } -static void graph_panel_drivers(const bContext *C, ARegion *ar, short cntrl, bAnimListElem *ale) +/* callback to remove target variable from active driver */ +static void driver_delete_var_cb (bContext *C, void *driver_v, void *dtar_v) { - FCurve *fcu= (FCurve *)ale->data; + ChannelDriver *driver= (ChannelDriver *)driver_v; + DriverTarget *dtar= (DriverTarget *)dtar_v; + + /* add a new var */ + driver_free_target(driver, dtar); +} + +/* callback to reset the driver's flags */ +static void driver_update_flags_cb (bContext *C, void *fcu_v, void *dummy_v) +{ + FCurve *fcu= (FCurve *)fcu_v; ChannelDriver *driver= fcu->driver; + + /* clear invalid flags */ + driver->flag &= ~DRIVER_FLAG_INVALID; +} + +/* drivers panel poll */ +static int graph_panel_drivers_poll(const bContext *C, PanelType *pt) +{ + SpaceIpo *sipo= (SpaceIpo *)CTX_wm_space_data(C); + + if(sipo->mode != SIPO_MODE_DRIVERS) + return 0; + + return graph_panel_context(C, NULL, NULL); +} + +/* driver settings for active F-Curve (only for 'Drivers' mode) */ +static void graph_panel_drivers(const bContext *C, Panel *pa) +{ + bAnimListElem *ale; + FCurve *fcu; + ChannelDriver *driver; + DriverTarget *dtar; + + PointerRNA rna_ptr; uiBlock *block; uiBut *but; - int len; + int yco=85, i=0; - block= uiBeginBlock(C, ar, "graph_panel_drivers", UI_EMBOSS, UI_HELV); - if (uiNewPanel(C, ar, block, "Drivers", "Graph", 340, 30, 318, 254)==0) return; - uiBlockSetHandleFunc(block, do_graph_region_driver_buttons, NULL); + if(!graph_panel_context(C, &ale, &fcu)) + return; - /* to force height */ - uiNewPanelHeight(block, 204); + driver= fcu->driver; + + block= uiLayoutFreeBlock(pa->layout); + uiBlockSetHandleFunc(block, do_graph_region_driver_buttons, NULL); + + /* general actions */ + but= uiDefBut(block, BUT, B_IPO_DEPCHANGE, "Update Dependencies", 10, 200, 180, 22, NULL, 0.0, 0.0, 0, 0, "Force updates of dependencies"); + uiButSetFunc(but, driver_update_flags_cb, fcu, NULL); + + but= uiDefBut(block, BUT, B_IPO_DEPCHANGE, "Remove Driver", 200, 200, 110, 18, NULL, 0.0, 0.0, 0, 0, "Remove this driver"); + uiButSetFunc(but, driver_remove_cb, ale, NULL); /* type */ - uiDefBut(block, LABEL, 1, "Type:", 10, 200, 120, 20, NULL, 0.0, 0.0, 0, 0, ""); + uiDefBut(block, LABEL, 1, "Type:", 10, 170, 60, 20, NULL, 0.0, 0.0, 0, 0, ""); uiDefButI(block, MENU, B_IPO_DEPCHANGE, - "Driver Type%t|Transform Channel%x0|Scripted Expression%x1|Rotational Difference%x2", - 130,200,180,20, &driver->type, 0, 0, 0, 0, "Driver type"); - - /* buttons to draw depends on type of driver */ - if (driver->type == DRIVER_TYPE_PYTHON) { /* PyDriver */ - uiDefBut(block, TEX, B_REDR, "Expr: ", 10,160,300,20, driver->expression, 0, 255, 0, 0, "One-liner Python Expression to use as Scripted Expression"); + "Driver Type%t|Normal%x0|Scripted Expression%x1|Rotational Difference%x2", + 70,170,240,20, &driver->type, 0, 0, 0, 0, "Driver type"); + + /* show expression box if doing scripted drivers */ + if (driver->type == DRIVER_TYPE_PYTHON) { + uiDefBut(block, TEX, B_REDR, "Expr: ", 10,150,300,20, driver->expression, 0, 255, 0, 0, "One-liner Python Expression to use as Scripted Expression"); + /* errors */ if (driver->flag & DRIVER_FLAG_INVALID) { - uiDefIconBut(block, LABEL, 1, ICON_ERROR, 10, 140, 20, 19, NULL, 0, 0, 0, 0, ""); + uiDefIconBut(block, LABEL, 1, ICON_ERROR, 10, 130, 48, 48, NULL, 0, 0, 0, 0, ""); // a bit larger uiDefBut(block, LABEL, 0, "Error: invalid Python expression", - 30,140,230,19, NULL, 0, 0, 0, 0, ""); + 50,110,230,19, NULL, 0, 0, 0, 0, ""); + } + } + else { + /* errors */ + if (driver->flag & DRIVER_FLAG_INVALID) { + uiDefIconBut(block, LABEL, 1, ICON_ERROR, 10, 130, 48, 48, NULL, 0, 0, 0, 0, ""); // a bit larger + uiDefBut(block, LABEL, 0, "Error: invalid target channel(s)", + 50,130,230,19, NULL, 0, 0, 0, 0, ""); } } - else { /* Channel or RotDiff - RotDiff just has extra settings */ - /* Driver Object */ - but= uiDefBut(block, TEX, B_IPO_DEPCHANGE, "OB: ", 10,160,150,20, driver->id->name+2, 0.0, 21.0, 0, 0, "Object that controls this Driver."); - uiButSetFunc(but, test_idbutton_cb, driver->id->name, NULL); + + but= uiDefBut(block, BUT, B_IPO_DEPCHANGE, "Add Variable", 10, 110, 300, 20, NULL, 0.0, 0.0, 0, 0, "Add a new target variable for this Driver"); + uiButSetFunc(but, driver_add_var_cb, driver, NULL); + + /* loop over targets, drawing them */ + for (dtar= driver->targets.first; dtar; dtar= dtar->next) { + short height = (dtar->id) ? 80 : 60; + + /* panel behind buttons */ + uiDefBut(block, ROUNDBOX, B_REDR, "", 5, yco-height+25, 310, height, NULL, 5.0, 0.0, 12.0, 0, ""); + + /* variable name */ + uiDefButC(block, TEX, B_REDR, "Name: ", 10,yco,280,20, dtar->name, 0, 63, 0, 0, "Name of target variable (No spaces or dots are allowed. Also, must not start with a symbol or digit)."); + + /* remove button */ + but= uiDefIconBut(block, BUT, B_REDR, ICON_X, 290, yco, 20, 20, NULL, 0.0, 0.0, 0.0, 0.0, "Delete target variable."); + uiButSetFunc(but, driver_delete_var_cb, driver, dtar); + + + /* Target Object */ + uiDefBut(block, LABEL, 1, "Value:", 10, yco-30, 60, 20, NULL, 0.0, 0.0, 0, 0, ""); + uiDefIDPoinBut(block, test_obpoin_but, ID_OB, B_REDR, "Ob: ", 70, yco-30, 240, 20, &dtar->id, "Object to use as Driver target"); // XXX should we hide these technical details? - if (driver->id) { - /* Array Index */ - // XXX ideally this is grouped with the path, but that can get quite long... - uiDefButI(block, NUM, B_IPO_DEPCHANGE, "Index: ", 170,160,140,20, &driver->array_index, 0, INT_MAX, 0, 0, "Index to the specific property used as Driver if applicable."); - - /* RNA-Path - allocate if non-existant */ - if (driver->rna_path == NULL) { - driver->rna_path= MEM_callocN(256, "Driver RNA-Path"); - len= 255; - } - else - len= strlen(driver->rna_path); - uiDefBut(block, TEX, B_IPO_DEPCHANGE, "Path: ", 10,130,300,20, driver->rna_path, 0, len, 0, 0, "RNA Path (from Driver Object) to property used as Driver."); + if (dtar->id) { + uiBlockBeginAlign(block); + /* RNA Path */ + RNA_pointer_create(ale->id, &RNA_DriverTarget, dtar, &rna_ptr); + uiDefButR(block, TEX, 0, "Path: ", 10, yco-50, 250, 20, &rna_ptr, "rna_path", 0, 0, 0, -1, -1, "RNA Path (from Driver Object) to property used as Driver."); + + /* Array Index */ + uiDefButI(block, NUM, B_REDR, "", 260,yco-50,50,20, &dtar->array_index, 0, INT_MAX, 0, 0, "Index to the specific property used as Driver if applicable."); + uiBlockEndAlign(block); } - /* for rotational difference, show second target... */ - if (driver->type == DRIVER_TYPE_ROTDIFF) { - // TODO... - } + /* adjust y-coordinate for next target */ + yco -= height; + i++; } + + MEM_freeN(ale); } /* ******************* f-modifiers ******************************** */ @@ -235,10 +364,7 @@ static void do_graph_region_modifier_buttons(bContext *C, void *arg, int event) // XXX for now, roundbox has it's callback func set to NULL to not intercept events #define DRAW_BACKDROP(height) \ { \ - if (active) uiBlockSetCol(block, TH_BUT_ACTION); \ - but= uiDefBut(block, ROUNDBOX, B_REDR, "", 10-8, *yco-height, width, height-1, NULL, 5.0, 0.0, 12.0, (float)rb_col, ""); \ - uiButSetFunc(but, NULL, NULL, NULL); \ - if (active) uiBlockSetCol(block, TH_AUTO); \ + uiDefBut(block, ROUNDBOX, B_REDR, "", -3, *yco-height, width+3, height-1, NULL, 5.0, 0.0, 12.0, (float)rb_col, ""); \ } /* callback to verify modifier data */ @@ -287,13 +413,13 @@ static void draw_modifier__generator(uiBlock *block, FCurve *fcu, FModifier *fcm (*height) = 90; switch (data->mode) { case FCM_GENERATOR_POLYNOMIAL: /* polynomial expression */ - (*height) += 20*(data->poly_order+1) + 35; + (*height) += 20*(data->poly_order+1) + 20; break; case FCM_GENERATOR_POLYNOMIAL_FACTORISED: /* factorised polynomial */ - (*height) += 20 * data->poly_order; + (*height) += 20 * data->poly_order + 15; break; case FCM_GENERATOR_FUNCTION: /* builtin function */ - (*height) += 50; // xxx + (*height) += 55; // xxx break; case FCM_GENERATOR_EXPRESSION: /* py-expression */ // xxx nothing to draw @@ -301,7 +427,7 @@ static void draw_modifier__generator(uiBlock *block, FCurve *fcu, FModifier *fcm } /* basic settings (backdrop + mode selector + some padding) */ - //DRAW_BACKDROP((*height)); // XXX buggy... + DRAW_BACKDROP((*height)); uiBlockBeginAlign(block); but= uiDefButS(block, MENU, B_FMODIFIER_REDRAW, gen_mode, 10,cy,width-30,19, &data->mode, 0, 0, 0, 0, "Selects type of generator algorithm."); uiButSetFunc(but, validate_fmodifier_cb, fcu, fcm); @@ -330,7 +456,7 @@ static void draw_modifier__generator(uiBlock *block, FCurve *fcu, FModifier *fcm cp= data->coefficients; for (i=0; (i < data->arraysize) && (cp); i++, cp++) { /* coefficient */ - uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 50, cy, 150, 20, cp, -FLT_MAX, FLT_MAX, 10, 3, "Coefficient for polynomial"); + uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 50, cy, 150, 20, cp, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Coefficient for polynomial"); /* 'x' param (and '+' if necessary) */ if (i == 0) @@ -368,15 +494,15 @@ static void draw_modifier__generator(uiBlock *block, FCurve *fcu, FModifier *fcm uiDefBut(block, LABEL, 1, "(", 40, cy, 50, 20, NULL, 0.0, 0.0, 0, 0, ""); /* coefficients */ - uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 50, cy, 100, 20, cp, -FLT_MAX, FLT_MAX, 10, 3, "Coefficient of x"); + uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 50, cy, 100, 20, cp, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Coefficient of x"); uiDefBut(block, LABEL, 1, "x + ", 150, cy, 30, 20, NULL, 0.0, 0.0, 0, 0, ""); - uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 180, cy, 100, 20, cp+1, -FLT_MAX, FLT_MAX, 10, 3, "Second coefficient"); + uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 180, cy, 100, 20, cp+1, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Second coefficient"); /* closing bracket and '+' sign */ if ( (i != (data->poly_order - 1)) || ((i==0) && data->poly_order==2) ) - uiDefBut(block, LABEL, 1, ") ×", 280, cy, 30, 20, NULL, 0.0, 0.0, 0, 0, ""); + uiDefBut(block, LABEL, 1, ") â—Š", 280, cy, 30, 20, NULL, 0.0, 0.0, 0, 0, ""); else uiDefBut(block, LABEL, 1, ")", 280, cy, 30, 20, NULL, 0.0, 0.0, 0, 0, ""); @@ -399,7 +525,7 @@ static void draw_modifier__generator(uiBlock *block, FCurve *fcu, FModifier *fcm { uiDefBut(block, LABEL, 1, "y = ", 0, cy, 50, 20, NULL, 0.0, 0.0, 0, 0, ""); - uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 50, cy, 150, 20, cp+3, -FLT_MAX, FLT_MAX, 10, 3, "Coefficient (D) for function"); + uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 50, cy, 150, 20, cp+3, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Coefficient (D) for function"); uiDefBut(block, LABEL, 1, "+", 200, cy, 30, 20, NULL, 0.0, 0.0, 0, 0, ""); cy -= 20; } @@ -409,7 +535,7 @@ static void draw_modifier__generator(uiBlock *block, FCurve *fcu, FModifier *fcm char func_name[32]; /* coefficient outside bracket */ - uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 0, cy, 80, 20, cp, -FLT_MAX, FLT_MAX, 10, 3, "Coefficient (A) for function"); + uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 5, cy, 80, 20, cp, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Coefficient (A) for function"); /* opening bracket */ switch (data->func_type) @@ -433,14 +559,14 @@ static void draw_modifier__generator(uiBlock *block, FCurve *fcu, FModifier *fcm sprintf(func_name, "<fn?>("); break; } - uiDefBut(block, LABEL, 1, func_name, 80, cy, 40, 20, NULL, 0.0, 0.0, 0, 0, ""); + uiDefBut(block, LABEL, 1, func_name, 85, cy, 40, 20, NULL, 0.0, 0.0, 0, 0, ""); /* coefficients inside bracket */ - uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 115, cy, 75, 20, cp+1, -FLT_MAX, FLT_MAX, 10, 3, "Coefficient (B) of x"); + uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 120, cy, 75, 20, cp+1, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Coefficient (B) of x"); - uiDefBut(block, LABEL, 1, "x+", 190, cy, 30, 20, NULL, 0.0, 0.0, 0, 0, ""); + uiDefBut(block, LABEL, 1, "x+", 195, cy, 30, 20, NULL, 0.0, 0.0, 0, 0, ""); - uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 220, cy, 80, 20, cp+2, -FLT_MAX, FLT_MAX, 10, 3, "Coefficient (C) of function"); + uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 225, cy, 80, 20, cp+2, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Coefficient (C) of function"); /* closing bracket */ uiDefBut(block, LABEL, 1, ")", 300, cy, 30, 20, NULL, 0.0, 0.0, 0, 0, ""); @@ -461,32 +587,62 @@ static void draw_modifier__generator(uiBlock *block, FCurve *fcu, FModifier *fcm static void draw_modifier__cycles(uiBlock *block, FCurve *fcu, FModifier *fcm, int *yco, short *height, short width, short active, int rb_col) { FMod_Cycles *data= (FMod_Cycles *)fcm->data; - char cyc_mode[]="Cycling Mode%t|No Cycles%x0|Repeat Motion%x1|Repeat with Offset%x2"; + char cyc_mode[]="Cycling Mode%t|No Cycles%x0|Repeat Motion%x1|Repeat with Offset%x2|Repeat Mirrored%x3"; int cy= (*yco - 30), cy1= (*yco - 50), cy2= (*yco - 70); /* set the height */ - (*height) = 90; + (*height) = 80; /* basic settings (backdrop + some padding) */ - //DRAW_BACKDROP((*height)); // XXX buggy... + DRAW_BACKDROP((*height)); /* 'before' range */ - uiDefBut(block, LABEL, 1, "Before:", 10, cy, 80, 20, NULL, 0.0, 0.0, 0, 0, "Settings for cycling before first keyframe"); + uiDefBut(block, LABEL, 1, "Before:", 4, cy, 80, 20, NULL, 0.0, 0.0, 0, 0, "Settings for cycling before first keyframe"); uiBlockBeginAlign(block); - uiDefButS(block, MENU, B_FMODIFIER_REDRAW, cyc_mode, 10,cy1,150,20, &data->before_mode, 0, 0, 0, 0, "Cycling mode to use before first keyframe"); - uiDefButS(block, NUM, B_FMODIFIER_REDRAW, "Max Cycles:", 10, cy2, 150, 20, &data->before_cycles, 0, 10000, 10, 3, "Maximum number of cycles to allow (0 = infinite)"); + uiDefButS(block, MENU, B_FMODIFIER_REDRAW, cyc_mode, 3,cy1,150,20, &data->before_mode, 0, 0, 0, 0, "Cycling mode to use before first keyframe"); + uiDefButS(block, NUM, B_FMODIFIER_REDRAW, "Max Cycles:", 3, cy2, 150, 20, &data->before_cycles, 0, 10000, 10, 3, "Maximum number of cycles to allow (0 = infinite)"); uiBlockEndAlign(block); /* 'after' range */ - uiDefBut(block, LABEL, 1, "After:", 160, cy, 80, 20, NULL, 0.0, 0.0, 0, 0, "Settings for cycling after last keyframe"); + uiDefBut(block, LABEL, 1, "After:", 155, cy, 80, 20, NULL, 0.0, 0.0, 0, 0, "Settings for cycling after last keyframe"); uiBlockBeginAlign(block); - uiDefButS(block, MENU, B_FMODIFIER_REDRAW, cyc_mode, 170,cy1,150,20, &data->after_mode, 0, 0, 0, 0, "Cycling mode to use after first keyframe"); - uiDefButS(block, NUM, B_FMODIFIER_REDRAW, "Max Cycles:", 170, cy2, 150, 20, &data->after_cycles, 0, 10000, 10, 3, "Maximum number of cycles to allow (0 = infinite)"); + uiDefButS(block, MENU, B_FMODIFIER_REDRAW, cyc_mode, 157,cy1,150,20, &data->after_mode, 0, 0, 0, 0, "Cycling mode to use after first keyframe"); + uiDefButS(block, NUM, B_FMODIFIER_REDRAW, "Max Cycles:", 157, cy2, 150, 20, &data->after_cycles, 0, 10000, 10, 3, "Maximum number of cycles to allow (0 = infinite)"); uiBlockEndAlign(block); } /* --------------- */ +/* draw settings for noise modifier */ +static void draw_modifier__noise(uiBlock *block, FCurve *fcu, FModifier *fcm, int *yco, short *height, short width, short active, int rb_col) +{ + FMod_Noise *data= (FMod_Noise *)fcm->data; + int cy= (*yco - 30), cy1= (*yco - 50), cy2= (*yco - 70); + char cyc_mode[]="Modification %t|Replace %x0|Add %x1|Subtract %x2|Multiply %x3"; + + /* set the height */ + (*height) = 80; + + /* basic settings (backdrop + some padding) */ + DRAW_BACKDROP((*height)); + + uiDefButS(block, MENU, B_FMODIFIER_REDRAW, cyc_mode, + 3, cy, 150, 20, &data->modification, 0, 0, 0, 0, "Method of modifying the existing F-Curve use before first keyframe"); + + uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Size:", + 3, cy1, 150, 20, &data->size, 0.000001, 10000.0, 0.01, 3, ""); + uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Strength:", + 3, cy2, 150, 20, &data->strength, 0.0, 10000.0, 0.01, 3, ""); + + uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Phase:", + 155, cy1, 150, 20, &data->phase, 0.0, 100000.0, 0.1, 3, ""); + uiDefButS(block, NUM, B_FMODIFIER_REDRAW, "Depth:", + 155, cy2, 150, 20, &data->depth, 0, 128, 1, 3, ""); + +} + +/* --------------- */ + #define BINARYSEARCH_FRAMEEQ_THRESH 0.0001 /* Binary search algorithm for finding where to insert Envelope Data Point. @@ -652,27 +808,27 @@ static void draw_modifier__envelope(uiBlock *block, FCurve *fcu, FModifier *fcm, FMod_Envelope *env= (FMod_Envelope *)fcm->data; FCM_EnvelopeData *fed; uiBut *but; - int cy= (*yco - 30); + int cy= (*yco - 28); int i; /* set the height: * - basic settings + variable height from envelope controls */ - (*height) = 96 + (25 * env->totvert); + (*height) = 115 + (35 * env->totvert); /* basic settings (backdrop + general settings + some padding) */ - //DRAW_BACKDROP((*height)); // XXX buggy... + DRAW_BACKDROP((*height)); /* General Settings */ uiDefBut(block, LABEL, 1, "Envelope:", 10, cy, 100, 20, NULL, 0.0, 0.0, 0, 0, "Settings for cycling before first keyframe"); cy -= 20; uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Reference Val:", 10, cy, 300, 20, &env->midval, -FLT_MAX, FLT_MAX, 10, 3, ""); + uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Reference Val:", 10, cy, 300, 20, &env->midval, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, ""); cy -= 20; - uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Min:", 10, cy, 150, 20, &env->min, -FLT_MAX, env->max, 10, 3, "Minimum value (relative to Reference Value) that is used as the 'normal' minimum value"); - uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Max:", 160, cy, 150, 20, &env->max, env->min, FLT_MAX, 10, 3, "Maximum value (relative to Reference Value) that is used as the 'normal' maximum value"); + uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Min:", 10, cy, 150, 20, &env->min, -UI_FLT_MAX, env->max, 10, 3, "Minimum value (relative to Reference Value) that is used as the 'normal' minimum value"); + uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Max:", 160, cy, 150, 20, &env->max, env->min, UI_FLT_MAX, 10, 3, "Maximum value (relative to Reference Value) that is used as the 'normal' maximum value"); cy -= 35; uiBlockEndAlign(block); @@ -687,13 +843,13 @@ static void draw_modifier__envelope(uiBlock *block, FCurve *fcu, FModifier *fcm, /* Points List */ for (i=0, fed=env->data; i < env->totvert; i++, fed++) { uiBlockBeginAlign(block); - but=uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Fra:", 5, cy, 100, 20, &fed->time, -FLT_MAX, FLT_MAX, 10, 3, "Frame that envelope point occurs"); + but=uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Fra:", 2, cy, 90, 20, &fed->time, -UI_FLT_MAX, UI_FLT_MAX, 10, 1, "Frame that envelope point occurs"); uiButSetFunc(but, validate_fmodifier_cb, fcu, fcm); - uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Min:", 105, cy, 100, 20, &fed->min, -FLT_MAX, FLT_MAX, 10, 3, "Minimum bound of envelope at this point"); - uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Max:", 205, cy, 100, 20, &fed->max, -FLT_MAX, FLT_MAX, 10, 3, "Maximum bound of envelope at this point"); + uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Min:", 92, cy, 100, 20, &fed->min, -UI_FLT_MAX, UI_FLT_MAX, 10, 2, "Minimum bound of envelope at this point"); + uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Max:", 192, cy, 100, 20, &fed->max, -UI_FLT_MAX, UI_FLT_MAX, 10, 2, "Maximum bound of envelope at this point"); - but= uiDefIconBut(block, BUT, B_FMODIFIER_REDRAW, ICON_X, 305, cy, 20, 20, NULL, 0.0, 0.0, 0.0, 0.0, "Delete envelope control point"); + but= uiDefIconBut(block, BUT, B_FMODIFIER_REDRAW, ICON_X, 292, cy, 18, 20, NULL, 0.0, 0.0, 0.0, 0.0, "Delete envelope control point"); uiButSetFunc(but, fmod_envelope_deletepoint_cb, env, SET_INT_IN_POINTER(i)); uiBlockBeginAlign(block); cy -= 25; @@ -702,6 +858,43 @@ static void draw_modifier__envelope(uiBlock *block, FCurve *fcu, FModifier *fcm, /* --------------- */ +/* draw settings for limits modifier */ +static void draw_modifier__limits(uiBlock *block, FCurve *fcu, FModifier *fcm, int *yco, short *height, short width, short active, int rb_col) +{ + FMod_Limits *data= (FMod_Limits *)fcm->data; + const int togButWidth = 50; + const int textButWidth = ((width/2)-togButWidth); + + /* set the height */ + (*height) = 60; + + /* basic settings (backdrop + some padding) */ + DRAW_BACKDROP((*height)); + + /* Draw Pairs of LimitToggle+LimitValue */ + uiBlockBeginAlign(block); + uiDefButBitI(block, TOGBUT, FCM_LIMIT_XMIN, B_FMODIFIER_REDRAW, "xMin", 5, *yco-30, togButWidth, 18, &data->flag, 0, 24, 0, 0, "Use minimum x value"); + uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 5+togButWidth, *yco-30, (textButWidth-5), 18, &data->rect.xmin, -UI_FLT_MAX, UI_FLT_MAX, 0.1,0.5,"Lowest x value to allow"); + uiBlockEndAlign(block); + + uiBlockBeginAlign(block); + uiDefButBitI(block, TOGBUT, FCM_LIMIT_XMAX, B_FMODIFIER_REDRAW, "XMax", 5+(width-(textButWidth-5)-togButWidth), *yco-30, 50, 18, &data->flag, 0, 24, 0, 0, "Use maximum x value"); + uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 5+(width-textButWidth-5), *yco-30, (textButWidth-5), 18, &data->rect.xmax, -UI_FLT_MAX, UI_FLT_MAX, 0.1,0.5,"Highest x value to allow"); + uiBlockEndAlign(block); + + uiBlockBeginAlign(block); + uiDefButBitI(block, TOGBUT, FCM_LIMIT_YMIN, B_FMODIFIER_REDRAW, "yMin", 5, *yco-52, togButWidth, 18, &data->flag, 0, 24, 0, 0, "Use minimum y value"); + uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 5+togButWidth, *yco-52, (textButWidth-5), 18, &data->rect.ymin, -UI_FLT_MAX, UI_FLT_MAX, 0.1,0.5,"Lowest y value to allow"); + uiBlockEndAlign(block); + + uiBlockBeginAlign(block); + uiDefButBitI(block, TOGBUT, FCM_LIMIT_YMAX, B_FMODIFIER_REDRAW, "YMax", 5+(width-(textButWidth-5)-togButWidth), *yco-52, 50, 18, &data->flag, 0, 24, 0, 0, "Use maximum y value"); + uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 5+(width-textButWidth-5), *yco-52, (textButWidth-5), 18, &data->rect.ymax, -UI_FLT_MAX, UI_FLT_MAX, 0.1,0.5,"Highest y value to allow"); + uiBlockEndAlign(block); +} + +/* --------------- */ + static void graph_panel_modifier_draw(uiBlock *block, FCurve *fcu, FModifier *fcm, int *yco) { FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm); @@ -716,25 +909,24 @@ static void graph_panel_modifier_draw(uiBlock *block, FCurve *fcu, FModifier *fc uiBlockSetEmboss(block, UI_EMBOSSN); /* rounded header */ -#if 0 // XXX buggy... - if (active) uiBlockSetCol(block, TH_BUT_ACTION); - rb_col= (active)?-20:20; - but= uiDefBut(block, ROUNDBOX, B_REDR, "", 10-8, *yco-2, width, 24, NULL, 5.0, 0.0, 15.0, (float)(rb_col-20), ""); - if (active) uiBlockSetCol(block, TH_AUTO); -#endif // XXX buggy + rb_col= (active)?-20:20; + but= uiDefBut(block, ROUNDBOX, B_REDR, "", 0, *yco-2, width, 24, NULL, 5.0, 0.0, 15.0, (float)(rb_col-20), ""); /* expand */ - uiDefIconButBitS(block, ICONTOG, FMODIFIER_FLAG_EXPANDED, B_REDR, ICON_TRIA_RIGHT, 5, *yco-1, 20, 20, &fcm->flag, 0.0, 0.0, 0, 0, "Modifier is expanded"); + uiDefIconButBitS(block, ICONTOG, FMODIFIER_FLAG_EXPANDED, B_REDR, ICON_TRIA_RIGHT, 5, *yco-1, 20, 20, &fcm->flag, 0.0, 0.0, 0, 0, "Modifier is expanded."); /* checkbox for 'active' status (for now) */ - but= uiDefIconButBitS(block, ICONTOG, FMODIFIER_FLAG_ACTIVE, B_REDR, ICON_RADIOBUT_OFF, 25, *yco-1, 20, 20, &fcm->flag, 0.0, 0.0, 0, 0, "Modifier is active one"); + but= uiDefIconButBitS(block, ICONTOG, FMODIFIER_FLAG_ACTIVE, B_REDR, ICON_RADIOBUT_OFF, 25, *yco-1, 20, 20, &fcm->flag, 0.0, 0.0, 0, 0, "Modifier is active one."); uiButSetFunc(but, activate_fmodifier_cb, fcu, fcm); /* name */ if (fmi) - but= uiDefBut(block, LABEL, 1, fmi->name, 10+40, *yco, 240, 20, NULL, 0.0, 0.0, 0, 0, "F-Curve Modifier Type. Click to make modifier active one."); + uiDefBut(block, LABEL, 1, fmi->name, 10+40, *yco, 150, 20, NULL, 0.0, 0.0, 0, 0, "F-Curve Modifier Type. Click to make modifier active one."); else - but= uiDefBut(block, LABEL, 1, "<Unknown Modifier>", 10+40, *yco, 240, 20, NULL, 0.0, 0.0, 0, 0, "F-Curve Modifier Type. Click to make modifier active one."); + uiDefBut(block, LABEL, 1, "<Unknown Modifier>", 10+40, *yco, 150, 20, NULL, 0.0, 0.0, 0, 0, "F-Curve Modifier Type. Click to make modifier active one."); + + /* 'mute' button */ + uiDefIconButBitS(block, ICONTOG, FMODIFIER_FLAG_MUTED, B_REDR, ICON_MUTE_IPO_OFF, 10+(width-60), *yco-1, 20, 20, &fcm->flag, 0.0, 0.0, 0, 0, "Modifier is temporarily muted (not evaluated)."); /* delete button */ but= uiDefIconBut(block, BUT, B_REDR, ICON_X, 10+(width-30), *yco, 19, 19, NULL, 0.0, 0.0, 0.0, 0.0, "Delete F-Curve Modifier."); @@ -758,6 +950,14 @@ static void graph_panel_modifier_draw(uiBlock *block, FCurve *fcu, FModifier *fc case FMODIFIER_TYPE_ENVELOPE: /* Envelope */ draw_modifier__envelope(block, fcu, fcm, yco, &height, width, active, rb_col); break; + + case FMODIFIER_TYPE_LIMITS: /* Limits */ + draw_modifier__limits(block, fcu, fcm, yco, &height, width, active, rb_col); + break; + + case FMODIFIER_TYPE_NOISE: /* Noise */ + draw_modifier__noise(block, fcu, fcm, yco, &height, width, active, rb_col); + break; default: /* unknown type */ height= 96; @@ -770,18 +970,19 @@ static void graph_panel_modifier_draw(uiBlock *block, FCurve *fcu, FModifier *fc (*yco) -= (height + 27); } -static void graph_panel_modifiers(const bContext *C, ARegion *ar, short cntrl, bAnimListElem *ale) +static void graph_panel_modifiers(const bContext *C, Panel *pa) { - FCurve *fcu= (FCurve *)ale->data; + bAnimListElem *ale; + FCurve *fcu; FModifier *fcm; uiBlock *block; int yco= 190; - block= uiBeginBlock(C, ar, "graph_panel_modifiers", UI_EMBOSS, UI_HELV); - if (uiNewPanel(C, ar, block, "Modifiers", "Graph", 340, 30, 318, 254)==0) return; - uiBlockSetHandleFunc(block, do_graph_region_modifier_buttons, NULL); + if(!graph_panel_context(C, &ale, &fcu)) + return; - uiNewPanelHeight(block, 204); + block= uiLayoutFreeBlock(pa->layout); + uiBlockSetHandleFunc(block, do_graph_region_modifier_buttons, NULL); /* 'add modifier' button at top of panel */ // XXX for now, this will be a operator button which calls a temporary 'add modifier' operator @@ -790,12 +991,8 @@ static void graph_panel_modifiers(const bContext *C, ARegion *ar, short cntrl, b /* draw each modifier */ for (fcm= fcu->modifiers.first; fcm; fcm= fcm->next) graph_panel_modifier_draw(block, fcu, fcm, &yco); - - /* since these buttons can have variable height */ - if (yco < 0) - uiNewPanelHeight(block, (204 - yco)); - else - uiNewPanelHeight(block, 204); + + MEM_freeN(ale); } /* ******************* general ******************************** */ @@ -828,42 +1025,31 @@ bAnimListElem *get_active_fcurve_channel (bAnimContext *ac) return NULL; } -void graph_region_buttons(const bContext *C, ARegion *ar) +void graph_buttons_register(ARegionType *art) { - SpaceIpo *sipo= (SpaceIpo *)CTX_wm_space_data(C); - bAnimContext ac; - bAnimListElem *ale= NULL; - - /* for now, only draw if we could init the anim-context info (necessary for all animation-related tools) - * to work correctly is able to be correctly retrieved. There's no point showing empty panels? - */ - if (ANIM_animdata_get_context(C, &ac) == 0) - return; - - - /* try to find 'active' F-Curve */ - ale= get_active_fcurve_channel(&ac); - if (ale == NULL) - return; - - /* for now, the properties panel displays info about the selected channels */ - graph_panel_properties(C, ar, 0, ale); - - /* driver settings for active F-Curve (only for 'Drivers' mode) */ - if (sipo->mode == SIPO_MODE_DRIVERS) - graph_panel_drivers(C, ar, 0, ale); - - /* modifiers */ - graph_panel_modifiers(C, ar, 0, ale); - + PanelType *pt; - uiDrawPanels(C, 1); /* 1 = align */ - uiMatchPanelsView2d(ar); /* sets v2d->totrct */ - - /* free temp data */ - MEM_freeN(ale); -} + pt= MEM_callocN(sizeof(PanelType), "spacetype graph panel properties"); + strcpy(pt->idname, "GRAPH_PT_properties"); + strcpy(pt->label, "Properties"); + pt->draw= graph_panel_properties; + pt->poll= graph_panel_poll; + BLI_addtail(&art->paneltypes, pt); + pt= MEM_callocN(sizeof(PanelType), "spacetype graph panel drivers"); + strcpy(pt->idname, "GRAPH_PT_drivers"); + strcpy(pt->label, "Drivers"); + pt->draw= graph_panel_drivers; + pt->poll= graph_panel_drivers_poll; + BLI_addtail(&art->paneltypes, pt); + + pt= MEM_callocN(sizeof(PanelType), "spacetype graph panel modifiers"); + strcpy(pt->idname, "GRAPH_PT_modifiers"); + strcpy(pt->label, "Modifiers"); + pt->draw= graph_panel_modifiers; + pt->poll= graph_panel_poll; + BLI_addtail(&art->paneltypes, pt); +} static int graph_properties(bContext *C, wmOperator *op) { diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index 46d3f102b89..f6d9406e7da 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -84,10 +84,8 @@ #include "UI_interface_icons.h" #include "UI_resources.h" #include "UI_view2d.h" -#include "UI_text.h" /* XXX */ -extern void ui_rasterpos_safe(float x, float y, float aspect); extern void gl_round_box(int mode, float minx, float miny, float maxx, float maxy, float rad); /* *************************** */ @@ -744,7 +742,83 @@ static void draw_ipokey(SpaceIpo *sipo, ARegion *ar) /* Public Curve-Drawing API ---------------- */ -void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid *grid) +/* Draw the 'ghost' F-Curves (i.e. snapshots of the curve) */ +void graph_draw_ghost_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid *grid) +{ + FCurve *fcu; + + /* draw with thick dotted lines */ + setlinestyle(1); + glLineWidth(3.0f); + + /* anti-aliased lines for less jagged appearance */ + glEnable(GL_LINE_SMOOTH); + glEnable(GL_BLEND); + + /* the ghost curves are simply sampled F-Curves stored in sipo->ghostCurves */ + for (fcu= sipo->ghostCurves.first; fcu; fcu= fcu->next) { + /* set whatever color the curve has set + * - this is set by the function which creates these + * - draw with a fixed opacity of 2 + */ + glColor4f(fcu->color[0], fcu->color[1], fcu->color[2], 0.5f); + + /* simply draw the stored samples */ + draw_fcurve_curve_samples(fcu, &ar->v2d); + } + + /* restore settings */ + setlinestyle(0); + glLineWidth(1.0f); + + glDisable(GL_LINE_SMOOTH); + glDisable(GL_BLEND); +} + +/* check if any FModifiers to draw controls for - fcm is 'active' modifier */ +static short fcurve_needs_draw_fmodifier_controls (FCurve *fcu, FModifier *fcm) +{ + /* don't draw if there aren't any modifiers at all */ + if (fcu->modifiers.first == NULL) + return 0; + + /* if there's an active modifier - don't draw if it doesn't drastically + * alter the curve... + */ + if (fcm) { + switch (fcm->type) { + /* clearly harmless */ + case FMODIFIER_TYPE_CYCLES: + return 0; + + /* borderline... */ + case FMODIFIER_TYPE_NOISE: + return 0; + } + } + + /* if only one modifier - don't draw if it is muted or disabled */ + if (fcu->modifiers.first == fcu->modifiers.last) { + fcm= fcu->modifiers.first; + if (fcm->flag & (FMODIFIER_FLAG_DISABLED|FMODIFIER_FLAG_MUTED)) + return 0; + } + + /* if only active modifier - don't draw if it is muted or disabled */ + if (fcm) { + if (fcm->flag & (FMODIFIER_FLAG_DISABLED|FMODIFIER_FLAG_MUTED)) + return 0; + } + + /* if we're still here, this means that there are modifiers with controls to be drawn */ + // FIXME: what happens if all the modifiers were muted/disabled + return 1; +} + +/* This is called twice from space_graph.c -> graph_main_area_draw() + * Unselected then selected F-Curves are drawn so that they do not occlude each other. + */ +void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid *grid, short sel) { ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; @@ -752,6 +826,7 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGri /* build list of curves to draw */ filter= (ANIMFILTER_VISIBLE|ANIMFILTER_CURVESONLY|ANIMFILTER_CURVEVISIBLE); + filter |= ((sel) ? (ANIMFILTER_SEL) : (ANIMFILTER_UNSEL)); ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); /* for each curve: @@ -787,8 +862,10 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGri UI_ThemeColorShade(TH_HEADER, 50); } else { - /* set whatever color the curve has set */ - glColor3fv(fcu->color); + /* set whatever color the curve has set + * - unselected curves draw less opaque to help distinguish the selected ones + */ + glColor4f(fcu->color[0], fcu->color[1], fcu->color[2], ((sel) ? 1.0f : 0.5f)); } /* anti-aliased lines for less jagged appearance */ @@ -818,14 +895,8 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGri } /* 2) draw handles and vertices as appropriate based on active */ - if ( ((fcm) && (fcm->type != FMODIFIER_TYPE_CYCLES)) || (fcu->modifiers.first && !fcm) ) { - /* draw controls for the 'active' modifier - * - there may not be an 'active' modifier on this curve to draw - * - this curve may not be active, so modifier controls shouldn't get drawn either - * - * NOTE: cycles modifier is currently an exception where the original points can still be edited, so - * this branch is skipped... (TODO: set up the generic system for this so that we don't need special hacks like this) - */ + if (fcurve_needs_draw_fmodifier_controls(fcu, fcm)) { + /* only draw controls if this is the active modifier */ if ((fcu->flag & FCURVE_ACTIVE) && (fcm)) { switch (fcm->type) { case FMODIFIER_TYPE_ENVELOPE: /* envelope */ @@ -972,7 +1043,7 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) expand= ICON_TRIA_RIGHT; sel = SEL_ACTC(act); - strcpy(name, "Action"); + strcpy(name, act->id.name+2); } break; case ANIMTYPE_FILLDRIVERS: /* drivers widget */ @@ -1176,10 +1247,14 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) else mute = ICON_MUTE_IPO_OFF; - if (EDITABLE_FCU(fcu)) - protect = ICON_UNLOCKED; + if (fcu->bezt) { + if (EDITABLE_FCU(fcu)) + protect = ICON_UNLOCKED; + else + protect = ICON_LOCKED; + } else - protect = ICON_LOCKED; + protect = ICON_ZOOMOUT; // XXX editability is irrelevant here, but this icon is temp... sel = SEL_FCU(fcu); @@ -1326,8 +1401,7 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) else UI_ThemeColor(TH_TEXT); offset += 3; - ui_rasterpos_safe(x+offset, y-4, 1.0f); - UI_DrawString(G.font, name, 0); + UI_DrawString(x+offset, y-4, name); /* reset offset - for RHS of panel */ offset = 0; diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index de020e8ce70..a3d0b50b9a6 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -60,6 +60,7 @@ #include "RNA_access.h" #include "RNA_define.h" +#include "RNA_enum_types.h" #include "BKE_action.h" #include "BKE_depsgraph.h" @@ -115,19 +116,21 @@ static void get_graph_keyframe_extents (bAnimContext *ac, float *xmin, float *xm for (ale= anim_data.first; ale; ale= ale->next) { Object *nob= NULL; //ANIM_nla_mapping_get(ac, ale); FCurve *fcu= (FCurve *)ale->key_data; - float tmin, tmax; + float txmin, txmax, tymin, tymax; /* get range and apply necessary scaling before */ - calc_fcurve_bounds(fcu, &tmin, &tmax, ymin, ymax); + calc_fcurve_bounds(fcu, &txmin, &txmax, &tymin, &tymax); if (nob) { - tmin= get_action_frame_inv(nob, tmin); - tmax= get_action_frame_inv(nob, tmax); + txmin= get_action_frame_inv(nob, txmin); + txmax= get_action_frame_inv(nob, txmax); } /* try to set cur using these values, if they're more extreme than previously set values */ - if (xmin) *xmin= MIN2(*xmin, tmin); - if (xmax) *xmax= MAX2(*xmax, tmax); + if ((xmin) && (txmin < *xmin)) *xmin= txmin; + if ((xmax) && (txmax > *xmax)) *xmax= txmax; + if ((ymin) && (tymin < *ymin)) *ymin= tymin; + if ((ymax) && (tymax > *ymax)) *ymax= tymax; } /* free memory */ @@ -238,12 +241,245 @@ void GRAPHEDIT_OT_view_all (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } +/* ******************** Create Ghost-Curves Operator *********************** */ +/* This operator samples the data of the selected F-Curves to F-Points, storing them + * as 'ghost curves' in the active Graph Editor + */ + +/* Bake each F-Curve into a set of samples, and store as a ghost curve */ +static void create_ghost_curves (bAnimContext *ac, int start, int end) +{ + SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first; + ListBase anim_data = {NULL, NULL}; + bAnimListElem *ale; + int filter; + + /* free existing ghost curves */ + free_fcurves(&sipo->ghostCurves); + + /* sanity check */ + if (start >= end) { + printf("Error: Frame range for Ghost F-Curve creation is inappropriate \n"); + return; + } + + /* filter data */ + filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_SEL | ANIMFILTER_CURVESONLY); + ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); + + /* loop through filtered data and add keys between selected keyframes on every frame */ + for (ale= anim_data.first; ale; ale= ale->next) { + FCurve *fcu= (FCurve *)ale->key_data; + FCurve *gcu= MEM_callocN(sizeof(FCurve), "Ghost FCurve"); + ChannelDriver *driver= fcu->driver; + FPoint *fpt; + int cfra; + + /* disable driver so that it don't muck up the sampling process */ + fcu->driver= NULL; + + /* create samples, but store them in a new curve + * - we cannot use fcurve_store_samples() as that will only overwrite the original curve + */ + gcu->fpt= fpt= MEM_callocN(sizeof(FPoint)*(end-start+1), "Ghost FPoint Samples"); + gcu->totvert= end - start + 1; + + /* use the sampling callback at 1-frame intervals from start to end frames */ + for (cfra= start; cfra <= end; cfra++, fpt++) { + fpt->vec[0]= (float)cfra; + fpt->vec[1]= fcurve_samplingcb_evalcurve(fcu, NULL, (float)cfra); + } + + /* set color of ghost curve + * - make the color slightly darker + */ + gcu->color[0]= fcu->color[0] - 0.07f; + gcu->color[1]= fcu->color[1] - 0.07f; + gcu->color[2]= fcu->color[2] - 0.07f; + + /* store new ghost curve */ + BLI_addtail(&sipo->ghostCurves, gcu); + + /* restore driver */ + fcu->driver= driver; + } + + /* admin and redraws */ + BLI_freelistN(&anim_data); +} + +/* ------------------- */ + +static int graphkeys_create_ghostcurves_exec(bContext *C, wmOperator *op) +{ + bAnimContext ac; + View2D *v2d; + int start, end; + + /* get editor data */ + if (ANIM_animdata_get_context(C, &ac) == 0) + return OPERATOR_CANCELLED; + + /* ghost curves are snapshots of the visible portions of the curves, so set range to be the visible range */ + v2d= &ac.ar->v2d; + start= (int)v2d->cur.xmin; + end= (int)v2d->cur.xmax; + + /* bake selected curves into a ghost curve */ + create_ghost_curves(&ac, start, end); + + /* update this editor only */ + ED_area_tag_redraw(CTX_wm_area(C)); + + return OPERATOR_FINISHED; +} + +void GRAPHEDIT_OT_ghost_curves_create (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Create Ghost Curves"; + ot->idname= "GRAPHEDIT_OT_ghost_curves_create"; + ot->description= "Create snapshot (Ghosts) of selected F-Curves as background aid for active Graph Editor."; + + /* api callbacks */ + ot->exec= graphkeys_create_ghostcurves_exec; + ot->poll= ED_operator_areaactive; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + // todo: add props for start/end frames +} + +/* ******************** Clear Ghost-Curves Operator *********************** */ +/* This operator clears the 'ghost curves' for the active Graph Editor */ + +static int graphkeys_clear_ghostcurves_exec(bContext *C, wmOperator *op) +{ + bAnimContext ac; + SpaceIpo *sipo; + + /* get editor data */ + if (ANIM_animdata_get_context(C, &ac) == 0) + return OPERATOR_CANCELLED; + sipo= (SpaceIpo *)ac.sa->spacedata.first; + + /* if no ghost curves, don't do anything */ + if (sipo->ghostCurves.first == NULL) + return OPERATOR_CANCELLED; + + /* free ghost curves */ + free_fcurves(&sipo->ghostCurves); + + /* update this editor only */ + ED_area_tag_redraw(CTX_wm_area(C)); + + return OPERATOR_FINISHED; +} + +void GRAPHEDIT_OT_ghost_curves_clear (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Create Ghost Curves"; + ot->idname= "GRAPHEDIT_OT_ghost_curves_clear"; + ot->description= "Clear F-Curve snapshots (Ghosts) for active Graph Editor."; + + /* api callbacks */ + ot->exec= graphkeys_clear_ghostcurves_exec; + ot->poll= ED_operator_areaactive; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} /* ************************************************************************** */ /* GENERAL STUFF */ // TODO: insertkey +/* ******************** Click-Insert Keyframes Operator ************************* */ + +static int graphkeys_click_insert_exec (bContext *C, wmOperator *op) +{ + bAnimContext ac; + bAnimListElem *ale; + float frame, val; + + /* get animation context */ + if (ANIM_animdata_get_context(C, &ac) == 0) + return OPERATOR_CANCELLED; + + /* get active F-Curve 'anim-list-element' */ + ale= get_active_fcurve_channel(&ac); + if (ELEM(NULL, ale, ale->data)) { + if (ale) MEM_freeN(ale); + return OPERATOR_CANCELLED; + } + + /* get frame and value from props */ + frame= RNA_float_get(op->ptr, "frame"); + val= RNA_float_get(op->ptr, "value"); + + /* insert keyframe on the specified frame + value */ + insert_vert_fcurve((FCurve *)ale->data, frame, val, 0); + + /* free temp data */ + MEM_freeN(ale); + + /* set notifier that things have changed */ + ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); + + /* done */ + return OPERATOR_FINISHED; +} + +static int graphkeys_click_insert_invoke (bContext *C, wmOperator *op, wmEvent *evt) +{ + bAnimContext ac; + ARegion *ar; + View2D *v2d; + int mval[2]; + float x, y; + + /* get animation context */ + if (ANIM_animdata_get_context(C, &ac) == 0) + return OPERATOR_CANCELLED; + + /* store mouse coordinates in View2D space, into the operator's properties */ + ar= ac.ar; + v2d= &ar->v2d; + + mval[0]= (evt->x - ar->winrct.xmin); + mval[1]= (evt->y - ar->winrct.ymin); + + UI_view2d_region_to_view(v2d, mval[0], mval[1], &x, &y); + + RNA_float_set(op->ptr, "frame", x); + RNA_float_set(op->ptr, "value", y); + + /* run exec now */ + return graphkeys_click_insert_exec(C, op); +} + +void GRAPHEDIT_OT_keyframes_click_insert (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Click-Insert Keyframes"; + ot->idname= "GRAPHEDIT_OT_keyframes_click_insert"; + + /* api callbacks */ + ot->invoke= graphkeys_click_insert_invoke; + ot->exec= graphkeys_click_insert_exec; + ot->poll= ED_operator_areaactive; // XXX active + editable poll + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_float(ot->srna, "frame", 1.0f, -FLT_MAX, FLT_MAX, "Frame Number", "Frame to insert keyframe on", 0, 100); + RNA_def_float(ot->srna, "value", 1.0f, -FLT_MAX, FLT_MAX, "Value", "Value for keyframe on", 0, 100); +} + /* ******************** Copy/Paste Keyframes Operator ************************* */ /* NOTE: the backend code for this is shared with the dopesheet editor */ @@ -302,7 +538,7 @@ static int graphkeys_copy_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -341,7 +577,7 @@ static int graphkeys_paste_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -398,7 +634,7 @@ static int graphkeys_duplicate_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -469,7 +705,7 @@ static int graphkeys_delete_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -530,7 +766,7 @@ static int graphkeys_clean_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -611,7 +847,7 @@ static int graphkeys_bake_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -737,7 +973,7 @@ static int graphkeys_sample_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -811,7 +1047,7 @@ static int graphkeys_expo_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -837,14 +1073,6 @@ void GRAPHEDIT_OT_keyframes_extrapolation_type (wmOperatorType *ot) /* ******************** Set Interpolation-Type Operator *********************** */ -/* defines for set ipo-type for selected keyframes tool */ -EnumPropertyItem prop_graphkeys_ipo_types[] = { - {BEZT_IPO_CONST, "CONSTANT", "Constant Interpolation", ""}, - {BEZT_IPO_LIN, "LINEAR", "Linear Interpolation", ""}, - {BEZT_IPO_BEZ, "BEZIER", "Bezier Interpolation", ""}, - {0, NULL, NULL, NULL} -}; - /* this function is responsible for setting interpolation mode for keyframes */ static void setipo_graph_keys(bAnimContext *ac, short mode) { @@ -887,7 +1115,7 @@ static int graphkeys_ipo_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -908,21 +1136,11 @@ void GRAPHEDIT_OT_keyframes_interpolation_type (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - RNA_def_enum(ot->srna, "type", prop_graphkeys_ipo_types, 0, "Type", ""); + RNA_def_enum(ot->srna, "type", beztriple_interpolation_mode_items, 0, "Type", ""); } /* ******************** Set Handle-Type Operator *********************** */ -/* defines for set handle-type for selected keyframes tool */ -EnumPropertyItem prop_graphkeys_handletype_types[] = { - {HD_AUTO, "AUTO", "Auto Handles", ""}, - {HD_VECT, "VECTOR", "Vector Handles", ""}, - {HD_FREE, "FREE", "Free Handles", ""}, - {HD_ALIGN, "ALIGN", "Aligned Handles", ""}, -// {-1, "TOGGLE", "Toggle between Free and Aligned Handles", ""}, - {0, NULL, NULL, NULL} -}; - /* this function is responsible for setting handle-type of selected keyframes */ static void sethandles_graph_keys(bAnimContext *ac, short mode) { @@ -984,7 +1202,7 @@ static int graphkeys_handletype_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -1005,7 +1223,7 @@ void GRAPHEDIT_OT_keyframes_handletype (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - RNA_def_enum(ot->srna, "type", prop_graphkeys_handletype_types, 0, "Type", ""); + RNA_def_enum(ot->srna, "type", beztriple_handle_type_items, 0, "Type", ""); } /* ************************************************************************** */ @@ -1098,22 +1316,6 @@ void GRAPHEDIT_OT_keyframes_euler_filter (wmOperatorType *ot) /* ***************** Snap Current Frame Operator *********************** */ -/* helper callback for graphkeys_cfrasnap_exec() -> used to help get the average time of all selected beztriples */ -// TODO: if some other code somewhere needs this, it'll be time to port this over to keyframes_edit.c!!! -static short bezt_calc_average(BeztEditData *bed, BezTriple *bezt) -{ - /* only if selected */ - if (bezt->f2 & SELECT) { - /* store average time in float (only do rounding at last step */ - bed->f1 += bezt->vec[1][0]; - - /* increment number of items */ - bed->i1++; - } - - return 0; -} - /* snap current-frame indicator to 'average time' of selected keyframe */ static int graphkeys_cfrasnap_exec(bContext *C, wmOperator *op) { @@ -1145,7 +1347,7 @@ static int graphkeys_cfrasnap_exec(bContext *C, wmOperator *op) CFRA= (int)floor((bed.f1 / bed.i1) + 0.5f); } - /* set notifier tha things have changed */ + /* set notifier that things have changed */ WM_event_add_notifier(C, NC_SCENE|ND_FRAME, ac.scene); return OPERATOR_FINISHED; @@ -1188,7 +1390,7 @@ static void snap_graph_keys(bAnimContext *ac, short mode) BeztEditFunc edit_cb; /* filter data */ - filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE| ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY); + filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY); ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); /* get beztriple editing callbacks */ @@ -1196,6 +1398,10 @@ static void snap_graph_keys(bAnimContext *ac, short mode) memset(&bed, 0, sizeof(BeztEditData)); bed.scene= ac->scene; + if (mode == GRAPHKEYS_SNAP_NEAREST_MARKER) { + bed.list.first= (ac->markers) ? ac->markers->first : NULL; + bed.list.last= (ac->markers) ? ac->markers->last : NULL; + } /* snap keyframes */ for (ale= anim_data.first; ale; ale= ale->next) { @@ -1232,7 +1438,7 @@ static int graphkeys_snap_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -1286,13 +1492,14 @@ static void mirror_graph_keys(bAnimContext *ac, short mode) /* for 'first selected marker' mode, need to find first selected marker first! */ // XXX should this be made into a helper func in the API? if (mode == GRAPHKEYS_MIRROR_MARKER) { - Scene *scene= ac->scene; TimeMarker *marker= NULL; /* find first selected marker */ - for (marker= scene->markers.first; marker; marker=marker->next) { - if (marker->flag & SELECT) { - break; + if (ac->markers) { + for (marker= ac->markers->first; marker; marker=marker->next) { + if (marker->flag & SELECT) { + break; + } } } @@ -1342,7 +1549,7 @@ static int graphkeys_mirror_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -1396,7 +1603,7 @@ static int graphkeys_smooth_exec(bContext *C, wmOperator *op) /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); return OPERATOR_FINISHED; @@ -1421,18 +1628,6 @@ void GRAPHEDIT_OT_keyframes_smooth (wmOperatorType *ot) /* ******************** Add F-Curve Modifier Operator *********************** */ -/* F-Modifier types - duplicate of existing codes... */ - // XXX how can we have this list from the RNA definitions instead? -EnumPropertyItem prop_fmodifier_types[] = { - {FMODIFIER_TYPE_GENERATOR, "GENERATOR", "Generator", ""}, - {FMODIFIER_TYPE_ENVELOPE, "ENVELOPE", "Envelope", ""}, - {FMODIFIER_TYPE_CYCLES, "CYCLES", "Cycles", ""}, - {FMODIFIER_TYPE_NOISE, "NOISE", "Noise", ""}, - {FMODIFIER_TYPE_FILTER, "FILTER", "Filter", ""}, - {FMODIFIER_TYPE_PYTHON, "PYTHON", "Python", ""}, - {0, NULL, NULL, NULL} -}; - static int graph_fmodifier_add_exec(bContext *C, wmOperator *op) { bAnimContext ac; @@ -1491,7 +1686,7 @@ void GRAPHEDIT_OT_fmodifier_add (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - RNA_def_enum(ot->srna, "type", prop_fmodifier_types, 0, "Type", ""); + RNA_def_enum(ot->srna, "type", fmodifier_type_items, 0, "Type", ""); } /* ************************************************************************** */ diff --git a/source/blender/editors/space_graph/graph_header.c b/source/blender/editors/space_graph/graph_header.c index e223696c3bf..178b4b4562f 100644 --- a/source/blender/editors/space_graph/graph_header.c +++ b/source/blender/editors/space_graph/graph_header.c @@ -66,8 +66,6 @@ enum { B_REDR = 0, B_MODECHANGE, - B_GRAPHCOPYKEYS, - B_GRAPHPASTEKEYS, } eActHeader_ButEvents; /* ************************ header area region *********************** */ @@ -99,7 +97,7 @@ static uiBlock *graph_viewmenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "graph_viewmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "graph_viewmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_viewmenu, NULL); // XXX these options should use new menu-options @@ -156,7 +154,7 @@ void graph_header_buttons(const bContext *C, ARegion *ar) uiBlock *block; int xco, yco= 3; - block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS, UI_HELV); + block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS); uiBlockSetHandleFunc(block, do_graph_buttons, NULL); xco= ED_area_header_standardbuttons(C, block, yco); @@ -164,9 +162,6 @@ void graph_header_buttons(const bContext *C, ARegion *ar) if ((sa->flag & HEADER_NO_PULLDOWN)==0) { int xmax; - /* pull down menus */ - uiBlockSetEmboss(block, UI_EMBOSSP); - xmax= GetButStringLength("View"); uiDefPulldownBut(block, graph_viewmenu, CTX_wm_area(C), "View", xco, yco-2, xmax-3, 24, ""); @@ -198,17 +193,17 @@ void graph_header_buttons(const bContext *C, ARegion *ar) uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCAM, B_REDR, ICON_CAMERA_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Cameras"); uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCUR, B_REDR, ICON_CURVE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Curves"); uiBlockEndAlign(block); - xco += 30; + xco += 15; } else { // XXX this case shouldn't happen at all... for now, just pad out same amount of space - xco += 6*XIC + 35; + xco += 6*XIC + 15; } /* copy + paste */ uiBlockBeginAlign(block); - uiDefIconBut(block, BUT, B_GRAPHCOPYKEYS, ICON_COPYDOWN, xco,yco,XIC,YIC, 0, 0, 0, 0, 0, "Copies the selected keyframes from the selected channel(s) to the buffer"); - uiDefIconBut(block, BUT, B_GRAPHPASTEKEYS, ICON_PASTEDOWN, xco+=XIC,yco,XIC,YIC, 0, 0, 0, 0, 0, "Pastes the keyframes from the buffer"); + uiDefIconButO(block, BUT, "GRAPHEDIT_OT_keyframes_copy", WM_OP_INVOKE_REGION_WIN, ICON_COPYDOWN, xco+=XIC,yco,XIC,YIC, "Copies the selected keyframes from the selected channel(s) to the buffer"); + uiDefIconButO(block, BUT, "GRAPHEDIT_OT_keyframes_paste", WM_OP_INVOKE_REGION_WIN, ICON_PASTEDOWN, xco+=XIC,yco,XIC,YIC, "Pastes the keyframes from the buffer"); uiBlockEndAlign(block); xco += (XIC + 8); @@ -225,6 +220,16 @@ void graph_header_buttons(const bContext *C, ARegion *ar) xco,yco,90,YIC, &sipo->autosnap, 0, 1, 0, 0, "Auto-snapping mode for keyframe times when transforming"); } + xco += 98; + + /* ghost curves */ + // XXX these icons need to be changed + if (sipo->ghostCurves.first) + uiDefIconButO(block, BUT, "GRAPHEDIT_OT_ghost_curves_clear", WM_OP_INVOKE_REGION_WIN, ICON_OUTLINER_DATA_CURVE, xco,yco,XIC,YIC, "Clear F-Curve snapshots (Ghosts) for this Graph Editor instance"); + else + uiDefIconButO(block, BUT, "GRAPHEDIT_OT_ghost_curves_create", WM_OP_INVOKE_REGION_WIN, ICON_OUTLINER_OB_CURVE, xco,yco,XIC,YIC, "Create snapshot (Ghosts) of selected F-Curves as background aid for this Graph Editor instance"); + xco+= XIC; + /* always as last */ UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, (int)(ar->v2d.tot.ymax - ar->v2d.tot.ymin)); diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h index 06fda53fc67..7ba636302a5 100644 --- a/source/blender/editors/space_graph/graph_intern.h +++ b/source/blender/editors/space_graph/graph_intern.h @@ -35,6 +35,7 @@ struct bAnimListElem; struct SpaceIpo; struct ScrArea; struct ARegion; +struct ARegionType; struct View2DGrid; /* internal exports only */ @@ -46,7 +47,9 @@ struct ARegion *graph_has_buttons_region(struct ScrArea *sa); /* ***************************************** */ /* graph_draw.c */ void graph_draw_channel_names(struct bAnimContext *ac, struct SpaceIpo *sipo, struct ARegion *ar); -void graph_draw_curves(struct bAnimContext *ac, struct SpaceIpo *sipo, struct ARegion *ar, struct View2DGrid *grid); + +void graph_draw_curves(struct bAnimContext *ac, struct SpaceIpo *sipo, struct ARegion *ar, struct View2DGrid *grid, short sel); +void graph_draw_ghost_curves(struct bAnimContext *ac, struct SpaceIpo *sipo, struct ARegion *ar, struct View2DGrid *grid); /* ***************************************** */ /* graph_header.c */ @@ -82,6 +85,8 @@ enum { void GRAPHEDIT_OT_previewrange_set(struct wmOperatorType *ot); void GRAPHEDIT_OT_view_all(struct wmOperatorType *ot); +void GRAPHEDIT_OT_keyframes_click_insert(struct wmOperatorType *ot); + void GRAPHEDIT_OT_keyframes_copy(struct wmOperatorType *ot); void GRAPHEDIT_OT_keyframes_paste(struct wmOperatorType *ot); @@ -125,10 +130,15 @@ enum { void GRAPHEDIT_OT_fmodifier_add(struct wmOperatorType *ot); +/* ----------- */ + +void GRAPHEDIT_OT_ghost_curves_create(struct wmOperatorType *ot); +void GRAPHEDIT_OT_ghost_curves_clear(struct wmOperatorType *ot); + /* ***************************************** */ /* graph_buttons.c */ void GRAPHEDIT_OT_properties(struct wmOperatorType *ot); -void graph_region_buttons(const struct bContext *C, struct ARegion *ar); +void graph_buttons_register(struct ARegionType *art); struct bAnimListElem *get_active_fcurve_channel(struct bAnimContext *ac); diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index 4ff566489ae..a23f0081c04 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -101,6 +101,9 @@ void graphedit_operatortypes(void) WM_operatortype_append(GRAPHEDIT_OT_view_all); WM_operatortype_append(GRAPHEDIT_OT_properties); + WM_operatortype_append(GRAPHEDIT_OT_ghost_curves_create); + WM_operatortype_append(GRAPHEDIT_OT_ghost_curves_clear); + /* keyframes */ /* selection */ WM_operatortype_append(GRAPHEDIT_OT_keyframes_clickselect); @@ -125,6 +128,8 @@ void graphedit_operatortypes(void) WM_operatortype_append(GRAPHEDIT_OT_keyframes_copy); WM_operatortype_append(GRAPHEDIT_OT_keyframes_paste); + WM_operatortype_append(GRAPHEDIT_OT_keyframes_click_insert); + //TODO: insertkey... /* F-Curve Modifiers */ @@ -136,16 +141,28 @@ void graphedit_operatortypes(void) static void graphedit_keymap_keyframes (wmWindowManager *wm, ListBase *keymap) { + wmKeymapItem *kmi; + /* view */ WM_keymap_add_item(keymap, "GRAPHEDIT_OT_handles_view_toggle", HKEY, KM_PRESS, KM_CTRL, 0); /* graph_select.c - selection tools */ /* click-select */ - // TODO: column to alt, left-right to ctrl (for select-linked consistency) WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL, 0)->ptr, "column", 1); - RNA_boolean_set(WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1); - RNA_enum_set(WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "left_right", GRAPHKEYS_LRSEL_TEST); + kmi= WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0); + RNA_boolean_set(kmi->ptr, "column", 1); + kmi= WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0); + RNA_boolean_set(kmi->ptr, "extend", 1); + kmi= WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT|KM_SHIFT, 0); + RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_boolean_set(kmi->ptr, "column", 1); + kmi= WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); + RNA_enum_set(kmi->ptr, "left_right", GRAPHKEYS_LRSEL_TEST); + kmi= WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT, 0); + RNA_boolean_set(kmi->ptr, "curves", 1); + kmi= WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT|KM_SHIFT, 0); + RNA_boolean_set(kmi->ptr, "curves", 1); + RNA_boolean_set(kmi->ptr, "extend", 1); /* deselect all */ WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_select_all_toggle", AKEY, KM_PRESS, 0, 0); @@ -189,7 +206,7 @@ static void graphedit_keymap_keyframes (wmWindowManager *wm, ListBase *keymap) WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0); /* insertkey */ - // TODO.. + WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_click_insert", LEFTMOUSE, KM_PRESS, KM_CTRL, 0); /* copy/paste */ WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_copy", CKEY, KM_PRESS, KM_CTRL, 0); diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index d6f738b5285..bb923ca6f95 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -73,6 +73,7 @@ #include "ED_keyframing.h" #include "ED_keyframes_draw.h" #include "ED_keyframes_edit.h" +#include "ED_markers.h" #include "ED_screen.h" #include "ED_space_api.h" @@ -92,7 +93,7 @@ * 3) (de)select all - no testing is done; only for use internal tools as normal function... */ -/* Deselects keyframes in the action editor +/* Deselects keyframes in the Graph Editor * - This is called by the deselect all operator, as well as other ones! * * - test: check if select or deselect all @@ -140,13 +141,9 @@ static void deselect_graph_keys (bAnimContext *ac, short test, short sel) /* Keyframes First */ ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, sel_cb, NULL); - /* Curve Selection too */ - if (sel == SELECT_ADD) - fcu->flag |= FCURVE_SELECTED; - else if (sel == SELECT_SUBTRACT) + /* deactivate the F-Curve, and deselect if deselecting keyframes */ + if (sel == SELECT_SUBTRACT) fcu->flag &= ~FCURVE_SELECTED; - else - fcu->flag ^= FCURVE_SELECTED; fcu->flag &= ~FCURVE_ACTIVE; } @@ -170,7 +167,7 @@ static int graphkeys_deselectall_exec(bContext *C, wmOperator *op) else deselect_graph_keys(&ac, 1, SELECT_ADD); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ED_area_tag_redraw(CTX_wm_area(C)); // FIXME... should be updating 'keyframes' data context or so instead! return OPERATOR_FINISHED; @@ -359,21 +356,19 @@ static void markers_selectkeys_between (bAnimContext *ac) bAnimListElem *ale; int filter; - BeztEditFunc select_cb; + BeztEditFunc ok_cb, select_cb; BeztEditData bed; float min, max; /* get extreme markers */ - //get_minmax_markers(1, &min, &max); // FIXME... add back markers api! - min= (float)ac->scene->r.sfra; // xxx temp code - max= (float)ac->scene->r.efra; // xxx temp code - - if (min==max) return; + ED_markers_get_minmax(ac->markers, 1, &min, &max); min -= 0.5f; max += 0.5f; /* get editing funcs + data */ + ok_cb= ANIM_editkeyframes_ok(BEZT_OK_FRAMERANGE); select_cb= ANIM_editkeyframes_select(SELECT_ADD); + memset(&bed, 0, sizeof(BeztEditData)); bed.f1= min; bed.f2= max; @@ -388,11 +383,11 @@ static void markers_selectkeys_between (bAnimContext *ac) if (nob) { ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 0, 1); - ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, select_cb, NULL); + ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, ok_cb, select_cb, NULL); ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 1, 1); } else { - ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, select_cb, NULL); + ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, ok_cb, select_cb, NULL); } } @@ -401,21 +396,6 @@ static void markers_selectkeys_between (bAnimContext *ac) } -/* helper callback for columnselect_graph_keys() -> populate list CfraElems with frame numbers from selected beztriples */ -// TODO: if some other code somewhere needs this, it'll be time to port this over to keyframes_edit.c!!! -static short bezt_to_cfraelem(BeztEditData *bed, BezTriple *bezt) -{ - /* only if selected */ - if (bezt->f2 & SELECT) { - CfraElem *ce= MEM_callocN(sizeof(CfraElem), "cfraElem"); - BLI_addtail(&bed->list, ce); - - ce->cfra= bezt->vec[1][0]; - } - - return 0; -} - /* Selects all visible keyframes in the same frames as the specified elements */ static void columnselect_graph_keys (bAnimContext *ac, short mode) { @@ -452,9 +432,7 @@ static void columnselect_graph_keys (bAnimContext *ac, short mode) break; case GRAPHKEYS_COLUMNSEL_MARKERS_COLUMN: /* list of selected markers */ - // FIXME: markers api needs to be improved for this first! - //make_marker_cfra_list(&elems, 1); - return; // XXX currently, this does nothing! + ED_markers_make_cfra_list(ac->markers, &bed.list, 1); break; default: /* invalid option */ @@ -513,7 +491,7 @@ static int graphkeys_columnselect_exec(bContext *C, wmOperator *op) else columnselect_graph_keys(&ac, mode); - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_SELECT); return OPERATOR_FINISHED; @@ -547,7 +525,7 @@ void GRAPHEDIT_OT_keyframes_columnselect (wmOperatorType *ot) */ /* defines for left-right select tool */ -static EnumPropertyItem prop_leftright_select_types[] = { +static EnumPropertyItem prop_graphkeys_leftright_select_types[] = { {GRAPHKEYS_LRSEL_TEST, "CHECK", "Check if Select Left or Right", ""}, {GRAPHKEYS_LRSEL_NONE, "OFF", "Don't select", ""}, {GRAPHKEYS_LRSEL_LEFT, "LEFT", "Before current frame", ""}, @@ -657,7 +635,7 @@ static short findnearest_fcurve_vert (bAnimContext *ac, int mval[2], FCurve **fc } /* option 1) select keyframe directly under mouse */ -static void mouse_graph_keys (bAnimContext *ac, int mval[], short selectmode) +static void mouse_graph_keys (bAnimContext *ac, int mval[], short select_mode, short curves_only) { FCurve *fcu; BezTriple *bezt; @@ -672,17 +650,22 @@ static void mouse_graph_keys (bAnimContext *ac, int mval[], short selectmode) return; /* deselect all other curves? */ - if (selectmode == SELECT_REPLACE) { - deselect_graph_keys(ac, 0, SELECT_SUBTRACT); // XXX this should be curves, not keys - selectmode= SELECT_ADD; + if (select_mode == SELECT_REPLACE) { + /* reset selection mode */ + select_mode= SELECT_ADD; + + /* deselect all other channels and keyframes */ + //ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); + deselect_graph_keys(ac, 0, SELECT_SUBTRACT); } - /* if we're selecting points too */ - if ( ((fcu->flag & FCURVE_PROTECTED)==0) /*|| (curvesonly == 0) */) { + /* if points can be selected on this F-Curve */ + // TODO: what about those with no keyframes? + if ((curves_only == 0) && ((fcu->flag & FCURVE_PROTECTED)==0)) { /* only if there's keyframe */ if (bezt) { /* depends on selection mode */ - if (selectmode == SELECT_INVERT) { + if (select_mode == SELECT_INVERT) { /* keyframe - invert select of all */ if (handle == NEAREST_HANDLE_KEY) { if (BEZSELECTED(bezt)) { @@ -704,9 +687,6 @@ static void mouse_graph_keys (bAnimContext *ac, int mval[], short selectmode) } } else { - /* deselect all other keyframes? */ - deselect_graph_keys(ac, 0, SELECT_SUBTRACT); - /* if the keyframe was clicked on, select all verts of given beztriple */ if (handle == NEAREST_HANDLE_KEY) { BEZ_SEL(bezt); @@ -719,11 +699,24 @@ static void mouse_graph_keys (bAnimContext *ac, int mval[], short selectmode) } } } + else { + BeztEditFunc select_cb; + BeztEditData bed; + + /* initialise keyframe editing data */ + memset(&bed, 0, sizeof(BeztEditData)); + + /* set up BezTriple edit callbacks */ + select_cb= ANIM_editkeyframes_select(select_mode); + + /* select all keyframes */ + ANIM_fcurve_keys_bezier_loop(&bed, fcu, NULL, select_cb, NULL); + } /* select or deselect curve? */ - if (selectmode == SELECT_INVERT) + if (select_mode == SELECT_INVERT) fcu->flag ^= FCURVE_SELECTED; - else if (selectmode == SELECT_ADD) + else if (select_mode == SELECT_ADD) fcu->flag |= FCURVE_SELECTED; /* set active F-Curve (NOTE: sync the filter flags with findnearest_fcurve_vert) */ @@ -734,7 +727,7 @@ static void mouse_graph_keys (bAnimContext *ac, int mval[], short selectmode) } /* Option 2) Selects all the keyframes on either side of the current frame (depends on which side the mouse is on) */ -static void graphkeys_select_leftright (bAnimContext *ac, short leftright, short select_mode) +static void graphkeys_mselect_leftright (bAnimContext *ac, short leftright, short select_mode) { ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; @@ -744,9 +737,13 @@ static void graphkeys_select_leftright (bAnimContext *ac, short leftright, short BeztEditData bed; Scene *scene= ac->scene; - /* if select mode is replace, deselect all keyframes first */ + /* if select mode is replace, deselect all keyframes (and channels) first */ if (select_mode==SELECT_REPLACE) { - select_mode=SELECT_ADD; + /* reset selection mode to add to selection */ + select_mode= SELECT_ADD; + + /* deselect all other channels and keyframes */ + ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); deselect_graph_keys(ac, 0, SELECT_SUBTRACT); } @@ -786,7 +783,7 @@ static void graphkeys_select_leftright (bAnimContext *ac, short leftright, short } /* Option 3) Selects all visible keyframes in the same frame as the mouse click */ -static void mouse_columnselect_graph_keys (bAnimContext *ac, float selx) +static void graphkeys_mselect_column (bAnimContext *ac, int mval[2], short select_mode) { ListBase anim_data= {NULL, NULL}; bAnimListElem *ale; @@ -794,12 +791,33 @@ static void mouse_columnselect_graph_keys (bAnimContext *ac, float selx) BeztEditFunc select_cb, ok_cb; BeztEditData bed; + FCurve *fcu; + BezTriple *bezt; + float selx = (float)ac->scene->r.cfra; + + /* find the beztriple that occurs on this frame, and use his as the frame number we're using */ + findnearest_fcurve_vert(ac, mval, &fcu, &bezt); + + /* check if anything to select */ + if (ELEM(NULL, fcu, bezt)) + return; + selx= bezt->vec[1][0]; + + /* if select mode is replace, deselect all keyframes (and channels) first */ + if (select_mode==SELECT_REPLACE) { + /* reset selection mode to add to selection */ + select_mode= SELECT_ADD; + + /* deselect all other channels and keyframes */ + ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); + deselect_graph_keys(ac, 0, SELECT_SUBTRACT); + } /* initialise keyframe editing data */ memset(&bed, 0, sizeof(BeztEditData)); /* set up BezTriple edit callbacks */ - select_cb= ANIM_editkeyframes_select(SELECT_ADD); + select_cb= ANIM_editkeyframes_select(select_mode); ok_cb= ANIM_editkeyframes_ok(BEZT_OK_FRAME); /* loop through all of the keys and select additional keyframes @@ -812,7 +830,6 @@ static void mouse_columnselect_graph_keys (bAnimContext *ac, float selx) Object *nob= ANIM_nla_mapping_get(ac, ale); /* set frame for validation callback to refer to */ - // XXX have a more sensitive range? if (nob) bed.f1= get_action_frame(nob, selx); else @@ -853,7 +870,6 @@ static int graphkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *ev mval[1]= (event->y - ar->winrct.ymin); /* select mode is either replace (deselect all, then add) or add/extend */ - // XXX this is currently only available for normal select only if (RNA_boolean_get(op->ptr, "extend")) selectmode= SELECT_INVERT; else @@ -870,22 +886,22 @@ static int graphkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *ev else RNA_int_set(op->ptr, "left_right", GRAPHKEYS_LRSEL_RIGHT); - graphkeys_select_leftright(&ac, RNA_enum_get(op->ptr, "left_right"), selectmode); + graphkeys_mselect_leftright(&ac, RNA_enum_get(op->ptr, "left_right"), selectmode); } else if (RNA_boolean_get(op->ptr, "column")) { - /* select all the keyframes that occur on the same frame as where the mouse clicked */ - float x; - - /* figure out where (the frame) the mouse clicked, and set all keyframes in that frame */ - UI_view2d_region_to_view(v2d, mval[0], mval[1], &x, NULL); - mouse_columnselect_graph_keys(&ac, x); + /* select all keyframes in the same frame as the one that was under the mouse */ + graphkeys_mselect_column(&ac, mval, selectmode); + } + else if (RNA_boolean_get(op->ptr, "curves")) { + /* select all keyframes in F-Curve under mouse */ + mouse_graph_keys(&ac, mval, selectmode, 1); } else { /* select keyframe under mouse */ - mouse_graph_keys(&ac, mval, selectmode); // xxx curves only should become an arg + mouse_graph_keys(&ac, mval, selectmode, 0); } - /* set notifier tha things have changed */ + /* set notifier that things have changed */ ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_BOTH); /* for tweak grab to work */ @@ -904,9 +920,10 @@ void GRAPHEDIT_OT_keyframes_clickselect (wmOperatorType *ot) /* id-props */ // XXX should we make this into separate operators? - RNA_def_enum(ot->srna, "left_right", NULL /* XXX prop_graphkeys_clickselect_items */, 0, "Left Right", ""); // ALTKEY + RNA_def_enum(ot->srna, "left_right", prop_graphkeys_leftright_select_types, 0, "Left Right", ""); // CTRLKEY RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY - RNA_def_boolean(ot->srna, "column", 0, "Column Select", ""); // CTRLKEY + RNA_def_boolean(ot->srna, "column", 0, "Column Select", "Select all keyframes that occur on the same frame as the one under the mouse"); // ALTKEY + RNA_def_boolean(ot->srna, "curves", 0, "Only Curves", "Select all the keyframes in the curve"); // CTRLKEY + ALTKEY } /* ************************************************************************** */ diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index 72e52f15a65..74002f64187 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -42,6 +42,7 @@ #include "BLI_rand.h" #include "BKE_context.h" +#include "BKE_fcurve.h" #include "BKE_screen.h" #include "BKE_utildefines.h" @@ -168,6 +169,9 @@ static void graph_free(SpaceLink *sl) BLI_freelistN(&si->ads->chanbase); MEM_freeN(si->ads); } + + if (si->ghostCurves.first) + free_fcurves(&si->ghostCurves); } @@ -232,8 +236,14 @@ static void graph_main_area_draw(const bContext *C, ARegion *ar) UI_view2d_grid_draw(C, v2d, grid, V2D_GRIDLINES_ALL); /* draw data */ - if (ANIM_animdata_get_context(C, &ac)) - graph_draw_curves(&ac, sipo, ar, grid); + if (ANIM_animdata_get_context(C, &ac)) { + /* draw ghost curves */ + graph_draw_ghost_curves(&ac, sipo, ar, grid); + + /* draw curves twice - unselected, then selected, so that the are fewer occlusion problems */ + graph_draw_curves(&ac, sipo, ar, grid, 0); + graph_draw_curves(&ac, sipo, ar, grid, 1); + } /* only free grid after drawing data, as we need to use it to determine sampling rate */ UI_view2d_grid_free(grid); @@ -283,7 +293,7 @@ static void graph_channel_area_draw(const bContext *C, ARegion *ar) float col[3]; /* clear and setup matrix */ - UI_GetThemeColor3fv(TH_SHADE2, col); + UI_GetThemeColor3fv(TH_BACK, col); glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); @@ -336,34 +346,17 @@ static void graph_buttons_area_init(wmWindowManager *wm, ARegion *ar) { ListBase *keymap; - UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST_UI, ar->winx, ar->winy); + ED_region_panels_init(wm, ar); - keymap= WM_keymap_listbase(wm, "View2D Buttons List", 0, 0); - WM_event_add_keymap_handler(&ar->handlers, keymap); keymap= WM_keymap_listbase(wm, "GraphEdit Generic", SPACE_IPO, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } static void graph_buttons_area_draw(const bContext *C, ARegion *ar) { - float col[3]; - - /* clear */ - UI_GetThemeColor3fv(TH_HEADER, col); - - glClearColor(col[0], col[1], col[2], 0.0); - glClear(GL_COLOR_BUFFER_BIT); - - /* set view2d view matrix for scrolling (without scrollers) */ - UI_view2d_view_ortho(C, &ar->v2d); - - graph_region_buttons(C, ar); - - /* restore view matrix? */ - UI_view2d_view_restore(C); + ED_region_panels(C, ar, 1, NULL); } - static void graph_region_listener(ARegion *ar, wmNotifier *wmn) { /* context changes */ @@ -576,6 +569,8 @@ void ED_spacetype_ipo(void) art->draw= graph_buttons_area_draw; BLI_addhead(&st->regiontypes, art); + + graph_buttons_register(art); BKE_spacetype_register(st); } diff --git a/source/blender/editors/space_image/SConscript b/source/blender/editors/space_image/SConscript index 3ae638d344d..e7041ef0458 100644 --- a/source/blender/editors/space_image/SConscript +++ b/source/blender/editors/space_image/SConscript @@ -7,4 +7,9 @@ incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../render/extern/include ../../makesrna' -env.BlenderLib ( 'bf_editors_space_image', sources, Split(incs), [], libtype=['core'], priority=[40] ) +defs = [] + +if env['WITH_BF_LCMS']: + defs.append('WITH_LCMS') + +env.BlenderLib ( 'bf_editors_space_image', sources, Split(incs), defs, libtype=['core'], priority=[40] ) diff --git a/source/blender/editors/space_image/image_panels.c b/source/blender/editors/space_image/image_buttons.c index 29ddbd569e4..35004a4bdef 100644 --- a/source/blender/editors/space_image/image_panels.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -55,11 +55,11 @@ #include "BKE_global.h" #include "BKE_library.h" #include "BKE_main.h" +#include "BKE_mesh.h" #include "BKE_node.h" #include "BKE_packedFile.h" #include "BKE_screen.h" #include "BKE_utildefines.h" -#include "BKE_mesh.h" #include "RE_pipeline.h" @@ -250,7 +250,7 @@ static void image_editvertex_buts(const bContext *C, uiBlock *block) image_transform_but_attr(sima, &imx, &imy, &step, &digits); - em= EM_GetEditMesh((Mesh *)obedit->data); + em= BKE_mesh_get_editmesh((Mesh *)obedit->data); for (efa= em->faces.first; efa; efa= efa->next) { tf= CustomData_em_get(&em->fdata, efa->data, CD_MTFACE); if (simaFaceDraw_Check(efa, tf)) { @@ -340,7 +340,7 @@ static void image_editvertex_buts(const bContext *C, uiBlock *block) WM_event_add_notifier(C, NC_IMAGE, sima->image); } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } @@ -383,15 +383,13 @@ static void image_editcursor_buts(const bContext *C, View2D *v2d, uiBlock *block } } -static void image_panel_game_properties(const bContext *C, ARegion *ar) +static void image_panel_game_properties(const bContext *C, Panel *pa) { SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); ImBuf *ibuf= BKE_image_get_ibuf(sima->image, &sima->iuser); uiBlock *block; - block= uiBeginBlock(C, ar, "image_panel_game_properties", UI_EMBOSS, UI_HELV); - if(uiNewPanel(C, ar, block, "Real-time Properties", "Image", 10, 10, 318, 204)==0) - return; + block= uiLayoutFreeBlock(pa->layout); uiBlockSetHandleFunc(block, do_image_panel_events, NULL); if (ibuf) { @@ -420,15 +418,14 @@ static void image_panel_game_properties(const bContext *C, ARegion *ar) } } -static void image_panel_view_properties(const bContext *C, ARegion *ar) +static void image_panel_view_properties(const bContext *C, Panel *pa) { SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); + ARegion *ar= CTX_wm_region(C); Object *obedit= CTX_data_edit_object(C); uiBlock *block; - block= uiBeginBlock(C, ar, "image_view_properties", UI_EMBOSS, UI_HELV); - if(uiNewPanel(C, ar, block, "View Properties", "Image", 10, 30, 318, 204)==0) - return; + block= uiLayoutFreeBlock(pa->layout); uiBlockSetHandleFunc(block, do_image_panel_events, NULL); uiDefButBitI(block, TOG, SI_DRAW_TILE, B_REDR, "Repeat Image", 10,160,140,19, &sima->flag, 0, 0, 0, 0, "Repeat/Tile the image display"); @@ -444,7 +441,7 @@ static void image_panel_view_properties(const bContext *C, ARegion *ar) if (obedit && obedit->type==OB_MESH) { Mesh *me= obedit->data; - EditMesh *em= EM_GetEditMesh(me); + EditMesh *em= BKE_mesh_get_editmesh(me); if(EM_texFaceCheck(em)) { uiDefBut(block, LABEL, B_NOP, "Draw Type:", 10, 80,120,19, 0, 0, 0, 0, 0, ""); @@ -473,7 +470,7 @@ static void image_panel_view_properties(const bContext *C, ARegion *ar) } } - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); } image_editcursor_buts(C, &ar->v2d, block); } @@ -508,10 +505,8 @@ void brush_buttons(const bContext *C, uiBlock *block, short fromsima, uiBlockEndAlign(block); yco -= 30; - uiBlockSetCol(block, TH_BUT_SETTING2); id= (ID*)settings->imapaint.brush; xco= 200; // std_libbuttons(block, 0, yco, 0, NULL, evt_browse, ID_BR, 0, id, NULL, menupoin, 0, evt_local, evt_del, 0, evt_keepdata); - uiBlockSetCol(block, TH_AUTO); if(brush && !brush->id.lib) { @@ -570,9 +565,7 @@ void brush_buttons(const bContext *C, uiBlock *block, short fromsima, if(fromsima && settings->imapaint.tool == PAINT_TOOL_CLONE) { id= (ID*)brush->clone.image; - uiBlockSetCol(block, TH_BUT_SETTING2); xco= 200; // std_libbuttons(block, 0, yco, 0, NULL, B_SIMACLONEBROWSE, ID_IM, 0, id, 0, menupoin, 0, 0, B_SIMACLONEDELETE, 0, 0); - uiBlockSetCol(block, TH_AUTO); if(id) { butw= 320-(xco+5); uiDefButF(block, NUMSLI, evt_change, "B ",xco+5,yco,butw,19, &brush->clone.alpha , 0.0, 1.0, 0, 0, "Opacity of clone image display"); @@ -590,11 +583,9 @@ void brush_buttons(const bContext *C, uiBlock *block, short fromsima, else { MTex *mtex= brush->mtex[brush->texact]; - uiBlockSetCol(block, TH_BUT_SETTING2); id= (mtex)? (ID*)mtex->tex: NULL; xco= 200; // std_libbuttons(block, 0, yco, 0, NULL, evt_texbrowse, ID_TE, 0, id, NULL, menupoin, 0, 0, evt_texdel, 0, 0); /*uiDefButBitS(block, TOG|BIT, BRUSH_FIXED_TEX, evt_change, "Fixed", xco+5,yco,butw,19, &brush->flag, 0, 0, 0, 0, "Keep texture origin in fixed position");*/ - uiBlockSetCol(block, TH_AUTO); } } } @@ -605,7 +596,14 @@ void brush_buttons(const bContext *C, uiBlock *block, short fromsima, #endif } -static void image_panel_paintcolor(const bContext *C, ARegion *ar) +static int image_panel_paint_poll(const bContext *C, PanelType *pt) +{ + SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); + + return (sima->image && (sima->flag & SI_DRAWTOOL)); +} + +static void image_panel_paintcolor(const bContext *C, Panel *pa) { SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); ToolSettings *settings= CTX_data_tool_settings(C); @@ -614,37 +612,26 @@ static void image_panel_paintcolor(const bContext *C, ARegion *ar) static float hsv[3], old[3]; // used as temp mem for picker static char hexcol[128]; - block= uiBeginBlock(C, ar, "image_panel_paintcolor", UI_EMBOSS, UI_HELV); - uiBlockSetHandleFunc(block, do_image_panel_events, NULL); - if(uiNewPanel(C, ar, block, "Paint Color", "Image", 10, 22, 318, 204)==0) - return; - - if ( (brush && sima->image && (sima->flag & SI_DRAWTOOL))==0) { - uiNewPanelHeight(block, 0); + if(!sima->image || (sima->flag & SI_DRAWTOOL)==0) return; - } - uiNewPanelHeight(block, 204); - uiBlockPickerButtons(block, brush->rgb, hsv, old, hexcol, 'f', B_REDR); -} - + block= uiLayoutFreeBlock(pa->layout); + uiBlockSetHandleFunc(block, do_image_panel_events, NULL); + if(brush) + uiBlockPickerButtons(block, brush->rgb, hsv, old, hexcol, 'f', B_REDR); +} -static void image_panel_paint(const bContext *C, ARegion *ar) +static void image_panel_paint(const bContext *C, Panel *pa) { SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); uiBlock *block; - block= uiBeginBlock(C, ar, "image_panel_paint", UI_EMBOSS, UI_HELV); - uiBlockSetHandleFunc(block, do_image_panel_events, NULL); - if(uiNewPanel(C, ar, block, "Image Paint", "Image", 10, 20, 318, 204)==0) + if(!sima->image || (sima->flag & SI_DRAWTOOL)==0) return; - if ((sima->image && (sima->flag & SI_DRAWTOOL))==0) { - uiNewPanelHeight(block, 0); - return; - } - uiNewPanelHeight(block, 204); + block= uiLayoutFreeBlock(pa->layout); + uiBlockSetHandleFunc(block, do_image_panel_events, NULL); brush_buttons(C, block, 1, B_SIMANOTHING, B_SIMABRUSHCHANGE, B_SIMABRUSHBROWSE, B_SIMABRUSHLOCAL, B_SIMABRUSHDELETE, B_KEEPDATA, B_SIMABTEXBROWSE, B_SIMABTEXDELETE); } @@ -669,7 +656,7 @@ static void image_panel_curves_reset(bContext *C, void *cumap_v, void *ibuf_v) } -static void image_panel_curves(const bContext *C, ARegion *ar) +static void image_panel_curves(const bContext *C, Panel *pa) { SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); ImBuf *ibuf; @@ -679,9 +666,7 @@ static void image_panel_curves(const bContext *C, ARegion *ar) /* and we check for spare */ ibuf= ED_space_image_buffer(sima); - block= uiBeginBlock(C, ar, "image_panel_curves", UI_EMBOSS, UI_HELV); - if(uiNewPanel(C, ar, block, "Curves", "Image", 10, 40, 318, 204)==0) - return; + block= uiLayoutFreeBlock(pa->layout); uiBlockSetHandleFunc(block, do_image_panel_events, NULL); if (ibuf) { @@ -834,7 +819,7 @@ static void image_panel_preview(ScrArea *sa, short cntrl) // IMAGE_HANDLER_PREVI return; } - block= uiBeginBlock(C, ar, "image_panel_preview", UI_EMBOSS, UI_HELV); + block= uiBeginBlock(C, ar, "image_panel_preview", UI_EMBOSS); uiPanelControl(UI_PNL_SOLID | UI_PNL_CLOSE | UI_PNL_SCALE | cntrl); uiSetPanelHandler(IMAGE_HANDLER_PREVIEW); // for close and esc @@ -853,7 +838,7 @@ static void image_panel_gpencil(short cntrl) // IMAGE_HANDLER_GREASEPENCIL sima= curarea->spacedata.first; - block= uiBeginBlock(C, ar, "image_panel_gpencil", UI_EMBOSS, UI_HELV); + block= uiBeginBlock(C, ar, "image_panel_gpencil", UI_EMBOSS); uiPanelControl(UI_PNL_SOLID | UI_PNL_CLOSE | cntrl); uiSetPanelHandler(IMAGE_HANDLER_GREASEPENCIL); // for close and esc if (uiNewPanel(C, ar, block, "Grease Pencil", "SpaceImage", 100, 30, 318, 204)==0) return; @@ -1358,13 +1343,13 @@ void ED_image_uiblock_panel(const bContext *C, uiBlock *block, Image **ima_pp, I /* fields */ uiBlockBeginAlign(block); - but= uiDefButBitS(block, TOG, IMA_FIELDS, imagechanged, "Fields", 10, 70, 65, 20, &ima->flag, 0, 0, 0, 0, "Click to enable use of fields in Image"); + but= uiDefButBitS(block, TOGBUT, IMA_FIELDS, imagechanged, "Fields", 10, 70, 65, 20, &ima->flag, 0, 0, 0, 0, "Click to enable use of fields in Image"); uiButSetFunc(but, image_field_test, ima, iuser); - uiDefButBitS(block, TOG, IMA_STD_FIELD, B_NOP, "Odd", 75, 70, 45, 20, &ima->flag, 0, 0, 0, 0, "Standard Field Toggle"); + uiDefButBitS(block, TOGBUT, IMA_STD_FIELD, B_NOP, "Odd", 75, 70, 45, 20, &ima->flag, 0, 0, 0, 0, "Standard Field Toggle"); uiBlockSetFunc(block, image_reload_cb, ima, iuser); - uiDefButBitS(block, TOG, IMA_ANTIALI, B_NOP, "Anti", 10, 50, 45, 20, &ima->flag, 0, 0, 0, 0, "Toggles Image anti-aliasing, only works with solid colors"); - uiDefButBitS(block, TOG, IMA_DO_PREMUL, imagechanged, "Premul", 55, 50, 65, 20, &ima->flag, 0, 0, 0, 0, "Toggles premultiplying alpha"); + uiDefButBitS(block, TOGBUT, IMA_ANTIALI, B_NOP, "Anti", 10, 50, 45, 20, &ima->flag, 0, 0, 0, 0, "Toggles Image anti-aliasing, only works with solid colors"); + uiDefButBitS(block, TOGBUT, IMA_DO_PREMUL, imagechanged, "Premul", 55, 50, 65, 20, &ima->flag, 0, 0, 0, 0, "Toggles premultiplying alpha"); uiBlockEndAlign(block); if( ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) { @@ -1396,7 +1381,7 @@ void ED_image_uiblock_panel(const bContext *C, uiBlock *block, Image **ima_pp, I uiBlockSetFunc(block, image_generated_change_cb, ima, iuser); uiDefButS(block, NUM, imagechanged, "SizeX:", 120,70,100,20, &ima->gen_x, 1.0, 5000.0, 0, 0, "Image size x"); uiDefButS(block, NUM, imagechanged, "SizeY:", 220,70,90,20, &ima->gen_y, 1.0, 5000.0, 0, 0, "Image size y"); - uiDefButS(block, TOG, imagechanged, "UV Test grid",120,50,190,20, &ima->gen_type, 0.0, 1.0, 0, 0, ""); + uiDefButS(block, TOGBUT, imagechanged, "UV Test grid",120,50,190,20, &ima->gen_type, 0.0, 1.0, 0, 0, ""); uiBlockSetFunc(block, NULL, NULL, NULL); } } @@ -1404,41 +1389,62 @@ void ED_image_uiblock_panel(const bContext *C, uiBlock *block, Image **ima_pp, I } -static void image_panel_properties(const bContext *C, ARegion *ar) +static void image_panel_properties(const bContext *C, Panel *pa) { SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); uiBlock *block; - block= uiBeginBlock(C, ar, "image_panel_properties", UI_EMBOSS, UI_HELV); - if(uiNewPanel(C, ar, block, "Image Properties", "Image", 10, 50, 318, 204)==0) - return; + block= uiLayoutFreeBlock(pa->layout); uiBlockSetHandleFunc(block, do_image_panel_events, NULL); /* note, it draws no bottom half in facemode, for vertex buttons */ ED_image_uiblock_panel(C, block, &sima->image, &sima->iuser, B_REDR, B_REDR); image_editvertex_buts(C, block); - - uiEndBlock(C, block); } - - -void image_buttons_area_defbuts(const bContext *C, ARegion *ar) +void image_buttons_register(ARegionType *art) { - - image_panel_properties(C, ar); - image_panel_game_properties(C, ar); - image_panel_view_properties(C, ar); - image_panel_paint(C, ar); - image_panel_paintcolor(C, ar); - image_panel_curves(C, ar); - - uiDrawPanels(C, 1); /* 1 = align */ - uiMatchPanelsView2d(ar); /* sets v2d->totrct */ - + PanelType *pt; + + pt= MEM_callocN(sizeof(PanelType), "spacetype image panel properties"); + strcpy(pt->idname, "IMAGE_PT_properties"); + strcpy(pt->label, "Image Properties"); + pt->draw= image_panel_properties; + BLI_addtail(&art->paneltypes, pt); + + pt= MEM_callocN(sizeof(PanelType), "spacetype image panel game properties"); + strcpy(pt->idname, "IMAGE_PT_game_properties"); + strcpy(pt->label, "Game Properties"); + pt->draw= image_panel_game_properties; + BLI_addtail(&art->paneltypes, pt); + + pt= MEM_callocN(sizeof(PanelType), "spacetype image view properties"); + strcpy(pt->idname, "IMAGE_PT_view_properties"); + strcpy(pt->label, "View Properties"); + pt->draw= image_panel_view_properties; + BLI_addtail(&art->paneltypes, pt); + + pt= MEM_callocN(sizeof(PanelType), "spacetype image panel paint"); + strcpy(pt->idname, "IMAGE_PT_paint"); + strcpy(pt->label, "Paint"); + pt->draw= image_panel_paint; + pt->poll= image_panel_paint_poll; + BLI_addtail(&art->paneltypes, pt); + + pt= MEM_callocN(sizeof(PanelType), "spacetype image panel paint color"); + strcpy(pt->idname, "IMAGE_PT_paint_color"); + strcpy(pt->label, "Paint Color"); + pt->draw= image_panel_paintcolor; + pt->poll= image_panel_paint_poll; + BLI_addtail(&art->paneltypes, pt); + + pt= MEM_callocN(sizeof(PanelType), "spacetype image panel curves"); + strcpy(pt->idname, "IMAGE_PT_curves"); + strcpy(pt->label, "Curves"); + pt->draw= image_panel_curves; + BLI_addtail(&art->paneltypes, pt); } - static int image_properties(bContext *C, wmOperator *op) { ScrArea *sa= CTX_wm_area(C); diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index ab042fce41f..122e298baaa 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -55,8 +55,8 @@ #include "ED_image.h" #include "ED_screen.h" +#include "UI_interface.h" #include "UI_resources.h" -#include "UI_text.h" #include "UI_view2d.h" #include "WM_api.h" @@ -117,10 +117,12 @@ static void image_verify_buffer_float(SpaceImage *sima, ImBuf *ibuf) if(ibuf->rect_float) { if(ibuf->rect==NULL) { - if(image_curves_active(sima)) + if(image_curves_active(sima)) { curvemapping_do_ibuf(sima->cumap, ibuf); - else + } + else { IMB_rect_from_float(ibuf); + } } } } @@ -147,16 +149,13 @@ static void draw_render_info(SpaceImage *sima, ARegion *ar) glRecti(rect.xmin, rect.ymin, rect.xmax, rect.ymax+1); UI_ThemeColor(TH_TEXT_HI); - glRasterPos2i(12, rect.ymin + 5); - UI_RasterPos(12, rect.ymin + 5); if(showspare) { - UI_DrawString(G.fonts, "(Previous)", 0); - glRasterPos2i(72, rect.ymin + 5); - UI_RasterPos(72, rect.ymin + 5); + UI_DrawString(12, rect.ymin + 5, "(Previous)"); + UI_DrawString(72, rect.ymin + 5, str); } - - UI_DrawString(G.fonts, str, 0); + else + UI_DrawString(12, rect.ymin + 5, str); } void draw_image_info(ARegion *ar, int channels, int x, int y, char *cp, float *fp, int *zp, float *zpf) @@ -192,10 +191,8 @@ void draw_image_info(ARegion *ar, int channels, int x, int y, char *cp, float *f glDisable(GL_BLEND); glColor3ub(255, 255, 255); - glRasterPos2i(10, 10); - UI_RasterPos(10, 10); - UI_DrawString(G.fonts, str, 0); + UI_DrawString(10, 10, str); } /* image drawing */ @@ -314,6 +311,13 @@ static void sima_draw_alpha_pixelsf(float x1, float y1, int rectx, int recty, fl // glColorMask(1, 1, 1, 1); } +static void sima_draw_colorcorrected_pixels(float x1, float y1, ImBuf *ibuf) +{ + colorcorrection_do_ibuf(ibuf, "MONOSCNR.ICM"); /* path is hardcoded here, find some place better */ + + glaDrawPixelsSafe(x1, y1, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->crect); +} + static void sima_draw_zbuf_pixels(float x1, float y1, int rectx, int recty, int *recti) { /* zbuffer values are signed, so we need to shift color range */ @@ -391,6 +395,14 @@ static void draw_image_buffer(SpaceImage *sima, ARegion *ar, Scene *scene, ImBuf else if(ibuf->channels==1) sima_draw_zbuffloat_pixels(scene, x, y, ibuf->x, ibuf->y, ibuf->rect_float); } +#ifdef WITH_LCMS + else if(sima->flag & SI_COLOR_CORRECTION) { + image_verify_buffer_float(sima, ibuf); + + sima_draw_colorcorrected_pixels(x, y, ibuf); + + } +#endif else { if(sima->flag & SI_USE_ALPHA) { sima_draw_alpha_backdrop(x, y, ibuf->x, ibuf->y, zoomx, zoomy); diff --git a/source/blender/editors/space_image/image_header.c b/source/blender/editors/space_image/image_header.c index c7b2f1bd360..9c887edc50d 100644 --- a/source/blender/editors/space_image/image_header.c +++ b/source/blender/editors/space_image/image_header.c @@ -45,6 +45,7 @@ #include "BKE_context.h" #include "BKE_customdata.h" #include "BKE_image.h" +#include "BKE_mesh.h" #include "BKE_screen.h" #include "BKE_utildefines.h" #include "BKE_mesh.h" @@ -86,21 +87,21 @@ #define B_SIMA_RECORD 8 #define B_SIMA_PLAY 9 -static void image_view_viewnavmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void image_view_viewnavmenu(bContext *C, uiLayout *layout, void *arg_unused) { int a; - uiMenuItemO(head, 0, "IMAGE_OT_view_zoom_in"); - uiMenuItemO(head, 0, "IMAGE_OT_view_zoom_out"); + uiItemO(layout, NULL, 0, "IMAGE_OT_view_zoom_in"); + uiItemO(layout, NULL, 0, "IMAGE_OT_view_zoom_out"); - uiMenuSeparator(head); + uiItemS(layout); for(a=0; a<7; a++) { const int ratios[7][2] = {{1, 8}, {1, 4}, {1, 2}, {1, 1}, {2, 1}, {4, 1}, {8, 1}}; char namestr[128]; sprintf(namestr, "Zoom %d:%d", ratios[a][0], ratios[a][1]); - uiMenuItemFloatO(head, namestr, 0, "IMAGE_OT_view_zoom_ratio", "ratio", (float)ratios[a][0]/(float)ratios[a][1]); + uiItemFloatO(layout, namestr, 0, "IMAGE_OT_view_zoom_ratio", "ratio", (float)ratios[a][0]/(float)ratios[a][1]); } } @@ -123,7 +124,7 @@ static void do_viewmenu(bContext *C, void *arg, int event) } #endif -static void image_viewmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void image_viewmenu(bContext *C, uiLayout *layout, void *arg_unused) { bScreen *sc= CTX_wm_screen(C); ScrArea *sa= CTX_wm_area(C); @@ -140,44 +141,44 @@ static void image_viewmenu(bContext *C, uiMenuItem *head, void *arg_unused) show_uvedit= ED_space_image_show_uvedit(sima, CTX_data_edit_object(C)); /* create menu */ - uiMenuItemO(head, ICON_MENU_PANEL, "IMAGE_OT_toggle_view_properties_panel"); // View Properties... - uiMenuItemO(head, ICON_MENU_PANEL, "IMAGE_OT_toggle_image_properties_panel"); // Image Properties...|N - uiMenuItemO(head, ICON_MENU_PANEL, "IMAGE_OT_toggle_realtime_properties_panel"); // Real-time properties... - if(show_paint) uiMenuItemO(head, ICON_MENU_PANEL, "IMAGE_OT_toggle_paint_panel"); // Paint Tool...|C - uiMenuItemO(head, ICON_MENU_PANEL, "IMAGE_OT_toggle_curves_panel"); // Curves Tool... - if(show_render) uiMenuItemO(head, ICON_MENU_PANEL, "IMAGE_OT_toggle_compositing_preview_panel"); // Compositing Preview...|Shift P - uiMenuItemO(head, ICON_MENU_PANEL, "IMAGE_OT_toggle_grease_pencil_panel"); // Grease Pencil... + uiItemO(layout, NULL, ICON_MENU_PANEL, "IMAGE_OT_toggle_view_properties_panel"); // View Properties... + uiItemO(layout, NULL, ICON_MENU_PANEL, "IMAGE_OT_toggle_image_properties_panel"); // Image Properties...|N + uiItemO(layout, NULL, ICON_MENU_PANEL, "IMAGE_OT_toggle_realtime_properties_panel"); // Real-time properties... + if(show_paint) uiItemO(layout, NULL, ICON_MENU_PANEL, "IMAGE_OT_toggle_paint_panel"); // Paint Tool...|C + uiItemO(layout, NULL, ICON_MENU_PANEL, "IMAGE_OT_toggle_curves_panel"); // Curves Tool... + if(show_render) uiItemO(layout, NULL, ICON_MENU_PANEL, "IMAGE_OT_toggle_compositing_preview_panel"); // Compositing Preview...|Shift P + uiItemO(layout, NULL, ICON_MENU_PANEL, "IMAGE_OT_toggle_grease_pencil_panel"); // Grease Pencil... - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemBooleanR(head, &spaceptr, "update_automatically"); - // XXX if(show_uvedit) uiMenuItemBooleanR(head, &uvptr, "local_view"); // "UV Local View", Numpad / + uiItemR(layout, NULL, 0, &spaceptr, "update_automatically", 0, 0); + // XXX if(show_uvedit) uiItemR(layout, NULL, 0, &uvptr, "local_view", 0, 0); // "UV Local View", Numpad / - uiMenuSeparator(head); + uiItemS(layout); - uiMenuLevel(head, "View Navigation", image_view_viewnavmenu); - if(show_uvedit) uiMenuItemO(head, 0, "IMAGE_OT_view_selected"); - uiMenuItemO(head, 0, "IMAGE_OT_view_all"); + uiItemMenuF(layout, "View Navigation", 0, image_view_viewnavmenu); + if(show_uvedit) uiItemO(layout, NULL, 0, "IMAGE_OT_view_selected"); + uiItemO(layout, NULL, 0, "IMAGE_OT_view_all"); - if(sa->full) uiMenuItemO(head, 0, "SCREEN_OT_screen_full_area"); // "Tile Window", Ctrl UpArrow - else uiMenuItemO(head, 0, "SCREEN_OT_screen_full_area"); // "Maximize Window", Ctr DownArrow + if(sa->full) uiItemO(layout, NULL, 0, "SCREEN_OT_screen_full_area"); // "Tile Window", Ctrl UpArrow + else uiItemO(layout, NULL, 0, "SCREEN_OT_screen_full_area"); // "Maximize Window", Ctr DownArrow } -static void image_selectmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void image_selectmenu(bContext *C, uiLayout *layout, void *arg_unused) { - uiMenuItemO(head, 0, "UV_OT_select_border"); - uiMenuItemBooleanO(head, "Border Select Pinned", 0, "UV_OT_select_border", "pinned", 1); // Border Select Pinned|Shift B + uiItemO(layout, NULL, 0, "UV_OT_select_border"); + uiItemBooleanO(layout, "Border Select Pinned", 0, "UV_OT_select_border", "pinned", 1); // Border Select Pinned|Shift B - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemO(head, 0, "UV_OT_select_all_toggle"); - uiMenuItemO(head, 0, "UV_OT_select_invert"); - uiMenuItemO(head, 0, "UV_OT_unlink_selection"); + uiItemO(layout, NULL, 0, "UV_OT_select_all_toggle"); + uiItemO(layout, NULL, 0, "UV_OT_select_invert"); + uiItemO(layout, NULL, 0, "UV_OT_unlink_selection"); - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemO(head, 0, "UV_OT_select_pinned"); - uiMenuItemO(head, 0, "UV_OT_select_linked"); + uiItemO(layout, NULL, 0, "UV_OT_select_pinned"); + uiItemO(layout, NULL, 0, "UV_OT_select_linked"); } #if 0 @@ -190,7 +191,7 @@ static void do_image_imagemenu(void *arg, int event) } #endif -static void image_imagemenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void image_imagemenu(bContext *C, uiLayout *layout, void *arg_unused) { bScreen *sc= CTX_wm_screen(C); SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); @@ -208,37 +209,37 @@ static void image_imagemenu(bContext *C, uiMenuItem *head, void *arg_unused) RNA_pointer_create(&sc->id, &RNA_SpaceImageEditor, sima, &spaceptr); /* create menu */ - uiMenuItemO(head, 0, "IMAGE_OT_new"); // New... - uiMenuItemO(head, 0, "IMAGE_OT_open"); // Open... + uiItemO(layout, NULL, 0, "IMAGE_OT_new"); // New... + uiItemO(layout, NULL, 0, "IMAGE_OT_open"); // Open... if(ima) { if(!show_render) { - uiMenuItemO(head, 0, "IMAGE_OT_replace"); // Replace... - uiMenuItemO(head, 0, "IMAGE_OT_reload"); // Reload... + uiItemO(layout, NULL, 0, "IMAGE_OT_replace"); // Replace... + uiItemO(layout, NULL, 0, "IMAGE_OT_reload"); // Reload... } - uiMenuItemO(head, 0, "IMAGE_OT_save"); // Save - uiMenuItemO(head, 0, "IMAGE_OT_save_as"); // Save As... + uiItemO(layout, NULL, 0, "IMAGE_OT_save"); // Save + uiItemO(layout, NULL, 0, "IMAGE_OT_save_as"); // Save As... if(ima->source == IMA_SRC_SEQUENCE) - uiMenuItemO(head, 0, "IMAGE_OT_save_sequence"); // Save Changed Sequence Images + uiItemO(layout, NULL, 0, "IMAGE_OT_save_sequence"); // Save Changed Sequence Images if(!show_render) { - uiMenuSeparator(head); + uiItemS(layout); - if(ima->packedfile) uiMenuItemO(head, 0, "IMAGE_OT_unpack"); // Unpack Image... - else uiMenuItemO(head, 0, "IMAGE_OT_pack"); // Pack Image + if(ima->packedfile) uiItemO(layout, NULL, 0, "IMAGE_OT_unpack"); // Unpack Image... + else uiItemO(layout, NULL, 0, "IMAGE_OT_pack"); // Pack Image /* only for dirty && specific image types : XXX poll? */ if(ibuf && (ibuf->userflags & IB_BITMAPDIRTY)) if(ELEM(ima->source, IMA_SRC_FILE, IMA_SRC_GENERATED) && ima->type != IMA_TYPE_MULTILAYER) - uiMenuItemBooleanO(head, "Pack As PNG", 0, "IMAGE_OT_pack", "as_png", 1); // Pack Image As PNG + uiItemBooleanO(layout, "Pack As PNG", 0, "IMAGE_OT_pack", "as_png", 1); // Pack Image As PNG - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemBooleanR(head, &spaceptr, "image_painting"); + uiItemR(layout, NULL, 0, &spaceptr, "image_painting", 0, 0); /* move to realtime properties panel */ RNA_id_pointer_create(&ima->id, &imaptr); - uiMenuLevelEnumR(head, &imaptr, "mapping"); + uiItemMenuEnumR(layout, NULL, 0, &imaptr, "mapping"); } } @@ -260,30 +261,30 @@ static void image_imagemenu(bContext *C, uiMenuItem *head, void *arg_unused) #endif } -static void image_uvs_showhidemenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void image_uvs_showhidemenu(bContext *C, uiLayout *layout, void *arg_unused) { - uiMenuItemO(head, 0, "UV_OT_reveal"); - uiMenuItemO(head, 0, "UV_OT_hide"); - uiMenuItemBooleanO(head, "Hide Unselected", 0, "UV_OT_hide", "unselected", 1); + uiItemO(layout, NULL, 0, "UV_OT_reveal"); + uiItemO(layout, NULL, 0, "UV_OT_hide"); + uiItemBooleanO(layout, "Hide Unselected", 0, "UV_OT_hide", "unselected", 1); } -static void image_uvs_transformmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void image_uvs_transformmenu(bContext *C, uiLayout *layout, void *arg_unused) { - uiMenuItemEnumO(head, "", 0, "TFM_OT_transform", "mode", TFM_TRANSLATION); - uiMenuItemEnumO(head, "", 0, "TFM_OT_transform", "mode", TFM_ROTATION); - uiMenuItemEnumO(head, "", 0, "TFM_OT_transform", "mode", TFM_RESIZE); + uiItemEnumO(layout, NULL, 0, "TFM_OT_transform", "mode", TFM_TRANSLATION); + uiItemEnumO(layout, NULL, 0, "TFM_OT_transform", "mode", TFM_ROTATION); + uiItemEnumO(layout, NULL, 0, "TFM_OT_transform", "mode", TFM_RESIZE); } -static void image_uvs_mirrormenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void image_uvs_mirrormenu(bContext *C, uiLayout *layout, void *arg_unused) { - uiMenuItemEnumO(head, "", 0, "UV_OT_mirror", "axis", 'x'); // "X Axis", M, 1 - uiMenuItemEnumO(head, "", 0, "UV_OT_mirror", "axis", 'y'); // "Y Axis", M, 2 + uiItemEnumO(layout, NULL, 0, "UV_OT_mirror", "axis", 'x'); // "X Axis", M, 1 + uiItemEnumO(layout, NULL, 0, "UV_OT_mirror", "axis", 'y'); // "Y Axis", M, 2 } -static void image_uvs_weldalignmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void image_uvs_weldalignmenu(bContext *C, uiLayout *layout, void *arg_unused) { - uiMenuItemO(head, 0, "UV_OT_weld"); // W, 1 - uiMenuItemsEnumO(head, "UV_OT_align", "axis"); // W, 2/3/4 + uiItemO(layout, NULL, 0, "UV_OT_weld"); // W, 1 + uiItemsEnumO(layout, "UV_OT_align", "axis"); // W, 2/3/4 } #if 0 @@ -302,7 +303,7 @@ static void image_uvs_scriptsmenu (void *args_unused) int i= 0; short yco = 20, menuwidth = 120; - block= uiNewBlock(&curarea->uiblocks, "image_uvs_scriptsmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin); + block= uiNewBlock(&curarea->uiblocks, "image_uvs_scriptsmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_image_uvs_scriptsmenu, NULL); /* note that we acount for the N previous entries with i+20: */ @@ -321,7 +322,7 @@ static void image_uvs_scriptsmenu (void *args_unused) #endif /* DISABLE_PYTHON */ #endif -static void image_uvsmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void image_uvsmenu(bContext *C, uiLayout *layout, void *arg_unused) { bScreen *sc= CTX_wm_screen(C); Scene *scene= CTX_data_scene(C); @@ -338,43 +339,43 @@ static void image_uvsmenu(bContext *C, uiMenuItem *head, void *arg_unused) RNA_id_pointer_create(&scene->id, &sceneptr); /* create menu */ - uiMenuItemBooleanR(head, &uvptr, "snap_to_pixels"); - uiMenuItemBooleanR(head, &uvptr, "constrain_to_image_bounds"); + uiItemR(layout, NULL, 0, &uvptr, "snap_to_pixels", 0, 0); + uiItemR(layout, NULL, 0, &uvptr, "constrain_to_image_bounds", 0, 0); - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemBooleanR(head, &uvptr, "live_unwrap"); - uiMenuItemO(head, 0, "UV_OT_unwrap"); - uiMenuItemBooleanO(head, "Unpin", 0, "UV_OT_pin", "clear", 1); - uiMenuItemO(head, 0, "UV_OT_pin"); + uiItemR(layout, NULL, 0, &uvptr, "live_unwrap", 0, 0); + uiItemO(layout, NULL, 0, "UV_OT_unwrap"); + uiItemBooleanO(layout, "Unpin", 0, "UV_OT_pin", "clear", 1); + uiItemO(layout, NULL, 0, "UV_OT_pin"); - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemO(head, 0, "UV_OT_pack_islands"); - uiMenuItemO(head, 0, "UV_OT_average_islands_scale"); - uiMenuItemO(head, 0, "UV_OT_minimize_stretch"); - uiMenuItemO(head, 0, "UV_OT_stitch"); + uiItemO(layout, NULL, 0, "UV_OT_pack_islands"); + uiItemO(layout, NULL, 0, "UV_OT_average_islands_scale"); + uiItemO(layout, NULL, 0, "UV_OT_minimize_stretch"); + uiItemO(layout, NULL, 0, "UV_OT_stitch"); - uiMenuSeparator(head); + uiItemS(layout); - uiMenuLevel(head, "Transform", image_uvs_transformmenu); - uiMenuLevel(head, "Mirror", image_uvs_mirrormenu); - uiMenuLevel(head, "Weld/Align", image_uvs_weldalignmenu); + uiItemMenuF(layout, "Transform", 0, image_uvs_transformmenu); + uiItemMenuF(layout, "Mirror", 0, image_uvs_mirrormenu); + uiItemMenuF(layout, "Weld/Align", 0, image_uvs_weldalignmenu); - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemBooleanR(head, &sceneptr, "proportional_editing"); - uiMenuLevelEnumR(head, &sceneptr, "proportional_editing_falloff"); + uiItemR(layout, NULL, 0, &sceneptr, "proportional_editing", 0, 0); + uiItemMenuEnumR(layout, NULL, 0, &sceneptr, "proportional_editing_falloff"); - uiMenuSeparator(head); + uiItemS(layout); - uiMenuLevel(head, "Show/Hide Faces", image_uvs_showhidemenu); + uiItemMenuF(layout, "Show/Hide Faces", 0, image_uvs_showhidemenu); #if 0 #ifndef DISABLE_PYTHON - uiMenuSeparator(head); + uiItemS(layout); - uiMenuLevel(head, "Scripts", image_uvs_scriptsmenu); + uiItemMenuF(layout, "Scripts", image_uvs_scriptsmenu); #endif #endif } @@ -382,7 +383,7 @@ static void image_uvsmenu(bContext *C, uiMenuItem *head, void *arg_unused) static void image_menu_uvlayers(Object *obedit, char *menustr, int *active) { Mesh *me= (Mesh*)obedit->data; - EditMesh *em= EM_GetEditMesh(me); + EditMesh *em= BKE_mesh_get_editmesh(me); CustomDataLayer *layer; int i, count = 0; @@ -399,7 +400,7 @@ static void image_menu_uvlayers(Object *obedit, char *menustr, int *active) *active= CustomData_get_active_layer(&em->fdata, CD_MTFACE); - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); } static void do_image_buttons(bContext *C, void *arg, int event) @@ -732,7 +733,7 @@ void image_header_buttons(const bContext *C, ARegion *ar) RNA_id_pointer_create(&scene->id, &sceneptr); /* create block */ - block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS, UI_HELV); + block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS); uiBlockSetHandleFunc(block, do_image_buttons, NULL); xco= ED_area_header_standardbuttons(C, block, yco); @@ -742,26 +743,24 @@ void image_header_buttons(const bContext *C, ARegion *ar) char *menuname; int xmax; - uiBlockSetEmboss(block, UI_EMBOSSP); - xmax= GetButStringLength("View"); - uiDefMenuBut(block, image_viewmenu, NULL, "View", xco, yco-2, xmax-3, 24, ""); + uiDefMenuBut(block, image_viewmenu, NULL, "View", xco, yco, xmax-3, 20, ""); xco+= xmax; if(show_uvedit) { xmax= GetButStringLength("Select"); - uiDefMenuBut(block, image_selectmenu, NULL, "Select", xco, yco-2, xmax-3, 24, ""); + uiDefMenuBut(block, image_selectmenu, NULL, "Select", xco, yco, xmax-3, 20, ""); xco+= xmax; } menuname= (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))? "Image*": "Image"; xmax= GetButStringLength(menuname); - uiDefMenuBut(block, image_imagemenu, NULL, menuname, xco, yco-2, xmax-3, 24, ""); + uiDefMenuBut(block, image_imagemenu, NULL, menuname, xco, yco, xmax-3, 20, ""); xco+= xmax; if(show_uvedit) { xmax= GetButStringLength("UVs"); - uiDefMenuBut(block, image_uvsmenu, NULL, "UVs", xco, yco-2, xmax-3, 24, ""); + uiDefMenuBut(block, image_uvsmenu, NULL, "UVs", xco, yco, xmax-3, 20, ""); xco+= xmax; } } @@ -909,8 +908,12 @@ void image_header_buttons(const bContext *C, ARegion *ar) xco+= XIC; } } +#ifdef WITH_LCMS + uiDefIconButR(block, ROW, B_REDR, ICON_IMAGE_ALPHA, xco,yco,XIC,YIC, &spaceptr, "draw_channels", 0, 0, SI_COLOR_CORRECTION, 0, 0, NULL); + xco+= XIC; +#endif xco+= 8; - + /* record & play */ uiBlockBeginAlign(block); if(ima->type==IMA_TYPE_COMPOSITE) { @@ -923,6 +926,7 @@ void image_header_buttons(const bContext *C, ARegion *ar) } uiBlockEndAlign(block); xco+= 8; + } /* draw lock */ @@ -941,19 +945,21 @@ static int toolbox_invoke(bContext *C, wmOperator *op, wmEvent *event) { SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); Object *obedit= CTX_data_edit_object(C); - uiMenuItem *head; + uiPopupMenu *pup; + uiLayout *layout; int show_uvedit; show_uvedit= ED_space_image_show_uvedit(sima, obedit); - head= uiPupMenuBegin("Toolbox", 0); + pup= uiPupMenuBegin(C, "Toolbox", 0); + layout= uiPupMenuLayout(pup); - uiMenuLevel(head, "View", image_viewmenu); - if(show_uvedit) uiMenuLevel(head, "Select", image_selectmenu); - uiMenuLevel(head, "Image", image_imagemenu); - if(show_uvedit) uiMenuLevel(head, "UVs", image_uvsmenu); + uiItemMenuF(layout, "View", 0, image_viewmenu); + if(show_uvedit) uiItemMenuF(layout, "Select", 0, image_selectmenu); + uiItemMenuF(layout, "Image", 0, image_imagemenu); + if(show_uvedit) uiItemMenuF(layout, "UVs", 0, image_uvsmenu); - uiPupMenuEnd(C, head); + uiPupMenuEnd(C, pup); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/space_image/image_intern.h b/source/blender/editors/space_image/image_intern.h index c592e2cb004..aa97e339c68 100644 --- a/source/blender/editors/space_image/image_intern.h +++ b/source/blender/editors/space_image/image_intern.h @@ -32,6 +32,7 @@ /* internal exports only */ struct bContext; struct ARegion; +struct ARegionType; struct ScrArea; struct SpaceImage; struct Object; @@ -84,7 +85,7 @@ void draw_uvedit_main(struct SpaceImage *sima, struct ARegion *ar, struct Scene /* image_panels.c */ struct ImageUser *ntree_get_active_iuser(struct bNodeTree *ntree); -void image_buttons_area_defbuts(const struct bContext *C, struct ARegion *ar); +void image_buttons_register(struct ARegionType *art); void IMAGE_OT_properties(struct wmOperatorType *ot); #endif /* ED_IMAGE_INTERN_H */ diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 934d58926e2..6efd508c335 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1062,6 +1062,7 @@ void IMAGE_OT_new(wmOperatorType *ot) /* api callbacks */ ot->exec= new_exec; + ot->invoke= WM_operator_redo; ot->poll= ED_operator_image_active; /* flags */ @@ -1124,16 +1125,18 @@ static int pack_invoke(bContext *C, wmOperator *op, wmEvent *event) { SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); ImBuf *ibuf= ED_space_image_buffer(sima); - uiMenuItem *head; + uiPopupMenu *pup; + uiLayout *layout; int as_png= RNA_boolean_get(op->ptr, "as_png"); if(!pack_test(C, op)) return OPERATOR_CANCELLED; if(!as_png && (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))) { - head= uiPupMenuBegin("OK", ICON_HELP); - uiMenuItemBooleanO(head, "Can't pack edited image from disk. Pack as internal PNG?", 0, op->idname, "as_png", 1); - uiPupMenuEnd(C, head); + pup= uiPupMenuBegin(C, "OK", ICON_HELP); + layout= uiPupMenuLayout(pup); + uiItemBooleanO(layout, "Can't pack edited image from disk. Pack as internal PNG?", 0, op->idname, "as_png", 1); + uiPupMenuEnd(C, pup); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 1530a97d5a7..73472a70a0d 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -47,6 +47,7 @@ #include "BKE_colortools.h" #include "BKE_context.h" #include "BKE_image.h" +#include "BKE_mesh.h" #include "BKE_screen.h" #include "BKE_utildefines.h" #include "BKE_mesh.h" @@ -256,7 +257,7 @@ static void image_refresh(const bContext *C, ScrArea *sa) if(ima && (ima->source==IMA_SRC_VIEWER || sima->pin)); else if(obedit && obedit->type == OB_MESH) { Mesh *me= (Mesh*)obedit->data; - EditMesh *em= EM_GetEditMesh(me); + EditMesh *em= BKE_mesh_get_editmesh(me); MTFace *tf; if(em && EM_texFaceCheck(em)) { @@ -280,7 +281,7 @@ static void image_refresh(const bContext *C, ScrArea *sa) } } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } } @@ -483,32 +484,16 @@ static void image_main_area_listener(ARegion *ar, wmNotifier *wmn) static void image_buttons_area_init(wmWindowManager *wm, ARegion *ar) { ListBase *keymap; + + ED_region_panels_init(wm, ar); - keymap= WM_keymap_listbase(wm, "View2D Buttons List", 0, 0); - WM_event_add_keymap_handler(&ar->handlers, keymap); keymap= WM_keymap_listbase(wm, "Image Generic", SPACE_IMAGE, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); - - UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST_UI, ar->winx, ar->winy); } static void image_buttons_area_draw(const bContext *C, ARegion *ar) { - float col[3]; - - /* clear */ - UI_GetThemeColor3fv(TH_BACK, col); - - glClearColor(col[0], col[1], col[2], 0.0); - glClear(GL_COLOR_BUFFER_BIT); - - /* set view2d view matrix for scrolling (without scrollers) */ - UI_view2d_view_ortho(C, &ar->v2d); - - image_buttons_area_defbuts(C, ar); - - /* restore view matrix? */ - UI_view2d_view_restore(C); + ED_region_panels(C, ar, 1, NULL); } static void image_buttons_area_listener(ARegion *ar, wmNotifier *wmn) @@ -590,6 +575,8 @@ void ED_spacetype_image(void) art->draw= image_buttons_area_draw; BLI_addhead(&st->regiontypes, art); + image_buttons_register(art); + /* regions: header */ art= MEM_callocN(sizeof(ARegionType), "spacetype image region"); art->regionid = RGN_TYPE_HEADER; @@ -759,12 +746,11 @@ int ED_space_image_show_uvedit(SpaceImage *sima, Object *obedit) return 0; if(obedit && obedit->type == OB_MESH) { - EditMesh *em = EM_GetEditMesh(obedit->data); + EditMesh *em = BKE_mesh_get_editmesh(obedit->data); int ret; ret = EM_texFaceCheck(em); - - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return ret; } @@ -778,12 +764,11 @@ int ED_space_image_show_uvshadow(SpaceImage *sima, Object *obedit) if(ED_space_image_show_paint(sima)) if(obedit && obedit->type == OB_MESH) { - EditMesh *em = EM_GetEditMesh(obedit->data); + EditMesh *em = BKE_mesh_get_editmesh(obedit->data); int ret; - ret = EM_texFaceCheck(em); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return ret; } diff --git a/source/blender/editors/space_info/info_header.c b/source/blender/editors/space_info/info_header.c index 69f33df3005..af792d0b22c 100644 --- a/source/blender/editors/space_info/info_header.c +++ b/source/blender/editors/space_info/info_header.c @@ -85,7 +85,7 @@ static uiBlock *dummy_viewmenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "dummy_viewmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "dummy_viewmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_viewmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Nothing yet", 0, yco-=20, @@ -238,7 +238,7 @@ uiBlock *info_externalfiles(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "info_externalfiles", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "info_externalfiles", UI_EMBOSSP); uiBlockSetButmFunc(block, do_info_externalfiles, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Pack into .blend file", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -258,22 +258,22 @@ uiBlock *info_externalfiles(bContext *C, ARegion *ar, void *arg_unused) -static void info_filemenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void info_filemenu(bContext *C, uiLayout *layout, void *arg_unused) { - uiMenuContext(head, WM_OP_EXEC_AREA); - uiMenuItemO(head, 0, "WM_OT_read_homefile"); - uiMenuContext(head, WM_OP_INVOKE_AREA); - uiMenuItemO(head, 0, "WM_OT_open_mainfile"); + uiLayoutContext(layout, WM_OP_EXEC_AREA); + uiItemO(layout, NULL, 0, "WM_OT_read_homefile"); + uiLayoutContext(layout, WM_OP_INVOKE_AREA); + uiItemO(layout, NULL, 0, "WM_OT_open_mainfile"); // uiDefIconTextBlockBut(block, info_openrecentmenu, NULL, ICON_RIGHTARROW_THIN, "Open Recent",0, yco-=20, 120, 19, ""); // uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Recover Last Session", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 15, ""); - uiMenuSeparator(head); + uiItemS(layout); - uiMenuContext(head, WM_OP_EXEC_AREA); - uiMenuItemO(head, 0, "WM_OT_save_mainfile"); - uiMenuContext(head, WM_OP_INVOKE_AREA); - uiMenuItemO(head, 0, "WM_OT_save_as_mainfile"); + uiLayoutContext(layout, WM_OP_EXEC_AREA); + uiItemO(layout, NULL, 0, "WM_OT_save_mainfile"); + uiLayoutContext(layout, WM_OP_INVOKE_AREA); + uiItemO(layout, NULL, 0, "WM_OT_save_as_mainfile"); #if 0 if(U.flag & USER_FILECOMPRESS) { @@ -392,7 +392,7 @@ void info_header_buttons(const bContext *C, ARegion *ar) uiBlock *block; int xco, yco= 3; - block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS, UI_HELV); + block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS); uiBlockSetHandleFunc(block, do_info_buttons, NULL); xco= ED_area_header_standardbuttons(C, block, yco); @@ -400,31 +400,28 @@ void info_header_buttons(const bContext *C, ARegion *ar) if((sa->flag & HEADER_NO_PULLDOWN)==0) { int xmax; - /* pull down menus */ - uiBlockSetEmboss(block, UI_EMBOSSP); - xmax= GetButStringLength("File"); - uiDefMenuBut(block, info_filemenu, NULL, "File", xco, yco, xmax-3, 22, ""); + uiDefMenuBut(block, info_filemenu, NULL, "File", xco, yco, xmax-3, 20, ""); xco+= xmax; xmax= GetButStringLength("Add"); - uiDefPulldownBut(block, dummy_viewmenu, sa, "Add", xco, yco, xmax-3, 22, ""); + uiDefPulldownBut(block, dummy_viewmenu, sa, "Add", xco, yco, xmax-3, 20, ""); xco+= xmax; xmax= GetButStringLength("Timeline"); - uiDefPulldownBut(block, dummy_viewmenu, sa, "Timeline", xco, yco, xmax-3, 22, ""); + uiDefPulldownBut(block, dummy_viewmenu, sa, "Timeline", xco, yco, xmax-3, 20, ""); xco+= xmax; xmax= GetButStringLength("Game"); - uiDefPulldownBut(block, dummy_viewmenu, sa, "Game", xco, yco, xmax-3, 22, ""); + uiDefPulldownBut(block, dummy_viewmenu, sa, "Game", xco, yco, xmax-3, 20, ""); xco+= xmax; xmax= GetButStringLength("Render"); - uiDefPulldownBut(block, dummy_viewmenu, sa, "Render", xco, yco, xmax-3, 22, ""); + uiDefPulldownBut(block, dummy_viewmenu, sa, "Render", xco, yco, xmax-3, 20, ""); xco+= xmax; xmax= GetButStringLength("Help"); - uiDefPulldownBut(block, dummy_viewmenu, NULL, "Help", xco, yco, xmax-3, 22, ""); + uiDefPulldownBut(block, dummy_viewmenu, NULL, "Help", xco, yco, xmax-3, 20, ""); xco+= xmax; } diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c index 66d807eb69c..12f23f03e66 100644 --- a/source/blender/editors/space_info/space_info.c +++ b/source/blender/editors/space_info/space_info.c @@ -48,7 +48,6 @@ #include "ED_screen.h" #include "BIF_gl.h" -#include "BLF_api.h" #include "WM_api.h" #include "WM_types.h" @@ -133,7 +132,6 @@ static void info_main_area_draw(const bContext *C, ARegion *ar) // SpaceInfo *sinfo= (SpaceInfo*)CTX_wm_space_data(C); View2D *v2d= &ar->v2d; float col[3]; - float width, height; /* clear and setup matrix */ UI_GetThemeColor3fv(TH_BACK, col); @@ -143,38 +141,6 @@ static void info_main_area_draw(const bContext *C, ARegion *ar) UI_view2d_view_ortho(C, v2d); /* data... */ - // XXX 2.50 Testing new font library - Diego - glColor3f(1.0, 0.0, 0.0); - BLF_aspect(1.0); - - BLF_size(14, 96); - BLF_position(5.0, 5.0, 0.0); - - width= BLF_width("Hello Blender, size 14, dpi 96"); - height= BLF_height("Hello Blender, size 14, dpi 96"); - - glRectf(7.0, 20.0, 7.0+width, 20.0+height); - glRectf(5.0+width+10.0, 3.0, 5.0+width+10.0+width, 3.0+height); - BLF_draw("Hello Blender, size 14, dpi 96"); - - glColor3f(0.0, 0.0, 1.0); - BLF_size(11, 96); - BLF_position(200.0, 50.0, 0.0); - BLF_enable(BLF_ROTATION); - BLF_rotation(45.0f); - BLF_draw("Another Hello Blender, size 11 and dpi 96!!"); - - glColor3f(0.8, 0.0, 0.7); - BLF_size(12, 72); - BLF_position(200.0, 100.0, 0.0); - BLF_rotation(180.0f); - BLF_draw("Hello World, size 12, dpi 72"); - - glColor3f(0.8, 0.7, 0.5); - BLF_size(12, 96); - BLF_position(5.0, 200.0, 0.0); - BLF_disable(BLF_ROTATION); - BLF_draw("And this make a new glyph cache!!"); /* reset view matrix */ UI_view2d_view_restore(C); diff --git a/source/blender/editors/space_nla/nla_header.c b/source/blender/editors/space_nla/nla_header.c index cee940ca428..0f6b77da6f5 100644 --- a/source/blender/editors/space_nla/nla_header.c +++ b/source/blender/editors/space_nla/nla_header.c @@ -71,7 +71,7 @@ static uiBlock *dummy_viewmenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "dummy_viewmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "dummy_viewmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_viewmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Nothing yet", 0, yco-=20, @@ -104,7 +104,7 @@ void nla_header_buttons(const bContext *C, ARegion *ar) uiBlock *block; int xco, yco= 3; - block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS, UI_HELV); + block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS); uiBlockSetHandleFunc(block, do_nla_buttons, NULL); xco= ED_area_header_standardbuttons(C, block, yco); @@ -112,9 +112,6 @@ void nla_header_buttons(const bContext *C, ARegion *ar) if((sa->flag & HEADER_NO_PULLDOWN)==0) { int xmax; - /* pull down menus */ - uiBlockSetEmboss(block, UI_EMBOSSP); - xmax= GetButStringLength("View"); uiDefPulldownBut(block, dummy_viewmenu, CTX_wm_area(C), "View", xco, yco-2, xmax-3, 24, ""); diff --git a/source/blender/editors/space_node/Makefile b/source/blender/editors/space_node/Makefile index 233572dbfb1..60f81255a74 100644 --- a/source/blender/editors/space_node/Makefile +++ b/source/blender/editors/space_node/Makefile @@ -37,7 +37,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS) CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(OPENGL_HEADERS) -CPPFLAGS += -I$(NAN_BMFONT)/include # not very neat.... CPPFLAGS += -I../../windowmanager diff --git a/source/blender/editors/space_node/SConscript b/source/blender/editors/space_node/SConscript index babd8dc9080..ad57970950d 100644 --- a/source/blender/editors/space_node/SConscript +++ b/source/blender/editors/space_node/SConscript @@ -4,7 +4,7 @@ Import ('env') sources = env.Glob('*.c') incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf' -incs += ' ../../nodes #intern/bmfont ../../render/extern/include' +incs += ' ../../nodes ../../render/extern/include' incs += ' ../../windowmanager #intern/guardedalloc #extern/glew/include' defs = [] cf = [] diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index bf96d1c38aa..50cf193f37b 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -71,8 +71,6 @@ #include "BIF_gl.h" #include "BIF_glutil.h" -#include "BMF_Api.h" - #include "MEM_guardedalloc.h" #include "ED_node.h" @@ -87,7 +85,6 @@ #include "WM_types.h" #include "UI_view2d.h" -#include "UI_text.h" #include "UI_interface.h" #include "UI_resources.h" @@ -96,8 +93,6 @@ #include "node_intern.h" -extern void autocomplete_uv(char *str, void *arg_v); -// XXX extern int verify_valid_uv_name(char *str); /* autocomplete callback for buttons */ static void autocomplete_vcol(bContext *C, char *str, void *arg_v) @@ -296,7 +291,7 @@ static int node_buts_valtorgb(uiBlock *block, bNodeTree *ntree, bNode *node, rct { if(block) { if(node->storage) { - ; // XXX draw_colorband_buts_small(block, node->storage, butr, B_NODE_EXEC); + uiBlockColorbandButtons(block, node->storage, butr, B_NODE_EXEC); } } return 40; @@ -573,9 +568,11 @@ static int node_shader_buts_material(uiBlock *block, bNodeTree *ntree, bNode *no if(butr->ymax-butr->ymin > 21.0f) dy+= 19; uiBlockBeginAlign(block); + /* XXX if(node->id==NULL) uiBlockSetCol(block, TH_REDALERT); else if(has_us) uiBlockSetCol(block, TH_BUT_SETTING1); else uiBlockSetCol(block, TH_BUT_SETTING2); + */ /* browse button */ IDnames_to_pupstring(&strp, NULL, "ADD NEW %x32767", &(G.main->mat), NULL, NULL); @@ -592,7 +589,6 @@ static int node_shader_buts_material(uiBlock *block, bNodeTree *ntree, bNode *no butr->xmin+19, dy, (short)(butr->xmax-butr->xmin-19.0f), 19, NULL, 0.0, 0.0, 0, 0, "Add new Material"); uiButSetFunc(bt, node_new_mat_cb, ntree, node); - uiBlockSetCol(block, TH_AUTO); } else { /* name button */ @@ -615,7 +611,6 @@ static int node_shader_buts_material(uiBlock *block, bNodeTree *ntree, bNode *no /* WATCH IT: we use this callback in material buttons, but then only want first row */ if(butr->ymax-butr->ymin > 21.0f) { /* node options */ - uiBlockSetCol(block, TH_AUTO); uiDefButBitS(block, TOG, SH_NODE_MAT_DIFF, B_NODE_EXEC, "Diff", butr->xmin, butr->ymin, dx, 19, &node->custom1, 0, 0, 0, 0, "Material Node outputs Diffuse"); @@ -701,14 +696,12 @@ static int node_shader_buts_geometry(uiBlock *block, bNodeTree *ntree, bNode *no // XXX if(!verify_valid_uv_name(ngeo->uvname)) // XXX uiBlockSetCol(block, TH_REDALERT); but= uiDefBut(block, TEX, B_NODE_EXEC, "UV:", butr->xmin, butr->ymin+20, butr->xmax-butr->xmin, 20, ngeo->uvname, 0, 31, 0, 0, "Set name of UV layer to use, default is active UV layer"); - // uiButSetCompleteFunc(but, autocomplete_uv, NULL); - uiBlockSetCol(block, TH_AUTO); + // XXX uiButSetCompleteFunc(but, autocomplete_uv, NULL); - if(!verify_valid_vcol_name(ngeo->colname)) - uiBlockSetCol(block, TH_REDALERT); + if(!verify_valid_vcol_name(ngeo->colname)); +// uiBlockSetCol(block, TH_REDALERT); but= uiDefBut(block, TEX, B_NODE_EXEC, "Col:", butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, ngeo->colname, 0, 31, 0, 0, "Set name of vertex color layer to use, default is active vertex color layer"); uiButSetCompleteFunc(but, autocomplete_vcol, NULL); - uiBlockSetCol(block, TH_AUTO); } return 40; @@ -896,7 +889,6 @@ static int node_composit_buts_image(uiBlock *block, bNodeTree *ntree, bNode *nod char *strp; uiBlockBeginAlign(block); - uiBlockSetCol(block, TH_BUT_SETTING2); /* browse button */ IMAnames_to_pupstring(&strp, NULL, "LOAD NEW %x32767", &(G.main->image), NULL, NULL); @@ -913,7 +905,6 @@ static int node_composit_buts_image(uiBlock *block, bNodeTree *ntree, bNode *nod butr->xmin+19, dy, (short)(butr->xmax-butr->xmin-19.0f), 19, NULL, 0.0, 0.0, 0, 0, "Add new Image"); uiButSetFunc(bt, node_active_cb, ntree, node); - uiBlockSetCol(block, TH_AUTO); } else { /* name button + type */ @@ -2267,7 +2258,6 @@ static int node_texture_buts_image(uiBlock *block, bNodeTree *ntree, bNode *node if( block ) { uiBlockBeginAlign(block); - uiBlockSetCol(block, TH_BUT_SETTING2); /* browse button */ IMAnames_to_pupstring(&strp, NULL, "LOAD NEW %x32767", &(G.main->image), NULL, NULL); @@ -2284,7 +2274,6 @@ static int node_texture_buts_image(uiBlock *block, bNodeTree *ntree, bNode *node butr->xmin+19, butr->ymin, (short)(butr->xmax-butr->xmin-19.0f), 19, NULL, 0.0, 0.0, 0, 0, "Add new Image"); uiButSetFunc(bt, node_active_cb, ntree, node); - uiBlockSetCol(block, TH_AUTO); } else { /* name button */ @@ -2451,6 +2440,9 @@ void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode) ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL); if(ibuf) { float x, y; + + wmPushMatrix(); + /* somehow the offset has to be calculated inverse */ glaDefine2DArea(&ar->winrct); @@ -2465,9 +2457,7 @@ void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode) else if(ibuf->channels==4) glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_FLOAT, ibuf->rect_float); - /* sort this out, this should not be needed */ - wmOrtho2(ar->v2d.cur.xmin, ar->v2d.cur.xmax, ar->v2d.cur.ymin, ar->v2d.cur.ymax); - glLoadIdentity(); + wmPopMatrix(); } } } diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 28deb705b7b..0670dd9e01f 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -68,7 +68,6 @@ #include "BIF_gl.h" #include "BIF_glutil.h" -#include "BMF_Api.h" #include "WM_api.h" #include "WM_types.h" @@ -77,7 +76,6 @@ #include "ED_util.h" #include "ED_types.h" -#include "UI_text.h" #include "UI_interface.h" #include "UI_interface_icons.h" #include "UI_resources.h" @@ -90,36 +88,10 @@ // XXX interface.h extern void ui_dropshadow(rctf *rct, float radius, float aspect, int select); -extern void ui_rasterpos_safe(float x, float y, float aspect); extern void gl_round_box(int mode, float minx, float miny, float maxx, float maxy, float rad); extern void ui_draw_tria_icon(float x, float y, float aspect, char dir); -static void snode_drawstring(void *curfont, SpaceNode *snode, char *str, int okwidth) -{ - char drawstr[NODE_MAXSTR]; - int width; - - if(str[0]==0 || okwidth<4) return; - - BLI_strncpy(drawstr, str, NODE_MAXSTR); - width= snode->aspect*UI_GetStringWidth(curfont, drawstr, 0); - - if(width > okwidth) { - int len= strlen(drawstr)-1; - - while(width > okwidth && len>=0) { - drawstr[len]= 0; - - width= snode->aspect*UI_GetStringWidth(curfont, drawstr, 0); - len--; - } - if(len==0) return; - } - UI_DrawString(curfont, drawstr, 0); -} - - static void node_scaling_widget(int color_id, float aspect, float xmin, float ymin, float xmax, float ymax) { float dx; @@ -519,7 +491,7 @@ static uiBlock *socket_vector_menu(bContext *C, ARegion *ar, void *socket_v) break; } - block= uiBeginBlock(C, ar, "socket menu", UI_EMBOSS, UI_HELV); + block= uiBeginBlock(C, ar, "socket menu", UI_EMBOSS); /* use this for a fake extra empy space around the buttons */ uiDefBut(block, LABEL, 0, "", -4, -4, 188, 68, NULL, 0, 0, 0, 0, ""); @@ -645,13 +617,19 @@ static void do_node_internal_buttons(bContext *C, void *node_v, int event) static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bNode *node) { bNodeSocket *sock; - uiBlock *block= NULL; + uiBlock *block; uiBut *bt; rctf *rct= &node->totr; float /*slen,*/ iconofs; int /*ofs,*/ color_id= node_get_colorid(node); char showname[128]; /* 128 used below */ View2D *v2d = &ar->v2d; + char str[32]; + + /* make unique block name, also used for handling blocks in editnode.c */ + sprintf(str, "node buttons %p", node); + block= uiBeginBlock(C, ar, str, UI_EMBOSS); + uiBlockSetHandleFunc(block, do_node_internal_buttons, node); uiSetRoundBox(15-4); ui_dropshadow(rct, BASIS_RAD, snode->aspect, node->flag & SELECT); @@ -730,8 +708,6 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN else UI_ThemeColor(TH_TEXT); - ui_rasterpos_safe(rct->xmin+19.0f, rct->ymax-NODE_DY+5.0f, snode->aspect); - if(node->flag & NODE_MUTED) sprintf(showname, "[%s]", node->name); else if(node->username[0]) @@ -739,7 +715,8 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN else BLI_strncpy(showname, node->name, 128); - snode_drawstring(snode->curfont, snode, showname, (int)(iconofs - rct->xmin-18.0f)); + uiDefBut(block, LABEL, 0, showname, (short)(rct->xmin+15), (short)(rct->ymax-NODE_DY), + (int)(iconofs - rct->xmin-18.0f), NODE_DY, NULL, 0, 0, 0, 0, ""); /* body */ UI_ThemeColor4(TH_NODE); @@ -764,21 +741,6 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN if(node->flag & NODE_MUTED) node_draw_mute_line(v2d, snode, node); - /* we make buttons for input sockets, if... */ - if(node->flag & NODE_OPTIONS) { - if(node->inputs.first || node->typeinfo->butfunc) { - char str[32]; - - /* make unique block name, also used for handling blocks in editnode.c */ - sprintf(str, "node buttons %p", node); - - //block= uiNewBlock(&sa->uiblocks, str, UI_EMBOSS, UI_HELV, sa->win); - block= uiBeginBlock(C, ar, str, UI_EMBOSS, UI_HELV); - uiBlockSetHandleFunc(block, do_node_internal_buttons, node); - // XXX if(snode->id) - // XXX uiSetButLock(snode->id->lib!=NULL, ERROR_LIBDATA_MESSAGE); - } - } /* hurmf... another candidate for callback, have to see how this works first */ if(node->id && block && snode->treetype==NTREE_SHADER) @@ -819,9 +781,9 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN } } else { - UI_ThemeColor(TH_TEXT); - ui_rasterpos_safe(sock->locx+8.0f, sock->locy-5.0f, snode->aspect); - UI_DrawString(snode->curfont, sock->name, 0); + + uiDefBut(block, LABEL, 0, sock->name, (short)(sock->locx+3.0f), (short)(sock->locy-9.0f), + (short)(node->width-NODE_DY), NODE_DY, NULL, 0, 0, 0, 0, ""); } } } @@ -835,13 +797,14 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN socket_circle_draw(sock, NODE_SOCKSIZE); UI_ThemeColor(TH_TEXT); - slen= snode->aspect*UI_GetStringWidth(snode->curfont, sock->name, 0); + slen= snode->aspect*UI_GetStringWidth(sock->name); while(slen > node->width) { ofs++; - slen= snode->aspect*UI_GetStringWidth(snode->curfont, sock->name+ofs, 0); + slen= snode->aspect*UI_GetStringWidth(sock->name+ofs); } - ui_rasterpos_safe(sock->locx-8.0f-slen, sock->locy-5.0f, snode->aspect); - UI_DrawString(snode->curfont, sock->name+ofs, 0); + + uiDefBut(block, LABEL, 0, sock->name+ofs, (short)(sock->locx-15.0f-slen), (short)(sock->locy-9.0f), + (short)(node->width-NODE_DY), NODE_DY, NULL, 0, 0, 0, 0, ""); } } @@ -859,20 +822,24 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN } } - if(block) { - uiEndBlock(C, block); - uiDrawBlock(C, block); - } + uiEndBlock(C, block); + uiDrawBlock(C, block); } -static void node_draw_hidden(View2D *v2d, SpaceNode *snode, bNode *node) +static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, bNode *node) { + uiBlock *block; bNodeSocket *sock; rctf *rct= &node->totr; float dx, centy= 0.5f*(rct->ymax+rct->ymin); float hiddenrad= 0.5f*(rct->ymax-rct->ymin); int color_id= node_get_colorid(node); - char showname[128]; /* 128 is used below */ + char str[32], showname[128]; /* 128 is used below */ + + /* make unique block name, also used for handling blocks in editnode.c */ + sprintf(str, "node buttons %p", node); + block= uiBeginBlock(C, ar, str, UI_EMBOSS); + uiBlockSetHandleFunc(block, do_node_internal_buttons, node); /* shadow */ uiSetRoundBox(15); @@ -901,7 +868,7 @@ static void node_draw_hidden(View2D *v2d, SpaceNode *snode, bNode *node) /* disable lines */ if(node->flag & NODE_MUTED) - node_draw_mute_line(v2d, snode, node); + node_draw_mute_line(&ar->v2d, snode, node); if(node->flag & SELECT) UI_ThemeColor(TH_TEXT_HI); @@ -909,7 +876,6 @@ static void node_draw_hidden(View2D *v2d, SpaceNode *snode, bNode *node) UI_ThemeColor(TH_TEXT); if(node->miniwidth>0.0f) { - ui_rasterpos_safe(rct->xmin+21.0f, centy-4.0f, snode->aspect); if(node->flag & NODE_MUTED) sprintf(showname, "[%s]", node->name); @@ -918,7 +884,8 @@ static void node_draw_hidden(View2D *v2d, SpaceNode *snode, bNode *node) else BLI_strncpy(showname, node->name, 128); - snode_drawstring(snode->curfont, snode, showname, (int)(rct->xmax - rct->xmin-18.0f -12.0f)); + uiDefBut(block, LABEL, 0, showname, (short)(rct->xmin+15), (short)(centy-10), + (int)(rct->xmax - rct->xmin-18.0f -12.0f), NODE_DY, NULL, 0, 0, 0, 0, ""); } /* scale widget thing */ @@ -942,6 +909,10 @@ static void node_draw_hidden(View2D *v2d, SpaceNode *snode, bNode *node) if(!(sock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))) socket_circle_draw(sock, NODE_SOCKSIZE); } + + uiEndBlock(C, block); + uiDrawBlock(C, block); + } static void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree) @@ -966,7 +937,7 @@ static void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode, if(!(node->flag & SELECT)) { if(node->flag & NODE_GROUP_EDIT); else if(node->flag & NODE_HIDDEN) - node_draw_hidden(&ar->v2d, snode, node); + node_draw_hidden(C, ar, snode, node); else node_draw_basis(C, ar, snode, node); } @@ -977,7 +948,7 @@ static void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode, if(node->flag & SELECT) { if(node->flag & NODE_GROUP_EDIT); else if(node->flag & NODE_HIDDEN) - node_draw_hidden(&ar->v2d, snode, node); + node_draw_hidden(C, ar, snode, node); else node_draw_basis(C, ar, snode, node); } @@ -1048,7 +1019,6 @@ static void node_draw_group(const bContext *C, ARegion *ar, SpaceNode *snode, bN /* backdrop title */ UI_ThemeColor(TH_TEXT_HI); - ui_rasterpos_safe(rect.xmin+8.0f, rect.ymax+5.0f, snode->aspect); if(gnode->username[0]) { strcpy(showname,"("); @@ -1059,7 +1029,7 @@ static void node_draw_group(const bContext *C, ARegion *ar, SpaceNode *snode, bN else strcpy(showname, ngroup->id.name+2); - UI_DrawString(snode->curfont, showname, 0); + UI_DrawString(rect.xmin+8.0f, rect.ymax+5.0f, showname); /* links from groupsockets to the internal nodes */ node_draw_group_links(&ar->v2d, snode, gnode); @@ -1096,7 +1066,7 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d) /* aspect+font, set each time */ snode->aspect= (v2d->cur.xmax - v2d->cur.xmin)/((float)ar->winx); - snode->curfont= uiSetCurFont_ext(snode->aspect); + // XXX snode->curfont= uiSetCurFont_ext(snode->aspect); UI_view2d_constant_grid_draw(C, v2d); /* backdrop */ diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index d77d2aa09cb..56d7a649eb1 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -1056,7 +1056,7 @@ typedef struct NodeSizeWidget { float oldwidth; } NodeSizeWidget; -static int node_size_widget_modal(bContext *C, wmOperator *op, wmEvent *event) +static int node_resize_modal(bContext *C, wmOperator *op, wmEvent *event) { SpaceNode *snode= (SpaceNode*)CTX_wm_space_data(C); ARegion *ar= CTX_wm_region(C); @@ -1099,7 +1099,7 @@ static int node_size_widget_modal(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_RUNNING_MODAL; } -static int node_size_widget_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int node_resize_invoke(bContext *C, wmOperator *op, wmEvent *event) { SpaceNode *snode= (SpaceNode*)CTX_wm_space_data(C); ARegion *ar= CTX_wm_region(C); @@ -1135,15 +1135,15 @@ static int node_size_widget_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_PASS_THROUGH; } -void NODE_OT_size_widget(wmOperatorType *ot) +void NODE_OT_resize(wmOperatorType *ot) { /* identifiers */ - ot->name= "Scale Node"; - ot->idname= "NODE_OT_size_widget"; + ot->name= "Resize Node"; + ot->idname= "NODE_OT_resize"; /* api callbacks */ - ot->invoke= node_size_widget_invoke; - ot->modal= node_size_widget_modal; + ot->invoke= node_resize_invoke; + ot->modal= node_resize_modal; ot->poll= ED_operator_node_active; /* flags */ @@ -2118,7 +2118,7 @@ static int cut_links_exec(bContext *C, wmOperator *op) if(i>1) { bNodeLink *link, *next; - for(link= snode->edittree->links.first; link; link= link->next) { + for(link= snode->edittree->links.first; link; link= next) { next= link->next; if(cut_links_intersect(link, mcoords, i)) { diff --git a/source/blender/editors/space_node/node_header.c b/source/blender/editors/space_node/node_header.c index 14545b87cd4..8c48d4b54e1 100644 --- a/source/blender/editors/space_node/node_header.c +++ b/source/blender/editors/space_node/node_header.c @@ -97,8 +97,7 @@ static uiBlock *node_selectmenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "node_selectmenu", - UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "node_selectmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_node_selectmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -213,7 +212,7 @@ static uiBlock *node_add_inputmenu(bContext *C, ARegion *ar, void *arg_unused) { uiBlock *block; - block= uiBeginBlock(C, ar, "node_add_inputmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "node_add_inputmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_node_addmenu, NULL); node_make_addmenu(C, NODE_CLASS_INPUT, block); @@ -228,7 +227,7 @@ static uiBlock *node_add_outputmenu(bContext *C, ARegion *ar, void *arg_unused) { uiBlock *block; - block= uiBeginBlock(C, ar, "node_add_outputmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "node_add_outputmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_node_addmenu, NULL); node_make_addmenu(C, NODE_CLASS_OUTPUT, block); @@ -243,7 +242,7 @@ static uiBlock *node_add_colormenu(bContext *C, ARegion *ar, void *arg_unused) { uiBlock *block; - block= uiBeginBlock(C, ar, "node_add_colormenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "node_add_colormenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_node_addmenu, NULL); node_make_addmenu(C, NODE_CLASS_OP_COLOR, block); @@ -258,7 +257,7 @@ static uiBlock *node_add_vectormenu(bContext *C, ARegion *ar, void *arg_unused) { uiBlock *block; - block= uiBeginBlock(C, ar, "node_add_vectormenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "node_add_vectormenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_node_addmenu, NULL); node_make_addmenu(C, NODE_CLASS_OP_VECTOR, block); @@ -273,7 +272,7 @@ static uiBlock *node_add_filtermenu(bContext *C, ARegion *ar, void *arg_unused) { uiBlock *block; - block= uiBeginBlock(C, ar, "node_add_filtermenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "node_add_filtermenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_node_addmenu, NULL); node_make_addmenu(C, NODE_CLASS_OP_FILTER, block); @@ -288,7 +287,7 @@ static uiBlock *node_add_convertermenu(bContext *C, ARegion *ar, void *arg_unuse { uiBlock *block; - block= uiBeginBlock(C, ar, "node_add_convertermenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "node_add_convertermenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_node_addmenu, NULL); node_make_addmenu(C, NODE_CLASS_CONVERTOR, block); @@ -303,7 +302,7 @@ static uiBlock *node_add_mattemenu(bContext *C, ARegion *ar, void *arg_unused) { uiBlock *block; - block= uiBeginBlock(C, ar, "node_add_mattemenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "node_add_mattemenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_node_addmenu, NULL); node_make_addmenu(C, NODE_CLASS_MATTE, block); @@ -318,7 +317,7 @@ static uiBlock *node_add_distortmenu(bContext *C, ARegion *ar, void *arg_unused) { uiBlock *block; - block= uiBeginBlock(C, ar, "node_add_distortmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "node_add_distortmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_node_addmenu, NULL); node_make_addmenu(C, NODE_CLASS_DISTORT, block); @@ -333,7 +332,7 @@ static uiBlock *node_add_patternmenu(bContext *C, ARegion *ar, void *arg_unused { uiBlock *block; - block= uiBeginBlock(C, ar, "node_add_patternmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "node_add_patternmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_node_addmenu, NULL); node_make_addmenu(C, NODE_CLASS_PATTERN, block); @@ -348,7 +347,7 @@ static uiBlock *node_add_texturemenu(bContext *C, ARegion *ar, void *arg_unused) { uiBlock *block; - block= uiBeginBlock(C, ar, "node_add_texturemenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "node_add_texturemenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_node_addmenu, NULL); node_make_addmenu(C, NODE_CLASS_TEXTURE, block); @@ -363,7 +362,7 @@ static uiBlock *node_add_groupmenu(bContext *C, ARegion *ar, void *arg_unused) { uiBlock *block; - block= uiBeginBlock(C, ar, "node_add_groupmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "node_add_groupmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_node_addmenu, NULL); node_make_addmenu(C, NODE_CLASS_GROUP, block); @@ -379,7 +378,7 @@ static uiBlock *node_add_dynamicmenu(bContext *C, ARegion *ar, void *arg_unused) { uiBlock *block; - block= uiBeginBlock(C, ar, "node_add_dynamicmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "node_add_dynamicmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_node_addmenu, NULL); node_make_addmenu(C, NODE_CLASS_OP_DYNAMIC, block); @@ -398,7 +397,7 @@ static uiBlock *node_addmenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "node_addmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "node_addmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_node_addmenu, NULL); if(snode->treetype==NTREE_SHADER) { @@ -519,8 +518,7 @@ static uiBlock *node_nodemenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "node_nodemenu", - UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "node_nodemenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_node_nodemenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Grab/Move|G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -604,7 +602,7 @@ static uiBlock *node_viewmenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "node_viewmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "node_viewmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_node_viewmenu, NULL); if (snode->nodetree) { @@ -694,35 +692,32 @@ void node_header_buttons(const bContext *C, ARegion *ar) uiBlock *block; short xco, yco= 3; - block= uiBeginBlock(C, ar, "header node", UI_EMBOSS, UI_HELV); + block= uiBeginBlock(C, ar, "header node", UI_EMBOSS); uiBlockSetHandleFunc(block, do_node_buttons, NULL); xco= ED_area_header_standardbuttons(C, block, yco); if((sa->flag & HEADER_NO_PULLDOWN)==0) { int xmax; - - /* pull down menus */ - uiBlockSetEmboss(block, UI_EMBOSSP); xmax= GetButStringLength("View"); uiDefPulldownBut(block, node_viewmenu, NULL, - "View", xco, yco-2, xmax-3, 24, ""); + "View", xco, yco, xmax-3, 20, ""); xco+= xmax; xmax= GetButStringLength("Select"); uiDefPulldownBut(block, node_selectmenu, NULL, - "Select", xco, yco-2, xmax-3, 24, ""); + "Select", xco, yco, xmax-3, 20, ""); xco+= xmax; xmax= GetButStringLength("Add"); uiDefPulldownBut(block, node_addmenu, NULL, - "Add", xco, yco-2, xmax-3, 24, ""); + "Add", xco, yco, xmax-3, 20, ""); xco+= xmax; xmax= GetButStringLength("Node"); uiDefPulldownBut(block, node_nodemenu, NULL, - "Node", xco, yco-2, xmax-3, 24, ""); + "Node", xco, yco, xmax-3, 20, ""); xco+= xmax; } diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h index 4796db98e95..b73f57f935f 100644 --- a/source/blender/editors/space_node/node_intern.h +++ b/source/blender/editors/space_node/node_intern.h @@ -84,7 +84,7 @@ void snode_autoconnect(SpaceNode *snode, bNode *node_to, int flag); void NODE_OT_link(struct wmOperatorType *ot); void NODE_OT_delete(struct wmOperatorType *ot); -void NODE_OT_size_widget(struct wmOperatorType *ot); +void NODE_OT_resize(struct wmOperatorType *ot); void NODE_OT_links_cut(struct wmOperatorType *ot); // XXXXXX diff --git a/source/blender/editors/space_node/node_ops.c b/source/blender/editors/space_node/node_ops.c index cef867faa1f..7a1cc24fa58 100644 --- a/source/blender/editors/space_node/node_ops.c +++ b/source/blender/editors/space_node/node_ops.c @@ -57,7 +57,7 @@ void node_operatortypes(void) WM_operatortype_append(NODE_OT_select_border); WM_operatortype_append(NODE_OT_delete); WM_operatortype_append(NODE_OT_link); - WM_operatortype_append(NODE_OT_size_widget); + WM_operatortype_append(NODE_OT_resize); WM_operatortype_append(NODE_OT_links_cut); } @@ -72,7 +72,7 @@ void node_keymap(struct wmWindowManager *wm) RNA_enum_set(WM_keymap_add_item(keymap, "NODE_OT_select_extend", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "select_type", NODE_SELECT_MOUSE); WM_keymap_add_item(keymap, "NODE_OT_link", LEFTMOUSE, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "NODE_OT_size_widget", LEFTMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "NODE_OT_resize", LEFTMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "NODE_OT_visibility_toggle", LEFTMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "NODE_OT_links_cut", LEFTMOUSE, KM_PRESS, KM_ALT, 0); diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c index 493ef6954b5..775f46b8e04 100644 --- a/source/blender/editors/space_node/space_node.c +++ b/source/blender/editors/space_node/space_node.c @@ -201,7 +201,7 @@ static void node_channel_area_draw(const bContext *C, ARegion *ar) float col[3]; /* clear and setup matrix */ - UI_GetThemeColor3fv(TH_SHADE2, col); + UI_GetThemeColor3fv(TH_BACK, col); glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index 54652587c53..7104fad1767 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -96,20 +96,16 @@ #include "UI_interface_icons.h" #include "UI_resources.h" #include "UI_view2d.h" -#include "UI_text.h" #include "RNA_access.h" #include "ED_armature.h" +#include "ED_keyframing.h" #include "ED_object.h" #include "ED_screen.h" #include "outliner_intern.h" -#ifdef INTERNATIONAL -#include "FTF_Api.h" -#endif - #include "PIL_time.h" @@ -617,6 +613,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i Object *ob= (Object *)id; outliner_add_element(soops, &te->subtree, ob->adt, te, TSE_ANIM_DATA, 0); + outliner_add_element(soops, &te->subtree, ob->poselib, te, 0, 0); // XXX FIXME.. add a special type for this if(ob->proxy && ob->id.lib==NULL) outliner_add_element(soops, &te->subtree, ob->proxy, te, TSE_PROXY, 0); @@ -933,14 +930,18 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i TreeElement *ted= outliner_add_element(soops, &te->subtree, adt, te, TSE_DRIVER_BASE, 0); ID *lastadded= NULL; FCurve *fcu; + DriverTarget *dtar; ted->name= "Drivers"; for (fcu= adt->drivers.first; fcu; fcu= fcu->next) { - if (fcu->driver && fcu->driver->id) { - if (lastadded != fcu->driver->id) { - outliner_add_element(soops, &ted->subtree, fcu->driver->id, ted, TSE_LINKED_OB, 0); - lastadded= fcu->driver->id; + if (fcu->driver && fcu->driver->targets.first) { + for (dtar= fcu->driver->targets.first; dtar; dtar= dtar->next) { + if (lastadded != dtar->id) { + // XXX this lastadded check is rather lame, and also fails quite badly... + outliner_add_element(soops, &ted->subtree, dtar->id, ted, TSE_LINKED_OB, 0); + lastadded= dtar->id; + } } } } @@ -1042,20 +1043,20 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i } else if(type == TSE_RNA_STRUCT) { /* struct */ - nameprop= RNA_struct_name_property(ptr); + nameprop= RNA_struct_name_property(ptr->type); if(nameprop) { te->name= RNA_property_string_get_alloc(ptr, nameprop, NULL, 0); te->flag |= TE_FREE_NAME; } else - te->name= (char*)RNA_struct_ui_name(ptr); + te->name= (char*)RNA_struct_ui_name(ptr->type); - iterprop= RNA_struct_iterator_property(ptr); + iterprop= RNA_struct_iterator_property(ptr->type); tot= RNA_property_collection_length(ptr, iterprop); /* auto open these cases */ - if(!parent || (RNA_property_type(&parent->rnaptr, parent->directdata)) == PROP_POINTER) + if(!parent || (RNA_property_type(parent->directdata)) == PROP_POINTER) if(!tselem->used) tselem->flag &= ~TSE_CLOSED; @@ -1070,13 +1071,13 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i } else if(type == TSE_RNA_PROPERTY) { /* property */ - iterprop= RNA_struct_iterator_property(ptr); + iterprop= RNA_struct_iterator_property(ptr->type); RNA_property_collection_lookup_int(ptr, iterprop, index, &propptr); prop= propptr.data; - proptype= RNA_property_type(ptr, prop); + proptype= RNA_property_type(prop); - te->name= (char*)RNA_property_ui_name(ptr, prop); + te->name= (char*)RNA_property_ui_name(prop); te->directdata= prop; te->rnaptr= *ptr; @@ -1103,7 +1104,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i te->flag |= TE_LAZY_CLOSED; } else if(ELEM3(proptype, PROP_BOOLEAN, PROP_INT, PROP_FLOAT)) { - tot= RNA_property_array_length(ptr, prop); + tot= RNA_property_array_length(prop); if(!(tselem->flag & TSE_CLOSED)) { for(a=0; a<tot; a++) @@ -1120,9 +1121,9 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i static char *coloritem[4]= {" r", " g", " b", " a"}; prop= parent->directdata; - proptype= RNA_property_type(ptr, prop); - propsubtype= RNA_property_subtype(ptr, prop); - tot= RNA_property_array_length(ptr, prop); + proptype= RNA_property_type(prop); + propsubtype= RNA_property_subtype(prop); + tot= RNA_property_array_length(prop); te->directdata= prop; te->rnaptr= *ptr; @@ -3047,18 +3048,9 @@ void outliner_operation_menu(Scene *scene, ARegion *ar, SpaceOops *soops) } } -/* ***************** KEYINGSET OPERATIONS *************** */ - -/* These operators are only available in databrowser mode for now, as - * they depend on having RNA paths and/or hierarchies available. - */ -enum { - KEYINGSET_EDITMODE_ADD = 0, - KEYINGSET_EDITMODE_REMOVE, -} eKeyingSet_EditModes; +/* ***************** ANIMATO OPERATIONS ********************************** */ +/* KeyingSet and Driver Creation - Helper functions */ -/* Utilities ---------------------------------- */ - /* specialised poll callback for these operators to work in Datablocks view only */ static int ed_operator_outliner_datablocks_active(bContext *C) { @@ -3069,33 +3061,9 @@ static int ed_operator_outliner_datablocks_active(bContext *C) } return 0; } - - -/* find the 'active' KeyingSet, and add if not found (if adding is allowed) */ -// TODO: should this be an API func? -static KeyingSet *verify_active_keyingset(Scene *scene, short add) -{ - KeyingSet *ks= NULL; - - /* sanity check */ - if (scene == NULL) - return NULL; - - /* try to find one from scene */ - if (scene->active_keyingset > 0) - ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1); - - /* add if none found */ - // XXX the default settings have yet to evolve - if ((add) && (ks==NULL)) { - ks= BKE_keyingset_add(&scene->keyingsets, "KeyingSet", KEYINGSET_ABSOLUTE, 0); - scene->active_keyingset= BLI_countlist(&scene->keyingsets); - } - - return ks; -} -/* Helper func to extract an RNA path from seleted tree element + +/* Helper func to extract an RNA path from selected tree element * NOTE: the caller must zero-out all values of the pointers that it passes here first, as * this function does not do that yet */ @@ -3146,16 +3114,16 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle * - to prevent memory leaks, we must write to newpath not path, then free old path + swap them */ if(tse->type == TSE_RNA_PROPERTY) { - if(RNA_property_type(ptr, prop) == PROP_POINTER) { + if(RNA_property_type(prop) == PROP_POINTER) { /* for pointer we just append property name */ newpath= RNA_path_append(*path, ptr, prop, 0, NULL); } - else if(RNA_property_type(ptr, prop) == PROP_COLLECTION) { + else if(RNA_property_type(prop) == PROP_COLLECTION) { temnext= (TreeElement*)(ld->next->data); tsenext= TREESTORE(temnext); nextptr= &temnext->rnaptr; - nameprop= RNA_struct_name_property(nextptr); + nameprop= RNA_struct_name_property(nextptr->type); if(nameprop) { /* if possible, use name as a key in the path */ @@ -3192,7 +3160,7 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle /* no ID, so check if entry is RNA-struct, and if that RNA-struct is an ID datablock to extract info from */ if (tse->type == TSE_RNA_STRUCT) { /* ptr->data not ptr->id.data seems to be the one we want, since ptr->data is sometimes the owner of this ID? */ - if(RNA_struct_is_ID(ptr)) { + if(RNA_struct_is_ID(ptr->type)) { *id= (ID *)ptr->data; /* clear path */ @@ -3216,7 +3184,7 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle /* item is part of an array, so must set the array_index */ *array_index= te->index; } - else if (RNA_property_array_length(ptr, prop)) { + else if (RNA_property_array_length(prop)) { /* entire array was selected, so keyframe all */ *flag |= KSP_FLAG_WHOLE_ARRAY; } @@ -3231,6 +3199,178 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle BLI_freelistN(&hierarchy); } +/* ***************** KEYINGSET OPERATIONS *************** */ + +/* These operators are only available in databrowser mode for now, as + * they depend on having RNA paths and/or hierarchies available. + */ +enum { + DRIVERS_EDITMODE_ADD = 0, + DRIVERS_EDITMODE_REMOVE, +} eDrivers_EditModes; + +/* Utilities ---------------------------------- */ + +/* Recursively iterate over tree, finding and working on selected items */ +static void do_outliner_drivers_editop(SpaceOops *soops, ListBase *tree, short mode) +{ + TreeElement *te; + TreeStoreElem *tselem; + + for (te= tree->first; te; te=te->next) { + tselem= TREESTORE(te); + + /* if item is selected, perform operation */ + if (tselem->flag & TSE_SELECTED) { + ID *id= NULL; + char *path= NULL; + int array_index= 0; + short flag= 0; + short groupmode= KSP_GROUP_KSNAME; + + /* check if RNA-property described by this selected element is an animateable prop */ + if ((tselem->type == TSE_RNA_PROPERTY) && RNA_property_animateable(&te->rnaptr, te->directdata)) { + /* get id + path + index info from the selected element */ + tree_element_to_path(soops, te, tselem, + &id, &path, &array_index, &flag, &groupmode); + } + + /* only if ID and path were set, should we perform any actions */ + if (id && path) { + /* action depends on mode */ + switch (mode) { + case DRIVERS_EDITMODE_ADD: + { + /* add a new driver with the information obtained (only if valid) */ + ANIM_add_driver(id, path, array_index, flag); + } + break; + case DRIVERS_EDITMODE_REMOVE: + { + /* remove driver matching the information obtained (only if valid) */ + ANIM_remove_driver(id, path, array_index, flag); + } + break; + } + + /* free path, since it had to be generated */ + MEM_freeN(path); + } + + + } + + /* go over sub-tree */ + if ((tselem->flag & TSE_CLOSED)==0) + do_outliner_drivers_editop(soops, &te->subtree, mode); + } +} + +/* Add Operator ---------------------------------- */ + +static int outliner_drivers_addsel_exec(bContext *C, wmOperator *op) +{ + SpaceOops *soutliner= (SpaceOops*)CTX_wm_space_data(C); + + /* check for invalid states */ + if (soutliner == NULL) + return OPERATOR_CANCELLED; + + /* recursively go into tree, adding selected items */ + do_outliner_drivers_editop(soutliner, &soutliner->tree, DRIVERS_EDITMODE_ADD); + + /* send notifiers */ + WM_event_add_notifier(C, NC_SCENE|ND_KEYINGSET, NULL); + + return OPERATOR_FINISHED; +} + +void OUTLINER_OT_drivers_add(wmOperatorType *ot) +{ + /* api callbacks */ + ot->idname= "OUTLINER_OT_drivers_add"; + ot->name= "Add Drivers"; + ot->description= "Add drivers to selected items."; + + /* api callbacks */ + ot->exec= outliner_drivers_addsel_exec; + ot->poll= ed_operator_outliner_datablocks_active; + + /* flags */ + ot->flag = OPTYPE_UNDO; +} + + +/* Remove Operator ---------------------------------- */ + +static int outliner_drivers_deletesel_exec(bContext *C, wmOperator *op) +{ + SpaceOops *soutliner= (SpaceOops*)CTX_wm_space_data(C); + + /* check for invalid states */ + if (soutliner == NULL) + return OPERATOR_CANCELLED; + + /* recursively go into tree, adding selected items */ + do_outliner_drivers_editop(soutliner, &soutliner->tree, DRIVERS_EDITMODE_REMOVE); + + /* send notifiers */ + WM_event_add_notifier(C, NC_SCENE|ND_KEYINGSET, NULL); + + return OPERATOR_FINISHED; +} + +void OUTLINER_OT_drivers_delete(wmOperatorType *ot) +{ + /* identifiers */ + ot->idname= "OUTLINER_OT_drivers_delete"; + ot->name= "Delete Drivers"; + ot->description= "Delete drivers assigned to selected items."; + + /* api callbacks */ + ot->exec= outliner_drivers_deletesel_exec; + ot->poll= ed_operator_outliner_datablocks_active; + + /* flags */ + ot->flag = OPTYPE_UNDO; +} + +/* ***************** KEYINGSET OPERATIONS *************** */ + +/* These operators are only available in databrowser mode for now, as + * they depend on having RNA paths and/or hierarchies available. + */ +enum { + KEYINGSET_EDITMODE_ADD = 0, + KEYINGSET_EDITMODE_REMOVE, +} eKeyingSet_EditModes; + +/* Utilities ---------------------------------- */ + +/* find the 'active' KeyingSet, and add if not found (if adding is allowed) */ +// TODO: should this be an API func? +static KeyingSet *verify_active_keyingset(Scene *scene, short add) +{ + KeyingSet *ks= NULL; + + /* sanity check */ + if (scene == NULL) + return NULL; + + /* try to find one from scene */ + if (scene->active_keyingset > 0) + ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1); + + /* add if none found */ + // XXX the default settings have yet to evolve + if ((add) && (ks==NULL)) { + ks= BKE_keyingset_add(&scene->keyingsets, "Keying Set", KEYINGSET_ABSOLUTE, 0); + scene->active_keyingset= BLI_countlist(&scene->keyingsets); + } + + return ks; +} + /* Recursively iterate over tree, finding and working on selected items */ static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBase *tree, short mode) { @@ -3424,7 +3564,7 @@ static void tselem_draw_icon(float x, float y, TreeStoreElem *tselem, TreeElemen case eModifierType_Boolean: UI_icon_draw(x, y, ICON_MOD_BOOLEAN); break; case eModifierType_ParticleSystem: - UI_icon_draw(x, y, ICON_MOD_PARTICLEINSTANCE); break; + UI_icon_draw(x, y, ICON_MOD_PARTICLES); break; case eModifierType_ParticleInstance: UI_icon_draw(x, y, ICON_MOD_PARTICLES); break; case eModifierType_EdgeSplit: @@ -3435,6 +3575,30 @@ static void tselem_draw_icon(float x, float y, TreeStoreElem *tselem, TreeElemen UI_icon_draw(x, y, ICON_MOD_UVPROJECT); break; case eModifierType_Displace: UI_icon_draw(x, y, ICON_MOD_DISPLACE); break; + case eModifierType_Shrinkwrap: + UI_icon_draw(x, y, ICON_MOD_SHRINKWRAP); break; + case eModifierType_Cast: + UI_icon_draw(x, y, ICON_MOD_CAST); break; + case eModifierType_MeshDeform: + UI_icon_draw(x, y, ICON_MOD_MESHDEFORM); break; + case eModifierType_Bevel: + UI_icon_draw(x, y, ICON_MOD_BEVEL); break; + case eModifierType_Smooth: + UI_icon_draw(x, y, ICON_MOD_SMOOTH); break; + case eModifierType_SimpleDeform: + UI_icon_draw(x, y, ICON_MOD_SIMPLEDEFORM); break; + case eModifierType_Mask: + UI_icon_draw(x, y, ICON_MOD_MASK); break; + case eModifierType_Cloth: + UI_icon_draw(x, y, ICON_MOD_CLOTH); break; + case eModifierType_Explode: + UI_icon_draw(x, y, ICON_MOD_EXPLODE); break; + case eModifierType_Collision: + UI_icon_draw(x, y, ICON_MOD_PHYSICS); break; + case eModifierType_Fluidsim: + UI_icon_draw(x, y, ICON_MOD_FLUIDSIM); break; + case eModifierType_Multires: + UI_icon_draw(x, y, ICON_MOD_MULTIRES); break; default: UI_icon_draw(x, y, ICON_DOT); break; } @@ -3703,10 +3867,10 @@ static void outliner_draw_tree_element(Scene *scene, ARegion *ar, SpaceOops *soo if(active==1) UI_ThemeColor(TH_TEXT_HI); else if(ELEM(tselem->type, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) UI_ThemeColorBlend(TH_BACK, TH_TEXT, 0.75f); else UI_ThemeColor(TH_TEXT); - glRasterPos2i(startx+offsx, *starty+5); - UI_RasterPos((float)startx+offsx, (float)*starty+5); - UI_DrawString(G.font, te->name, 0); - offsx+= (int)(OL_X + UI_GetStringWidth(G.font, te->name, 0)); + + UI_DrawString(startx+offsx, *starty+5, te->name); + + offsx+= (int)(OL_X + UI_GetStringWidth(te->name)); /* closed item, we draw the icons, not when it's a scene, or master-server list though */ if(tselem->flag & TSE_CLOSED) { @@ -3824,6 +3988,9 @@ static void outliner_draw_tree(Scene *scene, ARegion *ar, SpaceOops *soops) float col[4]; #if 0 // XXX was #ifdef INTERNATIONAL + /* Maybe the INTERNATIONAL was really for check about freetype2 ? + * anyway I think that we can remove this now - Diego + */ FTF_SetFontSize('l'); BIF_SetScale(1.0); #endif @@ -4060,7 +4227,7 @@ static void namebutton_cb(bContext *C, void *tep, void *oldnamep) Object *ob= (Object *)tselem->id; // id = object bActionGroup *grp= te->directdata; - BLI_uniquename(&ob->pose->agroups, grp, "Group", offsetof(bActionGroup, name), 32); + BLI_uniquename(&ob->pose->agroups, grp, "Group", '.', offsetof(bActionGroup, name), 32); } break; case TSE_R_LAYER: @@ -4088,17 +4255,14 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar bt= uiDefIconButBitS(block, ICONTOG, OB_RESTRICT_VIEW, 0, ICON_RESTRICT_VIEW_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, &(ob->restrictflag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View"); uiButSetFunc(bt, restrictbutton_view_cb, scene, ob); - uiButSetFlag(bt, UI_NO_HILITE); bt= uiDefIconButBitS(block, ICONTOG, OB_RESTRICT_SELECT, 0, ICON_RESTRICT_SELECT_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (short)te->ys, 17, OL_H-1, &(ob->restrictflag), 0, 0, 0, 0, "Restrict/Allow selection in the 3D View"); uiButSetFunc(bt, restrictbutton_sel_cb, scene, ob); - uiButSetFlag(bt, UI_NO_HILITE); bt= uiDefIconButBitS(block, ICONTOG, OB_RESTRICT_RENDER, 0, ICON_RESTRICT_RENDER_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (short)te->ys, 17, OL_H-1, &(ob->restrictflag), 0, 0, 0, 0, "Restrict/Allow renderability"); uiButSetFunc(bt, restrictbutton_rend_cb, NULL, NULL); - uiButSetFlag(bt, UI_NO_HILITE); uiBlockSetEmboss(block, UI_EMBOSS); } @@ -4137,12 +4301,10 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar bt= uiDefIconButBitI(block, ICONTOGN, eModifierMode_Realtime, 0, ICON_RESTRICT_VIEW_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, &(md->mode), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View"); uiButSetFunc(bt, restrictbutton_modifier_cb, scene, ob); - uiButSetFlag(bt, UI_NO_HILITE); bt= uiDefIconButBitI(block, ICONTOGN, eModifierMode_Render, 0, ICON_RESTRICT_RENDER_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (short)te->ys, 17, OL_H-1, &(md->mode), 0, 0, 0, 0, "Restrict/Allow renderability"); uiButSetFunc(bt, restrictbutton_modifier_cb, scene, ob); - uiButSetFlag(bt, UI_NO_HILITE); } else if(tselem->type==TSE_POSE_CHANNEL) { bPoseChannel *pchan= (bPoseChannel *)te->directdata; @@ -4152,7 +4314,6 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar bt= uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_P, 0, ICON_RESTRICT_VIEW_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, &(bone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View"); uiButSetFunc(bt, restrictbutton_bone_cb, NULL, NULL); - uiButSetFlag(bt, UI_NO_HILITE); } else if(tselem->type==TSE_EBONE) { EditBone *ebone= (EditBone *)te->directdata; @@ -4161,7 +4322,6 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar bt= uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_A, 0, ICON_RESTRICT_VIEW_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, &(ebone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View"); uiButSetFunc(bt, restrictbutton_bone_cb, NULL, NULL); - uiButSetFlag(bt, UI_NO_HILITE); } } @@ -4203,7 +4363,7 @@ static void outliner_draw_rnabuts(uiBlock *block, Scene *scene, ARegion *ar, Spa ptr= &te->rnaptr; prop= te->directdata; - if(!(RNA_property_type(ptr, prop) == PROP_POINTER && (tselem->flag & TSE_CLOSED)==0)) + if(!(RNA_property_type(prop) == PROP_POINTER && (tselem->flag & TSE_CLOSED)==0)) uiDefAutoButR(block, ptr, prop, -1, "", 0, sizex, (int)te->ys, OL_RNA_COL_SIZEX, OL_H-1); } else if(tselem->type == TSE_RNA_ARRAY_ELEM) { @@ -4240,7 +4400,7 @@ static void outliner_buttons(uiBlock *block, ARegion *ar, SpaceOops *soops, List else if(tselem->id && GS(tselem->id->name)==ID_LI) len = sizeof(((Library*) 0)->name); else len= sizeof(((ID*) 0)->name)-2; - dx= (int)UI_GetStringWidth(G.font, te->name, 0); + dx= (int)UI_GetStringWidth(te->name); if(dx<50) dx= 50; bt= uiDefBut(block, TEX, OL_NAMEBUTTON, "", (short)te->xs+2*OL_X-4, (short)te->ys, dx+10, OL_H-1, te->name, 1.0, (float)len-1, 0, 0, ""); @@ -4311,7 +4471,7 @@ void draw_outliner(const bContext *C) outliner_draw_tree(scene, ar, soops); /* draw icons and names */ - block= uiBeginBlock(C, ar, "outliner buttons", UI_EMBOSS, UI_HELV); + block= uiBeginBlock(C, ar, "outliner buttons", UI_EMBOSS); outliner_buttons(block, ar, soops, &soops->tree); if(ELEM(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF)) { diff --git a/source/blender/editors/space_outliner/outliner_header.c b/source/blender/editors/space_outliner/outliner_header.c index ecff2d8a417..fe2f054899c 100644 --- a/source/blender/editors/space_outliner/outliner_header.c +++ b/source/blender/editors/space_outliner/outliner_header.c @@ -118,7 +118,7 @@ static uiBlock *outliner_viewmenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "outliner_viewmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "outliner_viewmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_viewmenu, NULL); if (soops->flag & SO_HIDE_RESTRICTCOLS) @@ -213,16 +213,13 @@ void outliner_header_buttons(const bContext *C, ARegion *ar) uiBlock *block; int xco, yco= 3, xmax; - block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS, UI_HELV); + block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS); uiBlockSetHandleFunc(block, do_outliner_buttons, NULL); xco= ED_area_header_standardbuttons(C, block, yco); if((sa->flag & HEADER_NO_PULLDOWN)==0) { - /* pull down menus */ - uiBlockSetEmboss(block, UI_EMBOSSP); - xmax= GetButStringLength("View"); uiDefPulldownBut(block, outliner_viewmenu, CTX_wm_area(C), "View", xco, yco-2, xmax-3, 24, ""); diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index 067c14dc257..48c904121a5 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -119,9 +119,13 @@ void outliner_select(struct SpaceOops *soops, struct ListBase *lb, int *index, s void draw_outliner(const struct bContext *C); void OUTLINER_OT_activate_click(struct wmOperatorType *ot); + void OUTLINER_OT_keyingset_add_selected(struct wmOperatorType *ot); void OUTLINER_OT_keyingset_remove_selected(struct wmOperatorType *ot); +void OUTLINER_OT_drivers_add(struct wmOperatorType *ot); +void OUTLINER_OT_drivers_delete(struct wmOperatorType *ot); + #if 0 extern void outliner_mouse_event(Scene *scene, ARegion *ar, SpaceOops *soops, short event); extern void outliner_toggle_visible(SpaceOops *soops); diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c index 920ccb62a7a..0efbdb06cd2 100644 --- a/source/blender/editors/space_outliner/outliner_ops.c +++ b/source/blender/editors/space_outliner/outliner_ops.c @@ -47,6 +47,9 @@ void outliner_operatortypes(void) WM_operatortype_append(OUTLINER_OT_keyingset_add_selected); WM_operatortype_append(OUTLINER_OT_keyingset_remove_selected); + + WM_operatortype_append(OUTLINER_OT_drivers_add); + WM_operatortype_append(OUTLINER_OT_drivers_delete); } void outliner_keymap(wmWindowManager *wm) @@ -61,5 +64,8 @@ void outliner_keymap(wmWindowManager *wm) WM_keymap_verify_item(keymap, "ANIM_OT_insert_keyframe", IKEY, KM_PRESS, 0, 0); WM_keymap_verify_item(keymap, "ANIM_OT_delete_keyframe", IKEY, KM_PRESS, KM_ALT, 0); + + WM_keymap_verify_item(keymap, "OUTLINER_OT_drivers_add", DKEY, KM_PRESS, 0, 0); + WM_keymap_verify_item(keymap, "OUTLINER_OT_drivers_delete", DKEY, KM_PRESS, KM_ALT, 0); } diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index 4add1e88986..8e30db584af 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -62,7 +62,6 @@ #include "BIF_glutil.h" #include "UI_interface.h" -#include "UI_text.h" #include "UI_resources.h" #include "UI_view2d.h" @@ -120,6 +119,7 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn) case ND_OB_SELECT: case ND_MODE: case ND_KEYINGSET: + case ND_FRAME: ED_region_tag_redraw(ar); break; } diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c index da53057c5eb..797302a8652 100644 --- a/source/blender/editors/space_script/script_edit.c +++ b/source/blender/editors/space_script/script_edit.c @@ -73,11 +73,11 @@ static int run_pyfile_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void SCRIPT_OT_run_pyfile(wmOperatorType *ot) +void SCRIPT_OT_python_file_run(wmOperatorType *ot) { /* identifiers */ ot->name= "Run python file"; - ot->idname= "SCRIPT_OT_run_pyfile"; + ot->idname= "SCRIPT_OT_python_file_run"; /* api callbacks */ ot->exec= run_pyfile_exec; @@ -86,3 +86,33 @@ void SCRIPT_OT_run_pyfile(wmOperatorType *ot) RNA_def_string_file_path(ot->srna, "filename", "", 512, "Filename", ""); } +static int run_ui_scripts_exec(bContext *C, wmOperator *op) +{ +#ifndef DISABLE_PYTHON + BPY_run_ui_scripts(C, 1); /* reload */ +#endif + return OPERATOR_FINISHED; +} + +static int run_ui_scripts_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + int ret= run_ui_scripts_exec(C, op); + + if(ret==OPERATOR_FINISHED) + WM_event_add_notifier(C, NC_WINDOW, NULL); + + return ret; +} + + +void SCRIPT_OT_python_run_ui_scripts(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Reload Python Interface"; + ot->idname= "SCRIPT_OT_python_run_ui_scripts"; + + /* api callbacks */ + ot->exec= run_ui_scripts_exec; + ot->invoke= run_ui_scripts_invoke; + ot->poll= ED_operator_areaactive; +} diff --git a/source/blender/editors/space_script/script_header.c b/source/blender/editors/space_script/script_header.c index 2a7006348b3..d9851df4185 100644 --- a/source/blender/editors/space_script/script_header.c +++ b/source/blender/editors/space_script/script_header.c @@ -71,7 +71,7 @@ static uiBlock *dummy_viewmenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "dummy_viewmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "dummy_viewmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_viewmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Nothing yet", 0, yco-=20, @@ -104,7 +104,7 @@ void script_header_buttons(const bContext *C, ARegion *ar) uiBlock *block; int xco, yco= 3; - block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS, UI_HELV); + block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS); uiBlockSetHandleFunc(block, do_script_buttons, NULL); xco= ED_area_header_standardbuttons(C, block, yco); @@ -112,9 +112,6 @@ void script_header_buttons(const bContext *C, ARegion *ar) if((sa->flag & HEADER_NO_PULLDOWN)==0) { int xmax; - /* pull down menus */ - uiBlockSetEmboss(block, UI_EMBOSSP); - xmax= GetButStringLength("View"); uiDefPulldownBut(block, dummy_viewmenu, CTX_wm_area(C), "View", xco, yco-2, xmax-3, 24, ""); diff --git a/source/blender/editors/space_script/script_intern.h b/source/blender/editors/space_script/script_intern.h index e9dd88e893c..59858ee6289 100644 --- a/source/blender/editors/space_script/script_intern.h +++ b/source/blender/editors/space_script/script_intern.h @@ -39,7 +39,8 @@ void script_operatortypes(void); void script_keymap(struct wmWindowManager *wm); /* script_edit.c */ -void SCRIPT_OT_run_pyfile(struct wmOperatorType *ot); +void SCRIPT_OT_python_file_run(struct wmOperatorType *ot); +void SCRIPT_OT_python_run_ui_scripts(struct wmOperatorType *ot); #endif /* ED_SCRIPT_INTERN_H */ diff --git a/source/blender/editors/space_script/script_ops.c b/source/blender/editors/space_script/script_ops.c index 45cbf9f8a2d..aa35ba54b7f 100644 --- a/source/blender/editors/space_script/script_ops.c +++ b/source/blender/editors/space_script/script_ops.c @@ -59,7 +59,8 @@ void script_operatortypes(void) { - WM_operatortype_append(SCRIPT_OT_run_pyfile); + WM_operatortype_append(SCRIPT_OT_python_file_run); + WM_operatortype_append(SCRIPT_OT_python_run_ui_scripts); } void script_keymap(wmWindowManager *wm) @@ -67,6 +68,7 @@ void script_keymap(wmWindowManager *wm) ListBase *keymap= WM_keymap_listbase(wm, "Script", SPACE_SCRIPT, 0); /* TODO - this is just while we have no way to load a text datablock */ - RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_run_pyfile", PKEY, KM_PRESS, 0, 0)->ptr, "filename", "test.py"); + RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_python_file_run", PKEY, KM_PRESS, KM_CTRL|KM_SHIFT|KM_ALT, 0)->ptr, "filename", "test.py"); + WM_keymap_add_item(keymap, "SCRIPT_OT_python_run_ui_scripts", PKEY, KM_PRESS, KM_SHIFT, 0); } diff --git a/source/blender/editors/space_script/space_script.c b/source/blender/editors/space_script/space_script.c index c7f280f439e..4c17ed16475 100644 --- a/source/blender/editors/space_script/space_script.c +++ b/source/blender/editors/space_script/space_script.c @@ -58,6 +58,8 @@ #include "ED_markers.h" +#include "BPY_extern.h" + #include "script_intern.h" // own include diff --git a/source/blender/editors/space_sequencer/Makefile b/source/blender/editors/space_sequencer/Makefile index c04202cba73..80699db4baa 100644 --- a/source/blender/editors/space_sequencer/Makefile +++ b/source/blender/editors/space_sequencer/Makefile @@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS) CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(OPENGL_HEADERS) -CPPFLAGS += -I$(NAN_BMFONT)/include # not very neat.... CPPFLAGS += -I../../windowmanager @@ -49,6 +48,7 @@ CPPFLAGS += -I../../makesdna CPPFLAGS += -I../../makesrna CPPFLAGS += -I../../imbuf CPPFLAGS += -I../../python +CPPFLAGS += -I../../blenfont CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include # own include diff --git a/source/blender/editors/space_sequencer/SConscript b/source/blender/editors/space_sequencer/SConscript index 1794ef29257..ab51068a529 100644 --- a/source/blender/editors/space_sequencer/SConscript +++ b/source/blender/editors/space_sequencer/SConscript @@ -3,8 +3,8 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenlib ../../blenkernel ../../blenfont ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' -incs += ' #intern/bmfont ../../makesrna' +incs += ' ../../makesrna' env.BlenderLib ( 'bf_editors_space_sequencer', sources, Split(incs), [], libtype=['core'], priority=[100] ) diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index c91972ec4f3..6e38ff053be 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -207,12 +207,12 @@ static int sequencer_add_scene_strip_invoke(bContext *C, wmOperator *op, wmEvent } -void SEQUENCER_OT_add_scene_strip(struct wmOperatorType *ot) +void SEQUENCER_OT_scene_strip_add(struct wmOperatorType *ot) { /* identifiers */ ot->name= "Add Scene Strip"; - ot->idname= "SEQUENCER_OT_add_scene_strip"; + ot->idname= "SEQUENCER_OT_scene_strip_add"; ot->description= "Add a strip to the sequencer using a blender scene as a source"; /* api callbacks */ @@ -295,12 +295,12 @@ static int sequencer_add_movie_strip_invoke(bContext *C, wmOperator *op, wmEvent } -void SEQUENCER_OT_add_movie_strip(struct wmOperatorType *ot) +void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot) { /* identifiers */ ot->name= "Add Movie Strip"; - ot->idname= "SEQUENCER_OT_add_movie_strip"; + ot->idname= "SEQUENCER_OT_movie_strip_add"; ot->description= "Add a movie strip to the sequencer"; /* api callbacks */ @@ -396,12 +396,12 @@ static int sequencer_add_sound_strip_invoke(bContext *C, wmOperator *op, wmEvent } -void SEQUENCER_OT_add_sound_strip(struct wmOperatorType *ot) +void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot) { /* identifiers */ ot->name= "Add Sound Strip"; - ot->idname= "SEQUENCER_OT_add_sound_strip"; + ot->idname= "SEQUENCER_OT_sound_strip_add"; ot->description= "Add a sound strip to the sequencer"; /* api callbacks */ @@ -489,12 +489,12 @@ static int sequencer_add_image_strip_invoke(bContext *C, wmOperator *op, wmEvent } -void SEQUENCER_OT_add_image_strip(struct wmOperatorType *ot) +void SEQUENCER_OT_image_strip_add(struct wmOperatorType *ot) { /* identifiers */ ot->name= "Add Image Strip"; - ot->idname= "SEQUENCER_OT_add_image_strip"; + ot->idname= "SEQUENCER_OT_image_strip_add"; ot->description= "Add an image or image sequence to the sequencer"; /* api callbacks */ @@ -622,11 +622,11 @@ static int sequencer_add_effect_strip_invoke(bContext *C, wmOperator *op, wmEven } } -void SEQUENCER_OT_add_effect_strip(struct wmOperatorType *ot) +void SEQUENCER_OT_effect_strip_add(struct wmOperatorType *ot) { /* identifiers */ ot->name= "Add Effect Strip"; - ot->idname= "SEQUENCER_OT_add_effect_strip"; + ot->idname= "SEQUENCER_OT_effect_strip_add"; ot->description= "Add an effect to the sequencer, most are applied ontop of existing strips"; /* api callbacks */ diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index e71abec8e4b..5e07689f536 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -30,8 +30,6 @@ #include "MEM_guardedalloc.h" -#include "BMF_Api.h" - #include "BLI_blenlib.h" #include "BLI_arithb.h" @@ -57,6 +55,7 @@ #include "BIF_gl.h" #include "BIF_glutil.h" +#include "BLF_api.h" #include "ED_anim_api.h" #include "ED_space_api.h" @@ -404,12 +403,14 @@ static void draw_seq_handle(SpaceSeq *sseq, Sequence *seq, float pixelx, short d cpack(0xFFFFFF); if (direction == SEQ_LEFTHANDLE) { sprintf(str, "%d", seq->startdisp); - glRasterPos3f(rx1, y1-0.15, 0.0); + x1= rx1; + y1 -= 0.15; } else { sprintf(str, "%d", seq->enddisp - 1); - glRasterPos3f((x2-BMF_GetStringWidth(G.fonts, str)*pixelx), y2+0.05, 0.0); + x1= x2 - BLF_width_default(str) * pixelx; + y1= y2 + 0.05; } - BMF_DrawString(G.fonts, str); + BLF_draw_default(x1, y1, 0.0f, str); } } @@ -572,8 +573,9 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float } strp= str; - - while( (len= BMF_GetStringWidth(G.font, strp)) > size) { + // XXX + /* The correct thing is used a Styla and set the clipping region. */ + while( (len= BLF_width_default(strp)) > size) { if(len < 10) break; if(strp[1]==0) break; strp++; @@ -590,8 +592,7 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float }else{ cpack(0); } - glRasterPos3f(x1, y1+SEQ_STRIP_OFSBOTTOM, 0.0); - BMF_DrawString(G.font, strp); + BLF_draw_default(x1, y1+SEQ_STRIP_OFSBOTTOM, 0.0, strp); } /* draws a shaded strip, made from gradient + flat color + gradient */ diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 1ae9d19a10e..f6391666cd8 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -1981,11 +1981,11 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op) } -void SEQUENCER_OT_separate_images(wmOperatorType *ot) +void SEQUENCER_OT_images_separate(wmOperatorType *ot) { /* identifiers */ ot->name= "Separate Images"; - ot->idname= "SEQUENCER_OT_separate_images"; + ot->idname= "SEQUENCER_OT_images_separate"; /* api callbacks */ ot->invoke= WM_operator_confirm; diff --git a/source/blender/editors/space_sequencer/sequencer_header.c b/source/blender/editors/space_sequencer/sequencer_header.c index a701a9dd55b..0e9a9d7130b 100644 --- a/source/blender/editors/space_sequencer/sequencer_header.c +++ b/source/blender/editors/space_sequencer/sequencer_header.c @@ -78,7 +78,7 @@ static uiBlock *seq_viewmenu(bContext *C, ARegion *ar, void *arg_unused) SpaceSeq *sseq= sa->spacedata.first; View2D *v2d= UI_view2d_fromcontext(C); - uiBlock *block= uiBeginBlock(C, ar, "seq_viewmenu", UI_EMBOSSP, UI_HELV); + uiBlock *block= uiBeginBlock(C, ar, "seq_viewmenu", UI_EMBOSSP); short yco= 0, menuwidth=120; if (sseq->mainb == SEQ_DRAW_SEQUENCE) { @@ -144,22 +144,22 @@ static uiBlock *seq_viewmenu(bContext *C, ARegion *ar, void *arg_unused) } //static uiBlock *seq_selectmenu(bContext *C, ARegion *ar, void *arg_unused) -static void seq_selectmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void seq_selectmenu(bContext *C, uiLayout *layout, void *arg_unused) { - uiMenuContext(head, WM_OP_INVOKE_REGION_WIN); - - uiMenuItemEnumO(head, "Strips to the Left", 0, "SEQUENCER_OT_select_active_side", "side", SEQ_SIDE_LEFT); - uiMenuItemEnumO(head, "Strips to the Right", 0, "SEQUENCER_OT_select_active_side", "side", SEQ_SIDE_RIGHT); - uiMenuSeparator(head); - uiMenuItemEnumO(head, "Surrounding Handles", 0, "SEQUENCER_OT_select_handles", "side", SEQ_SIDE_BOTH); - uiMenuItemEnumO(head, "Left Handles", 0, "SEQUENCER_OT_select_handles", "side", SEQ_SIDE_LEFT); - uiMenuItemEnumO(head, "Right Handles", 0, "SEQUENCER_OT_select_handles", "side", SEQ_SIDE_RIGHT); - uiMenuSeparator(head); - uiMenuItemO(head, 0, "SEQUENCER_OT_select_linked"); - uiMenuSeparator(head); - uiMenuItemO(head, 0, "SEQUENCER_OT_select_linked"); - uiMenuItemO(head, 0, "SEQUENCER_OT_select_all_toggle"); - uiMenuItemO(head, 0, "SEQUENCER_OT_select_invert"); + uiLayoutContext(layout, WM_OP_INVOKE_REGION_WIN); + + uiItemEnumO(layout, "Strips to the Left", 0, "SEQUENCER_OT_select_active_side", "side", SEQ_SIDE_LEFT); + uiItemEnumO(layout, "Strips to the Right", 0, "SEQUENCER_OT_select_active_side", "side", SEQ_SIDE_RIGHT); + uiItemS(layout); + uiItemEnumO(layout, "Surrounding Handles", 0, "SEQUENCER_OT_select_handles", "side", SEQ_SIDE_BOTH); + uiItemEnumO(layout, "Left Handles", 0, "SEQUENCER_OT_select_handles", "side", SEQ_SIDE_LEFT); + uiItemEnumO(layout, "Right Handles", 0, "SEQUENCER_OT_select_handles", "side", SEQ_SIDE_RIGHT); + uiItemS(layout); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_select_linked"); + uiItemS(layout); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_select_linked"); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_select_all_toggle"); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_select_invert"); } static uiBlock *seq_markermenu(bContext *C, ARegion *ar, void *arg_unused) @@ -168,7 +168,7 @@ static uiBlock *seq_markermenu(bContext *C, ARegion *ar, void *arg_unused) SpaceSeq *sseq= sa->spacedata.first; - uiBlock *block= uiBeginBlock(C, ar, "seq_markermenu", UI_EMBOSSP, UI_HELV); + uiBlock *block= uiBeginBlock(C, ar, "seq_markermenu", UI_EMBOSSP); short yco= 0, menuwidth=120; @@ -210,114 +210,113 @@ static uiBlock *seq_markermenu(bContext *C, ARegion *ar, void *arg_unused) } //static uiBlock *seq_addmenu_effectmenu(bContext *C, ARegion *ar, void *arg_unused) -static void seq_addmenu_effectmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void seq_addmenu_effectmenu(bContext *C, uiLayout *layout, void *arg_unused) { - uiMenuContext(head, WM_OP_INVOKE_REGION_WIN); + uiLayoutContext(layout, WM_OP_INVOKE_REGION_WIN); - uiMenuItemEnumO(head, "", 0, "SEQUENCER_OT_add_effect_strip", "type", SEQ_ADD); - uiMenuItemEnumO(head, "", 0, "SEQUENCER_OT_add_effect_strip", "type", SEQ_SUB); - uiMenuItemEnumO(head, "", 0, "SEQUENCER_OT_add_effect_strip", "type", SEQ_MUL); - uiMenuItemEnumO(head, "", 0, "SEQUENCER_OT_add_effect_strip", "type", SEQ_CROSS); - uiMenuItemEnumO(head, "", 0, "SEQUENCER_OT_add_effect_strip", "type", SEQ_GAMCROSS); - uiMenuItemEnumO(head, "", 0, "SEQUENCER_OT_add_effect_strip", "type", SEQ_ALPHAOVER); - uiMenuItemEnumO(head, "", 0, "SEQUENCER_OT_add_effect_strip", "type", SEQ_ALPHAUNDER); - uiMenuItemEnumO(head, "", 0, "SEQUENCER_OT_add_effect_strip", "type", SEQ_OVERDROP); - uiMenuItemEnumO(head, "", 0, "SEQUENCER_OT_add_effect_strip", "type", SEQ_WIPE); - uiMenuItemEnumO(head, "", 0, "SEQUENCER_OT_add_effect_strip", "type", SEQ_GLOW); - uiMenuItemEnumO(head, "", 0, "SEQUENCER_OT_add_effect_strip", "type", SEQ_TRANSFORM); + uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_ADD); + uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_SUB); + uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_MUL); + uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_CROSS); + uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_GAMCROSS); + uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_ALPHAOVER); + uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_ALPHAUNDER); + uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_OVERDROP); + uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_WIPE); + uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_GLOW); + uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_TRANSFORM); /* Color is an effect but moved to the other menu since its not that exciting */ - uiMenuItemEnumO(head, "", 0, "SEQUENCER_OT_add_effect_strip", "type", SEQ_SPEED); - uiMenuSeparator(head); - uiMenuItemEnumO(head, "", 0, "SEQUENCER_OT_add_effect_strip", "type", SEQ_PLUGIN); + uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_SPEED); + uiItemS(layout); + uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_PLUGIN); } //static uiBlock *seq_addmenu(bContext *C, ARegion *ar, void *arg_unused) -static void seq_addmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void seq_addmenu(bContext *C, uiLayout *layout, void *arg_unused) { - uiMenuLevel(head, "Effects...", seq_addmenu_effectmenu); - uiMenuSeparator(head); + uiItemMenuF(layout, "Effects...", 0, seq_addmenu_effectmenu); + uiItemS(layout); - uiMenuContext(head, WM_OP_INVOKE_REGION_WIN); + uiLayoutContext(layout, WM_OP_INVOKE_REGION_WIN); #ifdef WITH_FFMPEG - uiMenuItemBooleanO(head, "Audio (RAM)", 0, "SEQUENCER_OT_add_sound_strip", "hd", FALSE); - uiMenuItemBooleanO(head, "Audio (HD)", 0, "SEQUENCER_OT_add_sound_strip", "hd", TRUE); + uiItemBooleanO(layout, "Audio (RAM)", 0, "SEQUENCER_OT_sound_strip_add", "hd", FALSE); + uiItemBooleanO(layout, "Audio (HD)", 0, "SEQUENCER_OT_sound_strip_add", "hd", TRUE); #else - uiMenuItemO(head, 0, "SEQUENCER_OT_add_sound_strip"); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_sound_strip_add"); #endif - uiMenuItemEnumO(head, "Add Color Strip", 0, "SEQUENCER_OT_add_effect_strip", "type", SEQ_COLOR); + uiItemEnumO(layout, "Add Color Strip", 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_COLOR); - uiMenuItemO(head, 0, "SEQUENCER_OT_add_image_strip"); - uiMenuItemO(head, 0, "SEQUENCER_OT_add_movie_strip"); - uiMenuItemO(head, 0, "SEQUENCER_OT_add_scene_strip"); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_image_strip_add"); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_movie_strip_add"); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_scene_strip_add"); #ifdef WITH_FFMPEG - uiMenuItemBooleanO(head, "Movie and Sound", 0, "SEQUENCER_OT_add_movie_strip", "sound", TRUE); + uiItemBooleanO(layout, "Movie and Sound", 0, "SEQUENCER_OT_movie_strip_add", "sound", TRUE); #endif } //static uiBlock *seq_editmenu(bContext *C, ARegion *ar, void *arg_unused) -static void seq_editmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void seq_editmenu(bContext *C, uiLayout *layout, void *arg_unused) { - Scene *scene= CTX_data_scene(C); Editing *ed= seq_give_editing(scene, FALSE); - uiMenuContext(head, WM_OP_INVOKE_REGION_WIN); + uiLayoutContext(layout, WM_OP_INVOKE_REGION_WIN); - uiMenuItemEnumO(head, "", 0, "TFM_OT_transform", "mode", TFM_TRANSLATION); - uiMenuItemEnumO(head, "", 0, "TFM_OT_transform", "mode", TFM_TIME_EXTEND); + uiItemEnumO(layout, NULL, 0, "TFM_OT_transform", "mode", TFM_TRANSLATION); + uiItemEnumO(layout, NULL, 0, "TFM_OT_transform", "mode", TFM_TIME_EXTEND); - // uiMenuItemO(head, 0, "SEQUENCER_OT_strip_snap"); // TODO - add this operator + // uiItemO(layout, NULL, 0, "SEQUENCER_OT_strip_snap"); // TODO - add this operator - uiMenuItemEnumO(head, "Cut Hard", 0, "SEQUENCER_OT_cut", "type", SEQ_CUT_HARD); - uiMenuItemEnumO(head, "Cut Soft", 0, "SEQUENCER_OT_cut", "type", SEQ_CUT_SOFT); + uiItemEnumO(layout, "Cut Hard", 0, "SEQUENCER_OT_cut", "type", SEQ_CUT_HARD); + uiItemEnumO(layout, "Cut Soft", 0, "SEQUENCER_OT_cut", "type", SEQ_CUT_SOFT); - uiMenuItemO(head, 0, "SEQUENCER_OT_separate_images"); - uiMenuSeparator(head); - uiMenuItemO(head, 0, "SEQUENCER_OT_duplicate_add"); - uiMenuItemO(head, 0, "SEQUENCER_OT_delete"); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_images_separate"); + uiItemS(layout); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_duplicate_add"); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_delete"); if (ed && ed->act_seq) { switch(ed->act_seq->type) { case SEQ_EFFECT: - uiMenuSeparator(head); - uiMenuItemO(head, 0, "SEQUENCER_OT_effect_change"); - uiMenuItemO(head, 0, "SEQUENCER_OT_effect_reassign_inputs"); + uiItemS(layout); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_effect_change"); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_effect_reassign_inputs"); break; case SEQ_IMAGE: - uiMenuSeparator(head); - uiMenuItemO(head, 0, "SEQUENCER_OT_image_change"); // Change Scene... + uiItemS(layout); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_image_change"); // Change Scene... break; case SEQ_SCENE: - uiMenuSeparator(head); - uiMenuItemO(head, 0, "SEQUENCER_OT_scene_change"); // Remap Paths... + uiItemS(layout); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_scene_change"); // Remap Paths... break; case SEQ_MOVIE: - uiMenuSeparator(head); - uiMenuItemO(head, 0, "SEQUENCER_OT_movie_change"); // Remap Paths... + uiItemS(layout); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_movie_change"); // Remap Paths... break; } } - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemO(head, 0, "SEQUENCER_OT_meta_make"); - uiMenuItemO(head, 0, "SEQUENCER_OT_meta_separate"); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_meta_make"); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_meta_separate"); if (ed && (ed->metastack.first || (ed->act_seq && ed->act_seq->type == SEQ_META))) { - uiMenuSeparator(head); - uiMenuItemO(head, 0, "SEQUENCER_OT_meta_toggle"); + uiItemS(layout); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_meta_toggle"); } - uiMenuSeparator(head); - uiMenuItemO(head, 0, "SEQUENCER_OT_reload"); - uiMenuSeparator(head); - uiMenuItemO(head, 0, "SEQUENCER_OT_lock"); - uiMenuItemO(head, 0, "SEQUENCER_OT_unlock"); - uiMenuItemO(head, 0, "SEQUENCER_OT_mute"); - uiMenuItemO(head, 0, "SEQUENCER_OT_unmute"); - - uiMenuItemEnumO(head, "Mute Deselected Strips", 0, "SEQUENCER_OT_mute", "type", SEQ_UNSELECTED); + uiItemS(layout); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_reload"); + uiItemS(layout); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_lock"); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_unlock"); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_mute"); + uiItemO(layout, NULL, 0, "SEQUENCER_OT_unmute"); + + uiItemEnumO(layout, "Mute Deselected Strips", 0, "SEQUENCER_OT_mute", "type", SEQ_UNSELECTED); } void sequencer_header_buttons(const bContext *C, ARegion *ar) @@ -327,7 +326,7 @@ void sequencer_header_buttons(const bContext *C, ARegion *ar) Scene *scene= CTX_data_scene(C); Editing *ed= seq_give_editing(scene, FALSE); - uiBlock *block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS, UI_HELV); + uiBlock *block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS); int xco=3, yco= 3; xco= ED_area_header_standardbuttons(C, block, yco); @@ -335,9 +334,6 @@ void sequencer_header_buttons(const bContext *C, ARegion *ar) if((sa->flag & HEADER_NO_PULLDOWN)==0) { int xmax; - /* pull down menus */ - uiBlockSetEmboss(block, UI_EMBOSSP); - xmax= GetButStringLength("View"); //uiDefMenuBut(block, seq_viewmenu, NULL, "View", xco, 0, xmax-3, 24, ""); // TODO diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h index 8a56d15e1da..df6a848696f 100644 --- a/source/blender/editors/space_sequencer/sequencer_intern.h +++ b/source/blender/editors/space_sequencer/sequencer_intern.h @@ -80,7 +80,7 @@ void SEQUENCER_OT_reload(struct wmOperatorType *ot); void SEQUENCER_OT_refresh_all(struct wmOperatorType *ot); void SEQUENCER_OT_duplicate_add(struct wmOperatorType *ot); void SEQUENCER_OT_delete(struct wmOperatorType *ot); -void SEQUENCER_OT_separate_images(struct wmOperatorType *ot); +void SEQUENCER_OT_images_separate(struct wmOperatorType *ot); void SEQUENCER_OT_meta_toggle(struct wmOperatorType *ot); void SEQUENCER_OT_meta_make(struct wmOperatorType *ot); void SEQUENCER_OT_meta_separate(struct wmOperatorType *ot); @@ -102,11 +102,11 @@ void SEQUENCER_OT_select_invert(struct wmOperatorType *ot); /* sequencer_select.c */ -void SEQUENCER_OT_add_scene_strip(struct wmOperatorType *ot); -void SEQUENCER_OT_add_movie_strip(struct wmOperatorType *ot); -void SEQUENCER_OT_add_sound_strip(struct wmOperatorType *ot); -void SEQUENCER_OT_add_image_strip(struct wmOperatorType *ot); -void SEQUENCER_OT_add_effect_strip(struct wmOperatorType *ot); +void SEQUENCER_OT_scene_strip_add(struct wmOperatorType *ot); +void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot); +void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot); +void SEQUENCER_OT_image_strip_add(struct wmOperatorType *ot); +void SEQUENCER_OT_effect_strip_add(struct wmOperatorType *ot); /* RNA enums, just to be more readable */ enum { diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c index a159a4828da..b131061782a 100644 --- a/source/blender/editors/space_sequencer/sequencer_ops.c +++ b/source/blender/editors/space_sequencer/sequencer_ops.c @@ -73,7 +73,7 @@ void sequencer_operatortypes(void) WM_operatortype_append(SEQUENCER_OT_refresh_all); WM_operatortype_append(SEQUENCER_OT_duplicate_add); WM_operatortype_append(SEQUENCER_OT_delete); - WM_operatortype_append(SEQUENCER_OT_separate_images); + WM_operatortype_append(SEQUENCER_OT_images_separate); WM_operatortype_append(SEQUENCER_OT_meta_toggle); WM_operatortype_append(SEQUENCER_OT_meta_make); WM_operatortype_append(SEQUENCER_OT_meta_separate); @@ -94,11 +94,11 @@ void sequencer_operatortypes(void) WM_operatortype_append(SEQUENCER_OT_select_border); /* sequencer_add.c */ - WM_operatortype_append(SEQUENCER_OT_add_scene_strip); - WM_operatortype_append(SEQUENCER_OT_add_movie_strip); - WM_operatortype_append(SEQUENCER_OT_add_sound_strip); - WM_operatortype_append(SEQUENCER_OT_add_image_strip); - WM_operatortype_append(SEQUENCER_OT_add_effect_strip); + WM_operatortype_append(SEQUENCER_OT_scene_strip_add); + WM_operatortype_append(SEQUENCER_OT_movie_strip_add); + WM_operatortype_append(SEQUENCER_OT_sound_strip_add); + WM_operatortype_append(SEQUENCER_OT_image_strip_add); + WM_operatortype_append(SEQUENCER_OT_effect_strip_add); } @@ -129,7 +129,7 @@ void sequencer_keymap(wmWindowManager *wm) WM_keymap_add_item(keymap, "SEQUENCER_OT_delete", XKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_delete", DELKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "SEQUENCER_OT_separate_images", YKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "SEQUENCER_OT_images_separate", YKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_meta_toggle", TABKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/space_sound/sound_header.c b/source/blender/editors/space_sound/sound_header.c index 3eed96d14d7..ae3410663c2 100644 --- a/source/blender/editors/space_sound/sound_header.c +++ b/source/blender/editors/space_sound/sound_header.c @@ -71,7 +71,7 @@ static uiBlock *dummy_viewmenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "dummy_viewmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "dummy_viewmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_viewmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Nothing yet", 0, yco-=20, @@ -104,7 +104,7 @@ void sound_header_buttons(const bContext *C, ARegion *ar) uiBlock *block; int xco, yco= 3; - block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS, UI_HELV); + block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS); uiBlockSetHandleFunc(block, do_sound_buttons, NULL); xco= ED_area_header_standardbuttons(C, block, yco); @@ -112,9 +112,6 @@ void sound_header_buttons(const bContext *C, ARegion *ar) if((sa->flag & HEADER_NO_PULLDOWN)==0) { int xmax; - /* pull down menus */ - uiBlockSetEmboss(block, UI_EMBOSSP); - xmax= GetButStringLength("View"); uiDefPulldownBut(block, dummy_viewmenu, CTX_wm_area(C), "View", xco, yco-2, xmax-3, 24, ""); diff --git a/source/blender/editors/space_text/SConscript b/source/blender/editors/space_text/SConscript index 3d5ccc318e1..09ba961bfce 100644 --- a/source/blender/editors/space_text/SConscript +++ b/source/blender/editors/space_text/SConscript @@ -5,7 +5,7 @@ sources = env.Glob('*.c') defs = [] incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' -incs += ' #/intern/bmfont ../../python ../../makesrna ../../blenfont' +incs += ' ../../python ../../makesrna ../../blenfont' if not env['WITH_BF_PYTHON']: defs.append('DISABLE_PYTHON') diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c index 89852955ca3..384ad3e919c 100644 --- a/source/blender/editors/space_text/space_text.c +++ b/source/blender/editors/space_text/space_text.c @@ -127,13 +127,17 @@ static void text_listener(ScrArea *sa, wmNotifier *wmn) if(!wmn->reference || wmn->reference == st->text) { ED_area_tag_redraw(sa); - if(wmn->data == ND_CURSOR) { + if(wmn->data == ND_CURSOR || wmn->action == NA_EDITED) { ARegion *ar; for(ar=sa->regionbase.first; ar; ar= ar->next) if(ar->regiontype==RGN_TYPE_WINDOW) text_update_cursor_moved(st, ar); } + + if(wmn->action == NA_EDITED) + if(st->text) + text_update_edited(st->text); } else if(wmn->data == ND_DISPLAY) ED_area_tag_redraw(sa); @@ -147,6 +151,7 @@ static void text_operatortypes(void) WM_operatortype_append(TEXT_OT_new); WM_operatortype_append(TEXT_OT_open); WM_operatortype_append(TEXT_OT_reload); + WM_operatortype_append(TEXT_OT_unlink); WM_operatortype_append(TEXT_OT_save); WM_operatortype_append(TEXT_OT_save_as); WM_operatortype_append(TEXT_OT_make_internal); @@ -343,13 +348,12 @@ static void text_cursor(wmWindow *win, ScrArea *sa, ARegion *ar) /* add handlers, stuff you only do once or on area/region changes */ static void text_header_area_init(wmWindowManager *wm, ARegion *ar) { - UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy); - ar->v2d.flag &= ~(V2D_PIXELOFS_X|V2D_PIXELOFS_Y); // XXX temporary + ED_region_header_init(ar); } static void text_header_area_draw(const bContext *C, ARegion *ar) { - uiRegionHeaderLayout(C, ar); + ED_region_header(C, ar); } /****************** properties region ******************/ @@ -357,12 +361,12 @@ static void text_header_area_draw(const bContext *C, ARegion *ar) /* add handlers, stuff you only do once or on area/region changes */ static void text_properties_area_init(wmWindowManager *wm, ARegion *ar) { - UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_PANELS_UI, ar->winx, ar->winy); + ED_region_panels_init(wm, ar); } static void text_properties_area_draw(const bContext *C, ARegion *ar) { - uiRegionPanelLayout(C, ar, 1, NULL); + ED_region_panels(C, ar, 1, NULL); } /********************* registration ********************/ @@ -401,9 +405,6 @@ void ED_spacetype_text(void) art->init= text_properties_area_init; art->draw= text_properties_area_draw; - - text_properties_register(art); - BLI_addhead(&st->regiontypes, art); /* regions: header */ diff --git a/source/blender/editors/space_text/text_header.c b/source/blender/editors/space_text/text_header.c index 63e3bca1ad0..fe00b86e19f 100644 --- a/source/blender/editors/space_text/text_header.c +++ b/source/blender/editors/space_text/text_header.c @@ -56,6 +56,7 @@ #include "BKE_global.h" #include "BKE_library.h" #include "BKE_main.h" +#include "BKE_scene.h" #include "BKE_screen.h" #include "BKE_text.h" @@ -71,7 +72,6 @@ #include "UI_interface.h" #include "UI_resources.h" -#include "UI_text.h" #include "UI_view2d.h" #include "RNA_access.h" @@ -101,7 +101,7 @@ static uiBlock *text_template_scriptsmenu(bContext *C, void *args_unused) // int i= 0; // short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "text_template_scriptsmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "text_template_scriptsmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_text_template_scriptsmenu, NULL); /* note that we acount for the N previous entries with i+20: */ @@ -134,7 +134,7 @@ static uiBlock *text_plugin_scriptsmenu(bContext *C, void *args_unused) // int i= 0; // short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "text_plugin_scriptsmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "text_plugin_scriptsmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_text_plugin_scriptsmenu, NULL); /* note that we acount for the N previous entries with i+20: */ @@ -155,44 +155,46 @@ static uiBlock *text_plugin_scriptsmenu(bContext *C, void *args_unused) } #endif -static void text_editmenu_viewmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void text_editmenu_viewmenu(bContext *C, uiLayout *layout, void *arg_unused) { - uiMenuItemEnumO(head, "Top of File", 0, "TEXT_OT_move", "type", FILE_TOP); - uiMenuItemEnumO(head, "Bottom of File", 0, "TEXT_OT_move", "type", FILE_BOTTOM); + uiItemEnumO(layout, "Top of File", 0, "TEXT_OT_move", "type", FILE_TOP); + uiItemEnumO(layout, "Bottom of File", 0, "TEXT_OT_move", "type", FILE_BOTTOM); } -static void text_editmenu_selectmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void text_editmenu_selectmenu(bContext *C, uiLayout *layout, void *arg_unused) { - uiMenuItemO(head, 0, "TEXT_OT_select_all"); - uiMenuItemO(head, 0, "TEXT_OT_select_line"); + uiItemO(layout, NULL, 0, "TEXT_OT_select_all"); + uiItemO(layout, NULL, 0, "TEXT_OT_select_line"); } -static void text_editmenu_markermenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void text_editmenu_markermenu(bContext *C, uiLayout *layout, void *arg_unused) { - uiMenuItemO(head, 0, "TEXT_OT_markers_clear"); - uiMenuItemO(head, 0, "TEXT_OT_next_marker"); - uiMenuItemO(head, 0, "TEXT_OT_previous_marker"); + uiItemO(layout, NULL, 0, "TEXT_OT_markers_clear"); + uiItemO(layout, NULL, 0, "TEXT_OT_next_marker"); + uiItemO(layout, NULL, 0, "TEXT_OT_previous_marker"); } -static void text_formatmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void text_formatmenu(const bContext *C, Menu *menu) { - uiMenuItemO(head, 0, "TEXT_OT_indent"); - uiMenuItemO(head, 0, "TEXT_OT_unindent"); + uiLayout *layout= menu->layout; - uiMenuSeparator(head); + uiItemO(layout, NULL, 0, "TEXT_OT_indent"); + uiItemO(layout, NULL, 0, "TEXT_OT_unindent"); - uiMenuItemO(head, 0, "TEXT_OT_comment"); - uiMenuItemO(head, 0, "TEXT_OT_uncomment"); + uiItemS(layout); - uiMenuSeparator(head); + uiItemO(layout, NULL, 0, "TEXT_OT_comment"); + uiItemO(layout, NULL, 0, "TEXT_OT_uncomment"); - uiMenuLevelEnumO(head, "TEXT_OT_convert_whitespace", "type"); + uiItemS(layout); + + uiItemMenuEnumO(layout, NULL, 0, "TEXT_OT_convert_whitespace", "type"); } -static void text_editmenu_to3dmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void text_editmenu_to3dmenu(bContext *C, uiLayout *layout, void *arg_unused) { - uiMenuItemBooleanO(head, "One Object", 0, "TEXT_OT_to_3d_object", "split_lines", 0); - uiMenuItemBooleanO(head, "One Object Per Line", 0, "TEXT_OT_to_3d_object", "split_lines", 1); + uiItemBooleanO(layout, "One Object", 0, "TEXT_OT_to_3d_object", "split_lines", 0); + uiItemBooleanO(layout, "One Object Per Line", 0, "TEXT_OT_to_3d_object", "split_lines", 1); } static int text_menu_edit_poll(bContext *C) @@ -200,307 +202,56 @@ static int text_menu_edit_poll(bContext *C) return (CTX_data_edit_text(C) != NULL); } -static void text_editmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void text_editmenu(const bContext *C, Menu *menu) { - uiMenuItemO(head, 0, "ED_OT_undo"); - uiMenuItemO(head, 0, "ED_OT_redo"); - - uiMenuSeparator(head); - - uiMenuItemO(head, 0, "TEXT_OT_cut"); - uiMenuItemO(head, 0, "TEXT_OT_copy"); - uiMenuItemO(head, 0, "TEXT_OT_paste"); - - uiMenuSeparator(head); - - uiMenuLevel(head, "View", text_editmenu_viewmenu); - uiMenuLevel(head, "Select", text_editmenu_selectmenu); - uiMenuLevel(head, "Markers", text_editmenu_markermenu); + uiLayout *layout= menu->layout; - uiMenuSeparator(head); + uiItemO(layout, NULL, 0, "ED_OT_undo"); + uiItemO(layout, NULL, 0, "ED_OT_redo"); - uiMenuItemO(head, 0, "TEXT_OT_jump"); - uiMenuItemO(head, 0, "TEXT_OT_properties"); + uiItemS(layout); - uiMenuSeparator(head); + uiItemO(layout, NULL, 0, "TEXT_OT_cut"); + uiItemO(layout, NULL, 0, "TEXT_OT_copy"); + uiItemO(layout, NULL, 0, "TEXT_OT_paste"); - uiMenuLevel(head, "Text to 3D Object", text_editmenu_to3dmenu); -} - -static void text_filemenu(bContext *C, uiMenuItem *head, void *arg_unused) -{ - SpaceText *st= (SpaceText*)CTX_wm_space_data(C); - Text *text= st->text; + uiItemS(layout); - uiMenuItemO(head, 0, "TEXT_OT_new"); - uiMenuItemO(head, 0, "TEXT_OT_open"); - - if(text) { - uiMenuItemO(head, 0, "TEXT_OT_reload"); - - uiMenuSeparator(head); - - uiMenuItemO(head, 0, "TEXT_OT_save"); - uiMenuItemO(head, 0, "TEXT_OT_save_as"); - - if(text->name) - uiMenuItemO(head, 0, "TEXT_OT_make_internal"); - - uiMenuSeparator(head); - - uiMenuItemO(head, 0, "TEXT_OT_run_script"); - -#ifndef DISABLE_PYTHON - if(BPY_is_pyconstraint(text)) - uiMenuItemO(head, 0, "TEXT_OT_refresh_pyconstraints"); -#endif - } + uiItemMenuF(layout, "View", 0, text_editmenu_viewmenu); + uiItemMenuF(layout, "Select", 0, text_editmenu_selectmenu); + uiItemMenuF(layout, "Markers", 0, text_editmenu_markermenu); -#ifndef DISABLE_PYTHON - // XXX uiMenuSeparator(head); - - // XXX uiDefIconTextBlockBut(block, text_template_scriptsmenu, NULL, ICON_RIGHTARROW_THIN, "Script Templates", 0, yco-=20, 120, 19, ""); - // XXX uiDefIconTextBlockBut(block, text_plugin_scriptsmenu, NULL, ICON_RIGHTARROW_THIN, "Text Plugins", 0, yco-=20, 120, 19, ""); -#endif -} - -/*********************** datablock browse *************************/ - -static void text_unlink(Main *bmain, Text *text) -{ - bScreen *scr; - ScrArea *area; - SpaceLink *sl; - - /* XXX this ifdef is in fact dangerous, if python is - * disabled it will leave invalid pointers in files! */ - -#ifndef DISABLE_PYTHON - // XXX BPY_clear_bad_scriptlinks(text); - // XXX BPY_free_pyconstraint_links(text); - // XXX free_text_controllers(text); - - /* check if this text was used as script link: - * this check function unsets the pointers and returns how many - * script links used this Text */ - if(0) // XXX BPY_text_check_all_scriptlinks (text)) - ; // XXX notifier: allqueue(REDRAWBUTSSCRIPT, 0); - - /* equivalently for pynodes: */ - if(0) // XXX nodeDynamicUnlinkText ((ID*)text)) - ; // XXX notifier: allqueue(REDRAWNODE, 0); -#endif - - for(scr= bmain->screen.first; scr; scr= scr->id.next) { - for(area= scr->areabase.first; area; area= area->next) { - for(sl= area->spacedata.first; sl; sl= sl->next) { - if(sl->spacetype==SPACE_TEXT) { - SpaceText *st= (SpaceText*) sl; - - if(st->text==text) { - st->text= NULL; - st->top= 0; - - if(st==area->spacedata.first) - ED_area_tag_redraw(area); - } - } - } - } - } - - free_libblock(&bmain->text, text); -} - -static void text_idpoin_handle(bContext *C, ID *id, int event) -{ - SpaceText *st= (SpaceText*)CTX_wm_space_data(C); - Text *text; + uiItemS(layout); - switch(event) { - case UI_ID_BROWSE: - st->text= (Text*)id; - st->top= 0; + uiItemO(layout, NULL, 0, "TEXT_OT_jump"); + uiItemO(layout, NULL, 0, "TEXT_OT_properties"); - text_update_edited(st->text); - WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, st->text); + uiItemS(layout); - ED_undo_push(C, "Browse Text"); - break; - case UI_ID_DELETE: - text= st->text; - - /* make the previous text active, if its not there make the next text active */ - if(text->id.prev) { - st->text = text->id.prev; - WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, st->text); - } - else if(text->id.next) { - st->text = text->id.next; - WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, st->text); - } - - text_unlink(CTX_data_main(C), text); - WM_event_add_notifier(C, NC_TEXT|NA_REMOVED, text); - - ED_undo_push(C, "Delete Text"); - break; - case UI_ID_RENAME: - break; - case UI_ID_ADD_NEW: - WM_operator_name_call(C, "TEXT_OT_new", WM_OP_INVOKE_REGION_WIN, NULL); - break; - case UI_ID_OPEN: - WM_operator_name_call(C, "TEXT_OT_open", WM_OP_INVOKE_REGION_WIN, NULL); - break; - } + uiItemMenuF(layout, "Text to 3D Object", 0, text_editmenu_to3dmenu); } /********************** header buttons ***********************/ -static void text_header_draw(const bContext *C, uiLayout *layout) -{ - bScreen *sc= CTX_wm_screen(C); - SpaceText *st= (SpaceText*)CTX_wm_space_data(C); - PointerRNA spaceptr; - Text *text= st->text; - - RNA_pointer_create(&sc->id, &RNA_SpaceTextEditor, st, &spaceptr); - - uiTemplateHeaderMenus(layout); - uiItemMenu(layout, UI_TSLOT_HEADER, "Text", 0, text_filemenu); - if(text) { - uiItemMenu(layout, UI_TSLOT_HEADER, "Edit", 0, text_editmenu); - uiItemMenu(layout, UI_TSLOT_HEADER, "Format", 0, text_formatmenu); - } - - /* warning button if text is out of date */ - if(text && text_file_modified(text)) { - uiTemplateHeaderButtons(layout); - uiTemplateSetColor(layout, TH_REDALERT); - uiItemO(layout, UI_TSLOT_HEADER, "", ICON_HELP, "TEXT_OT_resolve_conflict"); - } - - uiTemplateHeaderButtons(layout); - uiItemR(layout, UI_TSLOT_HEADER, "", ICON_LINENUMBERS_OFF, &spaceptr, "line_numbers"); - uiItemR(layout, UI_TSLOT_HEADER, "", ICON_WORDWRAP_OFF, &spaceptr, "word_wrap"); - uiItemR(layout, UI_TSLOT_HEADER, "", ICON_SYNTAX_OFF, &spaceptr, "syntax_highlight"); - // XXX uiItemR(layout, "", ICON_SCRIPTPLUGINS, &spaceptr, "do_python_plugins"); - - uiTemplateHeaderID(layout, &spaceptr, "text", - UI_ID_BROWSE|UI_ID_RENAME|UI_ID_ADD_NEW|UI_ID_OPEN|UI_ID_DELETE, - text_idpoin_handle); - - /* file info */ - if(text) { - char fname[HEADER_PATH_MAX]; - static char headtxt[HEADER_PATH_MAX+17]; - int len; - - if(text->name) { - len = strlen(text->name); - if(len > HEADER_PATH_MAX-1) - len = HEADER_PATH_MAX-1; - strncpy(fname, text->name, len); - fname[len]='\0'; - if(text->flags & TXT_ISDIRTY) - sprintf(headtxt, "File: *%s (unsaved)", fname); - else - sprintf(headtxt, "File: %s", fname); - } - else - sprintf(headtxt, text->id.lib? "Text: External": "Text: Internal"); - - uiTemplateHeaderButtons(layout); - uiItemLabel(layout, UI_TSLOT_HEADER, headtxt, 0); - } -} - void text_header_register(ARegionType *art) { - HeaderType *ht; - - /* header */ - ht= MEM_callocN(sizeof(HeaderType), "spacetype text header"); - ht->idname= "TEXT_HT_header"; - ht->name= "Header"; - ht->draw= text_header_draw; - BLI_addhead(&art->headertypes, ht); + MenuType *mt; + + mt= MEM_callocN(sizeof(MenuType), "spacetype text menu edit"); + strcpy(mt->idname, "TEXT_MT_edit"); + strcpy(mt->label, "Edit"); + mt->draw= text_editmenu; + BLI_addhead(&art->menutypes, mt); + + mt= MEM_callocN(sizeof(MenuType), "spacetype text menu format"); + strcpy(mt->idname, "TEXT_MT_format"); + strcpy(mt->label, "Format"); + mt->draw= text_formatmenu; + BLI_addhead(&art->menutypes, mt); } /************************** properties ******************************/ -static void text_properties_panel_draw(const bContext *C, Panel *panel) -{ - bScreen *sc= CTX_wm_screen(C); - SpaceText *st= CTX_wm_space_text(C); - uiLayout *layout= panel->layout; - PointerRNA spaceptr; - - RNA_pointer_create(&sc->id, &RNA_SpaceTextEditor, st, &spaceptr); - - uiTemplateColumn(layout); - uiItemR(layout, UI_TSLOT_COLUMN_1, NULL, ICON_LINENUMBERS_OFF, &spaceptr, "line_numbers"); - uiItemR(layout, UI_TSLOT_COLUMN_1, NULL, ICON_WORDWRAP_OFF, &spaceptr, "word_wrap"); - uiItemR(layout, UI_TSLOT_COLUMN_1, NULL, ICON_SYNTAX_OFF, &spaceptr, "syntax_highlight"); - - uiTemplateColumn(layout); - uiItemR(layout, UI_TSLOT_COLUMN_1, NULL, 0, &spaceptr, "font_size"); - uiItemR(layout, UI_TSLOT_COLUMN_1, NULL, 0, &spaceptr, "tab_width"); -} - -static void text_find_panel_draw(const bContext *C, Panel *panel) -{ - bScreen *sc= CTX_wm_screen(C); - SpaceText *st= CTX_wm_space_text(C); - uiLayout *layout= panel->layout; - PointerRNA spaceptr; - - RNA_pointer_create(&sc->id, &RNA_SpaceTextEditor, st, &spaceptr); - - /* find */ - uiTemplateLeftRight(layout); - uiItemR(layout, UI_TSLOT_LR_LEFT, "", 0, &spaceptr, "find_text"); - uiItemO(layout, UI_TSLOT_LR_RIGHT, "", ICON_TEXT, "TEXT_OT_find_set_selected"); - uiTemplateColumn(layout); - uiItemO(layout, UI_TSLOT_COLUMN_1, NULL, 0, "TEXT_OT_find"); - - /* replace */ - uiTemplateLeftRight(layout); - uiItemR(layout, UI_TSLOT_LR_LEFT, "", 0, &spaceptr, "replace_text"); - uiItemO(layout, UI_TSLOT_LR_RIGHT, "", ICON_TEXT, "TEXT_OT_replace_set_selected"); - uiTemplateColumn(layout); - uiItemO(layout, UI_TSLOT_COLUMN_1, NULL, 0, "TEXT_OT_replace"); - - /* mark */ - uiTemplateColumn(layout); - uiItemO(layout, UI_TSLOT_COLUMN_1, NULL, 0, "TEXT_OT_mark_all"); - - /* settings */ - uiTemplateColumn(layout); - uiItemR(layout, UI_TSLOT_COLUMN_1, "Wrap", 0, &spaceptr, "find_wrap"); - uiItemR(layout, UI_TSLOT_COLUMN_2, "All", 0, &spaceptr, "find_all"); -} - -void text_properties_register(ARegionType *art) -{ - PanelType *pt; - - /* panels: properties */ - pt= MEM_callocN(sizeof(PanelType), "spacetype text panel"); - pt->idname= "TEXT_PT_properties"; - pt->name= "Properties"; - pt->draw= text_properties_panel_draw; - BLI_addtail(&art->paneltypes, pt); - - /* panels: find */ - pt= MEM_callocN(sizeof(PanelType), "spacetype text panel"); - pt->idname= "TEXT_PT_find"; - pt->name= "Find"; - pt->draw= text_find_panel_draw; - BLI_addtail(&art->paneltypes, pt); -} - ARegion *text_has_properties_region(ScrArea *sa) { ARegion *ar, *arnew; @@ -569,75 +320,75 @@ void TEXT_OT_properties(wmOperatorType *ot) { // RMB - uiMenuItem *head; + uiPopupMenu *pup; if(text) { - head= uiPupMenuBegin("Text", 0); + pup= uiPupMenuBegin(C, "Text", 0); if(txt_has_sel(text)) { - uiMenuItemO(head, 0, "TEXT_OT_cut"); - uiMenuItemO(head, 0, "TEXT_OT_copy"); + uiItemO(layout, NULL, 0, "TEXT_OT_cut"); + uiItemO(layout, NULL, 0, "TEXT_OT_copy"); } - uiMenuItemO(head, 0, "TEXT_OT_paste"); - uiMenuItemO(head, 0, "TEXT_OT_new"); - uiMenuItemO(head, 0, "TEXT_OT_open"); - uiMenuItemO(head, 0, "TEXT_OT_save"); - uiMenuItemO(head, 0, "TEXT_OT_save_as"); - uiMenuItemO(head, 0, "TEXT_OT_run_script"); - uiPupMenuEnd(C, head); + uiItemO(layout, NULL, 0, "TEXT_OT_paste"); + uiItemO(layout, NULL, 0, "TEXT_OT_new"); + uiItemO(layout, NULL, 0, "TEXT_OT_open"); + uiItemO(layout, NULL, 0, "TEXT_OT_save"); + uiItemO(layout, NULL, 0, "TEXT_OT_save_as"); + uiItemO(layout, NULL, 0, "TEXT_OT_run_script"); + uiPupMenuEnd(C, pup); } else { - head= uiPupMenuBegin("File", 0); - uiMenuItemO(head, 0, "TEXT_OT_new"); - uiMenuItemO(head, 0, "TEXT_OT_open"); - uiPupMenuEnd(C, head); + pup= uiPupMenuBegin(C, "File", 0); + uiItemO(layout, NULL, 0, "TEXT_OT_new"); + uiItemO(layout, NULL, 0, "TEXT_OT_open"); + uiPupMenuEnd(C, pup); } } { // Alt+Shift+E - uiMenuItem *head; + uiPopupMenu *pup; - head= uiPupMenuBegin("Edit", 0); - uiMenuItemO(head, 0, "TEXT_OT_cut"); - uiMenuItemO(head, 0, "TEXT_OT_copy"); - uiMenuItemO(head, 0, "TEXT_OT_paste"); - uiPupMenuEnd(C, head); + pup= uiPupMenuBegin(C, "Edit", 0); + uiItemO(layout, NULL, 0, "TEXT_OT_cut"); + uiItemO(layout, NULL, 0, "TEXT_OT_copy"); + uiItemO(layout, NULL, 0, "TEXT_OT_paste"); + uiPupMenuEnd(C, pup); } { // Alt+Shift+F - uiMenuItem *head; + uiPopupMenu *pup; if(text) { - head= uiPupMenuBegin("Text", 0); - uiMenuItemO(head, 0, "TEXT_OT_new"); - uiMenuItemO(head, 0, "TEXT_OT_open"); - uiMenuItemO(head, 0, "TEXT_OT_save"); - uiMenuItemO(head, 0, "TEXT_OT_save_as"); - uiMenuItemO(head, 0, "TEXT_OT_run_script"); - uiPupMenuEnd(C, head); + pup= uiPupMenuBegin(C, "Text", 0); + uiItemO(layout, NULL, 0, "TEXT_OT_new"); + uiItemO(layout, NULL, 0, "TEXT_OT_open"); + uiItemO(layout, NULL, 0, "TEXT_OT_save"); + uiItemO(layout, NULL, 0, "TEXT_OT_save_as"); + uiItemO(layout, NULL, 0, "TEXT_OT_run_script"); + uiPupMenuEnd(C, pup); } else { - head= uiPupMenuBegin("File", 0); - uiMenuItemO(head, 0, "TEXT_OT_new"); - uiMenuItemO(head, 0, "TEXT_OT_open"); - uiPupMenuEnd(C, head); + pup= uiPupMenuBegin(C, "File", 0); + uiItemO(layout, NULL, 0, "TEXT_OT_new"); + uiItemO(layout, NULL, 0, "TEXT_OT_open"); + uiPupMenuEnd(C, pup); } } { // Alt+Shift+V - uiMenuItem *head; + uiPopupMenu *pup; - head= uiPupMenuBegin("Text", 0); - uiMenuItemEnumO(head, "Top of File", 0, "TEXT_OT_move", "type", FILE_TOP); - uiMenuItemEnumO(head, "Bottom of File", 0, "TEXT_OT_move", "type", FILE_BOTTOM); - uiMenuItemEnumO(head, "Page Up", 0, "TEXT_OT_move", "type", PREV_PAGE); - uiMenuItemEnumO(head, "Page Down", 0, "TEXT_OT_move", "type", NEXT_PAGE); - uiPupMenuEnd(C, head); + pup= uiPupMenuBegin(C, "Text", 0); + uiItemEnumO(layout, "Top of File", 0, "TEXT_OT_move", "type", FILE_TOP); + uiItemEnumO(layout, "Bottom of File", 0, "TEXT_OT_move", "type", FILE_BOTTOM); + uiItemEnumO(layout, "Page Up", 0, "TEXT_OT_move", "type", PREV_PAGE); + uiItemEnumO(layout, "Page Down", 0, "TEXT_OT_move", "type", NEXT_PAGE); + uiPupMenuEnd(C, pup); } #endif diff --git a/source/blender/editors/space_text/text_intern.h b/source/blender/editors/space_text/text_intern.h index 7ec75e292ce..259811aee0f 100644 --- a/source/blender/editors/space_text/text_intern.h +++ b/source/blender/editors/space_text/text_intern.h @@ -33,7 +33,6 @@ struct ARegion; struct ARegionType; struct bContext; -struct BMF_Font; struct ReportList; struct ScrArea; struct SpaceText; @@ -43,7 +42,6 @@ struct wmOperatorType; struct wmWindowManager; /* text_header.c */ -void text_properties_register(struct ARegionType *art); void text_header_register(struct ARegionType *art); /* text_draw.c */ @@ -106,6 +104,7 @@ enum { DEL_NEXT_CHAR, DEL_PREV_CHAR, DEL_NEXT_WORD, DEL_PREV_WORD }; void TEXT_OT_new(struct wmOperatorType *ot); void TEXT_OT_open(struct wmOperatorType *ot); void TEXT_OT_reload(struct wmOperatorType *ot); +void TEXT_OT_unlink(struct wmOperatorType *ot); void TEXT_OT_save(struct wmOperatorType *ot); void TEXT_OT_save_as(struct wmOperatorType *ot); void TEXT_OT_make_internal(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index c7fe02975ef..5f974e7bcbb 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -49,6 +49,7 @@ #include "BKE_context.h" #include "BKE_depsgraph.h" #include "BKE_global.h" +#include "BKE_library.h" #include "BKE_main.h" #include "BKE_report.h" #include "BKE_suggestions.h" @@ -269,6 +270,90 @@ void TEXT_OT_reload(wmOperatorType *ot) ot->poll= text_edit_poll; } +/******************* delete operator *********************/ + +static void text_unlink(Main *bmain, Text *text) +{ + bScreen *scr; + ScrArea *area; + SpaceLink *sl; + + /* XXX this ifdef is in fact dangerous, if python is + * disabled it will leave invalid pointers in files! */ + +#ifndef DISABLE_PYTHON + // XXX BPY_clear_bad_scriptlinks(text); + // XXX BPY_free_pyconstraint_links(text); + // XXX free_text_controllers(text); + // XXX free_dome_warp_text(text); + + /* check if this text was used as script link: + * this check function unsets the pointers and returns how many + * script links used this Text */ + if(0) // XXX BPY_text_check_all_scriptlinks (text)) + ; // XXX notifier: allqueue(REDRAWBUTSSCRIPT, 0); + + /* equivalently for pynodes: */ + if(0) // XXX nodeDynamicUnlinkText ((ID*)text)) + ; // XXX notifier: allqueue(REDRAWNODE, 0); +#endif + + for(scr= bmain->screen.first; scr; scr= scr->id.next) { + for(area= scr->areabase.first; area; area= area->next) { + for(sl= area->spacedata.first; sl; sl= sl->next) { + if(sl->spacetype==SPACE_TEXT) { + SpaceText *st= (SpaceText*) sl; + + if(st->text==text) { + st->text= NULL; + st->top= 0; + + if(st==area->spacedata.first) + ED_area_tag_redraw(area); + } + } + } + } + } + + free_libblock(&bmain->text, text); +} + +static int unlink_exec(bContext *C, wmOperator *op) +{ + SpaceText *st= CTX_wm_space_text(C); + Text *text= CTX_data_edit_text(C); + + /* make the previous text active, if its not there make the next text active */ + if(st) { + if(text->id.prev) { + st->text = text->id.prev; + WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, st->text); + } + else if(text->id.next) { + st->text = text->id.next; + WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, st->text); + } + } + + text_unlink(CTX_data_main(C), text); + WM_event_add_notifier(C, NC_TEXT|NA_REMOVED, text); + + return OPERATOR_FINISHED; +} + +void TEXT_OT_unlink(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Unlink"; + ot->idname= "TEXT_OT_unlink"; + + /* api callbacks */ + ot->exec= unlink_exec; + ot->invoke= WM_operator_confirm; + ot->poll= text_edit_poll; +} + /******************* make internal operator *********************/ static int make_internal_exec(bContext *C, wmOperator *op) @@ -2448,31 +2533,35 @@ static int resolve_conflict_exec(bContext *C, wmOperator *op) static int resolve_conflict_invoke(bContext *C, wmOperator *op, wmEvent *event) { Text *text= CTX_data_edit_text(C); - uiMenuItem *head; + uiPopupMenu *pup; + uiLayout *layout; switch(text_file_modified(text)) { case 1: if(text->flags & TXT_ISDIRTY) { /* modified locally and externally, ahhh. offer more possibilites. */ - head= uiPupMenuBegin("File Modified Outside and Inside Blender", 0); - uiMenuItemEnumO(head, "Reload from disk (ignore local changes)", 0, op->type->idname, "resolution", RESOLVE_RELOAD); - uiMenuItemEnumO(head, "Save to disk (ignore outside changes)", 0, op->type->idname, "resolution", RESOLVE_SAVE); - uiMenuItemEnumO(head, "Make text internal (separate copy)", 0, op->type->idname, "resolution", RESOLVE_MAKE_INTERNAL); - uiPupMenuEnd(C, head); + pup= uiPupMenuBegin(C, "File Modified Outside and Inside Blender", 0); + layout= uiPupMenuLayout(pup); + uiItemEnumO(layout, "Reload from disk (ignore local changes)", 0, op->type->idname, "resolution", RESOLVE_RELOAD); + uiItemEnumO(layout, "Save to disk (ignore outside changes)", 0, op->type->idname, "resolution", RESOLVE_SAVE); + uiItemEnumO(layout, "Make text internal (separate copy)", 0, op->type->idname, "resolution", RESOLVE_MAKE_INTERNAL); + uiPupMenuEnd(C, pup); } else { - head= uiPupMenuBegin("File Modified Outside Blender", 0); - uiMenuItemEnumO(head, "Reload from disk", 0, op->type->idname, "resolution", RESOLVE_RELOAD); - uiMenuItemEnumO(head, "Make text internal (separate copy)", 0, op->type->idname, "resolution", RESOLVE_MAKE_INTERNAL); - uiMenuItemEnumO(head, "Ignore", 0, op->type->idname, "resolution", RESOLVE_IGNORE); - uiPupMenuEnd(C, head); + pup= uiPupMenuBegin(C, "File Modified Outside Blender", 0); + layout= uiPupMenuLayout(pup); + uiItemEnumO(layout, "Reload from disk", 0, op->type->idname, "resolution", RESOLVE_RELOAD); + uiItemEnumO(layout, "Make text internal (separate copy)", 0, op->type->idname, "resolution", RESOLVE_MAKE_INTERNAL); + uiItemEnumO(layout, "Ignore", 0, op->type->idname, "resolution", RESOLVE_IGNORE); + uiPupMenuEnd(C, pup); } break; case 2: - head= uiPupMenuBegin("File Deleted Outside Blender", 0); - uiMenuItemEnumO(head, "Make text internal", 0, op->type->idname, "resolution", RESOLVE_MAKE_INTERNAL); - uiMenuItemEnumO(head, "Recreate file", 0, op->type->idname, "resolution", RESOLVE_SAVE); - uiPupMenuEnd(C, head); + pup= uiPupMenuBegin(C, "File Deleted Outside Blender", 0); + layout= uiPupMenuLayout(pup); + uiItemEnumO(layout, "Make text internal", 0, op->type->idname, "resolution", RESOLVE_MAKE_INTERNAL); + uiItemEnumO(layout, "Recreate file", 0, op->type->idname, "resolution", RESOLVE_SAVE); + uiPupMenuEnd(C, pup); break; } diff --git a/source/blender/editors/space_time/time_header.c b/source/blender/editors/space_time/time_header.c index 7c5c25a78a9..f26e632eb87 100644 --- a/source/blender/editors/space_time/time_header.c +++ b/source/blender/editors/space_time/time_header.c @@ -95,7 +95,7 @@ static uiBlock *time_redrawmenu(bContext *C, ARegion *ar, void *arg_unused) short yco= 0, menuwidth=120, icon; char str[32]; - block= uiBeginBlock(C, ar, "header time_redrawmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "header time_redrawmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_time_redrawmenu, NULL); if(stime->redraws & TIME_LEFTMOST_3D_WIN) icon= ICON_CHECKBOX_HLT; @@ -215,7 +215,7 @@ static uiBlock *time_viewmenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "time_viewmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "time_viewmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_time_viewmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Play Back Animation", 0, yco-=20, @@ -301,7 +301,7 @@ static uiBlock *time_framemenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "time_framemenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "time_framemenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_time_framemenu, NULL); uiDefIconTextButO(block, BUTM, "MARKER_OT_add", WM_OP_EXEC_REGION_WIN, ICON_BLANK1, "Add Marker", @@ -432,7 +432,7 @@ void time_header_buttons(const bContext *C, ARegion *ar) int xco, yco= 3; char *menustr= NULL; - block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS, UI_HELV); + block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS); uiBlockSetHandleFunc(block, do_time_buttons, NULL); xco= ED_area_header_standardbuttons(C, block, yco); @@ -440,21 +440,18 @@ void time_header_buttons(const bContext *C, ARegion *ar) if((sa->flag & HEADER_NO_PULLDOWN)==0) { int xmax; - /* pull down menus */ - uiBlockSetEmboss(block, UI_EMBOSSP); - xmax= GetButStringLength("View"); uiDefPulldownBut(block, time_viewmenu, sa, - "View", xco, yco-2, xmax-3, 24, ""); + "View", xco, yco, xmax-3, 20, ""); xco+= xmax; xmax= GetButStringLength("Frame"); uiDefPulldownBut(block, time_framemenu, sa, - "Frame", xco, yco-2, xmax-3, 24, ""); + "Frame", xco, yco, xmax-3, 20, ""); xco+= xmax; xmax= GetButStringLength("Playback"); uiDefPulldownBut(block, time_redrawmenu, sa, - "Playback", xco, yco-2, xmax-3, 24, ""); + "Playback", xco, yco, xmax-3, 20, ""); xco+= xmax; } diff --git a/source/blender/editors/space_view3d/Makefile b/source/blender/editors/space_view3d/Makefile index 442ab502e65..dd4eab89411 100644 --- a/source/blender/editors/space_view3d/Makefile +++ b/source/blender/editors/space_view3d/Makefile @@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS) CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(OPENGL_HEADERS) -CPPFLAGS += -I$(NAN_BMFONT)/include # not very neat.... CPPFLAGS += -I../../windowmanager @@ -51,6 +50,7 @@ CPPFLAGS += -I../../python CPPFLAGS += -I../../gpu CPPFLAGS += -I../../makesrna CPPFLAGS += -I../../render/extern/include +CPPFLAGS += -I../../blenfont CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include # own include diff --git a/source/blender/editors/space_view3d/SConscript b/source/blender/editors/space_view3d/SConscript index 83d0d136566..c4ca73cffbd 100644 --- a/source/blender/editors/space_view3d/SConscript +++ b/source/blender/editors/space_view3d/SConscript @@ -5,7 +5,7 @@ sources = env.Glob('*.c') incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' -incs += ' ../../render/extern/include #/intern/guardedalloc #intern/bmfont' -incs += ' ../../gpu ../../makesrna ../../bmesh' +incs += ' ../../render/extern/include #/intern/guardedalloc' +incs += ' ../../gpu ../../makesrna ../../blenfont ../../bmesh ' env.BlenderLib ( 'bf_editors_space_view3d', sources, Split(incs), [], libtype=['core'], priority=[40] ) diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index 5d130cee48d..68a9bf3f555 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -37,8 +37,6 @@ #include "MEM_guardedalloc.h" -#include "BMF_Api.h" - #include "DNA_action_types.h" #include "DNA_armature_types.h" #include "DNA_constraint_types.h" @@ -74,6 +72,7 @@ #include "WM_api.h" #include "WM_types.h" +#include "BLF_api.h" #include "UI_resources.h" @@ -1806,9 +1805,7 @@ static void draw_pose_channels(Scene *scene, View3D *v3d, RegionView3D *rv3d, Ba /* Draw names of bone */ if (arm->flag & ARM_DRAWNAMES) { VecMidf(vec, pchan->pose_head, pchan->pose_tail); - glRasterPos3fv(vec); - BMF_DrawString(G.font, " "); - BMF_DrawString(G.font, pchan->name); + view3d_object_text_draw_add(vec[0], vec[1], vec[2], pchan->name, 10); } /* Draw additional axes on the bone tail */ @@ -1993,8 +1990,7 @@ static void draw_ebones(View3D *v3d, RegionView3D *rv3d, Object *ob, int dt) if (arm->flag & ARM_DRAWNAMES) { VecMidf(vec, eBone->head, eBone->tail); glRasterPos3fv(vec); - BMF_DrawString(G.font, " "); - BMF_DrawString(G.font, eBone->name); + view3d_object_text_draw_add(vec[0], vec[1], vec[2], eBone->name, 10); } /* Draw additional axes */ if (arm->flag & ARM_DRAWAXES) { @@ -2155,15 +2151,13 @@ static void draw_pose_paths(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec /* only draw framenum if several consecutive highlighted points don't occur on same point */ if (a == 0) { - glRasterPos3fv(fp); sprintf(str, " %d\n", (a+sfra)); - BMF_DrawString(G.font, str); + view3d_object_text_draw_add(fp[0], fp[1], fp[2], str, 0); } else if ((a > stepsize) && (a < len-stepsize)) { if ((VecEqual(fp, fp-(stepsize*3))==0) || (VecEqual(fp, fp+(stepsize*3))==0)) { - glRasterPos3fv(fp); sprintf(str, " %d\n", (a+sfra)); - BMF_DrawString(G.font, str); + view3d_object_text_draw_add(fp[0], fp[1], fp[2], str, 0); } } } @@ -2205,9 +2199,8 @@ static void draw_pose_paths(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec if (ak->cfra == (a+sfra)) { char str[32]; - glRasterPos3fv(fp); sprintf(str, " %d\n", (a+sfra)); - BMF_DrawString(G.font, str); + view3d_object_text_draw_add(fp[0], fp[1], fp[2], str, 0); } } } diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index c22d159b405..12e20728c62 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -34,8 +34,6 @@ #include "MEM_guardedalloc.h" -#include "BMF_Api.h" - #include "IMB_imbuf.h" @@ -99,8 +97,9 @@ #include "GPU_material.h" #include "GPU_extensions.h" -#include "ED_particle.h" #include "ED_mesh.h" +#include "ED_particle.h" +#include "ED_screen.h" #include "ED_types.h" #include "ED_util.h" @@ -108,6 +107,7 @@ #include "UI_interface_icons.h" #include "WM_api.h" +#include "BLF_api.h" #include "view3d_intern.h" // own include @@ -135,6 +135,74 @@ static void drawcircle_size(float size); static void draw_empty_sphere(float size); static void draw_empty_cone(float size); + +/* ************* only use while object drawing ************** */ +static void view3d_project_short_clip(ARegion *ar, float *vec, short *adr) +{ + RegionView3D *rv3d= ar->regiondata; + float fx, fy, vec4[4]; + + adr[0]= IS_CLIPPED; + + /* clipplanes in eye space */ + if(rv3d->rflag & RV3D_CLIPPING) { + VECCOPY(vec4, vec); + Mat4MulVecfl(rv3d->viewmatob, vec4); + if(view3d_test_clipping(rv3d, vec4)) + return; + } + + VECCOPY(vec4, vec); + vec4[3]= 1.0; + + Mat4MulVec4fl(rv3d->persmatob, vec4); + + /* clipplanes in window space */ + if( vec4[3]>BL_NEAR_CLIP ) { /* is the NEAR clipping cutoff for picking */ + fx= (ar->winx/2)*(1 + vec4[0]/vec4[3]); + + if( fx>0 && fx<ar->winx) { + + fy= (ar->winy/2)*(1 + vec4[1]/vec4[3]); + + if(fy>0.0 && fy< (float)ar->winy) { + adr[0]= (short)floor(fx); + adr[1]= (short)floor(fy); + } + } + } +} + +/* only use while object drawing */ +static void view3d_project_short_noclip(ARegion *ar, float *vec, short *adr) +{ + RegionView3D *rv3d= ar->regiondata; + float fx, fy, vec4[4]; + + adr[0]= IS_CLIPPED; + + VECCOPY(vec4, vec); + vec4[3]= 1.0; + + Mat4MulVec4fl(rv3d->persmatob, vec4); + + if( vec4[3]>BL_NEAR_CLIP ) { /* is the NEAR clipping cutoff for picking */ + fx= (ar->winx/2)*(1 + vec4[0]/vec4[3]); + + if( fx>-32700 && fx<32700) { + + fy= (ar->winy/2)*(1 + vec4[1]/vec4[3]); + + if(fy>-32700.0 && fy<32700.0) { + adr[0]= (short)floor(fx); + adr[1]= (short)floor(fy); + } + } + } +} + +/* ************************ */ + /* check for glsl drawing */ int draw_glsl_material(Scene *scene, Object *ob, View3D *v3d, int dt) @@ -362,16 +430,15 @@ void drawaxes(float size, int flag, char drawtype) glEnd(); v2[axis]+= size*0.125; - glRasterPos3fv(v2); // patch for 3d cards crashing on glSelect for text drawing (IBM) if((flag & DRAW_PICKING) == 0) { if (axis==0) - BMF_DrawString(G.font, "x"); + view3d_object_text_draw_add(v2[0], v2[1], v2[2], "x", 0); else if (axis==1) - BMF_DrawString(G.font, "y"); + view3d_object_text_draw_add(v2[0], v2[1], v2[2], "y", 0); else - BMF_DrawString(G.font, "z"); + view3d_object_text_draw_add(v2[0], v2[1], v2[2], "z", 0); } } break; @@ -429,6 +496,75 @@ static void drawcentercircle(View3D *v3d, RegionView3D *rv3d, float *vec, int se if(v3d->zbuf) glDepthFunc(GL_LEQUAL); } +/* *********** text drawing for object ************* */ +static ListBase strings= {NULL, NULL}; + +typedef struct ViewObjectString { + struct ViewObjectString *next, *prev; + float vec[3], col[4]; + char str[128]; + short mval[2]; + short xoffs; +} ViewObjectString; + + +void view3d_object_text_draw_add(float x, float y, float z, char *str, short xoffs) +{ + ViewObjectString *vos= MEM_callocN(sizeof(ViewObjectString), "ViewObjectString"); + + BLI_addtail(&strings, vos); + BLI_strncpy(vos->str, str, 128); + vos->vec[0]= x; + vos->vec[1]= y; + vos->vec[2]= z; + glGetFloatv(GL_CURRENT_COLOR, vos->col); + vos->xoffs= xoffs; +} + +static void view3d_object_text_draw(View3D *v3d, ARegion *ar) +{ + ViewObjectString *vos; + int tot= 0; + + /* project first and test */ + for(vos= strings.first; vos; vos= vos->next) { + view3d_project_short_clip(ar, vos->vec, vos->mval); + if(vos->mval[0]!=IS_CLIPPED) + tot++; + } + + if(tot) { + RegionView3D *rv3d= ar->regiondata; + int a; + + if(rv3d->rflag & RV3D_CLIPPING) + for(a=0; a<6; a++) + glDisable(GL_CLIP_PLANE0+a); + + wmPushMatrix(); + ED_region_pixelspace(ar); + + if(v3d->zbuf) glDisable(GL_DEPTH_TEST); + + for(vos= strings.first; vos; vos= vos->next) { + if(vos->mval[0]!=IS_CLIPPED) { + glColor3fv(vos->col); + BLF_draw_default((float)vos->mval[0]+vos->xoffs, (float)vos->mval[1], 0.0, vos->str); + } + } + + if(v3d->zbuf) glEnable(GL_DEPTH_TEST); + + wmPopMatrix(); + + if(rv3d->rflag & RV3D_CLIPPING) + for(a=0; a<6; a++) + glEnable(GL_CLIP_PLANE0+a); + } + + if(strings.first) + BLI_freelistN(&strings); +} void drawsolidcube(float size) { @@ -1096,15 +1232,12 @@ void lattice_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, BPo BPoint *bp = lt->editlatt->def; DispList *dl = find_displist(&obedit->disp, DL_VERTS); float *co = dl?dl->verts:NULL; - float pmat[4][4], vmat[4][4]; int i, N = lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw; short s[2] = {IS_CLIPPED, 0}; - view3d_get_object_project_mat(vc->rv3d, vc->obedit, pmat, vmat); - for (i=0; i<N; i++, bp++, co+=3) { if (bp->hide==0) { - view3d_project_short_clip(vc->ar, dl?co:bp->vec, s, pmat, vmat); + view3d_project_short_clip(vc->ar, dl?co:bp->vec, s); if (s[0] != IS_CLIPPED) func(userData, bp, s[0], s[1]); } @@ -1205,9 +1338,9 @@ static void mesh_foreachScreenVert__mapFunc(void *userData, int index, float *co short s[2]= {IS_CLIPPED, 0}; if (data->clipVerts) { - view3d_project_short_clip(data->vc.ar, co, s, data->pmat, data->vmat); + view3d_project_short_clip(data->vc.ar, co, s); } else { - view3d_project_short_noclip(data->vc.ar, co, s, data->pmat); + view3d_project_short_noclip(data->vc.ar, co, s); } if (s[0]!=IS_CLIPPED) @@ -1225,8 +1358,6 @@ void mesh_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, BMVert data.userData = userData; data.clipVerts = clipVerts; - view3d_get_object_project_mat(vc->rv3d, vc->obedit, data.pmat, data.vmat); - EDBM_init_index_arrays(vc->em, 1, 0, 0); dm->foreachMappedVert(dm, mesh_foreachScreenVert__mapFunc, &data); EDBM_free_index_arrays(vc->em); @@ -1242,11 +1373,11 @@ static void mesh_foreachScreenEdge__mapFunc(void *userData, int index, float *v0 if (!BM_TestHFlag(eed, BM_HIDDEN)) { if (data->clipVerts==1) { - view3d_project_short_clip(data->vc.ar, v0co, s[0], data->pmat, data->vmat); - view3d_project_short_clip(data->vc.ar, v1co, s[1], data->pmat, data->vmat); + view3d_project_short_clip(data->vc.ar, v0co, s[0]); + view3d_project_short_clip(data->vc.ar, v1co, s[1]); } else { - view3d_project_short_noclip(data->vc.ar, v0co, s[0], data->pmat); - view3d_project_short_noclip(data->vc.ar, v1co, s[1], data->pmat); + view3d_project_short_noclip(data->vc.ar, v0co, s[0]); + view3d_project_short_noclip(data->vc.ar, v1co, s[1]); if (data->clipVerts==2) { if (!(s[0][0]>=0 && s[0][1]>= 0 && s[0][0]<data->vc.ar->winx && s[0][1]<data->vc.ar->winy)) @@ -1269,8 +1400,6 @@ void mesh_foreachScreenEdge(ViewContext *vc, void (*func)(void *userData, BMEdge data.userData = userData; data.clipVerts = clipVerts; - view3d_get_object_project_mat(vc->rv3d, vc->obedit, data.pmat, data.vmat); - EDBM_init_index_arrays(vc->em, 0, 1, 0); dm->foreachMappedEdge(dm, mesh_foreachScreenEdge__mapFunc, &data); EDBM_free_index_arrays(vc->em); @@ -1285,7 +1414,7 @@ static void mesh_foreachScreenFace__mapFunc(void *userData, int index, float *ce short s[2]; if (efa && !BM_TestHFlag(efa, BM_HIDDEN)) { - view3d_project_short_clip(data->vc.ar, cent, s, data->pmat, data->vmat); + view3d_project_short_clip(data->vc.ar, cent, s); data->func(data->userData, efa, s[0], s[1], index); } @@ -1300,8 +1429,6 @@ void mesh_foreachScreenFace(ViewContext *vc, void (*func)(void *userData, BMFace data.func = func; data.userData = userData; - view3d_get_object_project_mat(vc->rv3d, vc->obedit, data.pmat, data.vmat); - EDBM_init_index_arrays(vc->em, 0, 0, 1); dm->foreachMappedFaceCenter(dm, mesh_foreachScreenFace__mapFunc, &data); EDBM_free_index_arrays(vc->em); @@ -1312,13 +1439,10 @@ void mesh_foreachScreenFace(ViewContext *vc, void (*func)(void *userData, BMFace void nurbs_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, Nurb *nu, BPoint *bp, BezTriple *bezt, int beztindex, int x, int y), void *userData) { Curve *cu= vc->obedit->data; - float pmat[4][4], vmat[4][4]; short s[2] = {IS_CLIPPED, 0}; Nurb *nu; int i; - view3d_get_object_project_mat(vc->rv3d, vc->obedit, pmat, vmat); - for (nu= cu->editnurb->first; nu; nu=nu->next) { if((nu->type & 7)==CU_BEZIER) { for (i=0; i<nu->pntsu; i++) { @@ -1326,17 +1450,17 @@ void nurbs_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, Nurb if(bezt->hide==0) { if (G.f & G_HIDDENHANDLES) { - view3d_project_short_clip(vc->ar, bezt->vec[1], s, pmat, vmat); + view3d_project_short_clip(vc->ar, bezt->vec[1], s); if (s[0] != IS_CLIPPED) func(userData, nu, NULL, bezt, 1, s[0], s[1]); } else { - view3d_project_short_clip(vc->ar, bezt->vec[0], s, pmat, vmat); + view3d_project_short_clip(vc->ar, bezt->vec[0], s); if (s[0] != IS_CLIPPED) func(userData, nu, NULL, bezt, 0, s[0], s[1]); - view3d_project_short_clip(vc->ar, bezt->vec[1], s, pmat, vmat); + view3d_project_short_clip(vc->ar, bezt->vec[1], s); if (s[0] != IS_CLIPPED) func(userData, nu, NULL, bezt, 1, s[0], s[1]); - view3d_project_short_clip(vc->ar, bezt->vec[2], s, pmat, vmat); + view3d_project_short_clip(vc->ar, bezt->vec[2], s); if (s[0] != IS_CLIPPED) func(userData, nu, NULL, bezt, 2, s[0], s[1]); } @@ -1348,7 +1472,7 @@ void nurbs_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, Nurb BPoint *bp = &nu->bp[i]; if(bp->hide==0) { - view3d_project_short_clip(vc->ar, bp->vec, s, pmat, vmat); + view3d_project_short_clip(vc->ar, bp->vec, s); if (s[0] != IS_CLIPPED) func(userData, nu, bp, NULL, -1, s[0], s[1]); } @@ -1806,7 +1930,7 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, Mesh *me= ob->data; EditEdge *eed; EditFace *efa; - float v1[3], v2[3], v3[3], v4[3]; + float v1[3], v2[3], v3[3], v4[3], x, y, z; float fvec[3]; char val[32]; /* Stores the measurement display text here */ char conv_float[5]; /* Use a float conversion matching the grid size */ @@ -1846,7 +1970,9 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, VECCOPY(v1, eed->v1->co); VECCOPY(v2, eed->v2->co); - glRasterPos3f( 0.5*(v1[0]+v2[0]), 0.5*(v1[1]+v2[1]), 0.5*(v1[2]+v2[2])); + x= 0.5*(v1[0]+v2[0]); + y= 0.5*(v1[1]+v2[1]); + z= 0.5*(v1[2]+v2[2]); if(v3d->flag & V3D_GLOBAL_STATS) { Mat4MulVecfl(ob->obmat, v1); @@ -1854,7 +1980,7 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, } sprintf(val, conv_float, VecLenf(v1, v2)); - BMF_DrawString( G.fonts, val); + view3d_object_text_draw_add(x, y, z, val, 0); } } } @@ -1889,8 +2015,7 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, area = AreaT3Dfl(v1, v2, v3); sprintf(val, conv_float, area); - glRasterPos3fv(efa->cent); - BMF_DrawString( G.fonts, val); + view3d_object_text_draw_add(efa->cent[0], efa->cent[1], efa->cent[2], val, 0); } } } @@ -1932,15 +2057,13 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, /* Vec 1 */ sprintf(val,"%.3f", VecAngle3(v4, v1, v2)); VecLerpf(fvec, efa->cent, efa->v1->co, 0.8); - glRasterPos3fv(fvec); - BMF_DrawString( G.fonts, val); + view3d_object_text_draw_add(efa->cent[0], efa->cent[1], efa->cent[2], val, 0); } if( (e1->f & e2->f & SELECT) || (G.moving && (efa->v2->f & SELECT)) ) { /* Vec 2 */ sprintf(val,"%.3f", VecAngle3(v1, v2, v3)); VecLerpf(fvec, efa->cent, efa->v2->co, 0.8); - glRasterPos3fv(fvec); - BMF_DrawString( G.fonts, val); + view3d_object_text_draw_add(fvec[0], fvec[1], fvec[2], val, 0); } if( (e2->f & e3->f & SELECT) || (G.moving && (efa->v3->f & SELECT)) ) { /* Vec 3 */ @@ -1949,16 +2072,14 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, else sprintf(val,"%.3f", VecAngle3(v2, v3, v1)); VecLerpf(fvec, efa->cent, efa->v3->co, 0.8); - glRasterPos3fv(fvec); - BMF_DrawString( G.fonts, val); + view3d_object_text_draw_add(fvec[0], fvec[1], fvec[2], val, 0); } /* Vec 4 */ if(efa->v4) { if( (e3->f & e4->f & SELECT) || (G.moving && (efa->v4->f & SELECT)) ) { sprintf(val,"%.3f", VecAngle3(v3, v4, v1)); VecLerpf(fvec, efa->cent, efa->v4->co, 0.8); - glRasterPos3fv(fvec); - BMF_DrawString( G.fonts, val); + view3d_object_text_draw_add(fvec[0], fvec[1], fvec[2], val, 0); } } } @@ -2191,7 +2312,7 @@ static void draw_mesh_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base Object *ob= base->object; Mesh *me = ob->data; Material *ma= give_current_material(ob, 1); - int hasHaloMat = (ma && (ma->mode&MA_HALO)); + int hasHaloMat = (ma && (ma->material_type == MA_TYPE_HALO)); int draw_wire = 0; int totvert, totedge, totface; DispList *dl; @@ -2863,16 +2984,14 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv ParticleSettings *part; ParticleData *pars, *pa; ParticleKey state, *states=0; - ParticleCacheKey *cache=0; + ParticleBillboardData bb; Material *ma; - Object *bb_ob=0; - float vel[3], vec[3], vec2[3], imat[4][4], onevec[3]={0.0f,0.0f,0.0f}, bb_center[3]; + float vel[3], vec[3], vec2[3], imat[4][4], bb_center[3]; float timestep, pixsize=1.0, pa_size, pa_time, r_tilt; float cfra= bsystem_time(scene, ob,(float)CFRA,0.0); float *vdata=0, *vedata=0, *cdata=0, *ndata=0, *vd=0, *ved=0, *cd=0, *nd=0, xvec[3], yvec[3], zvec[3]; float ma_r=0.0f, ma_g=0.0f, ma_b=0.0f; - int a, k, k_max=0, totpart, totpoint=0, draw_as, path_nbr=0; - int path_possible=0, keys_possible=0, draw_keys=0, totchild=0; + int a, totpart, totpoint=0, draw_as, totchild=0; int select=ob->flag&SELECT, create_cdata=0; GLint polygonmode[2]; char val[32]; @@ -2959,18 +3078,9 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv if(part->flag&PART_GLOB_TIME) cfra=bsystem_time(scene, 0, (float)CFRA, 0.0f); - if(psys->pathcache){ - path_possible=1; - keys_possible=1; - } - if(draw_as==PART_DRAW_PATH && path_possible==0) + if(draw_as==PART_DRAW_PATH && psys->pathcache==NULL) draw_as=PART_DRAW_DOT; - if(draw_as!=PART_DRAW_PATH && keys_possible && part->draw&PART_DRAW_KEYS){ - path_nbr=part->keys_step; - draw_keys=1; - } - /* 3. */ switch(draw_as){ case PART_DRAW_DOT: @@ -3019,12 +3129,15 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv glPointSize(2.0); /* default dot size */ } else if(part->bb_ob) - bb_ob=part->bb_ob; + bb.ob=part->bb_ob; else - bb_ob=v3d->camera; + bb.ob=v3d->camera; - if(part->bb_align<PART_BB_VIEW) - onevec[part->bb_align]=1.0f; + bb.align = part->bb_align; + bb.anim = part->bb_anim; + bb.lock = part->draw & PART_DRAW_BB_LOCK; + bb.offset[0] = part->bb_offset[0]; + bb.offset[1] = part->bb_offset[1]; break; case PART_DRAW_PATH: break; @@ -3036,35 +3149,37 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv } /* 4. */ - if(draw_as && draw_as!=PART_DRAW_PATH){ - if(draw_as!=PART_DRAW_CIRC){ - switch(draw_as){ + if(draw_as && draw_as!=PART_DRAW_PATH) { + int tot_vec_size = (totpart + totchild) * 3 * sizeof(float); + + if(draw_as!=PART_DRAW_CIRC) { + switch(draw_as) { case PART_DRAW_AXIS: case PART_DRAW_CROSS: - if(draw_as!=PART_DRAW_CROSS || create_cdata) - cdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*6*3*sizeof(float), "particle_cdata"); - vdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*6*3*sizeof(float), "particle_vdata"); + if(draw_as != PART_DRAW_CROSS || create_cdata) + cdata = MEM_callocN(tot_vec_size * 6, "particle_cdata"); + vdata = MEM_callocN(tot_vec_size * 6, "particle_vdata"); break; case PART_DRAW_LINE: if(create_cdata) - cdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*2*3*sizeof(float), "particle_cdata"); - vdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*2*3*sizeof(float), "particle_vdata"); + cdata = MEM_callocN(tot_vec_size * 2, "particle_cdata"); + vdata = MEM_callocN(tot_vec_size * 2, "particle_vdata"); break; case PART_DRAW_BB: if(create_cdata) - cdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*4*3*sizeof(float), "particle_cdata"); - vdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*4*3*sizeof(float), "particle_vdata"); - ndata=MEM_callocN((totpart+totchild)*(path_nbr+1)*4*3*sizeof(float), "particle_vdata"); + cdata = MEM_callocN(tot_vec_size * 4, "particle_cdata"); + vdata = MEM_callocN(tot_vec_size * 4, "particle_vdata"); + ndata = MEM_callocN(tot_vec_size * 4, "particle_vdata"); break; default: if(create_cdata) - cdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*3*sizeof(float), "particle_cdata"); - vdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*3*sizeof(float), "particle_vdata"); + cdata=MEM_callocN(tot_vec_size, "particle_cdata"); + vdata=MEM_callocN(tot_vec_size, "particle_vdata"); } } - if(part->draw&PART_DRAW_VEL && draw_as!=PART_DRAW_LINE) - vedata=MEM_callocN((totpart+totchild)*2*3*(path_nbr+1)*sizeof(float), "particle_vedata"); + if(part->draw & PART_DRAW_VEL && draw_as != PART_DRAW_LINE) + vedata = MEM_callocN(tot_vec_size * 2, "particle_vedata"); vd=vdata; ved=vedata; @@ -3077,6 +3192,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv if(draw_as){ /* 5. */ for(a=0,pa=pars; a<totpart+totchild; a++, pa++){ + /* setup per particle individual stuff */ if(a<totpart){ if(totchild && (part->draw&PART_DRAW_PARENT)==0) continue; if(pa->flag & PARS_NO_DISP || pa->flag & PARS_UNEXIST) continue; @@ -3116,11 +3232,6 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv } r_tilt=1.0f+pa->r_ave[0]; - - if(path_nbr){ - cache=psys->pathcache[a]; - k_max=(int)(cache->steps); - } } else{ ChildParticle *cpa= &psys->child[a-totpart]; @@ -3150,47 +3261,23 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv pa_size=psys_get_child_size(psys,cpa,cfra,0); r_tilt=2.0f*cpa->rand[2]; - if(path_nbr){ - cache=psys->childcache[a-totpart]; - k_max=(int)(cache->steps); - } } if(draw_as!=PART_DRAW_PATH){ - int next_pa=0; - for(k=0; k<=path_nbr; k++){ - if(draw_keys){ - state.time=(float)k/(float)path_nbr; - psys_get_particle_on_path(scene, ob, psys, a, &state,1); - } - else if(path_nbr){ - if(k<=k_max){ - VECCOPY(state.co,(cache+k)->co); - VECCOPY(state.vel,(cache+k)->vel); - QUATCOPY(state.rot,(cache+k)->rot); - } - else - continue; - } - else{ - state.time=cfra; - if(psys_get_particle_state(scene, ob, psys, a, &state,0)==0){ - next_pa=1; - break; - } - } - + state.time=cfra; + if(psys_get_particle_state(scene,ob,psys,a,&state,0)){ + /* create actiual particle data */ switch(draw_as){ case PART_DRAW_DOT: + if(vd){ + VECCOPY(vd,state.co) vd+=3; + } if(cd) { cd[0]=ma_r; cd[1]=ma_g; cd[2]=ma_b; cd+=3; } - if(vd){ - VECCOPY(vd,state.co) vd+=3; - } break; case PART_DRAW_CROSS: case PART_DRAW_AXIS: @@ -3273,59 +3360,15 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv cd[2]=cd[5]=cd[8]=cd[11]=ma_b; cd+=12; } - if(part->draw&PART_DRAW_BB_LOCK && part->bb_align==PART_BB_VIEW){ - VECCOPY(xvec,bb_ob->obmat[0]); - Normalize(xvec); - VECCOPY(yvec,bb_ob->obmat[1]); - Normalize(yvec); - VECCOPY(zvec,bb_ob->obmat[2]); - Normalize(zvec); - } - else if(part->bb_align==PART_BB_VEL){ - float temp[3]; - VECCOPY(temp,state.vel); - Normalize(temp); - VECSUB(zvec,bb_ob->obmat[3],state.co); - if(part->draw&PART_DRAW_BB_LOCK){ - float fac=-Inpf(zvec,temp); - VECADDFAC(zvec,zvec,temp,fac); - } - Normalize(zvec); - Crossf(xvec,temp,zvec); - Normalize(xvec); - Crossf(yvec,zvec,xvec); - } - else{ - VECSUB(zvec,bb_ob->obmat[3],state.co); - if(part->draw&PART_DRAW_BB_LOCK) - zvec[part->bb_align]=0.0f; - Normalize(zvec); - - if(part->bb_align<PART_BB_VIEW) - Crossf(xvec,onevec,zvec); - else - Crossf(xvec,bb_ob->obmat[1],zvec); - Normalize(xvec); - Crossf(yvec,zvec,xvec); - } - VECCOPY(vec,xvec); - VECCOPY(vec2,yvec); - - VecMulf(xvec,cos(part->bb_tilt*(1.0f-part->bb_rand_tilt*r_tilt)*(float)M_PI)); - VecMulf(vec2,sin(part->bb_tilt*(1.0f-part->bb_rand_tilt*r_tilt)*(float)M_PI)); - VECADD(xvec,xvec,vec2); - - VecMulf(yvec,cos(part->bb_tilt*(1.0f-part->bb_rand_tilt*r_tilt)*(float)M_PI)); - VecMulf(vec,-sin(part->bb_tilt*(1.0f-part->bb_rand_tilt*r_tilt)*(float)M_PI)); - VECADD(yvec,yvec,vec); - - VecMulf(xvec,pa_size); - VecMulf(yvec,pa_size); - - VECADDFAC(bb_center,state.co,xvec,part->bb_offset[0]); - VECADDFAC(bb_center,bb_center,yvec,part->bb_offset[1]); + bb.size = pa_size; + bb.tilt = part->bb_tilt * (1.0f - part->bb_rand_tilt * r_tilt); + bb.time = pa_time; + VECCOPY(bb.vec, state.co); + VECCOPY(bb.vel, state.vel); + psys_make_billboard(&bb, xvec, yvec, zvec, bb_center); + VECADD(vd,bb_center,xvec); VECADD(vd,vd,yvec); vd+=3; @@ -3345,6 +3388,10 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv break; } + totpoint++; + + /* additional things to draw for each particle */ + /* (velocity, size and number) */ if(vedata){ VECCOPY(ved,state.co); ved+=3; @@ -3360,15 +3407,11 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv setlinestyle(0); } - totpoint++; - } - if(next_pa) - continue; - if(part->draw&PART_DRAW_NUM && !(G.f & G_RENDER_SHADOW)){ - /* in path drawing state.co is the end point */ - glRasterPos3f(state.co[0], state.co[1], state.co[2]); - sprintf(val," %i",a); - BMF_DrawString(G.font, val); + if(part->draw&PART_DRAW_NUM && !(G.f & G_RENDER_SHADOW)){ + /* in path drawing state.co is the end point */ + sprintf(val," %i",a); + view3d_object_text_draw_add(state.co[0], state.co[1], state.co[2], val, 0); + } } } } @@ -3377,51 +3420,39 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv glGetIntegerv(GL_POLYGON_MODE, polygonmode); glDisableClientState(GL_NORMAL_ARRAY); - if(draw_as != PART_DRAW_CIRC){ - if(draw_as==PART_DRAW_PATH){ - ParticleCacheKey **cache, *path; - float *cd2=0,*cdata2=0; + if(draw_as==PART_DRAW_PATH){ + ParticleCacheKey **cache, *path; + float *cd2=0,*cdata2=0; - glEnableClientState(GL_VERTEX_ARRAY); - - if(dt > OB_WIRE) { - glEnableClientState(GL_NORMAL_ARRAY); - - if(part->draw&PART_DRAW_MAT_COL) - glEnableClientState(GL_COLOR_ARRAY); + glEnableClientState(GL_VERTEX_ARRAY); - glEnable(GL_LIGHTING); - glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE); - glEnable(GL_COLOR_MATERIAL); - } - else { - glDisableClientState(GL_NORMAL_ARRAY); + /* setup gl flags */ + if(dt > OB_WIRE) { + glEnableClientState(GL_NORMAL_ARRAY); - glDisable(GL_COLOR_MATERIAL); - glDisable(GL_LIGHTING); - UI_ThemeColor(TH_WIRE); - } + if(part->draw&PART_DRAW_MAT_COL) + glEnableClientState(GL_COLOR_ARRAY); - if(totchild && (part->draw&PART_DRAW_PARENT)==0) - totpart=0; + glEnable(GL_LIGHTING); + glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE); + glEnable(GL_COLOR_MATERIAL); + } + else { + glDisableClientState(GL_NORMAL_ARRAY); - cache=psys->pathcache; - for(a=0, pa=psys->particles; a<totpart; a++, pa++){ - path=cache[a]; - glVertexPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->co); + glDisable(GL_COLOR_MATERIAL); + glDisable(GL_LIGHTING); + UI_ThemeColor(TH_WIRE); + } - if(dt > OB_WIRE) { - glNormalPointer(GL_FLOAT, sizeof(ParticleCacheKey), path->vel); - if(part->draw&PART_DRAW_MAT_COL) - glColorPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->col); - } + if(totchild && (part->draw&PART_DRAW_PARENT)==0) + totpart=0; - glDrawArrays(GL_LINE_STRIP, 0, path->steps + 1); - } - - cache=psys->childcache; - for(a=0; a<totchild; a++){ - path=cache[a]; + /* draw actual/parent particles */ + cache=psys->pathcache; + for(a=0, pa=psys->particles; a<totpart; a++, pa++){ + path=cache[a]; + if(path->steps > 0) { glVertexPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->co); if(dt > OB_WIRE) { @@ -3432,68 +3463,85 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv glDrawArrays(GL_LINE_STRIP, 0, path->steps + 1); } + } + + /* draw child particles */ + cache=psys->childcache; + for(a=0; a<totchild; a++){ + path=cache[a]; + glVertexPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->co); if(dt > OB_WIRE) { + glNormalPointer(GL_FLOAT, sizeof(ParticleCacheKey), path->vel); if(part->draw&PART_DRAW_MAT_COL) - glDisable(GL_COLOR_ARRAY); - glDisable(GL_COLOR_MATERIAL); + glColorPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->col); } - if(cdata2) - MEM_freeN(cdata2); - cd2=cdata2=0; + glDrawArrays(GL_LINE_STRIP, 0, path->steps + 1); + } - glLineWidth(1.0f); - /* draw particle edit mode key points*/ + /* restore & clean up */ + if(dt > OB_WIRE) { + if(part->draw&PART_DRAW_MAT_COL) + glDisable(GL_COLOR_ARRAY); + glDisable(GL_COLOR_MATERIAL); } - if(draw_as!=PART_DRAW_PATH){ - glDisableClientState(GL_COLOR_ARRAY); + if(cdata2) + MEM_freeN(cdata2); + cd2=cdata2=0; - if(vdata){ - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, 0, vdata); - } - else - glDisableClientState(GL_VERTEX_ARRAY); + glLineWidth(1.0f); + } + else if(draw_as!=PART_DRAW_CIRC){ + glDisableClientState(GL_COLOR_ARRAY); - if(ndata && dt>OB_WIRE){ - glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(GL_FLOAT, 0, ndata); - glEnable(GL_LIGHTING); - } - else{ - glDisableClientState(GL_NORMAL_ARRAY); - glDisable(GL_LIGHTING); - } + /* setup created data arrays */ + if(vdata){ + glEnableClientState(GL_VERTEX_ARRAY); + glVertexPointer(3, GL_FLOAT, 0, vdata); + } + else + glDisableClientState(GL_VERTEX_ARRAY); - if(cdata){ - glEnableClientState(GL_COLOR_ARRAY); - glColorPointer(3, GL_FLOAT, 0, cdata); - } + if(ndata && dt>OB_WIRE){ + glEnableClientState(GL_NORMAL_ARRAY); + glNormalPointer(GL_FLOAT, 0, ndata); + glEnable(GL_LIGHTING); + } + else{ + glDisableClientState(GL_NORMAL_ARRAY); + glDisable(GL_LIGHTING); + } - switch(draw_as){ - case PART_DRAW_AXIS: - case PART_DRAW_CROSS: - glDrawArrays(GL_LINES, 0, 6*totpoint); - break; - case PART_DRAW_LINE: - glDrawArrays(GL_LINES, 0, 2*totpoint); - break; - case PART_DRAW_BB: - if(dt<=OB_WIRE) - glPolygonMode(GL_FRONT_AND_BACK,GL_LINE); - - glDrawArrays(GL_QUADS, 0, 4*totpoint); - break; - default: - glDrawArrays(GL_POINTS, 0, totpoint); - break; - } + if(cdata){ + glEnableClientState(GL_COLOR_ARRAY); + glColorPointer(3, GL_FLOAT, 0, cdata); } + + /* draw created data arrays */ + switch(draw_as){ + case PART_DRAW_AXIS: + case PART_DRAW_CROSS: + glDrawArrays(GL_LINES, 0, 6*totpoint); + break; + case PART_DRAW_LINE: + glDrawArrays(GL_LINES, 0, 2*totpoint); + break; + case PART_DRAW_BB: + if(dt<=OB_WIRE) + glPolygonMode(GL_FRONT_AND_BACK,GL_LINE); + + glDrawArrays(GL_QUADS, 0, 4*totpoint); + break; + default: + glDrawArrays(GL_POINTS, 0, totpoint); + break; + } } + if(vedata){ glDisableClientState(GL_COLOR_ARRAY); cpack(0xC0C0C0); @@ -3677,9 +3725,8 @@ static void draw_particle_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Ob for(k=0, key=edit->keys[i]+k; k<pa->totkey; k++, key++){ if(key->flag & PEK_HIDE) continue; - glRasterPos3fv(key->world_co); sprintf(val," %.1f",*key->time); - BMF_DrawString(G.font, val); + view3d_object_text_draw_add(key->world_co[0], key->world_co[1], key->world_co[2], val, 0); } } } @@ -3701,9 +3748,8 @@ static void draw_particle_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Ob glEnd(); if((pset->flag & PE_SHOW_TIME) && !(G.f & G_RENDER_SHADOW)){ - glRasterPos3fv(key->world_co); sprintf(val," %.1f",*key->time); - BMF_DrawString(G.font, val); + view3d_object_text_draw_add(key->world_co[0], key->world_co[1], key->world_co[2], val, 0); } } } @@ -3736,7 +3782,7 @@ static void tekenhandlesN(Nurb *nu, short sel) glBegin(GL_LINES); - if( (nu->type & 7)==1) { + if( (nu->type & 7)==CU_BEZIER) { if(sel) col= nurbcol+4; else col= nurbcol; @@ -3793,7 +3839,7 @@ static void tekenvertsN(Nurb *nu, short sel) bglBegin(GL_POINTS); - if((nu->type & 7)==1) { + if((nu->type & 7)==CU_BEZIER) { bezt= nu->bezt; a= nu->pntsu; @@ -4716,25 +4762,24 @@ void drawRBpivot(bRigidBodyJointConstraint *data) glLineWidth (4.0f); setlinestyle(2); for (axis=0; axis<3; axis++) { - float dir[3] = {0,0,0}; - float v[3]= {data->pivX, data->pivY, data->pivZ}; + float dir[3] = {0,0,0}; + float v[3]= {data->pivX, data->pivY, data->pivZ}; - dir[axis] = 1.f; - glBegin(GL_LINES); - Mat4MulVecfl(mat,dir); - v[0] += dir[0]; - v[1] += dir[1]; - v[2] += dir[2]; - glVertex3fv(v1); - glVertex3fv(v); - glEnd(); - glRasterPos3fv(v); - if (axis==0) - BMF_DrawString(G.font, "px"); - else if (axis==1) - BMF_DrawString(G.font, "py"); - else - BMF_DrawString(G.font, "pz"); + dir[axis] = 1.f; + glBegin(GL_LINES); + Mat4MulVecfl(mat,dir); + v[0] += dir[0]; + v[1] += dir[1]; + v[2] += dir[2]; + glVertex3fv(v1); + glVertex3fv(v); + glEnd(); + if (axis==0) + view3d_object_text_draw_add(v[0], v[1], v[2], "px", 0); + else if (axis==1) + view3d_object_text_draw_add(v[0], v[1], v[2], "py", 0); + else + view3d_object_text_draw_add(v[0], v[1], v[2], "pz", 0); } glLineWidth (1.0f); setlinestyle(0); @@ -4769,7 +4814,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) /* don't do xray in particle mode, need the z-buffer */ if(!(G.f & G_PARTICLEEDIT)) { /* xray and transp are set when it is drawing the 2nd/3rd pass */ - if(!v3d->xray && !v3d->transp && (ob->dtx & OB_DRAWXRAY)) { + if(!v3d->xray && !v3d->transp && (ob->dtx & OB_DRAWXRAY) && !(ob->dtx & OB_DRAWTRANSP)) { add_view3d_after(v3d, base, V3D_XRAY, flag); return; } @@ -4855,7 +4900,11 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) /* patch? children objects with a timeoffs change the parents. How to solve! */ /* if( ((int)ob->ctime) != F_(scene->r.cfra)) where_is_object(scene, ob); */ + /* multiply view with object matrix */ wmMultMatrix(ob->obmat); + /* local viewmat and persmat, to calculate projections */ + wmGetMatrix(rv3d->viewmatob); + wmGetSingleMatrix(rv3d->persmatob); /* which wire color */ if((flag & DRAW_CONSTCOLOR) == 0) { @@ -5153,12 +5202,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) /* patch for several 3d cards (IBM mostly) that crash on glSelect with text drawing */ /* but, we also dont draw names for sets or duplicators */ if(flag == 0) { - if(v3d->zbuf) glDisable(GL_DEPTH_TEST); - glRasterPos3f(0.0, 0.0, 0.0); - - BMF_DrawString(G.font, " "); - BMF_DrawString(G.font, ob->id.name+2); - if(v3d->zbuf) glEnable(GL_DEPTH_TEST); + view3d_object_text_draw_add(0.0f, 0.0f, 0.0f, ob->id.name+2, 10); } } /*if(dtx & OB_DRAWIMAGE) drawDispListwire(&ob->disp);*/ @@ -5179,6 +5223,9 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) setlinestyle(0); } } + + /* return warning, this is cached text draw */ + view3d_object_text_draw(v3d, ar); wmLoadMatrix(rv3d->viewmat); @@ -5238,7 +5285,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) char col[4], col2[4]; UI_GetThemeColor3ubv(TH_GRID, col); - make_axis_color(col, col2, 'z'); + UI_make_axis_color(col, col2, 'z'); glColor3ubv((GLubyte *)col2); cob= constraints_make_evalob(scene, ob, NULL, CONSTRAINT_OBTYPE_OBJECT); diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index b7682225fe3..3b3fd5109cf 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -88,7 +88,34 @@ ARegion *view3d_has_buttons_region(ScrArea *sa) BLI_insertlinkafter(&sa->regionbase, ar, arnew); arnew->regiontype= RGN_TYPE_UI; - arnew->alignment= RGN_ALIGN_LEFT; + arnew->alignment= RGN_ALIGN_RIGHT; + + arnew->flag = RGN_FLAG_HIDDEN; + + return arnew; +} + +ARegion *view3d_has_tools_region(ScrArea *sa) +{ + ARegion *ar, *arnew; + + for(ar= sa->regionbase.first; ar; ar= ar->next) + if(ar->regiontype==RGN_TYPE_TOOLS) + return ar; + + /* add subdiv level; after header */ + for(ar= sa->regionbase.first; ar; ar= ar->next) + if(ar->regiontype==RGN_TYPE_HEADER) + break; + + /* is error! */ + if(ar==NULL) return NULL; + + arnew= MEM_callocN(sizeof(ARegion), "tools for view3d"); + + BLI_insertlinkafter(&sa->regionbase, ar, arnew); + arnew->regiontype= RGN_TYPE_TOOLS; + arnew->alignment= RGN_OVERLAP_LEFT; arnew->flag = RGN_FLAG_HIDDEN; @@ -96,6 +123,7 @@ ARegion *view3d_has_buttons_region(ScrArea *sa) } + /* ******************** default callbacks for view3d space ***************** */ static SpaceLink *view3d_new(const bContext *C) @@ -155,7 +183,6 @@ static SpaceLink *view3d_new(const bContext *C) rv3d->persp= 1; rv3d->view= 7; rv3d->dist= 10.0; - Mat4One(rv3d->twmat); return (SpaceLink *)v3d; } @@ -460,32 +487,16 @@ static void view3d_header_area_listener(ARegion *ar, wmNotifier *wmn) static void view3d_buttons_area_init(wmWindowManager *wm, ARegion *ar) { ListBase *keymap; + + ED_region_panels_init(wm, ar); - keymap= WM_keymap_listbase(wm, "View2D Buttons List", 0, 0); - WM_event_add_keymap_handler(&ar->handlers, keymap); keymap= WM_keymap_listbase(wm, "View3D Generic", SPACE_VIEW3D, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); - - UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST_UI, ar->winx, ar->winy); } static void view3d_buttons_area_draw(const bContext *C, ARegion *ar) { - float col[3]; - - /* clear */ - UI_GetThemeColor3fv(TH_HEADER, col); - - glClearColor(col[0], col[1], col[2], 0.0); - glClear(GL_COLOR_BUFFER_BIT); - - /* set view2d view matrix for scrolling (without scrollers) */ - UI_view2d_view_ortho(C, &ar->v2d); - - view3d_buttons_area_defbuts(C, ar); - - /* restore view matrix? */ - UI_view2d_view_restore(C); + ED_region_panels(C, ar, 1, NULL); } static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn) @@ -517,6 +528,22 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn) } } +/* add handlers, stuff you only do once or on area/region changes */ +static void view3d_tools_area_init(wmWindowManager *wm, ARegion *ar) +{ + ListBase *keymap; + + ED_region_panels_init(wm, ar); + + keymap= WM_keymap_listbase(wm, "View3D Generic", SPACE_VIEW3D, 0); + WM_event_add_keymap_handler(&ar->handlers, keymap); +} + +static void view3d_tools_area_draw(const bContext *C, ARegion *ar) +{ + ED_region_panels(C, ar, 1, NULL); +} + /* * Returns true if the Object is a from an external blend file (libdata) */ @@ -788,6 +815,21 @@ void ED_spacetype_view3d(void) art->init= view3d_buttons_area_init; art->draw= view3d_buttons_area_draw; BLI_addhead(&st->regiontypes, art); + + view3d_buttons_register(art); + + /* regions: tool(bar) */ + art= MEM_callocN(sizeof(ARegionType), "spacetype view3d region"); + art->regionid = RGN_TYPE_TOOLS; + art->minsizex= 120; // XXX + art->minsizey= 50; // XXX + art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_FRAMES; + art->listener= view3d_buttons_area_listener; + art->init= view3d_tools_area_init; + art->draw= view3d_tools_area_draw; + BLI_addhead(&st->regiontypes, art); + + view3d_toolbar_register(art); /* regions: header */ art= MEM_callocN(sizeof(ARegionType), "spacetype view3d region"); diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 322dc61ecf5..4f3207f5cda 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -31,6 +31,7 @@ #include <math.h> #include <float.h> +#include "DNA_ID.h" #include "DNA_action_types.h" #include "DNA_armature_types.h" #include "DNA_curve_types.h" @@ -61,6 +62,9 @@ #include "BKE_curve.h" #include "BKE_customdata.h" #include "BKE_depsgraph.h" +#include "BKE_idprop.h" +#include "BKE_mesh.h" +#include "BKE_tessmesh.h" #include "BKE_object.h" #include "BKE_global.h" #include "BKE_scene.h" @@ -162,31 +166,31 @@ static void v3d_editvertex_buts(const bContext *C, uiBlock *block, View3D *v3d, if(ob->type==OB_MESH) { Mesh *me= ob->data; - EditMesh *em = EM_GetEditMesh(me); - EditVert *eve, *evedef=NULL; - EditEdge *eed; + BMEditMesh *em = me->edit_btmesh; + BMVert *eve, *evedef=NULL; + BMEdge *eed; + BMIter iter; - eve= em->verts.first; - while(eve) { - if(eve->f & SELECT) { + eve = BMIter_New(&iter, em->bm, BM_VERTS_OF_MESH, NULL); + for ( ; eve; eve=BMIter_Step(&iter)) { + if(BM_TestHFlag(eve, BM_SELECT)) { evedef= eve; tot++; VecAddf(median, median, eve->co); } - eve= eve->next; } - eed= em->edges.first; - while(eed) { - if((eed->f & SELECT)) { + + eed = BMIter_New(&iter, em->bm, BM_EDGES_OF_MESH, NULL); + for ( ; eed; eed=BMIter_Step(&iter)) { + if(BM_TestHFlag(eed, BM_SELECT)) { totedge++; median[3]+= eed->crease; } - eed= eed->next; } /* check for defgroups */ if(evedef) - dvert= CustomData_em_get(&em->vdata, evedef->data, CD_MDEFORMVERT); + dvert= CustomData_bmesh_get(&em->bm->vdata, evedef->data, CD_MDEFORMVERT); if(tot==1 && dvert && dvert->totweight) { bDeformGroup *dg; int i, max=1, init=1; @@ -210,8 +214,6 @@ static void v3d_editvertex_buts(const bContext *C, uiBlock *block, View3D *v3d, tfp->defweightp= &dvert->dw[0].weight; } } - - EM_EndEditMesh(me, em); } else if(ob->type==OB_CURVE || ob->type==OB_SURF) { Curve *cu= ob->data; @@ -366,7 +368,7 @@ static void v3d_editvertex_buts(const bContext *C, uiBlock *block, View3D *v3d, if(ob->type==OB_MESH) { Mesh *me= ob->data; - EditMesh *em = EM_GetEditMesh(me); + EditMesh *em = BKE_mesh_get_editmesh(me); EditVert *eve; EditEdge *eed; @@ -392,7 +394,7 @@ static void v3d_editvertex_buts(const bContext *C, uiBlock *block, View3D *v3d, recalc_editnormals(em); - EM_EndEditMesh(me, em); + BKE_mesh_end_editmesh(me, em); } else if(ob->type==OB_CURVE || ob->type==OB_SURF) { Curve *cu= ob->data; @@ -403,7 +405,7 @@ static void v3d_editvertex_buts(const bContext *C, uiBlock *block, View3D *v3d, nu= cu->editnurb->first; while(nu) { - if((nu->type & 7)==1) { + if((nu->type & 7)==CU_BEZIER) { bezt= nu->bezt; a= nu->pntsu; while(a--) { @@ -945,7 +947,7 @@ void selectTransformOrientation_func(bContext *C, void *target, void *unused) BIF_selectTransformOrientation(C, (TransformOrientation *) target); } -static void view3d_panel_transform_spaces(const bContext *C, ARegion *ar, short cntrl) +static void view3d_panel_transform_spaces(const bContext *C, Panel *pa) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); @@ -954,13 +956,10 @@ static void view3d_panel_transform_spaces(const bContext *C, ARegion *ar, short TransformOrientation *ts = transform_spaces->first; uiBlock *block; uiBut *but; - int xco = 20, yco = 70, height = 140; + int xco = 20, yco = 70; int index; - block= uiBeginBlock(C, ar, "view3d_panel_transform", UI_EMBOSS, UI_HELV); - if(uiNewPanel(C, ar, block, "Transform Orientations", "View3d", 1000, 0, 318, height)==0) return; - - uiNewPanelHeight(block, height); + block= uiLayoutFreeBlock(pa->layout); uiBlockBeginAlign(block); @@ -982,7 +981,6 @@ static void view3d_panel_transform_spaces(const bContext *C, ARegion *ar, short for (index = V3D_MANIP_CUSTOM, ts = transform_spaces->first ; ts ; ts = ts->next, index++) { - UI_ThemeColor(TH_BUT_ACTION); if (v3d->twmode == index) { but = uiDefIconButS(block,ROW, B_REDR, ICON_CHECKBOX_HLT, xco,yco,XIC,YIC, &v3d->twmode, 5.0, (float)index, 0, 0, "Use this Custom Transform Orientation"); } @@ -998,9 +996,6 @@ static void view3d_panel_transform_spaces(const bContext *C, ARegion *ar, short yco -= 25; } uiBlockEndAlign(block); - - if(yco < 0) uiNewPanelHeight(block, height-yco); - uiEndBlock(C, block); } static void weight_paint_buttons(Scene *scene, uiBlock *block) @@ -1102,19 +1097,23 @@ static void brush_idpoin_handle(bContext *C, ID *id, int event) } } -static void view3d_panel_brush(const bContext *C, ARegion *ar, short cntrl) +static int view3d_panel_brush_poll(const bContext *C, PanelType *pt) +{ + Brush **brp = current_brush_source(CTX_data_scene(C)); + + return ((G.f & (G_SCULPTMODE|G_TEXTUREPAINT|G_VERTEXPAINT|G_WEIGHTPAINT)) && brp); +} + +static void view3d_panel_brush(const bContext *C, Panel *pa) { uiBlock *block; Brush **brp = current_brush_source(CTX_data_scene(C)), *br; short w = 268, h = 400, cx = 10, cy = h; rctf rect; - if(!brp) - return; br = *brp; - block= uiBeginBlock(C, ar, "view3d_panel_brush", UI_EMBOSS, UI_HELV); - if(uiNewPanel(C, ar, block, "Brush", "View3d", 340, 10, 318, h)==0) return; + block= uiLayoutFreeBlock(pa->layout); uiBlockSetHandleFunc(block, do_view3d_region_buttons, NULL); uiBlockBeginAlign(block); @@ -1150,8 +1149,8 @@ static void view3d_panel_brush(const bContext *C, ARegion *ar, short cntrl) uiBlockBeginAlign(block); uiDefButBitS(block, TOG, BRUSH_AIRBRUSH, B_NOP, "Airbrush", cx,cy,w/3,19, &br->flag,0,0,0,0, "Brush makes changes without waiting for the mouse to move"); - uiDefButBitS(block, TOG, BRUSH_ANCHORED, B_NOP, "Rake", cx+w/3,cy,w/3,19, &br->flag,0,0,0,0, ""); - uiDefButBitS(block, TOG, BRUSH_RAKE, B_NOP, "Anchored", cx+w*2.0/3,cy,w/3,19, &br->flag,0,0,0,0, ""); + uiDefButBitS(block, TOG, BRUSH_RAKE, B_NOP, "Rake", cx+w/3,cy,w/3,19, &br->flag,0,0,0,0, ""); + uiDefButBitS(block, TOG, BRUSH_ANCHORED, B_NOP, "Anchored", cx+w*2.0/3,cy,w/3,19, &br->flag,0,0,0,0, ""); cy-= 20; uiDefButBitS(block, TOG, BRUSH_SPACE, B_NOP, "Space", cx,cy,w/3,19, &br->flag,0,0,0,0, ""); uiDefButF(block,NUMSLI,B_NOP,"Spacing: ",cx+w/3,cy,w*2.0/3,19,&br->spacing,1.0,500,0,0,""); @@ -1163,8 +1162,6 @@ static void view3d_panel_brush(const bContext *C, ARegion *ar, short cntrl) uiBlockBeginAlign(block); curvemap_buttons(block, br->curve, (char)0, B_NOP, 0, &rect); uiBlockEndAlign(block); - - uiEndBlock(C, block); } static void sculptmode_draw_interface_tools(Scene *scene, uiBlock *block, unsigned short cx, unsigned short cy) @@ -1202,12 +1199,12 @@ static void sculptmode_draw_interface_tools(Scene *scene, uiBlock *block, unsign } -static void view3d_panel_object(const bContext *C, ARegion *ar, short cntrl) // VIEW3D_HANDLER_OBJECT +static void view3d_panel_object(const bContext *C, Panel *pa) { + uiBlock *block; Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); View3D *v3d= CTX_wm_view3d(C); - uiBlock *block; uiBut *bt; Object *ob= OBACT; TransformProperties *tfp; @@ -1221,19 +1218,8 @@ static void view3d_panel_object(const bContext *C, ARegion *ar, short cntrl) // v3d->properties_storage= MEM_callocN(sizeof(TransformProperties), "TransformProperties"); tfp= v3d->properties_storage; - block= uiBeginBlock(C, ar, "view3d_panel_object", UI_EMBOSS, UI_HELV); + block= uiLayoutFreeBlock(pa->layout); uiBlockSetHandleFunc(block, do_view3d_region_buttons, NULL); - - if((G.f & G_SCULPTMODE) && !obedit) { - if(!uiNewPanel(C, ar, block, "Transform Properties", "View3d", 10, 230, 318, 234)) - return; - } else if(G.f & G_PARTICLEEDIT && !obedit){ - if(!uiNewPanel(C, ar, block, "Transform Properties", "View3d", 10, 230, 318, 234)) - return; - } else { - if(!uiNewPanel(C, ar, block, "Transform Properties", "View3d", 10, 230, 318, 204)) - return; - } // XXX uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE); @@ -1268,24 +1254,24 @@ static void view3d_panel_object(const bContext *C, ARegion *ar, short cntrl) // v3d_posearmature_buts(block, v3d, ob, lim); } else if(G.f & G_WEIGHTPAINT) { - uiNewPanelTitle(block, "Weight Paint Properties"); + BLI_strncpy(pa->drawname, "Weight Paint Properties", sizeof(pa->drawname)); weight_paint_buttons(scene, block); } else if(G.f & (G_VERTEXPAINT|G_TEXTUREPAINT)) { static float hsv[3], old[3]; // used as temp mem for picker Brush **br = current_brush_source(scene); - uiNewPanelTitle(block, "Paint Properties"); + BLI_strncpy(pa->drawname, "Paint Properties", sizeof(pa->drawname)); if(br && *br) /* 'f' is for floating panel */ uiBlockPickerButtons(block, (*br)->rgb, hsv, old, hexcol, 'f', B_REDR); } else if(G.f & G_SCULPTMODE) { - uiNewPanelTitle(block, "Sculpt Properties"); + BLI_strncpy(pa->drawname, "Sculpt Properties", sizeof(pa->drawname)); sculptmode_draw_interface_tools(scene, block, 10, 150); } else if(G.f & G_PARTICLEEDIT){ - uiNewPanelTitle(block, "Particle Edit Properties"); + BLI_strncpy(pa->drawname, "Particle Edit Properties", sizeof(pa->drawname)); // XXX particle_edit_buttons(block); } else { @@ -1363,17 +1349,14 @@ static void view3d_panel_object(const bContext *C, ARegion *ar, short cntrl) // uiBlockEndAlign(block); } } -// XXX uiClearButLock(); - uiEndBlock(C, block); } -static void view3d_panel_background(const bContext *C, ARegion *ar, short cntrl) // VIEW3D_HANDLER_BACKGROUND +static void view3d_panel_background(const bContext *C, Panel *pa) { View3D *v3d= CTX_wm_view3d(C); uiBlock *block; - block= uiBeginBlock(C, ar, "view3d_panel_background", UI_EMBOSS, UI_HELV); - if(uiNewPanel(C, ar, block, "Background Image", "View3d", 340, 10, 318, 204)==0) return; + block= uiLayoutFreeBlock(pa->layout); uiBlockSetHandleFunc(block, do_view3d_region_buttons, NULL); if(v3d->flag & V3D_DISPBGPIC) { @@ -1402,11 +1385,10 @@ static void view3d_panel_background(const bContext *C, ARegion *ar, short cntrl) ED_image_uiblock_panel(C, block, &v3d->bgpic->ima, &v3d->bgpic->iuser, B_REDR, B_REDR); uiBlockEndAlign(block); } - uiEndBlock(C, block); } -static void view3d_panel_properties(const bContext *C, ARegion *ar, short cntrl) // VIEW3D_HANDLER_SETTINGS +static void view3d_panel_properties(const bContext *C, Panel *pa) { ScrArea *sa= CTX_wm_area(C); ARegion *arlast; @@ -1416,13 +1398,9 @@ static void view3d_panel_properties(const bContext *C, ARegion *ar, short cntrl) uiBlock *block; float *curs; - block= uiBeginBlock(C, ar, "view3d_panel_properties", UI_EMBOSS, UI_HELV); - if(uiNewPanel(C, ar, block, "View Properties", "View3d", 340, 30, 318, 254)==0) return; + block= uiLayoutFreeBlock(pa->layout); uiBlockSetHandleFunc(block, do_view3d_region_buttons, NULL); - /* to force height */ - uiNewPanelHeight(block, 264); - uiDefBut(block, LABEL, 1, "Grid:", 10, 220, 150, 19, NULL, 0.0, 0.0, 0, 0, ""); uiBlockBeginAlign(block); uiDefButF(block, NUM, B_REDR, "Spacing:", 10, 200, 140, 19, &v3d->grid, 0.001, 100.0, 10, 0, "Set the distance between grid lines"); @@ -1496,8 +1474,6 @@ static void view3d_panel_properties(const bContext *C, ARegion *ar, short cntrl) // uiDefButBitS(block, TOGN, ANIMFILTER_NOSKEY, B_REDR, "ShapeKey",235, -42, 75, 19, &v3d->keyflags, 0, 0, 0, 0, "Show keyframes for any available Shape Keys"); // } uiBlockEndAlign(block); - - uiEndBlock(C, block); } #if 0 @@ -1507,7 +1483,7 @@ static void view3d_panel_preview(bContext *C, ARegion *ar, short cntrl) // VIEW3 View3D *v3d= sa->spacedata.first; int ofsx, ofsy; - block= uiBeginBlock(C, ar, "view3d_panel_preview", UI_EMBOSS, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_panel_preview", UI_EMBOSS); uiPanelControl(UI_PNL_SOLID | UI_PNL_CLOSE | UI_PNL_SCALE | cntrl); uiSetPanelHandler(VIEW3D_HANDLER_PREVIEW); // for close and esc @@ -1526,13 +1502,12 @@ static void view3d_panel_preview(bContext *C, ARegion *ar, short cntrl) // VIEW3 } #endif -static void view3d_panel_gpencil(const bContext *C, ARegion *ar, short cntrl) // VIEW3D_HANDLER_GREASEPENCIL +static void view3d_panel_gpencil(const bContext *C, Panel *pa) { View3D *v3d= CTX_wm_view3d(C); uiBlock *block; - block= uiBeginBlock(C, ar, "view3d_panel_gpencil", UI_EMBOSS, UI_HELV); - if (uiNewPanel(C, ar, block, "Grease Pencil", "View3d", 100, 30, 318, 204)==0) return; + block= uiLayoutFreeBlock(pa->layout); /* allocate memory for gpd if drawing enabled (this must be done first or else we crash) */ if (v3d->flag2 & V3D_DISPGP) { @@ -1542,24 +1517,14 @@ static void view3d_panel_gpencil(const bContext *C, ARegion *ar, short cntrl) // if (v3d->flag2 & V3D_DISPGP) { // XXX bGPdata *gpd= v3d->gpd; - short newheight; - - /* this is a variable height panel, newpanel doesnt force new size on existing panels */ - /* so first we make it default height */ - uiNewPanelHeight(block, 204); /* draw button for showing gpencil settings and drawings */ uiDefButBitS(block, TOG, V3D_DISPGP, B_REDR, "Use Grease Pencil", 10, 225, 150, 20, &v3d->flag2, 0, 0, 0, 0, "Display freehand annotations overlay over this 3D View (draw using Shift-LMB)"); - - /* extend the panel if the contents won't fit */ -// newheight= draw_gpencil_panel(block, gpd, ar); - uiNewPanelHeight(block, newheight); } else { uiDefButBitS(block, TOG, V3D_DISPGP, B_REDR, "Use Grease Pencil", 10, 225, 150, 20, &v3d->flag2, 0, 0, 0, 0, "Display freehand annotations overlay over this 3D View"); uiDefBut(block, LABEL, 1, " ", 160, 180, 150, 20, NULL, 0.0, 0.0, 0, 0, ""); } - uiEndBlock(C, block); } static void delete_sketch_armature(bContext *C, void *arg1, void *arg2) @@ -1577,148 +1542,228 @@ static void assign_template_sketch_armature(bContext *C, void *arg1, void *arg2) int index = *(int*)arg1; BIF_setTemplate(C, index); } -static void view3d_panel_bonesketch_spaces(const bContext *C, ARegion *ar, short cntrl) + +static int view3d_panel_bonesketch_spaces_poll(const bContext *C, PanelType *pt) { Object *obedit = CTX_data_edit_object(C); + + /* replace with check call to sketching lib */ + return (obedit && obedit->type == OB_ARMATURE); +} +static void view3d_panel_bonesketch_spaces(const bContext *C, Panel *pa) +{ Scene *scene = CTX_data_scene(C); static int template_index; static char joint_label[128]; uiBlock *block; uiBut *but; char *bone_name; - int yco = 130, height = 140; + int yco = 130; int nb_joints; + static char subdiv_tooltip[4][64] = { + "Subdivide arcs based on a fixed number of bones", + "Subdivide arcs in bones of equal length", + "Subdivide arcs based on correlation", + "Retarget template to stroke" + }; - /* replace with check call to sketching lib */ - if (obedit && obedit->type == OB_ARMATURE) - { - static char subdiv_tooltip[4][64] = { - "Subdivide arcs based on a fixed number of bones", - "Subdivide arcs in bones of equal length", - "Subdivide arcs based on correlation", - "Retarget template to stroke" - }; + + block= uiLayoutFreeBlock(pa->layout); + uiBlockSetHandleFunc(block, do_view3d_region_buttons, NULL); - - block= uiBeginBlock(C, ar, "view3d_panel_bonesketch_spaces", UI_EMBOSS, UI_HELV); - if(uiNewPanel(C, ar, block, "Bone Sketching", "View3d", 340, 10, 318, height)==0) return; - uiBlockSetHandleFunc(block, do_view3d_region_buttons, NULL); + uiBlockBeginAlign(block); + + /* use real flag instead of 1 */ + uiDefButBitC(block, TOG, BONE_SKETCHING, B_REDR, "Use Bone Sketching", 10, yco, 160, 20, &scene->toolsettings->bone_sketching, 0, 0, 0, 0, "Use sketching to create and edit bones"); + uiDefButBitC(block, TOG, BONE_SKETCHING_ADJUST, B_REDR, "A", 170, yco, 20, 20, &scene->toolsettings->bone_sketching, 0, 0, 0, 0, "Adjust strokes by drawing near them"); + uiDefButBitC(block, TOG, BONE_SKETCHING_QUICK, B_REDR, "Q", 190, yco, 20, 20, &scene->toolsettings->bone_sketching, 0, 0, 0, 0, "Automatically convert and delete on stroke end"); + yco -= 20; - uiNewPanelHeight(block, height); + but = uiDefBut(block, BUT, B_REDR, "Convert", 10,yco,100,20, 0, 0, 0, 0, 0, "Convert sketch to armature"); + uiButSetFunc(but, convert_sketch_armature, NULL, NULL); + + but = uiDefBut(block, BUT, B_REDR, "Delete", 110,yco,100,20, 0, 0, 0, 0, 0, "Delete sketch"); + uiButSetFunc(but, delete_sketch_armature, NULL, NULL); + yco -= 20; + + uiBlockEndAlign(block); + + uiBlockBeginAlign(block); + uiDefButC(block, MENU, B_REDR, "Subdivision Method%t|Length%x1|Adaptative%x2|Fixed%x0|Template%x3", 10,yco,60,19, &scene->toolsettings->bone_sketching_convert, 0, 0, 0, 0, subdiv_tooltip[(unsigned char)scene->toolsettings->bone_sketching_convert]); + + switch(scene->toolsettings->bone_sketching_convert) + { + case SK_CONVERT_CUT_LENGTH: + uiDefButF(block, NUM, B_REDR, "Lim:", 70, yco, 140, 19, &scene->toolsettings->skgen_length_limit,0.1,50.0, 10, 0, "Maximum length of the subdivided bones"); + yco -= 20; + break; + case SK_CONVERT_CUT_ADAPTATIVE: + uiDefButF(block, NUM, B_REDR, "Thres:", 70, yco, 140, 19, &scene->toolsettings->skgen_correlation_limit,0.0, 1.0, 0.01, 0, "Correlation threshold for subdivision"); + yco -= 20; + break; + default: + case SK_CONVERT_CUT_FIXED: + uiDefButC(block, NUM, B_REDR, "Num:", 70, yco, 140, 19, &scene->toolsettings->skgen_subdivision_number,1, 100, 1, 5, "Number of subdivided bones"); + yco -= 20; + break; + case SK_CONVERT_RETARGET: + uiDefButC(block, ROW, B_NOP, "No", 70, yco, 40,19, &scene->toolsettings->skgen_retarget_roll, 0, 0, 0, 0, "No special roll treatment"); + uiDefButC(block, ROW, B_NOP, "View", 110, yco, 50,19, &scene->toolsettings->skgen_retarget_roll, 0, SK_RETARGET_ROLL_VIEW, 0, 0, "Roll bones perpendicular to view"); + uiDefButC(block, ROW, B_NOP, "Joint", 160, yco, 50,19, &scene->toolsettings->skgen_retarget_roll, 0, SK_RETARGET_ROLL_JOINT, 0, 0, "Roll bones relative to joint bend"); + yco -= 30; + + uiBlockEndAlign(block); + uiBlockBeginAlign(block); + /* button here to select what to do (copy or not), template, ...*/ + + BIF_makeListTemplates(C); + template_index = BIF_currentTemplate(C); + + but = uiDefButI(block, MENU, B_REDR, BIF_listTemplates(C), 10,yco,200,19, &template_index, 0, 0, 0, 0, "Template"); + uiButSetFunc(but, assign_template_sketch_armature, &template_index, NULL); - /* use real flag instead of 1 */ - uiDefButBitC(block, TOG, BONE_SKETCHING, B_REDR, "Use Bone Sketching", 10, yco, 160, 20, &scene->toolsettings->bone_sketching, 0, 0, 0, 0, "Use sketching to create and edit bones"); - uiDefButBitC(block, TOG, BONE_SKETCHING_ADJUST, B_REDR, "A", 170, yco, 20, 20, &scene->toolsettings->bone_sketching, 0, 0, 0, 0, "Adjust strokes by drawing near them"); - uiDefButBitC(block, TOG, BONE_SKETCHING_QUICK, B_REDR, "Q", 190, yco, 20, 20, &scene->toolsettings->bone_sketching, 0, 0, 0, 0, "Automatically convert and delete on stroke end"); yco -= 20; - but = uiDefBut(block, BUT, B_REDR, "Convert", 10,yco,100,20, 0, 0, 0, 0, 0, "Convert sketch to armature"); - uiButSetFunc(but, convert_sketch_armature, NULL, NULL); - - but = uiDefBut(block, BUT, B_REDR, "Delete", 110,yco,100,20, 0, 0, 0, 0, 0, "Delete sketch"); - uiButSetFunc(but, delete_sketch_armature, NULL, NULL); + uiDefButF(block, NUM, B_NOP, "A:", 10, yco, 66,19, &scene->toolsettings->skgen_retarget_angle_weight, 0, 10, 1, 0, "Angle Weight"); + uiDefButF(block, NUM, B_NOP, "L:", 76, yco, 67,19, &scene->toolsettings->skgen_retarget_length_weight, 0, 10, 1, 0, "Length Weight"); + uiDefButF(block, NUM, B_NOP, "D:", 143,yco, 67,19, &scene->toolsettings->skgen_retarget_distance_weight, 0, 10, 1, 0, "Distance Weight"); yco -= 20; - uiBlockEndAlign(block); + uiDefBut(block, TEX,B_REDR,"S:", 10, yco, 90, 20, scene->toolsettings->skgen_side_string, 0.0, 8.0, 0, 0, "Text to replace &S with"); + uiDefBut(block, TEX,B_REDR,"N:", 100, yco, 90, 20, scene->toolsettings->skgen_num_string, 0.0, 8.0, 0, 0, "Text to replace &N with"); + uiDefIconButBitC(block, TOG, SK_RETARGET_AUTONAME, B_NOP, ICON_AUTO,190,yco,20,20, &scene->toolsettings->skgen_retarget_options, 0, 0, 0, 0, "Use Auto Naming"); + yco -= 20; - uiBlockBeginAlign(block); + /* auto renaming magic */ + uiBlockEndAlign(block); - uiDefButC(block, MENU, B_REDR, "Subdivision Method%t|Length%x1|Adaptative%x2|Fixed%x0|Template%x3", 10,yco,60,19, &scene->toolsettings->bone_sketching_convert, 0, 0, 0, 0, subdiv_tooltip[(unsigned char)scene->toolsettings->bone_sketching_convert]); + nb_joints = BIF_nbJointsTemplate(C); - switch(scene->toolsettings->bone_sketching_convert) + if (nb_joints == -1) { - case SK_CONVERT_CUT_LENGTH: - uiDefButF(block, NUM, B_REDR, "Lim:", 70, yco, 140, 19, &scene->toolsettings->skgen_length_limit,0.1,50.0, 10, 0, "Maximum length of the subdivided bones"); - yco -= 20; - break; - case SK_CONVERT_CUT_ADAPTATIVE: - uiDefButF(block, NUM, B_REDR, "Thres:", 70, yco, 140, 19, &scene->toolsettings->skgen_correlation_limit,0.0, 1.0, 0.01, 0, "Correlation threshold for subdivision"); - yco -= 20; - break; - default: - case SK_CONVERT_CUT_FIXED: - uiDefButC(block, NUM, B_REDR, "Num:", 70, yco, 140, 19, &scene->toolsettings->skgen_subdivision_number,1, 100, 1, 5, "Number of subdivided bones"); - yco -= 20; - break; - case SK_CONVERT_RETARGET: - uiDefButC(block, ROW, B_NOP, "No", 70, yco, 40,19, &scene->toolsettings->skgen_retarget_roll, 0, 0, 0, 0, "No special roll treatment"); - uiDefButC(block, ROW, B_NOP, "View", 110, yco, 50,19, &scene->toolsettings->skgen_retarget_roll, 0, SK_RETARGET_ROLL_VIEW, 0, 0, "Roll bones perpendicular to view"); - uiDefButC(block, ROW, B_NOP, "Joint", 160, yco, 50,19, &scene->toolsettings->skgen_retarget_roll, 0, SK_RETARGET_ROLL_JOINT, 0, 0, "Roll bones relative to joint bend"); - yco -= 30; + //XXX + //nb_joints = G.totvertsel; + } + + bone_name = BIF_nameBoneTemplate(C); + + BLI_snprintf(joint_label, 32, "%i joints: %s", nb_joints, bone_name); + + uiDefBut(block, LABEL, 1, joint_label, 10, yco, 200, 20, NULL, 0.0, 0.0, 0, 0, ""); + yco -= 20; + break; + } - uiBlockEndAlign(block); + uiBlockEndAlign(block); + + uiDefButBitS(block, TOG, SCE_SNAP_PEEL_OBJECT, B_NOP, "Peel Objects", 10, yco, 200, 20, &scene->snap_flag, 0, 0, 0, 0, "Peel whole objects as one"); +} - uiBlockBeginAlign(block); - /* button here to select what to do (copy or not), template, ...*/ - BIF_makeListTemplates(C); - template_index = BIF_currentTemplate(C); - - but = uiDefButI(block, MENU, B_REDR, BIF_listTemplates(C), 10,yco,200,19, &template_index, 0, 0, 0, 0, "Template"); - uiButSetFunc(but, assign_template_sketch_armature, &template_index, NULL); - - yco -= 20; - - uiDefButF(block, NUM, B_NOP, "A:", 10, yco, 66,19, &scene->toolsettings->skgen_retarget_angle_weight, 0, 10, 1, 0, "Angle Weight"); - uiDefButF(block, NUM, B_NOP, "L:", 76, yco, 67,19, &scene->toolsettings->skgen_retarget_length_weight, 0, 10, 1, 0, "Length Weight"); - uiDefButF(block, NUM, B_NOP, "D:", 143,yco, 67,19, &scene->toolsettings->skgen_retarget_distance_weight, 0, 10, 1, 0, "Distance Weight"); - yco -= 20; - - uiDefBut(block, TEX,B_REDR,"S:", 10, yco, 90, 20, scene->toolsettings->skgen_side_string, 0.0, 8.0, 0, 0, "Text to replace &S with"); - uiDefBut(block, TEX,B_REDR,"N:", 100, yco, 90, 20, scene->toolsettings->skgen_num_string, 0.0, 8.0, 0, 0, "Text to replace &N with"); - uiDefIconButBitC(block, TOG, SK_RETARGET_AUTONAME, B_NOP, ICON_AUTO,190,yco,20,20, &scene->toolsettings->skgen_retarget_options, 0, 0, 0, 0, "Use Auto Naming"); - yco -= 20; - - /* auto renaming magic */ - uiBlockEndAlign(block); - - nb_joints = BIF_nbJointsTemplate(C); +/* op->invoke */ +static void redo_cb(bContext *C, void *arg_op, void *arg2) +{ + wmOperator *lastop= arg_op; - if (nb_joints == -1) - { - //XXX - //nb_joints = G.totvertsel; - } - - bone_name = BIF_nameBoneTemplate(C); - - BLI_snprintf(joint_label, 32, "%i joints: %s", nb_joints, bone_name); - - uiDefBut(block, LABEL, 1, joint_label, 10, yco, 200, 20, NULL, 0.0, 0.0, 0, 0, ""); - yco -= 20; - break; - } - - uiBlockEndAlign(block); + if(lastop) { + int retval; - uiDefButBitS(block, TOG, SCE_SNAP_PEEL_OBJECT, B_NOP, "Peel Objects", 10, yco, 200, 20, &scene->snap_flag, 0, 0, 0, 0, "Peel whole objects as one"); - - if(yco < 0) uiNewPanelHeight(block, height-yco); + printf("operator redo %s\n", lastop->type->name); + ED_undo_pop(C); + retval= WM_operator_repeat(C, lastop); + if((retval & OPERATOR_FINISHED)==0) { + printf("operator redo failed %s\n", lastop->type->name); + ED_undo_redo(C); + } } } -void view3d_buttons_area_defbuts(const bContext *C, ARegion *ar) +static void view3d_panel_operator_redo(const bContext *C, Panel *pa) { + wmWindowManager *wm= CTX_wm_manager(C); + wmOperator *op; + PointerRNA ptr; + uiBlock *block; - view3d_panel_object(C, ar, 0); - view3d_panel_properties(C, ar, 0); - view3d_panel_background(C, ar, 0); - if(G.f & (G_SCULPTMODE|G_TEXTUREPAINT|G_VERTEXPAINT|G_WEIGHTPAINT)) - view3d_panel_brush(C, ar, 0); - // XXX view3d_panel_preview(C, ar, 0); - view3d_panel_transform_spaces(C, ar, 0); - if(0) - view3d_panel_gpencil(C, ar, 0); + block= uiLayoutBlock(pa->layout); + + /* only for operators that are registered and did an undo push */ + for(op= wm->operators.last; op; op= op->prev) + if((op->type->flag & OPTYPE_REGISTER) && (op->type->flag & OPTYPE_UNDO)) + break; + + if(op==NULL) + return; - view3d_panel_bonesketch_spaces(C, ar, 0); + uiBlockSetFunc(block, redo_cb, op, NULL); - uiDrawPanels(C, 1); /* 1 = align */ - uiMatchPanelsView2d(ar); /* sets v2d->totrct */ + if(!op->properties) { + IDPropertyTemplate val = {0}; + op->properties= IDP_New(IDP_GROUP, val, "wmOperatorProperties"); + } + RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr); + uiDefAutoButsRNA(C, pa->layout, &ptr); } +void view3d_buttons_register(ARegionType *art) +{ + PanelType *pt; + + pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel object"); + strcpy(pt->idname, "VIEW3D_PT_object"); + strcpy(pt->label, "Transform Properties"); + pt->draw= view3d_panel_object; + BLI_addtail(&art->paneltypes, pt); + + pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel properties"); + strcpy(pt->idname, "VIEW3D_PT_properties"); + strcpy(pt->label, "View Properties"); + pt->draw= view3d_panel_properties; + BLI_addtail(&art->paneltypes, pt); + + pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel background"); + strcpy(pt->idname, "VIEW3D_PT_background"); + strcpy(pt->label, "Background Image"); + pt->draw= view3d_panel_background; + BLI_addtail(&art->paneltypes, pt); + + pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel brush"); + strcpy(pt->idname, "VIEW3D_PT_brush"); + strcpy(pt->label, "Brush"); + pt->draw= view3d_panel_brush; + pt->poll= view3d_panel_brush_poll; + BLI_addtail(&art->paneltypes, pt); + + pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel transform spaces"); + strcpy(pt->idname, "VIEW3D_PT_transform spaces"); + strcpy(pt->label, "Transform Orientations"); + pt->draw= view3d_panel_transform_spaces; + BLI_addtail(&art->paneltypes, pt); + + /*pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel gpencil"); + strcpy(pt->idname, "VIEW3D_PT_gpencil"); + strcpy(pt->label, "Greas Pencil"); + pt->draw= view3d_panel_gpencil; + BLI_addtail(&art->paneltypes, pt);*/ + + pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel bonesketch spaces"); + strcpy(pt->idname, "VIEW3D_PT_bonesketch_spaces"); + strcpy(pt->label, "Bone Sketching"); + pt->draw= view3d_panel_bonesketch_spaces; + pt->poll= view3d_panel_bonesketch_spaces_poll; + BLI_addtail(&art->paneltypes, pt); + + pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel redo"); + strcpy(pt->idname, "VIEW3D_PT_redo"); + strcpy(pt->label, "Last Operator"); + pt->draw= view3d_panel_operator_redo; + BLI_addtail(&art->paneltypes, pt); + + // XXX view3d_panel_preview(C, ar, 0); +} static int view3d_properties(bContext *C, wmOperator *op) { diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 00843a58ba7..bbf0279692a 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -69,9 +69,9 @@ #include "BIF_gl.h" #include "BIF_glutil.h" -#include "BMF_Api.h" #include "WM_api.h" +#include "BLF_api.h" #include "ED_armature.h" #include "ED_keyframing.h" @@ -232,27 +232,6 @@ static void drawgrid_draw(ARegion *ar, float wx, float wy, float x, float y, flo } -// not intern, called in editobject for constraint axis too -void make_axis_color(char *col, char *col2, char axis) -{ - if(axis=='x') { - col2[0]= col[0]>219?255:col[0]+36; - col2[1]= col[1]<26?0:col[1]-26; - col2[2]= col[2]<26?0:col[2]-26; - } - else if(axis=='y') { - col2[0]= col[0]<46?0:col[0]-36; - col2[1]= col[1]>189?255:col[1]+66; - col2[2]= col[2]<46?0:col[2]-36; - } - else { - col2[0]= col[0]<26?0:col[0]-26; - col2[1]= col[1]<26?0:col[1]-26; - col2[2]= col[2]>209?255:col[2]+46; - } - -} - static void drawgrid(ARegion *ar, View3D *v3d) { /* extern short bgpicmode; */ @@ -365,15 +344,15 @@ static void drawgrid(ARegion *ar, View3D *v3d) /* center cross */ if( ELEM(rv3d->view, V3D_VIEW_RIGHT, V3D_VIEW_LEFT)) - make_axis_color(col, col2, 'y'); - else make_axis_color(col, col2, 'x'); + UI_make_axis_color(col, col2, 'y'); + else UI_make_axis_color(col, col2, 'x'); glColor3ubv((GLubyte *)col2); fdrawline(0.0, y, (float)ar->winx, y); if( ELEM(rv3d->view, V3D_VIEW_TOP, V3D_VIEW_BOTTOM)) - make_axis_color(col, col2, 'y'); - else make_axis_color(col, col2, 'z'); + UI_make_axis_color(col, col2, 'y'); + else UI_make_axis_color(col, col2, 'z'); glColor3ubv((GLubyte *)col2); fdrawline(x, 0.0, x, (float)ar->winy); @@ -412,7 +391,7 @@ static void drawfloor(Scene *scene, View3D *v3d) if(a==0) { /* check for the 'show Y axis' preference */ if (v3d->gridflag & V3D_SHOW_Y) { - make_axis_color(col, col2, 'y'); + UI_make_axis_color(col, col2, 'y'); glColor3ubv((GLubyte *)col2); draw_line = 1; @@ -451,7 +430,7 @@ static void drawfloor(Scene *scene, View3D *v3d) if(a==0) { /* check for the 'show X axis' preference */ if (v3d->gridflag & V3D_SHOW_X) { - make_axis_color(col, col2, 'x'); + UI_make_axis_color(col, col2, 'x'); glColor3ubv((GLubyte *)col2); draw_line = 1; @@ -488,7 +467,7 @@ static void drawfloor(Scene *scene, View3D *v3d) /* draw the Z axis line */ /* check for the 'show Z axis' preference */ if (v3d->gridflag & V3D_SHOW_Z) { - make_axis_color(col, col2, 'z'); + UI_make_axis_color(col, col2, 'z'); glColor3ubv((GLubyte *)col2); glBegin(GL_LINE_STRIP); @@ -567,7 +546,7 @@ static void draw_view_axis(RegionView3D *rv3d) vec[1] = vec[2] = 0; QuatMulVecf(rv3d->viewquat, vec); - make_axis_color((char *)gridcol, (char *)col, 'x'); + UI_make_axis_color((char *)gridcol, (char *)col, 'x'); rgb_to_hsv(col[0]/255.0f, col[1]/255.0f, col[2]/255.0f, &h, &s, &v); s = s<0.5 ? s+0.5 : 1.0; v = 0.3; @@ -579,8 +558,7 @@ static void draw_view_axis(RegionView3D *rv3d) dy = vec[1] * k; fdrawline(start, start + ydisp, start + dx, start + dy + ydisp); if (fabs(dx) > toll || fabs(dy) > toll) { - glRasterPos2i(start + dx + 2, start + dy + ydisp + 2); - BMF_DrawString(G.fonts, "x"); + BLF_draw_default(start + dx + 2, start + dy + ydisp + 2, 0.0f, "x"); } /* Y */ @@ -588,7 +566,7 @@ static void draw_view_axis(RegionView3D *rv3d) vec[0] = vec[2] = 0; QuatMulVecf(rv3d->viewquat, vec); - make_axis_color((char *)gridcol, (char *)col, 'y'); + UI_make_axis_color((char *)gridcol, (char *)col, 'y'); rgb_to_hsv(col[0]/255.0f, col[1]/255.0f, col[2]/255.0f, &h, &s, &v); s = s<0.5 ? s+0.5 : 1.0; v = 0.3; @@ -600,8 +578,7 @@ static void draw_view_axis(RegionView3D *rv3d) dy = vec[1] * k; fdrawline(start, start + ydisp, start + dx, start + dy + ydisp); if (fabs(dx) > toll || fabs(dy) > toll) { - glRasterPos2i(start + dx + 2, start + dy + ydisp + 2); - BMF_DrawString(G.fonts, "y"); + BLF_draw_default(start + dx + 2, start + dy + ydisp + 2, 0.0f, "y"); } /* Z */ @@ -609,7 +586,7 @@ static void draw_view_axis(RegionView3D *rv3d) vec[1] = vec[0] = 0; QuatMulVecf(rv3d->viewquat, vec); - make_axis_color((char *)gridcol, (char *)col, 'z'); + UI_make_axis_color((char *)gridcol, (char *)col, 'z'); rgb_to_hsv(col[0]/255.0f, col[1]/255.0f, col[2]/255.0f, &h, &s, &v); s = s<0.5 ? s+0.5 : 1.0; v = 0.5; @@ -621,8 +598,7 @@ static void draw_view_axis(RegionView3D *rv3d) dy = vec[1] * k; fdrawline(start, start + ydisp, start + dx, start + dy + ydisp); if (fabs(dx) > toll || fabs(dy) > toll) { - glRasterPos2i(start + dx + 2, start + dy + ydisp + 2); - BMF_DrawString(G.fonts, "z"); + BLF_draw_default(start + dx + 2, start + dy + ydisp + 2, 0.0f, "z"); } /* restore line-width */ @@ -714,8 +690,7 @@ static void draw_viewport_name(ARegion *ar, View3D *v3d) if (printable) { UI_ThemeColor(TH_TEXT_HI); - glRasterPos2i(10, ar->winy-20); - BMF_DrawString(G.fonts, printable); + BLF_draw_default(10, ar->winy-20, 0.0f, printable); } if (v3d->localview) { @@ -820,7 +795,7 @@ static void draw_selected_name(Scene *scene, Object *ob, View3D *v3d) } /* colour depends on whether there is a keyframe */ - if (id_frame_has_keyframe((ID *)ob, /*frame_to_float(scene, CFRA)*/(float)(CFRA), v3d->keyflags)) + if (id_frame_has_keyframe((ID *)ob, /*frame_to_float(scene, CFRA)*/(float)(CFRA), v3d->keyflags)) UI_ThemeColor(TH_VERTEX_SELECT); else UI_ThemeColor(TH_TEXT_HI); @@ -838,9 +813,8 @@ static void draw_selected_name(Scene *scene, Object *ob, View3D *v3d) if (U.uiflag & USER_SHOW_ROTVIEWICON) offset = 14 + (U.rvisize * 2); - - glRasterPos2i(offset, 10); - BMF_DrawString(G.fonts, info); + + BLF_draw_default(offset, 10, 0.0f, info); } static void view3d_get_viewborder_size(Scene *scene, ARegion *ar, float size_r[2]) @@ -1020,9 +994,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) /* camera name - draw in highlighted text color */ if (ca && (ca->flag & CAM_SHOWNAME)) { UI_ThemeColor(TH_TEXT_HI); - glRasterPos2f(x1, y1-15); - - BMF_DrawString(G.font, v3d->camera->id.name+2); + BLF_draw_default(x1, y1-15, 0.0f, v3d->camera->id.name+2); UI_ThemeColor(TH_WIRE); } @@ -1858,8 +1830,10 @@ static CustomDataMask get_viewedit_datamask(bScreen *screen) } /* check if we need mcols due to vertex paint or weightpaint */ - if(G.f & G_VERTEXPAINT || G.f & G_WEIGHTPAINT) + if(G.f & G_VERTEXPAINT) mask |= CD_MASK_MCOL; + if(G.f & G_WEIGHTPAINT) + mask |= CD_MASK_WEIGHT_MCOL; if(G.f & G_SCULPTMODE) mask |= CD_MASK_MDISPS; diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 20f24ba3958..63e8ae61124 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -93,8 +93,6 @@ #include "UI_resources.h" #include "UI_view2d.h" -#include "BMF_Api.h" - #include "view3d_intern.h" @@ -357,7 +355,7 @@ static uiBlock *view3d_view_camerasmenu(bContext *C, ARegion *ar, void *arg_unus int i=1; char camname[48]; - block= uiBeginBlock(C, ar, "view3d_view_camerasmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_view_camerasmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_view_camerasmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Set Active Object as Active Camera|Ctrl NumPad 0", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, ""); @@ -443,7 +441,7 @@ static uiBlock *view3d_view_cameracontrolsmenu(bContext *C, ARegion *ar, void *a uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "view3d_view_cameracontrolsmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_view_cameracontrolsmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_view_cameracontrolsmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Camera Fly Mode|Shift F", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 11, ""); @@ -534,7 +532,7 @@ static uiBlock *view3d_view_alignviewmenu(bContext *C, ARegion *ar, void *arg_un Object *obedit = CTX_data_edit_object(C); short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "view3d_view_alignviewmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_view_alignviewmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_view_alignviewmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Center View to Cursor|C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, ""); @@ -621,82 +619,82 @@ static void do_view3d_viewmenu(bContext *C, void *arg, int event) } #endif -static void view3d_view_viewnavmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void view3d_view_viewnavmenu(bContext *C, uiLayout *layout, void *arg_unused) { -// uiMenuItemO(head, 0, "VIEW3D_OT_view_fly_mode"); +// uiItemO(layout, NULL, 0, "VIEW3D_OT_view_fly_mode"); -// uiMenuSeparator(head); +// uiItemS(layout); - uiMenuItemsEnumO(head, "VIEW3D_OT_view_orbit", "type"); + uiItemsEnumO(layout, "VIEW3D_OT_view_orbit", "type"); - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemsEnumO(head, "VIEW3D_OT_view_pan", "type"); + uiItemsEnumO(layout, "VIEW3D_OT_view_pan", "type"); - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemFloatO(head, "Zoom in", 0, "VIEW3D_OT_zoom", "delta", 1.0f); - uiMenuItemFloatO(head, "Zoom out", 0, "VIEW3D_OT_zoom", "delta", -1.0f); + uiItemFloatO(layout, "Zoom in", 0, "VIEW3D_OT_zoom", "delta", 1.0f); + uiItemFloatO(layout, "Zoom out", 0, "VIEW3D_OT_zoom", "delta", -1.0f); } -static void view3d_view_alignviewmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void view3d_view_alignviewmenu(bContext *C, uiLayout *layout, void *arg_unused) { } -static void view3d_viewmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void view3d_viewmenu(bContext *C, uiLayout *layout, void *arg_unused) { ScrArea *sa= CTX_wm_area(C); -// uiMenuItemO(head, ICON_MENU_PANEL, "VIEW3D_OT_toggle_transform_orientations_panel"); // Transform Orientations... -// uiMenuItemO(head, ICON_MENU_PANEL, "VIEW3D_OT_toggle_render_preview_panel"); // render preview... -// uiMenuItemO(head, ICON_MENU_PANEL, "VIEW3D_OT_toggle_view_properties_panel"); // View Properties.... -// uiMenuItemO(head, ICON_MENU_PANEL, "VIEW3D_OT_toggle_background_image_panel"); // Background Image.... -// uiMenuItemO(head, ICON_MENU_PANEL, "VIEW3D_OT_toggle_grease_pencil_panel"); // Grease Pencil.... +// uiItemO(layout, ICON_MENU_PANEL, "VIEW3D_OT_toggle_transform_orientations_panel"); // Transform Orientations... +// uiItemO(layout, ICON_MENU_PANEL, "VIEW3D_OT_toggle_render_preview_panel"); // render preview... +// uiItemO(layout, ICON_MENU_PANEL, "VIEW3D_OT_toggle_view_properties_panel"); // View Properties.... +// uiItemO(layout, ICON_MENU_PANEL, "VIEW3D_OT_toggle_background_image_panel"); // Background Image.... +// uiItemO(layout, ICON_MENU_PANEL, "VIEW3D_OT_toggle_grease_pencil_panel"); // Grease Pencil.... -// uiMenuSeparator(head); +// uiItemS(layout); - uiMenuItemEnumO(head, "", 0, "VIEW3D_OT_viewnumpad", "type", V3D_VIEW_CAMERA); - uiMenuItemEnumO(head, "", 0, "VIEW3D_OT_viewnumpad", "type", V3D_VIEW_TOP); - uiMenuItemEnumO(head, "", 0, "VIEW3D_OT_viewnumpad", "type", V3D_VIEW_FRONT); - uiMenuItemEnumO(head, "", 0, "VIEW3D_OT_viewnumpad", "type", V3D_VIEW_RIGHT); + uiItemEnumO(layout, NULL, 0, "VIEW3D_OT_viewnumpad", "type", V3D_VIEW_CAMERA); + uiItemEnumO(layout, NULL, 0, "VIEW3D_OT_viewnumpad", "type", V3D_VIEW_TOP); + uiItemEnumO(layout, NULL, 0, "VIEW3D_OT_viewnumpad", "type", V3D_VIEW_FRONT); + uiItemEnumO(layout, NULL, 0, "VIEW3D_OT_viewnumpad", "type", V3D_VIEW_RIGHT); - //uiMenuLevel(head, "Cameras", view3d_view_camerasmenu); + //uiItemMenuF(layout, "Cameras", view3d_view_camerasmenu); - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemO(head, 0, "VIEW3D_OT_view_persportho"); + uiItemO(layout, NULL, 0, "VIEW3D_OT_view_persportho"); - uiMenuSeparator(head); + uiItemS(layout); -// uiMenuItemO(head, 0, "VIEW3D_OT_view_show_all_layers"); +// uiItemO(layout, NULL, 0, "VIEW3D_OT_view_show_all_layers"); -// uiMenuSeparator(head); +// uiItemS(layout); -// uiMenuItemO(head, 0, "VIEW3D_OT_view_local_view"); -// uiMenuItemO(head, 0, "VIEW3D_OT_view_global_view"); +// uiItemO(layout, NULL, 0, "VIEW3D_OT_view_local_view"); +// uiItemO(layout, NULL, 0, "VIEW3D_OT_view_global_view"); -// uiMenuSeparator(head); +// uiItemS(layout); - uiMenuLevel(head, "View Navigation", view3d_view_viewnavmenu); - uiMenuLevel(head, "Align View", view3d_view_alignviewmenu); + uiItemMenuF(layout, "View Navigation", 0, view3d_view_viewnavmenu); + uiItemMenuF(layout, "Align View", 0, view3d_view_alignviewmenu); - uiMenuSeparator(head); + uiItemS(layout); - uiMenuContext(head, WM_OP_INVOKE_REGION_WIN); + uiLayoutContext(layout, WM_OP_INVOKE_REGION_WIN); - uiMenuItemO(head, 0, "VIEW3D_OT_clipping"); - uiMenuItemO(head, 0, "VIEW3D_OT_zoom_border"); + uiItemO(layout, NULL, 0, "VIEW3D_OT_clipping"); + uiItemO(layout, NULL, 0, "VIEW3D_OT_zoom_border"); - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemO(head, 0, "VIEW3D_OT_viewcenter"); - uiMenuItemO(head, 0, "VIEW3D_OT_viewhome"); + uiItemO(layout, NULL, 0, "VIEW3D_OT_viewcenter"); + uiItemO(layout, NULL, 0, "VIEW3D_OT_viewhome"); - uiMenuSeparator(head); + uiItemS(layout); - if(sa->full) uiMenuItemO(head, 0, "SCREEN_OT_screen_full_area"); // "Tile Window", Ctrl UpArrow - else uiMenuItemO(head, 0, "SCREEN_OT_screen_full_area"); // "Maximize Window", Ctr DownArrow + if(sa->full) uiItemO(layout, NULL, 0, "SCREEN_OT_screen_full_area"); // "Tile Window", Ctrl UpArrow + else uiItemO(layout, NULL, 0, "SCREEN_OT_screen_full_area"); // "Maximize Window", Ctr DownArrow } #if 0 static uiBlock *view3d_viewmenu(bContext *C, ARegion *ar, void *arg_unused) @@ -707,7 +705,7 @@ static uiBlock *view3d_viewmenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "view3d_viewmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_viewmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_viewmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Transform Orientations...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 20, ""); @@ -838,7 +836,7 @@ static uiBlock *view3d_select_object_typemenu(bContext *C, ARegion *ar, void *ar uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_select_object_typemenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_select_object_typemenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_select_object_typemenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Mesh", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -900,7 +898,7 @@ static uiBlock *view3d_select_object_layermenu(bContext *C, ARegion *ar, void *a uiBlock *block; short xco= 0, yco = 20, menuwidth = 22; - block= uiBeginBlock(C, ar, "view3d_select_object_layermenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_select_object_layermenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_select_object_layermenu, NULL); uiDefBut(block, BUTM, 1, "1", xco, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -950,7 +948,7 @@ static uiBlock *view3d_select_object_linkedmenu(bContext *C, ARegion *ar, void * uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_select_object_linkedmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_select_object_linkedmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_select_object_linkedmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Object Ipo|Shift L, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -988,7 +986,7 @@ static uiBlock *view3d_select_object_groupedmenu(bContext *C, ARegion *ar, void uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_select_object_groupedmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_select_object_groupedmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_select_object_groupedmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Children|Shift G, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -1015,7 +1013,7 @@ static uiBlock *view3d_select_objectmenu(bContext *C, ARegion *ar, void *arg_unu uiBlock *block; // short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "view3d_select_objectmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_select_objectmenu", UI_EMBOSSP); #if 0 uiBlockSetButmFunc(block, do_view3d_select_objectmenu, NULL); @@ -1135,7 +1133,7 @@ static uiBlock *view3d_select_meshmenu(bContext *C, ARegion *ar, void *arg_unuse uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "view3d_select_meshmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_select_meshmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_select_meshmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -1209,39 +1207,39 @@ static uiBlock *view3d_select_meshmenu(bContext *C, ARegion *ar, void *arg_unuse return block; } -static void view3d_select_curvemenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void view3d_select_curvemenu(bContext *C, uiLayout *layout, void *arg_unused) { Object *obedit= CTX_data_edit_object(C); - uiMenuItemO(head, 0, "VIEW3D_OT_select_border"); - uiMenuItemO(head, 0, "VIEW3D_OT_select_circle"); + uiItemO(layout, NULL, 0, "VIEW3D_OT_select_border"); + uiItemO(layout, NULL, 0, "VIEW3D_OT_select_circle"); - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemO(head, 0, "CURVE_OT_select_all_toggle"); - uiMenuItemO(head, 0, "CURVE_OT_select_invert"); - uiMenuItemO(head, 0, "CURVE_OT_select_random"); // Random... - uiMenuItemO(head, 0, "CURVE_OT_select_every_nth"); // Every Nth.. + uiItemO(layout, NULL, 0, "CURVE_OT_select_all_toggle"); + uiItemO(layout, NULL, 0, "CURVE_OT_select_invert"); + uiItemO(layout, NULL, 0, "CURVE_OT_select_random"); // Random... + uiItemO(layout, NULL, 0, "CURVE_OT_select_every_nth"); // Every Nth.. - uiMenuSeparator(head); + uiItemS(layout); if(obedit->type == OB_SURF) { - uiMenuItemO(head, 0, "CURVE_OT_select_row"); + uiItemO(layout, NULL, 0, "CURVE_OT_select_row"); } else { - uiMenuItemO(head, 0, "CURVE_OT_de_select_first"); - uiMenuItemO(head, 0, "CURVE_OT_de_select_last"); - uiMenuItemO(head, 0, "CURVE_OT_select_next"); - uiMenuItemO(head, 0, "CURVE_OT_select_previous"); + uiItemO(layout, NULL, 0, "CURVE_OT_de_select_first"); + uiItemO(layout, NULL, 0, "CURVE_OT_de_select_last"); + uiItemO(layout, NULL, 0, "CURVE_OT_select_next"); + uiItemO(layout, NULL, 0, "CURVE_OT_select_previous"); } - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemO(head, 0, "CURVE_OT_select_more"); - uiMenuItemO(head, 0, "CURVE_OT_select_less"); + uiItemO(layout, NULL, 0, "CURVE_OT_select_more"); + uiItemO(layout, NULL, 0, "CURVE_OT_select_less"); /* commented out because it seems to only like the LKEY method - based on mouse pointer position :( */ - /* uiMenuItemO(head, 0, "CURVE_OT_select_linked"); */ + /* uiItemO(layout, NULL, 0, "CURVE_OT_select_linked"); */ #if 0 G.qual |= LR_CTRLKEY; @@ -1278,7 +1276,7 @@ static uiBlock *view3d_select_metaballmenu(bContext *C, ARegion *ar, void *arg_u uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "view3d_select_metaballmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_select_metaballmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_select_metaballmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -1326,7 +1324,7 @@ static uiBlock *view3d_select_latticemenu(bContext *C, ARegion *ar, void *arg_un uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "view3d_select_latticemenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_select_latticemenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_select_latticemenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -1383,7 +1381,7 @@ static uiBlock *view3d_select_armaturemenu(bContext *C, ARegion *ar, void *arg_u uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "view3d_select_armaturemenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_select_armaturemenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_select_armaturemenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -1454,7 +1452,7 @@ static uiBlock *view3d_select_pose_armaturemenu(bContext *C, ARegion *ar, void * uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "view3d_select_pose_armaturemenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_select_pose_armaturemenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_select_pose_armaturemenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -1521,7 +1519,7 @@ static uiBlock *view3d_select_faceselmenu(bContext *C, ARegion *ar, void *arg_un // int i = 0; #endif - block= uiBeginBlock(C, ar, "view3d_select_faceselmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_select_faceselmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_select_faceselmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -1592,7 +1590,7 @@ static uiBlock *view3d_edit_snapmenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_edit_snapmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_snapmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_snapmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Selection -> Grid|Shift S, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -1658,7 +1656,7 @@ static uiBlock *view3d_transform_moveaxismenu(bContext *C, ARegion *ar, void *ar uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_transform_moveaxismenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_transform_moveaxismenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_transform_moveaxismenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "X Global|G, X", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -1725,7 +1723,7 @@ static uiBlock *view3d_transform_rotateaxismenu(bContext *C, ARegion *ar, void * uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_transform_rotateaxismenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_transform_rotateaxismenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_transform_rotateaxismenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "X Global|R, X", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -1792,7 +1790,7 @@ static uiBlock *view3d_transform_scaleaxismenu(bContext *C, ARegion *ar, void *a uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_transform_scaleaxismenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_transform_scaleaxismenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_transform_scaleaxismenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "X Global|S, X", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -1904,7 +1902,7 @@ static uiBlock *view3d_transformmenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_transformmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_transformmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_transformmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Grab/Move|G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -2030,7 +2028,7 @@ static uiBlock *view3d_object_mirrormenu(bContext *C, ARegion *ar, void *arg_unu uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_object_mirrormenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_object_mirrormenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_object_mirrormenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Interactive Mirror|Ctrl M", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -2081,7 +2079,7 @@ static uiBlock *view3d_edit_object_transformmenu(bContext *C, ARegion *ar, void uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_edit_object_transformmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_object_transformmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_object_transformmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Apply Scale/Rotation to ObData|Ctrl A, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, ""); @@ -2119,7 +2117,7 @@ static uiBlock *view3d_edit_object_makelocalmenu(bContext *C, ARegion *ar, void uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_edit_object_makelocalmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_object_makelocalmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_object_makelocalmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Selected Objects|L, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -2153,7 +2151,7 @@ static uiBlock *view3d_edit_object_makelinksmenu(bContext *C, ARegion *ar, void uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_edit_object_makelinksmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_object_makelinksmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_object_makelinksmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "To Scene...|Ctrl L, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -2230,7 +2228,7 @@ static uiBlock *view3d_edit_object_singleusermenu(bContext *C, ARegion *ar, void uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_edit_object_singleusermenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_object_singleusermenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_object_singleusermenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Object|U, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -2283,7 +2281,7 @@ static uiBlock *view3d_edit_object_copyattrmenu(bContext *C, ARegion *ar, void * uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_edit_object_copyattrmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_object_copyattrmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_object_copyattrmenu, NULL); ob= OBACT; @@ -2358,7 +2356,7 @@ static uiBlock *view3d_edit_object_parentmenu(bContext *C, ARegion *ar, void *ar uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_edit_object_parentmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_object_parentmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_object_parentmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Parent...|Ctrl P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -2387,7 +2385,7 @@ static uiBlock *view3d_edit_object_groupmenu(bContext *C, ARegion *ar, void *arg uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_edit_object_groupmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_object_groupmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_object_groupmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add to Existing Group|Ctrl G, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, ""); @@ -2418,7 +2416,7 @@ static uiBlock *view3d_edit_object_trackmenu(bContext *C, ARegion *ar, void *arg uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_edit_object_trackmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_object_trackmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_object_trackmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Track...|Ctrl T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -2448,7 +2446,7 @@ static uiBlock *view3d_edit_object_constraintsmenu(bContext *C, ARegion *ar, voi uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_edit_object_constraintsmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_object_constraintsmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_object_constraintsmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add Constraint...|Ctrl Alt C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -2483,7 +2481,7 @@ static uiBlock *view3d_edit_object_showhidemenu(bContext *C, ARegion *ar, void * uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_edit_object_showhidemenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_object_showhidemenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_object_showhidemenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hidden|Alt H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -2511,7 +2509,7 @@ static uiBlock *view3d_edit_object_scriptsmenu(bContext *C, ARegion *ar, void *a // XXX BPyMenu *pym; // int i = 0; - block= uiBeginBlock(C, ar, "v3d_eobject_pymenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "v3d_eobject_pymenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_object_scriptsmenu, NULL); // for (pym = BPyMenuTable[PYMENU_OBJECT]; pym; pym = pym->next, i++) { @@ -2584,7 +2582,7 @@ static uiBlock *view3d_edit_objectmenu(bContext *C, ARegion *ar, void *arg_unuse uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "view3d_edit_objectmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_objectmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_objectmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Transform Properties|N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 15, ""); @@ -2665,7 +2663,7 @@ static uiBlock *view3d_edit_propfalloffmenu(bContext *C, ARegion *ar, void *arg_ uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_edit_propfalloffmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_propfalloffmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_propfalloffmenu, NULL); if (scene->prop_mode==PROP_SMOOTH) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Smooth|Shift O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, PROP_SMOOTH, ""); @@ -2736,7 +2734,7 @@ static uiBlock *view3d_edit_mesh_verticesmenu(bContext *C, ARegion *ar, void *ar uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_edit_mesh_verticesmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_mesh_verticesmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_mesh_verticesmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Merge...|Alt M", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, ""); @@ -2854,7 +2852,7 @@ static uiBlock *view3d_edit_mesh_edgesmenu(bContext *C, ARegion *ar, void *arg_u uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_edit_mesh_edgesmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_mesh_edgesmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_mesh_edgesmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Edge/Face|F", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, ""); @@ -2942,7 +2940,7 @@ static uiBlock *view3d_edit_mesh_facesmenu(bContext *C, ARegion *ar, void *arg_u uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_edit_mesh_facesmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_mesh_facesmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_mesh_facesmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Edge/Face|F", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, ""); @@ -2988,7 +2986,7 @@ static uiBlock *view3d_edit_mesh_normalsmenu(bContext *C, ARegion *ar, void *arg uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_edit_mesh_normalsmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_mesh_normalsmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_mesh_normalsmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Recalculate Outside|Ctrl N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); @@ -3054,7 +3052,7 @@ static uiBlock *view3d_edit_mirrormenu(bContext *C, ARegion *ar, void *arg_unuse uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_edit_mirrormenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_mirrormenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_mirrormenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Interactive Mirror|Ctrl M", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -3100,7 +3098,7 @@ static uiBlock *view3d_edit_mesh_showhidemenu(bContext *C, ARegion *ar, void *ar uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_edit_mesh_showhidemenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_mesh_showhidemenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_mesh_showhidemenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hidden|Alt H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -3128,7 +3126,7 @@ static uiBlock *view3d_edit_mesh_scriptsmenu(bContext *C, ARegion *ar, void *arg // XXX BPyMenu *pym; // int i = 0; - block= uiBeginBlock(C, ar, "v3d_emesh_pymenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "v3d_emesh_pymenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_mesh_scriptsmenu, NULL); // for (pym = BPyMenuTable[PYMENU_MESH]; pym; pym = pym->next, i++) { @@ -3212,7 +3210,7 @@ static uiBlock *view3d_edit_meshmenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "view3d_edit_meshmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_meshmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_meshmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Editing|Ctrl Z", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -3289,44 +3287,44 @@ static uiBlock *view3d_edit_meshmenu(bContext *C, ARegion *ar, void *arg_unused) return block; } -static void view3d_edit_curve_controlpointsmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void view3d_edit_curve_controlpointsmenu(bContext *C, uiLayout *layout, void *arg_unused) { Object *obedit= CTX_data_edit_object(C); if(obedit->type == OB_CURVE) { - uiMenuItemEnumO(head, "", 0, "TFM_OT_transform", "mode", TFM_TILT); - uiMenuItemO(head, 0, "CURVE_OT_tilt_clear"); - uiMenuItemO(head, 0, "CURVE_OT_separate"); + uiItemEnumO(layout, NULL, 0, "TFM_OT_transform", "mode", TFM_TILT); + uiItemO(layout, NULL, 0, "CURVE_OT_tilt_clear"); + uiItemO(layout, NULL, 0, "CURVE_OT_separate"); - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemEnumO(head, "", 0, "CURVE_OT_handle_type_set", "type", 1); - uiMenuItemEnumO(head, "", 0, "CURVE_OT_handle_type_set", "type", 3); - uiMenuItemEnumO(head, "", 0, "CURVE_OT_handle_type_set", "type", 2); + uiItemEnumO(layout, NULL, 0, "CURVE_OT_handle_type_set", "type", 1); + uiItemEnumO(layout, NULL, 0, "CURVE_OT_handle_type_set", "type", 3); + uiItemEnumO(layout, NULL, 0, "CURVE_OT_handle_type_set", "type", 2); - uiMenuSeparator(head); + uiItemS(layout); } - // XXX uiMenuItemO(head, 0, "OBJECT_OT_make_vertex_parent"); Make VertexParent|Ctrl P + // XXX uiItemO(layout, NULL, 0, "OBJECT_OT_make_vertex_parent"); Make VertexParent|Ctrl P // make_parent() - // XXX uiMenuItemO(head, 0, "OBJECT_OT_add_hook"); Add Hook| Ctrl H + // XXX uiItemO(layout, NULL, 0, "OBJECT_OT_add_hook"); Add Hook| Ctrl H // add_hook_menu() } -static void view3d_edit_curve_segmentsmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void view3d_edit_curve_segmentsmenu(bContext *C, uiLayout *layout, void *arg_unused) { - uiMenuItemO(head, 0, "CURVE_OT_subdivide"); - uiMenuItemO(head, 0, "CURVE_OT_switch_direction"); + uiItemO(layout, NULL, 0, "CURVE_OT_subdivide"); + uiItemO(layout, NULL, 0, "CURVE_OT_switch_direction"); } -static void view3d_edit_curve_showhidemenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void view3d_edit_curve_showhidemenu(bContext *C, uiLayout *layout, void *arg_unused) { - uiMenuItemO(head, 0, "CURVE_OT_reveal"); - uiMenuItemO(head, 0, "CURVE_OT_hide"); - uiMenuItemBooleanO(head, "Hide Unselected", 0, "CURVE_OT_hide", "unselected", 1); + uiItemO(layout, NULL, 0, "CURVE_OT_reveal"); + uiItemO(layout, NULL, 0, "CURVE_OT_hide"); + uiItemBooleanO(layout, "Hide Unselected", 0, "CURVE_OT_hide", "unselected", 1); } -static void view3d_edit_curvemenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void view3d_edit_curvemenu(bContext *C, uiLayout *layout, void *arg_unused) { PointerRNA sceneptr; Scene *scene= CTX_data_scene(C); @@ -3339,7 +3337,7 @@ static void view3d_edit_curvemenu(bContext *C, uiMenuItem *head, void *arg_unuse uiDefIconTextBlockBut(block, view3d_edit_mirrormenu, NULL, ICON_RIGHTARROW_THIN, "Mirror", 0, yco-=20, menuwidth, 19, ""); uiDefIconTextBlockBut(block, view3d_edit_snapmenu, NULL, ICON_RIGHTARROW_THIN, "Snap", 0, yco-=20, 120, 19, ""); - uiMenuSeparator(head); + uiItemS(layout); #endif // XXX uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Insert Keyframe|I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); @@ -3348,26 +3346,26 @@ static void view3d_edit_curvemenu(bContext *C, uiMenuItem *head, void *arg_unuse // common_deletekey(); - uiMenuItemO(head, 0, "CURVE_OT_extrude"); - uiMenuItemO(head, 0, "CURVE_OT_duplicate"); - uiMenuItemO(head, 0, "CURVE_OT_separate"); - uiMenuItemO(head, 0, "CURVE_OT_make_segment"); - uiMenuItemO(head, 0, "CURVE_OT_cyclic_toggle"); - uiMenuItemO(head, 0, "CURVE_OT_delete"); // Delete... + uiItemO(layout, NULL, 0, "CURVE_OT_extrude"); + uiItemO(layout, NULL, 0, "CURVE_OT_duplicate"); + uiItemO(layout, NULL, 0, "CURVE_OT_separate"); + uiItemO(layout, NULL, 0, "CURVE_OT_make_segment"); + uiItemO(layout, NULL, 0, "CURVE_OT_cyclic_toggle"); + uiItemO(layout, NULL, 0, "CURVE_OT_delete"); // Delete... - uiMenuSeparator(head); + uiItemS(layout); - uiMenuLevel(head, "Control Points", view3d_edit_curve_controlpointsmenu); - uiMenuLevel(head, "Segments", view3d_edit_curve_segmentsmenu); + uiItemMenuF(layout, "Control Points", 0, view3d_edit_curve_controlpointsmenu); + uiItemMenuF(layout, "Segments", 0, view3d_edit_curve_segmentsmenu); - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemBooleanR(head, &sceneptr, "proportional_editing"); // |O - uiMenuLevelEnumR(head, &sceneptr, "proportional_editing_falloff"); + uiItemR(layout, NULL, 0, &sceneptr, "proportional_editing", 0, 0); // |O + uiItemMenuEnumR(layout, NULL, 0, &sceneptr, "proportional_editing_falloff"); - uiMenuSeparator(head); + uiItemS(layout); - uiMenuLevel(head, "Show/Hide Control Points", view3d_edit_curve_showhidemenu); + uiItemMenuF(layout, "Show/Hide Control Points", 0, view3d_edit_curve_showhidemenu); } static void do_view3d_edit_mball_showhidemenu(bContext *C, void *arg, int event) @@ -3392,7 +3390,7 @@ static uiBlock *view3d_edit_mball_showhidemenu(bContext *C, ARegion *ar, void *a uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_edit_mball_showhidemenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_mball_showhidemenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_mball_showhidemenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hidden|Alt H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 10, ""); @@ -3443,7 +3441,7 @@ static uiBlock *view3d_edit_metaballmenu(bContext *C, ARegion *ar, void *arg_unu uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "view3d_edit_metaballmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_metaballmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_metaballmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Editing|Ctrl Z", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -3478,43 +3476,43 @@ static uiBlock *view3d_edit_metaballmenu(bContext *C, ARegion *ar, void *arg_unu return block; } -static void view3d_edit_text_charsmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void view3d_edit_text_charsmenu(bContext *C, uiLayout *layout, void *arg_unused) { /* the character codes are specified in UTF-8 */ - uiMenuItemStringO(head, "Copyright|Alt C", 0, "FONT_OT_insert_text", "text", "\xC2\xA9"); - uiMenuItemStringO(head, "Registered Trademark|Alt R", 0, "FONT_OT_insert_text", "text", "\xC2\xAE"); + uiItemStringO(layout, "Copyright|Alt C", 0, "FONT_OT_text_insert", "text", "\xC2\xA9"); + uiItemStringO(layout, "Registered Trademark|Alt R", 0, "FONT_OT_text_insert", "text", "\xC2\xAE"); - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemStringO(head, "Degree Sign|Alt G", 0, "FONT_OT_insert_text", "text", "\xC2\xB0"); - uiMenuItemStringO(head, "Multiplication Sign|Alt x", 0, "FONT_OT_insert_text", "text", "\xC3\x97"); - uiMenuItemStringO(head, "Circle|Alt .", 0, "FONT_OT_insert_text", "text", "\xC2\x8A"); - uiMenuItemStringO(head, "Superscript 1|Alt 1", 0, "FONT_OT_insert_text", "text", "\xC2\xB9"); - uiMenuItemStringO(head, "Superscript 2|Alt 2", 0, "FONT_OT_insert_text", "text", "\xC2\xB2"); - uiMenuItemStringO(head, "Superscript 3|Alt 3", 0, "FONT_OT_insert_text", "text", "\xC2\xB3"); - uiMenuItemStringO(head, "Double >>|Alt >", 0, "FONT_OT_insert_text", "text", "\xC2\xBB"); - uiMenuItemStringO(head, "Double <<|Alt <", 0, "FONT_OT_insert_text", "text", "\xC2\xAB"); - uiMenuItemStringO(head, "Promillage|Alt %", 0, "FONT_OT_insert_text", "text", "\xE2\x80\xB0"); + uiItemStringO(layout, "Degree Sign|Alt G", 0, "FONT_OT_text_insert", "text", "\xC2\xB0"); + uiItemStringO(layout, "Multiplication Sign|Alt x", 0, "FONT_OT_text_insert", "text", "\xC3\x97"); + uiItemStringO(layout, "Circle|Alt .", 0, "FONT_OT_text_insert", "text", "\xC2\x8A"); + uiItemStringO(layout, "Superscript 1|Alt 1", 0, "FONT_OT_text_insert", "text", "\xC2\xB9"); + uiItemStringO(layout, "Superscript 2|Alt 2", 0, "FONT_OT_text_insert", "text", "\xC2\xB2"); + uiItemStringO(layout, "Superscript 3|Alt 3", 0, "FONT_OT_text_insert", "text", "\xC2\xB3"); + uiItemStringO(layout, "Double >>|Alt >", 0, "FONT_OT_text_insert", "text", "\xC2\xBB"); + uiItemStringO(layout, "Double <<|Alt <", 0, "FONT_OT_text_insert", "text", "\xC2\xAB"); + uiItemStringO(layout, "Promillage|Alt %", 0, "FONT_OT_text_insert", "text", "\xE2\x80\xB0"); - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemStringO(head, "Dutch Florin|Alt F", 0, "FONT_OT_insert_text", "text", "\xC2\xA4"); - uiMenuItemStringO(head, "British Pound|Alt L", 0, "FONT_OT_insert_text", "text", "\xC2\xA3"); - uiMenuItemStringO(head, "Japanese Yen|Alt Y", 0, "FONT_OT_insert_text", "text", "\xC2\xA5"); + uiItemStringO(layout, "Dutch Florin|Alt F", 0, "FONT_OT_text_insert", "text", "\xC2\xA4"); + uiItemStringO(layout, "British Pound|Alt L", 0, "FONT_OT_text_insert", "text", "\xC2\xA3"); + uiItemStringO(layout, "Japanese Yen|Alt Y", 0, "FONT_OT_text_insert", "text", "\xC2\xA5"); - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemStringO(head, "German S|Alt S", 0, "FONT_OT_insert_text", "text", "\xC3\x9F"); - uiMenuItemStringO(head, "Spanish Question Mark|Alt ?", 0, "FONT_OT_insert_text", "text", "\xC2\xBF"); - uiMenuItemStringO(head, "Spanish Exclamation Mark|Alt !", 0, "FONT_OT_insert_text", "text", "\xC2\xA1"); + uiItemStringO(layout, "German S|Alt S", 0, "FONT_OT_text_insert", "text", "\xC3\x9F"); + uiItemStringO(layout, "Spanish Question Mark|Alt ?", 0, "FONT_OT_text_insert", "text", "\xC2\xBF"); + uiItemStringO(layout, "Spanish Exclamation Mark|Alt !", 0, "FONT_OT_text_insert", "text", "\xC2\xA1"); } -static void view3d_edit_textmenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void view3d_edit_textmenu(bContext *C, uiLayout *layout, void *arg_unused) { - uiMenuItemO(head, 0, "FONT_OT_paste_file"); - uiMenuSeparator(head); - uiMenuLevel(head, "Special Characters", view3d_edit_text_charsmenu); + uiItemO(layout, NULL, 0, "FONT_OT_file_paste"); + uiItemS(layout); + uiItemMenuF(layout, "Special Characters", 0, view3d_edit_text_charsmenu); } static void do_view3d_edit_latticemenu(bContext *C, void *arg, int event) @@ -3555,7 +3553,7 @@ static uiBlock *view3d_edit_latticemenu(bContext *C, ARegion *ar, void *arg_unus uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "view3d_edit_latticemenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_latticemenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_latticemenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Editing|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -3615,7 +3613,7 @@ static uiBlock *view3d_edit_armature_parentmenu(bContext *C, ARegion *ar, void * uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_edit_armature_parentmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_armature_parentmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_armature_parentmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Parent...|Ctrl P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -3645,7 +3643,7 @@ static uiBlock *view3d_edit_armature_rollmenu(bContext *C, ARegion *ar, void *ar uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_edit_armature_rollmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_armature_rollmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_armature_rollmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Roll (Z-Axis Up)|Ctrl N, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -3745,7 +3743,7 @@ static uiBlock *view3d_scripts_armaturemenu(bContext *C, ARegion *ar, void *arg_ // int i= 0; // short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_scripts_armaturemenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_scripts_armaturemenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_scripts_armaturemenu, NULL); /* note that we acount for the N previous entries with i+20: */ @@ -3773,7 +3771,7 @@ static uiBlock *view3d_armature_settingsmenu(bContext *C, ARegion *ar, void *arg uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "view3d_armature_settingsmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_armature_settingsmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_armature_settingsmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Toggle a Setting|Shift W", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, ""); @@ -3793,7 +3791,7 @@ static uiBlock *view3d_edit_armaturemenu(bContext *C, ARegion *ar, void *arg_unu uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "view3d_edit_armaturemenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_armaturemenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_edit_armaturemenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Editing|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -3866,7 +3864,7 @@ static void do_view3d_pose_armature_transformmenu(bContext *C, void *arg, int ev { #if 0 Scene *scene= CTX_data_scene(C); - Object *ob= OBACT; + Object *ob= CTX_data_active_object(C); switch(event) { case 0: /* clear origin */ @@ -3882,9 +3880,7 @@ static void do_view3d_pose_armature_transformmenu(bContext *C, void *arg, int ev clear_object('g'); break; case 4: /* clear user transform */ - rest_pose(ob->pose); - DAG_object_flush_update(scene, ob, OB_RECALC_DATA); - ED_undo_push(C, "Pose, Clear User Transform"); + clear_user_transform(scene, ob); break; } #endif @@ -3895,7 +3891,7 @@ static uiBlock *view3d_pose_armature_transformmenu(bContext *C, ARegion *ar, voi uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_pose_armature_transformmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_pose_armature_transformmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_pose_armature_transformmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear User Transform|W", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, ""); @@ -3934,7 +3930,7 @@ static uiBlock *view3d_pose_armature_showhidemenu(bContext *C, ARegion *ar, void uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_pose_armature_showhidemenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_pose_armature_showhidemenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_pose_armature_showhidemenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hidden|Alt H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -3967,7 +3963,7 @@ static uiBlock *view3d_pose_armature_ikmenu(bContext *C, ARegion *ar, void *arg_ uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_pose_armature_ikmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_pose_armature_ikmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_pose_armature_ikmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add IK to Bone...|Shift I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -3999,7 +3995,7 @@ static uiBlock *view3d_pose_armature_constraintsmenu(bContext *C, ARegion *ar, v uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_pose_armature_constraintsmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_pose_armature_constraintsmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_pose_armature_constraintsmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add Constraint to Bone...|Ctrl Alt C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -4038,7 +4034,7 @@ static uiBlock *view3d_pose_armature_groupmenu(bContext *C, ARegion *ar, void *a uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_pose_armature_groupmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_pose_armature_groupmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_pose_armature_groupmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add Selected to Active Group|Ctrl G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -4073,7 +4069,7 @@ static uiBlock *view3d_pose_armature_motionpathsmenu(bContext *C, ARegion *ar, v uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_pose_armature_motionpathsmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_pose_armature_motionpathsmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_pose_armature_motionpathsmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Calculate Paths|W", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -4112,7 +4108,7 @@ static uiBlock *view3d_pose_armature_poselibmenu(bContext *C, ARegion *ar, void uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_pose_armature_poselibmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_pose_armature_poselibmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_pose_armature_poselibmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Browse Poses|Ctrl L", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); @@ -4193,7 +4189,7 @@ static uiBlock *view3d_pose_armaturemenu(bContext *C, ARegion *ar, void *arg_unu uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "view3d_pose_armaturemenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_pose_armaturemenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_pose_armaturemenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Transform Properties|N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -4294,7 +4290,7 @@ static uiBlock *view3d_vpaintmenu(bContext *C, ARegion *ar, void *arg_unused) // int i=0; #endif - block= uiBeginBlock(C, ar, "view3d_paintmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_paintmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_vpaintmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Vertex Painting|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -4342,7 +4338,7 @@ static uiBlock *view3d_tpaintmenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "view3d_paintmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_paintmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_tpaintmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Texture Painting|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -4396,7 +4392,7 @@ static uiBlock *view3d_wpaintmenu(bContext *C, ARegion *ar, void *arg_unused) // int i=0; #endif - block= uiBeginBlock(C, ar, "view3d_paintmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_paintmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_wpaintmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Weight Painting|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -4518,7 +4514,7 @@ uiBlock *view3d_sculpt_inputmenu(bContext *C, ARegion *ar, void *arg_unused) short yco= 0, menuwidth= 120; Sculpt *sd= CTX_data_tool_settings(C)->sculpt; - block= uiBeginBlock(C, ar, "view3d_sculpt_inputmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_sculpt_inputmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_sculpt_inputmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ((sd->flags & SCULPT_INPUT_SMOOTH) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT), "Smooth Stroke|Shift S", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -4530,7 +4526,7 @@ uiBlock *view3d_sculpt_inputmenu(bContext *C, ARegion *ar, void *arg_unused) return block; } -static void view3d_sculpt_menu(bContext *C, uiMenuItem *head, void *arg_unused) +static void view3d_sculpt_menu(bContext *C, uiLayout *layout, void *arg_unused) { bScreen *sc= CTX_wm_screen(C); Sculpt *s = CTX_data_tool_settings(C)->sculpt; @@ -4538,30 +4534,30 @@ static void view3d_sculpt_menu(bContext *C, uiMenuItem *head, void *arg_unused) RNA_pointer_create(&sc->id, &RNA_Sculpt, s, &rna); - uiMenuItemBooleanR(head, &rna, "symmetry_x"); - uiMenuItemBooleanR(head, &rna, "symmetry_y"); - uiMenuItemBooleanR(head, &rna, "symmetry_z"); - uiMenuItemBooleanR(head, &rna, "lock_x"); - uiMenuItemBooleanR(head, &rna, "lock_y"); - uiMenuItemBooleanR(head, &rna, "lock_z"); + uiItemR(layout, NULL, 0, &rna, "symmetry_x", 0, 0); + uiItemR(layout, NULL, 0, &rna, "symmetry_y", 0, 0); + uiItemR(layout, NULL, 0, &rna, "symmetry_z", 0, 0); + uiItemR(layout, NULL, 0, &rna, "lock_x", 0, 0); + uiItemR(layout, NULL, 0, &rna, "lock_y", 0, 0); + uiItemR(layout, NULL, 0, &rna, "lock_z", 0, 0); /* Brush settings */ RNA_pointer_create(&sc->id, &RNA_Brush, s->brush, &rna); /* Curve */ - uiMenuSeparator(head); - uiMenuItemEnumO(head, "", 0, "SCULPT_OT_brush_curve_preset", "mode", BRUSH_PRESET_SHARP); - uiMenuItemEnumO(head, "", 0, "SCULPT_OT_brush_curve_preset", "mode", BRUSH_PRESET_SMOOTH); - uiMenuItemEnumO(head, "", 0, "SCULPT_OT_brush_curve_preset", "mode", BRUSH_PRESET_MAX); + uiItemS(layout); + uiItemEnumO(layout, NULL, 0, "SCULPT_OT_brush_curve_preset", "mode", BRUSH_PRESET_SHARP); + uiItemEnumO(layout, NULL, 0, "SCULPT_OT_brush_curve_preset", "mode", BRUSH_PRESET_SMOOTH); + uiItemEnumO(layout, NULL, 0, "SCULPT_OT_brush_curve_preset", "mode", BRUSH_PRESET_MAX); - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemBooleanR(head, &rna, "airbrush"); - uiMenuItemBooleanR(head, &rna, "rake"); - uiMenuItemBooleanR(head, &rna, "anchored"); - uiMenuItemBooleanR(head, &rna, "space"); + uiItemR(layout, NULL, 0, &rna, "airbrush", 0, 0); + uiItemR(layout, NULL, 0, &rna, "rake", 0, 0); + uiItemR(layout, NULL, 0, &rna, "anchored", 0, 0); + uiItemR(layout, NULL, 0, &rna, "space", 0, 0); - uiMenuItemBooleanR(head, &rna, "flip_direction"); + uiItemR(layout, NULL, 0, &rna, "flip_direction", 0, 0); } uiBlock *view3d_sculptmenu(bContext *C, ARegion *ar, void *arg_unused) @@ -4573,7 +4569,7 @@ uiBlock *view3d_sculptmenu(bContext *C, ARegion *ar, void *arg_unused) // XXX const BrushData *br= sculptmode_brush(); short yco= 0, menuwidth= 120; - block= uiBeginBlock(C, ar, "view3d_sculptmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_sculptmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_sculptmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Sculpt Properties|N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 14, ""); @@ -4638,7 +4634,7 @@ static uiBlock *view3d_facesel_showhidemenu(bContext *C, ARegion *ar, void *arg_ uiBlock *block; short yco = 20, menuwidth = 120; - block= uiBeginBlock(C, ar, "view3d_facesel_showhidemenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_facesel_showhidemenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_facesel_showhidemenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hidden Faces|Alt H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, ""); @@ -4672,7 +4668,7 @@ static uiBlock *view3d_faceselmenu(bContext *C, ARegion *ar, void *arg_unused) uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, ar, "view3d_faceselmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_faceselmenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_view3d_faceselmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Set Vertex Colors|Shift K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -4698,59 +4694,59 @@ static uiBlock *view3d_faceselmenu(bContext *C, ARegion *ar, void *arg_unused) return block; } -static void view3d_select_particlemenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void view3d_select_particlemenu(bContext *C, uiLayout *layout, void *arg_unused) { Scene *scene= CTX_data_scene(C); - uiMenuItemO(head, 0, "VIEW3D_OT_select_border"); + uiItemO(layout, NULL, 0, "VIEW3D_OT_select_border"); - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemO(head, 0, "PARTICLE_OT_select_all_toggle"); - uiMenuItemO(head, 0, "PARTICLE_OT_select_linked"); + uiItemO(layout, NULL, 0, "PARTICLE_OT_select_all_toggle"); + uiItemO(layout, NULL, 0, "PARTICLE_OT_select_linked"); if(scene->selectmode & SCE_SELECT_POINT) { - uiMenuItemO(head, 0, "PARTICLE_OT_select_last"); // |W, 4 - uiMenuItemO(head, 0, "PARTICLE_OT_select_first"); // |W, 3 + uiItemO(layout, NULL, 0, "PARTICLE_OT_select_last"); // |W, 4 + uiItemO(layout, NULL, 0, "PARTICLE_OT_select_first"); // |W, 3 } - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemO(head, 0, "PARTICLE_OT_select_more"); - uiMenuItemO(head, 0, "PARTICLE_OT_select_less"); + uiItemO(layout, NULL, 0, "PARTICLE_OT_select_more"); + uiItemO(layout, NULL, 0, "PARTICLE_OT_select_less"); } -static void view3d_particle_showhidemenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void view3d_particle_showhidemenu(bContext *C, uiLayout *layout, void *arg_unused) { - uiMenuItemO(head, 0, "PARTICLE_OT_reveal"); - uiMenuItemO(head, 0, "PARTICLE_OT_hide"); - uiMenuItemBooleanO(head, "Hide Unselected", 0, "PARTICLE_OT_hide", "unselected", 1); + uiItemO(layout, NULL, 0, "PARTICLE_OT_reveal"); + uiItemO(layout, NULL, 0, "PARTICLE_OT_hide"); + uiItemBooleanO(layout, "Hide Unselected", 0, "PARTICLE_OT_hide", "unselected", 1); } -static void view3d_particlemenu(bContext *C, uiMenuItem *head, void *arg_unused) +static void view3d_particlemenu(bContext *C, uiLayout *layout, void *arg_unused) { Scene *scene= CTX_data_scene(C); // XXX uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Particle Edit Properties|N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, ""); // add_blockhandler(sa, VIEW3D_HANDLER_OBJECT, UI_PNL_UNSTOW); - // XXX uiMenuSeparator(head); + // XXX uiItemS(layout); // // XXX uiDefIconTextBut(block, BUTM, 1, (pset->flag & PE_X_MIRROR)? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT, "X-Axis Mirror Editing", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, ""); // pset->flag ^= PE_X_MIRROR; - uiMenuItemO(head, 0, "PARTICLE_OT_mirror"); // |Ctrl M + uiItemO(layout, NULL, 0, "PARTICLE_OT_mirror"); // |Ctrl M - uiMenuSeparator(head); + uiItemS(layout); - uiMenuItemO(head, 0, "PARTICLE_OT_remove_doubles"); // |W, 5 - uiMenuItemO(head, 0, "PARTICLE_OT_delete"); + uiItemO(layout, NULL, 0, "PARTICLE_OT_remove_doubles"); // |W, 5 + uiItemO(layout, NULL, 0, "PARTICLE_OT_delete"); if(scene->selectmode & SCE_SELECT_POINT) - uiMenuItemO(head, 0, "PARTICLE_OT_subdivide"); // |W, 2 - uiMenuItemO(head, 0, "PARTICLE_OT_rekey"); // |W, 1 + uiItemO(layout, NULL, 0, "PARTICLE_OT_subdivide"); // |W, 2 + uiItemO(layout, NULL, 0, "PARTICLE_OT_rekey"); // |W, 1 - uiMenuSeparator(head); + uiItemS(layout); - uiMenuLevel(head, "Show/Hide Particles", view3d_particle_showhidemenu); + uiItemMenuF(layout, "Show/Hide Particles", 0, view3d_particle_showhidemenu); } static char *view3d_modeselect_pup(Scene *scene) @@ -4765,7 +4761,7 @@ static char *view3d_modeselect_pup(Scene *scene) if(ob) str += sprintf(str, formatstr, "Object Mode", V3D_OBJECTMODE_SEL, ICON_OBJECT_DATA); else - str += sprintf(str, formatstr, " ", V3D_OBJECTMODE_SEL, ICON_OBJECT_DATA); + str += sprintf(str, formatstr, "Object Mode", V3D_OBJECTMODE_SEL, ICON_OBJECT_DATA); if(ob==NULL) return string; @@ -5119,6 +5115,7 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event) } break; } + } static void view3d_header_pulldowns(const bContext *C, uiBlock *block, Object *ob, int *xcoord, int yco) @@ -5128,9 +5125,6 @@ static void view3d_header_pulldowns(const bContext *C, uiBlock *block, Object *o short xmax, xco= *xcoord; - /* pull down menus */ - uiBlockSetEmboss(block, UI_EMBOSSP); - /* compensate for local mode when setting up the viewing menu/iconrow values */ if(rv3d->view==7) rv3d->viewbut= 1; else if(rv3d->view==1) rv3d->viewbut= 2; @@ -5142,115 +5136,115 @@ static void view3d_header_pulldowns(const bContext *C, uiBlock *block, Object *o * height of the header */ xmax= GetButStringLength("View"); - uiDefMenuBut(block, view3d_viewmenu, NULL, "View", xco, yco-2, xmax-3, 24, ""); - //uiDefPulldownBut(block, view3d_viewmenu, NULL, "View", xco, yco-2, xmax-3, 24, ""); + uiDefMenuBut(block, view3d_viewmenu, NULL, "View", xco, yco, xmax-3, 20, ""); + //uiDefPulldownBut(block, view3d_viewmenu, NULL, "View", xco, yco, xmax-3, 20, ""); xco+= xmax; xmax= GetButStringLength("Select"); if (obedit) { if (ob && ob->type == OB_MESH) { - uiDefPulldownBut(block, view3d_select_meshmenu, NULL, "Select", xco,yco-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_select_meshmenu, NULL, "Select", xco,yco, xmax-3, 24, ""); } else if (ob && (ob->type == OB_CURVE || ob->type == OB_SURF)) { - uiDefMenuBut(block, view3d_select_curvemenu, NULL, "Select", xco, yco-2, xmax-3, 24, ""); + uiDefMenuBut(block, view3d_select_curvemenu, NULL, "Select", xco, yco, xmax-3, 24, ""); } else if (ob && ob->type == OB_FONT) { xmax= 0; } else if (ob && ob->type == OB_MBALL) { - uiDefPulldownBut(block, view3d_select_metaballmenu, NULL, "Select", xco,yco-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_select_metaballmenu, NULL, "Select", xco,yco, xmax-3, 24, ""); } else if (ob && ob->type == OB_LATTICE) { - uiDefPulldownBut(block, view3d_select_latticemenu, NULL, "Select", xco,yco-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_select_latticemenu, NULL, "Select", xco,yco, xmax-3, 20, ""); } else if (ob && ob->type == OB_ARMATURE) { - uiDefPulldownBut(block, view3d_select_armaturemenu, NULL, "Select", xco,yco-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_select_armaturemenu, NULL, "Select", xco,yco, xmax-3, 20, ""); } } else if (FACESEL_PAINT_TEST) { if (ob && ob->type == OB_MESH) { - uiDefPulldownBut(block, view3d_select_faceselmenu, NULL, "Select", xco,yco-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_select_faceselmenu, NULL, "Select", xco,yco, xmax-3, 20, ""); } } else if ((G.f & G_VERTEXPAINT) || (G.f & G_TEXTUREPAINT) || (G.f & G_WEIGHTPAINT)) { uiDefBut(block, LABEL,0,"", xco, 0, xmax, 20, 0, 0, 0, 0, 0, ""); } else if (G.f & G_PARTICLEEDIT) { - uiDefMenuBut(block, view3d_select_particlemenu, NULL, "Select", xco,yco-2, xmax-3, 24, ""); + uiDefMenuBut(block, view3d_select_particlemenu, NULL, "Select", xco,yco, xmax-3, 20, ""); } else { if (ob && (ob->flag & OB_POSEMODE)) - uiDefPulldownBut(block, view3d_select_pose_armaturemenu, NULL, "Select", xco,yco-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_select_pose_armaturemenu, NULL, "Select", xco,yco, xmax-3, 20, ""); else - uiDefPulldownBut(block, view3d_select_objectmenu, NULL, "Select", xco,yco-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_select_objectmenu, NULL, "Select", xco,yco, xmax-3, 20, ""); } xco+= xmax; if (obedit) { if (ob && ob->type == OB_MESH) { xmax= GetButStringLength("Mesh"); - uiDefPulldownBut(block, view3d_edit_meshmenu, NULL, "Mesh", xco,yco-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_edit_meshmenu, NULL, "Mesh", xco,yco, xmax-3, 20, ""); xco+= xmax; } else if (ob && ob->type == OB_CURVE) { xmax= GetButStringLength("Curve"); - uiDefMenuBut(block, view3d_edit_curvemenu, NULL, "Curve", xco, yco-2, xmax-3, 24, ""); + uiDefMenuBut(block, view3d_edit_curvemenu, NULL, "Curve", xco, yco, xmax-3, 20, ""); xco+= xmax; } else if (ob && ob->type == OB_SURF) { xmax= GetButStringLength("Surface"); - uiDefMenuBut(block, view3d_edit_curvemenu, NULL, "Surface", xco, yco-2, xmax-3, 24, ""); + uiDefMenuBut(block, view3d_edit_curvemenu, NULL, "Surface", xco, yco, xmax-3, 20, ""); xco+= xmax; } else if (ob && ob->type == OB_FONT) { xmax= GetButStringLength("Text"); - uiDefMenuBut(block, view3d_edit_textmenu, NULL, "Text", xco, yco-2, xmax-3, 24, ""); + uiDefMenuBut(block, view3d_edit_textmenu, NULL, "Text", xco, yco, xmax-3, 20, ""); xco+= xmax; } else if (ob && ob->type == OB_MBALL) { xmax= GetButStringLength("Metaball"); - uiDefPulldownBut(block, view3d_edit_metaballmenu, NULL, "Metaball", xco,yco-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_edit_metaballmenu, NULL, "Metaball", xco,yco, xmax-3, 20, ""); xco+= xmax; } else if (ob && ob->type == OB_LATTICE) { xmax= GetButStringLength("Lattice"); - uiDefPulldownBut(block, view3d_edit_latticemenu, NULL, "Lattice", xco,yco-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_edit_latticemenu, NULL, "Lattice", xco,yco, xmax-3, 20, ""); xco+= xmax; } else if (ob && ob->type == OB_ARMATURE) { xmax= GetButStringLength("Armature"); - uiDefPulldownBut(block, view3d_edit_armaturemenu, NULL, "Armature", xco,yco-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_edit_armaturemenu, NULL, "Armature", xco,yco, xmax-3, 20, ""); xco+= xmax; } } else if (G.f & G_WEIGHTPAINT) { xmax= GetButStringLength("Paint"); - uiDefPulldownBut(block, view3d_wpaintmenu, NULL, "Paint", xco,yco-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_wpaintmenu, NULL, "Paint", xco,yco, xmax-3, 20, ""); xco+= xmax; } else if (G.f & G_VERTEXPAINT) { xmax= GetButStringLength("Paint"); - uiDefPulldownBut(block, view3d_vpaintmenu, NULL, "Paint", xco,yco-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_vpaintmenu, NULL, "Paint", xco,yco, xmax-3, 20, ""); xco+= xmax; } else if (G.f & G_TEXTUREPAINT) { xmax= GetButStringLength("Paint"); - uiDefPulldownBut(block, view3d_tpaintmenu, NULL, "Paint", xco,yco-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_tpaintmenu, NULL, "Paint", xco,yco, xmax-3, 20, ""); xco+= xmax; } else if( G.f & G_SCULPTMODE) { xmax= GetButStringLength("Sculpt"); - uiDefMenuBut(block, view3d_sculpt_menu, NULL, "Sculpt", xco, yco-2, xmax-3, 24, ""); + uiDefMenuBut(block, view3d_sculpt_menu, NULL, "Sculpt", xco, yco, xmax-3, 20, ""); xco+= xmax; } else if (FACESEL_PAINT_TEST) { if (ob && ob->type == OB_MESH) { xmax= GetButStringLength("Face"); - uiDefPulldownBut(block, view3d_faceselmenu, NULL, "Face", xco,yco-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_faceselmenu, NULL, "Face", xco,yco, xmax-3, 20, ""); xco+= xmax; } } else if(G.f & G_PARTICLEEDIT) { xmax= GetButStringLength("Particle"); - uiDefMenuBut(block, view3d_particlemenu, NULL, "Particle", xco,yco-2, xmax-3, 24, ""); + uiDefMenuBut(block, view3d_particlemenu, NULL, "Particle", xco,yco, xmax-3, 20, ""); xco+= xmax; } else { if (ob && (ob->flag & OB_POSEMODE)) { xmax= GetButStringLength("Pose"); - uiDefPulldownBut(block, view3d_pose_armaturemenu, NULL, "Pose", xco,yco-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_pose_armaturemenu, NULL, "Pose", xco,yco, xmax-3, 20, ""); xco+= xmax; } else { xmax= GetButStringLength("Object"); - uiDefPulldownBut(block, view3d_edit_objectmenu, NULL, "Object", xco,yco-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_edit_objectmenu, NULL, "Object", xco,yco, xmax-3, 20, ""); xco+= xmax; } } @@ -5278,7 +5272,7 @@ void view3d_header_buttons(const bContext *C, ARegion *ar) uiBlock *block; int a, xco, yco= 3; - block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS, UI_HELV); + block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS); uiBlockSetHandleFunc(block, do_view3d_header_buttons, NULL); xco= ED_area_header_standardbuttons(C, block, yco); @@ -5468,6 +5462,10 @@ void view3d_header_buttons(const bContext *C, ARegion *ar) xco+= XIC; uiDefIconButBitS(block, TOG, SCE_SNAP_ROTATE, B_REDR, ICON_SNAP_NORMAL,xco,yco,XIC,YIC, &scene->snap_flag, 0, 0, 0, 0, "Align rotation with the snapping target"); xco+= XIC; + if (scene->snap_mode == SCE_SNAP_MODE_VOLUME) { + uiDefIconButBitS(block, TOG, SCE_SNAP_PEEL_OBJECT, B_REDR, ICON_SNAP_PEEL_OBJECT,xco,yco,XIC,YIC, &scene->snap_flag, 0, 0, 0, 0, "Consider objects as whole when finding volume center"); + xco+= XIC; + } uiDefIconTextButS(block, ICONTEXTROW,B_REDR, ICON_SNAP_VERTEX, snapmode_pup(), xco,yco,XIC+10,YIC, &(scene->snap_mode), 0.0, 0.0, 0, 0, "Snapping mode"); xco+= XIC; uiDefButS(block, MENU, B_NOP, "Snap Mode%t|Closest%x0|Center%x1|Median%x2|Active%x3",xco,yco,70,YIC, &scene->snap_target, 0, 0, 0, 0, "Snap Target Mode"); @@ -5551,18 +5549,20 @@ void view3d_header_buttons(const bContext *C, ARegion *ar) /* edit face toolbox */ static int editmesh_face_toolbox_invoke(bContext *C, wmOperator *op, wmEvent *event) { - uiMenuItem *head; + uiPopupMenu *pup; + uiLayout *layout; - head= uiPupMenuBegin("Edit Faces", 0); + pup= uiPupMenuBegin(C, "Edit Faces", 0); + layout= uiPupMenuLayout(pup); - uiMenuItemO(head, 0, "MESH_OT_fill"); - uiMenuItemO(head, 0, "MESH_OT_beauty_fill"); - uiMenuItemO(head, 0, "MESH_OT_convert_quads_to_tris"); - uiMenuItemO(head, 0, "MESH_OT_convert_tris_to_quads"); - uiMenuItemO(head, 0, "MESH_OT_edge_flip"); - uiMenuItemO(head, 0, "MESH_OT_faces_shade_smooth"); - uiMenuItemO(head, 0, "MESH_OT_faces_shade_solid"); - uiPupMenuEnd(C, head); + uiItemO(layout, NULL, 0, "MESH_OT_fill"); + uiItemO(layout, NULL, 0, "MESH_OT_beauty_fill"); + uiItemO(layout, NULL, 0, "MESH_OT_quads_convert_to_tris"); + uiItemO(layout, NULL, 0, "MESH_OT_tris_convert_to_quads"); + uiItemO(layout, NULL, 0, "MESH_OT_edge_flip"); + uiItemO(layout, NULL, 0, "MESH_OT_faces_shade_smooth"); + uiItemO(layout, NULL, 0, "MESH_OT_faces_shade_solid"); + uiPupMenuEnd(C, pup); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index ae77b4293bf..ab705cb32fb 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -42,6 +42,9 @@ struct bContext; struct wmWindowManager; struct EditMesh; struct ViewContext; +struct ARegionType; + +#define BL_NEAR_CLIP 0.001 /* drawing flags: */ #define DRAW_PICKING 1 @@ -86,6 +89,7 @@ int draw_glsl_material(Scene *scene, Object *ob, View3D *v3d, int dt); void draw_object_instance(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, int dt, int outline); void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob); void drawaxes(float size, int flag, char drawtype); +void view3d_object_text_draw_add(float x, float y, float z, char *str, short xoffs); /* drawarmature.c */ int draw_armature(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, int dt, int flag); @@ -99,7 +103,6 @@ void draw_depth(Scene *scene, struct ARegion *ar, View3D *v3d, int (* func)(void void view3d_clr_clipping(void); void view3d_set_clipping(RegionView3D *rv3d); void add_view3d_after(View3D *v3d, Base *base, int type, int flag); -void make_axis_color(char *col, char *col2, char axis); void calc_viewborder(Scene *scene, struct ARegion *ar, View3D *v3d, rctf *viewborder_r); void circf(float x, float y, float rad); @@ -120,11 +123,6 @@ void VIEW3D_OT_localview(struct wmOperatorType *ot); int boundbox_clip(RegionView3D *rv3d, float obmat[][4], struct BoundBox *bb); -void view3d_project_short_clip(struct ARegion *ar, float *vec, short *adr, float projmat[4][4], float wmat[4][4]); -void view3d_project_short_noclip(struct ARegion *ar, float *vec, short *adr, float mat[4][4]); - -void view3d_project_float(struct ARegion *a, float *vec, float *adr, float mat[4][4]); - void centerview(struct ARegion *ar, View3D *v3d); void smooth_view(struct bContext *C, Object *, Object *, float *ofs, float *quat, float *dist, float *lens); @@ -134,8 +132,11 @@ void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d); /* view3d_buttons.c */ void VIEW3D_OT_properties(struct wmOperatorType *ot); +void view3d_buttons_register(struct ARegionType *art); -void view3d_buttons_area_defbuts(const struct bContext *C, ARegion *ar); +/* view3d_buttons.c */ +void VIEW3D_OT_toolbar(struct wmOperatorType *ot); +void view3d_toolbar_register(struct ARegionType *art); /* view3d_snap.c */ int minmax_verts(Object *obedit, float *min, float *max); @@ -150,6 +151,7 @@ void VIEW3D_OT_snap_menu(struct wmOperatorType *ot); /* space_view3d.c */ ARegion *view3d_has_buttons_region(ScrArea *sa); +ARegion *view3d_has_tools_region(ScrArea *sa); #endif /* ED_VIEW3D_INTERN_H */ diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c index 1cda1b9e4c8..0ed43bead17 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -84,10 +84,12 @@ void view3d_operatortypes(void) WM_operatortype_append(VIEW3D_OT_setcameratoview); WM_operatortype_append(VIEW3D_OT_drawtype); WM_operatortype_append(VIEW3D_OT_editmesh_face_toolbox); - WM_operatortype_append(VIEW3D_OT_properties); WM_operatortype_append(VIEW3D_OT_localview); WM_operatortype_append(VIEW3D_OT_layers); + WM_operatortype_append(VIEW3D_OT_properties); + WM_operatortype_append(VIEW3D_OT_toolbar); + WM_operatortype_append(VIEW3D_OT_snap_selected_to_grid); WM_operatortype_append(VIEW3D_OT_snap_selected_to_cursor); WM_operatortype_append(VIEW3D_OT_snap_selected_to_center); @@ -108,6 +110,7 @@ void view3d_keymap(wmWindowManager *wm) WM_keymap_add_item(keymap, "PAINT_OT_weight_paint_toggle", TABKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "VIEW3D_OT_properties", NKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW3D_OT_toolbar", TKEY, KM_PRESS, 0, 0); /* only for region 3D window */ keymap= WM_keymap_listbase(wm, "View3D", SPACE_VIEW3D, 0); @@ -223,9 +226,6 @@ void view3d_keymap(wmWindowManager *wm) RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_weight_paint_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH); RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_texture_paint_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH); - /* TODO - this is just while we have no way to load a text datablock */ - RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_run_pyfile", PKEY, KM_PRESS, 0, 0)->ptr, "filename", "test.py"); - transform_keymap_for_space(wm, keymap, SPACE_VIEW3D); } diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index d822015d6e0..45e1a663441 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -772,7 +772,7 @@ void VIEW3D_OT_select_lasso(wmOperatorType *ot) ot->poll= WM_operator_winactive; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag= OPTYPE_UNDO; RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", ""); RNA_def_enum(ot->srna, "type", lasso_select_types, 0, "Type", ""); @@ -1558,7 +1558,7 @@ void VIEW3D_OT_select_border(wmOperatorType *ot) ot->poll= ED_operator_view3d_active; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag= OPTYPE_UNDO; /* rna */ RNA_def_int(ot->srna, "event_type", 0, INT_MIN, INT_MAX, "Event Type", "", INT_MIN, INT_MAX); @@ -1611,7 +1611,7 @@ void VIEW3D_OT_select(wmOperatorType *ot) ot->poll= ED_operator_view3d_active; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag= OPTYPE_UNDO; /* properties */ RNA_def_enum(ot->srna, "type", prop_select_types, 0, "Type", ""); @@ -1846,7 +1846,7 @@ void VIEW3D_OT_select_circle(wmOperatorType *ot) ot->poll= ED_operator_view3d_active; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag= OPTYPE_UNDO; RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX); RNA_def_int(ot->srna, "y", 0, INT_MIN, INT_MAX, "Y", "", INT_MIN, INT_MAX); diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index 52b23f7e00e..98980548b86 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -1141,17 +1141,18 @@ int minmax_verts(Object *obedit, float *min, float *max) static int snap_menu_invoke(bContext *C, wmOperator *unused, wmEvent *event) { - uiMenuItem *head= uiPupMenuBegin("Snap", 0); + uiPopupMenu *pup= uiPupMenuBegin(C, "Snap", 0); + uiLayout *layout= uiPupMenuLayout(pup); - uiMenuItemO(head, 0, "VIEW3D_OT_snap_selected_to_grid"); - uiMenuItemO(head, 0, "VIEW3D_OT_snap_selected_to_cursor"); - uiMenuItemO(head, 0, "VIEW3D_OT_snap_selected_to_center"); - uiMenuSeparator(head); - uiMenuItemO(head, 0, "VIEW3D_OT_snap_cursor_to_selected"); - uiMenuItemO(head, 0, "VIEW3D_OT_snap_cursor_to_grid"); - uiMenuItemO(head, 0, "VIEW3D_OT_snap_cursor_to_active"); + uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_selected_to_grid"); + uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_selected_to_cursor"); + uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_selected_to_center"); + uiItemS(layout); + uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_cursor_to_selected"); + uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_cursor_to_grid"); + uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_cursor_to_active"); - uiPupMenuEnd(C, head); + uiPupMenuEnd(C, pup); /* this operator is only for a menu, not used further */ return OPERATOR_CANCELLED; diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c new file mode 100644 index 00000000000..c7cd5a92ebf --- /dev/null +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -0,0 +1,189 @@ +/** + * $Id: + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2009 Blender Foundation. + * All rights reserved. + * + * + * Contributor(s): Blender Foundation + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include <string.h> +#include <stdio.h> +#include <math.h> +#include <float.h> + +#include "DNA_ID.h" +#include "DNA_action_types.h" +#include "DNA_armature_types.h" +#include "DNA_curve_types.h" +#include "DNA_camera_types.h" +#include "DNA_lamp_types.h" +#include "DNA_lattice_types.h" +#include "DNA_meta_types.h" +#include "DNA_mesh_types.h" +#include "DNA_meshdata_types.h" +#include "DNA_object_types.h" +#include "DNA_space_types.h" +#include "DNA_scene_types.h" +#include "DNA_screen_types.h" +#include "DNA_userdef_types.h" +#include "DNA_view3d_types.h" +#include "DNA_world_types.h" + +#include "MEM_guardedalloc.h" + +#include "BLI_arithb.h" +#include "BLI_blenlib.h" +#include "BLI_editVert.h" +#include "BLI_rand.h" + +#include "BKE_action.h" +#include "BKE_brush.h" +#include "BKE_context.h" +#include "BKE_curve.h" +#include "BKE_customdata.h" +#include "BKE_depsgraph.h" +#include "BKE_idprop.h" +#include "BKE_mesh.h" +#include "BKE_object.h" +#include "BKE_global.h" +#include "BKE_scene.h" +#include "BKE_screen.h" +#include "BKE_utildefines.h" + +#include "BIF_gl.h" +#include "BIF_transform.h" + +#include "WM_api.h" +#include "WM_types.h" + +#include "RNA_access.h" +#include "RNA_define.h" + +#include "ED_armature.h" +#include "ED_curve.h" +#include "ED_image.h" +#include "ED_keyframing.h" +#include "ED_mesh.h" +#include "ED_object.h" +#include "ED_particle.h" +#include "ED_screen.h" +#include "ED_types.h" +#include "ED_util.h" + +#include "UI_interface.h" +#include "UI_resources.h" +#include "UI_view2d.h" + +#include "view3d_intern.h" // own include + + +/* ******************* view3d space & buttons ************** */ + + +/* op->invoke */ +static void redo_cb(bContext *C, void *arg_op, void *arg2) +{ + wmOperator *lastop= arg_op; + + if(lastop) { + int retval; + + printf("operator redo %s\n", lastop->type->name); + ED_undo_pop(C); + retval= WM_operator_repeat(C, lastop); + if((retval & OPERATOR_FINISHED)==0) { + printf("operator redo failed %s\n", lastop->type->name); + ED_undo_redo(C); + } + } +} + +static void view3d_panel_operator_redo(const bContext *C, Panel *pa) +{ + /* XXX temp */ + extern void uiDefAutoButsRNA_single(const bContext *C, uiLayout *layout, PointerRNA *ptr); + wmWindowManager *wm= CTX_wm_manager(C); + wmOperator *op; + PointerRNA ptr; + uiBlock *block; + + block= uiLayoutBlock(pa->layout); + + /* only for operators that are registered and did an undo push */ + for(op= wm->operators.last; op; op= op->prev) + if((op->type->flag & OPTYPE_REGISTER) && (op->type->flag & OPTYPE_UNDO)) + break; + + if(op==NULL) + return; + if(op->type->poll && op->type->poll(C)==0) + return; + + uiBlockSetFunc(block, redo_cb, op, NULL); + + if(!op->properties) { + IDPropertyTemplate val = {0}; + op->properties= IDP_New(IDP_GROUP, val, "wmOperatorProperties"); + } + + RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr); + uiDefAutoButsRNA_single(C, pa->layout, &ptr); +} + +void view3d_toolbar_register(ARegionType *art) +{ + PanelType *pt; + + pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel last operator"); + strcpy(pt->idname, "VIEW3D_PT_last_operator"); + strcpy(pt->label, "Last Operator"); + pt->draw= view3d_panel_operator_redo; + BLI_addtail(&art->paneltypes, pt); +} + +static int view3d_toolbar(bContext *C, wmOperator *op) +{ + ScrArea *sa= CTX_wm_area(C); + ARegion *ar= view3d_has_tools_region(sa); + + if(ar) { + ar->flag ^= RGN_FLAG_HIDDEN; + ar->v2d.flag &= ~V2D_IS_INITIALISED; /* XXX should become hide/unhide api? */ + + ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), sa); + ED_area_tag_redraw(sa); + } + return OPERATOR_FINISHED; +} + +void VIEW3D_OT_toolbar(wmOperatorType *ot) +{ + ot->name= "Toolbar"; + ot->idname= "VIEW3D_OT_toolbar"; + + ot->exec= view3d_toolbar; + ot->poll= ED_operator_view3d_active; + + /* flags */ + ot->flag= 0; +} diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 2aade74dcca..06e5f69bbdf 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -80,9 +80,6 @@ #include "view3d_intern.h" // own include -#define BL_NEAR_CLIP 0.001 - - /* use this call when executing an operator, event system doesn't set for each event the @@ -536,76 +533,16 @@ void request_depth_update(RegionView3D *rv3d) rv3d->depths->damaged= 1; } -void view3d_get_object_project_mat(RegionView3D *rv3d, Object *ob, float pmat[4][4], float vmat[4][4]) +void view3d_get_object_project_mat(RegionView3D *rv3d, Object *ob, float pmat[4][4]) { + float vmat[4][4]; + Mat4MulMat4(vmat, ob->obmat, rv3d->viewmat); Mat4MulMat4(pmat, vmat, rv3d->winmat); - Mat4CpyMat4(vmat, ob->obmat); -} - -/* projectmat brings it to window coords, wmat to rotated world space */ -void view3d_project_short_clip(ARegion *ar, float *vec, short *adr, float projmat[4][4], float wmat[4][4]) -{ - RegionView3D *rv3d= ar->regiondata; - float fx, fy, vec4[4]; - - adr[0]= IS_CLIPPED; - - /* clipplanes in eye space */ - if(rv3d->rflag & RV3D_CLIPPING) { - VECCOPY(vec4, vec); - Mat4MulVecfl(wmat, vec4); - if(view3d_test_clipping(rv3d, vec4)) - return; - } - - VECCOPY(vec4, vec); - vec4[3]= 1.0; - - Mat4MulVec4fl(projmat, vec4); - - /* clipplanes in window space */ - if( vec4[3]>BL_NEAR_CLIP ) { /* 0.001 is the NEAR clipping cutoff for picking */ - fx= (ar->winx/2)*(1 + vec4[0]/vec4[3]); - - if( fx>0 && fx<ar->winx) { - - fy= (ar->winy/2)*(1 + vec4[1]/vec4[3]); - - if(fy>0.0 && fy< (float)ar->winy) { - adr[0]= (short)floor(fx); - adr[1]= (short)floor(fy); - } - } - } } -void view3d_project_short_noclip(ARegion *ar, float *vec, short *adr, float mat[4][4]) -{ - float fx, fy, vec4[4]; - - adr[0]= IS_CLIPPED; - - VECCOPY(vec4, vec); - vec4[3]= 1.0; - - Mat4MulVec4fl(mat, vec4); - - if( vec4[3]>BL_NEAR_CLIP ) { /* 0.001 is the NEAR clipping cutoff for picking */ - fx= (ar->winx/2)*(1 + vec4[0]/vec4[3]); - - if( fx>-32700 && fx<32700) { - - fy= (ar->winy/2)*(1 + vec4[1]/vec4[3]); - - if(fy>-32700.0 && fy<32700.0) { - adr[0]= (short)floor(fx); - adr[1]= (short)floor(fy); - } - } - } -} +/* use above call to get projecting mat */ void view3d_project_float(ARegion *ar, float *vec, float *adr, float mat[4][4]) { float vec4[4]; diff --git a/source/blender/editors/transform/Makefile b/source/blender/editors/transform/Makefile index 36758190b52..bc3e08a2ae8 100644 --- a/source/blender/editors/transform/Makefile +++ b/source/blender/editors/transform/Makefile @@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS) CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(OPENGL_HEADERS) -CPPFLAGS += -I$(NAN_BMFONT)/include CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include CPPFLAGS += -I../../windowmanager diff --git a/source/blender/editors/transform/SConscript b/source/blender/editors/transform/SConscript index 6e98c3bf43c..8501a95b981 100644 --- a/source/blender/editors/transform/SConscript +++ b/source/blender/editors/transform/SConscript @@ -5,7 +5,7 @@ sources = env.Glob('*.c') incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' -incs += ' ../../render/extern/include #/intern/guardedalloc #intern/bmfont' +incs += ' ../../render/extern/include #/intern/guardedalloc' incs += ' ../../gpu ../../makesrna ../../bmesh' env.BlenderLib ( 'bf_editors_transform', sources, Split(incs), [], libtype=['core'], priority=[40] )
\ No newline at end of file diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 091b35c7361..674de81a9f5 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -89,15 +89,13 @@ #include "BKE_utildefines.h" #include "BKE_context.h" -//#include "BSE_drawipo.h" -//#include "BSE_editnla_types.h" /* for NLAWIDTH */ //#include "BSE_editaction_types.h" -//#include "BSE_time.h" //#include "BSE_view.h" #include "ED_image.h" #include "ED_screen.h" #include "ED_space_api.h" +#include "ED_markers.h" #include "ED_util.h" #include "ED_view3d.h" @@ -111,54 +109,14 @@ #include "PIL_time.h" /* sleep */ +#include "UI_resources.h" + //#include "blendef.h" // //#include "mydevice.h" #include "transform.h" -/* ************************** Dashed help line **************************** */ - - -/* bad frontbuffer call... because it is used in transform after force_draw() */ -static void helpline(TransInfo *t, float *vec) -{ -#if 0 // TRANSFORM_FIX_ME - float vecrot[3], cent[2]; - short mval[2]; - - VECCOPY(vecrot, vec); - if(t->flag & T_EDIT) { - Object *ob= t->obedit; - if(ob) Mat4MulVecfl(ob->obmat, vecrot); - } - else if(t->flag & T_POSE) { - Object *ob=t->poseobj; - if(ob) Mat4MulVecfl(ob->obmat, vecrot); - } - - getmouseco_areawin(mval); - projectFloatView(t, vecrot, cent); // no overflow in extreme cases - - persp(PERSP_WIN); - - glDrawBuffer(GL_FRONT); - - BIF_ThemeColor(TH_WIRE); - - setlinestyle(3); - glBegin(GL_LINE_STRIP); - glVertex2sv(mval); - glVertex2fv(cent); - glEnd(); - setlinestyle(0); - - persp(PERSP_VIEW); - bglFlush(); // flush display for frontbuffer - glDrawBuffer(GL_BACK); -#endif -} - /* ************************** SPACE DEPENDANT CODE **************************** */ void setTransformViewMatrices(TransInfo *t) @@ -242,7 +200,8 @@ void convertViewVec(TransInfo *t, float *vec, short dx, short dy) void projectIntView(TransInfo *t, float *vec, int *adr) { if (t->spacetype==SPACE_VIEW3D) { - project_int_noclip(t->ar, vec, adr); + if(t->ar->regiontype == RGN_TYPE_WINDOW) + project_int_noclip(t->ar, vec, adr); } else if(t->spacetype==SPACE_IMAGE) { float aspx, aspy, v[2]; @@ -272,7 +231,8 @@ void projectIntView(TransInfo *t, float *vec, int *adr) void projectFloatView(TransInfo *t, float *vec, float *adr) { if (t->spacetype==SPACE_VIEW3D) { - project_float_noclip(t->ar, vec, adr); + if(t->ar->regiontype == RGN_TYPE_WINDOW) + project_float_noclip(t->ar, vec, adr); } else if(t->spacetype==SPACE_IMAGE) { int a[2]; @@ -639,6 +599,7 @@ void transformEvent(TransInfo *t, wmEvent *event) resetTransRestrictions(t); restoreTransObjects(t); initTranslation(t); + initSnapping(t, NULL); // need to reinit after mode change t->redraw = 1; } break; @@ -648,6 +609,7 @@ void transformEvent(TransInfo *t, wmEvent *event) resetTransRestrictions(t); restoreTransObjects(t); initResize(t); + initSnapping(t, NULL); // need to reinit after mode change t->redraw = 1; } break; @@ -665,6 +627,7 @@ void transformEvent(TransInfo *t, wmEvent *event) restoreTransObjects(t); initRotation(t); } + initSnapping(t, NULL); // need to reinit after mode change t->redraw = 1; } break; @@ -934,6 +897,231 @@ int calculateTransformCenter(bContext *C, wmEvent *event, int centerMode, float return success; } +typedef enum { + UP, + DOWN, + LEFT, + RIGHT +} ArrowDirection; +static void drawArrow(ArrowDirection d, short offset, short length, short size) +{ + switch(d) + { + case LEFT: + offset = -offset; + length = -length; + size = -size; + case RIGHT: + glBegin(GL_LINES); + glVertex2s( offset, 0); + glVertex2s( offset + length, 0); + glVertex2s( offset + length, 0); + glVertex2s( offset + length - size, -size); + glVertex2s( offset + length, 0); + glVertex2s( offset + length - size, size); + glEnd(); + break; + case DOWN: + offset = -offset; + length = -length; + size = -size; + case UP: + glBegin(GL_LINES); + glVertex2s( 0, offset); + glVertex2s( 0, offset + length); + glVertex2s( 0, offset + length); + glVertex2s(-size, offset + length - size); + glVertex2s( 0, offset + length); + glVertex2s( size, offset + length - size); + glEnd(); + break; + } +} + +static void drawArrowHead(ArrowDirection d, short size) +{ + switch(d) + { + case LEFT: + size = -size; + case RIGHT: + glBegin(GL_LINES); + glVertex2s( 0, 0); + glVertex2s( -size, -size); + glVertex2s( 0, 0); + glVertex2s( -size, size); + glEnd(); + break; + case DOWN: + size = -size; + case UP: + glBegin(GL_LINES); + glVertex2s( 0, 0); + glVertex2s(-size, -size); + glVertex2s( 0, 0); + glVertex2s( size, -size); + glEnd(); + break; + } +} + +static void drawArc(float size, float angle_start, float angle_end, int segments) +{ + float delta = (angle_end - angle_start) / segments; + float angle; + + glBegin(GL_LINE_STRIP); + + for( angle = angle_start; angle < angle_end; angle += delta) + { + glVertex2f( cosf(angle) * size, sinf(angle) * size); + } + glVertex2f( cosf(angle_end) * size, sinf(angle_end) * size); + + glEnd(); +} + +void drawHelpline(const struct bContext *C, TransInfo *t) +{ + if (t->helpline != HLP_NONE && !(t->flag & T_USES_MANIPULATOR)) + { + float vecrot[3], cent[2]; + + VECCOPY(vecrot, t->center); + if(t->flag & T_EDIT) { + Object *ob= t->obedit; + if(ob) Mat4MulVecfl(ob->obmat, vecrot); + } + else if(t->flag & T_POSE) { + Object *ob=t->poseobj; + if(ob) Mat4MulVecfl(ob->obmat, vecrot); + } + + projectFloatView(t, vecrot, cent); // no overflow in extreme cases + + glDisable(GL_DEPTH_TEST); + + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + + ED_region_pixelspace(t->ar); + + switch(t->helpline) + { + case HLP_SPRING: + UI_ThemeColor(TH_WIRE); + + setlinestyle(3); + glBegin(GL_LINE_STRIP); + glVertex2sv(t->mval); + glVertex2fv(cent); + glEnd(); + + glTranslatef(t->mval[0], t->mval[1], 0); + glRotatef(-180 / M_PI * atan2f(cent[0] - t->mval[0], cent[1] - t->mval[1]), 0, 0, 1); + + setlinestyle(0); + glLineWidth(3.0); + drawArrow(UP, 5, 10, 5); + drawArrow(DOWN, 5, 10, 5); + glLineWidth(1.0); + break; + case HLP_HARROW: + UI_ThemeColor(TH_WIRE); + + glTranslatef(t->mval[0], t->mval[1], 0); + + glLineWidth(3.0); + drawArrow(RIGHT, 5, 10, 5); + drawArrow(LEFT, 5, 10, 5); + glLineWidth(1.0); + break; + case HLP_VARROW: + UI_ThemeColor(TH_WIRE); + + glTranslatef(t->mval[0], t->mval[1], 0); + + glLineWidth(3.0); + glBegin(GL_LINES); + drawArrow(UP, 5, 10, 5); + drawArrow(DOWN, 5, 10, 5); + glLineWidth(1.0); + break; + case HLP_ANGLE: + { + float dx = t->mval[0] - cent[0], dy = t->mval[1] - cent[1]; + float angle = atan2f(dy, dx); + float dist = sqrtf(dx*dx + dy*dy); + float delta_angle = MIN2(15 / dist, M_PI/4); + float spacing_angle = MIN2(5 / dist, M_PI/12); + UI_ThemeColor(TH_WIRE); + + setlinestyle(3); + glBegin(GL_LINE_STRIP); + glVertex2sv(t->mval); + glVertex2fv(cent); + glEnd(); + + glTranslatef(cent[0], cent[1], 0); + + setlinestyle(0); + glLineWidth(3.0); + drawArc(dist, angle - delta_angle, angle - spacing_angle, 10); + drawArc(dist, angle + spacing_angle, angle + delta_angle, 10); + + glPushMatrix(); + + glTranslatef(cosf(angle - delta_angle) * dist, sinf(angle - delta_angle) * dist, 0); + glRotatef(180 / M_PI * (angle - delta_angle), 0, 0, 1); + + drawArrowHead(DOWN, 5); + + glPopMatrix(); + + glTranslatef(cosf(angle + delta_angle) * dist, sinf(angle + delta_angle) * dist, 0); + glRotatef(180 / M_PI * (angle + delta_angle), 0, 0, 1); + + drawArrowHead(UP, 5); + + glLineWidth(1.0); + break; + } + case HLP_TRACKBALL: + { + char col[3], col2[3]; + UI_GetThemeColor3ubv(TH_GRID, col); + + glTranslatef(t->mval[0], t->mval[1], 0); + + glLineWidth(3.0); + + UI_make_axis_color(col, col2, 'x'); + glColor3ubv((GLubyte *)col2); + + drawArrow(RIGHT, 5, 10, 5); + drawArrow(LEFT, 5, 10, 5); + + UI_make_axis_color(col, col2, 'y'); + glColor3ubv((GLubyte *)col2); + + drawArrow(UP, 5, 10, 5); + drawArrow(DOWN, 5, 10, 5); + glLineWidth(1.0); + break; + } + } + + glMatrixMode(GL_PROJECTION); + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + glPopMatrix(); + + glEnable(GL_DEPTH_TEST); + } +} + void drawTransform(const struct bContext *C, struct ARegion *ar, void *arg) { TransInfo *t = arg; @@ -941,6 +1129,7 @@ void drawTransform(const struct bContext *C, struct ARegion *ar, void *arg) drawConstraint(C, t); drawPropCircle(C, t); drawSnapping(C, t); + drawHelpline(C, t); } void saveTransform(bContext *C, TransInfo *t, wmOperator *op) @@ -983,9 +1172,8 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) RNA_boolean_set(op->ptr, "mirror", t->flag & T_MIRROR); } - if (RNA_struct_find_property(op->ptr, "constraint_mode")) + if (RNA_struct_find_property(op->ptr, "constraint_axis")) { - RNA_int_set(op->ptr, "constraint_mode", t->con.mode); RNA_int_set(op->ptr, "constraint_orientation", t->current_orientation); if (t->con.mode & CON_APPLY) @@ -1036,18 +1224,11 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int return 0; } - initTransformOrientation(C, t); - if(t->spacetype == SPACE_VIEW3D) { //calc_manipulator_stats(curarea); - if (t->ar->regiontype == RGN_TYPE_WINDOW) - { - RegionView3D *rv3d = t->ar->regiondata; - Mat3CpyMat4(t->spacemtx, rv3d->twmat); - } - Mat3Ortho(t->spacemtx); - + initTransformOrientation(C, t); + t->draw_handle = ED_region_draw_cb_activate(t->ar->type, drawTransform, t, REGION_DRAW_POST); } else if(t->spacetype == SPACE_IMAGE) { @@ -1819,7 +2000,7 @@ void initWarp(TransInfo *t) t->snap[2] = 1.0f; t->flag |= T_NO_CONSTRAINT; - + /* we need min/max in view space */ for(i = 0; i < t->total; i++) { float center[3]; @@ -1955,8 +2136,6 @@ int Warp(TransInfo *t, short mval[2]) ED_area_headerprint(t->sa, str); - helpline(t, gcursor); - return 1; } @@ -2077,8 +2256,6 @@ int Shear(TransInfo *t, short mval[2]) ED_area_headerprint(t->sa, str); - helpline (t, t->center); - return 1; } @@ -2355,8 +2532,6 @@ int Resize(TransInfo *t, short mval[2]) ED_area_headerprint(t->sa, str); - if(!(t->flag & T_USES_MANIPULATOR)) helpline (t, t->center); - return 1; } @@ -2380,7 +2555,7 @@ void initToSphere(TransInfo *t) t->num.flag |= NUM_NULL_ONE | NUM_NO_NEGATIVE; t->flag |= T_NO_CONSTRAINT; - + // Calculate average radius for(i = 0 ; i < t->total; i++, td++) { t->val += VecLenf(t->center, td->iloc); @@ -2782,8 +2957,6 @@ int Rotation(TransInfo *t, short mval[2]) ED_area_headerprint(t->sa, str); - if(!(t->flag & T_USES_MANIPULATOR)) helpline (t, t->center); - return 1; } @@ -2889,8 +3062,6 @@ int Trackball(TransInfo *t, short mval[2]) ED_area_headerprint(t->sa, str); - if(!(t->flag & T_USES_MANIPULATOR)) helpline (t, t->center); - return 1; } @@ -3236,8 +3407,6 @@ int Tilt(TransInfo *t, short mval[2]) ED_area_headerprint(t->sa, str); - helpline (t, t->center); - return 1; } @@ -3302,8 +3471,6 @@ int CurveShrinkFatten(TransInfo *t, short mval[2]) ED_area_headerprint(t->sa, str); - if(!(t->flag & T_USES_MANIPULATOR)) helpline (t, t->center); - return 1; } @@ -3575,8 +3742,6 @@ int BevelWeight(TransInfo *t, short mval[2]) ED_area_headerprint(t->sa, str); - helpline (t, t->center); - return 1; } @@ -3651,8 +3816,6 @@ int Crease(TransInfo *t, short mval[2]) ED_area_headerprint(t->sa, str); - helpline (t, t->center); - return 1; } @@ -3768,8 +3931,6 @@ int BoneSize(TransInfo *t, short mval[2]) ED_area_headerprint(t->sa, str); - if(!(t->flag & T_USES_MANIPULATOR)) helpline (t, t->center); - return 1; } @@ -3836,8 +3997,6 @@ int BoneEnvelope(TransInfo *t, short mval[2]) ED_area_headerprint(t->sa, str); - if(!(t->flag & T_USES_MANIPULATOR)) helpline (t, t->center); - return 1; } @@ -3902,8 +4061,6 @@ int BoneRoll(TransInfo *t, short mval[2]) ED_area_headerprint(t->sa, str); - if(!(t->flag & T_USES_MANIPULATOR)) helpline (t, t->center); - return 1; } @@ -3980,8 +4137,6 @@ int BakeTime(TransInfo *t, short mval[2]) ED_area_headerprint(t->sa, str); - helpline (t, t->center); - return 1; } @@ -4234,8 +4389,8 @@ static void doAnimEdit_SnapFrame(TransInfo *t, TransData *td, Object *ob, short val= *(td->val); /* snap to nearest marker */ - // XXX missing function! - //val= (float)find_nearest_marker_time(val); + // TODO: need some more careful checks for where data comes from + val= (float)ED_markers_find_nearest_marker_time(&t->scene->markers, val); /* convert frame out of nla-action time */ if (ob) @@ -4512,6 +4667,7 @@ void initTimeScale(TransInfo *t) t->transform = TimeScale; initMouseInputMode(t, &t->mouse, INPUT_NONE); + t->helpline = HLP_SPRING; /* set manually because we don't use a predefined input */ t->flag |= T_NULL_ONE; t->num.flag |= NUM_NULL_ONE; diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index dfbc22b1e14..ee767fada58 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -83,8 +83,8 @@ typedef struct TransSnap { short mode; short align; short status; - float snapPoint[3]; - float snapTarget[3]; + float snapPoint[3]; /* snapping from this point */ + float snapTarget[3]; /* to this point */ float snapNormal[3]; float snapTangent[3]; float dist; // Distance from snapPoint to snapTarget @@ -232,6 +232,7 @@ typedef struct TransInfo { short persp; short around; char spacetype; /* spacetype where transforming is */ + char helpline; /* helpline modes (not to be confused with hotline) */ float vec[3]; /* translation, to show for widget */ float mat[3][3]; /* rot/rescale, to show for widget */ @@ -325,6 +326,14 @@ typedef struct TransInfo { /* ******************************************************************************** */ +/* transinfo->helpline */ +#define HLP_NONE 0 +#define HLP_SPRING 1 +#define HLP_ANGLE 2 +#define HLP_HARROW 3 +#define HLP_VARROW 4 +#define HLP_TRACKBALL 5 + /* transinfo->con->mode */ #define CON_APPLY 1 #define CON_AXIS0 2 diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index 0064317b57a..7f47bfd25af 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -63,12 +63,10 @@ #include "DNA_space_types.h" #include "DNA_view3d_types.h" -//#include "BIF_screen.h" -//#include "BIF_resources.h" -//#include "BIF_mywindow.h" #include "BIF_gl.h" #include "BIF_glutil.h" +#include "BKE_context.h" #include "BKE_global.h" #include "BKE_utildefines.h" diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 85657f96fd1..c90c7bfeef4 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -3543,14 +3543,6 @@ void flushTransGraphData(TransInfo *t) /* **************** IpoKey stuff, for Object TransData ********** */ -/* storage of bezier triple. thats why -3 and +3! */ -static void set_tdi_old(float *old, float *poin) -{ - old[0]= *(poin); - old[3]= *(poin-3); - old[6]= *(poin+3); -} - /* while transforming */ void add_tdi_poin(float *poin, float *old, float delta) { @@ -3561,8 +3553,16 @@ void add_tdi_poin(float *poin, float *old, float delta) } } -/* fill ipokey transdata with old vals and pointers */ #if 0 // TRANSFORM_FIX_ME +/* storage of bezier triple. thats why -3 and +3! */ +static void set_tdi_old(float *old, float *poin) +{ + old[0]= *(poin); + old[3]= *(poin-3); + old[6]= *(poin+3); +} + +/* fill ipokey transdata with old vals and pointers */ static void ipokey_to_transdata(IpoKey *ik, TransData *td) { extern int ob_ar[]; // blenkernel ipo.c @@ -4176,7 +4176,7 @@ void autokeyframe_ob_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode) if (adt && adt->action) { for (fcu= adt->action->curves.first; fcu; fcu= fcu->next) { fcu->flag &= ~FCURVE_SELECTED; - insertkey(id, ((fcu->grp)?(fcu->grp->name):(NULL)), fcu->rna_path, fcu->array_index, cfra, flag); + insert_keyframe(id, adt->action, ((fcu->grp)?(fcu->grp->name):(NULL)), fcu->rna_path, fcu->array_index, cfra, flag); } } } @@ -4213,35 +4213,35 @@ void autokeyframe_ob_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode) // TODO: the group names here are temporary... // TODO: should this be made to use the builtin KeyingSets instead? if (doLoc) { - insertkey(id, "Object Transform", "location", 0, cfra, flag); - insertkey(id, "Object Transform", "location", 1, cfra, flag); - insertkey(id, "Object Transform", "location", 2, cfra, flag); + insert_keyframe(id, NULL, "Object Transform", "location", 0, cfra, flag); + insert_keyframe(id, NULL, "Object Transform", "location", 1, cfra, flag); + insert_keyframe(id, NULL, "Object Transform", "location", 2, cfra, flag); } if (doRot) { - insertkey(id, "Object Transform", "rotation", 0, cfra, flag); - insertkey(id, "Object Transform", "rotation", 1, cfra, flag); - insertkey(id, "Object Transform", "rotation", 2, cfra, flag); + insert_keyframe(id, NULL, "Object Transform", "rotation", 0, cfra, flag); + insert_keyframe(id, NULL, "Object Transform", "rotation", 1, cfra, flag); + insert_keyframe(id, NULL, "Object Transform", "rotation", 2, cfra, flag); } if (doScale) { - insertkey(id, "Object Transform", "scale", 0, cfra, flag); - insertkey(id, "Object Transform", "scale", 1, cfra, flag); - insertkey(id, "Object Transform", "scale", 2, cfra, flag); + insert_keyframe(id, NULL, "Object Transform", "scale", 0, cfra, flag); + insert_keyframe(id, NULL, "Object Transform", "scale", 1, cfra, flag); + insert_keyframe(id, NULL, "Object Transform", "scale", 2, cfra, flag); } } else { // TODO: the group names here are temporary... // TODO: should this be made to use the builtin KeyingSets instead? - insertkey(id, "Object Transform", "location", 0, cfra, flag); - insertkey(id, "Object Transform", "location", 1, cfra, flag); - insertkey(id, "Object Transform", "location", 2, cfra, flag); + insert_keyframe(id, NULL, "Object Transform", "location", 0, cfra, flag); + insert_keyframe(id, NULL, "Object Transform", "location", 1, cfra, flag); + insert_keyframe(id, NULL, "Object Transform", "location", 2, cfra, flag); - insertkey(id, "Object Transform", "rotation", 0, cfra, flag); - insertkey(id, "Object Transform", "rotation", 1, cfra, flag); - insertkey(id, "Object Transform", "rotation", 2, cfra, flag); + insert_keyframe(id, NULL, "Object Transform", "rotation", 0, cfra, flag); + insert_keyframe(id, NULL, "Object Transform", "rotation", 1, cfra, flag); + insert_keyframe(id, NULL, "Object Transform", "rotation", 2, cfra, flag); - insertkey(id, "Object Transform", "scale", 0, cfra, flag); - insertkey(id, "Object Transform", "scale", 1, cfra, flag); - insertkey(id, "Object Transform", "scale", 2, cfra, flag); + insert_keyframe(id, NULL, "Object Transform", "scale", 0, cfra, flag); + insert_keyframe(id, NULL, "Object Transform", "scale", 1, cfra, flag); + insert_keyframe(id, NULL, "Object Transform", "scale", 2, cfra, flag); } // XXX todo... find a way to send notifiers from here... @@ -4286,7 +4286,7 @@ void autokeyframe_pose_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode, if (IS_AUTOKEY_FLAG(INSERTAVAIL)) { if (act) { for (fcu= act->curves.first; fcu; fcu= fcu->next) - insertkey(id, ((fcu->grp)?(fcu->grp->name):(NULL)), fcu->rna_path, fcu->array_index, cfra, flag); + insert_keyframe(id, act, ((fcu->grp)?(fcu->grp->name):(NULL)), fcu->rna_path, fcu->array_index, cfra, flag); } } /* only insert keyframe if needed? */ @@ -4317,57 +4317,57 @@ void autokeyframe_pose_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode, if (doLoc) { sprintf(buf, "pose.pose_channels[\"%s\"].location", pchan->name); - insertkey(id, pchan->name, buf, 0, cfra, flag); - insertkey(id, pchan->name, buf, 1, cfra, flag); - insertkey(id, pchan->name, buf, 2, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 0, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 1, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 2, cfra, flag); } if (doRot) { if (pchan->rotmode == PCHAN_ROT_QUAT) { sprintf(buf, "pose.pose_channels[\"%s\"].rotation", pchan->name); - insertkey(id, pchan->name, buf, 0, cfra, flag); - insertkey(id, pchan->name, buf, 1, cfra, flag); - insertkey(id, pchan->name, buf, 2, cfra, flag); - insertkey(id, pchan->name, buf, 3, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 0, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 1, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 2, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 3, cfra, flag); } else { sprintf(buf, "pose.pose_channels[\"%s\"].euler_rotation", pchan->name); - insertkey(id, pchan->name, buf, 0, cfra, flag); - insertkey(id, pchan->name, buf, 1, cfra, flag); - insertkey(id, pchan->name, buf, 2, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 0, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 1, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 2, cfra, flag); } } if (doScale) { sprintf(buf, "pose.pose_channels[\"%s\"].scale", pchan->name); - insertkey(id, pchan->name, buf, 0, cfra, flag); - insertkey(id, pchan->name, buf, 1, cfra, flag); - insertkey(id, pchan->name, buf, 2, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 0, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 1, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 2, cfra, flag); } } /* insert keyframe in any channel that's appropriate */ else { sprintf(buf, "pose.pose_channels[\"%s\"].location", pchan->name); - insertkey(id, pchan->name, buf, 0, cfra, flag); - insertkey(id, pchan->name, buf, 1, cfra, flag); - insertkey(id, pchan->name, buf, 2, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 0, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 1, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 2, cfra, flag); if (pchan->rotmode == PCHAN_ROT_QUAT) { sprintf(buf, "pose.pose_channels[\"%s\"].rotation", pchan->name); - insertkey(id, pchan->name, buf, 0, cfra, flag); - insertkey(id, pchan->name, buf, 1, cfra, flag); - insertkey(id, pchan->name, buf, 2, cfra, flag); - insertkey(id, pchan->name, buf, 3, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 0, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 1, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 2, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 3, cfra, flag); } else { sprintf(buf, "pose.pose_channels[\"%s\"].euler_rotation", pchan->name); - insertkey(id, pchan->name, buf, 0, cfra, flag); - insertkey(id, pchan->name, buf, 1, cfra, flag); - insertkey(id, pchan->name, buf, 2, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 0, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 1, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 2, cfra, flag); } sprintf(buf, "pose.pose_channels[\"%s\"].scale", pchan->name); - insertkey(id, pchan->name, buf, 0, cfra, flag); - insertkey(id, pchan->name, buf, 1, cfra, flag); - insertkey(id, pchan->name, buf, 2, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 0, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 1, cfra, flag); + insert_keyframe(id, NULL, pchan->name, buf, 2, cfra, flag); } } } diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 21e18f09882..ba4d3089fdf 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -622,7 +622,6 @@ void recalcData(TransInfo *t) void drawLine(TransInfo *t, float *center, float *dir, char axis, short options) { - extern void make_axis_color(char *col, char *col2, char axis); // view3d_draw.c float v1[3], v2[3], v3[3]; char col[3], col2[3]; @@ -647,7 +646,7 @@ void drawLine(TransInfo *t, float *center, float *dir, char axis, short options) else { UI_GetThemeColor3ubv(TH_GRID, col); } - make_axis_color(col, col2, axis); + UI_make_axis_color(col, col2, axis); glColor3ubv((GLubyte *)col2); setlinestyle(0); @@ -686,6 +685,8 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event) t->data = NULL; t->ext = NULL; + t->helpline = HLP_NONE; + t->flag = 0; t->redraw = 1; /* redraw first time */ diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c index 3272c35f5fa..4d721a83c78 100644 --- a/source/blender/editors/transform/transform_input.c +++ b/source/blender/editors/transform/transform_input.c @@ -251,35 +251,44 @@ void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode) { case INPUT_VECTOR: mi->apply = InputVector; + t->helpline = HLP_NONE; break; case INPUT_SPRING: calcSpringFactor(mi); mi->apply = InputSpring; + t->helpline = HLP_SPRING; break; case INPUT_SPRING_FLIP: calcSpringFactor(mi); mi->apply = InputSpringFlip; + t->helpline = HLP_SPRING; break; case INPUT_ANGLE: mi->apply = InputAngle; + t->helpline = HLP_ANGLE; break; case INPUT_TRACKBALL: /* factor has to become setting or so */ mi->factor = 0.1f; mi->apply = InputTrackBall; + t->helpline = HLP_TRACKBALL; break; case INPUT_HORIZONTAL_RATIO: mi->factor = (float)(mi->center[0] - mi->imval[0]); mi->apply = InputHorizontalRatio; + t->helpline = HLP_HARROW; break; case INPUT_HORIZONTAL_ABSOLUTE: mi->apply = InputHorizontalAbsolute; + t->helpline = HLP_HARROW; break; case INPUT_VERTICAL_RATIO: mi->apply = InputVerticalRatio; + t->helpline = HLP_VARROW; break; case INPUT_VERTICAL_ABSOLUTE: mi->apply = InputVerticalAbsolute; + t->helpline = HLP_VARROW; break; case INPUT_NONE: default: diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index a45af971d01..769001b30a8 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -119,11 +119,13 @@ static int select_orientation_exec(bContext *C, wmOperator *op) static int select_orientation_invoke(bContext *C, wmOperator *op, wmEvent *event) { - uiMenuItem *head; + uiPopupMenu *pup; + uiLayout *layout; - head= uiPupMenuBegin("Orientation", 0); - BIF_menuTransformOrientation(C, head, NULL); - uiPupMenuEnd(C, head); + pup= uiPupMenuBegin(C, "Orientation", 0); + layout= uiPupMenuLayout(pup); + BIF_menuTransformOrientation(C, layout, NULL); + uiPupMenuEnd(C, pup); return OPERATOR_CANCELLED; } @@ -267,7 +269,7 @@ static int transform_invoke(bContext *C, wmOperator *op, wmEvent *event) void Properties_Proportional(struct wmOperatorType *ot) { - RNA_def_enum(ot->srna, "proportional", proportional_mode_types, 0, "Proportional Edition", ""); + RNA_def_enum(ot->srna, "proportional", proportional_mode_types, 0, "Proportional Editing", ""); RNA_def_enum(ot->srna, "proportional_editing_falloff", prop_mode_items, 0, "Proportional Editing Falloff", "Falloff type for proportional editing mode."); RNA_def_float(ot->srna, "proportional_size", 1, 0, FLT_MAX, "Proportional Size", "", 0, 100); } @@ -309,7 +311,7 @@ void TFM_OT_translation(struct wmOperatorType *ot) Properties_Proportional(ot); - RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Edition", ""); + RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); Properties_Constraints(ot); @@ -334,7 +336,7 @@ void TFM_OT_resize(struct wmOperatorType *ot) Properties_Proportional(ot); - RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Edition", ""); + RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); Properties_Constraints(ot); @@ -359,7 +361,7 @@ void TFM_OT_rotation(struct wmOperatorType *ot) Properties_Proportional(ot); - RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Edition", ""); + RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); Properties_Constraints(ot); @@ -384,7 +386,7 @@ void TFM_OT_tilt(struct wmOperatorType *ot) Properties_Proportional(ot); - RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Edition", ""); + RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); Properties_Constraints(ot); } @@ -407,7 +409,7 @@ void TFM_OT_warp(struct wmOperatorType *ot) Properties_Proportional(ot); - RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Edition", ""); + RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); // XXX Shear axis? // Properties_Constraints(ot); @@ -431,7 +433,7 @@ void TFM_OT_shear(struct wmOperatorType *ot) Properties_Proportional(ot); - RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Edition", ""); + RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); // XXX Shear axis? // Properties_Constraints(ot); @@ -455,7 +457,7 @@ void TFM_OT_shrink_fatten(struct wmOperatorType *ot) Properties_Proportional(ot); - RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Edition", ""); + RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); } void TFM_OT_tosphere(struct wmOperatorType *ot) @@ -476,7 +478,7 @@ void TFM_OT_tosphere(struct wmOperatorType *ot) Properties_Proportional(ot); - RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Edition", ""); + RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); } void TFM_OT_transform(struct wmOperatorType *ot) @@ -528,7 +530,7 @@ void TFM_OT_transform(struct wmOperatorType *ot) RNA_def_float_vector(ot->srna, "value", 4, NULL, -FLT_MAX, FLT_MAX, "Values", "", -FLT_MAX, FLT_MAX); Properties_Proportional(ot); - RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Edition", ""); + RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); RNA_def_boolean_vector(ot->srna, "constraint_axis", 3, NULL, "Constraint Axis", ""); RNA_def_int(ot->srna, "constraint_orientation", 0, 0, INT_MAX, "Constraint Orientation", "", 0, INT_MAX); diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index c2f10e6798d..332a1e5a324 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -355,19 +355,19 @@ void BIF_selectTransformOrientationValue(bContext *C, int orientation) { v3d->twmode = orientation; } -void BIF_menuTransformOrientation(bContext *C, uiMenuItem *head, void *arg) +void BIF_menuTransformOrientation(bContext *C, uiLayout *layout, void *arg) { ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces; TransformOrientation *ts; int i= V3D_MANIP_CUSTOM; - uiMenuItemEnumO(head, "", 0, "TFM_OT_select_orientation", "orientation", V3D_MANIP_GLOBAL); - uiMenuItemEnumO(head, "", 0, "TFM_OT_select_orientation", "orientation", V3D_MANIP_LOCAL); - uiMenuItemEnumO(head, "", 0, "TFM_OT_select_orientation", "orientation", V3D_MANIP_NORMAL); - uiMenuItemEnumO(head, "", 0, "TFM_OT_select_orientation", "orientation", V3D_MANIP_VIEW); + uiItemEnumO(layout, NULL, 0, "TFM_OT_select_orientation", "orientation", V3D_MANIP_GLOBAL); + uiItemEnumO(layout, NULL, 0, "TFM_OT_select_orientation", "orientation", V3D_MANIP_LOCAL); + uiItemEnumO(layout, NULL, 0, "TFM_OT_select_orientation", "orientation", V3D_MANIP_NORMAL); + uiItemEnumO(layout, NULL, 0, "TFM_OT_select_orientation", "orientation", V3D_MANIP_VIEW); for(ts = transform_spaces->first; ts; ts = ts->next) - uiMenuItemIntO(head, ts->name, 0, "TFM_OT_select_orientation", "custom_index", i++); + uiItemIntO(layout, ts->name, 0, "TFM_OT_select_orientation", "custom_index", i++); } char * BIF_menustringTransformOrientation(const bContext *C, char *title) { @@ -406,7 +406,6 @@ int BIF_countTransformOrientation(const bContext *C) { void applyTransformOrientation(bContext *C, TransInfo *t) { TransformOrientation *ts; View3D *v3d = CTX_wm_view3d(C); - RegionView3D *rv3d= CTX_wm_region_view3d(C); int selected_index = (v3d->twmode - V3D_MANIP_CUSTOM); int i; @@ -415,7 +414,6 @@ void applyTransformOrientation(bContext *C, TransInfo *t) { if (selected_index == i) { strcpy(t->spacename, ts->name); Mat3CpyMat3(t->spacemtx, ts->mat); - Mat4CpyMat3(rv3d->twmat, ts->mat); break; } } @@ -449,14 +447,11 @@ static int count_bone_select(bArmature *arm, ListBase *lb, int do_it) void initTransformOrientation(bContext *C, TransInfo *t) { View3D *v3d = CTX_wm_view3d(C); - RegionView3D *rv3d = CTX_wm_region_view3d(C); Object *ob = CTX_data_active_object(C); Object *obedit = CTX_data_active_object(C); float normal[3]={0.0, 0.0, 0.0}; float plane[3]={0.0, 0.0, 0.0}; - if(t->spacetype != SPACE_VIEW3D) return; - switch(t->current_orientation) { case V3D_MANIP_GLOBAL: strcpy(t->spacename, "global"); @@ -501,28 +496,35 @@ void initTransformOrientation(bContext *C, TransInfo *t) if (type == ORIENTATION_NONE) { - Mat4One(rv3d->twmat); + Mat3One(t->spacemtx); } else { - Mat4CpyMat3(rv3d->twmat, mat); + Mat3CpyMat3(t->spacemtx, mat); } break; } /* no break we define 'normal' as 'local' in Object mode */ case V3D_MANIP_LOCAL: strcpy(t->spacename, "local"); - Mat4CpyMat4(rv3d->twmat, ob->obmat); - Mat4Ortho(rv3d->twmat); + Mat3CpyMat4(t->spacemtx, ob->obmat); + Mat3Ortho(t->spacemtx); break; case V3D_MANIP_VIEW: + if (t->ar->regiontype == RGN_TYPE_WINDOW) { + RegionView3D *rv3d = t->ar->regiondata; float mat[3][3]; + strcpy(t->spacename, "view"); Mat3CpyMat4(mat, rv3d->viewinv); Mat3Ortho(mat); - Mat4CpyMat3(rv3d->twmat, mat); + Mat3CpyMat3(t->spacemtx, mat); + } + else + { + Mat3One(t->spacemtx); } break; default: /* V3D_MANIP_CUSTOM */ diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 0ce29075b61..8dd203d95ce 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -556,13 +556,13 @@ void CalcSnapGeometry(TransInfo *t, float *vec) peelObjectsTransForm(t, &depth_peels, t->mval); -// if (stk->nb_points > 0 && stk->points[stk->nb_points - 1].type == PT_CONTINUOUS) +// if (LAST_SNAP_POINT_VALID) // { -// last_p = stk->points[stk->nb_points - 1].p; +// last_p = LAST_SNAP_POINT; // } -// else if (LAST_SNAP_POINT_VALID) +// else // { -// last_p = LAST_SNAP_POINT; + last_p = t->tsnap.snapPoint; // } @@ -1633,13 +1633,26 @@ int peelObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, ListBase if (ob->type == OB_MESH) { #if 0 //BMESH_TODO - DerivedMesh *dm; + EditMesh *em; + DerivedMesh *dm = NULL; int val; - - val = peelDerivedMesh(ob, dm, dupli_ob->mat, ray_start, ray_normal, mval, depth_peels); - + + if (ob != obedit) + { + dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH); + + val = peelDerivedMesh(ob, dm, ob->obmat, ray_start, ray_normal, mval, depth_peels); + } + else + { + em = ((Mesh *)ob->data)->edit_mesh; + dm = editmesh_get_derived_cage(scene, obedit, em, CD_MASK_BAREMESH); + + val = peelDerivedMesh(ob, dm, ob->obmat, ray_start, ray_normal, mval, depth_peels); + } + retval = retval || val; - + dm->release(dm); #endif } diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index 4824d90f5bd..93760ab77e3 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -42,49 +42,56 @@ #include "BKE_context.h" #include "BKE_global.h" +#include "BKE_main.h" #include "ED_armature.h" #include "ED_mesh.h" #include "ED_sculpt.h" #include "ED_util.h" -#include "UI_text.h" +#include "UI_interface.h" /* ********* general editor util funcs, not BKE stuff please! ********* */ +/* frees all editmode stuff */ void ED_editors_exit(bContext *C) { - Object *ob= CTX_data_edit_object(C); + Scene *sce; /* frees all editmode undos */ undo_editmode_clear(); undo_imagepaint_clear(); - /* global in meshtools... */ - mesh_octree_table(ob, NULL, NULL, 'e'); - - if(ob) { - if(ob->type==OB_MESH) { - Mesh *me= ob->data; - if(me->edit_btmesh) { - EDBM_FreeEditBMesh(me->edit_btmesh); - MEM_freeN(me->edit_btmesh); - me->edit_btmesh= NULL; + for(sce=G.main->scene.first; sce; sce= sce->id.next) { + if(sce->obedit) { + Object *ob= sce->obedit; + + /* global in meshtools... */ + mesh_octree_table(ob, NULL, NULL, 'e'); + + if(ob) { + if(ob->type==OB_MESH) { + Mesh *me= ob->data; + if(me->edit_btmesh) { + EDBM_FreeEditBMesh(me->edit_btmesh); + MEM_freeN(me->edit_btmesh); + me->edit_btmesh= NULL; + } + } + else if(ob->type==OB_ARMATURE) { + ED_armature_edit_free(ob); + } + else if(ob->type==OB_FONT) { + // free_editText(); + } + // else if(ob->type==OB_MBALL) + // BLI_freelistN(&editelems); + // free_editLatt(); + // free_posebuf(); } } - else if(ob->type==OB_ARMATURE) { - ED_armature_edit_free(ob); - } - else if(ob->type==OB_FONT) { - // free_editText(); - } - // else if(ob->type==OB_MBALL) - // BLI_freelistN(&editelems); } - // free_editLatt(); - // free_posebuf(); - } @@ -115,7 +122,7 @@ int GetButStringLength(char *str) { int rt; - rt= UI_GetStringWidth(G.font, str, (U.transopts & USER_TR_BUTTONS)); + rt= UI_GetStringWidth(str); return rt + 15; } diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c index d813069a4a8..8484ad78bc4 100644 --- a/source/blender/editors/util/editmode_undo.c +++ b/source/blender/editors/util/editmode_undo.c @@ -343,7 +343,7 @@ uiBlock *editmode_undohistorymenu(bContext *C, ARegion *ar, void *arg_unused) undo_clean_stack(C); // removes other objects from it - block= uiBeginBlock(C, ar, "view3d_edit_mesh_undohistorymenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "view3d_edit_mesh_undohistorymenu", UI_EMBOSSP); uiBlockSetButmFunc(block, do_editmode_undohistorymenu, NULL); for(uel= undobase.first; uel; uel= uel->next, item++) { diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index 0b0919ff981..62ce76a7614 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -176,6 +176,10 @@ void ED_undo_pop(bContext *C) { ed_undo_step(C, 1); } +void ED_undo_redo(bContext *C) +{ + ed_undo_step(C, -1); +} static int ed_undo_exec(bContext *C, wmOperator *op) { diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index 74ffc0b0725..372caa5564e 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -38,6 +38,7 @@ #include "BKE_customdata.h" #include "BKE_DerivedMesh.h" +#include "BKE_mesh.h" #include "BKE_object.h" #include "BKE_utildefines.h" #include "BKE_mesh.h" @@ -121,7 +122,7 @@ static void draw_uvs_shadow(SpaceImage *sima, Object *obedit) EditFace *efa; TFace *tf; - em= EM_GetEditMesh((Mesh*)obedit->data); + em= BKE_mesh_get_editmesh((Mesh*)obedit->data); /* draws the grey mesh when painting */ glColor3ub(112, 112, 112); @@ -137,7 +138,7 @@ static void draw_uvs_shadow(SpaceImage *sima, Object *obedit) glEnd(); } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } static int draw_uvs_dm_shadow(DerivedMesh *dm) @@ -429,7 +430,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) int drawfaces, interpedges, lastsel, sel; Image *ima= sima->image; - em= EM_GetEditMesh(me); + em= BKE_mesh_get_editmesh(me); activetf= EM_get_active_mtface(em, &efa_act, NULL, 0); /* will be set to NULL if hidden */ settings= scene->toolsettings; @@ -450,7 +451,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) /* first try existing derivedmesh */ if(!draw_uvs_dm_shadow(em->derivedFinal)) { /* create one if it does not exist */ - cagedm = editbmesh_get_derived_cage_and_final(scene, obedit, em, &finaldm, CD_MASK_BAREMESH|CD_MASK_MTFACE); + cagedm = editbmesh_get_derived_cage_and_final(scene, obedit, me->edit_btmesh, &finaldm, CD_MASK_BAREMESH|CD_MASK_MTFACE); /* when sync selection is enabled, all faces are drawn (except for hidden) * so if cage is the same as the final, theres no point in drawing this */ @@ -827,7 +828,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) } glPointSize(1.0); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } void draw_uvedit_main(SpaceImage *sima, ARegion *ar, Scene *scene, Object *obedit) diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 17b2aff1b21..517d204ac8e 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -81,9 +81,9 @@ int ED_uvedit_test(Object *obedit) if(obedit->type != OB_MESH) return 0; - em = EM_GetEditMesh(obedit->data); + em = BKE_mesh_get_editmesh(obedit->data); ret = EM_texFaceCheck(em); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return ret; } @@ -105,9 +105,9 @@ void ED_uvedit_assign_image(Scene *scene, Object *obedit, Image *ima, Image *pre if(!obedit || (obedit->type != OB_MESH)) return; - em= EM_GetEditMesh(((Mesh*)obedit->data)); + em= BKE_mesh_get_editmesh(((Mesh*)obedit->data)); if(!em || !em->faces.first) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return; } @@ -145,7 +145,7 @@ void ED_uvedit_assign_image(Scene *scene, Object *obedit, Image *ima, Image *pre if(update) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } /* dotile - 1, set the tile flag (from the space image) @@ -164,7 +164,7 @@ void ED_uvedit_set_tile(bContext *C, Scene *scene, Object *obedit, Image *ima, i if(ima->type==IMA_TYPE_R_RESULT || ima->type==IMA_TYPE_COMPOSITE) return; - em= EM_GetEditMesh((Mesh*)obedit->data); + em= BKE_mesh_get_editmesh((Mesh*)obedit->data); for(efa= em->faces.first; efa; efa= efa->next) { tf = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE); @@ -184,7 +184,7 @@ void ED_uvedit_set_tile(bContext *C, Scene *scene, Object *obedit, Image *ima, i DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } /*********************** space conversion *********************/ @@ -368,7 +368,7 @@ void uv_copy_aspect(float uv_orig[][2], float uv[][2], float aspx, float aspy) int ED_uvedit_minmax(Scene *scene, Image *ima, Object *obedit, float *min, float *max) { - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; int sel; @@ -386,13 +386,13 @@ int ED_uvedit_minmax(Scene *scene, Image *ima, Object *obedit, float *min, float } } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return sel; } int uvedit_center(Scene *scene, Image *ima, Object *obedit, float *cent, int mode) { - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; float min[2], max[2]; @@ -421,11 +421,11 @@ int uvedit_center(Scene *scene, Image *ima, Object *obedit, float *cent, int mod cent[0]= (min[0]+max[0])/2.0; cent[1]= (min[1]+max[1])/2.0; - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return 1; } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return 0; } @@ -584,7 +584,7 @@ static void find_nearest_uv_vert(Scene *scene, Image *ima, EditMesh *em, float c int ED_uvedit_nearest_uv(Scene *scene, Object *obedit, Image *ima, float co[2], float uv[2]) { - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; float mindist, dist; @@ -614,7 +614,7 @@ int ED_uvedit_nearest_uv(Scene *scene, Object *obedit, Image *ima, float co[2], } } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return found; } @@ -994,7 +994,7 @@ static void weld_align_uv(bContext *C, int tool) scene= CTX_data_scene(C); obedit= CTX_data_edit_object(C); - em= EM_GetEditMesh((Mesh*)obedit->data); + em= BKE_mesh_get_editmesh((Mesh*)obedit->data); ima= CTX_data_edit_image(C); INIT_MINMAX2(min, max); @@ -1055,7 +1055,7 @@ static void weld_align_uv(bContext *C, int tool) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } static int align_exec(bContext *C, wmOperator *op) @@ -1129,7 +1129,7 @@ static int stitch_exec(bContext *C, wmOperator *op) sima= (SpaceImage*)CTX_wm_space_data(C); scene= CTX_data_scene(C); obedit= CTX_data_edit_object(C); - em= EM_GetEditMesh((Mesh*)obedit->data); + em= BKE_mesh_get_editmesh((Mesh*)obedit->data); ima= CTX_data_edit_image(C); if(RNA_boolean_get(op->ptr, "use_limit")) { @@ -1145,7 +1145,7 @@ static int stitch_exec(bContext *C, wmOperator *op) vmap= EM_make_uv_vert_map(em, 1, 0, limit); if(vmap == NULL) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1276,7 +1276,7 @@ static int stitch_exec(bContext *C, wmOperator *op) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -1309,7 +1309,7 @@ static int select_inverse_exec(bContext *C, wmOperator *op) scene= CTX_data_scene(C); obedit= CTX_data_edit_object(C); - em= EM_GetEditMesh((Mesh*)obedit->data); + em= BKE_mesh_get_editmesh((Mesh*)obedit->data); ima= CTX_data_edit_image(C); if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) { @@ -1330,7 +1330,7 @@ static int select_inverse_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -1360,7 +1360,7 @@ static int de_select_all_exec(bContext *C, wmOperator *op) scene= CTX_data_scene(C); obedit= CTX_data_edit_object(C); - em= EM_GetEditMesh((Mesh*)obedit->data); + em= BKE_mesh_get_editmesh((Mesh*)obedit->data); ima= CTX_data_edit_image(C); if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) { @@ -1398,7 +1398,7 @@ static int de_select_all_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -1445,7 +1445,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop) Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); Image *ima= CTX_data_edit_image(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; NearestHit hit; @@ -1480,7 +1480,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop) /* find edge */ find_nearest_uv_edge(scene, ima, em, co, &hit); if(hit.efa == NULL) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } } @@ -1488,7 +1488,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop) /* find vertex */ find_nearest_uv_vert(scene, ima, em, co, penalty, &hit); if(hit.efa == NULL) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1503,7 +1503,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop) /* find edge */ find_nearest_uv_edge(scene, ima, em, co, &hit); if(hit.efa == NULL) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1522,7 +1522,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop) /* find face */ find_nearest_uv_face(scene, ima, em, co, &hit); if(hit.efa == NULL) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1544,12 +1544,12 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop) find_nearest_uv_vert(scene, ima, em, co, NULL, &hit); if(hit.efa==NULL) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } } else { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1702,7 +1702,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_PASS_THROUGH|OPERATOR_FINISHED; } @@ -1808,13 +1808,13 @@ static int select_linked_exec(bContext *C, wmOperator *op) Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); Image *ima= CTX_data_edit_image(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); float limit[2]; int extend; if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) { BKE_report(op->reports, RPT_ERROR, "Can't select linked when sync selection is enabled."); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1825,7 +1825,7 @@ static int select_linked_exec(bContext *C, wmOperator *op) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -1852,13 +1852,13 @@ static int unlink_selection_exec(bContext *C, wmOperator *op) Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); Image *ima= CTX_data_edit_image(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) { BKE_report(op->reports, RPT_ERROR, "Can't unlink selection when sync selection is enabled."); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1880,7 +1880,7 @@ static int unlink_selection_exec(bContext *C, wmOperator *op) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -1913,7 +1913,7 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje * This only needs to be done when the Mesh is not used for * selection (so for sticky modes, vertex or location based). */ - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; int nverts, i; @@ -1969,7 +1969,7 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje eve->tmp.l = a; */ if(vmap == NULL) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return; } @@ -2031,7 +2031,7 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje } } } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } static int border_select_exec(bContext *C, wmOperator *op) @@ -2041,7 +2041,7 @@ static int border_select_exec(bContext *C, wmOperator *op) Object *obedit= CTX_data_edit_object(C); Image *ima= CTX_data_edit_image(C); ARegion *ar= CTX_wm_region(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tface; rcti rect; @@ -2154,11 +2154,11 @@ static int border_select_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } - - EM_EndEditMesh(obedit->data, em); + + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -2211,7 +2211,7 @@ int circle_select_exec(bContext *C, wmOperator *op) SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); ARegion *ar= CTX_wm_region(C); EditFace *efa; MTFace *tface; @@ -2249,7 +2249,7 @@ int circle_select_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -2347,7 +2347,7 @@ void UV_OT_snap_cursor(wmOperatorType *ot) static int snap_uvs_to_cursor(Scene *scene, Image *ima, Object *obedit, View2D *v2d) { - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tface; short change= 0; @@ -2365,13 +2365,13 @@ static int snap_uvs_to_cursor(Scene *scene, Image *ima, Object *obedit, View2D * } } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return change; } static int snap_uvs_to_adjacent_unselected(Scene *scene, Image *ima, Object *obedit) { - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; EditVert *eve; MTFace *tface; @@ -2446,7 +2446,7 @@ static int snap_uvs_to_adjacent_unselected(Scene *scene, Image *ima, Object *obe if(!change) { MEM_freeN(coords); MEM_freeN(usercount); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return change; } @@ -2493,13 +2493,13 @@ static int snap_uvs_to_adjacent_unselected(Scene *scene, Image *ima, Object *obe MEM_freeN(coords); MEM_freeN(usercount); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return change; } static int snap_uvs_to_pixels(SpaceImage *sima, Scene *scene, Object *obedit) { - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); Image *ima= sima->image; EditFace *efa; MTFace *tface; @@ -2524,7 +2524,7 @@ static int snap_uvs_to_pixels(SpaceImage *sima, Scene *scene, Object *obedit) } } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return change; } @@ -2586,7 +2586,7 @@ static int pin_exec(bContext *C, wmOperator *op) Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); Image *ima= CTX_data_edit_image(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tface; int clear= RNA_boolean_get(op->ptr, "clear"); @@ -2614,7 +2614,7 @@ static int pin_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -2640,7 +2640,7 @@ static int select_pinned_exec(bContext *C, wmOperator *op) Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); Image *ima= CTX_data_edit_image(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tface; @@ -2659,7 +2659,7 @@ static int select_pinned_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -2682,7 +2682,7 @@ static int hide_exec(bContext *C, wmOperator *op) SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; int swap= RNA_boolean_get(op->ptr, "unselected"); @@ -2691,7 +2691,8 @@ static int hide_exec(bContext *C, wmOperator *op) EM_hide_mesh(em, swap); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -2799,7 +2800,7 @@ static int hide_exec(bContext *C, wmOperator *op) EM_validate_selections(em); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -2825,7 +2826,7 @@ static int reveal_exec(bContext *C, wmOperator *op) SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; @@ -2834,7 +2835,7 @@ static int reveal_exec(bContext *C, wmOperator *op) EM_reveal_mesh(em); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -2930,7 +2931,7 @@ static int reveal_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index 0fcd0062044..5cc471ebc22 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -4311,8 +4311,8 @@ void param_smooth_area(ParamHandle *handle) } } -void param_pack(ParamHandle *handle) -{ +void param_pack(ParamHandle *handle, float margin) +{ /* box packing variables */ boxPack *boxarray, *box; float tot_width, tot_height, scale; @@ -4320,6 +4320,7 @@ void param_pack(ParamHandle *handle) PChart *chart; int i, unpacked=0; float trans[2]; + double area= 0.0; PHandle *phandle = (PHandle*)handle; @@ -4332,6 +4333,7 @@ void param_pack(ParamHandle *handle) /* we may not use all these boxes */ boxarray = MEM_mallocN( phandle->ncharts*sizeof(boxPack), "boxPack box"); + for (i = 0; i < phandle->ncharts; i++) { chart = phandle->charts[i]; @@ -4352,6 +4354,32 @@ void param_pack(ParamHandle *handle) box->w = chart->u.pack.size[0] + trans[0]; box->h = chart->u.pack.size[1] + trans[1]; box->index = i; /* warning this index skips PCHART_NOPACK boxes */ + + if(margin>0.0f) + area += sqrt(box->w*box->h); + } + + if(margin>0.0f) { + /* multiply the margin by the area to give pradictable results not dependant on UV scale, + * ...Without using the area running pack multiple times also gives a bad feedback loop. + * multiply by 0.1 so the margin value from the UI can be from 0.0 to 1.0 but not give a massive margin */ + margin = (margin*(float)area) * 0.1; + unpacked= 0; + for (i = 0; i < phandle->ncharts; i++) { + chart = phandle->charts[i]; + + if (chart->flag & PCHART_NOPACK) { + unpacked++; + continue; + } + + box = boxarray+(i-unpacked); + trans[0] = margin * area; + trans[1] = margin * area; + p_chart_uv_translate(chart, trans); + box->w += (margin * area) *2; + box->h += (margin * area) *2; + } } boxPack2D(boxarray, phandle->ncharts-unpacked, &tot_width, &tot_height); diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.h b/source/blender/editors/uvedit/uvedit_parametrizer.h index c468b8d62c5..f1454ee3865 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.h +++ b/source/blender/editors/uvedit/uvedit_parametrizer.h @@ -73,7 +73,7 @@ void param_smooth_area(ParamHandle *handle); /* Packing */ -void param_pack(ParamHandle *handle); +void param_pack(ParamHandle *handle, float margin); /* Average area for all charts */ diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index e8a0de28658..27d0c68ec36 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -72,12 +72,12 @@ static int ED_uvedit_ensure_uvs(bContext *C, Scene *scene, Object *obedit) { - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; if(ED_uvedit_test(obedit)) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return 1; } @@ -85,7 +85,7 @@ static int ED_uvedit_ensure_uvs(bContext *C, Scene *scene, Object *obedit) EM_add_data_layer(em, &em->fdata, CD_MTFACE); if(!ED_uvedit_test(obedit)) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return 0; } @@ -99,7 +99,7 @@ static int ED_uvedit_ensure_uvs(bContext *C, Scene *scene, Object *obedit) uvedit_face_select(scene, efa, tf); } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return 1; } @@ -223,7 +223,7 @@ static void minimize_stretch_init(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); MinStretch *ms; int fill_holes= RNA_boolean_get(op->ptr, "fill_holes"); @@ -405,18 +405,18 @@ static int pack_islands_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); ParamHandle *handle; handle = construct_param_handle(scene, em, 1, 0, 1, 1); - param_pack(handle); + param_pack(handle, scene->toolsettings->uvcalc_margin); param_flush(handle); param_delete(handle); DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -438,7 +438,7 @@ static int average_islands_scale_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); ParamHandle *handle; handle= construct_param_handle(scene, em, 1, 0, 1, 1); @@ -449,7 +449,7 @@ static int average_islands_scale_exec(bContext *C, wmOperator *op) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -471,19 +471,19 @@ static ParamHandle *liveHandle = NULL; void ED_uvedit_live_unwrap_begin(Scene *scene, Object *obedit) { - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); short abf = scene->toolsettings->unwrapper == 1; short fillholes = scene->toolsettings->uvcalc_flag & UVCALC_FILLHOLES; if(!ED_uvedit_test(obedit)) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return; } liveHandle = construct_param_handle(scene, em, 0, fillholes, 1, 1); param_lscm_begin(liveHandle, PARAM_TRUE, abf); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } void ED_uvedit_live_unwrap_re_solve(void) @@ -606,7 +606,7 @@ static void uv_map_transform(bContext *C, wmOperator *op, float center[3], float /* context checks are messy here, making it work in both 3d view and uv editor */ Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); View3D *v3d= CTX_wm_view3d(C); RegionView3D *rv3d= CTX_wm_region_view3d(C); /* common operator properties */ @@ -633,7 +633,7 @@ static void uv_map_transform(bContext *C, wmOperator *op, float center[3], float else uv_map_rotation_matrix(rotmat, rv3d, obedit, upangledeg, sideangledeg, radius); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } static void uv_transform_properties(wmOperatorType *ot, int radius) @@ -786,7 +786,7 @@ static int unwrap_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); ParamHandle *handle; int method = RNA_enum_get(op->ptr, "method"); int fill_holes = RNA_boolean_get(op->ptr, "fill_holes"); @@ -794,7 +794,7 @@ static int unwrap_exec(bContext *C, wmOperator *op) /* add uvs if they don't exist yet */ if(!ED_uvedit_ensure_uvs(C, scene, obedit)) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -804,7 +804,7 @@ static int unwrap_exec(bContext *C, wmOperator *op) param_lscm_solve(handle); param_lscm_end(handle); - param_pack(handle); + param_pack(handle, scene->toolsettings->uvcalc_margin); param_flush(handle); @@ -813,7 +813,7 @@ static int unwrap_exec(bContext *C, wmOperator *op) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -898,7 +898,7 @@ static int from_view_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); ARegion *ar= CTX_wm_region(C); EditFace *efa; MTFace *tf; @@ -906,7 +906,7 @@ static int from_view_exec(bContext *C, wmOperator *op) /* add uvs if they don't exist yet */ if(!ED_uvedit_ensure_uvs(C, scene, obedit)) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -946,7 +946,7 @@ static int from_view_exec(bContext *C, wmOperator *op) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -982,13 +982,13 @@ static int reset_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; /* add uvs if they don't exist yet */ if(!ED_uvedit_ensure_uvs(C, scene, obedit)) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1013,7 +1013,7 @@ static int reset_exec(bContext *C, wmOperator *op) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -1069,14 +1069,14 @@ static int sphere_project_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; float center[3], rotmat[4][4]; /* add uvs if they don't exist yet */ if(!ED_uvedit_ensure_uvs(C, scene, obedit)) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1101,7 +1101,7 @@ static int sphere_project_exec(bContext *C, wmOperator *op) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -1141,14 +1141,14 @@ static int cylinder_project_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; float center[3], rotmat[4][4]; /* add uvs if they don't exist yet */ if(!ED_uvedit_ensure_uvs(C, scene, obedit)) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1173,7 +1173,7 @@ static int cylinder_project_exec(bContext *C, wmOperator *op) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -1199,7 +1199,7 @@ static int cube_project_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; float no[3], cube_size, *loc, dx, dy; @@ -1207,7 +1207,7 @@ static int cube_project_exec(bContext *C, wmOperator *op) /* add uvs if they don't exist yet */ if(!ED_uvedit_ensure_uvs(C, scene, obedit)) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1260,7 +1260,7 @@ static int cube_project_exec(bContext *C, wmOperator *op) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -1284,18 +1284,22 @@ void UV_OT_cube_project(wmOperatorType *ot) static int mapping_menu_invoke(bContext *C, wmOperator *op, wmEvent *event) { - uiMenuItem *head; - - head= uiPupMenuBegin("UV Mapping", 0); - uiMenuItemO(head, 0, "UV_OT_unwrap"); - uiMenuSeparator(head); - uiMenuItemO(head, 0, "UV_OT_cube_project"); - uiMenuItemO(head, 0, "UV_OT_cylinder_project"); - uiMenuItemO(head, 0, "UV_OT_sphere_project"); - uiMenuItemO(head, 0, "UV_OT_project_from_view"); - uiMenuSeparator(head); - uiMenuItemO(head, 0, "UV_OT_reset"); - uiPupMenuEnd(C, head); + uiPopupMenu *pup; + uiLayout *layout; + + pup= uiPupMenuBegin(C, "UV Mapping", 0); + layout= uiPupMenuLayout(pup); + + uiItemO(layout, NULL, 0, "UV_OT_unwrap"); + uiItemS(layout); + uiItemO(layout, NULL, 0, "UV_OT_cube_project"); + uiItemO(layout, NULL, 0, "UV_OT_cylinder_project"); + uiItemO(layout, NULL, 0, "UV_OT_sphere_project"); + uiItemO(layout, NULL, 0, "UV_OT_project_from_view"); + uiItemS(layout); + uiItemO(layout, NULL, 0, "UV_OT_reset"); + + uiPupMenuEnd(C, pup); /* XXX python */ #ifndef DISABLE_PYTHON |