diff options
Diffstat (limited to 'source/blender/editors')
211 files changed, 16261 insertions, 11215 deletions
diff --git a/source/blender/editors/CMakeLists.txt b/source/blender/editors/CMakeLists.txt index 066d42e723e..d13d7ce2ff2 100644 --- a/source/blender/editors/CMakeLists.txt +++ b/source/blender/editors/CMakeLists.txt @@ -40,6 +40,7 @@ SET(INC ../windowmanager ../nodes ../gpu ../blenfont + ../ikplugin ) IF(WITH_GAMEENGINE) diff --git a/source/blender/editors/Makefile b/source/blender/editors/Makefile index 6a9d695ab0e..e259168a4ef 100644 --- a/source/blender/editors/Makefile +++ b/source/blender/editors/Makefile @@ -43,7 +43,7 @@ DIRS = armature \ metaball \ gpencil \ physics \ - preview \ + render \ uvedit \ space_outliner \ space_time \ diff --git a/source/blender/editors/SConscript b/source/blender/editors/SConscript index ccffbdb15d5..226e9247f91 100644 --- a/source/blender/editors/SConscript +++ b/source/blender/editors/SConscript @@ -14,7 +14,7 @@ SConscript(['datafiles/SConscript', 'curve/SConscript', 'gpencil/SConscript', 'physics/SConscript', - 'preview/SConscript', + 'render/SConscript', 'sound/SConscript', 'space_buttons/SConscript', 'space_file/SConscript', diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index e3418fa194f..8f8700cc43b 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -461,6 +461,9 @@ static void acf_object_name(bAnimListElem *ale, char *name) /* check if some setting exists for this channel */ static short acf_object_setting_valid(bAnimContext *ac, bAnimListElem *ale, int setting) { + Base *base= (Base *)ale->data; + Object *ob= base->object; + switch (setting) { /* muted only in NLA */ case ACHANNEL_SETTING_MUTE: @@ -468,7 +471,7 @@ static short acf_object_setting_valid(bAnimContext *ac, bAnimListElem *ale, int /* visible only in Graph Editor */ case ACHANNEL_SETTING_VISIBLE: - return ((ac) && (ac->spacetype == SPACE_IPO)); + return ((ac) && (ac->spacetype == SPACE_IPO) && (ob->adt)); /* only select and expand supported otherwise */ case ACHANNEL_SETTING_SELECT: @@ -759,7 +762,7 @@ static int acf_fillactd_setting_flag(int setting, short *neg) switch (setting) { case ACHANNEL_SETTING_SELECT: /* selected */ - return ACT_SELECTED; + return ADT_UI_SELECTED; case ACHANNEL_SETTING_EXPAND: /* expanded */ *neg= 1; @@ -774,13 +777,18 @@ static int acf_fillactd_setting_flag(int setting, short *neg) static void *acf_fillactd_setting_ptr(bAnimListElem *ale, int setting, short *type) { bAction *act= (bAction *)ale->data; + AnimData *adt= ale->adt; /* clear extra return data first */ *type= 0; switch (setting) { case ACHANNEL_SETTING_SELECT: /* selected */ - GET_ACF_FLAG_PTR(act->flag); + if (adt) { + GET_ACF_FLAG_PTR(adt->flag); + } + else + return 0; case ACHANNEL_SETTING_EXPAND: /* expanded */ GET_ACF_FLAG_PTR(act->flag); @@ -998,6 +1006,9 @@ static int acf_dsmat_setting_flag(int setting, short *neg) case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */ *neg= 1; return ADT_CURVES_NOT_VISIBLE; + + case ACHANNEL_SETTING_SELECT: /* selected */ + return ADT_UI_SELECTED; default: /* unsupported */ return 0; @@ -1016,6 +1027,7 @@ static void *acf_dsmat_setting_ptr(bAnimListElem *ale, int setting, short *type) case ACHANNEL_SETTING_EXPAND: /* expanded */ GET_ACF_FLAG_PTR(ma->flag); + case ACHANNEL_SETTING_SELECT: /* selected */ case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */ case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */ if (ma->adt) @@ -1067,6 +1079,9 @@ static int acf_dslam_setting_flag(int setting, short *neg) case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */ *neg= 1; return ADT_CURVES_NOT_VISIBLE; + + case ACHANNEL_SETTING_SELECT: /* selected */ + return ADT_UI_SELECTED; default: /* unsupported */ return 0; @@ -1085,6 +1100,7 @@ static void *acf_dslam_setting_ptr(bAnimListElem *ale, int setting, short *type) case ACHANNEL_SETTING_EXPAND: /* expanded */ GET_ACF_FLAG_PTR(la->flag); + case ACHANNEL_SETTING_SELECT: /* selected */ case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */ case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */ if (la->adt) @@ -1136,6 +1152,9 @@ static int acf_dscam_setting_flag(int setting, short *neg) case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */ *neg= 1; return ADT_CURVES_NOT_VISIBLE; + + case ACHANNEL_SETTING_SELECT: /* selected */ + return ADT_UI_SELECTED; default: /* unsupported */ return 0; @@ -1154,6 +1173,7 @@ static void *acf_dscam_setting_ptr(bAnimListElem *ale, int setting, short *type) case ACHANNEL_SETTING_EXPAND: /* expanded */ GET_ACF_FLAG_PTR(ca->flag); + case ACHANNEL_SETTING_SELECT: /* selected */ case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */ case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */ if (ca->adt) @@ -1205,6 +1225,9 @@ static int acf_dscur_setting_flag(int setting, short *neg) case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */ *neg= 1; return ADT_CURVES_NOT_VISIBLE; + + case ACHANNEL_SETTING_SELECT: /* selected */ + return ADT_UI_SELECTED; default: /* unsupported */ return 0; @@ -1223,6 +1246,7 @@ static void *acf_dscur_setting_ptr(bAnimListElem *ale, int setting, short *type) case ACHANNEL_SETTING_EXPAND: /* expanded */ GET_ACF_FLAG_PTR(cu->flag); + case ACHANNEL_SETTING_SELECT: /* selected */ case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */ case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */ if (cu->adt) @@ -1274,6 +1298,9 @@ static int acf_dsskey_setting_flag(int setting, short *neg) case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */ *neg= 1; return ADT_CURVES_NOT_VISIBLE; + + case ACHANNEL_SETTING_SELECT: /* selected */ + return ADT_UI_SELECTED; default: /* unsupported */ return 0; @@ -1292,6 +1319,7 @@ static void *acf_dsskey_setting_ptr(bAnimListElem *ale, int setting, short *type case ACHANNEL_SETTING_EXPAND: /* expanded */ GET_ACF_FLAG_PTR(key->flag); + case ACHANNEL_SETTING_SELECT: /* selected */ case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */ case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */ if (key->adt) @@ -1343,6 +1371,9 @@ static int acf_dswor_setting_flag(int setting, short *neg) case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */ *neg= 1; return ADT_CURVES_NOT_VISIBLE; + + case ACHANNEL_SETTING_SELECT: /* selected */ + return ADT_UI_SELECTED; default: /* unsupported */ return 0; @@ -1361,6 +1392,7 @@ static void *acf_dswor_setting_ptr(bAnimListElem *ale, int setting, short *type) case ACHANNEL_SETTING_EXPAND: /* expanded */ GET_ACF_FLAG_PTR(wo->flag); + case ACHANNEL_SETTING_SELECT: /* selected */ case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */ case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */ if (wo->adt) @@ -1412,6 +1444,9 @@ static int acf_dspart_setting_flag(int setting, short *neg) case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */ *neg= 1; return ADT_CURVES_NOT_VISIBLE; + + case ACHANNEL_SETTING_SELECT: /* selected */ + return ADT_UI_SELECTED; default: /* unsupported */ return 0; @@ -1430,6 +1465,7 @@ static void *acf_dspart_setting_ptr(bAnimListElem *ale, int setting, short *type case ACHANNEL_SETTING_EXPAND: /* expanded */ GET_ACF_FLAG_PTR(part->flag); + case ACHANNEL_SETTING_SELECT: /* selected */ case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */ case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */ if (part->adt) @@ -1482,6 +1518,9 @@ static int acf_dsmball_setting_flag(int setting, short *neg) *neg= 1; return ADT_CURVES_NOT_VISIBLE; + case ACHANNEL_SETTING_SELECT: /* selected */ + return ADT_UI_SELECTED; + default: /* unsupported */ return 0; } @@ -1499,6 +1538,7 @@ static void *acf_dsmball_setting_ptr(bAnimListElem *ale, int setting, short *typ case ACHANNEL_SETTING_EXPAND: /* expanded */ GET_ACF_FLAG_PTR(mb->flag); + case ACHANNEL_SETTING_SELECT: /* selected */ case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */ case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */ if (mb->adt) @@ -1526,6 +1566,80 @@ static bAnimChannelType ACF_DSMBALL= acf_dsmball_setting_ptr /* pointer for setting */ }; +/* Armature Expander ------------------------------------------- */ + +// TODO: just get this from RNA? +static int acf_dsarm_icon(bAnimListElem *ale) +{ + return ICON_ARMATURE_DATA; +} + +/* get the appropriate flag(s) for the setting when it is valid */ +static int acf_dsarm_setting_flag(int setting, short *neg) +{ + /* clear extra return data first */ + *neg= 0; + + switch (setting) { + case ACHANNEL_SETTING_EXPAND: /* expanded */ + return ARM_DS_EXPAND; + + case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */ + return ADT_NLA_EVAL_OFF; + + case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */ + *neg= 1; + return ADT_CURVES_NOT_VISIBLE; + + case ACHANNEL_SETTING_SELECT: /* selected */ + return ADT_UI_SELECTED; + + default: /* unsupported */ + return 0; + } +} + +/* get pointer to the setting */ +static void *acf_dsarm_setting_ptr(bAnimListElem *ale, int setting, short *type) +{ + bArmature *arm= (bArmature *)ale->data; + + /* clear extra return data first */ + *type= 0; + + switch (setting) { + case ACHANNEL_SETTING_EXPAND: /* expanded */ + GET_ACF_FLAG_PTR(arm->flag); + + case ACHANNEL_SETTING_SELECT: /* selected */ + case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */ + case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */ + if (arm->adt) + GET_ACF_FLAG_PTR(arm->adt->flag) + else + return NULL; + + default: /* unsupported */ + return NULL; + } +} + +/* metaball expander type define */ +static bAnimChannelType ACF_DSARM= +{ + acf_generic_dataexpand_backdrop,/* backdrop */ + acf_generic_indention_1, /* indent level */ + acf_generic_basic_offset, /* offset */ + + acf_generic_idblock_name, /* name */ + acf_dsarm_icon, /* icon */ + + acf_generic_dataexpand_setting_valid, /* has setting */ + acf_dsarm_setting_flag, /* flag for setting */ + acf_dsarm_setting_ptr /* pointer for setting */ +}; + + /* ShapeKey Entry ------------------------------------------- */ // XXX ... this is currently obsolete... @@ -1709,6 +1823,7 @@ void ANIM_init_channel_typeinfo_data (void) animchannelTypeInfo[type++]= &ACF_DSWOR; /* World Channel */ animchannelTypeInfo[type++]= &ACF_DSPART; /* Particle Channel */ animchannelTypeInfo[type++]= &ACF_DSMBALL; /* MetaBall Channel */ + animchannelTypeInfo[type++]= &ACF_DSARM; /* Armature Channel */ animchannelTypeInfo[type++]= NULL; /* ShapeKey */ // XXX this is no longer used for now... diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 72d8f71bc26..83f5fca5af5 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -91,6 +91,7 @@ /* -------------------------- Exposed API ----------------------------------- */ /* Set the given animation-channel as the active one for the active context */ +// TODO: extend for animdata types... void ANIM_set_active_channel (bAnimContext *ac, void *data, short datatype, int filter, void *channel_data, short channel_type) { ListBase anim_data = {NULL, NULL}; @@ -130,11 +131,29 @@ void ANIM_set_active_channel (bAnimContext *ac, void *data, short datatype, int ACHANNEL_SET_FLAG(nlt, ACHANNEL_SETFLAG_CLEAR, NLATRACK_ACTIVE); } break; + + case ANIMTYPE_FILLACTD: /* Action Expander */ + case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */ + case ANIMTYPE_DSLAM: + case ANIMTYPE_DSCAM: + case ANIMTYPE_DSCUR: + case ANIMTYPE_DSSKEY: + case ANIMTYPE_DSWOR: + case ANIMTYPE_DSPART: + case ANIMTYPE_DSMBALL: + case ANIMTYPE_DSARM: + { + /* need to verify that this data is valid for now */ + if (ale->adt) { + ACHANNEL_SET_FLAG(ale->adt, ACHANNEL_SETFLAG_CLEAR, ADT_UI_ACTIVE); + } + } + break; } } /* set active flag */ - if (channel_data != NULL) { + if (channel_data) { switch (channel_type) { case ANIMTYPE_GROUP: { @@ -154,6 +173,23 @@ void ANIM_set_active_channel (bAnimContext *ac, void *data, short datatype, int nlt->flag |= NLATRACK_ACTIVE; } break; + + case ANIMTYPE_FILLACTD: /* Action Expander */ + case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */ + case ANIMTYPE_DSLAM: + case ANIMTYPE_DSCAM: + case ANIMTYPE_DSCUR: + case ANIMTYPE_DSSKEY: + case ANIMTYPE_DSWOR: + case ANIMTYPE_DSPART: + case ANIMTYPE_DSMBALL: + case ANIMTYPE_DSARM: + { + /* need to verify that this data is valid for now */ + if (ale->adt) + ale->adt->flag |= ADT_UI_ACTIVE; + } + break; } } @@ -174,7 +210,7 @@ void ANIM_deselect_anim_channels (void *data, short datatype, short test, short int filter; /* filter data */ - filter= ANIMFILTER_VISIBLE; + filter= ANIMFILTER_VISIBLE|ANIMFILTER_CHANNELS; ANIM_animdata_filter(NULL, &anim_data, filter, data, datatype); /* See if we should be selecting or deselecting */ @@ -189,12 +225,10 @@ void ANIM_deselect_anim_channels (void *data, short datatype, short test, short sel= ACHANNEL_SETFLAG_CLEAR; break; case ANIMTYPE_OBJECT: + #if 0 /* for now, do not take object selection into account, since it gets too annoying */ if (ale->flag & SELECT) sel= ACHANNEL_SETFLAG_CLEAR; - break; - case ANIMTYPE_FILLACTD: - if (ale->flag & ACT_SELECTED) - sel= ACHANNEL_SETFLAG_CLEAR; + #endif break; case ANIMTYPE_GROUP: if (ale->flag & AGRP_SELECTED) @@ -208,6 +242,22 @@ void ANIM_deselect_anim_channels (void *data, short datatype, short test, short if (ale->flag & NLATRACK_SELECTED) sel= ACHANNEL_SETFLAG_CLEAR; break; + + case ANIMTYPE_FILLACTD: /* Action Expander */ + case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */ + case ANIMTYPE_DSLAM: + case ANIMTYPE_DSCAM: + case ANIMTYPE_DSCUR: + case ANIMTYPE_DSSKEY: + case ANIMTYPE_DSWOR: + case ANIMTYPE_DSPART: + case ANIMTYPE_DSMBALL: + case ANIMTYPE_DSARM: + { + if ((ale->adt) && (ale->adt->flag & ADT_UI_SELECTED)) + sel= ACHANNEL_SETFLAG_CLEAR; + } + break; } } } @@ -220,23 +270,26 @@ void ANIM_deselect_anim_channels (void *data, short datatype, short test, short Scene *scene= (Scene *)ale->data; ACHANNEL_SET_FLAG(scene, sel, SCE_DS_SELECTED); + + if (scene->adt) { + ACHANNEL_SET_FLAG(scene, sel, ADT_UI_SELECTED); + } } break; case ANIMTYPE_OBJECT: + #if 0 /* for now, do not take object selection into account, since it gets too annoying */ { Base *base= (Base *)ale->data; Object *ob= base->object; ACHANNEL_SET_FLAG(base, sel, SELECT); ACHANNEL_SET_FLAG(ob, sel, SELECT); - } - break; - case ANIMTYPE_FILLACTD: - { - bAction *act= (bAction *)ale->data; - ACHANNEL_SET_FLAG(act, sel, ACT_SELECTED); + if (ob->adt) { + ACHANNEL_SET_FLAG(ob, sel, ADT_UI_SELECTED); + } } + #endif break; case ANIMTYPE_GROUP: { @@ -262,6 +315,25 @@ void ANIM_deselect_anim_channels (void *data, short datatype, short test, short nlt->flag &= ~NLATRACK_ACTIVE; } break; + + case ANIMTYPE_FILLACTD: /* Action Expander */ + case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */ + case ANIMTYPE_DSLAM: + case ANIMTYPE_DSCAM: + case ANIMTYPE_DSCUR: + case ANIMTYPE_DSSKEY: + case ANIMTYPE_DSWOR: + case ANIMTYPE_DSPART: + case ANIMTYPE_DSMBALL: + case ANIMTYPE_DSARM: + { + /* need to verify that this data is valid for now */ + if (ale->adt) { + ACHANNEL_SET_FLAG(ale->adt, sel, ADT_UI_SELECTED); + ale->adt->flag &= ~ADT_UI_ACTIVE; + } + } + break; } } @@ -1310,18 +1382,22 @@ static int mouse_anim_channels (bAnimContext *ac, float x, int channel_index, sh } /* action to take depends on what channel we've got */ + // WARNING: must keep this in sync with the equivalent function in nla_channels.c switch (ale->type) { case ANIMTYPE_SCENE: { Scene *sce= (Scene *)ale->data; + AnimData *adt= sce->adt; /* set selection status */ if (selectmode == SELECT_INVERT) { /* swap select */ sce->flag ^= SCE_DS_SELECTED; + if (adt) adt->flag ^= ADT_UI_SELECTED; } else { sce->flag |= SCE_DS_SELECTED; + if (adt) adt->flag |= ADT_UI_SELECTED; } notifierFlags |= ND_ANIMCHAN_SELECT; @@ -1333,34 +1409,75 @@ static int mouse_anim_channels (bAnimContext *ac, float x, int channel_index, sh Scene *sce= (Scene *)ads->source; Base *base= (Base *)ale->data; Object *ob= base->object; + AnimData *adt= ob->adt; /* set selection status */ if (selectmode == SELECT_INVERT) { /* swap select */ base->flag ^= SELECT; ob->flag= base->flag; + + if (adt) adt->flag ^= ADT_UI_SELECTED; } else { Base *b; - /* deleselect all */ + /* deselect all */ + // TODO: should this deselect all other types of channels too? for (b= sce->base.first; b; b= b->next) { b->flag &= ~SELECT; b->object->flag= b->flag; + if (b->object->adt) b->object->adt->flag &= ~(ADT_UI_SELECTED|ADT_UI_ACTIVE); } /* select object now */ base->flag |= SELECT; ob->flag |= SELECT; + if (adt) adt->flag |= ADT_UI_SELECTED; } /* xxx should be ED_base_object_activate(), but we need context pointer for that... */ //set_active_base(base); + if ((adt) && (adt->flag & ADT_UI_SELECTED)) + adt->flag |= ADT_UI_ACTIVE; notifierFlags |= ND_ANIMCHAN_SELECT; } break; + + case ANIMTYPE_FILLACTD: /* Action Expander */ + case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */ + case ANIMTYPE_DSLAM: + case ANIMTYPE_DSCAM: + case ANIMTYPE_DSCUR: + case ANIMTYPE_DSSKEY: + case ANIMTYPE_DSWOR: + case ANIMTYPE_DSPART: + case ANIMTYPE_DSMBALL: + case ANIMTYPE_DSARM: + { + /* sanity checking... */ + if (ale->adt) { + /* select/deselect */ + if (selectmode == SELECT_INVERT) { + /* inverse selection status of this AnimData block only */ + ale->adt->flag ^= ADT_UI_SELECTED; + } + else { + /* select AnimData block by itself */ + ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); + ale->adt->flag |= ADT_UI_SELECTED; + } + + /* set active? */ + if ((ale->adt) && (ale->adt->flag & ADT_UI_SELECTED)) + ale->adt->flag |= ADT_UI_ACTIVE; + } + notifierFlags |= ND_ANIMCHAN_SELECT; + } + break; + case ANIMTYPE_GROUP: { bActionGroup *agrp= (bActionGroup *)ale->data; @@ -1572,7 +1689,7 @@ void ED_operatortypes_animchannels(void) void ED_keymap_animchannels(wmWindowManager *wm) { - ListBase *keymap = WM_keymap_listbase(wm, "Animation_Channels", 0, 0); + wmKeyMap *keymap = WM_keymap_find(wm, "Animation_Channels", 0, 0); /* selection */ /* click-select */ diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index af2355b91a5..62341a5d6ae 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -43,6 +43,7 @@ #include "BKE_depsgraph.h" #include "BKE_main.h" #include "BKE_scene.h" +#include "BKE_screen.h" #include "BKE_utildefines.h" #include "RNA_access.h" @@ -57,26 +58,17 @@ /* ***************** depsgraph calls and anim updates ************* */ /* ***************** only these can be called from editors ******** */ -/* generic update flush, reads from context Screen (layers) and scene */ -/* this is for compliancy, later it can do all windows etc */ void ED_anim_dag_flush_update(const bContext *C) { - Scene *scene= CTX_data_scene(C); - bScreen *screen= CTX_wm_screen(C); - - DAG_scene_flush_update(scene, ED_screen_view3d_layers(screen), 0); + DAG_ids_flush_update(0); } /* flushes changes from object to all relations in scene */ void ED_anim_object_flush_update(const bContext *C, Object *ob) { - Scene *scene= CTX_data_scene(C); - bScreen *screen= CTX_wm_screen(C); - - DAG_object_update_flags(scene, ob, ED_screen_view3d_layers(screen)); + DAG_id_update_flags(&ob->id); } - /* **************************** pose <-> action syncing ******************************** */ /* Summary of what needs to be synced between poses and actions: * 1) Flags diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index 6388106fdb5..507bf03e7ef 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -55,6 +55,7 @@ #include "ED_anim_api.h" #include "ED_keyframes_edit.h" +#include "ED_types.h" #include "ED_util.h" #include "WM_api.h" @@ -316,3 +317,52 @@ void ANIM_nla_mapping_apply_fcurve (AnimData *adt, FCurve *fcu, short restore, s } /* *************************************************** */ +/* ANIMATION EDITOR UI-WIDGETS */ + +/* ui button event */ +#define B_REDR 1 + +/* standard header buttons for Animation Editors */ +short ANIM_headerUI_standard_buttons (const bContext *C, bDopeSheet *ads, uiBlock *block, short xco, short yco) +{ + ScrArea *sa= CTX_wm_area(C); + short nlaActive= ((sa) && (sa->spacetype==SPACE_NLA)); + + /* check if the DopeSheet data exists, just in case... */ + if (ads) { + /* more 'generic' filtering options */ + if (nlaActive) uiBlockBeginAlign(block); + uiDefIconButBitI(block, TOG, ADS_FILTER_ONLYSEL, B_REDR, ICON_RESTRICT_SELECT_OFF, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Only display selected Objects"); + if (nlaActive) uiDefIconButBitI(block, TOGN, ADS_FILTER_NLA_NOACT, B_REDR, ICON_ACTION, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Include AnimData blocks with no NLA Data"); + if (nlaActive) uiBlockEndAlign(block); + xco += 5; + + /* datatype based */ + // TODO: only show the datablocks which exist + uiBlockBeginAlign(block); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOSCE, B_REDR, ICON_SCENE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Display Scene Animation"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOWOR, B_REDR, ICON_WORLD_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Display World Animation"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOSHAPEKEYS, B_REDR, ICON_SHAPEKEY_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Display ShapeKeys"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMAT, B_REDR, ICON_MATERIAL_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Display Material Data"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOLAM, B_REDR, ICON_LAMP_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Display Lamp Data"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCAM, B_REDR, ICON_CAMERA_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Display Camera Data"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCUR, B_REDR, ICON_CURVE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Display Curve Data"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMBA, B_REDR, ICON_META_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Display MetaBall Data"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOARM, B_REDR, ICON_ARMATURE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Display Armature Data"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOPART, B_REDR, ICON_PARTICLE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Display Particle Data"); + uiBlockEndAlign(block); + xco += 30; + } + else { + // XXX this case shouldn't happen at all... for now, just pad out same amount of space + printf("ERROR: dopesheet data not available when drawing Animation Editor header \n"); + xco += 11*XIC + 30; + } + + // TODO: include auto-snapping menu here too... + + /* return the width of the buttons */ + return xco; +} + +/* *************************************************** */ diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 55fb1ccace0..13b050e4497 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -52,6 +52,7 @@ #include "DNA_ID.h" #include "DNA_anim_types.h" #include "DNA_action_types.h" +#include "DNA_armature_types.h" #include "DNA_constraint_types.h" #include "DNA_camera_types.h" #include "DNA_curve_types.h" @@ -412,7 +413,9 @@ short ANIM_animdata_get_context (const bContext *C, bAnimContext *ac) }\ } - +/* quick macro to test if an anim-channel representing an AnimData block is suitably active */ +#define ANIMCHANNEL_ACTIVEOK(ale) \ + ( !(filter_mode & ANIMFILTER_ACTIVE) || !(ale->adt) || (ale->adt->flag & ADT_UI_ACTIVE) ) /* quick macro to test if an anim-channel (F-Curve, Group, etc.) is selected in an acceptable way */ #define ANIMCHANNEL_SELOK(test_func) \ @@ -979,10 +982,13 @@ static int animdata_filter_dopesheet_mats (ListBase *anim_data, bDopeSheet *ads, /* include material-expand widget? */ // hmm... do we need to store the index of this material in the array anywhere? if (filter_mode & ANIMFILTER_CHANNELS) { - ale= make_new_animlistelem(ma, ANIMTYPE_DSMAT, base, ANIMTYPE_OBJECT, (ID *)ma); - if (ale) { - BLI_addtail(anim_data, ale); - items++; + /* check if filtering by active status */ + if ANIMCHANNEL_ACTIVEOK(ma) { + ale= make_new_animlistelem(ma, ANIMTYPE_DSMAT, base, ANIMTYPE_OBJECT, (ID *)ma); + if (ale) { + BLI_addtail(anim_data, ale); + items++; + } } } @@ -1036,11 +1042,14 @@ static int animdata_filter_dopesheet_particles (ListBase *anim_data, bDopeSheet /* add particle settings? */ if (FILTER_PART_OBJC(ob) || (filter_mode & ANIMFILTER_CURVESONLY)) { - if ((filter_mode & ANIMFILTER_CHANNELS)){ - ale = make_new_animlistelem(psys->part, ANIMTYPE_DSPART, base, ANIMTYPE_OBJECT, (ID *)psys->part); - if (ale) { - BLI_addtail(anim_data, ale); - items++; + if ((filter_mode & ANIMFILTER_CHANNELS)) { + /* check if filtering by active status */ + if ANIMCHANNEL_ACTIVEOK(psys->part) { + ale = make_new_animlistelem(psys->part, ANIMTYPE_DSPART, base, ANIMTYPE_OBJECT, (ID *)psys->part); + if (ale) { + BLI_addtail(anim_data, ale); + items++; + } } } @@ -1101,6 +1110,14 @@ static int animdata_filter_dopesheet_obdata (ListBase *anim_data, bDopeSheet *ad expanded= FILTER_MBALL_OBJD(mb); } break; + case OB_ARMATURE: /* ------- Armature ---------- */ + { + bArmature *arm= (bArmature *)ob->data; + + type= ANIMTYPE_DSARM; + expanded= FILTER_ARM_OBJD(arm); + } + break; } /* special exception for drivers instead of action */ @@ -1108,9 +1125,12 @@ static int animdata_filter_dopesheet_obdata (ListBase *anim_data, bDopeSheet *ad expanded= EXPANDED_DRVD(adt); /* include data-expand widget? */ - if ((filter_mode & ANIMFILTER_CURVESONLY) == 0) { - ale= make_new_animlistelem(iat, type, base, ANIMTYPE_OBJECT, (ID *)iat); - if (ale) BLI_addtail(anim_data, ale); + if ((filter_mode & ANIMFILTER_CURVESONLY) == 0) { + /* check if filtering by active status */ + if ANIMCHANNEL_ACTIVEOK(iat) { + ale= make_new_animlistelem(iat, type, base, ANIMTYPE_OBJECT, (ID *)iat); + if (ale) BLI_addtail(anim_data, ale); + } } /* add object-data animation channels? */ @@ -1140,10 +1160,13 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B if ((filter_mode & (ANIMFILTER_CURVESONLY|ANIMFILTER_NLATRACKS)) == 0) { /* check if filtering by selection */ if ANIMCHANNEL_SELOK((base->flag & SELECT)) { - ale= make_new_animlistelem(base, ANIMTYPE_OBJECT, NULL, ANIMTYPE_NONE, NULL); - if (ale) { - BLI_addtail(anim_data, ale); - items++; + /* check if filtering by active status */ + if ANIMCHANNEL_ACTIVEOK(ob) { + ale= make_new_animlistelem(base, ANIMTYPE_OBJECT, NULL, ANIMTYPE_NONE, (ID *)ob); + if (ale) { + BLI_addtail(anim_data, ale); + items++; + } } } } @@ -1203,8 +1226,21 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B ANIMDATA_FILTER_CASES(key, { /* AnimData blocks - do nothing... */ }, { /* nla */ - /* add NLA tracks */ - items += animdata_filter_nla(anim_data, adt, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)ob); + /* include shapekey-expand widget? */ + if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) { + /* check if filtering by active status */ + if ANIMCHANNEL_ACTIVEOK(key) { + ale= make_new_animlistelem(key, ANIMTYPE_DSSKEY, base, ANIMTYPE_OBJECT, (ID *)ob); + if (ale) { + BLI_addtail(anim_data, ale); + items++; + } + } + } + + /* add NLA tracks - only if expanded or so */ + if (FILTER_SKE_OBJD(key) || (filter_mode & ANIMFILTER_CURVESONLY)) + items += animdata_filter_nla(anim_data, adt, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)ob); }, { /* drivers */ /* include shapekey-expand widget? */ @@ -1224,10 +1260,13 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B { /* action (keyframes) */ /* include shapekey-expand widget? */ if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) { - ale= make_new_animlistelem(key, ANIMTYPE_DSSKEY, base, ANIMTYPE_OBJECT, (ID *)ob); - if (ale) { - BLI_addtail(anim_data, ale); - items++; + /* check if filtering by active status */ + if ANIMCHANNEL_ACTIVEOK(key) { + ale= make_new_animlistelem(key, ANIMTYPE_DSSKEY, base, ANIMTYPE_OBJECT, (ID *)ob); + if (ale) { + BLI_addtail(anim_data, ale); + items++; + } } } @@ -1297,6 +1336,19 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B } } break; + case OB_ARMATURE: /* ------- Armature ---------- */ + { + bArmature *arm= (bArmature *)ob->data; + + if ((ads->filterflag & ADS_FILTER_NOARM) == 0) { + ANIMDATA_FILTER_CASES(arm, + { /* AnimData blocks - do nothing... */ }, + obdata_ok= 1;, + obdata_ok= 1;, + obdata_ok= 1;) + } + } + break; } if (obdata_ok) items += animdata_filter_dopesheet_obdata(anim_data, ads, base, filter_mode); @@ -1652,6 +1704,23 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int dataOk= !(ads->filterflag & ADS_FILTER_NOMBA);) } break; + case OB_ARMATURE: /* ------- Armature ---------- */ + { + bArmature *arm= (bArmature *)ob->data; + dataOk= 0; + ANIMDATA_FILTER_CASES(arm, + if ((ads->filterflag & ADS_FILTER_NOARM)==0) { + /* for the special AnimData blocks only case, we only need to add + * the block if it is valid... then other cases just get skipped (hence ok=0) + */ + ANIMDATA_ADD_ANIMDATA(arm); + dataOk=0; + }, + dataOk= !(ads->filterflag & ADS_FILTER_NOARM);, + dataOk= !(ads->filterflag & ADS_FILTER_NOARM);, + dataOk= !(ads->filterflag & ADS_FILTER_NOARM);) + } + break; default: /* --- other --- */ dataOk= 0; break; @@ -1734,6 +1803,12 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int dataOk= ANIMDATA_HAS_KEYS(mb); } break; + case OB_ARMATURE: /* -------- Armature ---------- */ + { + bArmature *arm= (bArmature *)ob->data; + dataOk= ANIMDATA_HAS_KEYS(arm); + } + break; default: /* --- other --- */ dataOk= 0; break; diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index d33eece52c9..6c44086af41 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -458,7 +458,7 @@ static int ed_marker_move_invoke(bContext *C, wmOperator *op, wmEvent *evt) mm->event_type= evt->type; /* add temp handler */ - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); /* reset frs delta */ RNA_int_set(op->ptr, "frames", 0); @@ -992,7 +992,7 @@ void ED_operatortypes_marker(void) /* called in screen_ops.c:ED_keymap_screen() */ void ED_marker_keymap(wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "Markers", 0, 0); + wmKeyMap *keymap= WM_keymap_find(wm, "Markers", 0, 0); WM_keymap_verify_item(keymap, "MARKER_OT_add", MKEY, KM_PRESS, 0, 0); WM_keymap_verify_item(keymap, "MARKER_OT_move", EVT_TWEAK_S, KM_ANY, 0, 0); @@ -1002,6 +1002,7 @@ void ED_marker_keymap(wmWindowManager *wm) WM_keymap_verify_item(keymap, "MARKER_OT_select_border", BKEY, KM_PRESS, 0, 0); WM_keymap_verify_item(keymap, "MARKER_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0); WM_keymap_verify_item(keymap, "MARKER_OT_delete", XKEY, KM_PRESS, 0, 0); + WM_keymap_verify_item(keymap, "MARKER_OT_delete", DELKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "MARKER_OT_move", GKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index fedbe12c0e6..a4038028062 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -162,7 +162,7 @@ static int change_frame_invoke(bContext *C, wmOperator *op, wmEvent *event) change_frame_apply(C, op); /* add temp handler */ - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } @@ -193,7 +193,7 @@ static int change_frame_modal(bContext *C, wmOperator *op, wmEvent *event) /* we check for either mouse-button to end, as checking for ACTIONMOUSE (which is used to init * the modal op) doesn't work for some reason */ - if (event->val==0) { + if (event->val==KM_RELEASE) { change_frame_exit(C, op); return OPERATOR_FINISHED; } @@ -399,6 +399,8 @@ void ED_operatortypes_anim(void) WM_operatortype_append(ANIM_OT_add_driver_button); WM_operatortype_append(ANIM_OT_remove_driver_button); + WM_operatortype_append(ANIM_OT_copy_driver_button); + WM_operatortype_append(ANIM_OT_paste_driver_button); WM_operatortype_append(ANIM_OT_add_keyingset_button); WM_operatortype_append(ANIM_OT_remove_keyingset_button); @@ -406,7 +408,7 @@ void ED_operatortypes_anim(void) void ED_keymap_anim(wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "Animation", 0, 0); + wmKeyMap *keymap= WM_keymap_find(wm, "Animation", 0, 0); /* frame management */ /* NOTE: 'ACTIONMOUSE' not 'LEFTMOUSE', as user may have swapped mouse-buttons */ diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index 8b9224511ba..363a5a80f00 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -80,6 +80,10 @@ /* 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. + * + * - add: 0 - don't add anything if not found, + * 1 - add new Driver FCurve, + * -1 - add new Driver FCurve without driver stuff (for pasting) */ FCurve *verify_driver_fcurve (ID *id, const char rna_path[], const int array_index, short add) { @@ -115,11 +119,14 @@ FCurve *verify_driver_fcurve (ID *id, const char rna_path[], const int array_ind 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 */ - add_fmodifier(&fcu->modifiers, FMODIFIER_TYPE_GENERATOR); + /* if add is negative, don't init this data yet, since it will be filled in by the pasted driver */ + if (add > 0) { + /* 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 */ + add_fmodifier(&fcu->modifiers, FMODIFIER_TYPE_GENERATOR); + } /* just add F-Curve to end of driver list */ BLI_addtail(&adt->drivers, fcu); @@ -144,7 +151,7 @@ short ANIM_add_driver (ID *id, const char rna_path[], int array_index, short fla /* 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); + printf("Add Driver: Could not add Driver, as RNA Path is invalid for the given ID (ID = %s, Path = %s)\n", id->name, rna_path); return 0; } @@ -163,7 +170,7 @@ short ANIM_add_driver (ID *id, const char rna_path[], int array_index, short fla float fval; if (proptype == PROP_BOOLEAN) { - if(!array) val= RNA_property_boolean_get(&ptr, prop); + if (!array) val= RNA_property_boolean_get(&ptr, prop); else val= RNA_property_boolean_get_index(&ptr, prop, array_index); BLI_strncpy(expression, (val)? "True": "False", maxlen); @@ -180,7 +187,6 @@ short ANIM_add_driver (ID *id, const char rna_path[], int array_index, short fla BLI_snprintf(expression, maxlen, "%.3f", fval); } - } } @@ -218,6 +224,127 @@ short ANIM_remove_driver (struct ID *id, const char rna_path[], int array_index, return 0; } +/* ************************************************** */ +/* Driver Management API - Copy/Paste Drivers */ + +/* Copy/Paste Buffer for Driver Data... */ +static FCurve *channeldriver_copypaste_buf = NULL; + +/* This function frees any MEM_calloc'ed copy/paste buffer data */ +// XXX find some header to put this in! +void free_anim_drivers_copybuf (void) +{ + /* free the buffer F-Curve if it exists, as if it were just another F-Curve */ + if (channeldriver_copypaste_buf) + free_fcurve(channeldriver_copypaste_buf); + channeldriver_copypaste_buf= NULL; +} + +/* Checks if there is a driver in the copy/paste buffer */ +short ANIM_driver_can_paste (void) +{ + return (channeldriver_copypaste_buf != NULL); +} + +/* ------------------- */ + +/* Main Driver Management API calls: + * Make a copy of the driver for the specified property on the given ID block + */ +short ANIM_copy_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("Copy Driver: Could not find Driver, as RNA Path is invalid for the given ID (ID = %s, Path = %s)\n", id->name, rna_path); + return 0; + } + + /* try to get F-Curve with Driver */ + fcu= verify_driver_fcurve(id, rna_path, array_index, 0); + + /* clear copy/paste buffer first (for consistency with other copy/paste buffers) */ + free_anim_drivers_copybuf(); + + /* copy this to the copy/paste buf if it exists */ + if (fcu && fcu->driver) { + /* make copies of some info such as the rna_path, then clear this info from the F-Curve temporarily + * so that we don't end up wasting memory storing the path which won't get used ever... + */ + char *tmp_path = fcu->rna_path; + fcu->rna_path= NULL; + + /* make a copy of the F-Curve with */ + channeldriver_copypaste_buf= copy_fcurve(fcu); + + /* restore the path */ + fcu->rna_path= tmp_path; + + /* copied... */ + return 1; + } + + /* done */ + return 0; +} + +/* Main Driver Management API calls: + * Add a new driver for the specified property on the given ID block or replace an existing one + * with the driver + driver-curve data from the buffer + */ +short ANIM_paste_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("Paste Driver: Could not add Driver, as RNA Path is invalid for the given ID (ID = %s, Path = %s)\n", id->name, rna_path); + return 0; + } + + /* if the buffer is empty, cannot paste... */ + if (channeldriver_copypaste_buf == NULL) { + printf("Paste Driver: No Driver to paste. \n"); + return 0; + } + + /* create Driver F-Curve, but without data which will be copied across... */ + fcu= verify_driver_fcurve(id, rna_path, array_index, -1); + + if (fcu) { + /* copy across the curve data from the buffer curve + * NOTE: this step needs care to not miss new settings + */ + /* keyframes/samples */ + fcu->bezt= MEM_dupallocN(channeldriver_copypaste_buf->bezt); + fcu->fpt= MEM_dupallocN(channeldriver_copypaste_buf->fpt); + fcu->totvert= channeldriver_copypaste_buf->totvert; + + /* modifiers */ + copy_fmodifiers(&fcu->modifiers, &channeldriver_copypaste_buf->modifiers); + + /* flags - on a per-relevant-flag basis */ + if (channeldriver_copypaste_buf->flag & FCURVE_AUTO_HANDLES) + fcu->flag |= FCURVE_AUTO_HANDLES; + else + fcu->flag &= ~FCURVE_AUTO_HANDLES; + /* extrapolation mode */ + fcu->extend= channeldriver_copypaste_buf->extend; + + /* the 'juicy' stuff - the driver */ + fcu->driver= fcurve_copy_driver(channeldriver_copypaste_buf->driver); + } + + /* done */ + return (fcu != NULL); +} /* ************************************************** */ /* UI-Button Interface */ @@ -272,10 +399,11 @@ void ANIM_OT_add_driver_button (wmOperatorType *ot) /* identifiers */ ot->name= "Add Driver"; ot->idname= "ANIM_OT_add_driver_button"; + ot->description= "Add driver(s) for the property(s) connected represented by the highlighted button."; /* callbacks */ ot->exec= add_driver_button_exec; - //op->poll= ??? + //op->poll= ??? // TODO: need to have some animateable property to do this /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -335,10 +463,11 @@ void ANIM_OT_remove_driver_button (wmOperatorType *ot) /* identifiers */ ot->name= "Remove Driver"; ot->idname= "ANIM_OT_remove_driver_button"; + ot->description= "Remove the driver(s) for the property(s) connected represented by the highlighted button."; /* callbacks */ ot->exec= remove_driver_button_exec; - //op->poll= ??? + //op->poll= ??? // TODO: need to have some driver to be able to do this... /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -347,4 +476,92 @@ void ANIM_OT_remove_driver_button (wmOperatorType *ot) RNA_def_boolean(ot->srna, "all", 1, "All", "Delete drivers for all elements of the array."); } +/* Copy Driver Button Operator ------------------------ */ + +static int copy_driver_button_exec (bContext *C, wmOperator *op) +{ + PointerRNA ptr; + PropertyRNA *prop= NULL; + char *path; + short success= 0; + int index; + + /* try to create driver 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) { + /* only copy the driver for the button that this was involved for */ + success= ANIM_copy_driver(ptr.id.data, path, index, 0); + + MEM_freeN(path); + } + } + + /* since we're just copying, we don't really need to do anything else...*/ + return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED; +} + +void ANIM_OT_copy_driver_button (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Copy Driver"; + ot->idname= "ANIM_OT_copy_driver_button"; + ot->description= "Copy the driver for the highlighted button."; + + /* callbacks */ + ot->exec= copy_driver_button_exec; + //op->poll= ??? // TODO: need to have some driver to be able to do this... + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/* Paste Driver Button Operator ------------------------ */ + +static int paste_driver_button_exec (bContext *C, wmOperator *op) +{ + PointerRNA ptr; + PropertyRNA *prop= NULL; + char *path; + short success= 0; + int index; + + /* try to create driver 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) { + /* only copy the driver for the button that this was involved for */ + success= ANIM_paste_driver(ptr.id.data, path, index, 0); + + MEM_freeN(path); + } + } + + /* since we're just copying, we don't really need to do anything else...*/ + return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED; +} + +void ANIM_OT_paste_driver_button (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Paste Driver"; + ot->idname= "ANIM_OT_paste_driver_button"; + ot->description= "Paste the driver in the copy/paste buffer for the highlighted button."; + + /* callbacks */ + ot->exec= paste_driver_button_exec; + //op->poll= ??? // TODO: need to have some driver to be able to do this... + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + /* ************************************************** */ diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index abea38e129e..e8b25f70b06 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -316,7 +316,7 @@ static void set_touched_actkeyblock (ActKeyBlock *ab) /* *************************** Keyframe Drawing *************************** */ /* helper function - find actkeycolumn that occurs on cframe */ -static ActKeyColumn *cfra_find_actkeycolumn (ActKeyColumn *ak, float cframe) +ActKeyColumn *cfra_find_actkeycolumn (ActKeyColumn *ak, float cframe) { /* sanity checks */ if (ak == NULL) @@ -331,6 +331,29 @@ static ActKeyColumn *cfra_find_actkeycolumn (ActKeyColumn *ak, float cframe) return ak; /* match */ } +/* helper function - find actkeycolumn that occurs on cframe, or the nearest one if not found */ +// FIXME: this is buggy... next() is ignored completely... +ActKeyColumn *cfra_find_nearest_next_ak (ActKeyColumn *ak, float cframe, short next) +{ + ActKeyColumn *akn= NULL; + + /* sanity checks */ + if (ak == NULL) + return NULL; + + /* check if this is a match, or whether it is in some subtree */ + if (cframe < ak->cfra) + akn= cfra_find_nearest_next_ak(ak->left, cframe, next); + else if (cframe > ak->cfra) + akn= cfra_find_nearest_next_ak(ak->right, cframe, next); + + /* if no match found (or found match), just use the current one */ + if (akn == NULL) + return ak; + else + return akn; +} + /* -------- */ /* coordinates for diamond shape */ @@ -396,6 +419,13 @@ void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel } break; + case BEZT_KEYTYPE_EXTREME: /* redish frames for now */ + { + if (sel) glColor3f(95.0f, 0.5f, 0.5f); + else glColor3f(0.91f, 0.70f, 0.80f); + } + break; + case BEZT_KEYTYPE_KEYFRAME: /* traditional yellowish frames for now */ default: { diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index ac04dc7d1a8..65f7d845b29 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -461,6 +461,13 @@ static short snap_bezier_horizontal(BeztEditData *bed, BezTriple *bezt) return 0; } +static short snap_bezier_value(BeztEditData *bed, BezTriple *bezt) +{ + /* value to snap to is stored in the custom data -> first float value slot */ + if (bezt->f2 & SELECT) + bezt->vec[1][1]= bed->f1; + return 0; +} BeztEditFunc ANIM_editkeyframes_snap(short type) { @@ -476,6 +483,8 @@ BeztEditFunc ANIM_editkeyframes_snap(short type) return snap_bezier_nearestsec; case SNAP_KEYS_HORIZONTAL: /* snap handles to same value */ return snap_bezier_horizontal; + case SNAP_KEYS_VALUE: /* snap to given value */ + return snap_bezier_value; default: /* just in case */ return snap_bezier_nearest; } @@ -685,6 +694,13 @@ static short set_keytype_breakdown(BeztEditData *bed, BezTriple *bezt) return 0; } +static short set_keytype_extreme(BeztEditData *bed, BezTriple *bezt) +{ + if (bezt->f2 & SELECT) + BEZKEYTYPE(bezt)= BEZT_KEYTYPE_EXTREME; + return 0; +} + /* Set the interpolation type of the selected BezTriples in each F-Curve to the specified one */ BeztEditFunc ANIM_editkeyframes_keytype(short code) { @@ -692,6 +708,9 @@ BeztEditFunc ANIM_editkeyframes_keytype(short code) case BEZT_KEYTYPE_BREAKDOWN: /* breakdown */ return set_keytype_breakdown; + case BEZT_KEYTYPE_EXTREME: /* extreme keyframe */ + return set_keytype_extreme; + case BEZT_KEYTYPE_KEYFRAME: /* proper keyframe */ default: return set_keytype_keyframe; diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 7135f8802bc..10d45d53761 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -176,85 +176,6 @@ FCurve *verify_fcurve (bAction *act, const char group[], const char rna_path[], /* -------------- BezTriple Insertion -------------------- */ -/* threshold for inserting keyframes - threshold here should be good enough for now, but should become userpref */ -#define BEZT_INSERT_THRESH 0.00001f - -/* Binary search algorithm for finding where to insert BezTriple. (for use by insert_bezt_icu) - * Returns the index to insert at (data already at that index will be offset if replace is 0) - */ -static int binarysearch_bezt_index (BezTriple array[], float frame, int arraylen, short *replace) -{ - int start=0, end=arraylen; - int loopbreaker= 0, maxloop= arraylen * 2; - - /* initialise replace-flag first */ - *replace= 0; - - /* sneaky optimisations (don't go through searching process if...): - * - keyframe to be added is to be added out of current bounds - * - keyframe to be added would replace one of the existing ones on bounds - */ - if ((arraylen <= 0) || (array == NULL)) { - printf("Warning: binarysearch_bezt_index() encountered invalid array \n"); - return 0; - } - else { - /* check whether to add before/after/on */ - float framenum; - - /* 'First' Keyframe (when only one keyframe, this case is used) */ - framenum= array[0].vec[1][0]; - if (IS_EQT(frame, framenum, BEZT_INSERT_THRESH)) { - *replace = 1; - return 0; - } - else if (frame < framenum) - return 0; - - /* 'Last' Keyframe */ - framenum= array[(arraylen-1)].vec[1][0]; - if (IS_EQT(frame, framenum, BEZT_INSERT_THRESH)) { - *replace= 1; - return (arraylen - 1); - } - else if (frame > framenum) - return arraylen; - } - - - /* most of the time, this loop is just to find where to put it - * 'loopbreaker' is just here to prevent infinite loops - */ - for (loopbreaker=0; (start <= end) && (loopbreaker < maxloop); loopbreaker++) { - /* compute and get midpoint */ - int mid = start + ((end - start) / 2); /* we calculate the midpoint this way to avoid int overflows... */ - float midfra= array[mid].vec[1][0]; - - /* check if exactly equal to midpoint */ - if (IS_EQT(frame, midfra, BEZT_INSERT_THRESH)) { - *replace = 1; - return mid; - } - - /* repeat in upper/lower half */ - if (frame > midfra) - start= mid + 1; - else if (frame < midfra) - end= mid - 1; - } - - /* print error if loop-limit exceeded */ - if (loopbreaker == (maxloop-1)) { - printf("Error: binarysearch_bezt_index() was taking too long \n"); - - // include debug info - printf("\tround = %d: start = %d, end = %d, arraylen = %d \n", loopbreaker, start, end, arraylen); - } - - /* not found, so return where to place it */ - return start; -} - /* This function adds a given BezTriple to an F-Curve. It will allocate * memory for the array if needed, and will insert the BezTriple into a * suitable place in chronological order. @@ -286,8 +207,13 @@ int insert_bezt_fcurve (FCurve *fcu, BezTriple *bezt, short flag) // TODO: perform some other operations? } else { + char oldKeyType= BEZKEYTYPE(fcu->bezt + i); + /* just brutally replace the values */ *(fcu->bezt + i) = *bezt; + + /* special exception for keyframe type - copy value back so that this info isn't lost */ + BEZKEYTYPE(fcu->bezt + i)= oldKeyType; } } } @@ -717,14 +643,14 @@ static float visualkey_get_value (PointerRNA *ptr, PropertyRNA *prop, int array_ else if (pchan->bone->parent == NULL) return tmat[3][array_index]; } - else if (strstr(identifier, "euler_rotation")) { + else if (strstr(identifier, "rotation_euler")) { float eul[3]; /* euler-rotation test before standard rotation, as standard rotation does quats */ Mat4ToEulO(tmat, eul, pchan->rotmode); return eul[array_index]; } - else if (strstr(identifier, "rotation")) { + else if (strstr(identifier, "rotation_quaternion")) { float trimat[3][3], quat[4]; Mat3CpyMat4(trimat, tmat); @@ -732,6 +658,7 @@ static float visualkey_get_value (PointerRNA *ptr, PropertyRNA *prop, int array_ return quat[array_index]; } + // TODO: axis-angle... } /* as the function hasn't returned yet, read value from system in the default way */ diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index 60efcce4e73..81259ae7ced 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -770,7 +770,7 @@ static bBuiltinKeyingSet def_builtin_keyingsets_v3d[] = /* 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|KSP_TEMPLATE_PCHAN_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM) + BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM) BI_KS_PATHS_END BI_KS_DEFINE_END, @@ -786,7 +786,7 @@ static bBuiltinKeyingSet def_builtin_keyingsets_v3d[] = 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|KSP_TEMPLATE_PCHAN_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM) + BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM) BI_KS_PATHS_END BI_KS_DEFINE_END, @@ -794,7 +794,7 @@ static bBuiltinKeyingSet def_builtin_keyingsets_v3d[] = 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|KSP_TEMPLATE_PCHAN_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM), + BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_ROT, "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, @@ -810,7 +810,7 @@ static bBuiltinKeyingSet def_builtin_keyingsets_v3d[] = /* Keying Set - "Rotation" ---------- */ BI_KS_DEFINE_BEGIN("VisualRot", INSERTKEY_MATRIX) BI_KS_PATHS_BEGIN(1) - BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_PCHAN_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM) + BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM) BI_KS_PATHS_END BI_KS_DEFINE_END, @@ -818,7 +818,7 @@ static bBuiltinKeyingSet def_builtin_keyingsets_v3d[] = BI_KS_DEFINE_BEGIN("VisualLocRot", INSERTKEY_MATRIX) 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|KSP_TEMPLATE_PCHAN_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM) + BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM) BI_KS_PATHS_END BI_KS_DEFINE_END }; @@ -1145,7 +1145,12 @@ int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet * int arraylen, i; /* set initial group name */ - groupname= (cks->id) ? cks->id->name+2 : NULL; + if (cks->id == NULL) { + printf("ERROR: Skipping 'Common-Key' Source. No valid ID present.\n"); + continue; + } + else + groupname= cks->id->name+2; /* construct the path */ // FIXME: this currently only works with a few hardcoded cases @@ -1173,14 +1178,24 @@ int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet * BLI_dynstr_append(pathds, "."); /* apply some further templates? */ - if ((ksp->templates & KSP_TEMPLATE_PCHAN_ROT) && (cks->pchan)) { - /* if this path is exactly "rotation", and the rotation mode is set to eulers, - * use "euler_rotation" instead so that rotations will be keyed correctly + if (ksp->templates & KSP_TEMPLATE_ROT) { + /* for builtin Keying Sets, this template makes the best fitting path for the + * current rotation mode of the Object / PoseChannel to be used */ - if (strcmp(ksp->rna_path, "rotation")==0 && (cks->pchan->rotmode > 0)) - BLI_dynstr_append(pathds, "euler_rotation"); - else - BLI_dynstr_append(pathds, ksp->rna_path); + if (strcmp(ksp->rna_path, "rotation")==0) { + /* get rotation mode */ + short rotmode= (cks->pchan)? (cks->pchan->rotmode) : + (GS(cks->id->name)==ID_OB)? ( ((Object *)cks->id)->rotmode ) : + (0); + + /* determine path to build */ + if (rotmode == ROT_MODE_QUAT) + BLI_dynstr_append(pathds, "rotation_quaternion"); + else if (rotmode == ROT_MODE_AXISANGLE) + BLI_dynstr_append(pathds, "rotation_axis_angle"); + else + BLI_dynstr_append(pathds, "rotation_euler"); + } } else { /* just directly use the path */ diff --git a/source/blender/editors/armature/SConscript b/source/blender/editors/armature/SConscript index f96d25b0fe0..a7fa9d7071f 100644 --- a/source/blender/editors/armature/SConscript +++ b/source/blender/editors/armature/SConscript @@ -8,4 +8,11 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../render/extern/include #/intern/guardedalloc' incs += ' ../../gpu ../../makesrna #/intern/opennl/extern' +if env['OURPLATFORM'] == 'linux2': + cflags='-pthread' + incs += ' ../../../extern/binreloc/include' + +if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): + incs += ' ' + env['BF_PTHREADS_INC'] + 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 0c8c0e8e644..6f5a5f44d87 100644 --- a/source/blender/editors/armature/armature_intern.h +++ b/source/blender/editors/armature/armature_intern.h @@ -118,12 +118,20 @@ 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); /* ******************************************************* */ +/* Pose Sliding Tools */ + +void POSE_OT_push(struct wmOperatorType *ot); +void POSE_OT_relax(struct wmOperatorType *ot); +void POSE_OT_breakdown(struct wmOperatorType *ot); + +/* ******************************************************* */ /* editarmature.c */ struct bArmature; struct EditBone; diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c index 389a0a5174a..d465c1f8c9a 100644 --- a/source/blender/editors/armature/armature_ops.c +++ b/source/blender/editors/armature/armature_ops.c @@ -196,17 +196,23 @@ void ED_operatortypes_armature(void) WM_operatortype_append(POSELIB_OT_pose_remove); WM_operatortype_append(POSELIB_OT_pose_rename); + /* POSE SLIDING */ + WM_operatortype_append(POSE_OT_push); + WM_operatortype_append(POSE_OT_relax); + WM_operatortype_append(POSE_OT_breakdown); + /* TESTS */ WM_operatortype_append(ARMATURE_OT_test); // XXX temp test for context iterators... to be removed } void ED_keymap_armature(wmWindowManager *wm) { - ListBase *keymap; + wmKeyMap *keymap; wmKeymapItem *kmi; /* Armature ------------------------ */ - keymap= WM_keymap_listbase(wm, "Armature", 0, 0); + keymap= WM_keymap_find(wm, "Armature", 0, 0); + keymap->poll= ED_operator_editarmature; /* only set in editmode armature, by space_view3d listener */ // WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, 0, 0); @@ -242,6 +248,7 @@ void ED_keymap_armature(wmWindowManager *wm) 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_delete", DELKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "ARMATURE_OT_duplicate", 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); @@ -274,13 +281,27 @@ void ED_keymap_armature(wmWindowManager *wm) /* Armature -> Etch-A-Ton ------------------------ */ WM_keymap_add_item(keymap, "SKETCH_OT_delete", XKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "SKETCH_OT_delete", DELKEY, 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); WM_keymap_add_item(keymap, "SKETCH_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); + /* sketch poll checks mode */ + WM_keymap_add_item(keymap, "SKETCH_OT_gesture", ACTIONMOUSE, KM_PRESS, KM_SHIFT, 0); + WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", ACTIONMOUSE, KM_PRESS, 0, 0); + kmi = WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", ACTIONMOUSE, KM_PRESS, KM_CTRL, 0); + RNA_boolean_set(kmi->ptr, "snap", 1); + WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, 0, 0); + kmi = WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, KM_CTRL, 0); + RNA_boolean_set(kmi->ptr, "snap", 1); + /* Pose ------------------------ */ /* only set in posemode, by space_view3d listener */ - keymap= WM_keymap_listbase(wm, "Pose", 0, 0); + keymap= WM_keymap_find(wm, "Pose", 0, 0); + keymap->poll= ED_operator_posemode; + + // XXX: set parent is object-based operator, but it should also be available here... + WM_keymap_add_item(keymap, "OBJECT_OT_parent_set", PKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, 0, 0); kmi= WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0); @@ -294,7 +315,6 @@ void ED_keymap_armature(wmWindowManager *wm) WM_keymap_add_item(keymap, "POSE_OT_loc_clear", GKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "POSE_OT_scale_clear", SKEY, KM_PRESS, KM_ALT, 0); - // for now, we include hotkeys for copy/paste WM_keymap_add_item(keymap, "POSE_OT_copy", CKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0); kmi= WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0); @@ -354,5 +374,11 @@ void ED_keymap_armature(wmWindowManager *wm) 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); + + /* Pose -> Pose Sliding ------------- */ + /* only set in posemode, by space_view3d listener */ + WM_keymap_add_item(keymap, "POSE_OT_push", EKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "POSE_OT_relax", EKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_add_item(keymap, "POSE_OT_breakdown", EKEY, KM_PRESS, KM_SHIFT, 0); } diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 7d196d23c98..402715dbb02 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -1736,7 +1736,7 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *op) ED_armature_sync_selection(arm->edbo); - WM_event_add_notifier(C, NC_OBJECT, obedit); + WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, obedit); return OPERATOR_FINISHED; } @@ -2539,6 +2539,8 @@ EditBone *duplicateEditBoneObjects(EditBone *curBone, char *name, ListBase *edit VECCOPY(channew->limitmax, chanold->limitmax); VECCOPY(channew->stiffness, chanold->stiffness); channew->ikstretch= chanold->ikstretch; + channew->ikrotweight= chanold->ikrotweight; + channew->iklinweight= chanold->iklinweight; /* constraints */ listnew = &channew->constraints; @@ -2630,6 +2632,9 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *op) /* copy transform locks */ channew->protectflag = chanold->protectflag; + /* copy rotation mode */ + channew->rotmode = chanold->rotmode; + /* copy bone group */ channew->agrp_index= chanold->agrp_index; @@ -2639,6 +2644,8 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *op) VECCOPY(channew->limitmax, chanold->limitmax); VECCOPY(channew->stiffness, chanold->stiffness); channew->ikstretch= chanold->ikstretch; + channew->ikrotweight= chanold->ikrotweight; + channew->iklinweight= chanold->iklinweight; /* constraints */ listnew = &channew->constraints; @@ -3441,7 +3448,8 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op) else VecAddf(bone->tail, bone->head, imat[2]); // bone with unit length 1, pointing up Z - WM_event_add_notifier(C, NC_OBJECT, obedit); + /* note, notifier might evolve */ + WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, obedit); return OPERATOR_FINISHED; } @@ -3930,7 +3938,7 @@ static int armature_parent_clear_exec(bContext *C, wmOperator *op) ED_armature_sync_selection(arm->edbo); /* note, notifier might evolve */ - WM_event_add_notifier(C, NC_OBJECT, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob); return OPERATOR_FINISHED; } @@ -4330,7 +4338,7 @@ int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, shor } /* in weightpaint we select the associated vertex group too */ - if (ob->mode & OB_MODE_WEIGHT_PAINT) { + if (OBACT && OBACT->mode & OB_MODE_WEIGHT_PAINT) { if (nearBone->flag & BONE_ACTIVE) { ED_vgroup_select_by_name(OBACT, nearBone->name); DAG_id_flush_update(&OBACT->id, OB_RECALC_DATA); @@ -4854,7 +4862,7 @@ static int pose_clear_rot_exec(bContext *C, wmOperator *op) if (pchan->protectflag & OB_LOCK_ROT4D) { /* perform clamping on a component by component basis */ if ((pchan->protectflag & OB_LOCK_ROTW) == 0) - pchan->quat[0]= (pchan->rotmode == PCHAN_ROT_AXISANGLE) ? 0.0f : 1.0f; + pchan->quat[0]= (pchan->rotmode == ROT_MODE_AXISANGLE) ? 0.0f : 1.0f; if ((pchan->protectflag & OB_LOCK_ROTX) == 0) pchan->quat[1]= 0.0f; if ((pchan->protectflag & OB_LOCK_ROTY) == 0) @@ -4866,11 +4874,11 @@ static int pose_clear_rot_exec(bContext *C, wmOperator *op) /* perform clamping using euler form (3-components) */ float eul[3], oldeul[3], quat1[4]; - if (pchan->rotmode == PCHAN_ROT_QUAT) { + if (pchan->rotmode == ROT_MODE_QUAT) { QUATCOPY(quat1, pchan->quat); QuatToEul(pchan->quat, oldeul); } - else if (pchan->rotmode == PCHAN_ROT_AXISANGLE) { + else if (pchan->rotmode == ROT_MODE_AXISANGLE) { AxisAngleToEulO(&pchan->quat[1], pchan->quat[0], oldeul, EULER_ORDER_DEFAULT); } else { @@ -4886,14 +4894,14 @@ static int pose_clear_rot_exec(bContext *C, wmOperator *op) if (pchan->protectflag & OB_LOCK_ROTZ) eul[2]= oldeul[2]; - if (pchan->rotmode == PCHAN_ROT_QUAT) { + if (pchan->rotmode == ROT_MODE_QUAT) { EulToQuat(eul, pchan->quat); /* quaternions flip w sign to accumulate rotations correctly */ if ((quat1[0]<0.0f && pchan->quat[0]>0.0f) || (quat1[0]>0.0f && pchan->quat[0]<0.0f)) { QuatMulf(pchan->quat, -1.0f); } } - else if (pchan->rotmode == PCHAN_ROT_AXISANGLE) { + else if (pchan->rotmode == ROT_MODE_AXISANGLE) { AxisAngleToEulO(&pchan->quat[1], pchan->quat[0], oldeul, EULER_ORDER_DEFAULT); } else { @@ -4902,11 +4910,11 @@ static int pose_clear_rot_exec(bContext *C, wmOperator *op) } } else { - if (pchan->rotmode == PCHAN_ROT_QUAT) { + if (pchan->rotmode == ROT_MODE_QUAT) { pchan->quat[1]=pchan->quat[2]=pchan->quat[3]= 0.0f; pchan->quat[0]= 1.0f; } - else if (pchan->rotmode == PCHAN_ROT_AXISANGLE) { + else if (pchan->rotmode == ROT_MODE_AXISANGLE) { /* by default, make rotation of 0 radians around y-axis (roll) */ pchan->quat[0]=pchan->quat[1]=pchan->quat[3]= 0.0f; pchan->quat[2]= 1.0f; diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index 16e78f7c8d1..4d65059c4c6 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -2716,7 +2716,6 @@ static void finishRetarget(RigGraph *rigg) static void adjustGraphs(bContext *C, RigGraph *rigg) { - Scene *scene = CTX_data_scene(C); bArmature *arm= rigg->ob->data; RigArc *arc; @@ -2739,7 +2738,6 @@ static void adjustGraphs(bContext *C, RigGraph *rigg) static void retargetGraphs(bContext *C, RigGraph *rigg) { - Scene *scene = CTX_data_scene(C); bArmature *arm= rigg->ob->data; ReebGraph *reebg = rigg->link_mesh; RigNode *inode; diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c index 79d3d7b1366..74876691dac 100644 --- a/source/blender/editors/armature/editarmature_sketch.c +++ b/source/blender/editors/armature/editarmature_sketch.c @@ -1814,7 +1814,7 @@ int sk_detectTrimGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) VecSubf(s1, gest->segments->points[1].p, gest->segments->points[0].p); VecSubf(s2, gest->segments->points[2].p, gest->segments->points[1].p); - angle = VecAngle2(s1, s2); + angle = RAD2DEG(VecAngle2(s1, s2)); if (angle > 60 && angle < 120) { @@ -1932,7 +1932,7 @@ int sk_detectDeleteGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) VecSubf(s1, gest->segments->points[1].p, gest->segments->points[0].p); VecSubf(s2, gest->segments->points[2].p, gest->segments->points[1].p); - angle = VecAngle2(s1, s2); + angle = RAD2DEG(VecAngle2(s1, s2)); if (angle > 120) { @@ -2064,7 +2064,7 @@ int sk_detectReverseGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) VecSubf(end_v, sk_lastStrokePoint(gest->stk)->p, isect->p); } - angle = VecAngle2(start_v, end_v); + angle = RAD2DEG(VecAngle2(start_v, end_v)); if (angle > 120) { @@ -2618,7 +2618,7 @@ static int sketch_draw_stroke(bContext *C, wmOperator *op, wmEvent *event) sk_draw_stroke(C, sketch, sketch->active_stroke, dd, snap); - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } @@ -2644,7 +2644,7 @@ static int sketch_draw_gesture(bContext *C, wmOperator *op, wmEvent *event) sk_start_draw_gesture(sketch); sk_draw_stroke(C, sketch, sketch->gesture, dd, snap); - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } @@ -2675,7 +2675,7 @@ static int sketch_draw_modal(bContext *C, wmOperator *op, wmEvent *event, short retval = OPERATOR_CANCELLED; break; case LEFTMOUSE: - if (event->val == 0) + if (event->val == KM_RELEASE) { if (gesture == 0) { diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index a6c94bee5b1..81e67c4d46e 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -176,9 +176,9 @@ static void laplacian_triangle_area(LaplacianSystem *sys, int i1, int i2, int i3 t2= cotan_weight(v2, v3, v1); t3= cotan_weight(v3, v1, v2); - if(VecAngle3(v2, v1, v3) > 90) obtuse= 1; - else if(VecAngle3(v1, v2, v3) > 90) obtuse= 2; - else if(VecAngle3(v1, v3, v2) > 90) obtuse= 3; + if(RAD2DEG(VecAngle3(v2, v1, v3)) > 90) obtuse= 1; + else if(RAD2DEG(VecAngle3(v1, v2, v3)) > 90) obtuse= 2; + else if(RAD2DEG(VecAngle3(v1, v3, v2)) > 90) obtuse= 3; if (obtuse > 0) { area= AreaT3Dfl(v1, v2, v3); diff --git a/source/blender/editors/armature/poseSlide.c b/source/blender/editors/armature/poseSlide.c new file mode 100644 index 00000000000..c73208c54c2 --- /dev/null +++ b/source/blender/editors/armature/poseSlide.c @@ -0,0 +1,936 @@ +/** + * $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, Joshua Leung + * This is a new part of Blender + * + * Contributor(s): Joshua Leung + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include <stdlib.h> +#include <stdio.h> +#include <stddef.h> +#include <string.h> +#include <math.h> +#include <float.h> + +#include "MEM_guardedalloc.h" + +#include "BLI_arithb.h" +#include "BLI_blenlib.h" +#include "BLI_dynstr.h" +#include "BLI_dlrbTree.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" +#include "DNA_object_types.h" +#include "DNA_object_force.h" +#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_fcurve.h" +#include "BKE_object.h" + +#include "BKE_global.h" +#include "BKE_context.h" +#include "BKE_report.h" +#include "BKE_utildefines.h" + +#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 "BIF_gl.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" + +/* **************************************************** */ +/* == POSE 'SLIDING' TOOLS == + * + * A) Push & Relax, Breakdowner + * These tools provide the animator with various capabilities + * for interactively controlling the spacing of poses, but also + * for 'pushing' and/or 'relaxing' extremes as they see fit. + * + * B) Pose Sculpting + * This is yet to be implemented, but the idea here is to use + * sculpting techniques to make it easier to pose rigs by allowing + * rigs to be manipulated using a familiar paint-based interface. + */ +/* **************************************************** */ +/* A) Push & Relax, Breakdowner */ + +/* Temporary data shared between these operators */ +typedef struct tPoseSlideOp { + Scene *scene; /* current scene */ + ARegion *ar; /* region that we're operating in (needed for */ + Object *ob; /* active object that Pose Info comes from */ + bArmature *arm; /* armature for pose */ + + ListBase pfLinks; /* links between posechannels and f-curves */ + DLRBT_Tree keys; /* binary tree for quicker searching for keyframes (when applicable) */ + + KeyingSet *ks_loc; /* builtin KeyingSet for keyframing locations */ + KeyingSet *ks_rot; /* builtin KeyingSet for keyframing rotations */ + KeyingSet *ks_scale;/* builtin KeyingSet for keyframing scale */ + + int cframe; /* current frame number */ + int prevFrame; /* frame before current frame (blend-from) */ + int nextFrame; /* frame after current frame (blend-to) */ + + int mode; /* sliding mode (ePoseSlide_Modes) */ + int flag; // unused for now, but can later get used for storing runtime settings.... + + float percentage; /* 0-1 value for determining the influence of whatever is relevant */ +} tPoseSlideOp; + +/* Pose Sliding Modes */ +typedef enum ePoseSlide_Modes { + POSESLIDE_PUSH = 0, /* exaggerate the pose... */ + POSESLIDE_RELAX, /* soften the pose... */ + POSESLIDE_BREAKDOWN, /* slide between the endpoint poses, finding a 'soft' spot */ +} ePoseSlide_Modes; + +/* Temporary data linking PoseChannels with the F-Curves they affect */ +typedef struct tPChanFCurveLink { + struct tPChanFCurveLink *next, *prev; + + ListBase fcurves; /* F-Curves for this PoseChannel */ + bPoseChannel *pchan; /* Pose Channel which data is attached to */ + + char *pchan_path; /* RNA Path to this Pose Channel (needs to be freed when we're done) */ + + float oldloc[3]; /* transform values at start of operator (to be restored before each modal step) */ + float oldrot[3]; + float oldscale[3]; + float oldquat[4]; +} tPChanFCurveLink; + +/* ------------------------------------ */ + +/* operator init */ +static int pose_slide_init (bContext *C, wmOperator *op, short mode) +{ + tPoseSlideOp *pso; + bAction *act= NULL; + + /* init slide-op data */ + pso= op->customdata= MEM_callocN(sizeof(tPoseSlideOp), "tPoseSlideOp"); + + /* get info from context */ + pso->scene= CTX_data_scene(C); + pso->ob= CTX_data_active_object(C); + pso->arm= (pso->ob)? pso->ob->data : NULL; + pso->ar= CTX_wm_region(C); /* only really needed when doing modal() */ + + pso->cframe= pso->scene->r.cfra; + pso->mode= mode; + + /* set range info from property values - these may get overridden for the invoke() */ + pso->percentage= RNA_float_get(op->ptr, "percentage"); + pso->prevFrame= RNA_int_get(op->ptr, "prev_frame"); + pso->nextFrame= RNA_int_get(op->ptr, "next_frame"); + + /* check the settings from the context */ + if (ELEM4(NULL, pso->ob, pso->arm, pso->ob->adt, pso->ob->adt->action)) + return 0; + else + act= pso->ob->adt->action; + + /* for each Pose-Channel which gets affected, get the F-Curves for that channel + * and set the relevant transform flags... + */ + CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pchans) + { + ListBase curves = {NULL, NULL}; + int transFlags = action_get_item_transforms(act, pso->ob, pchan, &curves); + + pchan->flag &= ~(POSE_LOC|POSE_ROT|POSE_SIZE); + + /* check if any transforms found... */ + if (transFlags) { + /* make new linkage data */ + tPChanFCurveLink *pfl= MEM_callocN(sizeof(tPChanFCurveLink), "tPChanFCurveLink"); + PointerRNA ptr; + + pfl->fcurves= curves; + pfl->pchan= pchan; + + /* get the RNA path to this pchan - this needs to be freed! */ + RNA_pointer_create((ID *)pso->ob, &RNA_PoseChannel, pchan, &ptr); + pfl->pchan_path= RNA_path_from_ID_to_struct(&ptr); + + /* add linkage data to operator data */ + BLI_addtail(&pso->pfLinks, pfl); + + /* set pchan's transform flags */ + if (transFlags & ACT_TRANS_LOC) + pchan->flag |= POSE_LOC; + if (transFlags & ACT_TRANS_ROT) + pchan->flag |= POSE_ROT; + if (transFlags & ACT_TRANS_SCALE) + pchan->flag |= POSE_SIZE; + + /* store current transforms */ + VECCOPY(pfl->oldloc, pchan->loc); + VECCOPY(pfl->oldrot, pchan->eul); + VECCOPY(pfl->oldscale, pchan->size); + QUATCOPY(pfl->oldquat, pchan->quat); + } + } + CTX_DATA_END; + + /* set depsgraph flags */ + /* make sure the lock is set OK, unlock can be accidentally saved? */ + pso->ob->pose->flag |= POSE_LOCKED; + pso->ob->pose->flag &= ~POSE_DO_UNLOCK; + + /* do basic initialise of RB-BST used for finding keyframes, but leave the filling of it up + * to the caller of this (usually only invoke() will do it, to make things more efficient). + */ + BLI_dlrbTree_init(&pso->keys); + + /* get builtin KeyingSets */ + pso->ks_loc= ANIM_builtin_keyingset_get_named(NULL, "Location"); + pso->ks_rot= ANIM_builtin_keyingset_get_named(NULL, "Rotation"); + pso->ks_scale= ANIM_builtin_keyingset_get_named(NULL, "Scaling"); + + /* return status is whether we've got all the data we were requested to get */ + return 1; +} + +/* exiting the operator - free data */ +static void pose_slide_exit (bContext *C, wmOperator *op) +{ + tPoseSlideOp *pso= op->customdata; + + /* if data exists, clear its data and exit */ + if (pso) { + tPChanFCurveLink *pfl, *pfln=NULL; + + /* free the temp pchan links and their data */ + for (pfl= pso->pfLinks.first; pfl; pfl= pfln) { + pfln= pfl->next; + + /* free list of F-Curve reference links */ + BLI_freelistN(&pfl->fcurves); + + /* free pchan RNA Path */ + MEM_freeN(pfl->pchan_path); + + /* free link itself */ + BLI_freelinkN(&pso->pfLinks, pfl); + } + + /* free RB-BST for keyframes (if it contained data) */ + BLI_dlrbTree_free(&pso->keys); + + /* free data itself */ + MEM_freeN(pso); + } + + /* cleanup */ + op->customdata= NULL; +} + +/* ------------------------------------ */ + +/* helper for apply() / reset() - refresh the data */ +static void pose_slide_refresh (bContext *C, tPoseSlideOp *pso) +{ + /* 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 ((pso->arm->flag & ARM_DELAYDEFORM)==0) + DAG_id_flush_update(&pso->ob->id, OB_RECALC_DATA); /* sets recalc flags */ + else + where_is_pose(pso->scene, pso->ob); + + /* note, notifier might evolve */ + WM_event_add_notifier(C, NC_OBJECT|ND_POSE, pso->ob); + WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL); +} + +/* helper for apply() callabcks - find the next F-Curve with matching path... */ +static LinkData *find_next_fcurve_link (ListBase *fcuLinks, LinkData *prev, char *path) +{ + LinkData *first= (prev)? prev->next : (fcuLinks)? fcuLinks->first : NULL; + LinkData *ld; + + /* check each link to see if the linked F-Curve has a matching path */ + for (ld= first; ld; ld= ld->next) { + FCurve *fcu= (FCurve *)ld->data; + + /* check if paths match */ + if (strcmp(path, fcu->rna_path) == 0) + return ld; + } + + /* none found */ + return NULL; +} + +/* helper for apply() - perform sliding for some 3-element vector */ +static void pose_slide_apply_vec3 (tPoseSlideOp *pso, tPChanFCurveLink *pfl, float vec[3], char *propName) +{ + LinkData *ld=NULL; + char *path=NULL; + float cframe; + + /* get the path to use... */ + path= BLI_sprintfN("%s.%s", pfl->pchan_path, propName); + + /* get the current frame number */ + cframe= (float)pso->cframe; + + /* using this path, find each matching F-Curve for the variables we're interested in */ + while ( (ld= find_next_fcurve_link(&pfl->fcurves, ld, path)) ) { + FCurve *fcu= (FCurve *)ld->data; + float sVal, eVal; + float w1, w2; + int ch; + + /* get keyframe values for endpoint poses to blend with */ + /* previous/start */ + sVal= evaluate_fcurve(fcu, (float)pso->prevFrame); + /* next/end */ + eVal= evaluate_fcurve(fcu, (float)pso->nextFrame); + + /* get channel index */ + ch= fcu->array_index; + + /* calculate the relative weights of the endpoints */ + if (pso->mode == POSESLIDE_BREAKDOWN) { + /* get weights from the percentage control */ + w1= pso->percentage; /* this must come second */ + w2= 1.0f - w1; /* this must come first */ + } + else { + /* - these weights are derived from the relative distance of these + * poses from the current frame + * - they then get normalised so that they only sum up to 1 + */ + float wtot; + + w1 = cframe - (float)pso->prevFrame; + w2 = (float)pso->nextFrame - cframe; + + wtot = w1 + w2; + w1 = (w1/wtot); + w2 = (w2/wtot); + } + + /* depending on the mode, calculate the new value + * - in all of these, the start+end values are multiplied by w2 and w1 (respectively), + * since multiplication in another order would decrease the value the current frame is closer to + */ + switch (pso->mode) { + case POSESLIDE_PUSH: /* make the current pose more pronounced */ + { + /* perform a weighted average here, favouring the middle pose + * - numerator should be larger than denominator to 'expand' the result + * - perform this weighting a number of times given by the percentage... + */ + int iters= (int)ceil(10.0f*pso->percentage); // TODO: maybe a sensitivity ctrl on top of this is needed + + while (iters-- > 0) { + vec[ch]= ( -((sVal * w2) + (eVal * w1)) + (vec[ch] * 6.0f) ) / 5.0f; + } + } + break; + + case POSESLIDE_RELAX: /* make the current pose more like its surrounding ones */ + { + /* perform a weighted average here, favouring the middle pose + * - numerator should be smaller than denominator to 'relax' the result + * - perform this weighting a number of times given by the percentage... + */ + int iters= (int)ceil(10.0f*pso->percentage); // TODO: maybe a sensitivity ctrl on top of this is needed + + while (iters-- > 0) { + vec[ch]= ( ((sVal * w2) + (eVal * w1)) + (vec[ch] * 5.0f) ) / 6.0f; + } + } + break; + + case POSESLIDE_BREAKDOWN: /* make the current pose slide around between the endpoints */ + { + /* perform simple linear interpolation - coefficient for start must come from pso->percentage... */ + // TODO: make this use some kind of spline interpolation instead? + vec[ch]= ((sVal * w2) + (eVal * w1)); + } + break; + } + + } + + /* free the temp path we got */ + MEM_freeN(path); +} + +/* helper for apply() - perform sliding for quaternion rotations (using quat blending) */ +static void pose_slide_apply_quat (tPoseSlideOp *pso, tPChanFCurveLink *pfl) +{ + FCurve *fcu_w=NULL, *fcu_x=NULL, *fcu_y=NULL, *fcu_z=NULL; + bPoseChannel *pchan= pfl->pchan; + LinkData *ld=NULL; + char *path=NULL; + float cframe; + + /* get the path to use - this should be quaternion rotations only (needs care) */ + path= BLI_sprintfN("%s.%s", pfl->pchan_path, "rotation"); + + /* get the current frame number */ + cframe= (float)pso->cframe; + + /* using this path, find each matching F-Curve for the variables we're interested in */ + while ( (ld= find_next_fcurve_link(&pfl->fcurves, ld, path)) ) { + FCurve *fcu= (FCurve *)ld->data; + + /* assign this F-Curve to one of the relevant pointers... */ + switch (fcu->array_index) { + case 3: /* z */ + fcu_z= fcu; + break; + case 2: /* y */ + fcu_y= fcu; + break; + case 1: /* x */ + fcu_x= fcu; + break; + case 0: /* w */ + fcu_w= fcu; + break; + } + } + + /* only if all channels exist, proceed */ + if (fcu_w && fcu_x && fcu_y && fcu_z) { + float quat_prev[4], quat_next[4]; + + /* get 2 quats */ + quat_prev[0] = evaluate_fcurve(fcu_w, pso->prevFrame); + quat_prev[1] = evaluate_fcurve(fcu_x, pso->prevFrame); + quat_prev[2] = evaluate_fcurve(fcu_y, pso->prevFrame); + quat_prev[3] = evaluate_fcurve(fcu_z, pso->prevFrame); + + quat_next[0] = evaluate_fcurve(fcu_w, pso->nextFrame); + quat_next[1] = evaluate_fcurve(fcu_x, pso->nextFrame); + quat_next[2] = evaluate_fcurve(fcu_y, pso->nextFrame); + quat_next[3] = evaluate_fcurve(fcu_z, pso->nextFrame); + + /* perform blending */ + if (pso->mode == POSESLIDE_BREAKDOWN) { + /* just perform the interpol between quat_prev and quat_next using pso->percentage as a guide */ + QuatInterpol(pchan->quat, quat_prev, quat_next, pso->percentage); + } + else { + float quat_interp[4], quat_orig[4]; + int iters= (int)ceil(10.0f*pso->percentage); // TODO: maybe a sensitivity ctrl on top of this is needed + + /* perform this blending several times until a satisfactory result is reached */ + while (iters-- > 0) { + /* calculate the interpolation between the endpoints */ + QuatInterpol(quat_interp, quat_prev, quat_next, (cframe-pso->prevFrame) / (pso->nextFrame-pso->prevFrame) ); + + /* make a copy of the original rotation */ + QUATCOPY(quat_orig, pchan->quat); + + /* tricky interpolations - mode-dependent blending between original and new */ + if (pso->mode == POSESLIDE_RELAX) // xxx this was the original code, so should work fine + QuatInterpol(pchan->quat, quat_orig, quat_interp, 1.0f/6.0f); + else // I'm just guessing here... + QuatInterpol(pchan->quat, quat_orig, quat_interp, 6.0f/5.0f); + } + } + } + + /* free the path now */ + MEM_freeN(path); +} + +/* apply() - perform the pose sliding based on weighting various poses */ +static void pose_slide_apply (bContext *C, wmOperator *op, tPoseSlideOp *pso) +{ + tPChanFCurveLink *pfl; + + /* sanitise the frame ranges */ + if (pso->prevFrame == pso->nextFrame) { + /* move out one step either side */ + pso->prevFrame--; + pso->nextFrame++; + } + + /* for each link, handle each set of transforms */ + for (pfl= pso->pfLinks.first; pfl; pfl= pfl->next) { + /* valid transforms for each PoseChannel should have been noted already + * - sliding the pose should be a straightforward exercise for location+rotation, + * but rotations get more complicated since we may want to use quaternion blending + * for quaternions instead... + */ + bPoseChannel *pchan= pfl->pchan; + + if (pchan->flag & POSE_LOC) { + /* calculate these for the 'location' vector, and use location curves */ + pose_slide_apply_vec3(pso, pfl, pchan->loc, "location"); + } + + if (pchan->flag & POSE_SIZE) { + /* calculate these for the 'scale' vector, and use scale curves */ + pose_slide_apply_vec3(pso, pfl, pchan->size, "scale"); + } + + if (pchan->flag & POSE_ROT) { + /* everything depends on the rotation mode */ + if (pchan->rotmode > 0) { + /* eulers - so calculate these for the 'eul' vector, and use euler_rotation curves */ + pose_slide_apply_vec3(pso, pfl, pchan->eul, "rotation_euler"); + } + else if (pchan->rotmode == ROT_MODE_AXISANGLE) { + // TODO: need to figure out how to do this! + } + else { + /* quaternions - use quaternion blending */ + pose_slide_apply_quat(pso, pfl); + } + } + } + + /* depsgraph updates + redraws */ + pose_slide_refresh(C, pso); +} + +/* perform autokeyframing after changes were made + confirmed */ +static void pose_slide_autoKeyframe (bContext *C, tPoseSlideOp *pso) +{ + /* insert keyframes as necessary if autokeyframing */ + if (autokeyframe_cfra_can_key(pso->scene, &pso->ob->id)) { + bCommonKeySrc cks; + ListBase dsources = {&cks, &cks}; + tPChanFCurveLink *pfl; + + /* init common-key-source for use by KeyingSets */ + memset(&cks, 0, sizeof(bCommonKeySrc)); + cks.id= &pso->ob->id; + + /* iterate over each pose-channel affected, applying the changes */ + for (pfl= pso->pfLinks.first; pfl; pfl= pfl->next) { + bPoseChannel *pchan= pfl->pchan; + /* init cks for this PoseChannel, then use the relative KeyingSets to keyframe it */ + cks.pchan= pchan; + + /* insert keyframes */ + if (pchan->flag & POSE_LOC) + modify_keyframes(C, &dsources, NULL, pso->ks_loc, MODIFYKEY_MODE_INSERT, (float)pso->cframe); + if (pchan->flag & POSE_ROT) + modify_keyframes(C, &dsources, NULL, pso->ks_rot, MODIFYKEY_MODE_INSERT, (float)pso->cframe); + if (pchan->flag & POSE_SIZE) + modify_keyframes(C, &dsources, NULL, pso->ks_scale, MODIFYKEY_MODE_INSERT, (float)pso->cframe); + } + } +} + +/* reset changes made to current pose */ +static void pose_slide_reset (bContext *C, tPoseSlideOp *pso) +{ + tPChanFCurveLink *pfl; + + /* iterate over each pose-channel affected, restoring all channels to their original values */ + for (pfl= pso->pfLinks.first; pfl; pfl= pfl->next) { + bPoseChannel *pchan= pfl->pchan; + + /* just copy all the values over regardless of whether they changed or not */ + VECCOPY(pchan->loc, pfl->oldloc); + VECCOPY(pchan->eul, pfl->oldrot); + VECCOPY(pchan->size, pfl->oldscale); + QUATCOPY(pchan->quat, pfl->oldquat); + } +} + +/* ------------------------------------ */ + +/* common code for invoke() methods */ +static int pose_slide_invoke_common (bContext *C, wmOperator *op, tPoseSlideOp *pso) +{ + tPChanFCurveLink *pfl; + AnimData *adt= pso->ob->adt; + wmWindow *win= CTX_wm_window(C); + + /* for each link, add all its keyframes to the search tree */ + for (pfl= pso->pfLinks.first; pfl; pfl= pfl->next) { + LinkData *ld; + + /* do this for each F-Curve */ + for (ld= pfl->fcurves.first; ld; ld= ld->next) { + FCurve *fcu= (FCurve *)ld->data; + fcurve_to_keylist(adt, fcu, &pso->keys, NULL); + } + } + + /* consolidate these keyframes, and figure out the nearest ones */ + BLI_dlrbTree_linkedlist_sync(&pso->keys); + + /* cancel if no keyframes found... */ + if (pso->keys.root) { + ActKeyColumn *ak; + + /* firstly, check if the current frame is a keyframe... */ + ak= cfra_find_actkeycolumn(pso->keys.root, pso->cframe); + + if (ak == NULL) { + /* current frame is not a keyframe, so search */ + ActKeyColumn *pk= cfra_find_nearest_next_ak(pso->keys.root, pso->cframe, 0); + ActKeyColumn *nk= cfra_find_nearest_next_ak(pso->keys.root, pso->cframe, 1); + + /* check if we found good keyframes */ + if ((pk == nk) && (pk != NULL)) { + if (pk->cfra < pso->cframe) + nk= nk->next; + else if (nk->cfra > pso->cframe) + pk= pk->prev; + } + + /* new set the frames */ + /* prev frame */ + pso->prevFrame= (pk)? (pk->cfra) : (pso->cframe - 1); + RNA_int_set(op->ptr, "prev_frame", pso->prevFrame); + /* next frame */ + pso->nextFrame= (nk)? (nk->cfra) : (pso->cframe + 1); + RNA_int_set(op->ptr, "next_frame", pso->nextFrame); + } + else { + /* current frame itself is a keyframe, so just take keyframes on either side */ + /* prev frame */ + pso->prevFrame= (ak->prev)? (ak->prev->cfra) : (pso->cframe - 1); + RNA_int_set(op->ptr, "prev_frame", pso->prevFrame); + /* next frame */ + pso->nextFrame= (ak->next)? (ak->next->cfra) : (pso->cframe + 1); + RNA_int_set(op->ptr, "next_frame", pso->nextFrame); + } + } + else { + BKE_report(op->reports, RPT_ERROR, "No keyframes to slide between."); + return OPERATOR_CANCELLED; + } + + /* initial apply for operator... */ + // TODO: need to calculate percentage for initial round too... + pose_slide_apply(C, op, pso); + + /* depsgraph updates + redraws */ + pose_slide_refresh(C, pso); + + /* set cursor to indicate modal */ + WM_cursor_modal(win, BC_EW_SCROLLCURSOR); + + /* add a modal handler for this operator */ + WM_event_add_modal_handler(C, op); + return OPERATOR_RUNNING_MODAL; +} + +/* common code for modal() */ +static int pose_slide_modal (bContext *C, wmOperator *op, wmEvent *evt) +{ + tPoseSlideOp *pso= op->customdata; + wmWindow *win= CTX_wm_window(C); + + switch (evt->type) { + case LEFTMOUSE: /* confirm */ + { + /* return to normal cursor */ + WM_cursor_restore(win); + + /* insert keyframes as required... */ + pose_slide_autoKeyframe(C, pso); + pose_slide_exit(C, op); + + /* done! */ + return OPERATOR_FINISHED; + } + + case ESCKEY: /* cancel */ + case RIGHTMOUSE: + { + /* return to normal cursor */ + WM_cursor_restore(win); + + /* reset transforms back to original state */ + pose_slide_reset(C, pso); + + /* depsgraph updates + redraws */ + pose_slide_refresh(C, pso); + + /* clean up temp data */ + pose_slide_exit(C, op); + + /* cancelled! */ + return OPERATOR_CANCELLED; + } + + case MOUSEMOVE: /* calculate new position */ + { + /* calculate percentage based on position of mouse (we only use x-axis for now. + * since this is more conveninent for users to do), and store new percentage value + */ + pso->percentage= (evt->x - pso->ar->winrct.xmin) / ((float)pso->ar->winx); + RNA_float_set(op->ptr, "percentage", pso->percentage); + + /* reset transforms (to avoid accumulation errors) */ + pose_slide_reset(C, pso); + + /* apply... */ + pose_slide_apply(C, op, pso); + } + break; + + default: /* unhandled event (maybe it was some view manip? */ + /* allow to pass through */ + return OPERATOR_RUNNING_MODAL|OPERATOR_PASS_THROUGH; + } + + /* still running... */ + return OPERATOR_RUNNING_MODAL; +} + +/* common code for cancel() */ +static int pose_slide_cancel (bContext *C, wmOperator *op) +{ + /* cleanup and done */ + pose_slide_exit(C, op); + return OPERATOR_CANCELLED; +} + +/* common code for exec() methods */ +static int pose_slide_exec_common (bContext *C, wmOperator *op, tPoseSlideOp *pso) +{ + /* settings should have been set up ok for applying, so just apply! */ + pose_slide_apply(C, op, pso); + + /* insert keyframes if needed */ + pose_slide_autoKeyframe(C, pso); + + /* cleanup and done */ + pose_slide_exit(C, op); + + return OPERATOR_FINISHED; +} + +/* common code for defining RNA properties */ +static void pose_slide_opdef_properties (wmOperatorType *ot) +{ + RNA_def_int(ot->srna, "prev_frame", 0, MINAFRAME, MAXFRAME, "Previous Keyframe", "Frame number of keyframe immediately before the current frame.", 0, 50); + RNA_def_int(ot->srna, "next_frame", 0, MINAFRAME, MAXFRAME, "Next Keyframe", "Frame number of keyframe immediately after the current frame.", 0, 50); + RNA_def_float_percentage(ot->srna, "percentage", 0.5f, 0.0f, 1.0f, "Percentage", "Weighting factor for the sliding operation", 0.3, 0.7); +} + +/* ------------------------------------ */ + +/* invoke() - for 'push' mode */ +static int pose_slide_push_invoke (bContext *C, wmOperator *op, wmEvent *evt) +{ + tPoseSlideOp *pso; + + /* initialise data */ + if (pose_slide_init(C, op, POSESLIDE_PUSH) == 0) { + pose_slide_exit(C, op); + return OPERATOR_CANCELLED; + } + else + pso= op->customdata; + + /* do common setup work */ + return pose_slide_invoke_common(C, op, pso); +} + +/* exec() - for push */ +static int pose_slide_push_exec (bContext *C, wmOperator *op) +{ + tPoseSlideOp *pso; + + /* initialise data (from RNA-props) */ + if (pose_slide_init(C, op, POSESLIDE_PUSH) == 0) { + pose_slide_exit(C, op); + return OPERATOR_CANCELLED; + } + else + pso= op->customdata; + + /* do common exec work */ + return pose_slide_exec_common(C, op, pso); +} + +void POSE_OT_push (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Push Pose"; + ot->idname= "POSE_OT_push"; + ot->description= "Exaggerate the current pose"; + + /* callbacks */ + ot->exec= pose_slide_push_exec; + ot->invoke= pose_slide_push_invoke; + ot->modal= pose_slide_modal; + ot->cancel= pose_slide_cancel; + ot->poll= ED_operator_posemode; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; + + /* Properties */ + pose_slide_opdef_properties(ot); +} + +/* ........................ */ + +/* invoke() - for 'relax' mode */ +static int pose_slide_relax_invoke (bContext *C, wmOperator *op, wmEvent *evt) +{ + tPoseSlideOp *pso; + + /* initialise data */ + if (pose_slide_init(C, op, POSESLIDE_RELAX) == 0) { + pose_slide_exit(C, op); + return OPERATOR_CANCELLED; + } + else + pso= op->customdata; + + /* do common setup work */ + return pose_slide_invoke_common(C, op, pso); +} + +/* exec() - for relax */ +static int pose_slide_relax_exec (bContext *C, wmOperator *op) +{ + tPoseSlideOp *pso; + + /* initialise data (from RNA-props) */ + if (pose_slide_init(C, op, POSESLIDE_RELAX) == 0) { + pose_slide_exit(C, op); + return OPERATOR_CANCELLED; + } + else + pso= op->customdata; + + /* do common exec work */ + return pose_slide_exec_common(C, op, pso); +} + +void POSE_OT_relax (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Relax Pose"; + ot->idname= "POSE_OT_relax"; + ot->description= "Make the current pose more similar to its surrounding ones."; + + /* callbacks */ + ot->exec= pose_slide_relax_exec; + ot->invoke= pose_slide_relax_invoke; + ot->modal= pose_slide_modal; + ot->cancel= pose_slide_cancel; + ot->poll= ED_operator_posemode; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; + + /* Properties */ + pose_slide_opdef_properties(ot); +} + +/* ........................ */ + +/* invoke() - for 'breakdown' mode */ +static int pose_slide_breakdown_invoke (bContext *C, wmOperator *op, wmEvent *evt) +{ + tPoseSlideOp *pso; + + /* initialise data */ + if (pose_slide_init(C, op, POSESLIDE_BREAKDOWN) == 0) { + pose_slide_exit(C, op); + return OPERATOR_CANCELLED; + } + else + pso= op->customdata; + + /* do common setup work */ + return pose_slide_invoke_common(C, op, pso); +} + +/* exec() - for breakdown */ +static int pose_slide_breakdown_exec (bContext *C, wmOperator *op) +{ + tPoseSlideOp *pso; + + /* initialise data (from RNA-props) */ + if (pose_slide_init(C, op, POSESLIDE_BREAKDOWN) == 0) { + pose_slide_exit(C, op); + return OPERATOR_CANCELLED; + } + else + pso= op->customdata; + + /* do common exec work */ + return pose_slide_exec_common(C, op, pso); +} + +void POSE_OT_breakdown (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Pose Breakdowner"; + ot->idname= "POSE_OT_breakdown"; + ot->description= "Create a suitable breakdown pose on the current frame."; + + /* callbacks */ + ot->exec= pose_slide_breakdown_exec; + ot->invoke= pose_slide_breakdown_invoke; + ot->modal= pose_slide_modal; + ot->cancel= pose_slide_cancel; + ot->poll= ED_operator_posemode; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; + + /* Properties */ + pose_slide_opdef_properties(ot); +} + +/* **************************************************** */ diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index 46d08afa656..386cb6512a3 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -44,7 +44,6 @@ #include "DNA_action_types.h" #include "DNA_armature_types.h" #include "DNA_curve_types.h" -#include "DNA_ipo_types.h" #include "DNA_object_types.h" #include "DNA_object_force.h" #include "DNA_scene_types.h" @@ -62,8 +61,6 @@ #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" @@ -278,24 +275,7 @@ void poselib_validate_act (bAction *act) /* ************************************************************* */ /* Pointers to the builtin KeyingSets that we want to use */ -static KeyingSet *poselib_ks_locrotscale = NULL; /* the only keyingset we'll need*/ -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) -{ - /* 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 or eulers depending on context) */ - poselib_ks_locrotscale= ANIM_builtin_keyingset_get_named(NULL, "LocRotScale"); - - /* clear flag requesting init */ - poselib_ks_need_init= 0; - } -} +static KeyingSet *poselib_ks_locrotscale = NULL; /* the only keyingset we'll need */ /* ----- */ @@ -390,9 +370,6 @@ static int poselib_add_exec (bContext *C, wmOperator *op) /* 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; @@ -406,6 +383,8 @@ static int poselib_add_exec (bContext *C, wmOperator *op) cks.pchan= pchan; /* KeyingSet to use depends on rotation mode (but that's handled by the templates code) */ + if (poselib_ks_locrotscale == NULL) + poselib_ks_locrotscale= ANIM_builtin_keyingset_get_named(NULL, "LocRotScale"); modify_keyframes(C, &dsources, act, poselib_ks_locrotscale, MODIFYKEY_MODE_INSERT, (float)frame); } } @@ -488,6 +467,7 @@ static int poselib_remove_exec (bContext *C, wmOperator *op) marker= BLI_findlink(&act->markers, RNA_int_get(op->ptr, "index")); if (marker == NULL) { BKE_report(op->reports, RPT_ERROR, "Invalid index for Pose"); + return OPERATOR_CANCELLED; } /* remove relevant keyframes */ @@ -554,6 +534,7 @@ static int poselib_rename_exec (bContext *C, wmOperator *op) marker= BLI_findlink(&act->markers, RNA_int_get(op->ptr, "index")); if (marker == NULL) { BKE_report(op->reports, RPT_ERROR, "Invalid index for Pose"); + return OPERATOR_CANCELLED; } /* get new name */ @@ -756,13 +737,20 @@ static void poselib_apply_pose (tPoseLib_PreviewData *pld) } /* Auto-keys/tags bones affected by the pose used from the poselib */ -static void poselib_keytag_pose (Scene *scene, tPoseLib_PreviewData *pld) +static void poselib_keytag_pose (bContext *C, Scene *scene, tPoseLib_PreviewData *pld) { bPose *pose= pld->pose; bPoseChannel *pchan; bAction *act= pld->act; bActionGroup *agrp; + bCommonKeySrc cks; + ListBase dsources = {&cks, &cks}; + + /* init common-key-source for use by KeyingSets */ + memset(&cks, 0, sizeof(bCommonKeySrc)); + cks.id= &pld->ob->id; + /* start tagging/keying */ for (agrp= act->groups.first; agrp; agrp= agrp->next) { /* only for selected action channels */ @@ -770,28 +758,21 @@ static void poselib_keytag_pose (Scene *scene, tPoseLib_PreviewData *pld) pchan= get_pose_channel(pose, agrp->name); if (pchan) { -#if 0 // XXX old animation system // TODO: use a standard autokeying function in future (to allow autokeying-editkeys to work) - if (IS_AUTOKEY_MODE(NORMAL)) { - ID *id= &pld->ob->id; + if (IS_AUTOKEY_MODE(scene, NORMAL)) { + /* Set keys on pose + * - KeyingSet to use depends on rotation mode + * (but that's handled by the templates code) + */ + // TODO: for getting the KeyingSet used, we should really check which channels were affected + if (poselib_ks_locrotscale == NULL) + poselib_ks_locrotscale= ANIM_builtin_keyingset_get_named(NULL, "LocRotScale"); - /* Set keys on pose */ - if (pchan->flag & POSE_ROT) { - insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_X, 0); - insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_Y, 0); - insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_Z, 0); - insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_W, 0); - } - if (pchan->flag & POSE_SIZE) { - insertkey(id, ID_PO, pchan->name, NULL, AC_SIZE_X, 0); - insertkey(id, ID_PO, pchan->name, NULL, AC_SIZE_Y, 0); - insertkey(id, ID_PO, pchan->name, NULL, AC_SIZE_Z, 0); - } - if (pchan->flag & POSE_LOC) { - insertkey(id, ID_PO, pchan->name, NULL, AC_LOC_X, 0); - insertkey(id, ID_PO, pchan->name, NULL, AC_LOC_Y, 0); - insertkey(id, ID_PO, pchan->name, NULL, AC_LOC_Z, 0); - } + /* init cks for this PoseChannel, then use the relative KeyingSets to keyframe it */ + cks.pchan= pchan; + + /* now insert the keyframe */ + modify_keyframes(C, &dsources, NULL, poselib_ks_locrotscale, MODIFYKEY_MODE_INSERT, (float)CFRA); /* clear any unkeyed tags */ if (pchan->bone) @@ -802,7 +783,6 @@ static void poselib_keytag_pose (Scene *scene, tPoseLib_PreviewData *pld) if (pchan->bone) pchan->bone->flag |= BONE_UNKEYED; } -#endif // XXX old animation system } } @@ -1345,7 +1325,7 @@ static void poselib_preview_cleanup (bContext *C, wmOperator *op) } else if (pld->state == PL_PREVIEW_CONFIRM) { /* tag poses as appropriate */ - poselib_keytag_pose(scene, pld); + poselib_keytag_pose(C, scene, pld); /* change active pose setting */ act->active_marker= BLI_findindex(&act->markers, marker) + 1; @@ -1434,7 +1414,7 @@ static int poselib_preview_invoke(bContext *C, wmOperator *op, wmEvent *event) 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); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index 7d7f54309a8..d4b7aa149df 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -798,6 +798,8 @@ void pose_copy_menu(Scene *scene) VECCOPY(pchan->limitmax, pchanact->limitmax); VECCOPY(pchan->stiffness, pchanact->stiffness); pchan->ikstretch= pchanact->ikstretch; + pchan->ikrotweight= pchanact->ikrotweight; + pchan->iklinweight= pchanact->iklinweight; } break; case 8: /* Custom Bone Shape */ @@ -812,14 +814,14 @@ void pose_copy_menu(Scene *scene) armature_mat_pose_to_bone(pchan, pchanact->pose_mat, delta_mat); - if (pchan->rotmode == PCHAN_ROT_AXISANGLE) { + if (pchan->rotmode == ROT_MODE_AXISANGLE) { float tmp_quat[4]; /* need to convert to quat first (in temp var)... */ Mat4ToQuat(delta_mat, tmp_quat); QuatToAxisAngle(tmp_quat, &pchan->quat[1], &pchan->quat[0]); } - else if (pchan->rotmode == PCHAN_ROT_QUAT) + else if (pchan->rotmode == ROT_MODE_QUAT) Mat4ToQuat(delta_mat, pchan->quat); else Mat4ToEulO(delta_mat, pchan->eul, pchan->rotmode); @@ -961,6 +963,11 @@ void POSE_OT_copy (wmOperatorType *ot) /* ---- */ +/* Pointers to the builtin KeyingSets that we want to use */ +static KeyingSet *posePaste_ks_locrotscale = NULL; /* the only keyingset we'll need */ + +/* ---- */ + static int pose_paste_exec (bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); @@ -969,6 +976,13 @@ static int pose_paste_exec (bContext *C, wmOperator *op) char name[32]; int flip= RNA_boolean_get(op->ptr, "flipped"); + bCommonKeySrc cks; + ListBase dsources = {&cks, &cks}; + + /* init common-key-source for use by KeyingSets */ + memset(&cks, 0, sizeof(bCommonKeySrc)); + cks.id= &ob->id; + /* sanity checks */ if ELEM(NULL, ob, ob->pose) return OPERATOR_CANCELLED; @@ -1009,12 +1023,12 @@ static int pose_paste_exec (bContext *C, wmOperator *op) } else if (pchan->rotmode > 0) { /* quat/axis-angle to euler */ - if (chan->rotmode == PCHAN_ROT_AXISANGLE) + if (chan->rotmode == ROT_MODE_AXISANGLE) AxisAngleToEulO(&chan->quat[1], chan->quat[0], pchan->eul, pchan->rotmode); else QuatToEulO(chan->quat, pchan->eul, pchan->rotmode); } - else if (pchan->rotmode == PCHAN_ROT_AXISANGLE) { + else if (pchan->rotmode == ROT_MODE_AXISANGLE) { /* quat/euler to axis angle */ if (chan->rotmode > 0) EulOToAxisAngle(chan->eul, chan->rotmode, &pchan->quat[1], &pchan->quat[0]); @@ -1038,13 +1052,20 @@ static int pose_paste_exec (bContext *C, wmOperator *op) pchan->eul[1] *= -1; pchan->eul[2] *= -1; } - else if (pchan->rotmode == PCHAN_ROT_AXISANGLE) { + else if (pchan->rotmode == ROT_MODE_AXISANGLE) { float eul[3]; AxisAngleToEulO(&pchan->quat[1], pchan->quat[0], eul, EULER_ORDER_DEFAULT); eul[1]*= -1; eul[2]*= -1; EulOToAxisAngle(eul, EULER_ORDER_DEFAULT, &pchan->quat[1], &pchan->quat[0]); + + // experimental method (uncomment to test): +#if 0 + /* experimental method: just flip the orientation of the axis on x/y axes */ + pchan->quat[1] *= -1; + pchan->quat[2] *= -1; +#endif } else { float eul[3]; @@ -1056,28 +1077,19 @@ static int pose_paste_exec (bContext *C, wmOperator *op) } } -#if 0 // XXX old animation system - if (autokeyframe_cfra_can_key(ob)) { - ID *id= &ob->id; + if (autokeyframe_cfra_can_key(scene, &ob->id)) { + /* Set keys on pose + * - KeyingSet to use depends on rotation mode + * (but that's handled by the templates code) + */ + // TODO: for getting the KeyingSet used, we should really check which channels were affected + if (posePaste_ks_locrotscale == NULL) + posePaste_ks_locrotscale= ANIM_builtin_keyingset_get_named(NULL, "LocRotScale"); - /* Set keys on pose */ - // TODO: make these use keyingsets.... - if (chan->flag & POSE_ROT) { - insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_X, 0); - insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_Y, 0); - insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_Z, 0); - insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_W, 0); - } - if (chan->flag & POSE_SIZE) { - insertkey(id, ID_PO, pchan->name, NULL, AC_SIZE_X, 0); - insertkey(id, ID_PO, pchan->name, NULL, AC_SIZE_Y, 0); - insertkey(id, ID_PO, pchan->name, NULL, AC_SIZE_Z, 0); - } - if (chan->flag & POSE_LOC) { - insertkey(id, ID_PO, pchan->name, NULL, AC_LOC_X, 0); - insertkey(id, ID_PO, pchan->name, NULL, AC_LOC_Y, 0); - insertkey(id, ID_PO, pchan->name, NULL, AC_LOC_Z, 0); - } + /* init cks for this PoseChannel, then use the relative KeyingSets to keyframe it */ + cks.pchan= pchan; + + modify_keyframes(C, &dsources, NULL, posePaste_ks_locrotscale, MODIFYKEY_MODE_INSERT, (float)CFRA); /* clear any unkeyed tags */ if (chan->bone) @@ -1088,7 +1100,6 @@ static int pose_paste_exec (bContext *C, wmOperator *op) if (chan->bone) chan->bone->flag |= BONE_UNKEYED; } -#endif // XXX old animation system } } } @@ -1933,7 +1944,7 @@ static int armature_bone_layers_invoke (bContext *C, wmOperator *op, wmEvent *ev /* Set the visible layers for the active armature (edit and pose modes) */ static int armature_bone_layers_exec (bContext *C, wmOperator *op) { - Object *ob= CTX_data_active_object(C); + Object *ob= CTX_data_edit_object(C); bArmature *arm= (ob)? ob->data : NULL; PointerRNA ptr; int layers[16]; /* hardcoded for now - we can only have 16 armature layers, so this should be fine... */ @@ -1946,7 +1957,7 @@ static int armature_bone_layers_exec (bContext *C, wmOperator *op) { /* get pointer for pchan, and write flags this way */ RNA_pointer_create((ID *)arm, &RNA_EditBone, ebone, &ptr); - RNA_boolean_set_array(&ptr, "layers", layers); + RNA_boolean_set_array(&ptr, "layer", layers); } CTX_DATA_END; @@ -1975,175 +1986,7 @@ void ARMATURE_OT_bone_layers (wmOperatorType *ot) RNA_def_boolean_array(ot->srna, "layers", 16, NULL, "Layers", "Armature layers that bone belongs to."); } - -#if 0 -// XXX old sys -/* for use with pose_relax only */ -static int pose_relax_icu(struct IpoCurve *icu, float framef, float *val, float *frame_prev, float *frame_next) -{ - if (!icu) { - return 0; - } - else { - BezTriple *bezt = icu->bezt; - - BezTriple *bezt_prev=NULL, *bezt_next=NULL; - float w1, w2, wtot; - int i; - - for (i=0; i < icu->totvert; i++, bezt++) { - if (bezt->vec[1][0] < framef - 0.5) { - bezt_prev = bezt; - } else { - break; - } - } - - if (bezt_prev==NULL) return 0; - - /* advance to the next, dont need to advance i */ - bezt = bezt_prev+1; - - for (; i < icu->totvert; i++, bezt++) { - if (bezt->vec[1][0] > framef + 0.5) { - bezt_next = bezt; - break; - } - } - - if (bezt_next==NULL) return 0; - - if (val) { - w1 = framef - bezt_prev->vec[1][0]; - w2 = bezt_next->vec[1][0] - framef; - wtot = w1 + w2; - w1=w1/wtot; - w2=w2/wtot; -#if 0 - val = (bezt_prev->vec[1][1] * w2) + (bezt_next->vec[1][1] * w1); -#else - /* apply the value with a hard coded 6th */ - *val = (((bezt_prev->vec[1][1] * w2) + (bezt_next->vec[1][1] * w1)) + (*val * 5.0f)) / 6.0f; -#endif - } - - if (frame_prev) *frame_prev = bezt_prev->vec[1][0]; - if (frame_next) *frame_next = bezt_next->vec[1][0]; - - return 1; - } -} -#endif - -void pose_relax(Scene *scene) -{ - Object *ob = OBACT; - bPose *pose; - bAction *act; - bArmature *arm; - -// IpoCurve *icu_w, *icu_x, *icu_y, *icu_z; - - bPoseChannel *pchan; -// bActionChannel *achan; -// float framef = F_CFRA; -// float frame_prev, frame_next; -// float quat_prev[4], quat_next[4], quat_interp[4], quat_orig[4]; - - int do_scale = 0; - int do_loc = 0; - int do_quat = 0; - int flag = 0; -// int do_x, do_y, do_z; - - if (!ob) return; - - pose = ob->pose; - act = ob->action; - arm = (bArmature *)ob->data; - - if (!pose || !act || !arm) return; - - for (pchan=pose->chanbase.first; pchan; pchan= pchan->next) { - - pchan->bone->flag &= ~BONE_TRANSFORM; - - if (pchan->bone->layer & arm->layer) { - if (pchan->bone->flag & BONE_SELECTED) { - /* do we have an ipo curve? */ -#if 0 // XXX old animation system - achan= get_action_channel(act, pchan->name); - - if (achan && achan->ipo) { - /*calc_ipo(achan->ipo, ctime);*/ - - do_x = pose_relax_icu(find_ipocurve(achan->ipo, AC_LOC_X), framef, &pchan->loc[0], NULL, NULL); - do_y = pose_relax_icu(find_ipocurve(achan->ipo, AC_LOC_Y), framef, &pchan->loc[1], NULL, NULL); - do_z = pose_relax_icu(find_ipocurve(achan->ipo, AC_LOC_Z), framef, &pchan->loc[2], NULL, NULL); - do_loc += do_x + do_y + do_z; - - do_x = pose_relax_icu(find_ipocurve(achan->ipo, AC_SIZE_X), framef, &pchan->size[0], NULL, NULL); - do_y = pose_relax_icu(find_ipocurve(achan->ipo, AC_SIZE_Y), framef, &pchan->size[1], NULL, NULL); - do_z = pose_relax_icu(find_ipocurve(achan->ipo, AC_SIZE_Z), framef, &pchan->size[2], NULL, NULL); - do_scale += do_x + do_y + do_z; - - if( ((icu_w = find_ipocurve(achan->ipo, AC_QUAT_W))) && - ((icu_x = find_ipocurve(achan->ipo, AC_QUAT_X))) && - ((icu_y = find_ipocurve(achan->ipo, AC_QUAT_Y))) && - ((icu_z = find_ipocurve(achan->ipo, AC_QUAT_Z))) ) - { - /* use the quatw keyframe as a basis for others */ - if (pose_relax_icu(icu_w, framef, NULL, &frame_prev, &frame_next)) { - /* get 2 quats */ - quat_prev[0] = eval_icu(icu_w, frame_prev); - quat_prev[1] = eval_icu(icu_x, frame_prev); - quat_prev[2] = eval_icu(icu_y, frame_prev); - quat_prev[3] = eval_icu(icu_z, frame_prev); - - quat_next[0] = eval_icu(icu_w, frame_next); - quat_next[1] = eval_icu(icu_x, frame_next); - quat_next[2] = eval_icu(icu_y, frame_next); - quat_next[3] = eval_icu(icu_z, frame_next); - -#if 0 - /* apply the setting, completely smooth */ - QuatInterpol(pchan->quat, quat_prev, quat_next, (framef-frame_prev) / (frame_next-frame_prev) ); -#else - /* tricky interpolation */ - QuatInterpol(quat_interp, quat_prev, quat_next, (framef-frame_prev) / (frame_next-frame_prev) ); - QUATCOPY(quat_orig, pchan->quat); - QuatInterpol(pchan->quat, quat_orig, quat_interp, 1.0f/6.0f); - /* done */ -#endif - do_quat++; - } - } - - /* apply BONE_TRANSFORM tag so that autokeying will pick it up */ - pchan->bone->flag |= BONE_TRANSFORM; - } - -#endif // XXX old animation system - } - } - } - - ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK); - - /* do auto-keying */ - if (do_loc) flag |= TFM_TRANSLATION; - if (do_scale) flag |= TFM_RESIZE; - if (do_quat) flag |= TFM_ROTATION; - autokeyframe_pose_cb_func(ob, flag, 0); - - /* clear BONE_TRANSFORM flags */ - for (pchan=pose->chanbase.first; pchan; pchan= pchan->next) - pchan->bone->flag &= ~ BONE_TRANSFORM; - - /* do depsgraph flush */ - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); - BIF_undo_push("Relax Pose"); -} +/* ********************************************** */ /* for use in insertkey, ensure rotation goes other way around */ void pose_flipquats(Scene *scene) diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c index 8a90dace40b..77c5ed1de2c 100644 --- a/source/blender/editors/curve/curve_ops.c +++ b/source/blender/editors/curve/curve_ops.c @@ -163,7 +163,10 @@ void ED_operatortypes_curve(void) void ED_keymap_curve(wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "Font", 0, 0); + wmKeyMap *keymap; + + keymap= WM_keymap_find(wm, "Font", 0, 0); + keymap->poll= ED_operator_editfont; /* only set in editmode font, by space_view3d listener */ RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_style_toggle", BKEY, KM_PRESS, KM_CTRL, 0)->ptr, "style", CU_BOLD); @@ -212,7 +215,8 @@ void ED_keymap_curve(wmWindowManager *wm) 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); + keymap= WM_keymap_find(wm, "Curve", 0, 0); + keymap->poll= ED_operator_editsurfcurve; WM_keymap_add_item(keymap, "OBJECT_OT_curve_add", AKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "CURVE_OT_vertex_add", ACTIONMOUSE, KM_PRESS, KM_CTRL, 0); diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index e346ccafde3..a18815d04a6 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -1078,7 +1078,7 @@ void CURVE_OT_spline_weight_set(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_float_percentage(ot->srna, "weight", 1.0f, 0.0f, 1.0f, "Weight", "", 0.0f, 1.0f); + RNA_def_float_factor(ot->srna, "weight", 1.0f, 0.0f, 1.0f, "Weight", "", 0.0f, 1.0f); } /******************* set radius operator ******************/ @@ -2546,7 +2546,7 @@ void CURVE_OT_handle_type_set(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "type", type_items, CU_POLY, "Type", "Spline type"); + RNA_def_enum(ot->srna, "type", type_items, 1, "Type", "Spline type"); } /***************** make segment operator **********************/ @@ -4704,6 +4704,7 @@ Nurb *add_nurbs_primitive(bContext *C, int type, int newname) float *curs, cent[3],vec[3],imat[3][3],mat[3][3]; float fac,cmat[3][3], grid; int a, b, cutype, stype; + int force_3d = ((Curve *)obedit->data)->flag & CU_3D; /* could be adding to an existing 3D curve */ cutype= type & CU_TYPE; // poly, bezier, nurbs, etc stype= type & CU_PRIMITIVE; @@ -4727,7 +4728,7 @@ Nurb *add_nurbs_primitive(bContext *C, int type, int newname) cent[2]-= obedit->obmat[3][2]; if(rv3d) { - if (!(newname) || U.flag & USER_ADD_VIEWALIGNED) + if (!newname && U.flag & USER_ADD_VIEWALIGNED) Mat3CpyMat4(imat, rv3d->viewmat); else Mat3One(imat); @@ -4760,7 +4761,7 @@ Nurb *add_nurbs_primitive(bContext *C, int type, int newname) rename_id((ID *)obedit->data, "Curve"); } if(cutype==CU_BEZIER) { - nu->flag= CU_2D; + if (!force_3d) nu->flag |= CU_2D; nu->pntsu= 2; nu->bezt = (BezTriple*)MEM_callocN(2 * sizeof(BezTriple), "addNurbprim1"); @@ -4869,7 +4870,7 @@ Nurb *add_nurbs_primitive(bContext *C, int type, int newname) rename_id((ID *)obedit->data, "CurveCircle"); } if(cutype==CU_BEZIER) { - nu->flag= CU_2D; + if (!force_3d) nu->flag |= CU_2D; nu->pntsu= 4; nu->bezt= callocstructN(BezTriple, 4, "addNurbprim1"); nu->flagu= CU_CYCLIC; diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index a9736f3f88d..2be567e1921 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -381,19 +381,19 @@ static int paste_file(bContext *C, ReportList *reports, char *filename) static int paste_file_exec(bContext *C, wmOperator *op) { - char *filename; + char *path; int retval; - filename= RNA_string_get_alloc(op->ptr, "filename", NULL, 0); - retval= paste_file(C, op->reports, filename); - MEM_freeN(filename); + path= RNA_string_get_alloc(op->ptr, "path", NULL, 0); + retval= paste_file(C, op->reports, path); + MEM_freeN(path); return retval; } static int paste_file_invoke(bContext *C, wmOperator *op, wmEvent *event) { - if(RNA_property_is_set(op->ptr, "filename")) + if(RNA_property_is_set(op->ptr, "path")) return paste_file_exec(C, op); WM_event_add_fileselect(C, op); @@ -417,7 +417,7 @@ void FONT_OT_file_paste(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE); + WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE, FILE_SPECIAL); } /******************* paste buffer operator ********************/ diff --git a/source/blender/editors/datafiles/B.blend.c b/source/blender/editors/datafiles/B.blend.c index 980a9ee1697..b469f0c24cb 100644 --- a/source/blender/editors/datafiles/B.blend.c +++ b/source/blender/editors/datafiles/B.blend.c @@ -1,759 +1,858 @@ /* DataToC output of file <B_blend> */ -int datatoc_B_blend_size= 94308; +int datatoc_B_blend_size= 100360; char datatoc_B_blend[]= { - 66, 76, 69, 78, - 68, 69, 82, 45,118, 50, 53, 48, 82, 69, 78, 68, 32, 0, 0, 0, 80,187,118,198,255,127, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, - 1, 0, 0, 0,250, 0, 0, 0, 83, 99,101,110,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 71, 76, 79, 66, 40, 0, 0, 0, 64,187,118,198,255,127, 0, 0,185, 0, 0, 0, 1, 0, 0, 0, 32, 32, 32, 48, 0, 0, 0, 0, -250, 0, 0, 0, 1, 0, 0, 1,208,233, 90, 2, 0, 0, 0, 0, 96,130, 91, 2, 0, 0, 0, 0, 0, 16, 0, 0,128, 32, 4, 0, - 87, 77, 0, 0,224, 0, 0, 0,144,231, 90, 2, 0, 0, 0, 0, 75, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 77, 87,105,110, 77, 97,110, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -176,232, 90, 2, 0, 0, 0, 0,176,232, 90, 2, 0, 0, 0, 0,176,232, 90, 2, 0, 0, 0, 0,176,232, 90, 2, 0, 0, 0, 0, - 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,144,131,100, 2, 0, 0, 0, 0,176,167,177, 2, 0, 0, 0, 0, 68, 65, 84, 65,224, 0, 0, 0, -176,232, 90, 2, 0, 0, 0, 0, 76, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -224,186, 91, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,208,233, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -115, 99,114,101,101,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 5, 0, 30, 0,118, 7, 97, 4, 0, 0, 0, 0, 1, 0,238, 3, 0, 0, 1, 0, 0, 0, 0, 0, 0,131,100, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 14,119, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,224,224,180, 2, 0, 0, 0, 0,224,224,180, 2, 0, 0, 0, 0, - 64,132,100, 2, 0, 0, 0, 0,176,133,100, 2, 0, 0, 0, 0,112,134,100, 2, 0, 0, 0, 0,144,191,100, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0,208, 0, 0, 0,208,233, 90, 2, 0, 0, 0, 0, -179, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 83, 99,114,101,101,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,224,234, 90, 2, 0, 0, 0, 0,192,239, 90, 2, 0, 0, 0, 0, - 32,240, 90, 2, 0, 0, 0, 0,144,247, 90, 2, 0, 0, 0, 0, 0,248, 90, 2, 0, 0, 0, 0,160,111, 91, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,130, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 80,149,150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, -224,234, 90, 2, 0, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0, 64,235, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 64,235, 90, 2, 0, 0, 0, 0, -180, 0, 0, 0, 1, 0, 0, 0,160,235, 90, 2, 0, 0, 0, 0,224,234, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 97, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,160,235, 90, 2, 0, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0, - 0,236, 90, 2, 0, 0, 0, 0, 64,235, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,118, 7, 97, 4, 0, 0, 0, 0, - 68, 65, 84, 65, 32, 0, 0, 0, 0,236, 90, 2, 0, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0, 96,236, 90, 2, 0, 0, 0, 0, -160,235, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,118, 7, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, - 96,236, 90, 2, 0, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0,192,236, 90, 2, 0, 0, 0, 0, 0,236, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 4, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,192,236, 90, 2, 0, 0, 0, 0, -180, 0, 0, 0, 1, 0, 0, 0, 32,237, 90, 2, 0, 0, 0, 0, 96,236, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -118, 7, 70, 4, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 32,237, 90, 2, 0, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0, -128,237, 90, 2, 0, 0, 0, 0,192,236, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 32, 0, 0, 0,128,237, 90, 2, 0, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0,224,237, 90, 2, 0, 0, 0, 0, - 32,237, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,118, 7, 80, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, -224,237, 90, 2, 0, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0, 64,238, 90, 2, 0, 0, 0, 0,128,237, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 12, 6, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 64,238, 90, 2, 0, 0, 0, 0, -180, 0, 0, 0, 1, 0, 0, 0,160,238, 90, 2, 0, 0, 0, 0,224,237, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 12, 6, 70, 4, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,160,238, 90, 2, 0, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0, - 0,239, 90, 2, 0, 0, 0, 0, 64,238, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 32, 0, 0, 0, 0,239, 90, 2, 0, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0, 96,239, 90, 2, 0, 0, 0, 0, -160,238, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 6,100, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, - 96,239, 90, 2, 0, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0,192,239, 90, 2, 0, 0, 0, 0, 0,239, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 12, 6, 80, 3, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,192,239, 90, 2, 0, 0, 0, 0, -180, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,239, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -118, 7, 80, 3, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 32,240, 90, 2, 0, 0, 0, 0,181, 0, 0, 0, 1, 0, 0, 0, -144,240, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,235, 90, 2, 0, 0, 0, 0,160,235, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,144,240, 90, 2, 0, 0, 0, 0,181, 0, 0, 0, 1, 0, 0, 0, - 0,241, 90, 2, 0, 0, 0, 0, 32,240, 90, 2, 0, 0, 0, 0, 64,235, 90, 2, 0, 0, 0, 0, 96,236, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 0,241, 90, 2, 0, 0, 0, 0,181, 0, 0, 0, 1, 0, 0, 0, -112,241, 90, 2, 0, 0, 0, 0,144,240, 90, 2, 0, 0, 0, 0,160,235, 90, 2, 0, 0, 0, 0,192,236, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,112,241, 90, 2, 0, 0, 0, 0,181, 0, 0, 0, 1, 0, 0, 0, -224,241, 90, 2, 0, 0, 0, 0, 0,241, 90, 2, 0, 0, 0, 0, 96,236, 90, 2, 0, 0, 0, 0,192,236, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,224,241, 90, 2, 0, 0, 0, 0,181, 0, 0, 0, 1, 0, 0, 0, - 80,242, 90, 2, 0, 0, 0, 0,112,241, 90, 2, 0, 0, 0, 0,224,234, 90, 2, 0, 0, 0, 0,224,237, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 80,242, 90, 2, 0, 0, 0, 0,181, 0, 0, 0, 1, 0, 0, 0, -192,242, 90, 2, 0, 0, 0, 0,224,241, 90, 2, 0, 0, 0, 0, 0,236, 90, 2, 0, 0, 0, 0,224,237, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,192,242, 90, 2, 0, 0, 0, 0,181, 0, 0, 0, 1, 0, 0, 0, - 48,243, 90, 2, 0, 0, 0, 0, 80,242, 90, 2, 0, 0, 0, 0, 96,236, 90, 2, 0, 0, 0, 0, 64,238, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 48,243, 90, 2, 0, 0, 0, 0,181, 0, 0, 0, 1, 0, 0, 0, -160,243, 90, 2, 0, 0, 0, 0,192,242, 90, 2, 0, 0, 0, 0,192,236, 90, 2, 0, 0, 0, 0, 64,238, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,160,243, 90, 2, 0, 0, 0, 0,181, 0, 0, 0, 1, 0, 0, 0, - 16,244, 90, 2, 0, 0, 0, 0, 48,243, 90, 2, 0, 0, 0, 0,224,234, 90, 2, 0, 0, 0, 0,160,238, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 16,244, 90, 2, 0, 0, 0, 0,181, 0, 0, 0, 1, 0, 0, 0, -128,244, 90, 2, 0, 0, 0, 0,160,243, 90, 2, 0, 0, 0, 0, 96,236, 90, 2, 0, 0, 0, 0,160,238, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,128,244, 90, 2, 0, 0, 0, 0,181, 0, 0, 0, 1, 0, 0, 0, -240,244, 90, 2, 0, 0, 0, 0, 16,244, 90, 2, 0, 0, 0, 0, 64,238, 90, 2, 0, 0, 0, 0, 0,239, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,240,244, 90, 2, 0, 0, 0, 0,181, 0, 0, 0, 1, 0, 0, 0, - 96,245, 90, 2, 0, 0, 0, 0,128,244, 90, 2, 0, 0, 0, 0,224,237, 90, 2, 0, 0, 0, 0, 0,239, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 96,245, 90, 2, 0, 0, 0, 0,181, 0, 0, 0, 1, 0, 0, 0, -208,245, 90, 2, 0, 0, 0, 0,240,244, 90, 2, 0, 0, 0, 0,160,238, 90, 2, 0, 0, 0, 0, 0,239, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,208,245, 90, 2, 0, 0, 0, 0,181, 0, 0, 0, 1, 0, 0, 0, - 64,246, 90, 2, 0, 0, 0, 0, 96,245, 90, 2, 0, 0, 0, 0,224,237, 90, 2, 0, 0, 0, 0, 96,239, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 64,246, 90, 2, 0, 0, 0, 0,181, 0, 0, 0, 1, 0, 0, 0, -176,246, 90, 2, 0, 0, 0, 0,208,245, 90, 2, 0, 0, 0, 0, 64,238, 90, 2, 0, 0, 0, 0, 96,239, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,176,246, 90, 2, 0, 0, 0, 0,181, 0, 0, 0, 1, 0, 0, 0, - 32,247, 90, 2, 0, 0, 0, 0, 64,246, 90, 2, 0, 0, 0, 0,192,236, 90, 2, 0, 0, 0, 0,192,239, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 32,247, 90, 2, 0, 0, 0, 0,181, 0, 0, 0, 1, 0, 0, 0, -144,247, 90, 2, 0, 0, 0, 0,176,246, 90, 2, 0, 0, 0, 0, 0,236, 90, 2, 0, 0, 0, 0,192,239, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,144,247, 90, 2, 0, 0, 0, 0,181, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 32,247, 90, 2, 0, 0, 0, 0, 96,239, 90, 2, 0, 0, 0, 0,192,239, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 0,248, 90, 2, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0, -192,251, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,236, 90, 2, 0, 0, 0, 0, 64,235, 90, 2, 0, 0, 0, 0, -160,235, 90, 2, 0, 0, 0, 0,192,236, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,118, 7, 0, 0, - 71, 4, 0, 0, 97, 4, 0, 0, 7, 7,119, 7, 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0,112,153, 76, 2, 0, 0, 0, 0, -208,129, 91, 2, 0, 0, 0, 0,208,129, 91, 2, 0, 0, 0, 0,224,248, 90, 2, 0, 0, 0, 0, 80,250, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,224, 78,100, 2, 0, 0, 0, 0, 64,153,118, 2, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 1, 0, 0,224,248, 90, 2, 0, 0, 0, 0,184, 0, 0, 0, 1, 0, 0, 0, 80,250, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,106, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,224,238, 68, - 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,118, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,237, 68, 0, 0,200, 65, - 0,128,237, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, 10, 0,119, 7, - 26, 0,119, 7, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,118, 7, 0, 0, 71, 4, 0, 0, 96, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -119, 7, 26, 0, 2, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,155, 76, 2, 0, 0, 0, 0, - 96,164,100, 2, 0, 0, 0, 0, 96,164,100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -208,138,100, 2, 0, 0, 0, 0, 64,140,100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 1, 0, 0, 80,250, 90, 2, 0, 0, 0, 0,184, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -224,248, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,240, 68, 0, 0, 0,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,110, 69, - 0, 0, 0,192, 0, 0, 0, 0,112, 7, 0, 0,129, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, - 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 4, 6, 0,129, 7, - 2, 0,112, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 97, 4, 0, 0, 97, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 96,154, 76, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65,160, 0, 0, 0,192,251, 90, 2, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0,176, 81, 91, 2, 0, 0, 0, 0, - 0,248, 90, 2, 0, 0, 0, 0,224,237, 90, 2, 0, 0, 0, 0, 96,239, 90, 2, 0, 0, 0, 0,192,239, 90, 2, 0, 0, 0, 0, - 0,236, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 6, 0, 0,118, 7, 0, 0, 0, 0, 0, 0, 79, 3, 0, 0, - 4, 4,106, 1, 80, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,160,149, 76, 2, 0, 0, 0, 0,240, 72, 91, 2, 0, 0, 0, 0, - 80, 80, 91, 2, 0, 0, 0, 0,160,252, 90, 2, 0, 0, 0, 0, 16,254, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,160,158,118, 2, 0, 0, 0, 0, 96,169,118, 2, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, -160,252, 90, 2, 0, 0, 0, 0,184, 0, 0, 0, 1, 0, 0, 0, 16,254, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,193, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,181, 67, 0, 0, 0, 0, 0, 0,248, 65, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,105, 1, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0,128,137, 67, 0, 0,200, 65, 0,128,137, 67, 0, 0,200, 65, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, 10, 0,106, 1, 31, 0,106, 1, 31, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 6, 0, 0,118, 7, 0, 0, - 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,106, 1, 31, 0, 3, 0, 1, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,152, 76, 2, 0, 0, 0, 0,112,176,178, 2, 0, 0, 0, 0, -112,176,178, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,143,100, 2, 0, 0, 0, 0, - 32,146,100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, - 16,254, 90, 2, 0, 0, 0, 0,184, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160,252, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0,128,172, 67, 0,192, 71,196, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,172, 67, 0,192, 71,196, 0, 0, 0, 0, - 89, 1, 0, 0,106, 1, 0, 0, 18, 0, 0, 0, 48, 3, 0, 0, 0, 0, 0, 0, 88, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, - 0, 0, 0, 0, 88, 1, 0, 0, 18, 0, 0, 0, 48, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,106, 1, 49, 3, 89, 1, 31, 3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,160, 90,119, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 13, 6, 0, 0,118, 7, 0, 0, - 31, 0, 0, 0, 79, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,106, 1, 49, 3, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,144,150, 76, 2, 0, 0, 0, 0,176,210,178, 2, 0, 0, 0, 0, - 96, 53,180, 2, 0, 0, 0, 0,128,255, 90, 2, 0, 0, 0, 0, 96, 55,180, 2, 0, 0, 0, 0, 80,148,100, 2, 0, 0, 0, 0, -240,151,100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 1, 0, 0, -240, 72, 91, 2, 0, 0, 0, 0,152, 0, 0, 0, 1, 0, 0, 0, 80, 80, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0,128,236,177, 2, 0, 0, 0, 0, -255, 20, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 48, 74, 91, 2, 0, 0, 0, 0, -184, 0, 0, 0, 1, 0, 0, 0,160, 75, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 68, - 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,138, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 1, 0, 0, - 0, 0, 0, 0, 25, 0, 0, 0, 0,128,237, 68, 0, 0,200, 65, 0,128,237, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, 10, 0, 20, 1, 26, 0, 20, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 6, 0, 0,108, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 1, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,160, 75, 91, 2, 0, 0, 0, 0, -184, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 74, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 66, 76, 69, 78, 68, 69, 82, 95, +118, 50, 53, 48, 82, 69, 78, 68, 32, 0, 0, 0,208,245, 18, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, + 83, 99,101,110,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 76, 79, 66, 32, 0, 0, 0, +200,245, 18, 0,192, 0, 0, 0, 1, 0, 0, 0, 32, 32, 32, 51, 3, 0, 0, 0,250, 0, 0, 0, 1, 0, 0, 1, 72, 22, 11, 7, +160, 33, 10, 7, 0, 16, 0, 0,128, 32, 4, 0, 87, 77, 0, 0,140, 0, 0, 0,192, 75, 10, 7, 86, 1, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 77, 87,105,110, 77, 97,110, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160,254, 14, 7,160,147,103, 2,160,254, 14, 7, +160,254, 14, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,224,183,102, 2,216, 85, 5, 7, 68, 65, 84, 65,148, 0, 0, 0,160,254, 14, 7, 87, 1, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 99, 2, 1, 0, 0, 0, 0, 0, 0, 0, 72, 22, 11, 7, 0, 0, 0, 0,115, 99,114,101, +101,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 34, 0, +186, 4,254, 2, 0, 0, 0, 0, 1, 0,238, 3, 0, 0, 1, 0, 0, 0, 0, 0,232, 44, 99, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,144, 76, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0,208,229, 25, 7,176,202, 25, 7,152, 43, 99, 2, +184,231, 9, 7,200, 45, 5, 7, 56, 90, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0,140, 0, 0, 0, 72, 22, 11, 7, +186, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 83, 99,114,101,101,110, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,208, 79, 10, 7, +176,183, 3, 7,232,192, 3, 7, 96,201, 2, 7,120,255, 14, 7, 72,136, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0,160, 33, 10, 7, + 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 16,111, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0,208, 79, 10, 7, +187, 0, 0, 0, 1, 0, 0, 0,120, 63, 11, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 20, 0, 0, 0,120, 63, 11, 7,187, 0, 0, 0, 1, 0, 0, 0, 8, 11, 11, 7,208, 79, 10, 7, 0, 0, 0, 0, 0, 0,254, 2, + 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0, 8, 11, 11, 7,187, 0, 0, 0, 1, 0, 0, 0,200, 32, 4, 7,120, 63, 11, 7, + 0, 0, 0, 0,186, 4,254, 2, 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0,200, 32, 4, 7,187, 0, 0, 0, 1, 0, 0, 0, +232,251, 3, 7, 8, 11, 11, 7, 0, 0, 0, 0,186, 4, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0,232,251, 3, 7, +187, 0, 0, 0, 1, 0, 0, 0, 48, 16, 4, 7,200, 32, 4, 7, 0, 0, 0, 0, 0, 0,227, 2, 1, 0, 0, 0, 68, 65, 84, 65, + 20, 0, 0, 0, 48, 16, 4, 7,187, 0, 0, 0, 1, 0, 0, 0,216, 43, 4, 7,232,251, 3, 7, 0, 0, 0, 0,186, 4,227, 2, + 1, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0,216, 43, 4, 7,187, 0, 0, 0, 1, 0, 0, 0,160, 34, 4, 7, 48, 16, 4, 7, + 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0,160, 34, 4, 7,187, 0, 0, 0, 1, 0, 0, 0, + 88,147, 4, 7,216, 43, 4, 7, 0, 0, 0, 0,186, 4, 60, 0, 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0, 88,147, 4, 7, +187, 0, 0, 0, 1, 0, 0, 0,136,121, 4, 7,160, 34, 4, 7, 0, 0, 0, 0,216, 3, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 20, 0, 0, 0,136,121, 4, 7,187, 0, 0, 0, 1, 0, 0, 0,104, 25, 4, 7, 88,147, 4, 7, 0, 0, 0, 0,216, 3,227, 2, + 1, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0,104, 25, 4, 7,187, 0, 0, 0, 1, 0, 0, 0, 64,160, 4, 7,136,121, 4, 7, + 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0, 64,160, 4, 7,187, 0, 0, 0, 1, 0, 0, 0, + 32, 26, 15, 7,104, 25, 4, 7, 0, 0, 0, 0,216, 3, 72, 0, 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0, 32, 26, 15, 7, +187, 0, 0, 0, 1, 0, 0, 0,176,183, 3, 7, 64,160, 4, 7, 0, 0, 0, 0,216, 3, 72, 2, 0, 0, 0, 0, 68, 65, 84, 65, + 20, 0, 0, 0,176,183, 3, 7,187, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 32, 26, 15, 7, 0, 0, 0, 0,186, 4, 72, 2, + 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,232,192, 3, 7,188, 0, 0, 0, 1, 0, 0, 0, 24,226, 3, 7, 0, 0, 0, 0, + 8, 11, 11, 7,120, 63, 11, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0, 24,226, 3, 7,188, 0, 0, 0, + 1, 0, 0, 0, 88, 14, 4, 7,232,192, 3, 7,232,251, 3, 7,120, 63, 11, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 24, 0, 0, 0, 88, 14, 4, 7,188, 0, 0, 0, 1, 0, 0, 0, 0,180, 3, 7, 24,226, 3, 7, 48, 16, 4, 7, 8, 11, 11, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0, 0,180, 3, 7,188, 0, 0, 0, 1, 0, 0, 0,104,163, 3, 7, + 88, 14, 4, 7,232,251, 3, 7, 48, 16, 4, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,104,163, 3, 7, +188, 0, 0, 0, 1, 0, 0, 0,248,203, 3, 7, 0,180, 3, 7, 88,147, 4, 7,208, 79, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 24, 0, 0, 0,248,203, 3, 7,188, 0, 0, 0, 1, 0, 0, 0, 16,191, 3, 7,104,163, 3, 7,200, 32, 4, 7, + 88,147, 4, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0, 16,191, 3, 7,188, 0, 0, 0, 1, 0, 0, 0, +144, 23, 4, 7,248,203, 3, 7,232,251, 3, 7,136,121, 4, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0, +144, 23, 4, 7,188, 0, 0, 0, 1, 0, 0, 0, 0,118, 4, 7, 16,191, 3, 7, 48, 16, 4, 7,136,121, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0, 0,118, 4, 7,188, 0, 0, 0, 1, 0, 0, 0,144,109, 4, 7,144, 23, 4, 7, +104, 25, 4, 7,208, 79, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,144,109, 4, 7,188, 0, 0, 0, + 1, 0, 0, 0, 40,178, 3, 7, 0,118, 4, 7,232,251, 3, 7,104, 25, 4, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 24, 0, 0, 0, 40,178, 3, 7,188, 0, 0, 0, 1, 0, 0, 0,200,170, 3, 7,144,109, 4, 7,136,121, 4, 7, 64,160, 4, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,200,170, 3, 7,188, 0, 0, 0, 1, 0, 0, 0,176,242, 3, 7, + 40,178, 3, 7, 88,147, 4, 7, 64,160, 4, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,176,242, 3, 7, +188, 0, 0, 0, 1, 0, 0, 0, 56,248, 3, 7,200,170, 3, 7,104, 25, 4, 7, 64,160, 4, 7, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 24, 0, 0, 0, 56,248, 3, 7,188, 0, 0, 0, 1, 0, 0, 0, 80, 38, 4, 7,176,242, 3, 7, 88,147, 4, 7, + 32, 26, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0, 80, 38, 4, 7,188, 0, 0, 0, 1, 0, 0, 0, +232,133, 3, 7, 56,248, 3, 7,136,121, 4, 7, 32, 26, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0, +232,133, 3, 7,188, 0, 0, 0, 1, 0, 0, 0,160,210, 2, 7, 80, 38, 4, 7,176,183, 3, 7, 48, 16, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,160,210, 2, 7,188, 0, 0, 0, 1, 0, 0, 0, 96,201, 2, 7,232,133, 3, 7, +176,183, 3, 7,200, 32, 4, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0, 96,201, 2, 7,188, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0,160,210, 2, 7,176,183, 3, 7, 32, 26, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 96, 0, 0, 0,120,255, 14, 7,190, 0, 0, 0, 1, 0, 0, 0, 24, 23, 11, 7, 0, 0, 0, 0,232,251, 3, 7,120, 63, 11, 7, + 8, 11, 11, 7, 48, 16, 4, 7, 0, 0, 0, 0, 0, 0, 0, 0,186, 4, 0, 0,228, 2, 0, 0,254, 2, 0, 0, 7, 7,187, 4, + 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 56,150, 92, 2,152,180,102, 2,152,180,102, 2, 32,173, 11, 7,112,158, 24, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 40, 47, 5, 7, 8, 48, 5, 7, 68, 65, 84, 65,248, 0, 0, 0, 32,173, 11, 7,191, 0, 0, 0, + 1, 0, 0, 0,112,158, 24, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,157, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, + 0, 96,151, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,186, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,237, 68, + 0, 0,200, 65, 0,128,237, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, + 10, 0,187, 4, 26, 0,187, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,186, 4, 0, 0,228, 2, 0, 0,253, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +187, 4, 26, 0, 2, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,151, 92, 2,184,191, 25, 7, +184,191, 25, 7, 0, 0, 0, 0, 0, 0, 0, 0,216, 49, 5, 7, 96, 50, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, +248, 0, 0, 0,112,158, 24, 7,191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 32,173, 11, 7, 0, 0, 0, 0, 0, 32,240, 68, + 0, 0, 0,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,110, 69, 0, 0, 0,192, 0, 0, 0, 0,112, 7, 0, 0,129, 7, 0, 0, + 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, + 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, + 10, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 4, 6, 0,129, 7, 2, 0,112, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254, 2, 0, 0,254, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0,224,150, 92, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 96, 0, 0, 0, 24, 23, 11, 7,190, 0, 0, 0, 1, 0, 0, 0,200, 33, 11, 7, +120,255, 14, 7, 88,147, 4, 7, 32, 26, 15, 7,176,183, 3, 7,200, 32, 4, 7, 0, 0, 0, 0,217, 3, 0, 0,186, 4, 0, 0, + 0, 0, 0, 0, 71, 2, 0, 0, 4, 4,226, 0, 72, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,147, 92, 2,192,160, 9, 7, +120,148, 10, 7,128,237, 11, 7,184,238, 11, 7, 0, 0, 0, 0, 0, 0, 0, 0,232, 50, 5, 7,200, 51, 5, 7, 68, 65, 84, 65, +248, 0, 0, 0,128,237, 11, 7,191, 0, 0, 0, 1, 0, 0, 0,184,238, 11, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 67, + 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 98, 67, 0, 0, 0, 0, 0, 0,248, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,225, 0, 0, 0, + 0, 0, 0, 0, 30, 0, 0, 0, 0,128,137, 67, 0, 0,200, 65, 0,128,137, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, 10, 0,226, 0, 31, 0,226, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,217, 3, 0, 0,186, 4, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,226, 0, 31, 0, 3, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,152,149, 92, 2,160,145,246, 6,160,145,246, 6, 0, 0, 0, 0, 0, 0, 0, 0,152, 53, 5, 7,168, 54, 5, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,184,238, 11, 7,191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, +128,237, 11, 7, 0, 0, 0, 0, 0, 0, 80, 67, 0, 0, 68,196, 0, 0, 0, 0, 0, 0, 0, 0,254,255, 80, 67,255,191, 5,196, + 0, 0, 0, 0,209, 0, 0, 0,226, 0, 0, 0, 18, 0, 0, 0, 40, 2, 0, 0, 0, 0, 0, 0,208, 0, 0, 0, 0, 0, 0, 0, + 17, 0, 0, 0, 0, 0, 0, 0,208, 0, 0, 0, 18, 0, 0, 0, 40, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,226, 0, 41, 2,209, 0, + 23, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,176, 63,100, 2, 1, 0, 0, 0, 0, 0, 0, 0,217, 3, 0, 0,186, 4, 0, 0, + 31, 0, 0, 0, 71, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,226, 0, 41, 2, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,148, 92, 2, 88, 22, 6, 7, 16,102, 5, 7,248, 24, 11, 7, + 72,159, 9, 7,144, 56, 5, 7, 40, 58, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,248, 24, 11, 7, +189, 0, 0, 0, 1, 0, 0, 0,112, 26, 11, 7, 0, 0, 0, 0,200,148, 92, 2, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, + 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, + 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,111,110,116,101,120,116, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,255,208, 0, 36, 0, + 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 56, 1, 0, 0,112, 26, 11, 7,189, 0, 0, 0, 1, 0, 0, 0,232, 27, 11, 7,248, 24, 11, 7,232,164, 2, 7, + 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 82,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,135,255,208, 0, 61, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,232, 27, 11, 7,189, 0, 0, 0, 1, 0, 0, 0, + 96, 29, 11, 7,112, 26, 11, 7,192,166, 2, 7, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,108, 97,121,101,114,115, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,108, 97,121,101,114,115, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111,255,208, 0, 0, 0, 0, 0, 0, 0, 4, 0, 2, 0, + 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, + 96, 29, 11, 7,189, 0, 0, 0, 1, 0, 0, 0,216, 30, 11, 7,232, 27, 11, 7,152,168, 2, 7, 0, 0, 0, 0, 83, 67, 69, 78, + 69, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, + 69, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101, +110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,165,254, +208, 0,178, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 6, 0, 0,108, 7, 0, 0, 26, 0, 0, 0, 80, 4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 1, 55, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,216, 30, 11, 7,189, 0, 0, 0, 1, 0, 0, 0, 80, 32, 11, 7, 96, 29, 11, 7, +112,170, 2, 7, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 16, 77, 91, 2, 0, 0, 0, 0, 68, 65, 84, 65,248, 2, 0, 0, 16, 77, 91, 2, 0, 0, 0, 0, -146, 0, 0, 0, 1, 0, 0, 0,103,212,136, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, 0, 0, 0,128, 0, 0, 0,128, -226,215,163,188, 0, 0, 0,128, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 32,193, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 32, 65, 0, 0,128, 63,103,212,136, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0, -184,175, 31, 65, 0, 0, 32, 65,237,122,111, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,161, 14,106, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,209,252,249,195,115,253, 71,194, 0, 0, 0, 0, 0, 0, 0, 0, - 98,127,249, 67,129,255, 71, 66, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 32,193, 0, 0,128, 63,103,212,136, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0, -184,175, 31, 65, 0, 0, 32, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 65,110,116,105, 45, 65,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,100, 32,222, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,254,208, 0, 58, 0, 20, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 80, 32, 11, 7,189, 0, 0, 0, + 1, 0, 0, 0,104,153, 9, 7,216, 30, 11, 7, 72,172, 2, 7, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,115,104, 97, +100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,115,104, 97, +100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,213,253,208, 0,102, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 56, 1, 0, 0,104,153, 9, 7,189, 0, 0, 0, 1, 0, 0, 0,224,154, 9, 7, 80, 32, 11, 7, 32,174, 2, 7, 0, 0, 0, 0, + 83, 67, 69, 78, 69, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 32, 1, 0, 0, 80, 80, 91, 2, 0, 0, 0, 0,147, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -240, 72, 91, 2, 0, 0, 0, 0, 48, 74, 91, 2, 0, 0, 0, 0,160, 75, 91, 2, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 32, 65, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0, 64,153, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 12, 66, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 10,215, 35, 60, 0, 0,250, 67, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 10, 0, -159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, -176, 81, 91, 2, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0, 0, 94, 91, 2, 0, 0, 0, 0,192,251, 90, 2, 0, 0, 0, 0, -224,234, 90, 2, 0, 0, 0, 0,160,238, 90, 2, 0, 0, 0, 0, 0,239, 90, 2, 0, 0, 0, 0,224,237, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 6, 0, 0, 0, 0, 0, 0, 99, 0, 0, 0, 15, 15, 12, 6,100, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0,240,118, 76, 2, 0, 0, 0, 0,112, 85, 91, 2, 0, 0, 0, 0,160, 92, 91, 2, 0, 0, 0, 0, -144, 82, 91, 2, 0, 0, 0, 0, 0, 84, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -192,174,118, 2, 0, 0, 0, 0,176,185,118, 2, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,144, 82, 91, 2, 0, 0, 0, 0, -184, 0, 0, 0, 1, 0, 0, 0, 0, 84, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,104, 68, - 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,128,193, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 6, 0, 0, - 0, 0, 0, 0, 25, 0, 0, 0, 0,224,202, 68, 0, 0,200, 65, 0,224,202, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, 10, 0, 12, 6, 26, 0, 12, 6, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 6, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 6, 26, 0, 5, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,208,120, 76, 2, 0, 0, 0, 0,208,218,179, 2, 0, 0, 0, 0,208,218,179, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160,155,100, 2, 0, 0, 0, 0, 96,156,100, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 0, 84, 91, 2, 0, 0, 0, 0, -184, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,144, 82, 91, 2, 0, 0, 0, 0, 0, 0, 64,192, 0, 0,126, 67, - 0, 0, 0, 0, 0, 0, 72, 66,112,189, 17,192,246, 70,125, 67, 0, 0, 0, 0, 0, 0, 72, 66, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 6, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 11, 6, 0, 0, - 18, 0, 0, 0, 73, 0, 0, 0, 0, 0,128, 63, 0, 0, 72, 66, 0,124,146, 72, 0, 0, 72, 66,205,204,204, 61, 0, 0, 32, 65, - 72, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 4, 8, 0, 12, 6, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 6, 0, 0, 26, 0, 0, 0, 99, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 6, 74, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,224,119, 76, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,144,158,100, 2, 0, 0, 0, 0,160,163,100, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,200, 0, 0, 0,112, 85, 91, 2, 0, 0, 0, 0, -162, 0, 0, 0, 1, 0, 0, 0,160, 92, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,128, 86, 91, 2, 0, 0, 0, 0, -184, 0, 0, 0, 1, 0, 0, 0,240, 87, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 68, - 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,203, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 6, 0, 0, - 0, 0, 0, 0, 25, 0, 0, 0, 0,128,237, 68, 0, 0,200, 65, 0,128,237, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, 10, 0, 88, 6, 26, 0, 88, 6, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 6, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 6, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, + 83, 67, 69, 78, 69, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 79,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,240, 87, 91, 2, 0, 0, 0, 0, -184, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 86, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 84,253,208, 0,105, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,224,154, 9, 7,189, 0, 0, 0, 1, 0, 0, 0, 88,156, 9, 7, +104,153, 9, 7,208,177, 2, 7, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 6, 0, 0, 26, 0, 0, 0, 55, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 6, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60,253,208, 0, 0, 0, 0, 0, 0, 0, 4, 0, 2, 0, 0, 0, 0, 0, + 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 96, 89, 91, 2, 0, 0, 0, 0, 68, 65, 84, 65,248, 2, 0, 0, 96, 89, 91, 2, 0, 0, 0, 0, -146, 0, 0, 0, 1, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87,213,108, 66, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, 0, 0, 0,128, 0, 0, 0,128, -226,215,163,188, 0, 0, 0,128, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 32,193, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 32, 65, 0, 0,128, 63, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87,213,108, 66, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0, -184,175, 31, 65, 0, 0, 32, 65,161, 14,106, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,224, 91,138, 60, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,209,252,249,195,115,253, 71,194, 0, 0, 0, 0, 0, 0, 0, 0, - 98,127,249, 67,129,255, 71, 66, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 32,193, 0, 0,128, 63, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87,213,108, 66, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0, -184,175, 31, 65, 0, 0, 32, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 88,156, 9, 7, +189, 0, 0, 0, 1, 0, 0, 0,208,157, 9, 7,224,154, 9, 7,168,179, 2, 7, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, + 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, + 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,111,115,116, 32, 80,114,111, + 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36,253,208, 0, 0, 0, + 0, 0, 0, 0, 4, 0, 2, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 52,149,147, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 56, 1, 0, 0,208,157, 9, 7,189, 0, 0, 0, 1, 0, 0, 0, 72,159, 9, 7, 88,156, 9, 7,128,181, 2, 7, + 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 12,253,208, 0, 0, 0, 20, 0, 0, 0, 4, 0, 2, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 32, 1, 0, 0,160, 92, 91, 2, 0, 0, 0, 0,147, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -112, 85, 91, 2, 0, 0, 0, 0,128, 86, 91, 2, 0, 0, 0, 0,240, 87, 91, 2, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 32, 65, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0, 64,153, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 12, 66, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 10,215, 35, 60, 0, 0,250, 67, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 10, 0, -159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, - 0, 94, 91, 2, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0,160,111, 91, 2, 0, 0, 0, 0,176, 81, 91, 2, 0, 0, 0, 0, -160,238, 90, 2, 0, 0, 0, 0, 96,236, 90, 2, 0, 0, 0, 0, 64,238, 90, 2, 0, 0, 0, 0, 0,239, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 6, 0, 0,101, 0, 0, 0, 69, 4, 0, 0, 1, 1, 12, 6,225, 3, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0,192,121, 76, 2, 0, 0, 0, 0, 64,110, 91, 2, 0, 0, 0, 0, 64,110, 91, 2, 0, 0, 0, 0, -224, 94, 91, 2, 0, 0, 0, 0,144,105, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 48,188,118, 2, 0, 0, 0, 0,224,204,118, 2, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,224, 94, 91, 2, 0, 0, 0, 0, -184, 0, 0, 0, 1, 0, 0, 0, 80, 96, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 66, - 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,128,193, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 6, 0, 0, - 0, 0, 0, 0, 25, 0, 0, 0, 0,128,237, 68, 0, 0,200, 65, 0,128,237, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, 10, 0, 12, 6, 26, 0, 12, 6, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 6, 0, 0,101, 0, 0, 0,126, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 6, 26, 0, 7, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,112,130, 76, 2, 0, 0, 0, 0,128, 47,182, 2, 0, 0, 0, 0,128, 47,182, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,208,167,100, 2, 0, 0, 0, 0,192,170,100, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 80, 96, 91, 2, 0, 0, 0, 0, -184, 0, 0, 0, 1, 0, 0, 0,144,105, 91, 2, 0, 0, 0, 0,224, 94, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 67, - 0, 64, 55,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 67, 0, 0, 41,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,219, 0, 0, 0, - 0, 0, 0, 0,163, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, - 0, 0, 0, 0, 1, 0, 3, 0, 2, 0, 0, 0, 6, 0,220, 0,164, 2,220, 0,164, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 6, 0, 0, 11, 6, 0, 0,127, 0, 0, 0, 69, 4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0,160,123, 76, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -192, 97, 91, 2, 0, 0, 0, 0, 0,104, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,144,105, 91, 2, 0, 0, 0, 0, -184, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 96, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 6, 0, 0,127, 0, 0, 0, 69, 4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 6,199, 3, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,176,122, 76, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,172,100, 2, 0, 0, 0, 0, 96,186,100, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0,107, 91, 2, 0, 0, 0, 0, 68, 65, 84, 65,248, 2, 0, 0, 0,107, 91, 2, 0, 0, 0, 0, -146, 0, 0, 0, 1, 0, 0, 0, 1, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,167, 29,224, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0, -225,215,163,188, 0, 0, 0, 0,238, 4, 53, 63,186,103, 59,190,247,217, 46, 63, 0, 0, 0, 0,255, 4, 53, 63,126,103, 59, 62, -244,217, 46,191, 0, 0, 0, 0,228, 3, 52, 50,248, 70,119, 63,217,131,132, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -152, 60,138,193, 0, 0,128, 63,236, 4, 53, 63,244, 4, 53, 63, 0, 0, 24, 53, 0, 0, 0, 0,137,103, 59,190,118,103, 59, 62, -227, 70,119, 63, 0, 0, 0, 0,238,217, 46, 63,221,217, 46,191,213,131,132, 62, 0, 0, 0, 0,186,213, 60, 65,168,213, 60,193, -221, 28,143, 64, 0, 0,128, 63,102,253, 69, 63,120, 16,164,190,194,219, 46,191,247,217, 46,191,120,253, 69, 63, 67, 16,164, 62, -191,219, 46, 63,244,217, 46, 63, 67,228, 68, 50,189,122,216, 63, 53,133,132,190,217,131,132,190, 0, 0, 0, 0, 0, 0, 0, 0, - 13, 21,138, 65,152, 60,138, 65, 15,132, 37, 63,166,125, 37, 63, 0, 96,160, 55, 0,128,139, 54, 97, 17,214,189, 77, 17,214, 61, - 92, 58, 13, 63, 0, 0,184,179,168,135, 19,196,155,135, 19, 68, 34,158, 95,195,235, 0, 72,194,116, 93, 19, 68,103, 93, 19,196, - 42, 94, 95, 67,248, 2, 72, 66,238, 4, 53, 63,186,103, 59,190,247,217, 46, 63, 0, 0, 0, 0,255, 4, 53, 63,126,103, 59, 62, -244,217, 46,191, 0, 0, 0, 0,228, 3, 52, 50,248, 70,119, 63,217,131,132, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -152, 60,138,193, 0, 0,128, 63,102,253, 69, 63,120, 16,164,190,194,219, 46,191,247,217, 46,191,120,253, 69, 63, 67, 16,164, 62, -191,219, 46, 63,244,217, 46, 63, 67,228, 68, 50,189,122,216, 63, 53,133,132,190,217,131,132,190, 0, 0, 0, 0, 0, 0, 0, 0, - 13, 21,138, 65,152, 60,138, 65, 55,243,195, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55,243,195, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55,243,195, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,128, 63,122,163, 59, 63,235,250, 15,191,221,141,110,190,230,113,155,190,152, 60,138, 65, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 21,212,154, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 72,159, 9, 7,189, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0,208,157, 9, 7, 88,183, 2, 7, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,117,110,105,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,117,110,105,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85,110,105,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,244,252,208, 0, 0, 0, 0, 0, 0, 0, 4, 0, 3, 0, + 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 32, 1, 0, 0, 64,110, 91, 2, 0, 0, 0, 0,147, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 32, 65, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0, 64,153, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 12, 66, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 10,215, 35, 60, 0, 0,250, 67, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 10, 0, -159, 0, 0, 0, 0, 0, 0, 0, 3, 0,255,255, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, -160,111, 91, 2, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 91, 2, 0, 0, 0, 0, - 96,239, 90, 2, 0, 0, 0, 0, 64,238, 90, 2, 0, 0, 0, 0,192,236, 90, 2, 0, 0, 0, 0,192,239, 90, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 13, 6, 0, 0,118, 7, 0, 0, 81, 3, 0, 0, 69, 4, 0, 0, 3, 3,106, 1,245, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 32,116, 76, 2, 0, 0, 0, 0, 96,115, 91, 2, 0, 0, 0, 0,112,128, 91, 2, 0, 0, 0, 0, -128,112, 91, 2, 0, 0, 0, 0,240,113, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 96,207,118, 2, 0, 0, 0, 0,144, 82,119, 2, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,128,112, 91, 2, 0, 0, 0, 0, -184, 0, 0, 0, 1, 0, 0, 0,240,113, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,190, 67, - 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,181, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,105, 1, 0, 0, - 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 66, 67, 0, 0,200, 65, 0, 0, 66, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, 10, 0,106, 1, 26, 0,106, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 6, 0, 0,118, 7, 0, 0, 81, 3, 0, 0,106, 3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,106, 1, 26, 0, 9, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0,118, 76, 2, 0, 0, 0, 0,128, 5,182, 2, 0, 0, 0, 0,128, 5,182, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,190,100, 2, 0, 0, 0, 0,208,190,100, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,240,113, 91, 2, 0, 0, 0, 0, -184, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,131, 67, - 0, 0,194,194, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,172, 67, 0, 0, 73,195, 0, 0, 0, 0, 89, 1, 0, 0,106, 1, 0, 0, - 18, 0, 0, 0,218, 0, 0, 0, 0, 0, 0, 0, 88, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 88, 1, 0, 0, - 18, 0, 0, 0,218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 18, 0, 0, 0, 2, 0, 3, 3, 0, 0, 0, 4, 6, 0,106, 1,219, 0, 89, 1,201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 6, 0, 0,118, 7, 0, 0,107, 3, 0, 0, 69, 4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,106, 1,219, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 16,117, 76, 2, 0, 0, 0, 0,192, 43,182, 2, 0, 0, 0, 0,192, 43,182, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193,100, 2, 0, 0, 0, 0, 48,195,100, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 96,115, 91, 2, 0, 0, 0, 0, -156, 0, 0, 0, 1, 0, 0, 0, 16,121, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,224, 8,182, 2, 0, 0, 0, 0, -224, 8,182, 2, 0, 0, 0, 0,208,116, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65, 16, 0, 0, 0,208,116, 91, 2, 0, 0, 0, 0, -207, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 32,117, 91, 2, 0, 0, 0, 0, 68, 65, 84, 65,208, 0, 0, 0, - 32,117, 91, 2, 0, 0, 0, 0,206, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 96,130, 91, 2, 0, 0, 0, 0, - 19, 0, 0, 0, 1, 0, 1, 0, 96,130, 91, 2, 0, 0, 0, 0, 20, 0, 0, 0, 1, 0, 1, 0, 96,130, 91, 2, 0, 0, 0, 0, - 21, 0, 1, 0, 1, 0, 1, 0, 96,130, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 48,145, 91, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 1, 0,176,157, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,128,173, 91, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 1, 0,128,167, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,224,171, 91, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 1, 0, 16,163, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,176,140, 91, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 1, 0, 64,153, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,208,139, 91, 2, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 1, 0, 0, 48,118, 91, 2, 0, 0, 0, 0,184, 0, 0, 0, 1, 0, 0, 0,160,119, 91, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 55, 0, 0, 67, 67, - 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,137, 67, 0, 0,200, 65, - 0,128,137, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, 10, 0,195, 0, - 26, 0,195, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 53, 4, 0, 0,247, 4, 0, 0, 69, 2, 0, 0, 94, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -195, 0, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,224, 0, 0, 0, +192,160, 9, 7,158, 0, 0, 0, 1, 0, 0, 0,120,148, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 1, 0, 0,160,119, 91, 2, 0, 0, 0, 0,184, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 48,118, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,150, 67, 0,192,116,196, 0, 0, 0, 0, 0, 0, 0, 0,205, 85,150, 67, -223,204, 35,196, 26, 85,207,195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194, 0, 0, 0, 0, 0, 0, 0,155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 0, 0, 0, 0, 1, 0, 3, 0, 2, 0, 0, 4, 6, 0,195, 0, -156, 0,195, 0,156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 53, 4, 0, 0,247, 4, 0, 0, 95, 2, 0, 0,250, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -195, 0,156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 0, 1, 0, 0, 16,121, 91, 2, 0, 0, 0, 0,152, 0, 0, 0, 1, 0, 0, 0,112,128, 91, 2, 0, 0, 0, 0, - 96,115, 91, 2, 0, 0, 0, 0, 48,118, 91, 2, 0, 0, 0, 0,160,119, 91, 2, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 80,175, 11, 7, +255, 20, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,224,161, 9, 7,191, 0, 0, 0, 1, 0, 0, 0, + 40,144, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,138, 67, + 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,237, 68, 0, 0,200, 65, + 0,128,237, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, 10, 0, 20, 1, + 26, 0, 20, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 6, 0, 0, +108, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 1, 26, 0, + 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0, + 40,144, 10, 7,191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,224,161, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, - 80,122, 91, 2, 0, 0, 0, 0,184, 0, 0, 0, 1, 0, 0, 0,192,123, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 69, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,138, 67, 0, 0, 0, 0, 0, 0,208, 65, + 0, 0, 0, 0, 0, 0, 0, 0, 89, 6, 0, 0,108, 7, 0, 0, 26, 0, 0, 0, 80, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 20, 1, 55, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,237, 68, 0, 0,200, 65, 0,128,237, 68, 0, 0,200, 65, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, 10, 0, 20, 1, 26, 0, 20, 1, 26, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 6, 0, 0,108, 7, 0, 0, - 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 1, 26, 0, 0, 0, 1, 0, + 96,145, 10, 7, 68, 65, 84, 65,216, 2, 0, 0, 96,145, 10, 7,152, 0, 0, 0, 1, 0, 0, 0,103,212,136, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 80, 1,128,191, 0, 0,128,191, 0, 0, 0,128, 0, 0, 0,128,226,215,163,188, 0, 0, 0,128, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,193, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, 0, 0,128, 63,103,212,136, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 80, 1,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0,184,175, 31, 65, 0, 0, 32, 65,237,122,111, 62, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,161, 14,106, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +209,252,249,195,115,253, 71,194, 0, 0, 0, 0, 0, 0, 0, 0, 98,127,249, 67,129,255, 71, 66, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,193, 0, 0,128, 63,103,212,136, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 80, 1,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0,184,175, 31, 65, 0, 0, 32, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100, 32,222, 58, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,240, 0, 0, 0,120,148, 10, 7,153, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0,192,160, 9, 7,224,161, 9, 7, 40,144, 10, 7, 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, + 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0, 56,192, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 12, 66, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 10,215, 35, 60, 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 10, 0,159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 96, 0, 0, 0,200, 33, 11, 7, +190, 0, 0, 0, 1, 0, 0, 0, 48,124, 9, 7, 24, 23, 11, 7,208, 79, 10, 7,104, 25, 4, 7, 64,160, 4, 7, 88,147, 4, 7, + 0, 0, 0, 0, 0, 0, 0, 0,215, 3, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0, 15, 15,216, 3, 72, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0,123, 92, 2, 24,152, 10, 7, 0,123, 9, 7,168,149, 10, 7,224,150, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, +176, 58, 5, 7,144, 59, 5, 7, 68, 65, 84, 65,248, 0, 0, 0,168,149, 10, 7,191, 0, 0, 0, 1, 0, 0, 0,224,150, 10, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,128, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 56, 0, 0,118, 68, 0, 0, 0, 0, + 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,215, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,224,202, 68, 0, 0,200, 65, 0,224,202, 68, + 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, 10, 0,216, 3, 26, 0,216, 3, + 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,215, 3, 0, 0, + 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 3, 26, 0, 5, 0, 1, 0, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,124, 92, 2,248, 23, 6, 7,248, 23, 6, 7, 0, 0, 0, 0, + 0, 0, 0, 0, 96, 61, 5, 7,112, 62, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,224,150, 10, 7, +191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,168,149, 10, 7, 0, 0, 64,192, 0, 0,126, 67, 0, 0, 0, 0, 0, 0, 72, 66, +112,189, 17,192,246, 70,125, 67, 0, 0, 0, 0, 0, 0, 72, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,215, 3, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,215, 3, 0, 0, 18, 0, 0, 0, 45, 0, 0, 0, + 0, 0,128, 63, 0, 0, 72, 66, 0,124,146, 72, 0, 0, 72, 66,205,204,204, 61, 0, 0, 32, 65, 72, 0, 0, 0, 0, 0, 0, 2, + 4, 0, 0, 4, 8, 0,216, 3, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,215, 3, 0, 0, 26, 0, 0, 0, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,216, 3, 46, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,123, 92, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 64, 5, 7,120, 66, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65,180, 0, 0, 0, 24,152, 10, 7,168, 0, 0, 0, 1, 0, 0, 0, 0,123, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 6, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0, 16,153, 10, 7,191, 0, 0, 0, 1, 0, 0, 0,176,118, 9, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,203, 68, 0, 0, 0, 0, + 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 87, 6, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,237, 68, 0, 0,200, 65, 0,128,237, 68, + 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, 10, 0, 88, 6, 26, 0, 88, 6, + 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 6, 0, 0, + 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 6, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, -192,123, 91, 2, 0, 0, 0, 0,184, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,122, 91, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 6, 0, 0,108, 7, 0, 0, - 26, 0, 0, 0, 80, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 1, 55, 4, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,176,118, 9, 7, +191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 16,153, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,125, 91, 2, 0, 0, 0, 0, 68, 65, 84, 65,248, 2, 0, 0, - 48,125, 91, 2, 0, 0, 0, 0,146, 0, 0, 0, 1, 0, 0, 0,103,212,136, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, - 0, 0, 0,128, 0, 0, 0,128,226,215,163,188, 0, 0, 0,128, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,193, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, 0, 0,128, 63,103,212,136, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, - 0, 0, 0, 0, 0, 0, 0, 0,184,175, 31, 65, 0, 0, 32, 65,237,122,111, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,161, 14,106, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,209,252,249,195,115,253, 71,194, - 0, 0, 0, 0, 0, 0, 0, 0, 98,127,249, 67,129,255, 71, 66, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,193, 0, 0,128, 63,103,212,136, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, - 0, 0, 0, 0, 0, 0, 0, 0,184,175, 31, 65, 0, 0, 32, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 32, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100, 32,222, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 87, 6, 0, 0, 26, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 88, 6, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,119, 9, 7, + 68, 65, 84, 65,216, 2, 0, 0,232,119, 9, 7,152, 0, 0, 0, 1, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 87,213,108, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, + 0, 0,128,191, 0, 0, 0,128, 0, 0, 0,128,226,215,163,188, 0, 0, 0,128, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,193, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, 0, 0,128, 63, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 87,213,108, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, + 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0,184,175, 31, 65, 0, 0, 32, 65,161, 14,106, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,224, 91,138, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,209,252,249,195, +115,253, 71,194, 0, 0, 0, 0, 0, 0, 0, 0, 98,127,249, 67,129,255, 71, 66, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,193, 0, 0,128, 63, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 87,213,108, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, + 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0,184,175, 31, 65, 0, 0, 32, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 32, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52,149,147, 58, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 1, 0, 0,112,128, 91, 2, 0, 0, 0, 0,147, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 16,121, 91, 2, 0, 0, 0, 0, 80,122, 91, 2, 0, 0, 0, 0,192,123, 91, 2, 0, 0, 0, 0, - 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0, 64,153, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,240, 0, 0, 0, 0,123, 9, 7,153, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 24,152, 10, 7, 16,153, 10, 7,176,118, 9, 7, 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, 0, 0, 0, 0, + 1, 0, 0, 0, 1, 0, 7, 0, 56,192, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 12, 66, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 10,215, 35, 60, 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 10, 0,159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 96, 0, 0, 0, 48,124, 9, 7,190, 0, 0, 0, + 1, 0, 0, 0, 72,136, 9, 7,200, 33, 11, 7,104, 25, 4, 7,232,251, 3, 7,136,121, 4, 7, 64,160, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 0,215, 3, 0, 0, 73, 0, 0, 0,226, 2, 0, 0, 1, 1,216, 3,154, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, +232,124, 92, 2, 24,135, 9, 7, 24,135, 9, 7,208,124, 9, 7,160,229, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 5, 7, + 48, 69, 5, 7, 68, 65, 84, 65,248, 0, 0, 0,208,124, 9, 7,191, 0, 0, 0, 1, 0, 0, 0, 8,126, 9, 7, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 64, 90, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,118, 68, 0, 0, 0, 0, 0, 0,208, 65, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,215, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,237, 68, 0, 0,200, 65, 0,128,237, 68, 0, 0,200, 65, + 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, 10, 0,216, 3, 26, 0,216, 3, 26, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,215, 3, 0, 0, 73, 0, 0, 0, + 98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 3, 26, 0, 7, 0, 1, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,132, 92, 2, 32, 77,104, 2, 32, 77,104, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 71, 5, 7,152, 72, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0, 8,126, 9, 7,191, 0, 0, 0, + 1, 0, 0, 0, 48,130, 9, 7,208,124, 9, 7, 0, 0, 0, 0, 0, 0, 15, 67, 0, 0,251,195, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 15, 67, 0, 0,251,195, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0, 7, 2, 0, 0, 0, 0, 0, 0, +142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0, 7, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, + 6, 0,160, 0, 8, 2,143, 0,246, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,159, 0, 0, 0,219, 0, 0, 0,226, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +160, 0, 8, 2, 8, 0, 5, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,129, 92, 2, 72,117,101, 2, +136, 52,102, 2, 64,127, 9, 7,184,128, 9, 7,128, 74, 5, 7, 24, 76, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 56, 1, 0, 0, 64,127, 9, 7,189, 0, 0, 0, 1, 0, 0, 0,184,128, 9, 7, 0, 0, 0, 0,224,129, 92, 2, 0, 0, 0, 0, + 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108, 95,115,104,101,108,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108, 95,115,104,101,108,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 84,111,111,108, 32, 83,104,101,108,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,196,255,143, 0, 36, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,184,128, 9, 7,189, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 64,127, 9, 7, 80,129, 4, 7, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,111, 98,106,101, + 99,116,109,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,111, 98,106,101, + 99,116,109,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 98,106,101, 99,116, 32, 84,111,111,108,115, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27,254,143, 0,145, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 83, 67, 0, 0,192, 5, 0, 0, 96,130, 91, 2, 0, 0, 0, 0,144, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 83, 99,101,110,101, 0, -116, 97,103,101, 0, 97,105,110, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 64,153, 91, 2, 0, 0, 0, 0, 48,145, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 96,136, 91, 2, 0, 0, 0, 0, 64,137, 91, 2, 0, 0, 0, 0, 96,136, 91, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,176,137, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0, 48,130, 9, 7, +191, 0, 0, 0, 1, 0, 0, 0,152,219, 10, 7, 8,126, 9, 7, 0, 0, 0, 0, 0, 0, 16, 67, 0, 0,206,194, 0, 0, 0, 0, + 0, 0, 0, 0,231,102, 16, 67, 0, 0,206,194, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, + 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, + 18, 0, 0, 4, 6, 0,160, 0,120, 0,143, 0,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,159, 0, 0, 0, 99, 0, 0, 0,218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,160, 0,120, 0, 9, 0, 6, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,176,130, 92, 2, +120, 73, 25, 7,120, 73, 25, 7, 32,218, 10, 7, 32,218, 10, 7, 0, 78, 5, 7,152, 79, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 56, 1, 0, 0, 32,218, 10, 7,189, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,131, 92, 2, + 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,108, 97,115,116, 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68,172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, -250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 2,224, 1, 60, 0, 32, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 6, 0, 25, 0,141, 0,128, 7, 56, 4, 8, 0, 8, 0, 0, 0, 24, 0, 17, 0, 0, 0, 0, 0, 90, 0, 0, 0, - 0, 0, 0, 0, 81, 0, 0, 0, 23, 0, 33, 0, 0, 0,128, 0, 0, 0, 8, 0, 24, 0, 10, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 48,139, 91, 2, 0, 0, 0, 0, 48,139, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 66, - 0, 0,200, 66, 0, 0,128, 63, 0, 0,128, 63, 1, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 5, 0, 2, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,108, 97,115,116, 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 79,112,101,114, 97,116,111,114, 0,105,116,109,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,216,255,144, 0, 16, 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 98, 97, 99,107, 98,117, -102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,152,219, 10, 7,191, 0, 0, 0, 1, 0, 0, 0, +160,229, 10, 7, 48,130, 9, 7, 0, 0, 0, 0, 0, 0, 75, 67, 0,128,118,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 67, + 0,128, 27,196, 0, 0, 0, 0,203, 0, 0, 0,220, 0, 0, 0, 18, 0, 0, 0,127, 2, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 18, 0, 0, 0,127, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,220, 0, +128, 2,203, 0,110, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,215, 3, 0, 0, +215, 3, 0, 0, 99, 0, 0, 0,226, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, + 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 48,126, 92, 2, 0, 0, 0, 0, 0, 0, 0, 0, +208,220, 10, 7, 40,228, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, +208,220, 10, 7,189, 0, 0, 0, 1, 0, 0, 0, 72,222, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, + 51, 68, 95, 80, 84, 95,111, 98,106,101, 99,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, + 51, 68, 95, 80, 84, 95,111, 98,106,101, 99,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84,114, 97,110, +115,102,111,114,109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26,255, +203, 0,206, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 72,222, 10, 7,189, 0, 0, 0, 1, 0, 0, 0,192,223, 10, 7,208,220, 10, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,103,112,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,103,112,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 71,114,101, 97,115,101, 32, 80,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,254,203, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,192,223, 10, 7,189, 0, 0, 0, + 1, 0, 0, 0, 56,225, 10, 7, 72,222, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95, 51,100, +118,105,101,119, 95,112,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95, 51,100, +118,105,101,119, 95,112,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86,105,101,119, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,129,253,203, 0, 47, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 56, 1, 0, 0, 56,225, 10, 7,189, 0, 0, 0, 1, 0, 0, 0,176,226, 10, 7,192,223, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, + 86, 73, 69, 87, 51, 68, 95, 80, 84, 95, 51,100,118,105,101,119, 95,100,105,115,112,108, 97,121, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 86, 73, 69, 87, 51, 68, 95, 80, 84, 95, 51,100,118,105,101,119, 95,100,105,115,112,108, 97,121, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68,105,115,112,108, 97,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 66,252,203, 0, 39, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,176,226, 10, 7,189, 0, 0, 0, 1, 0, 0, 0, 40,228, 10, 7, + 56,225, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95, 51,100,118,105,101,119, 95,109,101,115, +104,100,105,115,112,108, 97,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95, 51,100,118,105,101,119, 95,109,101,115, +104,100,105,115,112,108, 97,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77,101,115,104, 32, 68,105,115,112,108, 97,121, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,250,203, 0,104, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 40,228, 10, 7, +189, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,176,226, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, + 84, 95, 98, 97, 99,107,103,114,111,117,110,100, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, + 84, 95, 98, 97, 99,107,103,114,111,117,110,100, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 97, 99,107,103,114,111,117, +110,100, 32, 73,109, 97,103,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42,252,203, 0, 0, 0, + 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65,248, 0, 0, 0,160,229, 10, 7,191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,152,219, 10, 7, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,215, 3, 0, 0, 99, 0, 0, 0,226, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 3,128, 2, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,144,125, 92, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 81, 5, 7, + 40, 84, 5, 7, 0, 0, 0, 0, 0,132, 9, 7, 68, 65, 84, 65,216, 2, 0, 0, 0,132, 9, 7,152, 0, 0, 0, 1, 0, 0, 0, + 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 64,215, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 28, 13,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0, 74,215, 76,190, 0, 0, 0, 0, +238, 4, 53, 63,186,103, 59,190,247,217, 46, 63, 0, 0, 0, 0,255, 4, 53, 63,126,103, 59, 62,244,217, 46,191, 0, 0, 0, 0, +228, 3, 52, 50,248, 70,119, 63,217,131,132, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 60,138,193, 0, 0,128, 63, +236, 4, 53, 63,244, 4, 53, 63, 0, 0, 24, 53, 0, 0, 0, 0,137,103, 59,190,118,103, 59, 62,227, 70,119, 63, 0, 0, 0, 0, +238,217, 46, 63,221,217, 46,191,213,131,132, 62, 0, 0, 0, 0,186,213, 60, 65,168,213, 60,193,221, 28,143, 64, 0, 0,128, 63, +100,253, 69, 63,248,146,157,190,223,235, 46,191,247,217, 46,191,119,253, 69, 63,197,146,157, 62,220,235, 46, 63,244,217, 46, 63, + 65,228, 68, 50,109,234,207, 63,107,145,132,190,217,131,132,190, 0, 0, 0, 0, 0, 0, 0, 0, 18,177,136, 65,152, 60,138, 65, +252,128, 37, 63,186,128, 37, 63, 0, 0,180, 53, 0, 0, 60, 52,154,225,222,189,131,225,222, 61,139, 11, 19, 63, 0, 0,144, 51, + 25,255,107,194, 1,255,107, 66,239,218,178,193,208,247,159,192,220, 91,105, 66,197, 91,105,194, 49,219,176, 65, 50, 8,160, 64, +238, 4, 53, 63,186,103, 59,190,247,217, 46, 63, 0, 0, 0, 0,255, 4, 53, 63,126,103, 59, 62,244,217, 46,191, 0, 0, 0, 0, +228, 3, 52, 50,248, 70,119, 63,217,131,132, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 60,138,193, 0, 0,128, 63, +100,253, 69, 63,248,146,157,190,223,235, 46,191,247,217, 46,191,119,253, 69, 63,197,146,157, 62,220,235, 46, 63,244,217, 46, 63, + 65,228, 68, 50,109,234,207, 63,107,145,132,190,217,131,132,190, 0, 0, 0, 0, 0, 0, 0, 0, 18,177,136, 65,152, 60,138, 65, +166, 33, 26, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,166, 33, 26, 64, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,166, 33, 26, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, +122,163, 59, 63,235,250, 15,191,221,141,110,190,230,113,155,190,152, 60,138, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 83,146,243, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,240, 0, 0, 0, + 24,135, 9, 7,153, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 32, 65, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0, 56,192, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 12, 66, + 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,205,204,204, 61, 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0,255,255, + 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 96, 0, 0, 0, 72,136, 9, 7,190, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 48,124, 9, 7, 32, 26, 15, 7,136,121, 4, 7, + 48, 16, 4, 7,176,183, 3, 7, 0, 0, 0, 0,217, 3, 0, 0,186, 4, 0, 0, 73, 2, 0, 0,226, 2, 0, 0, 3, 3,226, 0, +154, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,121, 92, 2, 88,139, 9, 7, 24,238, 10, 7,232,136, 9, 7, 32,138, 9, 7, + 0, 0, 0, 0, 0, 0, 0, 0,120, 86, 5, 7, 88, 87, 5, 7, 68, 65, 84, 65,248, 0, 0, 0,232,136, 9, 7,191, 0, 0, 0, + 1, 0, 0, 0, 32,138, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,190, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, + 0, 0, 98, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,225, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 66, 67, + 0, 0,200, 65, 0, 0, 66, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, + 10, 0,226, 0, 26, 0,226, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +217, 3, 0, 0,186, 4, 0, 0, 73, 2, 0, 0, 98, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +226, 0, 26, 0, 11, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,122, 92, 2, 96,150, 25, 7, + 96,150, 25, 7, 0, 0, 0, 0, 0, 0, 0, 0, 40, 89, 5, 7,176, 89, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, +248, 0, 0, 0, 32,138, 9, 7,191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,232,136, 9, 7, 0, 0, 0, 0, 0,128,131, 67, + 0, 0,228,194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 67, 0, 0,220,194, 0, 0, 0, 0,209, 0, 0, 0,226, 0, 0, 0, + 18, 0, 0, 0,127, 0, 0, 0, 0, 0, 0, 0,208, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,208, 0, 0, 0, + 18, 0, 0, 0,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 18, 0, 0, 0, 2, 0, 3, 3, 0, 0, 0, 4, 6, 0,226, 0,128, 0,209, 0,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,217, 3, 0, 0,186, 4, 0, 0, 99, 2, 0, 0,226, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,226, 0,128, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,192,121, 92, 2,200,170, 25, 7,200,170, 25, 7, 0, 0, 0, 0, 0, 0, 0, 0,152, 91, 5, 7,168, 92, 5, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 4, 1, 0, 0, 88,139, 9, 7,162, 0, 0, 0, 1, 0, 0, 0,112,231, 10, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,176,125, 25, 7,176,125, 25, 7, +216,143, 12, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 68, 65, 84, 65, 12, 0, 0, 0,216,143, 12, 7,214, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0,160,140, 9, 7, + 68, 65, 84, 65,156, 0, 0, 0,160,140, 9, 7,213, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,160, 33, 10, 7, + 19, 0, 0, 0, 1, 0, 1, 0,160, 33, 10, 7, 20, 0, 0, 0, 1, 0, 1, 0,160, 33, 10, 7, 21, 0, 1, 0, 1, 0, 1, 0, +160, 33, 10, 7, 0, 0, 0, 0, 1, 0, 1, 0, 64, 39, 10, 7, 0, 0, 0, 0, 1, 0, 1, 0,224,195, 9, 7, 0, 0, 0, 0, + 1, 0, 1, 0, 48, 21, 12, 7, 0, 0, 0, 0, 1, 0, 1, 0, 48,203, 9, 7, 0, 0, 0, 0, 1, 0, 1, 0,224, 45, 10, 7, + 0, 0, 0, 0, 1, 0, 1, 0,136,199, 9, 7, 0, 0, 0, 0, 1, 0, 1, 0,208,240, 10, 7, 0, 0, 0, 0, 1, 0, 1, 0, + 56,192, 9, 7, 0, 0, 0, 0, 1, 0, 1, 0,240,143, 9, 7, 68, 65, 84, 65,248, 0, 0, 0,128,141, 9, 7,191, 0, 0, 0, + 1, 0, 0, 0,184,142, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 55, + 0, 0, 67, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,137, 67, + 0, 0,200, 65, 0,128,137, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, + 10, 0,195, 0, 26, 0,195, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 53, 4, 0, 0,247, 4, 0, 0, 69, 2, 0, 0, 94, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +195, 0, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, +248, 0, 0, 0,184,142, 9, 7,191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,128,141, 9, 7, 0, 0, 0, 0, 0, 0,150, 67, + 0,192,116,196, 0, 0, 0, 0, 0, 0, 0, 0,205, 85,150, 67,223,204, 35,196, 26, 85,207,195, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194, 0, 0, 0, + 0, 0, 0, 0,155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, + 0, 0, 0, 0, 1, 0, 3, 0, 2, 0, 0, 4, 6, 0,195, 0,156, 0,195, 0,156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 4, 0, 0,247, 4, 0, 0, 95, 2, 0, 0,250, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,195, 0,156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,224, 0, 0, 0,112,231, 10, 7,158, 0, 0, 0, 1, 0, 0, 0, 24,238, 10, 7, + 88,139, 9, 7,128,141, 9, 7,184,142, 9, 7, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,116,109,112, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, +248, 0, 0, 0,144,232, 10, 7,191, 0, 0, 0, 1, 0, 0, 0,200,233, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 68, + 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,138, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 1, 0, 0, + 0, 0, 0, 0, 25, 0, 0, 0, 0,128,237, 68, 0, 0,200, 65, 0,128,237, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, 10, 0, 20, 1, 26, 0, 20, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 6, 0, 0,108, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 1, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,200,233, 10, 7,191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, +144,232, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 6, 0, 0,108, 7, 0, 0, + 26, 0, 0, 0, 80, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 1, 55, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -205,204, 76, 63,205,204, 76, 63,205,204, 76, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, - 6, 0, 0, 0, 16, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,173, 2, 95, 0,154,153,217, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 4, 0, 1, 0,180, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,172, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,235, 10, 7, 68, 65, 84, 65,216, 2, 0, 0, 0,235, 10, 7, +152, 0, 0, 0, 1, 0, 0, 0,103,212,136, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, 0, 0, 0,128, 0, 0, 0,128, +226,215,163,188, 0, 0, 0,128, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 32,193, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 32, 65, 0, 0,128, 63,103,212,136, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0, +184,175, 31, 65, 0, 0, 32, 65,237,122,111, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,161, 14,106, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,209,252,249,195,115,253, 71,194, 0, 0, 0, 0, 0, 0, 0, 0, + 98,127,249, 67,129,255, 71, 66, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 32,193, 0, 0,128, 63,103,212,136, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0, +184,175, 31, 65, 0, 0, 32, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,176,191, 66, 2, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 10, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -205,204, 28, 65, 0, 0, 0, 0, 32, 0, 0, 0,128, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 2,224, 1, 60, 0, 32, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0,180, 0, 0, 0, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 5, 0,128, 7, 56, 4, 68, 65, 84, 65, 40, 0, 0, 0, - 96,136, 91, 2, 0, 0, 0, 0,124, 0, 0, 0, 1, 0, 0, 0,208,136, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 6, 3,227, 1,176,157, 91, 2, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, -208,136, 91, 2, 0, 0, 0, 0,124, 0, 0, 0, 1, 0, 0, 0, 64,137, 91, 2, 0, 0, 0, 0, 96,136, 91, 2, 0, 0, 0, 0, - 1, 0, 0, 0, 2, 0, 0, 0, 0, 4, 0, 0,228, 3, 33, 3, 16,163, 91, 2, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, - 64,137, 91, 2, 0, 0, 0, 0,124, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,208,136, 91, 2, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 97, 3, 61, 3, 64,153, 91, 2, 0, 0, 0, 0, 68, 65, 84, 65, 64, 1, 0, 0, -176,137, 91, 2, 0, 0, 0, 0,142, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 1, 0, 1, 0,205,204, 76, 63, 0, 0,180, 66, 9, 0, 1, 0, 0, 0,128, 63, -111, 18,131, 58,205,204,204, 61, 0, 0, 1, 0, 32, 0, 32, 0, 32, 0, 1, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, - 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 80, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 5, 0, 5, 0,255,255, 50, 0, 50, 0, 10, 0, 0, 0, 50, 0,100, 0, 10, 0, 0, 0, - 50, 0, 50, 0, 10, 0, 0, 0, 50, 0, 50, 0, 10, 0, 0, 0, 50, 0, 50, 0, 10, 0, 0, 0, 50, 0, 50, 0, 10, 0, 0, 0, - 50, 0, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 10,215, 35, 60,205,204,204, 61, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,250, 0,205,204,204, 61,205,204,204, 61, -102,102,166, 63, 0, 0,192, 63, 0, 0,240, 65, 72,225,122, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 67, 2, 0, 3, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 0, 0, 0, 48,139, 91, 2, 0, 0, 0, 0, -129, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 32, 82,101,110,100,101,114, - 76, 97,121,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,255,255, 15, 0, 0, 0, 0, 0,255,127, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, - 67, 65, 0, 0,152, 0, 0, 0,208,139, 91, 2, 0, 0, 0, 0, 29, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 65, 67, 97,109,101,114, 97, - 0, 97,109,101,114, 97, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 63,145,137, 68, 66,205,204,204, 61, 0, 0,200, 66, 0, 0, 12, 66, -161, 14,234, 64, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 65, 0, 0,232, 1, 0, 0,176,140, 91, 2, 0, 0, 0, 0, - 39, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 76, 65, 83,112,111,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,128, 63,247,255,239, 65, 0, 0,150, 66,154,153, 25, 62, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, -224,142, 91, 2, 0, 0, 0, 0, 2, 0, 0, 0, 46, 26,128, 63, 25, 4,240, 65, 0, 0, 52, 66, 0, 0,128, 63, 0, 0, 64, 64, - 64, 11, 3, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, -111, 18,131, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,100, 32,222, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65,240, 0, 0, 0, 24,238, 10, 7,153, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,112,231, 10, 7,144,232, 10, 7, +200,233, 10, 7, 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0, 56,192, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 8, 0, + 0, 0, 0, 0, 0, 0, 12, 66, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 10,215, 35, 60, 0, 0,250, 67, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 10, 0,159, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 83, 67, 0, 0, 92, 5, 0, 0,160, 33, 10, 7,150, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 83, 99,101,110,101, 0,116, 97,103,101, 0, 97,105,110, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,192, 9, 7, 64, 39, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, +120,188, 2, 7, 48,241, 2, 7,120,188, 2, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,192,144, 91, 2, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,224,142, 91, 2, 0, 0, 0, 0, - 54, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 2, 0, 1, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63, -243, 4, 53,191,242, 4, 53, 63,242, 4, 53,191,243, 4, 53, 63, 96,144, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,239, 10, 7,152,230,101, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 2, +224, 1, 60, 0, 32, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 6, 0, 25, 0,141, 0,128, 7, 56, 4, 8, 0, 8, 0, 0, 0, + 24, 0, 17, 0, 0, 0, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, 23, 0, 33, 0, 0, 0,128, 0, 0, 0, 8, 0, + 24, 0, 10, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,231, 9, 7, 48,231, 9, 7, 0, 0, 0, 0, + 0, 0,200, 66, 0, 0,200, 66, 0, 0,128, 63, 0, 0,128, 63, 1, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 5, 0, 2, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 98, 97, + 99,107, 98,117,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 24, 0, 0, 0, 96,144, 91, 2, 0, 0, 0, 0, 52, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,192,144, 91, 2, 0, 0, 0, 0, - 19, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 79, 0, 0,216, 1, 0, 0, 48,145, 91, 2, 0, 0, 0, 0, -123, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 87, 79, 87,111,114,108,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 62, 0, 0,128, 62, 0, 0,128, 62, 0, 0, 0, 0,205,204,204, 61,205,204,204, 61,205,204,204, 61, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0,205,204, 28, 65, 0, 0, 0, 0, 0, 0, 32, 0,128, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 64, 0, 0, 0, 0, 0, 0,112, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, 0, 0, 0, 0, - 0, 0,128, 63,205,204, 76, 61, 0, 0, 5, 0, 0, 0, 0, 0, 10,215,163, 59, 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,116,109,112, + 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 84, 88, 0, 0,176, 0, 0, 0, 80,147, 91, 2, 0, 0, 0, 0, 27, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 88, 84,101,120,116, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 1, 0, 0, 0, 64,148, 91, 2, 0, 0, 0, 0, 64,148, 91, 2, 0, 0, 0, 0, - 64,148, 91, 2, 0, 0, 0, 0, 64,148, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0,149, 91, 2, 0, 0, 0, 0,255,255,255,255, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 64,148, 91, 2, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,176,148, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 69, 69, 82, 70, 68, 65, 84, 65, 4, 0, 0, 0,176,148, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 1, 0, 79, 66, 0, 0, 40, 4, 0, 0, 64,153, 91, 2, 0, 0, 0, 0,114, 0, 0, 0, 1, 0, 0, 0,176,157, 91, 2, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 67, 97, -109,101,114, 97, 0, 97,109,101,114, 97, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,208,139, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,205,204, 76, 63,205,204, 76, 63,205,204, 76, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 62, 6, 0, 0, 0, 16, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,173, 2, 95, 0,154,153,217, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 0, 1, 0,180, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +152, 24, 11, 7, 1, 0, 0, 0, 1, 0, 10, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,205,204, 28, 65, 0, 0, 0, 0, 32, 0, 32, 0, 1, 0, 0, 0, 0, 0, 0, 0, +128, 0, 5, 0, 60, 0, 5, 0, 1, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 2, +224, 1, 60, 0, 32, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0,180, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 5, 0,128, 7, 56, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 28, 0, 0, 0,120,188, 2, 7, +128, 0, 0, 0, 1, 0, 0, 0,136,223, 2, 7, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,236, 1, 64, 1, +224,195, 9, 7, 68, 65, 84, 65, 28, 0, 0, 0,136,223, 2, 7,128, 0, 0, 0, 1, 0, 0, 0, 48,241, 2, 7,120,188, 2, 7, + 1, 0, 0, 0, 2, 0, 0, 0, 0, 4, 0, 0,121, 2, 10, 2,136,199, 9, 7, 68, 65, 84, 65, 28, 0, 0, 0, 48,241, 2, 7, +128, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,136,223, 2, 7, 1, 0, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 38, 2, 28, 2, + 56,192, 9, 7, 68, 65, 84, 65, 72, 1, 0, 0, 72,239, 10, 7,147, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 1, 0, 1, 0,205,204, 76, 63, 0, 0,180, 66, 9, 0, 1, 0, 0, 0,128, 63,111, 18,131, 58, +205,204,204, 61, 0, 0, 1, 0, 32, 0, 32, 0, 32, 0, 1, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 1, 0, 1, 0, + 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 80, 0, 0, 0, 0, 0, 7, 0, 5, 0, 5, 0,255,255, 50, 0, 50, 0, 10, 0, 0, 0, + 50, 0,100, 0, 10, 0, 0, 0, 50, 0, 50, 0, 10, 0, 0, 0, 50, 0, 50, 0, 10, 0, 0, 0, 50, 0, 50, 0, 10, 0, 0, 0, + 50, 0, 50, 0, 10, 0, 0, 0, 50, 0, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,215, 35, 60,205,204,204, 61, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,250, 0,205,204,204, 61,205,204,204, 61,102,102,166, 63, 0, 0,192, 63, 0, 0,240, 65, + 72,225,122, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 67, 2, 0, 3, 2, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 72, 0, 0, 0, 48,231, 9, 7,133, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 32, 82,101, +110,100,101,114, 76, 97,121,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,255,255, 15, 0, 0, 0, 0, 0,255,127, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 67, 65, 0, 0, +120, 0, 0, 0,240,143, 9, 7, 29, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 67, 65, 67, 97,109,101,114, 97, 0, 97,109,101,114, 97, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 63,145,137, 68, 66,205,204,204, 61, 0, 0,200, 66, 0, 0, 12, 66, +161, 14,234, 64, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 76, 65, 0, 0,124, 1, 0, 0,208,240, 10, 7, 41, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 65, 83,112,111,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63,247,255,239, 65, 0, 0,150, 66,154,153, 25, 62, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,144,242, 10, 7, + 2, 0, 0, 0, 46, 26,128, 63, 25, 4,240, 65, 0, 0, 52, 66, 0, 0,128, 63, 0, 0, 64, 64, 64, 11, 3, 0, 1, 0, 0, 0, + 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,111, 18,131, 58, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,110,101,239, 64,150, 62,208,192, 78,255,170, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 42,254,141, 63,192, 57, 49, 60, 34,159, 80, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222,149, 47, 63, 53, 70, 58, 63, -222, 56, 49,188, 0, 0, 0, 0, 86,126,162,190,227,251,159, 62, 55, 53,101, 63, 0, 0, 0, 0, 7,165, 39, 63,149, 84, 28,191, - 51,247,227, 62, 0, 0, 0, 0,110,101,239, 64,150, 62,208,192, 78,255,170, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 1, 0,128, 63, 1, 0,128, 51, - 1, 0, 0,179, 0, 0, 0, 0, 0, 0, 0, 51, 0, 0,128, 63, 1, 0,128, 51, 0, 0, 0, 0, 2, 0, 0,179, 2, 0, 0,167, - 1, 0,128, 63, 0, 0, 0, 0, 1, 0, 0, 53, 1, 0, 0, 41, 1, 0,128,168, 0, 0,128, 63, 0, 0,128, 63,157,190,215, 49, -167,170, 4, 52, 0, 0, 0,128,129,116,157,178, 1, 0,128, 63, 33, 69, 15, 51, 0, 0, 0,128, 73,254, 67, 51,243, 97,106, 49, - 0, 0,128, 63, 0, 0, 0,128, 3, 0, 64, 52,183,164,157, 39, 0, 0,128, 53, 0, 0,128, 63, 1, 0, 0, 0, 0, 4, 0, 0, - 0, 0, 0, 0, 5, 0, 1, 0, 0, 0, 0, 0, 79, 66, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, -100, 0, 0, 0, 0, 0, 0, 0, 56,180,150,201, 0, 0,128, 63,187,225, 16, 63, 0, 0,128, 63,205,204,204, 62,237, 54, 32, 63, - 0, 0, 0, 0,143,194,117, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 4, 7, 68, 65, 84, 65, 8, 1, 0, 0, +144,242, 10, 7, 64, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 2, 0, 1, 0, 0, 0,128, 67, 0, 0, 0, 0, + 0, 0,128, 63,243, 4, 53,191,242, 4, 53, 63,242, 4, 53,191,243, 4, 53, 63,112,236, 2, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 79, 66, 0, 0, 40, 4, 0, 0,176,157, 91, 2, 0, 0, 0, 0,114, 0, 0, 0, 1, 0, 0, 0, 16,163, 91, 2, - 0, 0, 0, 0, 64,153, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 67,117, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,112,236, 2, 7, + 62, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 32, 0, 0, 0, 0, 42, 4, 7, 19, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 79, 0, 0,104, 1, 0, 0, 64, 39, 10, 7, +127, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 79, 87,111,114,108,100, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, 0, 0,128, 62, 0, 0,128, 62, 0, 0, 0, 0,205,204,204, 61,205,204,204, 61, +205,204,204, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,205,204, 28, 65, 0, 0, 0, 0, 0, 0, 32, 0,128, 0, 5, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0,112, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 32, 65, 0, 0, 0, 0, 0, 0,128, 63,205,204, 76, 61, 0, 0, 5, 0, 0, 0, 0, 0, 10,215,163, 59, 0, 0, 0, 0, + 0, 0,128, 62, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 88, 0, 0,120, 0, 0, 0,232, 40, 10, 7, 27, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 88, 84,101,120,116, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, + 1, 0, 0, 0, 96,142, 2, 7, 96,142, 2, 7, 96,142, 2, 7, 96,142, 2, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,160, 41, 10, 7,255,255,255,255, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 24, 0, 0, 0, 96,142, 2, 7, 25, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104,248, 11, 7, 0, 0, 0, 0, + 0, 0, 0, 0, 69, 69, 82, 70, 68, 65, 84, 65, 4, 0, 0, 0,104,248, 11, 7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, + 79, 66, 0, 0,100, 3, 0, 0, 56,192, 9, 7,118, 0, 0, 0, 1, 0, 0, 0,224,195, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 79, 66, 67, 97,109,101,114, 97, 0, 97,109,101,114, 97, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 1, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,143, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,110,101,239, 64,150, 62,208,192, 78,255,170, 64, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42,254,141, 63,192, 57, 49, 60, 34,159, 80, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,222,149, 47, 63, 53, 70, 58, 63,222, 56, 49,188, 0, 0, 0, 0, 86,126,162,190,227,251,159, 62, + 55, 53,101, 63, 0, 0, 0, 0, 7,165, 39, 63,149, 84, 28,191, 51,247,227, 62, 0, 0, 0, 0,110,101,239, 64,150, 62,208,192, + 78,255,170, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,125,103,133, 51,176,219,194,178, 0, 0, 0, 0,190, 32, 66, 51, 1, 0,128, 63, +168,200,153, 51, 0, 0, 0, 0, 32,206, 18,179,126,126,149, 50, 1, 0,128, 63, 0, 0, 0, 0,241,251,133, 52,172,182, 27,180, +174,236,252, 51, 0, 0,128, 63, 0, 0,128, 63,157,190,215, 49,167,170, 4, 52, 0, 0, 0,128,129,116,157,178, 1, 0,128, 63, + 33, 69, 15, 51, 0, 0, 0,128, 73,254, 67, 51,243, 97,106, 49, 0, 0,128, 63, 0, 0, 0,128, 3, 0, 64, 52,183,164,157, 39, + 0, 0,128, 53, 0, 0,128, 63, 1, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 5, 0, 1, 0, 0, 0, 0, 0, 79, 66, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 56,180,150,201, 0, 0,128, 63, +187,225, 16, 63, 0, 0,128, 63,205,204,204, 62,237, 54, 32, 63, 0, 0, 0, 0,143,194,117, 61, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 0, 0,100, 3, 0, 0, +224,195, 9, 7,118, 0, 0, 0, 1, 0, 0, 0,136,199, 9, 7, 56,192, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 67,117, 98,101, 0,112,104,101,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,193,181, 2, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,173, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,162, 91, 2, 0, 0, 0, 0,112,162, 91, 2, 0, 0, 0, 0, 1, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,222,149, 47, 63, 52, 70, 58, 63, -179, 56, 49,188, 0, 0, 0,128, 86,126,162,190,227,251,159, 62, 56, 53,101, 63, 0, 0, 0,128, 7,165, 39, 63,149, 84, 28,191, - 50,247,227, 62, 0, 0, 0,128,110,101,239, 64,151, 62,208,192, 77,255,170, 64, 0, 0,128, 63, 1, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 68, 0, 79, 66, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, -100, 0, 0, 0, 0, 0, 0, 0, 56,180,150,201, 0, 0,128, 63,169, 19,208, 60, 0, 0,128, 63,205,204,204, 62,229,208, 34, 62, - 0, 0, 0, 0,143,194,117, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 0, 64, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,204,180, 2, 0, 0, 0, 0,160,185,181, 2, - 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 8, 0, 0, 0,192,162, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 4, 0, 0, 0,112,162, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 79, 66, 0, 0, 40, 4, 0, 0, 16,163, 91, 2, 0, 0, 0, 0,114, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -176,157, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 76, 97,109,112, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,176,140, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -154,112,130, 64,183,178,128, 63,112,236,188, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,229,123, 38, 63, - 87, 43, 98, 61,229,229,238, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54,236,148,190, 25,134,116, 63,236, 13, 98,189, - 0, 0, 0, 0,221,102, 69,191, 57,174, 76,190, 34,194, 26, 63, 0, 0, 0, 0, 37,255, 16, 63,241,161, 95, 62,164,111, 75, 63, - 0, 0, 0, 0,154,112,130, 64,183,178,128, 63,112,236,188, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,149, 25, 7, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 48, 21, 12, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,224,127, 10, 7, +168,144, 9, 7, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 1, 0,128, 50, 0, 0, 0,179, - 0, 0, 0, 0, 1, 0,128, 50, 1, 0,128, 63, 1, 0, 0, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0, 0, 0, 1, 0, 0, 39, 1, 0, 0, 52, 1, 0,128, 39, 0, 0,128, 63, 53,236,148,190,222,102, 69,191, 37,255, 16, 63, - 0, 0, 0,128, 24,134,116, 63, 57,174, 76,190,240,161, 95, 62, 0, 0, 0,128,235, 13, 98,189, 34,194, 26, 63,166,111, 75, 63, - 0, 0, 0,128,208, 19, 13, 63,234, 65,102,190, 10, 10,231,192, 0, 0,128, 63, 1, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, - 5, 0, 1, 0, 0, 0, 68, 0, 79, 66, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,100, 0, 0, 0, - 0, 0, 0, 0, 56,180,150,201, 0, 0,128, 63,169, 19,208, 60, 0, 0,128, 63,205,204,204, 62,229,208, 34, 62, 0, 0, 0, 0, -143,194,117, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 64, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 77, 65, 0, 0,224, 2, 0, 0,128,167, 91, 2, 0, 0, 0, 0, 41, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 65, 77, 97,116,101,114,105, - 97,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,205,204, 76, 63,205,204, 76, 63,205,204, 76, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,205,204, 76, 63, 0, 0, 0, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 63, 0, 0, 0, 0, 0, 0,160, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 2, 0, 2, 0, 50, 0, 0, 6, 0, 0,128, 63, 0, 0,128, 63, 18, 0, 18, 0, 10,215,163, 59, 10,215,163, 59, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 3, 3, 0, 1, 3, 1, 0, 4, 0, 12, 0, 4, 0, 0, 0, 0, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 63, 0, 0,128, 64, 0, 0, 0, 63,205,204,204, 61, 0, 0, 0, 63,205,204,204, 61,205,204,204, 61, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63,160,170, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,112,171, 91, 2, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 63, -205,204, 76, 63,205,204, 76, 63,205,204, 76, 61,205,204,204, 61,102,102,166, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,144, 0, 0, 0, -160,170, 91, 2, 0, 0, 0, 0, 32, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -224,171, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, +222,149, 47, 63, 52, 70, 58, 63,179, 56, 49,188, 0, 0, 0,128, 86,126,162,190,227,251,159, 62, 56, 53,101, 63, 0, 0, 0,128, + 7,165, 39, 63,149, 84, 28,191, 50,247,227, 62, 0, 0, 0,128,110,101,239, 64,151, 62,208,192, 77,255,170, 64, 0, 0,128, 63, + 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 68, 0, 79, 66, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 56,180,150,201, 0, 0,128, 63,169, 19,208, 60, 0, 0,128, 63, +205,204,204, 62,229,208, 34, 62, 0, 0, 0, 0,143,194,117, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 64, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,120,137, 25, 7,152,143, 25, 7, 25, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 4, 0, 0, 0,224,127, 10, 7, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 4, 0, 0, 0,168,144, 9, 7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 79, 66, 0, 0,100, 3, 0, 0,136,199, 9, 7,118, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,224,195, 9, 7, 0, 0, 0, 0, + 0, 0, 0, 0, 79, 66, 76, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,208,240, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154,112,130, 64,183,178,128, 63,112,236,188, 64, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,229,123, 38, 63, 87, 43, 98, 61,229,229,238, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 54,236,148,190, 25,134,116, 63,236, 13, 98,189, 0, 0, 0, 0,221,102, 69,191, 57,174, 76,190, + 34,194, 26, 63, 0, 0, 0, 0, 37,255, 16, 63,241,161, 95, 62,164,111, 75, 63, 0, 0, 0, 0,154,112,130, 64,183,178,128, 63, +112,236,188, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 35,233,134, 49,251,110, 17,179, 0, 0, 0, 0, 49,158,141, 50, 1, 0,128, 63, +126,214,237, 50, 0, 0, 0, 0,155,248, 28,178,199,139, 96,177,254,255,127, 63, 0, 0, 0, 0, 80,136,159,178,192, 4,158,178, +209,114,143,179, 0, 0,128, 63, 53,236,148,190,222,102, 69,191, 37,255, 16, 63, 0, 0, 0,128, 24,134,116, 63, 57,174, 76,190, +240,161, 95, 62, 0, 0, 0,128,235, 13, 98,189, 34,194, 26, 63,166,111, 75, 63, 0, 0, 0,128,208, 19, 13, 63,234, 65,102,190, + 10, 10,231,192, 0, 0,128, 63, 1, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 5, 0, 1, 0, 0, 0, 68, 0, 79, 66, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 56,180,150,201, 0, 0,128, 63, +169, 19,208, 60, 0, 0,128, 63,205,204,204, 62,229,208, 34, 62, 0, 0, 0, 0,143,194,117, 61, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 65, 0, 0,184, 2, 0, 0, + 48,203, 9, 7, 44, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 65, 77, 97, +116,101,114,105, 97,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,205,204, 76, 63,205,204, 76, 63,205,204, 76, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,205,204, 76, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 10,215, 35, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +205,204, 76, 62,205,204, 76, 62, 0, 0, 8, 0, 1, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,160, 63, 0, 0, 0, 0, 0, 0,160, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 2, 0, 2, 0, 50, 0, 0, 6, + 0, 0,128, 63, 0, 0,128, 63, 18, 0, 18, 0, 10,215,163, 59, 10,215,163, 59, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 67, 0, 0, 3, 3, 0, 1, 3, 1, 0, 4, 0, 12, 0, 4, 0, 0, 0, 0, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0,128, 64, + 0, 0, 0, 63,205,204,204, 61, 0, 0, 0, 63,205,204,204, 61,205,204,204, 61, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 40,206, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 56,144, 2, 7, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 63,205,204, 76, 63,205,204, 76, 63,205,204, 76, 61, +205,204,204, 61,102,102,166, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65,144, 0, 0, 0, 40,206, 9, 7, 32, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0,224, 45, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63,144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0,112,171, 91, 2, 0, 0, 0, 0, 19, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 84, 69, 0, 0, 88, 1, 0, 0,224,171, 91, 2, 0, 0, 0, 0, 37, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 84,101,120, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0, 0, 0,144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 63, 0, 0,128, 63, +205,204, 76, 62, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 56,144, 2, 7, 19, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 0, 0, + 40, 1, 0, 0,224, 45, 10, 7, 39, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 84, 69, 84,101,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, 0, 0,160, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 64, 0, 0, 0, 0, 2, 0, 0, 0, @@ -761,93 +860,83 @@ char datatoc_B_blend[]= { 8, 0, 0, 0, 1, 0, 1, 0, 3, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 205,204,204, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 69, 0, 0, 24, 1, 0, 0, + 48, 21, 12, 7, 54, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 69, 67,117, + 98,101, 0,112,104,101,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,131, 2, 7, 80, 27, 12, 7, 0, 0, 0, 0, + 0, 0, 0, 0,248,206, 9, 7, 72, 47, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,136, 22, 12, 7, 1, 0, 0, 0, 5, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 24, 12, 7, + 1, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184, 25, 12, 7, 1, 0, 0, 0, 5, 0, 0, 0, + 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 12, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0,128, 51, 0, 0, 0,180, 0, 0, 0, 0, 4, 0,128, 63, 4, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 30, 0, 4, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 4, 0, 0, 0, 80,131, 2, 7, 0, 0, 0, 0, 1, 0, 0, 0, 48,203, 9, 7, 68, 65, 84, 65, + 84, 1, 0, 0,136, 22, 12, 7, 67, 1, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 69, 0, 0,144, 1, 0, 0,128,173, 91, 2, 0, 0, 0, 0, - 51, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 77, 69, 67,117, 98,101, 0,112,104,101,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,182, 91, 2, 0, 0, 0, 0, - 48,182, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,177, 91, 2, 0, 0, 0, 0, -176,179, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,175, 91, 2, 0, 0, 0, 0, - 1, 0, 0, 0, 5, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,178, 91, 2, 0, 0, 0, 0, - 1, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,180, 91, 2, 0, 0, 0, 0, - 1, 0, 0, 0, 5, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 12, 0, 0, 0, - 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,128, 51, 0, 0, 0,180, 0, 0, 0, 0, 4, 0,128, 63, - 4, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 30, 0, 4, 0, - 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 8, 0, 0, 0, -240,182, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,128,167, 91, 2, 0, 0, 0, 0, 68, 65, 84, 65,104, 1, 0, 0, - 80,175, 91, 2, 0, 0, 0, 0, 57, 1, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,177, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,206, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,192, 0, 0, 0, - 0,177, 91, 2, 0, 0, 0, 0, 57, 0, 0, 0, 8, 0, 0, 0, 0, 0,128, 63,255,255,127, 63, 0, 0,128,191,230, 73,230, 73, - 26,182,255, 0, 3, 0, 0, 0, 0, 0,128, 63, 0, 0,128,191, 0, 0,128,191,230, 73, 26,182, 26,182,255, 0, 3, 0, 0, 0, - 1, 0,128,191,253,255,127,191, 0, 0,128,191, 26,182, 26,182, 26,182,255, 0, 3, 0, 0, 0,250,255,127,191, 3, 0,128, 63, - 0, 0,128,191, 26,182,230, 73, 26,182,255, 0, 3, 0, 0, 0, 4, 0,128, 63,247,255,127, 63, 0, 0,128, 63,230, 73,230, 73, -230, 73,255, 0, 3, 0, 0, 0,245,255,127, 63, 5, 0,128,191, 0, 0,128, 63,230, 73, 26,182,230, 73,255, 0, 3, 0, 0, 0, - 3, 0,128,191,250,255,127,191, 0, 0,128, 63, 26,182, 26,182,230, 73,255, 0, 3, 0, 0, 0,255,255,127,191, 0, 0,128, 63, - 0, 0,128, 63, 26,182,230, 73,230, 73,255, 0, 3, 0, 0, 0, 68, 65, 84, 65,104, 1, 0, 0, 0,178, 91, 2, 0, 0, 0, 0, - 57, 1, 0, 0, 5, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,176,179, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65,192, 0, 0, 0,248,206, 9, 7, 60, 0, 0, 0, 8, 0, 0, 0, 0, 0,128, 63,255,255,127, 63, + 0, 0,128,191,230, 73,230, 73, 26,182,255,127, 1, 0, 0, 0, 0, 0,128, 63, 0, 0,128,191, 0, 0,128,191,230, 73, 26,182, + 26,182,255,127, 1, 0, 0, 0, 1, 0,128,191,253,255,127,191, 0, 0,128,191, 26,182, 26,182, 26,182,255,127, 1, 0, 0, 0, +250,255,127,191, 3, 0,128, 63, 0, 0,128,191, 26,182,230, 73, 26,182,255,127, 1, 0, 0, 0, 4, 0,128, 63,247,255,127, 63, + 0, 0,128, 63,230, 73,230, 73,230, 73,255,127, 1, 0, 0, 0,245,255,127, 63, 5, 0,128,191, 0, 0,128, 63,230, 73, 26,182, +230, 73,255,127, 1, 0, 0, 0, 3, 0,128,191,250,255,127,191, 0, 0,128, 63, 26,182, 26,182,230, 73,255,127, 1, 0, 0, 0, +255,255,127,191, 0, 0,128, 63, 0, 0,128, 63, 26,182,230, 73,230, 73,255,127, 1, 0, 0, 0, 68, 65, 84, 65, 84, 1, 0, 0, + 32, 24, 12, 7, 67, 1, 0, 0, 5, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 47, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,144, 0, 0, 0,176,179, 91, 2, 0, 0, 0, 0, - 54, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 35, 0, - 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 35, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 35, 0, 1, 0, 0, 0, 5, 0, 0, 0, - 0, 0, 35, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 35, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 35, 0, 3, 0, 0, 0, - 7, 0, 0, 0, 0, 0, 35, 0, 4, 0, 0, 0, 5, 0, 0, 0, 0, 0, 35, 0, 4, 0, 0, 0, 7, 0, 0, 0, 0, 0, 35, 0, - 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 35, 0, 6, 0, 0, 0, 7, 0, 0, 0, 0, 0, 35, 0, 68, 65, 84, 65,104, 1, 0, 0, -128,180, 91, 2, 0, 0, 0, 0, 57, 1, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,182, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65,144, 0, 0, 0, 72, 47, 10, 7, 57, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 35, 0, + 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 35, 0, 1, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 35, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 35, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 35, 0, 2, 0, 0, 0, + 6, 0, 0, 0, 0, 0, 35, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 35, 0, 4, 0, 0, 0, 5, 0, 0, 0, 0, 0, 35, 0, + 4, 0, 0, 0, 7, 0, 0, 0, 0, 0, 35, 0, 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 35, 0, 6, 0, 0, 0, 7, 0, 0, 0, + 0, 0, 35, 0, 68, 65, 84, 65, 84, 1, 0, 0,184, 25, 12, 7, 67, 1, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 27, 12, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,120, 0, 0, 0, - 48,182, 91, 2, 0, 0, 0, 0, 53, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, - 0, 0, 0, 2, 4, 0, 0, 0, 7, 0, 0, 0, 6, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 4, 0, 0, 0, - 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, - 2, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, - 7, 0, 0, 0, 0, 0, 0, 2, 85, 83, 69, 82, 64, 11, 0, 0, 32, 94,154, 1, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0, - 33,152, 1, 0, 63, 2, 0, 0, 5, 0, 0, 0, 47,116,109,112, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,120, 0, 0, 0, 80, 27, 12, 7, 56, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 0, 7, 0, 0, 0, 6, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, + 5, 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 3, 0, 0, 0, + 0, 0, 0, 2, 4, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 2, 85, 83, 69, 82, 56, 11, 0, 0, + 0, 2, 68, 1,185, 0, 0, 0, 1, 0, 0, 0, 33,152, 1, 0, 63, 2, 0, 0, 5, 0, 0, 0, 47,116,109,112, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 85,115,101,114,115, 47,116,111,110, 47, 68,101,115,107,116,111,112, - 47, 0, 45,112,111,119,101,114,112, 99, 47, 98,105,110, 47, 98,108,101,110,100,101,114, 46, 97,112,112, 47, 67,111,110,116,101, -110,116,115, 47, 82,101,115,111,117,114, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 85,115,101,114,115, + 47,116,111,110, 47, 68,101,115,107,116,111,112, 47, 0, 45,112,111,119,101,114,112, 99, 47, 98,105,110, 47, 98,108,101,110,100, +101,114, 46, 97,112,112, 47, 67,111,110,116,101,110,116,115, 47, 82,101,115,111,117,114, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -865,9 +954,9 @@ char datatoc_B_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -875,1002 +964,1047 @@ char datatoc_B_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 48, 52, 6, 0, 0, 0, 0, 0, - 0, 0, 2, 0, 0, 8, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 64, 0, 5, 0, 2, 0,192,194, 91, 2, 0, 0, 0, 0, -192,215, 91, 2, 0, 0, 0, 0,240,195,100, 2, 0, 0, 0, 0,240,195,100, 2, 0, 0, 0, 0, 80, 51,101, 2, 0, 0, 0, 0, - 80, 51,101, 2, 0, 0, 0, 0, 32, 0, 0, 0, 1, 0, 2, 0, 25, 0, 0, 0, 20, 0, 20, 0, 1, 0, 0, 0, 0, 0, 0, 0, -205,204, 76, 63,205,204, 76, 63,205,204, 76, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, - 30, 90,100,191,154,153,153, 62,102,102,102, 63, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 31,250,254, 62, 9, 0, 0, 63, -156,153, 25, 63, 0, 0, 0, 0,205,204, 76, 62,205,204, 76, 62,205,204, 76, 62, 0, 0,128, 63, 44,135, 22, 63, 32,133,235, 62, -184,243,125, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,195, 73, 76, 63, 42,135, 86, 63, 0, 0,128, 63, 0, 0, 0, 0, - 1, 43,135, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 16, 47, 93, 62, 58,180,200,190, 24, 47, 93,190, 0, 0, 0, 0, - 14, 0, 0, 0, 25, 0, 15, 0,120, 0, 60, 0, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,144, 31, 15, 0, 6, 0, 15, 0, - 8, 0, 10, 0,250, 0, 0, 0,100, 0,100, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, - 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, - 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, - 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, - 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, - 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, - 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, - 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, - 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, - 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, - 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, - 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, - 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, - 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, - 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, - 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, - 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, - 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, - 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, - 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, - 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, - 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, - 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65,192, 20, 0, 0,192,194, 91, 2, 0, 0, 0, 0,176, 0, 0, 0, 1, 0, 0, 0,192,215, 91, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68,101,102, 97,117,108,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, - 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, - 1, 0, 25, 0,231,255, 0, 0, 25, 25, 25,255,153,153,153,255,153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, - 1, 0, 0, 0, 25, 0, 0, 0, 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, 15, 0,241,255, 0, 0, 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, 0, 15, 0,241,255, 0, 0, 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, - 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,255,180,180,180,255,153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, - 1, 0,236,255, 0, 0, 0, 0, 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,236,255, 0, 0, 0, 0, 0, 0, 0,255, 70, 70, 70,255, 70, 70, 70,255,255,255,255,255,255,255,255,255,204,204,204,255, - 1, 0, 15, 0,241,255, 0, 0, 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, 0, 25, 0,236,255, 0, 0, 0, 0, 0,255, 25, 25, 25,230, 45, 45, 45,230,100,100,100,255,160,160,160,255,255,255,255,255, - 0, 0, 25, 0,236,255, 0, 0, 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, 0, 38, 0, 0, 0, 0, 0, 25, 25, 25,255,128,128,128,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, - 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 50,180, 80, 80, 80,180,100,100,100,180,128,128,128,255, 0, 0, 0,255,255,255,255,255, - 1, 0, 5, 0,251,255, 0, 0, 0, 0, 0,255, 0, 0, 0, 0, 86,128,194,255, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 0,255, - 0, 0, 0, 0, 0, 0, 0, 0,115,190, 76,255, 90,166, 51,255,240,235,100,255,215,211, 75,255,180, 0,255,255,153, 0,230,255, - 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, - 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,130,130,130,255, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, - 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255, -255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255, -200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 57, 57, 57,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, - 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255, -255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, - 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, - 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 90, 90,255, 0, 0, 0, 0, -250,250,250,255, 15, 15, 15,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,180,180,180,255, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100,255,140, 25,255,250,250,250,255, 0, 0, 0,255,241, 88, 0,255, - 0, 0, 0, 40,130,130,130,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255, -255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255, -200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,250,250,250,255,250,250,250,255,250,250,250,255, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,102,102,102,255, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,150,150,150,100,112,112,112,100, - 96,192, 64,255, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 79,101, 73,255,135,177,125,255, -255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, - 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, - 96,192, 64,255, 82, 96,110,255,124,137,150,255, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,133, 0,255, 3, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, - 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, - 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255, -255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255, -200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,173,173,173,255,127,112,112,100, - 0, 0, 0, 0, 91, 91, 91,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255, -255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, - 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, - 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, - 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,255,255,255,150, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,150,150,150,100,112,112,112,100, 96,192, 64,255, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, - 0, 0, 0, 40,255,140, 25,255, 79,101, 73,255,135,177,125,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255, -255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255, -200,200,200,255, 80,200,255, 80, 12, 10, 10,128,255,140, 0,255, 96,192, 64,255, 82, 96,110,255,124,137,150,255, 3, 4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,133, 0,255, - 3, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,102,102,102,255, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,150,150,150,100,112,112,112,100, - 96,192, 64,255, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 79,101, 73,255,135,177,125,255, -255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, - 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 12, 10, 10,128,255,140, 0,255, - 96,192, 64,255, 82, 96,110,255,124,137,150,255, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,133, 0,255, 3, 0, 0, 0, 0, 0, 0, 0,116,116,116,255, 0, 0, 0, 0, - 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, - 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255, -255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255, -200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,105,135,255,109, 88,129,255, 78,152, 62,255, - 46,143,143,255,169, 84,124,255,126,126, 80,255,162, 95,111,255,109,145,131,255,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 53, 53, 53,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, - 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255, -255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, -255,255,255, 10,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, - 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,110,110,110,255, 0, 0, 0, 0, - 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,132,132,132,255, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255, 94, 94, 94,255,172,172,172,255, 17, 27, 60,100, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, - 0, 0, 0, 40,195,195,195,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255, -255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255, -200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,153,153,153,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,143,143,143,255,198,119,119,255, -255, 0, 0,255, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255, -255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, - 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, - 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0,100, 0, 0,255, 0, 0,200,255,128, 0, 80,255, 95, 95, 0,255, - 0,100, 50,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, - 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, - 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255, -255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255, -200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,173,173,173,255,127,112,112,100, - 0, 0, 0, 0, 91, 91, 91,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255, -255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, - 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, - 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 57, 57,255, 0, 0, 0, 0, - 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, - 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255, -255,255,255,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255, -200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, -150,150,150,255,129,131,144,255,127,127,127,255,142,138,145,255,120,145,120,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,100,100,100,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, - 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, - 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255, -255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, - 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, - 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154, 0, 0,255,189, 17, 17,255, -247, 10, 10,255, 0, 0, 0, 0,247, 64, 24,255,246,105, 19,255,250,153, 0,255, 0, 0, 0, 0, 30,145, 9,255, 89,183, 11,255, -131,239, 29,255, 0, 0, 0, 0, 10, 54,148,255, 54,103,223,255, 94,193,239,255, 0, 0, 0, 0,169, 41, 78,255,193, 65,106,255, -240, 93,145,255, 0, 0, 0, 0, 67, 12,120,255, 84, 58,163,255,135,100,213,255, 0, 0, 0, 0, 36,120, 90,255, 60,149,121,255, -111,182,171,255, 0, 0, 0, 0, 75,112,124,255,106,134,145,255,155,194,205,255, 0, 0, 0, 0,244,201, 12,255,238,194, 54,255, -243,255, 0,255, 0, 0, 0, 0, 30, 32, 36,255, 72, 76, 86,255,255,255,255,255, 0, 0, 0, 0,111, 47,106,255,152, 69,190,255, -211, 48,214,255, 0, 0, 0, 0,108,142, 34,255,127,176, 34,255,187,239, 91,255, 0, 0, 0, 0,141,141,141,255,176,176,176,255, -222,222,222,255, 0, 0, 0, 0,131, 67, 38,255,139, 88, 17,255,189,106, 17,255, 0, 0, 0, 0, 8, 49, 14,255, 28, 67, 11,255, - 52, 98, 43,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,192, 20, 0, 0, -192,215, 91, 2, 0, 0, 0, 0,176, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,194, 91, 2, 0, 0, 0, 0, - 82,111,117,110,100,101,100, 0, 0,101,119, 32, 85,115,101,114, 32, 84,104,101,109,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 48, 52, 6, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 8, 0, 0, 2, 0, 0, 0, 68,172, 0, 0, 36, 0, 0, 0, + 2, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 64, 0, 5, 0, 2, 0,168, 3, 10, 7, 40,207, 13, 7, 48, 93, 5, 7, + 48, 93, 5, 7,128, 94, 5, 7,128, 94, 5, 7, 32, 0, 0, 0, 1, 0, 2, 0, 25, 0, 0, 0, 20, 0, 20, 0, 1, 0, 0, 0, + 0, 0, 0, 0,205,204, 76, 63,205,204, 76, 63,205,204, 76, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0,128, 63, 30, 90,100,191,154,153,153, 62,102,102,102, 63, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 31,250,254, 62, + 9, 0, 0, 63,156,153, 25, 63, 0, 0, 0, 0,205,204, 76, 62,205,204, 76, 62,205,204, 76, 62, 0, 0,128, 63, 44,135, 22, 63, + 32,133,235, 62,184,243,125, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,195, 73, 76, 63, 42,135, 86, 63, 0, 0,128, 63, + 0, 0, 0, 0, 1, 43,135, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 16, 47, 93, 62, 58,180,200,190, 24, 47, 93,190, + 0, 0, 0, 0, 14, 0, 0, 0, 25, 0, 15, 0,120, 0, 60, 0, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,144, 31, 15, 0, + 6, 0, 15, 0, 8, 0, 10, 0,250, 0, 0, 0,100, 0,100, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, + 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, + 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, + 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, + 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, + 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, + 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, + 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, + 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65,200, 21, 0, 0,168, 3, 10, 7,183, 0, 0, 0, 1, 0, 0, 0, 40,207, 13, 7, 0, 0, 0, 0, + 68,101,102, 97,117,108,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, - 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 1, 0, 25, 0,231,255, 0, 0, + 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 1, 0, 15, 0,241,255, 0, 0, 25, 25, 25,255,153,153,153,255,153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, 1, 0, 0, 0, 25, 0, 0, 0, 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, 15, 0,241,255, 0, 0, 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, 0, 15, 0,241,255, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,255,180,180,180,255,153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, 1, 0,236,255, 0, 0, 0, 0, 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,236,255, 0, 0, 0, 0, 0, 0, 0,255, 70, 70, 70,255, 70, 70, 70,255,255,255,255,255,255,255,255,255,204,204,204,255, 1, 0, 15, 0,241,255, 0, 0, 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, 0, 25, 0,236,255, 0, 0, - 0, 0, 0,255, 25, 25, 25,230, 46,124,217,204,255,255,255,255,255,255,255,255, 0, 0, 0,255, 0, 0, 25, 0,236,255, 0, 0, + 0, 0, 0,255, 25, 25, 25,230, 45, 45, 45,230,100,100,100,255,160,160,160,255,255,255,255,255, 0, 0, 25, 0,236,255, 0, 0, 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, 0, 38, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, -107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,175,175,175, 51, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -160,160,160,100,127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, - 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, - 0, 0, 0, 51, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0,143,143,143,255, - 0, 0, 0,255,217,217,217,255, 0, 0, 0, 40,255,255,255,255, 16, 64, 16,255,102,255,102,255,255,130, 0,255, 0, 0, 0,255, -255,130, 0,255, 0, 0, 0,255,255,255,255,255,230,150, 50,255,255, 32, 32,255, 0, 0, 0, 0,255,255,255, 10,255,130, 0, 60, -255,138, 48,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, + 25, 25, 25,255,128,128,128,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, + 50, 50, 50,180, 80, 80, 80,180,100,100,100,180,128,128,128,255, 0, 0, 0,255,255,255,255,255, 1, 0, 5, 0,251,255, 0, 0, + 0, 0, 0,255, 0, 0, 0, 0, 86,128,194,255, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, +115,190, 76,255, 90,166, 51,255,240,235,100,255,215,211, 75,255,180, 0,255,255,153, 0,230,255, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,130,130,130,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, + 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255, +255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, + 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 57, 57, 57,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, + 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255, +255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60, +255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 90, 90,255, 0, 0, 0, 0,250,250,250,255, 15, 15, 15,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,180,180,180,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +160,160,160,100,127,112,112,100,255,140, 25,255,250,250,250,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,130,130,130,255, + 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255, +255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, + 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,250,250,250,255,250,250,250,255,250,250,250,255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,150,150,150,100,112,112,112,100, 96,192, 64,255, 94, 94, 94,255, + 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 79,101, 73,255,135,177,125,255,255,255,255,255, 0, 0, 0,255, +255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60, +255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 82, 96,110,255, +124,137,150,255, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, + 0, 0, 0,255,255,133, 0,255, 3, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, + 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255, +255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, + 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,173,173,173,255,127,112,112,100, 0, 0, 0, 0, 91, 91, 91,255, + 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255, +255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60, +255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, -107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -160,160,160,100,127,112,112,100,255,130, 0,255, 88, 88, 88,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, - 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -107,107,107,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,107,107,107,100,143,143,143,100, 96,192, 64,255, 94, 94, 94,255, - 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 79,101, 73,255,135,177,125,255,255,255,255,255,255,255,255,255, -255,130, 0,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 82, 96,110,255, -124,137,150,255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -255,255,255,255,255,130, 0,255, 2, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, -107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -160,160,160,100,127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, - 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -158,158,158,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,158,158,158,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,140,140,140,255,127,112,112,100, 0, 0, 0, 0,112,112, 96,255, - 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255, -255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, -107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -107,107,107,255,178,178,178,100,255,130, 0,100, 94, 94, 94,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, - 79,101, 73,255,135,177,125,255,255,255,255,255,255,112,255,255,255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,143,143,143,255,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -228,156,198,204,255,255,170,204, 96,192, 64,255, 82, 96,110,255,124,137,150,255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,143,143,143,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,107,107,107,255,178,178,178,100,255,130, 0,100, 94, 94, 94,255, - 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255, -255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,228,156,198,255,255,255,170,255, 96,192, 64,255, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, -107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -160,160,160,100,127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, - 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,130, 0,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,200,255,255, - 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +150,150,150,100,112,112,112,100, 96,192, 64,255, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, + 79,101, 73,255,135,177,125,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255, +255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, + 12, 10, 10,128,255,140, 0,255, 96,192, 64,255, 82, 96,110,255,124,137,150,255, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,133, 0,255, 3, 0, 0, 0, 0, 0, 0, 0, +107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,150,150,150,100,112,112,112,100, 96,192, 64,255, 94, 94, 94,255, + 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 79,101, 73,255,135,177,125,255,255,255,255,255, 0, 0, 0,255, +255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60, +255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 12, 10, 10,128,255,140, 0,255, 96,192, 64,255, 82, 96,110,255, +124,137,150,255, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, + 0, 0, 0,255,255,133, 0,255, 3, 0, 0, 0, 0, 0, 0, 0,116,116,116,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, + 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255, +255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, + 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,105,135,255,109, 88,129,255, 78,152, 62,255, 46,143,143,255,169, 84,124,255, -126,126, 80,255,162, 95,111,255,109,145,131,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 53, 53, 53,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,195,195,195,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255, - 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255, -255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, -255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 80,200,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +126,126, 80,255,162, 95,111,255,109,145,131,255,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 53, 53, 53,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, + 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255, +255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255,255,255,255, 10,255,133, 0, 60, +255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, -195,195,195,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -143,143,143,255,127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, - 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -153,153,153,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,153,153,153,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,143,143,143,255,198,119,119,255,255, 0, 0,255, 88, 88, 88,255, - 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255, -255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, 0, 0,100, 0, 0,255, 0, 0,200,255,128, 0, 80,255, 95, 95, 0,255, 0,100, 50,255, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, -107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -160,160,160,100,127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, - 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -158,158,158,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,158,158,158,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,140,140,140,255,127,112,112,100, 0, 0, 0, 0,112,112, 96,255, - 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255, -255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, -107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 51, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -160,160,160,100,127,112,112,100, 0, 0, 0, 0,143,143,143,255, 0, 0, 0,255,217,217,217,255, 0, 0, 0, 40,255,255,255,255, - 0, 0, 0, 0, 0, 0, 0, 0,255,130, 0,255, 0, 0, 0,255,255,130, 0,255, 0, 0, 0,255,255,255,255,255,230,150, 50,255, - 0, 0, 0, 0, 0, 0, 0, 0,255,255,255, 10,255,130, 0, 60,255,138, 48,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0,150,150,150,255,129,131,144,255, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,110,110,110,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,132,132,132,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, + 94, 94, 94,255,172,172,172,255, 17, 27, 60,100, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,195,195,195,255, + 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255, +255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, + 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +153,153,153,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,143,143,143,255,198,119,119,255,255, 0, 0,255, 64, 64, 64,255, + 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255, +255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60, +255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 4, 0, 0,100, 0, 0,255, 0, 0,200,255,128, 0, 80,255, 95, 95, 0,255, 0,100, 50,255, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, + 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255, +255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, + 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,173,173,173,255,127,112,112,100, 0, 0, 0, 0, 91, 91, 91,255, + 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255, +255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60, +255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 57, 57,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, + 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,255,255,255,219, 37, 18,255, +255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, + 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0,150,150,150,255,129,131,144,255, 127,127,127,255,142,138,145,255,120,145,120,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -100,100,100,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, -145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, - 0, 0, 0, 51, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0,143,143,143,255, - 0, 0, 0,255,217,217,217,255, 0, 0, 0, 40,255,255,255,255, 16, 64, 16,255,102,255,102,255,255,130, 0,255, 0, 0, 0,255, -255,130, 0,255, 0, 0, 0,255,255,255,255,255,230,150, 50,255,255, 32, 32,255, 0, 0, 0, 0,255,255,255, 10,255,130, 0, 60, -255,138, 48,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +100,100,100,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, + 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255, +255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60, +255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154, 0, 0,255,189, 17, 17,255,247, 10, 10,255, 0, 0, 0, 0, -247, 64, 24,255,246,105, 19,255,250,153, 0,255, 0, 0, 0, 0, 30,145, 9,255, 89,183, 11,255,131,239, 29,255, 0, 0, 0, 0, - 10, 54,148,255, 54,103,223,255, 94,193,239,255, 0, 0, 0, 0,169, 41, 78,255,193, 65,106,255,240, 93,145,255, 0, 0, 0, 0, - 67, 12,120,255, 84, 58,163,255,135,100,213,255, 0, 0, 0, 0, 36,120, 90,255, 60,149,121,255,111,182,171,255, 0, 0, 0, 0, - 75,112,124,255,106,134,145,255,155,194,205,255, 0, 0, 0, 0,244,201, 12,255,238,194, 54,255,243,255, 0,255, 0, 0, 0, 0, - 30, 32, 36,255, 72, 76, 86,255,255,255,255,255, 0, 0, 0, 0,111, 47,106,255,152, 69,190,255,211, 48,214,255, 0, 0, 0, 0, -108,142, 34,255,127,176, 34,255,187,239, 91,255, 0, 0, 0, 0,141,141,141,255,176,176,176,255,222,222,222,255, 0, 0, 0, 0, -131, 67, 38,255,139, 88, 17,255,189,106, 17,255, 0, 0, 0, 0, 8, 49, 14,255, 28, 67, 11,255, 52, 98, 43,255, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 78, 65, 49,224,211, 0, 0, 96,169,184, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, 83, 68, 78, 65, 78, 65, 77, 69,102, 10, 0, 0, 42,110,101,120,116, 0, 42,112,114,101,118, 0, - 42,100, 97,116, 97, 0, 42,102,105,114,115,116, 0, 42,108, 97,115,116, 0,120, 0,121, 0,122, 0,119, 0,120,109,105,110, 0, -120,109, 97,120, 0,121,109,105,110, 0,121,109, 97,120, 0, 42,112,111,105,110,116,101,114, 0,103,114,111,117,112, 0,118, 97, -108, 0,118, 97,108, 50, 0,116,121,112,101, 0,115,117, 98,116,121,112,101, 0,102,108, 97,103, 0,110, 97,109,101, 91, 51, 50, - 93, 0,115, 97,118,101,100, 0,100, 97,116, 97, 0,108,101,110, 0,116,111,116, 97,108,108,101,110, 0, 42,110,101,119,105,100, - 0, 42,108,105, 98, 0,110, 97,109,101, 91, 50, 52, 93, 0,117,115, 0,105, 99,111,110, 95,105,100, 0, 42,112,114,111,112,101, -114,116,105,101,115, 0,105,100, 0, 42,105,100, 98,108,111, 99,107, 0, 42,102,105,108,101,100, 97,116, 97, 0,110, 97,109,101, - 91, 50, 52, 48, 93, 0,102,105,108,101,110, 97,109,101, 91, 50, 52, 48, 93, 0,116,111,116, 0,112, 97,100, 0, 42,112, 97,114, -101,110,116, 0,119, 91, 50, 93, 0,104, 91, 50, 93, 0, 99,104, 97,110,103,101,100, 91, 50, 93, 0,112, 97,100, 48, 0,112, 97, -100, 49, 0, 42,114,101, 99,116, 91, 50, 93, 0, 42,111, 98, 0, 98,108,111, 99,107,116,121,112,101, 0, 97,100,114, 99,111,100, -101, 0,110, 97,109,101, 91, 49, 50, 56, 93, 0, 42, 98,112, 0, 42, 98,101,122,116, 0,109, 97,120,114, 99,116, 0,116,111,116, -114, 99,116, 0,118, 97,114,116,121,112,101, 0,116,111,116,118,101,114,116, 0,105,112,111, 0,101,120,116,114, 97,112, 0,114, -116, 0, 98,105,116,109, 97,115,107, 0,115,108,105,100,101, 95,109,105,110, 0,115,108,105,100,101, 95,109, 97,120, 0, 99,117, -114,118, 97,108, 0, 42,100,114,105,118,101,114, 0, 99,117,114,118,101, 0, 99,117,114, 0,115,104,111,119,107,101,121, 0,109, -117,116,101,105,112,111, 0,112,111,115, 0,114,101,108, 97,116,105,118,101, 0,116,111,116,101,108,101,109, 0,112, 97,100, 50, - 0, 42,119,101,105,103,104,116,115, 0,118,103,114,111,117,112, 91, 51, 50, 93, 0,115,108,105,100,101,114,109,105,110, 0,115, -108,105,100,101,114,109, 97,120, 0, 42, 97,100,116, 0, 42,114,101,102,107,101,121, 0,101,108,101,109,115,116,114, 91, 51, 50, - 93, 0,101,108,101,109,115,105,122,101, 0, 98,108,111, 99,107, 0, 42,105,112,111, 0, 42,102,114,111,109, 0,116,111,116,107, -101,121, 0,115,108,117,114,112,104, 0, 42,108,105,110,101, 0, 42,102,111,114,109, 97,116, 0, 98,108,101,110, 0,108,105,110, -101,110,111, 0,115,116, 97,114,116, 0,101,110,100, 0,102,108, 97,103,115, 0, 99,111,108,111,114, 91, 52, 93, 0,112, 97,100, - 91, 52, 93, 0, 42,110, 97,109,101, 0,110,108,105,110,101,115, 0,108,105,110,101,115, 0, 42, 99,117,114,108, 0, 42,115,101, -108,108, 0, 99,117,114, 99, 0,115,101,108, 99, 0,109, 97,114,107,101,114,115, 0, 42,117,110,100,111, 95, 98,117,102, 0,117, -110,100,111, 95,112,111,115, 0,117,110,100,111, 95,108,101,110, 0, 42, 99,111,109,112,105,108,101,100, 0,109,116,105,109,101, - 0,115,105,122,101, 0,115,101,101,107, 0,112, 97,115,115,101,112, 97,114,116, 97,108,112,104, 97, 0, 97,110,103,108,101, 0, - 99,108,105,112,115,116, 97, 0, 99,108,105,112,101,110,100, 0,108,101,110,115, 0,111,114,116,104,111, 95,115, 99, 97,108,101, - 0,100,114, 97,119,115,105,122,101, 0,115,104,105,102,116,120, 0,115,104,105,102,116,121, 0, 89, 70, 95,100,111,102,100,105, -115,116, 0, 89, 70, 95, 97,112,101,114,116,117,114,101, 0, 89, 70, 95, 98,107,104,116,121,112,101, 0, 89, 70, 95, 98,107,104, - 98,105, 97,115, 0, 89, 70, 95, 98,107,104,114,111,116, 0, 42,100,111,102, 95,111, 98, 0,102,114, 97,109,101,110,114, 0,102, -114, 97,109,101,115, 0,111,102,102,115,101,116, 0,115,102,114, 97, 0,102,105,101, 95,105,109, 97, 0, 99,121, 99,108, 0,111, -107, 0,109,117,108,116,105, 95,105,110,100,101,120, 0,108, 97,121,101,114, 0,112, 97,115,115, 0,109,101,110,117,110,114, 0, - 42,115, 99,101,110,101, 0,105, 98,117,102,115, 0, 42,103,112,117,116,101,120,116,117,114,101, 0, 42, 97,110,105,109, 0, 42, -114,114, 0,115,111,117,114, 99,101, 0,108, 97,115,116,102,114, 97,109,101, 0,116,112, 97,103,101,102,108, 97,103, 0,116,111, -116, 98,105,110,100, 0,120,114,101,112, 0,121,114,101,112, 0,116,119,115,116, 97, 0,116,119,101,110,100, 0, 98,105,110,100, - 99,111,100,101, 0, 42,114,101,112, 98,105,110,100, 0, 42,112, 97, 99,107,101,100,102,105,108,101, 0, 42,112,114,101,118,105, -101,119, 0, 42,114,101,110,100,101,114, 95,116,101,120,116, 0,108, 97,115,116,117,112,100, 97,116,101, 0,108, 97,115,116,117, -115,101,100, 0, 97,110,105,109,115,112,101,101,100, 0,103,101,110, 95,120, 0,103,101,110, 95,121, 0,103,101,110, 95,116,121, -112,101, 0, 97,115,112,120, 0, 97,115,112,121, 0,116,101,120, 99,111, 0,109, 97,112,116,111, 0,109, 97,112,116,111,110,101, -103, 0, 98,108,101,110,100,116,121,112,101, 0, 42,111, 98,106,101, 99,116, 0, 42,116,101,120, 0,117,118,110, 97,109,101, 91, - 51, 50, 93, 0,112,114,111,106,120, 0,112,114,111,106,121, 0,112,114,111,106,122, 0,109, 97,112,112,105,110,103, 0,111,102, -115, 91, 51, 93, 0,115,105,122,101, 91, 51, 93, 0,116,101,120,102,108, 97,103, 0, 99,111,108,111,114,109,111,100,101,108, 0, -112,109, 97,112,116,111, 0,112,109, 97,112,116,111,110,101,103, 0,110,111,114,109, 97,112,115,112, 97, 99,101, 0,119,104,105, - 99,104, 95,111,117,116,112,117,116, 0,112, 97,100, 91, 50, 93, 0,114, 0,103, 0, 98, 0,107, 0,100,101,102, 95,118, 97,114, - 0, 99,111,108,102, 97, 99, 0,110,111,114,102, 97, 99, 0,118, 97,114,102, 97, 99, 0,100,105,115,112,102, 97, 99, 0,119, 97, -114,112,102, 97, 99, 0,110, 97,109,101, 91, 49, 54, 48, 93, 0, 42,104, 97,110,100,108,101, 0, 42,112,110, 97,109,101, 0, 42, -115,116,110, 97,109,101,115, 0,115,116,121,112,101,115, 0,118, 97,114,115, 0, 42,118, 97,114,115,116,114, 0, 42,114,101,115, -117,108,116, 0, 42, 99,102,114, 97, 0,100, 97,116, 97, 91, 51, 50, 93, 0, 40, 42,100,111,105,116, 41, 40, 41, 0, 40, 42,105, -110,115,116, 97,110, 99,101, 95,105,110,105,116, 41, 40, 41, 0, 40, 42, 99, 97,108,108, 98, 97, 99,107, 41, 40, 41, 0,118,101, -114,115,105,111,110, 0, 97, 0,105,112,111,116,121,112,101, 0, 42,105,109, 97, 0, 42, 99,117, 98,101, 91, 54, 93, 0,105,109, - 97,116, 91, 52, 93, 91, 52, 93, 0,111, 98,105,109, 97,116, 91, 51, 93, 91, 51, 93, 0,115,116,121,112,101, 0,118,105,101,119, -115, 99, 97,108,101, 0,110,111,116,108, 97,121, 0, 99,117, 98,101,114,101,115, 0,100,101,112,116,104, 0,114,101, 99, 97,108, - 99, 0,108, 97,115,116,115,105,122,101, 0,110,111,105,115,101,115,105,122,101, 0,116,117,114, 98,117,108, 0, 98,114,105,103, -104,116, 0, 99,111,110,116,114, 97,115,116, 0,114,102, 97, 99, 0,103,102, 97, 99, 0, 98,102, 97, 99, 0,102,105,108,116,101, -114,115,105,122,101, 0,109,103, 95, 72, 0,109,103, 95,108, 97, 99,117,110, 97,114,105,116,121, 0,109,103, 95,111, 99,116, 97, -118,101,115, 0,109,103, 95,111,102,102,115,101,116, 0,109,103, 95,103, 97,105,110, 0,100,105,115,116, 95, 97,109,111,117,110, -116, 0,110,115, 95,111,117,116,115, 99, 97,108,101, 0,118,110, 95,119, 49, 0,118,110, 95,119, 50, 0,118,110, 95,119, 51, 0, -118,110, 95,119, 52, 0,118,110, 95,109,101,120,112, 0,118,110, 95,100,105,115,116,109, 0,118,110, 95, 99,111,108,116,121,112, -101, 0,110,111,105,115,101,100,101,112,116,104, 0,110,111,105,115,101,116,121,112,101, 0,110,111,105,115,101, 98, 97,115,105, -115, 0,110,111,105,115,101, 98, 97,115,105,115, 50, 0,105,109, 97,102,108, 97,103, 0, 99,114,111,112,120,109,105,110, 0, 99, -114,111,112,121,109,105,110, 0, 99,114,111,112,120,109, 97,120, 0, 99,114,111,112,121,109, 97,120, 0,116,101,120,102,105,108, -116,101,114, 0, 97,102,109, 97,120, 0,120,114,101,112,101, 97,116, 0,121,114,101,112,101, 97,116, 0,101,120,116,101,110,100, - 0, 99,104,101, 99,107,101,114,100,105,115,116, 0,110, 97, 98,108, 97, 0,105,117,115,101,114, 0, 42,110,111,100,101,116,114, -101,101, 0, 42,112,108,117,103,105,110, 0, 42, 99,111, 98, 97, 0, 42,101,110,118, 0,117,115,101, 95,110,111,100,101,115, 0, -112, 97,100, 91, 55, 93, 0,108,111, 99, 91, 51, 93, 0,114,111,116, 91, 51, 93, 0,109, 97,116, 91, 52, 93, 91, 52, 93, 0,109, -105,110, 91, 51, 93, 0,109, 97,120, 91, 51, 93, 0,109,111,100,101, 0,116,111,116,101,120, 0,115,104,100,119,114, 0,115,104, -100,119,103, 0,115,104,100,119, 98, 0,115,104,100,119,112, 97,100, 0,101,110,101,114,103,121, 0,100,105,115,116, 0,115,112, -111,116,115,105,122,101, 0,115,112,111,116, 98,108,101,110,100, 0,104, 97,105,110,116, 0, 97,116,116, 49, 0, 97,116,116, 50, - 0, 42, 99,117,114,102, 97,108,108,111,102,102, 0,102, 97,108,108,111,102,102, 95,116,121,112,101, 0,115,104, 97,100,115,112, -111,116,115,105,122,101, 0, 98,105, 97,115, 0,115,111,102,116, 0, 98,117,102,115,105,122,101, 0,115, 97,109,112, 0, 98,117, -102,102,101,114,115, 0,102,105,108,116,101,114,116,121,112,101, 0, 98,117,102,102,108, 97,103, 0, 98,117,102,116,121,112,101, - 0,114, 97,121, 95,115, 97,109,112, 0,114, 97,121, 95,115, 97,109,112,121, 0,114, 97,121, 95,115, 97,109,112,122, 0,114, 97, -121, 95,115, 97,109,112, 95,116,121,112,101, 0, 97,114,101, 97, 95,115,104, 97,112,101, 0, 97,114,101, 97, 95,115,105,122,101, - 0, 97,114,101, 97, 95,115,105,122,101,121, 0, 97,114,101, 97, 95,115,105,122,101,122, 0, 97,100, 97,112,116, 95,116,104,114, -101,115,104, 0,114, 97,121, 95,115, 97,109,112, 95,109,101,116,104,111,100, 0,116,101,120, 97, 99,116, 0,115,104, 97,100,104, - 97,108,111,115,116,101,112, 0,115,117,110, 95,101,102,102,101, 99,116, 95,116,121,112,101, 0,115,107,121, 98,108,101,110,100, -116,121,112,101, 0,104,111,114,105,122,111,110, 95, 98,114,105,103,104,116,110,101,115,115, 0,115,112,114,101, 97,100, 0,115, -117,110, 95, 98,114,105,103,104,116,110,101,115,115, 0,115,117,110, 95,115,105,122,101, 0, 98, 97, 99,107,115, 99, 97,116,116, -101,114,101,100, 95,108,105,103,104,116, 0,115,117,110, 95,105,110,116,101,110,115,105,116,121, 0, 97,116,109, 95,116,117,114, - 98,105,100,105,116,121, 0, 97,116,109, 95,105,110,115, 99, 97,116,116,101,114,105,110,103, 95,102, 97, 99,116,111,114, 0, 97, -116,109, 95,101,120,116,105,110, 99,116,105,111,110, 95,102, 97, 99,116,111,114, 0, 97,116,109, 95,100,105,115,116, 97,110, 99, -101, 95,102, 97, 99,116,111,114, 0,115,107,121, 98,108,101,110,100,102, 97, 99, 0,115,107,121, 95,101,120,112,111,115,117,114, -101, 0,115,107,121, 95, 99,111,108,111,114,115,112, 97, 99,101, 0,112, 97,100, 52, 0, 89, 70, 95,110,117,109,112,104,111,116, -111,110,115, 0, 89, 70, 95,110,117,109,115,101, 97,114, 99,104, 0, 89, 70, 95,112,104,100,101,112,116,104, 0, 89, 70, 95,117, -115,101,113,109, 99, 0, 89, 70, 95, 98,117,102,115,105,122,101, 0, 89, 70, 95,112, 97,100, 0, 89, 70, 95, 99, 97,117,115,116, -105, 99, 98,108,117,114, 0, 89, 70, 95,108,116,114, 97,100,105,117,115, 0, 89, 70, 95,103,108,111,119,105,110,116, 0, 89, 70, - 95,103,108,111,119,111,102,115, 0, 89, 70, 95,103,108,111,119,116,121,112,101, 0, 89, 70, 95,112, 97,100, 50, 0, 42,109,116, -101,120, 91, 49, 56, 93, 0,112,114, 95,116,101,120,116,117,114,101, 0,112, 97,100, 91, 51, 93, 0,109, 97,116,101,114,105, 97, -108, 95,116,121,112,101, 0,115,112,101, 99,114, 0,115,112,101, 99,103, 0,115,112,101, 99, 98, 0,109,105,114,114, 0,109,105, -114,103, 0,109,105,114, 98, 0, 97,109, 98,114, 0, 97,109, 98, 98, 0, 97,109, 98,103, 0, 97,109, 98, 0,101,109,105,116, 0, - 97,110,103, 0,115,112,101, 99,116,114, 97, 0,114, 97,121, 95,109,105,114,114,111,114, 0, 97,108,112,104, 97, 0,114,101,102, - 0,115,112,101, 99, 0,122,111,102,102,115, 0, 97,100,100, 0,116,114, 97,110,115,108,117, 99,101,110, 99,121, 0,102,114,101, -115,110,101,108, 95,109,105,114, 0,102,114,101,115,110,101,108, 95,109,105,114, 95,105, 0,102,114,101,115,110,101,108, 95,116, -114, 97, 0,102,114,101,115,110,101,108, 95,116,114, 97, 95,105, 0,102,105,108,116,101,114, 0,116,120, 95,108,105,109,105,116, - 0,116,120, 95,102, 97,108,108,111,102,102, 0,114, 97,121, 95,100,101,112,116,104, 0,114, 97,121, 95,100,101,112,116,104, 95, -116,114, 97, 0,104, 97,114, 0,115,101,101,100, 49, 0,115,101,101,100, 50, 0,103,108,111,115,115, 95,109,105,114, 0,103,108, -111,115,115, 95,116,114, 97, 0,115, 97,109,112, 95,103,108,111,115,115, 95,109,105,114, 0,115, 97,109,112, 95,103,108,111,115, -115, 95,116,114, 97, 0, 97,100, 97,112,116, 95,116,104,114,101,115,104, 95,109,105,114, 0, 97,100, 97,112,116, 95,116,104,114, -101,115,104, 95,116,114, 97, 0, 97,110,105,115,111, 95,103,108,111,115,115, 95,109,105,114, 0,100,105,115,116, 95,109,105,114, - 0,102, 97,100,101,116,111, 95,109,105,114, 0,115,104, 97,100,101, 95,102,108, 97,103, 0,109,111,100,101, 95,108, 0,102,108, - 97,114,101, 99, 0,115,116, 97,114, 99, 0,108,105,110,101, 99, 0,114,105,110,103, 99, 0,104, 97,115,105,122,101, 0,102,108, - 97,114,101,115,105,122,101, 0,115,117, 98,115,105,122,101, 0,102,108, 97,114,101, 98,111,111,115,116, 0,115,116,114, 97,110, -100, 95,115,116, 97, 0,115,116,114, 97,110,100, 95,101,110,100, 0,115,116,114, 97,110,100, 95,101, 97,115,101, 0,115,116,114, - 97,110,100, 95,115,117,114,102,110,111,114, 0,115,116,114, 97,110,100, 95,109,105,110, 0,115,116,114, 97,110,100, 95,119,105, -100,116,104,102, 97,100,101, 0,115,116,114, 97,110,100, 95,117,118,110, 97,109,101, 91, 51, 50, 93, 0,115, 98,105, 97,115, 0, -108, 98,105, 97,115, 0,115,104, 97,100, 95, 97,108,112,104, 97, 0,115,101,112,116,101,120, 0,114,103, 98,115,101,108, 0,112, -114, 95,116,121,112,101, 0,112,114, 95, 98, 97, 99,107, 0,112,114, 95,108, 97,109,112, 0,109,108, 95,102,108, 97,103, 0,100, -105,102,102, 95,115,104, 97,100,101,114, 0,115,112,101, 99, 95,115,104, 97,100,101,114, 0,114,111,117,103,104,110,101,115,115, - 0,114,101,102,114, 97, 99, 0,112, 97,114, 97,109, 91, 52, 93, 0,114,109,115, 0,100, 97,114,107,110,101,115,115, 0, 42,114, - 97,109,112, 95, 99,111,108, 0, 42,114, 97,109,112, 95,115,112,101, 99, 0,114, 97,109,112,105,110, 95, 99,111,108, 0,114, 97, -109,112,105,110, 95,115,112,101, 99, 0,114, 97,109,112, 98,108,101,110,100, 95, 99,111,108, 0,114, 97,109,112, 98,108,101,110, -100, 95,115,112,101, 99, 0,114, 97,109,112, 95,115,104,111,119, 0,112, 97,100, 51, 0,114, 97,109,112,102, 97, 99, 95, 99,111, -108, 0,114, 97,109,112,102, 97, 99, 95,115,112,101, 99, 0, 42,103,114,111,117,112, 0,102,114,105, 99,116,105,111,110, 0,102, -104, 0,114,101,102,108,101, 99,116, 0,102,104,100,105,115,116, 0,120,121,102,114,105, 99,116, 0,100,121,110, 97,109,111,100, -101, 0,115,115,115, 95,114, 97,100,105,117,115, 91, 51, 93, 0,115,115,115, 95, 99,111,108, 91, 51, 93, 0,115,115,115, 95,101, -114,114,111,114, 0,115,115,115, 95,115, 99, 97,108,101, 0,115,115,115, 95,105,111,114, 0,115,115,115, 95, 99,111,108,102, 97, - 99, 0,115,115,115, 95,116,101,120,102, 97, 99, 0,115,115,115, 95,102,114,111,110,116, 0,115,115,115, 95, 98, 97, 99,107, 0, -115,115,115, 95,102,108, 97,103, 0,115,115,115, 95,112,114,101,115,101,116, 0, 89, 70, 95, 97,114, 0, 89, 70, 95, 97,103, 0, - 89, 70, 95, 97, 98, 0, 89, 70, 95,100,115, 99, 97,108,101, 0, 89, 70, 95,100,112,119,114, 0, 89, 70, 95,100,115,109,112, 0, - 89, 70, 95,112,114,101,115,101,116, 0, 89, 70, 95,100,106,105,116, 0,103,112,117,109, 97,116,101,114,105, 97,108, 0,110, 97, -109,101, 91, 50, 53, 54, 93, 0, 42, 98, 98, 0,105, 49, 0,106, 49, 0,107, 49, 0,105, 50, 0,106, 50, 0,107, 50, 0,115,101, -108, 99,111,108, 49, 0,115,101,108, 99,111,108, 50, 0,113,117, 97,116, 91, 52, 93, 0,101,120,112,120, 0,101,120,112,121, 0, -101,120,112,122, 0,114, 97,100, 0,114, 97,100, 50, 0,115, 0, 42,109, 97,116, 0, 42,105,109, 97,116, 0,101,108,101,109,115, - 0,100,105,115,112, 0, 42,101,100,105,116,101,108,101,109,115, 0, 42, 42,109, 97,116, 0,116,111,116, 99,111,108, 0,119,105, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, + 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255, +255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, + 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +154, 0, 0,255,189, 17, 17,255,247, 10, 10,255, 0, 0, 0, 0,247, 64, 24,255,246,105, 19,255,250,153, 0,255, 0, 0, 0, 0, + 30,145, 9,255, 89,183, 11,255,131,239, 29,255, 0, 0, 0, 0, 10, 54,148,255, 54,103,223,255, 94,193,239,255, 0, 0, 0, 0, +169, 41, 78,255,193, 65,106,255,240, 93,145,255, 0, 0, 0, 0, 67, 12,120,255, 84, 58,163,255,135,100,213,255, 0, 0, 0, 0, + 36,120, 90,255, 60,149,121,255,111,182,171,255, 0, 0, 0, 0, 75,112,124,255,106,134,145,255,155,194,205,255, 0, 0, 0, 0, +244,201, 12,255,238,194, 54,255,243,255, 0,255, 0, 0, 0, 0, 30, 32, 36,255, 72, 76, 86,255,255,255,255,255, 0, 0, 0, 0, +111, 47,106,255,152, 69,190,255,211, 48,214,255, 0, 0, 0, 0,108,142, 34,255,127,176, 34,255,187,239, 91,255, 0, 0, 0, 0, +141,141,141,255,176,176,176,255,222,222,222,255, 0, 0, 0, 0,131, 67, 38,255,139, 88, 17,255,189,106, 17,255, 0, 0, 0, 0, + 8, 49, 14,255, 28, 67, 11,255, 52, 98, 43,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65,200, 21, 0, 0, 40,207, 13, 7,183, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,168, 3, 10, 7, 82,111,117,110, +100,101,100, 0, 0,101,119, 32, 85,115,101,114, 32, 84,104,101,109,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,255, +153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,255, +153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 1, 0, 25, 0,231,255, 0, 0, 25, 25, 25,255, +153,153,153,255,153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, 1, 0, 0, 0, 25, 0, 0, 0, 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, 15, 0,241,255, 0, 0, 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, 0, 15, 0,241,255, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,255, +180,180,180,255,153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, 1, 0,236,255, 0, 0, 0, 0, 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,236,255, 0, 0, 0, 0, 0, 0, 0,255, + 70, 70, 70,255, 70, 70, 70,255,255,255,255,255,255,255,255,255,204,204,204,255, 1, 0, 15, 0,241,255, 0, 0, 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, 0, 25, 0,236,255, 0, 0, 0, 0, 0,255, + 25, 25, 25,230, 46,124,217,204,255,255,255,255,255,255,255,255, 0, 0, 0,255, 0, 0, 25, 0,236,255, 0, 0, 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, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,107,107,107,255, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,175,175,175, 51, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100, +127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, + 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, + 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 51, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0,143,143,143,255, 0, 0, 0,255, +217,217,217,255, 0, 0, 0, 40,255,255,255,255, 16, 64, 16,255,102,255,102,255,255,130, 0,255, 0, 0, 0,255,255,130, 0,255, + 0, 0, 0,255,255,255,255,255,230,150, 50,255,255, 32, 32,255, 0, 0, 0, 0,255,255,255, 10,255,130, 0, 60,255,138, 48,255, + 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, + 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,107,107,107,255, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100, +127,112,112,100,255,130, 0,255, 88, 88, 88,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, + 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, + 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,107,107,107,150, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,107,107,107,100,143,143,143,100, 96,192, 64,255, 94, 94, 94,255, 0, 0, 0,255, +255,136,255,255, 0, 0, 0, 0,255,187,255,255, 79,101, 73,255,135,177,125,255,255,255,255,255,255,255,255,255,255,130, 0,255, + 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 82, 96,110,255,124,137,150,255, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255, +255,130, 0,255, 2, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,107,107,107,255, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100, +127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, + 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,158,158,158,255, + 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,158,158,158,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,140,140,140,255,127,112,112,100, 0, 0, 0, 0,112,112, 96,255, 0, 0, 0,255, +255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, + 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,107,107,107,255, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,107,107,107,255, +178,178,178,100,255,130, 0,100, 94, 94, 94,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 79,101, 73,255, +135,177,125,255,255,255,255,255,255,112,255,255,255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,143,143,143,255,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,228,156,198,204, +255,255,170,204, 96,192, 64,255, 82, 96,110,255,124,137,150,255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, + 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,143,143,143,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,107,107,107,255,178,178,178,100,255,130, 0,100, 94, 94, 94,255, 0, 0, 0,255, +255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, + 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,228,156,198,255,255,255,170,255, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,107,107,107,255, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100, +127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, + 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,130, 0,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,200,255,255, 0, 0, 0, 0, + 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 81,105,135,255,109, 88,129,255, 78,152, 62,255, 46,143,143,255,169, 84,124,255,126,126, 80,255, +162, 95,111,255,109,145,131,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 53, 53,255, + 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,195,195,195,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255, 0, 0, 0,255, +255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, + 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60,255,133, 0,255, + 0, 0, 0, 0, 0, 0, 0, 0, 80,200,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,195,195,195,255, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,143,143,143,255, +127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, + 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,153,153,153,255, + 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,153,153,153,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,143,143,143,255,198,119,119,255,255, 0, 0,255, 88, 88, 88,255, 0, 0, 0,255, +255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, + 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 0, 0, 0,100, 0, 0,255, 0, 0,200,255,128, 0, 80,255, 95, 95, 0,255, 0,100, 50,255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,107,107,107,255, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100, +127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, + 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,158,158,158,255, + 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,158,158,158,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,140,140,140,255,127,112,112,100, 0, 0, 0, 0,112,112, 96,255, 0, 0, 0,255, +255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, + 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,107,107,107,255, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 51, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100, +127,112,112,100, 0, 0, 0, 0,143,143,143,255, 0, 0, 0,255,217,217,217,255, 0, 0, 0, 40,255,255,255,255, 0, 0, 0, 0, + 0, 0, 0, 0,255,130, 0,255, 0, 0, 0,255,255,130, 0,255, 0, 0, 0,255,255,255,255,255,230,150, 50,255, 0, 0, 0, 0, + 0, 0, 0, 0,255,255,255, 10,255,130, 0, 60,255,138, 48,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0,150,150,150,255,129,131,144,255,127,127,127,255, +142,138,145,255,120,145,120,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100,100,100,255, + 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 51, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0,143,143,143,255, 0, 0, 0,255, +217,217,217,255, 0, 0, 0, 40,255,255,255,255, 16, 64, 16,255,102,255,102,255,255,130, 0,255, 0, 0, 0,255,255,130, 0,255, + 0, 0, 0,255,255,255,255,255,230,150, 50,255,255, 32, 32,255, 0, 0, 0, 0,255,255,255, 10,255,130, 0, 60,255,138, 48,255, + 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, + 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, + 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154, 0, 0,255, +189, 17, 17,255,247, 10, 10,255, 0, 0, 0, 0,247, 64, 24,255,246,105, 19,255,250,153, 0,255, 0, 0, 0, 0, 30,145, 9,255, + 89,183, 11,255,131,239, 29,255, 0, 0, 0, 0, 10, 54,148,255, 54,103,223,255, 94,193,239,255, 0, 0, 0, 0,169, 41, 78,255, +193, 65,106,255,240, 93,145,255, 0, 0, 0, 0, 67, 12,120,255, 84, 58,163,255,135,100,213,255, 0, 0, 0, 0, 36,120, 90,255, + 60,149,121,255,111,182,171,255, 0, 0, 0, 0, 75,112,124,255,106,134,145,255,155,194,205,255, 0, 0, 0, 0,244,201, 12,255, +238,194, 54,255,243,255, 0,255, 0, 0, 0, 0, 30, 32, 36,255, 72, 76, 86,255,255,255,255,255, 0, 0, 0, 0,111, 47,106,255, +152, 69,190,255,211, 48,214,255, 0, 0, 0, 0,108,142, 34,255,127,176, 34,255,187,239, 91,255, 0, 0, 0, 0,141,141,141,255, +176,176,176,255,222,222,222,255, 0, 0, 0, 0,131, 67, 38,255,139, 88, 17,255,189,106, 17,255, 0, 0, 0, 0, 8, 49, 14,255, + 28, 67, 11,255, 52, 98, 43,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 78, 65, 49, + 28,222, 0, 0, 32, 80, 6, 7, 0, 0, 0, 0, 1, 0, 0, 0, 83, 68, 78, 65, 78, 65, 77, 69,212, 10, 0, 0, 42,110,101,120, +116, 0, 42,112,114,101,118, 0, 42,100, 97,116, 97, 0, 42,102,105,114,115,116, 0, 42,108, 97,115,116, 0,120, 0,121, 0,122, + 0,119, 0,120,109,105,110, 0,120,109, 97,120, 0,121,109,105,110, 0,121,109, 97,120, 0, 42,112,111,105,110,116,101,114, 0, +103,114,111,117,112, 0,118, 97,108, 0,118, 97,108, 50, 0,116,121,112,101, 0,115,117, 98,116,121,112,101, 0,102,108, 97,103, + 0,110, 97,109,101, 91, 51, 50, 93, 0,115, 97,118,101,100, 0,100, 97,116, 97, 0,108,101,110, 0,116,111,116, 97,108,108,101, +110, 0, 42,110,101,119,105,100, 0, 42,108,105, 98, 0,110, 97,109,101, 91, 50, 52, 93, 0,117,115, 0,105, 99,111,110, 95,105, +100, 0, 42,112,114,111,112,101,114,116,105,101,115, 0,105,100, 0, 42,105,100, 98,108,111, 99,107, 0, 42,102,105,108,101,100, + 97,116, 97, 0,110, 97,109,101, 91, 50, 52, 48, 93, 0,102,105,108,101,110, 97,109,101, 91, 50, 52, 48, 93, 0,116,111,116, 0, +112, 97,100, 0, 42,112, 97,114,101,110,116, 0,119, 91, 50, 93, 0,104, 91, 50, 93, 0, 99,104, 97,110,103,101,100, 91, 50, 93, + 0,112, 97,100, 48, 0,112, 97,100, 49, 0, 42,114,101, 99,116, 91, 50, 93, 0, 42,111, 98, 0, 98,108,111, 99,107,116,121,112, +101, 0, 97,100,114, 99,111,100,101, 0,110, 97,109,101, 91, 49, 50, 56, 93, 0, 42, 98,112, 0, 42, 98,101,122,116, 0,109, 97, +120,114, 99,116, 0,116,111,116,114, 99,116, 0,118, 97,114,116,121,112,101, 0,116,111,116,118,101,114,116, 0,105,112,111, 0, +101,120,116,114, 97,112, 0,114,116, 0, 98,105,116,109, 97,115,107, 0,115,108,105,100,101, 95,109,105,110, 0,115,108,105,100, +101, 95,109, 97,120, 0, 99,117,114,118, 97,108, 0, 42,100,114,105,118,101,114, 0, 99,117,114,118,101, 0, 99,117,114, 0,115, +104,111,119,107,101,121, 0,109,117,116,101,105,112,111, 0,112,111,115, 0,114,101,108, 97,116,105,118,101, 0,116,111,116,101, +108,101,109, 0,112, 97,100, 50, 0, 42,119,101,105,103,104,116,115, 0,118,103,114,111,117,112, 91, 51, 50, 93, 0,115,108,105, +100,101,114,109,105,110, 0,115,108,105,100,101,114,109, 97,120, 0, 42, 97,100,116, 0, 42,114,101,102,107,101,121, 0,101,108, +101,109,115,116,114, 91, 51, 50, 93, 0,101,108,101,109,115,105,122,101, 0, 98,108,111, 99,107, 0, 42,105,112,111, 0, 42,102, +114,111,109, 0,116,111,116,107,101,121, 0,115,108,117,114,112,104, 0, 42,108,105,110,101, 0, 42,102,111,114,109, 97,116, 0, + 98,108,101,110, 0,108,105,110,101,110,111, 0,115,116, 97,114,116, 0,101,110,100, 0,102,108, 97,103,115, 0, 99,111,108,111, +114, 91, 52, 93, 0,112, 97,100, 91, 52, 93, 0, 42,110, 97,109,101, 0,110,108,105,110,101,115, 0,108,105,110,101,115, 0, 42, + 99,117,114,108, 0, 42,115,101,108,108, 0, 99,117,114, 99, 0,115,101,108, 99, 0,109, 97,114,107,101,114,115, 0, 42,117,110, +100,111, 95, 98,117,102, 0,117,110,100,111, 95,112,111,115, 0,117,110,100,111, 95,108,101,110, 0, 42, 99,111,109,112,105,108, +101,100, 0,109,116,105,109,101, 0,115,105,122,101, 0,115,101,101,107, 0,112, 97,115,115,101,112, 97,114,116, 97,108,112,104, + 97, 0, 97,110,103,108,101, 0, 99,108,105,112,115,116, 97, 0, 99,108,105,112,101,110,100, 0,108,101,110,115, 0,111,114,116, +104,111, 95,115, 99, 97,108,101, 0,100,114, 97,119,115,105,122,101, 0,115,104,105,102,116,120, 0,115,104,105,102,116,121, 0, + 89, 70, 95,100,111,102,100,105,115,116, 0, 89, 70, 95, 97,112,101,114,116,117,114,101, 0, 89, 70, 95, 98,107,104,116,121,112, +101, 0, 89, 70, 95, 98,107,104, 98,105, 97,115, 0, 89, 70, 95, 98,107,104,114,111,116, 0, 42,100,111,102, 95,111, 98, 0,102, +114, 97,109,101,110,114, 0,102,114, 97,109,101,115, 0,111,102,102,115,101,116, 0,115,102,114, 97, 0,102,105,101, 95,105,109, + 97, 0, 99,121, 99,108, 0,111,107, 0,109,117,108,116,105, 95,105,110,100,101,120, 0,108, 97,121,101,114, 0,112, 97,115,115, + 0,109,101,110,117,110,114, 0, 42,115, 99,101,110,101, 0,105, 98,117,102,115, 0, 42,103,112,117,116,101,120,116,117,114,101, + 0, 42, 97,110,105,109, 0, 42,114,114, 0,115,111,117,114, 99,101, 0,108, 97,115,116,102,114, 97,109,101, 0,116,112, 97,103, +101,102,108, 97,103, 0,116,111,116, 98,105,110,100, 0,120,114,101,112, 0,121,114,101,112, 0,116,119,115,116, 97, 0,116,119, +101,110,100, 0, 98,105,110,100, 99,111,100,101, 0, 42,114,101,112, 98,105,110,100, 0, 42,112, 97, 99,107,101,100,102,105,108, +101, 0, 42,112,114,101,118,105,101,119, 0, 42,114,101,110,100,101,114, 95,116,101,120,116, 0,108, 97,115,116,117,112,100, 97, +116,101, 0,108, 97,115,116,117,115,101,100, 0, 97,110,105,109,115,112,101,101,100, 0,103,101,110, 95,120, 0,103,101,110, 95, +121, 0,103,101,110, 95,116,121,112,101, 0, 97,115,112,120, 0, 97,115,112,121, 0,116,101,120, 99,111, 0,109, 97,112,116,111, + 0,109, 97,112,116,111,110,101,103, 0, 98,108,101,110,100,116,121,112,101, 0, 42,111, 98,106,101, 99,116, 0, 42,116,101,120, + 0,117,118,110, 97,109,101, 91, 51, 50, 93, 0,112,114,111,106,120, 0,112,114,111,106,121, 0,112,114,111,106,122, 0,109, 97, +112,112,105,110,103, 0,111,102,115, 91, 51, 93, 0,115,105,122,101, 91, 51, 93, 0,114,111,116, 0,116,101,120,102,108, 97,103, + 0, 99,111,108,111,114,109,111,100,101,108, 0,112,109, 97,112,116,111, 0,112,109, 97,112,116,111,110,101,103, 0,110,111,114, +109, 97,112,115,112, 97, 99,101, 0,119,104,105, 99,104, 95,111,117,116,112,117,116, 0, 98,114,117,115,104, 95,109, 97,112, 95, +109,111,100,101, 0,112, 97,100, 91, 55, 93, 0,114, 0,103, 0, 98, 0,107, 0,100,101,102, 95,118, 97,114, 0, 99,111,108,102, + 97, 99, 0,110,111,114,102, 97, 99, 0,118, 97,114,102, 97, 99, 0,100,105,115,112,102, 97, 99, 0,119, 97,114,112,102, 97, 99, + 0,110, 97,109,101, 91, 49, 54, 48, 93, 0, 42,104, 97,110,100,108,101, 0, 42,112,110, 97,109,101, 0, 42,115,116,110, 97,109, +101,115, 0,115,116,121,112,101,115, 0,118, 97,114,115, 0, 42,118, 97,114,115,116,114, 0, 42,114,101,115,117,108,116, 0, 42, + 99,102,114, 97, 0,100, 97,116, 97, 91, 51, 50, 93, 0, 40, 42,100,111,105,116, 41, 40, 41, 0, 40, 42,105,110,115,116, 97,110, + 99,101, 95,105,110,105,116, 41, 40, 41, 0, 40, 42, 99, 97,108,108, 98, 97, 99,107, 41, 40, 41, 0,118,101,114,115,105,111,110, + 0, 97, 0,105,112,111,116,121,112,101, 0, 42,105,109, 97, 0, 42, 99,117, 98,101, 91, 54, 93, 0,105,109, 97,116, 91, 52, 93, + 91, 52, 93, 0,111, 98,105,109, 97,116, 91, 51, 93, 91, 51, 93, 0,115,116,121,112,101, 0,118,105,101,119,115, 99, 97,108,101, + 0,110,111,116,108, 97,121, 0, 99,117, 98,101,114,101,115, 0,100,101,112,116,104, 0,114,101, 99, 97,108, 99, 0,108, 97,115, +116,115,105,122,101, 0,102, 97,108,108,111,102,102, 95,116,121,112,101, 0,102, 97,108,108,111,102,102, 95,115,111,102,116,110, +101,115,115, 0,114, 97,100,105,117,115, 0, 99,111,108,111,114, 95,115,111,117,114, 99,101, 0,116,111,116,112,111,105,110,116, +115, 0,112,100,112, 97,100, 0, 42,112,115,121,115, 0,112,115,121,115, 95, 99, 97, 99,104,101, 95,115,112, 97, 99,101, 0,111, + 98, 95, 99, 97, 99,104,101, 95,115,112, 97, 99,101, 0,112,100,112, 97,100, 50, 91, 50, 93, 0, 42,112,111,105,110,116, 95,116, +114,101,101, 0, 42,112,111,105,110,116, 95,100, 97,116, 97, 0,110,111,105,115,101, 95,115,105,122,101, 0,110,111,105,115,101, + 95,100,101,112,116,104, 0,110,111,105,115,101, 95,105,110,102,108,117,101,110, 99,101, 0,110,111,105,115,101, 95, 98, 97,115, +105,115, 0,112,100,112, 97,100, 51, 91, 51, 93, 0,110,111,105,115,101, 95,102, 97, 99, 0,115,112,101,101,100, 95,115, 99, 97, +108,101, 0, 42, 99,111, 98, 97, 0,114,101,115,111,108, 91, 51, 93, 0,105,110,116,101,114,112, 95,116,121,112,101, 0,102,105, +108,101, 95,102,111,114,109, 97,116, 0,105,110,116, 95,109,117,108,116,105,112,108,105,101,114, 0,115,116,105,108,108, 95,102, +114, 97,109,101, 0,115,111,117,114, 99,101, 95,112, 97,116,104, 91, 50, 52, 48, 93, 0, 42,100, 97,116, 97,115,101,116, 0,110, +111,105,115,101,115,105,122,101, 0,116,117,114, 98,117,108, 0, 98,114,105,103,104,116, 0, 99,111,110,116,114, 97,115,116, 0, +114,102, 97, 99, 0,103,102, 97, 99, 0, 98,102, 97, 99, 0,102,105,108,116,101,114,115,105,122,101, 0,109,103, 95, 72, 0,109, +103, 95,108, 97, 99,117,110, 97,114,105,116,121, 0,109,103, 95,111, 99,116, 97,118,101,115, 0,109,103, 95,111,102,102,115,101, +116, 0,109,103, 95,103, 97,105,110, 0,100,105,115,116, 95, 97,109,111,117,110,116, 0,110,115, 95,111,117,116,115, 99, 97,108, +101, 0,118,110, 95,119, 49, 0,118,110, 95,119, 50, 0,118,110, 95,119, 51, 0,118,110, 95,119, 52, 0,118,110, 95,109,101,120, +112, 0,118,110, 95,100,105,115,116,109, 0,118,110, 95, 99,111,108,116,121,112,101, 0,110,111,105,115,101,100,101,112,116,104, + 0,110,111,105,115,101,116,121,112,101, 0,110,111,105,115,101, 98, 97,115,105,115, 0,110,111,105,115,101, 98, 97,115,105,115, + 50, 0,105,109, 97,102,108, 97,103, 0, 99,114,111,112,120,109,105,110, 0, 99,114,111,112,121,109,105,110, 0, 99,114,111,112, +120,109, 97,120, 0, 99,114,111,112,121,109, 97,120, 0,116,101,120,102,105,108,116,101,114, 0, 97,102,109, 97,120, 0,120,114, +101,112,101, 97,116, 0,121,114,101,112,101, 97,116, 0,101,120,116,101,110,100, 0, 99,104,101, 99,107,101,114,100,105,115,116, + 0,110, 97, 98,108, 97, 0,105,117,115,101,114, 0, 42,110,111,100,101,116,114,101,101, 0, 42,112,108,117,103,105,110, 0, 42, +101,110,118, 0, 42,112,100, 0, 42,118,100, 0,117,115,101, 95,110,111,100,101,115, 0,108,111, 99, 91, 51, 93, 0,114,111,116, + 91, 51, 93, 0,109, 97,116, 91, 52, 93, 91, 52, 93, 0,109,105,110, 91, 51, 93, 0,109, 97,120, 91, 51, 93, 0,109,111,100,101, + 0,116,111,116,101,120, 0,115,104,100,119,114, 0,115,104,100,119,103, 0,115,104,100,119, 98, 0,115,104,100,119,112, 97,100, + 0,101,110,101,114,103,121, 0,100,105,115,116, 0,115,112,111,116,115,105,122,101, 0,115,112,111,116, 98,108,101,110,100, 0, +104, 97,105,110,116, 0, 97,116,116, 49, 0, 97,116,116, 50, 0, 42, 99,117,114,102, 97,108,108,111,102,102, 0,115,104, 97,100, +115,112,111,116,115,105,122,101, 0, 98,105, 97,115, 0,115,111,102,116, 0, 98,117,102,115,105,122,101, 0,115, 97,109,112, 0, + 98,117,102,102,101,114,115, 0,102,105,108,116,101,114,116,121,112,101, 0, 98,117,102,102,108, 97,103, 0, 98,117,102,116,121, +112,101, 0,114, 97,121, 95,115, 97,109,112, 0,114, 97,121, 95,115, 97,109,112,121, 0,114, 97,121, 95,115, 97,109,112,122, 0, +114, 97,121, 95,115, 97,109,112, 95,116,121,112,101, 0, 97,114,101, 97, 95,115,104, 97,112,101, 0, 97,114,101, 97, 95,115,105, +122,101, 0, 97,114,101, 97, 95,115,105,122,101,121, 0, 97,114,101, 97, 95,115,105,122,101,122, 0, 97,100, 97,112,116, 95,116, +104,114,101,115,104, 0,114, 97,121, 95,115, 97,109,112, 95,109,101,116,104,111,100, 0,116,101,120, 97, 99,116, 0,115,104, 97, +100,104, 97,108,111,115,116,101,112, 0,115,117,110, 95,101,102,102,101, 99,116, 95,116,121,112,101, 0,115,107,121, 98,108,101, +110,100,116,121,112,101, 0,104,111,114,105,122,111,110, 95, 98,114,105,103,104,116,110,101,115,115, 0,115,112,114,101, 97,100, + 0,115,117,110, 95, 98,114,105,103,104,116,110,101,115,115, 0,115,117,110, 95,115,105,122,101, 0, 98, 97, 99,107,115, 99, 97, +116,116,101,114,101,100, 95,108,105,103,104,116, 0,115,117,110, 95,105,110,116,101,110,115,105,116,121, 0, 97,116,109, 95,116, +117,114, 98,105,100,105,116,121, 0, 97,116,109, 95,105,110,115, 99, 97,116,116,101,114,105,110,103, 95,102, 97, 99,116,111,114, + 0, 97,116,109, 95,101,120,116,105,110, 99,116,105,111,110, 95,102, 97, 99,116,111,114, 0, 97,116,109, 95,100,105,115,116, 97, +110, 99,101, 95,102, 97, 99,116,111,114, 0,115,107,121, 98,108,101,110,100,102, 97, 99, 0,115,107,121, 95,101,120,112,111,115, +117,114,101, 0,115,107,121, 95, 99,111,108,111,114,115,112, 97, 99,101, 0,112, 97,100, 52, 0, 89, 70, 95,110,117,109,112,104, +111,116,111,110,115, 0, 89, 70, 95,110,117,109,115,101, 97,114, 99,104, 0, 89, 70, 95,112,104,100,101,112,116,104, 0, 89, 70, + 95,117,115,101,113,109, 99, 0, 89, 70, 95, 98,117,102,115,105,122,101, 0, 89, 70, 95,112, 97,100, 0, 89, 70, 95, 99, 97,117, +115,116,105, 99, 98,108,117,114, 0, 89, 70, 95,108,116,114, 97,100,105,117,115, 0, 89, 70, 95,103,108,111,119,105,110,116, 0, + 89, 70, 95,103,108,111,119,111,102,115, 0, 89, 70, 95,103,108,111,119,116,121,112,101, 0, 89, 70, 95,112, 97,100, 50, 0, 42, +109,116,101,120, 91, 49, 56, 93, 0,112,114, 95,116,101,120,116,117,114,101, 0,112, 97,100, 91, 51, 93, 0,100,101,110,115,105, +116,121, 0,101,109,105,115,115,105,111,110, 0, 97, 98,115,111,114,112,116,105,111,110, 0,115, 99, 97,116,116,101,114,105,110, +103, 0,101,109,105,115,115,105,111,110, 95, 99,111,108, 91, 51, 93, 0, 97, 98,115,111,114,112,116,105,111,110, 95, 99,111,108, + 91, 51, 93, 0,100,101,110,115,105,116,121, 95,115, 99, 97,108,101, 0,100,101,112,116,104, 95, 99,117,116,111,102,102, 0,112, +104, 97,115,101,102,117,110, 99, 95,116,121,112,101, 0,118,112, 97,100, 91, 51, 93, 0,112,104, 97,115,101,102,117,110, 99, 95, +103, 0,115,116,101,112,115,105,122,101, 0,115,104, 97,100,101, 95,115,116,101,112,115,105,122,101, 0,115,116,101,112,115,105, +122,101, 95,116,121,112,101, 0,115,104, 97,100,101,102,108, 97,103, 0,115,104, 97,100,101, 95,116,121,112,101, 0,112,114,101, + 99, 97, 99,104,101, 95,114,101,115,111,108,117,116,105,111,110, 0,109,115, 95,100,105,102,102, 0,109,115, 95,105,110,116,101, +110,115,105,116,121, 0,109,115, 95,115,116,101,112,115, 0,109, 97,116,101,114,105, 97,108, 95,116,121,112,101, 0,115,112,101, + 99,114, 0,115,112,101, 99,103, 0,115,112,101, 99, 98, 0,109,105,114,114, 0,109,105,114,103, 0,109,105,114, 98, 0, 97,109, + 98,114, 0, 97,109, 98, 98, 0, 97,109, 98,103, 0, 97,109, 98, 0,101,109,105,116, 0, 97,110,103, 0,115,112,101, 99,116,114, + 97, 0,114, 97,121, 95,109,105,114,114,111,114, 0, 97,108,112,104, 97, 0,114,101,102, 0,115,112,101, 99, 0,122,111,102,102, +115, 0, 97,100,100, 0,116,114, 97,110,115,108,117, 99,101,110, 99,121, 0,118,111,108, 0,102,114,101,115,110,101,108, 95,109, +105,114, 0,102,114,101,115,110,101,108, 95,109,105,114, 95,105, 0,102,114,101,115,110,101,108, 95,116,114, 97, 0,102,114,101, +115,110,101,108, 95,116,114, 97, 95,105, 0,102,105,108,116,101,114, 0,116,120, 95,108,105,109,105,116, 0,116,120, 95,102, 97, +108,108,111,102,102, 0,114, 97,121, 95,100,101,112,116,104, 0,114, 97,121, 95,100,101,112,116,104, 95,116,114, 97, 0,104, 97, +114, 0,115,101,101,100, 49, 0,115,101,101,100, 50, 0,103,108,111,115,115, 95,109,105,114, 0,103,108,111,115,115, 95,116,114, + 97, 0,115, 97,109,112, 95,103,108,111,115,115, 95,109,105,114, 0,115, 97,109,112, 95,103,108,111,115,115, 95,116,114, 97, 0, + 97,100, 97,112,116, 95,116,104,114,101,115,104, 95,109,105,114, 0, 97,100, 97,112,116, 95,116,104,114,101,115,104, 95,116,114, + 97, 0, 97,110,105,115,111, 95,103,108,111,115,115, 95,109,105,114, 0,100,105,115,116, 95,109,105,114, 0,102, 97,100,101,116, +111, 95,109,105,114, 0,115,104, 97,100,101, 95,102,108, 97,103, 0,109,111,100,101, 95,108, 0,102,108, 97,114,101, 99, 0,115, +116, 97,114, 99, 0,108,105,110,101, 99, 0,114,105,110,103, 99, 0,104, 97,115,105,122,101, 0,102,108, 97,114,101,115,105,122, +101, 0,115,117, 98,115,105,122,101, 0,102,108, 97,114,101, 98,111,111,115,116, 0,115,116,114, 97,110,100, 95,115,116, 97, 0, +115,116,114, 97,110,100, 95,101,110,100, 0,115,116,114, 97,110,100, 95,101, 97,115,101, 0,115,116,114, 97,110,100, 95,115,117, +114,102,110,111,114, 0,115,116,114, 97,110,100, 95,109,105,110, 0,115,116,114, 97,110,100, 95,119,105,100,116,104,102, 97,100, +101, 0,115,116,114, 97,110,100, 95,117,118,110, 97,109,101, 91, 51, 50, 93, 0,115, 98,105, 97,115, 0,108, 98,105, 97,115, 0, +115,104, 97,100, 95, 97,108,112,104, 97, 0,115,101,112,116,101,120, 0,114,103, 98,115,101,108, 0,112,114, 95,116,121,112,101, + 0,112,114, 95, 98, 97, 99,107, 0,112,114, 95,108, 97,109,112, 0,109,108, 95,102,108, 97,103, 0,100,105,102,102, 95,115,104, + 97,100,101,114, 0,115,112,101, 99, 95,115,104, 97,100,101,114, 0,114,111,117,103,104,110,101,115,115, 0,114,101,102,114, 97, + 99, 0,112, 97,114, 97,109, 91, 52, 93, 0,114,109,115, 0,100, 97,114,107,110,101,115,115, 0, 42,114, 97,109,112, 95, 99,111, +108, 0, 42,114, 97,109,112, 95,115,112,101, 99, 0,114, 97,109,112,105,110, 95, 99,111,108, 0,114, 97,109,112,105,110, 95,115, +112,101, 99, 0,114, 97,109,112, 98,108,101,110,100, 95, 99,111,108, 0,114, 97,109,112, 98,108,101,110,100, 95,115,112,101, 99, + 0,114, 97,109,112, 95,115,104,111,119, 0,112, 97,100, 51, 0,114, 97,109,112,102, 97, 99, 95, 99,111,108, 0,114, 97,109,112, +102, 97, 99, 95,115,112,101, 99, 0, 42,103,114,111,117,112, 0,102,114,105, 99,116,105,111,110, 0,102,104, 0,114,101,102,108, +101, 99,116, 0,102,104,100,105,115,116, 0,120,121,102,114,105, 99,116, 0,100,121,110, 97,109,111,100,101, 0,115,115,115, 95, +114, 97,100,105,117,115, 91, 51, 93, 0,115,115,115, 95, 99,111,108, 91, 51, 93, 0,115,115,115, 95,101,114,114,111,114, 0,115, +115,115, 95,115, 99, 97,108,101, 0,115,115,115, 95,105,111,114, 0,115,115,115, 95, 99,111,108,102, 97, 99, 0,115,115,115, 95, +116,101,120,102, 97, 99, 0,115,115,115, 95,102,114,111,110,116, 0,115,115,115, 95, 98, 97, 99,107, 0,115,115,115, 95,102,108, + 97,103, 0,115,115,115, 95,112,114,101,115,101,116, 0, 89, 70, 95, 97,114, 0, 89, 70, 95, 97,103, 0, 89, 70, 95, 97, 98, 0, + 89, 70, 95,100,115, 99, 97,108,101, 0, 89, 70, 95,100,112,119,114, 0, 89, 70, 95,100,115,109,112, 0, 89, 70, 95,112,114,101, +115,101,116, 0, 89, 70, 95,100,106,105,116, 0,103,112,117,109, 97,116,101,114,105, 97,108, 0,110, 97,109,101, 91, 50, 53, 54, + 93, 0, 42, 98, 98, 0,105, 49, 0,106, 49, 0,107, 49, 0,105, 50, 0,106, 50, 0,107, 50, 0,115,101,108, 99,111,108, 49, 0, +115,101,108, 99,111,108, 50, 0,113,117, 97,116, 91, 52, 93, 0,101,120,112,120, 0,101,120,112,121, 0,101,120,112,122, 0,114, + 97,100, 0,114, 97,100, 50, 0,115, 0, 42,109, 97,116, 0, 42,105,109, 97,116, 0,101,108,101,109,115, 0,100,105,115,112, 0, + 42,101,100,105,116,101,108,101,109,115, 0, 42, 42,109, 97,116, 0,102,108, 97,103, 50, 0,116,111,116, 99,111,108, 0,119,105, 114,101,115,105,122,101, 0,114,101,110,100,101,114,115,105,122,101, 0,116,104,114,101,115,104, 0, 42,108, 97,115,116,101,108, -101,109, 0,118,101, 99, 91, 51, 93, 91, 51, 93, 0, 97,108,102, 97, 0,119,101,105,103,104,116, 0,114, 97,100,105,117,115, 0, -104, 49, 0,104, 50, 0,102, 49, 0,102, 50, 0,102, 51, 0,104,105,100,101, 0,118,101, 99, 91, 52, 93, 0,109, 97,116, 95,110, -114, 0,112,110,116,115,117, 0,112,110,116,115,118, 0,114,101,115,111,108,117, 0,114,101,115,111,108,118, 0,111,114,100,101, -114,117, 0,111,114,100,101,114,118, 0,102,108, 97,103,117, 0,102,108, 97,103,118, 0, 42,107,110,111,116,115,117, 0, 42,107, -110,111,116,115,118, 0,116,105,108,116, 95,105,110,116,101,114,112, 0,114, 97,100,105,117,115, 95,105,110,116,101,114,112, 0, - 99,104, 97,114,105,100,120, 0,107,101,114,110, 0,104, 0,110,117,114, 98, 0, 42,101,100,105,116,110,117,114, 98, 0, 42, 98, -101,118,111, 98,106, 0, 42,116, 97,112,101,114,111, 98,106, 0, 42,116,101,120,116,111,110, 99,117,114,118,101, 0, 42,112, 97, -116,104, 0, 42,107,101,121, 0, 98,101,118, 0,112, 97,116,104,108,101,110, 0, 98,101,118,114,101,115,111,108, 0,119,105,100, -116,104, 0,101,120,116, 49, 0,101,120,116, 50, 0,114,101,115,111,108,117, 95,114,101,110, 0,114,101,115,111,108,118, 95,114, -101,110, 0, 97, 99,116,110,117, 0, 42,108, 97,115,116,115,101,108, 98,112, 0,115,112, 97, 99,101,109,111,100,101, 0,115,112, - 97, 99,105,110,103, 0,108,105,110,101,100,105,115,116, 0,115,104,101, 97,114, 0,102,115,105,122,101, 0,119,111,114,100,115, -112, 97, 99,101, 0,117,108,112,111,115, 0,117,108,104,101,105,103,104,116, 0,120,111,102, 0,121,111,102, 0,108,105,110,101, -119,105,100,116,104, 0, 42,115,116,114, 0, 42,115,101,108, 98,111,120,101,115, 0, 42,101,100,105,116,102,111,110,116, 0,102, - 97,109,105,108,121, 91, 50, 52, 93, 0, 42,118,102,111,110,116, 0, 42,118,102,111,110,116, 98, 0, 42,118,102,111,110,116,105, - 0, 42,118,102,111,110,116, 98,105, 0,115,101,112, 99,104, 97,114, 0, 99,116,105,109,101, 0,116,111,116, 98,111,120, 0, 97, - 99,116, 98,111,120, 0, 42,116, 98, 0,115,101,108,115,116, 97,114,116, 0,115,101,108,101,110,100, 0, 42,115,116,114,105,110, -102,111, 0, 99,117,114,105,110,102,111, 0,101,102,102,101, 99,116, 0, 42,109,102, 97, 99,101, 0, 42,109,116,102, 97, 99,101, - 0, 42,116,102, 97, 99,101, 0, 42,109,118,101,114,116, 0, 42,109,101,100,103,101, 0, 42,100,118,101,114,116, 0, 42,109, 99, -111,108, 0, 42,109,115,116,105, 99,107,121, 0, 42,116,101,120, 99,111,109,101,115,104, 0, 42,109,115,101,108,101, 99,116, 0, - 42,101,100,105,116, 95,109,101,115,104, 0,118,100, 97,116, 97, 0,101,100, 97,116, 97, 0,102,100, 97,116, 97, 0,116,111,116, -101,100,103,101, 0,116,111,116,102, 97, 99,101, 0,116,111,116,115,101,108,101, 99,116, 0, 97, 99,116, 95,102, 97, 99,101, 0, - 99,117, 98,101,109, 97,112,115,105,122,101, 0,100,114, 97,119,102,108, 97,103, 0,115,109,111,111,116,104,114,101,115,104, 0, -115,117, 98,100,105,118, 0,115,117, 98,100,105,118,114, 0,115,117, 98,115,117,114,102,116,121,112,101, 0, 42,109,114, 0, 42, -112,118, 0, 42,116,112, 97,103,101, 0,117,118, 91, 52, 93, 91, 50, 93, 0, 99,111,108, 91, 52, 93, 0,116,114, 97,110,115,112, - 0,116,105,108,101, 0,117,110,119,114, 97,112, 0,118, 49, 0,118, 50, 0,118, 51, 0,118, 52, 0,101,100, 99,111,100,101, 0, - 99,114,101, 97,115,101, 0, 98,119,101,105,103,104,116, 0,100,101,102, 95,110,114, 0, 42,100,119, 0,116,111,116,119,101,105, -103,104,116, 0, 99,111, 91, 51, 93, 0,110,111, 91, 51, 93, 0,117,118, 91, 50, 93, 0, 99,111, 91, 50, 93, 0,105,110,100,101, -120, 0,102, 0,105, 0,115, 91, 50, 53, 54, 93, 0,116,111,116,100,105,115,112, 0, 40, 42,100,105,115,112,115, 41, 40, 41, 0, -118, 91, 52, 93, 0,109,105,100, 0,118, 91, 50, 93, 0, 42,102, 97, 99,101,115, 0, 42, 99,111,108,102, 97, 99,101,115, 0, 42, -101,100,103,101,115, 0, 42,118,101,114,116,115, 0,108,101,118,101,108,115, 0,108,101,118,101,108, 95, 99,111,117,110,116, 0, - 99,117,114,114,101,110,116, 0,110,101,119,108,118,108, 0,101,100,103,101,108,118,108, 0,112,105,110,108,118,108, 0,114,101, -110,100,101,114,108,118,108, 0,117,115,101, 95, 99,111,108, 0, 42,101,100,103,101, 95,102,108, 97,103,115, 0, 42,101,100,103, -101, 95, 99,114,101, 97,115,101,115, 0, 42,118,101,114,116, 95,109, 97,112, 0, 42,101,100,103,101, 95,109, 97,112, 0, 42,111, -108,100, 95,102, 97, 99,101,115, 0, 42,111,108,100, 95,101,100,103,101,115, 0, 42,101,114,114,111,114, 0,109,111,100,105,102, -105,101,114, 0,115,117, 98,100,105,118, 84,121,112,101, 0,114,101,110,100,101,114, 76,101,118,101,108,115, 0, 42,101,109, 67, - 97, 99,104,101, 0, 42,109, 67, 97, 99,104,101, 0,100,101,102, 97,120,105,115, 0,112, 97,100, 91, 54, 93, 0,108,101,110,103, -116,104, 0,114, 97,110,100,111,109,105,122,101, 0,115,101,101,100, 0, 42,111, 98, 95, 97,114,109, 0, 42,115,116, 97,114,116, - 95, 99, 97,112, 0, 42,101,110,100, 95, 99, 97,112, 0, 42, 99,117,114,118,101, 95,111, 98, 0, 42,111,102,102,115,101,116, 95, -111, 98, 0,111,102,102,115,101,116, 91, 51, 93, 0,115, 99, 97,108,101, 91, 51, 93, 0,109,101,114,103,101, 95,100,105,115,116, - 0,102,105,116, 95,116,121,112,101, 0,111,102,102,115,101,116, 95,116,121,112,101, 0, 99,111,117,110,116, 0, 97,120,105,115, - 0,116,111,108,101,114, 97,110, 99,101, 0, 42,109,105,114,114,111,114, 95,111, 98, 0,115,112,108,105,116, 95, 97,110,103,108, -101, 0,118, 97,108,117,101, 0,114,101,115, 0,118, 97,108, 95,102,108, 97,103,115, 0,108,105,109, 95,102,108, 97,103,115, 0, -101, 95,102,108, 97,103,115, 0, 98,101,118,101,108, 95, 97,110,103,108,101, 0,100,101,102,103,114,112, 95,110, 97,109,101, 91, - 51, 50, 93, 0, 42,116,101,120,116,117,114,101, 0,115,116,114,101,110,103,116,104, 0,100,105,114,101, 99,116,105,111,110, 0, -109,105,100,108,101,118,101,108, 0,116,101,120,109, 97,112,112,105,110,103, 0, 42,109, 97,112, 95,111, 98,106,101, 99,116, 0, -117,118,108, 97,121,101,114, 95,110, 97,109,101, 91, 51, 50, 93, 0,117,118,108, 97,121,101,114, 95,116,109,112, 0, 42,112,114, -111,106,101, 99,116,111,114,115, 91, 49, 48, 93, 0, 42,105,109, 97,103,101, 0,110,117,109, 95,112,114,111,106,101, 99,116,111, -114,115, 0, 97,115,112,101, 99,116,120, 0, 97,115,112,101, 99,116,121, 0,112,101,114, 99,101,110,116, 0,102, 97, 99,101, 67, -111,117,110,116, 0,102, 97, 99, 0,114,101,112,101, 97,116, 0, 42,111, 98,106,101, 99,116, 99,101,110,116,101,114, 0,115,116, - 97,114,116,120, 0,115,116, 97,114,116,121, 0,104,101,105,103,104,116, 0,110, 97,114,114,111,119, 0,115,112,101,101,100, 0, -100, 97,109,112, 0,102, 97,108,108,111,102,102, 0,116,105,109,101,111,102,102,115, 0,108,105,102,101,116,105,109,101, 0,100, -101,102,111,114,109,102,108, 97,103, 0,109,117,108,116,105, 0, 42,112,114,101,118, 67,111,115, 0,112, 97,114,101,110,116,105, -110,118, 91, 52, 93, 91, 52, 93, 0, 99,101,110,116, 91, 51, 93, 0, 42,105,110,100,101,120, 97,114, 0,116,111,116,105,110,100, -101,120, 0,102,111,114, 99,101, 0, 42, 99,108,111,116,104, 79, 98,106,101, 99,116, 0, 42,115,105,109, 95,112, 97,114,109,115, - 0, 42, 99,111,108,108, 95,112, 97,114,109,115, 0, 42,112,111,105,110,116, 95, 99, 97, 99,104,101, 0, 42,120, 0, 42,120,110, -101,119, 0, 42,120,111,108,100, 0, 42, 99,117,114,114,101,110,116, 95,120,110,101,119, 0, 42, 99,117,114,114,101,110,116, 95, -120, 0, 42, 99,117,114,114,101,110,116, 95,118, 0, 42,109,102, 97, 99,101,115, 0,110,117,109,118,101,114,116,115, 0,110,117, -109,102, 97, 99,101,115, 0, 97, 98,115,111,114,112,116,105,111,110, 0,116,105,109,101, 0, 42, 98,118,104,116,114,101,101, 0, - 42,118, 0, 42,100,109, 0, 99,102,114, 97, 0,111,112,101,114, 97,116,105,111,110, 0,118,101,114,116,101,120, 0,116,111,116, -105,110,102,108,117,101,110, 99,101, 0,103,114,105,100,115,105,122,101, 0,110,101,101,100, 98,105,110,100, 0, 42, 98,105,110, -100,119,101,105,103,104,116,115, 0, 42, 98,105,110,100, 99,111,115, 0,116,111,116, 99, 97,103,101,118,101,114,116, 0, 42,100, -121,110,103,114,105,100, 0, 42,100,121,110,105,110,102,108,117,101,110, 99,101,115, 0, 42,100,121,110,118,101,114,116,115, 0, - 42,112, 97,100, 50, 0,100,121,110,103,114,105,100,115,105,122,101, 0,100,121,110, 99,101,108,108,109,105,110, 91, 51, 93, 0, -100,121,110, 99,101,108,108,119,105,100,116,104, 0, 98,105,110,100,109, 97,116, 91, 52, 93, 91, 52, 93, 0, 42,112,115,121,115, - 0,116,111,116,100,109,118,101,114,116, 0,116,111,116,100,109,101,100,103,101, 0,116,111,116,100,109,102, 97, 99,101, 0,112, -115,121,115, 0,112,111,115,105,116,105,111,110, 0,114, 97,110,100,111,109, 95,112,111,115,105,116,105,111,110, 0, 42,102, 97, - 99,101,112, 97, 0,118,103,114,111,117,112, 0,112,114,111,116,101, 99,116, 0, 42,117,110,100,111, 95,118,101,114,116,115, 0, -117,110,100,111, 95,118,101,114,116,115, 95,116,111,116, 0,117,110,100,111, 95,115,105,103,110, 97,108, 0,108,118,108, 0,116, -111,116,108,118,108, 0,115,105,109,112,108,101, 0, 42,102,115,115, 0, 42,116, 97,114,103,101,116, 0, 42, 97,117,120, 84, 97, -114,103,101,116, 0,118,103,114,111,117,112, 95,110, 97,109,101, 91, 51, 50, 93, 0,107,101,101,112, 68,105,115,116, 0,115,104, -114,105,110,107, 84,121,112,101, 0,115,104,114,105,110,107, 79,112,116,115, 0,112,114,111,106, 65,120,105,115, 0,115,117, 98, -115,117,114,102, 76,101,118,101,108,115, 0, 42,111,114,105,103,105,110, 0,102, 97, 99,116,111,114, 0,108,105,109,105,116, 91, - 50, 93, 0,111,114,105,103,105,110, 79,112,116,115, 0,112,110,116,115,119, 0,111,112,110,116,115,117, 0,111,112,110,116,115, -118, 0,111,112,110,116,115,119, 0,116,121,112,101,117, 0,116,121,112,101,118, 0,116,121,112,101,119, 0,102,117, 0,102,118, - 0,102,119, 0,100,117, 0,100,118, 0,100,119, 0, 42,100,101,102, 0, 42,108, 97,116,116,105, 99,101,100, 97,116, 97, 0,108, - 97,116,109, 97,116, 91, 52, 93, 91, 52, 93, 0, 42,101,100,105,116,108, 97,116,116, 0,118,101, 99, 91, 56, 93, 91, 51, 93, 0, -112, 97,114,116,121,112,101, 0,112, 97,114, 49, 0,112, 97,114, 50, 0,112, 97,114, 51, 0,112, 97,114,115,117, 98,115,116,114, - 91, 51, 50, 93, 0, 42,116,114, 97, 99,107, 0, 42,112,114,111,120,121, 0, 42,112,114,111,120,121, 95,103,114,111,117,112, 0, - 42,112,114,111,120,121, 95,102,114,111,109, 0, 42, 97, 99,116,105,111,110, 0, 42,112,111,115,101,108,105, 98, 0, 42,112,111, -115,101, 0, 99,111,110,115,116,114, 97,105,110,116, 67,104, 97,110,110,101,108,115, 0,100,101,102, 98, 97,115,101, 0,109,111, -100,105,102,105,101,114,115, 0, 42,109, 97,116, 98,105,116,115, 0, 97, 99,116, 99,111,108, 0,100,108,111, 99, 91, 51, 93, 0, -111,114,105,103, 91, 51, 93, 0,100,115,105,122,101, 91, 51, 93, 0,100,114,111,116, 91, 51, 93, 0,111, 98,109, 97,116, 91, 52, - 93, 91, 52, 93, 0, 99,111,110,115,116,105,110,118, 91, 52, 93, 91, 52, 93, 0,108, 97,121, 0, 99,111,108, 98,105,116,115, 0, -116,114, 97,110,115,102,108, 97,103, 0,112,114,111,116,101, 99,116,102,108, 97,103, 0,116,114, 97, 99,107,102,108, 97,103, 0, -117,112,102,108, 97,103, 0,110,108, 97,102,108, 97,103, 0,105,112,111,102,108, 97,103, 0,105,112,111,119,105,110, 0,115, 99, - 97,102,108, 97,103, 0,115, 99, 97,118,105,115,102,108, 97,103, 0, 98,111,117,110,100,116,121,112,101, 0,100,117,112,111,110, - 0,100,117,112,111,102,102, 0,100,117,112,115,116, 97, 0,100,117,112,101,110,100, 0,115,102, 0,109, 97,115,115, 0,100, 97, -109,112,105,110,103, 0,105,110,101,114,116,105, 97, 0,102,111,114,109,102, 97, 99,116,111,114, 0,114,100, 97,109,112,105,110, -103, 0,115,105,122,101,102, 97, 99, 0,109, 97,114,103,105,110, 0,109, 97,120, 95,118,101,108, 0,109,105,110, 95,118,101,108, - 0,109, 95, 99,111,110,116, 97, 99,116, 80,114,111, 99,101,115,115,105,110,103, 84,104,114,101,115,104,111,108,100, 0,100,116, - 0,100,116,120, 0,101,109,112,116,121, 95,100,114, 97,119,116,121,112,101, 0,112, 97,100, 49, 91, 53, 93, 0,101,109,112,116, -121, 95,100,114, 97,119,115,105,122,101, 0,100,117,112,102, 97, 99,101,115, 99, 97, 0,112,114,111,112, 0,115,101,110,115,111, -114,115, 0, 99,111,110,116,114,111,108,108,101,114,115, 0, 97, 99,116,117, 97,116,111,114,115, 0, 98, 98,115,105,122,101, 91, - 51, 93, 0, 97, 99,116,100,101,102, 0,103, 97,109,101,102,108, 97,103, 0,103, 97,109,101,102,108, 97,103, 50, 0, 42, 98,115, -111,102,116, 0,115,111,102,116,102,108, 97,103, 0, 97,110,105,115,111,116,114,111,112,105, 99, 70,114,105, 99,116,105,111,110, - 91, 51, 93, 0, 99,111,110,115,116,114, 97,105,110,116,115, 0,110,108, 97,115,116,114,105,112,115, 0,104,111,111,107,115, 0, -112, 97,114,116,105, 99,108,101,115,121,115,116,101,109, 0, 42,112,100, 0, 42,115,111,102,116, 0, 42,100,117,112, 95,103,114, -111,117,112, 0,102,108,117,105,100,115,105,109, 70,108, 97,103, 0,114,101,115,116,114,105, 99,116,102,108, 97,103, 0,115,104, - 97,112,101,110,114, 0,115,104, 97,112,101,102,108, 97,103, 0,114,101, 99, 97,108, 99,111, 0, 98,111,100,121, 95,116,121,112, -101, 0, 42,102,108,117,105,100,115,105,109, 83,101,116,116,105,110,103,115, 0, 42,100,101,114,105,118,101,100, 68,101,102,111, -114,109, 0, 42,100,101,114,105,118,101,100, 70,105,110, 97,108, 0,108, 97,115,116, 68, 97,116, 97, 77, 97,115,107, 0,115,116, - 97,116,101, 0,105,110,105,116, 95,115,116, 97,116,101, 0,103,112,117,108, 97,109,112, 0, 99,117,114,105,110,100,101,120, 0, - 97, 99,116,105,118,101, 0,100,101,102,108,101, 99,116, 0,102,111,114, 99,101,102,105,101,108,100, 0,112,100,101,102, 95,100, - 97,109,112, 0,112,100,101,102, 95,114,100, 97,109,112, 0,112,100,101,102, 95,112,101,114,109, 0,112,100,101,102, 95,102,114, -105, 99,116, 0,112,100,101,102, 95,114,102,114,105, 99,116, 0,102, 95,115,116,114,101,110,103,116,104, 0,102, 95,112,111,119, -101,114, 0,102, 95,100,105,115,116, 0,102, 95,100, 97,109,112, 0,109, 97,120,100,105,115,116, 0,109,105,110,100,105,115,116, - 0,109, 97,120,114, 97,100, 0,109,105,110,114, 97,100, 0,102, 95,112,111,119,101,114, 95,114, 0,112,100,101,102, 95,115, 98, -100, 97,109,112, 0,112,100,101,102, 95,115, 98,105,102,116, 0,112,100,101,102, 95,115, 98,111,102,116, 0, 99,108,117,109,112, - 95,102, 97, 99, 0, 99,108,117,109,112, 95,112,111,119, 0,107,105,110,107, 95,102,114,101,113, 0,107,105,110,107, 95,115,104, - 97,112,101, 0,107,105,110,107, 95, 97,109,112, 0,102,114,101,101, 95,101,110,100, 0,116,101,120, 95,110, 97, 98,108, 97, 0, -116,101,120, 95,109,111,100,101, 0,107,105,110,107, 0,107,105,110,107, 95, 97,120,105,115, 0,114,116, 50, 0, 42,114,110,103, - 0,102, 95,110,111,105,115,101, 0,102,114, 97,109,101, 0,116,111,116,112,111,105,110,116, 0, 42,120,100, 97,116, 97, 0,115, -116,101,112, 0,115,105,109,102,114, 97,109,101, 0,115,116, 97,114,116,102,114, 97,109,101, 0,101,110,100,102,114, 97,109,101, - 0,101,100,105,116,102,114, 97,109,101, 0,108, 97,115,116, 95,101,120, 97, 99,116, 0,110, 97,109,101, 91, 54, 52, 93, 0,112, -114,101,118, 95,110, 97,109,101, 91, 54, 52, 93, 0,105,110,102,111, 91, 54, 52, 93, 0,112, 97,116,104, 91, 50, 52, 48, 93, 0, -109,101,109, 95, 99, 97, 99,104,101, 0,108,105,110, 83,116,105,102,102, 0, 97,110,103, 83,116,105,102,102, 0,118,111,108,117, -109,101, 0,118,105,116,101,114, 97,116,105,111,110,115, 0,112,105,116,101,114, 97,116,105,111,110,115, 0,100,105,116,101,114, - 97,116,105,111,110,115, 0, 99,105,116,101,114, 97,116,105,111,110,115, 0,107, 83, 82, 72, 82, 95, 67, 76, 0,107, 83, 75, 72, - 82, 95, 67, 76, 0,107, 83, 83, 72, 82, 95, 67, 76, 0,107, 83, 82, 95, 83, 80, 76, 84, 95, 67, 76, 0,107, 83, 75, 95, 83, 80, - 76, 84, 95, 67, 76, 0,107, 83, 83, 95, 83, 80, 76, 84, 95, 67, 76, 0,107, 86, 67, 70, 0,107, 68, 80, 0,107, 68, 71, 0,107, - 76, 70, 0,107, 80, 82, 0,107, 86, 67, 0,107, 68, 70, 0,107, 77, 84, 0,107, 67, 72, 82, 0,107, 75, 72, 82, 0,107, 83, 72, - 82, 0,107, 65, 72, 82, 0, 99,111,108,108,105,115,105,111,110,102,108, 97,103,115, 0,110,117,109, 99,108,117,115,116,101,114, -105,116,101,114, 97,116,105,111,110,115, 0,119,101,108,100,105,110,103, 0, 42,112, 97,114,116,105, 99,108,101,115, 0,116,111, -116,115,112,114,105,110,103, 0, 42, 98,112,111,105,110,116, 0, 42, 98,115,112,114,105,110,103, 0,109,115,103, 95,108,111, 99, -107, 0,109,115,103, 95,118, 97,108,117,101, 0,110,111,100,101,109, 97,115,115, 0,110, 97,109,101,100, 86, 71, 95, 77, 97,115, -115, 91, 51, 50, 93, 0,103,114, 97,118, 0,109,101,100,105, 97,102,114,105, 99,116, 0,114,107,108,105,109,105,116, 0,112,104, -121,115,105, 99,115, 95,115,112,101,101,100, 0,103,111, 97,108,115,112,114,105,110,103, 0,103,111, 97,108,102,114,105, 99,116, - 0,109,105,110,103,111, 97,108, 0,109, 97,120,103,111, 97,108, 0,100,101,102,103,111, 97,108, 0,118,101,114,116,103,114,111, -117,112, 0,110, 97,109,101,100, 86, 71, 95, 83,111,102,116,103,111, 97,108, 91, 51, 50, 93, 0,102,117,122,122,121,110,101,115, -115, 0,105,110,115,112,114,105,110,103, 0,105,110,102,114,105, 99,116, 0,110, 97,109,101,100, 86, 71, 95, 83,112,114,105,110, -103, 95, 75, 91, 51, 50, 93, 0,101,102,114, 97, 0,105,110,116,101,114,118, 97,108, 0,108,111, 99, 97,108, 0,115,111,108,118, -101,114,102,108, 97,103,115, 0, 42, 42,107,101,121,115, 0,116,111,116,112,111,105,110,116,107,101,121, 0,115,101, 99,111,110, -100,115,112,114,105,110,103, 0, 99,111,108, 98, 97,108,108, 0, 98, 97,108,108,100, 97,109,112, 0, 98, 97,108,108,115,116,105, -102,102, 0,115, 98, 99, 95,109,111,100,101, 0, 97,101,114,111,101,100,103,101, 0,109,105,110,108,111,111,112,115, 0,109, 97, -120,108,111,111,112,115, 0, 99,104,111,107,101, 0,115,111,108,118,101,114, 95, 73, 68, 0,112,108, 97,115,116,105, 99, 0,115, -112,114,105,110,103,112,114,101,108,111, 97,100, 0, 42,115, 99,114, 97,116, 99,104, 0,115,104,101, 97,114,115,116,105,102,102, - 0,105,110,112,117,115,104, 0, 42,112,111,105,110,116, 99, 97, 99,104,101, 0,115,104,111,119, 95, 97,100,118, 97,110, 99,101, -100,111,112,116,105,111,110,115, 0,114,101,115,111,108,117,116,105,111,110,120,121,122, 0,112,114,101,118,105,101,119,114,101, -115,120,121,122, 0,114,101, 97,108,115,105,122,101, 0,103,117,105, 68,105,115,112,108, 97,121, 77,111,100,101, 0,114,101,110, -100,101,114, 68,105,115,112,108, 97,121, 77,111,100,101, 0,118,105,115, 99,111,115,105,116,121, 86, 97,108,117,101, 0,118,105, -115, 99,111,115,105,116,121, 77,111,100,101, 0,118,105,115, 99,111,115,105,116,121, 69,120,112,111,110,101,110,116, 0,103,114, - 97,118,120, 0,103,114, 97,118,121, 0,103,114, 97,118,122, 0, 97,110,105,109, 83,116, 97,114,116, 0, 97,110,105,109, 69,110, -100, 0,103,115,116, 97,114, 0,109, 97,120, 82,101,102,105,110,101, 0,105,110,105, 86,101,108,120, 0,105,110,105, 86,101,108, -121, 0,105,110,105, 86,101,108,122, 0, 42,111,114,103, 77,101,115,104, 0, 42,109,101,115,104, 83,117,114,102, 97, 99,101, 0, - 42,109,101,115,104, 66, 66, 0,115,117,114,102,100, 97,116, 97, 80, 97,116,104, 91, 50, 52, 48, 93, 0, 98, 98, 83,116, 97,114, -116, 91, 51, 93, 0, 98, 98, 83,105,122,101, 91, 51, 93, 0,116,121,112,101, 70,108, 97,103,115, 0,100,111,109, 97,105,110, 78, -111,118,101, 99,103,101,110, 0,118,111,108,117,109,101, 73,110,105,116, 84,121,112,101, 0,112, 97,114,116, 83,108,105,112, 86, - 97,108,117,101, 0,103,101,110,101,114, 97,116,101, 84,114, 97, 99,101,114,115, 0,103,101,110,101,114, 97,116,101, 80, 97,114, -116,105, 99,108,101,115, 0,115,117,114,102, 97, 99,101, 83,109,111,111,116,104,105,110,103, 0,115,117,114,102, 97, 99,101, 83, -117, 98,100,105,118,115, 0,112, 97,114,116,105, 99,108,101, 73,110,102, 83,105,122,101, 0,112, 97,114,116,105, 99,108,101, 73, -110,102, 65,108,112,104, 97, 0,102, 97,114, 70,105,101,108,100, 83,105,122,101, 0, 42,109,101,115,104, 83,117,114,102, 78,111, -114,109, 97,108,115, 0, 99,112,115, 84,105,109,101, 83,116, 97,114,116, 0, 99,112,115, 84,105,109,101, 69,110,100, 0, 99,112, -115, 81,117, 97,108,105,116,121, 0, 97,116,116,114, 97, 99,116,102,111,114, 99,101, 83,116,114,101,110,103,116,104, 0, 97,116, -116,114, 97, 99,116,102,111,114, 99,101, 82, 97,100,105,117,115, 0,118,101,108,111, 99,105,116,121,102,111,114, 99,101, 83,116, -114,101,110,103,116,104, 0,118,101,108,111, 99,105,116,121,102,111,114, 99,101, 82, 97,100,105,117,115, 0,108, 97,115,116,103, -111,111,100,102,114, 97,109,101, 0,109,105,115,116,121,112,101, 0,104,111,114,114, 0,104,111,114,103, 0,104,111,114, 98, 0, -104,111,114,107, 0,122,101,110,114, 0,122,101,110,103, 0,122,101,110, 98, 0,122,101,110,107, 0, 97,109, 98,107, 0,102, 97, -115,116, 99,111,108, 0,101,120,112,111,115,117,114,101, 0,101,120,112, 0,114, 97,110,103,101, 0,108,105,110,102, 97, 99, 0, -108,111,103,102, 97, 99, 0,103,114, 97,118,105,116,121, 0, 97, 99,116,105,118,105,116,121, 66,111,120, 82, 97,100,105,117,115, - 0,115,107,121,116,121,112,101, 0,111, 99, 99,108,117,115,105,111,110, 82,101,115, 0,112,104,121,115,105, 99,115, 69,110,103, -105,110,101, 0,116,105, 99,114, 97,116,101, 0,109, 97,120,108,111,103,105, 99,115,116,101,112, 0,112,104,121,115,117, 98,115, -116,101,112, 0,109, 97,120,112,104,121,115,116,101,112, 0,109,105,115,105, 0,109,105,115,116,115,116, 97, 0,109,105,115,116, -100,105,115,116, 0,109,105,115,116,104,105, 0,115,116, 97,114,114, 0,115,116, 97,114,103, 0,115,116, 97,114, 98, 0,115,116, - 97,114,107, 0,115,116, 97,114,115,105,122,101, 0,115,116, 97,114,109,105,110,100,105,115,116, 0,115,116, 97,114,100,105,115, -116, 0,115,116, 97,114, 99,111,108,110,111,105,115,101, 0,100,111,102,115,116, 97, 0,100,111,102,101,110,100, 0,100,111,102, -109,105,110, 0,100,111,102,109, 97,120, 0, 97,111,100,105,115,116, 0, 97,111,100,105,115,116,102, 97, 99, 0, 97,111,101,110, -101,114,103,121, 0, 97,111, 98,105, 97,115, 0, 97,111,109,111,100,101, 0, 97,111,115, 97,109,112, 0, 97,111,109,105,120, 0, - 97,111, 99,111,108,111,114, 0, 97,111, 95, 97,100, 97,112,116, 95,116,104,114,101,115,104, 0, 97,111, 95, 97,100, 97,112,116, - 95,115,112,101,101,100, 95,102, 97, 99, 0, 97,111, 95, 97,112,112,114,111,120, 95,101,114,114,111,114, 0, 97,111, 95, 97,112, -112,114,111,120, 95, 99,111,114,114,101, 99,116,105,111,110, 0, 97,111, 95,115, 97,109,112, 95,109,101,116,104,111,100, 0, 97, -111, 95,103, 97,116,104,101,114, 95,109,101,116,104,111,100, 0, 97,111, 95, 97,112,112,114,111,120, 95,112, 97,115,115,101,115, - 0, 42, 97,111,115,112,104,101,114,101, 0, 42, 97,111,116, 97, 98,108,101,115, 0,115,101,108, 99,111,108, 0,115,120, 0,115, -121, 0, 42,108,112, 70,111,114,109, 97,116, 0, 42,108,112, 80, 97,114,109,115, 0, 99, 98, 70,111,114,109, 97,116, 0, 99, 98, - 80, 97,114,109,115, 0,102, 99, 99, 84,121,112,101, 0,102, 99, 99, 72, 97,110,100,108,101,114, 0,100,119, 75,101,121, 70,114, - 97,109,101, 69,118,101,114,121, 0,100,119, 81,117, 97,108,105,116,121, 0,100,119, 66,121,116,101,115, 80,101,114, 83,101, 99, -111,110,100, 0,100,119, 70,108, 97,103,115, 0,100,119, 73,110,116,101,114,108,101, 97,118,101, 69,118,101,114,121, 0, 97,118, -105, 99,111,100,101, 99,110, 97,109,101, 91, 49, 50, 56, 93, 0, 42, 99,100, 80, 97,114,109,115, 0, 42,112, 97,100, 0, 99,100, - 83,105,122,101, 0,113,116, 99,111,100,101, 99,110, 97,109,101, 91, 49, 50, 56, 93, 0, 99,111,100,101, 99, 0, 97,117,100,105, -111, 95, 99,111,100,101, 99, 0,118,105,100,101,111, 95, 98,105,116,114, 97,116,101, 0, 97,117,100,105,111, 95, 98,105,116,114, - 97,116,101, 0,103,111,112, 95,115,105,122,101, 0,114, 99, 95,109,105,110, 95,114, 97,116,101, 0,114, 99, 95,109, 97,120, 95, -114, 97,116,101, 0,114, 99, 95, 98,117,102,102,101,114, 95,115,105,122,101, 0,109,117,120, 95,112, 97, 99,107,101,116, 95,115, -105,122,101, 0,109,117,120, 95,114, 97,116,101, 0,109,105,120,114, 97,116,101, 0,109, 97,105,110, 0, 42,109, 97,116, 95,111, -118,101,114,114,105,100,101, 0, 42,108,105,103,104,116, 95,111,118,101,114,114,105,100,101, 0,108, 97,121, 95,122,109, 97,115, -107, 0,108, 97,121,102,108, 97,103, 0,112, 97,115,115,102,108, 97,103, 0,112, 97,115,115, 95,120,111,114, 0, 42, 97,118,105, - 99,111,100,101, 99,100, 97,116, 97, 0, 42,113,116, 99,111,100,101, 99,100, 97,116, 97, 0,102,102, 99,111,100,101, 99,100, 97, -116, 97, 0, 97,117,100,105,111, 0,112,115,102,114, 97, 0,112,101,102,114, 97, 0,105,109, 97,103,101,115, 0,102,114, 97,109, - 97,112,116,111, 0,116,104,114,101, 97,100,115, 0,102,114, 97,109,101,108,101,110, 0, 98,108,117,114,102, 97, 99, 0,101,100, -103,101, 82, 0,101,100,103,101, 71, 0,101,100,103,101, 66, 0,102,117,108,108,115, 99,114,101,101,110, 0,120,112,108, 97,121, - 0,121,112,108, 97,121, 0,102,114,101,113,112,108, 97,121, 0, 97,116,116,114,105, 98, 0,114,116, 49, 0,115,116,101,114,101, -111,109,111,100,101, 0,100,105,109,101,110,115,105,111,110,115,112,114,101,115,101,116, 0,109, 97,120,105,109,115,105,122,101, - 0,120,115, 99,104, 0,121,115, 99,104, 0,120,112, 97,114,116,115, 0,121,112, 97,114,116,115, 0,119,105,110,112,111,115, 0, -112,108, 97,110,101,115, 0,105,109,116,121,112,101, 0,115,117, 98,105,109,116,121,112,101, 0,113,117, 97,108,105,116,121, 0, -100,105,115,112,108, 97,121,109,111,100,101, 0,114,112, 97,100, 49, 0,114,112, 97,100, 50, 0,115, 99,101,109,111,100,101, 0, -114,101,110,100,101,114,101,114, 0,111, 99,114,101,115, 0, 97,108,112,104, 97,109,111,100,101, 0,111,115, 97, 0,102,114,115, - 95,115,101, 99, 0,101,100,103,101,105,110,116, 0,115, 97,102,101,116,121, 0, 98,111,114,100,101,114, 0,100,105,115,112,114, -101, 99,116, 0,108, 97,121,101,114,115, 0, 97, 99,116,108, 97,121, 0,120, 97,115,112, 0,121, 97,115,112, 0,102,114,115, 95, -115,101, 99, 95, 98, 97,115,101, 0,103, 97,117,115,115, 0, 99,111,108,111,114, 95,109,103,116, 95,102,108, 97,103, 0,112,111, -115,116,103, 97,109,109, 97, 0,112,111,115,116,104,117,101, 0,112,111,115,116,115, 97,116, 0,100,105,116,104,101,114, 95,105, -110,116,101,110,115,105,116,121, 0, 98, 97,107,101, 95,111,115, 97, 0, 98, 97,107,101, 95,102,105,108,116,101,114, 0, 98, 97, -107,101, 95,109,111,100,101, 0, 98, 97,107,101, 95,102,108, 97,103, 0, 98, 97,107,101, 95,110,111,114,109, 97,108, 95,115,112, - 97, 99,101, 0, 98, 97,107,101, 95,113,117, 97,100, 95,115,112,108,105,116, 0, 98, 97,107,101, 95,109, 97,120,100,105,115,116, - 0, 98, 97,107,101, 95, 98,105, 97,115,100,105,115,116, 0, 98, 97,107,101, 95,112, 97,100, 0, 71, 73,113,117, 97,108,105,116, -121, 0, 71, 73, 99, 97, 99,104,101, 0, 71, 73,109,101,116,104,111,100, 0, 71, 73,112,104,111,116,111,110,115, 0, 71, 73,100, -105,114,101, 99,116, 0, 89, 70, 95, 65, 65, 0, 89, 70,101,120,112,111,114,116,120,109,108, 0, 89, 70, 95,110,111, 98,117,109, -112, 0, 89, 70, 95, 99,108, 97,109,112,114,103, 98, 0,121,102,112, 97,100, 49, 0, 71, 73,100,101,112,116,104, 0, 71, 73, 99, - 97,117,115,100,101,112,116,104, 0, 71, 73,112,105,120,101,108,115,112,101,114,115, 97,109,112,108,101, 0, 71, 73,112,104,111, -116,111,110, 99,111,117,110,116, 0, 71, 73,109,105,120,112,104,111,116,111,110,115, 0, 71, 73,112,104,111,116,111,110,114, 97, -100,105,117,115, 0, 89, 70, 95,114, 97,121,100,101,112,116,104, 0, 89, 70, 95, 65, 65,112, 97,115,115,101,115, 0, 89, 70, 95, - 65, 65,115, 97,109,112,108,101,115, 0,121,102,112, 97,100, 50, 0, 71, 73,115,104, 97,100,111,119,113,117, 97,108,105,116,121, - 0, 71, 73,114,101,102,105,110,101,109,101,110,116, 0, 71, 73,112,111,119,101,114, 0, 71, 73,105,110,100,105,114,112,111,119, -101,114, 0, 89, 70, 95,103, 97,109,109, 97, 0, 89, 70, 95,101,120,112,111,115,117,114,101, 0, 89, 70, 95,114, 97,121, 98,105, - 97,115, 0, 89, 70, 95, 65, 65,112,105,120,101,108,115,105,122,101, 0, 89, 70, 95, 65, 65,116,104,114,101,115,104,111,108,100, - 0, 98, 97, 99,107, 98,117,102, 91, 49, 54, 48, 93, 0,112,105, 99, 91, 49, 54, 48, 93, 0,115,116, 97,109,112, 0,115,116, 97, -109,112, 95,102,111,110,116, 95,105,100, 0,115,116, 97,109,112, 95,117,100, 97,116, 97, 91, 49, 54, 48, 93, 0,102,103, 95,115, -116, 97,109,112, 91, 52, 93, 0, 98,103, 95,115,116, 97,109,112, 91, 52, 93, 0,115,105,109,112,108,105,102,121, 95,115,117, 98, -115,117,114,102, 0,115,105,109,112,108,105,102,121, 95,115,104, 97,100,111,119,115, 97,109,112,108,101,115, 0,115,105,109,112, -108,105,102,121, 95,112, 97,114,116,105, 99,108,101,115, 0,115,105,109,112,108,105,102,121, 95, 97,111,115,115,115, 0, 99,105, -110,101,111,110,119,104,105,116,101, 0, 99,105,110,101,111,110, 98,108, 97, 99,107, 0, 99,105,110,101,111,110,103, 97,109,109, - 97, 0,106,112, 50, 95,112,114,101,115,101,116, 0,106,112, 50, 95,100,101,112,116,104, 0,114,112, 97,100, 51, 0,100,111,109, -101,114,101,115, 0,100,111,109,101,109,111,100,101, 0,100,111,109,101, 97,110,103,108,101, 0,100,111,109,101,116,105,108,116, - 0,100,111,109,101,114,101,115, 98,117,102, 0, 42,100,111,109,101,116,101,120,116, 0,101,110,103,105,110,101, 91, 51, 50, 93, - 0,112, 97,114,116,105, 99,108,101, 95,112,101,114, 99, 0,115,117, 98,115,117,114,102, 95,109, 97,120, 0,115,104, 97,100, 98, -117,102,115, 97,109,112,108,101, 95,109, 97,120, 0, 97,111, 95,101,114,114,111,114, 0,116,105,108,116, 0,114,101,115, 98,117, -102, 0, 42,119, 97,114,112,116,101,120,116, 0, 99,111,108, 91, 51, 93, 0,112, 97,100, 49, 49, 0,102,114, 97,109,105,110,103, - 0,100,111,109,101, 0,115,116,101,114,101,111,102,108, 97,103, 0, 42, 98,114,117,115,104, 0,116,111,111,108, 0,115,101, 97, -109, 95, 98,108,101,101,100, 0,110,111,114,109, 97,108, 95, 97,110,103,108,101, 0, 42,112, 97,105,110,116, 99,117,114,115,111, -114, 0,105,110,118,101,114,116, 0,116,111,116,114,101,107,101,121, 0,116,111,116, 97,100,100,107,101,121, 0, 98,114,117,115, -104,116,121,112,101, 0, 98,114,117,115,104, 91, 55, 93, 0,101,109,105,116,116,101,114,100,105,115,116, 0,100,114, 97,119, 95, -116,105,109,101,100, 0,115,101,108,101, 99,116,109,111,100,101, 0,110, 97,109,101, 91, 51, 54, 93, 0,109, 97,116, 91, 51, 93, - 91, 51, 93, 0, 42,115,101,115,115,105,111,110, 0,112,105,118,111,116, 91, 51, 93, 0,116,101,120,115,101,112, 0,116, 97, 98, -108,101,116, 95,115,105,122,101, 0,116, 97, 98,108,101,116, 95,115,116,114,101,110,103,116,104, 0,112, 97,100, 91, 53, 93, 0, -103, 97,109,109, 97, 0,109,117,108, 0, 42,118,112, 97,105,110,116, 95,112,114,101,118, 0, 42,119,112, 97,105,110,116, 95,112, -114,101,118, 0, 42,118,112, 97,105,110,116, 0, 42,119,112, 97,105,110,116, 0, 42,115, 99,117,108,112,116, 0,118,103,114,111, -117,112, 95,119,101,105,103,104,116, 0, 99,111,114,110,101,114,116,121,112,101, 0,101,100,105,116, 98,117,116,102,108, 97,103, - 0,106,111,105,110,116,114,105,108,105,109,105,116, 0,100,101,103,114, 0,116,117,114,110, 0,101,120,116,114, 95,111,102,102, -115, 0,100,111,117, 98,108,105,109,105,116, 0,110,111,114,109, 97,108,115,105,122,101, 0, 97,117,116,111,109,101,114,103,101, - 0,115,101,103,109,101,110,116,115, 0,114,105,110,103,115, 0,118,101,114,116,105, 99,101,115, 0,117,110,119,114, 97,112,112, -101,114, 0,117,118, 99, 97,108, 99, 95,114, 97,100,105,117,115, 0,117,118, 99, 97,108, 99, 95, 99,117, 98,101,115,105,122,101, - 0,117,118, 99, 97,108, 99, 95,109, 97,114,103,105,110, 0,117,118, 99, 97,108, 99, 95,109, 97,112,100,105,114, 0,117,118, 99, - 97,108, 99, 95,109, 97,112, 97,108,105,103,110, 0,117,118, 99, 97,108, 99, 95,102,108, 97,103, 0,117,118, 95,102,108, 97,103, - 0,117,118, 95,115,101,108,101, 99,116,109,111,100,101, 0,117,118, 95,112, 97,100, 91, 50, 93, 0, 97,117,116,111,105,107, 95, - 99,104, 97,105,110,108,101,110, 0,105,109, 97,112, 97,105,110,116, 0,112, 97,114,116,105, 99,108,101, 0,112,114,111,112,111, -114,116,105,111,110, 97,108, 95,115,105,122,101, 0,115,101,108,101, 99,116, 95,116,104,114,101,115,104, 0, 99,108,101, 97,110, - 95,116,104,114,101,115,104, 0, 97,117,116,111,107,101,121, 95,109,111,100,101, 0,114,101,116,111,112,111, 95,109,111,100,101, - 0,114,101,116,111,112,111, 95,112, 97,105,110,116, 95,116,111,111,108, 0,108,105,110,101, 95,100,105,118, 0,101,108,108,105, -112,115,101, 95,100,105,118, 0,114,101,116,111,112,111, 95,104,111,116,115,112,111,116, 0,109,117,108,116,105,114,101,115, 95, -115,117, 98,100,105,118, 95,116,121,112,101, 0,115,107,103,101,110, 95,114,101,115,111,108,117,116,105,111,110, 0,115,107,103, -101,110, 95,116,104,114,101,115,104,111,108,100, 95,105,110,116,101,114,110, 97,108, 0,115,107,103,101,110, 95,116,104,114,101, -115,104,111,108,100, 95,101,120,116,101,114,110, 97,108, 0,115,107,103,101,110, 95,108,101,110,103,116,104, 95,114, 97,116,105, -111, 0,115,107,103,101,110, 95,108,101,110,103,116,104, 95,108,105,109,105,116, 0,115,107,103,101,110, 95, 97,110,103,108,101, - 95,108,105,109,105,116, 0,115,107,103,101,110, 95, 99,111,114,114,101,108, 97,116,105,111,110, 95,108,105,109,105,116, 0,115, -107,103,101,110, 95,115,121,109,109,101,116,114,121, 95,108,105,109,105,116, 0,115,107,103,101,110, 95,114,101,116, 97,114,103, -101,116, 95, 97,110,103,108,101, 95,119,101,105,103,104,116, 0,115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95,108, -101,110,103,116,104, 95,119,101,105,103,104,116, 0,115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95,100,105,115,116, - 97,110, 99,101, 95,119,101,105,103,104,116, 0,115,107,103,101,110, 95,111,112,116,105,111,110,115, 0,115,107,103,101,110, 95, -112,111,115,116,112,114,111, 0,115,107,103,101,110, 95,112,111,115,116,112,114,111, 95,112, 97,115,115,101,115, 0,115,107,103, -101,110, 95,115,117, 98,100,105,118,105,115,105,111,110,115, 91, 51, 93, 0,115,107,103,101,110, 95,109,117,108,116,105, 95,108, -101,118,101,108, 0, 42,115,107,103,101,110, 95,116,101,109,112,108, 97,116,101, 0, 98,111,110,101, 95,115,107,101,116, 99,104, -105,110,103, 0, 98,111,110,101, 95,115,107,101,116, 99,104,105,110,103, 95, 99,111,110,118,101,114,116, 0,115,107,103,101,110, - 95,115,117, 98,100,105,118,105,115,105,111,110, 95,110,117,109, 98,101,114, 0,115,107,103,101,110, 95,114,101,116, 97,114,103, -101,116, 95,111,112,116,105,111,110,115, 0,115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95,114,111,108,108, 0,115, -107,103,101,110, 95,115,105,100,101, 95,115,116,114,105,110,103, 91, 56, 93, 0,115,107,103,101,110, 95,110,117,109, 95,115,116, -114,105,110,103, 91, 56, 93, 0,101,100,103,101, 95,109,111,100,101, 0,115,110, 97,112, 95,109,111,100,101, 0,115,110, 97,112, - 95,102,108, 97,103, 0,115,110, 97,112, 95,116, 97,114,103,101,116, 0,112,114,111,112,111,114,116,105,111,110, 97,108, 0,112, -114,111,112, 95,109,111,100,101, 0,116,111,116,111, 98,106, 0,116,111,116,108, 97,109,112, 0,116,111,116,111, 98,106,115,101, -108, 0,116,111,116, 99,117,114,118,101, 0,116,111,116,109,101,115,104, 0,116,111,116, 97,114,109, 97,116,117,114,101, 0, 42, - 99, 97,109,101,114, 97, 0, 42,119,111,114,108,100, 0, 42,115,101,116, 0, 98, 97,115,101, 0, 42, 98, 97,115, 97, 99,116, 0, - 42,111, 98,101,100,105,116, 0, 99,117,114,115,111,114, 91, 51, 93, 0,116,119, 99,101,110,116, 91, 51, 93, 0,116,119,109,105, -110, 91, 51, 93, 0,116,119,109, 97,120, 91, 51, 93, 0, 42,101,100, 0, 42,116,111,111,108,115,101,116,116,105,110,103,115, 0, - 42,115,116, 97,116,115, 0,116,114, 97,110,115,102,111,114,109, 95,115,112, 97, 99,101,115, 0, 42,116,104,101, 68, 97,103, 0, -100, 97,103,105,115,118, 97,108,105,100, 0,100, 97,103,102,108, 97,103,115, 0,106,117,109,112,102,114, 97,109,101, 0,102,114, - 97,109,101, 95,115,116,101,112, 0, 97, 99,116,105,118,101, 95,107,101,121,105,110,103,115,101,116, 0,107,101,121,105,110,103, -115,101,116,115, 0,103,109, 0, 98,108,101,110,100, 0,119,105,110,109, 97,116, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,109, - 97,116, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,105,110,118, 91, 52, 93, 91, 52, 93, 0,112,101,114,115,109, 97,116, 91, 52, - 93, 91, 52, 93, 0,112,101,114,115,105,110,118, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,109, 97,116,111, 98, 91, 52, 93, 91, - 52, 93, 0,112,101,114,115,109, 97,116,111, 98, 91, 52, 93, 91, 52, 93, 0,116,119,109, 97,116, 91, 52, 93, 91, 52, 93, 0,118, -105,101,119,113,117, 97,116, 91, 52, 93, 0,122,102, 97, 99, 0, 99, 97,109,100,120, 0, 99, 97,109,100,121, 0,112,105,120,115, -105,122,101, 0, 99, 97,109,122,111,111,109, 0,118,105,101,119, 98,117,116, 0,108, 97,115,116,109,111,100,101, 0,114,102,108, - 97,103, 0,118,105,101,119,108,111, 99,107, 0,112,101,114,115,112, 0,118,105,101,119, 0, 99,108,105,112, 91, 54, 93, 91, 52, - 93, 0, 42, 99,108,105,112, 98, 98, 0, 42,103,112,100, 0, 42,108,111, 99, 97,108,118,100, 0, 42,114,105, 0, 42,114,101,116, -111,112,111, 95,118,105,101,119, 95,100, 97,116, 97, 0, 42,100,101,112,116,104,115, 0, 42,115,109,115, 0, 42,115,109,111,111, -116,104, 95,116,105,109,101,114, 0,108,118,105,101,119,113,117, 97,116, 91, 52, 93, 0,108,112,101,114,115,112, 0,108,118,105, -101,119, 0,114,101,103,105,111,110, 98, 97,115,101, 0,115,112, 97, 99,101,116,121,112,101, 0, 98,108,111, 99,107,115, 99, 97, -108,101, 0, 98,108,111, 99,107,104, 97,110,100,108,101,114, 91, 56, 93, 0,108, 97,121, 95,117,115,101,100, 0, 42,111, 98, 95, - 99,101,110,116,114,101, 0, 42, 98,103,112,105, 99, 0,111, 98, 95, 99,101,110,116,114,101, 95, 98,111,110,101, 91, 51, 50, 93, - 0,108, 97,121, 97, 99,116, 0,100,114, 97,119,116,121,112,101, 0,108,111, 99, 97,108,118,105,101,119, 0,115, 99,101,110,101, -108,111, 99,107, 0, 97,114,111,117,110,100, 0,102,108, 97,103, 50, 0,112,105,118,111,116, 95,108, 97,115,116, 0,103,114,105, -100, 0,103,114,105,100,118,105,101,119, 0,112, 97,100,102, 0,110,101, 97,114, 0,102, 97,114, 0,103,114,105,100,108,105,110, -101,115, 0,103,114,105,100,102,108, 97,103, 0,103,114,105,100,115,117, 98,100,105,118, 0,109,111,100,101,115,101,108,101, 99, -116, 0,107,101,121,102,108, 97,103,115, 0,116,119,116,121,112,101, 0,116,119,109,111,100,101, 0,116,119,102,108, 97,103, 0, -116,119,100,114, 97,119,102,108, 97,103, 0, 99,117,115,116,111,109,100, 97,116, 97, 95,109, 97,115,107, 0, 97,102,116,101,114, -100,114, 97,119, 0,122, 98,117,102, 0,120,114, 97,121, 0,110,100,111,102,109,111,100,101, 0,110,100,111,102,102,105,108,116, -101,114, 0, 42,112,114,111,112,101,114,116,105,101,115, 95,115,116,111,114, 97,103,101, 0,118,101,114,116, 0,104,111,114, 0, -109, 97,115,107, 0,109,105,110, 91, 50, 93, 0,109, 97,120, 91, 50, 93, 0,109,105,110,122,111,111,109, 0,109, 97,120,122,111, -111,109, 0,115, 99,114,111,108,108, 0,115, 99,114,111,108,108, 95,117,105, 0,107,101,101,112,116,111,116, 0,107,101,101,112, -122,111,111,109, 0,107,101,101,112,111,102,115, 0, 97,108,105,103,110, 0,119,105,110,120, 0,119,105,110,121, 0,111,108,100, -119,105,110,120, 0,111,108,100,119,105,110,121, 0, 99,117,114,115,111,114, 91, 50, 93, 0, 42,116, 97, 98, 95,111,102,102,115, -101,116, 0,116, 97, 98, 95,110,117,109, 0,116, 97, 98, 95, 99,117,114, 0, 42,115, 99,114,101,101,110, 0,118, 50,100, 0, 42, - 97,100,115, 0,103,104,111,115,116, 67,117,114,118,101,115, 0, 97,117,116,111,115,110, 97,112, 0,112,105,110, 0,108,111, 99, -107, 0,109, 97,105,110, 98, 0,109, 97,105,110, 98,111, 0,109, 97,105,110, 98,117,115,101,114, 0,114,101, 95, 97,108,105,103, -110, 0,112,114,101,118,105,101,119, 0,112, 97,116,104,102,108, 97,103, 0,100, 97,116, 97,105, 99,111,110, 0, 42,112,105,110, -105,100, 0,114,101,110,100,101,114, 95,115,105,122,101, 0, 99,104, 97,110,115,104,111,119,110, 0,122,101, 98,114, 97, 0,122, -111,111,109, 0,116,105,116,108,101, 91, 50, 52, 93, 0,100,105,114, 91, 50, 52, 48, 93, 0,102,105,108,101, 91, 56, 48, 93, 0, -115,111,114,116, 0,100,105,115,112,108, 97,121, 0, 97, 99,116,105,118,101, 95, 98,111,111,107,109, 97,114,107, 0, 97, 99,116, -105,118,101, 95,102,105,108,101, 0,115,101,108,115,116, 97,116,101, 0,102, 95,102,112, 0,109,101,110,117, 0,102,112, 95,115, -116,114, 91, 56, 93, 0, 42,112,117,112,109,101,110,117, 0, 42,112, 97,114, 97,109,115, 0, 42,102,105,108,101,115, 0, 42,102, -111,108,100,101,114,115, 95,112,114,101,118, 0, 42,102,111,108,100,101,114,115, 95,110,101,120,116, 0, 42,111,112, 0, 42,108, -111, 97,100,105,109, 97,103,101, 95,116,105,109,101,114, 0, 42,108, 97,121,111,117,116, 0,114,101, 99,101,110,116,110,114, 0, - 98,111,111,107,109, 97,114,107,110,114, 0,115,121,115,116,101,109,110,114, 0,116,114,101,101, 0, 42,116,114,101,101,115,116, -111,114,101, 0,115,101, 97,114, 99,104, 95,115,116,114,105,110,103, 91, 51, 50, 93, 0,115,101, 97,114, 99,104, 95,116,115,101, - 0,115,101, 97,114, 99,104, 95,102,108, 97,103,115, 0,100,111, 95, 0,111,117,116,108,105,110,101,118,105,115, 0,115,116,111, -114,101,102,108, 97,103, 0, 42, 99,117,109, 97,112, 0,105,109, 97,110,114, 0, 99,117,114,116,105,108,101, 0,105,109,116,121, -112,101,110,114, 0,100,116, 95,117,118, 0,115,116,105, 99,107,121, 0,100,116, 95,117,118,115,116,114,101,116, 99,104, 0, 99, -101,110,116,120, 0, 99,101,110,116,121, 0, 42,116,101,120,116, 0,116,111,112, 0,118,105,101,119,108,105,110,101,115, 0,108, -104,101,105,103,104,116, 0, 99,119,105,100,116,104, 0,108,105,110,101,110,114,115, 95,116,111,116, 0,108,101,102,116, 0,115, -104,111,119,108,105,110,101,110,114,115, 0,116, 97, 98,110,117,109, 98,101,114, 0,115,104,111,119,115,121,110,116, 97,120, 0, -111,118,101,114,119,114,105,116,101, 0,108,105,118,101, 95,101,100,105,116, 0,112,105,120, 95,112,101,114, 95,108,105,110,101, - 0,116,120,116,115, 99,114,111,108,108, 0,116,120,116, 98, 97,114, 0,119,111,114,100,119,114, 97,112, 0,100,111,112,108,117, -103,105,110,115, 0,102,105,110,100,115,116,114, 91, 50, 53, 54, 93, 0,114,101,112,108, 97, 99,101,115,116,114, 91, 50, 53, 54, - 93, 0, 42,112,121, 95,100,114, 97,119, 0, 42,112,121, 95,101,118,101,110,116, 0, 42,112,121, 95, 98,117,116,116,111,110, 0, - 42,112,121, 95, 98,114,111,119,115,101,114, 99, 97,108,108, 98, 97, 99,107, 0, 42,112,121, 95,103,108,111, 98, 97,108,100,105, - 99,116, 0,108, 97,115,116,115,112, 97, 99,101, 0,115, 99,114,105,112,116,110, 97,109,101, 91, 50, 53, 54, 93, 0,115, 99,114, -105,112,116, 97,114,103, 91, 50, 53, 54, 93, 0, 42,115, 99,114,105,112,116, 0, 42, 98,117,116, 95,114,101,102,115, 0,114,101, -100,114, 97,119,115, 0, 42,105,100, 0, 97,115,112,101, 99,116, 0, 42, 99,117,114,102,111,110,116, 0,109,120, 0,109,121, 0, - 42,101,100,105,116,116,114,101,101, 0,116,114,101,101,116,121,112,101, 0,116,101,120,102,114,111,109, 0,110,117,109,116,105, -108,101,115,120, 0,110,117,109,116,105,108,101,115,121, 0,118,105,101,119,114,101, 99,116, 0, 98,111,111,107,109, 97,114,107, -114,101, 99,116, 0,115, 99,114,111,108,108,112,111,115, 0,115, 99,114,111,108,108,104,101,105,103,104,116, 0,115, 99,114,111, -108,108, 97,114,101, 97, 0,114,101,116,118, 97,108, 0,112,114,118, 95,119, 0,112,114,118, 95,104, 0, 40, 42,114,101,116,117, -114,110,102,117,110, 99, 41, 40, 41, 0, 40, 42,114,101,116,117,114,110,102,117,110, 99, 95,101,118,101,110,116, 41, 40, 41, 0, - 40, 42,114,101,116,117,114,110,102,117,110, 99, 95, 97,114,103,115, 41, 40, 41, 0, 42, 97,114,103, 49, 0, 42, 97,114,103, 50, - 0, 42,109,101,110,117,112, 0, 42,105,109,103, 0,108,101,110, 95, 97,108,108,111, 99, 0, 99,117,114,115,111,114, 0,114,112, -116, 95,109, 97,115,107, 0,115, 99,114,111,108,108, 98, 97, 99,107, 0,104,105,115,116,111,114,121, 0,112,114,111,109,112,116, - 91, 56, 93, 0,102,105,108,101,110, 97,109,101, 91, 50, 53, 54, 93, 0, 98,108,102, 95,105,100, 0,117,105,102,111,110,116, 95, -105,100, 0,114, 95,116,111, 95,108, 0,112,111,105,110,116,115, 0,107,101,114,110,105,110,103, 0,105,116, 97,108,105, 99, 0, - 98,111,108,100, 0,115,104, 97,100,111,119, 0,115,104, 97,100,120, 0,115,104, 97,100,121, 0,115,104, 97,100,111,119, 97,108, -112,104, 97, 0,115,104, 97,100,111,119, 99,111,108,111,114, 0,112, 97,110,101,108,116,105,116,108,101, 0,103,114,111,117,112, -108, 97, 98,101,108, 0,119,105,100,103,101,116,108, 97, 98,101,108, 0,119,105,100,103,101,116, 0,112, 97,110,101,108,122,111, -111,109, 0,109,105,110,108, 97, 98,101,108, 99,104, 97,114,115, 0,109,105,110,119,105,100,103,101,116, 99,104, 97,114,115, 0, - 99,111,108,117,109,110,115,112, 97, 99,101, 0,116,101,109,112,108, 97,116,101,115,112, 97, 99,101, 0, 98,111,120,115,112, 97, - 99,101, 0, 98,117,116,116,111,110,115,112, 97, 99,101,120, 0, 98,117,116,116,111,110,115,112, 97, 99,101,121, 0,112, 97,110, -101,108,115,112, 97, 99,101, 0,112, 97,110,101,108,111,117,116,101,114, 0,112, 97,100, 91, 49, 93, 0,111,117,116,108,105,110, -101, 91, 52, 93, 0,105,110,110,101,114, 91, 52, 93, 0,105,110,110,101,114, 95,115,101,108, 91, 52, 93, 0,105,116,101,109, 91, - 52, 93, 0,116,101,120,116, 91, 52, 93, 0,116,101,120,116, 95,115,101,108, 91, 52, 93, 0,115,104, 97,100,101,100, 0,115,104, - 97,100,101,116,111,112, 0,115,104, 97,100,101,100,111,119,110, 0,105,110,110,101,114, 95, 97,110,105,109, 91, 52, 93, 0,105, -110,110,101,114, 95, 97,110,105,109, 95,115,101,108, 91, 52, 93, 0,105,110,110,101,114, 95,107,101,121, 91, 52, 93, 0,105,110, -110,101,114, 95,107,101,121, 95,115,101,108, 91, 52, 93, 0,105,110,110,101,114, 95,100,114,105,118,101,110, 91, 52, 93, 0,105, -110,110,101,114, 95,100,114,105,118,101,110, 95,115,101,108, 91, 52, 93, 0,119, 99,111,108, 95,114,101,103,117,108, 97,114, 0, -119, 99,111,108, 95,116,111,111,108, 0,119, 99,111,108, 95,116,101,120,116, 0,119, 99,111,108, 95,114, 97,100,105,111, 0,119, - 99,111,108, 95,111,112,116,105,111,110, 0,119, 99,111,108, 95,116,111,103,103,108,101, 0,119, 99,111,108, 95,110,117,109, 0, -119, 99,111,108, 95,110,117,109,115,108,105,100,101,114, 0,119, 99,111,108, 95,109,101,110,117, 0,119, 99,111,108, 95,112,117, -108,108,100,111,119,110, 0,119, 99,111,108, 95,109,101,110,117, 95, 98, 97, 99,107, 0,119, 99,111,108, 95,109,101,110,117, 95, -105,116,101,109, 0,119, 99,111,108, 95, 98,111,120, 0,119, 99,111,108, 95,115, 99,114,111,108,108, 0,119, 99,111,108, 95,108, -105,115,116, 95,105,116,101,109, 0,119, 99,111,108, 95,115,116, 97,116,101, 0,105, 99,111,110,102,105,108,101, 91, 56, 48, 93, - 0, 98, 97, 99,107, 91, 52, 93, 0,116,105,116,108,101, 91, 52, 93, 0,116,101,120,116, 95,104,105, 91, 52, 93, 0,104,101, 97, -100,101,114, 91, 52, 93, 0,104,101, 97,100,101,114, 95,116,105,116,108,101, 91, 52, 93, 0,104,101, 97,100,101,114, 95,116,101, -120,116, 91, 52, 93, 0,104,101, 97,100,101,114, 95,116,101,120,116, 95,104,105, 91, 52, 93, 0, 98,117,116,116,111,110, 91, 52, - 93, 0, 98,117,116,116,111,110, 95,116,105,116,108,101, 91, 52, 93, 0, 98,117,116,116,111,110, 95,116,101,120,116, 91, 52, 93, - 0, 98,117,116,116,111,110, 95,116,101,120,116, 95,104,105, 91, 52, 93, 0,108,105,115,116, 91, 52, 93, 0,108,105,115,116, 95, -116,105,116,108,101, 91, 52, 93, 0,108,105,115,116, 95,116,101,120,116, 91, 52, 93, 0,108,105,115,116, 95,116,101,120,116, 95, -104,105, 91, 52, 93, 0,112, 97,110,101,108, 91, 52, 93, 0,112, 97,110,101,108, 95,116,105,116,108,101, 91, 52, 93, 0,112, 97, -110,101,108, 95,116,101,120,116, 91, 52, 93, 0,112, 97,110,101,108, 95,116,101,120,116, 95,104,105, 91, 52, 93, 0,115,104, 97, -100,101, 49, 91, 52, 93, 0,115,104, 97,100,101, 50, 91, 52, 93, 0,104,105,108,105,116,101, 91, 52, 93, 0,103,114,105,100, 91, - 52, 93, 0,119,105,114,101, 91, 52, 93, 0,115,101,108,101, 99,116, 91, 52, 93, 0,108, 97,109,112, 91, 52, 93, 0, 97, 99,116, -105,118,101, 91, 52, 93, 0,103,114,111,117,112, 91, 52, 93, 0,103,114,111,117,112, 95, 97, 99,116,105,118,101, 91, 52, 93, 0, -116,114, 97,110,115,102,111,114,109, 91, 52, 93, 0,118,101,114,116,101,120, 91, 52, 93, 0,118,101,114,116,101,120, 95,115,101, -108,101, 99,116, 91, 52, 93, 0,101,100,103,101, 91, 52, 93, 0,101,100,103,101, 95,115,101,108,101, 99,116, 91, 52, 93, 0,101, -100,103,101, 95,115,101, 97,109, 91, 52, 93, 0,101,100,103,101, 95,115,104, 97,114,112, 91, 52, 93, 0,101,100,103,101, 95,102, - 97, 99,101,115,101,108, 91, 52, 93, 0,102, 97, 99,101, 91, 52, 93, 0,102, 97, 99,101, 95,115,101,108,101, 99,116, 91, 52, 93, - 0,102, 97, 99,101, 95,100,111,116, 91, 52, 93, 0,110,111,114,109, 97,108, 91, 52, 93, 0, 98,111,110,101, 95,115,111,108,105, -100, 91, 52, 93, 0, 98,111,110,101, 95,112,111,115,101, 91, 52, 93, 0,115,116,114,105,112, 91, 52, 93, 0,115,116,114,105,112, - 95,115,101,108,101, 99,116, 91, 52, 93, 0, 99,102,114, 97,109,101, 91, 52, 93, 0,100,115, 95, 99,104, 97,110,110,101,108, 91, - 52, 93, 0,100,115, 95,115,117, 98, 99,104, 97,110,110,101,108, 91, 52, 93, 0,118,101,114,116,101,120, 95,115,105,122,101, 0, -102, 97, 99,101,100,111,116, 95,115,105,122,101, 0, 98,112, 97,100, 91, 50, 93, 0,115,121,110,116, 97,120,108, 91, 52, 93, 0, -115,121,110,116, 97,120,110, 91, 52, 93, 0,115,121,110,116, 97,120, 98, 91, 52, 93, 0,115,121,110,116, 97,120,118, 91, 52, 93, - 0,115,121,110,116, 97,120, 99, 91, 52, 93, 0,109,111,118,105,101, 91, 52, 93, 0,105,109, 97,103,101, 91, 52, 93, 0,115, 99, -101,110,101, 91, 52, 93, 0, 97,117,100,105,111, 91, 52, 93, 0,101,102,102,101, 99,116, 91, 52, 93, 0,112,108,117,103,105,110, - 91, 52, 93, 0,116,114, 97,110,115,105,116,105,111,110, 91, 52, 93, 0,109,101,116, 97, 91, 52, 93, 0,101,100,105,116,109,101, -115,104, 95, 97, 99,116,105,118,101, 91, 52, 93, 0,104, 97,110,100,108,101, 95,118,101,114,116,101,120, 91, 52, 93, 0,104, 97, -110,100,108,101, 95,118,101,114,116,101,120, 95,115,101,108,101, 99,116, 91, 52, 93, 0,104, 97,110,100,108,101, 95,118,101,114, -116,101,120, 95,115,105,122,101, 0,104,112, 97,100, 91, 51, 93, 0,115,111,108,105,100, 91, 52, 93, 0,116,117,105, 0,116, 98, -117,116,115, 0,116,118, 51,100, 0,116,102,105,108,101, 0,116,105,112,111, 0,116,105,110,102,111, 0,116,115,110,100, 0,116, - 97, 99,116, 0,116,110,108, 97, 0,116,115,101,113, 0,116,105,109, 97, 0,116,105,109, 97,115,101,108, 0,116,101,120,116, 0, -116,111,111,112,115, 0,116,116,105,109,101, 0,116,110,111,100,101, 0,116,108,111,103,105, 99, 0,116, 97,114,109, 91, 50, 48, - 93, 0,115,112,101, 99, 91, 52, 93, 0,100,117,112,102,108, 97,103, 0,115, 97,118,101,116,105,109,101, 0,116,101,109,112,100, -105,114, 91, 49, 54, 48, 93, 0,102,111,110,116,100,105,114, 91, 49, 54, 48, 93, 0,114,101,110,100,101,114,100,105,114, 91, 49, - 54, 48, 93, 0,116,101,120,116,117,100,105,114, 91, 49, 54, 48, 93, 0,112,108,117,103,116,101,120,100,105,114, 91, 49, 54, 48, - 93, 0,112,108,117,103,115,101,113,100,105,114, 91, 49, 54, 48, 93, 0,112,121,116,104,111,110,100,105,114, 91, 49, 54, 48, 93, - 0,115,111,117,110,100,100,105,114, 91, 49, 54, 48, 93, 0,121,102,101,120,112,111,114,116,100,105,114, 91, 49, 54, 48, 93, 0, -118,101,114,115,105,111,110,115, 0,103, 97,109,101,102,108, 97,103,115, 0,119,104,101,101,108,108,105,110,101,115, 99,114,111, -108,108, 0,117,105,102,108, 97,103, 0,108, 97,110,103,117, 97,103,101, 0,117,115,101,114,112,114,101,102, 0,118,105,101,119, -122,111,111,109, 0,109,105,120, 98,117,102,115,105,122,101, 0,100,112,105, 0,101,110, 99,111,100,105,110,103, 0,116,114, 97, -110,115,111,112,116,115, 0,109,101,110,117,116,104,114,101,115,104,111,108,100, 49, 0,109,101,110,117,116,104,114,101,115,104, -111,108,100, 50, 0,116,104,101,109,101,115, 0,117,105,102,111,110,116,115, 0,117,105,115,116,121,108,101,115, 0,117,110,100, -111,115,116,101,112,115, 0,117,110,100,111,109,101,109,111,114,121, 0,103,112, 95,109, 97,110,104, 97,116,116,101,110,100,105, -115,116, 0,103,112, 95,101,117, 99,108,105,100,101, 97,110,100,105,115,116, 0,103,112, 95,101,114, 97,115,101,114, 0,103,112, - 95,115,101,116,116,105,110,103,115, 0,116, 98, 95,108,101,102,116,109,111,117,115,101, 0,116, 98, 95,114,105,103,104,116,109, -111,117,115,101, 0,108,105,103,104,116, 91, 51, 93, 0,116,119, 95,104,111,116,115,112,111,116, 0,116,119, 95,102,108, 97,103, - 0,116,119, 95,104, 97,110,100,108,101,115,105,122,101, 0,116,119, 95,115,105,122,101, 0,116,101,120,116,105,109,101,111,117, -116, 0,116,101,120, 99,111,108,108,101, 99,116,114, 97,116,101, 0,119,109,100,114, 97,119,109,101,116,104,111,100, 0,119,109, -112, 97,100, 0,109,101,109, 99, 97, 99,104,101,108,105,109,105,116, 0,112,114,101,102,101,116, 99,104,102,114, 97,109,101,115, - 0,102,114, 97,109,101,115,101,114,118,101,114,112,111,114,116, 0,112, 97,100, 95,114,111,116, 95, 97,110,103,108,101, 0,111, - 98, 99,101,110,116,101,114, 95,100,105, 97, 0,114,118,105,115,105,122,101, 0,114,118,105, 98,114,105,103,104,116, 0,114,101, - 99,101,110,116, 95,102,105,108,101,115, 0,115,109,111,111,116,104, 95,118,105,101,119,116,120, 0,103,108,114,101,115,108,105, -109,105,116, 0,110,100,111,102, 95,112, 97,110, 0,110,100,111,102, 95,114,111,116, 97,116,101, 0, 99,117,114,115,115,105,122, -101, 0,105,112,111, 95,110,101,119, 0,118,101,114,115,101,109, 97,115,116,101,114, 91, 49, 54, 48, 93, 0,118,101,114,115,101, -117,115,101,114, 91, 49, 54, 48, 93, 0,103,108, 97,108,112,104, 97, 99,108,105,112, 0, 97,117,116,111,107,101,121, 95,102,108, - 97,103, 0, 99,111, 98, 97, 95,119,101,105,103,104,116, 0,118,101,114,116, 98, 97,115,101, 0,101,100,103,101, 98, 97,115,101, - 0, 97,114,101, 97, 98, 97,115,101, 0, 42,110,101,119,115, 99,101,110,101, 0,102,117,108,108, 0,119,105,110,105,100, 0,100, -111, 95,100,114, 97,119, 0,100,111, 95,114,101,102,114,101,115,104, 0,100,111, 95,100,114, 97,119, 95,103,101,115,116,117,114, -101, 0,100,111, 95,100,114, 97,119, 95,112, 97,105,110,116, 99,117,114,115,111,114, 0,115,119, 97,112, 0,109, 97,105,110,119, -105,110, 0,115,117, 98,119,105,110, 97, 99,116,105,118,101, 0, 42, 97,110,105,109,116,105,109,101,114, 0, 42, 99,111,110,116, -101,120,116, 0,104, 97,110,100,108,101,114, 91, 56, 93, 0, 42,110,101,119,118, 0,118,101, 99, 0, 42,118, 49, 0, 42,118, 50, - 0, 42,116,121,112,101, 0,112, 97,110,101,108,110, 97,109,101, 91, 54, 52, 93, 0,116, 97, 98,110, 97,109,101, 91, 54, 52, 93, - 0,100,114, 97,119,110, 97,109,101, 91, 54, 52, 93, 0,111,102,115,120, 0,111,102,115,121, 0,115,105,122,101,120, 0,115,105, -122,101,121, 0,108, 97, 98,101,108,111,102,115, 0,114,117,110,116,105,109,101, 95,102,108, 97,103, 0, 99,111,110,116,114,111, -108, 0,115,110, 97,112, 0,115,111,114,116,111,114,100,101,114, 0, 42,112, 97,110,101,108,116, 97, 98, 0, 42, 97, 99,116,105, -118,101,100, 97,116, 97, 0,108,105,115,116, 95,115, 99,114,111,108,108, 0,108,105,115,116, 95,115,105,122,101, 0,108,105,115, -116, 95,115,101, 97,114, 99,104, 91, 54, 52, 93, 0, 42,118, 51, 0, 42,118, 52, 0, 42,102,117,108,108, 0, 98,117,116,115,112, - 97, 99,101,116,121,112,101, 0,104,101, 97,100,101,114,116,121,112,101, 0,115,112, 97, 99,101,100, 97,116, 97, 0,104, 97,110, -100,108,101,114,115, 0, 97, 99,116,105,111,110,122,111,110,101,115, 0,119,105,110,114, 99,116, 0,100,114, 97,119,114, 99,116, - 0,115,119,105,110,105,100, 0,114,101,103,105,111,110,116,121,112,101, 0, 97,108,105,103,110,109,101,110,116, 0,117,105, 98, -108,111, 99,107,115, 0,112, 97,110,101,108,115, 0, 42,104,101, 97,100,101,114,115,116,114, 0, 42,114,101,103,105,111,110,100, - 97,116, 97, 0,115,117, 98,118,115,116,114, 91, 52, 93, 0,115,117, 98,118,101,114,115,105,111,110, 0,112, 97,100,115, 0,109, -105,110,118,101,114,115,105,111,110, 0,109,105,110,115,117, 98,118,101,114,115,105,111,110, 0, 42, 99,117,114,115, 99,114,101, -101,110, 0, 42, 99,117,114,115, 99,101,110,101, 0,102,105,108,101,102,108, 97,103,115, 0,103,108,111, 98, 97,108,102, 0,110, - 97,109,101, 91, 56, 48, 93, 0, 42,105, 98,117,102, 0, 42,105, 98,117,102, 95, 99,111,109,112, 0, 42,115,101, 49, 0, 42,115, -101, 50, 0, 42,115,101, 51, 0,110,114, 0, 98,111,116,116,111,109, 0,114,105,103,104,116, 0,120,111,102,115, 0,121,111,102, -115, 0,108,105,102,116, 91, 51, 93, 0,103, 97,109,109, 97, 91, 51, 93, 0,103, 97,105,110, 91, 51, 93, 0,115, 97,116,117,114, - 97,116,105,111,110, 0,100,105,114, 91, 49, 54, 48, 93, 0,100,111,110,101, 0,115,116, 97,114,116,115,116,105,108,108, 0,101, -110,100,115,116,105,108,108, 0, 42,115,116,114,105,112,100, 97,116, 97, 0,111,114,120, 0,111,114,121, 0, 42, 99,114,111,112, - 0, 42,116,114, 97,110,115,102,111,114,109, 0, 42, 99,111,108,111,114, 95, 98, 97,108, 97,110, 99,101, 0, 42,116,115,116,114, -105,112,100, 97,116, 97, 0, 42,116,115,116,114,105,112,100, 97,116, 97, 95,115,116, 97,114,116,115,116,105,108,108, 0, 42,116, -115,116,114,105,112,100, 97,116, 97, 95,101,110,100,115,116,105,108,108, 0, 42,105, 98,117,102, 95,115,116, 97,114,116,115,116, -105,108,108, 0, 42,105, 98,117,102, 95,101,110,100,115,116,105,108,108, 0, 42,105,110,115,116, 97,110, 99,101, 95,112,114,105, -118, 97,116,101, 95,100, 97,116, 97, 0, 42, 42, 99,117,114,114,101,110,116, 95,112,114,105,118, 97,116,101, 95,100, 97,116, 97, - 0, 42,116,109,112, 0,115,116, 97,114,116,111,102,115, 0,101,110,100,111,102,115, 0,109, 97, 99,104,105,110,101, 0,115,116, - 97,114,116,100,105,115,112, 0,101,110,100,100,105,115,112, 0,104, 97,110,100,115,105,122,101, 0, 97,110,105,109, 95,112,114, -101,115,101,101,107, 0, 42,115,116,114,105,112, 0,102, 97, 99,102, 48, 0,102, 97, 99,102, 49, 0, 42,115,101,113, 49, 0, 42, -115,101,113, 50, 0, 42,115,101,113, 51, 0,115,101,113, 98, 97,115,101, 0, 42,115,111,117,110,100, 0, 42,104,100, 97,117,100, -105,111, 0,108,101,118,101,108, 0,112, 97,110, 0,115, 99,101,110,101,110,114, 0,115,116,114,111, 98,101, 0, 42,101,102,102, -101, 99,116,100, 97,116, 97, 0, 97,110,105,109, 95,115,116, 97,114,116,111,102,115, 0, 97,110,105,109, 95,101,110,100,111,102, -115, 0, 98,108,101,110,100, 95,109,111,100,101, 0, 98,108,101,110,100, 95,111,112, 97, 99,105,116,121, 0, 42,111,108,100, 98, - 97,115,101,112, 0, 42,112, 97,114,115,101,113, 0, 42,115,101,113, 98, 97,115,101,112, 0,109,101,116, 97,115,116, 97, 99,107, - 0, 42, 97, 99,116, 95,115,101,113, 0, 97, 99,116, 95,105,109, 97,103,101,100,105,114, 91, 50, 53, 54, 93, 0, 97, 99,116, 95, -115,111,117,110,100,100,105,114, 91, 50, 53, 54, 93, 0,101,100,103,101, 87,105,100,116,104, 0,102,111,114,119, 97,114,100, 0, -119,105,112,101,116,121,112,101, 0,102, 77,105,110,105, 0,102, 67,108, 97,109,112, 0,102, 66,111,111,115,116, 0,100, 68,105, -115,116, 0,100, 81,117, 97,108,105,116,121, 0, 98, 78,111, 67,111,109,112, 0, 83, 99, 97,108,101,120, 73,110,105, 0, 83, 99, - 97,108,101,121, 73,110,105, 0, 83, 99, 97,108,101,120, 70,105,110, 0, 83, 99, 97,108,101,121, 70,105,110, 0,120, 73,110,105, - 0,120, 70,105,110, 0,121, 73,110,105, 0,121, 70,105,110, 0,114,111,116, 73,110,105, 0,114,111,116, 70,105,110, 0,105,110, -116,101,114,112,111,108, 97,116,105,111,110, 0, 42,102,114, 97,109,101, 77, 97,112, 0,103,108,111, 98, 97,108, 83,112,101,101, -100, 0,108, 97,115,116, 86, 97,108,105,100, 70,114, 97,109,101, 0, 98,117,116,116,121,112,101, 0,117,115,101,114,106,105,116, - 0,115,116, 97, 0,116,111,116,112, 97,114,116, 0,110,111,114,109,102, 97, 99, 0,111, 98,102, 97, 99, 0,114, 97,110,100,102, - 97, 99, 0,116,101,120,102, 97, 99, 0,114, 97,110,100,108,105,102,101, 0,102,111,114, 99,101, 91, 51, 93, 0,118,101, 99,116, -115,105,122,101, 0,109, 97,120,108,101,110, 0,100,101,102,118,101, 99, 91, 51, 93, 0,109,117,108,116, 91, 52, 93, 0,108,105, -102,101, 91, 52, 93, 0, 99,104,105,108,100, 91, 52, 93, 0,109, 97,116, 91, 52, 93, 0,116,101,120,109, 97,112, 0, 99,117,114, -109,117,108,116, 0,115,116, 97,116,105, 99,115,116,101,112, 0,111,109, 97,116, 0,116,105,109,101,116,101,120, 0,115,112,101, -101,100,116,101,120, 0,102,108, 97,103, 50,110,101,103, 0,118,101,114,116,103,114,111,117,112, 95,118, 0,118,103,114,111,117, -112,110, 97,109,101, 91, 51, 50, 93, 0,118,103,114,111,117,112,110, 97,109,101, 95,118, 91, 51, 50, 93, 0, 42,107,101,121,115, - 0,109,105,110,102, 97, 99, 0,117,115,101,100, 0,117,115,101,100,101,108,101,109, 0, 42,112,111,105,110, 0,114,101,115,101, -116,100,105,115,116, 0,108, 97,115,116,118, 97,108, 0, 42,109, 97, 0,107,101,121, 0,113,117, 97,108, 0,113,117, 97,108, 50, - 0,116, 97,114,103,101,116, 78, 97,109,101, 91, 51, 50, 93, 0,116,111,103,103,108,101, 78, 97,109,101, 91, 51, 50, 93, 0,118, - 97,108,117,101, 91, 51, 50, 93, 0,109, 97,120,118, 97,108,117,101, 91, 51, 50, 93, 0,100,101,108, 97,121, 0,100,117,114, 97, -116,105,111,110, 0,109, 97,116,101,114,105, 97,108, 78, 97,109,101, 91, 51, 50, 93, 0,100, 97,109,112,116,105,109,101,114, 0, -112,114,111,112,110, 97,109,101, 91, 51, 50, 93, 0,109, 97,116,110, 97,109,101, 91, 51, 50, 93, 0, 97,120,105,115,102,108, 97, -103, 0, 42,102,114,111,109, 79, 98,106,101, 99,116, 0,115,117, 98,106,101, 99,116, 91, 51, 50, 93, 0, 98,111,100,121, 91, 51, - 50, 93, 0,111,116,121,112,101, 0,112,117,108,115,101, 0,102,114,101,113, 0,116,111,116,108,105,110,107,115, 0, 42, 42,108, -105,110,107,115, 0,116, 97,112, 0,106,111,121,105,110,100,101,120, 0, 97,120,105,115, 95,115,105,110,103,108,101, 0, 97,120, -105,115,102, 0, 98,117,116,116,111,110, 0,104, 97,116, 0,104, 97,116,102, 0,112,114,101, 99,105,115,105,111,110, 0,115,116, -114, 91, 49, 50, 56, 93, 0,109,111,100,117,108,101, 91, 54, 52, 93, 0, 42,109,121,110,101,119, 0,105,110,112,117,116,115, 0, -116,111,116,115,108,105,110,107,115, 0, 42, 42,115,108,105,110,107,115, 0,118, 97,108,111, 0,115,116, 97,116,101, 95,109, 97, -115,107, 0, 42, 97, 99,116, 0,102,114, 97,109,101, 80,114,111,112, 91, 51, 50, 93, 0, 98,108,101,110,100,105,110, 0,112,114, -105,111,114,105,116,121, 0,101,110,100, 95,114,101,115,101,116, 0,115,116,114,105,100,101, 97,120,105,115, 0,115,116,114,105, -100,101,108,101,110,103,116,104, 0,115,110,100,110,114, 0,112, 97,100, 49, 91, 50, 93, 0,109, 97,107,101, 99,111,112,121, 0, - 99,111,112,121,109, 97,100,101, 0,112, 97,100, 50, 91, 49, 93, 0,116,114, 97, 99,107, 0, 42,109,101, 0,108,105,110, 86,101, -108,111, 99,105,116,121, 91, 51, 93, 0, 97,110,103, 86,101,108,111, 99,105,116,121, 91, 51, 93, 0,108,111, 99, 97,108,102,108, - 97,103, 0,100,121,110, 95,111,112,101,114, 97,116,105,111,110, 0,102,111,114, 99,101,108,111, 99, 91, 51, 93, 0,102,111,114, - 99,101,114,111,116, 91, 51, 93, 0,108,105,110,101, 97,114,118,101,108,111, 99,105,116,121, 91, 51, 93, 0, 97,110,103,117,108, - 97,114,118,101,108,111, 99,105,116,121, 91, 51, 93, 0, 42,114,101,102,101,114,101,110, 99,101, 0, 98,117,116,115,116, 97, 0, - 98,117,116,101,110,100, 0,109,105,110, 0,109, 97,120, 0,118,105,115,105,102, 97, 99, 0,114,111,116,100, 97,109,112, 0,109, -105,110,108,111, 99, 91, 51, 93, 0,109, 97,120,108,111, 99, 91, 51, 93, 0,109,105,110,114,111,116, 91, 51, 93, 0,109, 97,120, -114,111,116, 91, 51, 93, 0,109, 97,116,112,114,111,112, 91, 51, 50, 93, 0,100,105,115,116,114,105, 98,117,116,105,111,110, 0, -105,110,116, 95, 97,114,103, 95, 49, 0,105,110,116, 95, 97,114,103, 95, 50, 0,102,108,111, 97,116, 95, 97,114,103, 95, 49, 0, -102,108,111, 97,116, 95, 97,114,103, 95, 50, 0,116,111, 80,114,111,112, 78, 97,109,101, 91, 51, 50, 93, 0, 42,116,111, 79, 98, -106,101, 99,116, 0, 98,111,100,121, 84,121,112,101, 0,102,105,108,101,110, 97,109,101, 91, 54, 52, 93, 0,108,111, 97,100, 97, -110,105,110, 97,109,101, 91, 54, 52, 93, 0,105,110,116, 95, 97,114,103, 0,102,108,111, 97,116, 95, 97,114,103, 0,103,111, 0, - 97, 99, 99,101,108,108,101,114, 97,116,105,111,110, 0,109, 97,120,115,112,101,101,100, 0,109, 97,120,114,111,116,115,112,101, -101,100, 0,109, 97,120,116,105,108,116,115,112,101,101,100, 0,116,105,108,116,100, 97,109,112, 0,115,112,101,101,100,100, 97, -109,112, 0, 42,115, 97,109,112,108,101, 0, 42,115,116,114,101, 97,109, 0, 42,110,101,119,112, 97, 99,107,101,100,102,105,108, -101, 0, 42,115,110,100, 95,115,111,117,110,100, 0,112, 97,110,110,105,110,103, 0, 97,116,116,101,110,117, 97,116,105,111,110, - 0,112,105,116, 99,104, 0,109,105,110, 95,103, 97,105,110, 0,109, 97,120, 95,103, 97,105,110, 0,100,105,115,116, 97,110, 99, -101, 0,115,116,114,101, 97,109,108,101,110, 0, 99,104, 97,110,110,101,108,115, 0,104,105,103,104,112,114,105,111, 0,112, 97, -100, 91, 49, 48, 93, 0,103, 97,105,110, 0,100,111,112,112,108,101,114,102, 97, 99,116,111,114, 0,100,111,112,112,108,101,114, -118,101,108,111, 99,105,116,121, 0,110,117,109,115,111,117,110,100,115, 98,108,101,110,100,101,114, 0,110,117,109,115,111,117, -110,100,115,103, 97,109,101,101,110,103,105,110,101, 0, 42, 97,114,101, 97, 0, 42,108, 97,109,112,114,101,110, 0,103,111, 98, +101,109, 0,118,101, 99, 91, 51, 93, 91, 51, 93, 0, 97,108,102, 97, 0,119,101,105,103,104,116, 0,104, 49, 0,104, 50, 0,102, + 49, 0,102, 50, 0,102, 51, 0,104,105,100,101, 0,118,101, 99, 91, 52, 93, 0,109, 97,116, 95,110,114, 0,112,110,116,115,117, + 0,112,110,116,115,118, 0,114,101,115,111,108,117, 0,114,101,115,111,108,118, 0,111,114,100,101,114,117, 0,111,114,100,101, +114,118, 0,102,108, 97,103,117, 0,102,108, 97,103,118, 0, 42,107,110,111,116,115,117, 0, 42,107,110,111,116,115,118, 0,116, +105,108,116, 95,105,110,116,101,114,112, 0,114, 97,100,105,117,115, 95,105,110,116,101,114,112, 0, 99,104, 97,114,105,100,120, + 0,107,101,114,110, 0,104, 0,110,117,114, 98, 0, 42,101,100,105,116,110,117,114, 98, 0, 42, 98,101,118,111, 98,106, 0, 42, +116, 97,112,101,114,111, 98,106, 0, 42,116,101,120,116,111,110, 99,117,114,118,101, 0, 42,112, 97,116,104, 0, 42,107,101,121, + 0, 98,101,118, 0,100,114, 97,119,102,108, 97,103, 0,116,119,105,115,116, 95,109,111,100,101, 0,112, 97,100, 91, 50, 93, 0, +116,119,105,115,116, 95,115,109,111,111,116,104, 0,112, 97,116,104,108,101,110, 0, 98,101,118,114,101,115,111,108, 0,119,105, +100,116,104, 0,101,120,116, 49, 0,101,120,116, 50, 0,114,101,115,111,108,117, 95,114,101,110, 0,114,101,115,111,108,118, 95, +114,101,110, 0, 97, 99,116,110,117, 0, 42,108, 97,115,116,115,101,108, 98,112, 0,115,112, 97, 99,101,109,111,100,101, 0,115, +112, 97, 99,105,110,103, 0,108,105,110,101,100,105,115,116, 0,115,104,101, 97,114, 0,102,115,105,122,101, 0,119,111,114,100, +115,112, 97, 99,101, 0,117,108,112,111,115, 0,117,108,104,101,105,103,104,116, 0,120,111,102, 0,121,111,102, 0,108,105,110, +101,119,105,100,116,104, 0, 42,115,116,114, 0, 42,115,101,108, 98,111,120,101,115, 0, 42,101,100,105,116,102,111,110,116, 0, +102, 97,109,105,108,121, 91, 50, 52, 93, 0, 42,118,102,111,110,116, 0, 42,118,102,111,110,116, 98, 0, 42,118,102,111,110,116, +105, 0, 42,118,102,111,110,116, 98,105, 0,115,101,112, 99,104, 97,114, 0, 99,116,105,109,101, 0,116,111,116, 98,111,120, 0, + 97, 99,116, 98,111,120, 0, 42,116, 98, 0,115,101,108,115,116, 97,114,116, 0,115,101,108,101,110,100, 0, 42,115,116,114,105, +110,102,111, 0, 99,117,114,105,110,102,111, 0,101,102,102,101, 99,116, 0, 42,109,102, 97, 99,101, 0, 42,109,116,102, 97, 99, +101, 0, 42,116,102, 97, 99,101, 0, 42,109,118,101,114,116, 0, 42,109,101,100,103,101, 0, 42,100,118,101,114,116, 0, 42,109, + 99,111,108, 0, 42,109,115,116,105, 99,107,121, 0, 42,116,101,120, 99,111,109,101,115,104, 0, 42,109,115,101,108,101, 99,116, + 0, 42,101,100,105,116, 95,109,101,115,104, 0,118,100, 97,116, 97, 0,101,100, 97,116, 97, 0,102,100, 97,116, 97, 0,116,111, +116,101,100,103,101, 0,116,111,116,102, 97, 99,101, 0,116,111,116,115,101,108,101, 99,116, 0, 97, 99,116, 95,102, 97, 99,101, + 0, 99,117, 98,101,109, 97,112,115,105,122,101, 0,115,109,111,111,116,104,114,101,115,104, 0,115,117, 98,100,105,118, 0,115, +117, 98,100,105,118,114, 0,115,117, 98,115,117,114,102,116,121,112,101, 0, 42,109,114, 0, 42,112,118, 0, 42,116,112, 97,103, +101, 0,117,118, 91, 52, 93, 91, 50, 93, 0, 99,111,108, 91, 52, 93, 0,116,114, 97,110,115,112, 0,116,105,108,101, 0,117,110, +119,114, 97,112, 0,118, 49, 0,118, 50, 0,118, 51, 0,118, 52, 0,101,100, 99,111,100,101, 0, 99,114,101, 97,115,101, 0, 98, +119,101,105,103,104,116, 0,100,101,102, 95,110,114, 0, 42,100,119, 0,116,111,116,119,101,105,103,104,116, 0, 99,111, 91, 51, + 93, 0,110,111, 91, 51, 93, 0,117,118, 91, 50, 93, 0, 99,111, 91, 50, 93, 0,105,110,100,101,120, 0,102, 0,105, 0,115, 91, + 50, 53, 54, 93, 0,116,111,116,100,105,115,112, 0, 40, 42,100,105,115,112,115, 41, 40, 41, 0,118, 91, 52, 93, 0,109,105,100, + 0,118, 91, 50, 93, 0, 42,102, 97, 99,101,115, 0, 42, 99,111,108,102, 97, 99,101,115, 0, 42,101,100,103,101,115, 0, 42,118, +101,114,116,115, 0,108,101,118,101,108,115, 0,108,101,118,101,108, 95, 99,111,117,110,116, 0, 99,117,114,114,101,110,116, 0, +110,101,119,108,118,108, 0,101,100,103,101,108,118,108, 0,112,105,110,108,118,108, 0,114,101,110,100,101,114,108,118,108, 0, +117,115,101, 95, 99,111,108, 0, 42,101,100,103,101, 95,102,108, 97,103,115, 0, 42,101,100,103,101, 95, 99,114,101, 97,115,101, +115, 0, 42,118,101,114,116, 95,109, 97,112, 0, 42,101,100,103,101, 95,109, 97,112, 0, 42,111,108,100, 95,102, 97, 99,101,115, + 0, 42,111,108,100, 95,101,100,103,101,115, 0, 42,101,114,114,111,114, 0,109,111,100,105,102,105,101,114, 0,115,117, 98,100, +105,118, 84,121,112,101, 0,114,101,110,100,101,114, 76,101,118,101,108,115, 0, 42,101,109, 67, 97, 99,104,101, 0, 42,109, 67, + 97, 99,104,101, 0,100,101,102, 97,120,105,115, 0,112, 97,100, 91, 54, 93, 0,108,101,110,103,116,104, 0,114, 97,110,100,111, +109,105,122,101, 0,115,101,101,100, 0, 42,111, 98, 95, 97,114,109, 0, 42,115,116, 97,114,116, 95, 99, 97,112, 0, 42,101,110, +100, 95, 99, 97,112, 0, 42, 99,117,114,118,101, 95,111, 98, 0, 42,111,102,102,115,101,116, 95,111, 98, 0,111,102,102,115,101, +116, 91, 51, 93, 0,115, 99, 97,108,101, 91, 51, 93, 0,109,101,114,103,101, 95,100,105,115,116, 0,102,105,116, 95,116,121,112, +101, 0,111,102,102,115,101,116, 95,116,121,112,101, 0, 99,111,117,110,116, 0, 97,120,105,115, 0,116,111,108,101,114, 97,110, + 99,101, 0, 42,109,105,114,114,111,114, 95,111, 98, 0,115,112,108,105,116, 95, 97,110,103,108,101, 0,118, 97,108,117,101, 0, +114,101,115, 0,118, 97,108, 95,102,108, 97,103,115, 0,108,105,109, 95,102,108, 97,103,115, 0,101, 95,102,108, 97,103,115, 0, + 98,101,118,101,108, 95, 97,110,103,108,101, 0,100,101,102,103,114,112, 95,110, 97,109,101, 91, 51, 50, 93, 0, 42,100,111,109, + 97,105,110, 0, 42,102,108,111,119, 0, 42, 99,111,108,108, 0,116,105,109,101, 0, 42,116,101,120,116,117,114,101, 0,115,116, +114,101,110,103,116,104, 0,100,105,114,101, 99,116,105,111,110, 0,109,105,100,108,101,118,101,108, 0,116,101,120,109, 97,112, +112,105,110,103, 0, 42,109, 97,112, 95,111, 98,106,101, 99,116, 0,117,118,108, 97,121,101,114, 95,110, 97,109,101, 91, 51, 50, + 93, 0,117,118,108, 97,121,101,114, 95,116,109,112, 0, 42,112,114,111,106,101, 99,116,111,114,115, 91, 49, 48, 93, 0, 42,105, +109, 97,103,101, 0,110,117,109, 95,112,114,111,106,101, 99,116,111,114,115, 0, 97,115,112,101, 99,116,120, 0, 97,115,112,101, + 99,116,121, 0,112,101,114, 99,101,110,116, 0,102, 97, 99,101, 67,111,117,110,116, 0,102, 97, 99, 0,114,101,112,101, 97,116, + 0, 42,111, 98,106,101, 99,116, 99,101,110,116,101,114, 0,115,116, 97,114,116,120, 0,115,116, 97,114,116,121, 0,104,101,105, +103,104,116, 0,110, 97,114,114,111,119, 0,115,112,101,101,100, 0,100, 97,109,112, 0,102, 97,108,108,111,102,102, 0,116,105, +109,101,111,102,102,115, 0,108,105,102,101,116,105,109,101, 0,100,101,102,111,114,109,102,108, 97,103, 0,109,117,108,116,105, + 0, 42,112,114,101,118, 67,111,115, 0,115,117, 98,116, 97,114,103,101,116, 91, 51, 50, 93, 0,112, 97,114,101,110,116,105,110, +118, 91, 52, 93, 91, 52, 93, 0, 99,101,110,116, 91, 51, 93, 0, 42,105,110,100,101,120, 97,114, 0,116,111,116,105,110,100,101, +120, 0,102,111,114, 99,101, 0, 42, 99,108,111,116,104, 79, 98,106,101, 99,116, 0, 42,115,105,109, 95,112, 97,114,109,115, 0, + 42, 99,111,108,108, 95,112, 97,114,109,115, 0, 42,112,111,105,110,116, 95, 99, 97, 99,104,101, 0,112,116, 99, 97, 99,104,101, +115, 0, 42,120, 0, 42,120,110,101,119, 0, 42,120,111,108,100, 0, 42, 99,117,114,114,101,110,116, 95,120,110,101,119, 0, 42, + 99,117,114,114,101,110,116, 95,120, 0, 42, 99,117,114,114,101,110,116, 95,118, 0, 42,109,102, 97, 99,101,115, 0,110,117,109, +118,101,114,116,115, 0,110,117,109,102, 97, 99,101,115, 0, 42, 98,118,104,116,114,101,101, 0, 42,118, 0, 42,100,109, 0, 99, +102,114, 97, 0,111,112,101,114, 97,116,105,111,110, 0,118,101,114,116,101,120, 0,116,111,116,105,110,102,108,117,101,110, 99, +101, 0,103,114,105,100,115,105,122,101, 0,110,101,101,100, 98,105,110,100, 0, 42, 98,105,110,100,119,101,105,103,104,116,115, + 0, 42, 98,105,110,100, 99,111,115, 0,116,111,116, 99, 97,103,101,118,101,114,116, 0, 42,100,121,110,103,114,105,100, 0, 42, +100,121,110,105,110,102,108,117,101,110, 99,101,115, 0, 42,100,121,110,118,101,114,116,115, 0, 42,112, 97,100, 50, 0,100,121, +110,103,114,105,100,115,105,122,101, 0,100,121,110, 99,101,108,108,109,105,110, 91, 51, 93, 0,100,121,110, 99,101,108,108,119, +105,100,116,104, 0, 98,105,110,100,109, 97,116, 91, 52, 93, 91, 52, 93, 0,116,111,116,100,109,118,101,114,116, 0,116,111,116, +100,109,101,100,103,101, 0,116,111,116,100,109,102, 97, 99,101, 0,112,115,121,115, 0,112,111,115,105,116,105,111,110, 0,114, + 97,110,100,111,109, 95,112,111,115,105,116,105,111,110, 0, 42,102, 97, 99,101,112, 97, 0,118,103,114,111,117,112, 0,112,114, +111,116,101, 99,116, 0, 42,117,110,100,111, 95,118,101,114,116,115, 0,117,110,100,111, 95,118,101,114,116,115, 95,116,111,116, + 0,117,110,100,111, 95,115,105,103,110, 97,108, 0,108,118,108, 0,116,111,116,108,118,108, 0,115,105,109,112,108,101, 0, 42, +102,115,115, 0, 42,116, 97,114,103,101,116, 0, 42, 97,117,120, 84, 97,114,103,101,116, 0,118,103,114,111,117,112, 95,110, 97, +109,101, 91, 51, 50, 93, 0,107,101,101,112, 68,105,115,116, 0,115,104,114,105,110,107, 84,121,112,101, 0,115,104,114,105,110, +107, 79,112,116,115, 0,112,114,111,106, 65,120,105,115, 0,115,117, 98,115,117,114,102, 76,101,118,101,108,115, 0, 42,111,114, +105,103,105,110, 0,102, 97, 99,116,111,114, 0,108,105,109,105,116, 91, 50, 93, 0,111,114,105,103,105,110, 79,112,116,115, 0, +112,110,116,115,119, 0,111,112,110,116,115,117, 0,111,112,110,116,115,118, 0,111,112,110,116,115,119, 0,116,121,112,101,117, + 0,116,121,112,101,118, 0,116,121,112,101,119, 0,102,117, 0,102,118, 0,102,119, 0,100,117, 0,100,118, 0,100,119, 0, 42, +100,101,102, 0, 42,108, 97,116,116,105, 99,101,100, 97,116, 97, 0,108, 97,116,109, 97,116, 91, 52, 93, 91, 52, 93, 0, 42,101, +100,105,116,108, 97,116,116, 0,118,101, 99, 91, 56, 93, 91, 51, 93, 0, 42,115, 99,117,108,112,116, 0,112, 97,114,116,121,112, +101, 0,112, 97,114, 49, 0,112, 97,114, 50, 0,112, 97,114, 51, 0,112, 97,114,115,117, 98,115,116,114, 91, 51, 50, 93, 0, 42, +116,114, 97, 99,107, 0, 42,112,114,111,120,121, 0, 42,112,114,111,120,121, 95,103,114,111,117,112, 0, 42,112,114,111,120,121, + 95,102,114,111,109, 0, 42, 97, 99,116,105,111,110, 0, 42,112,111,115,101,108,105, 98, 0, 42,112,111,115,101, 0, 42,103,112, +100, 0, 99,111,110,115,116,114, 97,105,110,116, 67,104, 97,110,110,101,108,115, 0,100,101,102, 98, 97,115,101, 0,109,111,100, +105,102,105,101,114,115, 0,114,101,115,116,111,114,101, 95,109,111,100,101, 0, 42,109, 97,116, 98,105,116,115, 0, 97, 99,116, + 99,111,108, 0,100,108,111, 99, 91, 51, 93, 0,111,114,105,103, 91, 51, 93, 0,100,115,105,122,101, 91, 51, 93, 0,100,114,111, +116, 91, 51, 93, 0,111, 98,109, 97,116, 91, 52, 93, 91, 52, 93, 0, 99,111,110,115,116,105,110,118, 91, 52, 93, 91, 52, 93, 0, +108, 97,121, 0, 99,111,108, 98,105,116,115, 0,116,114, 97,110,115,102,108, 97,103, 0,112,114,111,116,101, 99,116,102,108, 97, +103, 0,116,114, 97, 99,107,102,108, 97,103, 0,117,112,102,108, 97,103, 0,110,108, 97,102,108, 97,103, 0,105,112,111,102,108, + 97,103, 0,105,112,111,119,105,110, 0,115, 99, 97,102,108, 97,103, 0,115, 99, 97,118,105,115,102,108, 97,103, 0, 98,111,117, +110,100,116,121,112,101, 0,100,117,112,111,110, 0,100,117,112,111,102,102, 0,100,117,112,115,116, 97, 0,100,117,112,101,110, +100, 0,115,102, 0,109, 97,115,115, 0,100, 97,109,112,105,110,103, 0,105,110,101,114,116,105, 97, 0,102,111,114,109,102, 97, + 99,116,111,114, 0,114,100, 97,109,112,105,110,103, 0,115,105,122,101,102, 97, 99, 0,109, 97,114,103,105,110, 0,109, 97,120, + 95,118,101,108, 0,109,105,110, 95,118,101,108, 0,109, 95, 99,111,110,116, 97, 99,116, 80,114,111, 99,101,115,115,105,110,103, + 84,104,114,101,115,104,111,108,100, 0,100,116, 0,100,116,120, 0,101,109,112,116,121, 95,100,114, 97,119,116,121,112,101, 0, +112, 97,100, 49, 91, 53, 93, 0,101,109,112,116,121, 95,100,114, 97,119,115,105,122,101, 0,100,117,112,102, 97, 99,101,115, 99, + 97, 0,112,114,111,112, 0,115,101,110,115,111,114,115, 0, 99,111,110,116,114,111,108,108,101,114,115, 0, 97, 99,116,117, 97, +116,111,114,115, 0, 98, 98,115,105,122,101, 91, 51, 93, 0, 97, 99,116,100,101,102, 0,103, 97,109,101,102,108, 97,103, 0,103, + 97,109,101,102,108, 97,103, 50, 0, 42, 98,115,111,102,116, 0,115,111,102,116,102,108, 97,103, 0, 97,110,105,115,111,116,114, +111,112,105, 99, 70,114,105, 99,116,105,111,110, 91, 51, 93, 0, 99,111,110,115,116,114, 97,105,110,116,115, 0,110,108, 97,115, +116,114,105,112,115, 0,104,111,111,107,115, 0,112, 97,114,116,105, 99,108,101,115,121,115,116,101,109, 0, 42,115,111,102,116, + 0, 42,100,117,112, 95,103,114,111,117,112, 0,102,108,117,105,100,115,105,109, 70,108, 97,103, 0,114,101,115,116,114,105, 99, +116,102,108, 97,103, 0,115,104, 97,112,101,110,114, 0,115,104, 97,112,101,102,108, 97,103, 0,114,101, 99, 97,108, 99,111, 0, + 98,111,100,121, 95,116,121,112,101, 0, 42,102,108,117,105,100,115,105,109, 83,101,116,116,105,110,103,115, 0, 42,100,101,114, +105,118,101,100, 68,101,102,111,114,109, 0, 42,100,101,114,105,118,101,100, 70,105,110, 97,108, 0,108, 97,115,116, 68, 97,116, + 97, 77, 97,115,107, 0,115,116, 97,116,101, 0,105,110,105,116, 95,115,116, 97,116,101, 0,103,112,117,108, 97,109,112, 0,112, + 99, 95,105,100,115, 0, 99,117,114,105,110,100,101,120, 0, 97, 99,116,105,118,101, 0,100,101,102,108,101, 99,116, 0,102,111, +114, 99,101,102,105,101,108,100, 0,112,100,101,102, 95,100, 97,109,112, 0,112,100,101,102, 95,114,100, 97,109,112, 0,112,100, +101,102, 95,112,101,114,109, 0,112,100,101,102, 95,102,114,105, 99,116, 0,112,100,101,102, 95,114,102,114,105, 99,116, 0,102, + 95,115,116,114,101,110,103,116,104, 0,102, 95,112,111,119,101,114, 0,102, 95,100,105,115,116, 0,102, 95,100, 97,109,112, 0, +109, 97,120,100,105,115,116, 0,109,105,110,100,105,115,116, 0,109, 97,120,114, 97,100, 0,109,105,110,114, 97,100, 0,102, 95, +112,111,119,101,114, 95,114, 0,112,100,101,102, 95,115, 98,100, 97,109,112, 0,112,100,101,102, 95,115, 98,105,102,116, 0,112, +100,101,102, 95,115, 98,111,102,116, 0, 99,108,117,109,112, 95,102, 97, 99, 0, 99,108,117,109,112, 95,112,111,119, 0,107,105, +110,107, 95,102,114,101,113, 0,107,105,110,107, 95,115,104, 97,112,101, 0,107,105,110,107, 95, 97,109,112, 0,102,114,101,101, + 95,101,110,100, 0,116,101,120, 95,110, 97, 98,108, 97, 0,116,101,120, 95,109,111,100,101, 0,107,105,110,107, 0,107,105,110, +107, 95, 97,120,105,115, 0,114,116, 50, 0, 42,114,110,103, 0,102, 95,110,111,105,115,101, 0,102,114, 97,109,101, 0,116,111, +116,112,111,105,110,116, 0,100, 97,116, 97, 95,116,121,112,101,115, 0, 42,105,110,100,101,120, 95, 97,114,114, 97,121, 0, 42, +100, 97,116, 97, 91, 56, 93, 0, 42, 99,117,114, 91, 56, 93, 0,115,116,101,112, 0,115,105,109,102,114, 97,109,101, 0,115,116, + 97,114,116,102,114, 97,109,101, 0,101,110,100,102,114, 97,109,101, 0,101,100,105,116,102,114, 97,109,101, 0,108, 97,115,116, + 95,101,120, 97, 99,116, 0,110, 97,109,101, 91, 54, 52, 93, 0,112,114,101,118, 95,110, 97,109,101, 91, 54, 52, 93, 0,105,110, +102,111, 91, 54, 52, 93, 0,112, 97,116,104, 91, 50, 52, 48, 93, 0,109,101,109, 95, 99, 97, 99,104,101, 0, 42,101,100,105,116, + 0, 40, 42,102,114,101,101, 95,101,100,105,116, 41, 40, 41, 0,108,105,110, 83,116,105,102,102, 0, 97,110,103, 83,116,105,102, +102, 0,118,111,108,117,109,101, 0,118,105,116,101,114, 97,116,105,111,110,115, 0,112,105,116,101,114, 97,116,105,111,110,115, + 0,100,105,116,101,114, 97,116,105,111,110,115, 0, 99,105,116,101,114, 97,116,105,111,110,115, 0,107, 83, 82, 72, 82, 95, 67, + 76, 0,107, 83, 75, 72, 82, 95, 67, 76, 0,107, 83, 83, 72, 82, 95, 67, 76, 0,107, 83, 82, 95, 83, 80, 76, 84, 95, 67, 76, 0, +107, 83, 75, 95, 83, 80, 76, 84, 95, 67, 76, 0,107, 83, 83, 95, 83, 80, 76, 84, 95, 67, 76, 0,107, 86, 67, 70, 0,107, 68, 80, + 0,107, 68, 71, 0,107, 76, 70, 0,107, 80, 82, 0,107, 86, 67, 0,107, 68, 70, 0,107, 77, 84, 0,107, 67, 72, 82, 0,107, 75, + 72, 82, 0,107, 83, 72, 82, 0,107, 65, 72, 82, 0, 99,111,108,108,105,115,105,111,110,102,108, 97,103,115, 0,110,117,109, 99, +108,117,115,116,101,114,105,116,101,114, 97,116,105,111,110,115, 0,119,101,108,100,105,110,103, 0,116,111,116,115,112,114,105, +110,103, 0, 42, 98,112,111,105,110,116, 0, 42, 98,115,112,114,105,110,103, 0,109,115,103, 95,108,111, 99,107, 0,109,115,103, + 95,118, 97,108,117,101, 0,110,111,100,101,109, 97,115,115, 0,110, 97,109,101,100, 86, 71, 95, 77, 97,115,115, 91, 51, 50, 93, + 0,103,114, 97,118, 0,109,101,100,105, 97,102,114,105, 99,116, 0,114,107,108,105,109,105,116, 0,112,104,121,115,105, 99,115, + 95,115,112,101,101,100, 0,103,111, 97,108,115,112,114,105,110,103, 0,103,111, 97,108,102,114,105, 99,116, 0,109,105,110,103, +111, 97,108, 0,109, 97,120,103,111, 97,108, 0,100,101,102,103,111, 97,108, 0,118,101,114,116,103,114,111,117,112, 0,110, 97, +109,101,100, 86, 71, 95, 83,111,102,116,103,111, 97,108, 91, 51, 50, 93, 0,102,117,122,122,121,110,101,115,115, 0,105,110,115, +112,114,105,110,103, 0,105,110,102,114,105, 99,116, 0,110, 97,109,101,100, 86, 71, 95, 83,112,114,105,110,103, 95, 75, 91, 51, + 50, 93, 0,101,102,114, 97, 0,105,110,116,101,114,118, 97,108, 0,108,111, 99, 97,108, 0,115,111,108,118,101,114,102,108, 97, +103,115, 0, 42, 42,107,101,121,115, 0,116,111,116,112,111,105,110,116,107,101,121, 0,115,101, 99,111,110,100,115,112,114,105, +110,103, 0, 99,111,108, 98, 97,108,108, 0, 98, 97,108,108,100, 97,109,112, 0, 98, 97,108,108,115,116,105,102,102, 0,115, 98, + 99, 95,109,111,100,101, 0, 97,101,114,111,101,100,103,101, 0,109,105,110,108,111,111,112,115, 0,109, 97,120,108,111,111,112, +115, 0, 99,104,111,107,101, 0,115,111,108,118,101,114, 95, 73, 68, 0,112,108, 97,115,116,105, 99, 0,115,112,114,105,110,103, +112,114,101,108,111, 97,100, 0, 42,115, 99,114, 97,116, 99,104, 0,115,104,101, 97,114,115,116,105,102,102, 0,105,110,112,117, +115,104, 0, 42,112,111,105,110,116, 99, 97, 99,104,101, 0,115,104,111,119, 95, 97,100,118, 97,110, 99,101,100,111,112,116,105, +111,110,115, 0,114,101,115,111,108,117,116,105,111,110,120,121,122, 0,112,114,101,118,105,101,119,114,101,115,120,121,122, 0, +114,101, 97,108,115,105,122,101, 0,103,117,105, 68,105,115,112,108, 97,121, 77,111,100,101, 0,114,101,110,100,101,114, 68,105, +115,112,108, 97,121, 77,111,100,101, 0,118,105,115, 99,111,115,105,116,121, 86, 97,108,117,101, 0,118,105,115, 99,111,115,105, +116,121, 77,111,100,101, 0,118,105,115, 99,111,115,105,116,121, 69,120,112,111,110,101,110,116, 0,103,114, 97,118,120, 0,103, +114, 97,118,121, 0,103,114, 97,118,122, 0, 97,110,105,109, 83,116, 97,114,116, 0, 97,110,105,109, 69,110,100, 0,103,115,116, + 97,114, 0,109, 97,120, 82,101,102,105,110,101, 0,105,110,105, 86,101,108,120, 0,105,110,105, 86,101,108,121, 0,105,110,105, + 86,101,108,122, 0, 42,111,114,103, 77,101,115,104, 0, 42,109,101,115,104, 83,117,114,102, 97, 99,101, 0, 42,109,101,115,104, + 66, 66, 0,115,117,114,102,100, 97,116, 97, 80, 97,116,104, 91, 50, 52, 48, 93, 0, 98, 98, 83,116, 97,114,116, 91, 51, 93, 0, + 98, 98, 83,105,122,101, 91, 51, 93, 0,116,121,112,101, 70,108, 97,103,115, 0,100,111,109, 97,105,110, 78,111,118,101, 99,103, +101,110, 0,118,111,108,117,109,101, 73,110,105,116, 84,121,112,101, 0,112, 97,114,116, 83,108,105,112, 86, 97,108,117,101, 0, +103,101,110,101,114, 97,116,101, 84,114, 97, 99,101,114,115, 0,103,101,110,101,114, 97,116,101, 80, 97,114,116,105, 99,108,101, +115, 0,115,117,114,102, 97, 99,101, 83,109,111,111,116,104,105,110,103, 0,115,117,114,102, 97, 99,101, 83,117, 98,100,105,118, +115, 0,112, 97,114,116,105, 99,108,101, 73,110,102, 83,105,122,101, 0,112, 97,114,116,105, 99,108,101, 73,110,102, 65,108,112, +104, 97, 0,102, 97,114, 70,105,101,108,100, 83,105,122,101, 0, 42,109,101,115,104, 83,117,114,102, 78,111,114,109, 97,108,115, + 0, 99,112,115, 84,105,109,101, 83,116, 97,114,116, 0, 99,112,115, 84,105,109,101, 69,110,100, 0, 99,112,115, 81,117, 97,108, +105,116,121, 0, 97,116,116,114, 97, 99,116,102,111,114, 99,101, 83,116,114,101,110,103,116,104, 0, 97,116,116,114, 97, 99,116, +102,111,114, 99,101, 82, 97,100,105,117,115, 0,118,101,108,111, 99,105,116,121,102,111,114, 99,101, 83,116,114,101,110,103,116, +104, 0,118,101,108,111, 99,105,116,121,102,111,114, 99,101, 82, 97,100,105,117,115, 0,108, 97,115,116,103,111,111,100,102,114, + 97,109,101, 0,109,105,115,116,121,112,101, 0,104,111,114,114, 0,104,111,114,103, 0,104,111,114, 98, 0,104,111,114,107, 0, +122,101,110,114, 0,122,101,110,103, 0,122,101,110, 98, 0,122,101,110,107, 0, 97,109, 98,107, 0,102, 97,115,116, 99,111,108, + 0,101,120,112,111,115,117,114,101, 0,101,120,112, 0,114, 97,110,103,101, 0,108,105,110,102, 97, 99, 0,108,111,103,102, 97, + 99, 0,103,114, 97,118,105,116,121, 0, 97, 99,116,105,118,105,116,121, 66,111,120, 82, 97,100,105,117,115, 0,115,107,121,116, +121,112,101, 0,111, 99, 99,108,117,115,105,111,110, 82,101,115, 0,112,104,121,115,105, 99,115, 69,110,103,105,110,101, 0,116, +105, 99,114, 97,116,101, 0,109, 97,120,108,111,103,105, 99,115,116,101,112, 0,112,104,121,115,117, 98,115,116,101,112, 0,109, + 97,120,112,104,121,115,116,101,112, 0,109,105,115,105, 0,109,105,115,116,115,116, 97, 0,109,105,115,116,100,105,115,116, 0, +109,105,115,116,104,105, 0,115,116, 97,114,114, 0,115,116, 97,114,103, 0,115,116, 97,114, 98, 0,115,116, 97,114,107, 0,115, +116, 97,114,115,105,122,101, 0,115,116, 97,114,109,105,110,100,105,115,116, 0,115,116, 97,114,100,105,115,116, 0,115,116, 97, +114, 99,111,108,110,111,105,115,101, 0,100,111,102,115,116, 97, 0,100,111,102,101,110,100, 0,100,111,102,109,105,110, 0,100, +111,102,109, 97,120, 0, 97,111,100,105,115,116, 0, 97,111,100,105,115,116,102, 97, 99, 0, 97,111,101,110,101,114,103,121, 0, + 97,111, 98,105, 97,115, 0, 97,111,109,111,100,101, 0, 97,111,115, 97,109,112, 0, 97,111,109,105,120, 0, 97,111, 99,111,108, +111,114, 0, 97,111, 95, 97,100, 97,112,116, 95,116,104,114,101,115,104, 0, 97,111, 95, 97,100, 97,112,116, 95,115,112,101,101, +100, 95,102, 97, 99, 0, 97,111, 95, 97,112,112,114,111,120, 95,101,114,114,111,114, 0, 97,111, 95, 97,112,112,114,111,120, 95, + 99,111,114,114,101, 99,116,105,111,110, 0, 97,111, 95,115, 97,109,112, 95,109,101,116,104,111,100, 0, 97,111, 95,103, 97,116, +104,101,114, 95,109,101,116,104,111,100, 0, 97,111, 95, 97,112,112,114,111,120, 95,112, 97,115,115,101,115, 0, 42, 97,111,115, +112,104,101,114,101, 0, 42, 97,111,116, 97, 98,108,101,115, 0,115,101,108, 99,111,108, 0,115,120, 0,115,121, 0, 42,108,112, + 70,111,114,109, 97,116, 0, 42,108,112, 80, 97,114,109,115, 0, 99, 98, 70,111,114,109, 97,116, 0, 99, 98, 80, 97,114,109,115, + 0,102, 99, 99, 84,121,112,101, 0,102, 99, 99, 72, 97,110,100,108,101,114, 0,100,119, 75,101,121, 70,114, 97,109,101, 69,118, +101,114,121, 0,100,119, 81,117, 97,108,105,116,121, 0,100,119, 66,121,116,101,115, 80,101,114, 83,101, 99,111,110,100, 0,100, +119, 70,108, 97,103,115, 0,100,119, 73,110,116,101,114,108,101, 97,118,101, 69,118,101,114,121, 0, 97,118,105, 99,111,100,101, + 99,110, 97,109,101, 91, 49, 50, 56, 93, 0, 42, 99,100, 80, 97,114,109,115, 0, 42,112, 97,100, 0, 99,100, 83,105,122,101, 0, +113,116, 99,111,100,101, 99,110, 97,109,101, 91, 49, 50, 56, 93, 0, 99,111,100,101, 99, 0, 97,117,100,105,111, 95, 99,111,100, +101, 99, 0,118,105,100,101,111, 95, 98,105,116,114, 97,116,101, 0, 97,117,100,105,111, 95, 98,105,116,114, 97,116,101, 0,103, +111,112, 95,115,105,122,101, 0,114, 99, 95,109,105,110, 95,114, 97,116,101, 0,114, 99, 95,109, 97,120, 95,114, 97,116,101, 0, +114, 99, 95, 98,117,102,102,101,114, 95,115,105,122,101, 0,109,117,120, 95,112, 97, 99,107,101,116, 95,115,105,122,101, 0,109, +117,120, 95,114, 97,116,101, 0,109,105,120,114, 97,116,101, 0,109, 97,105,110, 0, 42,109, 97,116, 95,111,118,101,114,114,105, +100,101, 0, 42,108,105,103,104,116, 95,111,118,101,114,114,105,100,101, 0,108, 97,121, 95,122,109, 97,115,107, 0,108, 97,121, +102,108, 97,103, 0,112, 97,115,115,102,108, 97,103, 0,112, 97,115,115, 95,120,111,114, 0, 42, 97,118,105, 99,111,100,101, 99, +100, 97,116, 97, 0, 42,113,116, 99,111,100,101, 99,100, 97,116, 97, 0,102,102, 99,111,100,101, 99,100, 97,116, 97, 0, 97,117, +100,105,111, 0,112,115,102,114, 97, 0,112,101,102,114, 97, 0,105,109, 97,103,101,115, 0,102,114, 97,109, 97,112,116,111, 0, +116,104,114,101, 97,100,115, 0,102,114, 97,109,101,108,101,110, 0, 98,108,117,114,102, 97, 99, 0,101,100,103,101, 82, 0,101, +100,103,101, 71, 0,101,100,103,101, 66, 0,102,117,108,108,115, 99,114,101,101,110, 0,120,112,108, 97,121, 0,121,112,108, 97, +121, 0,102,114,101,113,112,108, 97,121, 0, 97,116,116,114,105, 98, 0,114,116, 49, 0,115,116,101,114,101,111,109,111,100,101, + 0,100,105,109,101,110,115,105,111,110,115,112,114,101,115,101,116, 0,109, 97,120,105,109,115,105,122,101, 0,120,115, 99,104, + 0,121,115, 99,104, 0,120,112, 97,114,116,115, 0,121,112, 97,114,116,115, 0,119,105,110,112,111,115, 0,112,108, 97,110,101, +115, 0,105,109,116,121,112,101, 0,115,117, 98,105,109,116,121,112,101, 0,113,117, 97,108,105,116,121, 0,100,105,115,112,108, + 97,121,109,111,100,101, 0,114,112, 97,100, 49, 0,114,112, 97,100, 50, 0,115, 99,101,109,111,100,101, 0,114,101,110,100,101, +114,101,114, 0,111, 99,114,101,115, 0, 97,108,112,104, 97,109,111,100,101, 0,111,115, 97, 0,102,114,115, 95,115,101, 99, 0, +101,100,103,101,105,110,116, 0,115, 97,102,101,116,121, 0, 98,111,114,100,101,114, 0,100,105,115,112,114,101, 99,116, 0,108, + 97,121,101,114,115, 0, 97, 99,116,108, 97,121, 0,120, 97,115,112, 0,121, 97,115,112, 0,102,114,115, 95,115,101, 99, 95, 98, + 97,115,101, 0,103, 97,117,115,115, 0, 99,111,108,111,114, 95,109,103,116, 95,102,108, 97,103, 0,112,111,115,116,103, 97,109, +109, 97, 0,112,111,115,116,104,117,101, 0,112,111,115,116,115, 97,116, 0,100,105,116,104,101,114, 95,105,110,116,101,110,115, +105,116,121, 0, 98, 97,107,101, 95,111,115, 97, 0, 98, 97,107,101, 95,102,105,108,116,101,114, 0, 98, 97,107,101, 95,109,111, +100,101, 0, 98, 97,107,101, 95,102,108, 97,103, 0, 98, 97,107,101, 95,110,111,114,109, 97,108, 95,115,112, 97, 99,101, 0, 98, + 97,107,101, 95,113,117, 97,100, 95,115,112,108,105,116, 0, 98, 97,107,101, 95,109, 97,120,100,105,115,116, 0, 98, 97,107,101, + 95, 98,105, 97,115,100,105,115,116, 0, 98, 97,107,101, 95,112, 97,100, 0, 71, 73,113,117, 97,108,105,116,121, 0, 71, 73, 99, + 97, 99,104,101, 0, 71, 73,109,101,116,104,111,100, 0, 71, 73,112,104,111,116,111,110,115, 0, 71, 73,100,105,114,101, 99,116, + 0, 89, 70, 95, 65, 65, 0, 89, 70,101,120,112,111,114,116,120,109,108, 0, 89, 70, 95,110,111, 98,117,109,112, 0, 89, 70, 95, + 99,108, 97,109,112,114,103, 98, 0,121,102,112, 97,100, 49, 0, 71, 73,100,101,112,116,104, 0, 71, 73, 99, 97,117,115,100,101, +112,116,104, 0, 71, 73,112,105,120,101,108,115,112,101,114,115, 97,109,112,108,101, 0, 71, 73,112,104,111,116,111,110, 99,111, +117,110,116, 0, 71, 73,109,105,120,112,104,111,116,111,110,115, 0, 71, 73,112,104,111,116,111,110,114, 97,100,105,117,115, 0, + 89, 70, 95,114, 97,121,100,101,112,116,104, 0, 89, 70, 95, 65, 65,112, 97,115,115,101,115, 0, 89, 70, 95, 65, 65,115, 97,109, +112,108,101,115, 0,121,102,112, 97,100, 50, 0, 71, 73,115,104, 97,100,111,119,113,117, 97,108,105,116,121, 0, 71, 73,114,101, +102,105,110,101,109,101,110,116, 0, 71, 73,112,111,119,101,114, 0, 71, 73,105,110,100,105,114,112,111,119,101,114, 0, 89, 70, + 95,103, 97,109,109, 97, 0, 89, 70, 95,101,120,112,111,115,117,114,101, 0, 89, 70, 95,114, 97,121, 98,105, 97,115, 0, 89, 70, + 95, 65, 65,112,105,120,101,108,115,105,122,101, 0, 89, 70, 95, 65, 65,116,104,114,101,115,104,111,108,100, 0, 98, 97, 99,107, + 98,117,102, 91, 49, 54, 48, 93, 0,112,105, 99, 91, 49, 54, 48, 93, 0,115,116, 97,109,112, 0,115,116, 97,109,112, 95,102,111, +110,116, 95,105,100, 0,115,116, 97,109,112, 95,117,100, 97,116, 97, 91, 49, 54, 48, 93, 0,102,103, 95,115,116, 97,109,112, 91, + 52, 93, 0, 98,103, 95,115,116, 97,109,112, 91, 52, 93, 0,115,105,109,112,108,105,102,121, 95,115,117, 98,115,117,114,102, 0, +115,105,109,112,108,105,102,121, 95,115,104, 97,100,111,119,115, 97,109,112,108,101,115, 0,115,105,109,112,108,105,102,121, 95, +112, 97,114,116,105, 99,108,101,115, 0,115,105,109,112,108,105,102,121, 95, 97,111,115,115,115, 0, 99,105,110,101,111,110,119, +104,105,116,101, 0, 99,105,110,101,111,110, 98,108, 97, 99,107, 0, 99,105,110,101,111,110,103, 97,109,109, 97, 0,106,112, 50, + 95,112,114,101,115,101,116, 0,106,112, 50, 95,100,101,112,116,104, 0,114,112, 97,100, 51, 0,100,111,109,101,114,101,115, 0, +100,111,109,101,109,111,100,101, 0,100,111,109,101, 97,110,103,108,101, 0,100,111,109,101,116,105,108,116, 0,100,111,109,101, +114,101,115, 98,117,102, 0, 42,100,111,109,101,116,101,120,116, 0,101,110,103,105,110,101, 91, 51, 50, 93, 0,112, 97,114,116, +105, 99,108,101, 95,112,101,114, 99, 0,115,117, 98,115,117,114,102, 95,109, 97,120, 0,115,104, 97,100, 98,117,102,115, 97,109, +112,108,101, 95,109, 97,120, 0, 97,111, 95,101,114,114,111,114, 0,116,105,108,116, 0,114,101,115, 98,117,102, 0, 42,119, 97, +114,112,116,101,120,116, 0, 99,111,108, 91, 51, 93, 0,109, 97,116,109,111,100,101, 0,102,114, 97,109,105,110,103, 0,100,111, +109,101, 0,115,116,101,114,101,111,102,108, 97,103, 0, 42, 42, 98,114,117,115,104,101,115, 0, 97, 99,116,105,118,101, 95, 98, +114,117,115,104, 95,105,110,100,101,120, 0, 98,114,117,115,104, 95, 99,111,117,110,116, 0, 42,112, 97,105,110,116, 95, 99,117, +114,115,111,114, 0,112, 97,105,110,116, 95, 99,117,114,115,111,114, 95, 99,111,108, 91, 52, 93, 0,112, 97,105,110,116, 0,116, +111,111,108, 0,115,101, 97,109, 95, 98,108,101,101,100, 0,110,111,114,109, 97,108, 95, 97,110,103,108,101, 0, 42,112, 97,105, +110,116, 99,117,114,115,111,114, 0,105,110,118,101,114,116, 0,116,111,116,114,101,107,101,121, 0,116,111,116, 97,100,100,107, +101,121, 0, 98,114,117,115,104,116,121,112,101, 0, 98,114,117,115,104, 91, 55, 93, 0,101,109,105,116,116,101,114,100,105,115, +116, 0,115,101,108,101, 99,116,109,111,100,101, 0,101,100,105,116,116,121,112,101, 0,100,114, 97,119, 95,115,116,101,112, 0, +102, 97,100,101, 95,102,114, 97,109,101,115, 0,110, 97,109,101, 91, 51, 54, 93, 0,109, 97,116, 91, 51, 93, 91, 51, 93, 0,112, +105,118,111,116, 91, 51, 93, 0,116, 97, 98,108,101,116, 95,115,105,122,101, 0,116, 97, 98,108,101,116, 95,115,116,114,101,110, +103,116,104, 0,103, 97,109,109, 97, 0,109,117,108, 0, 42,118,112, 97,105,110,116, 95,112,114,101,118, 0, 42,119,112, 97,105, +110,116, 95,112,114,101,118, 0, 42,118,112, 97,105,110,116, 0, 42,119,112, 97,105,110,116, 0,118,103,114,111,117,112, 95,119, +101,105,103,104,116, 0, 99,111,114,110,101,114,116,121,112,101, 0,101,100,105,116, 98,117,116,102,108, 97,103, 0,106,111,105, +110,116,114,105,108,105,109,105,116, 0,100,101,103,114, 0,116,117,114,110, 0,101,120,116,114, 95,111,102,102,115, 0,100,111, +117, 98,108,105,109,105,116, 0,110,111,114,109, 97,108,115,105,122,101, 0, 97,117,116,111,109,101,114,103,101, 0,115,101,103, +109,101,110,116,115, 0,114,105,110,103,115, 0,118,101,114,116,105, 99,101,115, 0,117,110,119,114, 97,112,112,101,114, 0,117, +118, 99, 97,108, 99, 95,114, 97,100,105,117,115, 0,117,118, 99, 97,108, 99, 95, 99,117, 98,101,115,105,122,101, 0,117,118, 99, + 97,108, 99, 95,109, 97,114,103,105,110, 0,117,118, 99, 97,108, 99, 95,109, 97,112,100,105,114, 0,117,118, 99, 97,108, 99, 95, +109, 97,112, 97,108,105,103,110, 0,117,118, 99, 97,108, 99, 95,102,108, 97,103, 0,117,118, 95,102,108, 97,103, 0,117,118, 95, +115,101,108,101, 99,116,109,111,100,101, 0,117,118, 95,112, 97,100, 91, 50, 93, 0, 97,117,116,111,105,107, 95, 99,104, 97,105, +110,108,101,110, 0,105,109, 97,112, 97,105,110,116, 0,112, 97,114,116,105, 99,108,101, 0,112,114,111,112,111,114,116,105,111, +110, 97,108, 95,115,105,122,101, 0,115,101,108,101, 99,116, 95,116,104,114,101,115,104, 0, 99,108,101, 97,110, 95,116,104,114, +101,115,104, 0, 97,117,116,111,107,101,121, 95,109,111,100,101, 0, 97,117,116,111,107,101,121, 95,102,108, 97,103, 0,114,101, +116,111,112,111, 95,109,111,100,101, 0,114,101,116,111,112,111, 95,112, 97,105,110,116, 95,116,111,111,108, 0,108,105,110,101, + 95,100,105,118, 0,101,108,108,105,112,115,101, 95,100,105,118, 0,114,101,116,111,112,111, 95,104,111,116,115,112,111,116, 0, +109,117,108,116,105,114,101,115, 95,115,117, 98,100,105,118, 95,116,121,112,101, 0,115,107,103,101,110, 95,114,101,115,111,108, +117,116,105,111,110, 0,115,107,103,101,110, 95,116,104,114,101,115,104,111,108,100, 95,105,110,116,101,114,110, 97,108, 0,115, +107,103,101,110, 95,116,104,114,101,115,104,111,108,100, 95,101,120,116,101,114,110, 97,108, 0,115,107,103,101,110, 95,108,101, +110,103,116,104, 95,114, 97,116,105,111, 0,115,107,103,101,110, 95,108,101,110,103,116,104, 95,108,105,109,105,116, 0,115,107, +103,101,110, 95, 97,110,103,108,101, 95,108,105,109,105,116, 0,115,107,103,101,110, 95, 99,111,114,114,101,108, 97,116,105,111, +110, 95,108,105,109,105,116, 0,115,107,103,101,110, 95,115,121,109,109,101,116,114,121, 95,108,105,109,105,116, 0,115,107,103, +101,110, 95,114,101,116, 97,114,103,101,116, 95, 97,110,103,108,101, 95,119,101,105,103,104,116, 0,115,107,103,101,110, 95,114, +101,116, 97,114,103,101,116, 95,108,101,110,103,116,104, 95,119,101,105,103,104,116, 0,115,107,103,101,110, 95,114,101,116, 97, +114,103,101,116, 95,100,105,115,116, 97,110, 99,101, 95,119,101,105,103,104,116, 0,115,107,103,101,110, 95,111,112,116,105,111, +110,115, 0,115,107,103,101,110, 95,112,111,115,116,112,114,111, 0,115,107,103,101,110, 95,112,111,115,116,112,114,111, 95,112, + 97,115,115,101,115, 0,115,107,103,101,110, 95,115,117, 98,100,105,118,105,115,105,111,110,115, 91, 51, 93, 0,115,107,103,101, +110, 95,109,117,108,116,105, 95,108,101,118,101,108, 0, 42,115,107,103,101,110, 95,116,101,109,112,108, 97,116,101, 0, 98,111, +110,101, 95,115,107,101,116, 99,104,105,110,103, 0, 98,111,110,101, 95,115,107,101,116, 99,104,105,110,103, 95, 99,111,110,118, +101,114,116, 0,115,107,103,101,110, 95,115,117, 98,100,105,118,105,115,105,111,110, 95,110,117,109, 98,101,114, 0,115,107,103, +101,110, 95,114,101,116, 97,114,103,101,116, 95,111,112,116,105,111,110,115, 0,115,107,103,101,110, 95,114,101,116, 97,114,103, +101,116, 95,114,111,108,108, 0,115,107,103,101,110, 95,115,105,100,101, 95,115,116,114,105,110,103, 91, 56, 93, 0,115,107,103, +101,110, 95,110,117,109, 95,115,116,114,105,110,103, 91, 56, 93, 0,101,100,103,101, 95,109,111,100,101, 0,115,110, 97,112, 95, +109,111,100,101, 0,115,110, 97,112, 95,102,108, 97,103, 0,115,110, 97,112, 95,116, 97,114,103,101,116, 0,112,114,111,112,111, +114,116,105,111,110, 97,108, 0,112,114,111,112, 95,109,111,100,101, 0,116,111,116,111, 98,106, 0,116,111,116,108, 97,109,112, + 0,116,111,116,111, 98,106,115,101,108, 0,116,111,116, 99,117,114,118,101, 0,116,111,116,109,101,115,104, 0,116,111,116, 97, +114,109, 97,116,117,114,101, 0,115, 99, 97,108,101, 95,108,101,110,103,116,104, 0,115,121,115,116,101,109, 0, 42, 99, 97,109, +101,114, 97, 0, 42,119,111,114,108,100, 0, 42,115,101,116, 0, 98, 97,115,101, 0, 42, 98, 97,115, 97, 99,116, 0, 42,111, 98, +101,100,105,116, 0, 99,117,114,115,111,114, 91, 51, 93, 0,116,119, 99,101,110,116, 91, 51, 93, 0,116,119,109,105,110, 91, 51, + 93, 0,116,119,109, 97,120, 91, 51, 93, 0, 42,101,100, 0, 42,116,111,111,108,115,101,116,116,105,110,103,115, 0, 42,115,116, + 97,116,115, 0,116,114, 97,110,115,102,111,114,109, 95,115,112, 97, 99,101,115, 0,115,111,117,110,100, 95,104, 97,110,100,108, +101,115, 0, 42,116,104,101, 68, 97,103, 0,100, 97,103,105,115,118, 97,108,105,100, 0,100, 97,103,102,108, 97,103,115, 0,106, +117,109,112,102,114, 97,109,101, 0,102,114, 97,109,101, 95,115,116,101,112, 0, 97, 99,116,105,118,101, 95,107,101,121,105,110, +103,115,101,116, 0,107,101,121,105,110,103,115,101,116,115, 0,103,109, 0,117,110,105,116, 0, 98,108,101,110,100, 0,119,105, +110,109, 97,116, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,109, 97,116, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,105,110,118, + 91, 52, 93, 91, 52, 93, 0,112,101,114,115,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,101,114,115,105,110,118, 91, 52, 93, 91, + 52, 93, 0,118,105,101,119,109, 97,116,111, 98, 91, 52, 93, 91, 52, 93, 0,112,101,114,115,109, 97,116,111, 98, 91, 52, 93, 91, + 52, 93, 0,116,119,109, 97,116, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,113,117, 97,116, 91, 52, 93, 0,122,102, 97, 99, 0, + 99, 97,109,100,120, 0, 99, 97,109,100,121, 0,112,105,120,115,105,122,101, 0, 99, 97,109,122,111,111,109, 0,118,105,101,119, + 98,117,116, 0,108, 97,115,116,109,111,100,101, 0,114,102,108, 97,103, 0,118,105,101,119,108,111, 99,107, 0,112,101,114,115, +112, 0,118,105,101,119, 0, 99,108,105,112, 91, 54, 93, 91, 52, 93, 0, 42, 99,108,105,112, 98, 98, 0, 42,108,111, 99, 97,108, +118,100, 0, 42,114,105, 0, 42,114,101,116,111,112,111, 95,118,105,101,119, 95,100, 97,116, 97, 0, 42,100,101,112,116,104,115, + 0, 42,115,109,115, 0, 42,115,109,111,111,116,104, 95,116,105,109,101,114, 0,108,118,105,101,119,113,117, 97,116, 91, 52, 93, + 0,108,112,101,114,115,112, 0,108,118,105,101,119, 0,114,101,103,105,111,110, 98, 97,115,101, 0,115,112, 97, 99,101,116,121, +112,101, 0, 98,108,111, 99,107,115, 99, 97,108,101, 0, 98,108,111, 99,107,104, 97,110,100,108,101,114, 91, 56, 93, 0,108, 97, +121, 95,117,115,101,100, 0, 42,111, 98, 95, 99,101,110,116,114,101, 0, 42, 98,103,112,105, 99, 0,111, 98, 95, 99,101,110,116, +114,101, 95, 98,111,110,101, 91, 51, 50, 93, 0,108, 97,121, 97, 99,116, 0,100,114, 97,119,116,121,112,101, 0,108,111, 99, 97, +108,118,105,101,119, 0,115, 99,101,110,101,108,111, 99,107, 0, 97,114,111,117,110,100, 0,112,105,118,111,116, 95,108, 97,115, +116, 0,103,114,105,100, 0,103,114,105,100,118,105,101,119, 0,112, 97,100,102, 0,110,101, 97,114, 0,102, 97,114, 0,103,114, +105,100,108,105,110,101,115, 0,103,114,105,100,102,108, 97,103, 0,103,114,105,100,115,117, 98,100,105,118, 0,109,111,100,101, +115,101,108,101, 99,116, 0,107,101,121,102,108, 97,103,115, 0,116,119,116,121,112,101, 0,116,119,109,111,100,101, 0,116,119, +102,108, 97,103, 0,116,119,100,114, 97,119,102,108, 97,103, 0, 99,117,115,116,111,109,100, 97,116, 97, 95,109, 97,115,107, 0, + 97,102,116,101,114,100,114, 97,119, 0,122, 98,117,102, 0,120,114, 97,121, 0,110,100,111,102,109,111,100,101, 0,110,100,111, +102,102,105,108,116,101,114, 0, 42,112,114,111,112,101,114,116,105,101,115, 95,115,116,111,114, 97,103,101, 0,118,101,114,116, + 0,104,111,114, 0,109, 97,115,107, 0,109,105,110, 91, 50, 93, 0,109, 97,120, 91, 50, 93, 0,109,105,110,122,111,111,109, 0, +109, 97,120,122,111,111,109, 0,115, 99,114,111,108,108, 0,115, 99,114,111,108,108, 95,117,105, 0,107,101,101,112,116,111,116, + 0,107,101,101,112,122,111,111,109, 0,107,101,101,112,111,102,115, 0, 97,108,105,103,110, 0,119,105,110,120, 0,119,105,110, +121, 0,111,108,100,119,105,110,120, 0,111,108,100,119,105,110,121, 0, 99,117,114,115,111,114, 91, 50, 93, 0, 42,116, 97, 98, + 95,111,102,102,115,101,116, 0,116, 97, 98, 95,110,117,109, 0,116, 97, 98, 95, 99,117,114, 0, 42,115, 99,114,101,101,110, 0, +118, 50,100, 0, 42, 97,100,115, 0,103,104,111,115,116, 67,117,114,118,101,115, 0, 97,117,116,111,115,110, 97,112, 0,112,105, +110, 0,108,111, 99,107, 0,109, 97,105,110, 98, 0,109, 97,105,110, 98,111, 0,109, 97,105,110, 98,117,115,101,114, 0,114,101, + 95, 97,108,105,103,110, 0,112,114,101,118,105,101,119, 0,112, 97,116,104,102,108, 97,103, 0,100, 97,116, 97,105, 99,111,110, + 0, 42,112,105,110,105,100, 0,114,101,110,100,101,114, 95,115,105,122,101, 0, 99,104, 97,110,115,104,111,119,110, 0,122,101, + 98,114, 97, 0,122,111,111,109, 0,116,105,116,108,101, 91, 50, 52, 93, 0,100,105,114, 91, 50, 52, 48, 93, 0,102,105,108,101, + 91, 56, 48, 93, 0,114,101,110, 97,109,101,102,105,108,101, 91, 56, 48, 93, 0,115,111,114,116, 0,100,105,115,112,108, 97,121, + 0, 97, 99,116,105,118,101, 95, 98,111,111,107,109, 97,114,107, 0, 97, 99,116,105,118,101, 95,102,105,108,101, 0,115,101,108, +115,116, 97,116,101, 0,102, 95,102,112, 0,109,101,110,117, 0,102,112, 95,115,116,114, 91, 56, 93, 0, 42,112,117,112,109,101, +110,117, 0, 42,112, 97,114, 97,109,115, 0, 42,102,105,108,101,115, 0, 42,102,111,108,100,101,114,115, 95,112,114,101,118, 0, + 42,102,111,108,100,101,114,115, 95,110,101,120,116, 0, 42,111,112, 0, 42,108,111, 97,100,105,109, 97,103,101, 95,116,105,109, +101,114, 0, 42,108, 97,121,111,117,116, 0,114,101, 99,101,110,116,110,114, 0, 98,111,111,107,109, 97,114,107,110,114, 0,115, +121,115,116,101,109,110,114, 0,116,114,101,101, 0, 42,116,114,101,101,115,116,111,114,101, 0,115,101, 97,114, 99,104, 95,115, +116,114,105,110,103, 91, 51, 50, 93, 0,115,101, 97,114, 99,104, 95,116,115,101, 0,115,101, 97,114, 99,104, 95,102,108, 97,103, +115, 0,100,111, 95, 0,111,117,116,108,105,110,101,118,105,115, 0,115,116,111,114,101,102,108, 97,103, 0, 42, 99,117,109, 97, +112, 0,105,109, 97,110,114, 0, 99,117,114,116,105,108,101, 0,105,109,116,121,112,101,110,114, 0,100,116, 95,117,118, 0,115, +116,105, 99,107,121, 0,100,116, 95,117,118,115,116,114,101,116, 99,104, 0, 99,101,110,116,120, 0, 99,101,110,116,121, 0, 42, +116,101,120,116, 0,116,111,112, 0,118,105,101,119,108,105,110,101,115, 0,108,104,101,105,103,104,116, 0, 99,119,105,100,116, +104, 0,108,105,110,101,110,114,115, 95,116,111,116, 0,108,101,102,116, 0,115,104,111,119,108,105,110,101,110,114,115, 0,116, + 97, 98,110,117,109, 98,101,114, 0,115,104,111,119,115,121,110,116, 97,120, 0,111,118,101,114,119,114,105,116,101, 0,108,105, +118,101, 95,101,100,105,116, 0,112,105,120, 95,112,101,114, 95,108,105,110,101, 0,116,120,116,115, 99,114,111,108,108, 0,116, +120,116, 98, 97,114, 0,119,111,114,100,119,114, 97,112, 0,100,111,112,108,117,103,105,110,115, 0,102,105,110,100,115,116,114, + 91, 50, 53, 54, 93, 0,114,101,112,108, 97, 99,101,115,116,114, 91, 50, 53, 54, 93, 0, 42,112,121, 95,100,114, 97,119, 0, 42, +112,121, 95,101,118,101,110,116, 0, 42,112,121, 95, 98,117,116,116,111,110, 0, 42,112,121, 95, 98,114,111,119,115,101,114, 99, + 97,108,108, 98, 97, 99,107, 0, 42,112,121, 95,103,108,111, 98, 97,108,100,105, 99,116, 0,108, 97,115,116,115,112, 97, 99,101, + 0,115, 99,114,105,112,116,110, 97,109,101, 91, 50, 53, 54, 93, 0,115, 99,114,105,112,116, 97,114,103, 91, 50, 53, 54, 93, 0, + 42,115, 99,114,105,112,116, 0, 42, 98,117,116, 95,114,101,102,115, 0,114,101,100,114, 97,119,115, 0, 42,105,100, 0, 97,115, +112,101, 99,116, 0, 42, 99,117,114,102,111,110,116, 0,109,120, 0,109,121, 0, 42,101,100,105,116,116,114,101,101, 0,116,114, +101,101,116,121,112,101, 0,116,101,120,102,114,111,109, 0,110,117,109,116,105,108,101,115,120, 0,110,117,109,116,105,108,101, +115,121, 0,118,105,101,119,114,101, 99,116, 0, 98,111,111,107,109, 97,114,107,114,101, 99,116, 0,115, 99,114,111,108,108,112, +111,115, 0,115, 99,114,111,108,108,104,101,105,103,104,116, 0,115, 99,114,111,108,108, 97,114,101, 97, 0,114,101,116,118, 97, +108, 0,112,114,118, 95,119, 0,112,114,118, 95,104, 0, 40, 42,114,101,116,117,114,110,102,117,110, 99, 41, 40, 41, 0, 40, 42, +114,101,116,117,114,110,102,117,110, 99, 95,101,118,101,110,116, 41, 40, 41, 0, 40, 42,114,101,116,117,114,110,102,117,110, 99, + 95, 97,114,103,115, 41, 40, 41, 0, 42, 97,114,103, 49, 0, 42, 97,114,103, 50, 0, 42,109,101,110,117,112, 0, 42,105,109,103, + 0,108,101,110, 95, 97,108,108,111, 99, 0, 99,117,114,115,111,114, 0,114,112,116, 95,109, 97,115,107, 0,115, 99,114,111,108, +108, 98, 97, 99,107, 0,104,105,115,116,111,114,121, 0,112,114,111,109,112,116, 91, 56, 93, 0,102,105,108,101,110, 97,109,101, + 91, 50, 53, 54, 93, 0, 98,108,102, 95,105,100, 0,117,105,102,111,110,116, 95,105,100, 0,114, 95,116,111, 95,108, 0,112,111, +105,110,116,115, 0,107,101,114,110,105,110,103, 0,105,116, 97,108,105, 99, 0, 98,111,108,100, 0,115,104, 97,100,111,119, 0, +115,104, 97,100,120, 0,115,104, 97,100,121, 0,115,104, 97,100,111,119, 97,108,112,104, 97, 0,115,104, 97,100,111,119, 99,111, +108,111,114, 0,112, 97,110,101,108,116,105,116,108,101, 0,103,114,111,117,112,108, 97, 98,101,108, 0,119,105,100,103,101,116, +108, 97, 98,101,108, 0,119,105,100,103,101,116, 0,112, 97,110,101,108,122,111,111,109, 0,109,105,110,108, 97, 98,101,108, 99, +104, 97,114,115, 0,109,105,110,119,105,100,103,101,116, 99,104, 97,114,115, 0, 99,111,108,117,109,110,115,112, 97, 99,101, 0, +116,101,109,112,108, 97,116,101,115,112, 97, 99,101, 0, 98,111,120,115,112, 97, 99,101, 0, 98,117,116,116,111,110,115,112, 97, + 99,101,120, 0, 98,117,116,116,111,110,115,112, 97, 99,101,121, 0,112, 97,110,101,108,115,112, 97, 99,101, 0,112, 97,110,101, +108,111,117,116,101,114, 0,112, 97,100, 91, 49, 93, 0,111,117,116,108,105,110,101, 91, 52, 93, 0,105,110,110,101,114, 91, 52, + 93, 0,105,110,110,101,114, 95,115,101,108, 91, 52, 93, 0,105,116,101,109, 91, 52, 93, 0,116,101,120,116, 91, 52, 93, 0,116, +101,120,116, 95,115,101,108, 91, 52, 93, 0,115,104, 97,100,101,100, 0,115,104, 97,100,101,116,111,112, 0,115,104, 97,100,101, +100,111,119,110, 0,105,110,110,101,114, 95, 97,110,105,109, 91, 52, 93, 0,105,110,110,101,114, 95, 97,110,105,109, 95,115,101, +108, 91, 52, 93, 0,105,110,110,101,114, 95,107,101,121, 91, 52, 93, 0,105,110,110,101,114, 95,107,101,121, 95,115,101,108, 91, + 52, 93, 0,105,110,110,101,114, 95,100,114,105,118,101,110, 91, 52, 93, 0,105,110,110,101,114, 95,100,114,105,118,101,110, 95, +115,101,108, 91, 52, 93, 0,119, 99,111,108, 95,114,101,103,117,108, 97,114, 0,119, 99,111,108, 95,116,111,111,108, 0,119, 99, +111,108, 95,116,101,120,116, 0,119, 99,111,108, 95,114, 97,100,105,111, 0,119, 99,111,108, 95,111,112,116,105,111,110, 0,119, + 99,111,108, 95,116,111,103,103,108,101, 0,119, 99,111,108, 95,110,117,109, 0,119, 99,111,108, 95,110,117,109,115,108,105,100, +101,114, 0,119, 99,111,108, 95,109,101,110,117, 0,119, 99,111,108, 95,112,117,108,108,100,111,119,110, 0,119, 99,111,108, 95, +109,101,110,117, 95, 98, 97, 99,107, 0,119, 99,111,108, 95,109,101,110,117, 95,105,116,101,109, 0,119, 99,111,108, 95, 98,111, +120, 0,119, 99,111,108, 95,115, 99,114,111,108,108, 0,119, 99,111,108, 95,108,105,115,116, 95,105,116,101,109, 0,119, 99,111, +108, 95,115,116, 97,116,101, 0,105, 99,111,110,102,105,108,101, 91, 56, 48, 93, 0, 98, 97, 99,107, 91, 52, 93, 0,116,105,116, +108,101, 91, 52, 93, 0,116,101,120,116, 95,104,105, 91, 52, 93, 0,104,101, 97,100,101,114, 91, 52, 93, 0,104,101, 97,100,101, +114, 95,116,105,116,108,101, 91, 52, 93, 0,104,101, 97,100,101,114, 95,116,101,120,116, 91, 52, 93, 0,104,101, 97,100,101,114, + 95,116,101,120,116, 95,104,105, 91, 52, 93, 0, 98,117,116,116,111,110, 91, 52, 93, 0, 98,117,116,116,111,110, 95,116,105,116, +108,101, 91, 52, 93, 0, 98,117,116,116,111,110, 95,116,101,120,116, 91, 52, 93, 0, 98,117,116,116,111,110, 95,116,101,120,116, + 95,104,105, 91, 52, 93, 0,108,105,115,116, 91, 52, 93, 0,108,105,115,116, 95,116,105,116,108,101, 91, 52, 93, 0,108,105,115, +116, 95,116,101,120,116, 91, 52, 93, 0,108,105,115,116, 95,116,101,120,116, 95,104,105, 91, 52, 93, 0,112, 97,110,101,108, 91, + 52, 93, 0,112, 97,110,101,108, 95,116,105,116,108,101, 91, 52, 93, 0,112, 97,110,101,108, 95,116,101,120,116, 91, 52, 93, 0, +112, 97,110,101,108, 95,116,101,120,116, 95,104,105, 91, 52, 93, 0,115,104, 97,100,101, 49, 91, 52, 93, 0,115,104, 97,100,101, + 50, 91, 52, 93, 0,104,105,108,105,116,101, 91, 52, 93, 0,103,114,105,100, 91, 52, 93, 0,119,105,114,101, 91, 52, 93, 0,115, +101,108,101, 99,116, 91, 52, 93, 0,108, 97,109,112, 91, 52, 93, 0, 97, 99,116,105,118,101, 91, 52, 93, 0,103,114,111,117,112, + 91, 52, 93, 0,103,114,111,117,112, 95, 97, 99,116,105,118,101, 91, 52, 93, 0,116,114, 97,110,115,102,111,114,109, 91, 52, 93, + 0,118,101,114,116,101,120, 91, 52, 93, 0,118,101,114,116,101,120, 95,115,101,108,101, 99,116, 91, 52, 93, 0,101,100,103,101, + 91, 52, 93, 0,101,100,103,101, 95,115,101,108,101, 99,116, 91, 52, 93, 0,101,100,103,101, 95,115,101, 97,109, 91, 52, 93, 0, +101,100,103,101, 95,115,104, 97,114,112, 91, 52, 93, 0,101,100,103,101, 95,102, 97, 99,101,115,101,108, 91, 52, 93, 0,102, 97, + 99,101, 91, 52, 93, 0,102, 97, 99,101, 95,115,101,108,101, 99,116, 91, 52, 93, 0,102, 97, 99,101, 95,100,111,116, 91, 52, 93, + 0,110,111,114,109, 97,108, 91, 52, 93, 0, 98,111,110,101, 95,115,111,108,105,100, 91, 52, 93, 0, 98,111,110,101, 95,112,111, +115,101, 91, 52, 93, 0,115,116,114,105,112, 91, 52, 93, 0,115,116,114,105,112, 95,115,101,108,101, 99,116, 91, 52, 93, 0, 99, +102,114, 97,109,101, 91, 52, 93, 0,100,115, 95, 99,104, 97,110,110,101,108, 91, 52, 93, 0,100,115, 95,115,117, 98, 99,104, 97, +110,110,101,108, 91, 52, 93, 0,118,101,114,116,101,120, 95,115,105,122,101, 0,102, 97, 99,101,100,111,116, 95,115,105,122,101, + 0, 98,112, 97,100, 91, 50, 93, 0,115,121,110,116, 97,120,108, 91, 52, 93, 0,115,121,110,116, 97,120,110, 91, 52, 93, 0,115, +121,110,116, 97,120, 98, 91, 52, 93, 0,115,121,110,116, 97,120,118, 91, 52, 93, 0,115,121,110,116, 97,120, 99, 91, 52, 93, 0, +109,111,118,105,101, 91, 52, 93, 0,105,109, 97,103,101, 91, 52, 93, 0,115, 99,101,110,101, 91, 52, 93, 0, 97,117,100,105,111, + 91, 52, 93, 0,101,102,102,101, 99,116, 91, 52, 93, 0,112,108,117,103,105,110, 91, 52, 93, 0,116,114, 97,110,115,105,116,105, +111,110, 91, 52, 93, 0,109,101,116, 97, 91, 52, 93, 0,101,100,105,116,109,101,115,104, 95, 97, 99,116,105,118,101, 91, 52, 93, + 0,104, 97,110,100,108,101, 95,118,101,114,116,101,120, 91, 52, 93, 0,104, 97,110,100,108,101, 95,118,101,114,116,101,120, 95, +115,101,108,101, 99,116, 91, 52, 93, 0,104, 97,110,100,108,101, 95,118,101,114,116,101,120, 95,115,105,122,101, 0,104,112, 97, +100, 91, 51, 93, 0,115,111,108,105,100, 91, 52, 93, 0,116,117,105, 0,116, 98,117,116,115, 0,116,118, 51,100, 0,116,102,105, +108,101, 0,116,105,112,111, 0,116,105,110,102,111, 0,116,115,110,100, 0,116, 97, 99,116, 0,116,110,108, 97, 0,116,115,101, +113, 0,116,105,109, 97, 0,116,105,109, 97,115,101,108, 0,116,101,120,116, 0,116,111,111,112,115, 0,116,116,105,109,101, 0, +116,110,111,100,101, 0,116,108,111,103,105, 99, 0,116,117,115,101,114,112,114,101,102, 0,116, 97,114,109, 91, 50, 48, 93, 0, +115,112,101, 99, 91, 52, 93, 0,100,117,112,102,108, 97,103, 0,115, 97,118,101,116,105,109,101, 0,116,101,109,112,100,105,114, + 91, 49, 54, 48, 93, 0,102,111,110,116,100,105,114, 91, 49, 54, 48, 93, 0,114,101,110,100,101,114,100,105,114, 91, 49, 54, 48, + 93, 0,116,101,120,116,117,100,105,114, 91, 49, 54, 48, 93, 0,112,108,117,103,116,101,120,100,105,114, 91, 49, 54, 48, 93, 0, +112,108,117,103,115,101,113,100,105,114, 91, 49, 54, 48, 93, 0,112,121,116,104,111,110,100,105,114, 91, 49, 54, 48, 93, 0,115, +111,117,110,100,100,105,114, 91, 49, 54, 48, 93, 0,121,102,101,120,112,111,114,116,100,105,114, 91, 49, 54, 48, 93, 0,118,101, +114,115,105,111,110,115, 0,103, 97,109,101,102,108, 97,103,115, 0,119,104,101,101,108,108,105,110,101,115, 99,114,111,108,108, + 0,117,105,102,108, 97,103, 0,108, 97,110,103,117, 97,103,101, 0,117,115,101,114,112,114,101,102, 0,118,105,101,119,122,111, +111,109, 0,109,105,120, 98,117,102,115,105,122,101, 0, 97,117,100,105,111,100,101,118,105, 99,101, 0, 97,117,100,105,111,114, + 97,116,101, 0, 97,117,100,105,111,102,111,114,109, 97,116, 0, 97,117,100,105,111, 99,104, 97,110,110,101,108,115, 0,100,112, +105, 0,101,110, 99,111,100,105,110,103, 0,116,114, 97,110,115,111,112,116,115, 0,109,101,110,117,116,104,114,101,115,104,111, +108,100, 49, 0,109,101,110,117,116,104,114,101,115,104,111,108,100, 50, 0,116,104,101,109,101,115, 0,117,105,102,111,110,116, +115, 0,117,105,115,116,121,108,101,115, 0,117,110,100,111,115,116,101,112,115, 0,117,110,100,111,109,101,109,111,114,121, 0, +103,112, 95,109, 97,110,104, 97,116,116,101,110,100,105,115,116, 0,103,112, 95,101,117, 99,108,105,100,101, 97,110,100,105,115, +116, 0,103,112, 95,101,114, 97,115,101,114, 0,103,112, 95,115,101,116,116,105,110,103,115, 0,116, 98, 95,108,101,102,116,109, +111,117,115,101, 0,116, 98, 95,114,105,103,104,116,109,111,117,115,101, 0,108,105,103,104,116, 91, 51, 93, 0,116,119, 95,104, +111,116,115,112,111,116, 0,116,119, 95,102,108, 97,103, 0,116,119, 95,104, 97,110,100,108,101,115,105,122,101, 0,116,119, 95, +115,105,122,101, 0,116,101,120,116,105,109,101,111,117,116, 0,116,101,120, 99,111,108,108,101, 99,116,114, 97,116,101, 0,119, +109,100,114, 97,119,109,101,116,104,111,100, 0,119,109,112, 97,100, 0,109,101,109, 99, 97, 99,104,101,108,105,109,105,116, 0, +112,114,101,102,101,116, 99,104,102,114, 97,109,101,115, 0,102,114, 97,109,101,115,101,114,118,101,114,112,111,114,116, 0,112, + 97,100, 95,114,111,116, 95, 97,110,103,108,101, 0,111, 98, 99,101,110,116,101,114, 95,100,105, 97, 0,114,118,105,115,105,122, +101, 0,114,118,105, 98,114,105,103,104,116, 0,114,101, 99,101,110,116, 95,102,105,108,101,115, 0,115,109,111,111,116,104, 95, +118,105,101,119,116,120, 0,103,108,114,101,115,108,105,109,105,116, 0,110,100,111,102, 95,112, 97,110, 0,110,100,111,102, 95, +114,111,116, 97,116,101, 0, 99,117,114,115,115,105,122,101, 0,105,112,111, 95,110,101,119, 0,118,101,114,115,101,109, 97,115, +116,101,114, 91, 49, 54, 48, 93, 0,118,101,114,115,101,117,115,101,114, 91, 49, 54, 48, 93, 0,103,108, 97,108,112,104, 97, 99, +108,105,112, 0, 99,111, 98, 97, 95,119,101,105,103,104,116, 0,118,101,114,116, 98, 97,115,101, 0,101,100,103,101, 98, 97,115, +101, 0, 97,114,101, 97, 98, 97,115,101, 0, 42,110,101,119,115, 99,101,110,101, 0,102,117,108,108, 0,119,105,110,105,100, 0, +100,111, 95,100,114, 97,119, 0,100,111, 95,114,101,102,114,101,115,104, 0,100,111, 95,100,114, 97,119, 95,103,101,115,116,117, +114,101, 0,100,111, 95,100,114, 97,119, 95,112, 97,105,110,116, 99,117,114,115,111,114, 0,115,119, 97,112, 0,109, 97,105,110, +119,105,110, 0,115,117, 98,119,105,110, 97, 99,116,105,118,101, 0, 42, 97,110,105,109,116,105,109,101,114, 0, 42, 99,111,110, +116,101,120,116, 0,104, 97,110,100,108,101,114, 91, 56, 93, 0, 42,110,101,119,118, 0,118,101, 99, 0, 42,118, 49, 0, 42,118, + 50, 0, 42,116,121,112,101, 0,112, 97,110,101,108,110, 97,109,101, 91, 54, 52, 93, 0,116, 97, 98,110, 97,109,101, 91, 54, 52, + 93, 0,100,114, 97,119,110, 97,109,101, 91, 54, 52, 93, 0,111,102,115,120, 0,111,102,115,121, 0,115,105,122,101,120, 0,115, +105,122,101,121, 0,108, 97, 98,101,108,111,102,115, 0,114,117,110,116,105,109,101, 95,102,108, 97,103, 0, 99,111,110,116,114, +111,108, 0,115,110, 97,112, 0,115,111,114,116,111,114,100,101,114, 0, 42,112, 97,110,101,108,116, 97, 98, 0, 42, 97, 99,116, +105,118,101,100, 97,116, 97, 0,108,105,115,116, 95,115, 99,114,111,108,108, 0,108,105,115,116, 95,115,105,122,101, 0,108,105, +115,116, 95,115,101, 97,114, 99,104, 91, 54, 52, 93, 0, 42,118, 51, 0, 42,118, 52, 0, 42,102,117,108,108, 0, 98,117,116,115, +112, 97, 99,101,116,121,112,101, 0,104,101, 97,100,101,114,116,121,112,101, 0,115,112, 97, 99,101,100, 97,116, 97, 0,104, 97, +110,100,108,101,114,115, 0, 97, 99,116,105,111,110,122,111,110,101,115, 0,119,105,110,114, 99,116, 0,100,114, 97,119,114, 99, +116, 0,115,119,105,110,105,100, 0,114,101,103,105,111,110,116,121,112,101, 0, 97,108,105,103,110,109,101,110,116, 0,117,105, + 98,108,111, 99,107,115, 0,112, 97,110,101,108,115, 0, 42,104,101, 97,100,101,114,115,116,114, 0, 42,114,101,103,105,111,110, +100, 97,116, 97, 0,115,117, 98,118,115,116,114, 91, 52, 93, 0,115,117, 98,118,101,114,115,105,111,110, 0,112, 97,100,115, 0, +109,105,110,118,101,114,115,105,111,110, 0,109,105,110,115,117, 98,118,101,114,115,105,111,110, 0, 42, 99,117,114,115, 99,114, +101,101,110, 0, 42, 99,117,114,115, 99,101,110,101, 0,102,105,108,101,102,108, 97,103,115, 0,103,108,111, 98, 97,108,102, 0, +110, 97,109,101, 91, 56, 48, 93, 0, 42,105, 98,117,102, 0, 42,105, 98,117,102, 95, 99,111,109,112, 0, 42,115,101, 49, 0, 42, +115,101, 50, 0, 42,115,101, 51, 0,110,114, 0, 98,111,116,116,111,109, 0,114,105,103,104,116, 0,120,111,102,115, 0,121,111, +102,115, 0,108,105,102,116, 91, 51, 93, 0,103, 97,109,109, 97, 91, 51, 93, 0,103, 97,105,110, 91, 51, 93, 0,115, 97,116,117, +114, 97,116,105,111,110, 0,100,105,114, 91, 49, 54, 48, 93, 0,100,111,110,101, 0,115,116, 97,114,116,115,116,105,108,108, 0, +101,110,100,115,116,105,108,108, 0, 42,115,116,114,105,112,100, 97,116, 97, 0,111,114,120, 0,111,114,121, 0, 42, 99,114,111, +112, 0, 42,116,114, 97,110,115,102,111,114,109, 0, 42, 99,111,108,111,114, 95, 98, 97,108, 97,110, 99,101, 0, 42,116,115,116, +114,105,112,100, 97,116, 97, 0, 42,116,115,116,114,105,112,100, 97,116, 97, 95,115,116, 97,114,116,115,116,105,108,108, 0, 42, +116,115,116,114,105,112,100, 97,116, 97, 95,101,110,100,115,116,105,108,108, 0, 42,105, 98,117,102, 95,115,116, 97,114,116,115, +116,105,108,108, 0, 42,105, 98,117,102, 95,101,110,100,115,116,105,108,108, 0, 42,105,110,115,116, 97,110, 99,101, 95,112,114, +105,118, 97,116,101, 95,100, 97,116, 97, 0, 42, 42, 99,117,114,114,101,110,116, 95,112,114,105,118, 97,116,101, 95,100, 97,116, + 97, 0, 42,116,109,112, 0,115,116, 97,114,116,111,102,115, 0,101,110,100,111,102,115, 0,109, 97, 99,104,105,110,101, 0,115, +116, 97,114,116,100,105,115,112, 0,101,110,100,100,105,115,112, 0,104, 97,110,100,115,105,122,101, 0, 97,110,105,109, 95,112, +114,101,115,101,101,107, 0, 42,115,116,114,105,112, 0,102, 97, 99,102, 48, 0,102, 97, 99,102, 49, 0, 42,115,101,113, 49, 0, + 42,115,101,113, 50, 0, 42,115,101,113, 51, 0,115,101,113, 98, 97,115,101, 0, 42,115,111,117,110,100, 0, 42,115,111,117,110, +100, 95,104, 97,110,100,108,101, 0,108,101,118,101,108, 0,112, 97,110, 0,115, 99,101,110,101,110,114, 0,115,116,114,111, 98, +101, 0, 42,101,102,102,101, 99,116,100, 97,116, 97, 0, 97,110,105,109, 95,115,116, 97,114,116,111,102,115, 0, 97,110,105,109, + 95,101,110,100,111,102,115, 0, 98,108,101,110,100, 95,109,111,100,101, 0, 98,108,101,110,100, 95,111,112, 97, 99,105,116,121, + 0, 42,111,108,100, 98, 97,115,101,112, 0, 42,112, 97,114,115,101,113, 0, 42,115,101,113, 98, 97,115,101,112, 0,109,101,116, + 97,115,116, 97, 99,107, 0, 42, 97, 99,116, 95,115,101,113, 0, 97, 99,116, 95,105,109, 97,103,101,100,105,114, 91, 50, 53, 54, + 93, 0, 97, 99,116, 95,115,111,117,110,100,100,105,114, 91, 50, 53, 54, 93, 0,101,100,103,101, 87,105,100,116,104, 0,102,111, +114,119, 97,114,100, 0,119,105,112,101,116,121,112,101, 0,102, 77,105,110,105, 0,102, 67,108, 97,109,112, 0,102, 66,111,111, +115,116, 0,100, 68,105,115,116, 0,100, 81,117, 97,108,105,116,121, 0, 98, 78,111, 67,111,109,112, 0, 83, 99, 97,108,101,120, + 73,110,105, 0, 83, 99, 97,108,101,121, 73,110,105, 0, 83, 99, 97,108,101,120, 70,105,110, 0, 83, 99, 97,108,101,121, 70,105, +110, 0,120, 73,110,105, 0,120, 70,105,110, 0,121, 73,110,105, 0,121, 70,105,110, 0,114,111,116, 73,110,105, 0,114,111,116, + 70,105,110, 0,105,110,116,101,114,112,111,108, 97,116,105,111,110, 0, 42,102,114, 97,109,101, 77, 97,112, 0,103,108,111, 98, + 97,108, 83,112,101,101,100, 0,108, 97,115,116, 86, 97,108,105,100, 70,114, 97,109,101, 0, 98,117,116,116,121,112,101, 0,117, +115,101,114,106,105,116, 0,115,116, 97, 0,116,111,116,112, 97,114,116, 0,110,111,114,109,102, 97, 99, 0,111, 98,102, 97, 99, + 0,114, 97,110,100,102, 97, 99, 0,116,101,120,102, 97, 99, 0,114, 97,110,100,108,105,102,101, 0,102,111,114, 99,101, 91, 51, + 93, 0,118,101, 99,116,115,105,122,101, 0,109, 97,120,108,101,110, 0,100,101,102,118,101, 99, 91, 51, 93, 0,109,117,108,116, + 91, 52, 93, 0,108,105,102,101, 91, 52, 93, 0, 99,104,105,108,100, 91, 52, 93, 0,109, 97,116, 91, 52, 93, 0,116,101,120,109, + 97,112, 0, 99,117,114,109,117,108,116, 0,115,116, 97,116,105, 99,115,116,101,112, 0,111,109, 97,116, 0,116,105,109,101,116, +101,120, 0,115,112,101,101,100,116,101,120, 0,102,108, 97,103, 50,110,101,103, 0,118,101,114,116,103,114,111,117,112, 95,118, + 0,118,103,114,111,117,112,110, 97,109,101, 91, 51, 50, 93, 0,118,103,114,111,117,112,110, 97,109,101, 95,118, 91, 51, 50, 93, + 0, 42,107,101,121,115, 0,109,105,110,102, 97, 99, 0,117,115,101,100, 0,117,115,101,100,101,108,101,109, 0, 42,112,111,105, +110, 0,114,101,115,101,116,100,105,115,116, 0,108, 97,115,116,118, 97,108, 0, 42,109, 97, 0,107,101,121, 0,113,117, 97,108, + 0,113,117, 97,108, 50, 0,116, 97,114,103,101,116, 78, 97,109,101, 91, 51, 50, 93, 0,116,111,103,103,108,101, 78, 97,109,101, + 91, 51, 50, 93, 0,118, 97,108,117,101, 91, 51, 50, 93, 0,109, 97,120,118, 97,108,117,101, 91, 51, 50, 93, 0,100,101,108, 97, +121, 0,100,117,114, 97,116,105,111,110, 0,109, 97,116,101,114,105, 97,108, 78, 97,109,101, 91, 51, 50, 93, 0,100, 97,109,112, +116,105,109,101,114, 0,112,114,111,112,110, 97,109,101, 91, 51, 50, 93, 0,109, 97,116,110, 97,109,101, 91, 51, 50, 93, 0, 97, +120,105,115,102,108, 97,103, 0, 42,102,114,111,109, 79, 98,106,101, 99,116, 0,115,117, 98,106,101, 99,116, 91, 51, 50, 93, 0, + 98,111,100,121, 91, 51, 50, 93, 0,111,116,121,112,101, 0,112,117,108,115,101, 0,102,114,101,113, 0,116,111,116,108,105,110, +107,115, 0, 42, 42,108,105,110,107,115, 0,116, 97,112, 0,106,111,121,105,110,100,101,120, 0, 97,120,105,115, 95,115,105,110, +103,108,101, 0, 97,120,105,115,102, 0, 98,117,116,116,111,110, 0,104, 97,116, 0,104, 97,116,102, 0,112,114,101, 99,105,115, +105,111,110, 0,115,116,114, 91, 49, 50, 56, 93, 0,109,111,100,117,108,101, 91, 54, 52, 93, 0, 42,109,121,110,101,119, 0,105, +110,112,117,116,115, 0,116,111,116,115,108,105,110,107,115, 0, 42, 42,115,108,105,110,107,115, 0,118, 97,108,111, 0,115,116, + 97,116,101, 95,109, 97,115,107, 0, 42, 97, 99,116, 0,102,114, 97,109,101, 80,114,111,112, 91, 51, 50, 93, 0, 98,108,101,110, +100,105,110, 0,112,114,105,111,114,105,116,121, 0,101,110,100, 95,114,101,115,101,116, 0,115,116,114,105,100,101, 97,120,105, +115, 0,115,116,114,105,100,101,108,101,110,103,116,104, 0,115,110,100,110,114, 0,112, 97,100, 49, 91, 50, 93, 0,112,105,116, + 99,104, 0,115,111,117,110,100, 51, 68, 0,109, 97,107,101, 99,111,112,121, 0, 99,111,112,121,109, 97,100,101, 0,112, 97,100, + 50, 91, 49, 93, 0, 42,109,101, 0,108,105,110, 86,101,108,111, 99,105,116,121, 91, 51, 93, 0, 97,110,103, 86,101,108,111, 99, +105,116,121, 91, 51, 93, 0,108,111, 99, 97,108,102,108, 97,103, 0,100,121,110, 95,111,112,101,114, 97,116,105,111,110, 0,102, +111,114, 99,101,108,111, 99, 91, 51, 93, 0,102,111,114, 99,101,114,111,116, 91, 51, 93, 0,108,105,110,101, 97,114,118,101,108, +111, 99,105,116,121, 91, 51, 93, 0, 97,110,103,117,108, 97,114,118,101,108,111, 99,105,116,121, 91, 51, 93, 0, 42,114,101,102, +101,114,101,110, 99,101, 0, 98,117,116,115,116, 97, 0, 98,117,116,101,110,100, 0,109,105,110, 0,109, 97,120, 0,118,105,115, +105,102, 97, 99, 0,114,111,116,100, 97,109,112, 0,109,105,110,108,111, 99, 91, 51, 93, 0,109, 97,120,108,111, 99, 91, 51, 93, + 0,109,105,110,114,111,116, 91, 51, 93, 0,109, 97,120,114,111,116, 91, 51, 93, 0,109, 97,116,112,114,111,112, 91, 51, 50, 93, + 0,100,105,115,116,114,105, 98,117,116,105,111,110, 0,105,110,116, 95, 97,114,103, 95, 49, 0,105,110,116, 95, 97,114,103, 95, + 50, 0,102,108,111, 97,116, 95, 97,114,103, 95, 49, 0,102,108,111, 97,116, 95, 97,114,103, 95, 50, 0,116,111, 80,114,111,112, + 78, 97,109,101, 91, 51, 50, 93, 0, 42,116,111, 79, 98,106,101, 99,116, 0, 98,111,100,121, 84,121,112,101, 0,102,105,108,101, +110, 97,109,101, 91, 54, 52, 93, 0,108,111, 97,100, 97,110,105,110, 97,109,101, 91, 54, 52, 93, 0,105,110,116, 95, 97,114,103, + 0,102,108,111, 97,116, 95, 97,114,103, 0,103,111, 0, 97, 99, 99,101,108,108,101,114, 97,116,105,111,110, 0,109, 97,120,115, +112,101,101,100, 0,109, 97,120,114,111,116,115,112,101,101,100, 0,109, 97,120,116,105,108,116,115,112,101,101,100, 0,116,105, +108,116,100, 97,109,112, 0,115,112,101,101,100,100, 97,109,112, 0, 42,115,111,117,114, 99,101, 0,102,114, 97,109,101,115,107, +105,112, 0,109,117,116,101, 0, 99,104, 97,110,103,101,100, 0,109,105,110, 95,103, 97,105,110, 0,109, 97,120, 95,103, 97,105, +110, 0,114,101,102,101,114,101,110, 99,101, 95,100,105,115,116, 97,110, 99,101, 0,109, 97,120, 95,100,105,115,116, 97,110, 99, +101, 0,114,111,108,108,111,102,102, 95,102, 97, 99,116,111,114, 0, 99,111,110,101, 95,105,110,110,101,114, 95, 97,110,103,108, +101, 0, 99,111,110,101, 95,111,117,116,101,114, 95, 97,110,103,108,101, 0, 99,111,110,101, 95,111,117,116,101,114, 95,103, 97, +105,110, 0, 42,110,101,119,112, 97, 99,107,101,100,102,105,108,101, 0, 97,116,116,101,110,117, 97,116,105,111,110, 0,100,105, +115,116, 97,110, 99,101, 0, 42, 99, 97, 99,104,101, 0, 42, 97,114,101, 97, 0, 42,108, 97,109,112,114,101,110, 0,103,111, 98, 106,101, 99,116, 0,100,117,112,108,105, 95,111,102,115, 91, 51, 93, 0, 99,104,105,108,100, 98, 97,115,101, 0,114,111,108,108, 0,104,101, 97,100, 91, 51, 93, 0,116, 97,105,108, 91, 51, 93, 0, 98,111,110,101, 95,109, 97,116, 91, 51, 93, 91, 51, 93, 0, 97,114,109, 95,104,101, 97,100, 91, 51, 93, 0, 97,114,109, 95,116, 97,105,108, 91, 51, 93, 0, 97,114,109, 95,109, 97,116, 91, @@ -1879,321 +2013,347 @@ char datatoc_B_blend[]= { 98, 97,115,101, 0, 42,101,100, 98,111, 0, 42,115,107,101,116, 99,104, 0,108, 97,121,101,114, 95,112,114,111,116,101, 99,116, 101,100, 0,103,104,111,115,116,101,112, 0,103,104,111,115,116,115,105,122,101, 0,103,104,111,115,116,116,121,112,101, 0,112, 97,116,104,115,105,122,101, 0,103,104,111,115,116,115,102, 0,103,104,111,115,116,101,102, 0,112, 97,116,104,115,102, 0,112, - 97,116,104,101,102, 0,112, 97,116,104, 98, 99, 0,112, 97,116,104, 97, 99, 0, 42,112,114,111,112, 0, 99,111,110,115,116,102, -108, 97,103, 0,105,107,102,108, 97,103, 0,115,101,108,101, 99,116,102,108, 97,103, 0, 97,103,114,112, 95,105,110,100,101,120, - 0, 42, 98,111,110,101, 0, 42, 99,104,105,108,100, 0,105,107,116,114,101,101, 0, 42, 98, 95, 98,111,110,101, 95,109, 97,116, -115, 0, 42,100,117, 97,108, 95,113,117, 97,116, 0, 42, 98, 95, 98,111,110,101, 95,100,117, 97,108, 95,113,117, 97,116,115, 0, -101,117,108, 91, 51, 93, 0,114,111,116,109,111,100,101, 0, 99,104, 97,110, 95,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,111, -115,101, 95,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,111,115,101, 95,104,101, 97,100, 91, 51, 93, 0,112,111,115,101, 95,116, - 97,105,108, 91, 51, 93, 0,108,105,109,105,116,109,105,110, 91, 51, 93, 0,108,105,109,105,116,109, 97,120, 91, 51, 93, 0,115, -116,105,102,102,110,101,115,115, 91, 51, 93, 0,105,107,115,116,114,101,116, 99,104, 0, 42, 99,117,115,116,111,109, 0, 99,104, - 97,110, 98, 97,115,101, 0,112,114,111,120,121, 95,108, 97,121,101,114, 0,115,116,114,105,100,101, 95,111,102,102,115,101,116, - 91, 51, 93, 0, 99,121, 99,108,105, 99, 95,111,102,102,115,101,116, 91, 51, 93, 0, 97,103,114,111,117,112,115, 0, 97, 99,116, -105,118,101, 95,103,114,111,117,112, 0, 99,117,115,116,111,109, 67,111,108, 0, 99,115, 0, 99,117,114,118,101,115, 0,103,114, -111,117,112,115, 0, 97, 99,116,105,118,101, 95,109, 97,114,107,101,114, 0, 42,115,111,117,114, 99,101, 0,102,105,108,116,101, -114,102,108, 97,103, 0, 97,100,115, 0, 97, 99,116,110,114, 0, 97, 99,116,119,105,100,116,104, 0,116,105,109,101,115,108,105, -100,101, 0, 42,103,114,112, 0,116,101,109,112, 0,110, 97,109,101, 91, 51, 48, 93, 0,111,119,110,115,112, 97, 99,101, 0,116, - 97,114,115,112, 97, 99,101, 0,101,110,102,111,114, 99,101, 0,104,101, 97,100,116, 97,105,108, 0, 42,116, 97,114, 0,115,117, - 98,116, 97,114,103,101,116, 91, 51, 50, 93, 0,109, 97,116,114,105,120, 91, 52, 93, 91, 52, 93, 0,115,112, 97, 99,101, 0,116, - 97,114,110,117,109, 0,116, 97,114,103,101,116,115, 0,105,116,101,114, 97,116,105,111,110,115, 0,114,111,111,116, 98,111,110, -101, 0,109, 97,120, 95,114,111,111,116, 98,111,110,101, 0, 42,112,111,108,101,116, 97,114, 0,112,111,108,101,115,117, 98,116, - 97,114,103,101,116, 91, 51, 50, 93, 0,112,111,108,101, 97,110,103,108,101, 0,111,114,105,101,110,116,119,101,105,103,104,116, - 0,103,114, 97, 98,116, 97,114,103,101,116, 91, 51, 93, 0,114,101,115,101,114,118,101,100, 49, 0,114,101,115,101,114,118,101, -100, 50, 0,109,105,110,109, 97,120,102,108, 97,103, 0,115,116,117, 99,107, 0, 99, 97, 99,104,101, 91, 51, 93, 0,108,111, 99, -107,102,108, 97,103, 0,102,111,108,108,111,119,102,108, 97,103, 0,118,111,108,109,111,100,101, 0,112,108, 97,110,101, 0,111, -114,103,108,101,110,103,116,104, 0, 98,117,108,103,101, 0,112,105,118, 88, 0,112,105,118, 89, 0,112,105,118, 90, 0, 97,120, - 88, 0, 97,120, 89, 0, 97,120, 90, 0,109,105,110, 76,105,109,105,116, 91, 54, 93, 0,109, 97,120, 76,105,109,105,116, 91, 54, - 93, 0,101,120,116,114, 97, 70,122, 0,105,110,118,109, 97,116, 91, 52, 93, 91, 52, 93, 0,102,114,111,109, 0,116,111, 0,109, - 97,112, 91, 51, 93, 0,101,120,112,111, 0,102,114,111,109, 95,109,105,110, 91, 51, 93, 0,102,114,111,109, 95,109, 97,120, 91, - 51, 93, 0,116,111, 95,109,105,110, 91, 51, 93, 0,116,111, 95,109, 97,120, 91, 51, 93, 0,122,109,105,110, 0,122,109, 97,120, - 0,112, 97,100, 91, 57, 93, 0, 99,104, 97,110,110,101,108, 91, 51, 50, 93, 0,110,111, 95,114,111,116, 95, 97,120,105,115, 0, -115,116,114,105,100,101, 95, 97,120,105,115, 0, 99,117,114,109,111,100, 0, 97, 99,116,115,116, 97,114,116, 0, 97, 99,116,101, -110,100, 0, 97, 99,116,111,102,102,115, 0,115,116,114,105,100,101,108,101,110, 0,115, 99, 97,108,101, 0, 98,108,101,110,100, -111,117,116, 0,115,116,114,105,100,101, 99,104, 97,110,110,101,108, 91, 51, 50, 93, 0,111,102,102,115, 95, 98,111,110,101, 91, - 51, 50, 93, 0,104, 97,115,105,110,112,117,116, 0,104, 97,115,111,117,116,112,117,116, 0,100, 97,116, 97,116,121,112,101, 0, -115,111, 99,107,101,116,116,121,112,101, 0, 42,110,101,119, 95,115,111, 99,107, 0,110,115, 0,108,105,109,105,116, 0,115,116, - 97, 99,107, 95,105,110,100,101,120, 0,105,110,116,101,114,110, 0,115,116, 97, 99,107, 95,105,110,100,101,120, 95,101,120,116, - 0,108,111, 99,120, 0,108,111, 99,121, 0,111,119,110, 95,105,110,100,101,120, 0,116,111, 95,105,110,100,101,120, 0, 42,116, -111,115,111, 99,107, 0, 42,108,105,110,107, 0, 42,110,101,119, 95,110,111,100,101, 0,117,115,101,114,110, 97,109,101, 91, 51, - 50, 93, 0,108, 97,115,116,121, 0,111,117,116,112,117,116,115, 0, 42,115,116,111,114, 97,103,101, 0,109,105,110,105,119,105, -100,116,104, 0, 99,117,115,116,111,109, 49, 0, 99,117,115,116,111,109, 50, 0, 99,117,115,116,111,109, 51, 0, 99,117,115,116, -111,109, 52, 0,110,101,101,100, 95,101,120,101, 99, 0,101,120,101, 99, 0, 42,116,104,114,101, 97,100,100, 97,116, 97, 0,116, -111,116,114, 0, 98,117,116,114, 0,112,114,118,114, 0, 42,116,121,112,101,105,110,102,111, 0, 42,102,114,111,109,110,111,100, -101, 0, 42,116,111,110,111,100,101, 0, 42,102,114,111,109,115,111, 99,107, 0,110,111,100,101,115, 0,108,105,110,107,115, 0, - 42,115,116, 97, 99,107, 0, 42,116,104,114,101, 97,100,115,116, 97, 99,107, 0,105,110,105,116, 0,115,116, 97, 99,107,115,105, -122,101, 0, 99,117,114, 95,105,110,100,101,120, 0, 97,108,108,116,121,112,101,115, 0, 42,111,119,110,116,121,112,101, 0, 42, -115,101,108,105,110, 0, 42,115,101,108,111,117,116, 0, 40, 42,116,105,109,101, 99,117,114,115,111,114, 41, 40, 41, 0, 40, 42, -115,116, 97,116,115, 95,100,114, 97,119, 41, 40, 41, 0, 40, 42,116,101,115,116, 95, 98,114,101, 97,107, 41, 40, 41, 0, 42,116, - 98,104, 0, 42,116, 99,104, 0, 42,115,100,104, 0, 99,121, 99,108,105, 99, 0,109,111,118,105,101, 0,115, 97,109,112,108,101, -115, 0,109,105,110,115,112,101,101,100, 0,112,101,114, 99,101,110,116,120, 0,112,101,114, 99,101,110,116,121, 0, 98,111,107, -101,104, 0, 99,117,114,118,101,100, 0,105,109, 97,103,101, 95,105,110, 95,119,105,100,116,104, 0,105,109, 97,103,101, 95,105, -110, 95,104,101,105,103,104,116, 0, 99,101,110,116,101,114, 95,120, 0, 99,101,110,116,101,114, 95,121, 0,115,112,105,110, 0, -105,116,101,114, 0,119,114, 97,112, 0,115,105,103,109, 97, 95, 99,111,108,111,114, 0,115,105,103,109, 97, 95,115,112, 97, 99, -101, 0,104,117,101, 0,115, 97,116, 0,116, 49, 0,116, 50, 0,116, 51, 0,102,115,116,114,101,110,103,116,104, 0,102, 97,108, -112,104, 97, 0,107,101,121, 91, 52, 93, 0,120, 49, 0,120, 50, 0,121, 49, 0,121, 50, 0, 99,111,108,110, 97,109,101, 91, 51, - 50, 93, 0, 98,107,116,121,112,101, 0,114,111,116, 97,116,105,111,110, 0,103, 97,109, 99,111, 0,110,111, 95,122, 98,117,102, - 0,102,115,116,111,112, 0,109, 97,120, 98,108,117,114, 0, 98,116,104,114,101,115,104, 0, 42,100,105, 99,116, 0, 42,110,111, -100,101, 0, 97,110,103,108,101, 95,111,102,115, 0, 99,111,108,109,111,100, 0,109,105,120, 0,116,104,114,101,115,104,111,108, -100, 0,102, 97,100,101, 0,109, 0, 99, 0,106,105,116, 0,112,114,111,106, 0,102,105,116, 0,115,104,111,114,116,121, 0,109, -105,110,116, 97, 98,108,101, 0,109, 97,120,116, 97, 98,108,101, 0,101,120,116, 95,105,110, 91, 50, 93, 0,101,120,116, 95,111, -117,116, 91, 50, 93, 0, 42, 99,117,114,118,101, 0, 42,116, 97, 98,108,101, 0, 42,112,114,101,109,117,108,116, 97, 98,108,101, - 0, 99,117,114,114, 0, 99,108,105,112,114, 0, 99,109, 91, 52, 93, 0, 98,108, 97, 99,107, 91, 51, 93, 0,119,104,105,116,101, - 91, 51, 93, 0, 98,119,109,117,108, 91, 51, 93, 0,115, 97,109,112,108,101, 91, 51, 93, 0,111,102,102,115,101,116, 91, 50, 93, - 0, 99,108,111,110,101, 0,105,110,110,101,114,114, 97,100,105,117,115, 0,114, 97,116,101, 0,114,103, 98, 91, 51, 93, 0,114, -111,116, 0,115, 99,117,108,112,116, 95,116,111,111,108, 0, 97, 99,116,105,118,101, 95,114,110,100, 0, 97, 99,116,105,118,101, + 97,116,104,101,102, 0,112, 97,116,104, 98, 99, 0,112, 97,116,104, 97, 99, 0, 42,112,111,105,110,116,115, 0,115,116, 97,114, +116, 95,102,114, 97,109,101, 0,101,110,100, 95,102,114, 97,109,101, 0, 42,112,114,111,112, 0, 99,111,110,115,116,102,108, 97, +103, 0,105,107,102,108, 97,103, 0,115,101,108,101, 99,116,102,108, 97,103, 0, 97,103,114,112, 95,105,110,100,101,120, 0, 42, + 98,111,110,101, 0, 42, 99,104,105,108,100, 0,105,107,116,114,101,101, 0, 42, 98, 95, 98,111,110,101, 95,109, 97,116,115, 0, + 42,100,117, 97,108, 95,113,117, 97,116, 0, 42, 98, 95, 98,111,110,101, 95,100,117, 97,108, 95,113,117, 97,116,115, 0,101,117, +108, 91, 51, 93, 0,114,111,116,109,111,100,101, 0, 99,104, 97,110, 95,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,111,115,101, + 95,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,111,115,101, 95,104,101, 97,100, 91, 51, 93, 0,112,111,115,101, 95,116, 97,105, +108, 91, 51, 93, 0,108,105,109,105,116,109,105,110, 91, 51, 93, 0,108,105,109,105,116,109, 97,120, 91, 51, 93, 0,115,116,105, +102,102,110,101,115,115, 91, 51, 93, 0,105,107,115,116,114,101,116, 99,104, 0, 42, 99,117,115,116,111,109, 0, 99,104, 97,110, + 98, 97,115,101, 0,112,114,111,120,121, 95,108, 97,121,101,114, 0,115,116,114,105,100,101, 95,111,102,102,115,101,116, 91, 51, + 93, 0, 99,121, 99,108,105, 99, 95,111,102,102,115,101,116, 91, 51, 93, 0, 97,103,114,111,117,112,115, 0, 97, 99,116,105,118, +101, 95,103,114,111,117,112, 0, 99,104, 97,110,110,101,108,115, 0, 99,117,115,116,111,109, 67,111,108, 0, 99,115, 0, 99,117, +114,118,101,115, 0,103,114,111,117,112,115, 0, 97, 99,116,105,118,101, 95,109, 97,114,107,101,114, 0,102,105,108,116,101,114, +102,108, 97,103, 0, 97,100,115, 0, 97, 99,116,110,114, 0, 97, 99,116,119,105,100,116,104, 0,116,105,109,101,115,108,105,100, +101, 0, 42,103,114,112, 0,116,101,109,112, 0,110, 97,109,101, 91, 51, 48, 93, 0,111,119,110,115,112, 97, 99,101, 0,116, 97, +114,115,112, 97, 99,101, 0,101,110,102,111,114, 99,101, 0,104,101, 97,100,116, 97,105,108, 0, 42,116, 97,114, 0,109, 97,116, +114,105,120, 91, 52, 93, 91, 52, 93, 0,115,112, 97, 99,101, 0,114,111,116, 79,114,100,101,114, 0,116, 97,114,110,117,109, 0, +116, 97,114,103,101,116,115, 0,105,116,101,114, 97,116,105,111,110,115, 0,114,111,111,116, 98,111,110,101, 0,109, 97,120, 95, +114,111,111,116, 98,111,110,101, 0, 42,112,111,108,101,116, 97,114, 0,112,111,108,101,115,117, 98,116, 97,114,103,101,116, 91, + 51, 50, 93, 0,112,111,108,101, 97,110,103,108,101, 0,111,114,105,101,110,116,119,101,105,103,104,116, 0,103,114, 97, 98,116, + 97,114,103,101,116, 91, 51, 93, 0,114,101,115,101,114,118,101,100, 49, 0,114,101,115,101,114,118,101,100, 50, 0,109,105,110, +109, 97,120,102,108, 97,103, 0,115,116,117, 99,107, 0, 99, 97, 99,104,101, 91, 51, 93, 0,108,111, 99,107,102,108, 97,103, 0, +102,111,108,108,111,119,102,108, 97,103, 0,118,111,108,109,111,100,101, 0,112,108, 97,110,101, 0,111,114,103,108,101,110,103, +116,104, 0, 98,117,108,103,101, 0,112,105,118, 88, 0,112,105,118, 89, 0,112,105,118, 90, 0, 97,120, 88, 0, 97,120, 89, 0, + 97,120, 90, 0,109,105,110, 76,105,109,105,116, 91, 54, 93, 0,109, 97,120, 76,105,109,105,116, 91, 54, 93, 0,101,120,116,114, + 97, 70,122, 0,105,110,118,109, 97,116, 91, 52, 93, 91, 52, 93, 0,102,114,111,109, 0,116,111, 0,109, 97,112, 91, 51, 93, 0, +101,120,112,111, 0,102,114,111,109, 95,109,105,110, 91, 51, 93, 0,102,114,111,109, 95,109, 97,120, 91, 51, 93, 0,116,111, 95, +109,105,110, 91, 51, 93, 0,116,111, 95,109, 97,120, 91, 51, 93, 0,122,109,105,110, 0,122,109, 97,120, 0,112, 97,100, 91, 57, + 93, 0, 99,104, 97,110,110,101,108, 91, 51, 50, 93, 0,110,111, 95,114,111,116, 95, 97,120,105,115, 0,115,116,114,105,100,101, + 95, 97,120,105,115, 0, 99,117,114,109,111,100, 0, 97, 99,116,115,116, 97,114,116, 0, 97, 99,116,101,110,100, 0, 97, 99,116, +111,102,102,115, 0,115,116,114,105,100,101,108,101,110, 0,115, 99, 97,108,101, 0, 98,108,101,110,100,111,117,116, 0,115,116, +114,105,100,101, 99,104, 97,110,110,101,108, 91, 51, 50, 93, 0,111,102,102,115, 95, 98,111,110,101, 91, 51, 50, 93, 0,104, 97, +115,105,110,112,117,116, 0,104, 97,115,111,117,116,112,117,116, 0,100, 97,116, 97,116,121,112,101, 0,115,111, 99,107,101,116, +116,121,112,101, 0, 42,110,101,119, 95,115,111, 99,107, 0,110,115, 0,108,105,109,105,116, 0,115,116, 97, 99,107, 95,105,110, +100,101,120, 0,105,110,116,101,114,110, 0,115,116, 97, 99,107, 95,105,110,100,101,120, 95,101,120,116, 0,108,111, 99,120, 0, +108,111, 99,121, 0,111,119,110, 95,105,110,100,101,120, 0,116,111, 95,105,110,100,101,120, 0, 42,116,111,115,111, 99,107, 0, + 42,108,105,110,107, 0, 42,110,101,119, 95,110,111,100,101, 0,117,115,101,114,110, 97,109,101, 91, 51, 50, 93, 0,108, 97,115, +116,121, 0,111,117,116,112,117,116,115, 0, 42,115,116,111,114, 97,103,101, 0,109,105,110,105,119,105,100,116,104, 0, 99,117, +115,116,111,109, 49, 0, 99,117,115,116,111,109, 50, 0, 99,117,115,116,111,109, 51, 0, 99,117,115,116,111,109, 52, 0,110,101, +101,100, 95,101,120,101, 99, 0,101,120,101, 99, 0, 42,116,104,114,101, 97,100,100, 97,116, 97, 0,116,111,116,114, 0, 98,117, +116,114, 0,112,114,118,114, 0, 42,116,121,112,101,105,110,102,111, 0, 42,102,114,111,109,110,111,100,101, 0, 42,116,111,110, +111,100,101, 0, 42,102,114,111,109,115,111, 99,107, 0,110,111,100,101,115, 0,108,105,110,107,115, 0, 42,115,116, 97, 99,107, + 0, 42,116,104,114,101, 97,100,115,116, 97, 99,107, 0,105,110,105,116, 0,115,116, 97, 99,107,115,105,122,101, 0, 99,117,114, + 95,105,110,100,101,120, 0, 97,108,108,116,121,112,101,115, 0, 42,111,119,110,116,121,112,101, 0, 42,115,101,108,105,110, 0, + 42,115,101,108,111,117,116, 0, 40, 42,116,105,109,101, 99,117,114,115,111,114, 41, 40, 41, 0, 40, 42,115,116, 97,116,115, 95, +100,114, 97,119, 41, 40, 41, 0, 40, 42,116,101,115,116, 95, 98,114,101, 97,107, 41, 40, 41, 0, 42,116, 98,104, 0, 42,116, 99, +104, 0, 42,115,100,104, 0, 99,121, 99,108,105, 99, 0,109,111,118,105,101, 0,115, 97,109,112,108,101,115, 0,109,105,110,115, +112,101,101,100, 0,112,101,114, 99,101,110,116,120, 0,112,101,114, 99,101,110,116,121, 0, 98,111,107,101,104, 0, 99,117,114, +118,101,100, 0,105,109, 97,103,101, 95,105,110, 95,119,105,100,116,104, 0,105,109, 97,103,101, 95,105,110, 95,104,101,105,103, +104,116, 0, 99,101,110,116,101,114, 95,120, 0, 99,101,110,116,101,114, 95,121, 0,115,112,105,110, 0,105,116,101,114, 0,119, +114, 97,112, 0,115,105,103,109, 97, 95, 99,111,108,111,114, 0,115,105,103,109, 97, 95,115,112, 97, 99,101, 0,104,117,101, 0, +115, 97,116, 0,116, 49, 0,116, 50, 0,116, 51, 0,102,115,116,114,101,110,103,116,104, 0,102, 97,108,112,104, 97, 0,107,101, +121, 91, 52, 93, 0,120, 49, 0,120, 50, 0,121, 49, 0,121, 50, 0, 99,111,108,110, 97,109,101, 91, 51, 50, 93, 0, 98,107,116, +121,112,101, 0,114,111,116, 97,116,105,111,110, 0,103, 97,109, 99,111, 0,110,111, 95,122, 98,117,102, 0,102,115,116,111,112, + 0,109, 97,120, 98,108,117,114, 0, 98,116,104,114,101,115,104, 0, 42,100,105, 99,116, 0, 42,110,111,100,101, 0, 97,110,103, +108,101, 95,111,102,115, 0, 99,111,108,109,111,100, 0,109,105,120, 0,116,104,114,101,115,104,111,108,100, 0,102, 97,100,101, + 0,109, 0, 99, 0,106,105,116, 0,112,114,111,106, 0,102,105,116, 0,115,104,111,114,116,121, 0,109,105,110,116, 97, 98,108, +101, 0,109, 97,120,116, 97, 98,108,101, 0,101,120,116, 95,105,110, 91, 50, 93, 0,101,120,116, 95,111,117,116, 91, 50, 93, 0, + 42, 99,117,114,118,101, 0, 42,116, 97, 98,108,101, 0, 42,112,114,101,109,117,108,116, 97, 98,108,101, 0, 99,117,114,114, 0, + 99,108,105,112,114, 0, 99,109, 91, 52, 93, 0, 98,108, 97, 99,107, 91, 51, 93, 0,119,104,105,116,101, 91, 51, 93, 0, 98,119, +109,117,108, 91, 51, 93, 0,115, 97,109,112,108,101, 91, 51, 93, 0,111,102,102,115,101,116, 91, 50, 93, 0, 99,108,111,110,101, + 0,105,110,110,101,114,114, 97,100,105,117,115, 0,115,109,111,111,116,104, 95,115,116,114,111,107,101, 95,114, 97,100,105,117, +115, 0,115,109,111,111,116,104, 95,115,116,114,111,107,101, 95,102, 97, 99,116,111,114, 0,114, 97,116,101, 0,114,103, 98, 91, + 51, 93, 0,115, 99,117,108,112,116, 95,116,111,111,108, 0, 97, 99,116,105,118,101, 95,114,110,100, 0, 97, 99,116,105,118,101, 95, 99,108,111,110,101, 0, 97, 99,116,105,118,101, 95,109, 97,115,107, 0, 42,108, 97,121,101,114,115, 0,116,111,116,108, 97, 121,101,114, 0,109, 97,120,108, 97,121,101,114, 0,116,111,116,115,105,122,101, 0, 42,112,111,111,108, 0,101,100,105,116,102, -108, 97,103, 0,118,101,108, 91, 51, 93, 0,114,111,116, 91, 52, 93, 0, 97,118,101, 91, 51, 93, 0,110,117,109, 0,112, 97,114, -101,110,116, 0,112, 97, 91, 52, 93, 0,119, 91, 52, 93, 0,102,117,118, 91, 52, 93, 0,102,111,102,102,115,101,116, 0,114, 97, -110,100, 91, 51, 93, 0, 42,115,116,105, 99,107, 95,111, 98, 0,112,114,101,118, 95,115,116, 97,116,101, 0, 42,104, 97,105,114, - 0, 42, 98,111,105,100, 0,114, 95,114,111,116, 91, 52, 93, 0,114, 95, 97,118,101, 91, 51, 93, 0,114, 95,118,101, 91, 51, 93, - 0,100,105,101,116,105,109,101, 0,115,105,122,101,109,117,108, 0,110,117,109, 95,100,109, 99, 97, 99,104,101, 0, 98,112,105, - 0, 97,108,105,118,101, 0,108,111,111,112, 0, 42, 98,111,105,100,115, 0,100,105,115,116,114, 0,112,104,121,115,116,121,112, -101, 0, 97,118,101,109,111,100,101, 0,114,101, 97, 99,116,101,118,101,110,116, 0,100,114, 97,119, 0,100,114, 97,119, 95, 97, -115, 0,100,114, 97,119, 95,115,105,122,101, 0, 99,104,105,108,100,116,121,112,101, 0,114,101,110, 95, 97,115, 0,100,114, 97, -119, 95,115,116,101,112, 0,114,101,110, 95,115,116,101,112, 0,104, 97,105,114, 95,115,116,101,112, 0,107,101,121,115, 95,115, -116,101,112, 0, 97,100, 97,112,116, 95, 97,110,103,108,101, 0, 97,100, 97,112,116, 95,112,105,120, 0,114,111,116,102,114,111, -109, 0,105,110,116,101,103,114, 97,116,111,114, 0, 98, 98, 95, 97,108,105,103,110, 0, 98, 98, 95,117,118, 95,115,112,108,105, -116, 0, 98, 98, 95, 97,110,105,109, 0, 98, 98, 95,115,112,108,105,116, 95,111,102,102,115,101,116, 0, 98, 98, 95,116,105,108, -116, 0, 98, 98, 95,114, 97,110,100, 95,116,105,108,116, 0, 98, 98, 95,111,102,102,115,101,116, 91, 50, 93, 0,115,105,109,112, -108,105,102,121, 95,102,108, 97,103, 0,115,105,109,112,108,105,102,121, 95,114,101,102,115,105,122,101, 0,115,105,109,112,108, -105,102,121, 95,114, 97,116,101, 0,115,105,109,112,108,105,102,121, 95,116,114, 97,110,115,105,116,105,111,110, 0,115,105,109, -112,108,105,102,121, 95,118,105,101,119,112,111,114,116, 0,116,105,109,101,116,119,101, 97,107, 0,106,105,116,102, 97, 99, 0, -101,102,102, 95,104, 97,105,114, 0,103,114,105,100, 95,114,101,115, 0,112, 97,114,116,102, 97, 99, 0,116, 97,110,102, 97, 99, - 0,116, 97,110,112,104, 97,115,101, 0,114,101, 97, 99,116,102, 97, 99, 0, 97,118,101,102, 97, 99, 0,112,104, 97,115,101,102, - 97, 99, 0,114, 97,110,100,114,111,116,102, 97, 99, 0,114, 97,110,100,112,104, 97,115,101,102, 97, 99, 0,114, 97,110,100,115, -105,122,101, 0,114,101, 97, 99,116,115,104, 97,112,101, 0, 97, 99, 99, 91, 51, 93, 0,100,114, 97,103,102, 97, 99, 0, 98,114, -111,119,110,102, 97, 99, 0,100, 97,109,112,102, 97, 99, 0,114, 97,110,100,108,101,110,103,116,104, 0, 99,104,105,108,100, 95, -110, 98,114, 0,114,101,110, 95, 99,104,105,108,100, 95,110, 98,114, 0,112, 97,114,101,110,116,115, 0, 99,104,105,108,100,115, -105,122,101, 0, 99,104,105,108,100,114, 97,110,100,115,105,122,101, 0, 99,104,105,108,100,114, 97,100, 0, 99,104,105,108,100, -102,108, 97,116, 0, 99,108,117,109,112,102, 97, 99, 0, 99,108,117,109,112,112,111,119, 0,114,111,117,103,104, 49, 0,114,111, -117,103,104, 49, 95,115,105,122,101, 0,114,111,117,103,104, 50, 0,114,111,117,103,104, 50, 95,115,105,122,101, 0,114,111,117, -103,104, 50, 95,116,104,114,101,115, 0,114,111,117,103,104, 95,101,110,100, 0,114,111,117,103,104, 95,101,110,100, 95,115,104, - 97,112,101, 0, 99,108,101,110,103,116,104, 0, 99,108,101,110,103,116,104, 95,116,104,114,101,115, 0, 98,114, 97,110, 99,104, - 95,116,104,114,101,115, 0,100,114, 97,119, 95,108,105,110,101, 91, 50, 93, 0,112, 97,116,104, 95,115,116, 97,114,116, 0,112, - 97,116,104, 95,101,110,100, 0,116,114, 97,105,108, 95, 99,111,117,110,116, 0,107,101,121,101,100, 95,108,111,111,112,115, 0, -101,102,102,101, 99,116,111,114, 95,119,101,105,103,104,116, 91, 49, 48, 93, 0, 42,101,102,102, 95,103,114,111,117,112, 0, 42, -100,117,112, 95,111, 98, 0, 42, 98, 98, 95,111, 98, 0, 42,112,100, 50, 0, 42,112, 97,114,116, 0, 42,101,100,105,116, 0, 40, - 42,102,114,101,101, 95,101,100,105,116, 41, 40, 41, 0, 42, 42,112, 97,116,104, 99, 97, 99,104,101, 0, 42, 42, 99,104,105,108, -100, 99, 97, 99,104,101, 0,112, 97,116,104, 99, 97, 99,104,101, 98,117,102,115, 0, 99,104,105,108,100, 99, 97, 99,104,101, 98, -117,102,115, 0, 42,116, 97,114,103,101,116, 95,111, 98, 0, 42,108, 97,116,116,105, 99,101, 0,101,102,102,101, 99,116,111,114, -115, 0,114,101, 97, 99,116,101,118,101,110,116,115, 0,116,114,101,101, 95,102,114, 97,109,101, 0,116,111,116, 99,104,105,108, -100, 0,116,111,116, 99, 97, 99,104,101,100, 0,116,111,116, 99,104,105,108,100, 99, 97, 99,104,101, 0,116, 97,114,103,101,116, - 95,112,115,121,115, 0,116,111,116,107,101,121,101,100, 0, 98, 97,107,101,115,112, 97, 99,101, 0, 98, 98, 95,117,118,110, 97, -109,101, 91, 51, 93, 91, 51, 50, 93, 0,118,103,114,111,117,112, 91, 49, 50, 93, 0,118,103, 95,110,101,103, 0,114,116, 51, 0, - 42,114,101,110,100,101,114,100, 97,116, 97, 0, 42,116,114,101,101, 0, 42, 99, 97, 99,104,101, 0, 67,100,105,115, 0, 67,118, -105, 0, 91, 51, 93, 0,115,116,114,117, 99,116,117,114, 97,108, 0, 98,101,110,100,105,110,103, 0,109, 97,120, 95, 98,101,110, -100, 0,109, 97,120, 95,115,116,114,117, 99,116, 0,109, 97,120, 95,115,104,101, 97,114, 0, 97,118,103, 95,115,112,114,105,110, -103, 95,108,101,110, 0,116,105,109,101,115, 99, 97,108,101, 0,101,102,102, 95,102,111,114, 99,101, 95,115, 99, 97,108,101, 0, -101,102,102, 95,119,105,110,100, 95,115, 99, 97,108,101, 0,115,105,109, 95,116,105,109,101, 95,111,108,100, 0,115,116,101,112, -115, 80,101,114, 70,114, 97,109,101, 0,112,114,101,114,111,108,108, 0,109, 97,120,115,112,114,105,110,103,108,101,110, 0,115, -111,108,118,101,114, 95,116,121,112,101, 0,118,103,114,111,117,112, 95, 98,101,110,100, 0,118,103,114,111,117,112, 95,109, 97, -115,115, 0,118,103,114,111,117,112, 95,115,116,114,117, 99,116, 0,112,114,101,115,101,116,115, 0, 42, 99,111,108,108,105,115, -105,111,110, 95,108,105,115,116, 0,101,112,115,105,108,111,110, 0,115,101,108,102, 95,102,114,105, 99,116,105,111,110, 0,115, -101,108,102,101,112,115,105,108,111,110, 0,115,101,108,102, 95,108,111,111,112, 95, 99,111,117,110,116, 0,108,111,111,112, 95, - 99,111,117,110,116, 0,112,114,101,115,115,117,114,101, 0, 42,112,111,105,110,116,115, 0,116,111,116,112,111,105,110,116,115, - 0,116,104,105, 99,107,110,101,115,115, 0,115,116,114,111,107,101,115, 0,102,114, 97,109,101,110,117,109, 0, 42, 97, 99,116, -102,114, 97,109,101, 0,103,115,116,101,112, 0,105,110,102,111, 91, 49, 50, 56, 93, 0,115, 98,117,102,102,101,114, 95,115,105, -122,101, 0,115, 98,117,102,102,101,114, 95,115,102,108, 97,103, 0, 42,115, 98,117,102,102,101,114, 0, 42,116,121,112,101,115, -116,114, 0, 42,109,101,115,115, 97,103,101, 0,108,105,115,116, 0,112,114,105,110,116,108,101,118,101,108, 0,115,116,111,114, -101,108,101,118,101,108, 0, 42,119,105,110,100,114, 97,119, 97, 98,108,101, 0, 42,119,105,110, 97, 99,116,105,118,101, 0,119, -105,110,100,111,119,115, 0,105,110,105,116,105, 97,108,105,122,101,100, 0,102,105,108,101, 95,115, 97,118,101,100, 0,111,112, -101,114, 97,116,111,114,115, 0,113,117,101,117,101, 0,114,101,112,111,114,116,115, 0,106,111, 98,115, 0,112, 97,105,110,116, - 99,117,114,115,111,114,115, 0,107,101,121,109, 97,112,115, 0, 42,103,104,111,115,116,119,105,110, 0, 42,110,101,119,115, 99, -114,101,101,110, 0,115, 99,114,101,101,110,110, 97,109,101, 91, 51, 50, 93, 0,112,111,115,120, 0,112,111,115,121, 0,119,105, -110,100,111,119,115,116, 97,116,101, 0,109,111,110,105,116,111,114, 0,108, 97,115,116, 99,117,114,115,111,114, 0, 97,100,100, -109,111,117,115,101,109,111,118,101, 0, 42,101,118,101,110,116,115,116, 97,116,101, 0, 42, 99,117,114,115,119,105,110, 0, 42, -116,119,101, 97,107, 0,100,114, 97,119,109,101,116,104,111,100, 0,100,114, 97,119,102, 97,105,108, 0, 42,100,114, 97,119,100, - 97,116, 97, 0,116,105,109,101,114,115, 0,115,117, 98,119,105,110,100,111,119,115, 0,103,101,115,116,117,114,101, 0,105,100, -110, 97,109,101, 91, 54, 52, 93, 0, 42,112,116,114, 0,115,104,105,102,116, 0, 99,116,114,108, 0, 97,108,116, 0,111,115,107, -101,121, 0,107,101,121,109,111,100,105,102,105,101,114, 0,112,114,111,112,118, 97,108,117,101, 0,105,110, 97, 99,116,105,118, -101, 0,109, 97,112,116,121,112,101, 0,107,101,121,109, 97,112, 0,110, 97,109,101,105,100, 91, 54, 52, 93, 0,115,112, 97, 99, -101,105,100, 0,114,101,103,105,111,110,105,100, 0,105,115, 95,109,111,100, 97,108, 0, 42,105,116,101,109,115, 0, 42, 99,117, -115,116,111,109,100, 97,116, 97, 0, 42,114,101,112,111,114,116,115, 0,109, 97, 99,114,111, 0, 42,111,112,109, 0,109,118, 97, -108, 91, 50, 93, 0,112,114,101,118,120, 0,112,114,101,118,121, 0,117,110,105, 99,111,100,101, 0, 97,115, 99,105,105, 0, 42, -107,101,121,109, 97,112, 95,105,100,110, 97,109,101, 0, 99,117,115,116,111,109, 0, 99,117,115,116,111,109,100, 97,116, 97,102, -114,101,101, 0, 42,101,100, 97,116, 97, 0,105,110,102,108,117,101,110, 99,101, 0, 42, 99,111,101,102,102,105, 99,105,101,110, -116,115, 0, 97,114,114, 97,121,115,105,122,101, 0,112,111,108,121, 95,111,114,100,101,114, 0, 97,109,112,108,105,116,117,100, -101, 0,112,104, 97,115,101, 95,109,117,108,116,105,112,108,105,101,114, 0,112,104, 97,115,101, 95,111,102,102,115,101,116, 0, -118, 97,108,117,101, 95,111,102,102,115,101,116, 0,109,105,100,118, 97,108, 0, 98,101,102,111,114,101, 95,109,111,100,101, 0, - 97,102,116,101,114, 95,109,111,100,101, 0, 98,101,102,111,114,101, 95, 99,121, 99,108,101,115, 0, 97,102,116,101,114, 95, 99, -121, 99,108,101,115, 0,114,101, 99,116, 0,112,104, 97,115,101, 0,109,111,100,105,102,105, 99, 97,116,105,111,110, 0, 42,114, -110, 97, 95,112, 97,116,104, 0, 97,114,114, 97,121, 95,105,110,100,101,120, 0,101,120,112,114,101,115,115,105,111,110, 91, 50, - 53, 54, 93, 0,118,101, 99, 91, 50, 93, 0, 42,102,112,116, 0, 99,111,108,111,114, 95,109,111,100,101, 0, 99,111,108,111,114, - 91, 51, 93, 0,102,114,111,109, 91, 49, 50, 56, 93, 0,116,111, 91, 49, 50, 56, 93, 0,109, 97,112,112,105,110,103,115, 0,115, -116,114,105,112,115, 0, 42,114,101,109, 97,112, 0,102, 99,117,114,118,101,115, 0,115,116,114,105,112, 95,116,105,109,101, 0, - 98,108,101,110,100,109,111,100,101, 0,101,120,116,101,110,100,109,111,100,101, 0,103,114,111,117,112, 91, 54, 52, 93, 0,105, -100,116,121,112,101, 0,116,101,109,112,108, 97,116,101,115, 0,103,114,111,117,112,109,111,100,101, 0,112, 97,116,104,115, 0, -107,101,121,105,110,103,102,108, 97,103, 0, 42,116,109,112, 97, 99,116, 0,110,108, 97, 95,116,114, 97, 99,107,115, 0, 42, 97, - 99,116,115,116,114,105,112, 0,100,114,105,118,101,114,115, 0,111,118,101,114,114,105,100,101,115, 0,114,117,108,101, 0,111, -112,116,105,111,110,115, 0,102,101, 97,114, 95,102, 97, 99,116,111,114, 0,115,105,103,110, 97,108, 95,105,100, 0,108,111,111, -107, 95, 97,104,101, 97,100, 0,111,108,111, 99, 91, 51, 93, 0,113,117,101,117,101, 95,115,105,122,101, 0,119, 97,110,100,101, -114, 0,102,108,101,101, 95,100,105,115,116, 97,110, 99,101, 0,104,101, 97,108,116,104, 0,115,116, 97,116,101, 95,105,100, 0, -114,117,108,101,115, 0, 99,111,110,100,105,116,105,111,110,115, 0, 97, 99,116,105,111,110,115, 0,114,117,108,101,115,101,116, - 95,116,121,112,101, 0,114,117,108,101, 95,102,117,122,122,105,110,101,115,115, 0,108, 97,115,116, 95,115,116, 97,116,101, 95, -105,100, 0,108, 97,110,100,105,110,103, 95,115,109,111,111,116,104,110,101,115,115, 0, 98, 97,110,107,105,110,103, 0, 97,103, -103,114,101,115,115,105,111,110, 0, 97, 99, 99,117,114, 97, 99,121, 0, 97,105,114, 95,109,105,110, 95,115,112,101,101,100, 0, - 97,105,114, 95,109, 97,120, 95,115,112,101,101,100, 0, 97,105,114, 95,109, 97,120, 95, 97, 99, 99, 0, 97,105,114, 95,109, 97, -120, 95, 97,118,101, 0, 97,105,114, 95,112,101,114,115,111,110, 97,108, 95,115,112, 97, 99,101, 0,108, 97,110,100, 95,106,117, -109,112, 95,115,112,101,101,100, 0,108, 97,110,100, 95,109, 97,120, 95,115,112,101,101,100, 0,108, 97,110,100, 95,109, 97,120, - 95, 97, 99, 99, 0,108, 97,110,100, 95,109, 97,120, 95, 97,118,101, 0,108, 97,110,100, 95,112,101,114,115,111,110, 97,108, 95, -115,112, 97, 99,101, 0,108, 97,110,100, 95,115,116,105, 99,107, 95,102,111,114, 99,101, 0,115,116, 97,116,101,115, 0, 0, 0, - 84, 89, 80, 69,168, 1, 0, 0, 99,104, 97,114, 0,117, 99,104, 97,114, 0,115,104,111,114,116, 0,117,115,104,111,114,116, 0, -105,110,116, 0,108,111,110,103, 0,117,108,111,110,103, 0,102,108,111, 97,116, 0,100,111,117, 98,108,101, 0,118,111,105,100, - 0, 76,105,110,107, 0, 76,105,110,107, 68, 97,116, 97, 0, 76,105,115,116, 66, 97,115,101, 0,118,101, 99, 50,115, 0,118,101, - 99, 50,105, 0,118,101, 99, 50,102, 0,118,101, 99, 50,100, 0,118,101, 99, 51,105, 0,118,101, 99, 51,102, 0,118,101, 99, 51, -100, 0,118,101, 99, 52,105, 0,118,101, 99, 52,102, 0,118,101, 99, 52,100, 0,114, 99,116,105, 0,114, 99,116,102, 0, 73, 68, - 80,114,111,112,101,114,116,121, 68, 97,116, 97, 0, 73, 68, 80,114,111,112,101,114,116,121, 0, 73, 68, 0, 76,105, 98,114, 97, -114,121, 0, 70,105,108,101, 68, 97,116, 97, 0, 80,114,101,118,105,101,119, 73,109, 97,103,101, 0, 73,112,111, 68,114,105,118, -101,114, 0, 79, 98,106,101, 99,116, 0, 73,112,111, 67,117,114,118,101, 0, 66, 80,111,105,110,116, 0, 66,101,122, 84,114,105, -112,108,101, 0, 73,112,111, 0, 75,101,121, 66,108,111, 99,107, 0, 75,101,121, 0, 65,110,105,109, 68, 97,116, 97, 0, 84,101, -120,116, 76,105,110,101, 0, 84,101,120,116, 77, 97,114,107,101,114, 0, 84,101,120,116, 0, 80, 97, 99,107,101,100, 70,105,108, -101, 0, 67, 97,109,101,114, 97, 0, 73,109, 97,103,101, 85,115,101,114, 0, 83, 99,101,110,101, 0, 73,109, 97,103,101, 0, 71, - 80, 85, 84,101,120,116,117,114,101, 0, 97,110,105,109, 0, 82,101,110,100,101,114, 82,101,115,117,108,116, 0, 77, 84,101,120, - 0, 84,101,120, 0, 80,108,117,103,105,110, 84,101,120, 0, 67, 66, 68, 97,116, 97, 0, 67,111,108,111,114, 66, 97,110,100, 0, - 69,110,118, 77, 97,112, 0, 73,109, 66,117,102, 0, 98, 78,111,100,101, 84,114,101,101, 0, 84,101,120, 77, 97,112,112,105,110, -103, 0, 76, 97,109,112, 0, 67,117,114,118,101, 77, 97,112,112,105,110,103, 0, 87, 97,118,101, 0, 77, 97,116,101,114,105, 97, -108, 0, 71,114,111,117,112, 0, 86, 70,111,110,116, 0, 86, 70,111,110,116, 68, 97,116, 97, 0, 77,101,116, 97, 69,108,101,109, - 0, 66,111,117,110,100, 66,111,120, 0, 77,101,116, 97, 66, 97,108,108, 0, 78,117,114, 98, 0, 67,104, 97,114, 73,110,102,111, - 0, 84,101,120,116, 66,111,120, 0, 67,117,114,118,101, 0, 80, 97,116,104, 0, 83,101,108, 66,111,120, 0, 69,100,105,116, 70, -111,110,116, 0, 77,101,115,104, 0, 77, 70, 97, 99,101, 0, 77, 84, 70, 97, 99,101, 0, 84, 70, 97, 99,101, 0, 77, 86,101,114, -116, 0, 77, 69,100,103,101, 0, 77, 68,101,102,111,114,109, 86,101,114,116, 0, 77, 67,111,108, 0, 77, 83,116,105, 99,107,121, - 0, 77, 83,101,108,101, 99,116, 0, 69,100,105,116, 77,101,115,104, 0, 67,117,115,116,111,109, 68, 97,116, 97, 0, 77,117,108, -116,105,114,101,115, 0, 80, 97,114,116,105, 97,108, 86,105,115,105, 98,105,108,105,116,121, 0, 77, 68,101,102,111,114,109, 87, -101,105,103,104,116, 0, 77, 84,101,120, 80,111,108,121, 0, 77, 76,111,111,112, 85, 86, 0, 77, 76,111,111,112, 67,111,108, 0, - 77, 70,108,111, 97,116, 80,114,111,112,101,114,116,121, 0, 77, 73,110,116, 80,114,111,112,101,114,116,121, 0, 77, 83,116,114, -105,110,103, 80,114,111,112,101,114,116,121, 0, 79,114,105,103, 83,112, 97, 99,101, 70, 97, 99,101, 0, 77, 68,105,115,112,115, - 0, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 69, 68, 71, 69, 68, 82, 65, 87, 32, 40, 49, 60, 60, 49, 41, 32, 35,100,101, -102,105,110,101, 32, 77, 69, 95, 83, 69, 65, 77, 32, 40, 49, 60, 60, 50, 41, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, - 71, 79, 78, 32, 40, 49, 60, 60, 51, 41, 32, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 69, 68, 71, 69, 82, 69, 78, 68, 69, - 82, 32, 40, 49, 60, 60, 53, 41, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 76, 79, 79, 83, 69, 69, 68, 71, 69, 32, 40, 49, - 60, 60, 55, 41, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 69, 65, 77, 95, 76, 65, 83, 84, 32, 40, 49, 60, 60, 56, 41, - 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 72, 65, 82, 80, 32, 40, 49, 60, 60, 57, 41, 32, 32, 32, 35,100,101,102,105, -110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 49, 32, 49, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 50, - 32, 50, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 51, 32, 52, 32, 35,100,101,102,105,110,101, 32, 77, - 69, 95, 70, 76, 73, 80, 86, 52, 32, 56, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 80, 82, 79, 74, 88, 89, 32, 49, 54, 32, - 35,100,101,102,105,110,101, 32, 77, 69, 95, 80, 82, 79, 74, 88, 90, 32, 51, 50, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, - 80, 82, 79, 74, 89, 90, 32, 54, 52, 32, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 49, 86, 50, 32, 49, 32, 35,100,101, -102,105,110,101, 32, 77, 69, 95, 86, 50, 86, 51, 32, 50, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 51, 86, 49, 32, 52, - 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 51, 86, 52, 32, 52, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 52, - 86, 49, 32, 56, 32, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 77, 79, 79, 84, 72, 32, 49, 32, 35,100,101,102,105,110, -101, 32, 77, 69, 95, 70, 65, 67, 69, 95, 83, 69, 76, 32, 50, 32, 32, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 83, 69, -108, 32, 48, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 69, 83, 69,108, 32, 49, 32, 35,100,101,102,105,110,101, 32, 77, 69, - 95, 70, 83, 69, 76, 32, 50, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 69, 67, 84, 32, 49, 32, 32, 35,100, -101,102,105,110,101, 32, 84, 70, 95, 65, 67, 84, 73, 86, 69, 32, 50, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, - 76, 49, 32, 52, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 50, 32, 56, 32, 35,100,101,102,105,110,101, 32, 84, - 70, 95, 83, 69, 76, 51, 32, 49, 54, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 52, 32, 51, 50, 32, 35,100,101, -102,105,110,101, 32, 84, 70, 95, 72, 73, 68, 69, 32, 54, 52, 32, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 89, 78, - 65, 77, 73, 67, 32, 49, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65, 76, 80, 72, 65, 83, 79, 82, 84, 32, 50, 32, 35,100, -101,102,105,110,101, 32, 84, 70, 95, 84, 69, 88, 32, 52, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 72, 65, 82, 69, 68, - 86, 69, 82, 84, 32, 56, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 76, 73, 71, 72, 84, 32, 49, 54, 32, 35,100,101,102,105, -110,101, 32, 84, 70, 95, 83, 72, 65, 82, 69, 68, 67, 79, 76, 32, 54, 52, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 84, 73, - 76, 69, 83, 32, 49, 50, 56, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 66, 73, 76, 76, 66, 79, 65, 82, 68, 32, 50, 53, - 54, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 84, 87, 79, 83, 73, 68, 69, 32, 53, 49, 50, 32, 35,100,101,102,105,110,101, - 32, 84, 70, 95, 73, 78, 86, 73, 83, 73, 66, 76, 69, 32, 49, 48, 50, 52, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 79, 66, - 67, 79, 76, 32, 50, 48, 52, 56, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 66, 73, 76, 76, 66, 79, 65, 82, 68, 50, 32, 52, - 48, 57, 54, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 72, 65, 68, 79, 87, 32, 56, 49, 57, 50, 32, 35,100,101,102, -105,110,101, 32, 84, 70, 95, 66, 77, 70, 79, 78, 84, 32, 49, 54, 51, 56, 52, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, - 83, 79, 76, 73, 68, 32, 48, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65, 68, 68, 32, 49, 32, 35,100,101,102,105,110,101, - 32, 84, 70, 95, 65, 76, 80, 72, 65, 32, 50, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 67, 76, 73, 80, 32, 52, 32, 32, 32, - 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 85, 66, 32, 51, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 69, 80, - 82, 69, 67, 65, 84, 69, 68, 49, 32, 49, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, - 50, 32, 50, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 51, 32, 52, 32, 35,100,101, -102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 52, 32, 56, 32, 35,100,101,102,105,110,101, 32, 84, 70, - 95, 80, 73, 78, 49, 32, 49, 54, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 50, 32, 51, 50, 32, 35,100,101,102, -105,110,101, 32, 84, 70, 95, 80, 73, 78, 51, 32, 54, 52, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 52, 32, 49, - 50, 56, 32, 35,101,110,100,105,102, 32, 32, 99,104, 97,114, 32,117,115,101, 95, 99,111,108, 44, 32,102,108, 97,103, 59, 10, 10, - 9, 47, 42, 32, 83,112,101, 99,105, 97,108, 32,108,101,118,101,108, 32, 49, 32,100, 97,116, 97, 32,116,104, 97,116, 32, 99, 97, -110,110,111,116, 32, 98,101, 32,109,111,100,105,102,105,101,100, 32,102,114,111,109, 32,111,116,104,101,114, 32,108,101,118,101, -108,115, 32, 42, 47, 10, 9, 67,117,115,116,111,109, 68, 97,116, 97, 32,118,100, 97,116, 97, 59, 10, 9, 67,117,115,116,111,109, - 68, 97,116, 97, 32,102,100, 97,116, 97, 59, 10, 9,115,104,111,114,116, 32, 42,101,100,103,101, 95,102,108, 97,103,115, 59, 10, - 9, 99,104, 97,114, 32, 42,101,100,103,101, 95, 99,114,101, 97,115,101,115, 59, 10,125, 32, 77,117,108,116,105,114,101,115, 59, - 10, 10, 47, 42, 42, 32, 69,110,100, 32, 77,117,108,116,105,114,101,115, 32, 42, 42, 47, 10, 10,116,121,112,101,100,101,102, 32, -115,116,114,117, 99,116, 32, 80, 97,114,116,105, 97,108, 86,105,115,105, 98,105,108,105,116,121, 32,123, 10, 9,117,110,115,105, -103,110,101,100, 32,105,110,116, 32, 42,118,101,114,116, 95,109, 97,112, 59, 32, 47, 42, 32,118,101,114,116, 95,109, 97,112, 91, - 79,108,100, 32, 73,110,100,101,120, 93, 61, 32, 78,101,119, 32, 73,110,100,101,120, 32, 42, 47, 10, 9,105,110,116, 32, 42,101, -100,103,101, 95,109, 97,112, 59, 32, 47, 42, 32,101,100,103,101, 95,109, 97,112, 91, 79,108,100, 32, 73,110,100,101,120, 93, 61, - 32, 78,101,119, 32, 73,110,100,101,120, 44, 32, 45, 49, 61, 32,104,105,100,100,101,110, 32, 42, 47, 10, 9, 77, 70, 97, 99,101, - 32, 42,111,108,100, 95,102, 97, 99,101,115, 59, 10, 9, 77, 69,100,103,101, 32, 42,111,108,100, 95,101,100,103,101,115, 59, 10, - 9,117,110,115,105,103,110,101,100, 32,105,110,116, 32,116,111,116,102, 97, 99,101, 44, 32,116,111,116,101,100,103,101, 44, 32, -116,111,116,118,101,114,116, 44, 32,112, 97,100, 59, 10,125, 32, 80, 97,114,116,105, 97,108, 86,105,115,105, 98,105,108,105,116, -121, 59, 10, 10, 47, 42, 32,109,118,101,114,116, 45, 62,102,108, 97,103, 32, 40, 49, 61, 83, 69, 76, 69, 67, 84, 41, 32, 42, 47, - 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 80, 72, 69, 82, 69, 84, 69, 83, 84, 9, 50, 10, 35,100,101,102,105,110,101, - 32, 77, 69, 95, 83, 80, 72, 69, 82, 69, 84, 69, 77, 80, 9, 52, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 72, 73, 68, 69, - 9, 9, 9, 49, 54, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 69, 82, 84, 95, 77, 69, 82, 71, 69, 68, 9, 9, 40, 49, - 60, 60, 54, 41, 10, 10, 47, 42, 32,109,101,100,103,101, 45, 62,102,108, 97,103, 32, 40, 49, 61, 83, 69, 76, 69, 67, 84, 41, 42, - 47, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 69, 68, 71, 69, 68, 82, 65, 87, 9, 9, 9, 40, 49, 60, 60, 49, 41, 10, 35, -100,101,102,105,110,101, 32, 77, 69, 95, 83, 69, 65, 77, 9, 9, 9, 9, 40, 49, 60, 60, 50, 41, 10, 35,100,101,102,105,110,101, - 32, 77, 69, 95, 70, 71, 79, 78, 9, 9, 9, 9, 40, 49, 60, 60, 51, 41, 10, 9, 9, 9, 9, 9, 9, 47, 42, 32,114,101,115,101, -114,118,101, 32, 49, 54, 32,102,111,114, 32, 77, 69, 95, 72, 73, 68, 69, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 77, 69, - 95, 69, 68, 71, 69, 82, 69, 78, 68, 69, 82, 9, 9, 40, 49, 60, 60, 53, 41, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 76, - 79, 79, 83, 69, 69, 68, 71, 69, 9, 9, 40, 49, 60, 60, 55, 41, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 69, 65, 77, - 95, 76, 65, 83, 84, 9, 9, 40, 49, 60, 60, 56, 41, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 72, 65, 82, 80, 9, 9, - 9, 40, 49, 60, 60, 57, 41, 10, 10, 47, 42, 32,112,117,110,111, 32, 61, 32,118,101,114,116,101,120,110,111,114,109, 97,108, 32, - 40,109,102, 97, 99,101, 41, 32, 42, 47, 10, 47, 42, 32,114,101,110,100,101,114, 32, 97,115,115,117,109,101,115, 32,102,108,105, -112,115, 32,116,111, 32, 98,101, 32,111,114,100,101,114,101,100, 32,108,105,107,101, 32,116,104,105,115, 32, 42, 47, 10, 35,100, -101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 49, 9, 9, 49, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, - 73, 80, 86, 50, 9, 9, 50, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 51, 9, 9, 52, 10, 35,100,101, -102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 52, 9, 9, 56, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 80, 82, 79, - 74, 88, 89, 9, 9, 49, 54, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 80, 82, 79, 74, 88, 90, 9, 9, 51, 50, 10, 35,100, -101,102,105,110,101, 32, 77, 69, 95, 80, 82, 79, 74, 89, 90, 9, 9, 54, 52, 10, 10, 47, 42, 32,101,100, 99,111,100,101, 32, 40, -109,102, 97, 99,101, 41, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 49, 86, 50, 9, 9, 9, 49, 10, 35,100, -101,102,105,110,101, 32, 77, 69, 95, 86, 50, 86, 51, 9, 9, 9, 50, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 51, 86, - 49, 9, 9, 9, 52, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 51, 86, 52, 9, 9, 9, 52, 10, 35,100,101,102,105,110, -101, 32, 77, 69, 95, 86, 52, 86, 49, 9, 9, 9, 56, 10, 10, 47, 42, 32,102,108, 97,103, 32, 40,109,102, 97, 99,101, 41, 32, 42, - 47, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 77, 79, 79, 84, 72, 9, 9, 9, 49, 10, 35,100,101,102,105,110,101, 32, - 77, 69, 95, 70, 65, 67, 69, 95, 83, 69, 76, 9, 9, 9, 50, 10, 9, 9, 9, 9, 9, 9, 47, 42, 32,102,108, 97,103, 32, 77, 69, - 95, 72, 73, 68, 69, 61, 61, 49, 54, 32,105,115, 32,117,115,101,100, 32,104,101,114,101, 32,116,111,111, 32, 42, 47, 32, 10, 47, - 42, 32,109,115,101,108,101, 99,116, 45, 62,116,121,112,101, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 83, - 69,108, 9, 48, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 69, 83, 69,108, 32, 49, 10, 35,100,101,102,105,110,101, 32, 77, - 69, 95, 70, 83, 69, 76, 32, 50, 10, 10, 47, 42, 32,109,116,102, 97, 99,101, 45, 62,102,108, 97,103, 32, 42, 47, 10, 35,100,101, -102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 69, 67, 84, 9, 49, 32, 47, 42, 32,117,115,101, 32, 77, 70, 97, 99,101, 32,104,105, -100,101, 32,102,108, 97,103, 32, 40, 97,102,116,101,114, 32, 50, 46, 52, 51, 41, 44, 32,115,104,111,117,108,100, 32, 98,101, 32, - 97, 98,108,101, 32,116,111, 32,114,101,117,115,101, 32, 97,102,116,101,114, 32, 50, 46, 52, 52, 32, 42, 47, 10, 35,100,101,102, -105,110,101, 32, 84, 70, 95, 65, 67, 84, 73, 86, 69, 9, 50, 32, 47, 42, 32,100,101,112,114,101, 99, 97,116,101,100, 33, 32, 42, - 47, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 49, 9, 9, 52, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, - 83, 69, 76, 50, 9, 9, 56, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 51, 9, 9, 49, 54, 10, 35,100,101,102, -105,110,101, 32, 84, 70, 95, 83, 69, 76, 52, 9, 9, 51, 50, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 72, 73, 68, 69, 9, - 9, 54, 52, 32, 47, 42, 32,117,110,117,115,101,100, 44, 32,115, 97,109,101, 32, 97,115, 32, 84, 70, 95, 83, 69, 76, 69, 67, 84, - 32, 42, 47, 10, 10, 47, 42, 32,109,116,102, 97, 99,101, 45, 62,109,111,100,101, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, - 84, 70, 95, 68, 89, 78, 65, 77, 73, 67, 9, 9, 49, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65, 76, 80, 72, 65, 83, 79, - 82, 84, 9, 50, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 84, 69, 88, 9, 9, 9, 52, 10, 35,100,101,102,105,110,101, 32, - 84, 70, 95, 83, 72, 65, 82, 69, 68, 86, 69, 82, 84, 9, 56, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 76, 73, 71, 72, 84, - 9, 9, 49, 54, 10, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 72, 65, 82, 69, 68, 67, 79, 76, 9, 54, 52, 10, 35,100, -101,102,105,110,101, 32, 84, 70, 95, 84, 73, 76, 69, 83, 9, 9, 49, 50, 56, 9, 9, 47, 42, 32,100,101,112,114,101, 99, 97,116, -101,100, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 66, 73, 76, 76, 66, 79, 65, 82, 68, 9, 50, 53, 54, 10, 35, -100,101,102,105,110,101, 32, 84, 70, 95, 84, 87, 79, 83, 73, 68, 69, 9, 9, 53, 49, 50, 10, 35,100,101,102,105,110,101, 32, 84, - 70, 95, 73, 78, 86, 73, 83, 73, 66, 76, 69, 9, 49, 48, 50, 52, 10, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 79, 66, 67, - 79, 76, 9, 9, 50, 48, 52, 56, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 66, 73, 76, 76, 66, 79, 65, 82, 68, 50, 9, 52, - 48, 57, 54, 9, 47, 42, 32,119,105,116,104, 32, 90, 32, 97,120,105,115, 32, 99,111,110,115,116,114, 97,105,110,116, 32, 42, 47, - 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 72, 65, 68, 79, 87, 9, 9, 56, 49, 57, 50, 10, 35,100,101,102,105,110,101, - 32, 84, 70, 95, 66, 77, 70, 79, 78, 84, 9, 9, 49, 54, 51, 56, 52, 10, 10, 47, 42, 32,109,116,102, 97, 99,101, 45, 62,116,114, - 97,110,115,112, 44, 32,118, 97,108,117,101,115, 32, 49, 45, 52, 32, 97,114,101, 32,117,115,101,100, 32, 97,115, 32,102,108, 97, -103,115, 32,105,110, 32,116,104,101, 32, 71, 76, 44, 32, 87, 65, 82, 78, 73, 78, 71, 44, 32, 84, 70, 95, 83, 85, 66, 32, 99, 97, -110,116, 32,119,111,114,107, 32,119,105,116,104, 32,116,104,105,115, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, - 83, 79, 76, 73, 68, 9, 48, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65, 68, 68, 9, 9, 49, 10, 35,100,101,102,105,110, -101, 32, 84, 70, 95, 65, 76, 80, 72, 65, 9, 50, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 67, 76, 73, 80, 9, 9, 52, 32, - 47, 42, 32, 99,108,105,112,109, 97,112, 32, 97,108,112,104, 97, 47, 98,105,110, 97,114,121, 32, 97,108,112,104, 97, 32, 97,108, -108, 32,111,114, 32,110,111,116,104,105,110,103, 33, 32, 42, 47, 10, 10, 47, 42, 32,115,117, 98, 32,105,115, 32,110,111,116, 32, - 97,118, 97,105,108, 97, 98,108,101, 32,105,110, 32,116,104,101, 32,117,115,101,114, 32,105,110,116,101,114,102, 97, 99,101, 32, - 97,110,121,109,111,114,101, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 85, 66, 9, 9, 51, 10, 10, 10, 47, - 42, 32,109,116,102, 97, 99,101, 45, 62,117,110,119,114, 97,112, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, - 69, 80, 82, 69, 67, 65, 84, 69, 68, 49, 9, 49, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, - 69, 68, 50, 9, 50, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 51, 9, 52, 10, 35, -100,101,102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 52, 9, 56, 10, 35,100,101,102,105,110,101, 32, - 84, 70, 95, 80, 73, 78, 49, 9, 9, 32, 32, 32, 32, 49, 54, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 50, 9, - 9, 32, 32, 32, 32, 51, 50, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 51, 9, 32, 32, 32, 9, 9, 54, 52, 10, - 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 52, 9, 32, 32, 32, 32, 9, 49, 50, 56, 10, 10, 35,101,110,100,105,102, - 10,105,110, 79, 67, 75, 33,116, 95,102, 97, 99,101, 59, 32, 32, 32, 32, 32,129, 71, 0, 77,117,108,116,105,114,101,115, 67,111, -108, 0, 77,117,108,116,105,114,101,115, 67,111,108, 70, 97, 99,101, 0, 77,117,108,116,105,114,101,115, 70, 97, 99,101, 0, 77, -117,108,116,105,114,101,115, 69,100,103,101, 0, 77,117,108,116,105,114,101,115, 76,101,118,101,108, 0, 77,111,100,105,102,105, -101,114, 68, 97,116, 97, 0, 83,117, 98,115,117,114,102, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 76, 97,116,116,105, - 99,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 67,117,114,118,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, - 0, 66,117,105,108,100, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77, 97,115,107, 77,111,100,105,102,105,101,114, 68, - 97,116, 97, 0, 65,114,114, 97,121, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77,105,114,114,111,114, 77,111,100,105, -102,105,101,114, 68, 97,116, 97, 0, 69,100,103,101, 83,112,108,105,116, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 66, -101,118,101,108, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 66, 77,101,115,104, 77,111,100,105,102,105,101,114, 68, 97, -116, 97, 0, 68,105,115,112,108, 97, 99,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 85, 86, 80,114,111,106,101, 99, +108, 97,103, 0,118,101,108, 91, 51, 93, 0,114,111,116, 91, 52, 93, 0, 97,118,101, 91, 51, 93, 0, 42,103,114,111,117,110,100, + 0,103,114, 97,118,105,116,121, 91, 51, 93, 0,119, 97,110,100,101,114, 91, 51, 93, 0,110,117,109, 0,112, 97,114,101,110,116, + 0,112, 97, 91, 52, 93, 0,119, 91, 52, 93, 0,102,117,118, 91, 52, 93, 0,102,111,102,102,115,101,116, 0,114, 97,110,100, 91, + 51, 93, 0,112,114,101,118, 95,115,116, 97,116,101, 0, 42,104, 97,105,114, 0, 42, 98,111,105,100, 0,100,105,101,116,105,109, +101, 0,110,117,109, 95,100,109, 99, 97, 99,104,101, 0, 97,108,105,118,101, 0,108,111,111,112, 0,104, 97,105,114, 95,105,110, +100,101,120, 0, 42, 98,111,105,100,115, 0,100,105,115,116,114, 0,112,104,121,115,116,121,112,101, 0, 97,118,101,109,111,100, +101, 0,114,101, 97, 99,116,101,118,101,110,116, 0,100,114, 97,119, 0,100,114, 97,119, 95, 97,115, 0,100,114, 97,119, 95,115, +105,122,101, 0, 99,104,105,108,100,116,121,112,101, 0,114,101,110, 95, 97,115, 0,114,101,110, 95,115,116,101,112, 0,104, 97, +105,114, 95,115,116,101,112, 0,107,101,121,115, 95,115,116,101,112, 0, 97,100, 97,112,116, 95, 97,110,103,108,101, 0, 97,100, + 97,112,116, 95,112,105,120, 0,114,111,116,102,114,111,109, 0,105,110,116,101,103,114, 97,116,111,114, 0, 98, 98, 95, 97,108, +105,103,110, 0, 98, 98, 95,117,118, 95,115,112,108,105,116, 0, 98, 98, 95, 97,110,105,109, 0, 98, 98, 95,115,112,108,105,116, + 95,111,102,102,115,101,116, 0, 98, 98, 95,116,105,108,116, 0, 98, 98, 95,114, 97,110,100, 95,116,105,108,116, 0, 98, 98, 95, +111,102,102,115,101,116, 91, 50, 93, 0,115,105,109,112,108,105,102,121, 95,102,108, 97,103, 0,115,105,109,112,108,105,102,121, + 95,114,101,102,115,105,122,101, 0,115,105,109,112,108,105,102,121, 95,114, 97,116,101, 0,115,105,109,112,108,105,102,121, 95, +116,114, 97,110,115,105,116,105,111,110, 0,115,105,109,112,108,105,102,121, 95,118,105,101,119,112,111,114,116, 0,116,105,109, +101,116,119,101, 97,107, 0,106,105,116,102, 97, 99, 0,101,102,102, 95,104, 97,105,114, 0,103,114,105,100, 95,114,101,115, 0, +112, 97,114,116,102, 97, 99, 0,116, 97,110,102, 97, 99, 0,116, 97,110,112,104, 97,115,101, 0,114,101, 97, 99,116,102, 97, 99, + 0, 97,118,101,102, 97, 99, 0,112,104, 97,115,101,102, 97, 99, 0,114, 97,110,100,114,111,116,102, 97, 99, 0,114, 97,110,100, +112,104, 97,115,101,102, 97, 99, 0,114, 97,110,100,115,105,122,101, 0,114,101, 97, 99,116,115,104, 97,112,101, 0, 97, 99, 99, + 91, 51, 93, 0,100,114, 97,103,102, 97, 99, 0, 98,114,111,119,110,102, 97, 99, 0,100, 97,109,112,102, 97, 99, 0,114, 97,110, +100,108,101,110,103,116,104, 0, 99,104,105,108,100, 95,110, 98,114, 0,114,101,110, 95, 99,104,105,108,100, 95,110, 98,114, 0, +112, 97,114,101,110,116,115, 0, 99,104,105,108,100,115,105,122,101, 0, 99,104,105,108,100,114, 97,110,100,115,105,122,101, 0, + 99,104,105,108,100,114, 97,100, 0, 99,104,105,108,100,102,108, 97,116, 0, 99,108,117,109,112,102, 97, 99, 0, 99,108,117,109, +112,112,111,119, 0,114,111,117,103,104, 49, 0,114,111,117,103,104, 49, 95,115,105,122,101, 0,114,111,117,103,104, 50, 0,114, +111,117,103,104, 50, 95,115,105,122,101, 0,114,111,117,103,104, 50, 95,116,104,114,101,115, 0,114,111,117,103,104, 95,101,110, +100, 0,114,111,117,103,104, 95,101,110,100, 95,115,104, 97,112,101, 0, 99,108,101,110,103,116,104, 0, 99,108,101,110,103,116, +104, 95,116,104,114,101,115, 0, 98,114, 97,110, 99,104, 95,116,104,114,101,115, 0,100,114, 97,119, 95,108,105,110,101, 91, 50, + 93, 0,112, 97,116,104, 95,115,116, 97,114,116, 0,112, 97,116,104, 95,101,110,100, 0,116,114, 97,105,108, 95, 99,111,117,110, +116, 0,107,101,121,101,100, 95,108,111,111,112,115, 0,101,102,102,101, 99,116,111,114, 95,119,101,105,103,104,116, 91, 49, 48, + 93, 0, 42,101,102,102, 95,103,114,111,117,112, 0, 42,100,117,112, 95,111, 98, 0, 42, 98, 98, 95,111, 98, 0, 42,112,100, 50, + 0, 42,112, 97,114,116, 0, 42,112, 97,114,116,105, 99,108,101,115, 0, 42, 42,112, 97,116,104, 99, 97, 99,104,101, 0, 42, 42, + 99,104,105,108,100, 99, 97, 99,104,101, 0,112, 97,116,104, 99, 97, 99,104,101, 98,117,102,115, 0, 99,104,105,108,100, 99, 97, + 99,104,101, 98,117,102,115, 0, 42, 99,108,109,100, 0, 42,104, 97,105,114, 95,105,110, 95,100,109, 0, 42,104, 97,105,114, 95, +111,117,116, 95,100,109, 0, 42,116, 97,114,103,101,116, 95,111, 98, 0, 42,108, 97,116,116,105, 99,101, 0,101,102,102,101, 99, +116,111,114,115, 0,114,101, 97, 99,116,101,118,101,110,116,115, 0,116,114,101,101, 95,102,114, 97,109,101, 0,116,111,116, 99, +104,105,108,100, 0,116,111,116, 99, 97, 99,104,101,100, 0,116,111,116, 99,104,105,108,100, 99, 97, 99,104,101, 0,116, 97,114, +103,101,116, 95,112,115,121,115, 0,116,111,116,107,101,121,101,100, 0, 98, 97,107,101,115,112, 97, 99,101, 0, 98, 98, 95,117, +118,110, 97,109,101, 91, 51, 93, 91, 51, 50, 93, 0,118,103,114,111,117,112, 91, 49, 50, 93, 0,118,103, 95,110,101,103, 0,114, +116, 51, 0, 42,114,101,110,100,101,114,100, 97,116, 97, 0, 42,116,114,101,101, 0, 67,100,105,115, 0, 67,118,105, 0, 91, 51, + 93, 0,115,116,114,117, 99,116,117,114, 97,108, 0, 98,101,110,100,105,110,103, 0,109, 97,120, 95, 98,101,110,100, 0,109, 97, +120, 95,115,116,114,117, 99,116, 0,109, 97,120, 95,115,104,101, 97,114, 0, 97,118,103, 95,115,112,114,105,110,103, 95,108,101, +110, 0,116,105,109,101,115, 99, 97,108,101, 0,101,102,102, 95,102,111,114, 99,101, 95,115, 99, 97,108,101, 0,101,102,102, 95, +119,105,110,100, 95,115, 99, 97,108,101, 0,115,105,109, 95,116,105,109,101, 95,111,108,100, 0,118,101,108,111, 99,105,116,121, + 95,115,109,111,111,116,104, 0,115,116,101,112,115, 80,101,114, 70,114, 97,109,101, 0,112,114,101,114,111,108,108, 0,109, 97, +120,115,112,114,105,110,103,108,101,110, 0,115,111,108,118,101,114, 95,116,121,112,101, 0,118,103,114,111,117,112, 95, 98,101, +110,100, 0,118,103,114,111,117,112, 95,109, 97,115,115, 0,118,103,114,111,117,112, 95,115,116,114,117, 99,116, 0,112,114,101, +115,101,116,115, 0, 42, 99,111,108,108,105,115,105,111,110, 95,108,105,115,116, 0,101,112,115,105,108,111,110, 0,115,101,108, +102, 95,102,114,105, 99,116,105,111,110, 0,115,101,108,102,101,112,115,105,108,111,110, 0,115,101,108,102, 95,108,111,111,112, + 95, 99,111,117,110,116, 0,108,111,111,112, 95, 99,111,117,110,116, 0,112,114,101,115,115,117,114,101, 0,116,104,105, 99,107, +110,101,115,115, 0,115,116,114,111,107,101,115, 0,102,114, 97,109,101,110,117,109, 0, 42, 97, 99,116,102,114, 97,109,101, 0, +103,115,116,101,112, 0,105,110,102,111, 91, 49, 50, 56, 93, 0,115, 98,117,102,102,101,114, 95,115,105,122,101, 0,115, 98,117, +102,102,101,114, 95,115,102,108, 97,103, 0, 42,115, 98,117,102,102,101,114, 0, 42,116,121,112,101,115,116,114, 0, 42,109,101, +115,115, 97,103,101, 0,108,105,115,116, 0,112,114,105,110,116,108,101,118,101,108, 0,115,116,111,114,101,108,101,118,101,108, + 0, 42,119,105,110,100,114, 97,119, 97, 98,108,101, 0, 42,119,105,110, 97, 99,116,105,118,101, 0,119,105,110,100,111,119,115, + 0,105,110,105,116,105, 97,108,105,122,101,100, 0,102,105,108,101, 95,115, 97,118,101,100, 0,111,112,101,114, 97,116,111,114, +115, 0,113,117,101,117,101, 0,114,101,112,111,114,116,115, 0,106,111, 98,115, 0,112, 97,105,110,116, 99,117,114,115,111,114, +115, 0,107,101,121,109, 97,112,115, 0, 42,103,104,111,115,116,119,105,110, 0, 42,110,101,119,115, 99,114,101,101,110, 0,115, + 99,114,101,101,110,110, 97,109,101, 91, 51, 50, 93, 0,112,111,115,120, 0,112,111,115,121, 0,119,105,110,100,111,119,115,116, + 97,116,101, 0,109,111,110,105,116,111,114, 0,108, 97,115,116, 99,117,114,115,111,114, 0, 97,100,100,109,111,117,115,101,109, +111,118,101, 0, 42,101,118,101,110,116,115,116, 97,116,101, 0, 42, 99,117,114,115,119,105,110, 0, 42,116,119,101, 97,107, 0, +100,114, 97,119,109,101,116,104,111,100, 0,100,114, 97,119,102, 97,105,108, 0, 42,100,114, 97,119,100, 97,116, 97, 0,116,105, +109,101,114,115, 0,115,117, 98,119,105,110,100,111,119,115, 0,103,101,115,116,117,114,101, 0,105,100,110, 97,109,101, 91, 54, + 52, 93, 0, 42,112,116,114, 0,115,104,105,102,116, 0, 99,116,114,108, 0, 97,108,116, 0,111,115,107,101,121, 0,107,101,121, +109,111,100,105,102,105,101,114, 0,112,114,111,112,118, 97,108,117,101, 0,105,110, 97, 99,116,105,118,101, 0,109, 97,112,116, +121,112,101, 0,107,101,121,109, 97,112, 0,110, 97,109,101,105,100, 91, 54, 52, 93, 0,115,112, 97, 99,101,105,100, 0,114,101, +103,105,111,110,105,100, 0,105,115, 95,109,111,100, 97,108, 0, 42,105,116,101,109,115, 0, 42, 99,117,115,116,111,109,100, 97, +116, 97, 0, 42,114,101,112,111,114,116,115, 0,109, 97, 99,114,111, 0, 42,111,112,109, 0,109,118, 97,108, 91, 50, 93, 0,112, +114,101,118,120, 0,112,114,101,118,121, 0,117,110,105, 99,111,100,101, 0, 97,115, 99,105,105, 0, 42,107,101,121,109, 97,112, + 95,105,100,110, 97,109,101, 0, 99,117,115,116,111,109, 0, 99,117,115,116,111,109,100, 97,116, 97,102,114,101,101, 0, 42,101, +100, 97,116, 97, 0,105,110,102,108,117,101,110, 99,101, 0, 42, 99,111,101,102,102,105, 99,105,101,110,116,115, 0, 97,114,114, + 97,121,115,105,122,101, 0,112,111,108,121, 95,111,114,100,101,114, 0, 97,109,112,108,105,116,117,100,101, 0,112,104, 97,115, +101, 95,109,117,108,116,105,112,108,105,101,114, 0,112,104, 97,115,101, 95,111,102,102,115,101,116, 0,118, 97,108,117,101, 95, +111,102,102,115,101,116, 0,109,105,100,118, 97,108, 0, 98,101,102,111,114,101, 95,109,111,100,101, 0, 97,102,116,101,114, 95, +109,111,100,101, 0, 98,101,102,111,114,101, 95, 99,121, 99,108,101,115, 0, 97,102,116,101,114, 95, 99,121, 99,108,101,115, 0, +114,101, 99,116, 0,112,104, 97,115,101, 0,109,111,100,105,102,105, 99, 97,116,105,111,110, 0, 42,114,110, 97, 95,112, 97,116, +104, 0, 97,114,114, 97,121, 95,105,110,100,101,120, 0,101,120,112,114,101,115,115,105,111,110, 91, 50, 53, 54, 93, 0,118,101, + 99, 91, 50, 93, 0, 42,102,112,116, 0, 99,111,108,111,114, 95,109,111,100,101, 0, 99,111,108,111,114, 91, 51, 93, 0,102,114, +111,109, 91, 49, 50, 56, 93, 0,116,111, 91, 49, 50, 56, 93, 0,109, 97,112,112,105,110,103,115, 0,115,116,114,105,112,115, 0, + 42,114,101,109, 97,112, 0,102, 99,117,114,118,101,115, 0,115,116,114,105,112, 95,116,105,109,101, 0, 98,108,101,110,100,109, +111,100,101, 0,101,120,116,101,110,100,109,111,100,101, 0,103,114,111,117,112, 91, 54, 52, 93, 0,105,100,116,121,112,101, 0, +116,101,109,112,108, 97,116,101,115, 0,103,114,111,117,112,109,111,100,101, 0,112, 97,116,104,115, 0,107,101,121,105,110,103, +102,108, 97,103, 0, 42,116,109,112, 97, 99,116, 0,110,108, 97, 95,116,114, 97, 99,107,115, 0, 42, 97, 99,116,115,116,114,105, +112, 0,100,114,105,118,101,114,115, 0,111,118,101,114,114,105,100,101,115, 0, 97, 99,116, 95, 98,108,101,110,100,109,111,100, +101, 0, 97, 99,116, 95,101,120,116,101,110,100,109,111,100,101, 0, 97, 99,116, 95,105,110,102,108,117,101,110, 99,101, 0,114, +117,108,101, 0,111,112,116,105,111,110,115, 0,102,101, 97,114, 95,102, 97, 99,116,111,114, 0,115,105,103,110, 97,108, 95,105, +100, 0,108,111,111,107, 95, 97,104,101, 97,100, 0,111,108,111, 99, 91, 51, 93, 0,113,117,101,117,101, 95,115,105,122,101, 0, +119, 97,110,100,101,114, 0,102,108,101,101, 95,100,105,115,116, 97,110, 99,101, 0,104,101, 97,108,116,104, 0,115,116, 97,116, +101, 95,105,100, 0,114,117,108,101,115, 0, 99,111,110,100,105,116,105,111,110,115, 0, 97, 99,116,105,111,110,115, 0,114,117, +108,101,115,101,116, 95,116,121,112,101, 0,114,117,108,101, 95,102,117,122,122,105,110,101,115,115, 0,108, 97,115,116, 95,115, +116, 97,116,101, 95,105,100, 0,108, 97,110,100,105,110,103, 95,115,109,111,111,116,104,110,101,115,115, 0, 98, 97,110,107,105, +110,103, 0, 97,103,103,114,101,115,115,105,111,110, 0, 97, 99, 99,117,114, 97, 99,121, 0, 97,105,114, 95,109,105,110, 95,115, +112,101,101,100, 0, 97,105,114, 95,109, 97,120, 95,115,112,101,101,100, 0, 97,105,114, 95,109, 97,120, 95, 97, 99, 99, 0, 97, +105,114, 95,109, 97,120, 95, 97,118,101, 0, 97,105,114, 95,112,101,114,115,111,110, 97,108, 95,115,112, 97, 99,101, 0,108, 97, +110,100, 95,106,117,109,112, 95,115,112,101,101,100, 0,108, 97,110,100, 95,109, 97,120, 95,115,112,101,101,100, 0,108, 97,110, +100, 95,109, 97,120, 95, 97, 99, 99, 0,108, 97,110,100, 95,109, 97,120, 95, 97,118,101, 0,108, 97,110,100, 95,112,101,114,115, +111,110, 97,108, 95,115,112, 97, 99,101, 0,108, 97,110,100, 95,115,116,105, 99,107, 95,102,111,114, 99,101, 0,115,116, 97,116, +101,115, 0, 42,115,109,100, 0, 42,102,108,117,105,100, 0, 42,102,108,117,105,100, 95,103,114,111,117,112, 0, 42, 99,111,108, +108, 95,103,114,111,117,112, 0, 42,119,116, 0, 42,116,101,120, 95,119,116, 0, 42,116,101,120, 95,115,104, 97,100,111,119, 0, + 42,115,104, 97,100,111,119, 0,112, 48, 91, 51, 93, 0,112, 49, 91, 51, 93, 0,100,120, 0,111,109,101,103, 97, 0,116,101,109, +112, 65,109, 98, 0, 98,101,116, 97, 0,114,101,115, 91, 51, 93, 0, 97,109,112,108,105,102,121, 0,109, 97,120,114,101,115, 0, +118,105,101,119,115,101,116,116,105,110,103,115, 0,110,111,105,115,101, 0,100,105,115,115, 95,112,101,114, 99,101,110,116, 0, +100,105,115,115, 95,115,112,101,101,100, 0,114,101,115, 95,119,116, 91, 51, 93, 0,100,120, 95,119,116, 0,118, 51,100,110,117, +109, 0, 42,112,111,105,110,116, 95, 99, 97, 99,104,101, 91, 50, 93, 0,112,116, 99, 97, 99,104,101,115, 91, 50, 93, 0,118,101, +108,111, 99,105,116,121, 91, 51, 93, 0,118,103,114,112, 95,104,101, 97,116, 95,115, 99, 97,108,101, 91, 50, 93, 0,118,103,114, +111,117,112, 95,102,108,111,119, 0,118,103,114,111,117,112, 95,100,101,110,115,105,116,121, 0,118,103,114,111,117,112, 95,104, +101, 97,116, 0, 42,112,111,105,110,116,115, 95,111,108,100, 0, 42,118,101,108, 0,109, 97,116, 95,111,108,100, 91, 52, 93, 91, + 52, 93, 0,110,117,109,112,111,105,110,116,115, 0, 0, 0, 0, 84, 89, 80, 69,182, 1, 0, 0, 99,104, 97,114, 0,117, 99,104, + 97,114, 0,115,104,111,114,116, 0,117,115,104,111,114,116, 0,105,110,116, 0,108,111,110,103, 0,117,108,111,110,103, 0,102, +108,111, 97,116, 0,100,111,117, 98,108,101, 0,118,111,105,100, 0, 76,105,110,107, 0, 76,105,110,107, 68, 97,116, 97, 0, 76, +105,115,116, 66, 97,115,101, 0,118,101, 99, 50,115, 0,118,101, 99, 50,105, 0,118,101, 99, 50,102, 0,118,101, 99, 50,100, 0, +118,101, 99, 51,105, 0,118,101, 99, 51,102, 0,118,101, 99, 51,100, 0,118,101, 99, 52,105, 0,118,101, 99, 52,102, 0,118,101, + 99, 52,100, 0,114, 99,116,105, 0,114, 99,116,102, 0, 73, 68, 80,114,111,112,101,114,116,121, 68, 97,116, 97, 0, 73, 68, 80, +114,111,112,101,114,116,121, 0, 73, 68, 0, 76,105, 98,114, 97,114,121, 0, 70,105,108,101, 68, 97,116, 97, 0, 80,114,101,118, +105,101,119, 73,109, 97,103,101, 0, 73,112,111, 68,114,105,118,101,114, 0, 79, 98,106,101, 99,116, 0, 73,112,111, 67,117,114, +118,101, 0, 66, 80,111,105,110,116, 0, 66,101,122, 84,114,105,112,108,101, 0, 73,112,111, 0, 75,101,121, 66,108,111, 99,107, + 0, 75,101,121, 0, 65,110,105,109, 68, 97,116, 97, 0, 84,101,120,116, 76,105,110,101, 0, 84,101,120,116, 77, 97,114,107,101, +114, 0, 84,101,120,116, 0, 80, 97, 99,107,101,100, 70,105,108,101, 0, 67, 97,109,101,114, 97, 0, 73,109, 97,103,101, 85,115, +101,114, 0, 83, 99,101,110,101, 0, 73,109, 97,103,101, 0, 71, 80, 85, 84,101,120,116,117,114,101, 0, 97,110,105,109, 0, 82, +101,110,100,101,114, 82,101,115,117,108,116, 0, 77, 84,101,120, 0, 84,101,120, 0, 80,108,117,103,105,110, 84,101,120, 0, 67, + 66, 68, 97,116, 97, 0, 67,111,108,111,114, 66, 97,110,100, 0, 69,110,118, 77, 97,112, 0, 73,109, 66,117,102, 0, 80,111,105, +110,116, 68,101,110,115,105,116,121, 0, 80, 97,114,116,105, 99,108,101, 83,121,115,116,101,109, 0, 86,111,120,101,108, 68, 97, +116, 97, 0, 98, 78,111,100,101, 84,114,101,101, 0, 84,101,120, 77, 97,112,112,105,110,103, 0, 76, 97,109,112, 0, 67,117,114, +118,101, 77, 97,112,112,105,110,103, 0, 87, 97,118,101, 0, 86,111,108,117,109,101, 83,101,116,116,105,110,103,115, 0, 77, 97, +116,101,114,105, 97,108, 0, 71,114,111,117,112, 0, 86, 70,111,110,116, 0, 86, 70,111,110,116, 68, 97,116, 97, 0, 77,101,116, + 97, 69,108,101,109, 0, 66,111,117,110,100, 66,111,120, 0, 77,101,116, 97, 66, 97,108,108, 0, 78,117,114, 98, 0, 67,104, 97, +114, 73,110,102,111, 0, 84,101,120,116, 66,111,120, 0, 67,117,114,118,101, 0, 80, 97,116,104, 0, 83,101,108, 66,111,120, 0, + 69,100,105,116, 70,111,110,116, 0, 77,101,115,104, 0, 77, 70, 97, 99,101, 0, 77, 84, 70, 97, 99,101, 0, 84, 70, 97, 99,101, + 0, 77, 86,101,114,116, 0, 77, 69,100,103,101, 0, 77, 68,101,102,111,114,109, 86,101,114,116, 0, 77, 67,111,108, 0, 77, 83, +116,105, 99,107,121, 0, 77, 83,101,108,101, 99,116, 0, 69,100,105,116, 77,101,115,104, 0, 67,117,115,116,111,109, 68, 97,116, + 97, 0, 77,117,108,116,105,114,101,115, 0, 80, 97,114,116,105, 97,108, 86,105,115,105, 98,105,108,105,116,121, 0, 77, 68,101, +102,111,114,109, 87,101,105,103,104,116, 0, 77, 84,101,120, 80,111,108,121, 0, 77, 76,111,111,112, 85, 86, 0, 77, 76,111,111, +112, 67,111,108, 0, 77, 70,108,111, 97,116, 80,114,111,112,101,114,116,121, 0, 77, 73,110,116, 80,114,111,112,101,114,116,121, + 0, 77, 83,116,114,105,110,103, 80,114,111,112,101,114,116,121, 0, 79,114,105,103, 83,112, 97, 99,101, 70, 97, 99,101, 0, 77, + 68,105,115,112,115, 0, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 69, 68, 71, 69, 68, 82, 65, 87, 32, 40, 49, 60, 60, 49, + 41, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 69, 65, 77, 32, 40, 49, 60, 60, 50, 41, 32, 35,100,101,102,105,110,101, + 32, 77, 69, 95, 70, 71, 79, 78, 32, 40, 49, 60, 60, 51, 41, 32, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 69, 68, 71, 69, + 82, 69, 78, 68, 69, 82, 32, 40, 49, 60, 60, 53, 41, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 76, 79, 79, 83, 69, 69, 68, + 71, 69, 32, 40, 49, 60, 60, 55, 41, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 69, 65, 77, 95, 76, 65, 83, 84, 32, 40, + 49, 60, 60, 56, 41, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 72, 65, 82, 80, 32, 40, 49, 60, 60, 57, 41, 32, 32, 32, + 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 49, 32, 49, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, + 76, 73, 80, 86, 50, 32, 50, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 51, 32, 52, 32, 35,100,101,102, +105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 52, 32, 56, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 80, 82, 79, 74, 88, + 89, 32, 49, 54, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 80, 82, 79, 74, 88, 90, 32, 51, 50, 32, 35,100,101,102,105,110, +101, 32, 77, 69, 95, 80, 82, 79, 74, 89, 90, 32, 54, 52, 32, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 49, 86, 50, 32, + 49, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 50, 86, 51, 32, 50, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, + 51, 86, 49, 32, 52, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 51, 86, 52, 32, 52, 32, 35,100,101,102,105,110,101, 32, + 77, 69, 95, 86, 52, 86, 49, 32, 56, 32, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 77, 79, 79, 84, 72, 32, 49, 32, 35, +100,101,102,105,110,101, 32, 77, 69, 95, 70, 65, 67, 69, 95, 83, 69, 76, 32, 50, 32, 32, 32, 35,100,101,102,105,110,101, 32, 77, + 69, 95, 86, 83, 69,108, 32, 48, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 69, 83, 69,108, 32, 49, 32, 35,100,101,102,105, +110,101, 32, 77, 69, 95, 70, 83, 69, 76, 32, 50, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 69, 67, 84, 32, + 49, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65, 67, 84, 73, 86, 69, 32, 50, 32, 32, 35,100,101,102,105,110,101, 32, + 84, 70, 95, 83, 69, 76, 49, 32, 52, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 50, 32, 56, 32, 35,100,101,102, +105,110,101, 32, 84, 70, 95, 83, 69, 76, 51, 32, 49, 54, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 52, 32, 51, + 50, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 72, 73, 68, 69, 32, 54, 52, 32, 32, 32, 35,100,101,102,105,110,101, 32, 84, + 70, 95, 68, 89, 78, 65, 77, 73, 67, 32, 49, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65, 76, 80, 72, 65, 83, 79, 82, 84, + 32, 50, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 84, 69, 88, 32, 52, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, + 72, 65, 82, 69, 68, 86, 69, 82, 84, 32, 56, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 76, 73, 71, 72, 84, 32, 49, 54, 32, + 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 72, 65, 82, 69, 68, 67, 79, 76, 32, 54, 52, 32, 35,100,101,102,105,110,101, 32, + 84, 70, 95, 84, 73, 76, 69, 83, 32, 49, 50, 56, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 66, 73, 76, 76, 66, 79, 65, + 82, 68, 32, 50, 53, 54, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 84, 87, 79, 83, 73, 68, 69, 32, 53, 49, 50, 32, 35,100, +101,102,105,110,101, 32, 84, 70, 95, 73, 78, 86, 73, 83, 73, 66, 76, 69, 32, 49, 48, 50, 52, 32, 35,100,101,102,105,110,101, 32, + 84, 70, 95, 79, 66, 67, 79, 76, 32, 50, 48, 52, 56, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 66, 73, 76, 76, 66, 79, 65, + 82, 68, 50, 32, 52, 48, 57, 54, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 72, 65, 68, 79, 87, 32, 56, 49, 57, 50, + 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 66, 77, 70, 79, 78, 84, 32, 49, 54, 51, 56, 52, 32, 32, 35,100,101,102,105,110, +101, 32, 84, 70, 95, 83, 79, 76, 73, 68, 32, 48, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65, 68, 68, 32, 49, 32, 35,100, +101,102,105,110,101, 32, 84, 70, 95, 65, 76, 80, 72, 65, 32, 50, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 67, 76, 73, 80, + 32, 52, 32, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 85, 66, 32, 51, 32, 32, 35,100,101,102,105,110,101, 32, 84, + 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 49, 32, 49, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, + 67, 65, 84, 69, 68, 50, 32, 50, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 51, 32, + 52, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 52, 32, 56, 32, 35,100,101,102,105, +110,101, 32, 84, 70, 95, 80, 73, 78, 49, 32, 49, 54, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 50, 32, 51, 50, + 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 51, 32, 54, 52, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, + 73, 78, 52, 32, 49, 50, 56, 32, 35,101,110,100,105,102, 77,117,108,116,105,114,101,115, 76,101,118,101,108, 59, 13, 10, 13, 10, +116,121,112,101,100,101,102, 32,115,116,114,117, 99,116, 32, 77,117,108,116,105,114,101,115, 32,123, 13, 10, 9, 76,105,115,116, + 66, 97,115,101, 32,108,101,118,101,108,115, 59, 13, 10, 9, 77, 86,101,114,116, 32, 42,118,101,114,116,115, 59, 13, 10, 13, 10, + 9,117,110,115,105,103,110,101,100, 32, 99,104, 97,114, 32,108,101,118,101,108, 95, 99,111,117,110,116, 44, 32, 99,117,114,114, +101,110,116, 44, 32,110,101,119,108,118,108, 44, 32,101,100,103,101,108,118,108, 44, 32,112,105,110,108,118,108, 44, 32,114,101, +110,100,101,114,108,118,108, 59, 13, 10, 9,117,110,115,105,103,110,101,100, 32, 99,104, 97,114, 32,117,115,101, 95, 99,111,108, + 44, 32,102,108, 97,103, 59, 13, 10, 13, 10, 9, 47, 42, 32, 83,112,101, 99,105, 97,108, 32,108,101,118,101,108, 32, 49, 32,100, + 97,116, 97, 32,116,104, 97,116, 32, 99, 97,110,110,111,116, 32, 98,101, 32,109,111,100,105,102,105,101,100, 32,102,114,111,109, + 32,111,116,104,101,114, 32,108,101,118,101,108,115, 32, 42, 47, 13, 10, 9, 67,117,115,116,111,109, 68, 97,116, 97, 32,118,100, + 97,116, 97, 59, 13, 10, 9, 67,117,115,116,111,109, 68, 97,116, 97, 32,102,100, 97,116, 97, 59, 13, 10, 9,115,104,111,114,116, + 32, 42,101,100,103,101, 95,102,108, 97,103,115, 59, 13, 10, 9, 99,104, 97,114, 32, 42,101,100,103,101, 95, 99,114,101, 97,115, +101,115, 59, 13, 10,125, 32, 77,117,108,116,105,114,101,115, 59, 13, 10, 13, 10, 47, 42, 42, 32, 69,110,100, 32, 77,117,108,116, +105,114,101,115, 32, 42, 42, 47, 13, 10, 13, 10,116,121,112,101,100,101,102, 32,115,116,114,117, 99,116, 32, 80, 97,114,116,105, + 97,108, 86,105,115,105, 98,105,108,105,116,121, 32,123, 13, 10, 9,117,110,115,105,103,110,101,100, 32,105,110,116, 32, 42,118, +101,114,116, 95,109, 97,112, 59, 32, 47, 42, 32,118,101,114,116, 95,109, 97,112, 91, 79,108,100, 32, 73,110,100,101,120, 93, 61, + 32, 78,101,119, 32, 73,110,100,101,120, 32, 42, 47, 13, 10, 9,105,110,116, 32, 42,101,100,103,101, 95,109, 97,112, 59, 32, 47, + 42, 32,101,100,103,101, 95,109, 97,112, 91, 79,108,100, 32, 73,110,100,101,120, 93, 61, 32, 78,101,119, 32, 73,110,100,101,120, + 44, 32, 45, 49, 61, 32,104,105,100,100,101,110, 32, 42, 47, 13, 10, 9, 77, 70, 97, 99,101, 32, 42,111,108,100, 95,102, 97, 99, +101,115, 59, 13, 10, 9, 77, 69,100,103,101, 32, 42,111,108,100, 95,101,100,103,101,115, 59, 13, 10, 9,117,110,115,105,103,110, +101,100, 32,105,110,116, 32,116,111,116,102, 97, 99,101, 44, 32,116,111,116,101,100,103,101, 44, 32,116,111,116,118,101,114,116, + 44, 32,112, 97,100, 59, 13, 10,125, 32, 80, 97,114,116,105, 97,108, 86,105,115,105, 98,105,108,105,116,121, 59, 13, 10, 13, 10, + 47, 42, 32,109,118,101,114,116, 45, 62,102,108, 97,103, 32, 40, 49, 61, 83, 69, 76, 69, 67, 84, 41, 32, 42, 47, 13, 10, 35,100, +101,102,105,110,101, 32, 77, 69, 95, 83, 80, 72, 69, 82, 69, 84, 69, 83, 84, 9, 50, 13, 10, 35,100,101,102,105,110,101, 32, 77, + 69, 95, 83, 80, 72, 69, 82, 69, 84, 69, 77, 80, 9, 52, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 72, 73, 68, 69, 9, + 9, 9, 49, 54, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 69, 82, 84, 95, 77, 69, 82, 71, 69, 68, 9, 9, 40, 49, + 60, 60, 54, 41, 13, 10, 13, 10, 47, 42, 32,109,101,100,103,101, 45, 62,102,108, 97,103, 32, 40, 49, 61, 83, 69, 76, 69, 67, 84, + 41, 42, 47, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 69, 68, 71, 69, 68, 82, 65, 87, 9, 9, 9, 40, 49, 60, 60, 49, + 41, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 69, 65, 77, 9, 9, 9, 9, 40, 49, 60, 60, 50, 41, 13, 10, 35,100, +101,102,105,110,101, 32, 77, 69, 95, 70, 71, 79, 78, 9, 9, 9, 9, 40, 49, 60, 60, 51, 41, 13, 10, 9, 9, 9, 9, 9, 9, 47, + 42, 32,114,101,115,101,114,118,101, 32, 49, 54, 32,102,111,114, 32, 77, 69, 95, 72, 73, 68, 69, 32, 42, 47, 13, 10, 35,100,101, +102,105,110,101, 32, 77, 69, 95, 69, 68, 71, 69, 82, 69, 78, 68, 69, 82, 9, 9, 40, 49, 60, 60, 53, 41, 13, 10, 35,100,101,102, +105,110,101, 32, 77, 69, 95, 76, 79, 79, 83, 69, 69, 68, 71, 69, 9, 9, 40, 49, 60, 60, 55, 41, 13, 10, 35,100,101,102,105,110, +101, 32, 77, 69, 95, 83, 69, 65, 77, 95, 76, 65, 83, 84, 9, 9, 40, 49, 60, 60, 56, 41, 13, 10, 35,100,101,102,105,110,101, 32, + 77, 69, 95, 83, 72, 65, 82, 80, 9, 9, 9, 40, 49, 60, 60, 57, 41, 13, 10, 13, 10, 47, 42, 32,112,117,110,111, 32, 61, 32,118, +101,114,116,101,120,110,111,114,109, 97,108, 32, 40,109,102, 97, 99,101, 41, 32, 42, 47, 13, 10, 47, 42, 32,114,101,110,100,101, +114, 32, 97,115,115,117,109,101,115, 32,102,108,105,112,115, 32,116,111, 32, 98,101, 32,111,114,100,101,114,101,100, 32,108,105, +107,101, 32,116,104,105,115, 32, 42, 47, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 49, 9, 9, 49, + 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 50, 9, 9, 50, 13, 10, 35,100,101,102,105,110,101, 32, + 77, 69, 95, 70, 76, 73, 80, 86, 51, 9, 9, 52, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 52, 9, + 9, 56, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 80, 82, 79, 74, 88, 89, 9, 9, 49, 54, 13, 10, 35,100,101,102,105, +110,101, 32, 77, 69, 95, 80, 82, 79, 74, 88, 90, 9, 9, 51, 50, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 80, 82, 79, + 74, 89, 90, 9, 9, 54, 52, 13, 10, 13, 10, 47, 42, 32,101,100, 99,111,100,101, 32, 40,109,102, 97, 99,101, 41, 32, 42, 47, 13, + 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 49, 86, 50, 9, 9, 9, 49, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, + 95, 86, 50, 86, 51, 9, 9, 9, 50, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 51, 86, 49, 9, 9, 9, 52, 13, 10, + 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 51, 86, 52, 9, 9, 9, 52, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, + 86, 52, 86, 49, 9, 9, 9, 56, 13, 10, 13, 10, 47, 42, 32,102,108, 97,103, 32, 40,109,102, 97, 99,101, 41, 32, 42, 47, 13, 10, + 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 77, 79, 79, 84, 72, 9, 9, 9, 49, 13, 10, 35,100,101,102,105,110,101, 32, 77, + 69, 95, 70, 65, 67, 69, 95, 83, 69, 76, 9, 9, 9, 50, 13, 10, 9, 9, 9, 9, 9, 9, 47, 42, 32,102,108, 97,103, 32, 77, 69, + 95, 72, 73, 68, 69, 61, 61, 49, 54, 32,105,115, 32,117,115,101,100, 32,104,101,114,101, 32,116,111,111, 32, 42, 47, 32, 13, 10, + 47, 42, 32,109,115,101,108,101, 99,116, 45, 62,116,121,112,101, 32, 42, 47, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, + 86, 83, 69,108, 9, 48, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 69, 83, 69,108, 32, 49, 13, 10, 35,100,101,102,105, +110,101, 32, 77, 69, 95, 70, 83, 69, 76, 32, 50, 13, 10, 13, 10, 47, 42, 32,109,116,102, 97, 99,101, 45, 62,102,108, 97,103, 32, + 42, 47, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 69, 67, 84, 9, 49, 32, 47, 42, 32,117,115,101, 32, 77, + 70, 97, 99,101, 32,104,105,100,101, 32,102,108, 97,103, 32, 40, 97,102,116,101,114, 32, 50, 46, 52, 51, 41, 44, 32,115,104,111, +117,108,100, 32, 98,101, 32, 97, 98,108,101, 32,116,111, 32,114,101,117,115,101, 32, 97,102,116,101,114, 32, 50, 46, 52, 52, 32, + 42, 47, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65, 67, 84, 73, 86, 69, 9, 50, 32, 47, 42, 32,100,101,112,114,101, + 99, 97,116,101,100, 33, 32, 42, 47, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 49, 9, 9, 52, 13, 10, 35, +100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 50, 9, 9, 56, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, + 76, 51, 9, 9, 49, 54, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 52, 9, 9, 51, 50, 13, 10, 35,100,101, +102,105,110,101, 32, 84, 70, 95, 72, 73, 68, 69, 9, 9, 54, 52, 32, 47, 42, 32,117,110,117,115,101,100, 44, 32,115, 97,109,101, + 32, 97,115, 32, 84, 70, 95, 83, 69, 76, 69, 67, 84, 32, 42, 47, 13, 10, 13, 10, 47, 42, 32,109,116,102, 97, 99,101, 45, 62,109, +111,100,101, 32, 42, 47, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 89, 78, 65, 77, 73, 67, 9, 9, 49, 13, 10, 35, +100,101,102,105,110,101, 32, 84, 70, 95, 65, 76, 80, 72, 65, 83, 79, 82, 84, 9, 50, 13, 10, 35,100,101,102,105,110,101, 32, 84, + 70, 95, 84, 69, 88, 9, 9, 9, 52, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 72, 65, 82, 69, 68, 86, 69, 82, 84, + 9, 56, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 76, 73, 71, 72, 84, 9, 9, 49, 54, 13, 10, 13, 10, 35,100,101,102, +105,110,101, 32, 84, 70, 95, 83, 72, 65, 82, 69, 68, 67, 79, 76, 9, 54, 52, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, + 84, 73, 76, 69, 83, 9, 9, 49, 50, 56, 9, 9, 47, 42, 32,100,101,112,114,101, 99, 97,116,101,100, 32, 42, 47, 13, 10, 35,100, +101,102,105,110,101, 32, 84, 70, 95, 66, 73, 76, 76, 66, 79, 65, 82, 68, 9, 50, 53, 54, 13, 10, 35,100,101,102,105,110,101, 32, + 84, 70, 95, 84, 87, 79, 83, 73, 68, 69, 9, 9, 53, 49, 50, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 73, 78, 86, 73, + 83, 73, 66, 76, 69, 9, 49, 48, 50, 52, 13, 10, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 79, 66, 67, 79, 76, 9, 9, + 50, 48, 52, 56, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 66, 73, 76, 76, 66, 79, 65, 82, 68, 50, 9, 52, 48, 57, 54, + 9, 47, 42, 32,119,105,116,104, 32, 90, 32, 97,120,105,115, 32, 99,111,110,115,116,114, 97,105,110,116, 32, 42, 47, 13, 10, 35, +100,101,102,105,110,101, 32, 84, 70, 95, 83, 72, 65, 68, 79, 87, 9, 9, 56, 49, 57, 50, 13, 10, 35,100,101,102,105,110,101, 32, + 84, 70, 95, 66, 77, 70, 79, 78, 84, 9, 9, 49, 54, 51, 56, 52, 13, 10, 13, 10, 47, 42, 32,109,116,102, 97, 99,101, 45, 62,116, +114, 97,110,115,112, 44, 32,118, 97,108,117,101,115, 32, 49, 45, 52, 32, 97,114,101, 32,117,115,101,100, 32, 97,115, 32,102,108, + 97,103,115, 32,105,110, 32,116,104,101, 32, 71, 76, 44, 32, 87, 65, 82, 78, 73, 78, 71, 44, 32, 84, 70, 95, 83, 85, 66, 32, 99, + 97,110,116, 32,119,111,114,107, 32,119,105,116,104, 32,116,104,105,115, 32, 42, 47, 13, 10, 35,100,101,102,105,110,101, 32, 84, + 70, 95, 83, 79, 76, 73, 68, 9, 48, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65, 68, 68, 9, 9, 49, 13, 10, 35,100, +101,102,105,110,101, 32, 84, 70, 95, 65, 76, 80, 72, 65, 9, 50, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 67, 76, 73, + 80, 9, 9, 52, 32, 47, 42, 32, 99,108,105,112,109, 97,112, 32, 97,108,112,104, 97, 47, 98,105,110, 97,114,121, 32, 97,108,112, +104, 97, 32, 97,108,108, 32,111,114, 32,110,111,116,104,105,110,103, 33, 32, 42, 47, 13, 10, 13, 10, 47, 42, 32,115,117, 98, 32, +105,115, 32,110,111,116, 32, 97,118, 97,105,108, 97, 98,108,101, 32,105,110, 32,116,104,101, 32,117,115,101,114, 32,105,110,116, +101,114,102, 97, 99,101, 32, 97,110,121,109,111,114,101, 32, 42, 47, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 85, + 66, 9, 9, 51, 13, 10, 13, 10, 13, 10, 47, 42, 32,109,116,102, 97, 99,101, 45, 62,117,110,119,114, 97,112, 32, 42, 47, 13, 10, + 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 49, 9, 49, 13, 10, 35,100,101,102,105,110, +101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 50, 9, 50, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, + 69, 80, 82, 69, 67, 65, 84, 69, 68, 51, 9, 52, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, + 84, 69, 68, 52, 9, 56, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 49, 9, 9, 32, 32, 32, 32, 49, 54, 13, + 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 50, 9, 9, 32, 32, 32, 32, 51, 50, 13, 10, 35,100,101,102,105,110, +101, 32, 84, 70, 95, 80, 73, 78, 51, 9, 32, 32, 32, 9, 9, 54, 52, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, + 78, 52, 9, 32, 32, 32, 32, 9, 49, 50, 56, 13, 10, 13, 10, 35,101,110,100,105,102, 13, 10,104, 79, 67, 75, 33,109, 98,101,114, + 97, 2, 67, 3,191, 16, 8, 1,232, 80,100, 0, 77,117,108,116,105,114,101,115, 67,111,108, 0, 77,117,108,116,105,114,101,115, + 67,111,108, 70, 97, 99,101, 0, 77,117,108,116,105,114,101,115, 70, 97, 99,101, 0, 77,117,108,116,105,114,101,115, 69,100,103, +101, 0, 77,117,108,116,105,114,101,115, 76,101,118,101,108, 0, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,117, 98, +115,117,114,102, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 76, 97,116,116,105, 99,101, 77,111,100,105,102,105,101,114, + 68, 97,116, 97, 0, 67,117,114,118,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 66,117,105,108,100, 77,111,100,105, +102,105,101,114, 68, 97,116, 97, 0, 77, 97,115,107, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 65,114,114, 97,121, 77, +111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77,105,114,114,111,114, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 69, +100,103,101, 83,112,108,105,116, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 66,101,118,101,108, 77,111,100,105,102,105, +101,114, 68, 97,116, 97, 0, 66, 77,101,115,104, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,109,111,107,101, 77,111, +100,105,102,105,101,114, 68, 97,116, 97, 0, 83,109,111,107,101, 68,111,109, 97,105,110, 83,101,116,116,105,110,103,115, 0, 83, +109,111,107,101, 70,108,111,119, 83,101,116,116,105,110,103,115, 0, 83,109,111,107,101, 67,111,108,108, 83,101,116,116,105,110, +103,115, 0, 68,105,115,112,108, 97, 99,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 85, 86, 80,114,111,106,101, 99, 116, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 68,101, 99,105,109, 97,116,101, 77,111,100,105,102,105,101,114, 68, 97, 116, 97, 0, 83,109,111,111,116,104, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 67, 97,115,116, 77,111,100,105,102,105, 101,114, 68, 97,116, 97, 0, 87, 97,118,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 65,114,109, 97,116,117,114,101, @@ -2206,749 +2366,778 @@ char datatoc_B_blend[]= { 111,109, 77,101,115,104, 0, 66,111,111,108,101, 97,110, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77, 68,101,102, 73, 110,102,108,117,101,110, 99,101, 0, 77, 68,101,102, 67,101,108,108, 0, 77,101,115,104, 68,101,102,111,114,109, 77,111,100,105, 102,105,101,114, 68, 97,116, 97, 0, 80, 97,114,116,105, 99,108,101, 83,121,115,116,101,109, 77,111,100,105,102,105,101,114, 68, - 97,116, 97, 0, 80, 97,114,116,105, 99,108,101, 83,121,115,116,101,109, 0, 80, 97,114,116,105, 99,108,101, 73,110,115,116, 97, -110, 99,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 69,120,112,108,111,100,101, 77,111,100,105,102,105,101,114, 68, - 97,116, 97, 0, 77,117,108,116,105,114,101,115, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 70,108,117,105,100,115,105, -109, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 70,108,117,105,100,115,105,109, 83,101,116,116,105,110,103,115, 0, 83, -104,114,105,110,107,119,114, 97,112, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,105,109,112,108,101, 68,101,102,111, -114,109, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 76, 97,116,116,105, 99,101, 0, 98, 68,101,102,111,114,109, 71,114, -111,117,112, 0, 98, 65, 99,116,105,111,110, 0, 98, 80,111,115,101, 0, 66,117,108,108,101,116, 83,111,102,116, 66,111,100,121, - 0, 80, 97,114,116, 68,101,102,108,101, 99,116, 0, 83,111,102,116, 66,111,100,121, 0, 79, 98, 72,111,111,107, 0, 82, 78, 71, - 0, 80, 84, 67, 97, 99,104,101, 77,101,109, 0, 83, 66, 86,101,114,116,101,120, 0, 66,111,100,121, 80,111,105,110,116, 0, 66, -111,100,121, 83,112,114,105,110,103, 0, 83, 66, 83, 99,114, 97,116, 99,104, 0, 87,111,114,108,100, 0, 66, 97,115,101, 0, 65, -118,105, 67,111,100,101, 99, 68, 97,116, 97, 0, 81,117,105, 99,107,116,105,109,101, 67,111,100,101, 99, 68, 97,116, 97, 0, 70, - 70, 77,112,101,103, 67,111,100,101, 99, 68, 97,116, 97, 0, 65,117,100,105,111, 68, 97,116, 97, 0, 83, 99,101,110,101, 82,101, -110,100,101,114, 76, 97,121,101,114, 0, 82,101,110,100,101,114, 68, 97,116, 97, 0, 82,101,110,100,101,114, 80,114,111,102,105, -108,101, 0, 71, 97,109,101, 68,111,109,101, 0, 71, 97,109,101, 70,114, 97,109,105,110,103, 0, 71, 97,109,101, 68, 97,116, 97, - 0, 84,105,109,101, 77, 97,114,107,101,114, 0, 73,109, 97,103,101, 80, 97,105,110,116, 83,101,116,116,105,110,103,115, 0, 66, -114,117,115,104, 0, 80, 97,114,116,105, 99,108,101, 66,114,117,115,104, 68, 97,116, 97, 0, 80, 97,114,116,105, 99,108,101, 69, -100,105,116, 83,101,116,116,105,110,103,115, 0, 84,114, 97,110,115,102,111,114,109, 79,114,105,101,110,116, 97,116,105,111,110, - 0, 83, 99,117,108,112,116, 0, 83, 99,117,108,112,116, 83,101,115,115,105,111,110, 0, 86, 80, 97,105,110,116, 0, 84,111,111, -108, 83,101,116,116,105,110,103,115, 0, 98, 83,116, 97,116,115, 0, 69,100,105,116,105,110,103, 0, 83, 99,101,110,101, 83,116, - 97,116,115, 0, 68, 97,103, 70,111,114,101,115,116, 0, 66, 71,112,105, 99, 0, 82,101,103,105,111,110, 86,105,101,119, 51, 68, - 0, 98, 71, 80,100, 97,116, 97, 0, 82,101,110,100,101,114, 73,110,102,111, 0, 82,101,116,111,112,111, 86,105,101,119, 68, 97, -116, 97, 0, 86,105,101,119, 68,101,112,116,104,115, 0, 83,109,111,111,116,104, 86,105,101,119, 83,116,111,114,101, 0,119,109, - 84,105,109,101,114, 0, 86,105,101,119, 51, 68, 0, 83,112, 97, 99,101, 76,105,110,107, 0, 86,105,101,119, 50, 68, 0, 83,112, - 97, 99,101, 73,110,102,111, 0, 98, 83, 99,114,101,101,110, 0, 83,112, 97, 99,101, 73,112,111, 0, 98, 68,111,112,101, 83,104, -101,101,116, 0, 83,112, 97, 99,101, 66,117,116,115, 0, 83,112, 97, 99,101, 83,101,113, 0, 70,105,108,101, 83,101,108,101, 99, -116, 80, 97,114, 97,109,115, 0, 83,112, 97, 99,101, 70,105,108,101, 0, 70,105,108,101, 76,105,115,116, 0,119,109, 79,112,101, -114, 97,116,111,114, 0, 70,105,108,101, 76, 97,121,111,117,116, 0, 83,112, 97, 99,101, 79,111,112,115, 0, 84,114,101,101, 83, -116,111,114,101, 0, 84,114,101,101, 83,116,111,114,101, 69,108,101,109, 0, 83,112, 97, 99,101, 73,109, 97,103,101, 0, 83,112, - 97, 99,101, 78,108, 97, 0, 83,112, 97, 99,101, 84,101,120,116, 0, 83, 99,114,105,112,116, 0, 83,112, 97, 99,101, 83, 99,114, -105,112,116, 0, 83,112, 97, 99,101, 84,105,109,101, 0, 83,112, 97, 99,101, 78,111,100,101, 0, 83,112, 97, 99,101, 76,111,103, -105, 99, 0, 83,112, 97, 99,101, 73,109, 97, 83,101,108, 0, 67,111,110,115,111,108,101, 76,105,110,101, 0, 83,112, 97, 99,101, - 67,111,110,115,111,108,101, 0,117,105, 70,111,110,116, 0,117,105, 70,111,110,116, 83,116,121,108,101, 0,117,105, 83,116,121, -108,101, 0,117,105, 87,105,100,103,101,116, 67,111,108,111,114,115, 0,117,105, 87,105,100,103,101,116, 83,116, 97,116,101, 67, -111,108,111,114,115, 0, 84,104,101,109,101, 85, 73, 0, 84,104,101,109,101, 83,112, 97, 99,101, 0, 84,104,101,109,101, 87,105, -114,101, 67,111,108,111,114, 0, 98, 84,104,101,109,101, 0, 83,111,108,105,100, 76,105,103,104,116, 0, 85,115,101,114, 68,101, -102, 0, 83, 99,114, 86,101,114,116, 0, 83, 99,114, 69,100,103,101, 0, 80, 97,110,101,108, 0, 80, 97,110,101,108, 84,121,112, -101, 0,117,105, 76, 97,121,111,117,116, 0, 83, 99,114, 65,114,101, 97, 0, 83,112, 97, 99,101, 84,121,112,101, 0, 65, 82,101, -103,105,111,110, 0, 65, 82,101,103,105,111,110, 84,121,112,101, 0, 70,105,108,101, 71,108,111, 98, 97,108, 0, 83,116,114,105, -112, 69,108,101,109, 0, 84, 83,116,114,105,112, 69,108,101,109, 0, 83,116,114,105,112, 67,114,111,112, 0, 83,116,114,105,112, - 84,114, 97,110,115,102,111,114,109, 0, 83,116,114,105,112, 67,111,108,111,114, 66, 97,108, 97,110, 99,101, 0, 83,116,114,105, -112, 80,114,111,120,121, 0, 83,116,114,105,112, 0, 80,108,117,103,105,110, 83,101,113, 0, 83,101,113,117,101,110, 99,101, 0, - 98, 83,111,117,110,100, 0,104,100, 97,117,100,105,111, 0, 77,101,116, 97, 83,116, 97, 99,107, 0, 87,105,112,101, 86, 97,114, -115, 0, 71,108,111,119, 86, 97,114,115, 0, 84,114, 97,110,115,102,111,114,109, 86, 97,114,115, 0, 83,111,108,105,100, 67,111, -108,111,114, 86, 97,114,115, 0, 83,112,101,101,100, 67,111,110,116,114,111,108, 86, 97,114,115, 0, 69,102,102,101, 99,116, 0, - 66,117,105,108,100, 69,102,102, 0, 80, 97,114,116, 69,102,102, 0, 80, 97,114,116,105, 99,108,101, 0, 87, 97,118,101, 69,102, -102, 0, 98, 80,114,111,112,101,114,116,121, 0, 98, 78,101, 97,114, 83,101,110,115,111,114, 0, 98, 77,111,117,115,101, 83,101, -110,115,111,114, 0, 98, 84,111,117, 99,104, 83,101,110,115,111,114, 0, 98, 75,101,121, 98,111, 97,114,100, 83,101,110,115,111, -114, 0, 98, 80,114,111,112,101,114,116,121, 83,101,110,115,111,114, 0, 98, 65, 99,116,117, 97,116,111,114, 83,101,110,115,111, -114, 0, 98, 68,101,108, 97,121, 83,101,110,115,111,114, 0, 98, 67,111,108,108,105,115,105,111,110, 83,101,110,115,111,114, 0, - 98, 82, 97,100, 97,114, 83,101,110,115,111,114, 0, 98, 82, 97,110,100,111,109, 83,101,110,115,111,114, 0, 98, 82, 97,121, 83, -101,110,115,111,114, 0, 98, 77,101,115,115, 97,103,101, 83,101,110,115,111,114, 0, 98, 83,101,110,115,111,114, 0, 98, 67,111, -110,116,114,111,108,108,101,114, 0, 98, 74,111,121,115,116,105, 99,107, 83,101,110,115,111,114, 0, 98, 69,120,112,114,101,115, -115,105,111,110, 67,111,110,116, 0, 98, 80,121,116,104,111,110, 67,111,110,116, 0, 98, 65, 99,116,117, 97,116,111,114, 0, 98, - 65,100,100, 79, 98,106,101, 99,116, 65, 99,116,117, 97,116,111,114, 0, 98, 65, 99,116,105,111,110, 65, 99,116,117, 97,116,111, -114, 0, 98, 83,111,117,110,100, 65, 99,116,117, 97,116,111,114, 0, 98, 67, 68, 65, 99,116,117, 97,116,111,114, 0, 98, 69,100, -105,116, 79, 98,106,101, 99,116, 65, 99,116,117, 97,116,111,114, 0, 98, 83, 99,101,110,101, 65, 99,116,117, 97,116,111,114, 0, - 98, 80,114,111,112,101,114,116,121, 65, 99,116,117, 97,116,111,114, 0, 98, 79, 98,106,101, 99,116, 65, 99,116,117, 97,116,111, -114, 0, 98, 73,112,111, 65, 99,116,117, 97,116,111,114, 0, 98, 67, 97,109,101,114, 97, 65, 99,116,117, 97,116,111,114, 0, 98, - 67,111,110,115,116,114, 97,105,110,116, 65, 99,116,117, 97,116,111,114, 0, 98, 71,114,111,117,112, 65, 99,116,117, 97,116,111, -114, 0, 98, 82, 97,110,100,111,109, 65, 99,116,117, 97,116,111,114, 0, 98, 77,101,115,115, 97,103,101, 65, 99,116,117, 97,116, -111,114, 0, 98, 71, 97,109,101, 65, 99,116,117, 97,116,111,114, 0, 98, 86,105,115,105, 98,105,108,105,116,121, 65, 99,116,117, - 97,116,111,114, 0, 98, 84,119,111, 68, 70,105,108,116,101,114, 65, 99,116,117, 97,116,111,114, 0, 98, 80, 97,114,101,110,116, - 65, 99,116,117, 97,116,111,114, 0, 98, 83,116, 97,116,101, 65, 99,116,117, 97,116,111,114, 0, 70,114,101,101, 67, 97,109,101, -114, 97, 0, 98, 83, 97,109,112,108,101, 0, 98, 83,111,117,110,100, 76,105,115,116,101,110,101,114, 0, 83,112, 97, 99,101, 83, -111,117,110,100, 0, 71,114,111,117,112, 79, 98,106,101, 99,116, 0, 66,111,110,101, 0, 98, 65,114,109, 97,116,117,114,101, 0, - 98, 80,111,115,101, 67,104, 97,110,110,101,108, 0, 98, 65, 99,116,105,111,110, 71,114,111,117,112, 0, 83,112, 97, 99,101, 65, - 99,116,105,111,110, 0, 98, 65, 99,116,105,111,110, 67,104, 97,110,110,101,108, 0, 98, 67,111,110,115,116,114, 97,105,110,116, - 67,104, 97,110,110,101,108, 0, 98, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 67,111,110,115,116,114, 97,105,110,116, 84, - 97,114,103,101,116, 0, 98, 80,121,116,104,111,110, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 75,105,110,101,109, 97,116, -105, 99, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 84,114, 97, 99,107, 84,111, 67,111,110,115,116,114, 97,105,110,116, 0, - 98, 82,111,116, 97,116,101, 76,105,107,101, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 76,111, 99, 97,116,101, 76,105,107, -101, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 77,105,110, 77, 97,120, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83, -105,122,101, 76,105,107,101, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 65, 99,116,105,111,110, 67,111,110,115,116,114, 97, -105,110,116, 0, 98, 76,111, 99,107, 84,114, 97, 99,107, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 70,111,108,108,111,119, - 80, 97,116,104, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83,116,114,101,116, 99,104, 84,111, 67,111,110,115,116,114, 97, -105,110,116, 0, 98, 82,105,103,105,100, 66,111,100,121, 74,111,105,110,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 67, -108, 97,109,112, 84,111, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 67,104,105,108,100, 79,102, 67,111,110,115,116,114, 97, -105,110,116, 0, 98, 84,114, 97,110,115,102,111,114,109, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 76,111, 99, 76,105,109, -105,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 82,111,116, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,116, - 0, 98, 83,105,122,101, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 68,105,115,116, 76,105,109,105,116, - 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83,104,114,105,110,107,119,114, 97,112, 67,111,110,115,116,114, 97,105,110,116, - 0, 98, 65, 99,116,105,111,110, 77,111,100,105,102,105,101,114, 0, 98, 65, 99,116,105,111,110, 83,116,114,105,112, 0, 98, 78, -111,100,101, 83,116, 97, 99,107, 0, 98, 78,111,100,101, 83,111, 99,107,101,116, 0, 98, 78,111,100,101, 76,105,110,107, 0, 98, - 78,111,100,101, 0, 98, 78,111,100,101, 80,114,101,118,105,101,119, 0, 98, 78,111,100,101, 84,121,112,101, 0, 78,111,100,101, - 73,109, 97,103,101, 65,110,105,109, 0, 78,111,100,101, 66,108,117,114, 68, 97,116, 97, 0, 78,111,100,101, 68, 66,108,117,114, - 68, 97,116, 97, 0, 78,111,100,101, 66,105,108, 97,116,101,114, 97,108, 66,108,117,114, 68, 97,116, 97, 0, 78,111,100,101, 72, -117,101, 83, 97,116, 0, 78,111,100,101, 73,109, 97,103,101, 70,105,108,101, 0, 78,111,100,101, 67,104,114,111,109, 97, 0, 78, -111,100,101, 84,119,111, 88, 89,115, 0, 78,111,100,101, 84,119,111, 70,108,111, 97,116,115, 0, 78,111,100,101, 71,101,111,109, -101,116,114,121, 0, 78,111,100,101, 86,101,114,116,101,120, 67,111,108, 0, 78,111,100,101, 68,101,102,111, 99,117,115, 0, 78, -111,100,101, 83, 99,114,105,112,116, 68,105, 99,116, 0, 78,111,100,101, 71,108, 97,114,101, 0, 78,111,100,101, 84,111,110,101, -109, 97,112, 0, 78,111,100,101, 76,101,110,115, 68,105,115,116, 0, 84,101,120, 78,111,100,101, 79,117,116,112,117,116, 0, 67, -117,114,118,101, 77, 97,112, 80,111,105,110,116, 0, 67,117,114,118,101, 77, 97,112, 0, 66,114,117,115,104, 67,108,111,110,101, - 0, 67,117,115,116,111,109, 68, 97,116, 97, 76, 97,121,101,114, 0, 72, 97,105,114, 75,101,121, 0, 80, 97,114,116,105, 99,108, -101, 75,101,121, 0, 67,104,105,108,100, 80, 97,114,116,105, 99,108,101, 0, 80, 97,114,116,105, 99,108,101, 84, 97,114,103,101, -116, 0, 80, 97,114,116,105, 99,108,101, 68, 97,116, 97, 0, 66,111,105,100, 68, 97,116, 97, 0, 80, 97,114,116,105, 99,108,101, - 83,101,116,116,105,110,103,115, 0, 66,111,105,100, 83,101,116,116,105,110,103,115, 0, 80, 97,114,116,105, 99,108,101, 69,100, -105,116, 0, 80, 97,114,116,105, 99,108,101, 67, 97, 99,104,101, 75,101,121, 0, 75, 68, 84,114,101,101, 0, 76,105,110,107, 78, -111,100,101, 0, 98, 71, 80, 68,115,112,111,105,110,116, 0, 98, 71, 80, 68,115,116,114,111,107,101, 0, 98, 71, 80, 68,102,114, - 97,109,101, 0, 98, 71, 80, 68,108, 97,121,101,114, 0, 82,101,112,111,114,116, 0, 82,101,112,111,114,116, 76,105,115,116, 0, -119,109, 87,105,110,100,111,119, 77, 97,110, 97,103,101,114, 0,119,109, 87,105,110,100,111,119, 0,119,109, 69,118,101,110,116, - 0,119,109, 83,117, 98, 87,105,110,100,111,119, 0,119,109, 71,101,115,116,117,114,101, 0,119,109, 75,101,121,109, 97,112, 73, -116,101,109, 0, 80,111,105,110,116,101,114, 82, 78, 65, 0,119,109, 75,101,121, 77, 97,112, 0,119,109, 79,112,101,114, 97,116, -111,114, 84,121,112,101, 0, 70, 77,111,100,105,102,105,101,114, 0, 70, 77,111,100, 95, 71,101,110,101,114, 97,116,111,114, 0, - 70, 77,111,100, 95, 70,117,110, 99,116,105,111,110, 71,101,110,101,114, 97,116,111,114, 0, 70, 67, 77, 95, 69,110,118,101,108, -111,112,101, 68, 97,116, 97, 0, 70, 77,111,100, 95, 69,110,118,101,108,111,112,101, 0, 70, 77,111,100, 95, 67,121, 99,108,101, -115, 0, 70, 77,111,100, 95, 80,121,116,104,111,110, 0, 70, 77,111,100, 95, 76,105,109,105,116,115, 0, 70, 77,111,100, 95, 78, -111,105,115,101, 0, 68,114,105,118,101,114, 84, 97,114,103,101,116, 0, 67,104, 97,110,110,101,108, 68,114,105,118,101,114, 0, - 70, 80,111,105,110,116, 0, 70, 67,117,114,118,101, 0, 65,110,105,109, 77, 97,112, 80, 97,105,114, 0, 65,110,105,109, 77, 97, -112,112,101,114, 0, 78,108, 97, 83,116,114,105,112, 0, 78,108, 97, 84,114, 97, 99,107, 0, 75, 83, 95, 80, 97,116,104, 0, 75, -101,121,105,110,103, 83,101,116, 0, 65,110,105,109, 79,118,101,114,114,105,100,101, 0, 73,100, 65,100,116, 84,101,109,112,108, - 97,116,101, 0, 66,111,105,100, 82,117,108,101, 0, 66,111,105,100, 82,117,108,101, 71,111, 97,108, 65,118,111,105,100, 0, 66, -111,105,100, 82,117,108,101, 65,118,111,105,100, 67,111,108,108,105,115,105,111,110, 0, 66,111,105,100, 82,117,108,101, 70,111, -108,108,111,119, 76,101, 97,100,101,114, 0, 66,111,105,100, 82,117,108,101, 65,118,101,114, 97,103,101, 83,112,101,101,100, 0, - 66,111,105,100, 82,117,108,101, 70,105,103,104,116, 0, 66,111,105,100, 83,116, 97,116,101, 0, 84, 76, 69, 78, 1, 0, 1, 0, - 2, 0, 2, 0, 4, 0, 4, 0, 4, 0, 4, 0, 8, 0, 0, 0, 16, 0, 24, 0, 16, 0, 4, 0, 8, 0, 8, 0, 16, 0, 12, 0, - 12, 0, 24, 0, 16, 0, 16, 0, 32, 0, 16, 0, 16, 0, 32, 0, 96, 0, 72, 0, 72, 2, 0, 0, 40, 0,144, 0, 40, 4,112, 0, - 36, 0, 56, 0,112, 0,128, 0,168, 0, 88, 0, 40, 0, 48, 0,176, 0, 16, 0,152, 0, 40, 0,192, 5,184, 1, 0, 0, 0, 0, - 0, 0,144, 0, 88, 1,120, 1, 24, 0, 8, 3,200, 0, 0, 0,232, 0,136, 0,232, 1, 56, 1, 80, 0,224, 2,104, 0, 88, 1, - 0, 0,128, 0,104, 0,200, 0, 80, 0, 8, 0, 16, 0,200, 1, 0, 0, 0, 0, 0, 0,144, 1, 20, 0, 48, 0, 64, 0, 24, 0, - 12, 0, 16, 0, 4, 0, 8, 0, 8, 0, 0, 0, 32, 0,112, 0, 48, 0, 8, 0, 16, 0, 8, 0, 8, 0, 4, 0, 4, 0, 0, 1, - 32, 0, 16, 0, 0, 0, 16, 0, 64, 0, 24, 0, 12, 0, 64, 0, 72, 0, 96, 0,112, 0,120, 0, 88, 0,120, 0,152, 0, 88, 0, - 80, 0,128, 0, 80, 0,176, 0,216, 0, 80, 0,112, 0,128, 0,216, 0,128, 0,208, 0, 72, 0,112, 0, 0, 0,136, 0, 32, 0, -232, 1,152, 0, 0, 0,112, 0, 0, 0, 0, 0, 88, 0, 8, 0, 8, 0, 8, 1,104, 0,216, 1, 96, 0, 88, 0, 88, 0, 88, 0, -184, 1,136, 0,128, 0,232, 0, 48, 0,144, 0, 72, 0,120, 0,136, 0, 16, 1,224, 0, 0, 0, 40, 0, 16, 0, 0, 0, 0, 0, - 0, 0,216, 1, 40, 0,184, 0,152, 0, 56, 0, 16, 0, 88, 0, 24, 4, 64, 0, 24, 0, 16, 0, 88, 0, 88, 0, 24, 0, 40, 1, - 8, 0, 88, 0, 88, 0, 40, 0, 0, 0, 48, 0, 64, 1, 32, 0, 48, 2, 0, 0, 0, 0, 64, 0,248, 2,104, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 32, 1, 56, 0,152, 0, 72, 0,208, 0,240, 0, 32, 0, 0, 1,240, 0,128, 1,104, 0, 0, 0,144, 0, - 0, 0, 40, 1, 16, 0, 16, 0,168, 0,224, 0,144, 2,120, 2, 64, 0,200, 0, 32, 1, 72, 0,208, 2, 40, 0,112, 0, 24, 1, - 32, 0,232, 0, 32, 0, 32, 0, 80, 2, 16, 1, 16, 0,192, 20, 56, 0, 64, 11, 32, 0, 40, 0, 80, 1, 0, 0, 0, 0,160, 0, - 0, 0, 40, 1, 0, 0, 40, 0, 80, 0, 48, 0, 16, 0, 8, 0, 52, 0, 0, 1, 32, 1,200, 1, 8, 1, 72, 1, 0, 0, 32, 0, - 12, 0, 24, 0, 48, 0, 16, 0, 24, 0, 24, 0, 32, 0, 72, 1, 0, 0, 64, 0, 64, 0, 48, 0, 8, 0, 48, 0, 72, 0,104, 0, - 40, 0, 8, 0, 72, 0, 44, 0, 40, 0,108, 0, 72, 0, 96, 0,104, 0, 60, 0,128, 0, 80, 0, 80, 0, 16, 0, 96, 0, 32, 0, - 20, 0, 88, 0, 24, 0, 80, 0,112, 0, 84, 0, 32, 0, 96, 0, 64, 0, 56, 0,112, 0,140, 0, 4, 0, 24, 0, 16, 0, 8, 0, - 40, 0, 0, 0, 88, 0,224, 0, 40, 0, 24, 1,168, 0,232, 1,120, 0, 8, 1, 88, 0, 56, 0, 80, 0,128, 0, 80, 0,112, 0, - 56, 0, 48, 0, 48, 0, 72, 0, 48, 0, 72, 0, 48, 0, 24, 0, 56, 0,104, 0, 16, 0,112, 0, 96, 0, 28, 0, 28, 0, 28, 0, - 56, 0, 24, 0, 72, 0,168, 0, 40, 0,144, 0, 56, 0, 0, 1, 0, 0, 0, 0, 16, 0, 40, 0, 28, 0, 12, 0, 12, 0, 16, 1, - 40, 0, 8, 0, 8, 0, 64, 0, 32, 0, 24, 0, 16, 0, 24, 0, 32, 0, 8, 0, 32, 0, 12, 0, 56, 0, 24, 0, 72, 0, 24, 0, - 56, 0, 72, 0, 40, 0,248, 0, 20, 0, 8, 2,104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 32, 0, 40, 0,192, 0, 40, 0, - 32, 0,224, 0,224, 0, 72, 0, 0, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,104, 0, 24, 0, 24, 0, 16, 0, 24, 0, 8, 0, - 16, 0, 24, 0, 20, 0,104, 0, 32, 1, 16, 0,104, 0, 0, 1, 40, 0,200, 0,104, 0,112, 0,104, 0, 32, 0, 80, 0, 56, 0, - 80, 0, 64, 0,104, 0, 72, 0, 64, 0,128, 0, 83, 84, 82, 67,112, 1, 0, 0, 10, 0, 2, 0, 10, 0, 0, 0, 10, 0, 1, 0, - 11, 0, 3, 0, 11, 0, 0, 0, 11, 0, 1, 0, 9, 0, 2, 0, 12, 0, 2, 0, 9, 0, 3, 0, 9, 0, 4, 0, 13, 0, 2, 0, - 2, 0, 5, 0, 2, 0, 6, 0, 14, 0, 2, 0, 4, 0, 5, 0, 4, 0, 6, 0, 15, 0, 2, 0, 7, 0, 5, 0, 7, 0, 6, 0, - 16, 0, 2, 0, 8, 0, 5, 0, 8, 0, 6, 0, 17, 0, 3, 0, 4, 0, 5, 0, 4, 0, 6, 0, 4, 0, 7, 0, 18, 0, 3, 0, - 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 7, 0, 19, 0, 3, 0, 8, 0, 5, 0, 8, 0, 6, 0, 8, 0, 7, 0, 20, 0, 4, 0, - 4, 0, 5, 0, 4, 0, 6, 0, 4, 0, 7, 0, 4, 0, 8, 0, 21, 0, 4, 0, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 7, 0, - 7, 0, 8, 0, 22, 0, 4, 0, 8, 0, 5, 0, 8, 0, 6, 0, 8, 0, 7, 0, 8, 0, 8, 0, 23, 0, 4, 0, 4, 0, 9, 0, - 4, 0, 10, 0, 4, 0, 11, 0, 4, 0, 12, 0, 24, 0, 4, 0, 7, 0, 9, 0, 7, 0, 10, 0, 7, 0, 11, 0, 7, 0, 12, 0, - 25, 0, 4, 0, 9, 0, 13, 0, 12, 0, 14, 0, 4, 0, 15, 0, 4, 0, 16, 0, 26, 0, 10, 0, 26, 0, 0, 0, 26, 0, 1, 0, - 0, 0, 17, 0, 0, 0, 18, 0, 2, 0, 19, 0, 0, 0, 20, 0, 4, 0, 21, 0, 25, 0, 22, 0, 4, 0, 23, 0, 4, 0, 24, 0, - 27, 0, 9, 0, 9, 0, 0, 0, 9, 0, 1, 0, 27, 0, 25, 0, 28, 0, 26, 0, 0, 0, 27, 0, 2, 0, 28, 0, 2, 0, 19, 0, - 4, 0, 29, 0, 26, 0, 30, 0, 28, 0, 8, 0, 27, 0, 31, 0, 27, 0, 32, 0, 29, 0, 33, 0, 0, 0, 34, 0, 0, 0, 35, 0, - 4, 0, 36, 0, 4, 0, 37, 0, 28, 0, 38, 0, 30, 0, 6, 0, 4, 0, 39, 0, 4, 0, 40, 0, 2, 0, 41, 0, 2, 0, 42, 0, - 2, 0, 43, 0, 4, 0, 44, 0, 31, 0, 6, 0, 32, 0, 45, 0, 2, 0, 46, 0, 2, 0, 47, 0, 2, 0, 17, 0, 2, 0, 19, 0, - 0, 0, 48, 0, 33, 0, 21, 0, 33, 0, 0, 0, 33, 0, 1, 0, 34, 0, 49, 0, 35, 0, 50, 0, 24, 0, 51, 0, 24, 0, 52, 0, - 2, 0, 46, 0, 2, 0, 47, 0, 2, 0, 53, 0, 2, 0, 54, 0, 2, 0, 55, 0, 2, 0, 56, 0, 2, 0, 19, 0, 2, 0, 57, 0, - 7, 0, 11, 0, 7, 0, 12, 0, 4, 0, 58, 0, 7, 0, 59, 0, 7, 0, 60, 0, 7, 0, 61, 0, 31, 0, 62, 0, 36, 0, 7, 0, - 27, 0, 31, 0, 12, 0, 63, 0, 24, 0, 64, 0, 2, 0, 46, 0, 2, 0, 65, 0, 2, 0, 66, 0, 2, 0, 37, 0, 37, 0, 16, 0, - 37, 0, 0, 0, 37, 0, 1, 0, 7, 0, 67, 0, 7, 0, 61, 0, 2, 0, 17, 0, 2, 0, 47, 0, 2, 0, 68, 0, 2, 0, 19, 0, - 4, 0, 69, 0, 4, 0, 70, 0, 9, 0, 2, 0, 7, 0, 71, 0, 0, 0, 20, 0, 0, 0, 72, 0, 7, 0, 73, 0, 7, 0, 74, 0, - 38, 0, 13, 0, 27, 0, 31, 0, 39, 0, 75, 0, 37, 0, 76, 0, 0, 0, 77, 0, 4, 0, 78, 0, 7, 0, 61, 0, 12, 0, 79, 0, - 36, 0, 80, 0, 27, 0, 81, 0, 2, 0, 17, 0, 2, 0, 82, 0, 2, 0, 83, 0, 2, 0, 19, 0, 40, 0, 6, 0, 40, 0, 0, 0, - 40, 0, 1, 0, 0, 0, 84, 0, 0, 0, 85, 0, 4, 0, 23, 0, 4, 0, 86, 0, 41, 0, 10, 0, 41, 0, 0, 0, 41, 0, 1, 0, - 4, 0, 87, 0, 4, 0, 88, 0, 4, 0, 89, 0, 4, 0, 43, 0, 4, 0, 14, 0, 4, 0, 90, 0, 0, 0, 91, 0, 0, 0, 92, 0, - 42, 0, 15, 0, 27, 0, 31, 0, 0, 0, 93, 0, 4, 0, 90, 0, 4, 0, 94, 0, 12, 0, 95, 0, 40, 0, 96, 0, 40, 0, 97, 0, - 4, 0, 98, 0, 4, 0, 99, 0, 12, 0,100, 0, 0, 0,101, 0, 4, 0,102, 0, 4, 0,103, 0, 9, 0,104, 0, 8, 0,105, 0, - 43, 0, 3, 0, 4, 0,106, 0, 4, 0,107, 0, 9, 0, 2, 0, 44, 0, 20, 0, 27, 0, 31, 0, 39, 0, 75, 0, 2, 0, 17, 0, - 2, 0, 19, 0, 7, 0,108, 0, 7, 0,109, 0, 7, 0,110, 0, 7, 0,111, 0, 7, 0,112, 0, 7, 0,113, 0, 7, 0,114, 0, - 7, 0,115, 0, 7, 0,116, 0, 7, 0,117, 0, 7, 0,118, 0, 2, 0,119, 0, 2, 0,120, 0, 7, 0,121, 0, 36, 0, 80, 0, - 32, 0,122, 0, 45, 0, 13, 0, 4, 0,123, 0, 4, 0,124, 0, 4, 0,125, 0, 4, 0,126, 0, 2, 0,127, 0, 2, 0,128, 0, - 2, 0, 19, 0, 2, 0,129, 0, 2, 0,130, 0, 2, 0,131, 0, 2, 0,132, 0, 2, 0,133, 0, 46, 0,134, 0, 47, 0, 32, 0, - 27, 0, 31, 0, 0, 0, 34, 0, 12, 0,135, 0, 48, 0,136, 0, 49, 0,137, 0, 50, 0,138, 0, 2, 0,129, 0, 2, 0, 19, 0, - 2, 0,139, 0, 2, 0, 17, 0, 2, 0, 37, 0, 2, 0, 43, 0, 4, 0,140, 0, 2, 0,141, 0, 2, 0,142, 0, 2, 0,143, 0, - 2, 0,144, 0, 2, 0,145, 0, 2, 0,146, 0, 4, 0,147, 0, 4, 0,148, 0, 43, 0,149, 0, 30, 0,150, 0, 0, 0,151, 0, - 7, 0,152, 0, 4, 0,153, 0, 2, 0,154, 0, 2, 0,155, 0, 2, 0,156, 0, 2, 0,157, 0, 7, 0,158, 0, 7, 0,159, 0, - 51, 0, 31, 0, 2, 0,160, 0, 2, 0,161, 0, 2, 0,162, 0, 2, 0,163, 0, 32, 0,164, 0, 52, 0,165, 0, 0, 0,166, 0, - 0, 0,167, 0, 0, 0,168, 0, 0, 0,169, 0, 0, 0,170, 0, 7, 0,171, 0, 7, 0,172, 0, 2, 0,173, 0, 2, 0,174, 0, - 2, 0,175, 0, 2, 0,176, 0, 2, 0,177, 0, 2, 0,178, 0, 2, 0,179, 0, 7, 0,180, 0, 7, 0,181, 0, 7, 0,182, 0, - 7, 0,183, 0, 7, 0,184, 0, 7, 0, 57, 0, 7, 0,185, 0, 7, 0,186, 0, 7, 0,187, 0, 7, 0,188, 0, 7, 0,189, 0, - 53, 0, 15, 0, 0, 0,190, 0, 9, 0,191, 0, 0, 0,192, 0, 0, 0,193, 0, 4, 0,194, 0, 4, 0,195, 0, 9, 0,196, 0, - 7, 0,197, 0, 7, 0,198, 0, 7, 0,199, 0, 4, 0,200, 0, 9, 0,201, 0, 9, 0,202, 0, 4, 0,203, 0, 4, 0, 37, 0, - 54, 0, 6, 0, 7, 0,180, 0, 7, 0,181, 0, 7, 0,182, 0, 7, 0,204, 0, 7, 0, 67, 0, 4, 0, 64, 0, 55, 0, 5, 0, - 2, 0, 19, 0, 2, 0, 36, 0, 2, 0, 64, 0, 2, 0,205, 0, 54, 0,199, 0, 56, 0, 17, 0, 32, 0,164, 0, 47, 0,206, 0, - 57, 0,207, 0, 7, 0,208, 0, 7, 0,209, 0, 2, 0, 17, 0, 2, 0,210, 0, 7, 0,110, 0, 7, 0,111, 0, 7, 0,211, 0, - 4, 0,212, 0, 2, 0,213, 0, 2, 0,214, 0, 4, 0,129, 0, 4, 0,140, 0, 2, 0,215, 0, 2, 0,216, 0, 52, 0, 59, 0, - 27, 0, 31, 0, 39, 0, 75, 0, 7, 0,217, 0, 7, 0,218, 0, 7, 0,219, 0, 7, 0,220, 0, 7, 0,221, 0, 7, 0,222, 0, - 7, 0,223, 0, 7, 0,224, 0, 7, 0,225, 0, 7, 0,226, 0, 7, 0,227, 0, 7, 0,228, 0, 7, 0,229, 0, 7, 0,230, 0, - 7, 0,231, 0, 7, 0,232, 0, 7, 0,233, 0, 7, 0,234, 0, 7, 0,235, 0, 7, 0,236, 0, 2, 0,237, 0, 2, 0,238, 0, - 2, 0,239, 0, 2, 0,240, 0, 2, 0,241, 0, 2, 0,242, 0, 2, 0,243, 0, 2, 0, 19, 0, 2, 0, 17, 0, 2, 0,210, 0, - 7, 0,244, 0, 7, 0,245, 0, 7, 0,246, 0, 7, 0,247, 0, 4, 0,248, 0, 4, 0,249, 0, 2, 0,250, 0, 2, 0,251, 0, - 2, 0,252, 0, 2, 0,127, 0, 4, 0, 23, 0, 4, 0,124, 0, 4, 0,125, 0, 4, 0,126, 0, 7, 0,253, 0, 7, 0,254, 0, - 7, 0,186, 0, 45, 0,255, 0, 58, 0, 0, 1, 36, 0, 80, 0, 47, 0,206, 0, 53, 0, 1, 1, 55, 0, 2, 1, 56, 0, 3, 1, - 30, 0,150, 0, 0, 0, 4, 1, 0, 0, 5, 1, 59, 0, 8, 0, 7, 0, 6, 1, 7, 0, 7, 1, 7, 0,172, 0, 4, 0, 19, 0, - 7, 0, 8, 1, 7, 0, 9, 1, 7, 0, 10, 1, 32, 0, 45, 0, 60, 0, 82, 0, 27, 0, 31, 0, 39, 0, 75, 0, 2, 0, 17, 0, - 2, 0, 19, 0, 4, 0, 11, 1, 2, 0,174, 0, 2, 0, 12, 1, 7, 0,180, 0, 7, 0,181, 0, 7, 0,182, 0, 7, 0,183, 0, - 7, 0, 13, 1, 7, 0, 14, 1, 7, 0, 15, 1, 7, 0, 16, 1, 7, 0, 17, 1, 7, 0, 18, 1, 7, 0, 19, 1, 7, 0, 20, 1, - 7, 0, 21, 1, 7, 0, 22, 1, 7, 0, 23, 1, 61, 0, 24, 1, 2, 0, 25, 1, 2, 0, 70, 0, 7, 0,110, 0, 7, 0,111, 0, - 7, 0, 26, 1, 7, 0, 27, 1, 7, 0, 28, 1, 2, 0, 29, 1, 2, 0, 30, 1, 2, 0, 31, 1, 2, 0, 32, 1, 0, 0, 33, 1, - 0, 0, 34, 1, 2, 0, 35, 1, 2, 0, 36, 1, 2, 0, 37, 1, 2, 0, 38, 1, 2, 0, 39, 1, 7, 0, 40, 1, 7, 0, 41, 1, - 7, 0, 42, 1, 7, 0, 43, 1, 2, 0, 44, 1, 2, 0, 43, 0, 2, 0, 45, 1, 2, 0, 46, 1, 2, 0, 47, 1, 2, 0, 48, 1, - 7, 0, 49, 1, 7, 0, 50, 1, 7, 0, 51, 1, 7, 0, 52, 1, 7, 0, 53, 1, 7, 0, 54, 1, 7, 0, 55, 1, 7, 0, 56, 1, - 7, 0, 57, 1, 7, 0, 58, 1, 7, 0, 59, 1, 7, 0, 60, 1, 2, 0, 61, 1, 2, 0, 62, 1, 4, 0, 63, 1, 4, 0, 64, 1, - 2, 0, 65, 1, 2, 0, 66, 1, 2, 0, 67, 1, 2, 0, 68, 1, 7, 0, 69, 1, 7, 0, 70, 1, 7, 0, 71, 1, 7, 0, 72, 1, - 2, 0, 73, 1, 2, 0, 74, 1, 36, 0, 80, 0, 51, 0, 75, 1, 2, 0, 76, 1, 2, 0, 77, 1, 30, 0,150, 0, 62, 0, 2, 0, - 27, 0, 31, 0, 36, 0, 80, 0, 63, 0,129, 0, 27, 0, 31, 0, 39, 0, 75, 0, 2, 0, 78, 1, 2, 0, 19, 0, 7, 0,180, 0, - 7, 0,181, 0, 7, 0,182, 0, 7, 0, 79, 1, 7, 0, 80, 1, 7, 0, 81, 1, 7, 0, 82, 1, 7, 0, 83, 1, 7, 0, 84, 1, - 7, 0, 85, 1, 7, 0, 86, 1, 7, 0, 87, 1, 7, 0, 88, 1, 7, 0, 89, 1, 7, 0, 90, 1, 7, 0, 91, 1, 7, 0, 92, 1, - 7, 0, 93, 1, 7, 0, 94, 1, 7, 0, 95, 1, 7, 0, 96, 1, 7, 0, 97, 1, 7, 0, 98, 1, 7, 0, 99, 1, 7, 0,100, 1, - 7, 0,101, 1, 7, 0,102, 1, 7, 0,103, 1, 7, 0,104, 1, 7, 0,105, 1, 2, 0,106, 1, 2, 0,107, 1, 2, 0,108, 1, - 0, 0,109, 1, 0, 0,110, 1, 7, 0,111, 1, 7, 0,112, 1, 2, 0,113, 1, 2, 0,114, 1, 7, 0,115, 1, 7, 0,116, 1, - 7, 0,117, 1, 7, 0,118, 1, 2, 0,119, 1, 2, 0,120, 1, 4, 0, 11, 1, 4, 0,121, 1, 2, 0,122, 1, 2, 0,123, 1, - 2, 0,124, 1, 2, 0,125, 1, 7, 0,126, 1, 7, 0,127, 1, 7, 0,128, 1, 7, 0,129, 1, 7, 0,130, 1, 7, 0,131, 1, - 7, 0,132, 1, 7, 0,133, 1, 7, 0,134, 1, 7, 0,135, 1, 0, 0,136, 1, 7, 0,137, 1, 7, 0,138, 1, 7, 0,139, 1, - 4, 0,140, 1, 0, 0,141, 1, 0, 0, 45, 1, 0, 0,142, 1, 0, 0, 4, 1, 2, 0,143, 1, 2, 0,144, 1, 2, 0, 76, 1, - 2, 0,145, 1, 2, 0,146, 1, 2, 0,147, 1, 7, 0,148, 1, 7, 0,149, 1, 7, 0,150, 1, 7, 0,151, 1, 7, 0,152, 1, - 2, 0,160, 0, 2, 0,161, 0, 55, 0,153, 1, 55, 0,154, 1, 0, 0,155, 1, 0, 0,156, 1, 0, 0,157, 1, 0, 0,158, 1, - 2, 0,159, 1, 2, 0,160, 1, 7, 0,161, 1, 7, 0,162, 1, 51, 0, 75, 1, 58, 0, 0, 1, 36, 0, 80, 0, 64, 0,163, 1, - 30, 0,150, 0, 7, 0,164, 1, 7, 0,165, 1, 7, 0,166, 1, 7, 0,167, 1, 7, 0,168, 1, 2, 0,169, 1, 2, 0, 70, 0, - 7, 0,170, 1, 7, 0,171, 1, 7, 0,172, 1, 7, 0,173, 1, 7, 0,174, 1, 7, 0,175, 1, 7, 0,176, 1, 7, 0,177, 1, - 7, 0,178, 1, 2, 0,179, 1, 2, 0,180, 1, 7, 0,181, 1, 7, 0,182, 1, 7, 0,183, 1, 7, 0,184, 1, 7, 0,185, 1, - 4, 0,186, 1, 4, 0,187, 1, 4, 0,188, 1, 12, 0,189, 1, 65, 0, 4, 0, 27, 0, 31, 0, 0, 0,190, 1, 66, 0, 2, 0, - 43, 0,149, 0, 67, 0, 26, 0, 67, 0, 0, 0, 67, 0, 1, 0, 68, 0,191, 1, 4, 0,192, 1, 4, 0,193, 1, 4, 0,194, 1, - 4, 0,195, 1, 4, 0,196, 1, 4, 0,197, 1, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,198, 1, 2, 0,199, 1, 7, 0, 5, 0, - 7, 0, 6, 0, 7, 0, 7, 0, 7, 0,200, 1, 7, 0,201, 1, 7, 0,202, 1, 7, 0,203, 1, 7, 0,204, 1, 7, 0,205, 1, - 7, 0,206, 1, 7, 0, 23, 0, 7, 0,207, 1, 7, 0,208, 1, 69, 0, 17, 0, 27, 0, 31, 0, 68, 0,191, 1, 12, 0,209, 1, - 12, 0,210, 1, 12, 0,211, 1, 36, 0, 80, 0, 63, 0,212, 1, 2, 0, 19, 0, 2, 0,213, 1, 4, 0,173, 0, 7, 0, 6, 1, - 7, 0,172, 0, 7, 0, 7, 1, 7, 0,214, 1, 7, 0,215, 1, 7, 0,216, 1, 67, 0,217, 1, 35, 0, 11, 0, 7, 0,218, 1, - 7, 0,219, 1, 7, 0,220, 1, 7, 0,221, 1, 2, 0, 55, 0, 0, 0,222, 1, 0, 0,223, 1, 0, 0,224, 1, 0, 0,225, 1, - 0, 0,226, 1, 0, 0,227, 1, 34, 0, 7, 0, 7, 0,228, 1, 7, 0,219, 1, 7, 0,220, 1, 2, 0,224, 1, 2, 0,227, 1, - 7, 0,221, 1, 7, 0, 37, 0, 70, 0, 21, 0, 70, 0, 0, 0, 70, 0, 1, 0, 2, 0, 17, 0, 2, 0,229, 1, 2, 0,227, 1, - 2, 0, 19, 0, 2, 0,230, 1, 2, 0,231, 1, 2, 0,232, 1, 2, 0,233, 1, 2, 0,234, 1, 2, 0,235, 1, 2, 0,236, 1, - 2, 0,237, 1, 7, 0,238, 1, 7, 0,239, 1, 34, 0, 49, 0, 35, 0, 50, 0, 2, 0,240, 1, 2, 0,241, 1, 4, 0,242, 1, - 71, 0, 5, 0, 2, 0,243, 1, 2, 0,229, 1, 0, 0, 19, 0, 0, 0, 37, 0, 2, 0, 70, 0, 72, 0, 4, 0, 7, 0, 5, 0, - 7, 0, 6, 0, 7, 0, 8, 0, 7, 0,244, 1, 73, 0, 62, 0, 27, 0, 31, 0, 39, 0, 75, 0, 68, 0,191, 1, 12, 0,245, 1, - 12, 0,210, 1, 12, 0,246, 1, 32, 0,247, 1, 32, 0,248, 1, 32, 0,249, 1, 36, 0, 80, 0, 74, 0,250, 1, 38, 0,251, 1, - 63, 0,212, 1, 12, 0,252, 1, 7, 0, 6, 1, 7, 0,172, 0, 7, 0, 7, 1, 4, 0,173, 0, 2, 0,253, 1, 2, 0,213, 1, - 2, 0, 19, 0, 2, 0,254, 1, 7, 0,255, 1, 7, 0, 0, 2, 7, 0, 1, 2, 2, 0,232, 1, 2, 0,233, 1, 2, 0, 2, 2, - 2, 0, 3, 2, 4, 0, 4, 2, 34, 0, 5, 2, 2, 0, 23, 0, 2, 0, 95, 0, 2, 0, 67, 0, 2, 0, 6, 2, 7, 0, 7, 2, - 7, 0, 8, 2, 7, 0, 9, 2, 7, 0, 10, 2, 7, 0, 11, 2, 7, 0, 12, 2, 7, 0, 13, 2, 7, 0, 14, 2, 7, 0, 15, 2, - 7, 0, 16, 2, 0, 0, 17, 2, 75, 0, 18, 2, 76, 0, 19, 2, 0, 0, 20, 2, 65, 0, 21, 2, 65, 0, 22, 2, 65, 0, 23, 2, - 65, 0, 24, 2, 4, 0, 25, 2, 7, 0, 26, 2, 4, 0, 27, 2, 4, 0, 28, 2, 72, 0, 29, 2, 4, 0, 30, 2, 4, 0, 31, 2, - 71, 0, 32, 2, 71, 0, 33, 2, 77, 0, 39, 0, 27, 0, 31, 0, 68, 0,191, 1, 12, 0, 34, 2, 36, 0, 80, 0, 38, 0,251, 1, - 63, 0,212, 1, 78, 0, 35, 2, 79, 0, 36, 2, 80, 0, 37, 2, 81, 0, 38, 2, 82, 0, 39, 2, 83, 0, 40, 2, 84, 0, 41, 2, - 85, 0, 42, 2, 77, 0, 43, 2, 86, 0, 44, 2, 87, 0, 45, 2, 88, 0, 46, 2, 88, 0, 47, 2, 88, 0, 48, 2, 4, 0, 54, 0, - 4, 0, 49, 2, 4, 0, 50, 2, 4, 0, 51, 2, 4, 0, 52, 2, 4, 0,173, 0, 7, 0, 6, 1, 7, 0,172, 0, 7, 0, 7, 1, - 7, 0, 53, 2, 4, 0, 54, 2, 2, 0, 55, 2, 2, 0, 19, 0, 2, 0, 56, 2, 2, 0, 57, 2, 2, 0,213, 1, 2, 0, 58, 2, - 89, 0, 59, 2, 90, 0, 60, 2, 80, 0, 8, 0, 9, 0, 61, 2, 7, 0, 62, 2, 4, 0, 63, 2, 0, 0, 19, 0, 0, 0, 64, 2, - 2, 0, 11, 1, 2, 0, 65, 2, 2, 0, 66, 2, 78, 0, 7, 0, 4, 0, 67, 2, 4, 0, 68, 2, 4, 0, 69, 2, 4, 0, 70, 2, - 2, 0,229, 1, 0, 0, 71, 2, 0, 0, 19, 0, 82, 0, 5, 0, 4, 0, 67, 2, 4, 0, 68, 2, 0, 0, 72, 2, 0, 0, 73, 2, - 2, 0, 19, 0, 91, 0, 2, 0, 4, 0, 74, 2, 7, 0,220, 1, 83, 0, 3, 0, 91, 0, 75, 2, 4, 0, 76, 2, 4, 0, 19, 0, - 81, 0, 6, 0, 7, 0, 77, 2, 2, 0, 78, 2, 2, 0,229, 1, 0, 0, 19, 0, 0, 0, 73, 2, 0, 0,179, 0, 84, 0, 4, 0, - 0, 0,204, 0, 0, 0,180, 0, 0, 0,181, 0, 0, 0,182, 0, 92, 0, 6, 0, 47, 0, 61, 2, 0, 0, 19, 0, 0, 0, 64, 2, - 2, 0, 11, 1, 2, 0, 65, 2, 2, 0, 66, 2, 93, 0, 1, 0, 7, 0, 79, 2, 94, 0, 5, 0, 0, 0,204, 0, 0, 0,180, 0, - 0, 0,181, 0, 0, 0,182, 0, 4, 0, 37, 0, 85, 0, 1, 0, 7, 0, 80, 2, 86, 0, 2, 0, 4, 0, 81, 2, 4, 0, 17, 0, - 79, 0, 7, 0, 7, 0, 62, 2, 47, 0, 61, 2, 0, 0, 19, 0, 0, 0, 64, 2, 2, 0, 11, 1, 2, 0, 65, 2, 2, 0, 66, 2, - 95, 0, 1, 0, 7, 0, 82, 2, 96, 0, 1, 0, 4, 0, 83, 2, 97, 0, 1, 0, 0, 0, 84, 2, 98, 0, 1, 0, 7, 0, 62, 2, - 99, 0, 3, 0, 4, 0, 85, 2, 0, 0, 92, 0, 7, 0, 86, 2,101, 0, 4, 0, 7, 0,204, 0, 7, 0,180, 0, 7, 0,181, 0, - 7, 0,182, 0,102, 0, 1, 0,101, 0, 63, 2,103, 0, 5, 0, 4, 0, 87, 2, 4, 0, 88, 2, 0, 0, 19, 0, 0, 0,229, 1, - 0, 0,179, 0,104, 0, 2, 0, 4, 0, 89, 2, 4, 0, 88, 2,105, 0, 10, 0,105, 0, 0, 0,105, 0, 1, 0,103, 0, 90, 2, -102, 0, 91, 2,104, 0, 92, 2, 4, 0, 54, 0, 4, 0, 50, 2, 4, 0, 49, 2, 4, 0, 37, 0, 81, 0, 93, 2, 89, 0, 14, 0, - 12, 0, 94, 2, 81, 0, 93, 2, 0, 0, 95, 2, 0, 0, 96, 2, 0, 0, 97, 2, 0, 0, 98, 2, 0, 0, 99, 2, 0, 0,100, 2, - 0, 0,101, 2, 0, 0, 19, 0, 88, 0, 46, 2, 88, 0, 48, 2, 2, 0,102, 2, 0, 0,103, 2, 90, 0, 8, 0, 4, 0,104, 2, - 4, 0,105, 2, 78, 0,106, 2, 82, 0,107, 2, 4, 0, 50, 2, 4, 0, 49, 2, 4, 0, 54, 0, 4, 0, 37, 0,106, 0, 7, 0, -106, 0, 0, 0,106, 0, 1, 0, 4, 0, 17, 0, 4, 0, 11, 1, 0, 0, 20, 0, 46, 0,134, 0, 0, 0,108, 2,107, 0, 7, 0, -106, 0,109, 2, 2, 0,110, 2, 2, 0, 94, 2, 2, 0,111, 2, 2, 0, 90, 0, 9, 0,112, 2, 9, 0,113, 2,108, 0, 3, 0, -106, 0,109, 2, 32, 0,164, 0, 0, 0, 20, 0,109, 0, 5, 0,106, 0,109, 2, 32, 0,164, 0, 0, 0, 20, 0, 2, 0,114, 2, - 0, 0,115, 2,110, 0, 5, 0,106, 0,109, 2, 7, 0, 88, 0, 7, 0,116, 2, 4, 0,117, 2, 4, 0,118, 2,111, 0, 5, 0, -106, 0,109, 2, 32, 0,119, 2, 0, 0, 72, 0, 4, 0, 11, 1, 4, 0, 19, 0,112, 0, 13, 0,106, 0,109, 2, 32, 0,120, 2, - 32, 0,121, 2, 32, 0,122, 2, 32, 0,123, 2, 7, 0,124, 2, 7, 0,125, 2, 7, 0,116, 2, 7, 0,126, 2, 4, 0,127, 2, - 4, 0,128, 2, 4, 0, 90, 0, 4, 0,129, 2,113, 0, 5, 0,106, 0,109, 2, 2, 0,130, 2, 2, 0, 19, 0, 7, 0,131, 2, - 32, 0,132, 2,114, 0, 3, 0,106, 0,109, 2, 7, 0,133, 2, 4, 0, 90, 0,115, 0, 10, 0,106, 0,109, 2, 7, 0,134, 2, - 4, 0,135, 2, 4, 0, 37, 0, 2, 0, 90, 0, 2, 0,136, 2, 2, 0,137, 2, 2, 0,138, 2, 7, 0,139, 2, 0, 0,140, 2, -116, 0, 3, 0,106, 0,109, 2, 7, 0, 37, 0, 4, 0, 17, 0,117, 0, 11, 0,106, 0,109, 2, 52, 0,141, 2, 7, 0,142, 2, - 4, 0,143, 2, 0, 0,140, 2, 7, 0,144, 2, 4, 0,145, 2, 32, 0,146, 2, 0, 0,147, 2, 4, 0,148, 2, 4, 0, 37, 0, -118, 0, 10, 0,106, 0,109, 2, 32, 0,149, 2, 47, 0,150, 2, 4, 0, 90, 0, 4, 0,151, 2, 7, 0,152, 2, 7, 0,153, 2, - 0, 0,147, 2, 4, 0,148, 2, 4, 0, 37, 0,119, 0, 3, 0,106, 0,109, 2, 7, 0,154, 2, 4, 0,155, 2,120, 0, 5, 0, -106, 0,109, 2, 7, 0,156, 2, 0, 0,140, 2, 2, 0, 19, 0, 2, 0,157, 2,121, 0, 8, 0,106, 0,109, 2, 32, 0,164, 0, - 7, 0,156, 2, 7, 0,221, 1, 7, 0,106, 0, 0, 0,140, 2, 2, 0, 19, 0, 2, 0, 17, 0,122, 0, 21, 0,106, 0,109, 2, - 32, 0,158, 2, 0, 0,140, 2, 52, 0,141, 2, 32, 0,146, 2, 2, 0, 19, 0, 2, 0, 37, 0, 7, 0,159, 2, 7, 0,160, 2, - 7, 0,161, 2, 7, 0,255, 1, 7, 0,162, 2, 7, 0,163, 2, 7, 0,164, 2, 7, 0,165, 2, 4, 0,145, 2, 4, 0,148, 2, - 0, 0,147, 2, 7, 0,166, 2, 7, 0,167, 2, 7, 0, 43, 0,123, 0, 7, 0,106, 0,109, 2, 2, 0,168, 2, 2, 0,169, 2, - 4, 0, 70, 0, 32, 0,164, 0, 7, 0,170, 2, 0, 0,140, 2,124, 0, 9, 0,106, 0,109, 2, 32, 0,164, 0, 7, 0,171, 2, - 7, 0,172, 2, 7, 0,165, 2, 4, 0,173, 2, 4, 0,174, 2, 7, 0,175, 2, 0, 0, 20, 0,125, 0, 1, 0,106, 0,109, 2, -126, 0, 6, 0,106, 0,109, 2, 46, 0,134, 0,127, 0,176, 2,128, 0,177, 2,129, 0,178, 2,130, 0,179, 2,131, 0, 14, 0, -106, 0,109, 2, 81, 0,180, 2, 81, 0,181, 2, 81, 0,182, 2, 81, 0,183, 2, 81, 0,184, 2, 81, 0,185, 2, 78, 0,186, 2, - 4, 0,187, 2, 4, 0,188, 2, 2, 0,189, 2, 2, 0, 37, 0, 7, 0,190, 2,132, 0,191, 2,133, 0, 7, 0,106, 0,109, 2, - 81, 0,180, 2, 81, 0,192, 2,134, 0,193, 2,135, 0,191, 2, 4, 0,194, 2, 4, 0,187, 2,136, 0, 4, 0,106, 0,109, 2, - 32, 0,164, 0, 4, 0,195, 2, 4, 0, 37, 0,137, 0, 2, 0, 4, 0,196, 2, 7, 0,220, 1,138, 0, 2, 0, 4, 0,125, 0, - 4, 0,197, 2,139, 0, 20, 0,106, 0,109, 2, 32, 0,164, 0, 0, 0,140, 2, 2, 0,198, 2, 2, 0,199, 2, 2, 0, 19, 0, - 2, 0, 37, 0, 7, 0,200, 2, 7, 0,201, 2, 4, 0, 54, 0, 4, 0,202, 2,138, 0,203, 2,137, 0,204, 2, 4, 0,205, 2, - 4, 0,206, 2, 4, 0,207, 2, 4, 0,197, 2, 7, 0,208, 2, 7, 0,209, 2, 7, 0,210, 2,140, 0, 8, 0,106, 0,109, 2, -141, 0,211, 2,134, 0,193, 2, 4, 0,212, 2, 4, 0,213, 2, 4, 0,214, 2, 2, 0, 19, 0, 2, 0, 57, 0,142, 0, 8, 0, -106, 0,109, 2, 32, 0, 45, 0, 2, 0,215, 2, 2, 0, 19, 0, 2, 0,130, 2, 2, 0, 57, 0, 7, 0,216, 2, 7, 0,217, 2, -143, 0, 5, 0,106, 0,109, 2, 4, 0,218, 2, 2, 0, 19, 0, 2, 0,219, 2, 7, 0,220, 2,144, 0, 7, 0,106, 0,109, 2, - 81, 0,221, 2, 4, 0,222, 2, 0, 0,223, 2, 0, 0,224, 2, 0, 0,225, 2, 0, 0,226, 2,145, 0, 3, 0,106, 0,109, 2, -146, 0,227, 2,130, 0,179, 2,147, 0, 10, 0,106, 0,109, 2, 32, 0,228, 2, 32, 0,229, 2, 0, 0,230, 2, 7, 0,231, 2, - 2, 0,232, 2, 2, 0,233, 2, 0, 0,234, 2, 0, 0,235, 2, 0, 0,115, 2,148, 0, 9, 0,106, 0,109, 2, 32, 0,236, 2, - 0, 0,230, 2, 7, 0,237, 2, 7, 0,238, 2, 0, 0, 11, 1, 0, 0,130, 2, 0, 0,239, 2, 0, 0, 37, 0,149, 0, 27, 0, - 27, 0, 31, 0, 2, 0,230, 1, 2, 0,231, 1, 2, 0,240, 2, 2, 0, 19, 0, 2, 0,241, 2, 2, 0,242, 2, 2, 0,243, 2, - 2, 0, 70, 0, 0, 0,244, 2, 0, 0,245, 2, 0, 0,246, 2, 0, 0, 17, 0, 4, 0, 37, 0, 7, 0,247, 2, 7, 0,248, 2, - 7, 0,249, 2, 7, 0,250, 2, 7, 0,251, 2, 7, 0,252, 2, 34, 0,253, 2, 36, 0, 80, 0, 38, 0,251, 1, 83, 0, 40, 2, - 7, 0,254, 2, 7, 0,255, 2,149, 0, 0, 3,150, 0, 3, 0,150, 0, 0, 0,150, 0, 1, 0, 0, 0, 20, 0, 68, 0, 3, 0, - 7, 0, 1, 3, 4, 0, 19, 0, 4, 0, 37, 0, 32, 0,111, 0, 27, 0, 31, 0, 39, 0, 75, 0, 2, 0, 17, 0, 2, 0, 2, 3, - 4, 0, 3, 3, 4, 0, 4, 3, 4, 0, 5, 3, 0, 0, 6, 3, 32, 0, 38, 0, 32, 0, 7, 3, 32, 0, 8, 3, 32, 0, 9, 3, - 32, 0, 10, 3, 36, 0, 80, 0, 74, 0,250, 1, 68, 0,191, 1,151, 0, 11, 3,151, 0, 12, 3,152, 0, 13, 3, 9, 0, 2, 0, - 12, 0, 14, 3, 12, 0, 34, 2, 12, 0,210, 1, 12, 0, 15, 3, 12, 0, 16, 3, 63, 0,212, 1, 0, 0, 17, 3, 4, 0,213, 1, - 4, 0, 18, 3, 7, 0, 6, 1, 7, 0, 19, 3, 7, 0, 20, 3, 7, 0,172, 0, 7, 0, 21, 3, 7, 0, 7, 1, 7, 0, 22, 3, - 7, 0, 23, 3, 7, 0,171, 2, 7, 0, 24, 3, 7, 0,208, 0, 4, 0, 25, 3, 2, 0, 19, 0, 2, 0, 26, 3, 2, 0, 27, 3, - 2, 0, 28, 3, 2, 0, 29, 3, 2, 0, 30, 3, 2, 0, 31, 3, 2, 0, 32, 3, 2, 0, 33, 3, 2, 0, 34, 3, 2, 0, 35, 3, - 2, 0, 36, 3, 4, 0, 37, 3, 4, 0, 38, 3, 4, 0, 39, 3, 4, 0, 40, 3, 7, 0, 41, 3, 7, 0, 26, 2, 7, 0, 42, 3, - 7, 0, 43, 3, 7, 0, 44, 3, 7, 0, 45, 3, 7, 0, 46, 3, 7, 0, 47, 3, 7, 0, 48, 3, 7, 0, 49, 3, 7, 0, 50, 3, - 7, 0, 51, 3, 0, 0, 52, 3, 0, 0, 53, 3, 0, 0, 54, 3, 0, 0, 55, 3, 7, 0, 56, 3, 7, 0, 57, 3, 12, 0, 58, 3, - 12, 0, 59, 3, 12, 0, 60, 3, 12, 0, 61, 3, 7, 0, 62, 3, 2, 0, 81, 2, 2, 0, 63, 3, 7, 0, 63, 2, 4, 0, 64, 3, - 4, 0, 65, 3,153, 0, 66, 3, 2, 0, 67, 3, 2, 0,215, 0, 7, 0, 68, 3, 12, 0, 69, 3, 12, 0, 70, 3, 12, 0, 71, 3, - 12, 0, 72, 3,154, 0, 73, 3,155, 0, 74, 3, 64, 0, 75, 3, 2, 0, 76, 3, 2, 0, 77, 3, 2, 0, 78, 3, 2, 0, 79, 3, - 7, 0, 55, 2, 2, 0, 80, 3, 2, 0, 81, 3,146, 0, 82, 3,134, 0, 83, 3,134, 0, 84, 3, 4, 0, 85, 3, 4, 0, 86, 3, - 4, 0, 87, 3, 4, 0, 70, 0, 12, 0, 88, 3,156, 0, 14, 0,156, 0, 0, 0,156, 0, 1, 0, 32, 0, 38, 0, 7, 0,171, 2, - 7, 0, 8, 1, 7, 0,172, 2, 7, 0,165, 2, 0, 0, 20, 0, 4, 0,173, 2, 4, 0,174, 2, 4, 0, 89, 3, 2, 0, 17, 0, - 2, 0, 90, 3, 7, 0,175, 2,154, 0, 36, 0, 2, 0, 91, 3, 2, 0, 92, 3, 2, 0, 19, 0, 2, 0,165, 2, 7, 0, 93, 3, - 7, 0, 94, 3, 7, 0, 95, 3, 7, 0, 96, 3, 7, 0, 97, 3, 7, 0, 98, 3, 7, 0, 99, 3, 7, 0,100, 3, 7, 0,101, 3, - 7, 0,102, 3, 7, 0,103, 3, 7, 0,104, 3, 7, 0,105, 3, 7, 0,106, 3, 7, 0,107, 3, 7, 0,108, 3, 7, 0,109, 3, - 7, 0,110, 3, 7, 0,111, 3, 7, 0,112, 3, 7, 0,113, 3, 7, 0,114, 3, 7, 0,115, 3, 7, 0,116, 3, 2, 0,117, 3, - 2, 0,118, 3, 2, 0,119, 3, 2, 0,120, 3, 52, 0,165, 0,157, 0,121, 3, 7, 0,122, 3, 4, 0,118, 2,158, 0, 6, 0, -158, 0, 0, 0,158, 0, 1, 0, 4, 0,123, 3, 4, 0,124, 3, 7, 0, 2, 0, 9, 0,125, 3,130, 0, 15, 0, 4, 0, 19, 0, - 4, 0,126, 3, 4, 0,127, 3, 4, 0,128, 3, 4, 0,129, 3, 4, 0,130, 3, 4, 0,131, 3, 4, 0,124, 3, 4, 0, 81, 2, - 4, 0, 57, 0, 0, 0,132, 3, 0, 0,133, 3, 0, 0,134, 3, 0, 0,135, 3, 12, 0,136, 3,159, 0, 1, 0, 7, 0,228, 1, -153, 0, 30, 0, 4, 0, 19, 0, 7, 0,137, 3, 7, 0,138, 3, 7, 0,139, 3, 4, 0,140, 3, 4, 0,141, 3, 4, 0,142, 3, - 4, 0,143, 3, 7, 0,144, 3, 7, 0,145, 3, 7, 0,146, 3, 7, 0,147, 3, 7, 0,148, 3, 7, 0,149, 3, 7, 0,150, 3, - 7, 0,151, 3, 7, 0,152, 3, 7, 0,153, 3, 7, 0,154, 3, 7, 0,155, 3, 7, 0,156, 3, 7, 0,157, 3, 7, 0,158, 3, - 7, 0,159, 3, 7, 0,160, 3, 7, 0,161, 3, 4, 0,162, 3, 4, 0,163, 3, 7, 0,164, 3, 7, 0, 48, 3,155, 0, 49, 0, -141, 0,165, 3, 4, 0,124, 3, 4, 0,166, 3,160, 0,167, 3,161, 0,168, 3, 0, 0, 37, 0, 0, 0,169, 3, 2, 0,170, 3, - 7, 0,171, 3, 0, 0,172, 3, 7, 0,173, 3, 7, 0,174, 3, 7, 0,175, 3, 7, 0,176, 3, 7, 0,177, 3, 7, 0,178, 3, - 7, 0,179, 3, 7, 0,180, 3, 7, 0,181, 3, 2, 0,182, 3, 0, 0,183, 3, 2, 0,184, 3, 7, 0,185, 3, 7, 0,186, 3, - 0, 0,187, 3, 4, 0,126, 0, 4, 0,188, 3, 4, 0,189, 3, 2, 0,190, 3, 2, 0,191, 3,159, 0,192, 3, 4, 0,193, 3, - 4, 0, 82, 0, 7, 0,194, 3, 7, 0,195, 3, 7, 0,196, 3, 7, 0,197, 3, 2, 0,198, 3, 2, 0,199, 3, 2, 0,200, 3, - 2, 0,201, 3, 2, 0,202, 3, 2, 0,203, 3, 2, 0,204, 3, 2, 0,205, 3,162, 0,206, 3, 7, 0,207, 3, 7, 0,208, 3, -130, 0,209, 3,146, 0, 48, 0, 2, 0, 17, 0, 2, 0,210, 3, 2, 0,211, 3, 2, 0,212, 3, 7, 0,213, 3, 2, 0,214, 3, - 2, 0,215, 3, 7, 0,216, 3, 2, 0,217, 3, 2, 0,218, 3, 7, 0,219, 3, 7, 0,220, 3, 7, 0,221, 3, 7, 0,222, 3, - 7, 0,223, 3, 7, 0,224, 3, 4, 0,225, 3, 7, 0,226, 3, 7, 0,227, 3, 7, 0,228, 3, 77, 0,229, 3, 77, 0,230, 3, - 77, 0,231, 3, 0, 0,232, 3, 7, 0,233, 3, 7, 0,234, 3, 36, 0, 80, 0, 2, 0,235, 3, 0, 0,236, 3, 0, 0,237, 3, - 7, 0,238, 3, 4, 0,239, 3, 7, 0,240, 3, 7, 0,241, 3, 4, 0,242, 3, 4, 0, 19, 0, 7, 0,243, 3, 7, 0,244, 3, - 7, 0,245, 3, 81, 0,246, 3, 7, 0,247, 3, 7, 0,248, 3, 7, 0,249, 3, 7, 0,250, 3, 7, 0,251, 3, 7, 0,252, 3, - 7, 0,253, 3, 4, 0,254, 3,163, 0, 73, 0, 27, 0, 31, 0, 39, 0, 75, 0, 2, 0,174, 0, 2, 0, 12, 1, 2, 0, 45, 1, - 2, 0,255, 3, 7, 0, 0, 4, 7, 0, 1, 4, 7, 0, 2, 4, 7, 0, 3, 4, 7, 0, 4, 4, 7, 0, 5, 4, 7, 0, 6, 4, - 7, 0, 7, 4, 7, 0, 85, 1, 7, 0, 87, 1, 7, 0, 86, 1, 7, 0, 8, 4, 4, 0, 9, 4, 7, 0, 10, 4, 7, 0, 11, 4, - 7, 0, 12, 4, 7, 0, 13, 4, 7, 0, 14, 4, 7, 0, 15, 4, 7, 0, 16, 4, 2, 0, 17, 4, 2, 0, 11, 1, 2, 0, 18, 4, - 2, 0, 19, 4, 2, 0, 20, 4, 2, 0, 21, 4, 2, 0, 22, 4, 2, 0, 23, 4, 7, 0, 24, 4, 7, 0, 25, 4, 7, 0, 26, 4, - 7, 0, 27, 4, 7, 0, 28, 4, 7, 0, 29, 4, 7, 0, 30, 4, 7, 0, 31, 4, 7, 0, 32, 4, 7, 0, 33, 4, 7, 0, 34, 4, - 7, 0, 35, 4, 2, 0, 36, 4, 2, 0, 37, 4, 2, 0, 38, 4, 2, 0, 39, 4, 7, 0, 40, 4, 7, 0, 41, 4, 7, 0, 42, 4, - 7, 0, 43, 4, 2, 0, 44, 4, 2, 0, 45, 4, 2, 0, 46, 4, 2, 0, 47, 4, 7, 0, 48, 4, 7, 0, 49, 4, 7, 0, 50, 4, - 7, 0, 51, 4, 2, 0, 52, 4, 2, 0, 53, 4, 2, 0, 54, 4, 2, 0, 19, 0, 7, 0, 55, 4, 7, 0, 56, 4, 36, 0, 80, 0, - 51, 0, 75, 1, 2, 0, 76, 1, 2, 0, 77, 1, 30, 0,150, 0,164, 0, 8, 0,164, 0, 0, 0,164, 0, 1, 0, 4, 0, 25, 3, - 4, 0, 57, 4, 4, 0, 19, 0, 2, 0, 58, 4, 2, 0, 59, 4, 32, 0,164, 0,165, 0, 13, 0, 9, 0, 60, 4, 9, 0, 61, 4, - 4, 0, 62, 4, 4, 0, 63, 4, 4, 0, 64, 4, 4, 0, 65, 4, 4, 0, 66, 4, 4, 0, 67, 4, 4, 0, 68, 4, 4, 0, 69, 4, - 4, 0, 70, 4, 4, 0, 37, 0, 0, 0, 71, 4,166, 0, 5, 0, 9, 0, 72, 4, 9, 0, 73, 4, 4, 0, 74, 4, 4, 0, 70, 0, - 0, 0, 75, 4,167, 0, 13, 0, 4, 0, 17, 0, 4, 0, 76, 4, 4, 0, 77, 4, 4, 0, 78, 4, 4, 0, 79, 4, 4, 0, 80, 4, - 4, 0, 90, 0, 4, 0, 81, 4, 4, 0, 82, 4, 4, 0, 83, 4, 4, 0, 84, 4, 4, 0, 85, 4, 26, 0, 30, 0,168, 0, 4, 0, - 4, 0, 86, 4, 7, 0, 87, 4, 2, 0, 19, 0, 2, 0, 77, 1,169, 0, 11, 0,169, 0, 0, 0,169, 0, 1, 0, 0, 0, 20, 0, - 63, 0, 88, 4, 64, 0, 89, 4, 4, 0, 25, 3, 4, 0, 90, 4, 4, 0, 91, 4, 4, 0, 37, 0, 4, 0, 92, 4, 4, 0, 93, 4, -170, 0,132, 0,165, 0, 94, 4,166, 0, 95, 4,167, 0, 96, 4,168, 0, 97, 4, 4, 0,194, 2, 4, 0,126, 0, 4, 0,188, 3, - 4, 0, 98, 4, 4, 0, 99, 4, 4, 0,100, 4, 4, 0,101, 4, 2, 0, 19, 0, 2, 0,102, 4, 7, 0, 26, 2, 7, 0,103, 4, - 7, 0,104, 4, 7, 0,105, 4, 7, 0,106, 4, 7, 0,107, 4, 2, 0,108, 4, 2, 0,109, 4, 2, 0,110, 4, 2, 0,111, 4, - 2, 0,214, 0, 2, 0,112, 4, 2, 0,113, 4, 2, 0,120, 3, 2, 0,114, 4, 2, 0,115, 4, 2, 0, 32, 1, 2, 0,106, 0, - 2, 0,116, 4, 2, 0,117, 4, 2, 0,118, 4, 2, 0,119, 4, 2, 0,120, 4, 2, 0,121, 4, 2, 0,122, 4, 2, 0,123, 4, - 2, 0,124, 4, 2, 0, 33, 1, 2, 0,125, 4, 2, 0,126, 4, 2, 0,127, 4, 2, 0,128, 4, 4, 0,129, 4, 4, 0, 11, 1, - 2, 0,130, 4, 2, 0,131, 4, 2, 0,132, 4, 2, 0,133, 4, 2, 0,134, 4, 2, 0,135, 4, 24, 0,136, 4, 24, 0,137, 4, - 23, 0,138, 4, 12, 0,139, 4, 2, 0,140, 4, 2, 0, 37, 0, 7, 0,141, 4, 7, 0,142, 4, 7, 0,143, 4, 7, 0,144, 4, - 4, 0,145, 4, 7, 0,146, 4, 7, 0,147, 4, 7, 0,148, 4, 7, 0,149, 4, 2, 0,150, 4, 2, 0,151, 4, 2, 0,152, 4, - 2, 0,153, 4, 2, 0,154, 4, 2, 0,155, 4, 7, 0,156, 4, 7, 0,157, 4, 7, 0,158, 4, 2, 0,159, 4, 2, 0,160, 4, - 2, 0,161, 4, 2, 0,162, 4, 2, 0,163, 4, 2, 0,164, 4, 2, 0,165, 4, 2, 0,166, 4, 2, 0,167, 4, 2, 0,168, 4, - 4, 0,169, 4, 4, 0,170, 4, 4, 0,171, 4, 4, 0,172, 4, 4, 0,173, 4, 7, 0,174, 4, 4, 0,175, 4, 4, 0,176, 4, - 4, 0,177, 4, 4, 0,178, 4, 7, 0,179, 4, 7, 0,180, 4, 7, 0,181, 4, 7, 0,182, 4, 7, 0,183, 4, 7, 0,184, 4, - 7, 0,185, 4, 7, 0,186, 4, 7, 0,187, 4, 0, 0,188, 4, 0, 0,189, 4, 4, 0,190, 4, 2, 0,191, 4, 2, 0,160, 1, - 0, 0,192, 4, 7, 0,193, 4, 7, 0,194, 4, 4, 0,195, 4, 4, 0,196, 4, 7, 0,197, 4, 7, 0,198, 4, 2, 0,199, 4, - 2, 0,200, 4, 7, 0,201, 4, 2, 0,202, 4, 2, 0,203, 4, 4, 0,204, 4, 2, 0,205, 4, 2, 0,206, 4, 2, 0,207, 4, - 2, 0,208, 4, 7, 0,209, 4, 7, 0, 70, 0, 42, 0,210, 4, 0, 0,211, 4,171, 0, 9, 0,171, 0, 0, 0,171, 0, 1, 0, - 0, 0, 20, 0, 2, 0,212, 4, 2, 0,213, 4, 2, 0,214, 4, 2, 0, 43, 0, 7, 0,215, 4, 7, 0, 70, 0,172, 0, 7, 0, - 2, 0,135, 2, 2, 0, 11, 1, 2, 0,109, 0, 2, 0,216, 4, 7, 0,217, 4, 7, 0, 70, 0, 42, 0,218, 4,173, 0, 5, 0, - 7, 0,219, 4, 0, 0, 17, 0, 0, 0, 43, 0, 0, 0, 70, 0, 0, 0,160, 1,174, 0, 24, 0, 7, 0, 15, 4, 7, 0, 16, 4, - 2, 0, 11, 1, 2, 0,220, 4, 2, 0, 18, 4, 2, 0, 19, 4, 2, 0, 20, 4, 2, 0, 21, 4, 2, 0, 22, 4, 2, 0, 23, 4, -173, 0,221, 4, 2, 0,108, 4, 2, 0,109, 4, 2, 0,110, 4, 2, 0,111, 4, 2, 0,214, 0, 2, 0,112, 4, 2, 0,113, 4, - 2, 0,120, 3,172, 0,222, 4, 2, 0,223, 4, 2, 0,114, 4, 2, 0,117, 4, 2, 0,118, 4,175, 0, 5, 0,175, 0, 0, 0, -175, 0, 1, 0, 4, 0,123, 3, 0, 0,132, 3, 4, 0, 19, 0,176, 0, 6, 0,177, 0,224, 4, 2, 0, 19, 0, 2, 0,225, 4, - 2, 0,226, 4, 2, 0,227, 4, 9, 0,228, 4,178, 0, 4, 0, 2, 0,106, 0, 2, 0,142, 2, 2, 0,126, 3, 2, 0,229, 4, -179, 0, 10, 0, 2, 0, 19, 0, 2, 0,230, 4, 2, 0,231, 4, 2, 0,232, 4,178, 0,233, 4, 9, 0,228, 4, 7, 0,234, 4, - 4, 0,235, 4, 4, 0,236, 4, 4, 0, 37, 0,180, 0, 4, 0,180, 0, 0, 0,180, 0, 1, 0, 0, 0,237, 4, 7, 0,238, 4, -181, 0, 8, 0,182, 0,239, 4,177, 0,224, 4, 7, 0,240, 4, 4, 0, 90, 0, 0, 0,241, 4, 0, 0,242, 4, 0, 0,243, 4, - 0, 0,244, 4,183, 0, 9, 0,177, 0,224, 4, 7, 0,245, 4, 7, 0,246, 4, 2, 0, 11, 1, 2, 0, 19, 0, 4, 0, 36, 0, - 4, 0,247, 4, 83, 0,248, 4, 9, 0,228, 4,184, 0, 72, 0,183, 0,249, 4,183, 0,250, 4,181, 0,251, 4, 7, 0,252, 4, - 2, 0,253, 4, 2, 0,254, 4, 7, 0,255, 4, 7, 0, 0, 5, 2, 0,126, 3, 2, 0, 1, 5, 7, 0, 2, 5, 7, 0, 3, 5, - 7, 0, 4, 5, 2, 0, 5, 5, 2, 0,236, 4, 2, 0, 6, 5, 2, 0, 7, 5, 2, 0, 8, 5, 2, 0, 9, 5, 7, 0, 10, 5, - 7, 0, 11, 5, 7, 0, 12, 5, 2, 0, 13, 5, 2, 0, 14, 5, 2, 0, 15, 5, 2, 0, 16, 5, 2, 0, 17, 5, 2, 0, 18, 5, - 2, 0, 19, 5,176, 0, 20, 5,179, 0, 21, 5, 7, 0, 22, 5, 7, 0, 23, 5, 7, 0, 24, 5, 2, 0, 25, 5, 2, 0, 70, 0, - 0, 0, 26, 5, 0, 0, 27, 5, 0, 0, 28, 5, 0, 0, 29, 5, 0, 0, 30, 5, 0, 0, 31, 5, 2, 0, 32, 5, 7, 0, 33, 5, - 7, 0, 34, 5, 7, 0, 35, 5, 7, 0, 36, 5, 7, 0, 37, 5, 7, 0, 38, 5, 7, 0, 39, 5, 7, 0, 40, 5, 7, 0, 41, 5, - 7, 0, 42, 5, 2, 0, 43, 5, 0, 0, 44, 5, 0, 0, 45, 5, 0, 0, 46, 5, 0, 0, 47, 5, 32, 0, 48, 5, 0, 0, 49, 5, - 0, 0, 50, 5, 0, 0, 51, 5, 0, 0, 52, 5, 0, 0, 53, 5, 0, 0, 54, 5, 0, 0, 55, 5, 0, 0, 56, 5, 2, 0, 57, 5, - 2, 0, 58, 5, 2, 0, 59, 5, 2, 0, 60, 5, 2, 0, 61, 5,185, 0, 8, 0, 4, 0, 62, 5, 4, 0, 63, 5, 4, 0, 64, 5, - 4, 0, 65, 5, 4, 0, 66, 5, 4, 0, 67, 5, 4, 0, 54, 0, 4, 0, 50, 2, 46, 0, 34, 0, 27, 0, 31, 0, 39, 0, 75, 0, - 32, 0, 68, 5,163, 0, 69, 5, 46, 0, 70, 5, 47, 0,206, 0, 12, 0, 71, 5,164, 0, 72, 5, 32, 0, 73, 5, 7, 0, 74, 5, - 7, 0, 75, 5, 7, 0, 76, 5, 7, 0, 77, 5, 4, 0, 25, 3, 2, 0, 19, 0, 2, 0, 4, 1, 58, 0, 0, 1,186, 0, 78, 5, -184, 0, 79, 5,187, 0, 80, 5,170, 0,180, 0,168, 0, 97, 4, 12, 0,100, 0, 12, 0, 81, 5,188, 0, 82, 5, 2, 0, 83, 5, - 2, 0, 84, 5, 2, 0,215, 0, 2, 0, 85, 5, 4, 0, 86, 5, 4, 0, 87, 5, 12, 0, 88, 5,173, 0,221, 4,174, 0, 89, 5, -189, 0, 6, 0, 47, 0,206, 0, 45, 0,255, 0, 7, 0, 14, 2, 7, 0, 15, 2, 7, 0,106, 0, 7, 0, 90, 5,190, 0, 35, 0, - 7, 0, 91, 5, 7, 0, 92, 5, 7, 0, 93, 5, 7, 0, 94, 5, 7, 0, 95, 5, 7, 0, 96, 5, 7, 0, 97, 5, 7, 0, 98, 5, - 7, 0, 99, 5, 7, 0, 18, 1, 7, 0,100, 5, 7, 0,101, 5, 7, 0,102, 5, 7, 0,103, 5, 7, 0,171, 0, 2, 0,104, 5, - 2, 0,105, 5, 4, 0,106, 5, 2, 0,107, 5, 2, 0,108, 5, 2, 0,109, 5, 2, 0,110, 5, 7, 0,111, 5, 68, 0,112, 5, -191, 0,113, 5,190, 0,114, 5,192, 0,115, 5,193, 0,116, 5,194, 0,117, 5,195, 0,118, 5,196, 0,119, 5, 7, 0,120, 5, - 2, 0,121, 5, 2, 0,122, 5, 4, 0,160, 1,197, 0, 54, 0,198, 0, 0, 0,198, 0, 1, 0, 12, 0,123, 5, 4, 0,124, 5, - 7, 0,125, 5, 2, 0,126, 5, 7, 0, 99, 5, 7, 0, 18, 1, 7, 0, 43, 0, 4, 0,127, 5, 2, 0,109, 5, 2, 0,110, 5, - 32, 0, 68, 5, 32, 0,128, 5,189, 0,129, 5,197, 0,114, 5, 0, 0,130, 5, 4, 0, 25, 3, 4, 0,131, 5, 2, 0,132, 5, - 2, 0,133, 5, 2, 0,134, 5, 2, 0,135, 5, 2, 0,160, 1, 2, 0, 19, 0, 2, 0,136, 5, 2, 0,137, 5, 7, 0,112, 0, - 7, 0,138, 5, 7, 0,139, 5, 7, 0,140, 5, 7, 0,141, 5, 7, 0,142, 5, 7, 0,171, 0, 7, 0, 74, 5, 2, 0,143, 5, - 2, 0, 62, 1, 2, 0,144, 5, 2, 0,145, 5, 2, 0,146, 5, 2, 0,147, 5, 2, 0,148, 5, 2, 0,149, 5, 2, 0,150, 5, - 2, 0,151, 5, 4, 0,152, 5, 12, 0,153, 5, 2, 0,154, 5, 2, 0, 64, 2, 2, 0,155, 5, 0, 0,156, 5, 0, 0,157, 5, - 9, 0,158, 5,191, 0,113, 5,199, 0, 25, 0, 24, 0, 36, 0, 24, 0, 64, 0, 23, 0,159, 5, 23, 0,160, 5, 23, 0,161, 5, - 7, 0,162, 5, 7, 0,163, 5, 7, 0,164, 5, 7, 0,165, 5, 2, 0,166, 5, 2, 0,167, 5, 2, 0,168, 5, 2, 0,169, 5, - 2, 0,170, 5, 2, 0, 19, 0, 2, 0,171, 5, 2, 0,172, 5, 2, 0,173, 5, 2, 0,174, 5, 2, 0,175, 5, 2, 0,135, 5, - 7, 0,176, 5, 7, 0,177, 5, 4, 0,178, 5, 4, 0,179, 5,198, 0, 6, 0,198, 0, 0, 0,198, 0, 1, 0, 12, 0,123, 5, - 4, 0,124, 5, 7, 0,125, 5, 2, 0,126, 5,200, 0, 8, 0,198, 0, 0, 0,198, 0, 1, 0, 12, 0,123, 5, 4, 0,124, 5, - 7, 0,125, 5, 2, 0,126, 5,201, 0,180, 5, 46, 0,134, 0,202, 0, 14, 0,198, 0, 0, 0,198, 0, 1, 0, 12, 0,123, 5, - 4, 0,124, 5, 7, 0,125, 5, 2, 0,126, 5,199, 0,181, 5,203, 0,182, 5, 12, 0,183, 5, 2, 0, 11, 1, 2, 0, 19, 0, - 2, 0,184, 5, 0, 0,185, 5, 0, 0,186, 5,204, 0, 20, 0,198, 0, 0, 0,198, 0, 1, 0, 12, 0,123, 5, 4, 0,124, 5, - 7, 0,125, 5, 2, 0,126, 5,192, 0,115, 5,199, 0,181, 5, 2, 0,187, 5, 2, 0,188, 5, 2, 0,189, 5, 2, 0,190, 5, - 2, 0,171, 5, 2, 0,191, 5, 0, 0, 19, 0, 0, 0, 77, 1, 9, 0,250, 1, 4, 0,192, 5, 4, 0,193, 5, 27, 0,194, 5, -205, 0, 16, 0,198, 0, 0, 0,198, 0, 1, 0, 12, 0,123, 5, 4, 0,124, 5, 7, 0,125, 5, 2, 0,126, 5,199, 0,181, 5, - 7, 0, 14, 2, 7, 0, 15, 2, 2, 0,187, 5, 2, 0,195, 5, 2, 0,196, 5, 2, 0,197, 5, 4, 0, 19, 0, 7, 0,198, 5, -191, 0,113, 5,206, 0, 15, 0, 0, 0,199, 5, 0, 0,200, 5, 0, 0,201, 5, 2, 0, 19, 0, 2, 0,202, 5, 2, 0,203, 5, - 2, 0,103, 1, 2, 0,204, 5, 2, 0, 37, 0, 4, 0,205, 5, 4, 0,206, 5, 2, 0,207, 5, 2, 0,208, 5, 0, 0,209, 5, - 0, 0,210, 5,207, 0, 16, 0,198, 0, 0, 0,198, 0, 1, 0, 12, 0,123, 5, 4, 0,124, 5, 4, 0, 37, 0,206, 0,211, 5, -208, 0,212, 5, 12, 0,213, 5, 12, 0,214, 5,209, 0,215, 5,196, 0,216, 5,210, 0,217, 5, 2, 0,218, 5, 2, 0,219, 5, - 2, 0,220, 5, 2, 0, 70, 0,211, 0, 17, 0,198, 0, 0, 0,198, 0, 1, 0, 12, 0,123, 5, 4, 0,124, 5, 7, 0,125, 5, - 2, 0,126, 5,199, 0,181, 5, 12, 0,221, 5,212, 0,222, 5, 0, 0,223, 5,213, 0,224, 5, 4, 0,225, 5, 4, 0,226, 5, - 2, 0, 19, 0, 2, 0,227, 5, 2, 0,228, 5, 2, 0, 37, 0,214, 0, 29, 0,198, 0, 0, 0,198, 0, 1, 0, 12, 0,123, 5, - 4, 0,124, 5, 7, 0,125, 5, 2, 0,126, 5, 47, 0,150, 2, 45, 0,255, 0, 61, 0,229, 5, 2, 0,133, 0, 2, 0,230, 5, - 2, 0, 70, 0, 2, 0,231, 5, 4, 0, 19, 0, 2, 0,232, 5, 2, 0,186, 5, 2, 0,185, 5, 2, 0,160, 1, 0, 0,233, 5, - 0, 0,234, 5, 0, 0,235, 5, 0, 0,135, 5, 7, 0, 14, 2, 7, 0, 15, 2, 7, 0,198, 5, 7, 0, 62, 1, 7, 0,236, 5, - 7, 0,237, 5,191, 0,113, 5,215, 0, 11, 0,198, 0, 0, 0,198, 0, 1, 0, 12, 0,123, 5, 4, 0,124, 5, 7, 0,125, 5, - 2, 0,126, 5, 2, 0,184, 5, 2, 0, 19, 0, 4, 0, 37, 0,203, 0,182, 5,199, 0,181, 5,216, 0, 27, 0,198, 0, 0, 0, -198, 0, 1, 0, 12, 0,123, 5, 4, 0,124, 5, 7, 0,125, 5, 2, 0,126, 5, 42, 0,238, 5, 4, 0,239, 5, 4, 0,240, 5, - 2, 0, 90, 0, 2, 0,133, 0, 2, 0,241, 5, 0, 0,242, 5, 0, 0,243, 5, 4, 0,244, 5, 4, 0,245, 5, 4, 0,246, 5, - 4, 0,247, 5, 2, 0,248, 5, 2, 0,249, 5, 7, 0,250, 5, 23, 0,251, 5, 23, 0,252, 5, 4, 0,253, 5, 4, 0,254, 5, - 0, 0,255, 5, 0, 0, 0, 6,217, 0, 10, 0, 27, 0, 31, 0, 9, 0, 1, 6, 9, 0, 2, 6, 9, 0, 3, 6, 9, 0, 4, 6, - 9, 0, 5, 6, 4, 0, 90, 0, 4, 0, 6, 6, 0, 0, 7, 6, 0, 0, 8, 6,218, 0, 10, 0,198, 0, 0, 0,198, 0, 1, 0, - 12, 0,123, 5, 4, 0,124, 5, 7, 0,125, 5,217, 0, 9, 6, 2, 0, 90, 0, 2, 0,133, 0, 4, 0, 43, 0, 9, 0, 10, 6, -219, 0, 8, 0,198, 0, 0, 0,198, 0, 1, 0, 12, 0,123, 5, 4, 0,124, 5, 7, 0,125, 5,199, 0,181, 5, 4, 0, 19, 0, - 4, 0, 11, 6,220, 0, 23, 0,198, 0, 0, 0,198, 0, 1, 0, 12, 0,123, 5, 4, 0,124, 5, 7, 0,125, 5, 2, 0,126, 5, -199, 0,181, 5, 27, 0, 12, 6, 27, 0, 81, 0, 2, 0, 19, 0, 2, 0,133, 0, 7, 0, 13, 6, 9, 0, 14, 6, 7, 0, 14, 2, - 7, 0, 15, 2, 7, 0, 15, 6, 7, 0, 16, 6, 58, 0, 0, 1, 58, 0, 17, 6, 4, 0, 18, 6, 2, 0, 19, 6, 2, 0, 37, 0, -191, 0,113, 5,221, 0, 10, 0,198, 0, 0, 0,198, 0, 1, 0, 12, 0,123, 5, 4, 0,124, 5, 7, 0,125, 5, 2, 0,126, 5, - 2, 0, 19, 0, 2, 0, 34, 3, 4, 0, 37, 0,191, 0,113, 5,222, 0, 42, 0,198, 0, 0, 0,198, 0, 1, 0, 12, 0,123, 5, - 4, 0,124, 5, 7, 0,125, 5, 2, 0,126, 5,199, 0,181, 5,208, 0,212, 5, 0, 0,199, 5, 0, 0,200, 5, 0, 0,201, 5, - 2, 0, 17, 0, 2, 0,208, 5, 2, 0, 19, 0, 2, 0,202, 5, 9, 0, 14, 6, 4, 0,205, 5, 4, 0, 20, 6, 4, 0, 21, 6, - 4, 0,206, 5, 23, 0, 22, 6, 23, 0, 23, 6, 7, 0, 24, 6, 7, 0, 25, 6, 7, 0, 26, 6, 7, 0, 13, 6, 2, 0, 27, 6, - 2, 0,205, 0, 2, 0,103, 1, 2, 0,204, 5, 2, 0, 37, 0, 2, 0, 43, 0, 2, 0, 28, 6, 2, 0, 29, 6, 9, 0, 30, 6, - 9, 0, 31, 6, 9, 0, 32, 6, 9, 0, 33, 6, 9, 0, 34, 6, 2, 0, 35, 6, 0, 0,210, 5, 57, 0, 36, 6,223, 0, 7, 0, -223, 0, 0, 0,223, 0, 1, 0, 4, 0, 37, 6, 4, 0, 23, 0, 0, 0, 84, 0, 4, 0, 38, 6, 4, 0, 17, 0,224, 0, 13, 0, -198, 0, 0, 0,198, 0, 1, 0, 12, 0,123, 5, 4, 0,124, 5, 7, 0,125, 5, 2, 0,126, 5, 4, 0, 17, 0, 4, 0, 39, 6, - 4, 0, 19, 0, 4, 0,241, 5, 12, 0, 40, 6, 12, 0, 41, 6, 0, 0, 42, 6,225, 0, 7, 0,225, 0, 0, 0,225, 0, 1, 0, - 0, 0, 43, 6, 2, 0, 44, 6, 2, 0, 45, 6, 2, 0, 46, 6, 2, 0, 37, 0,226, 0, 12, 0, 2, 0, 45, 6, 2, 0, 47, 6, - 2, 0, 48, 6, 0, 0,115, 2, 2, 0, 49, 6, 2, 0, 50, 6, 2, 0, 51, 6, 2, 0, 52, 6, 2, 0, 53, 6, 2, 0,171, 5, - 7, 0, 54, 6, 7, 0, 55, 6,227, 0, 18, 0,227, 0, 0, 0,227, 0, 1, 0, 0, 0,132, 3,226, 0, 56, 6,226, 0, 57, 6, -226, 0, 58, 6,226, 0, 59, 6, 7, 0, 60, 6, 2, 0, 61, 6, 2, 0, 62, 6, 2, 0, 63, 6, 2, 0, 64, 6, 2, 0, 65, 6, - 2, 0, 66, 6, 2, 0, 67, 6, 2, 0, 68, 6, 2, 0, 69, 6, 2, 0, 70, 6,228, 0, 10, 0, 0, 0, 71, 6, 0, 0, 72, 6, - 0, 0, 73, 6, 0, 0, 74, 6, 0, 0, 75, 6, 0, 0, 76, 6, 2, 0, 77, 6, 2, 0, 78, 6, 2, 0, 79, 6, 2, 0, 37, 0, -229, 0, 8, 0, 0, 0, 80, 6, 0, 0, 81, 6, 0, 0, 82, 6, 0, 0, 83, 6, 0, 0, 84, 6, 0, 0, 85, 6, 7, 0, 90, 5, - 7, 0, 37, 0,230, 0, 17, 0,228, 0, 86, 6,228, 0, 87, 6,228, 0, 88, 6,228, 0, 89, 6,228, 0, 90, 6,228, 0, 91, 6, -228, 0, 92, 6,228, 0, 93, 6,228, 0, 94, 6,228, 0, 95, 6,228, 0, 96, 6,228, 0, 97, 6,228, 0, 98, 6,228, 0, 99, 6, -228, 0,100, 6,229, 0,101, 6, 0, 0,102, 6,231, 0, 71, 0, 0, 0,103, 6, 0, 0,104, 6, 0, 0, 75, 6, 0, 0,105, 6, - 0, 0,106, 6, 0, 0,107, 6, 0, 0,108, 6, 0, 0,109, 6, 0, 0,110, 6, 0, 0,111, 6, 0, 0,112, 6, 0, 0,113, 6, - 0, 0,114, 6, 0, 0,115, 6, 0, 0,116, 6, 0, 0,117, 6, 0, 0,118, 6, 0, 0,119, 6, 0, 0,120, 6, 0, 0,121, 6, - 0, 0,122, 6, 0, 0,123, 6, 0, 0,124, 6, 0, 0,125, 6, 0, 0,126, 6, 0, 0,127, 6, 0, 0,128, 6, 0, 0,129, 6, - 0, 0,130, 6, 0, 0,131, 6, 0, 0,132, 6, 0, 0,133, 6, 0, 0,134, 6, 0, 0,135, 6, 0, 0,136, 6, 0, 0,137, 6, - 0, 0,138, 6, 0, 0,139, 6, 0, 0,140, 6, 0, 0,141, 6, 0, 0,142, 6, 0, 0,143, 6, 0, 0,144, 6, 0, 0,145, 6, - 0, 0,146, 6, 0, 0,147, 6, 0, 0,148, 6, 0, 0,149, 6, 0, 0,150, 6, 0, 0,151, 6, 0, 0,152, 6, 0, 0,153, 6, - 0, 0,154, 6, 0, 0,155, 6, 0, 0,156, 6, 0, 0,157, 6, 0, 0,158, 6, 0, 0,159, 6, 0, 0,160, 6, 0, 0,161, 6, - 0, 0,162, 6, 0, 0,163, 6, 0, 0,164, 6, 0, 0,165, 6, 0, 0,166, 6, 0, 0,167, 6, 0, 0,168, 6, 0, 0,169, 6, - 0, 0,170, 6, 0, 0,171, 6, 0, 0, 92, 0,232, 0, 5, 0, 0, 0,172, 6, 0, 0,127, 6, 0, 0,129, 6, 2, 0, 19, 0, - 2, 0, 37, 0,233, 0, 21, 0,233, 0, 0, 0,233, 0, 1, 0, 0, 0, 20, 0,230, 0,173, 6,231, 0,174, 6,231, 0,175, 6, -231, 0,176, 6,231, 0,177, 6,231, 0,178, 6,231, 0,179, 6,231, 0,180, 6,231, 0,181, 6,231, 0,182, 6,231, 0,183, 6, -231, 0,184, 6,231, 0,185, 6,231, 0,186, 6,231, 0,187, 6,231, 0,188, 6,231, 0,189, 6,232, 0,190, 6,234, 0, 5, 0, - 4, 0, 19, 0, 4, 0, 37, 0, 7, 0, 63, 2, 7, 0,191, 6, 7, 0,228, 1,235, 0, 67, 0, 4, 0, 19, 0, 4, 0,192, 6, - 4, 0,193, 6, 0, 0,194, 6, 0, 0,195, 6, 0, 0,196, 6, 0, 0,197, 6, 0, 0,198, 6, 0, 0,199, 6, 0, 0,200, 6, - 0, 0,201, 6, 0, 0,202, 6, 2, 0,203, 6, 2, 0, 37, 0, 4, 0,204, 6, 4, 0,205, 6, 4, 0,206, 6, 4, 0,207, 6, - 2, 0,208, 6, 2, 0,209, 6, 4, 0,210, 6, 4, 0, 40, 6, 4, 0,211, 6, 2, 0,212, 6, 2, 0,213, 6, 2, 0,214, 6, - 2, 0,215, 6, 12, 0,216, 6, 12, 0,217, 6, 12, 0,218, 6, 2, 0,219, 6, 2, 0,220, 6, 2, 0,221, 6, 2, 0,222, 6, - 2, 0,223, 6, 2, 0,224, 6, 2, 0,225, 6, 2, 0,226, 6,234, 0,227, 6, 2, 0,228, 6, 2, 0,229, 6, 2, 0,230, 6, - 2, 0,231, 6, 2, 0,232, 6, 2, 0,233, 6, 2, 0,234, 6, 2, 0,235, 6, 4, 0,236, 6, 4, 0,237, 6, 2, 0,238, 6, - 2, 0,239, 6, 2, 0,240, 6, 2, 0,241, 6, 2, 0,242, 6, 2, 0,243, 6, 2, 0,244, 6, 2, 0,245, 6, 2, 0,246, 6, - 2, 0,247, 6, 2, 0,248, 6, 2, 0,249, 6, 0, 0,250, 6, 0, 0,251, 6, 7, 0,252, 6, 2, 0, 25, 5, 2, 0,253, 6, - 55, 0,254, 6,201, 0, 21, 0, 27, 0, 31, 0, 12, 0,255, 6, 12, 0, 0, 7, 12, 0, 1, 7, 12, 0,123, 5, 46, 0,134, 0, - 46, 0, 2, 7, 2, 0, 3, 7, 2, 0, 4, 7, 2, 0, 5, 7, 2, 0, 6, 7, 2, 0, 7, 7, 2, 0, 8, 7, 2, 0, 9, 7, - 2, 0, 37, 0, 2, 0, 10, 7, 2, 0, 11, 7, 4, 0, 70, 0,196, 0, 12, 7, 9, 0, 13, 7, 2, 0, 14, 7,236, 0, 5, 0, -236, 0, 0, 0,236, 0, 1, 0,236, 0, 15, 7, 13, 0, 16, 7, 4, 0, 19, 0,237, 0, 7, 0,237, 0, 0, 0,237, 0, 1, 0, -236, 0, 17, 7,236, 0, 18, 7, 2, 0,137, 4, 2, 0, 19, 0, 4, 0, 37, 0,238, 0, 23, 0,238, 0, 0, 0,238, 0, 1, 0, -239, 0, 19, 7,240, 0,217, 5, 0, 0, 20, 7, 0, 0, 21, 7, 0, 0, 22, 7, 2, 0, 23, 7, 2, 0, 24, 7, 2, 0, 25, 7, - 2, 0, 26, 7, 2, 0, 27, 7, 2, 0, 37, 0, 2, 0, 19, 0, 2, 0, 28, 7, 2, 0, 29, 7, 2, 0, 30, 7, 4, 0, 31, 7, -238, 0, 32, 7, 9, 0, 33, 7, 4, 0, 34, 7, 4, 0, 35, 7, 0, 0, 36, 7,241, 0, 22, 0,241, 0, 0, 0,241, 0, 1, 0, -236, 0, 17, 7,236, 0, 18, 7,236, 0, 37, 7,236, 0, 38, 7,201, 0, 39, 7, 23, 0, 52, 0, 0, 0,124, 5, 0, 0, 40, 7, - 2, 0,172, 5, 2, 0,173, 5, 2, 0, 41, 7, 2, 0, 37, 0, 2, 0, 6, 7, 2, 0, 38, 6, 2, 0, 19, 0,242, 0, 19, 7, - 12, 0, 42, 7, 12, 0,123, 5, 12, 0, 43, 7, 12, 0, 44, 7,243, 0, 21, 0,243, 0, 0, 0,243, 0, 1, 0,199, 0,181, 5, - 23, 0, 45, 7, 23, 0, 46, 7, 2, 0,172, 5, 2, 0,173, 5, 2, 0, 47, 7, 2, 0, 48, 7, 2, 0, 49, 7, 2, 0, 19, 0, - 7, 0, 10, 2, 2, 0, 5, 7, 2, 0, 9, 7, 4, 0, 43, 0,244, 0, 19, 7, 12, 0, 50, 7, 12, 0, 51, 7, 12, 0, 43, 7, - 0, 0, 52, 7, 9, 0, 53, 7,245, 0, 11, 0, 0, 0, 54, 7, 2, 0, 55, 7, 2, 0, 56, 7, 2, 0, 57, 7, 2, 0, 58, 7, - 2, 0,126, 4, 2, 0,121, 4,201, 0, 59, 7, 46, 0, 60, 7, 4, 0, 61, 7, 4, 0, 62, 7,246, 0, 1, 0, 0, 0, 63, 7, -247, 0, 8, 0, 57, 0, 64, 7, 57, 0, 65, 7,247, 0, 66, 7,247, 0, 67, 7,247, 0, 68, 7, 2, 0,129, 0, 2, 0, 19, 0, - 4, 0, 69, 7,248, 0, 4, 0, 4, 0,239, 5, 4, 0, 70, 7, 4, 0,244, 5, 4, 0, 71, 7,249, 0, 2, 0, 4, 0, 72, 7, - 4, 0, 73, 7,250, 0, 7, 0, 7, 0, 74, 7, 7, 0, 75, 7, 7, 0, 76, 7, 4, 0, 19, 0, 4, 0, 37, 0, 7, 0, 10, 4, - 7, 0, 77, 7,251, 0, 6, 0, 0, 0, 78, 7, 0, 0,201, 5, 49, 0,137, 0, 2, 0,106, 0, 2, 0,125, 4, 4, 0, 37, 0, -252, 0, 21, 0,252, 0, 0, 0,252, 0, 1, 0, 4, 0, 57, 0, 4, 0, 23, 0, 4, 0, 28, 0, 4, 0, 79, 7, 4, 0, 80, 7, - 4, 0, 81, 7,246, 0, 82, 7, 0, 0, 78, 7, 4, 0, 83, 7, 4, 0, 84, 7,251, 0, 8, 3,248, 0, 85, 7,249, 0, 86, 7, -250, 0, 87, 7,247, 0, 88, 7,247, 0, 89, 7,247, 0, 90, 7, 57, 0, 91, 7, 57, 0, 92, 7,253, 0, 12, 0, 0, 0,190, 1, - 9, 0,191, 0, 0, 0,192, 0, 4, 0,195, 0, 4, 0,203, 0, 9, 0,196, 0, 7, 0,198, 0, 7, 0,199, 0, 9, 0, 93, 7, - 9, 0, 94, 7, 9, 0,200, 0, 9, 0,202, 0,254, 0, 43, 0,254, 0, 0, 0,254, 0, 1, 0, 9, 0, 95, 7, 9, 0, 26, 0, - 0, 0, 27, 0, 4, 0, 19, 0, 4, 0, 17, 0, 4, 0, 23, 0, 4, 0, 88, 0, 4, 0, 96, 7, 4, 0, 97, 7, 4, 0, 80, 7, - 4, 0, 81, 7, 4, 0, 98, 7, 4, 0,214, 0, 4, 0, 99, 7, 4, 0,100, 7, 7, 0,246, 4, 7, 0,101, 7, 4, 0,126, 0, - 4, 0,102, 7,252, 0,103, 7, 36, 0, 80, 0, 46, 0,134, 0, 49, 0,137, 0, 7, 0,104, 7, 7, 0,105, 7,253, 0, 1, 1, -254, 0,106, 7,254, 0,107, 7,254, 0,108, 7, 12, 0,109, 7,255, 0,110, 7, 0, 1,111, 7, 7, 0,112, 7, 7, 0,113, 7, - 4, 0,114, 7, 7, 0,115, 7, 9, 0,116, 7, 4, 0,117, 7, 4, 0,118, 7, 4, 0,119, 7, 7, 0,120, 7, 1, 1, 4, 0, - 1, 1, 0, 0, 1, 1, 1, 0, 12, 0,121, 7,254, 0,122, 7,186, 0, 6, 0, 12, 0,123, 7, 12, 0,109, 7, 12, 0,124, 7, -254, 0,125, 7, 0, 0,126, 7, 0, 0,127, 7, 2, 1, 4, 0, 7, 0,128, 7, 7, 0,109, 0, 2, 0,129, 7, 2, 0,130, 7, - 3, 1, 6, 0, 7, 0,131, 7, 7, 0,132, 7, 7, 0,133, 7, 7, 0,134, 7, 4, 0,135, 7, 4, 0,136, 7, 4, 1, 12, 0, - 7, 0,137, 7, 7, 0,138, 7, 7, 0,139, 7, 7, 0,140, 7, 7, 0,141, 7, 7, 0,142, 7, 7, 0,143, 7, 7, 0,144, 7, - 7, 0,145, 7, 7, 0,146, 7, 4, 0,154, 2, 4, 0,147, 7, 5, 1, 2, 0, 7, 0,219, 4, 7, 0, 37, 0, 6, 1, 5, 0, - 7, 0,148, 7, 7, 0,149, 7, 4, 0, 90, 0, 4, 0,116, 2, 4, 0,150, 7, 7, 1, 6, 0, 7, 1, 0, 0, 7, 1, 1, 0, - 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,151, 7, 2, 0, 57, 0, 8, 1, 8, 0, 8, 1, 0, 0, 8, 1, 1, 0, 2, 0, 17, 0, - 2, 0, 19, 0, 2, 0,151, 7, 2, 0, 57, 0, 7, 0, 23, 0, 7, 0,126, 0, 9, 1, 45, 0, 9, 1, 0, 0, 9, 1, 1, 0, - 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,151, 7, 2, 0,210, 0, 2, 0,182, 3, 2, 0,152, 7, 7, 0,153, 7, 7, 0, 89, 0, - 7, 0,167, 2, 4, 0,154, 7, 4, 0, 82, 0, 4, 0,118, 2, 7, 0,155, 7, 7, 0,156, 7, 7, 0,157, 7, 7, 0,158, 7, - 7, 0,159, 7, 7, 0,160, 7, 7, 0,164, 2, 7, 0,254, 0, 7, 0,161, 7, 7, 0,162, 7, 7, 0, 37, 0, 7, 0,163, 7, - 7, 0,164, 7, 7, 0,165, 7, 2, 0,166, 7, 2, 0,167, 7, 2, 0,168, 7, 2, 0,169, 7, 2, 0,170, 7, 2, 0,171, 7, - 2, 0,172, 7, 2, 0,173, 7, 2, 0,136, 5, 2, 0,174, 7, 2, 0,210, 1, 2, 0,175, 7, 0, 0,176, 7, 0, 0,177, 7, - 7, 0,208, 0, 10, 1,178, 7, 64, 0,163, 1, 11, 1, 16, 0, 11, 1, 0, 0, 11, 1, 1, 0, 2, 0, 17, 0, 2, 0, 19, 0, - 2, 0,151, 7, 2, 0,210, 0, 7, 0,159, 2, 7, 0,160, 2, 7, 0,161, 2, 7, 0,255, 1, 7, 0,162, 2, 7, 0,163, 2, - 7, 0,179, 7, 7, 0,164, 2, 7, 0,166, 2, 7, 0,167, 2,213, 0, 5, 0, 2, 0, 17, 0, 2, 0, 69, 7, 2, 0, 19, 0, - 2, 0,180, 7, 27, 0, 12, 6,212, 0, 3, 0, 4, 0, 69, 0, 4, 0,181, 7,213, 0, 2, 0, 12, 1, 7, 0, 12, 1, 0, 0, - 12, 1, 1, 0, 0, 0, 20, 0, 2, 0, 17, 0, 2, 0, 19, 0, 4, 0, 22, 0, 9, 0,182, 7, 13, 1, 5, 0, 0, 0, 20, 0, - 7, 0, 18, 1, 7, 0,183, 7, 4, 0,184, 7, 4, 0, 37, 0, 14, 1, 4, 0, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0, 43, 0, - 2, 0, 70, 0, 15, 1, 4, 0, 0, 0, 20, 0, 63, 0,185, 7, 7, 0, 18, 1, 7, 0, 37, 0, 16, 1, 6, 0, 2, 0,186, 7, - 2, 0,187, 7, 2, 0, 17, 0, 2, 0,188, 7, 0, 0,189, 7, 0, 0,190, 7, 17, 1, 5, 0, 4, 0, 17, 0, 4, 0, 37, 0, - 0, 0, 20, 0, 0, 0,191, 7, 0, 0,192, 7, 18, 1, 3, 0, 4, 0, 17, 0, 4, 0, 37, 0, 0, 0, 20, 0, 19, 1, 4, 0, - 2, 0,193, 7, 2, 0,194, 7, 2, 0, 19, 0, 2, 0, 37, 0, 20, 1, 6, 0, 0, 0, 20, 0, 0, 0,195, 7, 2, 0,196, 7, - 2, 0,164, 2, 2, 0, 11, 1, 2, 0, 70, 0, 21, 1, 5, 0, 0, 0, 20, 0, 7, 0,109, 0, 7, 0, 12, 4, 2, 0, 19, 0, - 2, 0,130, 2, 22, 1, 3, 0, 0, 0, 20, 0, 4, 0,118, 2, 4, 0,193, 7, 23, 1, 7, 0, 0, 0, 20, 0, 7, 0, 12, 4, - 0, 0,197, 7, 0, 0,198, 7, 2, 0, 11, 1, 2, 0, 43, 0, 4, 0,199, 7, 24, 1, 3, 0, 32, 0,200, 7, 0, 0,201, 7, - 0, 0,202, 7, 25, 1, 18, 0, 25, 1, 0, 0, 25, 1, 1, 0, 2, 0, 17, 0, 2, 0,203, 7, 2, 0, 19, 0, 2, 0,204, 7, - 2, 0,205, 7, 2, 0,206, 7, 2, 0, 43, 0, 2, 0, 70, 0, 0, 0, 20, 0, 9, 0, 2, 0, 26, 1,207, 7, 32, 0, 45, 0, - 2, 0,229, 4, 2, 0,112, 7, 2, 0,208, 7, 2, 0, 37, 0, 27, 1, 11, 0, 0, 0, 20, 0, 0, 0, 17, 0, 0, 0,209, 7, - 2, 0, 19, 0, 2, 0,130, 2, 2, 0,210, 7, 4, 0,211, 7, 4, 0,212, 7, 4, 0,213, 7, 4, 0,214, 7, 4, 0,215, 7, - 28, 1, 1, 0, 0, 0,216, 7, 29, 1, 4, 0, 42, 0,238, 5, 0, 0,217, 7, 4, 0, 11, 1, 4, 0, 19, 0, 26, 1, 18, 0, - 26, 1, 0, 0, 26, 1, 1, 0, 26, 1,218, 7, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,219, 7, 2, 0,206, 7, 2, 0,203, 7, - 2, 0,220, 7, 2, 0, 70, 0, 2, 0,160, 1, 0, 0, 20, 0, 9, 0, 2, 0, 30, 1,207, 7, 25, 1,221, 7, 2, 0, 15, 0, - 2, 0,222, 7, 4, 0,223, 7, 31, 1, 3, 0, 4, 0,190, 2, 4, 0, 37, 0, 32, 0, 45, 0, 32, 1, 12, 0,151, 0,224, 7, - 2, 0, 17, 0, 2, 0, 19, 0, 4, 0,153, 7, 4, 0, 89, 0, 0, 0, 20, 0, 0, 0,225, 7, 2, 0,226, 7, 2, 0,227, 7, - 2, 0,228, 7, 2, 0,229, 7, 7, 0,230, 7, 33, 1, 10, 0, 2, 0, 19, 0, 2, 0,231, 7, 4, 0,153, 7, 4, 0, 89, 0, - 2, 0,232, 7,255, 0,110, 7, 2, 0, 17, 0, 2, 0,233, 7, 2, 0,234, 7, 2, 0,235, 7, 34, 1, 7, 0, 2, 0, 19, 0, - 2, 0,231, 7, 4, 0,153, 7, 4, 0, 89, 0, 2, 0, 17, 0, 2, 0,236, 7, 7, 0,139, 3, 35, 1, 11, 0, 4, 0,190, 2, - 2, 0, 17, 0, 2, 0, 19, 0, 32, 0, 45, 0, 77, 0,237, 7, 0, 0, 20, 0, 7, 0,238, 7, 7, 0,239, 7, 7, 0, 42, 3, - 2, 0,240, 7, 2, 0,241, 7, 36, 1, 5, 0, 2, 0, 17, 0, 2, 0, 19, 0, 4, 0, 37, 0, 46, 0,134, 0, 32, 0, 68, 5, - 37, 1, 5, 0, 4, 0, 19, 0, 4, 0, 17, 0, 0, 0, 20, 0, 0, 0,191, 7, 32, 0, 45, 0, 38, 1, 13, 0, 2, 0, 19, 0, - 2, 0, 17, 0, 2, 0,203, 7, 2, 0, 43, 3, 7, 0,242, 7, 7, 0,243, 7, 7, 0, 6, 1, 7, 0, 7, 1, 7, 0, 19, 3, - 7, 0, 22, 3, 7, 0,244, 7, 7, 0,245, 7, 32, 0,246, 7, 39, 1, 10, 0, 2, 0, 19, 0, 2, 0, 17, 0, 4, 0,153, 7, - 4, 0, 89, 0, 0, 0, 20, 0, 0, 0,225, 7, 2, 0, 43, 0, 2, 0, 64, 0, 2, 0,247, 7, 2, 0,248, 7, 40, 1, 8, 0, - 32, 0, 45, 0, 7, 0,161, 2, 7, 0,249, 7, 7, 0,250, 7, 7, 0,156, 2, 2, 0, 19, 0, 2, 0,130, 2, 7, 0,251, 7, - 41, 1, 12, 0, 2, 0, 17, 0, 2, 0, 11, 1, 2, 0, 19, 0, 2, 0,164, 2, 2, 0,190, 2, 2, 0,252, 7, 4, 0, 37, 0, - 7, 0,253, 7, 7, 0,254, 7, 7, 0,255, 7, 7, 0, 0, 8, 0, 0, 1, 8, 42, 1, 10, 0, 2, 0, 19, 0, 2, 0, 17, 0, - 4, 0,153, 7, 4, 0, 89, 0, 0, 0, 20, 0, 2, 0, 77, 1, 2, 0, 64, 0, 2, 0,247, 7, 2, 0,248, 7, 64, 0,163, 1, - 43, 1, 7, 0, 4, 0,118, 2, 4, 0, 2, 8, 4, 0, 3, 8, 4, 0, 4, 8, 7, 0, 5, 8, 7, 0, 6, 8, 0, 0,197, 7, - 44, 1, 7, 0, 0, 0, 7, 8, 32, 0, 8, 8, 0, 0,201, 7, 2, 0, 9, 8, 2, 0, 43, 0, 4, 0, 70, 0, 0, 0,202, 7, - 45, 1, 6, 0, 2, 0, 19, 0, 2, 0, 17, 0, 4, 0,153, 7, 4, 0, 89, 0, 0, 0, 10, 8, 0, 0, 11, 8, 46, 1, 1, 0, - 4, 0, 19, 0, 47, 1, 6, 0, 0, 0, 92, 0, 2, 0, 17, 0, 2, 0, 19, 0, 4, 0, 12, 8, 7, 0, 13, 8, 42, 0,238, 5, - 48, 1, 4, 0, 0, 0,179, 0, 2, 0, 19, 0, 4, 0, 17, 0, 32, 0, 45, 0, 49, 1, 2, 0, 4, 0, 17, 0, 4, 0,161, 5, - 30, 1, 10, 0, 30, 1, 0, 0, 30, 1, 1, 0, 30, 1,218, 7, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,203, 7, 2, 0, 14, 8, - 0, 0, 20, 0, 9, 0, 2, 0, 32, 0, 45, 0, 50, 1, 10, 0, 7, 0, 42, 3, 7, 0, 15, 8, 7, 0, 16, 8, 7, 0, 17, 8, - 7, 0, 18, 8, 4, 0, 19, 0, 7, 0,252, 7, 7, 0, 19, 8, 7, 0, 20, 8, 7, 0, 37, 0,255, 0, 20, 0, 27, 0, 31, 0, - 0, 0,190, 0, 51, 1, 21, 8, 9, 0, 22, 8, 43, 0,149, 0, 43, 0, 23, 8, 9, 0, 24, 8, 36, 0, 80, 0, 7, 0,139, 3, - 7, 0, 25, 8, 7, 0, 26, 8, 7, 0, 27, 8, 7, 0, 28, 8, 7, 0, 29, 8, 7, 0, 30, 8, 4, 0, 90, 0, 4, 0, 31, 8, - 0, 0, 32, 8, 0, 0, 33, 8, 0, 0, 34, 8, 52, 1, 6, 0, 27, 0, 31, 0, 7, 0, 35, 8, 7, 0, 36, 8, 7, 0, 37, 8, - 2, 0, 38, 8, 2, 0, 39, 8, 53, 1, 15, 0,198, 0, 0, 0,198, 0, 1, 0, 12, 0,123, 5, 4, 0,124, 5, 7, 0,125, 5, -241, 0, 40, 8,199, 0,181, 5,255, 0,110, 7, 2, 0, 11, 1, 2, 0,231, 7, 2, 0, 14, 2, 2, 0, 15, 2, 2, 0, 19, 0, - 2, 0,186, 5, 4, 0, 70, 0, 54, 1, 6, 0, 54, 1, 0, 0, 54, 1, 1, 0, 32, 0, 45, 0, 9, 0, 41, 8, 4, 0,215, 0, - 4, 0, 37, 0, 64, 0, 4, 0, 27, 0, 31, 0, 12, 0, 42, 8, 4, 0,131, 0, 7, 0, 43, 8, 55, 1, 25, 0, 55, 1, 0, 0, - 55, 1, 1, 0, 55, 1, 38, 0, 12, 0, 44, 8, 0, 0, 20, 0, 7, 0, 45, 8, 7, 0, 46, 8, 7, 0, 47, 8, 7, 0, 48, 8, - 4, 0, 19, 0, 7, 0, 49, 8, 7, 0, 50, 8, 7, 0, 51, 8, 7, 0, 18, 1, 7, 0,220, 1, 7, 0, 52, 8, 7, 0,116, 2, - 7, 0, 53, 8, 7, 0, 54, 8, 7, 0, 55, 8, 7, 0, 56, 8, 7, 0, 57, 8, 7, 0,172, 0, 2, 0,131, 0, 2, 0, 6, 5, - 56, 1, 21, 0, 27, 0, 31, 0, 12, 0, 58, 8, 12, 0, 59, 8, 12, 0, 60, 8, 9, 0, 61, 8, 4, 0, 19, 0, 4, 0,132, 5, - 2, 0,168, 2, 2, 0,192, 5, 2, 0,131, 0, 2, 0, 62, 8, 2, 0, 63, 8, 2, 0, 64, 8, 2, 0, 65, 8, 2, 0, 66, 8, - 4, 0, 67, 8, 4, 0, 68, 8, 4, 0, 69, 8, 4, 0, 70, 8, 4, 0, 71, 8, 4, 0, 72, 8, 57, 1, 38, 0, 57, 1, 0, 0, - 57, 1, 1, 0, 26, 0, 73, 8, 12, 0, 69, 3, 0, 0, 20, 0, 2, 0, 19, 0, 2, 0, 74, 8, 2, 0, 75, 8, 2, 0, 76, 8, - 2, 0, 28, 3, 2, 0, 77, 8, 4, 0,253, 1, 4, 0, 69, 8, 4, 0, 70, 8, 55, 1, 78, 8, 57, 1, 38, 0, 57, 1, 79, 8, - 12, 0, 80, 8, 9, 0, 81, 8, 9, 0, 82, 8, 9, 0, 83, 8, 7, 0, 6, 1, 7, 0,172, 0, 7, 0, 84, 8, 7, 0,200, 1, - 2, 0, 85, 8, 2, 0, 37, 0, 7, 0, 86, 8, 7, 0, 87, 8, 7, 0, 24, 3, 7, 0, 88, 8, 7, 0, 89, 8, 7, 0, 90, 8, - 7, 0, 91, 8, 7, 0, 92, 8, 7, 0, 93, 8, 7, 0,250, 1, 32, 0, 94, 8,152, 0, 9, 0, 12, 0, 95, 8, 2, 0, 19, 0, - 2, 0, 96, 8, 7, 0, 26, 2, 7, 0, 97, 8, 7, 0, 98, 8, 12, 0, 99, 8, 4, 0,100, 8, 4, 0, 37, 0, 58, 1, 7, 0, - 58, 1, 0, 0, 58, 1, 1, 0, 12, 0, 32, 8, 4, 0, 19, 0, 4, 0,101, 8, 0, 0,132, 3,232, 0,102, 8,151, 0, 7, 0, - 27, 0, 31, 0, 12, 0,103, 8, 12, 0, 95, 8, 12, 0,104, 8, 12, 0,100, 0, 4, 0, 19, 0, 4, 0,105, 8,203, 0, 4, 0, - 27, 0,106, 8, 12, 0, 95, 8, 4, 0,107, 8, 4, 0, 19, 0, 59, 1, 17, 0,198, 0, 0, 0,198, 0, 1, 0, 12, 0,123, 5, - 4, 0,124, 5, 7, 0,125, 5, 2, 0,126, 5,199, 0,181, 5,151, 0, 11, 3,203, 0,108, 8, 0, 0, 11, 1, 0, 0,184, 5, - 2, 0, 19, 0, 2, 0,109, 8, 2, 0,185, 5, 2, 0,186, 5, 2, 0,110, 8, 7, 0,111, 8, 60, 1, 8, 0, 60, 1, 0, 0, - 60, 1, 1, 0, 58, 1,112, 8, 36, 0, 80, 0, 12, 0, 14, 3, 4, 0, 19, 0, 0, 0, 20, 0, 4, 0,113, 8, 61, 1, 5, 0, - 61, 1, 0, 0, 61, 1, 1, 0, 36, 0, 80, 0, 2, 0, 19, 0, 0, 0,114, 8, 62, 1, 12, 0, 62, 1, 0, 0, 62, 1, 1, 0, - 9, 0, 2, 0, 2, 0, 17, 0, 2, 0, 19, 0, 0, 0,115, 8, 0, 0,116, 8, 0, 0,114, 8, 7, 0,117, 8, 7, 0,118, 8, - 4, 0, 37, 0, 36, 0, 80, 0, 63, 1, 9, 0, 63, 1, 0, 0, 63, 1, 1, 0, 32, 0,119, 8, 0, 0,120, 8, 7, 0,121, 8, - 2, 0,122, 8, 2, 0, 19, 0, 2, 0, 17, 0, 2, 0, 37, 0, 64, 1, 7, 0, 42, 0,238, 5, 26, 0, 73, 8, 4, 0, 19, 0, - 4, 0,123, 8, 12, 0,124, 8, 32, 0,119, 8, 0, 0,120, 8, 65, 1, 12, 0, 32, 0,119, 8, 2, 0,125, 8, 2, 0, 19, 0, - 2, 0,126, 8, 2, 0,127, 8, 0, 0,120, 8, 32, 0,128, 8, 0, 0,129, 8, 7, 0,130, 8, 7, 0,220, 1, 7, 0,131, 8, - 7, 0,132, 8, 66, 1, 6, 0, 32, 0,119, 8, 4, 0,133, 8, 4, 0,134, 8, 4, 0, 90, 0, 4, 0, 37, 0, 0, 0,120, 8, - 67, 1, 4, 0, 32, 0,119, 8, 4, 0, 19, 0, 4, 0,133, 8, 0, 0,120, 8, 68, 1, 4, 0, 32, 0,119, 8, 4, 0, 19, 0, - 4, 0,133, 8, 0, 0,120, 8, 69, 1, 10, 0, 32, 0,119, 8, 4, 0,135, 8, 7, 0,125, 0, 4, 0, 19, 0, 2, 0,234, 5, - 2, 0,136, 8, 2, 0, 43, 0, 2, 0, 70, 0, 7, 0,137, 8, 0, 0,120, 8, 70, 1, 4, 0, 32, 0,119, 8, 4, 0, 19, 0, - 4, 0,133, 8, 0, 0,120, 8, 71, 1, 10, 0, 32, 0,119, 8, 2, 0, 17, 0, 2, 0,190, 3, 4, 0, 88, 0, 4, 0, 89, 0, - 7, 0,249, 7, 7, 0,250, 7, 4, 0, 37, 0,151, 0,224, 7, 0, 0,120, 8, 72, 1, 4, 0, 32, 0,119, 8, 4, 0, 29, 3, - 4, 0,138, 8, 0, 0,120, 8, 73, 1, 5, 0, 32, 0,119, 8, 7, 0,125, 0, 4, 0,139, 8, 4, 0, 29, 3, 4, 0, 30, 3, - 74, 1, 6, 0, 32, 0,119, 8, 4, 0,140, 8, 4, 0,141, 8, 7, 0,142, 8, 7, 0,143, 8, 0, 0,120, 8, 75, 1, 16, 0, - 32, 0,119, 8, 32, 0, 79, 8, 4, 0, 17, 0, 7, 0,144, 8, 7, 0,145, 8, 7, 0,146, 8, 7, 0,147, 8, 7, 0,148, 8, - 7, 0,149, 8, 7, 0,150, 8, 7, 0,151, 8, 7, 0,152, 8, 2, 0, 19, 0, 2, 0, 37, 0, 2, 0, 43, 0, 2, 0, 70, 0, - 76, 1, 3, 0, 32, 0,119, 8, 4, 0, 19, 0, 4, 0,136, 5, 77, 1, 5, 0, 32, 0,119, 8, 4, 0, 19, 0, 4, 0, 37, 0, - 7, 0,153, 8, 0, 0,120, 8, 78, 1, 10, 0, 32, 0,119, 8, 0, 0,120, 8, 2, 0,154, 8, 2, 0,155, 8, 0, 0,156, 8, - 0, 0,157, 8, 7, 0,158, 8, 7, 0,159, 8, 7, 0,160, 8, 7, 0,161, 8, 79, 1, 8, 0, 7, 0, 9, 0, 7, 0, 10, 0, - 7, 0, 11, 0, 7, 0, 12, 0, 7, 0,162, 8, 7, 0,163, 8, 2, 0, 19, 0, 2, 0,136, 5, 80, 1, 8, 0, 7, 0, 9, 0, - 7, 0, 10, 0, 7, 0, 11, 0, 7, 0, 12, 0, 7, 0,162, 8, 7, 0,163, 8, 2, 0, 19, 0, 2, 0,136, 5, 81, 1, 8, 0, - 7, 0, 9, 0, 7, 0, 10, 0, 7, 0, 11, 0, 7, 0, 12, 0, 7, 0,162, 8, 7, 0,163, 8, 2, 0, 19, 0, 2, 0,136, 5, - 82, 1, 7, 0, 32, 0,119, 8, 0, 0,120, 8, 7, 0, 18, 1, 7, 0, 28, 1, 2, 0, 19, 0, 2, 0, 11, 1, 4, 0, 37, 0, - 83, 1, 5, 0, 32, 0,228, 2, 7, 0, 18, 1, 2, 0,232, 2, 0, 0,234, 2, 0, 0,164, 8, 84, 1, 10, 0, 84, 1, 0, 0, - 84, 1, 1, 0, 2, 0, 17, 0, 2, 0, 19, 0, 0, 0,165, 8, 7, 0,217, 0, 7, 0,218, 0, 2, 0, 32, 8, 2, 0,166, 8, - 32, 0, 45, 0, 85, 1, 22, 0, 85, 1, 0, 0, 85, 1, 1, 0, 2, 0, 19, 0, 2, 0, 11, 1, 2, 0,167, 8, 2, 0,168, 8, - 36, 0, 80, 0,151, 0,224, 7, 32, 0,164, 0, 7, 0, 88, 0, 7, 0, 89, 0, 7, 0,169, 8, 7, 0,170, 8, 7, 0,171, 8, - 7, 0,172, 8, 7, 0,157, 2, 7, 0,173, 8, 7, 0,226, 7, 7, 0,174, 8, 0, 0,175, 8, 0, 0,176, 8, 12, 0, 16, 3, - 86, 1, 8, 0, 7, 0,228, 1, 7, 0,249, 7, 7, 0,250, 7, 9, 0, 2, 0, 2, 0,177, 8, 2, 0,178, 8, 2, 0,179, 8, - 2, 0,180, 8, 87, 1, 18, 0, 87, 1, 0, 0, 87, 1, 1, 0, 87, 1,181, 8, 0, 0, 20, 0, 86, 1,182, 8, 2, 0, 17, 0, - 2, 0, 19, 0, 2, 0,183, 8, 2, 0,184, 8, 2, 0,185, 8, 2, 0,186, 8, 4, 0, 43, 0, 7, 0,187, 8, 7, 0,188, 8, - 4, 0,189, 8, 4, 0,190, 8, 87, 1,191, 8, 88, 1,192, 8, 89, 1, 33, 0, 89, 1, 0, 0, 89, 1, 1, 0, 89, 1,193, 8, - 0, 0, 20, 0, 0, 0,194, 8, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0, 79, 7, 2, 0,112, 7, 2, 0,195, 8, 2, 0,133, 0, - 2, 0,184, 8, 2, 0, 69, 7, 12, 0,219, 7, 12, 0,196, 8, 27, 0, 12, 6, 9, 0,197, 8, 7, 0,187, 8, 7, 0,188, 8, - 7, 0,255, 1, 7, 0,198, 8, 2, 0,199, 8, 2, 0,200, 8, 7, 0,201, 8, 7, 0,202, 8, 2, 0,203, 8, 2, 0,204, 8, - 9, 0,205, 8, 24, 0,206, 8, 24, 0,207, 8, 24, 0,208, 8, 90, 1,150, 0, 91, 1,209, 8, 88, 1, 8, 0, 88, 1, 0, 0, - 88, 1, 1, 0, 89, 1,210, 8, 89, 1,211, 8, 87, 1,212, 8, 87, 1,191, 8, 4, 0, 19, 0, 4, 0, 37, 0, 58, 0, 20, 0, - 27, 0, 31, 0, 39, 0, 75, 0, 12, 0,213, 8, 12, 0,214, 8, 86, 1,215, 8, 12, 0,216, 8, 4, 0, 17, 0, 4, 0,217, 8, - 4, 0,218, 8, 4, 0,219, 8, 12, 0,220, 8, 91, 1,221, 8, 87, 1,222, 8, 87, 1,223, 8, 9, 0,224, 8, 9, 0,225, 8, - 4, 0,226, 8, 9, 0,227, 8, 9, 0,228, 8, 9, 0,229, 8, 92, 1, 6, 0, 4, 0,124, 0, 4, 0,126, 0, 4, 0, 69, 7, - 0, 0,230, 8, 0, 0,231, 8, 2, 0, 37, 0, 93, 1, 16, 0, 2, 0, 25, 7, 2, 0, 26, 7, 2, 0,232, 8, 2, 0, 16, 8, - 2, 0,233, 8, 2, 0, 68, 0, 7, 0,156, 2, 7, 0,234, 8, 7, 0,235, 8, 2, 0, 32, 1, 0, 0,236, 8, 0, 0,245, 4, - 2, 0,237, 8, 2, 0, 37, 0, 4, 0,238, 8, 4, 0,239, 8, 94, 1, 9, 0, 7, 0,240, 8, 7, 0,241, 8, 7, 0, 30, 8, - 7, 0,109, 0, 7, 0,242, 8, 7, 0,198, 5, 2, 0,243, 8, 0, 0,244, 8, 0, 0, 37, 0, 95, 1, 4, 0, 7, 0,245, 8, - 7, 0,246, 8, 2, 0,243, 8, 2, 0, 37, 0, 96, 1, 3, 0, 7, 0,247, 8, 7, 0,248, 8, 7, 0, 15, 0, 97, 1, 7, 0, - 0, 0,190, 1, 2, 0,123, 4, 2, 0,124, 4, 2, 0,125, 4, 2, 0, 76, 4, 4, 0,126, 0, 4, 0,188, 3, 98, 1, 7, 0, - 7, 0,249, 8, 7, 0,250, 8, 7, 0,251, 8, 7, 0, 10, 2, 7, 0,252, 8, 7, 0,253, 8, 7, 0,254, 8, 99, 1, 4, 0, - 2, 0,255, 8, 2, 0, 0, 9, 2, 0, 1, 9, 2, 0, 2, 9,100, 1, 2, 0, 7, 0, 5, 0, 7, 0, 6, 0,101, 1, 2, 0, - 0, 0,166, 0, 0, 0, 3, 9,102, 1, 1, 0, 0, 0, 20, 0,103, 1, 10, 0, 0, 0, 4, 9, 0, 0, 5, 9, 0, 0,191, 5, - 0, 0, 6, 9, 2, 0,232, 8, 2, 0, 7, 9, 7, 0, 8, 9, 7, 0, 9, 9, 7, 0, 10, 9, 7, 0,173, 8,104, 1, 2, 0, - 9, 0, 11, 9, 9, 0, 12, 9,105, 1, 11, 0, 0, 0,125, 4, 0, 0, 17, 0, 0, 0,243, 8, 0, 0,109, 0, 0, 0, 13, 9, - 0, 0,106, 0, 0, 0,179, 0, 7, 0, 14, 9, 7, 0, 15, 9, 7, 0, 16, 9, 7, 0, 17, 9,106, 1, 8, 0, 7, 0,186, 7, - 7, 0,125, 0, 7, 0,245, 4, 7, 0, 82, 2, 7, 0, 18, 9, 7, 0,204, 0, 7, 0, 19, 9, 4, 0, 17, 0,107, 1, 4, 0, - 2, 0, 20, 9, 2, 0, 21, 9, 2, 0, 22, 9, 2, 0, 37, 0,108, 1, 1, 0, 0, 0, 20, 0,109, 1, 4, 0, 7, 0, 5, 0, - 7, 0, 6, 0, 2, 0, 19, 0, 2, 0, 23, 9,110, 1, 10, 0, 2, 0,124, 3, 2, 0, 19, 0, 7, 0, 12, 4, 7, 0, 24, 9, - 7, 0, 25, 9, 7, 0, 26, 9, 7, 0, 27, 9,109, 1, 28, 9,109, 1, 29, 9,109, 1, 30, 9, 61, 0, 9, 0, 4, 0, 19, 0, - 4, 0, 64, 0, 24, 0, 31, 9, 24, 0, 32, 9,110, 1, 33, 9, 7, 0, 34, 9, 7, 0, 35, 9, 7, 0, 36, 9, 7, 0, 37, 9, -111, 1, 4, 0, 47, 0,150, 2, 7, 0, 38, 9, 7, 0, 93, 1, 7, 0, 37, 0,177, 0, 17, 0, 27, 0, 31, 0,111, 1, 39, 9, - 61, 0, 28, 9, 51, 0, 75, 1, 2, 0, 19, 0, 2, 0, 90, 5, 4, 0,106, 0, 7, 0, 40, 9, 7, 0, 7, 2, 7, 0, 41, 9, - 7, 0, 42, 9, 7, 0, 93, 1, 7, 0, 43, 9, 2, 0, 45, 1, 0, 0, 44, 9, 0, 0,117, 3, 0, 0, 92, 0,112, 1, 10, 0, - 4, 0, 17, 0, 4, 0,125, 0, 4, 0, 19, 0, 4, 0, 90, 3, 4, 0, 45, 9, 4, 0, 46, 9, 4, 0, 47, 9, 0, 0, 92, 0, - 0, 0, 20, 0, 9, 0, 2, 0, 88, 0, 6, 0,112, 1, 48, 9, 4, 0, 49, 9, 4, 0, 50, 9, 4, 0, 51, 9, 4, 0, 37, 0, - 9, 0, 52, 9,113, 1, 5, 0, 7, 0, 77, 2, 7, 0,190, 2, 7, 0,220, 1, 2, 0, 53, 9, 2, 0, 37, 0,114, 1, 5, 0, - 7, 0, 77, 2, 7, 0, 54, 9, 7, 0, 55, 9, 7, 0, 56, 9, 7, 0,190, 2,115, 1, 7, 0, 4, 0, 57, 9, 4, 0, 58, 9, - 4, 0, 59, 9, 7, 0, 60, 9, 7, 0, 61, 9, 7, 0, 62, 9, 7, 0, 63, 9,116, 1, 8, 0,116, 1, 0, 0,116, 1, 1, 0, - 32, 0, 45, 0, 4, 0,215, 2, 2, 0, 19, 0, 2, 0, 11, 1, 7, 0,190, 2, 7, 0,194, 7,117, 1, 24, 0, 32, 0, 64, 9, -114, 1, 86, 3,114, 1, 65, 9,113, 1, 66, 9,114, 1,178, 7,118, 1, 67, 9, 7, 0, 68, 9, 7, 0, 69, 9, 7, 0, 70, 9, - 7, 0, 61, 9, 7, 0, 62, 9, 7, 0,190, 2, 7, 0,167, 2, 7, 0, 71, 9, 7, 0,106, 0, 7, 0, 72, 9, 4, 0, 57, 9, - 4, 0, 73, 9, 4, 0, 82, 0, 4, 0, 74, 9, 2, 0, 19, 0, 2, 0, 75, 9, 2, 0, 76, 9, 2, 0,120, 3,119, 1,107, 0, - 27, 0, 31, 0, 39, 0, 75, 0,120, 1, 77, 9, 4, 0, 19, 0, 2, 0, 17, 0, 2, 0,154, 8, 2, 0, 78, 9, 2, 0, 79, 9, - 2, 0, 85, 8, 2, 0, 80, 9, 2, 0, 81, 9, 2, 0, 82, 9, 2, 0, 83, 9, 2, 0, 84, 9, 2, 0, 85, 9, 2, 0, 86, 9, - 2, 0,120, 3, 2, 0, 87, 9, 2, 0, 88, 9, 2, 0, 89, 9, 2, 0, 90, 9, 2, 0, 91, 9, 2, 0, 92, 9, 2, 0,210, 1, - 2, 0,171, 7, 2, 0,147, 7, 2, 0, 93, 9, 2, 0, 94, 9, 2, 0,118, 3, 2, 0,119, 3, 2, 0, 95, 9, 2, 0, 96, 9, - 2, 0, 97, 9, 2, 0, 98, 9, 7, 0, 99, 9, 7, 0,100, 9, 7, 0,101, 9, 2, 0,102, 9, 2, 0,103, 9, 7, 0,104, 9, - 7, 0,105, 9, 7, 0,106, 9, 7, 0,153, 7, 7, 0, 89, 0, 7, 0,167, 2, 7, 0,159, 7, 7, 0,107, 9, 7, 0,108, 9, - 7, 0,109, 9, 4, 0,154, 7, 4, 0,152, 7, 4, 0,110, 9, 7, 0,155, 7, 7, 0,156, 7, 7, 0,157, 7, 7, 0,111, 9, - 7, 0,112, 9, 7, 0,113, 9, 7, 0,114, 9, 7, 0,115, 9, 7, 0,116, 9, 7, 0,117, 9, 7, 0,118, 9, 7, 0, 42, 3, - 7, 0,106, 0, 7, 0,119, 9, 7, 0,120, 9, 7, 0,121, 9, 7, 0,122, 9, 7, 0,123, 9, 7, 0,124, 9, 7, 0,125, 9, - 4, 0,126, 9, 4, 0,127, 9, 7, 0,128, 9, 7, 0,129, 9, 7, 0,130, 9, 7, 0,131, 9, 7, 0,132, 9, 7, 0,133, 9, - 7, 0,134, 9, 7, 0,114, 3, 7, 0,112, 3, 7, 0,113, 3, 7, 0,135, 9, 7, 0,136, 9, 7, 0,137, 9, 7, 0,138, 9, - 7, 0,139, 9, 7, 0,140, 9, 7, 0,141, 9, 7, 0,142, 9, 7, 0,143, 9, 7, 0,144, 9, 7, 0,145, 9, 7, 0,146, 9, - 7, 0,147, 9, 4, 0,148, 9, 4, 0,149, 9, 7, 0,150, 9, 64, 0, 75, 3, 64, 0,151, 9, 32, 0,152, 9, 32, 0,153, 9, - 36, 0, 80, 0,154, 0, 73, 3,154, 0,154, 9,141, 0, 41, 0,141, 0, 0, 0,141, 0, 1, 0,119, 1,155, 9,117, 1,165, 3, -115, 1, 79, 8,121, 1,156, 9, 9, 0,157, 9,122, 1,158, 9,122, 1,159, 9, 12, 0,160, 9, 12, 0,161, 9,155, 0, 74, 3, - 32, 0,162, 9, 32, 0,163, 9, 32, 0, 38, 0, 12, 0,164, 9, 12, 0,165, 9, 12, 0,124, 8, 0, 0, 20, 0, 7, 0,208, 0, - 7, 0,194, 2, 7, 0,166, 9, 4, 0,118, 2, 4, 0, 19, 0, 4, 0,154, 7, 4, 0,167, 9, 4, 0,168, 9, 4, 0,169, 9, - 2, 0,215, 0, 2, 0,170, 9, 2, 0,171, 9, 2, 0, 67, 3, 2, 0,172, 9, 2, 0,120, 3, 0, 0,173, 9, 2, 0,174, 9, - 2, 0,175, 9, 2, 0,176, 9, 9, 0,177, 9,130, 0,209, 3,123, 1,178, 9,128, 0, 34, 0,124, 1,179, 9, 7, 0,179, 3, - 7, 0,180, 9, 7, 0,181, 9, 7, 0, 15, 4, 7, 0,182, 9, 7, 0, 52, 3, 7, 0, 42, 3, 7, 0,183, 9, 7, 0, 9, 2, - 7, 0,184, 9, 7, 0,185, 9, 7, 0,186, 9, 7, 0,187, 9, 7, 0,188, 9, 7, 0,189, 9, 7, 0,180, 3, 7, 0,190, 9, - 7, 0,191, 9, 7, 0,192, 9, 7, 0,181, 3, 7, 0,177, 3, 7, 0,178, 3, 4, 0,193, 9, 4, 0, 90, 0, 4, 0,194, 9, - 4, 0,195, 9, 2, 0,196, 9, 2, 0,197, 9, 2, 0,198, 9, 2, 0,199, 9, 2, 0,200, 9, 2, 0, 37, 0, 4, 0, 70, 0, -129, 0, 8, 0,124, 1,201, 9, 7, 0,202, 9, 7, 0,203, 9, 7, 0,164, 1, 7, 0,204, 9, 4, 0, 90, 0, 2, 0,205, 9, - 2, 0,206, 9,125, 1, 4, 0, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 7, 0, 7, 0,207, 9,126, 1, 6, 0,126, 1, 0, 0, -126, 1, 1, 0,125, 1,208, 9, 4, 0,209, 9, 2, 0,210, 9, 2, 0, 19, 0,127, 1, 5, 0,127, 1, 0, 0,127, 1, 1, 0, - 12, 0,211, 9, 4, 0,212, 9, 4, 0, 19, 0,128, 1, 9, 0,128, 1, 0, 0,128, 1, 1, 0, 12, 0,124, 0,127, 1,213, 9, - 4, 0, 19, 0, 2, 0,210, 9, 2, 0,214, 9, 7, 0, 91, 0, 0, 0,215, 9,191, 0, 6, 0, 27, 0, 31, 0, 12, 0,139, 4, - 4, 0, 19, 0, 2, 0,216, 9, 2, 0,217, 9, 9, 0,218, 9,129, 1, 7, 0,129, 1, 0, 0,129, 1, 1, 0, 2, 0, 17, 0, - 2, 0, 19, 0, 4, 0, 23, 0, 0, 0,219, 9, 0, 0,220, 9,130, 1, 5, 0, 12, 0,221, 9, 4, 0,222, 9, 4, 0,223, 9, - 4, 0, 19, 0, 4, 0, 37, 0,131, 1, 13, 0, 27, 0, 31, 0,132, 1,224, 9,132, 1,225, 9, 12, 0,226, 9, 4, 0,227, 9, - 2, 0,228, 9, 2, 0, 37, 0, 12, 0,229, 9, 12, 0,230, 9,130, 1,231, 9, 12, 0,232, 9, 12, 0,233, 9, 12, 0,234, 9, -132, 1, 30, 0,132, 1, 0, 0,132, 1, 1, 0, 9, 0,235, 9, 4, 0, 4, 7, 4, 0, 37, 0,201, 0,180, 5,201, 0,236, 9, - 0, 0,237, 9, 2, 0,238, 9, 2, 0,239, 9, 2, 0, 25, 7, 2, 0, 26, 7, 2, 0,240, 9, 2, 0,241, 9, 2, 0, 90, 3, - 2, 0, 38, 6, 2, 0,242, 9, 2, 0,243, 9, 4, 0,160, 1,133, 1,244, 9,134, 1,245, 9,135, 1,246, 9, 4, 0,247, 9, - 4, 0,248, 9, 9, 0,249, 9, 12, 0,250, 9, 12, 0,230, 9, 12, 0, 43, 7, 12, 0,251, 9, 12, 0,252, 9,136, 1, 16, 0, -136, 1, 0, 0,136, 1, 1, 0, 0, 0,253, 9,137, 1,254, 9, 2, 0, 17, 0, 2, 0, 15, 0, 2, 0,255, 9, 2, 0, 0, 10, - 2, 0, 1, 10, 2, 0, 2, 10, 2, 0, 3, 10, 2, 0, 4, 10, 2, 0, 5, 10, 2, 0, 6, 10, 2, 0, 70, 0, 2, 0,160, 1, -138, 1, 9, 0,138, 1, 0, 0,138, 1, 1, 0, 12, 0, 7, 10, 0, 0, 8, 10, 2, 0, 9, 10, 2, 0, 10, 10, 2, 0, 11, 10, - 2, 0, 37, 0, 9, 0, 12, 10,209, 0, 10, 0,209, 0, 0, 0,209, 0, 1, 0, 0, 0,253, 9, 26, 0, 30, 0,139, 1, 19, 7, - 9, 0, 13, 10,137, 1,254, 9,130, 1, 14, 10, 12, 0, 15, 10,209, 0, 16, 10,133, 1, 23, 0,133, 1, 0, 0,133, 1, 1, 0, - 2, 0, 17, 0, 2, 0, 15, 0, 2, 0, 5, 0, 2, 0, 6, 0, 2, 0, 17, 10, 2, 0, 18, 10, 2, 0, 19, 10, 2, 0, 20, 10, - 0, 0, 21, 10, 0, 0, 37, 0, 2, 0,255, 9, 2, 0, 0, 10, 2, 0, 1, 10, 2, 0, 2, 10, 2, 0, 3, 10, 2, 0, 43, 0, - 0, 0, 22, 10, 2, 0, 23, 10, 2, 0, 24, 10, 4, 0, 70, 0, 9, 0, 13, 10,140, 1, 8, 0,140, 1, 0, 0,140, 1, 1, 0, - 9, 0, 2, 0, 9, 0, 25, 10, 0, 0,132, 3, 2, 0, 17, 0, 2, 0, 19, 0, 7, 0, 26, 10,141, 1, 5, 0, 7, 0, 27, 10, - 4, 0, 28, 10, 4, 0, 29, 10, 4, 0, 11, 1, 4, 0, 19, 0,142, 1, 6, 0, 7, 0, 30, 10, 7, 0, 31, 10, 7, 0, 32, 10, - 7, 0, 33, 10, 4, 0, 17, 0, 4, 0, 19, 0,143, 1, 5, 0, 7, 0,249, 7, 7, 0,250, 7, 7, 0,190, 2, 2, 0,224, 1, - 2, 0,225, 1,144, 1, 5, 0,143, 1, 2, 0, 4, 0, 54, 0, 7, 0, 34, 10, 7, 0,249, 7, 7, 0,250, 7,145, 1, 4, 0, - 2, 0, 35, 10, 2, 0, 36, 10, 2, 0, 37, 10, 2, 0, 38, 10,146, 1, 2, 0, 42, 0, 9, 6, 26, 0, 73, 8,147, 1, 3, 0, - 24, 0, 39, 10, 4, 0, 19, 0, 4, 0, 37, 0,148, 1, 6, 0, 7, 0,106, 0, 7, 0,142, 2, 7, 0, 40, 10, 7, 0, 37, 0, - 2, 0,214, 0, 2, 0, 41, 10,149, 1, 7, 0,149, 1, 0, 0,149, 1, 1, 0, 27, 0, 12, 6, 0, 0, 42, 10, 4, 0, 43, 10, - 4, 0, 90, 0, 0, 0,132, 3,150, 1, 6, 0, 12, 0,124, 8, 0, 0, 44, 10, 7, 0, 61, 0, 7, 0, 26, 10, 4, 0, 17, 0, - 4, 0, 19, 0,151, 1, 3, 0, 7, 0, 45, 10, 4, 0, 19, 0, 4, 0, 37, 0,152, 1, 15, 0,152, 1, 0, 0,152, 1, 1, 0, - 58, 1,112, 8,150, 1, 62, 0, 12, 0, 16, 3, 35, 0, 50, 0,151, 1, 46, 10, 4, 0, 54, 0, 7, 0, 61, 0, 2, 0, 19, 0, - 2, 0,252, 0, 4, 0, 43, 10, 0, 0, 42, 10, 4, 0, 47, 10, 7, 0, 48, 10,153, 1, 2, 0, 0, 0, 49, 10, 0, 0, 50, 10, -154, 1, 4, 0,154, 1, 0, 0,154, 1, 1, 0,151, 0,228, 2, 12, 0, 51, 10,155, 1, 24, 0,155, 1, 0, 0,155, 1, 1, 0, - 12, 0, 52, 10,151, 0,224, 7,154, 1, 53, 10, 12, 0, 54, 10, 12, 0, 16, 3, 0, 0,132, 3, 7, 0, 26, 10, 7, 0, 55, 10, - 7, 0, 88, 0, 7, 0, 89, 0, 7, 0,169, 8, 7, 0,170, 8, 7, 0,157, 2, 7, 0,173, 8, 7, 0,226, 7, 7, 0,174, 8, - 2, 0, 56, 10, 2, 0, 57, 10, 2, 0, 43, 0, 2, 0, 17, 0, 4, 0, 19, 0, 4, 0, 70, 0,156, 1, 6, 0,156, 1, 0, 0, -156, 1, 1, 0, 12, 0, 52, 10, 4, 0, 19, 0, 4, 0, 81, 2, 0, 0,132, 3,157, 1, 10, 0,157, 1, 0, 0,157, 1, 1, 0, - 27, 0, 12, 6, 0, 0, 58, 10, 4, 0, 59, 10, 4, 0, 60, 10, 0, 0, 42, 10, 4, 0, 43, 10, 2, 0, 19, 0, 2, 0, 61, 10, -158, 1, 6, 0,158, 1, 0, 0,158, 1, 1, 0, 12, 0, 62, 10, 0, 0,132, 3, 4, 0, 19, 0, 4, 0, 63, 10,159, 1, 5, 0, -159, 1, 0, 0,159, 1, 1, 0, 0, 0, 42, 10, 4, 0, 43, 10, 7, 0,134, 2, 39, 0, 9, 0,151, 0, 11, 3,151, 0, 64, 10, -154, 1, 53, 10, 12, 0, 65, 10,155, 1, 66, 10, 12, 0, 67, 10, 12, 0, 68, 10, 4, 0, 19, 0, 4, 0,215, 0,160, 1, 2, 0, - 27, 0, 31, 0, 39, 0, 75, 0,161, 1, 5, 0,161, 1, 0, 0,161, 1, 1, 0, 4, 0, 17, 0, 4, 0, 19, 0, 0, 0, 20, 0, -162, 1, 6, 0,161, 1, 69, 10, 32, 0, 45, 0, 4, 0, 70, 10, 7, 0, 71, 10, 4, 0, 72, 10, 4, 0, 32, 8,163, 1, 3, 0, -161, 1, 69, 10, 4, 0, 70, 10, 7, 0, 73, 10,164, 1, 8, 0,161, 1, 69, 10, 32, 0, 45, 0, 7, 0, 6, 1, 7, 0, 74, 10, - 7, 0,194, 2, 7, 0, 30, 8, 4, 0, 70, 10, 4, 0, 75, 10,165, 1, 5, 0,161, 1, 69, 10, 7, 0, 76, 10, 7, 0,112, 7, - 7, 0,163, 2, 7, 0, 57, 0,166, 1, 3, 0,161, 1, 69, 10, 7, 0, 30, 8, 7, 0, 77, 10,118, 1, 4, 0, 7, 0, 78, 10, - 7, 0,121, 9, 2, 0, 79, 10, 2, 0, 11, 1,167, 1, 14, 0,167, 1, 0, 0,167, 1, 1, 0, 12, 0, 80, 10, 12, 0, 81, 10, - 12, 0, 82, 10, 0, 0, 20, 0, 4, 0, 31, 0, 4, 0, 19, 0, 4, 0, 83, 10, 7, 0, 84, 10, 4, 0, 72, 10, 4, 0, 32, 8, - 7, 0,139, 3, 7, 0,165, 2,120, 1, 23, 0, 4, 0, 70, 10, 4, 0, 85, 10, 7, 0, 86, 10, 7, 0, 57, 0, 7, 0, 87, 10, - 7, 0,161, 2, 7, 0, 78, 10, 7, 0, 88, 10, 7, 0,142, 2, 7, 0, 89, 10, 7, 0, 12, 4, 7, 0, 90, 10, 7, 0, 91, 10, - 7, 0, 92, 10, 7, 0, 93, 10, 7, 0, 94, 10, 7, 0, 95, 10, 7, 0, 96, 10, 7, 0, 97, 10, 7, 0, 98, 10, 7, 0, 99, 10, - 7, 0,100, 10, 12, 0,101, 10, 69, 78, 68, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 97,116, 97, 0, 80, 97,114,116,105, 99,108,101, 73,110,115,116, 97,110, 99,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, + 0, 69,120,112,108,111,100,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77,117,108,116,105,114,101,115, 77,111,100, +105,102,105,101,114, 68, 97,116, 97, 0, 70,108,117,105,100,115,105,109, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 70, +108,117,105,100,115,105,109, 83,101,116,116,105,110,103,115, 0, 83,104,114,105,110,107,119,114, 97,112, 77,111,100,105,102,105, +101,114, 68, 97,116, 97, 0, 83,105,109,112,108,101, 68,101,102,111,114,109, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, + 76, 97,116,116,105, 99,101, 0, 98, 68,101,102,111,114,109, 71,114,111,117,112, 0, 83, 99,117,108,112,116, 83,101,115,115,105, +111,110, 0, 98, 65, 99,116,105,111,110, 0, 98, 80,111,115,101, 0, 98, 71, 80,100, 97,116, 97, 0, 66,117,108,108,101,116, 83, +111,102,116, 66,111,100,121, 0, 80, 97,114,116, 68,101,102,108,101, 99,116, 0, 83,111,102,116, 66,111,100,121, 0, 79, 98, 72, +111,111,107, 0, 82, 78, 71, 0, 80, 84, 67, 97, 99,104,101, 77,101,109, 0, 80, 84, 67, 97, 99,104,101, 69,100,105,116, 0, 83, + 66, 86,101,114,116,101,120, 0, 66,111,100,121, 80,111,105,110,116, 0, 66,111,100,121, 83,112,114,105,110,103, 0, 83, 66, 83, + 99,114, 97,116, 99,104, 0, 87,111,114,108,100, 0, 66, 97,115,101, 0, 65,118,105, 67,111,100,101, 99, 68, 97,116, 97, 0, 81, +117,105, 99,107,116,105,109,101, 67,111,100,101, 99, 68, 97,116, 97, 0, 70, 70, 77,112,101,103, 67,111,100,101, 99, 68, 97,116, + 97, 0, 65,117,100,105,111, 68, 97,116, 97, 0, 83, 99,101,110,101, 82,101,110,100,101,114, 76, 97,121,101,114, 0, 82,101,110, +100,101,114, 68, 97,116, 97, 0, 82,101,110,100,101,114, 80,114,111,102,105,108,101, 0, 71, 97,109,101, 68,111,109,101, 0, 71, + 97,109,101, 70,114, 97,109,105,110,103, 0, 71, 97,109,101, 68, 97,116, 97, 0, 84,105,109,101, 77, 97,114,107,101,114, 0, 80, + 97,105,110,116, 0, 66,114,117,115,104, 0, 73,109, 97,103,101, 80, 97,105,110,116, 83,101,116,116,105,110,103,115, 0, 80, 97, +114,116,105, 99,108,101, 66,114,117,115,104, 68, 97,116, 97, 0, 80, 97,114,116,105, 99,108,101, 69,100,105,116, 83,101,116,116, +105,110,103,115, 0, 84,114, 97,110,115,102,111,114,109, 79,114,105,101,110,116, 97,116,105,111,110, 0, 83, 99,117,108,112,116, + 0, 86, 80, 97,105,110,116, 0, 84,111,111,108, 83,101,116,116,105,110,103,115, 0, 98, 83,116, 97,116,115, 0, 85,110,105,116, + 83,101,116,116,105,110,103,115, 0, 69,100,105,116,105,110,103, 0, 83, 99,101,110,101, 83,116, 97,116,115, 0, 68, 97,103, 70, +111,114,101,115,116, 0, 66, 71,112,105, 99, 0, 82,101,103,105,111,110, 86,105,101,119, 51, 68, 0, 82,101,110,100,101,114, 73, +110,102,111, 0, 82,101,116,111,112,111, 86,105,101,119, 68, 97,116, 97, 0, 86,105,101,119, 68,101,112,116,104,115, 0, 83,109, +111,111,116,104, 86,105,101,119, 83,116,111,114,101, 0,119,109, 84,105,109,101,114, 0, 86,105,101,119, 51, 68, 0, 83,112, 97, + 99,101, 76,105,110,107, 0, 86,105,101,119, 50, 68, 0, 83,112, 97, 99,101, 73,110,102,111, 0, 98, 83, 99,114,101,101,110, 0, + 83,112, 97, 99,101, 73,112,111, 0, 98, 68,111,112,101, 83,104,101,101,116, 0, 83,112, 97, 99,101, 66,117,116,115, 0, 83,112, + 97, 99,101, 83,101,113, 0, 70,105,108,101, 83,101,108,101, 99,116, 80, 97,114, 97,109,115, 0, 83,112, 97, 99,101, 70,105,108, +101, 0, 70,105,108,101, 76,105,115,116, 0,119,109, 79,112,101,114, 97,116,111,114, 0, 70,105,108,101, 76, 97,121,111,117,116, + 0, 83,112, 97, 99,101, 79,111,112,115, 0, 84,114,101,101, 83,116,111,114,101, 0, 84,114,101,101, 83,116,111,114,101, 69,108, +101,109, 0, 83,112, 97, 99,101, 73,109, 97,103,101, 0, 83,112, 97, 99,101, 78,108, 97, 0, 83,112, 97, 99,101, 84,101,120,116, + 0, 83, 99,114,105,112,116, 0, 83,112, 97, 99,101, 83, 99,114,105,112,116, 0, 83,112, 97, 99,101, 84,105,109,101, 0, 83,112, + 97, 99,101, 78,111,100,101, 0, 83,112, 97, 99,101, 76,111,103,105, 99, 0, 83,112, 97, 99,101, 73,109, 97, 83,101,108, 0, 67, +111,110,115,111,108,101, 76,105,110,101, 0, 83,112, 97, 99,101, 67,111,110,115,111,108,101, 0, 83,112, 97, 99,101, 85,115,101, +114, 80,114,101,102, 0,117,105, 70,111,110,116, 0,117,105, 70,111,110,116, 83,116,121,108,101, 0,117,105, 83,116,121,108,101, + 0,117,105, 87,105,100,103,101,116, 67,111,108,111,114,115, 0,117,105, 87,105,100,103,101,116, 83,116, 97,116,101, 67,111,108, +111,114,115, 0, 84,104,101,109,101, 85, 73, 0, 84,104,101,109,101, 83,112, 97, 99,101, 0, 84,104,101,109,101, 87,105,114,101, + 67,111,108,111,114, 0, 98, 84,104,101,109,101, 0, 83,111,108,105,100, 76,105,103,104,116, 0, 85,115,101,114, 68,101,102, 0, + 83, 99,114, 86,101,114,116, 0, 83, 99,114, 69,100,103,101, 0, 80, 97,110,101,108, 0, 80, 97,110,101,108, 84,121,112,101, 0, +117,105, 76, 97,121,111,117,116, 0, 83, 99,114, 65,114,101, 97, 0, 83,112, 97, 99,101, 84,121,112,101, 0, 65, 82,101,103,105, +111,110, 0, 65, 82,101,103,105,111,110, 84,121,112,101, 0, 70,105,108,101, 71,108,111, 98, 97,108, 0, 83,116,114,105,112, 69, +108,101,109, 0, 84, 83,116,114,105,112, 69,108,101,109, 0, 83,116,114,105,112, 67,114,111,112, 0, 83,116,114,105,112, 84,114, + 97,110,115,102,111,114,109, 0, 83,116,114,105,112, 67,111,108,111,114, 66, 97,108, 97,110, 99,101, 0, 83,116,114,105,112, 80, +114,111,120,121, 0, 83,116,114,105,112, 0, 80,108,117,103,105,110, 83,101,113, 0, 83,101,113,117,101,110, 99,101, 0, 98, 83, +111,117,110,100, 0, 83,111,117,110,100, 72, 97,110,100,108,101, 0, 77,101,116, 97, 83,116, 97, 99,107, 0, 87,105,112,101, 86, + 97,114,115, 0, 71,108,111,119, 86, 97,114,115, 0, 84,114, 97,110,115,102,111,114,109, 86, 97,114,115, 0, 83,111,108,105,100, + 67,111,108,111,114, 86, 97,114,115, 0, 83,112,101,101,100, 67,111,110,116,114,111,108, 86, 97,114,115, 0, 69,102,102,101, 99, +116, 0, 66,117,105,108,100, 69,102,102, 0, 80, 97,114,116, 69,102,102, 0, 80, 97,114,116,105, 99,108,101, 0, 87, 97,118,101, + 69,102,102, 0, 98, 80,114,111,112,101,114,116,121, 0, 98, 78,101, 97,114, 83,101,110,115,111,114, 0, 98, 77,111,117,115,101, + 83,101,110,115,111,114, 0, 98, 84,111,117, 99,104, 83,101,110,115,111,114, 0, 98, 75,101,121, 98,111, 97,114,100, 83,101,110, +115,111,114, 0, 98, 80,114,111,112,101,114,116,121, 83,101,110,115,111,114, 0, 98, 65, 99,116,117, 97,116,111,114, 83,101,110, +115,111,114, 0, 98, 68,101,108, 97,121, 83,101,110,115,111,114, 0, 98, 67,111,108,108,105,115,105,111,110, 83,101,110,115,111, +114, 0, 98, 82, 97,100, 97,114, 83,101,110,115,111,114, 0, 98, 82, 97,110,100,111,109, 83,101,110,115,111,114, 0, 98, 82, 97, +121, 83,101,110,115,111,114, 0, 98, 77,101,115,115, 97,103,101, 83,101,110,115,111,114, 0, 98, 83,101,110,115,111,114, 0, 98, + 67,111,110,116,114,111,108,108,101,114, 0, 98, 74,111,121,115,116,105, 99,107, 83,101,110,115,111,114, 0, 98, 69,120,112,114, +101,115,115,105,111,110, 67,111,110,116, 0, 98, 80,121,116,104,111,110, 67,111,110,116, 0, 98, 65, 99,116,117, 97,116,111,114, + 0, 98, 65,100,100, 79, 98,106,101, 99,116, 65, 99,116,117, 97,116,111,114, 0, 98, 65, 99,116,105,111,110, 65, 99,116,117, 97, +116,111,114, 0, 98, 83,111,117,110,100, 65, 99,116,117, 97,116,111,114, 0, 83,111,117,110,100, 51, 68, 0, 98, 69,100,105,116, + 79, 98,106,101, 99,116, 65, 99,116,117, 97,116,111,114, 0, 98, 83, 99,101,110,101, 65, 99,116,117, 97,116,111,114, 0, 98, 80, +114,111,112,101,114,116,121, 65, 99,116,117, 97,116,111,114, 0, 98, 79, 98,106,101, 99,116, 65, 99,116,117, 97,116,111,114, 0, + 98, 73,112,111, 65, 99,116,117, 97,116,111,114, 0, 98, 67, 97,109,101,114, 97, 65, 99,116,117, 97,116,111,114, 0, 98, 67,111, +110,115,116,114, 97,105,110,116, 65, 99,116,117, 97,116,111,114, 0, 98, 71,114,111,117,112, 65, 99,116,117, 97,116,111,114, 0, + 98, 82, 97,110,100,111,109, 65, 99,116,117, 97,116,111,114, 0, 98, 77,101,115,115, 97,103,101, 65, 99,116,117, 97,116,111,114, + 0, 98, 71, 97,109,101, 65, 99,116,117, 97,116,111,114, 0, 98, 86,105,115,105, 98,105,108,105,116,121, 65, 99,116,117, 97,116, +111,114, 0, 98, 84,119,111, 68, 70,105,108,116,101,114, 65, 99,116,117, 97,116,111,114, 0, 98, 80, 97,114,101,110,116, 65, 99, +116,117, 97,116,111,114, 0, 98, 83,116, 97,116,101, 65, 99,116,117, 97,116,111,114, 0, 70,114,101,101, 67, 97,109,101,114, 97, + 0, 83,112, 97, 99,101, 83,111,117,110,100, 0, 71,114,111,117,112, 79, 98,106,101, 99,116, 0, 66,111,110,101, 0, 98, 65,114, +109, 97,116,117,114,101, 0, 98, 77,111,116,105,111,110, 80, 97,116,104, 86,101,114,116, 0, 98, 77,111,116,105,111,110, 80, 97, +116,104, 0, 98, 65,110,105,109, 86,105,122, 83,101,116,116,105,110,103,115, 0, 98, 80,111,115,101, 67,104, 97,110,110,101,108, + 0, 98, 65, 99,116,105,111,110, 71,114,111,117,112, 0, 83,112, 97, 99,101, 65, 99,116,105,111,110, 0, 98, 65, 99,116,105,111, +110, 67,104, 97,110,110,101,108, 0, 98, 67,111,110,115,116,114, 97,105,110,116, 67,104, 97,110,110,101,108, 0, 98, 67,111,110, +115,116,114, 97,105,110,116, 0, 98, 67,111,110,115,116,114, 97,105,110,116, 84, 97,114,103,101,116, 0, 98, 80,121,116,104,111, +110, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 75,105,110,101,109, 97,116,105, 99, 67,111,110,115,116,114, 97,105,110,116, + 0, 98, 84,114, 97, 99,107, 84,111, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 82,111,116, 97,116,101, 76,105,107,101, 67, +111,110,115,116,114, 97,105,110,116, 0, 98, 76,111, 99, 97,116,101, 76,105,107,101, 67,111,110,115,116,114, 97,105,110,116, 0, + 98, 77,105,110, 77, 97,120, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83,105,122,101, 76,105,107,101, 67,111,110,115,116, +114, 97,105,110,116, 0, 98, 65, 99,116,105,111,110, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 76,111, 99,107, 84,114, 97, + 99,107, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 70,111,108,108,111,119, 80, 97,116,104, 67,111,110,115,116,114, 97,105, +110,116, 0, 98, 83,116,114,101,116, 99,104, 84,111, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 82,105,103,105,100, 66,111, +100,121, 74,111,105,110,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 67,108, 97,109,112, 84,111, 67,111,110,115,116,114, + 97,105,110,116, 0, 98, 67,104,105,108,100, 79,102, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 84,114, 97,110,115,102,111, +114,109, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 76,111, 99, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,116, + 0, 98, 82,111,116, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83,105,122,101, 76,105,109,105,116, 67, +111,110,115,116,114, 97,105,110,116, 0, 98, 68,105,115,116, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, + 83,104,114,105,110,107,119,114, 97,112, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 65, 99,116,105,111,110, 77,111,100,105, +102,105,101,114, 0, 98, 65, 99,116,105,111,110, 83,116,114,105,112, 0, 98, 78,111,100,101, 83,116, 97, 99,107, 0, 98, 78,111, +100,101, 83,111, 99,107,101,116, 0, 98, 78,111,100,101, 76,105,110,107, 0, 98, 78,111,100,101, 0, 98, 78,111,100,101, 80,114, +101,118,105,101,119, 0, 98, 78,111,100,101, 84,121,112,101, 0, 78,111,100,101, 73,109, 97,103,101, 65,110,105,109, 0, 78,111, +100,101, 66,108,117,114, 68, 97,116, 97, 0, 78,111,100,101, 68, 66,108,117,114, 68, 97,116, 97, 0, 78,111,100,101, 66,105,108, + 97,116,101,114, 97,108, 66,108,117,114, 68, 97,116, 97, 0, 78,111,100,101, 72,117,101, 83, 97,116, 0, 78,111,100,101, 73,109, + 97,103,101, 70,105,108,101, 0, 78,111,100,101, 67,104,114,111,109, 97, 0, 78,111,100,101, 84,119,111, 88, 89,115, 0, 78,111, +100,101, 84,119,111, 70,108,111, 97,116,115, 0, 78,111,100,101, 71,101,111,109,101,116,114,121, 0, 78,111,100,101, 86,101,114, +116,101,120, 67,111,108, 0, 78,111,100,101, 68,101,102,111, 99,117,115, 0, 78,111,100,101, 83, 99,114,105,112,116, 68,105, 99, +116, 0, 78,111,100,101, 71,108, 97,114,101, 0, 78,111,100,101, 84,111,110,101,109, 97,112, 0, 78,111,100,101, 76,101,110,115, + 68,105,115,116, 0, 84,101,120, 78,111,100,101, 79,117,116,112,117,116, 0, 67,117,114,118,101, 77, 97,112, 80,111,105,110,116, + 0, 67,117,114,118,101, 77, 97,112, 0, 66,114,117,115,104, 67,108,111,110,101, 0, 67,117,115,116,111,109, 68, 97,116, 97, 76, + 97,121,101,114, 0, 72, 97,105,114, 75,101,121, 0, 80, 97,114,116,105, 99,108,101, 75,101,121, 0, 66,111,105,100, 80, 97,114, +116,105, 99,108,101, 0, 66,111,105,100, 68, 97,116, 97, 0, 67,104,105,108,100, 80, 97,114,116,105, 99,108,101, 0, 80, 97,114, +116,105, 99,108,101, 84, 97,114,103,101,116, 0, 80, 97,114,116,105, 99,108,101, 68, 97,116, 97, 0, 80, 97,114,116,105, 99,108, +101, 83,101,116,116,105,110,103,115, 0, 66,111,105,100, 83,101,116,116,105,110,103,115, 0, 80, 97,114,116,105, 99,108,101, 67, + 97, 99,104,101, 75,101,121, 0, 75, 68, 84,114,101,101, 0, 76,105,110,107, 78,111,100,101, 0, 98, 71, 80, 68,115,112,111,105, +110,116, 0, 98, 71, 80, 68,115,116,114,111,107,101, 0, 98, 71, 80, 68,102,114, 97,109,101, 0, 98, 71, 80, 68,108, 97,121,101, +114, 0, 82,101,112,111,114,116, 0, 82,101,112,111,114,116, 76,105,115,116, 0,119,109, 87,105,110,100,111,119, 77, 97,110, 97, +103,101,114, 0,119,109, 87,105,110,100,111,119, 0,119,109, 69,118,101,110,116, 0,119,109, 83,117, 98, 87,105,110,100,111,119, + 0,119,109, 71,101,115,116,117,114,101, 0,119,109, 75,101,121,109, 97,112, 73,116,101,109, 0, 80,111,105,110,116,101,114, 82, + 78, 65, 0,119,109, 75,101,121, 77, 97,112, 0,119,109, 79,112,101,114, 97,116,111,114, 84,121,112,101, 0, 70, 77,111,100,105, +102,105,101,114, 0, 70, 77,111,100, 95, 71,101,110,101,114, 97,116,111,114, 0, 70, 77,111,100, 95, 70,117,110, 99,116,105,111, +110, 71,101,110,101,114, 97,116,111,114, 0, 70, 67, 77, 95, 69,110,118,101,108,111,112,101, 68, 97,116, 97, 0, 70, 77,111,100, + 95, 69,110,118,101,108,111,112,101, 0, 70, 77,111,100, 95, 67,121, 99,108,101,115, 0, 70, 77,111,100, 95, 80,121,116,104,111, +110, 0, 70, 77,111,100, 95, 76,105,109,105,116,115, 0, 70, 77,111,100, 95, 78,111,105,115,101, 0, 68,114,105,118,101,114, 84, + 97,114,103,101,116, 0, 67,104, 97,110,110,101,108, 68,114,105,118,101,114, 0, 70, 80,111,105,110,116, 0, 70, 67,117,114,118, +101, 0, 65,110,105,109, 77, 97,112, 80, 97,105,114, 0, 65,110,105,109, 77, 97,112,112,101,114, 0, 78,108, 97, 83,116,114,105, +112, 0, 78,108, 97, 84,114, 97, 99,107, 0, 75, 83, 95, 80, 97,116,104, 0, 75,101,121,105,110,103, 83,101,116, 0, 65,110,105, +109, 79,118,101,114,114,105,100,101, 0, 73,100, 65,100,116, 84,101,109,112,108, 97,116,101, 0, 66,111,105,100, 82,117,108,101, + 0, 66,111,105,100, 82,117,108,101, 71,111, 97,108, 65,118,111,105,100, 0, 66,111,105,100, 82,117,108,101, 65,118,111,105,100, + 67,111,108,108,105,115,105,111,110, 0, 66,111,105,100, 82,117,108,101, 70,111,108,108,111,119, 76,101, 97,100,101,114, 0, 66, +111,105,100, 82,117,108,101, 65,118,101,114, 97,103,101, 83,112,101,101,100, 0, 66,111,105,100, 82,117,108,101, 70,105,103,104, +116, 0, 66,111,105,100, 83,116, 97,116,101, 0, 70, 76, 85, 73, 68, 95, 51, 68, 0, 87, 84, 85, 82, 66, 85, 76, 69, 78, 67, 69, + 0, 0, 0, 0, 84, 76, 69, 78, 1, 0, 1, 0, 2, 0, 2, 0, 4, 0, 4, 0, 4, 0, 4, 0, 8, 0, 0, 0, 8, 0, 12, 0, + 8, 0, 4, 0, 8, 0, 8, 0, 16, 0, 12, 0, 12, 0, 24, 0, 16, 0, 16, 0, 32, 0, 16, 0, 16, 0, 20, 0, 76, 0, 52, 0, + 40, 2, 0, 0, 32, 0,140, 0,100, 3, 92, 0, 36, 0, 56, 0, 84, 0,112, 0,124, 0, 56, 0, 24, 0, 40, 0,120, 0, 12, 0, +120, 0, 36, 0, 92, 5,128, 1, 0, 0, 0, 0, 0, 0,144, 0, 40, 1, 84, 1, 24, 0, 8, 3,168, 0, 0, 0, 76, 0,128, 1, + 24, 1,140, 0,132, 0,124, 1, 8, 1, 56, 0, 88, 0,184, 2, 76, 0, 60, 1, 0, 0,108, 0,104, 0,148, 0, 56, 0, 8, 0, + 16, 0, 92, 1, 0, 0, 0, 0, 0, 0, 24, 1, 20, 0, 44, 0, 60, 0, 24, 0, 12, 0, 12, 0, 4, 0, 8, 0, 8, 0, 0, 0, + 24, 0, 76, 0, 32, 0, 8, 0, 12, 0, 8, 0, 8, 0, 4, 0, 4, 0, 0, 1, 32, 0, 12, 0, 0, 0, 16, 0, 64, 0, 24, 0, + 12, 0, 40, 0, 56, 0, 72, 0, 92, 0,100, 0, 72, 0,100, 0,120, 0, 68, 0, 64, 0,112, 0, 64, 0, 76, 0,176, 0, 48, 0, +168, 0,152, 0,156, 0, 64, 0, 96, 0,108, 0,188, 0,104, 0,216, 0, 56, 0, 84, 0, 0, 0,132, 0, 28, 0,240, 1,104, 0, + 0, 0, 80, 0, 0, 0, 0, 0, 68, 0, 8, 0, 8, 0,220, 0, 80, 0, 76, 0, 68, 0, 68, 0, 64, 0,164, 1,112, 0,108, 0, +188, 0, 40, 0, 0, 0, 92, 0, 56, 0, 72, 0,120, 0,128, 0,252, 0,208, 0, 0, 0, 92, 0, 0, 0, 16, 0, 0, 0, 0, 0, + 0, 0,104, 1, 28, 0,176, 0,144, 0, 52, 0, 16, 0, 72, 0, 0, 4, 56, 0, 20, 0, 16, 0, 92, 0, 80, 0, 24, 0,196, 0, + 36, 0, 8, 0,100, 0, 80, 0, 48, 0, 52, 0, 72, 1, 32, 0, 8, 0, 24, 2, 0, 0, 0, 0, 56, 0,216, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,240, 0, 40, 0,148, 0, 48, 0,140, 0,208, 0, 20, 0,224, 0,216, 0,204, 1, 60, 0, 0, 0,112, 0, + 0, 0, 4, 1, 12, 0, 12, 0,136, 0,200, 0,124, 2, 80, 2, 40, 0,180, 0,244, 0, 52, 0,148, 2, 28, 0, 80, 0, 24, 0, + 16, 1, 32, 0,224, 0, 32, 0, 32, 0, 80, 2, 16, 1, 16, 0,200, 21, 56, 0, 56, 11, 20, 0, 24, 0, 56, 1, 0, 0, 0, 0, + 96, 0, 0, 0,248, 0, 0, 0, 32, 0, 80, 0, 28, 0, 16, 0, 8, 0, 52, 0,252, 0,240, 0,168, 1,196, 0, 8, 1, 48, 0, + 16, 0, 12, 0, 24, 0, 48, 0, 16, 0, 20, 0, 16, 0, 24, 0, 56, 1, 0, 0, 56, 0, 52, 0, 48, 0, 8, 0, 44, 0, 72, 0, +104, 0, 40, 0, 8, 0, 72, 0, 44, 0, 40, 0,108, 0, 68, 0, 76, 0, 80, 0, 60, 0,128, 0, 76, 0, 60, 0, 12, 0, 92, 0, + 68, 0, 32, 0, 80, 0, 16, 0, 76, 0,108, 0, 84, 0, 28, 0, 96, 0, 60, 0, 56, 0,108, 0,140, 0, 4, 0, 20, 0, 12, 0, + 8, 0, 40, 0,196, 0, 24, 0, 4, 1,124, 0, 16, 0, 20, 0, 24, 0,172, 1,104, 0,228, 0, 64, 0, 44, 0, 64, 0,116, 0, + 60, 0,104, 0, 52, 0, 44, 0, 44, 0, 68, 0, 44, 0, 64, 0, 44, 0, 20, 0, 52, 0, 96, 0, 12, 0,108, 0, 92, 0, 28, 0, + 28, 0, 28, 0, 52, 0, 20, 0, 60, 0,140, 0, 36, 0,120, 0, 32, 0,208, 0, 0, 0, 0, 0, 16, 0, 40, 0, 28, 0, 12, 0, + 12, 0, 16, 1, 40, 0, 8, 0, 8, 0, 64, 0, 32, 0, 24, 0, 8, 0, 24, 0, 32, 0, 8, 0, 32, 0, 12, 0, 44, 0, 20, 0, + 68, 0, 24, 0, 56, 0, 52, 0, 20, 0, 72, 0, 28, 0,180, 0,208, 1, 96, 0, 0, 0, 0, 0, 0, 0, 16, 0, 20, 0, 24, 0, +172, 0, 24, 0, 24, 0,140, 0,148, 0, 56, 0, 0, 0, 0, 0,100, 0, 0, 0, 92, 0, 0, 0, 88, 0, 20, 0, 24, 0, 16, 0, + 20, 0, 8, 0, 8, 0, 24, 0, 20, 0, 88, 0, 24, 1, 16, 0, 68, 0, 0, 1, 20, 0,160, 0, 88, 0, 96, 0, 88, 0, 20, 0, + 56, 0, 48, 0, 68, 0, 56, 0, 92, 0, 64, 0, 56, 0, 96, 0, 0, 0, 0, 0, 83, 84, 82, 67,126, 1, 0, 0, 10, 0, 2, 0, + 10, 0, 0, 0, 10, 0, 1, 0, 11, 0, 3, 0, 11, 0, 0, 0, 11, 0, 1, 0, 9, 0, 2, 0, 12, 0, 2, 0, 9, 0, 3, 0, + 9, 0, 4, 0, 13, 0, 2, 0, 2, 0, 5, 0, 2, 0, 6, 0, 14, 0, 2, 0, 4, 0, 5, 0, 4, 0, 6, 0, 15, 0, 2, 0, + 7, 0, 5, 0, 7, 0, 6, 0, 16, 0, 2, 0, 8, 0, 5, 0, 8, 0, 6, 0, 17, 0, 3, 0, 4, 0, 5, 0, 4, 0, 6, 0, + 4, 0, 7, 0, 18, 0, 3, 0, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 7, 0, 19, 0, 3, 0, 8, 0, 5, 0, 8, 0, 6, 0, + 8, 0, 7, 0, 20, 0, 4, 0, 4, 0, 5, 0, 4, 0, 6, 0, 4, 0, 7, 0, 4, 0, 8, 0, 21, 0, 4, 0, 7, 0, 5, 0, + 7, 0, 6, 0, 7, 0, 7, 0, 7, 0, 8, 0, 22, 0, 4, 0, 8, 0, 5, 0, 8, 0, 6, 0, 8, 0, 7, 0, 8, 0, 8, 0, + 23, 0, 4, 0, 4, 0, 9, 0, 4, 0, 10, 0, 4, 0, 11, 0, 4, 0, 12, 0, 24, 0, 4, 0, 7, 0, 9, 0, 7, 0, 10, 0, + 7, 0, 11, 0, 7, 0, 12, 0, 25, 0, 4, 0, 9, 0, 13, 0, 12, 0, 14, 0, 4, 0, 15, 0, 4, 0, 16, 0, 26, 0, 10, 0, + 26, 0, 0, 0, 26, 0, 1, 0, 0, 0, 17, 0, 0, 0, 18, 0, 2, 0, 19, 0, 0, 0, 20, 0, 4, 0, 21, 0, 25, 0, 22, 0, + 4, 0, 23, 0, 4, 0, 24, 0, 27, 0, 9, 0, 9, 0, 0, 0, 9, 0, 1, 0, 27, 0, 25, 0, 28, 0, 26, 0, 0, 0, 27, 0, + 2, 0, 28, 0, 2, 0, 19, 0, 4, 0, 29, 0, 26, 0, 30, 0, 28, 0, 8, 0, 27, 0, 31, 0, 27, 0, 32, 0, 29, 0, 33, 0, + 0, 0, 34, 0, 0, 0, 35, 0, 4, 0, 36, 0, 4, 0, 37, 0, 28, 0, 38, 0, 30, 0, 6, 0, 4, 0, 39, 0, 4, 0, 40, 0, + 2, 0, 41, 0, 2, 0, 42, 0, 2, 0, 43, 0, 4, 0, 44, 0, 31, 0, 6, 0, 32, 0, 45, 0, 2, 0, 46, 0, 2, 0, 47, 0, + 2, 0, 17, 0, 2, 0, 19, 0, 0, 0, 48, 0, 33, 0, 21, 0, 33, 0, 0, 0, 33, 0, 1, 0, 34, 0, 49, 0, 35, 0, 50, 0, + 24, 0, 51, 0, 24, 0, 52, 0, 2, 0, 46, 0, 2, 0, 47, 0, 2, 0, 53, 0, 2, 0, 54, 0, 2, 0, 55, 0, 2, 0, 56, 0, + 2, 0, 19, 0, 2, 0, 57, 0, 7, 0, 11, 0, 7, 0, 12, 0, 4, 0, 58, 0, 7, 0, 59, 0, 7, 0, 60, 0, 7, 0, 61, 0, + 31, 0, 62, 0, 36, 0, 7, 0, 27, 0, 31, 0, 12, 0, 63, 0, 24, 0, 64, 0, 2, 0, 46, 0, 2, 0, 65, 0, 2, 0, 66, 0, + 2, 0, 37, 0, 37, 0, 16, 0, 37, 0, 0, 0, 37, 0, 1, 0, 7, 0, 67, 0, 7, 0, 61, 0, 2, 0, 17, 0, 2, 0, 47, 0, + 2, 0, 68, 0, 2, 0, 19, 0, 4, 0, 69, 0, 4, 0, 70, 0, 9, 0, 2, 0, 7, 0, 71, 0, 0, 0, 20, 0, 0, 0, 72, 0, + 7, 0, 73, 0, 7, 0, 74, 0, 38, 0, 13, 0, 27, 0, 31, 0, 39, 0, 75, 0, 37, 0, 76, 0, 0, 0, 77, 0, 4, 0, 78, 0, + 7, 0, 61, 0, 12, 0, 79, 0, 36, 0, 80, 0, 27, 0, 81, 0, 2, 0, 17, 0, 2, 0, 82, 0, 2, 0, 83, 0, 2, 0, 19, 0, + 40, 0, 6, 0, 40, 0, 0, 0, 40, 0, 1, 0, 0, 0, 84, 0, 0, 0, 85, 0, 4, 0, 23, 0, 4, 0, 86, 0, 41, 0, 10, 0, + 41, 0, 0, 0, 41, 0, 1, 0, 4, 0, 87, 0, 4, 0, 88, 0, 4, 0, 89, 0, 4, 0, 43, 0, 4, 0, 14, 0, 4, 0, 90, 0, + 0, 0, 91, 0, 0, 0, 92, 0, 42, 0, 15, 0, 27, 0, 31, 0, 0, 0, 93, 0, 4, 0, 90, 0, 4, 0, 94, 0, 12, 0, 95, 0, + 40, 0, 96, 0, 40, 0, 97, 0, 4, 0, 98, 0, 4, 0, 99, 0, 12, 0,100, 0, 0, 0,101, 0, 4, 0,102, 0, 4, 0,103, 0, + 9, 0,104, 0, 8, 0,105, 0, 43, 0, 3, 0, 4, 0,106, 0, 4, 0,107, 0, 9, 0, 2, 0, 44, 0, 20, 0, 27, 0, 31, 0, + 39, 0, 75, 0, 2, 0, 17, 0, 2, 0, 19, 0, 7, 0,108, 0, 7, 0,109, 0, 7, 0,110, 0, 7, 0,111, 0, 7, 0,112, 0, + 7, 0,113, 0, 7, 0,114, 0, 7, 0,115, 0, 7, 0,116, 0, 7, 0,117, 0, 7, 0,118, 0, 2, 0,119, 0, 2, 0,120, 0, + 7, 0,121, 0, 36, 0, 80, 0, 32, 0,122, 0, 45, 0, 13, 0, 4, 0,123, 0, 4, 0,124, 0, 4, 0,125, 0, 4, 0,126, 0, + 2, 0,127, 0, 2, 0,128, 0, 2, 0, 19, 0, 2, 0,129, 0, 2, 0,130, 0, 2, 0,131, 0, 2, 0,132, 0, 2, 0,133, 0, + 46, 0,134, 0, 47, 0, 32, 0, 27, 0, 31, 0, 0, 0, 34, 0, 12, 0,135, 0, 48, 0,136, 0, 49, 0,137, 0, 50, 0,138, 0, + 2, 0,129, 0, 2, 0, 19, 0, 2, 0,139, 0, 2, 0, 17, 0, 2, 0, 37, 0, 2, 0, 43, 0, 4, 0,140, 0, 2, 0,141, 0, + 2, 0,142, 0, 2, 0,143, 0, 2, 0,144, 0, 2, 0,145, 0, 2, 0,146, 0, 4, 0,147, 0, 4, 0,148, 0, 43, 0,149, 0, + 30, 0,150, 0, 0, 0,151, 0, 7, 0,152, 0, 4, 0,153, 0, 2, 0,154, 0, 2, 0,155, 0, 2, 0,156, 0, 2, 0,157, 0, + 7, 0,158, 0, 7, 0,159, 0, 51, 0, 33, 0, 2, 0,160, 0, 2, 0,161, 0, 2, 0,162, 0, 2, 0,163, 0, 32, 0,164, 0, + 52, 0,165, 0, 0, 0,166, 0, 0, 0,167, 0, 0, 0,168, 0, 0, 0,169, 0, 0, 0,170, 0, 7, 0,171, 0, 7, 0,172, 0, + 7, 0,173, 0, 2, 0,174, 0, 2, 0,175, 0, 2, 0,176, 0, 2, 0,177, 0, 2, 0,178, 0, 2, 0,179, 0, 0, 0,180, 0, + 0, 0,181, 0, 7, 0,182, 0, 7, 0,183, 0, 7, 0,184, 0, 7, 0,185, 0, 7, 0,186, 0, 7, 0, 57, 0, 7, 0,187, 0, + 7, 0,188, 0, 7, 0,189, 0, 7, 0,190, 0, 7, 0,191, 0, 53, 0, 15, 0, 0, 0,192, 0, 9, 0,193, 0, 0, 0,194, 0, + 0, 0,195, 0, 4, 0,196, 0, 4, 0,197, 0, 9, 0,198, 0, 7, 0,199, 0, 7, 0,200, 0, 7, 0,201, 0, 4, 0,202, 0, + 9, 0,203, 0, 9, 0,204, 0, 4, 0,205, 0, 4, 0, 37, 0, 54, 0, 6, 0, 7, 0,182, 0, 7, 0,183, 0, 7, 0,184, 0, + 7, 0,206, 0, 7, 0, 67, 0, 4, 0, 64, 0, 55, 0, 5, 0, 2, 0, 19, 0, 2, 0, 36, 0, 2, 0, 64, 0, 2, 0,207, 0, + 54, 0,201, 0, 56, 0, 17, 0, 32, 0,164, 0, 47, 0,208, 0, 57, 0,209, 0, 7, 0,210, 0, 7, 0,211, 0, 2, 0, 17, 0, + 2, 0,212, 0, 7, 0,110, 0, 7, 0,111, 0, 7, 0,213, 0, 4, 0,214, 0, 2, 0,215, 0, 2, 0,216, 0, 4, 0,129, 0, + 4, 0,140, 0, 2, 0,217, 0, 2, 0,218, 0, 58, 0, 23, 0, 2, 0, 19, 0, 2, 0,219, 0, 7, 0,220, 0, 7, 0,221, 0, + 2, 0,139, 0, 2, 0,222, 0, 4, 0,223, 0, 4, 0,224, 0, 32, 0,164, 0, 59, 0,225, 0, 2, 0,226, 0, 2, 0,227, 0, + 2, 0,228, 0, 9, 0,229, 0, 7, 0,230, 0, 7, 0,231, 0, 2, 0,232, 0, 2, 0,233, 0, 2, 0,234, 0, 2, 0,235, 0, + 7, 0,236, 0, 7, 0,237, 0, 55, 0,238, 0, 60, 0, 10, 0, 4, 0,239, 0, 4, 0,240, 0, 2, 0,241, 0, 2, 0, 19, 0, + 4, 0, 37, 0, 32, 0,164, 0, 7, 0,242, 0, 4, 0,243, 0, 0, 0,244, 0, 7, 0,245, 0, 52, 0, 61, 0, 27, 0, 31, 0, + 39, 0, 75, 0, 7, 0,246, 0, 7, 0,247, 0, 7, 0,248, 0, 7, 0,249, 0, 7, 0,250, 0, 7, 0,251, 0, 7, 0,252, 0, + 7, 0,253, 0, 7, 0,254, 0, 7, 0,255, 0, 7, 0, 0, 1, 7, 0, 1, 1, 7, 0, 2, 1, 7, 0, 3, 1, 7, 0, 4, 1, + 7, 0, 5, 1, 7, 0, 6, 1, 7, 0, 7, 1, 7, 0, 8, 1, 7, 0, 9, 1, 2, 0, 10, 1, 2, 0, 11, 1, 2, 0, 12, 1, + 2, 0, 13, 1, 2, 0, 14, 1, 2, 0, 15, 1, 2, 0, 16, 1, 2, 0, 19, 0, 2, 0, 17, 0, 2, 0,212, 0, 7, 0, 17, 1, + 7, 0, 18, 1, 7, 0, 19, 1, 7, 0, 20, 1, 4, 0, 21, 1, 4, 0, 22, 1, 2, 0, 23, 1, 2, 0, 24, 1, 2, 0, 25, 1, + 2, 0,127, 0, 4, 0, 23, 0, 4, 0,124, 0, 4, 0,125, 0, 4, 0,126, 0, 7, 0, 26, 1, 7, 0, 27, 1, 7, 0,188, 0, + 45, 0, 28, 1, 61, 0, 29, 1, 36, 0, 80, 0, 47, 0,208, 0, 53, 0, 30, 1, 55, 0,238, 0, 56, 0, 31, 1, 30, 0,150, 0, + 58, 0, 32, 1, 60, 0, 33, 1, 0, 0, 34, 1, 0, 0,181, 0, 62, 0, 8, 0, 7, 0, 35, 1, 7, 0, 36, 1, 7, 0,172, 0, + 4, 0, 19, 0, 7, 0, 37, 1, 7, 0, 38, 1, 7, 0, 39, 1, 32, 0, 45, 0, 63, 0, 82, 0, 27, 0, 31, 0, 39, 0, 75, 0, + 2, 0, 17, 0, 2, 0, 19, 0, 4, 0, 40, 1, 2, 0,175, 0, 2, 0, 41, 1, 7, 0,182, 0, 7, 0,183, 0, 7, 0,184, 0, + 7, 0,185, 0, 7, 0, 42, 1, 7, 0, 43, 1, 7, 0, 44, 1, 7, 0, 45, 1, 7, 0, 46, 1, 7, 0, 47, 1, 7, 0, 48, 1, + 7, 0, 49, 1, 7, 0, 50, 1, 7, 0, 51, 1, 7, 0, 52, 1, 64, 0, 53, 1, 2, 0,219, 0, 2, 0, 70, 0, 7, 0,110, 0, + 7, 0,111, 0, 7, 0, 54, 1, 7, 0, 55, 1, 7, 0, 56, 1, 2, 0, 57, 1, 2, 0, 58, 1, 2, 0, 59, 1, 2, 0, 60, 1, + 0, 0, 61, 1, 0, 0, 62, 1, 2, 0, 63, 1, 2, 0, 64, 1, 2, 0, 65, 1, 2, 0, 66, 1, 2, 0, 67, 1, 7, 0, 68, 1, + 7, 0, 69, 1, 7, 0, 70, 1, 7, 0, 71, 1, 2, 0, 72, 1, 2, 0, 43, 0, 2, 0, 73, 1, 2, 0, 74, 1, 2, 0, 75, 1, + 2, 0, 76, 1, 7, 0, 77, 1, 7, 0, 78, 1, 7, 0, 79, 1, 7, 0, 80, 1, 7, 0, 81, 1, 7, 0, 82, 1, 7, 0, 83, 1, + 7, 0, 84, 1, 7, 0, 85, 1, 7, 0, 86, 1, 7, 0, 87, 1, 7, 0, 88, 1, 2, 0, 89, 1, 2, 0, 90, 1, 4, 0, 91, 1, + 4, 0, 92, 1, 2, 0, 93, 1, 2, 0, 94, 1, 2, 0, 95, 1, 2, 0, 96, 1, 7, 0, 97, 1, 7, 0, 98, 1, 7, 0, 99, 1, + 7, 0,100, 1, 2, 0,101, 1, 2, 0,102, 1, 36, 0, 80, 0, 51, 0,103, 1, 2, 0,104, 1, 2, 0,105, 1, 30, 0,150, 0, + 65, 0, 2, 0, 27, 0, 31, 0, 36, 0, 80, 0, 66, 0, 20, 0, 7, 0,106, 1, 7, 0,107, 1, 7, 0,108, 1, 7, 0,109, 1, + 7, 0,110, 1, 7, 0,111, 1, 7, 0,112, 1, 7, 0,113, 1, 2, 0,114, 1, 2, 0,115, 1, 7, 0,116, 1, 7, 0,117, 1, + 7, 0,118, 1, 2, 0,119, 1, 2, 0,120, 1, 2, 0,121, 1, 2, 0,122, 1, 7, 0,123, 1, 7, 0,124, 1, 4, 0,125, 1, + 67, 0,130, 0, 27, 0, 31, 0, 39, 0, 75, 0, 2, 0,126, 1, 2, 0, 19, 0, 7, 0,182, 0, 7, 0,183, 0, 7, 0,184, 0, + 7, 0,127, 1, 7, 0,128, 1, 7, 0,129, 1, 7, 0,130, 1, 7, 0,131, 1, 7, 0,132, 1, 7, 0,133, 1, 7, 0,134, 1, + 7, 0,135, 1, 7, 0,136, 1, 7, 0,137, 1, 7, 0,138, 1, 7, 0,139, 1, 7, 0,140, 1, 7, 0,141, 1, 7, 0,142, 1, + 7, 0,143, 1, 7, 0,144, 1, 7, 0,145, 1, 7, 0,146, 1, 66, 0,147, 1, 7, 0,148, 1, 7, 0,149, 1, 7, 0,150, 1, + 7, 0,151, 1, 7, 0,152, 1, 7, 0,153, 1, 7, 0,154, 1, 2, 0,155, 1, 2, 0,156, 1, 2, 0,157, 1, 0, 0,158, 1, + 0, 0,159, 1, 7, 0,160, 1, 7, 0,161, 1, 2, 0,162, 1, 2, 0,163, 1, 7, 0,164, 1, 7, 0,165, 1, 7, 0,166, 1, + 7, 0,167, 1, 2, 0,168, 1, 2, 0,169, 1, 4, 0, 40, 1, 4, 0,170, 1, 2, 0,171, 1, 2, 0,172, 1, 2, 0,173, 1, + 2, 0,174, 1, 7, 0,175, 1, 7, 0,176, 1, 7, 0,177, 1, 7, 0,178, 1, 7, 0,179, 1, 7, 0,180, 1, 7, 0,181, 1, + 7, 0,182, 1, 7, 0,183, 1, 7, 0,184, 1, 0, 0,185, 1, 7, 0,186, 1, 7, 0,187, 1, 7, 0,188, 1, 4, 0,189, 1, + 0, 0,190, 1, 0, 0, 73, 1, 0, 0,191, 1, 0, 0, 34, 1, 2, 0,192, 1, 2, 0,193, 1, 2, 0,104, 1, 2, 0,194, 1, + 2, 0,195, 1, 2, 0,196, 1, 7, 0,197, 1, 7, 0,198, 1, 7, 0,199, 1, 7, 0,200, 1, 7, 0,201, 1, 2, 0,160, 0, + 2, 0,161, 0, 55, 0,202, 1, 55, 0,203, 1, 0, 0,204, 1, 0, 0,205, 1, 0, 0,206, 1, 0, 0,207, 1, 2, 0,208, 1, + 2, 0,209, 1, 7, 0,210, 1, 7, 0,211, 1, 51, 0,103, 1, 61, 0, 29, 1, 36, 0, 80, 0, 68, 0,212, 1, 30, 0,150, 0, + 7, 0,213, 1, 7, 0,214, 1, 7, 0,215, 1, 7, 0,216, 1, 7, 0,217, 1, 2, 0,218, 1, 2, 0, 70, 0, 7, 0,219, 1, + 7, 0,220, 1, 7, 0,221, 1, 7, 0,222, 1, 7, 0,223, 1, 7, 0,224, 1, 7, 0,225, 1, 7, 0,226, 1, 7, 0,227, 1, + 2, 0,228, 1, 2, 0,229, 1, 7, 0,230, 1, 7, 0,231, 1, 7, 0,232, 1, 7, 0,233, 1, 7, 0,234, 1, 4, 0,235, 1, + 4, 0,236, 1, 4, 0,237, 1, 12, 0,238, 1, 69, 0, 4, 0, 27, 0, 31, 0, 0, 0,239, 1, 70, 0, 2, 0, 43, 0,149, 0, + 71, 0, 26, 0, 71, 0, 0, 0, 71, 0, 1, 0, 72, 0,240, 1, 4, 0,241, 1, 4, 0,242, 1, 4, 0,243, 1, 4, 0,244, 1, + 4, 0,245, 1, 4, 0,246, 1, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,247, 1, 2, 0,248, 1, 7, 0, 5, 0, 7, 0, 6, 0, + 7, 0, 7, 0, 7, 0,249, 1, 7, 0,250, 1, 7, 0,251, 1, 7, 0,252, 1, 7, 0,253, 1, 7, 0,254, 1, 7, 0,255, 1, + 7, 0, 23, 0, 7, 0, 0, 2, 7, 0, 1, 2, 73, 0, 19, 0, 27, 0, 31, 0, 39, 0, 75, 0, 72, 0,240, 1, 12, 0, 2, 2, + 12, 0, 3, 2, 12, 0, 4, 2, 36, 0, 80, 0, 67, 0, 5, 2, 0, 0, 19, 0, 0, 0, 6, 2, 2, 0, 7, 2, 4, 0,174, 0, + 7, 0, 35, 1, 7, 0,172, 0, 7, 0, 36, 1, 7, 0, 8, 2, 7, 0, 9, 2, 7, 0, 10, 2, 71, 0, 11, 2, 35, 0, 11, 0, + 7, 0, 12, 2, 7, 0, 13, 2, 7, 0, 14, 2, 7, 0,221, 0, 2, 0, 55, 0, 0, 0, 15, 2, 0, 0, 16, 2, 0, 0, 17, 2, + 0, 0, 18, 2, 0, 0, 19, 2, 0, 0, 20, 2, 34, 0, 7, 0, 7, 0, 21, 2, 7, 0, 13, 2, 7, 0, 14, 2, 2, 0, 17, 2, + 2, 0, 20, 2, 7, 0,221, 0, 7, 0, 37, 0, 74, 0, 21, 0, 74, 0, 0, 0, 74, 0, 1, 0, 2, 0, 17, 0, 2, 0, 22, 2, + 2, 0, 20, 2, 2, 0, 19, 0, 2, 0, 23, 2, 2, 0, 24, 2, 2, 0, 25, 2, 2, 0, 26, 2, 2, 0, 27, 2, 2, 0, 28, 2, + 2, 0, 29, 2, 2, 0, 30, 2, 7, 0, 31, 2, 7, 0, 32, 2, 34, 0, 49, 0, 35, 0, 50, 0, 2, 0, 33, 2, 2, 0, 34, 2, + 4, 0, 35, 2, 75, 0, 5, 0, 2, 0, 36, 2, 2, 0, 22, 2, 0, 0, 19, 0, 0, 0, 37, 0, 2, 0, 70, 0, 76, 0, 4, 0, + 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 8, 0, 7, 0, 37, 2, 77, 0, 67, 0, 27, 0, 31, 0, 39, 0, 75, 0, 72, 0,240, 1, + 12, 0, 38, 2, 12, 0, 3, 2, 12, 0, 39, 2, 32, 0, 40, 2, 32, 0, 41, 2, 32, 0, 42, 2, 36, 0, 80, 0, 78, 0, 43, 2, + 38, 0, 44, 2, 67, 0, 5, 2, 12, 0, 45, 2, 7, 0, 35, 1, 7, 0,172, 0, 7, 0, 36, 1, 4, 0,174, 0, 2, 0, 46, 2, + 2, 0, 47, 2, 2, 0, 48, 2, 7, 0, 49, 2, 7, 0, 70, 0, 2, 0, 50, 2, 2, 0, 7, 2, 2, 0, 19, 0, 2, 0, 51, 2, + 7, 0, 52, 2, 7, 0, 53, 2, 7, 0, 54, 2, 2, 0, 25, 2, 2, 0, 26, 2, 2, 0, 55, 2, 2, 0, 56, 2, 4, 0, 57, 2, + 34, 0, 58, 2, 2, 0, 23, 0, 2, 0, 95, 0, 2, 0, 67, 0, 2, 0, 59, 2, 7, 0, 60, 2, 7, 0, 61, 2, 7, 0, 62, 2, + 7, 0, 63, 2, 7, 0, 64, 2, 7, 0, 65, 2, 7, 0, 66, 2, 7, 0, 67, 2, 7, 0, 68, 2, 7, 0, 69, 2, 0, 0, 70, 2, + 79, 0, 71, 2, 80, 0, 72, 2, 0, 0, 73, 2, 69, 0, 74, 2, 69, 0, 75, 2, 69, 0, 76, 2, 69, 0, 77, 2, 4, 0, 78, 2, + 7, 0, 79, 2, 4, 0, 80, 2, 4, 0, 81, 2, 76, 0, 82, 2, 4, 0, 83, 2, 4, 0, 84, 2, 75, 0, 85, 2, 75, 0, 86, 2, + 81, 0, 39, 0, 27, 0, 31, 0, 72, 0,240, 1, 12, 0, 87, 2, 36, 0, 80, 0, 38, 0, 44, 2, 67, 0, 5, 2, 82, 0, 88, 2, + 83, 0, 89, 2, 84, 0, 90, 2, 85, 0, 91, 2, 86, 0, 92, 2, 87, 0, 93, 2, 88, 0, 94, 2, 89, 0, 95, 2, 81, 0, 96, 2, + 90, 0, 97, 2, 91, 0, 98, 2, 92, 0, 99, 2, 92, 0,100, 2, 92, 0,101, 2, 4, 0, 54, 0, 4, 0,102, 2, 4, 0,103, 2, + 4, 0,104, 2, 4, 0,105, 2, 4, 0,174, 0, 7, 0, 35, 1, 7, 0,172, 0, 7, 0, 36, 1, 7, 0,106, 2, 4, 0, 46, 2, + 2, 0,107, 2, 2, 0, 19, 0, 2, 0,108, 2, 2, 0,109, 2, 2, 0, 7, 2, 2, 0,110, 2, 93, 0,111, 2, 94, 0,112, 2, + 84, 0, 8, 0, 9, 0,113, 2, 7, 0,114, 2, 4, 0,115, 2, 0, 0, 19, 0, 0, 0,116, 2, 2, 0, 40, 1, 2, 0,117, 2, + 2, 0,118, 2, 82, 0, 7, 0, 4, 0,119, 2, 4, 0,120, 2, 4, 0,121, 2, 4, 0,122, 2, 2, 0, 22, 2, 0, 0,123, 2, + 0, 0, 19, 0, 86, 0, 5, 0, 4, 0,119, 2, 4, 0,120, 2, 0, 0,124, 2, 0, 0,125, 2, 2, 0, 19, 0, 95, 0, 2, 0, + 4, 0,126, 2, 7, 0, 14, 2, 87, 0, 3, 0, 95, 0,127, 2, 4, 0,128, 2, 4, 0, 19, 0, 85, 0, 6, 0, 7, 0,129, 2, + 2, 0,130, 2, 2, 0, 22, 2, 0, 0, 19, 0, 0, 0,125, 2, 0, 0, 48, 2, 88, 0, 4, 0, 0, 0,206, 0, 0, 0,182, 0, + 0, 0,183, 0, 0, 0,184, 0, 96, 0, 6, 0, 47, 0,113, 2, 0, 0, 19, 0, 0, 0,116, 2, 2, 0, 40, 1, 2, 0,117, 2, + 2, 0,118, 2, 97, 0, 1, 0, 7, 0,131, 2, 98, 0, 5, 0, 0, 0,206, 0, 0, 0,182, 0, 0, 0,183, 0, 0, 0,184, 0, + 4, 0, 37, 0, 89, 0, 1, 0, 7, 0,132, 2, 90, 0, 2, 0, 4, 0,133, 2, 4, 0, 17, 0, 83, 0, 7, 0, 7, 0,114, 2, + 47, 0,113, 2, 0, 0, 19, 0, 0, 0,116, 2, 2, 0, 40, 1, 2, 0,117, 2, 2, 0,118, 2, 99, 0, 1, 0, 7, 0,134, 2, +100, 0, 1, 0, 4, 0,135, 2,101, 0, 1, 0, 0, 0,136, 2,102, 0, 1, 0, 7, 0,114, 2,103, 0, 3, 0, 4, 0,137, 2, + 0, 0, 92, 0, 7, 0,138, 2,105, 0, 4, 0, 7, 0,206, 0, 7, 0,182, 0, 7, 0,183, 0, 7, 0,184, 0,106, 0, 1, 0, +105, 0,115, 2,107, 0, 5, 0, 4, 0,139, 2, 4, 0,140, 2, 0, 0, 19, 0, 0, 0, 22, 2, 0, 0, 48, 2,108, 0, 2, 0, + 4, 0,141, 2, 4, 0,140, 2,109, 0, 10, 0,109, 0, 0, 0,109, 0, 1, 0,107, 0,142, 2,106, 0,143, 2,108, 0,144, 2, + 4, 0, 54, 0, 4, 0,103, 2, 4, 0,102, 2, 4, 0, 37, 0, 85, 0,145, 2, 93, 0, 14, 0, 12, 0,146, 2, 85, 0,145, 2, + 0, 0,147, 2, 0, 0,148, 2, 0, 0,149, 2, 0, 0,150, 2, 0, 0,151, 2, 0, 0,152, 2, 0, 0,153, 2, 0, 0, 19, 0, + 92, 0, 99, 2, 92, 0,101, 2, 2, 0,154, 2, 0, 0,155, 2, 94, 0, 8, 0, 4, 0,156, 2, 4, 0,157, 2, 82, 0,158, 2, + 86, 0,159, 2, 4, 0,103, 2, 4, 0,102, 2, 4, 0, 54, 0, 4, 0, 37, 0,110, 0, 7, 0,110, 0, 0, 0,110, 0, 1, 0, + 4, 0, 17, 0, 4, 0, 40, 1, 0, 0, 20, 0, 46, 0,134, 0, 0, 0,160, 2,111, 0, 7, 0,110, 0,161, 2, 2, 0,162, 2, + 2, 0,146, 2, 2, 0,163, 2, 2, 0, 90, 0, 9, 0,164, 2, 9, 0,165, 2,112, 0, 3, 0,110, 0,161, 2, 32, 0,164, 0, + 0, 0, 20, 0,113, 0, 5, 0,110, 0,161, 2, 32, 0,164, 0, 0, 0, 20, 0, 2, 0,166, 2, 0, 0,167, 2,114, 0, 5, 0, +110, 0,161, 2, 7, 0, 88, 0, 7, 0,168, 2, 4, 0,169, 2, 4, 0,170, 2,115, 0, 5, 0,110, 0,161, 2, 32, 0,171, 2, + 0, 0, 72, 0, 4, 0, 40, 1, 4, 0, 19, 0,116, 0, 13, 0,110, 0,161, 2, 32, 0,172, 2, 32, 0,173, 2, 32, 0,174, 2, + 32, 0,175, 2, 7, 0,176, 2, 7, 0,177, 2, 7, 0,168, 2, 7, 0,178, 2, 4, 0,179, 2, 4, 0,180, 2, 4, 0, 90, 0, + 4, 0,181, 2,117, 0, 5, 0,110, 0,161, 2, 2, 0,182, 2, 2, 0, 19, 0, 7, 0,183, 2, 32, 0,184, 2,118, 0, 3, 0, +110, 0,161, 2, 7, 0,185, 2, 4, 0, 90, 0,119, 0, 10, 0,110, 0,161, 2, 7, 0,186, 2, 4, 0,187, 2, 4, 0, 37, 0, + 2, 0, 90, 0, 2, 0,188, 2, 2, 0,189, 2, 2, 0,190, 2, 7, 0,191, 2, 0, 0,192, 2,120, 0, 3, 0,110, 0,161, 2, + 7, 0, 37, 0, 4, 0, 17, 0,121, 0, 6, 0,110, 0,161, 2,122, 0,193, 2,123, 0,194, 2,124, 0,195, 2, 7, 0,196, 2, + 4, 0, 17, 0,125, 0, 11, 0,110, 0,161, 2, 52, 0,197, 2, 7, 0,198, 2, 4, 0,199, 2, 0, 0,192, 2, 7, 0,200, 2, + 4, 0,201, 2, 32, 0,202, 2, 0, 0,203, 2, 4, 0,204, 2, 4, 0, 37, 0,126, 0, 10, 0,110, 0,161, 2, 32, 0,205, 2, + 47, 0,206, 2, 4, 0, 90, 0, 4, 0,207, 2, 7, 0,208, 2, 7, 0,209, 2, 0, 0,203, 2, 4, 0,204, 2, 4, 0, 37, 0, +127, 0, 3, 0,110, 0,161, 2, 7, 0,210, 2, 4, 0,211, 2,128, 0, 5, 0,110, 0,161, 2, 7, 0,212, 2, 0, 0,192, 2, + 2, 0, 19, 0, 2, 0,213, 2,129, 0, 8, 0,110, 0,161, 2, 32, 0,164, 0, 7, 0,212, 2, 7, 0,221, 0, 7, 0,106, 0, + 0, 0,192, 2, 2, 0, 19, 0, 2, 0, 17, 0,130, 0, 21, 0,110, 0,161, 2, 32, 0,214, 2, 0, 0,192, 2, 52, 0,197, 2, + 32, 0,202, 2, 2, 0, 19, 0, 2, 0, 37, 0, 7, 0,215, 2, 7, 0,216, 2, 7, 0,217, 2, 7, 0, 52, 2, 7, 0,218, 2, + 7, 0,219, 2, 7, 0,220, 2, 7, 0,221, 2, 4, 0,201, 2, 4, 0,204, 2, 0, 0,203, 2, 7, 0,222, 2, 7, 0,223, 2, + 7, 0, 43, 0,131, 0, 7, 0,110, 0,161, 2, 2, 0,224, 2, 2, 0,225, 2, 4, 0, 70, 0, 32, 0,164, 0, 7, 0,226, 2, + 0, 0,192, 2,132, 0, 10, 0,110, 0,161, 2, 32, 0,164, 0, 0, 0,227, 2, 7, 0,228, 2, 7, 0,229, 2, 7, 0,221, 2, + 4, 0,230, 2, 4, 0,231, 2, 7, 0,232, 2, 0, 0, 20, 0,133, 0, 1, 0,110, 0,161, 2,134, 0, 7, 0,110, 0,161, 2, + 46, 0,134, 0,135, 0,233, 2,136, 0,234, 2,137, 0,235, 2,138, 0,236, 2, 12, 0,237, 2,139, 0, 14, 0,110, 0,161, 2, + 85, 0,238, 2, 85, 0,239, 2, 85, 0,240, 2, 85, 0,241, 2, 85, 0,242, 2, 85, 0,243, 2, 82, 0,244, 2, 4, 0,245, 2, + 4, 0,246, 2, 2, 0,108, 1, 2, 0, 37, 0, 7, 0,196, 2,140, 0,247, 2,141, 0, 7, 0,110, 0,161, 2, 85, 0,238, 2, + 85, 0,248, 2,142, 0,249, 2,143, 0,247, 2, 4, 0,250, 2, 4, 0,245, 2,144, 0, 4, 0,110, 0,161, 2, 32, 0,164, 0, + 4, 0,251, 2, 4, 0, 37, 0,145, 0, 2, 0, 4, 0,252, 2, 7, 0, 14, 2,146, 0, 2, 0, 4, 0,125, 0, 4, 0,253, 2, +147, 0, 20, 0,110, 0,161, 2, 32, 0,164, 0, 0, 0,192, 2, 2, 0,254, 2, 2, 0,255, 2, 2, 0, 19, 0, 2, 0, 37, 0, + 7, 0, 0, 3, 7, 0, 1, 3, 4, 0, 54, 0, 4, 0, 2, 3,146, 0, 3, 3,145, 0, 4, 3, 4, 0, 5, 3, 4, 0, 6, 3, + 4, 0, 7, 3, 4, 0,253, 2, 7, 0, 8, 3, 7, 0, 9, 3, 7, 0, 10, 3,148, 0, 8, 0,110, 0,161, 2, 59, 0,225, 0, +142, 0,249, 2, 4, 0, 11, 3, 4, 0, 12, 3, 4, 0, 13, 3, 2, 0, 19, 0, 2, 0, 57, 0,149, 0, 8, 0,110, 0,161, 2, + 32, 0, 45, 0, 2, 0, 14, 3, 2, 0, 19, 0, 2, 0,182, 2, 2, 0, 57, 0, 7, 0, 15, 3, 7, 0, 16, 3,150, 0, 5, 0, +110, 0,161, 2, 4, 0, 17, 3, 2, 0, 19, 0, 2, 0, 18, 3, 7, 0, 19, 3,151, 0, 7, 0,110, 0,161, 2, 85, 0, 20, 3, + 4, 0, 21, 3, 0, 0, 22, 3, 0, 0, 23, 3, 0, 0, 24, 3, 0, 0, 25, 3,152, 0, 3, 0,110, 0,161, 2,153, 0, 26, 3, +138, 0,236, 2,154, 0, 10, 0,110, 0,161, 2, 32, 0, 27, 3, 32, 0, 28, 3, 0, 0, 29, 3, 7, 0, 30, 3, 2, 0, 31, 3, + 2, 0, 32, 3, 0, 0, 33, 3, 0, 0, 34, 3, 0, 0,167, 2,155, 0, 9, 0,110, 0,161, 2, 32, 0, 35, 3, 0, 0, 29, 3, + 7, 0, 36, 3, 7, 0, 37, 3, 0, 0, 40, 1, 0, 0,182, 2, 0, 0, 38, 3, 0, 0, 37, 0,156, 0, 27, 0, 27, 0, 31, 0, + 2, 0, 23, 2, 2, 0, 24, 2, 2, 0, 39, 3, 2, 0, 19, 0, 2, 0, 40, 3, 2, 0, 41, 3, 2, 0, 42, 3, 2, 0, 70, 0, + 0, 0, 43, 3, 0, 0, 44, 3, 0, 0, 45, 3, 0, 0, 17, 0, 4, 0, 37, 0, 7, 0, 46, 3, 7, 0, 47, 3, 7, 0, 48, 3, + 7, 0, 49, 3, 7, 0, 50, 3, 7, 0, 51, 3, 34, 0, 52, 3, 36, 0, 80, 0, 38, 0, 44, 2, 87, 0, 93, 2, 7, 0, 53, 3, + 7, 0, 54, 3,156, 0, 55, 3,157, 0, 3, 0,157, 0, 0, 0,157, 0, 1, 0, 0, 0, 20, 0, 72, 0, 3, 0, 7, 0, 56, 3, + 4, 0, 19, 0, 4, 0, 37, 0, 32, 0,116, 0, 27, 0, 31, 0, 39, 0, 75, 0,158, 0, 57, 3, 2, 0, 17, 0, 2, 0, 58, 3, + 4, 0, 59, 3, 4, 0, 60, 3, 4, 0, 61, 3, 0, 0, 62, 3, 32, 0, 38, 0, 32, 0, 63, 3, 32, 0, 64, 3, 32, 0, 65, 3, + 32, 0, 66, 3, 36, 0, 80, 0, 78, 0, 43, 2, 72, 0,240, 1,159, 0, 67, 3,159, 0, 68, 3,160, 0, 69, 3, 9, 0, 2, 0, +161, 0, 70, 3, 12, 0, 71, 3, 12, 0, 87, 2, 12, 0, 3, 2, 12, 0, 72, 3, 12, 0, 73, 3, 4, 0, 40, 1, 4, 0, 74, 3, + 67, 0, 5, 2, 0, 0, 75, 3, 4, 0, 7, 2, 4, 0, 76, 3, 7, 0, 35, 1, 7, 0, 77, 3, 7, 0, 78, 3, 7, 0,172, 0, + 7, 0, 79, 3, 7, 0, 36, 1, 7, 0, 80, 3, 7, 0, 81, 3, 7, 0,228, 2, 7, 0, 82, 3, 7, 0,210, 0, 4, 0, 83, 3, + 2, 0, 19, 0, 2, 0, 84, 3, 2, 0, 85, 3, 2, 0, 86, 3, 2, 0, 87, 3, 2, 0, 88, 3, 2, 0, 89, 3, 2, 0, 90, 3, + 2, 0, 91, 3, 2, 0, 92, 3, 2, 0, 93, 3, 2, 0, 94, 3, 4, 0, 95, 3, 4, 0, 96, 3, 4, 0, 97, 3, 4, 0, 98, 3, + 7, 0, 99, 3, 7, 0, 79, 2, 7, 0,100, 3, 7, 0,101, 3, 7, 0,102, 3, 7, 0,103, 3, 7, 0,104, 3, 7, 0,105, 3, + 7, 0,106, 3, 7, 0,107, 3, 7, 0,108, 3, 7, 0,109, 3, 0, 0,110, 3, 0, 0,111, 3, 0, 0,112, 3, 0, 0,113, 3, + 7, 0,114, 3, 7, 0,115, 3, 12, 0,116, 3, 12, 0,117, 3, 12, 0,118, 3, 12, 0,119, 3, 7, 0,120, 3, 2, 0,133, 2, + 2, 0,121, 3, 7, 0,115, 2, 4, 0,122, 3, 4, 0,123, 3,162, 0,124, 3, 2, 0,125, 3, 2, 0,217, 0, 7, 0,126, 3, + 12, 0,127, 3, 12, 0,128, 3, 12, 0,129, 3, 12, 0,130, 3,163, 0, 32, 1,164, 0,131, 3, 68, 0,132, 3, 2, 0,133, 3, + 2, 0,134, 3, 2, 0,135, 3, 2, 0,136, 3, 7, 0,107, 2, 2, 0,137, 3, 2, 0,138, 3,153, 0,139, 3,142, 0,140, 3, +142, 0,141, 3, 4, 0,142, 3, 4, 0,143, 3, 4, 0,144, 3, 4, 0, 70, 0, 12, 0,145, 3, 12, 0,146, 3,165, 0, 14, 0, +165, 0, 0, 0,165, 0, 1, 0, 32, 0, 38, 0, 7, 0,228, 2, 7, 0, 37, 1, 7, 0,229, 2, 7, 0,221, 2, 0, 0, 20, 0, + 4, 0,230, 2, 4, 0,231, 2, 4, 0,147, 3, 2, 0, 17, 0, 2, 0,148, 3, 7, 0,232, 2,163, 0, 36, 0, 2, 0,149, 3, + 2, 0,150, 3, 2, 0, 19, 0, 2, 0,221, 2, 7, 0,151, 3, 7, 0,152, 3, 7, 0,153, 3, 7, 0,154, 3, 7, 0,155, 3, + 7, 0,156, 3, 7, 0,157, 3, 7, 0,158, 3, 7, 0,159, 3, 7, 0,160, 3, 7, 0,161, 3, 7, 0,162, 3, 7, 0,163, 3, + 7, 0,164, 3, 7, 0,165, 3, 7, 0,166, 3, 7, 0,167, 3, 7, 0,168, 3, 7, 0,169, 3, 7, 0,170, 3, 7, 0,171, 3, + 7, 0,172, 3, 7, 0,173, 3, 7, 0,174, 3, 2, 0,175, 3, 2, 0,176, 3, 2, 0,177, 3, 2, 0,178, 3, 52, 0,165, 0, +166, 0,179, 3, 7, 0,180, 3, 4, 0,170, 2,167, 0, 9, 0,167, 0, 0, 0,167, 0, 1, 0, 4, 0,181, 3, 4, 0,182, 3, + 4, 0,183, 3, 4, 0, 19, 0, 4, 0,184, 3, 9, 0,185, 3, 9, 0,186, 3,138, 0, 19, 0,138, 0, 0, 0,138, 0, 1, 0, + 4, 0, 19, 0, 4, 0,187, 3, 4, 0,188, 3, 4, 0,189, 3, 4, 0,190, 3, 4, 0,191, 3, 4, 0,192, 3, 4, 0,182, 3, + 4, 0,133, 2, 4, 0, 57, 0, 0, 0,193, 3, 0, 0,194, 3, 0, 0,195, 3, 0, 0,196, 3, 12, 0,197, 3,168, 0,198, 3, + 9, 0,199, 3,169, 0, 1, 0, 7, 0, 21, 2,162, 0, 30, 0, 4, 0, 19, 0, 7, 0,200, 3, 7, 0,201, 3, 7, 0,202, 3, + 4, 0,203, 3, 4, 0,204, 3, 4, 0,205, 3, 4, 0,206, 3, 7, 0,207, 3, 7, 0,208, 3, 7, 0,209, 3, 7, 0,210, 3, + 7, 0,211, 3, 7, 0,212, 3, 7, 0,213, 3, 7, 0,214, 3, 7, 0,215, 3, 7, 0,216, 3, 7, 0,217, 3, 7, 0,218, 3, + 7, 0,219, 3, 7, 0,220, 3, 7, 0,221, 3, 7, 0,222, 3, 7, 0,223, 3, 7, 0,224, 3, 4, 0,225, 3, 4, 0,226, 3, + 7, 0,227, 3, 7, 0,106, 3,164, 0, 49, 0, 4, 0,182, 3, 4, 0,228, 3,170, 0,229, 3,171, 0,230, 3, 0, 0, 37, 0, + 0, 0,231, 3, 2, 0,232, 3, 7, 0,233, 3, 0, 0,234, 3, 7, 0,235, 3, 7, 0,236, 3, 7, 0,237, 3, 7, 0,238, 3, + 7, 0,239, 3, 7, 0,240, 3, 7, 0,241, 3, 7, 0,242, 3, 7, 0,243, 3, 2, 0,244, 3, 0, 0,245, 3, 2, 0,246, 3, + 7, 0,247, 3, 7, 0,248, 3, 0, 0,249, 3, 4, 0,126, 0, 4, 0,250, 3, 4, 0,251, 3, 2, 0,252, 3, 2, 0,253, 3, +169, 0,254, 3, 4, 0,255, 3, 4, 0, 82, 0, 7, 0, 0, 4, 7, 0, 1, 4, 7, 0, 2, 4, 7, 0, 3, 4, 2, 0, 4, 4, + 2, 0, 5, 4, 2, 0, 6, 4, 2, 0, 7, 4, 2, 0, 8, 4, 2, 0, 9, 4, 2, 0, 10, 4, 2, 0, 11, 4,172, 0, 12, 4, + 7, 0, 13, 4, 7, 0, 14, 4,138, 0, 15, 4, 12, 0,237, 2,153, 0, 48, 0, 2, 0, 17, 0, 2, 0, 16, 4, 2, 0, 17, 4, + 2, 0, 18, 4, 7, 0, 19, 4, 2, 0, 20, 4, 2, 0, 21, 4, 7, 0, 22, 4, 2, 0, 23, 4, 2, 0, 24, 4, 7, 0, 25, 4, + 7, 0, 26, 4, 7, 0, 27, 4, 7, 0, 28, 4, 7, 0, 29, 4, 7, 0, 30, 4, 4, 0, 31, 4, 7, 0, 32, 4, 7, 0, 33, 4, + 7, 0, 34, 4, 81, 0, 35, 4, 81, 0, 36, 4, 81, 0, 37, 4, 0, 0, 38, 4, 7, 0, 39, 4, 7, 0, 40, 4, 36, 0, 80, 0, + 2, 0, 41, 4, 0, 0, 42, 4, 0, 0, 43, 4, 7, 0, 44, 4, 4, 0, 45, 4, 7, 0, 46, 4, 7, 0, 47, 4, 4, 0, 48, 4, + 4, 0, 19, 0, 7, 0, 49, 4, 7, 0, 50, 4, 7, 0, 51, 4, 85, 0, 52, 4, 7, 0, 53, 4, 7, 0, 54, 4, 7, 0, 55, 4, + 7, 0, 56, 4, 7, 0, 57, 4, 7, 0, 58, 4, 7, 0, 59, 4, 4, 0, 60, 4,173, 0, 73, 0, 27, 0, 31, 0, 39, 0, 75, 0, + 2, 0,175, 0, 2, 0, 41, 1, 2, 0, 73, 1, 2, 0, 61, 4, 7, 0, 62, 4, 7, 0, 63, 4, 7, 0, 64, 4, 7, 0, 65, 4, + 7, 0, 66, 4, 7, 0, 67, 4, 7, 0, 68, 4, 7, 0, 69, 4, 7, 0,133, 1, 7, 0,135, 1, 7, 0,134, 1, 7, 0, 70, 4, + 4, 0, 71, 4, 7, 0, 72, 4, 7, 0, 73, 4, 7, 0, 74, 4, 7, 0, 75, 4, 7, 0, 76, 4, 7, 0, 77, 4, 7, 0, 78, 4, + 2, 0, 79, 4, 2, 0, 40, 1, 2, 0, 80, 4, 2, 0, 81, 4, 2, 0, 82, 4, 2, 0, 83, 4, 2, 0, 84, 4, 2, 0, 85, 4, + 7, 0, 86, 4, 7, 0, 87, 4, 7, 0, 88, 4, 7, 0, 89, 4, 7, 0, 90, 4, 7, 0, 91, 4, 7, 0, 92, 4, 7, 0, 93, 4, + 7, 0, 94, 4, 7, 0, 95, 4, 7, 0, 96, 4, 7, 0, 97, 4, 2, 0, 98, 4, 2, 0, 99, 4, 2, 0,100, 4, 2, 0,101, 4, + 7, 0,102, 4, 7, 0,103, 4, 7, 0,104, 4, 7, 0,105, 4, 2, 0,106, 4, 2, 0,107, 4, 2, 0,108, 4, 2, 0,109, 4, + 7, 0,110, 4, 7, 0,111, 4, 7, 0,112, 4, 7, 0,113, 4, 2, 0,114, 4, 2, 0,115, 4, 2, 0,116, 4, 2, 0, 19, 0, + 7, 0,117, 4, 7, 0,118, 4, 36, 0, 80, 0, 51, 0,103, 1, 2, 0,104, 1, 2, 0,105, 1, 30, 0,150, 0,174, 0, 8, 0, +174, 0, 0, 0,174, 0, 1, 0, 4, 0, 83, 3, 4, 0,119, 4, 4, 0, 19, 0, 2, 0,120, 4, 2, 0,121, 4, 32, 0,164, 0, +175, 0, 13, 0, 9, 0,122, 4, 9, 0,123, 4, 4, 0,124, 4, 4, 0,125, 4, 4, 0,126, 4, 4, 0,127, 4, 4, 0,128, 4, + 4, 0,129, 4, 4, 0,130, 4, 4, 0,131, 4, 4, 0,132, 4, 4, 0, 37, 0, 0, 0,133, 4,176, 0, 5, 0, 9, 0,134, 4, + 9, 0,135, 4, 4, 0,136, 4, 4, 0, 70, 0, 0, 0,137, 4,177, 0, 13, 0, 4, 0, 17, 0, 4, 0,138, 4, 4, 0,139, 4, + 4, 0,140, 4, 4, 0,141, 4, 4, 0,142, 4, 4, 0, 90, 0, 4, 0,143, 4, 4, 0,144, 4, 4, 0,145, 4, 4, 0,146, 4, + 4, 0,147, 4, 26, 0, 30, 0,178, 0, 4, 0, 4, 0,148, 4, 7, 0,149, 4, 2, 0, 19, 0, 2, 0,105, 1,179, 0, 11, 0, +179, 0, 0, 0,179, 0, 1, 0, 0, 0, 20, 0, 67, 0,150, 4, 68, 0,151, 4, 4, 0, 83, 3, 4, 0,152, 4, 4, 0,153, 4, + 4, 0, 37, 0, 4, 0,154, 4, 4, 0,155, 4,180, 0,132, 0,175, 0,156, 4,176, 0,157, 4,177, 0,158, 4,178, 0,159, 4, + 4, 0,250, 2, 4, 0,126, 0, 4, 0,250, 3, 4, 0,160, 4, 4, 0,161, 4, 4, 0,162, 4, 4, 0,163, 4, 2, 0, 19, 0, + 2, 0,164, 4, 7, 0, 79, 2, 7, 0,165, 4, 7, 0,166, 4, 7, 0,167, 4, 7, 0,168, 4, 7, 0,169, 4, 2, 0,170, 4, + 2, 0,171, 4, 2, 0,172, 4, 2, 0,173, 4, 2, 0,216, 0, 2, 0,174, 4, 2, 0,175, 4, 2, 0,178, 3, 2, 0,176, 4, + 2, 0,177, 4, 2, 0, 60, 1, 2, 0,106, 0, 2, 0,178, 4, 2, 0,179, 4, 2, 0,180, 4, 2, 0,181, 4, 2, 0,182, 4, + 2, 0,183, 4, 2, 0,184, 4, 2, 0,185, 4, 2, 0,186, 4, 2, 0, 61, 1, 2, 0,187, 4, 2, 0,188, 4, 2, 0,189, 4, + 2, 0,190, 4, 4, 0,191, 4, 4, 0, 40, 1, 2, 0,192, 4, 2, 0,193, 4, 2, 0,194, 4, 2, 0,195, 4, 2, 0,196, 4, + 2, 0,197, 4, 24, 0,198, 4, 24, 0,199, 4, 23, 0,200, 4, 12, 0,201, 4, 2, 0,202, 4, 2, 0, 37, 0, 7, 0,203, 4, + 7, 0,204, 4, 7, 0,205, 4, 7, 0,206, 4, 4, 0,207, 4, 7, 0,208, 4, 7, 0,209, 4, 7, 0,210, 4, 7, 0,211, 4, + 2, 0,212, 4, 2, 0,213, 4, 2, 0,214, 4, 2, 0,215, 4, 2, 0,216, 4, 2, 0,217, 4, 7, 0,218, 4, 7, 0,219, 4, + 7, 0,220, 4, 2, 0,221, 4, 2, 0,222, 4, 2, 0,223, 4, 2, 0,224, 4, 2, 0,225, 4, 2, 0,226, 4, 2, 0,227, 4, + 2, 0,228, 4, 2, 0,229, 4, 2, 0,230, 4, 4, 0,231, 4, 4, 0,232, 4, 4, 0,233, 4, 4, 0,234, 4, 4, 0,235, 4, + 7, 0,236, 4, 4, 0,237, 4, 4, 0,238, 4, 4, 0,239, 4, 4, 0,240, 4, 7, 0,241, 4, 7, 0,242, 4, 7, 0,243, 4, + 7, 0,244, 4, 7, 0,245, 4, 7, 0,246, 4, 7, 0,247, 4, 7, 0,248, 4, 7, 0,249, 4, 0, 0,250, 4, 0, 0,251, 4, + 4, 0,252, 4, 2, 0,253, 4, 2, 0,209, 1, 0, 0,254, 4, 7, 0,255, 4, 7, 0, 0, 5, 4, 0, 1, 5, 4, 0, 2, 5, + 7, 0, 3, 5, 7, 0, 4, 5, 2, 0, 5, 5, 2, 0, 6, 5, 7, 0, 7, 5, 2, 0, 8, 5, 2, 0, 9, 5, 4, 0, 10, 5, + 2, 0, 11, 5, 2, 0, 12, 5, 2, 0, 13, 5, 2, 0, 14, 5, 7, 0, 15, 5, 7, 0, 70, 0, 42, 0, 16, 5, 0, 0, 17, 5, +181, 0, 9, 0,181, 0, 0, 0,181, 0, 1, 0, 0, 0, 20, 0, 2, 0, 18, 5, 2, 0, 19, 5, 2, 0, 20, 5, 2, 0, 43, 0, + 7, 0, 21, 5, 7, 0, 70, 0,182, 0, 7, 0, 2, 0,187, 2, 2, 0, 40, 1, 2, 0,109, 0, 2, 0, 22, 5, 7, 0, 23, 5, + 7, 0, 70, 0, 42, 0, 24, 5,183, 0, 5, 0, 7, 0, 25, 5, 0, 0, 17, 0, 0, 0, 43, 0, 0, 0, 70, 0, 0, 0,209, 1, +184, 0, 26, 0, 7, 0, 77, 4, 7, 0, 78, 4, 2, 0, 40, 1, 2, 0, 19, 0, 2, 0, 26, 5, 2, 0,105, 1, 2, 0, 80, 4, + 2, 0, 81, 4, 2, 0, 82, 4, 2, 0, 83, 4, 2, 0, 84, 4, 2, 0, 85, 4,183, 0, 27, 5, 2, 0,170, 4, 2, 0,171, 4, + 2, 0,172, 4, 2, 0,173, 4, 2, 0,216, 0, 2, 0,174, 4, 2, 0,175, 4, 2, 0,178, 3,182, 0, 28, 5, 2, 0, 29, 5, + 2, 0,176, 4, 2, 0,179, 4, 2, 0,180, 4,185, 0, 5, 0,185, 0, 0, 0,185, 0, 1, 0, 4, 0,181, 3, 0, 0,193, 3, + 4, 0, 19, 0,186, 0, 6, 0,187, 0, 30, 5, 4, 0, 31, 5, 4, 0, 32, 5, 9, 0, 33, 5, 0, 0, 34, 5, 4, 0, 37, 0, +188, 0, 6, 0,186, 0, 35, 5, 2, 0, 19, 0, 2, 0, 36, 5, 2, 0, 37, 5, 2, 0, 38, 5, 9, 0, 39, 5,189, 0, 4, 0, + 2, 0,106, 0, 2, 0,198, 2, 2, 0,187, 3, 2, 0, 40, 5,190, 0, 14, 0, 2, 0, 19, 0, 2, 0, 41, 5, 2, 0, 42, 5, + 2, 0, 43, 5,189, 0, 44, 5, 9, 0, 39, 5, 7, 0, 45, 5, 7, 0, 57, 0, 4, 0, 46, 5, 4, 0, 47, 5, 4, 0, 48, 5, + 4, 0, 49, 5, 46, 0,134, 0, 32, 0,164, 0,191, 0, 4, 0,191, 0, 0, 0,191, 0, 1, 0, 0, 0, 50, 5, 7, 0, 51, 5, +192, 0, 6, 0,186, 0, 35, 5, 7, 0, 52, 5, 4, 0, 90, 0, 0, 0, 53, 5, 0, 0, 54, 5, 0, 0,167, 2,193, 0, 9, 0, +186, 0, 35, 5, 7, 0, 55, 5, 7, 0, 56, 5, 2, 0, 40, 1, 2, 0, 19, 0, 4, 0, 36, 0, 4, 0, 57, 5, 87, 0, 58, 5, + 9, 0, 39, 5,194, 0, 72, 0,193, 0, 59, 5,193, 0, 60, 5,192, 0, 57, 3, 7, 0, 61, 5, 2, 0, 62, 5, 2, 0, 63, 5, + 7, 0, 64, 5, 7, 0, 65, 5, 2, 0,187, 3, 2, 0, 66, 5, 7, 0, 67, 5, 7, 0, 68, 5, 7, 0, 69, 5, 2, 0, 70, 5, + 2, 0, 46, 5, 2, 0, 71, 5, 2, 0, 72, 5, 2, 0, 73, 5, 2, 0, 74, 5, 7, 0, 75, 5, 7, 0, 76, 5, 7, 0, 77, 5, + 2, 0, 78, 5, 2, 0, 79, 5, 2, 0, 80, 5, 2, 0, 81, 5, 2, 0, 82, 5, 2, 0, 83, 5, 2, 0, 84, 5,188, 0, 85, 5, +190, 0, 86, 5, 7, 0, 87, 5, 7, 0, 88, 5, 7, 0, 89, 5, 2, 0, 90, 5, 2, 0, 91, 5, 0, 0, 92, 5, 0, 0, 93, 5, + 0, 0, 94, 5, 0, 0, 95, 5, 0, 0, 96, 5, 0, 0, 97, 5, 2, 0, 98, 5, 7, 0, 99, 5, 7, 0,100, 5, 7, 0,101, 5, + 7, 0,102, 5, 7, 0,103, 5, 7, 0,104, 5, 7, 0,105, 5, 7, 0,106, 5, 7, 0,107, 5, 7, 0,108, 5, 2, 0,109, 5, + 0, 0,110, 5, 0, 0,111, 5, 0, 0,112, 5, 0, 0,113, 5, 32, 0,114, 5, 0, 0,115, 5, 0, 0,116, 5, 0, 0,117, 5, + 0, 0,118, 5, 0, 0,119, 5, 0, 0,120, 5, 0, 0,121, 5, 0, 0,122, 5, 2, 0,123, 5, 2, 0,124, 5, 2, 0,125, 5, + 2, 0,126, 5, 2, 0,127, 5,195, 0, 8, 0, 4, 0,128, 5, 4, 0,129, 5, 4, 0,130, 5, 4, 0,131, 5, 4, 0,132, 5, + 4, 0,133, 5, 4, 0, 54, 0, 4, 0,103, 2,196, 0, 3, 0, 7, 0,134, 5, 2, 0,135, 5, 2, 0, 19, 0, 46, 0, 37, 0, + 27, 0, 31, 0, 39, 0, 75, 0, 32, 0,136, 5,173, 0,137, 5, 46, 0,138, 5, 47, 0,208, 0, 12, 0,139, 5,174, 0,140, 5, + 32, 0,141, 5, 7, 0,142, 5, 7, 0,143, 5, 7, 0,144, 5, 7, 0,145, 5, 4, 0, 83, 3, 2, 0, 19, 0, 2, 0, 34, 1, + 61, 0, 29, 1,197, 0,146, 5,194, 0,147, 5,198, 0,148, 5,180, 0,182, 0,178, 0,159, 4, 12, 0,100, 0, 12, 0,149, 5, + 12, 0,150, 5,199, 0,151, 5, 2, 0,152, 5, 2, 0,153, 5, 2, 0,217, 0, 2, 0,154, 5, 4, 0,155, 5, 4, 0,156, 5, + 12, 0,157, 5,183, 0, 27, 5,184, 0,158, 5,196, 0,159, 5,161, 0, 70, 3,200, 0, 6, 0, 47, 0,208, 0, 45, 0, 28, 1, + 7, 0, 67, 2, 7, 0, 68, 2, 7, 0,106, 0, 7, 0,160, 5,201, 0, 35, 0, 7, 0,161, 5, 7, 0,162, 5, 7, 0,163, 5, + 7, 0,164, 5, 7, 0,165, 5, 7, 0,166, 5, 7, 0,167, 5, 7, 0,168, 5, 7, 0,169, 5, 7, 0, 47, 1, 7, 0,170, 5, + 7, 0,171, 5, 7, 0,172, 5, 7, 0,173, 5, 7, 0,171, 0, 2, 0,174, 5, 2, 0,175, 5, 4, 0,176, 5, 2, 0,177, 5, + 2, 0,178, 5, 2, 0,179, 5, 2, 0,180, 5, 7, 0,181, 5, 72, 0,182, 5,161, 0, 70, 3,201, 0,183, 5,202, 0,184, 5, +203, 0,185, 5,204, 0,186, 5,205, 0,187, 5,206, 0,188, 5, 7, 0,189, 5, 2, 0,190, 5, 2, 0,191, 5, 4, 0,209, 1, +207, 0, 54, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5, 7, 0,169, 5, + 7, 0, 47, 1, 7, 0, 43, 0, 4, 0,196, 5, 2, 0,179, 5, 2, 0,180, 5, 32, 0,136, 5, 32, 0,197, 5,200, 0,198, 5, +207, 0,183, 5, 0, 0,199, 5, 4, 0, 83, 3, 4, 0,200, 5, 2, 0,201, 5, 2, 0,202, 5, 2, 0,203, 5, 2, 0,204, 5, + 2, 0,209, 1, 2, 0, 19, 0, 2, 0, 6, 2, 2, 0,205, 5, 7, 0,112, 0, 7, 0,206, 5, 7, 0,207, 5, 7, 0,208, 5, + 7, 0,209, 5, 7, 0,210, 5, 7, 0,171, 0, 7, 0,142, 5, 2, 0,211, 5, 2, 0, 90, 1, 2, 0,212, 5, 2, 0,213, 5, + 2, 0,214, 5, 2, 0,215, 5, 2, 0,216, 5, 2, 0,217, 5, 2, 0,218, 5, 2, 0,219, 5, 4, 0,220, 5, 12, 0,221, 5, + 2, 0,222, 5, 2, 0,116, 2, 2, 0,223, 5, 0, 0,224, 5, 0, 0,225, 5, 9, 0,226, 5,161, 0, 70, 3,209, 0, 25, 0, + 24, 0, 36, 0, 24, 0, 64, 0, 23, 0,227, 5, 23, 0,228, 5, 23, 0,229, 5, 7, 0,230, 5, 7, 0,231, 5, 7, 0,232, 5, + 7, 0,233, 5, 2, 0,234, 5, 2, 0,235, 5, 2, 0,236, 5, 2, 0,237, 5, 2, 0,238, 5, 2, 0, 19, 0, 2, 0,239, 5, + 2, 0,240, 5, 2, 0,241, 5, 2, 0,242, 5, 2, 0,243, 5, 2, 0,204, 5, 7, 0,244, 5, 7, 0,245, 5, 4, 0,246, 5, + 4, 0,247, 5,208, 0, 6, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5, +210, 0, 8, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5,211, 0,248, 5, + 46, 0,134, 0,212, 0, 14, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5, +209, 0,249, 5,213, 0,250, 5, 12, 0,251, 5, 2, 0, 40, 1, 2, 0, 19, 0, 2, 0,252, 5, 0, 0,253, 5, 0, 0,254, 5, +214, 0, 20, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5,202, 0,184, 5, +209, 0,249, 5, 2, 0,255, 5, 2, 0, 0, 6, 2, 0, 1, 6, 2, 0, 2, 6, 2, 0,239, 5, 2, 0, 3, 6, 0, 0, 19, 0, + 0, 0,105, 1, 9, 0, 43, 2, 4, 0, 4, 6, 4, 0, 5, 6, 27, 0, 6, 6,215, 0, 16, 0,208, 0, 0, 0,208, 0, 1, 0, + 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5,209, 0,249, 5, 7, 0, 67, 2, 7, 0, 68, 2, 2, 0,255, 5, + 2, 0, 7, 6, 2, 0, 8, 6, 2, 0, 9, 6, 4, 0, 19, 0, 7, 0, 10, 6,161, 0, 70, 3,216, 0, 16, 0, 0, 0, 11, 6, + 0, 0, 12, 6, 0, 0, 13, 6, 0, 0, 14, 6, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0, 15, 6, 2, 0, 16, 6, 2, 0,152, 1, + 2, 0, 17, 6, 4, 0, 18, 6, 4, 0, 19, 6, 2, 0, 20, 6, 2, 0, 21, 6, 0, 0, 22, 6, 0, 0, 23, 6,217, 0, 16, 0, +208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 4, 0, 37, 0,216, 0, 24, 6,218, 0, 25, 6, 12, 0, 26, 6, + 12, 0, 27, 6,219, 0, 28, 6,206, 0, 29, 6,220, 0, 30, 6, 2, 0, 31, 6, 2, 0, 32, 6, 2, 0, 33, 6, 2, 0, 70, 0, +221, 0, 17, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5,209, 0,249, 5, + 12, 0, 34, 6,222, 0, 35, 6, 0, 0, 36, 6,223, 0, 37, 6, 4, 0, 38, 6, 4, 0, 39, 6, 2, 0, 19, 0, 2, 0, 40, 6, + 2, 0, 41, 6, 2, 0, 37, 0,224, 0, 29, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, + 2, 0,195, 5, 47, 0,206, 2, 45, 0, 28, 1, 64, 0, 42, 6, 2, 0,133, 0, 2, 0, 43, 6, 2, 0, 70, 0, 2, 0, 44, 6, + 4, 0, 19, 0, 2, 0, 45, 6, 2, 0,254, 5, 2, 0,253, 5, 2, 0,209, 1, 0, 0, 46, 6, 0, 0, 47, 6, 0, 0, 48, 6, + 0, 0,204, 5, 7, 0, 67, 2, 7, 0, 68, 2, 7, 0, 10, 6, 7, 0, 90, 1, 7, 0, 49, 6, 7, 0, 50, 6,161, 0, 70, 3, +225, 0, 11, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5, 2, 0,252, 5, + 2, 0, 19, 0, 4, 0, 37, 0,213, 0,250, 5,209, 0,249, 5,226, 0, 27, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, + 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5, 42, 0, 51, 6, 4, 0, 52, 6, 4, 0, 53, 6, 2, 0, 90, 0, 2, 0,133, 0, + 2, 0, 54, 6, 0, 0, 55, 6, 0, 0, 56, 6, 4, 0, 57, 6, 4, 0, 58, 6, 4, 0, 59, 6, 4, 0, 60, 6, 2, 0, 61, 6, + 2, 0, 62, 6, 7, 0, 63, 6, 23, 0, 64, 6, 23, 0, 65, 6, 4, 0, 66, 6, 4, 0, 67, 6, 0, 0, 68, 6, 0, 0, 69, 6, +227, 0, 10, 0, 27, 0, 31, 0, 9, 0, 70, 6, 9, 0, 71, 6, 9, 0, 72, 6, 9, 0, 73, 6, 9, 0, 74, 6, 4, 0, 90, 0, + 4, 0, 75, 6, 0, 0, 76, 6, 0, 0, 77, 6,228, 0, 10, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, + 7, 0,194, 5,227, 0, 78, 6, 2, 0, 90, 0, 2, 0,133, 0, 4, 0, 43, 0, 9, 0, 79, 6,229, 0, 8, 0,208, 0, 0, 0, +208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5,209, 0,249, 5, 4, 0, 19, 0, 4, 0, 80, 6,230, 0, 23, 0, +208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5,209, 0,249, 5, 27, 0, 81, 6, + 27, 0, 81, 0, 2, 0, 19, 0, 2, 0,133, 0, 7, 0, 82, 6, 9, 0, 83, 6, 7, 0, 67, 2, 7, 0, 68, 2, 7, 0, 84, 6, + 7, 0, 85, 6, 61, 0, 29, 1, 61, 0, 86, 6, 4, 0, 87, 6, 2, 0, 88, 6, 2, 0, 37, 0,161, 0, 70, 3,231, 0, 10, 0, +208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5, 2, 0, 19, 0, 2, 0, 92, 3, + 4, 0, 37, 0,161, 0, 70, 3,232, 0, 42, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, + 2, 0,195, 5,209, 0,249, 5,218, 0, 25, 6, 0, 0, 11, 6, 0, 0, 12, 6, 0, 0, 13, 6, 2, 0, 17, 0, 2, 0, 21, 6, + 2, 0, 19, 0, 2, 0, 15, 6, 9, 0, 83, 6, 4, 0, 18, 6, 4, 0, 89, 6, 4, 0, 90, 6, 4, 0, 19, 6, 23, 0, 91, 6, + 23, 0, 92, 6, 7, 0, 93, 6, 7, 0, 94, 6, 7, 0, 95, 6, 7, 0, 82, 6, 2, 0, 96, 6, 2, 0,207, 0, 2, 0,152, 1, + 2, 0, 17, 6, 2, 0, 37, 0, 2, 0, 43, 0, 2, 0, 97, 6, 2, 0, 98, 6, 9, 0, 99, 6, 9, 0,100, 6, 9, 0,101, 6, + 9, 0,102, 6, 9, 0,103, 6, 2, 0,104, 6, 0, 0, 23, 6, 57, 0,105, 6,233, 0, 7, 0,233, 0, 0, 0,233, 0, 1, 0, + 4, 0,106, 6, 4, 0, 23, 0, 0, 0, 84, 0, 4, 0,107, 6, 4, 0, 17, 0,234, 0, 13, 0,208, 0, 0, 0,208, 0, 1, 0, + 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5, 4, 0, 17, 0, 4, 0,108, 6, 4, 0, 19, 0, 4, 0, 54, 6, + 12, 0,109, 6, 12, 0,110, 6, 0, 0,111, 6,235, 0, 5, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, + 4, 0, 37, 0,236, 0, 7, 0,236, 0, 0, 0,236, 0, 1, 0, 0, 0,112, 6, 2, 0,113, 6, 2, 0,114, 6, 2, 0,115, 6, + 2, 0, 37, 0,237, 0, 12, 0, 2, 0,114, 6, 2, 0,116, 6, 2, 0,117, 6, 0, 0,167, 2, 2, 0,118, 6, 2, 0,119, 6, + 2, 0,120, 6, 2, 0,121, 6, 2, 0,122, 6, 2, 0,239, 5, 7, 0,123, 6, 7, 0,124, 6,238, 0, 18, 0,238, 0, 0, 0, +238, 0, 1, 0, 0, 0,193, 3,237, 0,125, 6,237, 0,126, 6,237, 0,127, 6,237, 0,128, 6, 7, 0,129, 6, 2, 0,130, 6, + 2, 0,131, 6, 2, 0,132, 6, 2, 0,133, 6, 2, 0,134, 6, 2, 0,135, 6, 2, 0,136, 6, 2, 0,137, 6, 2, 0,138, 6, + 2, 0,139, 6,239, 0, 10, 0, 0, 0,140, 6, 0, 0,141, 6, 0, 0,142, 6, 0, 0,143, 6, 0, 0,144, 6, 0, 0,145, 6, + 2, 0,146, 6, 2, 0,147, 6, 2, 0,148, 6, 2, 0, 37, 0,240, 0, 8, 0, 0, 0,149, 6, 0, 0,150, 6, 0, 0,151, 6, + 0, 0,152, 6, 0, 0,153, 6, 0, 0,154, 6, 7, 0,160, 5, 7, 0, 37, 0,241, 0, 17, 0,239, 0,155, 6,239, 0,156, 6, +239, 0,157, 6,239, 0,158, 6,239, 0,159, 6,239, 0,160, 6,239, 0,161, 6,239, 0,162, 6,239, 0,163, 6,239, 0,164, 6, +239, 0,165, 6,239, 0,166, 6,239, 0,167, 6,239, 0,168, 6,239, 0,169, 6,240, 0,170, 6, 0, 0,171, 6,242, 0, 71, 0, + 0, 0,172, 6, 0, 0,173, 6, 0, 0,144, 6, 0, 0,174, 6, 0, 0,175, 6, 0, 0,176, 6, 0, 0,177, 6, 0, 0,178, 6, + 0, 0,179, 6, 0, 0,180, 6, 0, 0,181, 6, 0, 0,182, 6, 0, 0,183, 6, 0, 0,184, 6, 0, 0,185, 6, 0, 0,186, 6, + 0, 0,187, 6, 0, 0,188, 6, 0, 0,189, 6, 0, 0,190, 6, 0, 0,191, 6, 0, 0,192, 6, 0, 0,193, 6, 0, 0,194, 6, + 0, 0,195, 6, 0, 0,196, 6, 0, 0,197, 6, 0, 0,198, 6, 0, 0,199, 6, 0, 0,200, 6, 0, 0,201, 6, 0, 0,202, 6, + 0, 0,203, 6, 0, 0,204, 6, 0, 0,205, 6, 0, 0,206, 6, 0, 0,207, 6, 0, 0,208, 6, 0, 0,209, 6, 0, 0,210, 6, + 0, 0,211, 6, 0, 0,212, 6, 0, 0,213, 6, 0, 0,214, 6, 0, 0,215, 6, 0, 0,216, 6, 0, 0,217, 6, 0, 0,218, 6, + 0, 0,219, 6, 0, 0,220, 6, 0, 0,221, 6, 0, 0,222, 6, 0, 0,223, 6, 0, 0,224, 6, 0, 0,225, 6, 0, 0,226, 6, + 0, 0,227, 6, 0, 0,228, 6, 0, 0,229, 6, 0, 0,230, 6, 0, 0,231, 6, 0, 0,232, 6, 0, 0,233, 6, 0, 0,234, 6, + 0, 0,235, 6, 0, 0,236, 6, 0, 0,237, 6, 0, 0,238, 6, 0, 0,239, 6, 0, 0,240, 6, 0, 0, 92, 0,243, 0, 5, 0, + 0, 0,241, 6, 0, 0,196, 6, 0, 0,198, 6, 2, 0, 19, 0, 2, 0, 37, 0,244, 0, 22, 0,244, 0, 0, 0,244, 0, 1, 0, + 0, 0, 20, 0,241, 0,242, 6,242, 0,243, 6,242, 0,244, 6,242, 0,245, 6,242, 0,246, 6,242, 0,247, 6,242, 0,248, 6, +242, 0,249, 6,242, 0,250, 6,242, 0,251, 6,242, 0,252, 6,242, 0,253, 6,242, 0,254, 6,242, 0,255, 6,242, 0, 0, 7, +242, 0, 1, 7,242, 0, 2, 7,242, 0, 3, 7,243, 0, 4, 7,245, 0, 5, 0, 4, 0, 19, 0, 4, 0, 37, 0, 7, 0,115, 2, + 7, 0, 5, 7, 7, 0, 21, 2,246, 0, 71, 0, 4, 0, 19, 0, 4, 0, 6, 7, 4, 0, 7, 7, 0, 0, 8, 7, 0, 0, 9, 7, + 0, 0, 10, 7, 0, 0, 11, 7, 0, 0, 12, 7, 0, 0, 13, 7, 0, 0, 14, 7, 0, 0, 15, 7, 0, 0, 16, 7, 2, 0, 17, 7, + 2, 0, 37, 0, 4, 0, 18, 7, 4, 0, 19, 7, 4, 0, 20, 7, 4, 0, 21, 7, 2, 0, 22, 7, 2, 0, 23, 7, 4, 0, 24, 7, + 4, 0, 25, 7, 4, 0, 26, 7, 4, 0, 27, 7, 4, 0, 28, 7, 4, 0,109, 6, 4, 0, 29, 7, 2, 0, 30, 7, 2, 0, 31, 7, + 2, 0, 32, 7, 2, 0, 33, 7, 12, 0, 34, 7, 12, 0, 35, 7, 12, 0, 36, 7, 2, 0, 37, 7, 2, 0, 38, 7, 2, 0, 39, 7, + 2, 0, 40, 7, 2, 0, 41, 7, 2, 0, 42, 7, 2, 0, 43, 7, 2, 0, 44, 7,245, 0, 45, 7, 2, 0, 46, 7, 2, 0, 47, 7, + 2, 0, 48, 7, 2, 0, 49, 7, 2, 0, 50, 7, 2, 0, 51, 7, 2, 0, 52, 7, 2, 0, 53, 7, 4, 0, 54, 7, 4, 0, 55, 7, + 2, 0, 56, 7, 2, 0, 57, 7, 2, 0, 58, 7, 2, 0, 59, 7, 2, 0, 60, 7, 2, 0, 61, 7, 2, 0, 62, 7, 2, 0, 63, 7, + 2, 0, 64, 7, 2, 0, 65, 7, 2, 0, 66, 7, 2, 0, 67, 7, 0, 0, 68, 7, 0, 0, 69, 7, 7, 0, 70, 7, 2, 0, 90, 5, + 2, 0, 91, 5, 55, 0, 71, 7,211, 0, 21, 0, 27, 0, 31, 0, 12, 0, 72, 7, 12, 0, 73, 7, 12, 0, 74, 7, 12, 0,192, 5, + 46, 0,134, 0, 46, 0, 75, 7, 2, 0, 76, 7, 2, 0, 77, 7, 2, 0, 78, 7, 2, 0, 79, 7, 2, 0, 80, 7, 2, 0, 81, 7, + 2, 0, 82, 7, 2, 0, 37, 0, 2, 0, 83, 7, 2, 0, 84, 7, 4, 0, 70, 0,206, 0, 85, 7, 9, 0, 86, 7, 2, 0, 87, 7, +247, 0, 5, 0,247, 0, 0, 0,247, 0, 1, 0,247, 0, 88, 7, 13, 0, 89, 7, 4, 0, 19, 0,248, 0, 7, 0,248, 0, 0, 0, +248, 0, 1, 0,247, 0, 90, 7,247, 0, 91, 7, 2, 0,199, 4, 2, 0, 19, 0, 4, 0, 37, 0,249, 0, 23, 0,249, 0, 0, 0, +249, 0, 1, 0,250, 0, 92, 7,251, 0, 30, 6, 0, 0, 93, 7, 0, 0, 94, 7, 0, 0, 95, 7, 2, 0, 96, 7, 2, 0, 97, 7, + 2, 0, 98, 7, 2, 0, 99, 7, 2, 0,100, 7, 2, 0, 37, 0, 2, 0, 19, 0, 2, 0,101, 7, 2, 0,102, 7, 2, 0,103, 7, + 4, 0,104, 7,249, 0,105, 7, 9, 0,106, 7, 4, 0,107, 7, 4, 0,108, 7, 0, 0,109, 7,252, 0, 22, 0,252, 0, 0, 0, +252, 0, 1, 0,247, 0, 90, 7,247, 0, 91, 7,247, 0,110, 7,247, 0,111, 7,211, 0,112, 7, 23, 0, 52, 0, 0, 0,193, 5, + 0, 0,113, 7, 2, 0,240, 5, 2, 0,241, 5, 2, 0,114, 7, 2, 0, 37, 0, 2, 0, 79, 7, 2, 0,107, 6, 2, 0, 19, 0, +253, 0, 92, 7, 12, 0,115, 7, 12, 0,192, 5, 12, 0,116, 7, 12, 0,117, 7,254, 0, 21, 0,254, 0, 0, 0,254, 0, 1, 0, +209, 0,249, 5, 23, 0,118, 7, 23, 0,119, 7, 2, 0,240, 5, 2, 0,241, 5, 2, 0,120, 7, 2, 0,121, 7, 2, 0,122, 7, + 2, 0, 19, 0, 7, 0, 63, 2, 2, 0, 78, 7, 2, 0, 82, 7, 4, 0, 43, 0,255, 0, 92, 7, 12, 0,123, 7, 12, 0,124, 7, + 12, 0,116, 7, 0, 0,125, 7, 9, 0,126, 7, 0, 1, 11, 0, 0, 0,127, 7, 2, 0,128, 7, 2, 0,129, 7, 2, 0,130, 7, + 2, 0,131, 7, 2, 0,188, 4, 2, 0,183, 4,211, 0,132, 7, 46, 0,133, 7, 4, 0,134, 7, 4, 0,135, 7, 1, 1, 1, 0, + 0, 0,136, 7, 2, 1, 8, 0, 57, 0,137, 7, 57, 0,138, 7, 2, 1,139, 7, 2, 1,140, 7, 2, 1,141, 7, 2, 0,129, 0, + 2, 0, 19, 0, 4, 0,142, 7, 3, 1, 4, 0, 4, 0, 52, 6, 4, 0,143, 7, 4, 0, 57, 6, 4, 0,144, 7, 4, 1, 2, 0, + 4, 0,145, 7, 4, 0,146, 7, 5, 1, 7, 0, 7, 0,147, 7, 7, 0,148, 7, 7, 0,149, 7, 4, 0, 19, 0, 4, 0, 37, 0, + 7, 0, 72, 4, 7, 0,150, 7, 6, 1, 6, 0, 0, 0,151, 7, 0, 0, 13, 6, 49, 0,137, 0, 2, 0,106, 0, 2, 0,187, 4, + 4, 0, 37, 0, 7, 1, 21, 0, 7, 1, 0, 0, 7, 1, 1, 0, 4, 0, 57, 0, 4, 0, 23, 0, 4, 0, 28, 0, 4, 0,152, 7, + 4, 0,153, 7, 4, 0,154, 7, 1, 1,155, 7, 0, 0,151, 7, 4, 0,156, 7, 4, 0,157, 7, 6, 1, 64, 3, 3, 1,158, 7, + 4, 1,159, 7, 5, 1,160, 7, 2, 1,161, 7, 2, 1,162, 7, 2, 1,163, 7, 57, 0,164, 7, 57, 0,165, 7, 8, 1, 12, 0, + 0, 0,239, 1, 9, 0,193, 0, 0, 0,194, 0, 4, 0,197, 0, 4, 0,205, 0, 9, 0,198, 0, 7, 0,200, 0, 7, 0,201, 0, + 9, 0,166, 7, 9, 0,167, 7, 9, 0,202, 0, 9, 0,204, 0, 9, 1, 43, 0, 9, 1, 0, 0, 9, 1, 1, 0, 9, 0,168, 7, + 9, 0, 26, 0, 0, 0, 27, 0, 4, 0, 19, 0, 4, 0, 17, 0, 4, 0, 23, 0, 4, 0, 88, 0, 4, 0,169, 7, 4, 0,170, 7, + 4, 0,153, 7, 4, 0,154, 7, 4, 0,171, 7, 4, 0,216, 0, 4, 0,172, 7, 4, 0,173, 7, 7, 0, 56, 5, 7, 0,174, 7, + 4, 0,126, 0, 4, 0,175, 7, 7, 1,176, 7, 36, 0, 80, 0, 46, 0,134, 0, 49, 0,137, 0, 7, 0,177, 7, 7, 0,178, 7, + 8, 1, 30, 1, 9, 1,179, 7, 9, 1,180, 7, 9, 1,181, 7, 12, 0,182, 7, 10, 1,183, 7, 11, 1,184, 7, 7, 0,185, 7, + 7, 0,186, 7, 4, 0,187, 7, 7, 0,188, 7, 9, 0,189, 7, 4, 0,190, 7, 4, 0,191, 7, 4, 0,192, 7, 7, 0,193, 7, + 12, 1, 4, 0, 12, 1, 0, 0, 12, 1, 1, 0, 12, 0,194, 7, 9, 1,195, 7,197, 0, 6, 0, 12, 0,196, 7, 12, 0,182, 7, + 12, 0,197, 7, 9, 1,198, 7, 0, 0,199, 7, 0, 0,200, 7, 13, 1, 4, 0, 7, 0,201, 7, 7, 0,109, 0, 2, 0,202, 7, + 2, 0,203, 7, 14, 1, 6, 0, 7, 0,204, 7, 7, 0,205, 7, 7, 0,206, 7, 7, 0,207, 7, 4, 0,208, 7, 4, 0,209, 7, + 15, 1, 12, 0, 7, 0,210, 7, 7, 0,211, 7, 7, 0,212, 7, 7, 0,213, 7, 7, 0,214, 7, 7, 0,215, 7, 7, 0,216, 7, + 7, 0,217, 7, 7, 0,218, 7, 7, 0,219, 7, 4, 0,210, 2, 4, 0,220, 7, 16, 1, 2, 0, 7, 0, 25, 5, 7, 0, 37, 0, + 17, 1, 5, 0, 7, 0,221, 7, 7, 0,222, 7, 4, 0, 90, 0, 4, 0,168, 2, 4, 0,223, 7, 18, 1, 6, 0, 18, 1, 0, 0, + 18, 1, 1, 0, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,224, 7, 2, 0, 57, 0, 19, 1, 8, 0, 19, 1, 0, 0, 19, 1, 1, 0, + 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,224, 7, 2, 0, 57, 0, 7, 0, 23, 0, 7, 0,126, 0, 20, 1, 45, 0, 20, 1, 0, 0, + 20, 1, 1, 0, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,224, 7, 2, 0,212, 0, 2, 0,244, 3, 2, 0,225, 7, 7, 0,226, 7, + 7, 0, 89, 0, 7, 0,223, 2, 4, 0,227, 7, 4, 0, 82, 0, 4, 0,170, 2, 7, 0,228, 7, 7, 0,229, 7, 7, 0,230, 7, + 7, 0,231, 7, 7, 0,232, 7, 7, 0,233, 7, 7, 0,220, 2, 7, 0, 27, 1, 7, 0,234, 7, 7, 0,235, 7, 7, 0, 37, 0, + 7, 0,236, 7, 7, 0,237, 7, 7, 0,238, 7, 2, 0,239, 7, 2, 0,240, 7, 2, 0,241, 7, 2, 0,242, 7, 2, 0,243, 7, + 2, 0,244, 7, 2, 0,245, 7, 2, 0,246, 7, 2, 0, 6, 2, 2, 0,247, 7, 2, 0, 3, 2, 2, 0,248, 7, 0, 0,249, 7, + 0, 0,250, 7, 7, 0,210, 0, 21, 1,251, 7, 68, 0,212, 1, 22, 1, 16, 0, 22, 1, 0, 0, 22, 1, 1, 0, 2, 0, 17, 0, + 2, 0, 19, 0, 2, 0,224, 7, 2, 0,212, 0, 7, 0,215, 2, 7, 0,216, 2, 7, 0,217, 2, 7, 0, 52, 2, 7, 0,218, 2, + 7, 0,219, 2, 7, 0,252, 7, 7, 0,220, 2, 7, 0,222, 2, 7, 0,223, 2,223, 0, 5, 0, 2, 0, 17, 0, 2, 0,142, 7, + 2, 0, 19, 0, 2, 0,253, 7, 27, 0, 81, 6,222, 0, 3, 0, 4, 0, 69, 0, 4, 0,254, 7,223, 0, 2, 0, 23, 1, 7, 0, + 23, 1, 0, 0, 23, 1, 1, 0, 0, 0, 20, 0, 2, 0, 17, 0, 2, 0, 19, 0, 4, 0, 22, 0, 9, 0,255, 7, 24, 1, 5, 0, + 0, 0, 20, 0, 7, 0, 47, 1, 7, 0, 0, 8, 4, 0, 1, 8, 4, 0, 37, 0, 25, 1, 4, 0, 2, 0, 17, 0, 2, 0, 19, 0, + 2, 0, 43, 0, 2, 0, 70, 0, 26, 1, 4, 0, 0, 0, 20, 0, 67, 0, 2, 8, 7, 0, 47, 1, 7, 0, 37, 0, 27, 1, 6, 0, + 2, 0, 3, 8, 2, 0, 4, 8, 2, 0, 17, 0, 2, 0, 5, 8, 0, 0, 6, 8, 0, 0, 7, 8, 28, 1, 5, 0, 4, 0, 17, 0, + 4, 0, 37, 0, 0, 0, 20, 0, 0, 0, 8, 8, 0, 0, 9, 8, 29, 1, 3, 0, 4, 0, 17, 0, 4, 0, 37, 0, 0, 0, 20, 0, + 30, 1, 4, 0, 2, 0, 10, 8, 2, 0, 11, 8, 2, 0, 19, 0, 2, 0, 37, 0, 31, 1, 6, 0, 0, 0, 20, 0, 0, 0, 12, 8, + 2, 0, 13, 8, 2, 0,220, 2, 2, 0, 40, 1, 2, 0, 70, 0, 32, 1, 5, 0, 0, 0, 20, 0, 7, 0,109, 0, 7, 0, 74, 4, + 2, 0, 19, 0, 2, 0,182, 2, 33, 1, 3, 0, 0, 0, 20, 0, 4, 0,170, 2, 4, 0, 10, 8, 34, 1, 7, 0, 0, 0, 20, 0, + 7, 0, 74, 4, 0, 0, 14, 8, 0, 0, 15, 8, 2, 0, 40, 1, 2, 0, 43, 0, 4, 0, 16, 8, 35, 1, 3, 0, 32, 0, 17, 8, + 0, 0, 18, 8, 0, 0, 19, 8, 36, 1, 18, 0, 36, 1, 0, 0, 36, 1, 1, 0, 2, 0, 17, 0, 2, 0, 20, 8, 2, 0, 19, 0, + 2, 0, 21, 8, 2, 0, 22, 8, 2, 0, 23, 8, 2, 0, 43, 0, 2, 0, 70, 0, 0, 0, 20, 0, 9, 0, 2, 0, 37, 1, 24, 8, + 32, 0, 45, 0, 2, 0, 40, 5, 2, 0,185, 7, 2, 0, 25, 8, 2, 0, 37, 0, 38, 1, 11, 0, 0, 0, 20, 0, 0, 0, 17, 0, + 0, 0, 26, 8, 2, 0, 19, 0, 2, 0,182, 2, 2, 0, 27, 8, 4, 0, 28, 8, 4, 0, 29, 8, 4, 0, 30, 8, 4, 0, 31, 8, + 4, 0, 32, 8, 39, 1, 1, 0, 0, 0, 33, 8, 40, 1, 4, 0, 42, 0, 51, 6, 0, 0, 34, 8, 4, 0, 40, 1, 4, 0, 19, 0, + 37, 1, 18, 0, 37, 1, 0, 0, 37, 1, 1, 0, 37, 1, 35, 8, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0, 36, 8, 2, 0, 23, 8, + 2, 0, 20, 8, 2, 0, 37, 8, 2, 0, 70, 0, 2, 0,209, 1, 0, 0, 20, 0, 9, 0, 2, 0, 41, 1, 24, 8, 36, 1, 38, 8, + 2, 0, 15, 0, 2, 0, 39, 8, 4, 0, 40, 8, 42, 1, 3, 0, 4, 0,196, 2, 4, 0, 37, 0, 32, 0, 45, 0, 43, 1, 12, 0, +159, 0, 41, 8, 2, 0, 17, 0, 2, 0, 19, 0, 4, 0,226, 7, 4, 0, 89, 0, 0, 0, 20, 0, 0, 0, 42, 8, 2, 0, 43, 8, + 2, 0, 44, 8, 2, 0, 45, 8, 2, 0, 46, 8, 7, 0, 47, 8, 44, 1, 13, 0, 2, 0, 19, 0, 2, 0, 48, 8, 4, 0,226, 7, + 4, 0, 89, 0, 2, 0, 49, 8, 7, 0,202, 3, 7, 0, 50, 8, 10, 1,183, 7, 45, 1, 51, 8, 2, 0, 17, 0, 2, 0, 52, 8, + 2, 0, 53, 8, 2, 0, 54, 8, 46, 1, 11, 0, 4, 0,196, 2, 2, 0, 17, 0, 2, 0, 19, 0, 32, 0, 45, 0, 81, 0, 55, 8, + 0, 0, 20, 0, 7, 0, 56, 8, 7, 0, 57, 8, 7, 0,100, 3, 2, 0, 58, 8, 2, 0, 59, 8, 47, 1, 5, 0, 2, 0, 17, 0, + 2, 0, 19, 0, 4, 0, 37, 0, 46, 0,134, 0, 32, 0,136, 5, 48, 1, 5, 0, 4, 0, 19, 0, 4, 0, 17, 0, 0, 0, 20, 0, + 0, 0, 8, 8, 32, 0, 45, 0, 49, 1, 13, 0, 2, 0, 19, 0, 2, 0, 17, 0, 2, 0, 20, 8, 2, 0,101, 3, 7, 0, 60, 8, + 7, 0, 61, 8, 7, 0, 35, 1, 7, 0, 36, 1, 7, 0, 77, 3, 7, 0, 80, 3, 7, 0, 62, 8, 7, 0, 63, 8, 32, 0, 64, 8, + 50, 1, 10, 0, 2, 0, 19, 0, 2, 0, 17, 0, 4, 0,226, 7, 4, 0, 89, 0, 0, 0, 20, 0, 0, 0, 42, 8, 2, 0, 43, 0, + 2, 0, 64, 0, 2, 0, 65, 8, 2, 0, 66, 8, 51, 1, 8, 0, 32, 0, 45, 0, 7, 0,217, 2, 7, 0, 67, 8, 7, 0, 68, 8, + 7, 0,212, 2, 2, 0, 19, 0, 2, 0,182, 2, 7, 0, 69, 8, 52, 1, 12, 0, 2, 0, 17, 0, 2, 0, 40, 1, 2, 0, 19, 0, + 2, 0,220, 2, 2, 0,196, 2, 2, 0, 70, 8, 4, 0, 37, 0, 7, 0, 71, 8, 7, 0, 72, 8, 7, 0, 73, 8, 7, 0, 74, 8, + 0, 0, 75, 8, 53, 1, 10, 0, 2, 0, 19, 0, 2, 0, 17, 0, 4, 0,226, 7, 4, 0, 89, 0, 0, 0, 20, 0, 2, 0,105, 1, + 2, 0, 64, 0, 2, 0, 65, 8, 2, 0, 66, 8, 68, 0,212, 1, 54, 1, 7, 0, 4, 0,170, 2, 4, 0, 76, 8, 4, 0, 77, 8, + 4, 0, 78, 8, 7, 0, 79, 8, 7, 0, 80, 8, 0, 0, 14, 8, 55, 1, 7, 0, 0, 0, 81, 8, 32, 0, 82, 8, 0, 0, 18, 8, + 2, 0, 83, 8, 2, 0, 43, 0, 4, 0, 70, 0, 0, 0, 19, 8, 56, 1, 6, 0, 2, 0, 19, 0, 2, 0, 17, 0, 4, 0,226, 7, + 4, 0, 89, 0, 0, 0, 84, 8, 0, 0, 85, 8, 57, 1, 1, 0, 4, 0, 19, 0, 58, 1, 6, 0, 0, 0, 92, 0, 2, 0, 17, 0, + 2, 0, 19, 0, 4, 0, 86, 8, 7, 0, 87, 8, 42, 0, 51, 6, 59, 1, 4, 0, 0, 0, 48, 2, 2, 0, 19, 0, 4, 0, 17, 0, + 32, 0, 45, 0, 60, 1, 2, 0, 4, 0, 17, 0, 4, 0,229, 5, 41, 1, 10, 0, 41, 1, 0, 0, 41, 1, 1, 0, 41, 1, 35, 8, + 2, 0, 17, 0, 2, 0, 19, 0, 2, 0, 20, 8, 2, 0, 88, 8, 0, 0, 20, 0, 9, 0, 2, 0, 32, 0, 45, 0, 61, 1, 10, 0, + 7, 0,100, 3, 7, 0, 89, 8, 7, 0, 90, 8, 7, 0, 91, 8, 7, 0, 92, 8, 4, 0, 19, 0, 7, 0, 70, 8, 7, 0, 93, 8, + 7, 0, 94, 8, 7, 0, 37, 0, 11, 1, 12, 0, 11, 1, 0, 0, 11, 1, 1, 0, 10, 1, 95, 8, 9, 0,193, 0, 4, 0,143, 3, + 4, 0,189, 3, 4, 0,190, 3, 4, 0, 96, 8, 4, 0, 97, 8, 4, 0, 98, 8, 7, 0,202, 3, 7, 0, 37, 0, 45, 1, 8, 0, + 7, 0, 99, 8, 7, 0,100, 8, 7, 0,101, 8, 7, 0,102, 8, 7, 0,103, 8, 7, 0,104, 8, 7, 0,105, 8, 7, 0,106, 8, + 10, 1, 15, 0, 27, 0, 31, 0, 0, 0,192, 0, 43, 0,149, 0, 9, 0,193, 0, 43, 0,107, 8, 36, 0, 80, 0, 7, 0,202, 3, + 7, 0,108, 8, 7, 0, 50, 8, 7, 0, 99, 8, 7, 0,100, 8, 7, 0,109, 8, 4, 0, 90, 0, 4, 0, 98, 8, 9, 0,110, 8, + 62, 1, 15, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5,252, 0,111, 8,209, 0,249, 5, + 10, 1,183, 7, 2, 0, 40, 1, 2, 0, 48, 8, 2, 0, 67, 2, 2, 0, 68, 2, 2, 0, 19, 0, 2, 0,254, 5, 4, 0, 70, 0, + 63, 1, 6, 0, 63, 1, 0, 0, 63, 1, 1, 0, 32, 0, 45, 0, 9, 0,112, 8, 4, 0,217, 0, 4, 0, 37, 0, 68, 0, 4, 0, + 27, 0, 31, 0, 12, 0,113, 8, 4, 0,131, 0, 7, 0,114, 8, 64, 1, 25, 0, 64, 1, 0, 0, 64, 1, 1, 0, 64, 1, 38, 0, + 12, 0,115, 8, 0, 0, 20, 0, 7, 0,116, 8, 7, 0,117, 8, 7, 0,118, 8, 7, 0,119, 8, 4, 0, 19, 0, 7, 0,120, 8, + 7, 0,121, 8, 7, 0,122, 8, 7, 0, 47, 1, 7, 0, 14, 2, 7, 0,123, 8, 7, 0,168, 2, 7, 0,124, 8, 7, 0,125, 8, + 7, 0,126, 8, 7, 0,127, 8, 7, 0,128, 8, 7, 0,172, 0, 2, 0,131, 0, 2, 0, 71, 5, 65, 1, 21, 0, 27, 0, 31, 0, + 12, 0,129, 8, 12, 0,130, 8, 12, 0,131, 8, 9, 0,132, 8, 4, 0, 19, 0, 4, 0,201, 5, 2, 0,224, 2, 2, 0, 4, 6, + 2, 0,131, 0, 2, 0,133, 8, 2, 0,134, 8, 2, 0,135, 8, 2, 0,136, 8, 2, 0,137, 8, 4, 0,138, 8, 4, 0,139, 8, + 4, 0,140, 8, 4, 0,141, 8, 4, 0,142, 8, 4, 0,143, 8, 66, 1, 2, 0, 7, 0,129, 2, 4, 0, 19, 0, 67, 1, 5, 0, + 66, 1,144, 8, 4, 0,168, 2, 4, 0,145, 8, 4, 0,146, 8, 4, 0, 19, 0, 68, 1, 6, 0, 4, 0, 37, 0, 4, 0, 4, 6, + 4, 0,140, 8, 4, 0,141, 8, 4, 0,142, 8, 4, 0,143, 8, 69, 1, 38, 0, 69, 1, 0, 0, 69, 1, 1, 0, 26, 0,147, 8, + 12, 0,127, 3, 0, 0, 20, 0, 2, 0, 19, 0, 2, 0,148, 8, 2, 0,149, 8, 2, 0,150, 8, 2, 0, 86, 3, 2, 0,151, 8, + 4, 0, 50, 2, 4, 0,140, 8, 4, 0,141, 8, 64, 1,152, 8, 69, 1, 38, 0, 69, 1,153, 8, 12, 0,154, 8, 9, 0,155, 8, + 9, 0,156, 8, 9, 0,157, 8, 7, 0, 35, 1, 7, 0,172, 0, 7, 0,158, 8, 7, 0,249, 1, 2, 0,159, 8, 2, 0, 37, 0, + 7, 0,160, 8, 7, 0,161, 8, 7, 0, 82, 3, 7, 0,162, 8, 7, 0,163, 8, 7, 0,164, 8, 7, 0,165, 8, 7, 0,166, 8, + 7, 0,167, 8, 7, 0, 43, 2, 32, 0,168, 8,160, 0, 9, 0, 12, 0,169, 8, 2, 0, 19, 0, 2, 0,170, 8, 7, 0, 79, 2, + 7, 0,171, 8, 7, 0,172, 8, 12, 0,173, 8, 4, 0,174, 8, 4, 0, 37, 0, 70, 1, 7, 0, 70, 1, 0, 0, 70, 1, 1, 0, + 12, 0,175, 8, 4, 0, 19, 0, 4, 0,176, 8, 0, 0,193, 3,243, 0,177, 8,159, 0, 7, 0, 27, 0, 31, 0, 12, 0,178, 8, + 12, 0,169, 8, 12, 0,179, 8, 12, 0,100, 0, 4, 0, 19, 0, 4, 0,180, 8,213, 0, 4, 0, 27, 0, 95, 8, 12, 0,169, 8, + 4, 0,181, 8, 4, 0, 19, 0, 71, 1, 17, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, + 2, 0,195, 5,209, 0,249, 5,159, 0, 67, 3,213, 0,182, 8, 0, 0, 40, 1, 0, 0,252, 5, 2, 0, 19, 0, 2, 0,183, 8, + 2, 0,253, 5, 2, 0,254, 5, 2, 0,184, 8, 7, 0,185, 8, 72, 1, 8, 0, 72, 1, 0, 0, 72, 1, 1, 0, 70, 1,186, 8, + 36, 0, 80, 0, 12, 0, 71, 3, 4, 0, 19, 0, 0, 0, 20, 0, 4, 0,187, 8, 73, 1, 5, 0, 73, 1, 0, 0, 73, 1, 1, 0, + 36, 0, 80, 0, 2, 0, 19, 0, 0, 0,188, 8, 74, 1, 12, 0, 74, 1, 0, 0, 74, 1, 1, 0, 9, 0, 2, 0, 2, 0, 17, 0, + 2, 0, 19, 0, 0, 0,189, 8, 0, 0,190, 8, 0, 0,188, 8, 7, 0,191, 8, 7, 0,192, 8, 4, 0, 37, 0, 36, 0, 80, 0, + 75, 1, 9, 0, 75, 1, 0, 0, 75, 1, 1, 0, 32, 0,193, 8, 0, 0,227, 2, 7, 0,194, 8, 2, 0,195, 8, 2, 0, 19, 0, + 2, 0, 17, 0, 2, 0,196, 8, 76, 1, 7, 0, 42, 0, 51, 6, 26, 0,147, 8, 4, 0, 19, 0, 4, 0,197, 8, 12, 0,198, 8, + 32, 0,193, 8, 0, 0,227, 2, 77, 1, 12, 0, 32, 0,193, 8, 2, 0,199, 8, 2, 0, 19, 0, 2, 0,200, 8, 2, 0,201, 8, + 0, 0,227, 2, 32, 0,202, 8, 0, 0,203, 8, 7, 0,204, 8, 7, 0, 14, 2, 7, 0,205, 8, 7, 0,206, 8, 78, 1, 6, 0, + 32, 0,193, 8, 4, 0,207, 8, 4, 0,208, 8, 4, 0, 90, 0, 4, 0, 37, 0, 0, 0,227, 2, 79, 1, 4, 0, 32, 0,193, 8, + 4, 0, 19, 0, 4, 0,207, 8, 0, 0,227, 2, 80, 1, 4, 0, 32, 0,193, 8, 4, 0, 19, 0, 4, 0,207, 8, 0, 0,227, 2, + 81, 1, 10, 0, 32, 0,193, 8, 4, 0,209, 8, 7, 0,125, 0, 4, 0, 19, 0, 2, 0, 47, 6, 2, 0,210, 8, 2, 0, 43, 0, + 2, 0, 70, 0, 7, 0,211, 8, 0, 0,227, 2, 82, 1, 4, 0, 32, 0,193, 8, 4, 0, 19, 0, 4, 0,207, 8, 0, 0,227, 2, + 83, 1, 10, 0, 32, 0,193, 8, 2, 0, 17, 0, 2, 0,252, 3, 4, 0, 88, 0, 4, 0, 89, 0, 7, 0, 67, 8, 7, 0, 68, 8, + 4, 0, 37, 0,159, 0, 41, 8, 0, 0,227, 2, 84, 1, 4, 0, 32, 0,193, 8, 4, 0, 87, 3, 4, 0,212, 8, 0, 0,227, 2, + 85, 1, 5, 0, 32, 0,193, 8, 7, 0,125, 0, 4, 0,213, 8, 4, 0, 87, 3, 4, 0, 88, 3, 86, 1, 6, 0, 32, 0,193, 8, + 4, 0,214, 8, 4, 0,215, 8, 7, 0,216, 8, 7, 0,217, 8, 0, 0,227, 2, 87, 1, 16, 0, 32, 0,193, 8, 32, 0,153, 8, + 4, 0, 17, 0, 7, 0,218, 8, 7, 0,219, 8, 7, 0,220, 8, 7, 0,221, 8, 7, 0,222, 8, 7, 0,223, 8, 7, 0,224, 8, + 7, 0,225, 8, 7, 0,226, 8, 2, 0, 19, 0, 2, 0, 37, 0, 2, 0, 43, 0, 2, 0, 70, 0, 88, 1, 3, 0, 32, 0,193, 8, + 4, 0, 19, 0, 4, 0, 6, 2, 89, 1, 5, 0, 32, 0,193, 8, 4, 0, 19, 0, 4, 0, 37, 0, 7, 0,227, 8, 0, 0,227, 2, + 90, 1, 10, 0, 32, 0,193, 8, 0, 0,227, 2, 2, 0,228, 8, 2, 0,229, 8, 0, 0,230, 8, 0, 0,231, 8, 7, 0,232, 8, + 7, 0,233, 8, 7, 0,234, 8, 7, 0,235, 8, 91, 1, 8, 0, 7, 0, 9, 0, 7, 0, 10, 0, 7, 0, 11, 0, 7, 0, 12, 0, + 7, 0,236, 8, 7, 0,237, 8, 2, 0, 19, 0, 2, 0, 6, 2, 92, 1, 8, 0, 7, 0, 9, 0, 7, 0, 10, 0, 7, 0, 11, 0, + 7, 0, 12, 0, 7, 0,236, 8, 7, 0,237, 8, 2, 0, 19, 0, 2, 0, 6, 2, 93, 1, 8, 0, 7, 0, 9, 0, 7, 0, 10, 0, + 7, 0, 11, 0, 7, 0, 12, 0, 7, 0,236, 8, 7, 0,237, 8, 2, 0, 19, 0, 2, 0, 6, 2, 94, 1, 7, 0, 32, 0,193, 8, + 0, 0,227, 2, 7, 0, 47, 1, 7, 0, 56, 1, 2, 0, 19, 0, 2, 0, 40, 1, 4, 0, 37, 0, 95, 1, 5, 0, 32, 0, 27, 3, + 7, 0, 47, 1, 2, 0, 31, 3, 0, 0, 33, 3, 0, 0,238, 8, 96, 1, 10, 0, 96, 1, 0, 0, 96, 1, 1, 0, 2, 0, 17, 0, + 2, 0, 19, 0, 0, 0,239, 8, 7, 0,246, 0, 7, 0,247, 0, 2, 0,175, 8, 2, 0,240, 8, 32, 0, 45, 0, 97, 1, 22, 0, + 97, 1, 0, 0, 97, 1, 1, 0, 2, 0, 19, 0, 2, 0, 40, 1, 2, 0,241, 8, 2, 0,242, 8, 36, 0, 80, 0,159, 0, 41, 8, + 32, 0,164, 0, 7, 0, 88, 0, 7, 0, 89, 0, 7, 0,243, 8, 7, 0,244, 8, 7, 0,245, 8, 7, 0,246, 8, 7, 0,213, 2, + 7, 0,247, 8, 7, 0, 43, 8, 7, 0,248, 8, 0, 0,249, 8, 0, 0,250, 8, 12, 0, 73, 3, 98, 1, 8, 0, 7, 0, 21, 2, + 7, 0, 67, 8, 7, 0, 68, 8, 9, 0, 2, 0, 2, 0,251, 8, 2, 0,252, 8, 2, 0,253, 8, 2, 0,254, 8, 99, 1, 18, 0, + 99, 1, 0, 0, 99, 1, 1, 0, 99, 1,255, 8, 0, 0, 20, 0, 98, 1, 0, 9, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0, 1, 9, + 2, 0, 2, 9, 2, 0, 3, 9, 2, 0, 4, 9, 4, 0, 43, 0, 7, 0, 5, 9, 7, 0, 6, 9, 4, 0, 7, 9, 4, 0, 8, 9, + 99, 1, 9, 9,100, 1, 10, 9,101, 1, 33, 0,101, 1, 0, 0,101, 1, 1, 0,101, 1, 11, 9, 0, 0, 20, 0, 0, 0, 12, 9, + 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,152, 7, 2, 0,185, 7, 2, 0, 13, 9, 2, 0,133, 0, 2, 0, 2, 9, 2, 0,142, 7, + 12, 0, 36, 8, 12, 0, 14, 9, 27, 0, 81, 6, 9, 0, 15, 9, 7, 0, 5, 9, 7, 0, 6, 9, 7, 0, 52, 2, 7, 0, 16, 9, + 2, 0, 17, 9, 2, 0, 18, 9, 7, 0, 19, 9, 7, 0, 20, 9, 2, 0, 21, 9, 2, 0, 22, 9, 9, 0, 23, 9, 24, 0, 24, 9, + 24, 0, 25, 9, 24, 0, 26, 9,102, 1,150, 0,103, 1, 27, 9,100, 1, 8, 0,100, 1, 0, 0,100, 1, 1, 0,101, 1, 28, 9, +101, 1, 29, 9, 99, 1, 30, 9, 99, 1, 9, 9, 4, 0, 19, 0, 4, 0, 37, 0, 61, 0, 20, 0, 27, 0, 31, 0, 39, 0, 75, 0, + 12, 0, 31, 9, 12, 0, 32, 9, 98, 1, 33, 9, 12, 0, 34, 9, 4, 0, 17, 0, 4, 0, 35, 9, 4, 0, 36, 9, 4, 0, 37, 9, + 12, 0, 38, 9,103, 1, 39, 9, 99, 1, 40, 9, 99, 1, 41, 9, 9, 0, 42, 9, 9, 0, 43, 9, 4, 0, 44, 9, 9, 0, 45, 9, + 9, 0, 46, 9, 9, 0, 47, 9,104, 1, 6, 0, 4, 0,124, 0, 4, 0,126, 0, 4, 0,142, 7, 0, 0, 48, 9, 0, 0, 49, 9, + 2, 0, 37, 0,105, 1, 16, 0, 2, 0, 98, 7, 2, 0, 99, 7, 2, 0, 50, 9, 2, 0, 90, 8, 2, 0, 51, 9, 2, 0, 68, 0, + 7, 0,212, 2, 7, 0, 52, 9, 7, 0, 53, 9, 2, 0, 60, 1, 0, 0, 54, 9, 0, 0, 55, 5, 2, 0, 55, 9, 2, 0, 37, 0, + 4, 0, 56, 9, 4, 0, 57, 9,106, 1, 9, 0, 7, 0, 58, 9, 7, 0, 59, 9, 7, 0,109, 8, 7, 0,109, 0, 7, 0, 60, 9, + 7, 0, 10, 6, 2, 0, 61, 9, 0, 0, 62, 9, 0, 0, 37, 0,107, 1, 4, 0, 7, 0, 63, 9, 7, 0, 64, 9, 2, 0, 61, 9, + 2, 0, 37, 0,108, 1, 3, 0, 7, 0, 65, 9, 7, 0, 66, 9, 7, 0, 15, 0,109, 1, 7, 0, 0, 0,239, 1, 2, 0,185, 4, + 2, 0,186, 4, 2, 0,187, 4, 2, 0,138, 4, 4, 0,126, 0, 4, 0,250, 3,110, 1, 7, 0, 7, 0, 67, 9, 7, 0, 68, 9, + 7, 0, 69, 9, 7, 0, 63, 2, 7, 0, 70, 9, 7, 0, 71, 9, 7, 0, 72, 9,111, 1, 4, 0, 2, 0, 73, 9, 2, 0, 74, 9, + 2, 0, 75, 9, 2, 0, 76, 9,112, 1, 2, 0, 7, 0, 5, 0, 7, 0, 6, 0,113, 1, 2, 0, 0, 0,166, 0, 0, 0, 77, 9, +114, 1, 1, 0, 0, 0, 20, 0,115, 1, 10, 0, 0, 0, 78, 9, 0, 0, 79, 9, 0, 0, 3, 6, 0, 0, 80, 9, 2, 0, 50, 9, + 2, 0, 81, 9, 7, 0, 82, 9, 7, 0, 83, 9, 7, 0, 84, 9, 7, 0,247, 8,116, 1, 2, 0, 9, 0, 85, 9, 9, 0, 86, 9, +117, 1, 11, 0, 0, 0,187, 4, 0, 0, 17, 0, 0, 0, 61, 9, 0, 0,109, 0, 0, 0, 87, 9, 0, 0,106, 0, 0, 0, 48, 2, + 7, 0, 88, 9, 7, 0, 89, 9, 7, 0, 90, 9, 7, 0, 91, 9,118, 1, 8, 0, 7, 0, 3, 8, 7, 0,125, 0, 7, 0, 55, 5, + 7, 0,134, 2, 7, 0, 92, 9, 7, 0,206, 0, 7, 0, 93, 9, 4, 0, 17, 0,119, 1, 4, 0, 2, 0, 94, 9, 2, 0, 95, 9, + 2, 0, 96, 9, 2, 0, 37, 0,120, 1, 1, 0, 0, 0, 20, 0,121, 1, 4, 0, 7, 0, 5, 0, 7, 0, 6, 0, 2, 0, 19, 0, + 2, 0, 97, 9,122, 1, 10, 0, 2, 0,182, 3, 2, 0, 19, 0, 7, 0, 74, 4, 7, 0, 98, 9, 7, 0, 99, 9, 7, 0,100, 9, + 7, 0,101, 9,121, 1,102, 9,121, 1,103, 9,121, 1,104, 9, 64, 0, 9, 0, 4, 0, 19, 0, 4, 0, 64, 0, 24, 0,105, 9, + 24, 0,106, 9,122, 1,107, 9, 7, 0,108, 9, 7, 0,109, 9, 7, 0,110, 9, 7, 0,111, 9,123, 1, 4, 0, 47, 0,206, 2, + 7, 0,112, 9, 7, 0,141, 1, 7, 0, 37, 0,187, 0, 17, 0, 27, 0, 31, 0,123, 1,113, 9, 64, 0,102, 9, 51, 0,103, 1, + 2, 0, 19, 0, 2, 0,160, 5, 4, 0,106, 0, 7, 0,114, 9, 7, 0, 60, 2, 4, 0,115, 9, 7, 0,116, 9, 7, 0,117, 9, + 7, 0,118, 9, 7, 0,141, 1, 2, 0, 73, 1, 0, 0,119, 9, 0, 0,139, 6,124, 1, 10, 0, 4, 0, 17, 0, 4, 0,125, 0, + 4, 0, 19, 0, 4, 0,148, 3, 4, 0,120, 9, 4, 0,121, 9, 4, 0,122, 9, 0, 0, 92, 0, 0, 0, 20, 0, 9, 0, 2, 0, + 92, 0, 6, 0,124, 1,123, 9, 4, 0,124, 9, 4, 0,125, 9, 4, 0,126, 9, 4, 0, 37, 0, 9, 0,127, 9,125, 1, 5, 0, + 7, 0,129, 2, 7, 0,196, 2, 7, 0, 14, 2, 2, 0,128, 9, 2, 0, 37, 0,126, 1, 5, 0, 7, 0,129, 2, 7, 0,129, 9, + 7, 0,130, 9, 7, 0,131, 9, 7, 0,196, 2,127, 1, 5, 0, 32, 0,132, 9,128, 1, 22, 0, 7, 0,133, 9, 7, 0,134, 9, + 7, 0, 57, 0,129, 1, 7, 0, 4, 0,135, 9, 4, 0,136, 9, 4, 0,137, 9, 7, 0,138, 9, 7, 0,139, 9, 7, 0,140, 9, + 7, 0,141, 9,130, 1, 8, 0,130, 1, 0, 0,130, 1, 1, 0, 32, 0, 45, 0, 4, 0, 14, 3, 2, 0, 19, 0, 2, 0, 40, 1, + 7, 0,196, 2, 7, 0, 11, 8,131, 1, 18, 0,126, 1,143, 3,126, 1,142, 9,125, 1,143, 9,126, 1,251, 7,127, 1,144, 9, + 4, 0, 82, 0, 7, 0,196, 2, 7, 0,223, 2, 7, 0,145, 9, 4, 0,135, 9, 4, 0,146, 9, 7, 0,139, 9, 7, 0,140, 9, + 7, 0,106, 0, 2, 0, 19, 0, 2, 0,147, 9, 2, 0,148, 9, 2, 0,149, 9,132, 1,107, 0, 27, 0, 31, 0, 39, 0, 75, 0, +133, 1,150, 9, 4, 0, 19, 0, 2, 0, 17, 0, 2, 0,228, 8, 2, 0,151, 9, 2, 0,152, 9, 2, 0,159, 8, 2, 0,153, 9, + 2, 0,154, 9, 2, 0,155, 9, 2, 0,156, 9, 2, 0,157, 9, 2, 0,158, 9, 2, 0,159, 9, 2, 0,178, 3, 2, 0, 48, 5, + 2, 0,160, 9, 2, 0,161, 9, 2, 0,162, 9, 2, 0,163, 9, 2, 0,164, 9, 2, 0, 3, 2, 2, 0,244, 7, 2, 0,220, 7, + 2, 0,165, 9, 2, 0,166, 9, 2, 0,176, 3, 2, 0,177, 3, 2, 0,167, 9, 2, 0,168, 9, 2, 0,169, 9, 2, 0,170, 9, + 7, 0,171, 9, 7, 0,172, 9, 7, 0,173, 9, 2, 0,174, 9, 2, 0,175, 9, 7, 0,176, 9, 7, 0,177, 9, 7, 0,178, 9, + 7, 0,226, 7, 7, 0, 89, 0, 7, 0,223, 2, 7, 0,232, 7, 7, 0,179, 9, 7, 0,180, 9, 7, 0,181, 9, 4, 0,227, 7, + 4, 0,225, 7, 4, 0,182, 9, 7, 0,228, 7, 7, 0,229, 7, 7, 0,230, 7, 7, 0,183, 9, 7, 0,184, 9, 7, 0,185, 9, + 7, 0,186, 9, 7, 0,187, 9, 7, 0,188, 9, 7, 0,189, 9, 7, 0,190, 9, 7, 0,100, 3, 7, 0,106, 0, 7, 0,191, 9, + 7, 0,192, 9, 7, 0,193, 9, 7, 0,194, 9, 7, 0,195, 9, 7, 0,196, 9, 7, 0,197, 9, 4, 0,198, 9, 4, 0,199, 9, + 7, 0,200, 9, 7, 0,201, 9, 7, 0,202, 9, 7, 0,203, 9, 7, 0,204, 9, 7, 0,205, 9, 7, 0,206, 9, 7, 0,172, 3, + 7, 0,170, 3, 7, 0,171, 3, 7, 0,207, 9, 7, 0,208, 9, 7, 0,209, 9, 7, 0,210, 9, 7, 0,211, 9, 7, 0,212, 9, + 7, 0,213, 9, 7, 0,214, 9, 7, 0,215, 9, 7, 0,216, 9, 7, 0,217, 9, 7, 0,218, 9, 7, 0,219, 9, 4, 0,220, 9, + 4, 0,221, 9, 7, 0,222, 9, 68, 0,132, 3, 68, 0,223, 9, 32, 0,224, 9, 32, 0,225, 9, 36, 0, 80, 0,163, 0, 32, 1, +163, 0,226, 9, 59, 0, 43, 0, 59, 0, 0, 0, 59, 0, 1, 0,132, 1,227, 9,131, 1,228, 9,129, 1,153, 8,168, 0,198, 3, + 9, 0,199, 3,134, 1,229, 9,134, 1,230, 9, 12, 0,231, 9, 12, 0,232, 9,134, 0,233, 9,142, 0,234, 9,142, 0,235, 9, + 32, 0,236, 9, 32, 0,237, 9, 32, 0, 38, 0, 12, 0,238, 9, 12, 0,239, 9, 12, 0,198, 8, 0, 0, 20, 0, 7, 0,210, 0, + 7, 0,250, 2, 7, 0,240, 9, 4, 0,170, 2, 4, 0, 57, 0, 4, 0, 19, 0, 4, 0,227, 7, 4, 0,241, 9, 4, 0,242, 9, + 4, 0,243, 9, 2, 0,217, 0, 2, 0,244, 9, 2, 0,245, 9, 2, 0,246, 9, 0, 0,247, 9, 2, 0,248, 9, 2, 0,249, 9, + 2, 0,250, 9, 9, 0,251, 9,138, 0, 15, 4, 12, 0,237, 2,135, 1,252, 9,136, 0, 34, 0,136, 1,110, 8, 7, 0,241, 3, + 7, 0,253, 9, 7, 0,254, 9, 7, 0, 77, 4, 7, 0,255, 9, 7, 0,110, 3, 7, 0,100, 3, 7, 0, 0, 10, 7, 0, 62, 2, + 7, 0, 1, 10, 7, 0, 2, 10, 7, 0, 3, 10, 7, 0, 4, 10, 7, 0, 5, 10, 7, 0, 6, 10, 7, 0,242, 3, 7, 0, 7, 10, + 7, 0, 8, 10, 7, 0, 9, 10, 7, 0,243, 3, 7, 0,239, 3, 7, 0,240, 3, 7, 0, 10, 10, 4, 0, 11, 10, 4, 0, 90, 0, + 4, 0, 12, 10, 4, 0, 13, 10, 2, 0, 14, 10, 2, 0, 15, 10, 2, 0, 16, 10, 2, 0, 17, 10, 2, 0, 18, 10, 2, 0, 37, 0, +137, 0, 8, 0,136, 1, 19, 10, 7, 0, 20, 10, 7, 0, 21, 10, 7, 0,213, 1, 7, 0, 22, 10, 4, 0, 90, 0, 2, 0, 23, 10, + 2, 0, 24, 10,137, 1, 4, 0, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 7, 0, 7, 0, 25, 10,138, 1, 6, 0,138, 1, 0, 0, +138, 1, 1, 0,137, 1,144, 8, 4, 0,223, 0, 2, 0, 26, 10, 2, 0, 19, 0,139, 1, 5, 0,139, 1, 0, 0,139, 1, 1, 0, + 12, 0, 27, 10, 4, 0, 28, 10, 4, 0, 19, 0,140, 1, 9, 0,140, 1, 0, 0,140, 1, 1, 0, 12, 0,124, 0,139, 1, 29, 10, + 4, 0, 19, 0, 2, 0, 26, 10, 2, 0, 30, 10, 7, 0, 91, 0, 0, 0, 31, 10,161, 0, 6, 0, 27, 0, 31, 0, 12, 0,201, 4, + 4, 0, 19, 0, 2, 0, 32, 10, 2, 0, 33, 10, 9, 0, 34, 10,141, 1, 7, 0,141, 1, 0, 0,141, 1, 1, 0, 2, 0, 17, 0, + 2, 0, 19, 0, 4, 0, 23, 0, 0, 0, 35, 10, 0, 0, 36, 10,142, 1, 5, 0, 12, 0, 37, 10, 4, 0, 38, 10, 4, 0, 39, 10, + 4, 0, 19, 0, 4, 0, 37, 0,143, 1, 13, 0, 27, 0, 31, 0,144, 1, 40, 10,144, 1, 41, 10, 12, 0, 42, 10, 4, 0, 43, 10, + 2, 0, 44, 10, 2, 0, 37, 0, 12, 0, 45, 10, 12, 0, 46, 10,142, 1, 47, 10, 12, 0, 48, 10, 12, 0, 49, 10, 12, 0, 50, 10, +144, 1, 30, 0,144, 1, 0, 0,144, 1, 1, 0, 9, 0, 51, 10, 4, 0, 77, 7, 4, 0, 37, 0,211, 0,248, 5,211, 0, 52, 10, + 0, 0, 53, 10, 2, 0, 54, 10, 2, 0, 55, 10, 2, 0, 98, 7, 2, 0, 99, 7, 2, 0, 56, 10, 2, 0, 57, 10, 2, 0,148, 3, + 2, 0,107, 6, 2, 0, 58, 10, 2, 0, 59, 10, 4, 0,209, 1,145, 1, 60, 10,146, 1, 61, 10,147, 1, 62, 10, 4, 0, 63, 10, + 4, 0, 64, 10, 9, 0, 65, 10, 12, 0, 66, 10, 12, 0, 46, 10, 12, 0,116, 7, 12, 0, 67, 10, 12, 0, 68, 10,148, 1, 16, 0, +148, 1, 0, 0,148, 1, 1, 0, 0, 0, 69, 10,149, 1, 70, 10, 2, 0, 17, 0, 2, 0, 15, 0, 2, 0, 71, 10, 2, 0, 72, 10, + 2, 0, 73, 10, 2, 0, 74, 10, 2, 0, 75, 10, 2, 0, 76, 10, 2, 0, 77, 10, 2, 0, 78, 10, 2, 0, 70, 0, 2, 0,209, 1, +150, 1, 9, 0,150, 1, 0, 0,150, 1, 1, 0, 12, 0, 79, 10, 0, 0, 80, 10, 2, 0, 81, 10, 2, 0, 82, 10, 2, 0, 83, 10, + 2, 0, 37, 0, 9, 0, 84, 10,219, 0, 12, 0,219, 0, 0, 0,219, 0, 1, 0, 0, 0, 69, 10, 26, 0, 30, 0,151, 1, 92, 7, + 9, 0, 85, 10,149, 1, 70, 10,142, 1, 86, 10, 12, 0, 87, 10,219, 0, 88, 10, 2, 0, 19, 0, 2, 0,105, 1,145, 1, 23, 0, +145, 1, 0, 0,145, 1, 1, 0, 2, 0, 17, 0, 2, 0, 15, 0, 2, 0, 5, 0, 2, 0, 6, 0, 2, 0, 89, 10, 2, 0, 90, 10, + 2, 0, 91, 10, 2, 0, 92, 10, 0, 0, 93, 10, 0, 0, 37, 0, 2, 0, 71, 10, 2, 0, 72, 10, 2, 0, 73, 10, 2, 0, 74, 10, + 2, 0, 75, 10, 2, 0, 43, 0, 0, 0, 94, 10, 2, 0, 95, 10, 2, 0, 96, 10, 4, 0, 70, 0, 9, 0, 85, 10,152, 1, 8, 0, +152, 1, 0, 0,152, 1, 1, 0, 9, 0, 2, 0, 9, 0, 97, 10, 0, 0,193, 3, 2, 0, 17, 0, 2, 0, 19, 0, 7, 0, 98, 10, +153, 1, 5, 0, 7, 0, 99, 10, 4, 0,100, 10, 4, 0,101, 10, 4, 0, 40, 1, 4, 0, 19, 0,154, 1, 6, 0, 7, 0,102, 10, + 7, 0,103, 10, 7, 0,104, 10, 7, 0,105, 10, 4, 0, 17, 0, 4, 0, 19, 0,155, 1, 5, 0, 7, 0, 67, 8, 7, 0, 68, 8, + 7, 0,196, 2, 2, 0, 17, 2, 2, 0, 18, 2,156, 1, 5, 0,155, 1, 2, 0, 4, 0, 54, 0, 7, 0,106, 10, 7, 0, 67, 8, + 7, 0, 68, 8,157, 1, 4, 0, 2, 0,107, 10, 2, 0,108, 10, 2, 0,109, 10, 2, 0,110, 10,158, 1, 2, 0, 42, 0, 78, 6, + 26, 0,147, 8,159, 1, 3, 0, 24, 0,111, 10, 4, 0, 19, 0, 4, 0, 37, 0,160, 1, 6, 0, 7, 0,106, 0, 7, 0,198, 2, + 7, 0,112, 10, 7, 0, 37, 0, 2, 0,216, 0, 2, 0,113, 10,161, 1, 7, 0,161, 1, 0, 0,161, 1, 1, 0, 27, 0, 81, 6, + 0, 0,114, 10, 4, 0,115, 10, 4, 0, 90, 0, 0, 0,193, 3,162, 1, 6, 0, 12, 0,198, 8, 0, 0,116, 10, 7, 0, 61, 0, + 7, 0, 98, 10, 4, 0, 17, 0, 4, 0, 19, 0,163, 1, 3, 0, 7, 0,117, 10, 4, 0, 19, 0, 4, 0, 37, 0,164, 1, 15, 0, +164, 1, 0, 0,164, 1, 1, 0, 70, 1,186, 8,162, 1, 62, 0, 12, 0, 73, 3, 35, 0, 50, 0,163, 1,118, 10, 4, 0, 54, 0, + 7, 0, 61, 0, 2, 0, 19, 0, 2, 0, 25, 1, 4, 0,115, 10, 0, 0,114, 10, 4, 0,119, 10, 7, 0,120, 10,165, 1, 2, 0, + 0, 0,121, 10, 0, 0,122, 10,166, 1, 4, 0,166, 1, 0, 0,166, 1, 1, 0,159, 0, 27, 3, 12, 0,123, 10,167, 1, 24, 0, +167, 1, 0, 0,167, 1, 1, 0, 12, 0,124, 10,159, 0, 41, 8,166, 1,125, 10, 12, 0,126, 10, 12, 0, 73, 3, 0, 0,193, 3, + 7, 0, 98, 10, 7, 0,127, 10, 7, 0, 88, 0, 7, 0, 89, 0, 7, 0,243, 8, 7, 0,244, 8, 7, 0,213, 2, 7, 0,247, 8, + 7, 0, 43, 8, 7, 0,248, 8, 2, 0,128, 10, 2, 0,129, 10, 2, 0, 43, 0, 2, 0, 17, 0, 4, 0, 19, 0, 4, 0, 70, 0, +168, 1, 6, 0,168, 1, 0, 0,168, 1, 1, 0, 12, 0,124, 10, 4, 0, 19, 0, 4, 0,133, 2, 0, 0,193, 3,169, 1, 10, 0, +169, 1, 0, 0,169, 1, 1, 0, 27, 0, 81, 6, 0, 0,130, 10, 4, 0,131, 10, 4, 0,132, 10, 0, 0,114, 10, 4, 0,115, 10, + 2, 0, 19, 0, 2, 0,133, 10,170, 1, 6, 0,170, 1, 0, 0,170, 1, 1, 0, 12, 0,134, 10, 0, 0,193, 3, 4, 0, 19, 0, + 4, 0,135, 10,171, 1, 5, 0,171, 1, 0, 0,171, 1, 1, 0, 0, 0,114, 10, 4, 0,115, 10, 7, 0,186, 2, 39, 0, 12, 0, +159, 0, 67, 3,159, 0,136, 10,166, 1,125, 10, 12, 0,137, 10,167, 1,138, 10, 12, 0,139, 10, 12, 0,140, 10, 4, 0, 19, 0, + 4, 0,217, 0, 2, 0,141, 10, 2, 0,142, 10, 7, 0,143, 10,172, 1, 2, 0, 27, 0, 31, 0, 39, 0, 75, 0,173, 1, 5, 0, +173, 1, 0, 0,173, 1, 1, 0, 4, 0, 17, 0, 4, 0, 19, 0, 0, 0, 20, 0,174, 1, 6, 0,173, 1,144, 10, 32, 0, 45, 0, + 4, 0,145, 10, 7, 0,146, 10, 4, 0,147, 10, 4, 0,175, 8,175, 1, 3, 0,173, 1,144, 10, 4, 0,145, 10, 7, 0,148, 10, +176, 1, 8, 0,173, 1,144, 10, 32, 0, 45, 0, 7, 0, 35, 1, 7, 0,149, 10, 7, 0,250, 2, 7, 0,109, 8, 4, 0,145, 10, + 4, 0,150, 10,177, 1, 5, 0,173, 1,144, 10, 7, 0,151, 10, 7, 0,185, 7, 7, 0,219, 2, 7, 0, 57, 0,178, 1, 3, 0, +173, 1,144, 10, 7, 0,109, 8, 7, 0,152, 10,128, 1, 4, 0, 7, 0,153, 10, 7, 0,193, 9, 2, 0,154, 10, 2, 0, 40, 1, +179, 1, 14, 0,179, 1, 0, 0,179, 1, 1, 0, 12, 0,155, 10, 12, 0,156, 10, 12, 0,157, 10, 0, 0, 20, 0, 4, 0, 31, 0, + 4, 0, 19, 0, 4, 0,158, 10, 7, 0,159, 10, 4, 0,147, 10, 4, 0,175, 8, 7, 0,202, 3, 7, 0,221, 2,133, 1, 23, 0, + 4, 0,145, 10, 4, 0,160, 10, 7, 0,161, 10, 7, 0, 57, 0, 7, 0,162, 10, 7, 0,217, 2, 7, 0,153, 10, 7, 0,163, 10, + 7, 0,198, 2, 7, 0,164, 10, 7, 0, 74, 4, 7, 0,165, 10, 7, 0,166, 10, 7, 0,167, 10, 7, 0,168, 10, 7, 0,169, 10, + 7, 0,170, 10, 7, 0,171, 10, 7, 0,172, 10, 7, 0,173, 10, 7, 0,174, 10, 7, 0,175, 10, 12, 0,176, 10,122, 0, 33, 0, +121, 0,177, 10,180, 1,178, 10, 68, 0,179, 10, 68, 0,223, 9, 68, 0,180, 10,181, 1,181, 10, 48, 0,165, 0, 48, 0,182, 10, + 48, 0,183, 10, 7, 0,184, 10, 7, 0,185, 10, 7, 0,186, 10, 7, 0,187, 10, 7, 0,188, 10, 7, 0,187, 8, 7, 0,189, 10, + 7, 0,141, 1, 7, 0,190, 10, 4, 0,191, 10, 4, 0,192, 10, 4, 0,193, 10, 4, 0, 90, 0, 4, 0, 37, 0, 4, 0,194, 10, + 2, 0,195, 10, 2, 0,196, 10, 4, 0,197, 10, 7, 0,198, 2, 4, 0,198, 10, 7, 0,199, 10, 4, 0,200, 10,138, 0,201, 10, + 12, 0,202, 10,123, 0, 11, 0,121, 0,177, 10, 59, 0,225, 0, 7, 0,106, 1, 7, 0,187, 8, 7, 0,203, 10, 7, 0,204, 10, + 2, 0,205, 10, 2, 0,206, 10, 2, 0,207, 10, 2, 0, 17, 0, 4, 0, 37, 0,124, 0, 13, 0,121, 0,177, 10,140, 0,247, 2, +142, 0,249, 2, 7, 0,144, 8, 7, 0,208, 10, 7, 0,209, 10, 7, 0, 37, 1, 7, 0,210, 10, 4, 0,211, 10, 4, 0,245, 2, + 2, 0, 17, 0, 2, 0, 37, 0, 4, 0, 70, 0, 69, 78, 68, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; diff --git a/source/blender/editors/datafiles/splash.jpg.c b/source/blender/editors/datafiles/splash.png.c index c1ca8b575e6..bbce480ecba 100644 --- a/source/blender/editors/datafiles/splash.jpg.c +++ b/source/blender/editors/datafiles/splash.png.c @@ -1,7 +1,7 @@ -/* DataToC output of file <splash_jpg> */ +/* DataToC output of file <splash_png> */ -int datatoc_splash_jpg_size= 79258; -char datatoc_splash_jpg[]= { +int datatoc_splash_png_size= 79258; +char datatoc_splash_png[]= { 255,216,255,224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 1, 0, 72, 0, 72, 0, 0,255,225, 0, 22, 69,120, 105,102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0,255,219, 0, 67, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, diff --git a/source/blender/editors/gpencil/gpencil_ops.c b/source/blender/editors/gpencil/gpencil_ops.c index d33ad16dfb1..d311b39b9a3 100644 --- a/source/blender/editors/gpencil/gpencil_ops.c +++ b/source/blender/editors/gpencil/gpencil_ops.c @@ -47,7 +47,7 @@ void ED_keymap_gpencil(wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "Grease Pencil", 0, 0); + wmKeyMap *keymap= WM_keymap_find(wm, "Grease Pencil", 0, 0); wmKeymapItem *kmi; /* Draw */ diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 99b85d62026..92ae2400666 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1341,7 +1341,7 @@ static int gpencil_draw_invoke (bContext *C, wmOperator *op, wmEvent *event) } /* add a modal handler for this operator, so that we can then draw continuous strokes */ - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 799829a6e87..d9439956569 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -42,11 +42,14 @@ struct View2D; struct Scene; struct Object; +struct bDopeSheet; + struct bActionGroup; struct FCurve; struct FModifier; struct uiBlock; +struct uiLayout; /* ************************************************ */ /* ANIMATION CHANNEL FILTERING */ @@ -137,6 +140,7 @@ typedef enum eAnim_ChannelType { ANIMTYPE_DSWOR, ANIMTYPE_DSPART, ANIMTYPE_DSMBALL, + ANIMTYPE_DSARM, ANIMTYPE_SHAPEKEY, // XXX probably can become depreceated??? @@ -206,6 +210,7 @@ typedef enum eAnimFilter_Flags { #define FILTER_CUR_OBJD(cu) ((cu->flag & CU_DS_EXPAND)) #define FILTER_PART_OBJD(part) ((part->flag & PART_DS_EXPAND)) #define FILTER_MBALL_OBJD(mb) ((mb->flag2 & MB_DS_EXPAND)) +#define FILTER_ARM_OBJD(arm) ((arm->flag & ARM_DS_EXPAND)) /* 'Sub-object/Action' channels (flags stored in Action) */ #define SEL_ACTC(actc) ((actc->flag & ACT_SELECTED)) #define EXPANDED_ACTC(actc) ((actc->flag & ACT_COLLAPSED)==0) @@ -392,11 +397,14 @@ void ANIM_draw_cfra(const struct bContext *C, struct View2D *v2d, short flag); /* main call to draw preview range curtains */ void ANIM_draw_previewrange(const struct bContext *C, struct View2D *v2d); +/* ------------- Preview Range Drawing -------------- */ + +/* standard header buttons for Animation Editors */ +short ANIM_headerUI_standard_buttons(const struct bContext *C, struct bDopeSheet *ads, struct uiBlock *block, short xco, short yco); + /* ************************************************* */ /* F-MODIFIER TOOLS */ -struct uiLayout; - /* draw a given F-Modifier for some layout/UI-Block */ void ANIM_uiTemplate_fmodifier_draw(struct uiLayout *layout, struct ID *id, ListBase *modifiers, struct FModifier *fcm); diff --git a/source/blender/editors/include/ED_datafiles.h b/source/blender/editors/include/ED_datafiles.h index 5d24b93418b..993cbceae18 100644 --- a/source/blender/editors/include/ED_datafiles.h +++ b/source/blender/editors/include/ED_datafiles.h @@ -40,8 +40,8 @@ extern char datatoc_blenderbuttons[]; extern int datatoc_prvicons_size; extern char datatoc_prvicons[]; -extern int datatoc_splash_jpg_size; -extern char datatoc_splash_jpg[]; +extern int datatoc_splash_png_size; +extern char datatoc_splash_png[]; extern int datatoc_Bfont_size; extern char datatoc_Bfont[]; diff --git a/source/blender/editors/include/ED_fileselect.h b/source/blender/editors/include/ED_fileselect.h index 57ab6a5f8f6..221b377dd25 100644 --- a/source/blender/editors/include/ED_fileselect.h +++ b/source/blender/editors/include/ED_fileselect.h @@ -51,21 +51,21 @@ typedef enum FileListColumns { typedef struct FileLayout { /* view settings - XXX - move into own struct */ - short prv_w; - short prv_h; - short tile_w; - short tile_h; - short tile_border_x; - short tile_border_y; - short prv_border_x; - short prv_border_y; - short rows; - short columns; - short width; - short height; - short flag; - short dirty; - short textheight; + int prv_w; + int prv_h; + int tile_w; + int tile_h; + int tile_border_x; + int tile_border_y; + int prv_border_x; + int prv_border_y; + int rows; + int columns; + int width; + int height; + int flag; + int dirty; + int textheight; float column_widths[MAX_FILE_COLUMN]; } FileLayout; @@ -84,7 +84,7 @@ FileLayout* ED_fileselect_get_layout(struct SpaceFile *sfile, struct ARegion *ar int ED_fileselect_layout_numfiles(FileLayout* layout, struct ARegion *ar); int ED_fileselect_layout_offset(FileLayout* layout, int x, int y); -void ED_fileselect_layout_tilepos(FileLayout* layout, int tile, short *x, short *y); +void ED_fileselect_layout_tilepos(FileLayout* layout, int tile, int *x, int *y); #endif /* ED_FILES_H */ diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h index 566105109b2..41a83a34ee4 100644 --- a/source/blender/editors/include/ED_image.h +++ b/source/blender/editors/include/ED_image.h @@ -38,7 +38,10 @@ struct uiBlock; struct Image *ED_space_image(struct SpaceImage *sima); void ED_space_image_set(struct bContext *C, struct SpaceImage *sima, struct Scene *scene, struct Object *obedit, struct Image *ima); -struct ImBuf *ED_space_image_buffer(struct SpaceImage *sima); +struct ImBuf *ED_space_image_acquire_buffer(struct SpaceImage *sima, void **lock_r); +void ED_space_image_release_buffer(struct SpaceImage *sima, void *lock); +int ED_space_image_has_buffer(struct SpaceImage *sima); + void ED_space_image_size(struct SpaceImage *sima, int *width, int *height); void ED_space_image_aspect(struct SpaceImage *sima, float *aspx, float *aspy); void ED_space_image_zoom(struct SpaceImage *sima, struct ARegion *ar, float *zoomx, float *zoomy); @@ -53,9 +56,6 @@ int ED_space_image_show_paint(struct SpaceImage *sima); int ED_space_image_show_uvedit(struct SpaceImage *sima, struct Object *obedit); int ED_space_image_show_uvshadow(struct SpaceImage *sima, struct Object *obedit); -void ED_image_uiblock_panel(const struct bContext *C, struct uiBlock *block, struct Image **ima_pp, - struct ImageUser *iuser, short redraw, short imagechanged); - /* image_render.c, export for screen_ops.c, render operator */ void ED_space_image_output(struct bContext *C); diff --git a/source/blender/editors/include/ED_keyframes_draw.h b/source/blender/editors/include/ED_keyframes_draw.h index 0969398f1e2..51d7c664fba 100644 --- a/source/blender/editors/include/ED_keyframes_draw.h +++ b/source/blender/editors/include/ED_keyframes_draw.h @@ -119,5 +119,9 @@ void ob_to_keylist(struct bDopeSheet *ads, struct Object *ob, struct DLRBT_Tree void scene_to_keylist(struct bDopeSheet *ads, struct Scene *sce, struct DLRBT_Tree *keys, struct DLRBT_Tree *blocks); void gpl_to_keylist(struct bDopeSheet *ads, struct bGPDlayer *gpl, struct DLRBT_Tree *keys, struct DLRBT_Tree *blocks); +/* Keyframe Finding */ +ActKeyColumn *cfra_find_actkeycolumn(ActKeyColumn *ak, float cframe); +ActKeyColumn *cfra_find_nearest_next_ak(ActKeyColumn *ak, float cframe, short next); + #endif /* ED_KEYFRAMES_DRAW_H */ diff --git a/source/blender/editors/include/ED_keyframes_edit.h b/source/blender/editors/include/ED_keyframes_edit.h index b2bf05ea5ea..57a6c5fc773 100644 --- a/source/blender/editors/include/ED_keyframes_edit.h +++ b/source/blender/editors/include/ED_keyframes_edit.h @@ -73,6 +73,7 @@ typedef enum eEditKeyframes_Snap { SNAP_KEYS_NEARSEC, SNAP_KEYS_NEARMARKER, SNAP_KEYS_HORIZONTAL, + SNAP_KEYS_VALUE, } eEditKeyframes_Snap; /* mirroring tools */ diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index 20c2301d2ac..d30fccfe4de 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -163,6 +163,9 @@ void ANIM_OT_remove_keyingset_button(struct wmOperatorType *ot); /* ************ Drivers ********************** */ +/* Returns whether there is a driver in the copy/paste buffer to paste */ +short ANIM_driver_can_paste(void); + /* Main Driver Management API calls: * Add a new driver for the specified property on the given ID block */ @@ -171,11 +174,24 @@ short ANIM_add_driver (struct ID *id, const char rna_path[], int array_index, sh /* 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); +short ANIM_remove_driver(struct ID *id, const char rna_path[], int array_index, short flag); + +/* Main Driver Management API calls: + * Make a copy of the driver for the specified property on the given ID block + */ +short ANIM_copy_driver(struct ID *id, const char rna_path[], int array_index, short flag); + +/* Main Driver Management API calls: + * Add a new driver for the specified property on the given ID block or replace an existing one + * with the driver + driver-curve data from the buffer + */ +short ANIM_paste_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); +void ANIM_OT_copy_driver_button(struct wmOperatorType *ot); +void ANIM_OT_paste_driver_button(struct wmOperatorType *ot); /* ************ Auto-Keyframing ********************** */ /* Notes: diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index a2dba89ec20..fd88f9889ae 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -38,6 +38,7 @@ struct EditFace; struct bContext; struct wmOperator; struct wmWindowManager; +struct ReportList; struct EditSelection; struct ViewContext; struct bDeformGroup; @@ -49,6 +50,8 @@ struct MCol; struct UvVertMap; struct UvMapVert; struct CustomData; +struct Material; +struct Object; #define EM_FGON_DRAW 1 // face flag #define EM_FGON 2 // edge and face flag both @@ -89,9 +92,9 @@ void ED_keymap_mesh(struct wmWindowManager *wm); void ED_spacetypes_init(void); void ED_keymap_mesh(struct wmWindowManager *wm); -void make_editMesh(struct Scene *scene, Object *ob); -void load_editMesh(struct Scene *scene, Object *ob); -void remake_editMesh(struct Scene *scene, Object *ob); +void make_editMesh(struct Scene *scene, struct Object *ob); +void load_editMesh(struct Scene *scene, struct Object *ob); +void remake_editMesh(struct Scene *scene, struct Object *ob); void free_editMesh(struct EditMesh *em); void recalc_editnormals(struct EditMesh *em); @@ -118,6 +121,7 @@ void EM_select_face(struct EditFace *efa, int sel); void EM_select_face_fgon(struct EditMesh *em, struct EditFace *efa, int val); void EM_select_swap(struct EditMesh *em); void EM_toggle_select_all(struct EditMesh *em); +void EM_select_all(struct EditMesh *em); void EM_selectmode_flush(struct EditMesh *em); void EM_deselect_flush(struct EditMesh *em); void EM_selectmode_set(struct EditMesh *em); @@ -175,5 +179,26 @@ float ED_vgroup_vert_weight(struct Object *ob, struct bDeformGroup *dg, int ver struct MDeformWeight *ED_vgroup_weight_verify(struct MDeformVert *dv, int defgroup); struct MDeformWeight *ED_vgroup_weight_get(struct MDeformVert *dv, int defgroup); +/*needed by edge slide*/ +struct EditVert *editedge_getOtherVert(struct EditEdge *eed, struct EditVert *eve); +struct EditVert *editedge_getSharedVert(struct EditEdge *eed, struct EditEdge *eed2); +int editedge_containsVert(struct EditEdge *eed, struct EditVert *eve); +int editface_containsVert(struct EditFace *efa, struct EditVert *eve); +int editface_containsEdge(struct EditFace *efa, struct EditEdge *eed); +short sharesFace(struct EditMesh *em, struct EditEdge *e1, struct EditEdge *e2); + +/* mesh_data.c */ + +void ED_mesh_geometry_add(struct Mesh *mesh, struct ReportList *reports, int verts, int edges, int faces); +void ED_mesh_transform(struct Mesh *me, float *mat); +void ED_mesh_calc_normals(struct Mesh *me); +void ED_mesh_material_add(struct Mesh *me, struct Material *ma); +void ED_mesh_update(struct Mesh *mesh, struct bContext *C); + +int ED_mesh_uv_texture_add(struct bContext *C, struct Scene *scene, struct Object *ob, struct Mesh *me); +int ED_mesh_uv_texture_remove(struct bContext *C, struct Object *ob, struct Mesh *me); +int ED_mesh_color_add(struct bContext *C, struct Scene *scene, struct Object *ob, struct Mesh *me); +int ED_mesh_color_remove(struct bContext *C, struct Object *ob, struct Mesh *me); + #endif /* ED_MESH_H */ diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h index bf4632dc3da..305b2a64ffe 100644 --- a/source/blender/editors/include/ED_node.h +++ b/source/blender/editors/include/ED_node.h @@ -31,10 +31,15 @@ struct Material; struct Scene; struct Tex; +struct bContext; +struct bNode; /* drawnode.c */ void ED_init_node_butfuncs(void); +/* node_draw.c */ +void ED_node_changed_update(struct bContext *C, struct bNode *node); + /* node_edit.c */ void ED_node_shader_default(struct Material *ma); void ED_node_composit_default(struct Scene *sce); diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 67dc6dada5f..363795afeab 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -88,6 +88,8 @@ void object_test_constraints(struct Object *ob); void ED_object_constraint_rename(struct Object *ob, struct bConstraint *con, char *oldname); void ED_object_constraint_set_active(struct Object *ob, struct bConstraint *con); +void ED_object_constraint_update(struct Object *ob); +void ED_object_constraint_dependency_update(struct Scene *scene, struct Object *ob); /* object_lattice.c */ void mouse_lattice(struct bContext *C, short mval[2], int extend); diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h index 28807caa255..a052142102d 100644 --- a/source/blender/editors/include/ED_particle.h +++ b/source/blender/editors/include/ED_particle.h @@ -38,6 +38,7 @@ struct RadialControl; struct rcti; struct wmWindowManager; struct PTCacheEdit; +struct Scene; /* particle edit mode */ void PE_free_ptcache_edit(struct PTCacheEdit *edit); @@ -46,7 +47,7 @@ int PE_start_edit(struct PTCacheEdit *edit); /* access */ struct PTCacheEdit *PE_get_current(struct Scene *scene, struct Object *ob); int PE_minmax(struct Scene *scene, float *min, float *max); -struct ParticleEditSettings *PE_settings(Scene *scene); +struct ParticleEditSettings *PE_settings(struct Scene *scene); /* update calls */ void PE_hide_keys_time(struct Scene *scene, struct PTCacheEdit *edit, float cfra); @@ -59,15 +60,11 @@ int PE_circle_select(struct bContext *C, int selecting, short *mval, float rad); int PE_lasso_select(struct bContext *C, short mcords[][2], short moves, short select); /* undo */ -void PE_undo_push(Scene *scene, char *str); -void PE_undo_step(Scene *scene, int step); -void PE_undo(Scene *scene); -void PE_redo(Scene *scene); -void PE_undo_menu(Scene *scene, Object *ob); - -/* operators */ -void ED_operatortypes_particle(void); -void ED_keymap_particle(struct wmWindowManager *wm); +void PE_undo_push(struct Scene *scene, char *str); +void PE_undo_step(struct Scene *scene, int step); +void PE_undo(struct Scene *scene); +void PE_redo(struct Scene *scene); +void PE_undo_menu(struct Scene *scene, struct Object *ob); #endif /* ED_PARTICLE_H */ diff --git a/source/blender/editors/include/ED_physics.h b/source/blender/editors/include/ED_physics.h index 6ab804230d0..ee340c54e7d 100644 --- a/source/blender/editors/include/ED_physics.h +++ b/source/blender/editors/include/ED_physics.h @@ -31,11 +31,8 @@ #define ED_PHYSICS_H /* operators */ - -void ED_operatortypes_boids(void); -void ED_operatortypes_pointcache(void); -void ED_operatortypes_fluid(void); -//void ED_keymap_pointcache(struct wmWindowManager *wm); +void ED_operatortypes_physics(void); +void ED_keymap_physics(struct wmWindowManager *wm); #endif /* ED_PHYSICS_H */ diff --git a/source/blender/editors/include/ED_previewrender.h b/source/blender/editors/include/ED_render.h index 7e0d71db7e1..be93bf92e5e 100644 --- a/source/blender/editors/include/ED_previewrender.h +++ b/source/blender/editors/include/ED_render.h @@ -21,22 +21,29 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef ED_PREVIEWRENDER_H -#define ED_PREVIEWRENDER_H +#ifndef ED_RENDER_H +#define ED_RENDER_H #include "DNA_vec_types.h" -struct View3D; -struct SpaceButs; -struct RenderInfo; -struct Scene; -struct Image; -struct Render; struct bContext; struct ID; +struct Main; struct MTex; +struct Render; +struct RenderInfo; + +/* render_ops.c */ + +void ED_operatortypes_render(void); + +/* render_shading.c */ + +void ED_render_id_flush_update(struct Main *bmain, struct ID *id); + +/* render_preview.c */ -#define PREVIEW_RENDERSIZE 140 +#define _RENDERSIZE 140 /* stores rendered preview - is also used for icons */ typedef struct RenderInfo { @@ -72,7 +79,7 @@ void ED_preview_init_dbase(void); void ED_preview_free_dbase(void); void ED_preview_shader_job(const struct bContext *C, void *owner, struct ID *id, struct ID *parent, struct MTex *slot, int sizex, int sizey); -void ED_preview_iconrender(struct Scene *scene, struct ID *id, unsigned int *rect, int sizex, int sizey); +void ED_preview_icon_job(const struct bContext *C, void *owner, struct ID *id, unsigned int *rect, int sizex, int sizey); void ED_preview_draw(const struct bContext *C, void *idp, void *parentp, void *slot, rcti *rect); diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 0153b3c9bdb..63b6a067389 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -58,6 +58,7 @@ 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, int contextnr); void ED_region_header_init(struct ARegion *ar); void ED_region_header(const struct bContext *C, struct ARegion *ar); +void ED_region_toggle_hidden(struct bContext *C, struct ARegion *ar); void region_scissor_winrct(struct ARegion *ar, struct rcti *winrct); /* spaces */ @@ -104,7 +105,6 @@ void ED_screen_new_window(struct bContext *C, struct rcti *position, int type); /* anim */ void ED_update_for_newframe(const struct bContext *C, int mute); -unsigned int ED_screen_view3d_layers(struct bScreen *screen); void ED_operatortypes_screen(void); void ED_keymap_screen(struct wmWindowManager *wm); diff --git a/source/blender/editors/include/ED_screen_types.h b/source/blender/editors/include/ED_screen_types.h index 72afe7704b4..dcdc9e417e4 100644 --- a/source/blender/editors/include/ED_screen_types.h +++ b/source/blender/editors/include/ED_screen_types.h @@ -59,7 +59,7 @@ typedef struct AZone { /* internal */ short do_draw; /* for draw */ - short x1, y1, x2, y2, x3, y3; + short x1, y1, x2, y2; /* for clip */ rcti rect; } AZone; diff --git a/source/blender/editors/include/ED_sculpt.h b/source/blender/editors/include/ED_sculpt.h index c6a8881a0c6..a08f0576f42 100644 --- a/source/blender/editors/include/ED_sculpt.h +++ b/source/blender/editors/include/ED_sculpt.h @@ -33,10 +33,10 @@ struct wmWindowManager; /* sculpt.c */ void ED_operatortypes_sculpt(void); -void ED_keymap_sculpt(struct wmWindowManager *wm); /* paint_ops.c */ void ED_operatortypes_paint(void); +void ED_keymap_paint(struct wmWindowManager *wm); /* paint_image.c */ void undo_imagepaint_step(int step); diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index 984def760ae..7f08e95aceb 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -41,8 +41,9 @@ struct Object; struct uiLayout; struct EnumPropertyItem; struct wmOperatorType; +struct wmKeyMap; -void transform_keymap_for_space(struct wmWindowManager *wm, struct ListBase *keymap, int spaceid); +void transform_keymap_for_space(struct wmWindowManager *wm, struct wmKeyMap *keymap, int spaceid); void transform_operatortypes(void); /* ******************** Macros & Prototypes *********************** */ @@ -74,7 +75,8 @@ enum { TFM_BAKE_TIME, TFM_BEVEL, TFM_BWEIGHT, - TFM_ALIGN + TFM_ALIGN, + TFM_EDGE_SLIDE } TfmMode; /* TRANSFORM CONTEXTS */ @@ -109,10 +111,12 @@ int BIF_snappingSupported(struct Object *obedit); struct TransformOrientation; struct bContext; +struct ReportList; void BIF_clearTransformOrientation(struct bContext *C); void BIF_removeTransformOrientation(struct bContext *C, struct TransformOrientation *ts); -void BIF_manageTransformOrientation(struct bContext *C, int confirm, int set); +void BIF_removeTransformOrientationIndex(struct bContext *C, int index); +void BIF_createTransformOrientation(struct bContext *C, struct ReportList *reports, char *name, int use, int overwrite); int BIF_menuselectTransformOrientation(void); void BIF_selectTransformOrientation(struct bContext *C, struct TransformOrientation *ts); void BIF_selectTransformOrientationValue(struct bContext *C, int orientation); diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index b45ab2d4997..e1762991676 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -146,6 +146,7 @@ typedef struct uiLayout uiLayout; #define UI_BUT_DRIVEN (1<<22) #define UI_BUT_INACTIVE (1<<23) #define UI_BUT_LAST_ACTIVE (1<<24) +#define UI_BUT_UNDO (1<<25) #define UI_PANEL_WIDTH 340 #define UI_COMPACT_PANEL_WIDTH 160 @@ -417,11 +418,13 @@ typedef void (*uiIDPoinFunc)(struct bContext *C, struct ID *id, int event); uiBut *uiDefIDPoinBut(uiBlock *block, uiIDPoinFuncFP func, short blocktype, int retval, char *str, short x1, short y1, short x2, short y2, void *idpp, char *tip); -int uiDefIDPoinButs(uiBlock *block, struct Main *main, struct ID *parid, struct ID *id, int id_code, short *pin_p, int x, int y, uiIDPoinFunc func, int events); + +int uiIconFromID(struct ID *id); uiBut *uiDefPulldownBut(uiBlock *block, uiBlockCreateFunc func, void *arg, char *str, short x1, short y1, short x2, short y2, char *tip); uiBut *uiDefMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, char *str, short x1, short y1, short x2, short y2, char *tip); uiBut *uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, char *str, short x1, short y1, short x2, short y2, char *tip); +uiBut *uiDefIconMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, short x1, short y1, short x2, short y2, char *tip); uiBut *uiDefBlockBut(uiBlock *block, uiBlockCreateFunc func, void *func_arg1, char *str, short x1, short y1, short x2, short y2, char *tip); uiBut *uiDefBlockButN(uiBlock *block, uiBlockCreateFunc func, void *argN, char *str, short x1, short y1, short x2, short y2, char *tip); @@ -429,7 +432,7 @@ uiBut *uiDefBlockButN(uiBlock *block, uiBlockCreateFunc func, void *argN, char * uiBut *uiDefIconBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int retval, int icon, short x1, short y1, short x2, short y2, char *tip); uiBut *uiDefIconTextBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int icon, char *str, short x1, short y1, short x2, short y2, char *tip); -void uiDefKeyevtButS(uiBlock *block, int retval, char *str, short x1, short y1, short x2, short y2, short *spoin, char *tip); +uiBut *uiDefKeyevtButS(uiBlock *block, int retval, char *str, short x1, short y1, short x2, short y2, short *spoin, char *tip); uiBut *uiDefHotKeyevtButS(uiBlock *block, int retval, char *str, short x1, short y1, short x2, short y2, short *keypoin, short *modkeypoin, char *tip); uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxlen, short x1, short y1, short x2, short y2, char *tip); @@ -484,6 +487,7 @@ int uiSearchBoxhHeight(void); void uiBlockSetHandleFunc(uiBlock *block, uiBlockHandleFunc func, void *arg); void uiBlockSetButmFunc (uiBlock *block, uiMenuHandleFunc func, void *arg); void uiBlockSetFunc (uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2); +void uiBlockSetNFunc (uiBlock *block, uiButHandleFunc func, void *argN, void *arg2); void uiButSetRenameFunc (uiBut *but, uiButHandleRenameFunc func, void *arg1); void uiButSetFunc (uiBut *but, uiButHandleFunc func, void *arg1, void *arg2); @@ -527,29 +531,6 @@ void UI_add_region_handlers(struct ListBase *handlers); void UI_add_area_handlers(struct ListBase *handlers); void UI_add_popup_handlers(struct bContext *C, struct ListBase *handlers, uiPopupBlockHandle *menu); -/* Legacy code - * Callbacks and utils to get 2.48 work */ - -void test_idbutton_cb(struct bContext *C, void *namev, void *arg2); -void test_scriptpoin_but(struct bContext *C, char *name, struct ID **idpp); -void test_actionpoin_but(struct bContext *C, char *name, struct ID **idpp); -void test_obpoin_but(struct bContext *C, char *name, struct ID **idpp); -void test_meshobpoin_but(struct bContext *C, char *name, struct ID **idpp); -void test_meshpoin_but(struct bContext *C, char *name, struct ID **idpp); -void test_matpoin_but(struct bContext *C, char *name, struct ID **idpp); -void test_scenepoin_but(struct bContext *C, char *name, struct ID **idpp); -void test_grouppoin_but(struct bContext *C, char *name, struct ID **idpp); -void test_texpoin_but(struct bContext *C, char *name, struct ID **idpp); -void test_imapoin_but(struct bContext *C, char *name, struct ID **idpp); -void autocomplete_bone(struct bContext *C, char *str, void *arg_v); -void autocomplete_vgroup(struct bContext *C, char *str, void *arg_v); - -struct rctf; -void curvemap_buttons(uiBlock *block, struct CurveMapping *cumap, char labeltype, short event, short redraw, struct rctf *rect); -void curvemap_layout(uiLayout *layout, struct CurveMapping *cumap, char labeltype, short event, short redraw, struct rctf *rect); -void colorband_buttons(uiBlock *block, struct ColorBand *coba, struct rctf *rect, int small); - - /* Module * * init and exit should be called before using this module. init_userdef must @@ -593,7 +574,7 @@ void UI_exit(void); 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); +void uiBlockLayoutResolve(uiBlock *block, int *x, int *y); uiBlock *uiLayoutGetBlock(uiLayout *layout); @@ -638,10 +619,11 @@ void uiTemplateID(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, uiLayout *uiTemplateModifier(uiLayout *layout, struct PointerRNA *ptr); uiLayout *uiTemplateConstraint(uiLayout *layout, struct PointerRNA *ptr); void uiTemplatePreview(uiLayout *layout, struct ID *id, struct ID *parent, struct MTex *slot); -void uiTemplateColorRamp(uiLayout *layout, struct ColorBand *coba, int expand); -void uiTemplateCurveMapping(uiLayout *layout, struct CurveMapping *cumap, int type, int compact); +void uiTemplateColorRamp(uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand); +void uiTemplateCurveMapping(uiLayout *layout, struct PointerRNA *ptr, char *propname, int type, int levels); void uiTemplateTriColorSet(uiLayout *layout, struct PointerRNA *ptr, char *propname); void uiTemplateLayers(uiLayout *layout, struct PointerRNA *ptr, char *propname); +void uiTemplateImage(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname, struct PointerRNA *userptr, int compact); void uiTemplateImageLayers(uiLayout *layout, struct bContext *C, struct Image *ima, struct ImageUser *iuser); void uiTemplateRunningJobs(uiLayout *layout, struct bContext *C); void uiTemplateOperatorSearch(uiLayout *layout); diff --git a/source/blender/editors/include/UI_interface_icons.h b/source/blender/editors/include/UI_interface_icons.h index bf160b4ad68..afe6a2b9dcb 100644 --- a/source/blender/editors/include/UI_interface_icons.h +++ b/source/blender/editors/include/UI_interface_icons.h @@ -57,9 +57,9 @@ int UI_icon_get_height(int icon_id); void UI_icon_draw(float x, float y, int icon_id); void UI_icon_draw_preview(float x, float y, int icon_id, int nocreate); -void UI_icon_draw_aspect(float x, float y, int icon_id, float aspect); -void UI_icon_draw_aspect_blended(float x, float y, int icon_id, float aspect, int shade); -void UI_icon_draw_size_blended(float x, float y, int size, int icon_id, int shade); +void UI_icon_draw_aspect(float x, float y, int icon_id, float aspect, float alpha); +void UI_icon_draw_aspect_color(float x, float y, int icon_id, float aspect, float *rgb); +void UI_icon_draw_size(float x, float y, int size, int icon_id, float alpha); void UI_icons_free(); void UI_icons_free_drawinfo(void *drawinfo); diff --git a/source/blender/editors/interface/SConscript b/source/blender/editors/interface/SConscript index e44de5410f1..bca0350d4fc 100644 --- a/source/blender/editors/interface/SConscript +++ b/source/blender/editors/interface/SConscript @@ -16,4 +16,7 @@ defs = [] if env['WITH_BF_INTERNATIONAL']: defs.append('INTERNATIONAL') -env.BlenderLib ( 'bf_editors_interface', sources, Split(incs), Split(defs), libtype=['core'], priority=[110] ) +if not env['WITH_BF_PYTHON']: + defs.append('DISABLE_PYTHON') + +env.BlenderLib ( 'bf_editors_interface', sources, Split(incs), defs, libtype=['core'], priority=[110] ) diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 3c6e12905d6..3e5cc0e6d67 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -597,7 +597,7 @@ void uiEndBlock(const bContext *C, uiBlock *block) if(but->context) CTX_store_set((bContext*)C, but->context); - if(ot==NULL || (ot->poll && ot->poll((bContext *)C)==0)) { + if(ot == NULL || WM_operator_poll((bContext*)C, ot)==0) { but->flag |= UI_BUT_DISABLED; but->lock = 1; } @@ -622,7 +622,7 @@ void uiEndBlock(const bContext *C, uiBlock *block) } /* handle pending stuff */ - if(block->layouts.first) uiBlockLayoutResolve(C, block, NULL, NULL); + if(block->layouts.first) uiBlockLayoutResolve(block, NULL, NULL); ui_block_do_align(block); if(block->flag & UI_BLOCK_LOOP) ui_menu_block_set_keymaps(C, block); @@ -1684,6 +1684,9 @@ void uiFreeBlock(const bContext *C, uiBlock *block) ui_free_but(C, but); } + if(block->func_argN) + MEM_freeN(block->func_argN); + CTX_store_free_list(&block->contexts); BLI_freelistN(&block->saferct); @@ -2232,6 +2235,10 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short but->func= block->func; but->func_arg1= block->func_arg1; but->func_arg2= block->func_arg2; + + but->funcN= block->funcN; + if(block->func_argN) + but->func_argN= MEM_dupallocN(block->func_argN); but->pos= -1; /* cursor invisible */ @@ -2264,6 +2271,10 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short } } + if(ELEM8(but->type, BLOCK, BUT, LABEL, PULLDOWN, ROUNDBOX, LISTBOX, SEARCH_MENU, BUTM)); + else if(ELEM5(but->type, SCROLL, SEPR, LINK, INLINK, FTPREVIEW)); + else but->flag |= UI_BUT_UNDO; + BLI_addtail(&block->buttons, but); if(block->curlayout) @@ -2942,6 +2953,16 @@ void uiBlockSetFunc(uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2 block->func_arg2= arg2; } +void uiBlockSetNFunc(uiBlock *block, uiButHandleFunc func, void *argN, void *arg2) +{ + if(block->func_argN) + MEM_freeN(block->func_argN); + + block->funcN= func; + block->func_argN= argN; + block->func_arg2= arg2; +} + void uiButSetRenameFunc(uiBut *but, uiButHandleRenameFunc func, void *arg1) { but->rename_func= func; @@ -2964,6 +2985,9 @@ void uiButSetFunc(uiBut *but, uiButHandleFunc func, void *arg1, void *arg2) void uiButSetNFunc(uiBut *but, uiButHandleNFunc funcN, void *argN, void *arg2) { + if(but->func_argN) + MEM_freeN(but->func_argN); + but->funcN= funcN; but->func_argN= argN; but->func_arg2= arg2; @@ -3000,6 +3024,8 @@ uiBut *uiDefBlockButN(uiBlock *block, uiBlockCreateFunc func, void *argN, char * { uiBut *but= ui_def_but(block, BLOCK, 0, str, x1, y1, x2, y2, NULL, 0.0, 0.0, 0.0, 0.0, tip); but->block_create_func= func; + if(but->func_argN) + MEM_freeN(but->func_argN); but->func_argN= argN; ui_check_but(but); return but; @@ -3038,6 +3064,20 @@ uiBut *uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, in return but; } +uiBut *uiDefIconMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, short x1, short y1, short x2, short y2, char *tip) +{ + uiBut *but= ui_def_but(block, PULLDOWN, 0, "", x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); + + but->icon= (BIFIconID) icon; + but->flag |= UI_HAS_ICON; + but->flag &=~ UI_ICON_LEFT; + + but->menu_create_func= func; + ui_check_but(but); + + return but; +} + /* Block button containing both string label and icon */ uiBut *uiDefIconTextBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int icon, char *str, short x1, short y1, short x2, short y2, char *tip) { @@ -3073,10 +3113,11 @@ uiBut *uiDefIconBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int return but; } -void uiDefKeyevtButS(uiBlock *block, int retval, char *str, short x1, short y1, short x2, short y2, short *spoin, char *tip) +uiBut *uiDefKeyevtButS(uiBlock *block, int retval, char *str, short x1, short y1, short x2, short y2, short *spoin, char *tip) { uiBut *but= ui_def_but(block, KEYEVT|SHO, retval, str, x1, y1, x2, y2, spoin, 0.0, 0.0, 0.0, 0.0, tip); ui_check_but(but); + return but; } /* short pointers hardcoded */ diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c index 8c41726b81b..8037a609a2f 100644 --- a/source/blender/editors/interface/interface_anim.c +++ b/source/blender/editors/interface/interface_anim.c @@ -209,6 +209,18 @@ void ui_but_anim_remove_driver(bContext *C) WM_operator_name_call(C, "ANIM_OT_remove_driver_button", WM_OP_INVOKE_DEFAULT, NULL); } +void ui_but_anim_copy_driver(bContext *C) +{ + /* this operator calls uiAnimContextProperty above */ + WM_operator_name_call(C, "ANIM_OT_copy_driver_button", WM_OP_INVOKE_DEFAULT, NULL); +} + +void ui_but_anim_paste_driver(bContext *C) +{ + /* this operator calls uiAnimContextProperty above */ + WM_operator_name_call(C, "ANIM_OT_paste_driver_button", WM_OP_INVOKE_DEFAULT, NULL); +} + void ui_but_anim_add_keyingset(bContext *C) { /* this operator calls uiAnimContextProperty above */ @@ -264,6 +276,10 @@ void ui_but_anim_menu(bContext *C, uiBut *but) } else uiItemBooleanO(layout, "Delete Driver", 0, "ANIM_OT_remove_driver_button", "all", 0); + + uiItemO(layout, "Copy Driver", 0, "ANIM_OT_copy_driver_button"); + if (ANIM_driver_can_paste()) + uiItemO(layout, "Paste Driver", 0, "ANIM_OT_paste_driver_button"); } else if(but->flag & UI_BUT_ANIMATED_KEY); else if(RNA_property_animateable(&but->rnapoin, but->rnaprop)) { @@ -275,6 +291,9 @@ void ui_but_anim_menu(bContext *C, uiBut *but) } else uiItemBooleanO(layout, "Add Driver", 0, "ANIM_OT_add_driver_button", "all", 0); + + if (ANIM_driver_can_paste()) + uiItemO(layout, "Paste Driver", 0, "ANIM_OT_paste_driver_button"); } if(RNA_property_animateable(&but->rnapoin, but->rnaprop)) { diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 259ccba6b89..c60c94a9c4d 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -246,7 +246,13 @@ static void ui_apply_but_func(bContext *C, uiBut *but) if(but->func || but->funcN || block->handle_func || but->rename_func || (but->type == BUTM && block->butm_func) || but->optype || but->rnaprop) { after= MEM_callocN(sizeof(uiAfterFunc), "uiAfterFunc"); - after->func= but->func; + if(but->func && ELEM(but, but->func_arg1, but->func_arg2)) { + /* exception, this will crash due to removed button otherwise */ + but->func(C, but->func_arg1, but->func_arg2); + } + else + after->func= but->func; + after->func_arg1= but->func_arg1; after->func_arg2= but->func_arg2; after->func_arg3= but->func_arg3; @@ -292,8 +298,7 @@ static void ui_apply_autokey_undo(bContext *C, uiBut *but) uiAfterFunc *after; char *str= NULL; - if ELEM6(but->type, BLOCK, BUT, LABEL, PULLDOWN, ROUNDBOX, LISTBOX); - else { + if(but->flag & UI_BUT_UNDO) { /* define which string to use for undo */ if ELEM(but->type, LINK, INLINK) str= "Add button link"; else if ELEM(but->type, MENU, ICONTEXTROW) str= but->drawstr; @@ -850,6 +855,7 @@ static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleBut ui_apply_but_CHARTAB(C, but, data); break; #endif + case KEYEVT: case HOTKEYEVT: ui_apply_but_BUT(C, but, data); break; @@ -1440,16 +1446,20 @@ static void ui_textedit_next_but(uiBlock *block, uiBut *actbut, uiHandleButtonDa for(but= actbut->next; but; but= but->next) { if(ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) { - data->postbut= but; - data->posttype= BUTTON_ACTIVATE_TEXT_EDITING; - return; + if(!(but->flag & UI_BUT_DISABLED)) { + data->postbut= but; + data->posttype= BUTTON_ACTIVATE_TEXT_EDITING; + return; + } } } for(but= block->buttons.first; but!=actbut; but= but->next) { if(ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) { - data->postbut= but; - data->posttype= BUTTON_ACTIVATE_TEXT_EDITING; - return; + if(!(but->flag & UI_BUT_DISABLED)) { + data->postbut= but; + data->posttype= BUTTON_ACTIVATE_TEXT_EDITING; + return; + } } } } @@ -1464,16 +1474,20 @@ static void ui_textedit_prev_but(uiBlock *block, uiBut *actbut, uiHandleButtonDa for(but= actbut->prev; but; but= but->prev) { if(ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) { - data->postbut= but; - data->posttype= BUTTON_ACTIVATE_TEXT_EDITING; - return; + if(!(but->flag & UI_BUT_DISABLED)) { + data->postbut= but; + data->posttype= BUTTON_ACTIVATE_TEXT_EDITING; + return; + } } } for(but= block->buttons.last; but!=actbut; but= but->prev) { if(ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) { - data->postbut= but; - data->posttype= BUTTON_ACTIVATE_TEXT_EDITING; - return; + if(!(but->flag & UI_BUT_DISABLED)) { + data->postbut= but; + data->posttype= BUTTON_ACTIVATE_TEXT_EDITING; + return; + } } } } @@ -1646,7 +1660,7 @@ static void ui_do_but_textedit_select(bContext *C, uiBlock *block, uiBut *but, u break; } case LEFTMOUSE: - if(event->val == 0) + if(event->val == KM_RELEASE) button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING); retval= WM_UI_HANDLER_BREAK; break; @@ -2109,7 +2123,7 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton wmTabletData *wmtab= event->customdata; /* de-sensitise based on tablet pressure */ - if (ELEM(wmtab->Active, DEV_STYLUS, DEV_ERASER)) + if (wmtab->Active != EVT_TABLET_NONE) fac *= wmtab->Pressure; } @@ -3257,7 +3271,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event) retval= WM_UI_HANDLER_CONTINUE; if(but->flag & UI_BUT_DISABLED) - return WM_UI_HANDLER_BREAK; + return WM_UI_HANDLER_CONTINUE; if(data->state == BUTTON_STATE_HIGHLIGHT) { /* handle copy-paste */ @@ -3647,11 +3661,11 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s if(!(but->block->handle && but->block->handle->popup)) { if(button_modal_state(state)) { if(!button_modal_state(data->state)) - WM_event_add_ui_handler(C, &data->window->handlers, ui_handler_region_menu, NULL, data); + WM_event_add_ui_handler(C, &data->window->modalhandlers, ui_handler_region_menu, NULL, data); } else { if(button_modal_state(data->state)) - WM_event_remove_ui_handler(&data->window->handlers, ui_handler_region_menu, NULL, data); + WM_event_remove_ui_handler(&data->window->modalhandlers, ui_handler_region_menu, NULL, data); } } @@ -4587,7 +4601,7 @@ static int ui_handler_popup(bContext *C, wmEvent *event, void *userdata) uiPopupBlockHandle temp= *menu; ui_popup_block_free(C, menu); - WM_event_remove_ui_handler(&CTX_wm_window(C)->handlers, ui_handler_popup, ui_handler_remove_popup, menu); + WM_event_remove_ui_handler(&CTX_wm_window(C)->modalhandlers, ui_handler_popup, ui_handler_remove_popup, menu); if(temp.menuretval == UI_RETURN_OK) { if(temp.popup_func) diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 6c4110c8c37..1153c475339 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -47,6 +47,7 @@ #include "DNA_scene_types.h" #include "DNA_userdef_types.h" +#include "BKE_context.h" #include "BKE_image.h" #include "BKE_icons.h" #include "BKE_utildefines.h" @@ -58,7 +59,7 @@ #include "BIF_glutil.h" #include "ED_datafiles.h" -#include "ED_previewrender.h" +#include "ED_render.h" #include "UI_interface.h" #include "UI_interface_icons.h" @@ -85,23 +86,45 @@ typedef struct IconImage { typedef void (*VectorDrawFunc)(int x, int y, int w, int h, float alpha); +#define ICON_TYPE_PREVIEW 0 +#define ICON_TYPE_TEXTURE 1 +#define ICON_TYPE_BUFFER 2 +#define ICON_TYPE_VECTOR 3 + typedef struct DrawInfo { + int type; + + union { + /* type specific data */ + struct { + VectorDrawFunc func; + } vector; + struct { + IconImage* image; + } buffer; + struct { + int x, y, w, h; + } texture; + } data; +} DrawInfo; + +typedef struct IconTexture { + GLuint id; int w; int h; - float aspect; - VectorDrawFunc drawFunc; /* If drawFunc is defined then it is a vector icon, otherwise use rect */ - IconImage* icon; -} DrawInfo; + float invw; + float invh; +} IconTexture; /* ******************* STATIC LOCAL VARS ******************* */ /* static here to cache results of icon directory scan, so it's not * scanning the filesystem each time the menu is drawn */ static struct ListBase iconfilelist = {0, 0}; - +static IconTexture icongltex = {0, 0, 0, 0.0f, 0.0f}; /* **************************************************** */ -static void def_internal_icon(ImBuf *bbuf, int icon_id, int xofs, int yofs, int size) +static void def_internal_icon(ImBuf *bbuf, int icon_id, int xofs, int yofs, int size, int type) { Icon *new_icon = NULL; IconImage *iimg = NULL; @@ -115,23 +138,28 @@ static void def_internal_icon(ImBuf *bbuf, int icon_id, int xofs, int yofs, int new_icon->type = 0; di = MEM_callocN(sizeof(DrawInfo), "drawinfo"); - di->drawFunc = 0; - di->w = size; - di->h = size; - di->aspect = 1.0f; - - iimg = MEM_mallocN(sizeof(IconImage), "icon_img"); - iimg->rect = MEM_mallocN(size*size*sizeof(unsigned int), "icon_rect"); - iimg->w = size; - iimg->h = size; - - /* Here we store the rect in the icon - same as before */ - imgsize = bbuf->x; - for (y=0; y<size; y++) { - memcpy(&iimg->rect[y*size], &bbuf->rect[(y+yofs)*imgsize+xofs], size*sizeof(int)); - } + di->type= type; + + if(type == ICON_TYPE_TEXTURE) { + di->data.texture.x= xofs; + di->data.texture.y= yofs; + di->data.texture.w= size; + di->data.texture.h= size; + } + else if(type == ICON_TYPE_BUFFER) { + iimg = MEM_mallocN(sizeof(IconImage), "icon_img"); + iimg->rect = MEM_mallocN(size*size*sizeof(unsigned int), "icon_rect"); + iimg->w = size; + iimg->h = size; + + /* Here we store the rect in the icon - same as before */ + imgsize = bbuf->x; + for (y=0; y<size; y++) { + memcpy(&iimg->rect[y*size], &bbuf->rect[(y+yofs)*imgsize+xofs], size*sizeof(int)); + } - di->icon = iimg; + di->data.buffer.image = iimg; + } new_icon->drawinfo_free = UI_icons_free_drawinfo; new_icon->drawinfo = di; @@ -150,11 +178,8 @@ static void def_internal_vicon( int icon_id, VectorDrawFunc drawFunc) new_icon->type = 0; di = MEM_callocN(sizeof(DrawInfo), "drawinfo"); - di->drawFunc =drawFunc; - di->w = ICON_DEFAULT_HEIGHT; - di->h = ICON_DEFAULT_HEIGHT; - di->aspect = 1.0f; - di->icon = NULL; + di->type= ICON_TYPE_VECTOR; + di->data.vector.func =drawFunc; new_icon->drawinfo_free = 0; new_icon->drawinfo = di; @@ -430,7 +455,7 @@ static void init_internal_icons() { bTheme *btheme= U.themes.first; ImBuf *bbuf= NULL; - int x, y; + int x, y, icontype; char iconfilestr[FILE_MAXDIR+FILE_MAXFILE]; char filenamestr[FILE_MAXFILE+16]; // 16 == strlen(".blender/icons/")+1 @@ -450,17 +475,54 @@ static void init_internal_icons() printf("\n***WARNING***\nIcons file %s too small.\nUsing built-in Icons instead\n", iconfilestr); IMB_freeImBuf(bbuf); bbuf= NULL; + } } } - } if(bbuf==NULL) bbuf = IMB_ibImageFromMemory((int *)datatoc_blenderbuttons, datatoc_blenderbuttons_size, IB_rect); + if(bbuf) { + /* free existing texture if any */ + if(icongltex.id) { + glDeleteTextures(1, &icongltex.id); + icongltex.id= 0; + } + + /* we only use a texture for cards with non-power of two */ + if(GLEW_ARB_texture_non_power_of_two) { + glGenTextures(1, &icongltex.id); + + if(icongltex.id) { + icongltex.w = bbuf->x; + icongltex.h = bbuf->y; + icongltex.invw = 1.0f/bbuf->x; + icongltex.invh = 1.0f/bbuf->y; + + glBindTexture(GL_TEXTURE_2D, icongltex.id); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, bbuf->x, bbuf->y, 0, GL_RGBA, GL_UNSIGNED_BYTE, bbuf->rect); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glBindTexture(GL_TEXTURE_2D, 0); + + if(glGetError() == GL_OUT_OF_MEMORY) { + glDeleteTextures(1, &icongltex.id); + icongltex.id= 0; + } + } + } + } + + if(icongltex.id) + icontype= ICON_TYPE_TEXTURE; + else + icontype= ICON_TYPE_BUFFER; + for (y=0; y<ICON_GRID_ROWS; y++) { for (x=0; x<ICON_GRID_COLS; x++) { def_internal_icon(bbuf, BIFICONID_FIRST + y*ICON_GRID_COLS + x, x*(ICON_GRID_W+ICON_GRID_MARGIN)+ICON_GRID_MARGIN, - y*(ICON_GRID_H+ICON_GRID_MARGIN)+ICON_GRID_MARGIN, ICON_GRID_W); + y*(ICON_GRID_H+ICON_GRID_MARGIN)+ICON_GRID_MARGIN, ICON_GRID_W, + icontype); } } @@ -587,6 +649,11 @@ ListBase *UI_iconfile_list(void) void UI_icons_free() { + if(icongltex.id) { + glDeleteTextures(1, &icongltex.id); + icongltex.id= 0; + } + free_iconfile_list(&iconfilelist); BKE_icons_free(); } @@ -595,12 +662,14 @@ void UI_icons_free_drawinfo(void *drawinfo) { DrawInfo *di = drawinfo; - if (di) - { - if (di->icon) { - MEM_freeN(di->icon->rect); - MEM_freeN(di->icon); + if(di) { + if(di->type == ICON_TYPE_BUFFER) { + if(di->data.buffer.image) { + MEM_freeN(di->data.buffer.image->rect); + MEM_freeN(di->data.buffer.image); + } } + MEM_freeN(di); } } @@ -610,12 +679,7 @@ static DrawInfo *icon_create_drawinfo() DrawInfo *di = NULL; di = MEM_callocN(sizeof(DrawInfo), "di_icon"); - - di->drawFunc = 0; - di->w = ICON_DEFAULT_HEIGHT; - di->h = ICON_DEFAULT_HEIGHT; - di->icon = NULL; - di->aspect = 1.0f; + di->type= ICON_TYPE_PREVIEW; return di; } @@ -639,7 +703,7 @@ int UI_icon_get_width(int icon_id) } if (di) - return di->w; + return ICON_DEFAULT_HEIGHT; return 0; } @@ -664,7 +728,7 @@ int UI_icon_get_height(int icon_id) } if (di) - return di->h; + return ICON_DEFAULT_HEIGHT; return 0; } @@ -676,56 +740,6 @@ void UI_icons_init(int first_dyn_id) init_internal_icons(); } -static void icon_copy_rect(ImBuf *ibuf, unsigned int w, unsigned int h, unsigned int *rect) -{ - struct ImBuf *ima; - unsigned int *drect, *srect; - float scaledx, scaledy; - short ex, ey, dx, dy; - - /* paranoia test */ - if(ibuf==NULL || (ibuf->rect==NULL && ibuf->rect_float==NULL)) - return; - - /* waste of cpu cyles... but the imbuf API has no other way to scale fast (ton) */ - ima = IMB_dupImBuf(ibuf); - - if (!ima) - return; - - if (ima->x > ima->y) { - scaledx = (float)w; - scaledy = ( (float)ima->y/(float)ima->x )*(float)w; - } - else { - scaledx = ( (float)ima->x/(float)ima->y )*(float)h; - scaledy = (float)h; - } - - ex = (short)scaledx; - ey = (short)scaledy; - - dx = (w - ex) / 2; - dy = (h - ey) / 2; - - IMB_scalefastImBuf(ima, ex, ey); - - /* if needed, convert to 32 bits */ - if(ima->rect==NULL) - IMB_rect_from_float(ima); - - srect = ima->rect; - drect = rect; - - drect+= dy*w+dx; - for (;ey > 0; ey--){ - memcpy(drect,srect, ex * sizeof(int)); - drect += w; - srect += ima->x; - } - IMB_freeImBuf(ima); -} - /* Render size for preview images at level miplevel */ static int preview_render_size(int miplevel) { @@ -751,113 +765,39 @@ static void icon_create_mipmap(struct PreviewImage* prv_img, int miplevel) } } -/* create single icon from jpg, png etc. */ -static void icon_from_image(Scene *scene, Image *img, int miplevel) -{ - ImBuf *ibuf= NULL; - ImageUser iuser; - PreviewImage *pi; - unsigned int pr_size; - short image_loaded = 0; - - /* img->ok is zero when Image cannot load */ - if (img==NULL || img->ok==0) - return; - - /* setup dummy image user */ - memset(&iuser, 0, sizeof(ImageUser)); - iuser.ok= iuser.framenr= 1; - iuser.scene= scene; - - /* elubie: this needs to be changed: here image is always loaded if not - already there. Very expensive for large images. Need to find a way to - only get existing ibuf */ - - ibuf = BKE_image_get_ibuf(img, &iuser); - if(ibuf==NULL || ibuf->rect==NULL) { - return; - } - - pi = BKE_previewimg_get((ID*)img); - - if(!pi) { - printf("preview image could'nt be allocated"); - return; - } - /* we can only create the preview rect here, since loading possibly deallocated - old preview */ - icon_create_mipmap(pi, miplevel); - - pr_size = img->preview->w[miplevel]*img->preview->h[miplevel]*sizeof(unsigned int); - - image_loaded = 1; - icon_copy_rect(ibuf, img->preview->w[miplevel], img->preview->h[miplevel], img->preview->rect[miplevel]); -} - -static void set_alpha(char* cp, int sizex, int sizey, char alpha) -{ - int x,y; - for(y=0; y<sizey; y++) { - for(x=0; x<sizex; x++, cp+=4) { - cp[3]= alpha; - } - } -} - /* only called when icon has changed */ /* only call with valid pointer from UI_icon_draw */ -static void icon_set_image(Scene *scene, ID *id, PreviewImage* prv_img, int miplevel) +static void icon_set_image(bContext *C, ID *id, PreviewImage* prv_img, int miplevel) { - RenderInfo ri; - unsigned int pr_size = 0; - if (!prv_img) { printf("No preview image for this ID: %s\n", id->name); return; } - /* no drawing (see last parameter doDraw, just calculate preview image - - hopefully small enough to be fast */ - if (GS(id->name) == ID_IM) - icon_from_image(scene, (struct Image*)id, miplevel); - else { - /* create the preview rect */ - icon_create_mipmap(prv_img, miplevel); - - ri.curtile= 0; - ri.tottile= 0; - ri.pr_rectx = prv_img->w[miplevel]; - ri.pr_recty = prv_img->h[miplevel]; - pr_size = ri.pr_rectx*ri.pr_recty*sizeof(unsigned int); - ri.rect = MEM_callocN(pr_size, "pr icon rect"); - - ED_preview_iconrender(scene, id, ri.rect, ri.pr_rectx, ri.pr_recty); - - /* world is rendered with alpha=0, so it wasn't displayed - this could be render option for sky to, for later */ - if (GS(id->name) == ID_WO) { - set_alpha( (char*) ri.rect, ri.pr_rectx, ri.pr_recty, 255); - } - else if (GS(id->name) == ID_MA) { - Material* mat = (Material*)id; - if (mat->material_type == MA_TYPE_HALO) { - set_alpha( (char*) ri.rect, ri.pr_rectx, ri.pr_recty, 255); - } - } + /* create the preview rect */ + icon_create_mipmap(prv_img, miplevel); - memcpy(prv_img->rect[miplevel], ri.rect, pr_size); - - /* and clean up */ - MEM_freeN(ri.rect); - } + ED_preview_icon_job(C, prv_img, id, prv_img->rect[miplevel], + prv_img->w[miplevel], prv_img->h[miplevel]); } -static void icon_draw_rect(float x, float y, int w, int h, float aspect, int rw, int rh, unsigned int *rect) +static void icon_draw_rect(float x, float y, int w, int h, float aspect, int rw, int rh, unsigned int *rect, float alpha, float *rgb) { - + /* modulate color */ + if(alpha != 1.0f) + glPixelTransferf(GL_ALPHA_SCALE, alpha); + + if(rgb) { + glPixelTransferf(GL_RED_SCALE, rgb[0]); + glPixelTransferf(GL_GREEN_SCALE, rgb[1]); + glPixelTransferf(GL_BLUE_SCALE, rgb[2]); + } + + /* position */ glRasterPos2f(x, y); // XXX ui_rasterpos_safe(x, y, aspect); + /* draw */ if((w<1 || h<1)) { // XXX - TODO 2.5 verify whether this case can happen // and only print in debug @@ -865,23 +805,68 @@ static void icon_draw_rect(float x, float y, int w, int h, float aspect, int rw, } /* rect contains image in 'rendersize', we only scale if needed */ else if(rw!=w && rh!=h) { - ImBuf *ima; if(w>2000 || h>2000) { /* something has gone wrong! */ printf("insane icon size w=%d h=%d\n",w,h); - return; } - /* first allocate imbuf for scaling and copy preview into it */ - ima = IMB_allocImBuf(rw, rh, 32, IB_rect, 0); - memcpy(ima->rect, rect, rw*rh*sizeof(unsigned int)); - - /* scale it */ - IMB_scaleImBuf(ima, w, h); - glDrawPixels(w, h, GL_RGBA, GL_UNSIGNED_BYTE, ima->rect); - - IMB_freeImBuf(ima); + else { + ImBuf *ima; + + /* first allocate imbuf for scaling and copy preview into it */ + ima = IMB_allocImBuf(rw, rh, 32, IB_rect, 0); + memcpy(ima->rect, rect, rw*rh*sizeof(unsigned int)); + + /* scale it */ + IMB_scaleImBuf(ima, w, h); + glDrawPixels(w, h, GL_RGBA, GL_UNSIGNED_BYTE, ima->rect); + + IMB_freeImBuf(ima); + } } else glDrawPixels(w, h, GL_RGBA, GL_UNSIGNED_BYTE, rect); + + /* restore color */ + if(alpha != 0.0f) + glPixelTransferf(GL_ALPHA_SCALE, 1.0f); + + if(rgb) { + glPixelTransferf(GL_RED_SCALE, 1.0f); + glPixelTransferf(GL_GREEN_SCALE, 1.0f); + glPixelTransferf(GL_BLUE_SCALE, 1.0f); + } +} + +static void icon_draw_texture(float x, float y, float w, float h, int ix, int iy, int iw, int ih, float alpha, float *rgb) +{ + float x1, x2, y1, y2; + + if(rgb) glColor4f(rgb[0], rgb[1], rgb[2], alpha); + else glColor4f(1.0f, 1.0f, 1.0f, alpha); + + x1= ix*icongltex.invw; + x2= (ix + ih)*icongltex.invw; + y1= iy*icongltex.invh; + y2= (iy + ih)*icongltex.invh; + + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, icongltex.id); + + glBegin(GL_QUADS); + glTexCoord2f(x1, y1); + glVertex2f(x, y); + + glTexCoord2f(x2, y1); + glVertex2f(x+w, y); + + glTexCoord2f(x2, y2); + glVertex2f(x+w, y+h); + + glTexCoord2f(x1, y2); + glVertex2f(x, y+h); + glEnd(); + + glBindTexture(GL_TEXTURE_2D, 0); + glDisable(GL_TEXTURE_2D); } /* Drawing size for preview images at level miplevel */ @@ -894,10 +879,12 @@ static int preview_size(int miplevel) return 0; } -static void icon_draw_size(float x, float y, int icon_id, float aspect, int miplevel, int draw_size, int nocreate) +static void icon_draw_size(float x, float y, int icon_id, float aspect, float alpha, float *rgb, int miplevel, int draw_size, int nocreate) { Icon *icon = NULL; DrawInfo *di = NULL; + IconImage *iimg; + int w, h; icon = BKE_icon_get(icon_id); @@ -905,7 +892,7 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, int mipl printf("icon_draw_mipmap: Internal error, no icon for icon ID: %d\n", icon_id); return; } - + di = (DrawInfo*)icon->drawinfo; if (!di) { @@ -915,36 +902,43 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, int mipl icon->drawinfo_free = UI_icons_free_drawinfo; } - di->aspect = aspect; /* scale width and height according to aspect */ - di->w = (int)(draw_size/di->aspect + 0.5f); - di->h = (int)(draw_size/di->aspect + 0.5f); + w = (int)(draw_size/aspect + 0.5f); + h = (int)(draw_size/aspect + 0.5f); - if (di->drawFunc) { + if(di->type == ICON_TYPE_VECTOR) { /* vector icons use the uiBlock transformation, they are not drawn with untransformed coordinates like the other icons */ - di->drawFunc(x, y, ICON_DEFAULT_HEIGHT, ICON_DEFAULT_HEIGHT, 1.0f); + di->data.vector.func(x, y, ICON_DEFAULT_HEIGHT, ICON_DEFAULT_HEIGHT, 1.0f); } - else if (di->icon) { + else if(di->type == ICON_TYPE_TEXTURE) { + icon_draw_texture(x, y, w, h, di->data.texture.x, di->data.texture.y, + di->data.texture.w, di->data.texture.h, alpha, rgb); + } + else if(di->type == ICON_TYPE_BUFFER) { /* it is a builtin icon */ - if (!di->icon->rect) return; /* something has gone wrong! */ + iimg= di->data.buffer.image; + + if(!iimg->rect) return; /* something has gone wrong! */ - icon_draw_rect(x,y,di->w, di->h, di->aspect, di->icon->w, di->icon->h, di->icon->rect); + icon_draw_rect(x, y, w, h, aspect, iimg->w, iimg->h, iimg->rect, alpha, rgb); } - else { + else if(di->type == ICON_TYPE_PREVIEW) { PreviewImage* pi = BKE_previewimg_get((ID*)icon->obj); - if (pi) { + if(pi) { /* no create icon on this level in code */ + if(!pi->rect[miplevel]) return; /* something has gone wrong! */ - if (!pi->rect[miplevel]) return; /* something has gone wrong! */ - - icon_draw_rect(x,y,di->w, di->h, di->aspect, pi->w[miplevel], pi->h[miplevel], pi->rect[miplevel]); + /* preview images use premul alpha ... */ + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + icon_draw_rect(x, y, w, h, aspect, pi->w[miplevel], pi->h[miplevel], pi->rect[miplevel], 1.0f, NULL); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } } } -void ui_id_icon_render(Scene *scene, ID *id) +void ui_id_icon_render(bContext *C, ID *id) { PreviewImage *pi = BKE_previewimg_get(id); @@ -952,13 +946,13 @@ void ui_id_icon_render(Scene *scene, ID *id) if ((pi->changed[0] ||!pi->rect[0])) /* changed only ever set by dynamic icons */ { /* create the preview rect if necessary */ - icon_set_image(scene, id, pi, 0); + icon_set_image(C, id, pi, 0); pi->changed[0] = 0; } } } -int ui_id_icon_get(Scene *scene, ID *id) +int ui_id_icon_get(bContext *C, ID *id) { int iconid= 0; @@ -972,7 +966,7 @@ int ui_id_icon_get(Scene *scene, ID *id) case ID_LA: /* fall through */ iconid= BKE_icon_getid(id); /* checks if not exists, or changed */ - ui_id_icon_render(scene, id); + ui_id_icon_render(C, id); break; default: break; @@ -981,50 +975,35 @@ int ui_id_icon_get(Scene *scene, ID *id) return iconid; } -static void icon_draw_mipmap(float x, float y, int icon_id, float aspect, int miplevel, int nocreate) +static void icon_draw_mipmap(float x, float y, int icon_id, float aspect, float alpha, int miplevel, int nocreate) { int draw_size = preview_size(miplevel); - icon_draw_size(x,y,icon_id, aspect, miplevel, draw_size, nocreate); + icon_draw_size(x, y, icon_id, aspect, alpha, NULL, miplevel, draw_size, nocreate); } +void UI_icon_draw_aspect(float x, float y, int icon_id, float aspect, float alpha) +{ + icon_draw_mipmap(x, y, icon_id, aspect, alpha, PREVIEW_MIPMAP_ZERO, 0); +} -void UI_icon_draw_aspect(float x, float y, int icon_id, float aspect) +void UI_icon_draw_aspect_color(float x, float y, int icon_id, float aspect, float *rgb) { - icon_draw_mipmap(x,y,icon_id, aspect, PREVIEW_MIPMAP_ZERO, 0); + int draw_size = preview_size(PREVIEW_MIPMAP_ZERO); + icon_draw_size(x, y, icon_id, aspect, 1.0f, rgb, PREVIEW_MIPMAP_ZERO, draw_size, 0); } void UI_icon_draw(float x, float y, int icon_id) { - UI_icon_draw_aspect(x, y, icon_id, 1.0f); + UI_icon_draw_aspect(x, y, icon_id, 1.0f, 1.0f); } -void UI_icon_draw_size_blended(float x, float y, int size, int icon_id, int shade) +void UI_icon_draw_size(float x, float y, int size, int icon_id, float alpha) { - if(shade < 0) { - float r= (128+shade)/128.0f; - glPixelTransferf(GL_ALPHA_SCALE, r); - } - - icon_draw_size(x,y,icon_id, 1.0f, 0, size, 1); - - if(shade < 0) - glPixelTransferf(GL_ALPHA_SCALE, 1.0f); + icon_draw_size(x, y, icon_id, 1.0f, alpha, NULL, 0, size, 1); } void UI_icon_draw_preview(float x, float y, int icon_id, int nocreate) { - icon_draw_mipmap(x,y,icon_id, 1.0f, PREVIEW_MIPMAP_LARGE, nocreate); + icon_draw_mipmap(x, y, icon_id, 1.0f, 1.0f, PREVIEW_MIPMAP_LARGE, nocreate); } -void UI_icon_draw_aspect_blended(float x, float y, int icon_id, float aspect, int shade) -{ - if(shade < 0) { - float r= (128+shade)/128.0f; - glPixelTransferf(GL_ALPHA_SCALE, r); - } - - UI_icon_draw_aspect(x, y, icon_id, aspect); - - if(shade < 0) - glPixelTransferf(GL_ALPHA_SCALE, 1.0f); -} diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index 2e623114fe9..97bbee0a1c3 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -72,6 +72,7 @@ typedef enum { /* menus */ UI_WTYPE_MENU_RADIO, + UI_WTYPE_MENU_ICON_RADIO, UI_WTYPE_MENU_POINTER_LINK, UI_WTYPE_PULLDOWN, @@ -263,6 +264,9 @@ struct uiBlock { void *func_arg1; void *func_arg2; + uiButHandleNFunc funcN; + void *func_argN; + uiMenuHandleFunc butm_func; void *butm_func_arg; @@ -447,8 +451,8 @@ void ui_draw_menu_item(struct uiFontStyle *fstyle, rcti *rect, char *name, int i void uiStyleInit(void); /* interface_icons.c */ -void ui_id_icon_render(struct Scene *scene, struct ID *id); -int ui_id_icon_get(struct Scene *scene, struct ID *id); +void ui_id_icon_render(struct bContext *C, struct ID *id); +int ui_id_icon_get(struct bContext *C, struct ID *id); /* resources.c */ void init_userdef_do_versions(void); @@ -467,6 +471,8 @@ 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_copy_driver(struct bContext *C); +void ui_but_anim_paste_driver(struct bContext *C); void ui_but_anim_add_keyingset(struct bContext *C); void ui_but_anim_remove_keyingset(struct bContext *C); void ui_but_anim_menu(struct bContext *C, uiBut *but); diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index bf449dba597..e9160e0e416 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -480,7 +480,8 @@ static void ui_item_enum_row(uiLayout *layout, uiBlock *block, PointerRNA *ptr, static uiBut *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, int icon_only) { uiLayout *sub; - uiBut *but; + uiBut *but=NULL; + PropertyType type; PropertySubType subtype; int labelw; @@ -496,6 +497,7 @@ static uiBut *ui_item_with_label(uiLayout *layout, uiBlock *block, char *name, i w= w-labelw; } + type= RNA_property_type(prop); subtype= RNA_property_subtype(prop); if(subtype == PROP_FILEPATH || subtype == PROP_DIRPATH) { @@ -505,8 +507,10 @@ static uiBut *ui_item_with_label(uiLayout *layout, uiBlock *block, char *name, i /* BUTTONS_OT_file_browse calls uiFileBrowseContextProperty */ but= uiDefIconButO(block, BUT, "BUTTONS_OT_file_browse", WM_OP_INVOKE_DEFAULT, ICON_FILESEL, x, y, UI_UNIT_X, h, "Browse for file or directory."); } + else if(subtype == PROP_DIRECTION) + uiDefButR(block, BUT_NORMAL, 0, name, 0, 0, 100, 100, ptr, RNA_property_identifier(prop), index, 0, 0, -1, -1, NULL); else - but= uiDefAutoButR(block, ptr, prop, index, (icon_only)? "": NULL, icon, x, y, w, h); + but= uiDefAutoButR(block, ptr, prop, index, (type == PROP_ENUM && !icon_only)? NULL: "", icon, x, y, w, h); uiBlockSetCurLayout(block, layout); return but; @@ -529,7 +533,7 @@ void uiFileBrowseContextProperty(const bContext *C, PointerRNA *ptr, PropertyRNA prevbut= but->prev; /* find the button before the active one */ - if((but->flag & UI_BUT_LAST_ACTIVE) && prevbut && prevbut->rnapoin.id.data) { + if((but->flag & UI_BUT_LAST_ACTIVE) && prevbut && prevbut->rnapoin.data) { if(RNA_property_type(prevbut->rnaprop) == PROP_STRING) { *ptr= prevbut->rnapoin; *prop= prevbut->rnaprop; @@ -718,7 +722,7 @@ void uiItemEnumO_string(uiLayout *layout, char *name, int icon, char *opname, ch /* enum lookup */ if((prop= RNA_struct_find_property(&ptr, propname))) { RNA_property_enum_items(layout->root->block->evil_C, &ptr, prop, &item, NULL, &free); - if(RNA_enum_value_from_id(item, value_str, &value)==0) { + if(item==NULL || RNA_enum_value_from_id(item, value_str, &value)==0) { if(free) MEM_freeN(item); printf("uiItemEnumO_string: %s.%s, enum %s not found.\n", RNA_struct_identifier(ptr.type), propname, value_str); return; @@ -840,9 +844,6 @@ void uiItemFullR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, Proper char namestr[UI_MAX_NAME_STR]; int len, w, h, slider, toggle, expand, icon_only; - if(!ptr->data || !prop) - return; - uiBlockSetCurLayout(block, layout); /* retrieve info */ @@ -913,12 +914,7 @@ void uiItemFullR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, Proper void uiItemR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, char *propname, int flag) { - PropertyRNA *prop; - - if(!ptr->data || !propname) - return; - - prop= RNA_struct_find_property(ptr, propname); + PropertyRNA *prop= RNA_struct_find_property(ptr, propname); if(!prop) { ui_item_disabled(layout, propname); @@ -931,12 +927,7 @@ void uiItemR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, char *prop 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); + PropertyRNA *prop= RNA_struct_find_property(ptr, propname); if(!prop || RNA_property_type(prop) != PROP_ENUM) { ui_item_disabled(layout, propname); @@ -949,15 +940,10 @@ void uiItemEnumR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, void uiItemEnumR_string(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, char *value) { - PropertyRNA *prop; + PropertyRNA *prop= RNA_struct_find_property(ptr, propname); EnumPropertyItem *item; int ivalue, a, free; - if(!ptr->data || !propname) - return; - - prop= RNA_struct_find_property(ptr, propname); - if(!prop || RNA_property_type(prop) != PROP_ENUM) { ui_item_disabled(layout, propname); printf("uiItemEnumR: enum property not found: %s\n", propname); @@ -1035,7 +1021,6 @@ void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, char *propname) static void rna_search_cb(const struct bContext *C, void *arg_but, char *str, uiSearchItems *items) { - Scene *scene= CTX_data_scene(C); uiBut *but= arg_but; char *name; int i, iconid; @@ -1044,7 +1029,7 @@ static void rna_search_cb(const struct bContext *C, void *arg_but, char *str, ui RNA_PROP_BEGIN(&but->rnasearchpoin, itemptr, but->rnasearchprop) { iconid= 0; if(RNA_struct_is_ID(itemptr.type)) - iconid= ui_id_icon_get(scene, itemptr.data); + iconid= ui_id_icon_get((bContext*)C, itemptr.data); name= RNA_struct_name_get_alloc(&itemptr, NULL, 0); @@ -1107,7 +1092,7 @@ void ui_but_add_search(uiBut *but, PointerRNA *ptr, PropertyRNA *prop, PointerRN but->hardmax= MAX2(but->hardmax, 256); but->rnasearchpoin= *searchptr; but->rnasearchprop= searchprop; - but->flag |= UI_ICON_LEFT|UI_TEXT_LEFT; + but->flag |= UI_ICON_LEFT|UI_TEXT_LEFT|UI_BUT_UNDO; uiButSetSearchFunc(but, rna_search_cb, but, NULL, NULL); } @@ -1123,9 +1108,6 @@ void uiItemPointerR(uiLayout *layout, char *name, int icon, struct PointerRNA *p int w, h; /* validate arguments */ - if(!ptr->data || !searchptr->data) - return; - prop= RNA_struct_find_property(ptr, propname); if(!prop) { @@ -1200,8 +1182,10 @@ static void ui_item_menu(uiLayout *layout, char *name, int icon, uiMenuCreateFun if(layout->root->type == UI_LAYOUT_HEADER) /* ugly .. */ w -= 10; - if(icon) + if(name[0] && icon) but= uiDefIconTextMenuBut(block, func, arg, icon, (char*)name, 0, 0, w, h, ""); + else if(icon) + but= uiDefIconMenuBut(block, func, arg, icon, 0, 0, w, h, ""); else but= uiDefMenuBut(block, func, arg, (char*)name, 0, 0, w, h, ""); @@ -2227,18 +2211,13 @@ static void ui_item_layout(uiItem *item) } } -static void ui_layout_items(const bContext *C, uiBlock *block, uiLayout *layout) -{ - ui_item_estimate(&layout->item); - ui_item_layout(&layout->item); -} - -static void ui_layout_end(const bContext *C, uiBlock *block, uiLayout *layout, int *x, int *y) +static void ui_layout_end(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); + ui_item_estimate(&layout->item); + ui_item_layout(&layout->item); if(x) *x= layout->x; if(y) *y= layout->y; @@ -2346,7 +2325,7 @@ void uiLayoutSetFunc(uiLayout *layout, uiMenuHandleFunc handlefunc, void *argv) layout->root->argv= argv; } -void uiBlockLayoutResolve(const bContext *C, uiBlock *block, int *x, int *y) +void uiBlockLayoutResolve(uiBlock *block, int *x, int *y) { uiLayoutRoot *root; @@ -2357,7 +2336,7 @@ void uiBlockLayoutResolve(const bContext *C, uiBlock *block, int *x, int *y) 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_end(block, root->layout, x, y); ui_layout_free(root->layout); } diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 05001109b53..fa24aa72b9f 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -963,6 +963,7 @@ static void check_panel_overlap(ARegion *ar, Panel *panel) } } +#if 0 // XXX panel docking/tabbing code that's no longer used static void test_add_new_tabs(ARegion *ar) { Panel *pa, *pasel=NULL, *palap=NULL; @@ -990,6 +991,7 @@ static void test_add_new_tabs(ARegion *ar) } if(pasel==NULL || palap==NULL) return; + if(palap->type && palap->type->flag & PNL_NO_HEADER) return; /* the overlapped panel becomes a tab */ palap->paneltab= pasel; @@ -1015,6 +1017,7 @@ static void test_add_new_tabs(ARegion *ar) pa= pa->next; } } +#endif /************************ panel dragging ****************************/ @@ -1381,7 +1384,12 @@ static void panel_activate_state(const bContext *C, Panel *pa, uiHandlePanelStat if(state == PANEL_STATE_EXIT || state == PANEL_STATE_ANIMATION) { if(data && data->state != PANEL_STATE_ANIMATION) { - test_add_new_tabs(ar); // also copies locations of tabs in dragged panel + /* XXX: + * - the panel tabbing function call below (test_add_new_tabs()) has been commented out + * "It is too easy to do by accident when reordering panels, is very hard to control and use, and has no real benefit." - BillRey + * Aligorith, 2009Sep + */ + //test_add_new_tabs(ar); // also copies locations of tabs in dragged panel check_panel_overlap(ar, NULL); // clears } @@ -1399,14 +1407,14 @@ static void panel_activate_state(const bContext *C, Panel *pa, uiHandlePanelStat MEM_freeN(data); pa->activedata= NULL; - WM_event_remove_ui_handler(&win->handlers, ui_handler_panel, ui_handler_remove_panel, pa); + WM_event_remove_ui_handler(&win->modalhandlers, ui_handler_panel, ui_handler_remove_panel, pa); } else { if(!data) { data= MEM_callocN(sizeof(uiHandlePanelData), "uiHandlePanelData"); pa->activedata= data; - WM_event_add_ui_handler(C, &win->handlers, ui_handler_panel, ui_handler_remove_panel, pa); + WM_event_add_ui_handler(C, &win->modalhandlers, ui_handler_panel, ui_handler_remove_panel, pa); } if(ELEM(state, PANEL_STATE_ANIMATION, PANEL_STATE_DRAG)) diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 1d911fef418..0f04333c6c5 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -758,7 +758,7 @@ void ui_searchbox_update(bContext *C, ARegion *ar, uiBut *but, int reset) data->active= a+1; if(cpoin) cpoin[0]= '|'; } - if(data->items.totitem==1) + if(data->items.totitem==1 && but->editstr[0]) data->active= 1; } @@ -2192,7 +2192,7 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi block->direction= direction; - uiBlockLayoutResolve(C, block, NULL, NULL); + uiBlockLayoutResolve(block, NULL, NULL); if(pup->popup) { uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_NUMSELECT|UI_BLOCK_RET_1); @@ -2226,7 +2226,7 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi } block->minbounds= minwidth; - uiTextBoundsBlock(block, 40); + uiTextBoundsBlock(block, 50); } /* if menu slides out of other menu, override direction */ @@ -2275,7 +2275,7 @@ uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut if(!but) { handle->popup= 1; - UI_add_popup_handlers(C, &window->handlers, handle); + UI_add_popup_handlers(C, &window->modalhandlers, handle); WM_event_add_mousemove(C); } @@ -2332,7 +2332,7 @@ void uiPupMenuEnd(bContext *C, uiPopupMenu *pup) menu= ui_popup_block_create(C, NULL, NULL, NULL, ui_block_func_POPUP, pup); menu->popup= 1; - UI_add_popup_handlers(C, &window->handlers, menu); + UI_add_popup_handlers(C, &window->modalhandlers, menu); WM_event_add_mousemove(C); MEM_freeN(pup); @@ -2493,7 +2493,7 @@ void uiPupBlockO(bContext *C, uiBlockCreateFunc func, void *arg, char *opname, i handle->optype= (opname)? WM_operatortype_find(opname, 0): NULL; handle->opcontext= opcontext; - UI_add_popup_handlers(C, &window->handlers, handle); + UI_add_popup_handlers(C, &window->modalhandlers, handle); WM_event_add_mousemove(C); } @@ -2516,7 +2516,7 @@ void uiPupBlockOperator(bContext *C, uiBlockCreateFunc func, wmOperator *op, int handle->cancel_func= confirm_cancel_operator; handle->opcontext= opcontext; - UI_add_popup_handlers(C, &window->handlers, handle); + UI_add_popup_handlers(C, &window->modalhandlers, handle); WM_event_add_mousemove(C); } diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 2b7d6f383bf..57dc484f975 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -36,10 +36,11 @@ #include "BKE_icons.h" #include "BKE_global.h" #include "BKE_library.h" +#include "BKE_main.h" #include "BKE_utildefines.h" #include "ED_screen.h" -#include "ED_previewrender.h" +#include "ED_render.h" #include "RNA_access.h" @@ -75,7 +76,7 @@ typedef struct TemplateID { } TemplateID; /* Search browse menu, assign */ -static void id_search_call_cb(struct bContext *C, void *arg_template, void *item) +static void id_search_call_cb(bContext *C, void *arg_template, void *item) { TemplateID *template= (TemplateID*)arg_template; @@ -90,10 +91,9 @@ static void id_search_call_cb(struct bContext *C, void *arg_template, void *item } /* ID Search browse menu, do the search */ -static void id_search_cb(const struct bContext *C, void *arg_template, char *str, uiSearchItems *items) +static void id_search_cb(const bContext *C, void *arg_template, char *str, uiSearchItems *items) { TemplateID *template= (TemplateID*)arg_template; - Scene *scene= CTX_data_scene(C); ListBase *lb= template->idlb; ID *id; int iconid; @@ -101,7 +101,7 @@ static void id_search_cb(const struct bContext *C, void *arg_template, char *str /* ID listbase */ for(id= lb->first; id; id= id->next) { if(BLI_strcasestr(id->name+2, str)) { - iconid= ui_id_icon_get(scene, id); + iconid= ui_id_icon_get((bContext*)C, id); if(!uiSearchItemAdd(items, id->name+2, id, iconid)) break; @@ -291,7 +291,7 @@ static void template_ID(bContext *C, uiBlock *block, TemplateID *template, Struc int w= id?UI_UNIT_X: (flag & UI_ID_OPEN)? UI_UNIT_X*3: UI_UNIT_X*6; if(newop) { - but= uiDefIconTextButO(block, BUT, newop, WM_OP_INVOKE_REGION_WIN, ICON_ZOOMIN, (id)? "": "New", 0, 0, w, UI_UNIT_Y, NULL); + but= uiDefIconTextButO(block, BUT, newop, WM_OP_EXEC_REGION_WIN, ICON_ZOOMIN, (id)? "": "New", 0, 0, w, UI_UNIT_Y, NULL); uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ADD_NEW)); } else { @@ -344,9 +344,6 @@ void uiTemplateID(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname StructRNA *type; int flag; - if(!ptr->data) - return; - prop= RNA_struct_find_property(ptr, propname); if(!prop || RNA_property_type(prop) != PROP_POINTER) { @@ -407,10 +404,12 @@ void uiTemplateID(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname static void modifiers_setOnCage(bContext *C, void *ob_v, void *md_v) { Object *ob = ob_v; - ModifierData *md; - + ModifierData *md= md_v; int i, cageIndex = modifiers_getCageIndex(ob, NULL ); + /* undo button operation */ + md->mode ^= eModifierMode_OnCage; + for(i = 0, md=ob->modifiers.first; md; ++i, md=md->next) { if(md == md_v) { if(i >= cageIndex) @@ -519,9 +518,10 @@ static uiLayout *draw_modifier(uiLayout *layout, Object *ob, ModifierData *md, i /* XXX uiBlockSetEmboss(block, UI_EMBOSSR); */ if(ob->type==OB_MESH && modifier_couldBeCage(md) && index<=lastCageIndex) { - /* XXX uiBlockSetCol(block, color); */ - but = uiDefIconBut(block, BUT, 0, ICON_MESH_DATA, 0, 0, 16, 20, NULL, 0.0, 0.0, 0.0, 0.0, "Apply modifier to editing cage during Editmode"); + but = uiDefIconButBitI(block, TOG, eModifierMode_OnCage, 0, ICON_MESH_DATA, 0, 0, 16, 20, &md->mode, 0.0, 0.0, 0.0, 0.0, "Apply modifier to editing cage during Editmode"); + if(index < cageIndex) + uiButSetFlag(but, UI_BUT_DISABLED); uiButSetFunc(but, modifiers_setOnCage, ob, md); uiBlockEndAlign(block); /* XXX uiBlockSetCol(block, TH_AUTO); */ @@ -675,6 +675,8 @@ void do_constraint_panels(bContext *C, void *arg, int event) if(ob->type==OB_ARMATURE) DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB); else DAG_id_flush_update(&ob->id, OB_RECALC_OB); + + WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob); // XXX allqueue(REDRAWVIEW3D, 0); // XXX allqueue(REDRAWBUTSOBJECT, 0); @@ -686,19 +688,15 @@ static void constraint_active_func(bContext *C, void *ob_v, void *con_v) ED_object_constraint_set_active(ob_v, con_v); } -static void verify_constraint_name_func (bContext *C, void *con_v, void *name_v) +static void verify_constraint_name_func (bContext *C, void *con_v, void *dummy) { Object *ob= CTX_data_active_object(C); bConstraint *con= con_v; - char oldname[32]; if (!con) return; - /* put on the stack */ - BLI_strncpy(oldname, (char *)name_v, 32); - - ED_object_constraint_rename(ob, con, oldname); + ED_object_constraint_rename(ob, con, NULL); ED_object_constraint_set_active(ob, con); // XXX allqueue(REDRAWACTION, 0); } @@ -764,6 +762,22 @@ static void draw_constraint_spaceselect (uiBlock *block, bConstraint *con, short } } +static void test_obpoin_but(bContext *C, char *name, ID **idpp) +{ + ID *id; + + id= CTX_data_main(C)->object.first; + while(id) { + if( strcmp(name, id->name+2)==0 ) { + *idpp= id; + id_lib_extern(id); /* checks lib data, sets correct flag for saving then */ + return; + } + id= id->next; + } + *idpp= NULL; +} + /* draw panel showing settings for a constraint */ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con) { @@ -887,10 +901,11 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con) uiDefIconButO(block, BUT, "CONSTRAINT_OT_move_down", WM_OP_INVOKE_DEFAULT, VICON_MOVE_DOWN, xco+width-50+18, yco, 16, 18, "Move constraint down in constraint stack"); uiBlockEndAlign(block); } - - + /* Close 'button' - emboss calls here disable drawing of 'button' behind X */ uiBlockSetEmboss(block, UI_EMBOSSN); + uiDefIconButBitS(block, ICONTOGN, CONSTRAINT_OFF, B_CONSTRAINT_TEST, ICON_CHECKBOX_DEHLT, xco+243, yco, 19, 19, &con->flag, 0.0, 0.0, 0.0, 0.0, "enable/disable constraint"); + uiDefIconButO(block, BUT, "CONSTRAINT_OT_delete", WM_OP_INVOKE_DEFAULT, ICON_X, xco+262, yco, 19, 19, "Delete constraint"); uiBlockSetEmboss(block, UI_EMBOSS); } @@ -958,11 +973,11 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con) /* subtarget */ if (is_armature_target(ct->tar)) { but= uiDefBut(block, TEX, B_CONSTRAINT_CHANGETARGET, "BO:", xco+120, yco-(66+yoffset),150,18, &ct->subtarget, 0, 24, 0, 0, "Subtarget Bone"); - uiButSetCompleteFunc(but, autocomplete_bone, (void *)ct->tar); + //uiButSetCompleteFunc(but, autocomplete_bone, (void *)ct->tar); } else if (is_geom_target(ct->tar)) { but= uiDefBut(block, TEX, B_CONSTRAINT_CHANGETARGET, "VG:", xco+120, yco-(66+yoffset),150,18, &ct->subtarget, 0, 24, 0, 0, "Name of Vertex Group defining 'target' points"); - uiButSetCompleteFunc(but, autocomplete_vgroup, (void *)ct->tar); + //uiButSetCompleteFunc(but, autocomplete_vgroup, (void *)ct->tar); } else { strcpy(ct->subtarget, ""); @@ -1241,54 +1256,501 @@ void uiTemplatePreview(uiLayout *layout, ID *id, ID *parent, MTex *slot) /********************** ColorRamp Template **************************/ -void uiTemplateColorRamp(uiLayout *layout, ColorBand *coba, int expand) +#include "BKE_texture.h" + +typedef struct RNAUpdateCb { + PointerRNA ptr; + PropertyRNA *prop; +} RNAUpdateCb; + +static void rna_update_cb(bContext *C, void *arg_cb, void *arg_unused) +{ + RNAUpdateCb *cb= (RNAUpdateCb*)arg_cb; + + /* we call update here on the pointer property, this way the + owner of the curve mapping can still define it's own update + and notifier, even if the CurveMapping struct is shared. */ + RNA_property_update(C, &cb->ptr, cb->prop); +} + +#define B_BANDCOL 1 + +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 *cb_v, void *coba_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) { + coba->cur= a; + break; + } + } + + rna_update_cb(C, cb_v, NULL); +} + +static void colorband_add_cb(bContext *C, void *cb_v, void *coba_v) +{ + ColorBand *coba= coba_v; + + if(coba->tot < MAXCOLORBAND-1) coba->tot++; + coba->cur= coba->tot-1; + + colorband_pos_cb(C, cb_v, coba_v); + + ED_undo_push(C, "Add colorband"); +} + +static void colorband_del_cb(bContext *C, void *cb_v, void *coba_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--; + + ED_undo_push(C, "Delete colorband"); + + rna_update_cb(C, cb_v, NULL); +} + + +/* offset aligns from bottom, standard width 300, height 115 */ +static void colorband_buttons_large(uiBlock *block, ColorBand *coba, int xoffs, int yoffs, RNAUpdateCb *cb) +{ + + uiBut *bt; + + if(coba==NULL) return; + + bt= uiDefBut(block, BUT, 0, "Add", 0+xoffs,100+yoffs,50,20, 0, 0, 0, 0, 0, "Add a new color stop to the colorband"); + uiButSetNFunc(bt, colorband_add_cb, MEM_dupallocN(cb), coba); + + bt= uiDefBut(block, BUT, 0, "Delete", 60+xoffs,100+yoffs,50,20, 0, 0, 0, 0, 0, "Delete the active position"); + uiButSetNFunc(bt, colorband_del_cb, MEM_dupallocN(cb), coba); + + uiDefButS(block, NUM, 0, "", 120+xoffs,100+yoffs,80, 20, &coba->cur, 0.0, (float)(MAX2(0, coba->tot-1)), 0, 0, "Choose active color stop"); + + bt= uiDefButS(block, MENU, 0, "Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4", + 210+xoffs, 100+yoffs, 90, 20, &coba->ipotype, 0.0, 0.0, 0, 0, "Set interpolation between color stops"); + uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); + uiBlockEndAlign(block); + + bt= uiDefBut(block, BUT_COLORBAND, 0, "", xoffs,65+yoffs,300,30, coba, 0, 0, 0, 0, ""); + uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); + + if(coba->tot) { + CBData *cbd= coba->data + coba->cur; + + bt= uiDefButF(block, NUM, 0, "Pos:", 0+xoffs,40+yoffs,100, 20, &cbd->pos, 0.0, 1.0, 10, 0, "The position of the active color stop"); + uiButSetNFunc(bt, colorband_pos_cb, MEM_dupallocN(cb), coba); + bt= uiDefButF(block, COL, 0, "", 110+xoffs,40+yoffs,80,20, &(cbd->r), 0, 0, 0, B_BANDCOL, "The color value for the active color stop"); + uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); + bt= uiDefButF(block, NUMSLI, 0, "A ", 200+xoffs,40+yoffs,100,20, &cbd->a, 0.0, 1.0, 10, 0, "The alpha value of the active color stop"); + uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); + } + +} + +static void colorband_buttons_small(uiBlock *block, ColorBand *coba, rctf *butr, RNAUpdateCb *cb) +{ + uiBut *bt; + float unit= (butr->xmax-butr->xmin)/14.0f; + float xs= butr->xmin; + + + bt= uiDefBut(block, BUT, 0, "Add", xs,butr->ymin+20.0f,2.0f*unit,20, NULL, 0, 0, 0, 0, "Add a new color stop to the colorband"); + uiButSetNFunc(bt, colorband_add_cb, MEM_dupallocN(cb), coba); + bt= uiDefBut(block, BUT, 0, "Delete", xs+2.0f*unit,butr->ymin+20.0f,2.0f*unit,20, NULL, 0, 0, 0, 0, "Delete the active position"); + uiButSetNFunc(bt, colorband_del_cb, MEM_dupallocN(cb), coba); + + if(coba->tot) { + CBData *cbd= coba->data + coba->cur; + bt= uiDefButF(block, COL, 0, "", xs+4.0f*unit,butr->ymin+20.0f,2.0f*unit,20, &(cbd->r), 0, 0, 0, B_BANDCOL, "The color value for the active color stop"); + uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); + bt= uiDefButF(block, NUMSLI, 0, "A:", xs+6.0f*unit,butr->ymin+20.0f,4.0f*unit,20, &(cbd->a), 0.0f, 1.0f, 10, 2, "The alpha value of the active color stop"); + uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); + } + + bt= uiDefButS(block, MENU, 0, "Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4", + xs+10.0f*unit, butr->ymin+20.0f, unit*4, 20, &coba->ipotype, 0.0, 0.0, 0, 0, "Set interpolation between color stops"); + uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); + + bt= uiDefBut(block, BUT_COLORBAND, 0, "", xs,butr->ymin,butr->xmax-butr->xmin,20.0f, coba, 0, 0, 0, 0, ""); + uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); + + uiBlockEndAlign(block); +} + +static void colorband_buttons_layout(uiBlock *block, ColorBand *coba, rctf *butr, int small, RNAUpdateCb *cb) { + if(small) + colorband_buttons_small(block, coba, butr, cb); + else + colorband_buttons_large(block, coba, 0, 0, cb); +} + +void uiTemplateColorRamp(uiLayout *layout, PointerRNA *ptr, char *propname, int expand) +{ + PropertyRNA *prop= RNA_struct_find_property(ptr, propname); + PointerRNA cptr; + RNAUpdateCb *cb; uiBlock *block; rctf rect; - if(coba) { - rect.xmin= 0; rect.xmax= 200; - rect.ymin= 0; rect.ymax= 190; - - block= uiLayoutFreeBlock(layout); - colorband_buttons(block, coba, &rect, !expand); - } + if(!prop || RNA_property_type(prop) != PROP_POINTER) + return; + + cptr= RNA_property_pointer_get(ptr, prop); + if(!cptr.data || !RNA_struct_is_a(cptr.type, &RNA_ColorRamp)) + return; + + cb= MEM_callocN(sizeof(RNAUpdateCb), "RNAUpdateCb"); + cb->ptr= *ptr; + cb->prop= prop; + + rect.xmin= 0; rect.xmax= 200; + rect.ymin= 0; rect.ymax= 190; + + block= uiLayoutFreeBlock(layout); + colorband_buttons_layout(block, cptr.data, &rect, !expand, cb); + + MEM_freeN(cb); } /********************* CurveMapping Template ************************/ #include "DNA_color_types.h" +#include "BKE_colortools.h" -void uiTemplateCurveMapping(uiLayout *layout, CurveMapping *cumap, int type, int compact) +static void curvemap_buttons_zoom_in(bContext *C, void *cumap_v, void *unused) { - rctf rect; + CurveMapping *cumap = cumap_v; + float d; + + /* we allow 20 times zoom */ + if( (cumap->curr.xmax - cumap->curr.xmin) > 0.04f*(cumap->clipr.xmax - cumap->clipr.xmin) ) { + d= 0.1154f*(cumap->curr.xmax - cumap->curr.xmin); + cumap->curr.xmin+= d; + cumap->curr.xmax-= d; + d= 0.1154f*(cumap->curr.ymax - cumap->curr.ymin); + cumap->curr.ymin+= d; + cumap->curr.ymax-= d; + } - if(cumap) { - if(compact) { - rect.xmin= 0; rect.xmax= 150; - rect.ymin= 0; rect.ymax= 140; + ED_region_tag_redraw(CTX_wm_region(C)); +} + +static void curvemap_buttons_zoom_out(bContext *C, void *cumap_v, void *unused) +{ + CurveMapping *cumap = cumap_v; + float d, d1; + + /* we allow 20 times zoom, but dont view outside clip */ + if( (cumap->curr.xmax - cumap->curr.xmin) < 20.0f*(cumap->clipr.xmax - cumap->clipr.xmin) ) { + d= d1= 0.15f*(cumap->curr.xmax - cumap->curr.xmin); + + if(cumap->flag & CUMA_DO_CLIP) + if(cumap->curr.xmin-d < cumap->clipr.xmin) + d1= cumap->curr.xmin - cumap->clipr.xmin; + cumap->curr.xmin-= d1; + + d1= d; + if(cumap->flag & CUMA_DO_CLIP) + if(cumap->curr.xmax+d > cumap->clipr.xmax) + d1= -cumap->curr.xmax + cumap->clipr.xmax; + cumap->curr.xmax+= d1; + + d= d1= 0.15f*(cumap->curr.ymax - cumap->curr.ymin); + + if(cumap->flag & CUMA_DO_CLIP) + if(cumap->curr.ymin-d < cumap->clipr.ymin) + d1= cumap->curr.ymin - cumap->clipr.ymin; + cumap->curr.ymin-= d1; + + d1= d; + if(cumap->flag & CUMA_DO_CLIP) + if(cumap->curr.ymax+d > cumap->clipr.ymax) + d1= -cumap->curr.ymax + cumap->clipr.ymax; + cumap->curr.ymax+= d1; + } + + ED_region_tag_redraw(CTX_wm_region(C)); +} + +static void curvemap_buttons_setclip(bContext *C, void *cumap_v, void *unused) +{ + CurveMapping *cumap = cumap_v; + + curvemapping_changed(cumap, 0); +} + +static void curvemap_buttons_delete(bContext *C, void *cb_v, void *cumap_v) +{ + CurveMapping *cumap = cumap_v; + + curvemap_remove(cumap->cm+cumap->cur, SELECT); + curvemapping_changed(cumap, 0); + + rna_update_cb(C, cb_v, NULL); +} + +/* NOTE: this is a block-menu, needs 0 events, otherwise the menu closes */ +static uiBlock *curvemap_clipping_func(bContext *C, struct ARegion *ar, void *cumap_v) +{ + CurveMapping *cumap = cumap_v; + uiBlock *block; + uiBut *bt; + + 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, ""); + + bt= uiDefButBitI(block, TOG, CUMA_DO_CLIP, 1, "Use Clipping", + 0,100,120,18, &cumap->flag, 0.0, 0.0, 10, 0, ""); + uiButSetFunc(bt, curvemap_buttons_setclip, cumap, NULL); + + uiBlockBeginAlign(block); + uiDefButF(block, NUM, 0, "Min X ", 0,74,120,18, &cumap->clipr.xmin, -100.0, cumap->clipr.xmax, 10, 0, ""); + uiDefButF(block, NUM, 0, "Min Y ", 0,56,120,18, &cumap->clipr.ymin, -100.0, cumap->clipr.ymax, 10, 0, ""); + uiDefButF(block, NUM, 0, "Max X ", 0,38,120,18, &cumap->clipr.xmax, cumap->clipr.xmin, 100.0, 10, 0, ""); + uiDefButF(block, NUM, 0, "Max Y ", 0,20,120,18, &cumap->clipr.ymax, cumap->clipr.ymin, 100.0, 10, 0, ""); + + uiBlockSetDirection(block, UI_RIGHT); + + uiEndBlock(C, block); + return block; +} + +static void curvemap_tools_dofunc(bContext *C, void *cumap_v, int event) +{ + CurveMapping *cumap = cumap_v; + CurveMap *cuma= cumap->cm+cumap->cur; + + switch(event) { + case 0: + curvemap_reset(cuma, &cumap->clipr); + curvemapping_changed(cumap, 0); + break; + case 1: + cumap->curr= cumap->clipr; + break; + case 2: /* set vector */ + curvemap_sethandle(cuma, 1); + curvemapping_changed(cumap, 0); + break; + case 3: /* set auto */ + curvemap_sethandle(cuma, 0); + curvemapping_changed(cumap, 0); + break; + case 4: /* extend horiz */ + cuma->flag &= ~CUMA_EXTEND_EXTRAPOLATE; + curvemapping_changed(cumap, 0); + break; + case 5: /* extend extrapolate */ + cuma->flag |= CUMA_EXTEND_EXTRAPOLATE; + curvemapping_changed(cumap, 0); + break; + } + ED_region_tag_redraw(CTX_wm_region(C)); +} + +static uiBlock *curvemap_tools_func(bContext *C, struct ARegion *ar, void *cumap_v) +{ + uiBlock *block; + short yco= 0, menuwidth=120; + + 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, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Vector Handle", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Auto Handle", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Extend Horizontal", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Extend Extrapolated", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Reset Curve", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, ""); + + uiBlockSetDirection(block, UI_RIGHT); + uiTextBoundsBlock(block, 50); + + uiEndBlock(C, block); + return block; +} + +static void curvemap_buttons_redraw(bContext *C, void *arg1, void *arg2) +{ + ED_region_tag_redraw(CTX_wm_region(C)); +} + +static void curvemap_buttons_reset(bContext *C, void *cb_v, void *cumap_v) +{ + CurveMapping *cumap = cumap_v; + int a; + + for(a=0; a<CM_TOT; a++) + curvemap_reset(cumap->cm+a, &cumap->clipr); + + cumap->black[0]=cumap->black[1]=cumap->black[2]= 0.0f; + cumap->white[0]=cumap->white[1]=cumap->white[2]= 1.0f; + curvemapping_set_black_white(cumap, NULL, NULL); + + curvemapping_changed(cumap, 0); + + rna_update_cb(C, cb_v, NULL); +} + +/* still unsure how this call evolves... we use labeltype for defining what curve-channels to show */ +static void curvemap_buttons_layout(uiLayout *layout, PointerRNA *ptr, char labeltype, int levels, RNAUpdateCb *cb) +{ + CurveMapping *cumap= ptr->data; + uiLayout *row, *sub, *split; + uiBlock *block; + uiBut *bt; + float dx= UI_UNIT_X; + int icon, size; + + block= uiLayoutGetBlock(layout); + + /* curve chooser */ + row= uiLayoutRow(layout, 0); + + if(labeltype=='v') { + /* vector */ + sub= uiLayoutRow(row, 1); + uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_LEFT); + + if(cumap->cm[0].curve) { + bt= uiDefButI(block, ROW, 0, "X", 0, 0, dx, 16, &cumap->cur, 0.0, 0.0, 0.0, 0.0, ""); + uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL); } - else { - rect.xmin= 0; rect.xmax= 200; - rect.ymin= 0; rect.ymax= 190; + if(cumap->cm[1].curve) { + bt= uiDefButI(block, ROW, 0, "Y", 0, 0, dx, 16, &cumap->cur, 0.0, 1.0, 0.0, 0.0, ""); + uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL); + } + if(cumap->cm[2].curve) { + bt= uiDefButI(block, ROW, 0, "Z", 0, 0, dx, 16, &cumap->cur, 0.0, 2.0, 0.0, 0.0, ""); + uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL); + } + } + else if(labeltype=='c') { + /* color */ + sub= uiLayoutRow(row, 1); + uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_LEFT); + + if(cumap->cm[3].curve) { + bt= uiDefButI(block, ROW, 0, "C", 0, 0, dx, 16, &cumap->cur, 0.0, 3.0, 0.0, 0.0, ""); + uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL); + } + if(cumap->cm[0].curve) { + bt= uiDefButI(block, ROW, 0, "R", 0, 0, dx, 16, &cumap->cur, 0.0, 0.0, 0.0, 0.0, ""); + uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL); + } + if(cumap->cm[1].curve) { + bt= uiDefButI(block, ROW, 0, "G", 0, 0, dx, 16, &cumap->cur, 0.0, 1.0, 0.0, 0.0, ""); + uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL); + } + if(cumap->cm[2].curve) { + bt= uiDefButI(block, ROW, 0, "B", 0, 0, dx, 16, &cumap->cur, 0.0, 2.0, 0.0, 0.0, ""); + uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL); } - - curvemap_layout(layout, cumap, type, 0, 0, &rect); } + else + uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_RIGHT); + + /* operation buttons */ + sub= uiLayoutRow(row, 1); + + uiBlockSetEmboss(block, UI_EMBOSSN); + + bt= uiDefIconBut(block, BUT, 0, ICON_ZOOMIN, 0, 0, dx, 14, NULL, 0.0, 0.0, 0.0, 0.0, "Zoom in"); + uiButSetFunc(bt, curvemap_buttons_zoom_in, cumap, NULL); + + bt= uiDefIconBut(block, BUT, 0, ICON_ZOOMOUT, 0, 0, dx, 14, NULL, 0.0, 0.0, 0.0, 0.0, "Zoom out"); + uiButSetFunc(bt, curvemap_buttons_zoom_out, cumap, NULL); + + bt= uiDefIconBlockBut(block, curvemap_tools_func, cumap, 0, ICON_MODIFIER, 0, 0, dx, 18, "Tools"); + uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); + + if(cumap->flag & CUMA_DO_CLIP) icon= ICON_CLIPUV_HLT; else icon= ICON_CLIPUV_DEHLT; + bt= uiDefIconBlockBut(block, curvemap_clipping_func, cumap, 0, icon, 0, 0, dx, 18, "Clipping Options"); + uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); + + bt= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, dx, 18, NULL, 0.0, 0.0, 0.0, 0.0, "Delete points"); + uiButSetNFunc(bt, curvemap_buttons_delete, MEM_dupallocN(cb), cumap); + + uiBlockSetEmboss(block, UI_EMBOSS); + + uiBlockSetNFunc(block, rna_update_cb, MEM_dupallocN(cb), NULL); + + /* curve itself */ + size= uiLayoutGetWidth(layout); + row= uiLayoutRow(layout, 0); + uiDefBut(block, BUT_CURVE, 0, "", 0, 0, size, MIN2(size, 200), cumap, 0.0f, 1.0f, 0, 0, ""); + + /* black/white levels */ + if(levels) { + split= uiLayoutSplit(layout, 0); + uiItemR(uiLayoutColumn(split, 0), NULL, 0, ptr, "black_level", UI_ITEM_R_EXPAND); + uiItemR(uiLayoutColumn(split, 0), NULL, 0, ptr, "white_level", UI_ITEM_R_EXPAND); + + uiLayoutRow(layout, 0); + bt=uiDefBut(block, BUT, 0, "Reset", 0, 0, UI_UNIT_X*10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "Reset Black/White point and curves"); + uiButSetNFunc(bt, curvemap_buttons_reset, MEM_dupallocN(cb), cumap); + } + + uiBlockSetNFunc(block, NULL, NULL, NULL); +} + +void uiTemplateCurveMapping(uiLayout *layout, PointerRNA *ptr, char *propname, int type, int levels) +{ + RNAUpdateCb *cb; + PropertyRNA *prop= RNA_struct_find_property(ptr, propname); + PointerRNA cptr; + + if(!prop || RNA_property_type(prop) != PROP_POINTER) + return; + + cptr= RNA_property_pointer_get(ptr, prop); + if(!cptr.data || !RNA_struct_is_a(cptr.type, &RNA_CurveMapping)) + return; + + cb= MEM_callocN(sizeof(RNAUpdateCb), "RNAUpdateCb"); + cb->ptr= *ptr; + cb->prop= prop; + + curvemap_buttons_layout(layout, &cptr, type, levels, cb); + + MEM_freeN(cb); } /********************* TriColor (ThemeWireColorSet) Template ************************/ void uiTemplateTriColorSet(uiLayout *layout, PointerRNA *ptr, char *propname) { + PropertyRNA *prop= RNA_struct_find_property(ptr, propname); uiLayout *row; - PropertyRNA *prop; PointerRNA csPtr; - - if (!ptr->data) - return; - - prop= RNA_struct_find_property(ptr, propname); + if (!prop) { printf("uiTemplateTriColorSet: property not found: %s\n", propname); return; @@ -1319,9 +1781,6 @@ void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, char *propname) int groups, cols, layers; int group, col, layer, row; - if (!ptr->data) - return; - prop= RNA_struct_find_property(ptr, propname); if (!prop) { printf("uiTemplateLayer: layers property not found: %s\n", propname); @@ -1382,6 +1841,36 @@ static void list_item_add(ListBase *lb, ListBase *itemlb, uiLayout *layout, Poin } #endif +static int list_item_icon_get(bContext *C, PointerRNA *itemptr, int rnaicon) +{ + ID *id= NULL; + int icon; + + if(!itemptr->data) + return rnaicon; + + /* try ID, material or texture slot */ + if(RNA_struct_is_ID(itemptr->type)) { + id= itemptr->id.data; + } + else if(RNA_struct_is_a(itemptr->type, &RNA_MaterialSlot)) { + id= RNA_pointer_get(itemptr, "material").data; + } + else if(RNA_struct_is_a(itemptr->type, &RNA_TextureSlot)) { + id= RNA_pointer_get(itemptr, "texture").data; + } + + /* get icon from ID */ + if(id) { + icon= ui_id_icon_get(C, id); + + if(icon) + return icon; + } + + return rnaicon; +} + ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname, PointerRNA *activeptr, char *activepropname, int rows, int listtype) { //Scene *scene= CTX_data_scene(C); @@ -1394,7 +1883,7 @@ ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *pr Panel *pa; ListBase lb, *itemlb; char *name, str[32]; - int icon=0, i= 0, activei= 0, len= 0, items, found, min, max; + int rnaicon=0, icon=0, i= 0, activei= 0, len= 0, items, found, min, max; lb.first= lb.last= NULL; @@ -1441,7 +1930,7 @@ ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *pr /* get icon */ if(ptr->data && prop) { ptype= RNA_property_pointer_type(ptr, prop); - icon= RNA_struct_ui_icon(ptype); + rnaicon= RNA_struct_ui_icon(ptype); } /* get active data */ @@ -1461,15 +1950,7 @@ ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *pr if(i == 9) row= uiLayoutRow(col, 0); - if(RNA_struct_is_a(itemptr.type, &RNA_TextureSlot)) { -#if 0 - MTex *mtex= itemptr.data; - - if(mtex && mtex->tex) - icon= ui_id_icon_get(scene, &mtex->tex->id); -#endif - } - + icon= list_item_icon_get(C, &itemptr, rnaicon); uiDefIconButR(block, LISTROW, 0, icon, 0,0,UI_UNIT_X*10,UI_UNIT_Y, activeptr, activepropname, 0, 0, i, 0, 0, ""); //list_item_add(&lb, itemlb, uiLayoutRow(row, 1), &itemptr); @@ -1493,6 +1974,7 @@ ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *pr if(found) { /* create button */ name= RNA_struct_name_get_alloc(&itemptr, NULL, 0); + icon= list_item_icon_get(C, &itemptr, rnaicon); uiItemL(row, (name)? name: "", icon); if(name) @@ -1546,6 +2028,8 @@ ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *pr name= RNA_struct_name_get_alloc(&itemptr, NULL, 0); subrow= uiLayoutRow(col, 0); + + icon= list_item_icon_get(C, &itemptr, rnaicon); /* create button */ if(!icon || icon == ICON_DOT) @@ -1593,7 +2077,7 @@ ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *pr /************************* Operator Search Template **************************/ -static void operator_call_cb(struct bContext *C, void *arg1, void *arg2) +static void operator_call_cb(bContext *C, void *arg1, void *arg2) { wmOperatorType *ot= arg2; @@ -1601,14 +2085,14 @@ static void operator_call_cb(struct bContext *C, void *arg1, void *arg2) WM_operator_name_call(C, ot->idname, WM_OP_INVOKE_DEFAULT, NULL); } -static void operator_search_cb(const struct bContext *C, void *arg, char *str, uiSearchItems *items) +static void operator_search_cb(const bContext *C, void *arg, char *str, uiSearchItems *items) { wmOperatorType *ot = WM_operatortype_first(); for(; ot; ot= ot->next) { if(BLI_strcasestr(ot->name, str)) { - if(ot->poll==NULL || ot->poll((bContext *)C)) { + if(WM_operator_poll((bContext*)C, ot)) { char name[256]; int len= strlen(ot->name); @@ -1682,17 +2166,4 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C) uiDefIconTextBut(block, BUT, B_STOPANIM, ICON_REC, "Anim Player", 0,0,85,UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "Stop animation playback"); } -/************************* Image Template **************************/ - -#include "ED_image.h" - -void uiTemplateTextureImage(uiLayout *layout, bContext *C, Tex *tex) -{ - uiBlock *block; - - if(tex) { - block= uiLayoutFreeBlock(layout); - ED_image_uiblock_panel(C, block, &tex->ima, &tex->iuser, 0, 0); - } -} diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c index 63f81c9e46c..1d56ed4fb6a 100644 --- a/source/blender/editors/interface/interface_utils.c +++ b/source/blender/editors/interface/interface_utils.c @@ -23,30 +23,13 @@ * ***** END GPL LICENSE BLOCK ***** */ -#include <math.h> +#include <stdio.h> #include <stdlib.h> #include <string.h> -#include "MEM_guardedalloc.h" - -#include "DNA_action_types.h" -#include "DNA_color_types.h" -#include "DNA_listBase.h" -#include "DNA_material_types.h" #include "DNA_object_types.h" -#include "DNA_screen_types.h" -#include "DNA_texture_types.h" -#include "DNA_windowmanager_types.h" - -#include "BLI_blenlib.h" -#include "BKE_colortools.h" #include "BKE_context.h" -#include "BKE_idprop.h" -#include "BKE_icons.h" -#include "BKE_library.h" -#include "BKE_main.h" -#include "BKE_texture.h" #include "BKE_utildefines.h" #include "RNA_access.h" @@ -54,18 +37,6 @@ #include "UI_interface.h" #include "UI_resources.h" -#include "ED_screen.h" -#include "ED_util.h" - -#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 - /*************************** RNA Utilities ******************************/ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int index, char *name, int icon, int x1, int y1, int x2, int y2) @@ -102,7 +73,7 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind 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(prop) == PROP_PERCENTAGE) + else if(RNA_property_subtype(prop) == PROP_PERCENTAGE || RNA_property_subtype(prop) == PROP_FACTOR) 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); @@ -176,989 +147,38 @@ void uiDefAutoButsRNA(const bContext *C, uiLayout *layout, PointerRNA *ptr, int else col= NULL; - /* temp hack to show normal button for spin/screw */ - if(strcmp(name, "Axis")==0) { - uiDefButR(uiLayoutGetBlock(col), BUT_NORMAL, 0, name, 0, 0, 100, 100, ptr, "axis", -1, 0, 0, -1, -1, NULL); - } - else uiItemFullR(col, "", 0, ptr, prop, -1, 0, 0); + uiItemFullR(col, "", 0, ptr, prop, -1, 0, 0); } RNA_STRUCT_END; } /***************************** ID Utilities *******************************/ -/* note, C code version, will be replaced with version in interface_templates.c */ - -typedef struct uiIDPoinParams { - uiIDPoinFunc func; - ListBase *lb; - ID *id; - short id_code; - short browsenr; -} uiIDPoinParams; - -static void idpoin_cb(bContext *C, void *arg_params, void *arg_event) -{ - uiIDPoinParams *params= (uiIDPoinParams*)arg_params; - ListBase *lb= params->lb; - uiIDPoinFunc func= params->func; - ID *id= params->id, *idtest; - int nr, event= GET_INT_FROM_POINTER(arg_event); - - if(event == UI_ID_BROWSE && params->browsenr == 32767) - event= UI_ID_ADD_NEW; - else if(event == UI_ID_BROWSE && params->browsenr == 32766) - event= UI_ID_OPEN; - - switch(event) { - case UI_ID_RENAME: - if(id) test_idbutton(id->name+2); - else return; - break; - case UI_ID_BROWSE: { - /* ID can be NULL, if nothing was assigned yet */ - if(lb->first==NULL) return; - - if(params->browsenr== -2) { - /* 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; - } - if(params->browsenr < 0) - return; - - for(idtest=lb->first, nr=1; idtest; idtest=idtest->next, nr++) { - if(nr==params->browsenr) { - if(id == idtest) - return; - - id= idtest; - - break; - } - } - break; - } - 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; - case UI_ID_PIN: - break; - case UI_ID_ADD_NEW: - break; - case UI_ID_OPEN: - break; - 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; - } - - if(func) - func(C, id, event); -} - -/* ***************************** ID Search browse menu ********************** */ - -static void id_search_call_cb(struct bContext *C, void *arg_params, void *item) -{ - uiIDPoinParams *params= (uiIDPoinParams*)arg_params; - - if(item && params->func) - params->func(C, item, UI_ID_BROWSE); - -} - -static void id_search_cb(const struct bContext *C, void *arg_params, char *str, uiSearchItems *items) -{ - uiIDPoinParams *params= (uiIDPoinParams*)arg_params; - ID *id; - - for(id= params->lb->first; id; id= id->next) { - int iconid= 0; - - - /* icon */ - switch(GS(id->name)) - { - case ID_MA: /* fall through */ - case ID_TE: /* fall through */ - case ID_IM: /* fall through */ - case ID_WO: /* fall through */ - case ID_LA: /* fall through */ - iconid= BKE_icon_getid(id); - break; - default: - break; - } - - if(BLI_strcasestr(id->name+2, str)) { - if(0==uiSearchItemAdd(items, id->name+2, id, iconid)) - break; - } - } -} - -static uiBlock *id_search_menu(bContext *C, ARegion *ar, void *arg_params) -{ - static char search[256]; - static uiIDPoinParams params; - wmEvent event; - wmWindow *win= CTX_wm_window(C); - uiBlock *block; - uiBut *but; - - /* clear initial search string, then all items show */ - search[0]= 0; - /* params is malloced, can be freed by parent button */ - params= *((uiIDPoinParams*)arg_params); - - block= uiBeginBlock(C, ar, "_popup", UI_EMBOSS); - uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1); - - /* fake button, it holds space for search items */ - uiDefBut(block, LABEL, 0, "", 10, 15, 150, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL); - - but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, 256, 10, 0, 150, 19, ""); - uiButSetSearchFunc(but, id_search_cb, ¶ms, id_search_call_cb, NULL); - - uiBoundsBlock(block, 6); - uiBlockSetDirection(block, UI_DOWN); - uiEndBlock(C, block); - - event= *(win->eventstate); /* XXX huh huh? make api call */ - event.type= EVT_BUT_OPEN; - event.val= KM_PRESS; - event.customdata= but; - event.customdatafree= FALSE; - wm_event_add(win, &event); - - return block; -} - -/* ****************** */ - -int uiDefIDPoinButs(uiBlock *block, Main *bmain, ID *parid, ID *id, int id_code, short *pin_p, int x, int y, uiIDPoinFunc func, int events) -{ - uiBut *but; - uiIDPoinParams *params, *dup_params; - char str1[10]; - int len, add_addbutton=0; - - /* setup struct that we will pass on with the buttons */ - params= MEM_callocN(sizeof(uiIDPoinParams), "uiIDPoinParams"); - params->lb= wich_libbase(bmain, id_code); - params->id= id; - params->id_code= id_code; - params->func= func; - - /* create buttons */ - uiBlockBeginAlign(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"); - uiButSetNFunc(but, idpoin_cb, MEM_dupallocN(params), SET_INT_IN_POINTER(UI_ID_PIN)); - x+= DEF_ICON_BUT_WIDTH; - } - - /* browse menu */ - if(events & UI_ID_BROWSE) { - uiDefBlockButN(block, id_search_menu, MEM_dupallocN(params), "", x, y, DEF_ICON_BUT_WIDTH, DEF_BUT_HEIGHT, "Browse ID data"); - x+= DEF_ICON_BUT_WIDTH; - } - - - - /* text button with name */ - if(id) { - /* XXX solve? - if(id->us > 1) - uiBlockSetCol(block, TH_BUT_SETTING1); - */ - /* pinned data? - if((events & UI_ID_PIN) && *pin_p) - uiBlockSetCol(block, TH_BUT_SETTING2); - */ - /* redalert overrides pin color - if(id->us<=0) - uiBlockSetCol(block, TH_REDALERT); - */ - uiBlockSetButLock(block, id->lib!=0, "Can't edit external libdata"); - - /* name button */ - 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) - else if(y) len= 140; // comes from button panel - else len= 120; - - but= uiDefBut(block, TEX, 0, str1,x, y, (short)len, DEF_BUT_HEIGHT, id->name+2, 0.0, 21.0, 0, 0, "Displays current Datablock name. Click to change."); - uiButSetNFunc(but, idpoin_cb, MEM_dupallocN(params), SET_INT_IN_POINTER(UI_ID_RENAME)); - - x+= len; - - uiBlockClearButLock(block); - - /* lib make local button */ - if(id->lib) { - if(id->flag & LIB_INDIRECT) uiDefIconBut(block, BUT, 0, 0 /* XXX ICON_DATALIB */,x,y,DEF_ICON_BUT_WIDTH,DEF_BUT_HEIGHT, 0, 0, 0, 0, 0, "Indirect Library Datablock. Cannot change."); - else { - but= uiDefIconBut(block, BUT, 0, 0 /* XXX ICON_PARLIB */, x,y,DEF_ICON_BUT_WIDTH,DEF_BUT_HEIGHT, 0, 0, 0, 0, 0, - (events & UI_ID_LOCAL)? "Direct linked Library Datablock. Click to make local.": "Direct linked Library Datablock, cannot make local."); - uiButSetNFunc(but, idpoin_cb, MEM_dupallocN(params), SET_INT_IN_POINTER(UI_ID_ALONE)); - } - - x+= DEF_ICON_BUT_WIDTH; - } - - /* number of users / make local button */ - if((events & UI_ID_ALONE) && id->us>1) { - int butwidth; - - uiBlockSetButLock(block, (events & UI_ID_PIN) && *pin_p, "Can't make pinned data single-user"); - - sprintf(str1, "%d", id->us); - butwidth= (id->us<10)? DEF_ICON_BUT_WIDTH: DEF_ICON_BUT_WIDTH+10; - - but= uiDefBut(block, BUT, 0, str1, x, y, butwidth, DEF_BUT_HEIGHT, 0, 0, 0, 0, 0, "Displays number of users of this data. Click to make a single-user copy."); - uiButSetNFunc(but, idpoin_cb, MEM_dupallocN(params), SET_INT_IN_POINTER(UI_ID_ALONE)); - x+= butwidth; - - uiBlockClearButLock(block); - } - - /* add button */ - if(events & UI_ID_ADD_NEW) { - uiBlockSetButLock(block, (events & UI_ID_PIN) && *pin_p, "Can't unlink pinned data"); - if(parid && parid->lib); - else { - dup_params= MEM_dupallocN(params); - but= uiDefIconBut(block, BUT, 0, ICON_ZOOMIN, x,y,DEF_ICON_BUT_WIDTH,DEF_BUT_HEIGHT, &dup_params->browsenr, params->browsenr, 32767.0, 0, 0, "Add new data block"); - uiButSetNFunc(but, idpoin_cb, MEM_dupallocN(params), SET_INT_IN_POINTER(UI_ID_ADD_NEW)); - x+= DEF_ICON_BUT_WIDTH; - } - - uiBlockClearButLock(block); - } - - /* delete button */ - if(events & UI_ID_DELETE) { - uiBlockSetButLock(block, (events & UI_ID_PIN) && *pin_p, "Can't unlink pinned data"); - if(parid && parid->lib); - else { - but= uiDefIconBut(block, BUT, 0, ICON_X, x,y,DEF_ICON_BUT_WIDTH,DEF_BUT_HEIGHT, 0, 0, 0, 0, 0, "Deletes link to this Datablock"); - uiButSetNFunc(but, idpoin_cb, MEM_dupallocN(params), SET_INT_IN_POINTER(UI_ID_DELETE)); - x+= DEF_ICON_BUT_WIDTH; - } - - uiBlockClearButLock(block); - } - - /* auto name button */ - if(events & UI_ID_AUTO_NAME) { - if(parid && parid->lib); - else { - but= uiDefIconBut(block, BUT, 0, ICON_AUTO,x,y,DEF_ICON_BUT_WIDTH,DEF_BUT_HEIGHT, 0, 0, 0, 0, 0, "Generates an automatic name"); - uiButSetNFunc(but, idpoin_cb, MEM_dupallocN(params), SET_INT_IN_POINTER(UI_ID_AUTO_NAME)); - x+= DEF_ICON_BUT_WIDTH; - } - } - - /* fake user button */ - if(events & UI_ID_FAKE_USER) { - but= uiDefButBitS(block, TOG, LIB_FAKEUSER, 0, "F", x,y,DEF_ICON_BUT_WIDTH,DEF_BUT_HEIGHT, &id->flag, 0, 0, 0, 0, "Saves this datablock even if it has no users"); - uiButSetNFunc(but, idpoin_cb, MEM_dupallocN(params), SET_INT_IN_POINTER(UI_ID_FAKE_USER)); - x+= DEF_ICON_BUT_WIDTH; - } - } - /* add new button */ - else if(add_addbutton) { - 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"); - uiButSetNFunc(but, idpoin_cb, dup_params, SET_INT_IN_POINTER(UI_ID_ADD_NEW)); - x+= 110; - } - - uiBlockEndAlign(block); - - MEM_freeN(params); - - return x; -} - -/* ****************************** default button callbacks ******************* */ -/* ************ LEGACY WARNING, only to get things work with 2.48 code! ****** */ - -void test_idbutton_cb(struct bContext *C, void *namev, void *arg2) -{ - char *name= namev; - - test_idbutton(name+2); -} - - -void test_scriptpoin_but(struct bContext *C, char *name, ID **idpp) -{ - ID *id; - - id= CTX_data_main(C)->text.first; - while(id) { - if( strcmp(name, id->name+2)==0 ) { - *idpp= id; - return; - } - id= id->next; - } - *idpp= NULL; -} - -void test_actionpoin_but(struct bContext *C, char *name, ID **idpp) -{ - ID *id; - - id= CTX_data_main(C)->action.first; - while(id) { - if( strcmp(name, id->name+2)==0 ) { - id_us_plus(id); - *idpp= id; - return; - } - id= id->next; - } - *idpp= NULL; -} - - -void test_obpoin_but(struct bContext *C, char *name, ID **idpp) -{ - ID *id; - -// XXX if(idpp == (ID **)&(emptytex.object)) { -// error("You must add a texture first"); -// *idpp= 0; -// return; -// } - - id= CTX_data_main(C)->object.first; - while(id) { - if( strcmp(name, id->name+2)==0 ) { - *idpp= id; - id_lib_extern(id); /* checks lib data, sets correct flag for saving then */ - return; - } - id= id->next; - } - *idpp= NULL; -} - -/* tests for an object of type OB_MESH */ -void test_meshobpoin_but(struct bContext *C, char *name, ID **idpp) -{ - ID *id; - - id = CTX_data_main(C)->object.first; - while(id) { - Object *ob = (Object *)id; - if(ob->type == OB_MESH && strcmp(name, id->name + 2) == 0) { - *idpp = id; - /* checks lib data, sets correct flag for saving then */ - id_lib_extern(id); - return; - } - id = id->next; - } - *idpp = NULL; -} - -void test_meshpoin_but(struct bContext *C, char *name, ID **idpp) -{ - ID *id; - - if( *idpp ) (*idpp)->us--; - - id= CTX_data_main(C)->mesh.first; - while(id) { - if( strcmp(name, id->name+2)==0 ) { - *idpp= id; - id_us_plus(id); - return; - } - id= id->next; - } - *idpp= NULL; -} - -void test_matpoin_but(struct bContext *C, char *name, ID **idpp) -{ - ID *id; - - if( *idpp ) (*idpp)->us--; - - id= CTX_data_main(C)->mat.first; - while(id) { - if( strcmp(name, id->name+2)==0 ) { - *idpp= id; - id_us_plus(id); - return; - } - id= id->next; - } - *idpp= NULL; -} - -void test_scenepoin_but(struct bContext *C, char *name, ID **idpp) -{ - ID *id; - - if( *idpp ) (*idpp)->us--; - - id= CTX_data_main(C)->scene.first; - while(id) { - if( strcmp(name, id->name+2)==0 ) { - *idpp= id; - id_us_plus(id); - return; - } - id= id->next; - } - *idpp= NULL; -} - -void test_grouppoin_but(struct bContext *C, char *name, ID **idpp) -{ - ID *id; - - if( *idpp ) (*idpp)->us--; - - id= CTX_data_main(C)->group.first; - while(id) { - if( strcmp(name, id->name+2)==0 ) { - *idpp= id; - id_us_plus(id); - return; - } - id= id->next; - } - *idpp= NULL; -} -void test_texpoin_but(struct bContext *C, char *name, ID **idpp) +int uiIconFromID(ID *id) { - ID *id; - - if( *idpp ) (*idpp)->us--; - - id= CTX_data_main(C)->tex.first; - while(id) { - if( strcmp(name, id->name+2)==0 ) { - *idpp= id; - id_us_plus(id); - return; - } - id= id->next; - } - *idpp= NULL; -} - -void test_imapoin_but(struct bContext *C, char *name, ID **idpp) -{ - ID *id; - - if( *idpp ) (*idpp)->us--; - - id= CTX_data_main(C)->image.first; - while(id) { - if( strcmp(name, id->name+2)==0 ) { - *idpp= id; - id_us_plus(id); - return; - } - id= id->next; - } - *idpp= NULL; -} - -/* autocomplete callback for buttons */ -void autocomplete_bone(struct bContext *C, char *str, void *arg_v) -{ - Object *ob= (Object *)arg_v; - - if(ob==NULL || ob->pose==NULL) return; - - /* search if str matches the beginning of name */ - if(str[0]) { - AutoComplete *autocpl= autocomplete_begin(str, 32); - bPoseChannel *pchan; - - for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) - autocomplete_do_name(autocpl, pchan->name); - - autocomplete_end(autocpl, str); - } -} - -/* autocomplete callback for buttons */ -void autocomplete_vgroup(struct bContext *C, char *str, void *arg_v) -{ - Object *ob= (Object *)arg_v; - - if(ob==NULL) return; - - /* search if str matches the beginning of a name */ - if(str[0]) { - AutoComplete *autocpl= autocomplete_begin(str, 32); - bDeformGroup *dg; - - for(dg= ob->defbase.first; dg; dg= dg->next) - if(dg->name!=str) - autocomplete_do_name(autocpl, dg->name); - - autocomplete_end(autocpl, str); - } -} - - -/* ----------- custom button group ---------------------- */ - -static void curvemap_buttons_zoom_in(bContext *C, void *cumap_v, void *unused) -{ - CurveMapping *cumap = cumap_v; - float d; - - /* we allow 20 times zoom */ - if( (cumap->curr.xmax - cumap->curr.xmin) > 0.04f*(cumap->clipr.xmax - cumap->clipr.xmin) ) { - d= 0.1154f*(cumap->curr.xmax - cumap->curr.xmin); - cumap->curr.xmin+= d; - cumap->curr.xmax-= d; - d= 0.1154f*(cumap->curr.ymax - cumap->curr.ymin); - cumap->curr.ymin+= d; - cumap->curr.ymax-= d; - } -} - -static void curvemap_buttons_zoom_out(bContext *C, void *cumap_v, void *unused) -{ - CurveMapping *cumap = cumap_v; - float d, d1; - - /* we allow 20 times zoom, but dont view outside clip */ - if( (cumap->curr.xmax - cumap->curr.xmin) < 20.0f*(cumap->clipr.xmax - cumap->clipr.xmin) ) { - d= d1= 0.15f*(cumap->curr.xmax - cumap->curr.xmin); - - if(cumap->flag & CUMA_DO_CLIP) - if(cumap->curr.xmin-d < cumap->clipr.xmin) - d1= cumap->curr.xmin - cumap->clipr.xmin; - cumap->curr.xmin-= d1; - - d1= d; - if(cumap->flag & CUMA_DO_CLIP) - if(cumap->curr.xmax+d > cumap->clipr.xmax) - d1= -cumap->curr.xmax + cumap->clipr.xmax; - cumap->curr.xmax+= d1; - - d= d1= 0.15f*(cumap->curr.ymax - cumap->curr.ymin); - - if(cumap->flag & CUMA_DO_CLIP) - if(cumap->curr.ymin-d < cumap->clipr.ymin) - d1= cumap->curr.ymin - cumap->clipr.ymin; - cumap->curr.ymin-= d1; - - d1= d; - if(cumap->flag & CUMA_DO_CLIP) - if(cumap->curr.ymax+d > cumap->clipr.ymax) - d1= -cumap->curr.ymax + cumap->clipr.ymax; - cumap->curr.ymax+= d1; - } -} - -static void curvemap_buttons_setclip(bContext *C, void *cumap_v, void *unused) -{ - CurveMapping *cumap = cumap_v; - - curvemapping_changed(cumap, 0); -} - -static void curvemap_buttons_delete(bContext *C, void *cumap_v, void *unused) -{ - CurveMapping *cumap = cumap_v; - - curvemap_remove(cumap->cm+cumap->cur, SELECT); - curvemapping_changed(cumap, 0); -} - -/* NOTE: this is a block-menu, needs 0 events, otherwise the menu closes */ -static uiBlock *curvemap_clipping_func(struct bContext *C, struct ARegion *ar, void *cumap_v) -{ - CurveMapping *cumap = cumap_v; - uiBlock *block; - uiBut *bt; - - 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, ""); - - bt= uiDefButBitI(block, TOG, CUMA_DO_CLIP, 1, "Use Clipping", - 0,100,120,18, &cumap->flag, 0.0, 0.0, 10, 0, ""); - uiButSetFunc(bt, curvemap_buttons_setclip, cumap, NULL); - - uiBlockBeginAlign(block); - uiDefButF(block, NUM, 0, "Min X ", 0,74,120,18, &cumap->clipr.xmin, -100.0, cumap->clipr.xmax, 10, 0, ""); - uiDefButF(block, NUM, 0, "Min Y ", 0,56,120,18, &cumap->clipr.ymin, -100.0, cumap->clipr.ymax, 10, 0, ""); - uiDefButF(block, NUM, 0, "Max X ", 0,38,120,18, &cumap->clipr.xmax, cumap->clipr.xmin, 100.0, 10, 0, ""); - uiDefButF(block, NUM, 0, "Max Y ", 0,20,120,18, &cumap->clipr.ymax, cumap->clipr.ymin, 100.0, 10, 0, ""); - - uiBlockSetDirection(block, UI_RIGHT); - - uiEndBlock(C, block); - return block; -} - - -static void curvemap_tools_dofunc(bContext *C, void *cumap_v, int event) -{ - CurveMapping *cumap = cumap_v; - CurveMap *cuma= cumap->cm+cumap->cur; - - switch(event) { - case 0: - curvemap_reset(cuma, &cumap->clipr); - curvemapping_changed(cumap, 0); - break; - case 1: - cumap->curr= cumap->clipr; - break; - case 2: /* set vector */ - curvemap_sethandle(cuma, 1); - curvemapping_changed(cumap, 0); - break; - case 3: /* set auto */ - curvemap_sethandle(cuma, 0); - curvemapping_changed(cumap, 0); - break; - case 4: /* extend horiz */ - cuma->flag &= ~CUMA_EXTEND_EXTRAPOLATE; - curvemapping_changed(cumap, 0); - break; - case 5: /* extend extrapolate */ - cuma->flag |= CUMA_EXTEND_EXTRAPOLATE; - curvemapping_changed(cumap, 0); - break; - } - ED_region_tag_redraw(CTX_wm_region(C)); -} - -static uiBlock *curvemap_tools_func(struct bContext *C, struct ARegion *ar, void *cumap_v) -{ - uiBlock *block; - short yco= 0, menuwidth=120; - - 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, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Vector Handle", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Auto Handle", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Extend Horizontal", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Extend Extrapolated", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Reset Curve", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, ""); - - uiBlockSetDirection(block, UI_RIGHT); - uiTextBoundsBlock(block, 50); - - uiEndBlock(C, block); - return block; -} - -/* still unsure how this call evolves... we use labeltype for defining what curve-channels to show */ -void curvemap_buttons(uiBlock *block, CurveMapping *cumap, char labeltype, short event, short redraw, rctf *rect) -{ - uiBut *bt; - float dx, fy= rect->ymax-18.0f; - int icon; - short xco, yco; - - yco= (short)(rect->ymax-18.0f); - - /* curve choice options + tools/settings, 8 icons + spacer */ - dx= (rect->xmax-rect->xmin)/(9.0f); - - uiBlockBeginAlign(block); - if(labeltype=='v') { /* vector */ - xco= (short)rect->xmin; - if(cumap->cm[0].curve) - uiDefButI(block, ROW, redraw, "X", xco, yco+2, dx, 16, &cumap->cur, 0.0, 0.0, 0.0, 0.0, ""); - xco= (short)(rect->xmin+1.0f*dx); - if(cumap->cm[1].curve) - uiDefButI(block, ROW, redraw, "Y", xco, yco+2, dx, 16, &cumap->cur, 0.0, 1.0, 0.0, 0.0, ""); - xco= (short)(rect->xmin+2.0f*dx); - if(cumap->cm[2].curve) - uiDefButI(block, ROW, redraw, "Z", xco, yco+2, dx, 16, &cumap->cur, 0.0, 2.0, 0.0, 0.0, ""); - } - else if(labeltype=='c') { /* color */ - xco= (short)rect->xmin; - if(cumap->cm[3].curve) - uiDefButI(block, ROW, redraw, "C", xco, yco+2, dx, 16, &cumap->cur, 0.0, 3.0, 0.0, 0.0, ""); - xco= (short)(rect->xmin+1.0f*dx); - if(cumap->cm[0].curve) - uiDefButI(block, ROW, redraw, "R", xco, yco+2, dx, 16, &cumap->cur, 0.0, 0.0, 0.0, 0.0, ""); - xco= (short)(rect->xmin+2.0f*dx); - if(cumap->cm[1].curve) - uiDefButI(block, ROW, redraw, "G", xco, yco+2, dx, 16, &cumap->cur, 0.0, 1.0, 0.0, 0.0, ""); - xco= (short)(rect->xmin+3.0f*dx); - if(cumap->cm[2].curve) - uiDefButI(block, ROW, redraw, "B", xco, yco+2, dx, 16, &cumap->cur, 0.0, 2.0, 0.0, 0.0, ""); - } - /* else no channels ! */ - uiBlockEndAlign(block); - - xco= (short)(rect->xmin+4.5f*dx); - uiBlockSetEmboss(block, UI_EMBOSSN); - bt= uiDefIconBut(block, BUT, redraw, ICON_ZOOMIN, xco, yco, dx, 14, NULL, 0.0, 0.0, 0.0, 0.0, "Zoom in"); - uiButSetFunc(bt, curvemap_buttons_zoom_in, cumap, NULL); - - xco= (short)(rect->xmin+5.25f*dx); - bt= uiDefIconBut(block, BUT, redraw, ICON_ZOOMOUT, xco, yco, dx, 14, NULL, 0.0, 0.0, 0.0, 0.0, "Zoom out"); - uiButSetFunc(bt, curvemap_buttons_zoom_out, cumap, NULL); - - xco= (short)(rect->xmin+6.0f*dx); - bt= uiDefIconBlockBut(block, curvemap_tools_func, cumap, event, ICON_MODIFIER, xco, yco, dx, 18, "Tools"); - - xco= (short)(rect->xmin+7.0f*dx); - if(cumap->flag & CUMA_DO_CLIP) icon= ICON_CLIPUV_HLT; else icon= ICON_CLIPUV_DEHLT; - bt= uiDefIconBlockBut(block, curvemap_clipping_func, cumap, event, icon, xco, yco, dx, 18, "Clipping Options"); - - xco= (short)(rect->xmin+8.0f*dx); - bt= uiDefIconBut(block, BUT, event, ICON_X, xco, yco, dx, 18, NULL, 0.0, 0.0, 0.0, 0.0, "Delete points"); - uiButSetFunc(bt, curvemap_buttons_delete, cumap, NULL); - - uiBlockSetEmboss(block, UI_EMBOSS); - - uiDefBut(block, BUT_CURVE, event, "", - rect->xmin, rect->ymin, rect->xmax-rect->xmin, fy-rect->ymin, - cumap, 0.0f, 1.0f, 0, 0, ""); -} - -/* still unsure how this call evolves... we use labeltype for defining what curve-channels to show */ -void curvemap_layout(uiLayout *layout, CurveMapping *cumap, char labeltype, short event, short redraw, rctf *rect) -{ - uiLayout *row; - uiBlock *block; - uiBut *bt; - float dx, fy= rect->ymax-18.0f; - int icon; - - block= uiLayoutGetBlock(layout); - - /* curve choice options + tools/settings, 8 icons + spacer */ - dx= UI_UNIT_X; - - row= uiLayoutRow(layout, 0); - uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_RIGHT); - - if(labeltype=='v') { /* vector */ - row= uiLayoutRow(layout, 1); - - if(cumap->cm[0].curve) - uiDefButI(block, ROW, redraw, "X", 0, 0, dx, 16, &cumap->cur, 0.0, 0.0, 0.0, 0.0, ""); - if(cumap->cm[1].curve) - uiDefButI(block, ROW, redraw, "Y", 0, 0, dx, 16, &cumap->cur, 0.0, 1.0, 0.0, 0.0, ""); - if(cumap->cm[2].curve) - uiDefButI(block, ROW, redraw, "Z", 0, 0, dx, 16, &cumap->cur, 0.0, 2.0, 0.0, 0.0, ""); - } - else if(labeltype=='c') { /* color */ - row= uiLayoutRow(layout, 1); - - if(cumap->cm[3].curve) - uiDefButI(block, ROW, redraw, "C", 0, 0, dx, 16, &cumap->cur, 0.0, 3.0, 0.0, 0.0, ""); - if(cumap->cm[0].curve) - uiDefButI(block, ROW, redraw, "R", 0, 0, dx, 16, &cumap->cur, 0.0, 0.0, 0.0, 0.0, ""); - if(cumap->cm[1].curve) - uiDefButI(block, ROW, redraw, "G", 0, 0, dx, 16, &cumap->cur, 0.0, 1.0, 0.0, 0.0, ""); - if(cumap->cm[2].curve) - uiDefButI(block, ROW, redraw, "B", 0, 0, dx, 16, &cumap->cur, 0.0, 2.0, 0.0, 0.0, ""); - } - - row= uiLayoutRow(row, 1); + Object *ob; + PointerRNA ptr; + short idcode; - uiBlockSetEmboss(block, UI_EMBOSSN); - bt= uiDefIconBut(block, BUT, redraw, ICON_ZOOMIN, 0, 0, dx, 14, NULL, 0.0, 0.0, 0.0, 0.0, "Zoom in"); - uiButSetFunc(bt, curvemap_buttons_zoom_in, cumap, NULL); - - bt= uiDefIconBut(block, BUT, redraw, ICON_ZOOMOUT, 0, 0, dx, 14, NULL, 0.0, 0.0, 0.0, 0.0, "Zoom out"); - uiButSetFunc(bt, curvemap_buttons_zoom_out, cumap, NULL); - - bt= uiDefIconBlockBut(block, curvemap_tools_func, cumap, event, ICON_MODIFIER, 0, 0, dx, 18, "Tools"); - - if(cumap->flag & CUMA_DO_CLIP) icon= ICON_CLIPUV_HLT; else icon= ICON_CLIPUV_DEHLT; - bt= uiDefIconBlockBut(block, curvemap_clipping_func, cumap, event, icon, 0, 0, dx, 18, "Clipping Options"); + if(id==NULL) + return 0; - bt= uiDefIconBut(block, BUT, event, ICON_X, 0, 0, dx, 18, NULL, 0.0, 0.0, 0.0, 0.0, "Delete points"); - uiButSetFunc(bt, curvemap_buttons_delete, cumap, NULL); - - uiBlockSetEmboss(block, UI_EMBOSS); - - row= uiLayoutRow(layout, 0); - uiDefBut(block, BUT_CURVE, event, "", - rect->xmin, rect->ymin, rect->xmax-rect->xmin, fy-rect->ymin, - cumap, 0.0f, 1.0f, 0, 0, ""); -} - - -#define B_BANDCOL 1 - -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) { - // XXX if(coba->cur!=a) addqueue(curarea->win, REDRAW, 0); /* button cur */ - coba->cur= a; - break; - } - } + idcode= GS(id->name); - WM_event_add_notifier(C, NC_TEXTURE, NULL); -} - -static void colorband_cb(bContext *C, void *coba_v, void *unused_v) -{ - WM_event_add_notifier(C, NC_TEXTURE, NULL); -} + /* exception for objects */ + if(idcode == ID_OB) { + ob= (Object*)id; -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); - ED_undo_push(C, "Add colorband"); - WM_event_add_notifier(C, NC_TEXTURE, NULL); -} - -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(ob->type == OB_EMPTY) + return ICON_EMPTY_DATA; + else + return uiIconFromID(ob->data); } - if(coba->cur) coba->cur--; - coba->tot--; - - ED_undo_push(C, "Delete colorband"); - // XXX BIF_preview_changed(ID_TE); - WM_event_add_notifier(C, NC_TEXTURE, NULL); -} - - -/* offset aligns from bottom, standard width 300, height 115 */ -static void colorband_buttons_large(uiBlock *block, ColorBand *coba, int xoffs, int yoffs, int redraw) -{ - CBData *cbd; - uiBut *bt; - - if(coba==NULL) return; - - bt= uiDefBut(block, BUT, redraw, "Add", 0+xoffs,100+yoffs,50,20, 0, 0, 0, 0, 0, "Add a new color stop to the colorband"); - uiButSetFunc(bt, colorband_add_cb, coba, NULL); - bt= uiDefBut(block, BUT, redraw, "Delete", 60+xoffs,100+yoffs,50,20, 0, 0, 0, 0, 0, "Delete the active position"); - uiDefButS(block, NUM, redraw, "", 120+xoffs,100+yoffs,80, 20, &coba->cur, 0.0, (float)(coba->tot-1), 0, 0, "Choose active color stop"); - - uiButSetFunc(bt, colorband_del_cb, coba, NULL); - - bt= uiDefButS(block, MENU, redraw, "Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4", - 210+xoffs, 100+yoffs, 90, 20, &coba->ipotype, 0.0, 0.0, 0, 0, "Set interpolation between color stops"); - uiButSetFunc(bt, colorband_cb, coba, NULL); - uiBlockEndAlign(block); - bt= uiDefBut(block, BUT_COLORBAND, redraw, "", xoffs,65+yoffs,300,30, coba, 0, 0, 0, 0, ""); - uiButSetFunc(bt, colorband_cb, coba, NULL); - - cbd= coba->data + coba->cur; - - bt= uiDefButF(block, NUM, redraw, "Pos:", 0+xoffs,40+yoffs,100, 20, &cbd->pos, 0.0, 1.0, 10, 0, "The position of the active color stop"); - uiButSetFunc(bt, colorband_pos_cb, coba, NULL); - bt= uiDefButF(block, COL, redraw, "", 110+xoffs,40+yoffs,80,20, &(cbd->r), 0, 0, 0, B_BANDCOL, "The color value for the active color stop"); - uiButSetFunc(bt, colorband_cb, coba, NULL); - bt= uiDefButF(block, NUMSLI, redraw, "A ", 200+xoffs,40+yoffs,100,20, &cbd->a, 0.0, 1.0, 10, 0, "The alpha value of the active color stop"); - uiButSetFunc(bt, colorband_cb, coba, NULL); + /* otherwise get it through RNA, creating the pointer + will set the right type, also with subclassing */ + RNA_id_pointer_create(id, &ptr); -} - -static void colorband_buttons_small(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; - - - bt= uiDefBut(block, BUT, event, "Add", xs,butr->ymin+20.0f,2.0f*unit,20, NULL, 0, 0, 0, 0, "Add a new color stop to the colorband"); - uiButSetFunc(bt, colorband_add_cb, coba, NULL); - bt= uiDefBut(block, BUT, event, "Delete", xs+2.0f*unit,butr->ymin+20.0f,2.0f*unit,20, NULL, 0, 0, 0, 0, "Delete the active position"); - uiButSetFunc(bt, colorband_del_cb, coba, NULL); - - uiDefButF(block, COL, event, "", xs+4.0f*unit,butr->ymin+20.0f,2.0f*unit,20, &(cbd->r), 0, 0, 0, B_BANDCOL, "The color value for the active color stop"); - uiDefButF(block, NUMSLI, event, "A:", xs+6.0f*unit,butr->ymin+20.0f,4.0f*unit,20, &(cbd->a), 0.0f, 1.0f, 10, 2, "The alpha value of the active color stop"); - - 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, 20, &coba->ipotype, 0.0, 0.0, 0, 0, "Set interpolation between color stops"); - - uiDefBut(block, BUT_COLORBAND, event, "", xs,butr->ymin,butr->xmax-butr->xmin,20.0f, coba, 0, 0, 0, 0, ""); - uiBlockEndAlign(block); -} - -void colorband_buttons(uiBlock *block, ColorBand *coba, rctf *butr, int small) -{ - if(small) - colorband_buttons_small(block, coba, butr, 0); - else - colorband_buttons_large(block, coba, 0, 0, 0); + return (ptr.type)? RNA_struct_ui_icon(ptr.type): 0; } diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 2385b5ad15c..007a57fb67a 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -129,17 +129,21 @@ static float jit[8][2]= {{0.468813 , -0.481430}, {-0.155755 , -0.352820}, {0.219306 , -0.238501}, {-0.393286 , -0.110949}, {-0.024699 , 0.013908}, {0.343805 , 0.147431}, {-0.272855 , 0.269918}, {0.095909 , 0.388710}}; -static float num_tria_vert[19][2]= { +static float num_tria_vert[3][2]= { +{-0.352077, 0.532607}, {-0.352077, -0.549313}, {0.330000, -0.008353}}; + +static int num_tria_face[1][3]= { +{0, 1, 2}}; + +static float scroll_circle_vert[16][2]= { {0.382684, 0.923879}, {0.000001, 1.000000}, {-0.382683, 0.923880}, {-0.707107, 0.707107}, {-0.923879, 0.382684}, {-1.000000, 0.000000}, {-0.923880, -0.382684}, {-0.707107, -0.707107}, {-0.382683, -0.923880}, {0.000000, -1.000000}, {0.382684, -0.923880}, {0.707107, -0.707107}, -{0.923880, -0.382684}, {1.000000, -0.000000}, {0.923880, 0.382683}, {0.707107, 0.707107}, -{-0.352077, 0.532607}, {-0.352077, -0.549313}, {0.729843, -0.008353}}; +{0.923880, -0.382684}, {1.000000, -0.000000}, {0.923880, 0.382683}, {0.707107, 0.707107}}; -static int num_tria_face[19][3]= { -{13, 14, 18}, {17, 5, 6}, {12, 13, 18}, {17, 6, 7}, {15, 18, 14}, {16, 4, 5}, {16, 5, 17}, {18, 11, 12}, -{18, 17, 10}, {18, 10, 11}, {17, 9, 10}, {15, 0, 18}, {18, 0, 16}, {3, 4, 16}, {8, 9, 17}, {8, 17, 7}, -{2, 3, 16}, {1, 2, 16}, {16, 0, 1}}; +static int scroll_circle_face[14][3]= { +{0, 1, 2}, {2, 0, 3}, {3, 0, 15}, {3, 15, 4}, {4, 15, 14}, {4, 14, 5}, {5, 14, 13}, {5, 13, 6}, +{6, 13, 12}, {6, 12, 7}, {7, 12, 11}, {7, 11, 8}, {8, 11, 10}, {8, 10, 9}}; static float menu_tria_vert[6][2]= { {-0.41, 0.16}, {0.41, 0.16}, {0, 0.82}, @@ -451,15 +455,50 @@ static void widget_num_tria(uiWidgetTrias *tria, rcti *rect, float triasize, cha i2=0; i1= 1; } - for(a=0; a<19; a++) { + for(a=0; a<3; a++) { tria->vec[a][0]= sizex*num_tria_vert[a][i1] + centx; tria->vec[a][1]= sizey*num_tria_vert[a][i2] + centy; } - tria->tot= 19; + tria->tot= 1; tria->index= num_tria_face; } +static void widget_scroll_circle(uiWidgetTrias *tria, rcti *rect, float triasize, char where) +{ + float centx, centy, sizex, sizey, minsize; + int a, i1=0, i2=1; + + minsize= MIN2(rect->xmax-rect->xmin, rect->ymax-rect->ymin); + + /* center position and size */ + centx= (float)rect->xmin + 0.5f*minsize; + centy= (float)rect->ymin + 0.5f*minsize; + sizex= sizey= -0.5f*triasize*minsize; + + if(where=='r') { + centx= (float)rect->xmax - 0.5f*minsize; + sizex= -sizex; + } + else if(where=='t') { + centy= (float)rect->ymax - 0.5f*minsize; + sizey= -sizey; + i2=0; i1= 1; + } + else if(where=='b') { + sizex= -sizex; + i2=0; i1= 1; + } + + for(a=0; a<16; a++) { + tria->vec[a][0]= sizex*scroll_circle_vert[a][i1] + centx; + tria->vec[a][1]= sizey*scroll_circle_vert[a][i2] + centy; + } + + tria->tot= 14; + tria->index= scroll_circle_face; +} + static void widget_trias_draw(uiWidgetTrias *tria) { int a; @@ -658,7 +697,7 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol) /* 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) +static void widget_draw_icon(uiBut *but, BIFIconID icon, float alpha, rcti *rect) { int xs=0, ys=0; float aspect, height; @@ -685,7 +724,7 @@ static void widget_draw_icon(uiBut *but, BIFIconID icon, int blend, rcti *rect) if ELEM4(but->type, TOG, ROW, TOGN, LISTROW) { if(but->flag & UI_SELECT); else if(but->flag & UI_ACTIVE); - else blend= -60; + else alpha= 0.5f; } glEnable(GL_BLEND); @@ -718,14 +757,14 @@ static void widget_draw_icon(uiBut *but, BIFIconID icon, int blend, rcti *rect) ys= (rect->ymin+rect->ymax- height)/2; } - UI_icon_draw_aspect_blended(xs, ys, icon, aspect, blend); + UI_icon_draw_aspect(xs, ys, icon, aspect, alpha); } if(but->flag & UI_ICON_SUBMENU) { xs= rect->xmax-17; ys= (rect->ymin+rect->ymax- height)/2; - UI_icon_draw_aspect_blended(xs, ys, ICON_RIGHTARROW_THIN, aspect, blend); + UI_icon_draw_aspect(xs, ys, ICON_RIGHTARROW_THIN, aspect, alpha); } glDisable(GL_BLEND); @@ -734,7 +773,8 @@ static void widget_draw_icon(uiBut *but, BIFIconID icon, int blend, rcti *rect) /* 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; + int border= (but->flag & UI_BUT_ALIGN_RIGHT)? 8: 10; + int okwidth= rect->xmax-rect->xmin - border; /* need to set this first */ uiStyleFontSet(fstyle); @@ -803,11 +843,8 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b but->drawstr[selend_tmp]= ch; - /* if at pos 0, leave a bit more to the left */ - t= (pos == 0)? 0: 1; - glColor3ubv((unsigned char*)wcol->item); - glRects(rect->xmin+selsta_draw+1, rect->ymin+2, rect->xmin+selwidth_draw+1, rect->ymax-2); + glRects(rect->xmin+selsta_draw, rect->ymin+2, rect->xmin+selwidth_draw, rect->ymax-2); } } else { /* text cursor */ @@ -822,9 +859,6 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b but->drawstr[pos]= ch; } - /* if at pos 0, leave a bit more to the left */ - t += (pos == 0)? 0: 1; - glColor3ub(255,0,0); glRects(rect->xmin+t, rect->ymin+2, rect->xmin+t+2, rect->ymax-2); } @@ -868,7 +902,7 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB /* check for button text label */ if (but->type == ICONTEXTROW) { - widget_draw_icon(but, (BIFIconID) (but->icon+but->iconadd), 0, rect); + widget_draw_icon(but, (BIFIconID) (but->icon+but->iconadd), 1.0f, rect); } else { @@ -879,14 +913,14 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB else if(but->pointype==INT) dualset= BTST( *(((int *)but->poin)+1), but->bitnr); - widget_draw_icon(but, ICON_DOT, dualset?0:-100, rect); + widget_draw_icon(but, ICON_DOT, dualset?1.0f:0.25f, rect); } /* 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) { - widget_draw_icon(but, but->icon+but->iconadd, 0, rect); + widget_draw_icon(but, but->icon+but->iconadd, 1.0f, rect); rect->xmin += UI_icon_get_width(but->icon+but->iconadd); @@ -1736,12 +1770,12 @@ void uiWidgetScrollDraw(uiWidgetColors *wcol, rcti *rect, rcti *slider, int stat wcol->item[3]= 255; if(horizontal) { - widget_num_tria(&wtb.tria1, slider, 0.6f, 'l'); - widget_num_tria(&wtb.tria2, slider, 0.6f, 'r'); + widget_scroll_circle(&wtb.tria1, slider, 0.6f, 'l'); + widget_scroll_circle(&wtb.tria2, slider, 0.6f, 'r'); } else { - widget_num_tria(&wtb.tria1, slider, 0.6f, 'b'); - widget_num_tria(&wtb.tria2, slider, 0.6f, 't'); + widget_scroll_circle(&wtb.tria1, slider, 0.6f, 'b'); + widget_scroll_circle(&wtb.tria2, slider, 0.6f, 't'); } } widgetbase_draw(&wtb, wcol); @@ -1939,7 +1973,19 @@ static void widget_menubut(uiWidgetColors *wcol, rcti *rect, int state, int roun /* text space */ rect->xmax -= (rect->ymax-rect->ymin); +} + +static void widget_menuiconbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) +{ + uiWidgetBase wtb; + widget_init(&wtb); + + /* half rounded */ + round_box_edges(&wtb, roundboxalign, rect, 4.0f); + + /* decoration */ + widgetbase_draw(&wtb, wcol); } static void widget_pulldownbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) @@ -2175,13 +2221,17 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type) wt.wcol_theme= &btheme->tui.wcol_menu; wt.draw= widget_menubut; break; + + case UI_WTYPE_MENU_ICON_RADIO: + wt.wcol_theme= &btheme->tui.wcol_menu; + wt.draw= widget_menuiconbut; + 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; @@ -2371,7 +2421,10 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct case MENU: case BLOCK: case ICONTEXTROW: - wt= widget_type(UI_WTYPE_MENU_RADIO); + if(!but->str[0] && but->icon) + wt= widget_type(UI_WTYPE_MENU_ICON_RADIO); + else + wt= widget_type(UI_WTYPE_MENU_RADIO); break; case PULLDOWN: @@ -2528,7 +2581,7 @@ void ui_draw_menu_item(uiFontStyle *fstyle, rcti *rect, char *name, int iconid, int xs= rect->xmin+4; int ys= 1 + (rect->ymin+rect->ymax- ICON_HEIGHT)/2; glEnable(GL_BLEND); - UI_icon_draw_aspect_blended(xs, ys, iconid, 1.2f, 0); /* XXX scale weak get from fstyle? */ + UI_icon_draw_aspect(xs, ys, iconid, 1.2f, 0.5f); /* XXX scale weak get from fstyle? */ glDisable(GL_BLEND); } } diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index c54e09b2b40..87026bd1a5d 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -517,10 +517,12 @@ void ui_theme_init_userdef(void) /* space file */ /* to have something initialized */ btheme->tfile= btheme->tv3d; - SETCOL(btheme->tfile.back, 90, 90, 90, 255); + SETCOLF(btheme->tfile.back, 0.3, 0.3, 0.3, 1); + SETCOLF(btheme->tfile.panel, 0.3, 0.3, 0.3, 1); + SETCOLF(btheme->tfile.list, 0.4, 0.4, 0.4, 1); SETCOL(btheme->tfile.text, 250, 250, 250, 255); SETCOL(btheme->tfile.text_hi, 15, 15, 15, 255); - SETCOL(btheme->tfile.panel, 180, 180, 180, 255); // bookmark/ui regions + SETCOL(btheme->tfile.panel, 145, 145, 145, 255); // bookmark/ui regions SETCOL(btheme->tfile.active, 130, 130, 130, 255); // selected files SETCOL(btheme->tfile.hilite, 255, 140, 25, 255); // selected files @@ -604,11 +606,11 @@ void ui_theme_init_userdef(void) /* space node, 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 */ + SETCOL(btheme->tnode.syntaxl, 155, 155, 155, 160); /* TH_NODE, backdrop */ + SETCOL(btheme->tnode.syntaxn, 100, 100, 100, 255); /* in/output */ + SETCOL(btheme->tnode.syntaxb, 108, 105, 111, 255); /* operator */ + SETCOL(btheme->tnode.syntaxv, 104, 106, 117, 255); /* generator */ + SETCOL(btheme->tnode.syntaxc, 105, 117, 110, 255); /* group */ /* space logic */ btheme->tlogic= btheme->tv3d; diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index f9fb7a9306f..f7546e94f86 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -831,6 +831,7 @@ void UI_view2d_totRect_set_resize (View2D *v2d, int width, int height, int resiz height= abs(height); /* hrumf! */ + /* XXX: there are work arounds for this in the panel and file browse code. */ if(scroll & V2D_SCROLL_HORIZONTAL) width -= V2D_SCROLL_WIDTH; if(scroll & V2D_SCROLL_VERTICAL) @@ -973,8 +974,8 @@ void UI_view2d_view_ortho(const bContext *C, View2D *v2d) /* 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; + xofs= 0.001f*(v2d->cur.xmax - v2d->cur.xmin)/(v2d->mask.xmax - v2d->mask.xmin); + yofs= 0.001f*(v2d->cur.ymax - v2d->cur.ymin)/(v2d->mask.ymax - v2d->mask.ymin); /* apply mask-based adjustments to cur rect (due to scrollers), to eliminate scaling artifacts */ view2d_map_cur_using_mask(v2d, &curmasked); @@ -1351,7 +1352,7 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short vert= v2d->vert; hor= v2d->hor; - /* slider rects smaller than region */ + /* slider rects need to be smaller than region */ hor.xmin+=4; hor.xmax-=4; if (scroll & V2D_SCROLL_BOTTOM) @@ -1393,13 +1394,24 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short else scrollers->hor_max= (int)(hor.xmin + (fac2 * scrollsize)); + /* prevent inverted sliders */ if (scrollers->hor_min > scrollers->hor_max) scrollers->hor_min= scrollers->hor_max; + /* prevent sliders from being too small, and disappearing */ + if ((scrollers->hor_max - scrollers->hor_min) < V2D_SCROLLER_HANDLE_SIZE) { + scrollers->hor_max= scrollers->hor_min + V2D_SCROLLER_HANDLE_SIZE; + + if(scrollers->hor_max > hor.xmax) { + scrollers->hor_max= hor.xmax; + scrollers->hor_min= MAX2(scrollers->hor_max - V2D_SCROLLER_HANDLE_SIZE, hor.xmin); + } + } /* check whether sliders can disappear */ - if(v2d->keeptot) + if(v2d->keeptot) { if(fac1 <= 0.0f && fac2 >= 1.0f) scrollers->horfull= 1; + } } /* vertical scrollers */ @@ -1420,13 +1432,24 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short else scrollers->vert_max= (int)(vert.ymin + (fac2 * scrollsize)); + /* prevent inverted sliders */ if (scrollers->vert_min > scrollers->vert_max) scrollers->vert_min= scrollers->vert_max; + /* prevent sliders from being too small, and disappearing */ + if ((scrollers->vert_max - scrollers->vert_min) < V2D_SCROLLER_HANDLE_SIZE) { + scrollers->vert_max= scrollers->vert_min + V2D_SCROLLER_HANDLE_SIZE; + + if(scrollers->vert_max > vert.ymax) { + scrollers->vert_max= vert.ymax; + scrollers->vert_min= MAX2(scrollers->vert_max - V2D_SCROLLER_HANDLE_SIZE, vert.ymin); + } + } /* check whether sliders can disappear */ - if(v2d->keeptot) + if(v2d->keeptot) { if(fac1 <= 0.0f && fac2 >= 1.0f) scrollers->vertfull= 1; + } } /* grid markings on scrollbars */ @@ -1550,14 +1573,6 @@ static void scroll_printstr(View2DScrollers *scrollers, Scene *scene, float x, f BLF_draw_default(x, y, 0.0f, str); } -/* local defines for scrollers drawing */ - /* radius of scroller 'button' caps */ -#define V2D_SCROLLCAP_RAD 5 - /* shading factor for scroller 'bar' */ -#define V2D_SCROLLBAR_SHADE 0.1f - /* shading factor for scroller 'button' caps */ -#define V2D_SCROLLCAP_SHADE 0.2f - /* Draw scrollbars in the given 2d-region */ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *vs) { @@ -1571,7 +1586,7 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v /* horizontal scrollbar */ if (scroll & V2D_SCROLL_HORIZONTAL) { - + /* only draw scrollbar when it doesn't fill the entire space */ if(vs->horfull==0) { bTheme *btheme= U.themes.first; uiWidgetColors wcol= btheme->tui.wcol_scroll; @@ -1584,13 +1599,15 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v slider.ymax= hor.ymax; state= (v2d->scroll_ui & V2D_SCROLL_H_ACTIVE)?UI_SCROLL_PRESSED:0; + + // TODO: disable this for button regions... if (!(v2d->keepzoom & V2D_LOCKZOOM_X)) state |= UI_SCROLL_ARROWS; + uiWidgetScrollDraw(&wcol, &hor, &slider, state); } /* scale indicators */ - // XXX will need to update the font drawing when the new stuff comes in if ((scroll & V2D_SCROLL_SCALE_HORIZONTAL) && (vs->grid)) { View2DGrid *grid= vs->grid; float fac, dfac, fac2, val; @@ -1667,7 +1684,7 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v /* vertical scrollbar */ if (scroll & V2D_SCROLL_VERTICAL) { - + /* only draw scrollbar when it doesn't fill the entire space */ if(vs->vertfull==0) { bTheme *btheme= U.themes.first; uiWidgetColors wcol= btheme->tui.wcol_scroll; @@ -1680,14 +1697,16 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v slider.ymax= vs->vert_max; state= (v2d->scroll_ui & V2D_SCROLL_V_ACTIVE)?UI_SCROLL_PRESSED:0; - if (!(v2d->keepzoom & V2D_LOCKZOOM_Y)) + + // TODO: disable this for button regions... + if (!(v2d->keepzoom & V2D_LOCKZOOM_Y)) state |= UI_SCROLL_ARROWS; + uiWidgetScrollDraw(&wcol, &vert, &slider, state); } /* scale indiators */ - // XXX will need to update the font drawing when the new stuff comes in if ((scroll & V2D_SCROLL_SCALE_VERTICAL) && (vs->grid)) { View2DGrid *grid= vs->grid; float fac, dfac, val; diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 3e009884dee..0af5a5cac97 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -210,7 +210,7 @@ static int view_pan_invoke(bContext *C, wmOperator *op, wmEvent *event) WM_cursor_modal(window, BC_NSEW_SCROLLCURSOR); /* add temp handler */ - WM_event_add_modal_handler(C, &window->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } @@ -237,7 +237,7 @@ static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event) case LEFTMOUSE: case MIDDLEMOUSE: - if (event->val==0) { + if (event->val==KM_RELEASE) { /* calculate overall delta mouse-movement for redo */ RNA_int_set(op->ptr, "deltax", (vpd->startx - vpd->lastx)); RNA_int_set(op->ptr, "deltay", (vpd->starty - vpd->lasty)); @@ -764,7 +764,7 @@ static int view_zoomdrag_invoke(bContext *C, wmOperator *op, wmEvent *event) WM_cursor_modal(window, BC_NSEW_SCROLLCURSOR); /* add temp handler */ - WM_event_add_modal_handler(C, &window->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } @@ -836,7 +836,7 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, wmEvent *event) case LEFTMOUSE: case MIDDLEMOUSE: - if (event->val==0) { + if (event->val==KM_RELEASE) { /* for redo, store the overall deltas - need to respect zoom-locks here... */ if ((v2d->keepzoom & V2D_LOCKZOOM_X)==0) RNA_float_set(op->ptr, "deltax", vzd->dx); @@ -1244,7 +1244,7 @@ static int scroller_activate_modal(bContext *C, wmOperator *op, wmEvent *event) break; case LEFTMOUSE: - if (event->val==0) { + if (event->val==KM_RELEASE) { scroller_activate_exit(C, op); return OPERATOR_FINISHED; } @@ -1292,7 +1292,7 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event) v2d->scroll_ui |= V2D_SCROLL_V_ACTIVE; /* still ok, so can add */ - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } else { @@ -1409,7 +1409,7 @@ void ui_view2d_operatortypes(void) void UI_view2d_keymap(wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "View2D", 0, 0); + wmKeyMap *keymap= WM_keymap_find(wm, "View2D", 0, 0); /* pan/scroll */ WM_keymap_add_item(keymap, "VIEW2D_OT_pan", MIDDLEMOUSE, KM_PRESS, 0, 0); @@ -1445,7 +1445,7 @@ void UI_view2d_keymap(wmWindowManager *wm) 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); + keymap= WM_keymap_find(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); diff --git a/source/blender/editors/mesh/SConscript b/source/blender/editors/mesh/SConscript index df1f297698d..00391b3474a 100644 --- a/source/blender/editors/mesh/SConscript +++ b/source/blender/editors/mesh/SConscript @@ -8,4 +8,11 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' #/intern/guardedalloc ../../gpu' incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern' +if env['OURPLATFORM'] == 'linux2': + cflags='-pthread' + incs += ' ../../../extern/binreloc/include' + +if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): + incs += ' ' + env['BF_PTHREADS_INC'] + env.BlenderLib ( 'bf_editors_mesh', sources, Split(incs), [], libtype=['core'], priority=[45] ) diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c index 4c3e76f2285..28103828dd4 100644 --- a/source/blender/editors/mesh/editmesh_loop.c +++ b/source/blender/editors/mesh/editmesh_loop.c @@ -60,6 +60,7 @@ editmesh_loop: tools with own drawing subloops, select, knife, subdiv #include "BKE_library.h" #include "BKE_mesh.h" #include "BKE_object.h" +#include "BKE_report.h" #include "BKE_utildefines.h" #include "PIL_time.h" @@ -199,6 +200,7 @@ static void edgering_sel(EditMesh *em, EditEdge *startedge, int select, int prev } } } + void CutEdgeloop(Object *obedit, wmOperator *op, EditMesh *em, int numcuts) { ViewContext vc; // XXX @@ -636,6 +638,10 @@ static int knife_cut_exec(bContext *C, wmOperator *op) int len=0; short numcuts=1, mode= RNA_int_get(op->ptr, "type"); + /* edit-object needed for matrix, and ar->regiondata for projections to work */ + if (ELEM3(NULL, obedit, ar, ar->regiondata)) + return OPERATOR_CANCELLED; + if (EM_nvertices_selected(em) < 2) { error("No edges are selected to operate on"); BKE_mesh_end_editmesh(obedit->data, em); diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c index 7301901aff5..325a1aeec99 100644 --- a/source/blender/editors/mesh/editmesh_mods.c +++ b/source/blender/editors/mesh/editmesh_mods.c @@ -761,7 +761,7 @@ static int similar_face_select__internal(Scene *scene, EditMesh *em, int mode) float angle; for(efa= em->faces.first; efa; efa= efa->next) { if (!(efa->f & SELECT) && !efa->h) { - angle= VecAngle2(base_efa->n, efa->n); + angle= RAD2DEG(VecAngle2(base_efa->n, efa->n)); if (angle/180.0<=thresh) { EM_select_face(efa, 1); selcount++; @@ -776,7 +776,7 @@ static int similar_face_select__internal(Scene *scene, EditMesh *em, int mode) base_dot= Inpf(base_efa->cent, base_efa->n); for(efa= em->faces.first; efa; efa= efa->next) { if (!(efa->f & SELECT) && !efa->h) { - angle= VecAngle2(base_efa->n, efa->n); + angle= RAD2DEG(VecAngle2(base_efa->n, efa->n)); if (angle/180.0<=thresh) { dot=Inpf(efa->cent, base_efa->n); if (fabs(base_dot-dot) <= thresh) { @@ -916,7 +916,7 @@ static int similar_edge_select__internal(ToolSettings *ts, EditMesh *em, int mod else if (eed->f2==0) /* first access, assign the face */ eed->tmp.f= efa; else if (eed->f2==1) /* second, we assign the angle*/ - eed->tmp.fp= VecAngle2(eed->tmp.f->n, efa->n)/180; + eed->tmp.fp= RAD2DEG(VecAngle2(eed->tmp.f->n, efa->n))/180; eed->f2++; /* f2==0 no face assigned. f2==1 one face found. f2==2 angle calculated.*/ } j++; @@ -946,7 +946,7 @@ static int similar_edge_select__internal(ToolSettings *ts, EditMesh *em, int mod for(eed= em->edges.first; eed; eed= eed->next) { if (!(eed->f & SELECT) && !eed->h) { VecSubf(dir, eed->v1->co, eed->v2->co); - angle= VecAngle2(base_dir, dir); + angle= RAD2DEG(VecAngle2(base_dir, dir)); if (angle>90) /* use the smallest angle between the edges */ angle= fabs(angle-180.0f); @@ -1137,7 +1137,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op) float angle; for(eve= em->verts.first; eve; eve= eve->next) { if (!(eve->f & SELECT) && !eve->h) { - angle= VecAngle2(base_eve->no, eve->no); + angle= RAD2DEG(VecAngle2(base_eve->no, eve->no)); if (angle/180.0<=thresh) { eve->f |= SELECT; selcount++; @@ -2033,6 +2033,9 @@ static void mouse_mesh_loop(bContext *C, short mval[2], short extend, short ring vc.mval[0]= mval[0]; vc.mval[1]= mval[1]; em= vc.em; + + /* no afterqueue (yet), so we check it now, otherwise the em_xxxofs indices are bad */ + view3d_validate_backbuf(&vc); eed= findnearestedge(&vc, &dist); if(eed) { @@ -2110,6 +2113,9 @@ static void mouse_mesh_shortest_path(bContext *C, short mval[2]) vc.mval[1]= mval[1]; em= vc.em; + /* no afterqueue (yet), so we check it now, otherwise the em_xxxofs indices are bad */ + view3d_validate_backbuf(&vc); + eed= findnearestedge(&vc, &dist); if(eed) { Mesh *me= vc.obedit->data; @@ -3287,6 +3293,11 @@ void EM_toggle_select_all(EditMesh *em) /* exported for UV */ EM_set_flag_all(em, SELECT); } +void EM_select_all(EditMesh *em) +{ + EM_set_flag_all(em, SELECT); +} + static int toggle_select_all_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); @@ -3547,7 +3558,7 @@ void MESH_OT_select_random(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_float_percentage(ot->srna, "percent", 0.5f, 0.0f, 1.0f, "Percent", "Percentage of vertices to select randomly.", 0.0001f, 1.0f); + RNA_def_float_percentage(ot->srna, "percent", 50.0f, 0.0f, 100.0f, "Percent", "Percentage of vertices to select randomly.", 0.0001f, 1.0f); } void EM_select_by_material(EditMesh *em, int index) diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 5a4397256de..510f6ab464b 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -98,8 +98,6 @@ static void waitcursor(int val) {} static int pupmenu() {return 0;} static int qtest() {return 0;} #define add_numbut(a, b, c, d, e, f, g) {} -static int snap_sel_to_curs() {return 0;} -static int snap_to_center() {return 0;} /* XXX */ @@ -142,7 +140,7 @@ static int vergface(const void *v1, const void *v2) /* *********************************** */ -void convert_to_triface(EditMesh *em, int direction) +static void convert_to_triface(EditMesh *em, int direction) { EditFace *efa, *efan, *next; float fac; @@ -484,17 +482,16 @@ int removedoublesflag(EditMesh *em, short flag, short automerge, float limit) / static int removedoublesflag_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); - ToolSettings *ts= CTX_data_tool_settings(C); EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); - char msg[100]; - - int cnt = removedoublesflag(em,1,0,ts->doublimit); + /*char msg[100];*/ + int cnt = removedoublesflag(em,1,0,RNA_float_get(op->ptr, "limit")); + /*XXX this messes up last operator panel if(cnt) { sprintf(msg, "Removed %d vertices", cnt); BKE_report(op->reports, RPT_INFO, msg); - } + }*/ DAG_id_flush_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); @@ -516,6 +513,8 @@ void MESH_OT_remove_doubles(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + RNA_def_float(ot->srna, "limit", 0.0001f, 0.000001f, 50.0f, "Merge Threshold", "Minimum distance between merged verts", 0.00001f, 2.0f); } // XXX is this needed? @@ -3121,13 +3120,13 @@ static float measure_facepair(EditVert *v1, EditVert *v2, EditVert *v3, EditVert CalcNormFloat(v1->co, v3->co, v4->co, noA2); if(noA1[0] == noA2[0] && noA1[1] == noA2[1] && noA1[2] == noA2[2]) normalADiff = 0.0; - else normalADiff = VecAngle2(noA1, noA2); + else normalADiff = RAD2DEG(VecAngle2(noA1, noA2)); //if(!normalADiff) normalADiff = 179; CalcNormFloat(v2->co, v3->co, v4->co, noB1); CalcNormFloat(v4->co, v1->co, v2->co, noB2); if(noB1[0] == noB2[0] && noB1[1] == noB2[1] && noB1[2] == noB2[2]) normalBDiff = 0.0; - else normalBDiff = VecAngle2(noB1, noB2); + else normalBDiff = RAD2DEG(VecAngle2(noB1, noB2)); //if(!normalBDiff) normalBDiff = 179; measure += (normalADiff/360) + (normalBDiff/360); @@ -3142,10 +3141,10 @@ static float measure_facepair(EditVert *v1, EditVert *v2, EditVert *v3, EditVert diff = 0.0; diff = ( - fabs(VecAngle2(edgeVec1, edgeVec2) - 90) + - fabs(VecAngle2(edgeVec2, edgeVec3) - 90) + - fabs(VecAngle2(edgeVec3, edgeVec4) - 90) + - fabs(VecAngle2(edgeVec4, edgeVec1) - 90)) / 360; + fabs(RAD2DEG(VecAngle2(edgeVec1, edgeVec2)) - 90) + + fabs(RAD2DEG(VecAngle2(edgeVec2, edgeVec3)) - 90) + + fabs(RAD2DEG(VecAngle2(edgeVec3, edgeVec4)) - 90) + + fabs(RAD2DEG(VecAngle2(edgeVec4, edgeVec1)) - 90)) / 360; if(!diff) return 0.0; measure += diff; @@ -3868,11 +3867,11 @@ typedef struct SlideVert { EditVert origvert; } SlideVert; +#if 0 int EdgeSlide(EditMesh *em, wmOperator *op, short immediate, float imperc) { return 0; /* XXX REFACTOR - #if 0'd for now, otherwise can't make 64bit windows builds on 64bit machine */ -#if 0 useless: goto useless // because it doesn't do anything right now @@ -4654,11 +4653,12 @@ useless: } return 1; -#endif // END OF XXX } +#endif // END OF XXX int EdgeLoopDelete(EditMesh *em, wmOperator *op) { +#if 0 //XXX won't work with new edgeslide /* temporal flag setting so we keep UVs when deleting edge loops, * this is a bit of a hack but it works how you would want in almost all cases */ @@ -4677,6 +4677,8 @@ int EdgeLoopDelete(EditMesh *em, wmOperator *op) EM_select_flush(em); // DAG_id_flush_update(obedit->data, OB_RECALC_DATA); return 1; +#endif + return 0; } @@ -5635,7 +5637,7 @@ static void collapseuvs(EditMesh *em, EditVert *mergevert) } } -int collapseEdges(EditMesh *em) +static int collapseEdges(EditMesh *em) { EditVert *eve; EditEdge *eed; @@ -5701,7 +5703,7 @@ int collapseEdges(EditMesh *em) return mergecount; } -int merge_firstlast(EditMesh *em, int first, int uvmerge) +static int merge_firstlast(EditMesh *em, int first, int uvmerge) { EditVert *eve,*mergevert; EditSelection *ese; @@ -5735,13 +5737,59 @@ int merge_firstlast(EditMesh *em, int first, int uvmerge) return removedoublesflag(em, 1, 0, MERGELIMIT); } -int merge_target(EditMesh *em, int target, int uvmerge) +static void em_snap_to_center(EditMesh *em) +{ + EditVert *eve; + float cent[3] = {0.0f, 0.0f, 0.0f}; + int i=0; + + for (eve=em->verts.first; eve; eve=eve->next) { + if (eve->f & SELECT) { + VecAddf(cent, cent, eve->co); + i++; + } + } + + if (!i) + return; + + VecMulf(cent, 1.0f / (float)i); + + for (eve=em->verts.first; eve; eve=eve->next) { + if (eve->f & SELECT) { + VECCOPY(eve->co, cent); + } + } +} + +static void em_snap_to_cursor(EditMesh *em, bContext *C) +{ + Scene *scene = CTX_data_scene(C); + Object *ob= CTX_data_edit_object(C); + View3D *v3d = CTX_wm_view3d(C); + EditVert *eve; + float co[3], *vco, invmat[4][4]; + + Mat4Invert(invmat, ob->obmat); + + vco = give_cursor(scene, v3d); + VECCOPY(co, vco); + Mat4MulVecfl(invmat, co); + + for (eve=em->verts.first; eve; eve=eve->next) { + if (eve->f & SELECT) { + VECCOPY(eve->co, co); + } + } +} + +static int merge_target(bContext *C, EditMesh *em, int target, int uvmerge) { EditVert *eve; // XXX not working - if(target) snap_sel_to_curs(); - else snap_to_center(); + if(target) em_snap_to_cursor(em, C); + else em_snap_to_center(em); if(uvmerge && CustomData_has_layer(&em->fdata, CD_MTFACE)){ for(eve=em->verts.first; eve; eve=eve->next) eve->f1 = 0; @@ -5763,10 +5811,10 @@ static int merge_exec(bContext *C, wmOperator *op) switch(RNA_enum_get(op->ptr, "type")) { case 3: - count = merge_target(em, 0, uvs); + count = merge_target(C, em, 0, uvs); break; case 4: - count = merge_target(em, 1, uvs); + count = merge_target(C, em, 1, uvs); break; case 1: count = merge_firstlast(em, 0, uvs); @@ -5774,7 +5822,7 @@ static int merge_exec(bContext *C, wmOperator *op) case 6: count = merge_firstlast(em, 1, uvs); break; - case 2: + case 5: count = collapseEdges(em); break; } @@ -5878,7 +5926,7 @@ typedef struct PathEdge { #define PATH_SELECT_EDGE_LENGTH 0 #define PATH_SELECT_TOPOLOGICAL 1 -int select_vertex_path_exec(bContext *C, wmOperator *op) +static int select_vertex_path_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); @@ -7091,7 +7139,7 @@ void MESH_OT_edge_flip(wmOperatorType *ot) /********************** Smooth/Solid Operators *************************/ -void mesh_set_smooth_faces(EditMesh *em, short smooth) +static void mesh_set_smooth_faces(EditMesh *em, short smooth) { EditFace *efa; diff --git a/source/blender/editors/mesh/loopcut.c b/source/blender/editors/mesh/loopcut.c new file mode 100644 index 00000000000..e58025ac6ce --- /dev/null +++ b/source/blender/editors/mesh/loopcut.c @@ -0,0 +1,474 @@ +/** + * $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) 2007 Blender Foundation. + * All rights reserved. + * + * + * Contributor(s): Joseph Eagar, Joshua Leung + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include <float.h> +#define _USE_MATH_DEFINES +#include <math.h> +#include <string.h> +#include <ctype.h> +#include <stdio.h> + +#include "DNA_ID.h" +#include "DNA_screen_types.h" +#include "DNA_scene_types.h" +#include "DNA_userdef_types.h" +#include "DNA_windowmanager_types.h" +#include "DNA_object_types.h" + +#include "MEM_guardedalloc.h" + +#include "PIL_time.h" + +#include "BLI_blenlib.h" +#include "BLI_dynstr.h" /*for WM_operator_pystring */ +#include "BLI_editVert.h" + +#include "BKE_blender.h" +#include "BKE_context.h" +#include "BKE_depsgraph.h" +#include "BKE_scene.h" +#include "BKE_utildefines.h" +#include "BKE_mesh.h" + +#include "BIF_gl.h" +#include "BIF_glutil.h" /* for paint cursor */ + +#include "IMB_imbuf_types.h" + +#include "ED_screen.h" +#include "ED_util.h" +#include "ED_space_api.h" +#include "ED_view3d.h" +#include "ED_mesh.h" + +#include "RNA_access.h" +#include "RNA_define.h" + +#include "UI_interface.h" +#include "UI_resources.h" + +#include "WM_api.h" +#include "WM_types.h" + +#include "mesh_intern.h" + +/* ringsel operator */ + +/* struct for properties used while drawing */ +typedef struct tringselOpData { + ARegion *ar; /* region that ringsel was activated in */ + void *draw_handle; /* for drawing preview loop */ + + float (*edges)[2][3]; + int totedge; + + ViewContext vc; + + Object *ob; + EditMesh *em; + EditEdge *eed; + + int extend; + int do_cut; +} tringselOpData; + +/* modal loop selection drawing callback */ +static void ringsel_draw(const bContext *C, ARegion *ar, void *arg) +{ + int i; + tringselOpData *lcd = arg; + + glDisable(GL_DEPTH_TEST); + + glPushMatrix(); + glMultMatrixf(lcd->ob->obmat); + + glColor3ub(255, 0, 255); + glBegin(GL_LINES); + for (i=0; i<lcd->totedge; i++) { + glVertex3fv(lcd->edges[i][0]); + glVertex3fv(lcd->edges[i][1]); + } + glEnd(); + + glPopMatrix(); + glEnable(GL_DEPTH_TEST); +} + +static void edgering_sel(tringselOpData *lcd, int previewlines, int select) +{ + EditMesh *em = lcd->em; + EditEdge *startedge = lcd->eed; + EditEdge *eed; + EditFace *efa; + EditVert *v[2][2]; + float (*edges)[2][3] = NULL; + V_DYNDECLARE(edges); + float co[2][3]; + int looking=1, i, tot=0; + + if (!startedge) + return; + + if (lcd->edges) { + MEM_freeN(lcd->edges); + lcd->edges = NULL; + lcd->totedge = 0; + } + + if (!lcd->extend) { + EM_clear_flag_all(lcd->em, SELECT); + } + + /* in eed->f1 we put the valence (amount of faces in edge) */ + /* in eed->f2 we put tagged flag as correct loop */ + /* in efa->f1 we put tagged flag as correct to select */ + + for(eed= em->edges.first; eed; eed= eed->next) { + eed->f1= 0; + eed->f2= 0; + } + + for(efa= em->faces.first; efa; efa= efa->next) { + efa->f1= 0; + if(efa->h==0) { + efa->e1->f1++; + efa->e2->f1++; + efa->e3->f1++; + if(efa->e4) efa->e4->f1++; + } + } + + // tag startedge OK + startedge->f2= 1; + + while(looking) { + looking= 0; + + for(efa= em->faces.first; efa; efa= efa->next) { + if(efa->e4 && efa->f1==0 && efa->h == 0) { // not done quad + if(efa->e1->f1<=2 && efa->e2->f1<=2 && efa->e3->f1<=2 && efa->e4->f1<=2) { // valence ok + + // if edge tagged, select opposing edge and mark face ok + if(efa->e1->f2) { + efa->e3->f2= 1; + efa->f1= 1; + looking= 1; + } + else if(efa->e2->f2) { + efa->e4->f2= 1; + efa->f1= 1; + looking= 1; + } + if(efa->e3->f2) { + efa->e1->f2= 1; + efa->f1= 1; + looking= 1; + } + if(efa->e4->f2) { + efa->e2->f2= 1; + efa->f1= 1; + looking= 1; + } + } + } + } + } + + if(previewlines > 0 && !select){ + for(efa= em->faces.first; efa; efa= efa->next) { + if(efa->v4 == NULL) { continue; } + if(efa->h == 0){ + if(efa->e1->f2 == 1){ + if(efa->e1->h == 1 || efa->e3->h == 1 ) + continue; + + v[0][0] = efa->v1; + v[0][1] = efa->v2; + v[1][0] = efa->v4; + v[1][1] = efa->v3; + } else if(efa->e2->f2 == 1){ + if(efa->e2->h == 1 || efa->e4->h == 1) + continue; + v[0][0] = efa->v2; + v[0][1] = efa->v3; + v[1][0] = efa->v1; + v[1][1] = efa->v4; + } else { continue; } + + for(i=1;i<=previewlines;i++){ + co[0][0] = (v[0][1]->co[0] - v[0][0]->co[0])*(i/((float)previewlines+1))+v[0][0]->co[0]; + co[0][1] = (v[0][1]->co[1] - v[0][0]->co[1])*(i/((float)previewlines+1))+v[0][0]->co[1]; + co[0][2] = (v[0][1]->co[2] - v[0][0]->co[2])*(i/((float)previewlines+1))+v[0][0]->co[2]; + + co[1][0] = (v[1][1]->co[0] - v[1][0]->co[0])*(i/((float)previewlines+1))+v[1][0]->co[0]; + co[1][1] = (v[1][1]->co[1] - v[1][0]->co[1])*(i/((float)previewlines+1))+v[1][0]->co[1]; + co[1][2] = (v[1][1]->co[2] - v[1][0]->co[2])*(i/((float)previewlines+1))+v[1][0]->co[2]; + + V_GROW(edges); + VECCOPY(edges[tot][0], co[0]); + VECCOPY(edges[tot][1], co[1]); + tot++; + } + } + } + } else { + select = (startedge->f & SELECT) == 0; + + /* select the edges */ + for(eed= em->edges.first; eed; eed= eed->next) { + if(eed->f2) EM_select_edge(eed, select); + } + } + + lcd->edges = edges; + lcd->totedge = tot; +} + +static void ringsel_find_edge(tringselOpData *lcd, const bContext *C, ARegion *ar, int cuts) +{ + if (lcd->eed) + edgering_sel(lcd, cuts, 0); +} + +static void ringsel_finish(bContext *C, wmOperator *op) +{ + tringselOpData *lcd= op->customdata; + int cuts= RNA_int_get(op->ptr,"number_cuts"); + + if (lcd->eed) { + edgering_sel(lcd, cuts, 1); + if (lcd->do_cut) { + EditMesh *em = BKE_mesh_get_editmesh(lcd->ob->data); + esubdivideflag(lcd->ob, em, SELECT, 0.0f, 0.0f, 0, cuts, SUBDIV_SELECT_LOOPCUT); + + DAG_id_flush_update(lcd->ob->data, OB_RECALC_DATA); + } + WM_event_add_notifier(C, NC_GEOM|ND_DATA, lcd->ob->data); + } +} + +/* called when modal loop selection is done... */ +static void ringsel_exit (bContext *C, wmOperator *op) +{ + tringselOpData *lcd= op->customdata; + + /* deactivate the extra drawing stuff in 3D-View */ + ED_region_draw_cb_exit(lcd->ar->type, lcd->draw_handle); + + if (lcd->edges) + MEM_freeN(lcd->edges); + + ED_region_tag_redraw(lcd->ar); + + /* free the custom data */ + MEM_freeN(lcd); + op->customdata= NULL; +} + +/* called when modal loop selection gets set up... */ +static int ringsel_init (bContext *C, wmOperator *op, int do_cut) +{ + tringselOpData *lcd; + + /* alloc new customdata */ + lcd= op->customdata= MEM_callocN(sizeof(tringselOpData), "ringsel Modal Op Data"); + + /* assign the drawing handle for drawing preview line... */ + lcd->ar= CTX_wm_region(C); + lcd->draw_handle= ED_region_draw_cb_activate(lcd->ar->type, ringsel_draw, lcd, REGION_DRAW_POST); + lcd->ob = CTX_data_edit_object(C); + lcd->em= BKE_mesh_get_editmesh((Mesh *)lcd->ob->data); + lcd->extend = do_cut ? 0 : RNA_boolean_get(op->ptr, "extend"); + lcd->do_cut = do_cut; + em_setup_viewcontext(C, &lcd->vc); + + ED_region_tag_redraw(lcd->ar); + + return 1; +} + +static int ringsel_cancel (bContext *C, wmOperator *op) +{ + /* this is just a wrapper around exit() */ + ringsel_exit(C, op); + return OPERATOR_CANCELLED; +} + +static int ringsel_invoke (bContext *C, wmOperator *op, wmEvent *evt) +{ + tringselOpData *lcd; + EditEdge *edge; + int dist = 75; + + view3d_operator_needs_opengl(C); + + if (!ringsel_init(C, op, 0)) + return OPERATOR_CANCELLED; + + /* add a modal handler for this operator - handles loop selection */ + WM_event_add_modal_handler(C, op); + + lcd = op->customdata; + lcd->vc.mval[0] = evt->mval[0]; + lcd->vc.mval[1] = evt->mval[1]; + + edge = findnearestedge(&lcd->vc, &dist); + if (edge != lcd->eed) { + lcd->eed = edge; + ringsel_find_edge(lcd, C, lcd->ar, 1); + } + + return OPERATOR_RUNNING_MODAL; +} + + +static int ringcut_invoke (bContext *C, wmOperator *op, wmEvent *evt) +{ + tringselOpData *lcd; + EditEdge *edge; + int dist = 75; + + view3d_operator_needs_opengl(C); + + if (!ringsel_init(C, op, 1)) + return OPERATOR_CANCELLED; + + /* add a modal handler for this operator - handles loop selection */ + WM_event_add_modal_handler(C, op); + + lcd = op->customdata; + lcd->vc.mval[0] = evt->mval[0]; + lcd->vc.mval[1] = evt->mval[1]; + + edge = findnearestedge(&lcd->vc, &dist); + if (edge != lcd->eed) { + lcd->eed = edge; + ringsel_find_edge(lcd, C, lcd->ar, 1); + } + + return OPERATOR_RUNNING_MODAL; +} + +static int ringsel_modal (bContext *C, wmOperator *op, wmEvent *event) +{ + int cuts= RNA_int_get(op->ptr,"number_cuts"); + tringselOpData *lcd= op->customdata; + + view3d_operator_needs_opengl(C); + + + switch (event->type) { + case RIGHTMOUSE: + case LEFTMOUSE: /* confirm */ // XXX hardcoded + if (event->val == KM_RELEASE) { + /* finish */ + ED_region_tag_redraw(lcd->ar); + + ringsel_finish(C, op); + ringsel_exit(C, op); + + return OPERATOR_FINISHED; + } + + ED_region_tag_redraw(lcd->ar); + break; + case WHEELUPMOUSE: /* change number of cuts */ + cuts++; + RNA_int_set(op->ptr,"number_cuts",cuts); + ringsel_find_edge(lcd, C, lcd->ar, cuts); + + ED_region_tag_redraw(lcd->ar); + break; + case WHEELDOWNMOUSE: /* change number of cuts */ + cuts=MAX2(cuts-1,1); + RNA_int_set(op->ptr,"number_cuts",cuts); + ringsel_find_edge(lcd, C, lcd->ar,cuts); + + ED_region_tag_redraw(lcd->ar); + break; + case MOUSEMOVE: { /* mouse moved somewhere to select another loop */ + int dist = 75; + EditEdge *edge; + + lcd->vc.mval[0] = event->mval[0]; + lcd->vc.mval[1] = event->mval[1]; + edge = findnearestedge(&lcd->vc, &dist); + + if (edge != lcd->eed) { + lcd->eed = edge; + ringsel_find_edge(lcd, C, lcd->ar, cuts); + } + + ED_region_tag_redraw(lcd->ar); + break; + } + } + + /* keep going until the user confirms */ + return OPERATOR_RUNNING_MODAL; +} + +void MESH_OT_edgering_select (wmOperatorType *ot) +{ + /* description */ + ot->name= "Edge Ring Select"; + ot->idname= "MESH_OT_edgering_select"; + ot->description= "Select an edge ring"; + + /* callbacks */ + ot->invoke= ringsel_invoke; + ot->modal= ringsel_modal; + ot->cancel= ringsel_cancel; + ot->poll= ED_operator_editmesh; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; + + RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection"); +} + +void MESH_OT_loopcut (wmOperatorType *ot) +{ + /* description */ + ot->name= "Loop Cut"; + ot->idname= "MESH_OT_loopcut"; + ot->description= "Add a new loop between existing loops."; + + /* callbacks */ + ot->invoke= ringcut_invoke; + ot->modal= ringsel_modal; + ot->cancel= ringsel_cancel; + ot->poll= ED_operator_editmesh; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; + + /* properties */ + RNA_def_int(ot->srna, "number_cuts", 1, 1, 10, "Number of Cuts", "", 1, INT_MAX); +} diff --git a/source/blender/editors/mesh/mesh_layers.c b/source/blender/editors/mesh/mesh_data.c index a36c7a56b7c..43e1dd417a6 100644 --- a/source/blender/editors/mesh/mesh_layers.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -26,12 +26,14 @@ * ***** END GPL LICENSE BLOCK ***** */ -#include <stdlib.h> #include <math.h> +#include <stdlib.h> +#include <string.h> #include "MEM_guardedalloc.h" #include "DNA_customdata_types.h" +#include "DNA_material_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" #include "DNA_object_types.h" @@ -43,9 +45,13 @@ #include "BKE_depsgraph.h" #include "BKE_displist.h" #include "BKE_global.h" +#include "BKE_material.h" #include "BKE_mesh.h" +#include "BKE_report.h" +#include "BLI_arithb.h" #include "BLI_editVert.h" +#include "BLI_edgehash.h" #include "RNA_access.h" #include "RNA_define.h" @@ -150,19 +156,8 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la } } -/*********************** UV texture operators ************************/ - -static int layers_poll(bContext *C) +int ED_mesh_uv_texture_add(bContext *C, Scene *scene, Object *ob, Mesh *me) { - Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; - ID *data= (ob)? ob->data: NULL; - return (ob && !ob->id.lib && ob->type==OB_MESH && data && !data->lib); -} - -static int uv_texture_add_exec(bContext *C, wmOperator *op) -{ - Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; - Mesh *me= ob->data; EditMesh *em; int layernum; @@ -193,28 +188,11 @@ static int uv_texture_add_exec(bContext *C, wmOperator *op) DAG_id_flush_update(&me->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); - return OPERATOR_FINISHED; + return 1; } -void MESH_OT_uv_texture_add(wmOperatorType *ot) +int ED_mesh_uv_texture_remove(bContext *C, Object *ob, Mesh *me) { - /* identifiers */ - ot->name= "Add UV Texture"; - ot->description= "Add UV texture layer."; - ot->idname= "MESH_OT_uv_texture_add"; - - /* api callbacks */ - ot->poll= layers_poll; - ot->exec= uv_texture_add_exec; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - -static int uv_texture_remove_exec(bContext *C, wmOperator *op) -{ - Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; - Mesh *me= ob->data; CustomDataLayer *cdl; int index; @@ -222,38 +200,17 @@ static int uv_texture_remove_exec(bContext *C, wmOperator *op) cdl= (index == -1)? NULL: &me->fdata.layers[index]; if(!cdl) - return OPERATOR_CANCELLED; + return 0; delete_customdata_layer(C, ob, cdl); - DAG_id_flush_update(&me->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); - return OPERATOR_FINISHED; -} - -void MESH_OT_uv_texture_remove(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Remove UV Texture"; - ot->description= "Remove UV texture layer."; - ot->idname= "MESH_OT_uv_texture_remove"; - - /* api callbacks */ - ot->poll= layers_poll; - ot->exec= uv_texture_remove_exec; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + return 1; } -/*********************** vertex color operators ************************/ - -static int vertex_color_add_exec(bContext *C, wmOperator *op) +int ED_mesh_color_add(bContext *C, Scene *scene, Object *ob, Mesh *me) { - Scene *scene= CTX_data_scene(C); - Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; - Mesh *me= ob->data; EditMesh *em; MCol *mcol; int layernum; @@ -263,7 +220,7 @@ static int vertex_color_add_exec(bContext *C, wmOperator *op) layernum= CustomData_number_of_layers(&em->fdata, CD_MCOL); if(layernum >= MAX_MCOL) - return OPERATOR_CANCELLED; + return 0; EM_add_data_layer(em, &em->fdata, CD_MCOL); CustomData_set_layer_active(&em->fdata, CD_MCOL, layernum); @@ -271,7 +228,7 @@ static int vertex_color_add_exec(bContext *C, wmOperator *op) else { layernum= CustomData_number_of_layers(&me->fdata, CD_MCOL); if(layernum >= MAX_MCOL) - return OPERATOR_CANCELLED; + return 0; mcol= me->mcol; @@ -290,6 +247,100 @@ static int vertex_color_add_exec(bContext *C, wmOperator *op) DAG_id_flush_update(&me->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); + return 1; +} + +int ED_mesh_color_remove(bContext *C, Object *ob, Mesh *me) +{ + CustomDataLayer *cdl; + int index; + + index= CustomData_get_active_layer_index(&me->fdata, CD_MCOL); + cdl= (index == -1)? NULL: &me->fdata.layers[index]; + + if(!cdl) + return 0; + + delete_customdata_layer(C, ob, cdl); + DAG_id_flush_update(&me->id, OB_RECALC_DATA); + WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); + + return 1; +} + +/*********************** UV texture operators ************************/ + +static int layers_poll(bContext *C) +{ + Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; + ID *data= (ob)? ob->data: NULL; + return (ob && !ob->id.lib && ob->type==OB_MESH && data && !data->lib); +} + +static int uv_texture_add_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; + Mesh *me= ob->data; + + if(!ED_mesh_uv_texture_add(C, scene, ob, me)) + return OPERATOR_CANCELLED; + + return OPERATOR_FINISHED; +} + +void MESH_OT_uv_texture_add(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Add UV Texture"; + ot->description= "Add UV texture layer."; + ot->idname= "MESH_OT_uv_texture_add"; + + /* api callbacks */ + ot->poll= layers_poll; + ot->exec= uv_texture_add_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +static int uv_texture_remove_exec(bContext *C, wmOperator *op) +{ + Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; + Mesh *me= ob->data; + + if(!ED_mesh_uv_texture_remove(C, ob, me)) + return OPERATOR_CANCELLED; + + return OPERATOR_FINISHED; +} + +void MESH_OT_uv_texture_remove(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Remove UV Texture"; + ot->description= "Remove UV texture layer."; + ot->idname= "MESH_OT_uv_texture_remove"; + + /* api callbacks */ + ot->poll= layers_poll; + ot->exec= uv_texture_remove_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/*********************** vertex color operators ************************/ + +static int vertex_color_add_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; + Mesh *me= ob->data; + + if(!ED_mesh_color_add(C, scene, ob, me)) + return OPERATOR_CANCELLED; + return OPERATOR_FINISHED; } @@ -312,20 +363,10 @@ static int vertex_color_remove_exec(bContext *C, wmOperator *op) { Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; Mesh *me= ob->data; - CustomDataLayer *cdl; - int index; - - index= CustomData_get_active_layer_index(&me->fdata, CD_MCOL); - cdl= (index == -1)? NULL: &me->fdata.layers[index]; - if(!cdl) + if(!ED_mesh_color_remove(C, ob, me)) return OPERATOR_CANCELLED; - delete_customdata_layer(C, ob, cdl); - - DAG_id_flush_update(&me->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); - return OPERATOR_FINISHED; } @@ -409,3 +450,212 @@ void MESH_OT_sticky_remove(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } +/************************** Add Geometry Layers *************************/ + +static void mesh_calc_edges(Mesh *mesh) +{ + CustomData edata; + EdgeHashIterator *ehi; + MFace *mf = mesh->mface; + MEdge *med; + EdgeHash *eh = BLI_edgehash_new(); + int i, *index, totedge, totface = mesh->totface; + + for (i = 0; i < totface; i++, mf++) { + if (!BLI_edgehash_haskey(eh, mf->v1, mf->v2)) + BLI_edgehash_insert(eh, mf->v1, mf->v2, NULL); + if (!BLI_edgehash_haskey(eh, mf->v2, mf->v3)) + BLI_edgehash_insert(eh, mf->v2, mf->v3, NULL); + + if (mf->v4) { + if (!BLI_edgehash_haskey(eh, mf->v3, mf->v4)) + BLI_edgehash_insert(eh, mf->v3, mf->v4, NULL); + if (!BLI_edgehash_haskey(eh, mf->v4, mf->v1)) + BLI_edgehash_insert(eh, mf->v4, mf->v1, NULL); + } else { + if (!BLI_edgehash_haskey(eh, mf->v3, mf->v1)) + BLI_edgehash_insert(eh, mf->v3, mf->v1, NULL); + } + } + + totedge = BLI_edgehash_size(eh); + + /* write new edges into a temporary CustomData */ + memset(&edata, 0, sizeof(edata)); + CustomData_add_layer(&edata, CD_MEDGE, CD_CALLOC, NULL, totedge); + + ehi = BLI_edgehashIterator_new(eh); + med = CustomData_get_layer(&edata, CD_MEDGE); + for(i = 0; !BLI_edgehashIterator_isDone(ehi); + BLI_edgehashIterator_step(ehi), ++i, ++med, ++index) { + BLI_edgehashIterator_getKey(ehi, (int*)&med->v1, (int*)&med->v2); + + med->flag = ME_EDGEDRAW|ME_EDGERENDER; + } + BLI_edgehashIterator_free(ehi); + + /* free old CustomData and assign new one */ + CustomData_free(&mesh->edata, mesh->totedge); + mesh->edata = edata; + mesh->totedge = totedge; + + mesh->medge = CustomData_get_layer(&mesh->edata, CD_MEDGE); + + BLI_edgehash_free(eh, NULL); +} + +void ED_mesh_update(Mesh *mesh, bContext *C) +{ + if(mesh->totface && mesh->totedge == 0) + mesh_calc_edges(mesh); + + mesh_calc_normals(mesh->mvert, mesh->totvert, mesh->mface, mesh->totface, NULL); + + DAG_id_flush_update(&mesh->id, OB_RECALC_DATA); + WM_event_add_notifier(C, NC_GEOM|ND_DATA, mesh); +} + +static void mesh_add_verts(Mesh *mesh, int len) +{ + CustomData vdata; + MVert *mvert; + int i, totvert; + + if(len == 0) + return; + + totvert= mesh->totvert + len; + CustomData_copy(&mesh->vdata, &vdata, CD_MASK_MESH, CD_DEFAULT, totvert); + CustomData_copy_data(&mesh->vdata, &vdata, 0, 0, mesh->totvert); + + if(!CustomData_has_layer(&vdata, CD_MVERT)) + CustomData_add_layer(&vdata, CD_MVERT, CD_CALLOC, NULL, totvert); + + CustomData_free(&mesh->vdata, mesh->totvert); + mesh->vdata= vdata; + mesh_update_customdata_pointers(mesh); + + /* scan the input list and insert the new vertices */ + + mvert= &mesh->mvert[mesh->totvert]; + for(i=0; i<len; i++, mvert++) + mvert->flag |= SELECT; + + /* set final vertex list size */ + mesh->totvert= totvert; +} + +void ED_mesh_transform(Mesh *me, float *mat) +{ + int i; + MVert *mvert= me->mvert; + + for(i= 0; i < me->totvert; i++, mvert++) + Mat4MulVecfl((float (*)[4])mat, mvert->co); + + mesh_calc_normals(me->mvert, me->totvert, me->mface, me->totface, NULL); +} + +static void mesh_add_edges(Mesh *mesh, int len) +{ + CustomData edata; + MEdge *medge; + int i, totedge; + + if(len == 0) + return; + + totedge= mesh->totedge+len; + + /* update customdata */ + CustomData_copy(&mesh->edata, &edata, CD_MASK_MESH, CD_DEFAULT, totedge); + CustomData_copy_data(&mesh->edata, &edata, 0, 0, mesh->totedge); + + if(!CustomData_has_layer(&edata, CD_MEDGE)) + CustomData_add_layer(&edata, CD_MEDGE, CD_CALLOC, NULL, totedge); + + CustomData_free(&mesh->edata, mesh->totedge); + mesh->edata= edata; + mesh_update_customdata_pointers(mesh); + + /* set default flags */ + medge= &mesh->medge[mesh->totedge]; + for(i=0; i<len; i++, medge++) + medge->flag= ME_EDGEDRAW|ME_EDGERENDER|SELECT; + + mesh->totedge= totedge; +} + +static void mesh_add_faces(Mesh *mesh, int len) +{ + CustomData fdata; + MFace *mface; + int i, totface; + + if(len == 0) + return; + + totface= mesh->totface + len; /* new face count */ + + /* update customdata */ + CustomData_copy(&mesh->fdata, &fdata, CD_MASK_MESH, CD_DEFAULT, totface); + CustomData_copy_data(&mesh->fdata, &fdata, 0, 0, mesh->totface); + + if(!CustomData_has_layer(&fdata, CD_MFACE)) + CustomData_add_layer(&fdata, CD_MFACE, CD_CALLOC, NULL, totface); + + CustomData_free(&mesh->fdata, mesh->totface); + mesh->fdata= fdata; + mesh_update_customdata_pointers(mesh); + + /* set default flags */ + mface= &mesh->mface[mesh->totface]; + for(i=0; i<len; i++, mface++) + mface->flag= SELECT; + + mesh->totface= totface; +} + +void ED_mesh_geometry_add(Mesh *mesh, ReportList *reports, int verts, int edges, int faces) +{ + if(mesh->edit_mesh) { + BKE_report(reports, RPT_ERROR, "Can't add geometry in edit mode."); + return; + } + + if(verts) + mesh_add_verts(mesh, verts); + if(edges) + mesh_add_edges(mesh, edges); + if(faces) + mesh_add_faces(mesh, faces); +} + +void ED_mesh_calc_normals(Mesh *me) +{ + mesh_calc_normals(me->mvert, me->totvert, me->mface, me->totface, NULL); +} + +void ED_mesh_material_add(Mesh *me, Material *ma) +{ + int i; + int totcol = me->totcol + 1; + Material **mat; + + /* don't add if mesh already has it */ + for(i = 0; i < me->totcol; i++) + if(me->mat[i] == ma) + return; + + mat= MEM_callocN(sizeof(void*)*totcol, "newmatar"); + + if(me->totcol) memcpy(mat, me->mat, sizeof(void*) * me->totcol); + if(me->mat) MEM_freeN(me->mat); + + me->mat = mat; + me->mat[me->totcol++] = ma; + ma->id.us++; + + test_object_materials((ID*)me); +} + diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h index 905a51a1bb0..37a6d0f384f 100644 --- a/source/blender/editors/mesh/mesh_intern.h +++ b/source/blender/editors/mesh/mesh_intern.h @@ -61,12 +61,6 @@ extern struct EditEdge *addedgelist(EditMesh *em, struct EditVert *v1, struct Ed extern struct EditFace *addfacelist(EditMesh *em, struct EditVert *v1, struct EditVert *v2, struct EditVert *v3, struct EditVert *v4, struct EditFace *example, struct EditFace *exampleEdges); extern struct EditEdge *findedgelist(EditMesh *em, struct EditVert *v1, struct EditVert *v2); -EditVert *editedge_getOtherVert(EditEdge *eed, EditVert *eve); -EditVert *editedge_getSharedVert(EditEdge *eed, EditEdge *eed2); -int editedge_containsVert(struct EditEdge *eed, struct EditVert *eve); -int editface_containsVert(struct EditFace *efa, struct EditVert *eve); -int editface_containsEdge(struct EditFace *efa, struct EditEdge *eed); - void em_setup_viewcontext(struct bContext *C, ViewContext *vc); void MESH_OT_separate(struct wmOperatorType *ot); @@ -242,5 +236,8 @@ void MESH_OT_vertex_color_remove(struct wmOperatorType *ot); void MESH_OT_sticky_add(struct wmOperatorType *ot); void MESH_OT_sticky_remove(struct wmOperatorType *ot); +void MESH_OT_edgering_select(struct wmOperatorType *ot); +void MESH_OT_loopcut(struct wmOperatorType *ot); + #endif // MESH_INTERN_H diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index c545f7d70d6..13d73faeb98 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -113,6 +113,7 @@ static int edge_specials_invoke(bContext *C, wmOperator *op, wmEvent *event) uiItemEnumO(layout, "Rotate Edge CCW", 0, "MESH_OT_edge_rotate", "direction", 2); //uiItemO(layout, "Loopcut", 0, "MESH_OT_loop_cut"); // CutEdgeloop(em, 1); //uiItemO(layout, "Edge Slide", 0, "MESH_OT_edge_slide"); // EdgeSlide(em, 0,0.0); + uiItemO(layout, "Edge Slide", 0, "TFM_OT_edge_slide"); uiItemO(layout, "Edge Loop", 0, "MESH_OT_loop_multi_select"); uiItemBooleanO(layout, "Edge Ring", 0, "MESH_OT_loop_multi_select", "ring", 1); uiItemO(layout, NULL, 0, "MESH_OT_loop_to_region"); @@ -320,7 +321,18 @@ void ED_operatortypes_mesh(void) WM_operatortype_append(MESH_OT_face_specials); WM_operatortype_append(MESH_OT_specials); + WM_operatortype_append(MESH_OT_edgering_select); + WM_operatortype_append(MESH_OT_loopcut); + /* macros */ + + /*combining operators with invoke and exec portions doesn't work yet. + + ot= WM_operatortype_append_macro("MESH_OT_loopcut", "Loopcut", OPTYPE_UNDO|OPTYPE_REGISTER); + WM_operatortype_macro_define(ot, "MESH_OT_edgering_select"); + WM_operatortype_macro_define(ot, "MESH_OT_subdivide"); + */ + ot= WM_operatortype_append_macro("MESH_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER); WM_operatortype_macro_define(ot, "MESH_OT_duplicate"); WM_operatortype_macro_define(ot, "TFM_OT_translate"); @@ -332,28 +344,32 @@ void ED_operatortypes_mesh(void) ot= WM_operatortype_append_macro("MESH_OT_extrude_move", "Extrude", OPTYPE_UNDO|OPTYPE_REGISTER); WM_operatortype_macro_define(ot, "MESH_OT_extrude"); WM_operatortype_macro_define(ot, "TFM_OT_translate"); - + } /* note mesh keymap also for other space? */ void ED_keymap_mesh(wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "EditMesh", 0, 0); + wmKeyMap *keymap; wmKeymapItem *kmi; + keymap= WM_keymap_find(wm, "EditMesh", 0, 0); + keymap->poll= ED_operator_editmesh; + + WM_keymap_add_item(keymap, "MESH_OT_loopcut", RKEY, KM_PRESS, KM_CTRL, 0); + /* selecting */ /* standard mouse selection goes via space_view3d */ 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_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_loop_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT|KM_CTRL, 0); + + kmi= WM_keymap_add_item(keymap, "MESH_OT_edgering_select", SELECTMOUSE, KM_PRESS, KM_ALT|KM_CTRL, 0); + kmi= WM_keymap_add_item(keymap, "MESH_OT_edgering_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_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); WM_keymap_add_item(keymap, "MESH_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0); @@ -413,16 +429,17 @@ void ED_keymap_mesh(wmWindowManager *wm) WM_keymap_add_item(keymap, "MESH_OT_edge_face_add", FKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "MESH_OT_duplicate_move", 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); + WM_keymap_add_item(keymap, "MESH_OT_separate", PKEY, KM_PRESS, 0, 0); /* use KM_RELEASE because same key is used for tweaks */ WM_keymap_add_item(keymap, "MESH_OT_dupli_extrude_cursor", LEFTMOUSE, KM_RELEASE, KM_CTRL, 0); WM_keymap_add_item(keymap, "MESH_OT_delete", XKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "MESH_OT_delete", DELKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "MESH_OT_fgon_make", FKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "MESH_OT_fgon_clear", FKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0); - WM_keymap_add_item(keymap, "MESH_OT_knife_cut", LEFTMOUSE, KM_PRESS, KM_ALT|KM_CTRL, 0); + WM_keymap_add_item(keymap, "MESH_OT_knife_cut", LEFTMOUSE, KM_PRESS, 0, KKEY); /* menus */ WM_keymap_add_item(keymap, "MESH_OT_vertex_specials", VKEY, KM_PRESS, KM_CTRL, 0); diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index 4aa99820a6e..00893f10165 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -632,7 +632,7 @@ void sort_faces(Scene *scene, View3D *v3d) if (event == 1) Mat4MulMat4(mat, OBACT->obmat, rv3d->viewmat); /* apply the view matrix to the object matrix */ else if (event == 2) { /* sort from cursor */ - if( v3d && v3d->localview ) { + if( v3d && v3d->localvd ) { VECCOPY(cur, v3d->cursor); } else { VECCOPY(cur, scene->cursor); diff --git a/source/blender/editors/metaball/mball_ops.c b/source/blender/editors/metaball/mball_ops.c index 38593af372f..dd8a18f385c 100644 --- a/source/blender/editors/metaball/mball_ops.c +++ b/source/blender/editors/metaball/mball_ops.c @@ -34,6 +34,8 @@ #include "DNA_listBase.h" #include "DNA_windowmanager_types.h" +#include "ED_screen.h" + #include "mball_intern.h" void ED_operatortypes_metaball(void) @@ -51,7 +53,10 @@ void ED_operatortypes_metaball(void) void ED_keymap_metaball(wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "Metaball", 0, 0); + wmKeyMap *keymap; + + keymap= WM_keymap_find(wm, "Metaball", 0, 0); + keymap->poll= ED_operator_editmball; WM_keymap_add_item(keymap, "OBJECT_OT_metaball_add", AKEY, KM_PRESS, KM_SHIFT, 0); @@ -60,6 +65,7 @@ void ED_keymap_metaball(wmWindowManager *wm) RNA_enum_set(WM_keymap_add_item(keymap, "MBALL_OT_hide_metaelems", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1); WM_keymap_add_item(keymap, "MBALL_OT_delete_metaelems", XKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "MBALL_OT_delete_metaelems", DELKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "MBALL_OT_duplicate_metaelems", DKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "MBALL_OT_select_deselect_all_metaelems", AKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/object/Makefile b/source/blender/editors/object/Makefile index 70ada46c80f..fd2af305d87 100644 --- a/source/blender/editors/object/Makefile +++ b/source/blender/editors/object/Makefile @@ -47,6 +47,7 @@ CPPFLAGS += -I../../makesdna CPPFLAGS += -I../../makesrna CPPFLAGS += -I../../python CPPFLAGS += -I../../imbuf +CPPFLAGS += -I../../ikplugin # own include diff --git a/source/blender/editors/object/SConscript b/source/blender/editors/object/SConscript index 3371e172a82..6ecc80f2d81 100644 --- a/source/blender/editors/object/SConscript +++ b/source/blender/editors/object/SConscript @@ -6,7 +6,7 @@ sources = env.Glob('*.c') incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc' incs += ' #/intern/guardedalloc' -incs += ' ../../makesrna ../../python' +incs += ' ../../makesrna ../../python ../../ikplugin' defs = [] diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index f4c8c63c480..7188368a95f 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -32,11 +32,13 @@ #include "DNA_action_types.h" #include "DNA_curve_types.h" #include "DNA_group_types.h" +#include "DNA_lamp_types.h" #include "DNA_material_types.h" #include "DNA_mesh_types.h" #include "DNA_meta_types.h" #include "DNA_object_fluidsim.h" #include "DNA_object_types.h" +#include "DNA_object_force.h" #include "DNA_scene_types.h" #include "DNA_screen_types.h" #include "DNA_userdef_types.h" @@ -55,6 +57,7 @@ #include "BKE_depsgraph.h" #include "BKE_DerivedMesh.h" #include "BKE_displist.h" +#include "BKE_effect.h" #include "BKE_global.h" #include "BKE_group.h" #include "BKE_lattice.h" @@ -109,7 +112,7 @@ void ED_object_base_init_from_view(bContext *C, Base *base) VECCOPY(ob->loc, scene->cursor); } else { - if (v3d->localview) { + if (v3d->localvd) { base->lay= ob->lay= v3d->layact | v3d->lay; VECCOPY(ob->loc, v3d->cursor); } @@ -165,7 +168,7 @@ static Object *object_add_type(bContext *C, int type) /* for object add operator */ static int object_add_exec(bContext *C, wmOperator *op) { - object_add_type(C, RNA_int_get(op->ptr, "type")); + object_add_type(C, RNA_enum_get(op->ptr, "type")); return OPERATOR_FINISHED; } @@ -189,6 +192,90 @@ void OBJECT_OT_add(wmOperatorType *ot) RNA_def_enum(ot->srna, "type", object_type_items, 0, "Type", ""); } +/********************* Add Effector Operator ********************/ +/* copy from rna_object_force.c*/ +static EnumPropertyItem field_type_items[] = { + {0, "NONE", 0, "None", ""}, + {PFIELD_FORCE, "FORCE", 0, "Force", ""}, + {PFIELD_WIND, "WIND", 0, "Wind", ""}, + {PFIELD_VORTEX, "VORTEX", 0, "Vortex", ""}, + {PFIELD_MAGNET, "MAGNET", 0, "Magnetic", ""}, + {PFIELD_HARMONIC, "HARMONIC", 0, "Harmonic", ""}, + {PFIELD_CHARGE, "CHARGE", 0, "Charge", ""}, + {PFIELD_LENNARDJ, "LENNARDJ", 0, "Lennard-Jones", ""}, + {PFIELD_TEXTURE, "TEXTURE", 0, "Texture", ""}, + {PFIELD_GUIDE, "GUIDE", 0, "Curve Guide", ""}, + {PFIELD_BOID, "BOID", 0, "Boid", ""}, + {PFIELD_TURBULENCE, "TURBULENCE", 0, "Turbulence", ""}, + {PFIELD_DRAG, "DRAG", 0, "Drag", ""}, + {0, NULL, 0, NULL, NULL}}; + +void add_effector_draw(Scene *scene, View3D *v3d, int type) /* for toolbox or menus, only non-editmode stuff */ +{ + /* keep here to get things compile, remove later */ +} + +/* for effector add primitive operators */ +static Object *effector_add_type(bContext *C, int type) +{ + Scene *scene= CTX_data_scene(C); + Object *ob; + + /* for as long scene has editmode... */ + if (CTX_data_edit_object(C)) + ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* freedata, and undo */ + + /* deselects all, sets scene->basact */ + if(type==PFIELD_GUIDE) { + ob = add_object(scene, OB_CURVE); + ((Curve*)ob->data)->flag |= CU_PATH|CU_3D; + ED_object_enter_editmode(C, 0); + BLI_addtail(curve_get_editcurve(ob), add_nurbs_primitive(C, CU_NURBS|CU_PRIM_PATH, 1)); + ED_object_exit_editmode(C, EM_FREEDATA); + } + else + ob= add_object(scene, OB_EMPTY); + + ob->pd= object_add_collision_fields(type); + + /* editor level activate, notifiers */ + ED_base_object_activate(C, BASACT); + + /* more editor stuff */ + ED_object_base_init_from_view(C, BASACT); + + DAG_scene_sort(scene); + + return ob; +} + +/* for object add operator */ +static int effector_add_exec(bContext *C, wmOperator *op) +{ + effector_add_type(C, RNA_int_get(op->ptr, "type")); + + return OPERATOR_FINISHED; +} + +void OBJECT_OT_effector_add(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Add Effector"; + ot->description = "Add an empty object with a physics effector to the scene."; + ot->idname= "OBJECT_OT_effector_add"; + + /* api callbacks */ + ot->invoke= WM_menu_invoke; + ot->exec= effector_add_exec; + + ot->poll= ED_operator_scene_editable; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + RNA_def_enum(ot->srna, "type", field_type_items, 0, "Type", ""); +} + /* ***************** add primitives *************** */ /* ****** work both in and outside editmode ****** */ @@ -307,7 +394,6 @@ static int object_add_curve_exec(bContext *C, wmOperator *op) /* userdef */ if (newob && (U.flag & USER_ADD_EDITMODE)==0) { - ED_object_enter_editmode(C, 0); ED_object_exit_editmode(C, EM_FREEDATA); } @@ -468,7 +554,7 @@ static int object_metaball_add_invoke(bContext *C, wmOperator *op, wmEvent *even void OBJECT_OT_metaball_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Metaball"; + ot->name= "Add Metaball"; ot->description= "Add an metaball object to the scene."; ot->idname= "OBJECT_OT_metaball_add"; @@ -560,6 +646,45 @@ void OBJECT_OT_armature_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } +static int object_lamp_add_exec(bContext *C, wmOperator *op) +{ + Object *ob; + int type= RNA_enum_get(op->ptr, "type"); + + ob= object_add_type(C, OB_LAMP); + if(ob && ob->data) + ((Lamp*)ob->data)->type= type; + + return OPERATOR_FINISHED; +} + +void OBJECT_OT_lamp_add(wmOperatorType *ot) +{ + static EnumPropertyItem lamp_type_items[] = { + {LA_LOCAL, "POINT", ICON_LAMP_POINT, "Point", "Omnidirectional point light source."}, + {LA_SUN, "SUN", ICON_LAMP_SUN, "Sun", "Constant direction parallel ray light source."}, + {LA_SPOT, "SPOT", ICON_LAMP_SPOT, "Spot", "Directional cone light source."}, + {LA_HEMI, "HEMI", ICON_LAMP_HEMI, "Hemi", "180 degree constant light source."}, + {LA_AREA, "AREA", ICON_LAMP_AREA, "Area", "Directional area light source."}, + {0, NULL, 0, NULL, NULL}}; + + /* identifiers */ + ot->name= "Add Lamp"; + ot->description = "Add a lamp object to the scene."; + ot->idname= "OBJECT_OT_lamp_add"; + + /* api callbacks */ + ot->invoke= WM_menu_invoke; + ot->exec= object_lamp_add_exec; + ot->poll= ED_operator_scene_editable; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_enum(ot->srna, "type", lamp_type_items, 0, "Type", ""); +} + static int object_primitive_add_invoke(bContext *C, wmOperator *op, wmEvent *event) { uiPopupMenu *pup= uiPupMenuBegin(C, "Add Object", 0); @@ -568,7 +693,7 @@ static int object_primitive_add_invoke(bContext *C, wmOperator *op, wmEvent *eve uiItemMenuEnumO(layout, "Mesh", ICON_OUTLINER_OB_MESH, "OBJECT_OT_mesh_add", "type"); uiItemMenuEnumO(layout, "Curve", ICON_OUTLINER_OB_CURVE, "OBJECT_OT_curve_add", "type"); uiItemMenuEnumO(layout, "Surface", ICON_OUTLINER_OB_SURFACE, "OBJECT_OT_surface_add", "type"); - uiItemMenuEnumO(layout, NULL, ICON_OUTLINER_OB_META, "OBJECT_OT_metaball_add", "type"); + uiItemMenuEnumO(layout, "Metaball", ICON_OUTLINER_OB_META, "OBJECT_OT_metaball_add", "type"); uiItemO(layout, "Text", ICON_OUTLINER_OB_FONT, "OBJECT_OT_text_add"); uiItemS(layout); uiItemO(layout, "Armature", ICON_OUTLINER_OB_ARMATURE, "OBJECT_OT_armature_add"); @@ -576,7 +701,9 @@ static int object_primitive_add_invoke(bContext *C, wmOperator *op, wmEvent *eve uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_EMPTY, "OBJECT_OT_add", "type", OB_EMPTY); uiItemS(layout); uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_CAMERA, "OBJECT_OT_add", "type", OB_CAMERA); - uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_LAMP, "OBJECT_OT_add", "type", OB_LAMP); + uiItemMenuEnumO(layout, "Lamp", ICON_OUTLINER_OB_LAMP, "OBJECT_OT_lamp_add", "type"); + uiItemS(layout); + uiItemMenuEnumO(layout, "Force Field", ICON_OUTLINER_OB_EMPTY, "OBJECT_OT_effector_add", "type"); uiPupMenuEnd(C, pup); @@ -886,7 +1013,7 @@ static int convert_poll(bContext *C) static int convert_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); - Base *basen=NULL, *basact, *basedel=NULL; + Base *basen=NULL, *basact=NULL, *basedel=NULL; Object *ob, *ob1, *obact= CTX_data_active_object(C); DerivedMesh *dm; Curve *cu; diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 9b073ed5878..8c0da354938 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -56,6 +56,7 @@ #include "BKE_object.h" #include "BKE_report.h" #include "BKE_utildefines.h" +#include "BIK_api.h" #ifndef DISABLE_PYTHON #include "BPY_extern.h" @@ -334,6 +335,7 @@ static void test_constraints (Object *owner, const char substring[]) * optional... otherwise poletarget must exist too or else * the constraint is deemed invalid */ + /* default IK check ... */ if (exist_object(data->tar) == 0) { data->tar = NULL; curcon->flag |= CONSTRAINT_DISABLE; @@ -355,7 +357,8 @@ static void test_constraints (Object *owner, const char substring[]) } } } - + /* ... can be overwritten here */ + BIK_test_constraint(owner, curcon); /* targets have already been checked for this */ continue; } @@ -702,6 +705,25 @@ void ED_object_constraint_set_active(Object *ob, bConstraint *con) } } +void ED_object_constraint_update(Object *ob) +{ + + if(ob->pose) update_pose_constraint_flags(ob->pose); + + object_test_constraints(ob); + + if(ob->type==OB_ARMATURE) DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB); + else DAG_id_flush_update(&ob->id, OB_RECALC_OB); +} + +void ED_object_constraint_dependency_update(Scene *scene, Object *ob) +{ + ED_object_constraint_update(ob); + + if(ob->pose) ob->pose->flag |= POSE_RECALC; // checks & sorts pose channels + DAG_scene_sort(scene); +} + static int constraint_poll(bContext *C) { PointerRNA ptr= CTX_data_pointer_get_type(C, "constraint", &RNA_Constraint); @@ -717,6 +739,10 @@ static int constraint_delete_exec (bContext *C, wmOperator *op) /* remove constraint itself */ lb= get_active_constraints(ob); + if (BLI_findindex(lb, con) == -1) + /* abnormal situation which happens on bone constraint when the armature is not in pose mode */ + return OPERATOR_CANCELLED; + free_constraint_data(con); BLI_freelinkN(lb, con); @@ -823,17 +849,22 @@ void CONSTRAINT_OT_move_up (wmOperatorType *ot) static int pose_constraints_clear_exec(bContext *C, wmOperator *op) { Object *ob= CTX_data_active_object(C); + Scene *scene= CTX_data_scene(C); /* free constraints for all selected bones */ CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pchans) { free_constraints(&pchan->constraints); + pchan->constflag &= ~(PCHAN_HAS_IK|PCHAN_HAS_CONST); } CTX_DATA_END; + /* force depsgraph to get recalculated since relationships removed */ + DAG_scene_sort(scene); /* sort order of objects */ + /* do updates */ - DAG_id_flush_update(&ob->id, OB_RECALC_OB); - WM_event_add_notifier(C, NC_OBJECT|ND_POSE|ND_CONSTRAINT|NA_REMOVED, ob); + DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob); return OPERATOR_FINISHED; } @@ -854,14 +885,18 @@ void POSE_OT_constraints_clear(wmOperatorType *ot) static int object_constraints_clear_exec(bContext *C, wmOperator *op) { Object *ob= CTX_data_active_object(C); + Scene *scene= CTX_data_scene(C); /* do freeing */ // TODO: we should free constraints for all selected objects instead (to be more consistent with bones) free_constraints(&ob->constraints); + /* force depsgraph to get recalculated since relationships removed */ + DAG_scene_sort(scene); /* sort order of objects */ + /* do updates */ DAG_id_flush_update(&ob->id, OB_RECALC_OB); - WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT|NA_REMOVED, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob); return OPERATOR_FINISHED; } @@ -910,7 +945,6 @@ static short get_new_constraint_target(bContext *C, int con_type, Object **tar_o /* restricted target-type constraints -------------- */ /* NOTE: for these, we cannot try to add a target object if no valid ones are found, since that doesn't work */ /* curve-based constraints - set the only_curve and only_ob flags */ - case CONSTRAINT_TYPE_TRACKTO: case CONSTRAINT_TYPE_CLAMPTO: case CONSTRAINT_TYPE_FOLLOWPATH: only_curve= 1; diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index daa63da03db..54df3ae92da 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -332,12 +332,23 @@ void ED_object_exit_editmode(bContext *C, int flag) if(freedata) free_editMball(obedit); } - /* freedata only 0 now on file saves */ + /* freedata only 0 now on file saves and render */ if(freedata) { + ListBase pidlist; + PTCacheID *pid; + /* for example; displist make is different in editmode */ scene->obedit= NULL; // XXX for context + + /* flag object caches as outdated */ + BKE_ptcache_ids_from_object(&pidlist, obedit); + for(pid=pidlist.first; pid; pid=pid->next) { + if(pid->type != PTCACHE_TYPE_PARTICLES) /* particles don't need reset on geometry change */ + pid->cache->flag |= PTCACHE_OUTDATED; + } + BLI_freelistN(&pidlist); - BKE_ptcache_object_reset(scene, obedit, PTCACHE_RESET_DEPSGRAPH); + BKE_ptcache_object_reset(scene, obedit, PTCACHE_RESET_OUTDATED); /* also flush ob recalc, doesn't take much overhead, but used for particles */ DAG_id_flush_update(&obedit->id, OB_RECALC_OB|OB_RECALC_DATA); @@ -347,10 +358,10 @@ void ED_object_exit_editmode(bContext *C, int flag) if(flag & EM_WAITCURSOR) waitcursor(0); WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, scene); - } - obedit->mode &= ~OB_MODE_EDIT; - ED_object_toggle_modes(C, obedit->restore_mode); + obedit->mode &= ~OB_MODE_EDIT; + ED_object_toggle_modes(C, obedit->restore_mode); + } } @@ -1947,29 +1958,26 @@ static int object_mode_set_compat(bContext *C, wmOperator *op, Object *ob) ObjectMode mode = RNA_enum_get(op->ptr, "mode"); if(ob) { + if(mode == OB_MODE_OBJECT) + return 1; + switch(ob->type) { - case OB_EMPTY: - case OB_LAMP: - case OB_CAMERA: - if(mode & OB_MODE_OBJECT) - return 1; - return 0; case OB_MESH: - if(mode & ( OB_MODE_OBJECT|OB_MODE_EDIT|OB_MODE_SCULPT|OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT|OB_MODE_PARTICLE_EDIT)) + if(mode & (OB_MODE_EDIT|OB_MODE_SCULPT|OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT|OB_MODE_PARTICLE_EDIT)) return 1; return 0; case OB_CURVE: case OB_SURF: case OB_FONT: case OB_MBALL: - if(mode & (OB_MODE_OBJECT|OB_MODE_EDIT)) + if(mode & (OB_MODE_EDIT)) return 1; return 0; case OB_LATTICE: - if(mode & (OB_MODE_OBJECT|OB_MODE_EDIT|OB_MODE_WEIGHT_PAINT)) + if(mode & (OB_MODE_EDIT|OB_MODE_WEIGHT_PAINT)) return 1; case OB_ARMATURE: - if(mode & (OB_MODE_OBJECT|OB_MODE_EDIT|OB_MODE_POSE)) + if(mode & (OB_MODE_EDIT|OB_MODE_POSE)) return 1; } } @@ -1985,7 +1993,7 @@ static int object_mode_set_exec(bContext *C, wmOperator *op) int toggle = RNA_boolean_get(op->ptr, "toggle"); if(!ob || !object_mode_set_compat(C, op, ob)) - return OPERATOR_CANCELLED; + return OPERATOR_PASS_THROUGH; /* Exit current mode if it's not the mode we're setting */ if(ob->mode != OB_MODE_OBJECT && ob->mode != mode) @@ -2026,7 +2034,7 @@ void OBJECT_OT_mode_set(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - prop= RNA_def_enum(ot->srna, "mode", object_mode_items, 0, "Mode", ""); + prop= RNA_def_enum(ot->srna, "mode", object_mode_items, OB_MODE_OBJECT, "Mode", ""); RNA_def_enum_funcs(prop, object_mode_set_itemsf); RNA_def_boolean(ot->srna, "toggle", 0, "Toggle", ""); diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h index 7d52e9c7c56..474715c593b 100644 --- a/source/blender/editors/object/object_intern.h +++ b/source/blender/editors/object/object_intern.h @@ -79,6 +79,7 @@ void OBJECT_OT_select_by_layer(struct wmOperatorType *ot); void OBJECT_OT_select_linked(struct wmOperatorType *ot); void OBJECT_OT_select_grouped(struct wmOperatorType *ot); void OBJECT_OT_select_mirror(struct wmOperatorType *ot); +void OBJECT_OT_select_name(struct wmOperatorType *ot); /* object_add.c */ void OBJECT_OT_add(struct wmOperatorType *ot); @@ -88,7 +89,9 @@ void OBJECT_OT_surface_add(struct wmOperatorType *ot); void OBJECT_OT_metaball_add(struct wmOperatorType *ot); void OBJECT_OT_text_add(struct wmOperatorType *ot); void OBJECT_OT_armature_add(struct wmOperatorType *ot); +void OBJECT_OT_lamp_add(struct wmOperatorType *ot); void OBJECT_OT_primitive_add(struct wmOperatorType *ot); /* only used as menu */ +void OBJECT_OT_effector_add(struct wmOperatorType *ot); void OBJECT_OT_duplicates_make_real(struct wmOperatorType *ot); void OBJECT_OT_duplicate(struct wmOperatorType *ot); @@ -173,5 +176,9 @@ void OBJECT_OT_game_property_remove(struct wmOperatorType *ot); void OBJECT_OT_shape_key_add(struct wmOperatorType *ot); void OBJECT_OT_shape_key_remove(struct wmOperatorType *ot); +/* object_group.c */ +void OBJECT_OT_group_add(struct wmOperatorType *ot); +void OBJECT_OT_group_remove(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 index cc8cc420bf7..7f0f1876417 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -110,7 +110,7 @@ int ED_object_modifier_add(ReportList *reports, Scene *scene, Object *ob, int ty } else if(type == eModifierType_Collision) { if(!ob->pd) - ob->pd= object_add_collision_fields(); + ob->pd= object_add_collision_fields(0); ob->pd->deflect= 1; DAG_scene_sort(scene); @@ -159,8 +159,8 @@ int ED_object_modifier_remove(ReportList *reports, Scene *scene, Object *ob, Mod DAG_scene_sort(scene); } else if(md->type == eModifierType_Surface) { - if(ob->pd) - ob->pd->flag &= ~PFIELD_SURFACE; + if(ob->pd && ob->pd->shape == PFIELD_SHAPE_SURFACE) + ob->pd->shape = PFIELD_SHAPE_PLANE; DAG_scene_sort(scene); } diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index ddcecdeb1f1..9bfd6a4201c 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -102,6 +102,7 @@ void ED_operatortypes_object(void) WM_operatortype_append(OBJECT_OT_select_linked); WM_operatortype_append(OBJECT_OT_select_grouped); WM_operatortype_append(OBJECT_OT_select_mirror); + WM_operatortype_append(OBJECT_OT_select_name); /* XXX - weak, not compat with linked objects */ WM_operatortype_append(GROUP_OT_group_create); WM_operatortype_append(GROUP_OT_objects_remove); @@ -114,7 +115,9 @@ void ED_operatortypes_object(void) WM_operatortype_append(OBJECT_OT_text_add); WM_operatortype_append(OBJECT_OT_surface_add); WM_operatortype_append(OBJECT_OT_armature_add); + WM_operatortype_append(OBJECT_OT_lamp_add); WM_operatortype_append(OBJECT_OT_add); + WM_operatortype_append(OBJECT_OT_effector_add); WM_operatortype_append(OBJECT_OT_primitive_add); WM_operatortype_append(OBJECT_OT_mesh_add); WM_operatortype_append(OBJECT_OT_metaball_add); @@ -174,6 +177,9 @@ void ED_operatortypes_object(void) WM_operatortype_append(LATTICE_OT_select_all_toggle); WM_operatortype_append(LATTICE_OT_make_regular); + + WM_operatortype_append(OBJECT_OT_group_add); + WM_operatortype_append(OBJECT_OT_group_remove); /* macros */ ot= WM_operatortype_append_macro("OBJECT_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER); @@ -183,11 +189,19 @@ void ED_operatortypes_object(void) } } +static int object_mode_poll(bContext *C) +{ + Object *ob= CTX_data_active_object(C); + return (!ob || ob->mode == OB_MODE_OBJECT); +} + void ED_keymap_object(wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "Object Non-modal", 0, 0); + wmKeyMap *keymap; wmKeymapItem *kmi; + keymap= WM_keymap_find(wm, "Object Non-modal", 0, 0); + /* Note: this keymap works disregarding mode */ WM_keymap_add_item(keymap, "OBJECT_OT_editmode_toggle", TABKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "OBJECT_OT_posemode_toggle", TABKEY, KM_PRESS, KM_CTRL, 0); @@ -202,7 +216,8 @@ void ED_keymap_object(wmWindowManager *wm) WM_keymap_add_item(keymap, "OBJECT_OT_center_set", CKEY, KM_PRESS, KM_ALT|KM_SHIFT|KM_CTRL, 0); /* Note: this keymap gets disabled in non-objectmode, */ - keymap= WM_keymap_listbase(wm, "Object Mode", 0, 0); + keymap= WM_keymap_find(wm, "Object Mode", 0, 0); + keymap->poll= object_mode_poll; WM_keymap_add_item(keymap, "OBJECT_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "OBJECT_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0); @@ -227,11 +242,13 @@ void ED_keymap_object(wmWindowManager *wm) WM_keymap_add_item(keymap, "OBJECT_OT_restrictview_set", HKEY, KM_PRESS, 0, 0); RNA_boolean_set(WM_keymap_add_item(keymap, "OBJECT_OT_restrictview_set", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1); - WM_keymap_verify_item(keymap, "OBJECT_OT_delete", XKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "OBJECT_OT_delete", XKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "OBJECT_OT_delete", DELKEY, KM_PRESS, 0, 0); WM_keymap_verify_item(keymap, "OBJECT_OT_primitive_add", AKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "OBJECT_OT_duplicate_move", DKEY, KM_PRESS, KM_SHIFT, 0); RNA_boolean_set(WM_keymap_add_item(keymap, "OBJECT_OT_duplicate", DKEY, KM_PRESS, KM_ALT, 0)->ptr, "linked", 1); WM_keymap_add_item(keymap, "OBJECT_OT_join", JKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "OBJECT_OT_convert", CKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "OBJECT_OT_proxy_make", PKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); // XXX this should probably be in screen instead... here for testing purposes in the meantime... - Aligorith @@ -244,7 +261,8 @@ void ED_keymap_object(wmWindowManager *wm) WM_keymap_verify_item(keymap, "GROUP_OT_objects_remove_active", GKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0); /* Lattice */ - keymap= WM_keymap_listbase(wm, "Lattice", 0, 0); + keymap= WM_keymap_find(wm, "Lattice", 0, 0); + keymap->poll= ED_operator_editlattice; WM_keymap_add_item(keymap, "LATTICE_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0); } diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 12cb2b95e06..4a0c812f7b1 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -566,8 +566,9 @@ static int parent_set_exec(bContext *C, wmOperator *op) } else cu->flag |= CU_FOLLOW; - /* fall back on regular parenting now */ - partype= PAR_OBJECT; + /* fall back on regular parenting now (for follow only) */ + if(partype == PAR_FOLLOW) + partype= PAR_OBJECT; } } else if(partype==PAR_BONE) { @@ -593,7 +594,9 @@ static int parent_set_exec(bContext *C, wmOperator *op) /* apply transformation of previous parenting */ ED_object_apply_obmat(ob); - ob->parent= par; + /* set the parent (except for follow-path constraint option) */ + if(partype != PAR_PATH_CONST) + ob->parent= par; /* handle types */ if (pchan) @@ -602,7 +605,7 @@ static int parent_set_exec(bContext *C, wmOperator *op) ob->parsubstr[0]= 0; /* constraint */ - if(partype==PAR_PATH_CONST) { + if(partype == PAR_PATH_CONST) { bConstraint *con; bFollowPathConstraint *data; float cmat[4][4], vec[3]; @@ -620,6 +623,7 @@ static int parent_set_exec(bContext *C, wmOperator *op) ob->loc[0] = vec[0]; ob->loc[1] = vec[1]; + ob->loc[2] = vec[2]; } else if(pararm && ob->type==OB_MESH && par->type == OB_ARMATURE) { if(partype == PAR_ARMATURE_NAME) @@ -645,8 +649,12 @@ static int parent_set_exec(bContext *C, wmOperator *op) ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA; + if(partype == PAR_PATH_CONST) + ; /* don't do anything here, since this is not technically "parenting" */ if( ELEM(partype, PAR_CURVE, PAR_LATTICE) || pararm ) ob->partype= PARSKEL; /* note, dna define, not operator property */ + else if (partype == PAR_BONE) + ob->partype= PARBONE; /* note, dna define, not operator property */ else ob->partype= PAROBJECT; /* note, dna define, not operator property */ } @@ -986,7 +994,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op) if(lay==0) return OPERATOR_CANCELLED; - if(v3d && v3d->localview) { + if(v3d && v3d->localvd) { /* now we can move out of localview. */ // XXX if (!okee("Move from localview")) return; CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) { diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index 50ba4ab2934..98603ee843a 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -30,6 +30,8 @@ #include <stdlib.h> #include <string.h> +#include "MEM_guardedalloc.h" + #include "DNA_group_types.h" #include "DNA_material_types.h" #include "DNA_modifier_types.h" @@ -53,6 +55,7 @@ #include "BKE_property.h" #include "BKE_report.h" #include "BKE_scene.h" +#include "BKE_utildefines.h" #include "WM_api.h" #include "WM_types.h" @@ -117,22 +120,16 @@ void ED_base_object_activate(bContext *C, Base *base) /********************** Selection Operators **********************/ -static EnumPropertyItem prop_select_types[] = { - {0, "EXCLUSIVE", 0, "Exclusive", ""}, - {1, "EXTEND", 0, "Extend", ""}, - {0, NULL, 0, NULL, NULL} -}; - /************************ Select by Type *************************/ static int object_select_by_type_exec(bContext *C, wmOperator *op) { - short obtype, seltype; + short obtype, extend; obtype = RNA_enum_get(op->ptr, "type"); - seltype = RNA_enum_get(op->ptr, "seltype"); + extend= RNA_boolean_get(op->ptr, "extend"); - if (seltype == 0) { + if (extend == 0) { CTX_DATA_BEGIN(C, Base*, base, visible_bases) { ED_base_object_select(base, BA_DESELECT); } @@ -166,9 +163,9 @@ void OBJECT_OT_select_by_type(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_enum(ot->srna, "seltype", prop_select_types, 0, "Selection", "Extend selection or clear selection then select"); + /* properties */ + RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); RNA_def_enum(ot->srna, "type", object_type_items, 1, "Type", ""); - } /*********************** Selection by Links *********************/ @@ -192,7 +189,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, seltype; + short changed = 0, extend; /* events (nr): * Object Ipo: 1 * ObData: 2 @@ -202,9 +199,9 @@ static int object_select_linked_exec(bContext *C, wmOperator *op) * PSys: 6 */ - seltype = RNA_enum_get(op->ptr, "seltype"); + extend= RNA_boolean_get(op->ptr, "extend"); - if (seltype == 0) { + if (extend == 0) { CTX_DATA_BEGIN(C, Base*, base, visible_bases) { ED_base_object_select(base, BA_DESELECT); } @@ -327,9 +324,9 @@ void OBJECT_OT_select_linked(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + /* properties */ + RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); 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"); - } /*********************** Selected Grouped ********************/ @@ -575,11 +572,11 @@ static int object_select_grouped_exec(bContext *C, wmOperator *op) Scene *scene= CTX_data_scene(C); Object *ob; int nr = RNA_enum_get(op->ptr, "type"); - short changed = 0, seltype; + short changed = 0, extend; - seltype = RNA_enum_get(op->ptr, "seltype"); + extend= RNA_boolean_get(op->ptr, "extend"); - if (seltype == 0) { + if (extend == 0) { CTX_DATA_BEGIN(C, Base*, base, visible_bases) { ED_base_object_select(base, BA_DESELECT); } @@ -628,8 +625,8 @@ void OBJECT_OT_select_grouped(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ + RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); RNA_def_enum(ot->srna, "type", prop_select_grouped_types, 0, "Type", ""); - RNA_def_enum(ot->srna, "seltype", prop_select_types, 1, "Selection", "Extend selection or clear selection then select"); } /************************* Select by Layer **********************/ @@ -637,12 +634,12 @@ void OBJECT_OT_select_grouped(wmOperatorType *ot) static int object_select_by_layer_exec(bContext *C, wmOperator *op) { unsigned int layernum; - short seltype; + short extend; - seltype = RNA_enum_get(op->ptr, "seltype"); + extend= RNA_boolean_get(op->ptr, "extend"); layernum = RNA_int_get(op->ptr, "layer"); - if (seltype == 0) { + if (extend == 0) { CTX_DATA_BEGIN(C, Base*, base, visible_bases) { ED_base_object_select(base, BA_DESELECT); } @@ -676,8 +673,9 @@ void OBJECT_OT_select_by_layer(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + /* properties */ + RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); 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"); } /************************** Select Inverse *************************/ @@ -878,9 +876,9 @@ void object_flip_name (char *name) static int object_select_mirror_exec(bContext *C, wmOperator *op) { char tmpname[32]; - short seltype; + short extend; - seltype = RNA_enum_get(op->ptr, "seltype"); + extend= RNA_boolean_get(op->ptr, "extend"); CTX_DATA_BEGIN(C, Base*, primbase, selected_bases) { @@ -894,7 +892,7 @@ static int object_select_mirror_exec(bContext *C, wmOperator *op) } CTX_DATA_END; - if (seltype == 0) ED_base_object_select(primbase, BA_DESELECT); + if (extend == 0) ED_base_object_select(primbase, BA_DESELECT); } CTX_DATA_END; @@ -920,7 +918,60 @@ void OBJECT_OT_select_mirror(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_enum(ot->srna, "seltype", prop_select_types, 1, "Selection", "Extend selection or clear selection then select"); + RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first."); +} + + +static int object_select_name_exec(bContext *C, wmOperator *op) +{ + char *name= RNA_string_get_alloc(op->ptr, "name", NULL, 0); + short extend= RNA_boolean_get(op->ptr, "extend"); + short changed = 0; + + if(!extend) { + CTX_DATA_BEGIN(C, Base*, base, visible_bases) { + ED_base_object_select(base, BA_DESELECT); + } + CTX_DATA_END; + } + + CTX_DATA_BEGIN(C, Base*, base, selectable_bases) { + if(strcmp(name, base->object->id.name+2)==0) { + ED_base_object_select(base, BA_SELECT); + changed= 1; + } + } + CTX_DATA_END; + + MEM_freeN(name); + + /* undo? */ + if(changed) { + WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C)); + return OPERATOR_FINISHED; + } + else { + return OPERATOR_CANCELLED; + } +} + +void OBJECT_OT_select_name(wmOperatorType *ot) +{ + + /* identifiers */ + ot->name= "Select Name"; + ot->description = "Select an object with this name"; + ot->idname= "OBJECT_OT_select_name"; + + /* api callbacks */ + ot->exec= object_select_name_exec; + ot->poll= ED_operator_scene_editable; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + RNA_def_string(ot->srna, "name", "", 0, "Name", "Object name to select."); + RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first."); } /**************************** Select Random ****************************/ @@ -928,11 +979,11 @@ void OBJECT_OT_select_mirror(wmOperatorType *ot) static int object_select_random_exec(bContext *C, wmOperator *op) { float percent; - short seltype; + short extend; - seltype = RNA_enum_get(op->ptr, "seltype"); + extend= RNA_boolean_get(op->ptr, "extend"); - if (seltype == 0) { + if (extend == 0) { CTX_DATA_BEGIN(C, Base*, base, visible_bases) { ED_base_object_select(base, BA_DESELECT); } @@ -967,8 +1018,9 @@ void OBJECT_OT_select_random(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + /* properties */ + RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); 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"); } diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 2b207f2f27c..cd0d97eed44 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -27,6 +27,7 @@ #include <stdlib.h> +#include "DNA_action_types.h" #include "DNA_armature_types.h" #include "DNA_curve_types.h" #include "DNA_key_types.h" @@ -115,13 +116,72 @@ static int object_rotation_clear_exec(bContext *C, wmOperator *op) CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) { if(!(ob->mode & OB_MODE_WEIGHT_PAINT)) { - /* eulers can only get cleared if they are not protected */ - if((ob->protectflag & OB_LOCK_ROTX)==0) - ob->rot[0]= ob->drot[0]= 0.0f; - if((ob->protectflag & OB_LOCK_ROTY)==0) - ob->rot[1]= ob->drot[1]= 0.0f; - if((ob->protectflag & OB_LOCK_ROTZ)==0) - ob->rot[2]= ob->drot[2]= 0.0f; + if (ob->protectflag & (OB_LOCK_ROTX|OB_LOCK_ROTY|OB_LOCK_ROTZ|OB_LOCK_ROTW)) { + /* check if convert to eulers for locking... */ + if (ob->protectflag & OB_LOCK_ROT4D) { + /* perform clamping on a component by component basis */ + if ((ob->protectflag & OB_LOCK_ROTW) == 0) + ob->quat[0]= (ob->rotmode == ROT_MODE_AXISANGLE) ? 0.0f : 1.0f; + if ((ob->protectflag & OB_LOCK_ROTX) == 0) + ob->quat[1]= 0.0f; + if ((ob->protectflag & OB_LOCK_ROTY) == 0) + ob->quat[2]= 0.0f; + if ((ob->protectflag & OB_LOCK_ROTZ) == 0) + ob->quat[3]= 0.0f; + } + else { + /* perform clamping using euler form (3-components) */ + float eul[3], oldeul[3], quat1[4]; + + if (ob->rotmode == ROT_MODE_QUAT) { + QUATCOPY(quat1, ob->quat); + QuatToEul(ob->quat, oldeul); + } + else if (ob->rotmode == ROT_MODE_AXISANGLE) { + AxisAngleToEulO(&ob->quat[1], ob->quat[0], oldeul, EULER_ORDER_DEFAULT); + } + else { + VECCOPY(oldeul, ob->rot); + } + + eul[0]= eul[1]= eul[2]= 0.0f; + + if (ob->protectflag & OB_LOCK_ROTX) + eul[0]= oldeul[0]; + if (ob->protectflag & OB_LOCK_ROTY) + eul[1]= oldeul[1]; + if (ob->protectflag & OB_LOCK_ROTZ) + eul[2]= oldeul[2]; + + if (ob->rotmode == ROT_MODE_QUAT) { + EulToQuat(eul, ob->quat); + /* quaternions flip w sign to accumulate rotations correctly */ + if ((quat1[0]<0.0f && ob->quat[0]>0.0f) || (quat1[0]>0.0f && ob->quat[0]<0.0f)) { + QuatMulf(ob->quat, -1.0f); + } + } + else if (ob->rotmode == ROT_MODE_AXISANGLE) { + AxisAngleToEulO(&ob->quat[1], ob->quat[0], oldeul, EULER_ORDER_DEFAULT); + } + else { + VECCOPY(ob->rot, eul); + } + } + } + else { + if (ob->rotmode == ROT_MODE_QUAT) { + ob->quat[1]=ob->quat[2]=ob->quat[3]= 0.0f; + ob->quat[0]= 1.0f; + } + else if (ob->rotmode == ROT_MODE_AXISANGLE) { + /* by default, make rotation of 0 radians around y-axis (roll) */ + ob->quat[0]=ob->quat[1]=ob->quat[3]= 0.0f; + ob->quat[2]= 1.0f; + } + else { + ob->rot[0]= ob->rot[1]= ob->rot[2]= 0.0f; + } + } } ob->recalc |= OB_RECALC_OB; } diff --git a/source/blender/editors/physics/SConscript b/source/blender/editors/physics/SConscript index 5718ae0c217..60b992d2e07 100644 --- a/source/blender/editors/physics/SConscript +++ b/source/blender/editors/physics/SConscript @@ -8,4 +8,11 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' #/intern/guardedalloc ../../gpu' incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern' +if env['OURPLATFORM'] == 'linux2': + cflags='-pthread' + incs += ' ../../../extern/binreloc/include' + +if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): + incs += ' ' + env['BF_PTHREADS_INC'] + env.BlenderLib ( 'bf_editors_physics', sources, Split(incs), [], libtype=['core'], priority=[45] ) diff --git a/source/blender/editors/physics/physics_boids.c b/source/blender/editors/physics/particle_boids.c index 148359068ad..0b63f1a98ff 100644 --- a/source/blender/editors/physics/physics_boids.c +++ b/source/blender/editors/physics/particle_boids.c @@ -25,35 +25,21 @@ * ***** END GPL LICENSE BLOCK ***** */ -//#include <stdlib.h> -//#include <string.h> -// +#include <stdlib.h> + #include "MEM_guardedalloc.h" #include "DNA_boid_types.h" #include "DNA_particle_types.h" -//#include "DNA_curve_types.h" #include "DNA_object_types.h" -//#include "DNA_material_types.h" -//#include "DNA_texture_types.h" #include "DNA_scene_types.h" -//#include "DNA_world_types.h" #include "BKE_boids.h" #include "BKE_context.h" #include "BKE_depsgraph.h" -//#include "BKE_font.h" -//#include "BKE_library.h" -//#include "BKE_main.h" -//#include "BKE_material.h" #include "BKE_particle.h" -//#include "BKE_texture.h" -//#include "BKE_utildefines.h" -//#include "BKE_world.h" -//#include "BLI_editVert.h" #include "BLI_listbase.h" -// #include "RNA_access.h" #include "RNA_enum_types.h" #include "RNA_define.h" @@ -61,13 +47,10 @@ #include "WM_api.h" #include "WM_types.h" -//#include "ED_curve.h" -//#include "ED_mesh.h" -// -//#include "buttons_intern.h" // own include +#include "physics_intern.h" /************************ add/del boid rule operators *********************/ -static int boidrule_add_exec(bContext *C, wmOperator *op) +static int rule_add_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); @@ -95,29 +78,29 @@ static int boidrule_add_exec(bContext *C, wmOperator *op) BLI_addtail(&state->rules, rule); - psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET); + DAG_id_flush_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); return OPERATOR_FINISHED; } -void BOID_OT_boidrule_add(wmOperatorType *ot) +void BOID_OT_rule_add(wmOperatorType *ot) { /* identifiers */ ot->name= "Add Boid Rule"; ot->description = "Add a boid rule to the current boid state."; - ot->idname= "BOID_OT_boidrule_add"; + ot->idname= "BOID_OT_rule_add"; /* api callbacks */ ot->invoke= WM_menu_invoke; - ot->exec= boidrule_add_exec; + ot->exec= rule_add_exec; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; RNA_def_enum(ot->srna, "type", boidrule_type_items, 0, "Type", ""); } -static int boidrule_del_exec(bContext *C, wmOperator *op) +static int rule_del_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); @@ -146,28 +129,28 @@ static int boidrule_del_exec(bContext *C, wmOperator *op) rule->flag |= BOIDRULE_CURRENT; DAG_scene_sort(scene); - psys_flush_particle_settings(scene, psys->part, PSYS_RECALC_RESET); + DAG_id_flush_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); return OPERATOR_FINISHED; } -void BOID_OT_boidrule_del(wmOperatorType *ot) +void BOID_OT_rule_del(wmOperatorType *ot) { /* identifiers */ ot->name= "Remove Boid Rule"; - ot->idname= "BOID_OT_boidrule_del"; + ot->idname= "BOID_OT_rule_del"; /* api callbacks */ - ot->exec= boidrule_del_exec; + ot->exec= rule_del_exec; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } /************************ move up/down boid rule operators *********************/ -static int boidrule_move_up_exec(bContext *C, wmOperator *op) +static int rule_move_up_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); @@ -185,7 +168,7 @@ static int boidrule_move_up_exec(bContext *C, wmOperator *op) BLI_remlink(&state->rules, rule); BLI_insertlink(&state->rules, rule->prev->prev, rule); - psys_flush_particle_settings(scene, psys->part, PSYS_RECALC_RESET); + DAG_id_flush_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); break; } @@ -194,19 +177,19 @@ static int boidrule_move_up_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void BOID_OT_boidrule_move_up(wmOperatorType *ot) +void BOID_OT_rule_move_up(wmOperatorType *ot) { ot->name= "Move Up Boid Rule"; ot->description= "Move boid rule up in the list."; - ot->idname= "BOID_OT_boidrule_move_up"; + ot->idname= "BOID_OT_rule_move_up"; - ot->exec= boidrule_move_up_exec; + ot->exec= rule_move_up_exec; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -static int boidrule_move_down_exec(bContext *C, wmOperator *op) +static int rule_move_down_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); @@ -224,7 +207,7 @@ static int boidrule_move_down_exec(bContext *C, wmOperator *op) BLI_remlink(&state->rules, rule); BLI_insertlink(&state->rules, rule->next, rule); - psys_flush_particle_settings(scene, psys->part, PSYS_RECALC_RESET); + DAG_id_flush_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); break; } @@ -233,13 +216,13 @@ static int boidrule_move_down_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void BOID_OT_boidrule_move_down(wmOperatorType *ot) +void BOID_OT_rule_move_down(wmOperatorType *ot) { ot->name= "Move Down Boid Rule"; ot->description= "Move boid rule down in the list."; - ot->idname= "BOID_OT_boidrule_move_down"; + ot->idname= "BOID_OT_rule_move_down"; - ot->exec= boidrule_move_down_exec; + ot->exec= rule_move_down_exec; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -247,7 +230,7 @@ void BOID_OT_boidrule_move_down(wmOperatorType *ot) /************************ add/del boid state operators *********************/ -static int boidstate_add_exec(bContext *C, wmOperator *op) +static int state_add_exec(bContext *C, wmOperator *op) { PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); ParticleSystem *psys= ptr.data; @@ -273,20 +256,20 @@ static int boidstate_add_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void BOID_OT_boidstate_add(wmOperatorType *ot) +void BOID_OT_state_add(wmOperatorType *ot) { /* identifiers */ ot->name= "Add Boid State"; ot->description = "Add a boid state to the particle system."; - ot->idname= "BOID_OT_boidstate_add"; + ot->idname= "BOID_OT_state_add"; /* api callbacks */ - ot->exec= boidstate_add_exec; + ot->exec= state_add_exec; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -static int boidstate_del_exec(bContext *C, wmOperator *op) +static int state_del_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); @@ -320,28 +303,28 @@ static int boidstate_del_exec(bContext *C, wmOperator *op) state->flag |= BOIDSTATE_CURRENT; DAG_scene_sort(scene); - psys_flush_particle_settings(scene, psys->part, PSYS_RECALC_RESET); + DAG_id_flush_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); return OPERATOR_FINISHED; } -void BOID_OT_boidstate_del(wmOperatorType *ot) +void BOID_OT_state_del(wmOperatorType *ot) { /* identifiers */ ot->name= "Remove Boid State"; - ot->idname= "BOID_OT_boidstate_del"; + ot->idname= "BOID_OT_state_del"; /* api callbacks */ - ot->exec= boidstate_del_exec; + ot->exec= state_del_exec; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } /************************ move up/down boid state operators *********************/ -static int boidstate_move_up_exec(bContext *C, wmOperator *op) +static int state_move_up_exec(bContext *C, wmOperator *op) { PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); ParticleSystem *psys= ptr.data; @@ -366,19 +349,19 @@ static int boidstate_move_up_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void BOID_OT_boidstate_move_up(wmOperatorType *ot) +void BOID_OT_state_move_up(wmOperatorType *ot) { ot->name= "Move Up Boid State"; ot->description= "Move boid state up in the list."; - ot->idname= "BOID_OT_boidstate_move_up"; + ot->idname= "BOID_OT_state_move_up"; - ot->exec= boidstate_move_up_exec; + ot->exec= state_move_up_exec; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -static int boidstate_move_down_exec(bContext *C, wmOperator *op) +static int state_move_down_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); @@ -395,7 +378,7 @@ static int boidstate_move_down_exec(bContext *C, wmOperator *op) if(state->flag & BOIDSTATE_CURRENT && state->next) { BLI_remlink(&boids->states, state); BLI_insertlink(&boids->states, state->next, state); - psys_flush_particle_settings(scene, psys->part, PSYS_RECALC_RESET); + DAG_id_flush_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); break; } } @@ -403,28 +386,15 @@ static int boidstate_move_down_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void BOID_OT_boidstate_move_down(wmOperatorType *ot) +void BOID_OT_state_move_down(wmOperatorType *ot) { ot->name= "Move Down Boid State"; ot->description= "Move boid state down in the list."; - ot->idname= "BOID_OT_boidstate_move_down"; + ot->idname= "BOID_OT_state_move_down"; - ot->exec= boidstate_move_down_exec; + ot->exec= state_move_down_exec; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -/*******************************************************************************/ -void ED_operatortypes_boids(void) -{ - WM_operatortype_append(BOID_OT_boidrule_add); - WM_operatortype_append(BOID_OT_boidrule_del); - WM_operatortype_append(BOID_OT_boidrule_move_up); - WM_operatortype_append(BOID_OT_boidrule_move_down); - - WM_operatortype_append(BOID_OT_boidstate_add); - WM_operatortype_append(BOID_OT_boidstate_del); - WM_operatortype_append(BOID_OT_boidstate_move_up); - WM_operatortype_append(BOID_OT_boidstate_move_down); -} diff --git a/source/blender/editors/physics/editparticle.c b/source/blender/editors/physics/particle_edit.c index 5acdcb40613..ac47ddebc1f 100644 --- a/source/blender/editors/physics/editparticle.c +++ b/source/blender/editors/physics/particle_edit.c @@ -106,35 +106,32 @@ static void PTCacheUndo_clear(PTCacheEdit *edit); /**************************** utilities *******************************/ -static int PE_poll(bContext *C) +int PE_poll(bContext *C) { Scene *scene= CTX_data_scene(C); Object *ob= CTX_data_active_object(C); - PTCacheEdit *edit; - if(!scene || !ob) + if(!scene || !ob || !(ob->mode & OB_MODE_PARTICLE_EDIT)) return 0; - edit= PE_get_current(scene, ob); - - return (edit && (ob->mode & OB_MODE_PARTICLE_EDIT)); + return (PE_get_current(scene, ob) != NULL); } -static int PE_hair_poll(bContext *C) +int PE_hair_poll(bContext *C) { Scene *scene= CTX_data_scene(C); Object *ob= CTX_data_active_object(C); PTCacheEdit *edit; - if(!scene || !ob) + if(!scene || !ob || !(ob->mode & OB_MODE_PARTICLE_EDIT)) return 0; edit= PE_get_current(scene, ob); - return (edit && edit->psys && (ob->mode & OB_MODE_PARTICLE_EDIT)); + return (edit && edit->psys); } -static int PE_poll_3dview(bContext *C) +int PE_poll_3dview(bContext *C) { return PE_poll(C) && CTX_wm_area(C)->spacetype == SPACE_VIEW3D && CTX_wm_region(C)->regiontype == RGN_TYPE_WINDOW; @@ -675,6 +672,9 @@ static void PE_update_mirror_cache(Object *ob, ParticleSystem *psys) psmd= psys_get_modifier(ob, psys); totpart= psys->totpart; + if(!psmd->dm) + return; + tree= BLI_kdtree_new(totpart); /* insert particles into kd tree */ @@ -803,6 +803,9 @@ static void PE_apply_mirror(Object *ob, ParticleSystem *psys) edit= psys->edit; psmd= psys_get_modifier(ob, psys); + if(!edit->mirror_cache || !psmd->dm) + return; + /* we delay settings the PARS_EDIT_RECALC for mirrored particles * to avoid doing mirror twice */ LOOP_POINTS { @@ -841,6 +844,9 @@ static void pe_deflect_emitter(Scene *scene, Object *ob, PTCacheEdit *edit) psys = edit->psys; psmd = psys_get_modifier(ob,psys); + if(!psmd->dm) + return; + LOOP_EDITED_POINTS { psys_mat_hair_to_object(ob, psmd->dm, psys->part->from, psys->particles + p, hairmat); @@ -994,6 +1000,9 @@ static void recalc_emitter_field(Object *ob, ParticleSystem *psys) float *vec, *nor; int i, totface, totvert; + if(!dm) + return; + if(edit->emitter_cosnos) MEM_freeN(edit->emitter_cosnos); @@ -1079,7 +1088,7 @@ static void update_world_cos(Object *ob, PTCacheEdit *edit) POINT_P; KEY_K; float hairmat[4][4]; - if(psys==0 || psys->edit==0) + if(psys==0 || psys->edit==0 || psmd->dm==NULL) return; LOOP_POINTS { @@ -1184,6 +1193,9 @@ void PE_update_object(Scene *scene, Object *ob, int useflag) point->flag &= ~PEP_EDIT_RECALC; } + if(edit->psys) + edit->psys->flag &= ~PSYS_HAIR_UPDATED; + DAG_id_flush_update(&ob->id, OB_RECALC_DATA); } @@ -1761,6 +1773,7 @@ static void rekey_particle(PEData *data, int pa_index) { PTCacheEdit *edit= data->edit; ParticleSystem *psys= edit->psys; + ParticleSimulationData sim = {data->scene, data->ob, edit->psys, NULL}; ParticleData *pa= psys->particles + pa_index; PTCacheEditPoint *point = edit->points + pa_index; ParticleKey state; @@ -1785,7 +1798,7 @@ static void rekey_particle(PEData *data, int pa_index) /* interpolate new keys from old ones */ for(k=1,key++; k<data->totrekey-1; k++,key++) { state.time= (float)k / (float)(data->totrekey-1); - psys_get_particle_on_path(data->scene, data->ob, psys, pa_index, &state, 0); + psys_get_particle_on_path(&sim, pa_index, &state, 0); VECCOPY(key->co, state.co); key->time= sta + k * dval; } @@ -1853,6 +1866,7 @@ static void rekey_particle_to_time(Scene *scene, Object *ob, int pa_index, float { PTCacheEdit *edit= PE_get_current(scene, ob); ParticleSystem *psys; + ParticleSimulationData sim = {scene, ob, edit ? edit->psys : NULL, NULL}; ParticleData *pa; ParticleKey state; HairKey *new_keys, *key; @@ -1872,7 +1886,7 @@ static void rekey_particle_to_time(Scene *scene, Object *ob, int pa_index, float /* interpolate new keys from old ones (roots stay the same) */ for(k=1, key++; k < pa->totkey; k++, key++) { state.time= path_time * (float)k / (float)(pa->totkey-1); - psys_get_particle_on_path(scene, ob, psys, pa_index, &state, 0); + psys_get_particle_on_path(&sim, pa_index, &state, 0); VECCOPY(key->co, state.co); } @@ -2044,6 +2058,7 @@ static void subdivide_particle(PEData *data, int pa_index) { PTCacheEdit *edit= data->edit; ParticleSystem *psys= edit->psys; + ParticleSimulationData sim = {data->scene, data->ob, edit->psys, NULL}; ParticleData *pa= psys->particles + pa_index; PTCacheEditPoint *point = edit->points + pa_index; ParticleKey state; @@ -2083,7 +2098,7 @@ static void subdivide_particle(PEData *data, int pa_index) if(ekey->flag & PEK_SELECT && (ekey+1)->flag & PEK_SELECT) { nkey->time= (key->time + (key+1)->time)*0.5f; state.time= (endtime != 0.0f)? nkey->time/endtime: 0.0f; - psys_get_particle_on_path(data->scene, data->ob, psys, pa_index, &state, 0); + psys_get_particle_on_path(&sim, pa_index, &state, 0); VECCOPY(nkey->co, state.co); nekey->co= nkey->co; @@ -2438,6 +2453,8 @@ static void PE_mirror_x(Scene *scene, Object *ob, int tagged) return; psmd= psys_get_modifier(ob, psys); + if(!psmd->dm) + return; mirrorfaces= mesh_get_x_mirror_faces(ob, NULL); @@ -2875,12 +2892,13 @@ static void brush_add(PEData *data, short number) ParticleSystem *psys= edit->psys; ParticleData *add_pars= MEM_callocN(number*sizeof(ParticleData),"ParticleData add"); ParticleSystemModifierData *psmd= psys_get_modifier(ob,psys); + ParticleSimulationData sim = {scene, ob, psys, psmd}; ParticleEditSettings *pset= PE_settings(scene); int i, k, n= 0, totpart= psys->totpart; short mco[2]; short dmx= 0, dmy= 0; float co1[3], co2[3], min_d, imat[4][4]; - float framestep, timestep= psys_get_timestep(psys->part); + float framestep, timestep= psys_get_timestep(&sim); short size= pset->brush[PE_BRUSH_ADD].size; short size2= size*size; DerivedMesh *dm=0; @@ -2975,8 +2993,8 @@ static void brush_add(PEData *data, short number) } pa->size= 1.0f; - initialize_particle(pa,i,ob,psys,psmd); - reset_particle(scene, pa,psys,psmd,ob,0.0,1.0,0,0,0); + initialize_particle(&sim, pa,i); + reset_particle(&sim, pa, 0.0, 1.0); point->flag |= PEP_EDIT_RECALC; if(pset->flag & PE_X_MIRROR) point->flag |= PEP_TAG; /* signal for duplicate */ @@ -3013,18 +3031,18 @@ static void brush_add(PEData *data, short number) hkey->time= pa->time + k * framestep; key[0].time= hkey->time/ 100.0f; - psys_get_particle_on_path(scene, ob, psys, ptn[0].index, key, 0); + psys_get_particle_on_path(&sim, ptn[0].index, key, 0); VecMulf(key[0].co, weight[0]); if(maxw>1) { key[1].time= key[0].time; - psys_get_particle_on_path(scene, ob, psys, ptn[1].index, key + 1, 0); + psys_get_particle_on_path(&sim, ptn[1].index, key + 1, 0); VecMulf(key[1].co, weight[1]); VECADD(key[0].co, key[0].co, key[1].co); if(maxw>2) { key[2].time= key[0].time; - psys_get_particle_on_path(scene, ob, psys, ptn[2].index, key + 2, 0); + psys_get_particle_on_path(&sim, ptn[2].index, key + 2, 0); VecMulf(key[2].co, weight[2]); VECADD(key[0].co, key[0].co, key[2].co); } @@ -3345,7 +3363,7 @@ static int brush_edit_invoke(bContext *C, wmOperator *op, wmEvent *event) brush_edit_apply_event(C, op, event); - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } @@ -3911,7 +3929,6 @@ static int specials_menu_invoke(bContext *C, wmOperator *op, wmEvent *event) { Scene *scene= CTX_data_scene(C); ParticleEditSettings *pset=PE_settings(scene); - PTCacheEdit *edit = PE_get_current(scene, CTX_data_active_object(C)); uiPopupMenu *pup; uiLayout *layout; @@ -3942,58 +3959,3 @@ void PARTICLE_OT_specials_menu(wmOperatorType *ot) ot->poll= PE_hair_poll; } -/**************************** registration **********************************/ - -void ED_operatortypes_particle(void) -{ - WM_operatortype_append(PARTICLE_OT_select_all_toggle); - WM_operatortype_append(PARTICLE_OT_select_first); - WM_operatortype_append(PARTICLE_OT_select_last); - WM_operatortype_append(PARTICLE_OT_select_linked); - WM_operatortype_append(PARTICLE_OT_select_less); - WM_operatortype_append(PARTICLE_OT_select_more); - - WM_operatortype_append(PARTICLE_OT_hide); - WM_operatortype_append(PARTICLE_OT_reveal); - - WM_operatortype_append(PARTICLE_OT_rekey); - WM_operatortype_append(PARTICLE_OT_subdivide); - WM_operatortype_append(PARTICLE_OT_remove_doubles); - WM_operatortype_append(PARTICLE_OT_delete); - WM_operatortype_append(PARTICLE_OT_mirror); - - WM_operatortype_append(PARTICLE_OT_brush_set); - WM_operatortype_append(PARTICLE_OT_brush_edit); - WM_operatortype_append(PARTICLE_OT_brush_radial_control); - - WM_operatortype_append(PARTICLE_OT_specials_menu); - - WM_operatortype_append(PARTICLE_OT_particle_edit_toggle); - WM_operatortype_append(PARTICLE_OT_edited_clear); -} - -void ED_keymap_particle(wmWindowManager *wm) -{ - ListBase *keymap= WM_keymap_listbase(wm, "Particle", 0, 0); - - WM_keymap_add_item(keymap, "PARTICLE_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "PARTICLE_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); - WM_keymap_add_item(keymap, "PARTICLE_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0); - WM_keymap_add_item(keymap, "PARTICLE_OT_select_linked", LKEY, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "PARTICLE_OT_select_linked", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "deselect", 1); - - WM_keymap_add_item(keymap, "PARTICLE_OT_delete", XKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "PARTICLE_OT_delete", DELKEY, KM_PRESS, 0, 0); - - WM_keymap_add_item(keymap, "PARTICLE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); - WM_keymap_add_item(keymap, "PARTICLE_OT_hide", HKEY, KM_PRESS, 0, 0); - RNA_enum_set(WM_keymap_add_item(keymap, "PARTICLE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1); - - WM_keymap_add_item(keymap, "PARTICLE_OT_brush_edit", ACTIONMOUSE, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "PARTICLE_OT_brush_edit", ACTIONMOUSE, KM_PRESS, KM_SHIFT, 0); - RNA_enum_set(WM_keymap_add_item(keymap, "PARTICLE_OT_brush_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE); - RNA_enum_set(WM_keymap_add_item(keymap, "PARTICLE_OT_brush_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH); - - WM_keymap_add_item(keymap, "PARTICLE_OT_specials_menu", WKEY, KM_PRESS, 0, 0); -} - diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c new file mode 100644 index 00000000000..cef630b6711 --- /dev/null +++ b/source/blender/editors/physics/particle_object.c @@ -0,0 +1,575 @@ +/** + * $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 <string.h> + +#include "MEM_guardedalloc.h" + +#include "DNA_meshdata_types.h" +#include "DNA_modifier_types.h" +#include "DNA_object_types.h" +#include "DNA_particle_types.h" +#include "DNA_scene_types.h" +#include "DNA_windowmanager_types.h" + +#include "BLI_arithb.h" +#include "BLI_listbase.h" + +#include "BKE_context.h" +#include "BKE_depsgraph.h" +#include "BKE_DerivedMesh.h" +#include "BKE_cdderivedmesh.h" +#include "BKE_main.h" +#include "BKE_particle.h" +#include "BKE_pointcache.h" +#include "BKE_utildefines.h" + +#include "RNA_access.h" +#include "RNA_define.h" + +#include "WM_api.h" +#include "WM_types.h" + +#include "ED_particle.h" + +#include "physics_intern.h" + +/********************** particle system slot operators *********************/ + +static int particle_system_add_exec(bContext *C, wmOperator *op) +{ + Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; + Scene *scene = CTX_data_scene(C); + + if(!scene || !ob) + return OPERATOR_CANCELLED; + + object_add_particle_system(scene, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + + return OPERATOR_FINISHED; +} + +void OBJECT_OT_particle_system_add(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Add Particle System Slot"; + ot->idname= "OBJECT_OT_particle_system_add"; + ot->description="Add a particle system."; + + /* api callbacks */ + ot->exec= particle_system_add_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +static int particle_system_remove_exec(bContext *C, wmOperator *op) +{ + Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; + Scene *scene = CTX_data_scene(C); + + if(!scene || !ob) + return OPERATOR_CANCELLED; + + object_remove_particle_system(scene, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + + return OPERATOR_FINISHED; +} + +void OBJECT_OT_particle_system_remove(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Remove Particle System Slot"; + ot->idname= "OBJECT_OT_particle_system_remove"; + ot->description="Remove the selected particle system."; + + /* api callbacks */ + ot->exec= particle_system_remove_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/********************** new particle settings operator *********************/ + +static int psys_poll(bContext *C) +{ + PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); + return (ptr.data != NULL); +} + +static int new_particle_settings_exec(bContext *C, wmOperator *op) +{ + Scene *scene = CTX_data_scene(C); + Main *bmain= CTX_data_main(C); + ParticleSystem *psys; + ParticleSettings *part = NULL; + Object *ob; + PointerRNA ptr; + + ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); + + psys = ptr.data; + + /* add or copy particle setting */ + if(psys->part) + part= psys_copy_settings(psys->part); + else + part= psys_new_settings("ParticleSettings", bmain); + + ob= ptr.id.data; + + if(psys->part) + psys->part->id.us--; + + psys->part = part; + + psys_check_boid_data(psys); + + DAG_scene_sort(scene); + DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + + WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + + return OPERATOR_FINISHED; +} + +void PARTICLE_OT_new(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "New Particle Settings"; + ot->idname= "PARTICLE_OT_new"; + ot->description="Add new particle settings."; + + /* api callbacks */ + ot->exec= new_particle_settings_exec; + ot->poll= psys_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/********************** keyed particle target operators *********************/ + +static int new_particle_target_exec(bContext *C, wmOperator *op) +{ + Scene *scene = CTX_data_scene(C); + PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); + ParticleSystem *psys= ptr.data; + Object *ob = ptr.id.data; + + ParticleTarget *pt; + + if(!psys) + return OPERATOR_CANCELLED; + + pt = psys->targets.first; + for(; pt; pt=pt->next) + pt->flag &= ~PTARGET_CURRENT; + + pt = MEM_callocN(sizeof(ParticleTarget), "keyed particle target"); + + pt->flag |= PTARGET_CURRENT; + pt->psys = 1; + + BLI_addtail(&psys->targets, pt); + + DAG_scene_sort(scene); + DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + + WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + + return OPERATOR_FINISHED; +} + +void PARTICLE_OT_new_target(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "New Particle Target"; + ot->idname= "PARTICLE_OT_new_target"; + ot->description="Add a new particle target."; + + /* api callbacks */ + ot->exec= new_particle_target_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +static int remove_particle_target_exec(bContext *C, wmOperator *op) +{ + Scene *scene = CTX_data_scene(C); + PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); + ParticleSystem *psys= ptr.data; + Object *ob = ptr.id.data; + + ParticleTarget *pt; + + if(!psys) + return OPERATOR_CANCELLED; + + pt = psys->targets.first; + for(; pt; pt=pt->next) { + if(pt->flag & PTARGET_CURRENT) { + BLI_remlink(&psys->targets, pt); + MEM_freeN(pt); + break; + } + + } + pt = psys->targets.last; + + if(pt) + pt->flag |= PTARGET_CURRENT; + + DAG_scene_sort(scene); + DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + + WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + + return OPERATOR_FINISHED; +} + +void PARTICLE_OT_remove_target(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Remove Particle Target"; + ot->idname= "PARTICLE_OT_remove_target"; + ot->description="Remove the selected particle target."; + + /* api callbacks */ + ot->exec= remove_particle_target_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/************************ move up particle target operator *********************/ + +static int target_move_up_exec(bContext *C, wmOperator *op) +{ + PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); + ParticleSystem *psys= ptr.data; + Object *ob = ptr.id.data; + ParticleTarget *pt; + + if(!psys) + return OPERATOR_CANCELLED; + + pt = psys->targets.first; + for(; pt; pt=pt->next) { + if(pt->flag & PTARGET_CURRENT && pt->prev) { + BLI_remlink(&psys->targets, pt); + BLI_insertlink(&psys->targets, pt->prev->prev, pt); + + DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + break; + } + } + + return OPERATOR_FINISHED; +} + +void PARTICLE_OT_target_move_up(wmOperatorType *ot) +{ + ot->name= "Move Up Target"; + ot->idname= "PARTICLE_OT_target_move_up"; + ot->description= "Move particle target up in the list."; + + ot->exec= target_move_up_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/************************ move down particle target operator *********************/ + +static int target_move_down_exec(bContext *C, wmOperator *op) +{ + PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); + ParticleSystem *psys= ptr.data; + Object *ob = ptr.id.data; + ParticleTarget *pt; + + if(!psys) + return OPERATOR_CANCELLED; + pt = psys->targets.first; + for(; pt; pt=pt->next) { + if(pt->flag & PTARGET_CURRENT && pt->next) { + BLI_remlink(&psys->targets, pt); + BLI_insertlink(&psys->targets, pt->next, pt); + + DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + break; + } + } + + return OPERATOR_FINISHED; +} + +void PARTICLE_OT_target_move_down(wmOperatorType *ot) +{ + ot->name= "Move Down Target"; + ot->idname= "PARTICLE_OT_target_move_down"; + ot->description= "Move particle target down in the list."; + + ot->exec= target_move_down_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/************************ connect/disconnect hair operators *********************/ + +static void disconnect_hair(Scene *scene, Object *ob, ParticleSystem *psys) +{ + ParticleSystemModifierData *psmd = psys_get_modifier(ob,psys); + ParticleData *pa; + PTCacheEdit *edit; + PTCacheEditPoint *point; + PTCacheEditKey *ekey = NULL; + HairKey *key; + int i, k; + float hairmat[4][4]; + + if(!ob || !psys || psys->flag & PSYS_GLOBAL_HAIR) + return; + + if(!psys->part || psys->part->type != PART_HAIR) + return; + + edit = psys->edit; + point= edit ? edit->points : NULL; + + for(i=0, pa=psys->particles; i<psys->totpart; i++,pa++) { + if(point) { + ekey = point->keys; + point++; + } + + psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat); + + for(k=0,key=pa->hair; k<pa->totkey; k++,key++) { + Mat4MulVecfl(hairmat,key->co); + + if(ekey) { + ekey->flag &= ~PEK_USE_WCO; + ekey++; + } + } + } + + psys_free_path_cache(psys, psys->edit); + + psys->flag |= PSYS_GLOBAL_HAIR; + + PE_update_object(scene, ob, 0); +} + +static int disconnect_hair_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; + PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); + ParticleSystem *psys= NULL; + int all = RNA_boolean_get(op->ptr, "all"); + + if(!ob) + return OPERATOR_CANCELLED; + + if(all) { + for(psys=ob->particlesystem.first; psys; psys=psys->next) { + disconnect_hair(scene, ob, psys); + } + } + else { + psys = ptr.data; + disconnect_hair(scene, ob, psys); + } + + WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + + return OPERATOR_FINISHED; +} + +void PARTICLE_OT_disconnect_hair(wmOperatorType *ot) +{ + ot->name= "Disconnect Hair"; + ot->description= "Disconnect hair from the emitter mesh."; + ot->idname= "PARTICLE_OT_disconnect_hair"; + + ot->exec= disconnect_hair_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + RNA_def_boolean(ot->srna, "all", 0, "All hair", "Disconnect all hair systems from the emitter mesh"); +} + +static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys) +{ + ParticleSystemModifierData *psmd = psys_get_modifier(ob,psys); + ParticleData *pa; + PTCacheEdit *edit; + PTCacheEditPoint *point; + PTCacheEditKey *ekey; + HairKey *key; + BVHTreeFromMesh bvhtree; + BVHTreeNearest nearest; + MFace *mface; + DerivedMesh *dm = NULL; + int numverts; + int i, k; + float hairmat[4][4], imat[4][4]; + float v[4][3], vec[3]; + + if(!psys || !psys->part || psys->part->type != PART_HAIR) + return; + + edit= psys->edit; + point= edit ? edit->points : NULL; + + if(psmd->dm->deformedOnly) + dm= psmd->dm; + else + dm= mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH); + + numverts = dm->getNumVerts (dm); + + memset( &bvhtree, 0, sizeof(bvhtree) ); + + /* convert to global coordinates */ + for (i=0; i<numverts; i++) + Mat4MulVecfl (ob->obmat, CDDM_get_vert(dm, i)->co); + + bvhtree_from_mesh_faces(&bvhtree, dm, 0.0, 2, 6); + + for(i=0, pa= psys->particles; i<psys->totpart; i++,pa++) { + key = pa->hair; + + nearest.index = -1; + nearest.dist = FLT_MAX; + + BLI_bvhtree_find_nearest(bvhtree.tree, key->co, &nearest, bvhtree.nearest_callback, &bvhtree); + + if(nearest.index == -1) { + printf("No nearest point found for hair root!"); + continue; + } + + mface = CDDM_get_face(dm,nearest.index); + + VecCopyf(v[0], CDDM_get_vert(dm,mface->v1)->co); + VecCopyf(v[1], CDDM_get_vert(dm,mface->v2)->co); + VecCopyf(v[2], CDDM_get_vert(dm,mface->v3)->co); + if(mface->v4) { + VecCopyf(v[3], CDDM_get_vert(dm,mface->v4)->co); + MeanValueWeights(v, 4, nearest.co, pa->fuv); + } + else + MeanValueWeights(v, 3, nearest.co, pa->fuv); + + pa->num = nearest.index; + pa->num_dmcache = psys_particle_dm_face_lookup(ob,psmd->dm,pa->num,pa->fuv,NULL); + + psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat); + Mat4Invert(imat,hairmat); + + VECSUB(vec, nearest.co, key->co); + + if(point) { + ekey = point->keys; + point++; + } + + for(k=0,key=pa->hair; k<pa->totkey; k++,key++) { + VECADD(key->co, key->co, vec); + Mat4MulVecfl(imat,key->co); + + if(ekey) { + ekey->flag |= PEK_USE_WCO; + ekey++; + } + } + } + + free_bvhtree_from_mesh(&bvhtree); + if(!psmd->dm->deformedOnly) + dm->release(dm); + + psys_free_path_cache(psys, psys->edit); + + psys->flag &= ~PSYS_GLOBAL_HAIR; + + PE_update_object(scene, ob, 0); +} + +static int connect_hair_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; + PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); + ParticleSystem *psys= NULL; + int all = RNA_boolean_get(op->ptr, "all"); + + if(!ob) + return OPERATOR_CANCELLED; + + if(all) { + for(psys=ob->particlesystem.first; psys; psys=psys->next) { + connect_hair(scene, ob, psys); + } + } + else { + psys = ptr.data; + connect_hair(scene, ob, psys); + } + + WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + + return OPERATOR_FINISHED; +} + +void PARTICLE_OT_connect_hair(wmOperatorType *ot) +{ + ot->name= "Connect Hair"; + ot->description= "Connect hair to the emitter mesh."; + ot->idname= "PARTICLE_OT_connect_hair"; + + ot->exec= connect_hair_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + RNA_def_boolean(ot->srna, "all", 0, "All hair", "Connect all hair systems to the emitter mesh"); +} + diff --git a/source/blender/editors/physics/ed_fluidsim.c b/source/blender/editors/physics/physics_fluid.c index 093fa3f0a49..126c21a554b 100644 --- a/source/blender/editors/physics/ed_fluidsim.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -93,6 +93,8 @@ #include "WM_api.h" #include "WM_types.h" +#include "physics_intern.h" // own include + /* enable/disable overall compilation */ #ifndef DISABLE_ELBEEM @@ -1200,8 +1202,3 @@ void FLUID_OT_bake(wmOperatorType *ot) ot->poll= ED_operator_object_active; } -void ED_operatortypes_fluid(void) -{ - WM_operatortype_append(FLUID_OT_bake); -} - diff --git a/source/blender/editors/physics/physics_intern.h b/source/blender/editors/physics/physics_intern.h index e03649575cb..956f26c478d 100644 --- a/source/blender/editors/physics/physics_intern.h +++ b/source/blender/editors/physics/physics_intern.h @@ -33,6 +33,72 @@ #ifndef ED_PHYSICS_INTERN_H #define ED_PHYSICS_INTERN_H +struct wmOperatorType; + +/* particle_edit.c */ +int PE_poll(struct bContext *C); +int PE_hair_poll(struct bContext *C); +int PE_poll_3dview(struct bContext *C); + +void PARTICLE_OT_select_all_toggle(struct wmOperatorType *ot); +void PARTICLE_OT_select_first(struct wmOperatorType *ot); +void PARTICLE_OT_select_last(struct wmOperatorType *ot); +void PARTICLE_OT_select_linked(struct wmOperatorType *ot); +void PARTICLE_OT_select_less(struct wmOperatorType *ot); +void PARTICLE_OT_select_more(struct wmOperatorType *ot); + +void PARTICLE_OT_hide(struct wmOperatorType *ot); +void PARTICLE_OT_reveal(struct wmOperatorType *ot); + +void PARTICLE_OT_rekey(struct wmOperatorType *ot); +void PARTICLE_OT_subdivide(struct wmOperatorType *ot); +void PARTICLE_OT_remove_doubles(struct wmOperatorType *ot); +void PARTICLE_OT_delete(struct wmOperatorType *ot); +void PARTICLE_OT_mirror(struct wmOperatorType *ot); + +void PARTICLE_OT_brush_set(struct wmOperatorType *ot); +void PARTICLE_OT_brush_edit(struct wmOperatorType *ot); +void PARTICLE_OT_brush_radial_control(struct wmOperatorType *ot); + +void PARTICLE_OT_specials_menu(struct wmOperatorType *ot); + +void PARTICLE_OT_particle_edit_toggle(struct wmOperatorType *ot); +void PARTICLE_OT_edited_clear(struct wmOperatorType *ot); + +/* particle_object.c */ +void OBJECT_OT_particle_system_add(struct wmOperatorType *ot); +void OBJECT_OT_particle_system_remove(struct wmOperatorType *ot); + +void PARTICLE_OT_new(struct wmOperatorType *ot); +void PARTICLE_OT_new_target(struct wmOperatorType *ot); +void PARTICLE_OT_remove_target(struct wmOperatorType *ot); +void PARTICLE_OT_target_move_up(struct wmOperatorType *ot); +void PARTICLE_OT_target_move_down(struct wmOperatorType *ot); +void PARTICLE_OT_connect_hair(struct wmOperatorType *ot); +void PARTICLE_OT_disconnect_hair(struct wmOperatorType *ot); + +/* particle_boids.c */ +void BOID_OT_rule_add(struct wmOperatorType *ot); +void BOID_OT_rule_del(struct wmOperatorType *ot); +void BOID_OT_rule_move_up(struct wmOperatorType *ot); +void BOID_OT_rule_move_down(struct wmOperatorType *ot); + +void BOID_OT_state_add(struct wmOperatorType *ot); +void BOID_OT_state_del(struct wmOperatorType *ot); +void BOID_OT_state_move_up(struct wmOperatorType *ot); +void BOID_OT_state_move_down(struct wmOperatorType *ot); + +/* physics_fluid.c */ +void FLUID_OT_bake(struct wmOperatorType *ot); + +/* physics_pointcache.c */ +void PTCACHE_OT_bake_all(struct wmOperatorType *ot); +void PTCACHE_OT_free_bake_all(struct wmOperatorType *ot); +void PTCACHE_OT_bake(struct wmOperatorType *ot); +void PTCACHE_OT_free_bake(struct wmOperatorType *ot); +void PTCACHE_OT_bake_from_cache(struct wmOperatorType *ot); +void PTCACHE_OT_add_new(struct wmOperatorType *ot); +void PTCACHE_OT_remove(struct wmOperatorType *ot); #endif /* ED_PHYSICS_INTERN_H */ diff --git a/source/blender/editors/physics/physics_ops.c b/source/blender/editors/physics/physics_ops.c new file mode 100644 index 00000000000..a62d3d8fd78 --- /dev/null +++ b/source/blender/editors/physics/physics_ops.c @@ -0,0 +1,173 @@ +/** + * $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 "DNA_windowmanager_types.h" + +#include "RNA_access.h" + +#include "WM_api.h" +#include "WM_types.h" + +#include "ED_physics.h" + +#include "physics_intern.h" // own include + +/***************************** particles ***********************************/ + +static void operatortypes_particle(void) +{ + WM_operatortype_append(PARTICLE_OT_select_all_toggle); + WM_operatortype_append(PARTICLE_OT_select_first); + WM_operatortype_append(PARTICLE_OT_select_last); + WM_operatortype_append(PARTICLE_OT_select_linked); + WM_operatortype_append(PARTICLE_OT_select_less); + WM_operatortype_append(PARTICLE_OT_select_more); + + WM_operatortype_append(PARTICLE_OT_hide); + WM_operatortype_append(PARTICLE_OT_reveal); + + WM_operatortype_append(PARTICLE_OT_rekey); + WM_operatortype_append(PARTICLE_OT_subdivide); + WM_operatortype_append(PARTICLE_OT_remove_doubles); + WM_operatortype_append(PARTICLE_OT_delete); + WM_operatortype_append(PARTICLE_OT_mirror); + + WM_operatortype_append(PARTICLE_OT_brush_set); + WM_operatortype_append(PARTICLE_OT_brush_edit); + WM_operatortype_append(PARTICLE_OT_brush_radial_control); + + WM_operatortype_append(PARTICLE_OT_specials_menu); + + WM_operatortype_append(PARTICLE_OT_particle_edit_toggle); + WM_operatortype_append(PARTICLE_OT_edited_clear); + + + WM_operatortype_append(OBJECT_OT_particle_system_add); + WM_operatortype_append(OBJECT_OT_particle_system_remove); + + WM_operatortype_append(PARTICLE_OT_new); + WM_operatortype_append(PARTICLE_OT_new_target); + WM_operatortype_append(PARTICLE_OT_remove_target); + WM_operatortype_append(PARTICLE_OT_target_move_up); + WM_operatortype_append(PARTICLE_OT_target_move_down); + WM_operatortype_append(PARTICLE_OT_connect_hair); + WM_operatortype_append(PARTICLE_OT_disconnect_hair); +} + +static void keymap_particle(wmWindowManager *wm) +{ + wmKeyMap *keymap; + + keymap= WM_keymap_find(wm, "Particle", 0, 0); + keymap->poll= PE_poll; + + WM_keymap_add_item(keymap, "PARTICLE_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "PARTICLE_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "PARTICLE_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "PARTICLE_OT_select_linked", LKEY, KM_PRESS, 0, 0); + RNA_boolean_set(WM_keymap_add_item(keymap, "PARTICLE_OT_select_linked", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "deselect", 1); + + WM_keymap_add_item(keymap, "PARTICLE_OT_delete", XKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "PARTICLE_OT_delete", DELKEY, KM_PRESS, 0, 0); + + WM_keymap_add_item(keymap, "PARTICLE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_add_item(keymap, "PARTICLE_OT_hide", HKEY, KM_PRESS, 0, 0); + RNA_enum_set(WM_keymap_add_item(keymap, "PARTICLE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1); + + WM_keymap_add_item(keymap, "PARTICLE_OT_brush_edit", ACTIONMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "PARTICLE_OT_brush_edit", ACTIONMOUSE, KM_PRESS, KM_SHIFT, 0); + RNA_enum_set(WM_keymap_add_item(keymap, "PARTICLE_OT_brush_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE); + RNA_enum_set(WM_keymap_add_item(keymap, "PARTICLE_OT_brush_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH); + + WM_keymap_add_item(keymap, "PARTICLE_OT_specials_menu", WKEY, KM_PRESS, 0, 0); +} + +/******************************* boids *************************************/ + +static void operatortypes_boids(void) +{ + WM_operatortype_append(BOID_OT_rule_add); + WM_operatortype_append(BOID_OT_rule_del); + WM_operatortype_append(BOID_OT_rule_move_up); + WM_operatortype_append(BOID_OT_rule_move_down); + + WM_operatortype_append(BOID_OT_state_add); + WM_operatortype_append(BOID_OT_state_del); + WM_operatortype_append(BOID_OT_state_move_up); + WM_operatortype_append(BOID_OT_state_move_down); +} + +/********************************* fluid ***********************************/ + +static void operatortypes_fluid(void) +{ + WM_operatortype_append(FLUID_OT_bake); +} + +/**************************** point cache **********************************/ + +static void operatortypes_pointcache(void) +{ + WM_operatortype_append(PTCACHE_OT_bake_all); + WM_operatortype_append(PTCACHE_OT_free_bake_all); + WM_operatortype_append(PTCACHE_OT_bake); + WM_operatortype_append(PTCACHE_OT_free_bake); + WM_operatortype_append(PTCACHE_OT_bake_from_cache); + WM_operatortype_append(PTCACHE_OT_add_new); + WM_operatortype_append(PTCACHE_OT_remove); +} + +//static void keymap_pointcache(wmWindowManager *wm) +//{ +// wmKeyMap *keymap= WM_keymap_find(wm, "Pointcache", 0, 0); +// +// WM_keymap_add_item(keymap, "PHYSICS_OT_bake_all", AKEY, KM_PRESS, 0, 0); +// WM_keymap_add_item(keymap, "PHYSICS_OT_free_all", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); +// WM_keymap_add_item(keymap, "PHYSICS_OT_bake_particle_system", PADMINUS, KM_PRESS, KM_CTRL, 0); +// WM_keymap_add_item(keymap, "PHYSICS_OT_free_particle_system", LKEY, KM_PRESS, 0, 0); +//} + +/****************************** general ************************************/ + +void ED_operatortypes_physics(void) +{ + operatortypes_particle(); + operatortypes_boids(); + operatortypes_fluid(); + operatortypes_pointcache(); +} + +void ED_keymap_physics(wmWindowManager *wm) +{ + keymap_particle(wm); + //keymap_pointcache(wm); +} + + + diff --git a/source/blender/editors/physics/ed_pointcache.c b/source/blender/editors/physics/physics_pointcache.c index f2c7b64032f..26099a18966 100644 --- a/source/blender/editors/physics/ed_pointcache.c +++ b/source/blender/editors/physics/physics_pointcache.c @@ -27,6 +27,8 @@ * ***** END GPL LICENSE BLOCK ***** */ +#include <stdlib.h> + #include "MEM_guardedalloc.h" #include "DNA_scene_types.h" @@ -332,26 +334,4 @@ void PTCACHE_OT_remove(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -/**************************** registration **********************************/ - -void ED_operatortypes_pointcache(void) -{ - WM_operatortype_append(PTCACHE_OT_bake_all); - WM_operatortype_append(PTCACHE_OT_free_bake_all); - WM_operatortype_append(PTCACHE_OT_bake); - WM_operatortype_append(PTCACHE_OT_free_bake); - WM_operatortype_append(PTCACHE_OT_bake_from_cache); - WM_operatortype_append(PTCACHE_OT_add_new); - WM_operatortype_append(PTCACHE_OT_remove); -} - -//void ED_keymap_pointcache(wmWindowManager *wm) -//{ -// ListBase *keymap= WM_keymap_listbase(wm, "Pointcache", 0, 0); -// -// WM_keymap_add_item(keymap, "PHYSICS_OT_bake_all", AKEY, KM_PRESS, 0, 0); -// WM_keymap_add_item(keymap, "PHYSICS_OT_free_all", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); -// WM_keymap_add_item(keymap, "PHYSICS_OT_bake_particle_system", PADMINUS, KM_PRESS, KM_CTRL, 0); -// WM_keymap_add_item(keymap, "PHYSICS_OT_free_particle_system", LKEY, KM_PRESS, 0, 0); -//} diff --git a/source/blender/editors/preview/Makefile b/source/blender/editors/render/Makefile index 48e1dc64673..ed25f0be02a 100644 --- a/source/blender/editors/preview/Makefile +++ b/source/blender/editors/render/Makefile @@ -28,7 +28,7 @@ # # Makes module object directory and bounces make to subdirectories. -LIBNAME = ed_preview +LIBNAME = ed_render DIR = $(OCGDIR)/blender/$(LIBNAME) include nan_compile.mk diff --git a/source/blender/editors/preview/SConscript b/source/blender/editors/render/SConscript index 922232822ff..bddc5ed10e0 100644 --- a/source/blender/editors/preview/SConscript +++ b/source/blender/editors/render/SConscript @@ -9,4 +9,11 @@ incs += ' #/intern/guardedalloc ../../gpu' incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern' incs += ' ../../blenloader' -env.BlenderLib ( 'bf_editors_preview', sources, Split(incs), [], libtype=['core'], priority=[45] ) +if env['OURPLATFORM'] == 'linux2': + cflags='-pthread' + incs += ' ../../../extern/binreloc/include' + +if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): + incs += ' ' + env['BF_PTHREADS_INC'] + +env.BlenderLib ( 'bf_editors_render', sources, Split(incs), [], libtype=['core'], priority=[45] ) diff --git a/source/blender/editors/preview/previewrender_intern.h b/source/blender/editors/render/render_intern.h index 74a3aeee754..dccc2d36002 100644 --- a/source/blender/editors/preview/previewrender_intern.h +++ b/source/blender/editors/render/render_intern.h @@ -26,12 +26,24 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef PREVIEWRENDER_INTERN_H -#define PREVIEWRENDER_INTERN_H +#ifndef RENDER_INTERN_H +#define RENDER_INTERN_H -/* internal exports only */ +struct wmOperatorType; +/* render_shading.c */ +void OBJECT_OT_material_slot_add(struct wmOperatorType *ot); +void OBJECT_OT_material_slot_remove(struct wmOperatorType *ot); +void OBJECT_OT_material_slot_assign(struct wmOperatorType *ot); +void OBJECT_OT_material_slot_select(struct wmOperatorType *ot); +void OBJECT_OT_material_slot_deselect(struct wmOperatorType *ot); +void MATERIAL_OT_new(struct wmOperatorType *ot); +void TEXTURE_OT_new(struct wmOperatorType *ot); +void WORLD_OT_new(struct wmOperatorType *ot); -#endif /* PREVIEWRENDER_INTERN_H */ +void SCENE_OT_render_layer_add(struct wmOperatorType *ot); +void SCENE_OT_render_layer_remove(struct wmOperatorType *ot); + +#endif /* RENDER_INTERN_H */ diff --git a/source/blender/editors/render/render_ops.c b/source/blender/editors/render/render_ops.c new file mode 100644 index 00000000000..8b60582d466 --- /dev/null +++ b/source/blender/editors/render/render_ops.c @@ -0,0 +1,54 @@ +/** + * $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 "DNA_windowmanager_types.h" + +#include "WM_api.h" +#include "WM_types.h" + +#include "render_intern.h" // own include + +/***************************** render ***********************************/ + +void ED_operatortypes_render(void) +{ + WM_operatortype_append(OBJECT_OT_material_slot_add); + WM_operatortype_append(OBJECT_OT_material_slot_remove); + WM_operatortype_append(OBJECT_OT_material_slot_assign); + WM_operatortype_append(OBJECT_OT_material_slot_select); + WM_operatortype_append(OBJECT_OT_material_slot_deselect); + + WM_operatortype_append(MATERIAL_OT_new); + WM_operatortype_append(TEXTURE_OT_new); + WM_operatortype_append(WORLD_OT_new); + + WM_operatortype_append(SCENE_OT_render_layer_add); + WM_operatortype_append(SCENE_OT_render_layer_remove); +} + diff --git a/source/blender/editors/preview/previewrender.c b/source/blender/editors/render/render_preview.c index 714ebcef0fb..4a671e4d2ba 100644 --- a/source/blender/editors/preview/previewrender.c +++ b/source/blender/editors/render/render_preview.c @@ -88,13 +88,12 @@ #include "WM_api.h" #include "WM_types.h" -#include "ED_anim_api.h" -#include "ED_previewrender.h" +#include "ED_render.h" #include "ED_view3d.h" #include "UI_interface.h" -#include "previewrender_intern.h" +#include "render_intern.h" #define PR_XMIN 10 #define PR_YMIN 5 @@ -116,7 +115,7 @@ typedef struct ShaderPreview { MTex *slot; int sizex, sizey; - int *pr_rect; + unsigned int *pr_rect; int pr_method; } ShaderPreview; @@ -295,6 +294,14 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre } sce->r.color_mgt_flag = scene->r.color_mgt_flag; + /* exception: don't color manage texture previews or icons */ + if((sp && sp->pr_method==PR_ICON_RENDER) || id_type == ID_TE) + sce->r.color_mgt_flag &= ~R_COLOR_MANAGEMENT; + if((sp && sp->pr_method==PR_ICON_RENDER) && id_type != ID_WO) + sce->r.alphamode= R_ALPHAPREMUL; + else + sce->r.alphamode= R_ADDSKY; + sce->r.cfra= scene->r.cfra; if(id_type==ID_MA) { @@ -327,6 +334,19 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre } } } + + /* turn off bounce lights for volume, + * doesn't make much visual difference and slows it down too */ + if(mat->material_type == MA_TYPE_VOLUME) { + for(base= sce->base.first; base; base= base->next) { + if(base->object->type == OB_LAMP) { + /* if doesn't match 'Lamp.002' --> main key light */ + if( strcmp(base->object->id.name+2, "Lamp.002") != 0 ) { + base->object->restrictflag |= OB_RESTRICT_RENDER; + } + } + } + } if(sp->pr_method==PR_ICON_RENDER) { @@ -356,6 +376,8 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre if(matar && actcol < base->object->totcol) (*matar)[actcol]= mat; + } else if (base->object->type == OB_LAMP) { + base->object->restrictflag &= ~OB_RESTRICT_RENDER; } } } @@ -365,9 +387,6 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre sce->lay= 1<<MA_TEXTURE; - /* exception: don't color manage texture previews */ - sce->r.color_mgt_flag &= ~R_COLOR_MANAGEMENT; - for(base= sce->base.first; base; base= base->next) { if(base->object->id.name[2]=='t') { Material *mat= give_current_material(base->object, base->object->actcol); @@ -427,6 +446,7 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre /* uses ROUNDBOX button in block to get the rect */ static int ed_preview_draw_rect(ScrArea *sa, Scene *sce, ID *id, int split, int first, rcti *rect, rcti *newrect) { + Render *re; RenderResult rres; char name[32]; int gamma_correct=0; @@ -451,7 +471,8 @@ static int ed_preview_draw_rect(ScrArea *sa, Scene *sce, ID *id, int split, int } } - RE_GetResultImage(RE_GetRender(name), &rres); + re= RE_GetRender(name); + RE_AcquireResultImage(re, &rres); if(rres.rectf) { @@ -463,10 +484,13 @@ static int ed_preview_draw_rect(ScrArea *sa, Scene *sce, ID *id, int split, int glTranslatef(offx, 0, 0); glaDrawPixelsSafe_to32(rect->xmin, rect->ymin, rres.rectx, rres.recty, rres.rectx, rres.rectf, gamma_correct); glPopMatrix(); + + RE_ReleaseResultImage(re); return 1; } } + RE_ReleaseResultImage(re); return 0; } @@ -510,6 +534,12 @@ void ED_preview_draw(const bContext *C, void *idp, void *parentp, void *slotp, r } } +/* ******************************** Icon Preview **************************** */ + +void ED_preview_icon_draw(const bContext *C, void *idp, void *arg1, void *arg2, rcti *rect) +{ +} + /* *************************** Preview for 3d window *********************** */ void view3d_previewrender_progress(RenderResult *rr, volatile rcti *renrect) @@ -636,7 +666,6 @@ void BIF_view3d_previewrender_clear(ScrArea *sa) /* afterqueue call */ void BIF_view3d_previewrender(Scene *scene, ScrArea *sa) { - bContext *C= NULL; View3D *v3d= sa->spacedata.first; RegionView3D *rv3d= NULL; // XXX Render *re; @@ -736,7 +765,7 @@ void BIF_view3d_previewrender(Scene *scene, ScrArea *sa) /* database can have created render-resol data... */ if(rstats->convertdone) - ED_anim_dag_flush_update(C); // <--- only current scene XXX + DAG_scene_flush_update(scene, scene->lay, 0); //printf("dbase update\n"); } @@ -821,7 +850,7 @@ void BIF_view3d_previewdraw(struct ScrArea *sa, struct uiBlock *block) } -/* **************************** New preview system ****************** */ +/* **************************** new shader preview system ****************** */ /* inside thread, called by renderer, sets job update value */ static void shader_preview_draw(void *spv, RenderResult *rr, volatile struct rcti *rect) @@ -908,7 +937,7 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs /* handle results */ if(sp->pr_method==PR_ICON_RENDER) { if(sp->pr_rect) - RE_ResultGet32(re, (unsigned int *)sp->pr_rect); + RE_ResultGet32(re, sp->pr_rect); } else { /* validate owner */ @@ -921,7 +950,7 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs preview_prepare_scene(sp->scene, NULL, GS(id->name), NULL); } -/* runs inside thread for material, in foreground for icons */ +/* runs inside thread for material and icons */ static void shader_preview_startjob(void *customdata, short *stop, short *do_update) { ShaderPreview *sp= customdata; @@ -946,63 +975,180 @@ static void shader_preview_free(void *customdata) MEM_freeN(sp); } -void ED_preview_shader_job(const bContext *C, void *owner, ID *id, ID *parent, MTex *slot, int sizex, int sizey) +/* ************************* icon preview ********************** */ + +static void icon_copy_rect(ImBuf *ibuf, unsigned int w, unsigned int h, unsigned int *rect) { - wmJob *steve; - ShaderPreview *sp; + struct ImBuf *ima; + unsigned int *drect, *srect; + float scaledx, scaledy; + short ex, ey, dx, dy; - /* XXX ugly global still, but we can't do preview while rendering */ - if(G.rendering) + /* paranoia test */ + if(ibuf==NULL || (ibuf->rect==NULL && ibuf->rect_float==NULL)) return; - if(GS(id->name) == ID_TE) { - ntreeTexSetPreviewFlag(1); + /* waste of cpu cyles... but the imbuf API has no other way to scale fast (ton) */ + ima = IMB_dupImBuf(ibuf); + + if (!ima) + return; + + if (ima->x > ima->y) { + scaledx = (float)w; + scaledy = ( (float)ima->y/(float)ima->x )*(float)w; + } + else { + scaledx = ( (float)ima->x/(float)ima->y )*(float)h; + scaledy = (float)h; } - steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), owner); + ex = (short)scaledx; + ey = (short)scaledy; + + dx = (w - ex) / 2; + dy = (h - ey) / 2; + + IMB_scalefastImBuf(ima, ex, ey); + + /* if needed, convert to 32 bits */ + if(ima->rect==NULL) + IMB_rect_from_float(ima); + + srect = ima->rect; + drect = rect; + + drect+= dy*w+dx; + for (;ey > 0; ey--){ + memcpy(drect,srect, ex * sizeof(int)); + drect += w; + srect += ima->x; + } + + IMB_freeImBuf(ima); +} + +static void set_alpha(char *cp, int sizex, int sizey, char alpha) +{ + int a, size= sizex*sizey; + + for(a=0; a<size; a++, cp+=4) + cp[3]= alpha; +} + +static void icon_preview_startjob(void *customdata, short *stop, short *do_update) +{ + ShaderPreview *sp= customdata; + ID *id= sp->id; + short idtype= GS(id->name); + + if(idtype == ID_IM) { + Image *ima= (Image*)id; + ImBuf *ibuf= NULL; + ImageUser iuser; + + /* ima->ok is zero when Image cannot load */ + if(ima==NULL || ima->ok==0) + return; + + /* setup dummy image user */ + memset(&iuser, 0, sizeof(ImageUser)); + iuser.ok= iuser.framenr= 1; + iuser.scene= sp->scene; + + /* elubie: this needs to be changed: here image is always loaded if not + already there. Very expensive for large images. Need to find a way to + only get existing ibuf */ + ibuf = BKE_image_get_ibuf(ima, &iuser); + if(ibuf==NULL || ibuf->rect==NULL) + return; + + icon_copy_rect(ibuf, sp->sizex, sp->sizey, sp->pr_rect); + + *do_update= 1; + } + else { + /* re-use shader job */ + shader_preview_startjob(customdata, stop, do_update); + + /* world is rendered with alpha=0, so it wasn't displayed + this could be render option for sky to, for later */ + if(idtype == ID_WO) { + set_alpha((char*)sp->pr_rect, sp->sizex, sp->sizey, 255); + } + else if(idtype == ID_MA) { + Material* ma = (Material*)id; + + if(ma->material_type == MA_TYPE_HALO) + set_alpha((char*)sp->pr_rect, sp->sizex, sp->sizey, 255); + } + } +} + +/* use same function for icon & shader, so the job manager + does not run two of them at the same time. */ + +static void common_preview_startjob(void *customdata, short *stop, short *do_update) +{ + ShaderPreview *sp= customdata; + + if(sp->pr_method == PR_ICON_RENDER) + icon_preview_startjob(customdata, stop, do_update); + else + shader_preview_startjob(customdata, stop, do_update); +} + +/* exported functions */ + +void ED_preview_icon_job(const bContext *C, void *owner, ID *id, unsigned int *rect, int sizex, int sizey) +{ + wmJob *steve; + ShaderPreview *sp; + + steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), owner, WM_JOB_EXCL_RENDER); sp= MEM_callocN(sizeof(ShaderPreview), "shader preview"); /* customdata for preview thread */ sp->scene= CTX_data_scene(C); - sp->owner= owner; + sp->owner= id; sp->sizex= sizex; sp->sizey= sizey; - sp->pr_method= PR_DO_RENDER; + sp->pr_method= PR_ICON_RENDER; + sp->pr_rect= rect; sp->id = id; - sp->parent= parent; - sp->slot= slot; /* setup job */ WM_jobs_customdata(steve, sp, shader_preview_free); WM_jobs_timer(steve, 0.1, NC_MATERIAL, NC_MATERIAL); - WM_jobs_callbacks(steve, shader_preview_startjob, NULL, shader_preview_updatejob); + WM_jobs_callbacks(steve, common_preview_startjob, NULL, NULL); WM_jobs_start(CTX_wm_manager(C), steve); - - /* signal to rerender icon in menus */ - BKE_icon_changed(BKE_icon_getid(id)); } -/* rect should be allocated, sizex/sizy pixels, 32 bits */ -void ED_preview_iconrender(Scene *scene, ID *id, unsigned int *rect, int sizex, int sizey) +void ED_preview_shader_job(const bContext *C, void *owner, ID *id, ID *parent, MTex *slot, int sizex, int sizey) { + wmJob *steve; ShaderPreview *sp; - short stop=0, do_update=0; - sp= MEM_callocN(sizeof(ShaderPreview), "ShaderPreview"); - + steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), owner, WM_JOB_EXCL_RENDER); + sp= MEM_callocN(sizeof(ShaderPreview), "shader preview"); + /* customdata for preview thread */ - sp->scene= scene; + sp->scene= CTX_data_scene(C); + sp->owner= owner; sp->sizex= sizex; sp->sizey= sizey; - sp->pr_method= PR_ICON_RENDER; - sp->pr_rect= (int *)rect; /* shouldnt pr_rect be unsigned int also? - Campbell */ + sp->pr_method= PR_DO_RENDER; sp->id = id; - - shader_preview_startjob(sp, &stop, &do_update); + sp->parent= parent; + sp->slot= slot; - MEM_freeN(sp); + /* setup job */ + WM_jobs_customdata(steve, sp, shader_preview_free); + WM_jobs_timer(steve, 0.1, NC_MATERIAL, NC_MATERIAL); + WM_jobs_callbacks(steve, common_preview_startjob, NULL, shader_preview_updatejob); + + WM_jobs_start(CTX_wm_manager(C), steve); } - diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c new file mode 100644 index 00000000000..a31a60ecbd6 --- /dev/null +++ b/source/blender/editors/render/render_shading.c @@ -0,0 +1,645 @@ +/** + * $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. + * + * 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 <string.h> + +#include "MEM_guardedalloc.h" + +#include "DNA_curve_types.h" +#include "DNA_lamp_types.h" +#include "DNA_material_types.h" +#include "DNA_meshdata_types.h" +#include "DNA_node_types.h" +#include "DNA_object_types.h" +#include "DNA_texture_types.h" +#include "DNA_scene_types.h" +#include "DNA_world_types.h" + +#include "BKE_context.h" +#include "BKE_depsgraph.h" +#include "BKE_font.h" +#include "BKE_icons.h" +#include "BKE_library.h" +#include "BKE_main.h" +#include "BKE_material.h" +#include "BKE_node.h" +#include "BKE_scene.h" +#include "BKE_texture.h" +#include "BKE_utildefines.h" +#include "BKE_world.h" + +#include "BLI_arithb.h" +#include "BLI_editVert.h" +#include "BLI_listbase.h" + +#include "GPU_material.h" + +#include "RNA_access.h" +#include "RNA_enum_types.h" + +#include "WM_api.h" +#include "WM_types.h" + +#include "ED_curve.h" +#include "ED_mesh.h" +#include "ED_render.h" + +#include "RNA_access.h" +#include "RNA_define.h" + +#include "UI_interface.h" +#include "UI_resources.h" + +#include "render_intern.h" // own include + +/***************************** Updates *********************************** + * ED_render_id_flush_update gets called from DAG_id_flush_update, to do * + * editor level updates when the ID changes. when these ID blocks are in * + * the dependency graph, we can get rid of the manual dependency checks */ + +static int mtex_use_tex(MTex **mtex, int tot, Tex *tex) +{ + int a; + + if(!mtex) + return 0; + + for(a=0; a<tot; a++) + if(mtex[a] && mtex[a]->tex == tex) + return 1; + + return 0; +} + +static int nodes_use_tex(bNodeTree *ntree, Tex *tex) +{ + bNode *node; + + for(node=ntree->nodes.first; node; node= node->next) { + if(node->id) { + if(node->id == (ID*)tex) { + return 1; + } + else if(node->type==NODE_GROUP) { + if(nodes_use_tex((bNodeTree *)node->id, tex)) + return 1; + } + } + } + + return 0; +} + +static void material_changed(Main *bmain, Material *ma) +{ + /* icons */ + BKE_icon_changed(BKE_icon_getid(&ma->id)); + + /* glsl */ + if(ma->gpumaterial.first) + GPU_material_free(ma); +} + +static void texture_changed(Main *bmain, Tex *tex) +{ + Material *ma; + Lamp *la; + World *wo; + + /* icons */ + BKE_icon_changed(BKE_icon_getid(&tex->id)); + + /* find materials */ + for(ma=bmain->mat.first; ma; ma=ma->id.next) { + if(mtex_use_tex(ma->mtex, MAX_MTEX, tex)); + else if(ma->use_nodes && ma->nodetree && nodes_use_tex(ma->nodetree, tex)); + else continue; + + BKE_icon_changed(BKE_icon_getid(&ma->id)); + + if(ma->gpumaterial.first) + GPU_material_free(ma); + } + + /* find lamps */ + for(la=bmain->lamp.first; la; la=la->id.next) { + if(mtex_use_tex(la->mtex, MAX_MTEX, tex)); + else continue; + + BKE_icon_changed(BKE_icon_getid(&la->id)); + } + + /* find worlds */ + for(wo=bmain->world.first; wo; wo=wo->id.next) { + if(mtex_use_tex(wo->mtex, MAX_MTEX, tex)); + else continue; + + BKE_icon_changed(BKE_icon_getid(&wo->id)); + } +} + +static void lamp_changed(Main *bmain, Lamp *la) +{ + Object *ob; + Material *ma; + + /* icons */ + BKE_icon_changed(BKE_icon_getid(&la->id)); + + /* glsl */ + for(ob=bmain->object.first; ob; ob=ob->id.next) + if(ob->data == la && ob->gpulamp.first) + GPU_lamp_free(ob); + + for(ma=bmain->mat.first; ma; ma=ma->id.next) + if(ma->gpumaterial.first) + GPU_material_free(ma); +} + +static void world_changed(Main *bmain, World *wo) +{ + Material *ma; + + /* icons */ + BKE_icon_changed(BKE_icon_getid(&wo->id)); + + /* glsl */ + for(ma=bmain->mat.first; ma; ma=ma->id.next) + if(ma->gpumaterial.first) + GPU_material_free(ma); +} + +void ED_render_id_flush_update(Main *bmain, ID *id) +{ + switch(GS(id->name)) { + case ID_MA: + material_changed(bmain, (Material*)id); + break; + case ID_TE: + texture_changed(bmain, (Tex*)id); + break; + case ID_WO: + world_changed(bmain, (World*)id); + break; + case ID_LA: + lamp_changed(bmain, (Lamp*)id); + break; + default: + break; + } +} + +/********************** material slot operators *********************/ + +static int material_slot_add_exec(bContext *C, wmOperator *op) +{ + Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; + + if(!ob) + return OPERATOR_CANCELLED; + + object_add_material_slot(ob); + WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + + return OPERATOR_FINISHED; +} + +void OBJECT_OT_material_slot_add(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Add Material Slot"; + ot->idname= "OBJECT_OT_material_slot_add"; + ot->description="Add a new material slot or duplicate the selected one."; + + /* api callbacks */ + ot->exec= material_slot_add_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +static int material_slot_remove_exec(bContext *C, wmOperator *op) +{ + Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; + + if(!ob) + return OPERATOR_CANCELLED; + + object_remove_material_slot(ob); + WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + + return OPERATOR_FINISHED; +} + +void OBJECT_OT_material_slot_remove(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Remove Material Slot"; + ot->idname= "OBJECT_OT_material_slot_remove"; + ot->description="Remove the selected material slot."; + + /* api callbacks */ + ot->exec= material_slot_remove_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +static int material_slot_assign_exec(bContext *C, wmOperator *op) +{ + Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; + + if(!ob) + return OPERATOR_CANCELLED; + + if(ob && ob->actcol>0) { + if(ob->type == OB_MESH) { + EditMesh *em= ((Mesh*)ob->data)->edit_mesh; + EditFace *efa; + + if(em) { + for(efa= em->faces.first; efa; efa=efa->next) + if(efa->f & SELECT) + efa->mat_nr= ob->actcol-1; + } + } + else if(ELEM(ob->type, OB_CURVE, OB_SURF)) { + ListBase *editnurb= ((Curve*)ob->data)->editnurb; + Nurb *nu; + + if(editnurb) { + for(nu= editnurb->first; nu; nu= nu->next) + if(isNurbsel(nu)) + nu->mat_nr= nu->charidx= ob->actcol-1; + } + } + else if(ob->type == OB_FONT) { + EditFont *ef= ((Curve*)ob->data)->editfont; + int i, selstart, selend; + + if(ef && BKE_font_getselection(ob, &selstart, &selend)) { + for(i=selstart; i<=selend; i++) + ef->textbufinfo[i].mat_nr = ob->actcol-1; + } + } + } + + DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); + + return OPERATOR_FINISHED; +} + +void OBJECT_OT_material_slot_assign(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Assign Material Slot"; + ot->idname= "OBJECT_OT_material_slot_assign"; + ot->description="Assign the material in the selected material slot to the selected vertices."; + + /* api callbacks */ + ot->exec= material_slot_assign_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +static int material_slot_de_select(bContext *C, int select) +{ + Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; + + if(!ob) + return OPERATOR_CANCELLED; + + if(ob->type == OB_MESH) { + EditMesh *em= ((Mesh*)ob->data)->edit_mesh; + + if(em) { + if(select) + EM_select_by_material(em, ob->actcol-1); + else + EM_deselect_by_material(em, ob->actcol-1); + } + } + else if ELEM(ob->type, OB_CURVE, OB_SURF) { + ListBase *editnurb= ((Curve*)ob->data)->editnurb; + Nurb *nu; + BPoint *bp; + BezTriple *bezt; + int a; + + for(nu= editnurb->first; nu; nu=nu->next) { + if(nu->mat_nr==ob->actcol-1) { + if(nu->bezt) { + a= nu->pntsu; + bezt= nu->bezt; + while(a--) { + if(bezt->hide==0) { + if(select) { + bezt->f1 |= SELECT; + bezt->f2 |= SELECT; + bezt->f3 |= SELECT; + } + else { + bezt->f1 &= ~SELECT; + bezt->f2 &= ~SELECT; + bezt->f3 &= ~SELECT; + } + } + bezt++; + } + } + else if(nu->bp) { + a= nu->pntsu*nu->pntsv; + bp= nu->bp; + while(a--) { + if(bp->hide==0) { + if(select) bp->f1 |= SELECT; + else bp->f1 &= ~SELECT; + } + bp++; + } + } + } + } + } + + WM_event_add_notifier(C, NC_GEOM|ND_SELECT, ob->data); + + return OPERATOR_FINISHED; +} + +static int material_slot_select_exec(bContext *C, wmOperator *op) +{ + return material_slot_de_select(C, 1); +} + +void OBJECT_OT_material_slot_select(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Select Material Slot"; + ot->idname= "OBJECT_OT_material_slot_select"; + ot->description="Select vertices assigned to the selected material slot."; + + /* api callbacks */ + ot->exec= material_slot_select_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +static int material_slot_deselect_exec(bContext *C, wmOperator *op) +{ + return material_slot_de_select(C, 0); +} + +void OBJECT_OT_material_slot_deselect(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Deselect Material Slot"; + ot->idname= "OBJECT_OT_material_slot_deselect"; + ot->description="Deselect vertices assigned to the selected material slot."; + + /* api callbacks */ + ot->exec= material_slot_deselect_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/********************** new material operator *********************/ + +static int new_material_exec(bContext *C, wmOperator *op) +{ + Material *ma= CTX_data_pointer_get_type(C, "material", &RNA_Material).data; + Object *ob; + PointerRNA ptr; + int index; + + /* add or copy material */ + if(ma) + ma= copy_material(ma); + else + ma= add_material("Material"); + + ma->id.us--; /* compensating for us++ in assign_material */ + + /* attempt to assign to material slot */ + ptr= CTX_data_pointer_get_type(C, "material_slot", &RNA_MaterialSlot); + + if(ptr.data) { + ob= ptr.id.data; + index= (Material**)ptr.data - ob->mat; + + assign_material(ob, ma, index+1); + + WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + } + + WM_event_add_notifier(C, NC_MATERIAL|NA_ADDED, ma); + + return OPERATOR_FINISHED; +} + +void MATERIAL_OT_new(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "New Material"; + ot->idname= "MATERIAL_OT_new"; + ot->description="Add a new material."; + + /* api callbacks */ + ot->exec= new_material_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/********************** new texture operator *********************/ + +static int new_texture_exec(bContext *C, wmOperator *op) +{ + Tex *tex= CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data; + ID *id; + MTex *mtex; + PointerRNA ptr; + + /* add or copy texture */ + if(tex) + tex= copy_texture(tex); + else + tex= add_texture("Texture"); + + id_us_min(&tex->id); + + /* attempt to assign to texture slot */ + ptr= CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot); + + if(ptr.data) { + id= ptr.id.data; + mtex= ptr.data; + + if(mtex) { + if(mtex->tex) + id_us_min(&mtex->tex->id); + mtex->tex= tex; + id_us_plus(&tex->id); + } + + /* XXX nodes, notifier .. */ + } + + WM_event_add_notifier(C, NC_TEXTURE|NA_ADDED, tex); + + return OPERATOR_FINISHED; +} + +void TEXTURE_OT_new(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "New Texture"; + ot->idname= "TEXTURE_OT_new"; + ot->description="Add a new texture."; + + /* api callbacks */ + ot->exec= new_texture_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/********************** new world operator *********************/ + +static int new_world_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + World *wo= CTX_data_pointer_get_type(C, "world", &RNA_World).data; + + /* add or copy world */ + if(wo) + wo= copy_world(wo); + else + wo= add_world("World"); + + /* assign to scene */ + if(scene->world) + id_us_min(&scene->world->id); + scene->world= wo; + + WM_event_add_notifier(C, NC_WORLD|NA_ADDED, wo); + + return OPERATOR_FINISHED; +} + +void WORLD_OT_new(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "New World"; + ot->idname= "WORLD_OT_new"; + ot->description= "Add a new world."; + + /* api callbacks */ + ot->exec= new_world_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/********************** render layer operators *********************/ + +static int render_layer_add_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + + scene_add_render_layer(scene); + scene->r.actlay= BLI_countlist(&scene->r.layers) - 1; + + WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene); + + return OPERATOR_FINISHED; +} + +void SCENE_OT_render_layer_add(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Add Render Layer"; + ot->idname= "SCENE_OT_render_layer_add"; + ot->description="Add a render layer."; + + /* api callbacks */ + ot->exec= render_layer_add_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +static int render_layer_remove_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + SceneRenderLayer *rl; + int act= scene->r.actlay; + + if(BLI_countlist(&scene->r.layers) <= 1) + return OPERATOR_CANCELLED; + + rl= BLI_findlink(&scene->r.layers, scene->r.actlay); + BLI_remlink(&scene->r.layers, rl); + MEM_freeN(rl); + + scene->r.actlay= 0; + + if(scene->nodetree) { + bNode *node; + for(node= scene->nodetree->nodes.first; node; node= node->next) { + if(node->type==CMP_NODE_R_LAYERS && node->id==NULL) { + if(node->custom1==act) + node->custom1= 0; + else if(node->custom1>act) + node->custom1--; + } + } + } + + WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene); + + return OPERATOR_FINISHED; +} + +void SCENE_OT_render_layer_remove(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Remove Render Layer"; + ot->idname= "SCENE_OT_render_layer_remove"; + ot->description="Remove the selected render layer."; + + /* api callbacks */ + ot->exec= render_layer_remove_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + diff --git a/source/blender/editors/screen/SConscript b/source/blender/editors/screen/SConscript index a4f73cfea7e..847a1cddfb4 100644 --- a/source/blender/editors/screen/SConscript +++ b/source/blender/editors/screen/SConscript @@ -15,4 +15,11 @@ if not env['WITH_BF_PYTHON']: if env['WITH_BF_OPENEXR']: defs += ' WITH_OPENEXR' +if env['OURPLATFORM'] == 'linux2': + cflags='-pthread' + incs += ' ../../../extern/binreloc/include' + +if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): + incs += ' ' + env['BF_PTHREADS_INC'] + env.BlenderLib ( 'bf_editors_screen', sources, Split(incs), Split(defs), libtype=['core'], priority=[105] ) diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 2cdb75e28e3..87901d75494 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -159,14 +159,8 @@ void ED_area_overdraw_flush(bContext *C, ScrArea *sa, ARegion *ar) for(az= sa->actionzones.first; az; az= az->next) { int xs, ys; - if(az->type==AZONE_AREA) { - xs= (az->x1+az->x2)/2; - ys= (az->y1+az->y2)/2; - } - else { - xs= az->x3; - ys= az->y3; - } + xs= (az->x1+az->x2)/2; + ys= (az->y1+az->y2)/2; /* test if inside */ if(BLI_in_rcti(&ar->winrct, xs, ys)) { @@ -196,25 +190,42 @@ static void area_draw_azone(short x1, short y1, short x2, short y2) fdrawline(xmin, ymax-2*dy+1, xmax-2*dx+1, ymin); } + static void region_draw_azone(ScrArea *sa, AZone *az) { - if(az->ar==NULL) return; + GLUquadricObj *qobj = gluNewQuadric(); + short midx = az->x1 + (az->x2 - az->x1)/2; + short midy = az->y1 + (az->y2 - az->y1)/2; - UI_SetTheme(sa->spacetype, az->ar->type->regionid); + if(az->ar==NULL) return; - UI_ThemeColor(TH_BACK); - glBegin(GL_TRIANGLES); - glVertex2s(az->x1, az->y1); - glVertex2s(az->x2, az->y2); - glVertex2s(az->x3, az->y3); - glEnd(); + /* only display action zone icons when the region is hidden */ + if (!(az->ar->flag & RGN_FLAG_HIDDEN)) return; - UI_ThemeColorShade(TH_BACK, 50); - sdrawline(az->x1, az->y1, az->x3, az->y3); + glPushMatrix(); + glTranslatef(midx, midy, 0.); - UI_ThemeColorShade(TH_BACK, -50); - sdrawline(az->x2, az->y2, az->x3, az->y3); + /* outlined circle */ + glEnable(GL_LINE_SMOOTH); + + glColor4f(1.f, 1.f, 1.f, 0.8f); + + gluQuadricDrawStyle(qobj, GLU_FILL); + gluDisk( qobj, 0.0, 4.25f, 16, 1); + glColor4f(0.2f, 0.2f, 0.2f, 0.9f); + + gluQuadricDrawStyle(qobj, GLU_SILHOUETTE); + gluDisk( qobj, 0.0, 4.25f, 16, 1); + + glDisable(GL_LINE_SMOOTH); + + glPopMatrix(); + gluDeleteQuadric(qobj); + + /* + */ + sdrawline(midx, midy-2, midx, midy+3); + sdrawline(midx-2, midy, midx+3, midy); } @@ -235,10 +246,11 @@ void ED_area_overdraw(bContext *C) AZone *az; for(az= sa->actionzones.first; az; az= az->next) { if(az->do_draw) { - if(az->type==AZONE_AREA) + if(az->type==AZONE_AREA) { area_draw_azone(az->x1, az->y1, az->x2, az->y2); - else if(az->type==AZONE_REGION) + } else if(az->type==AZONE_REGION) { region_draw_azone(sa, az); + } az->do_draw= 0; } @@ -449,72 +461,103 @@ static void area_azone_initialize(ScrArea *sa) BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y2); } -static void region_azone_initialize(ScrArea *sa, ARegion *ar, char edge) +#define AZONEPAD_EDGE 4 +#define AZONEPAD_ICON 8 +static void region_azone_edge(AZone *az, ARegion *ar) { - AZone *az, *azt; - - az= (AZone *)MEM_callocN(sizeof(AZone), "actionzone"); - BLI_addtail(&(sa->actionzones), az); - az->type= AZONE_REGION; - az->ar= ar; - az->edge= edge; - - if(edge=='t') { - az->x1= ar->winrct.xmin+AZONESPOT; - az->y1= ar->winrct.ymax; - az->x2= ar->winrct.xmin+2*AZONESPOT; + if(az->edge=='t') { + az->x1= ar->winrct.xmin; + az->y1= ar->winrct.ymax - AZONEPAD_EDGE; + az->x2= ar->winrct.xmax; az->y2= ar->winrct.ymax; - az->x3= (az->x1+az->x2)/2; - az->y3= az->y2+AZONESPOT/2; - BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y3); } - else if(edge=='b') { - az->x1= ar->winrct.xmin+AZONESPOT; - az->y1= ar->winrct.ymin; - az->x2= ar->winrct.xmin+2*AZONESPOT; + else if(az->edge=='b') { + az->x1= ar->winrct.xmin; + az->y1= ar->winrct.ymin + AZONEPAD_EDGE; + az->x2= ar->winrct.xmax; az->y2= ar->winrct.ymin; - az->x3= (az->x1+az->x2)/2; - az->y3= az->y2-AZONESPOT/2; - BLI_init_rcti(&az->rect, az->x1, az->x2, az->y3, az->y1); } - else if(edge=='l') { + else if(az->edge=='l') { az->x1= ar->winrct.xmin; - az->y1= ar->winrct.ymax-AZONESPOT; - az->x2= ar->winrct.xmin; - az->y2= ar->winrct.ymax-2*AZONESPOT; - az->x3= az->x2-AZONESPOT/2; - az->y3= (az->y1+az->y2)/2; - BLI_init_rcti(&az->rect, az->x3, az->x1, az->y1, az->y2); + az->y1= ar->winrct.ymin; + az->x2= ar->winrct.xmin + AZONEPAD_EDGE; + az->y2= ar->winrct.ymax; } - else { // if(edge=='r') { + else { // if(az->edge=='r') { az->x1= ar->winrct.xmax; - az->y1= ar->winrct.ymax-AZONESPOT; - az->x2= ar->winrct.xmax; - az->y2= ar->winrct.ymax-2*AZONESPOT; - az->x3= az->x2+AZONESPOT/2; - az->y3= (az->y1+az->y2)/2; - BLI_init_rcti(&az->rect, az->x1, az->x3, az->y1, az->y2); + az->y1= ar->winrct.ymin; + az->x2= ar->winrct.xmax - AZONEPAD_EDGE; + az->y2= ar->winrct.ymax; } + + BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y2); +} + +static void region_azone_icon(ScrArea *sa, AZone *az, ARegion *ar) +{ + AZone *azt; + + if(az->edge=='t') { + az->x1= ar->winrct.xmax - AZONEPAD_ICON; + az->y1= ar->winrct.ymax + AZONEPAD_ICON; + az->x2= ar->winrct.xmax - 2*AZONEPAD_ICON; + az->y2= ar->winrct.ymax + 2*AZONEPAD_ICON; + } + else if(az->edge=='b') { + az->x1= ar->winrct.xmin + AZONEPAD_ICON; + az->y1= ar->winrct.ymin - AZONEPAD_ICON; + az->x2= ar->winrct.xmin + 2*AZONEPAD_ICON; + az->y2= ar->winrct.ymin - 2*AZONEPAD_ICON; + } + else if(az->edge=='l') { + az->x1= ar->winrct.xmin - 2*AZONEPAD_ICON; + az->y1= ar->winrct.ymax - 2*AZONEPAD_ICON; + az->x2= ar->winrct.xmin - AZONEPAD_ICON; + az->y2= ar->winrct.ymax - AZONEPAD_ICON; + } + else { // if(az->edge=='r') { + az->x1= ar->winrct.xmax + AZONEPAD_ICON; + az->y1= ar->winrct.ymax - 2*AZONEPAD_ICON; + az->x2= ar->winrct.xmax + 2*AZONEPAD_ICON; + az->y2= ar->winrct.ymax - AZONEPAD_ICON; + } + + BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y2); /* if more azones on 1 spot, set offset */ for(azt= sa->actionzones.first; azt; azt= azt->next) { if(az!=azt) { if( ABS(az->x1-azt->x1) < 2 && ABS(az->y1-azt->y1) < 2) { - if(edge=='t' || edge=='b') { + if(az->edge=='t' || az->edge=='b') { az->x1+= AZONESPOT; az->x2+= AZONESPOT; - az->x3+= AZONESPOT; - BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y3); + BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y2); } else { az->y1-= AZONESPOT; az->y2-= AZONESPOT; - az->y3-= AZONESPOT; - BLI_init_rcti(&az->rect, az->x1, az->x3, az->y1, az->y2); + BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y2); } } } } +} + +static void region_azone_initialize(ScrArea *sa, ARegion *ar, char edge) +{ + AZone *az; + + az= (AZone *)MEM_callocN(sizeof(AZone), "actionzone"); + BLI_addtail(&(sa->actionzones), az); + az->type= AZONE_REGION; + az->ar= ar; + az->edge= edge; + + if (ar->flag & RGN_FLAG_HIDDEN) { + region_azone_icon(sa, az, ar); + } else { + region_azone_edge(az, ar); + } } @@ -781,24 +824,24 @@ static void ed_default_handlers(wmWindowManager *wm, ListBase *handlers, int fla UI_add_region_handlers(handlers); } if(flag & ED_KEYMAP_VIEW2D) { - ListBase *keymap= WM_keymap_listbase(wm, "View2D", 0, 0); + wmKeyMap *keymap= WM_keymap_find(wm, "View2D", 0, 0); WM_event_add_keymap_handler(handlers, keymap); } if(flag & ED_KEYMAP_MARKERS) { - ListBase *keymap= WM_keymap_listbase(wm, "Markers", 0, 0); + wmKeyMap *keymap= WM_keymap_find(wm, "Markers", 0, 0); WM_event_add_keymap_handler(handlers, keymap); // XXX need boundbox check urgently!!! } if(flag & ED_KEYMAP_ANIMATION) { - ListBase *keymap= WM_keymap_listbase(wm, "Animation", 0, 0); + wmKeyMap *keymap= WM_keymap_find(wm, "Animation", 0, 0); WM_event_add_keymap_handler(handlers, keymap); } if(flag & ED_KEYMAP_FRAMES) { - ListBase *keymap= WM_keymap_listbase(wm, "Frames", 0, 0); + wmKeyMap *keymap= WM_keymap_find(wm, "Frames", 0, 0); WM_event_add_keymap_handler(handlers, keymap); } if(flag & ED_KEYMAP_GPENCIL) { - ListBase *keymap= WM_keymap_listbase(wm, "Grease Pencil", 0, 0); + wmKeyMap *keymap= WM_keymap_find(wm, "Grease Pencil", 0, 0); WM_event_add_keymap_handler(handlers, keymap); } } @@ -873,6 +916,19 @@ void ED_region_init(bContext *C, ARegion *ar) } +void ED_region_toggle_hidden(bContext *C, ARegion *ar) +{ + ScrArea *sa= CTX_wm_area(C); + + ar->flag ^= RGN_FLAG_HIDDEN; + ar->v2d.flag &= ~V2D_IS_INITIALISED; /* XXX should become hide/unhide api? */ + + if(ar->flag & RGN_FLAG_HIDDEN) + WM_event_remove_handlers(C, &ar->handlers); + + ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), sa); + ED_area_tag_redraw(sa); +} /* sa2 to sa1, we swap spaces for fullscreen to keep all allocated data */ /* area vertices were set */ @@ -1198,7 +1254,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex pt->draw_header(C, panel); - uiBlockLayoutResolve(C, block, &xco, &yco); + uiBlockLayoutResolve(block, &xco, &yco); panel->labelofs= xco - triangle; panel->layout= NULL; } @@ -1209,7 +1265,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex pt->draw(C, panel); - uiBlockLayoutResolve(C, block, &xco, &yco); + uiBlockLayoutResolve(block, &xco, &yco); panel->layout= NULL; yco -= 2*style->panelspace; @@ -1297,7 +1353,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex void ED_region_panels_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; // XXX quick hacks for files saved with 2.5 already (i.e. the builtin defaults file) // scrollbars for button regions @@ -1310,7 +1366,7 @@ void ED_region_panels_init(wmWindowManager *wm, ARegion *ar) UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_PANELS_UI, ar->winx, ar->winy); - keymap= WM_keymap_listbase(wm, "View2D Buttons List", 0, 0); + keymap= WM_keymap_find(wm, "View2D Buttons List", 0, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); } @@ -1355,7 +1411,7 @@ void ED_region_header(const bContext *C, ARegion *ar) maxco= xco; } - uiBlockLayoutResolve(C, block, &xco, &yco); + uiBlockLayoutResolve(block, &xco, &yco); /* for view2d */ if(xco > maxco) diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index aa36675fb90..2cc5500c3ef 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1140,7 +1140,7 @@ static void screen_cursor_set(wmWindow *win, wmEvent *event) if(az->type==AZONE_AREA) WM_cursor_set(win, CURSOR_EDIT); else if(az->type==AZONE_REGION) { - if(az->x1==az->x2) + if(az->edge == 'l' || az->edge == 'r') WM_cursor_set(win, CURSOR_X_MOVE); else WM_cursor_set(win, CURSOR_Y_MOVE); @@ -1580,23 +1580,6 @@ void ED_screen_animation_timer_update(bContext *C, int redraws) } } -unsigned int ED_screen_view3d_layers(bScreen *screen) -{ - if(screen) { - unsigned int layer= screen->scene->lay; /* as minimum this */ - ScrArea *sa; - - /* get all used view3d layers */ - for(sa= screen->areabase.first; sa; sa= sa->next) { - if(sa->spacetype==SPACE_VIEW3D) - layer |= ((View3D *)sa->spacedata.first)->lay; - } - return layer; - } - return 0; -} - - /* results in fully updated anim system */ void ED_update_for_newframe(const bContext *C, int mute) { @@ -1607,7 +1590,7 @@ void ED_update_for_newframe(const bContext *C, int mute) /* this function applies the changes too */ /* XXX future: do all windows */ - scene_update_for_newframe(scene, ED_screen_view3d_layers(screen)); /* BKE_scene.h */ + scene_update_for_newframe(scene, BKE_screen_visible_layers(screen)); /* BKE_scene.h */ //if ( (CFRA>1) && (!mute) && (scene->r.audio.flag & AUDIO_SCRUB)) // audiostream_scrub( CFRA ); diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 75da8f5fe06..7f2084d5a76 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -396,15 +396,7 @@ AZone *is_in_area_actionzone(ScrArea *sa, int x, int y) break; } else if(az->type == AZONE_REGION) { - float v1[2], v2[2], v3[2], pt[2]; - - v1[0]= az->x1; v1[1]= az->y1; - v2[0]= az->x2; v2[1]= az->y2; - v3[0]= az->x3; v3[1]= az->y3; - pt[0]= x; pt[1]=y; - - if(IsPointInTri2D(v1, v2, v3, pt)) - break; + break; } } } @@ -464,7 +456,7 @@ static int actionzone_invoke(bContext *C, wmOperator *op, wmEvent *event) } else { /* add modal handler */ - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } @@ -596,7 +588,7 @@ static int area_swap_invoke(bContext *C, wmOperator *op, wmEvent *event) /* add modal handler */ WM_cursor_modal(CTX_wm_window(C), BC_SWAPAREA_CURSOR); - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; @@ -612,8 +604,8 @@ static int area_swap_modal(bContext *C, wmOperator *op, wmEvent *event) sad->sa2= screen_areahascursor(CTX_wm_screen(C), event->x, event->y); break; case LEFTMOUSE: /* release LMB */ - if(event->val==0) { - if(sad->sa1 == sad->sa2) { + if(event->val==KM_RELEASE) { + if(!sad->sa2 || sad->sa1 == sad->sa2) { return area_swap_cancel(C, op); } @@ -878,7 +870,7 @@ static int area_move_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_PASS_THROUGH; /* add temp handler */ - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } @@ -1168,7 +1160,7 @@ static int area_split_invoke(bContext *C, wmOperator *op, wmEvent *event) area_move_set_limits(CTX_wm_screen(C), dir, &sd->bigger, &sd->smaller); /* add temp handler for edge move or cancel */ - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } @@ -1233,7 +1225,7 @@ static int area_split_modal(bContext *C, wmOperator *op, wmEvent *event) break; case LEFTMOUSE: - if(event->val==0) { /* mouse up */ + if(event->val==KM_RELEASE) { /* mouse up */ area_split_exit(C, op); return OPERATOR_FINISHED; } @@ -1261,7 +1253,7 @@ static void SCREEN_OT_area_split(wmOperatorType *ot) ot->modal= area_split_modal; ot->poll= ED_operator_areaactive; - ot->flag= OPTYPE_REGISTER|OPTYPE_BLOCKING; + ot->flag= OPTYPE_BLOCKING; /* rna */ RNA_def_enum(ot->srna, "direction", prop_direction_items, 'h', "Direction", ""); @@ -1273,7 +1265,9 @@ static void SCREEN_OT_area_split(wmOperatorType *ot) /* ************** scale region edge operator *********************************** */ typedef struct RegionMoveData { + AZone *az; ARegion *ar; + ScrArea *sa; int bigger, smaller, origval; int origx, origy; char edge; @@ -1290,7 +1284,9 @@ static int region_scale_invoke(bContext *C, wmOperator *op, wmEvent *event) op->customdata= rmd; + rmd->az = az; rmd->ar= az->ar; + rmd->sa = sad->sa1; rmd->edge= az->edge; rmd->origx= event->x; rmd->origy= event->y; @@ -1300,7 +1296,7 @@ static int region_scale_invoke(bContext *C, wmOperator *op, wmEvent *event) rmd->origval= rmd->ar->type->minsizey; /* add temp handler */ - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } @@ -1322,24 +1318,26 @@ static int region_scale_modal(bContext *C, wmOperator *op, wmEvent *event) if(rmd->edge=='l') delta= -delta; rmd->ar->type->minsizex= rmd->origval + delta; CLAMP(rmd->ar->type->minsizex, 0, 1000); - if(rmd->ar->type->minsizex < 10) { - rmd->ar->type->minsizex= 10; - rmd->ar->flag |= RGN_FLAG_HIDDEN; + if(rmd->ar->type->minsizex < 24) { + rmd->ar->type->minsizex= rmd->origval; + if(!(rmd->ar->flag & RGN_FLAG_HIDDEN)) + ED_region_toggle_hidden(C, rmd->ar); } - else - rmd->ar->flag &= ~RGN_FLAG_HIDDEN; + else if(rmd->ar->flag & RGN_FLAG_HIDDEN) + ED_region_toggle_hidden(C, rmd->ar); } else { delta= event->y - rmd->origy; if(rmd->edge=='b') delta= -delta; rmd->ar->type->minsizey= rmd->origval + delta; CLAMP(rmd->ar->type->minsizey, 0, 1000); - if(rmd->ar->type->minsizey < 10) { - rmd->ar->type->minsizey= 10; - rmd->ar->flag |= RGN_FLAG_HIDDEN; + if(rmd->ar->type->minsizey < 24) { + rmd->ar->type->minsizey= rmd->origval; + if(!(rmd->ar->flag & RGN_FLAG_HIDDEN)) + ED_region_toggle_hidden(C, rmd->ar); } - else - rmd->ar->flag &= ~RGN_FLAG_HIDDEN; + else if(rmd->ar->flag & RGN_FLAG_HIDDEN) + ED_region_toggle_hidden(C, rmd->ar); } WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL); @@ -1347,12 +1345,14 @@ static int region_scale_modal(bContext *C, wmOperator *op, wmEvent *event) break; case LEFTMOUSE: - if(event->val==0) { + if(event->val==KM_RELEASE) { if(ABS(event->x - rmd->origx) < 2 && ABS(event->y - rmd->origy) < 2) { - rmd->ar->flag ^= RGN_FLAG_HIDDEN; - WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL); - } + if(rmd->ar->flag & RGN_FLAG_HIDDEN) { + ED_region_toggle_hidden(C, rmd->ar); + WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL); + } + } MEM_freeN(op->customdata); op->customdata = NULL; @@ -1446,29 +1446,6 @@ static void SCREEN_OT_frame_jump(wmOperatorType *ot) /* ************** jump to keyframe operator ***************************** */ -/* helper function - find actkeycolumn that occurs on cframe, or the nearest one if not found */ -// TODO: make this an API func? -static ActKeyColumn *cfra_find_nearest_next_ak (ActKeyColumn *ak, float cframe, short next) -{ - ActKeyColumn *akn= NULL; - - /* sanity checks */ - if (ak == NULL) - return NULL; - - /* check if this is a match, or whether it is in some subtree */ - if (cframe < ak->cfra) - akn= cfra_find_nearest_next_ak(ak->left, cframe, next); - else if (cframe > ak->cfra) - akn= cfra_find_nearest_next_ak(ak->right, cframe, next); - - /* if no match found (or found match), just use the current one */ - if (akn == NULL) - return ak; - else - return akn; -} - /* function to be called outside UI context, or for redo */ static int keyframe_jump_exec(bContext *C, wmOperator *op) { @@ -1597,7 +1574,7 @@ static int screen_full_area_exec(bContext *C, wmOperator *op) static void SCREEN_OT_screen_full_area(wmOperatorType *ot) { - ot->name = "Toggle Make Area Fullscreen"; + ot->name = "Toggle Full Screen"; ot->idname = "SCREEN_OT_screen_full_area"; ot->exec= screen_full_area_exec; @@ -1751,7 +1728,7 @@ static int area_join_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_PASS_THROUGH; /* add temp handler */ - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } @@ -1851,7 +1828,7 @@ static int area_join_modal(bContext *C, wmOperator *op, wmEvent *event) } break; case LEFTMOUSE: - if(event->val==0) { + if(event->val==KM_RELEASE) { area_join_apply(C, op); WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL); area_join_exit(C, op); @@ -2120,14 +2097,14 @@ static int region_foursplit_exec(bContext *C, wmOperator *op) static void SCREEN_OT_region_foursplit(wmOperatorType *ot) { /* identifiers */ - ot->name= "Split Region in 4 Parts"; + ot->name= "Toggle Quad View"; ot->idname= "SCREEN_OT_region_foursplit"; /* api callbacks */ // ot->invoke= WM_operator_confirm; ot->exec= region_foursplit_exec; ot->poll= ED_operator_areaactive; - ot->flag= OPTYPE_REGISTER; + ot->flag= 0; } @@ -2165,7 +2142,7 @@ static void SCREEN_OT_region_flip(wmOperatorType *ot) ot->exec= region_flip_exec; ot->poll= ED_operator_areaactive; - ot->flag= OPTYPE_REGISTER; + ot->flag= 0; } @@ -2199,6 +2176,10 @@ static int match_region_with_redraws(int spacetype, int regiontype, int redraws) if(redraws & (TIME_SEQ|TIME_ALL_ANIM_WIN)) return 1; break; + case SPACE_NODE: + if(redraws & (TIME_NODES)) + return 1; + break; case SPACE_IMAGE: if(redraws & TIME_ALL_IMAGE_WIN) return 1; @@ -2231,7 +2212,7 @@ static int screen_animation_step(bContext *C, wmOperator *op, wmEvent *event) /* sync, don't sync, or follow scene setting */ if(sad->flag & ANIMPLAY_FLAG_SYNC) sync= 1; else if(sad->flag & ANIMPLAY_FLAG_NO_SYNC) sync= 0; - else sync= (scene->r.audio.flag & AUDIO_SYNC); + else sync= (scene->audio.flag & AUDIO_SYNC); if(sync) { /* skip frames */ @@ -2366,7 +2347,7 @@ static int screen_animation_play(bContext *C, wmOperator *op, wmEvent *event) static void SCREEN_OT_animation_play(wmOperatorType *ot) { /* identifiers */ - ot->name= "Animation player"; + ot->name= "Play Animation"; ot->idname= "SCREEN_OT_animation_play"; /* api callbacks */ @@ -2722,18 +2703,13 @@ static void image_renderinfo_cb(void *rjv, RenderStats *rs) } /* called inside thread! */ -static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrect) +static void image_buffer_rect_update(RenderJob *rj, RenderResult *rr, ImBuf *ibuf, volatile rcti *renrect) { - RenderJob *rj= rjv; - ImBuf *ibuf; float x1, y1, *rectf= NULL; int ymin, ymax, xmin, xmax; int rymin, rxmin; char *rectc; - ibuf= BKE_image_get_ibuf(rj->image, &rj->iuser); - if(ibuf==NULL) return; - /* if renrect argument, we only refresh scanlines */ if(renrect) { /* if ymax==recty, rendering of layer is ready, we should not draw, other things happen... */ @@ -2833,6 +2809,18 @@ static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrec *(rj->do_update)= 1; } +static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrect) +{ + RenderJob *rj= rjv; + ImBuf *ibuf; + void *lock; + + ibuf= BKE_image_acquire_ibuf(rj->image, &rj->iuser, &lock); + if(ibuf) + image_buffer_rect_update(rj, rr, ibuf, renrect); + BKE_image_release_ibuf(rj->image, lock); +} + static void render_startjob(void *rjv, short *stop, short *do_update) { RenderJob *rj= rjv; @@ -2916,7 +2904,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event) rj->iuser.ok= 1; /* setup job */ - steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene); + steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, WM_JOB_EXCL_RENDER|WM_JOB_PRIORITY); WM_jobs_customdata(steve, rj, render_freejob); WM_jobs_timer(steve, 0.2, NC_SCENE|ND_RENDER_RESULT, 0); WM_jobs_callbacks(steve, render_startjob, NULL, NULL); @@ -2946,7 +2934,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event) WM_event_add_notifier(C, NC_SCENE|ND_RENDER_RESULT, scene); /* add modal handler for ESC */ - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } @@ -3293,19 +3281,15 @@ static void keymap_modal_set(wmWindowManager *wm) /* called in spacetypes.c */ void ED_keymap_screen(wmWindowManager *wm) { - ListBase *keymap; - - /* Screen General ------------------------------------------------ */ - keymap= WM_keymap_listbase(wm, "Screen", 0, 0); - + wmKeyMap *keymap; - /* standard timers */ - WM_keymap_add_item(keymap, "SCREEN_OT_animation_step", TIMER0, KM_ANY, KM_ANY, 0); + /* Screen Editing ------------------------------------------------ */ + keymap= WM_keymap_find(wm, "Screen Editing", 0, 0); RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_actionzone", LEFTMOUSE, KM_PRESS, 0, 0)->ptr, "modifier", 0); RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_actionzone", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "modifier", 1); RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_actionzone", LEFTMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "modifier", 2); - + /* screen tools */ WM_keymap_verify_item(keymap, "SCREEN_OT_area_split", EVT_ACTIONZONE_AREA, 0, 0, 0); WM_keymap_verify_item(keymap, "SCREEN_OT_area_join", EVT_ACTIONZONE_AREA, 0, 0, 0); @@ -3314,6 +3298,14 @@ void ED_keymap_screen(wmWindowManager *wm) WM_keymap_verify_item(keymap, "SCREEN_OT_region_scale", EVT_ACTIONZONE_REGION, 0, 0, 0); /* area move after action zones */ WM_keymap_verify_item(keymap, "SCREEN_OT_area_move", LEFTMOUSE, KM_PRESS, 0, 0); + + + /* Screen General ------------------------------------------------ */ + keymap= WM_keymap_find(wm, "Screen", 0, 0); + + /* standard timers */ + WM_keymap_add_item(keymap, "SCREEN_OT_animation_step", TIMER0, KM_ANY, KM_ANY, 0); + RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_screen_set", RIGHTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "delta", 1); RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_screen_set", LEFTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "delta", -1); @@ -3327,15 +3319,13 @@ void ED_keymap_screen(wmWindowManager *wm) WM_keymap_add_item(keymap, "SCREEN_OT_region_foursplit", SKEY, KM_PRESS, KM_CTRL|KM_ALT|KM_SHIFT, 0); WM_keymap_verify_item(keymap, "SCREEN_OT_repeat_history", F3KEY, KM_PRESS, 0, 0); - #ifdef __APPLE__ - WM_keymap_add_item(keymap, "SCREEN_OT_repeat_last", RKEY, KM_PRESS, KM_OSKEY, 0); - #endif - WM_keymap_add_item(keymap, "SCREEN_OT_repeat_last", RKEY, KM_PRESS, KM_CTRL, 0); + + WM_keymap_add_item(keymap, "SCREEN_OT_repeat_last", RKEY, KM_PRESS, KM_SHIFT, 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"); + RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_python_file_run", F7KEY, KM_PRESS, 0, 0)->ptr, "path", "test.py"); WM_keymap_verify_item(keymap, "SCRIPT_OT_python_run_ui_scripts", F8KEY, KM_PRESS, 0, 0); /* files */ @@ -3365,7 +3355,7 @@ void ED_keymap_screen(wmWindowManager *wm) /* Anim Playback ------------------------------------------------ */ - keymap= WM_keymap_listbase(wm, "Frames", 0, 0); + keymap= WM_keymap_find(wm, "Frames", 0, 0); /* frame offsets */ RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_offset", UPARROWKEY, KM_PRESS, 0, 0)->ptr, "delta", 10); diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c index 5ae1bdf84aa..81c3f4d6814 100644 --- a/source/blender/editors/screen/screendump.c +++ b/source/blender/editors/screen/screendump.c @@ -73,24 +73,24 @@ static int screenshot_exec(bContext *C, wmOperator *op) if(scd && scd->dumprect) { Scene *scene= CTX_data_scene(C); ImBuf *ibuf; - char filename[FILE_MAX]; + char path[FILE_MAX]; - RNA_string_get(op->ptr, "filename", filename); + RNA_string_get(op->ptr, "path", path); - strcpy(G.ima, filename); - BLI_convertstringcode(filename, G.sce); + strcpy(G.ima, path); + BLI_convertstringcode(path, G.sce); /* BKE_add_image_extension() checks for if extension was already set */ if(scene->r.scemode & R_EXTENSION) - if(strlen(filename)<FILE_MAXDIR+FILE_MAXFILE-5) - BKE_add_image_extension(scene, filename, scene->r.imtype); + if(strlen(path)<FILE_MAXDIR+FILE_MAXFILE-5) + BKE_add_image_extension(scene, path, scene->r.imtype); ibuf= IMB_allocImBuf(scd->dumpsx, scd->dumpsy, 24, 0, 0); ibuf->rect= scd->dumprect; if(scene->r.planes == 8) IMB_cspace(ibuf, rgb_to_bw); - BKE_write_ibuf(scene, ibuf, filename, scene->r.imtype, scene->r.subimtype, scene->r.quality); + BKE_write_ibuf(scene, ibuf, path, scene->r.imtype, scene->r.subimtype, scene->r.quality); IMB_freeImBuf(ibuf); @@ -149,10 +149,10 @@ static int screenshot_invoke(bContext *C, wmOperator *op, wmEvent *event) scd->dumprect= dumprect; op->customdata= scd; - if(RNA_property_is_set(op->ptr, "filename")) + if(RNA_property_is_set(op->ptr, "path")) return screenshot_exec(C, op); - RNA_string_set(op->ptr, "filename", G.ima); + RNA_string_set(op->ptr, "path", G.ima); WM_event_add_fileselect(C, op); @@ -173,7 +173,7 @@ void SCREEN_OT_screenshot(wmOperatorType *ot) ot->flag= 0; - WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE); + WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL); RNA_def_boolean(ot->srna, "full", 1, "Full Screen", ""); } @@ -284,7 +284,7 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update) static int screencast_exec(bContext *C, wmOperator *op) { bScreen *screen= CTX_wm_screen(C); - wmJob *steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), screen); + wmJob *steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), screen, 0); ScreenshotJob *sj= MEM_callocN(sizeof(ScreenshotJob), "screenshot job"); /* setup sj */ @@ -327,7 +327,7 @@ void SCREEN_OT_screencast(wmOperatorType *ot) ot->flag= 0; - RNA_def_property(ot->srna, "filename", PROP_STRING, PROP_FILEPATH); + RNA_def_property(ot->srna, "path", PROP_STRING, PROP_FILEPATH); RNA_def_boolean(ot->srna, "full", 1, "Full Screen", ""); } diff --git a/source/blender/editors/sculpt_paint/SConscript b/source/blender/editors/sculpt_paint/SConscript index 01e1d80c24c..3d2ea89f506 100644 --- a/source/blender/editors/sculpt_paint/SConscript +++ b/source/blender/editors/sculpt_paint/SConscript @@ -8,4 +8,11 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../render/extern/include #/intern/guardedalloc' incs += ' ../../gpu ../../makesrna' +if env['OURPLATFORM'] == 'linux2': + cflags='-pthread' + incs += ' ../../../extern/binreloc/include' + +if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): + incs += ' ' + env['BF_PTHREADS_INC'] + 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 870b66cdbbd..d223c423690 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -625,19 +625,6 @@ static void BarycentricWeightsPersp2f(float pt[2], float v1[4], float v2[4], flo w[0] = w[1] = w[2] = 1.0f/3.0f; } -static void VecWeightf(float p[3], const float v1[3], const float v2[3], const float v3[3], const float w[3]) -{ - p[0] = v1[0]*w[0] + v2[0]*w[1] + v3[0]*w[2]; - p[1] = v1[1]*w[0] + v2[1]*w[1] + v3[1]*w[2]; - p[2] = v1[2]*w[0] + v2[2]*w[1] + v3[2]*w[2]; -} - -static void Vec2Weightf(float p[2], const float v1[2], const float v2[2], const float v3[2], const float w[3]) -{ - p[0] = v1[0]*w[0] + v2[0]*w[1] + v3[0]*w[2]; - p[1] = v1[1]*w[0] + v2[1]*w[1] + v3[1]*w[2]; -} - static float VecZDepthOrtho(float pt[2], float v1[3], float v2[3], float v3[3], float w[3]) { BarycentricWeights2f(pt, v1, v2, v3, w); @@ -746,10 +733,10 @@ static int project_paint_PickColor(const ProjPaintState *ps, float pt[2], float tf = ps->dm_mtface + face_index; if (side == 0) { - Vec2Weightf(uv, tf->uv[0], tf->uv[1], tf->uv[2], w); + Vec2Lerp3f(uv, tf->uv[0], tf->uv[1], tf->uv[2], w); } else { /* QUAD */ - Vec2Weightf(uv, tf->uv[0], tf->uv[2], tf->uv[3], w); + Vec2Lerp3f(uv, tf->uv[0], tf->uv[2], tf->uv[3], w); } ibuf = tf->tpage->ibufs.first; /* we must have got the imbuf before getting here */ @@ -870,8 +857,8 @@ static int project_paint_occlude_ptv_clip( } /* Test if we're in the clipped area, */ - if (side) VecWeightf(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v3].co, ps->dm_mvert[mf->v4].co, w); - else VecWeightf(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v2].co, ps->dm_mvert[mf->v3].co, w); + if (side) VecLerp3f(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v3].co, ps->dm_mvert[mf->v4].co, w); + else VecLerp3f(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v2].co, ps->dm_mvert[mf->v3].co, w); Mat4MulVecfl(ps->ob->obmat, wco); if(!view3d_test_clipping(ps->rv3d, wco)) { @@ -1146,19 +1133,6 @@ static int check_seam(const ProjPaintState *ps, const int orig_face, const int o return 1; } -/* TODO - move to arithb.c */ -/* Converts an angle to a length that can be used for maintaining an even margin around UV's */ -static float angleToLength(float angle) -{ - // already accounted for - if (angle < 0.000001f) { - return 1.0f; - } - else { - return fabsf(1.0f / cosf(angle * (M_PI/180.0f))); - } -} - /* Calculate outset UV's, this is not the same as simply scaling the UVs, * since the outset coords are a margin that keep an even distance from the original UV's, * note that the image aspect is taken into account */ @@ -1204,15 +1178,15 @@ static void uv_image_outset(float (*orig_uv)[2], float (*outset_uv)[2], const fl } if (is_quad) { - a1 = angleToLength(NormalizedVecAngle2_2D(dir4, dir1)); - a2 = angleToLength(NormalizedVecAngle2_2D(dir1, dir2)); - a3 = angleToLength(NormalizedVecAngle2_2D(dir2, dir3)); - a4 = angleToLength(NormalizedVecAngle2_2D(dir3, dir4)); + a1 = AngleToLength(NormalizedVecAngle2_2D(dir4, dir1)); + a2 = AngleToLength(NormalizedVecAngle2_2D(dir1, dir2)); + a3 = AngleToLength(NormalizedVecAngle2_2D(dir2, dir3)); + a4 = AngleToLength(NormalizedVecAngle2_2D(dir3, dir4)); } else { - a1 = angleToLength(NormalizedVecAngle2_2D(dir3, dir1)); - a2 = angleToLength(NormalizedVecAngle2_2D(dir1, dir2)); - a3 = angleToLength(NormalizedVecAngle2_2D(dir2, dir3)); + a1 = AngleToLength(NormalizedVecAngle2_2D(dir3, dir1)); + a2 = AngleToLength(NormalizedVecAngle2_2D(dir1, dir2)); + a3 = AngleToLength(NormalizedVecAngle2_2D(dir2, dir3)); } if (is_quad) { @@ -1329,7 +1303,7 @@ static void screen_px_from_ortho( float w[3]) { BarycentricWeights2f(uv, uv1co, uv2co, uv3co, w); - VecWeightf(pixelScreenCo, v1co, v2co, v3co, w); + VecLerp3f(pixelScreenCo, v1co, v2co, v3co, w); } /* same as screen_px_from_ortho except we need to take into account @@ -1363,7 +1337,7 @@ static void screen_px_from_persp( } /* done re-weighting */ - VecWeightf(pixelScreenCo, v1co, v2co, v3co, w); + VecLerp3f(pixelScreenCo, v1co, v2co, v3co, w); } static void project_face_pixel(const MTFace *tf_other, ImBuf *ibuf_other, const float w[3], int side, unsigned char rgba_ub[4], float rgba_f[4]) @@ -1381,7 +1355,7 @@ static void project_face_pixel(const MTFace *tf_other, ImBuf *ibuf_other, const uvCo3 = (float *)tf_other->uv[2]; } - Vec2Weightf(uv_other, uvCo1, uvCo2, uvCo3, w); + Vec2Lerp3f(uv_other, uvCo1, uvCo2, uvCo3, w); /* use */ uvco_to_wrapped_pxco(uv_other, ibuf_other->x, ibuf_other->y, &x, &y); @@ -1916,22 +1890,22 @@ static void rect_to_uvspace_ortho( uv[0] = bucket_bounds->xmax; uv[1] = bucket_bounds->ymin; BarycentricWeights2f(uv, v1coSS, v2coSS, v3coSS, w); - Vec2Weightf(bucket_bounds_uv[flip?3:0], uv1co, uv2co, uv3co, w); + Vec2Lerp3f(bucket_bounds_uv[flip?3:0], uv1co, uv2co, uv3co, w); //uv[0] = bucket_bounds->xmax; // set above uv[1] = bucket_bounds->ymax; BarycentricWeights2f(uv, v1coSS, v2coSS, v3coSS, w); - Vec2Weightf(bucket_bounds_uv[flip?2:1], uv1co, uv2co, uv3co, w); + Vec2Lerp3f(bucket_bounds_uv[flip?2:1], uv1co, uv2co, uv3co, w); uv[0] = bucket_bounds->xmin; //uv[1] = bucket_bounds->ymax; // set above BarycentricWeights2f(uv, v1coSS, v2coSS, v3coSS, w); - Vec2Weightf(bucket_bounds_uv[flip?1:2], uv1co, uv2co, uv3co, w); + Vec2Lerp3f(bucket_bounds_uv[flip?1:2], uv1co, uv2co, uv3co, w); //uv[0] = bucket_bounds->xmin; // set above uv[1] = bucket_bounds->ymin; BarycentricWeights2f(uv, v1coSS, v2coSS, v3coSS, w); - Vec2Weightf(bucket_bounds_uv[flip?0:3], uv1co, uv2co, uv3co, w); + Vec2Lerp3f(bucket_bounds_uv[flip?0:3], uv1co, uv2co, uv3co, w); } /* same as above but use BarycentricWeightsPersp2f */ @@ -1950,22 +1924,22 @@ static void rect_to_uvspace_persp( uv[0] = bucket_bounds->xmax; uv[1] = bucket_bounds->ymin; BarycentricWeightsPersp2f(uv, v1coSS, v2coSS, v3coSS, w); - Vec2Weightf(bucket_bounds_uv[flip?3:0], uv1co, uv2co, uv3co, w); + Vec2Lerp3f(bucket_bounds_uv[flip?3:0], uv1co, uv2co, uv3co, w); //uv[0] = bucket_bounds->xmax; // set above uv[1] = bucket_bounds->ymax; BarycentricWeightsPersp2f(uv, v1coSS, v2coSS, v3coSS, w); - Vec2Weightf(bucket_bounds_uv[flip?2:1], uv1co, uv2co, uv3co, w); + Vec2Lerp3f(bucket_bounds_uv[flip?2:1], uv1co, uv2co, uv3co, w); uv[0] = bucket_bounds->xmin; //uv[1] = bucket_bounds->ymax; // set above BarycentricWeightsPersp2f(uv, v1coSS, v2coSS, v3coSS, w); - Vec2Weightf(bucket_bounds_uv[flip?1:2], uv1co, uv2co, uv3co, w); + Vec2Lerp3f(bucket_bounds_uv[flip?1:2], uv1co, uv2co, uv3co, w); //uv[0] = bucket_bounds->xmin; // set above uv[1] = bucket_bounds->ymin; BarycentricWeightsPersp2f(uv, v1coSS, v2coSS, v3coSS, w); - Vec2Weightf(bucket_bounds_uv[flip?0:3], uv1co, uv2co, uv3co, w); + Vec2Lerp3f(bucket_bounds_uv[flip?0:3], uv1co, uv2co, uv3co, w); } /* This works as we need it to but we can save a few steps and not use it */ @@ -2209,13 +2183,13 @@ static void project_bucket_clip_face( if (is_ortho) { for(i=0; i<(*tot); i++) { BarycentricWeights2f(isectVCosSS[i], v1coSS, v2coSS, v3coSS, w); - Vec2Weightf(bucket_bounds_uv[i], uv1co, uv2co, uv3co, w); + Vec2Lerp3f(bucket_bounds_uv[i], uv1co, uv2co, uv3co, w); } } else { for(i=0; i<(*tot); i++) { BarycentricWeightsPersp2f(isectVCosSS[i], v1coSS, v2coSS, v3coSS, w); - Vec2Weightf(bucket_bounds_uv[i], uv1co, uv2co, uv3co, w); + Vec2Lerp3f(bucket_bounds_uv[i], uv1co, uv2co, uv3co, w); } } } @@ -2470,7 +2444,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i /* a pitty we need to get the worldspace pixel location here */ if(ps->rv3d->rflag & RV3D_CLIPPING) { - VecWeightf(wco, ps->dm_mvert[ (*(&mf->v1 + i1)) ].co, ps->dm_mvert[ (*(&mf->v1 + i2)) ].co, ps->dm_mvert[ (*(&mf->v1 + i3)) ].co, w); + VecLerp3f(wco, ps->dm_mvert[ (*(&mf->v1 + i1)) ].co, ps->dm_mvert[ (*(&mf->v1 + i2)) ].co, ps->dm_mvert[ (*(&mf->v1 + i3)) ].co, w); Mat4MulVecfl(ps->ob->obmat, wco); if(view3d_test_clipping(ps->rv3d, wco)) { continue; /* Watch out that no code below this needs to run */ @@ -2686,8 +2660,8 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i /* a pitty we need to get the worldspace pixel location here */ if(ps->rv3d->rflag & RV3D_CLIPPING) { - if (side) VecWeightf(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v3].co, ps->dm_mvert[mf->v4].co, w); - else VecWeightf(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v2].co, ps->dm_mvert[mf->v3].co, w); + if (side) VecLerp3f(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v3].co, ps->dm_mvert[mf->v4].co, w); + else VecLerp3f(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v2].co, ps->dm_mvert[mf->v3].co, w); Mat4MulVecfl(ps->ob->obmat, wco); if(view3d_test_clipping(ps->rv3d, wco)) { @@ -3757,7 +3731,7 @@ static void *do_projectpaint_thread(void *ph_v) /*if (dist < s->brush->size) {*/ /* correct but uses a sqrtf */ if (dist_nosqrt < brush_size_sqared && (dist=sqrtf(dist_nosqrt)) < size_half) { - falloff = brush_curve_strength(ps->brush, dist, size_half); + falloff = brush_curve_strength_clamp(ps->brush, dist, size_half); if (falloff > 0.0f) { if (ps->is_texbrush) { brush_sample_tex(ps->brush, projPixel->projCoSS, rgba); @@ -4443,6 +4417,7 @@ typedef struct PaintOperation { int first; int prevmouse[2]; + float prev_pressure; /* need this since we dont get tablet events for pressure change */ int brush_size_orig; double starttime; @@ -4722,8 +4697,8 @@ static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event) if(wmtab->Active == EVT_TABLET_ERASER) pop->s.blend= IMB_BLEND_ERASE_ALPHA; } - else - pressure= 1.0f; + else /* otherwise airbrush becomes 1.0 pressure instantly */ + pressure= pop->prev_pressure ? pop->prev_pressure : 1.0f; if(pop->first) { pop->prevmouse[0]= mouse[0]; @@ -4732,8 +4707,7 @@ static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event) /* special exception here for too high pressure values on first touch in windows for some tablets, then we just skip first touch .. */ - if ((pop->s.brush->flag & (BRUSH_ALPHA_PRESSURE|BRUSH_SIZE_PRESSURE| - BRUSH_SPACING_PRESSURE|BRUSH_RAD_PRESSURE)) && tablet && (pressure >= 0.99f)) + if ((pop->s.brush->flag & (BRUSH_ALPHA_PRESSURE|BRUSH_SIZE_PRESSURE|BRUSH_SPACING_PRESSURE)) && tablet && (pressure >= 0.99f)) return; } @@ -4748,6 +4722,8 @@ static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event) /* apply */ paint_apply(C, op, &itemptr); + + pop->prev_pressure= pressure; } static int paint_invoke(bContext *C, wmOperator *op, wmEvent *event) @@ -4762,7 +4738,7 @@ static int paint_invoke(bContext *C, wmOperator *op, wmEvent *event) paint_apply_event(C, op, event); pop= op->customdata; - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); if(pop->s.brush->flag & BRUSH_AIRBRUSH) pop->timer= WM_event_add_window_timer(CTX_wm_window(C), TIMER, 0.01f); @@ -4897,12 +4873,15 @@ static int paint_radial_control_modal(bContext *C, wmOperator *op, wmEvent *even static int paint_radial_control_exec(bContext *C, wmOperator *op) { + Brush *brush = paint_brush(&CTX_data_scene(C)->toolsettings->imapaint.paint); float zoom; int ret; char str[256]; get_imapaint_zoom(C, &zoom, &zoom); - ret = brush_radial_control_exec(op, paint_brush(&CTX_data_scene(C)->toolsettings->imapaint.paint), 2.0 / zoom); + ret = brush_radial_control_exec(op, brush, 2.0 / zoom); WM_radial_control_string(op, str, 256); + + WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush); return ret; } @@ -4961,7 +4940,7 @@ static int grab_clone_invoke(bContext *C, wmOperator *op, wmEvent *event) cmv->starty= event->y; op->customdata= cmv; - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } @@ -5216,10 +5195,13 @@ static int texture_paint_radial_control_invoke(bContext *C, wmOperator *op, wmEv static int texture_paint_radial_control_exec(bContext *C, wmOperator *op) { - int ret = brush_radial_control_exec(op, paint_brush(&CTX_data_scene(C)->toolsettings->imapaint.paint), 2); + Brush *brush = paint_brush(&CTX_data_scene(C)->toolsettings->imapaint.paint); + int ret = brush_radial_control_exec(op, brush, 2); char str[256]; WM_radial_control_string(op, str, 256); + WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush); + return ret; } @@ -5232,6 +5214,11 @@ static int texture_paint_poll(bContext *C) return 0; } +int image_texture_paint_poll(bContext *C) +{ + return (texture_paint_poll(C) || image_paint_poll(C)); +} + void PAINT_OT_texture_paint_radial_control(wmOperatorType *ot) { WM_OT_radial_control_partial(ot); diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h index ba1b57a1bef..8251d1a5a1a 100644 --- a/source/blender/editors/sculpt_paint/paint_intern.h +++ b/source/blender/editors/sculpt_paint/paint_intern.h @@ -57,7 +57,10 @@ int paint_poll(bContext *C); void paint_cursor_start(struct bContext *C, int (*poll)(struct bContext *C)); /* paint_vertex.c */ -int vertex_paint_mode_poll(bContext *C); +int weight_paint_poll(struct bContext *C); +int vertex_paint_poll(struct bContext *C); +int vertex_paint_mode_poll(struct bContext *C); + void clear_vpaint(Scene *scene, int selected); void PAINT_OT_weight_paint_toggle(struct wmOperatorType *ot); @@ -69,6 +72,8 @@ void PAINT_OT_vertex_paint_toggle(struct wmOperatorType *ot); void PAINT_OT_vertex_paint(struct wmOperatorType *ot); /* paint_image.c */ +int image_texture_paint_poll(struct bContext *C); + void PAINT_OT_image_paint(struct wmOperatorType *ot); void PAINT_OT_image_paint_radial_control(struct wmOperatorType *ot); void PAINT_OT_grab_clone(struct wmOperatorType *ot); diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index 19b46f5a941..514c80d929d 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -38,6 +38,7 @@ #include "RNA_enum_types.h" #include "paint_intern.h" +#include "sculpt_intern.h" #include <string.h> @@ -133,3 +134,48 @@ void ED_operatortypes_paint(void) WM_operatortype_append(PAINT_OT_vertex_color_set); } +void ED_keymap_paint(wmWindowManager *wm) +{ + wmKeyMap *keymap; + + /* Sculpt mode */ + keymap= WM_keymap_find(wm, "Sculpt", 0, 0); + keymap->poll= sculpt_poll; + + RNA_enum_set(WM_keymap_add_item(keymap, "SCULPT_OT_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE); + RNA_enum_set(WM_keymap_add_item(keymap, "SCULPT_OT_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH); + RNA_enum_set(WM_keymap_add_item(keymap, "SCULPT_OT_radial_control", FKEY, KM_PRESS, KM_CTRL, 0)->ptr, "mode", WM_RADIALCONTROL_ANGLE); + + WM_keymap_add_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0); + + /* Vertex Paint mode */ + keymap= WM_keymap_find(wm, "Vertex Paint", 0, 0); + keymap->poll= vertex_paint_poll; + + RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_vertex_paint_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE); + RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_vertex_paint_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH); + WM_keymap_verify_item(keymap, "PAINT_OT_vertex_paint", LEFTMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "PAINT_OT_sample_color", RIGHTMOUSE, KM_PRESS, 0, 0); + + /* Weight Paint mode */ + keymap= WM_keymap_find(wm, "Weight Paint", 0, 0); + keymap->poll= weight_paint_poll; + + RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_weight_paint_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE); + 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); + + WM_keymap_verify_item(keymap, "PAINT_OT_weight_paint", LEFTMOUSE, KM_PRESS, 0, 0); + + /* Image/Texture Paint mode */ + keymap= WM_keymap_find(wm, "Image Paint", 0, 0); + keymap->poll= image_texture_paint_poll; + + RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_texture_paint_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE); + 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); + + WM_keymap_add_item(keymap, "PAINT_OT_image_paint", LEFTMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "PAINT_OT_sample_color", RIGHTMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "PAINT_OT_clone_cursor_set", LEFTMOUSE, KM_PRESS, KM_CTRL, 0); +} + diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index bd9ea50e0f8..b83352ae70c 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -263,7 +263,7 @@ int paint_stroke_modal(bContext *C, wmOperator *op, wmEvent *event) } /* TODO: fix hardcoded event here */ - if(event->type == LEFTMOUSE && event->val == 0) { + if(event->type == LEFTMOUSE && event->val == KM_RELEASE) { /* Exit stroke, free data */ if(stroke->smooth_stroke_cursor) diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 25ff57ca87f..5afc4954c9c 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -119,7 +119,7 @@ int vertex_paint_mode_poll(bContext *C) return ob && ob->mode == OB_MODE_VERTEX_PAINT; } -static int vp_poll(bContext *C) +int vertex_paint_poll(bContext *C) { if(vertex_paint_mode_poll(C) && paint_brush(&CTX_data_tool_settings(C)->vpaint->paint)) { @@ -133,7 +133,7 @@ static int vp_poll(bContext *C) return 0; } -static int wp_poll(bContext *C) +int weight_paint_poll(bContext *C) { Object *ob = CTX_data_active_object(C); @@ -710,7 +710,9 @@ static int sample_backbuf_area(ViewContext *vc, int *indexar, int totface, int x if(totface+4>=MAXINDEX) return 0; - if(size>64.0) size= 64.0; + /* brecht: disabled this because it obviously failes for + brushes with size > 64, why is this here? */ + /*if(size>64.0) size= 64.0;*/ ibuf= view3d_read_backbuf(vc, x-size, y-size, x+size, y+size); if(ibuf) { @@ -1058,7 +1060,7 @@ static int set_wpaint(bContext *C, wmOperator *op) /* toggle */ wp= scene->toolsettings->wpaint= new_vpaint(1); paint_init(&wp->paint, PAINT_CURSOR_WEIGHT_PAINT); - paint_cursor_start(C, wp_poll); + paint_cursor_start(C, weight_paint_poll); mesh_octree_table(ob, NULL, NULL, 's'); @@ -1127,14 +1129,18 @@ static int vpaint_radial_control_modal(bContext *C, wmOperator *op, wmEvent *eve { int ret = WM_radial_control_modal(C, op, event); if(ret != OPERATOR_RUNNING_MODAL) - paint_cursor_start(C, vp_poll); + paint_cursor_start(C, vertex_paint_poll); return ret; } static int vpaint_radial_control_exec(bContext *C, wmOperator *op) { Brush *brush = paint_brush(&CTX_data_scene(C)->toolsettings->vpaint->paint); - return brush_radial_control_exec(op, brush, 1); + int ret = brush_radial_control_exec(op, brush, 1); + + WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush); + + return ret; } static int wpaint_radial_control_invoke(bContext *C, wmOperator *op, wmEvent *event) @@ -1152,14 +1158,18 @@ static int wpaint_radial_control_modal(bContext *C, wmOperator *op, wmEvent *eve { int ret = WM_radial_control_modal(C, op, event); if(ret != OPERATOR_RUNNING_MODAL) - paint_cursor_start(C, wp_poll); + paint_cursor_start(C, weight_paint_poll); return ret; } static int wpaint_radial_control_exec(bContext *C, wmOperator *op) { Brush *brush = paint_brush(&CTX_data_scene(C)->toolsettings->wpaint->paint); - return brush_radial_control_exec(op, brush, 1); + int ret = brush_radial_control_exec(op, brush, 1); + + WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush); + + return ret; } void PAINT_OT_weight_paint_radial_control(wmOperatorType *ot) @@ -1172,7 +1182,7 @@ void PAINT_OT_weight_paint_radial_control(wmOperatorType *ot) ot->invoke= wpaint_radial_control_invoke; ot->modal= wpaint_radial_control_modal; ot->exec= wpaint_radial_control_exec; - ot->poll= wp_poll; + ot->poll= weight_paint_poll; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -1188,7 +1198,7 @@ void PAINT_OT_vertex_paint_radial_control(wmOperatorType *ot) ot->invoke= vpaint_radial_control_invoke; ot->modal= vpaint_radial_control_modal; ot->exec= vpaint_radial_control_exec; - ot->poll= vp_poll; + ot->poll= vertex_paint_poll; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -1492,7 +1502,7 @@ static int wpaint_invoke(bContext *C, wmOperator *op, wmEvent *event) wpaint_stroke_done); /* add modal handler */ - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); op->type->modal(C, op, event); @@ -1510,7 +1520,7 @@ void PAINT_OT_weight_paint(wmOperatorType *ot) ot->invoke= wpaint_invoke; ot->modal= paint_stroke_modal; /* ot->exec= vpaint_exec; <-- needs stroke property */ - ot->poll= wp_poll; + ot->poll= weight_paint_poll; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -1557,7 +1567,7 @@ static int set_vpaint(bContext *C, wmOperator *op) /* toggle */ if(vp==NULL) vp= scene->toolsettings->vpaint= new_vpaint(0); - paint_cursor_start(C, vp_poll); + paint_cursor_start(C, vertex_paint_poll); paint_init(&vp->paint, PAINT_CURSOR_VERTEX_PAINT); } @@ -1732,6 +1742,10 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P } Mat4SwapMat4(vc->rv3d->persmat, mat); + + /* was disabled because it is slow, but necessary for blur */ + if(vp->mode == VP_BLUR) + do_shared_vertexcol(me); ED_region_tag_redraw(vc->ar); @@ -1761,7 +1775,7 @@ static int vpaint_invoke(bContext *C, wmOperator *op, wmEvent *event) vpaint_stroke_done); /* add modal handler */ - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); op->type->modal(C, op, event); @@ -1778,7 +1792,7 @@ void PAINT_OT_vertex_paint(wmOperatorType *ot) ot->invoke= vpaint_invoke; ot->modal= paint_stroke_modal; /* ot->exec= vpaint_exec; <-- needs stroke property */ - ot->poll= vp_poll; + ot->poll= vertex_paint_poll; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index be31ab45af4..e41231442ba 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -1155,7 +1155,7 @@ static int sculpt_mode_poll(bContext *C) return ob && ob->mode & OB_MODE_SCULPT; } -static int sculpt_poll(bContext *C) +int sculpt_poll(bContext *C) { return sculpt_mode_poll(C) && paint_poll(C); } @@ -1207,8 +1207,11 @@ static int sculpt_radial_control_modal(bContext *C, wmOperator *op, wmEvent *eve static int sculpt_radial_control_exec(bContext *C, wmOperator *op) { Brush *brush = paint_brush(&CTX_data_tool_settings(C)->sculpt->paint); + int ret = brush_radial_control_exec(op, brush, 1); - return brush_radial_control_exec(op, brush, 1); + WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush); + + return ret; } static void SCULPT_OT_radial_control(wmOperatorType *ot) @@ -1564,7 +1567,7 @@ static int sculpt_brush_stroke_invoke(bContext *C, wmOperator *op, wmEvent *even sculpt_stroke_done); /* add modal handler */ - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); op->type->modal(C, op, event); @@ -1693,10 +1696,10 @@ static int sculpt_toggle_mode(bContext *C, wmOperator *op) paint_init(&ts->sculpt->paint, PAINT_CURSOR_SCULPT); paint_cursor_start(C, sculpt_poll); - - WM_event_add_notifier(C, NC_SCENE|ND_MODE, CTX_data_scene(C)); } + WM_event_add_notifier(C, NC_SCENE|ND_MODE, CTX_data_scene(C)); + return OPERATOR_FINISHED; } diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index 25f97b862e6..15ccacc294a 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -33,6 +33,7 @@ #include "DNA_listBase.h" #include "DNA_vec_types.h" +struct bContext; struct Brush; struct Mesh; struct Object; @@ -53,6 +54,8 @@ struct Brush *sculptmode_brush(void); char sculpt_modifiers_active(struct Object *ob); void sculpt(Sculpt *sd); +int sculpt_poll(struct bContext *C); + /* Stroke */ struct SculptStroke *sculpt_stroke_new(const int max); void sculpt_stroke_free(struct SculptStroke *); diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index 303ca0eaefd..1121a3bcbcd 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -66,13 +66,13 @@ static int open_exec(bContext *C, wmOperator *op) { - char filename[FILE_MAX]; + char path[FILE_MAX]; bSound *sound; AUD_SoundInfo info; - RNA_string_get(op->ptr, "filename", filename); + RNA_string_get(op->ptr, "path", path); - sound = sound_new_file(CTX_data_main(C), filename); + sound = sound_new_file(CTX_data_main(C), path); if (sound==NULL || sound->handle == NULL) { BKE_report(op->reports, RPT_ERROR, "Unsupported audio format"); @@ -114,7 +114,7 @@ void SOUND_OT_open(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE); + WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, FILE_SPECIAL); RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory."); } diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 89633d0cdfe..865d072d938 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -89,6 +89,44 @@ #include "action_intern.h" /* ************************************************************************** */ +/* ACTION MANAGEMENT */ + +/* ******************** New Action Operator *********************** */ + +static int act_new_exec(bContext *C, wmOperator *op) +{ + bAction *action; + + // XXX need to restore behaviour to copy old actions... + action= add_empty_action("Action"); + + /* combined with RNA property, this will assign & increase user, + so decrease here to compensate for that */ + action->id.us--; + + /* set notifier that keyframes have changed */ + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); + + return OPERATOR_FINISHED; +} + +void ACT_OT_new (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "New"; + ot->idname= "ACT_OT_new"; + ot->description= "Create new action."; + + /* api callbacks */ + ot->exec= act_new_exec; + // NOTE: this is used in the NLA too... + //ot->poll= ED_operator_action_active; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/* ************************************************************************** */ /* KEYFRAME-RANGE STUFF */ /* *************************** Calculate Range ************************** */ diff --git a/source/blender/editors/space_action/action_header.c b/source/blender/editors/space_action/action_header.c index 8674f481a18..25a5123d1b5 100644 --- a/source/blender/editors/space_action/action_header.c +++ b/source/blender/editors/space_action/action_header.c @@ -189,6 +189,7 @@ static void act_edit_keytypesmenu(bContext *C, uiLayout *layout, void *arg_unuse uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); uiItemEnumO(layout, NULL, 0, "ACT_OT_keyframe_type", "type", BEZT_KEYTYPE_KEYFRAME); uiItemEnumO(layout, NULL, 0, "ACT_OT_keyframe_type", "type", BEZT_KEYTYPE_BREAKDOWN); + uiItemEnumO(layout, NULL, 0, "ACT_OT_keyframe_type", "type", BEZT_KEYTYPE_EXTREME); } static void act_edit_handlesmenu(bContext *C, uiLayout *layout, void *arg_unused) @@ -260,61 +261,6 @@ static void do_action_buttons(bContext *C, void *arg, int event) } } -static void saction_idpoin_handle(bContext *C, ID *id, int event) -{ - SpaceAction *saction= CTX_wm_space_action(C); - Object *obact= CTX_data_active_object(C); - - 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) { - AnimData *adt= BKE_id_add_animdata(&obact->id); /* this only adds if non-existant */ - - /* set action */ - printf("\tset action \n"); - adt->action= saction->action; - adt->action->id.us++; - } - - 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"); - if (saction->pin == 0) { - AnimData *adt= BKE_id_add_animdata(&obact->id); /* this only adds if non-existant */ - - /* set new action */ - // XXX need to restore behaviour to copy old actions... - printf("\tset new action \n"); - adt->action= saction->action= add_empty_action("Action"); - } - 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; - } -} - void action_header_buttons(const bContext *C, ARegion *ar) { ScrArea *sa= CTX_wm_area(C); @@ -390,28 +336,18 @@ void action_header_buttons(const bContext *C, ARegion *ar) /* FILTERING OPTIONS */ xco -= 10; - //uiBlockBeginAlign(block); - uiDefIconButBitI(block, TOG, ADS_FILTER_ONLYSEL, B_REDR, ICON_RESTRICT_SELECT_OFF, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Only display selected Objects"); - //uiBlockEndAlign(block); - xco += 5; - - uiBlockBeginAlign(block); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOSCE, B_REDR, ICON_SCENE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Scene Animation"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOWOR, B_REDR, ICON_WORLD_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display World Animation"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOSHAPEKEYS, B_REDR, ICON_SHAPEKEY_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display ShapeKeys"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMAT, B_REDR, ICON_MATERIAL_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Materials"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOLAM, B_REDR, ICON_LAMP_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Lamps"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCAM, B_REDR, ICON_CAMERA_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->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, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Curves"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMBA, B_REDR, ICON_META_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display MetaBalls"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOPART, B_REDR, ICON_PARTICLE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Particles"); - uiBlockEndAlign(block); - xco += 30; + xco= ANIM_headerUI_standard_buttons(C, &saction->ads, block, xco, yco); } else if (saction->mode == SACTCONT_ACTION) { - /* 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); + uiLayout *layout; + bScreen *sc= CTX_wm_screen(C); + PointerRNA ptr; + + RNA_pointer_create(&sc->id, &RNA_SpaceDopeSheetEditor, saction, &ptr); + + layout= uiBlockLayout(block, UI_LAYOUT_HORIZONTAL, UI_LAYOUT_HEADER, xco, 20+3, 20, 1, U.uistyles.first); + uiTemplateID(layout, (bContext*)C, &ptr, "action", "ACT_OT_new", NULL, NULL); + uiBlockLayoutResolve(block, &xco, NULL); xco += 8; } diff --git a/source/blender/editors/space_action/action_intern.h b/source/blender/editors/space_action/action_intern.h index e5f0ab8994e..4326bed62d3 100644 --- a/source/blender/editors/space_action/action_intern.h +++ b/source/blender/editors/space_action/action_intern.h @@ -99,6 +99,8 @@ void ACT_OT_frame_jump(struct wmOperatorType *ot); void ACT_OT_snap(struct wmOperatorType *ot); void ACT_OT_mirror(struct wmOperatorType *ot); +void ACT_OT_new(struct wmOperatorType *ot); + /* defines for snap keyframes * NOTE: keep in sync with eEditKeyframes_Snap (in ED_keyframes_edit.h) */ diff --git a/source/blender/editors/space_action/action_ops.c b/source/blender/editors/space_action/action_ops.c index 42b033040b1..00b22232608 100644 --- a/source/blender/editors/space_action/action_ops.c +++ b/source/blender/editors/space_action/action_ops.c @@ -83,6 +83,7 @@ void action_operatortypes(void) WM_operatortype_append(ACT_OT_insert_keyframe); WM_operatortype_append(ACT_OT_copy); WM_operatortype_append(ACT_OT_paste); + WM_operatortype_append(ACT_OT_new); WM_operatortype_append(ACT_OT_previewrange_set); WM_operatortype_append(ACT_OT_view_all); @@ -90,7 +91,7 @@ void action_operatortypes(void) /* ************************** registration - keymaps **********************************/ -static void action_keymap_keyframes (wmWindowManager *wm, ListBase *keymap) +static void action_keymap_keyframes (wmWindowManager *wm, wmKeyMap *keymap) { wmKeymapItem *kmi; @@ -165,7 +166,7 @@ static void action_keymap_keyframes (wmWindowManager *wm, ListBase *keymap) void action_keymap(wmWindowManager *wm) { - ListBase *keymap; + wmKeyMap *keymap; /* channels */ /* Channels are not directly handled by the Action Editor module, but are inherited from the Animation module. @@ -174,7 +175,7 @@ void action_keymap(wmWindowManager *wm) */ /* keyframes */ - keymap= WM_keymap_listbase(wm, "Action_Keys", SPACE_ACTION, 0); + keymap= WM_keymap_find(wm, "Action_Keys", SPACE_ACTION, 0); action_keymap_keyframes(wm, keymap); } diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c index b7a3df563ea..3b275cab814 100644 --- a/source/blender/editors/space_action/space_action.c +++ b/source/blender/editors/space_action/space_action.c @@ -153,12 +153,12 @@ static SpaceLink *action_duplicate(SpaceLink *sl) /* add handlers, stuff you only do once or on area/region changes */ static void action_main_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy); /* own keymap */ - keymap= WM_keymap_listbase(wm, "Action_Keys", SPACE_ACTION, 0); /* XXX weak? */ + keymap= WM_keymap_find(wm, "Action_Keys", SPACE_ACTION, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } @@ -216,12 +216,12 @@ static void action_main_area_draw(const bContext *C, ARegion *ar) /* add handlers, stuff you only do once or on area/region changes */ static void action_channel_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy); /* own keymap */ - keymap= WM_keymap_listbase(wm, "Animation_Channels", 0, 0); /* XXX weak? */ + keymap= WM_keymap_find(wm, "Animation_Channels", 0, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } @@ -323,6 +323,7 @@ static void action_main_area_listener(ARegion *ar, wmNotifier *wmn) break; case NC_SCENE: switch(wmn->data) { + case ND_RENDER_OPTIONS: case ND_OB_ACTIVE: case ND_FRAME: case ND_MARKERS: diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c index edd5da44526..8c563c98d9b 100644 --- a/source/blender/editors/space_api/spacetypes.c +++ b/source/blender/editors/space_api/spacetypes.c @@ -46,8 +46,8 @@ #include "ED_markers.h" #include "ED_mesh.h" #include "ED_object.h" -#include "ED_particle.h" #include "ED_physics.h" +#include "ED_render.h" #include "ED_screen.h" #include "ED_sculpt.h" #include "ED_space_api.h" @@ -92,15 +92,13 @@ void ED_spacetypes_init(void) ED_operatortypes_sculpt(); ED_operatortypes_uvedit(); ED_operatortypes_paint(); - ED_operatortypes_particle(); + ED_operatortypes_physics(); ED_operatortypes_curve(); ED_operatortypes_armature(); ED_operatortypes_marker(); - ED_operatortypes_pointcache(); - ED_operatortypes_fluid(); ED_operatortypes_metaball(); - ED_operatortypes_boids(); ED_operatortypes_sound(); + ED_operatortypes_render(); ui_view2d_operatortypes(); @@ -127,8 +125,9 @@ void ED_spacetypes_keymap(wmWindowManager *wm) ED_keymap_uvedit(wm); ED_keymap_curve(wm); ED_keymap_armature(wm); - ED_keymap_particle(wm); + ED_keymap_physics(wm); ED_keymap_metaball(wm); + ED_keymap_paint(wm); ED_marker_keymap(wm); UI_view2d_keymap(wm); diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 635abd429f6..9333ba9209c 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -463,6 +463,7 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma found= buttons_context_path_texture(C, path); break; case BCONTEXT_BONE: + case BCONTEXT_BONE_CONSTRAINT: found= buttons_context_path_bone(path); if(!found) found= buttons_context_path_data(path, OB_ARMATURE); @@ -553,7 +554,7 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r "world", "object", "mesh", "armature", "lattice", "curve", "meta_ball", "lamp", "camera", "material", "material_slot", "texture", "texture_slot", "bone", "edit_bone", "particle_system", - "cloth", "soft_body", "fluid", "smoke", "smoke_hr", "collision", "brush", NULL}; + "cloth", "soft_body", "fluid", "smoke", "collision", "brush", NULL}; CTX_data_dir_set(result, dir); return 1; diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c index a1041bc5106..83dd679c543 100644 --- a/source/blender/editors/space_buttons/buttons_header.c +++ b/source/blender/editors/space_buttons/buttons_header.c @@ -114,13 +114,15 @@ void buttons_header_buttons(const bContext *C, ARegion *ar) if(sbuts->pathflag & (1<<BCONTEXT_OBJECT)) uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_OBJECT_DATA, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_OBJECT, 0, 0, "Object"); if(sbuts->pathflag & (1<<BCONTEXT_CONSTRAINT)) - uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_CONSTRAINT, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_CONSTRAINT, 0, 0, "Constraint"); + uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_CONSTRAINT, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_CONSTRAINT, 0, 0, "Object Constraints"); if(sbuts->pathflag & (1<<BCONTEXT_DATA)) uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, sbuts->dataicon, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_DATA, 0, 0, "Object Data"); if(sbuts->pathflag & (1<<BCONTEXT_MODIFIER)) - uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_MODIFIER, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_MODIFIER, 0, 0, "Modifier"); + uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_MODIFIER, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_MODIFIER, 0, 0, "Modifiers"); if(sbuts->pathflag & (1<<BCONTEXT_BONE)) uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_BONE_DATA, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_BONE, 0, 0, "Bone"); + if(sbuts->pathflag & (1<<BCONTEXT_BONE_CONSTRAINT)) + uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_CONSTRAINT, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_BONE_CONSTRAINT, 0, 0, "Bone Constraints"); if(sbuts->pathflag & (1<<BCONTEXT_MATERIAL)) uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_MATERIAL, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_MATERIAL, 0, 0, "Material"); if(sbuts->pathflag & (1<<BCONTEXT_TEXTURE)) diff --git a/source/blender/editors/space_buttons/buttons_intern.h b/source/blender/editors/space_buttons/buttons_intern.h index 0a5a5714a06..2e95fde8f99 100644 --- a/source/blender/editors/space_buttons/buttons_intern.h +++ b/source/blender/editors/space_buttons/buttons_intern.h @@ -64,33 +64,6 @@ void buttons_context_draw(const struct bContext *C, struct uiLayout *layout); void buttons_context_register(struct ARegionType *art); /* buttons_ops.c */ -void OBJECT_OT_group_add(struct wmOperatorType *ot); -void OBJECT_OT_group_remove(struct wmOperatorType *ot); - -void OBJECT_OT_material_slot_add(struct wmOperatorType *ot); -void OBJECT_OT_material_slot_remove(struct wmOperatorType *ot); -void OBJECT_OT_material_slot_assign(struct wmOperatorType *ot); -void OBJECT_OT_material_slot_select(struct wmOperatorType *ot); -void OBJECT_OT_material_slot_deselect(struct wmOperatorType *ot); - -void MATERIAL_OT_new(struct wmOperatorType *ot); -void TEXTURE_OT_new(struct wmOperatorType *ot); -void WORLD_OT_new(struct wmOperatorType *ot); - -void OBJECT_OT_particle_system_add(struct wmOperatorType *ot); -void OBJECT_OT_particle_system_remove(struct wmOperatorType *ot); - -void PARTICLE_OT_new(struct wmOperatorType *ot); -void PARTICLE_OT_new_target(struct wmOperatorType *ot); -void PARTICLE_OT_remove_target(struct wmOperatorType *ot); -void PARTICLE_OT_target_move_up(struct wmOperatorType *ot); -void PARTICLE_OT_target_move_down(struct wmOperatorType *ot); -void PARTICLE_OT_connect_hair(struct wmOperatorType *ot); -void PARTICLE_OT_disconnect_hair(struct wmOperatorType *ot); - -void SCENE_OT_render_layer_add(struct wmOperatorType *ot); -void SCENE_OT_render_layer_remove(struct wmOperatorType *ot); - void BUTTONS_OT_file_browse(struct wmOperatorType *ot); void BUTTONS_OT_toolbox(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index 481c2d6cfc3..2d961f78243 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -30,53 +30,14 @@ #include "MEM_guardedalloc.h" -#include "DNA_boid_types.h" -#include "DNA_curve_types.h" -#include "DNA_group_types.h" -#include "DNA_object_types.h" -#include "DNA_material_types.h" -#include "DNA_meshdata_types.h" -#include "DNA_modifier_types.h" -#include "DNA_node_types.h" -#include "DNA_texture_types.h" -#include "DNA_scene_types.h" #include "DNA_screen_types.h" #include "DNA_space_types.h" -#include "DNA_world_types.h" -#include "BKE_bvhutils.h" -#include "BKE_cdderivedmesh.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" -#include "BKE_DerivedMesh.h" -#include "BKE_group.h" -#include "BKE_font.h" -#include "BKE_library.h" -#include "BKE_main.h" -#include "BKE_material.h" -#include "BKE_modifier.h" -#include "BKE_node.h" -#include "BKE_particle.h" -#include "BKE_pointcache.h" -#include "BKE_scene.h" -#include "BKE_texture.h" -#include "BKE_utildefines.h" -#include "BKE_world.h" - -#include "BLI_arithb.h" -#include "BLI_editVert.h" -#include "BLI_listbase.h" - -#include "RNA_access.h" -#include "RNA_enum_types.h" #include "WM_api.h" #include "WM_types.h" -#include "ED_curve.h" -#include "ED_mesh.h" -#include "ED_particle.h" - #include "RNA_access.h" #include "RNA_define.h" @@ -85,947 +46,6 @@ #include "buttons_intern.h" // own include - -/********************** material slot operators *********************/ - -static int material_slot_add_exec(bContext *C, wmOperator *op) -{ - Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; - - if(!ob) - return OPERATOR_CANCELLED; - - object_add_material_slot(ob); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); - - return OPERATOR_FINISHED; -} - -void OBJECT_OT_material_slot_add(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Add Material Slot"; - ot->idname= "OBJECT_OT_material_slot_add"; - ot->description="Add a new material slot or duplicate the selected one."; - - /* api callbacks */ - ot->exec= material_slot_add_exec; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - -static int material_slot_remove_exec(bContext *C, wmOperator *op) -{ - Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; - - if(!ob) - return OPERATOR_CANCELLED; - - object_remove_material_slot(ob); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); - - return OPERATOR_FINISHED; -} - -void OBJECT_OT_material_slot_remove(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Remove Material Slot"; - ot->idname= "OBJECT_OT_material_slot_remove"; - ot->description="Remove the selected material slot."; - - /* api callbacks */ - ot->exec= material_slot_remove_exec; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - -static int material_slot_assign_exec(bContext *C, wmOperator *op) -{ - Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; - - if(!ob) - return OPERATOR_CANCELLED; - - if(ob && ob->actcol>0) { - if(ob->type == OB_MESH) { - EditMesh *em= ((Mesh*)ob->data)->edit_mesh; - EditFace *efa; - - if(em) { - for(efa= em->faces.first; efa; efa=efa->next) - if(efa->f & SELECT) - efa->mat_nr= ob->actcol-1; - } - } - else if(ELEM(ob->type, OB_CURVE, OB_SURF)) { - ListBase *editnurb= ((Curve*)ob->data)->editnurb; - Nurb *nu; - - if(editnurb) { - for(nu= editnurb->first; nu; nu= nu->next) - if(isNurbsel(nu)) - nu->mat_nr= nu->charidx= ob->actcol-1; - } - } - else if(ob->type == OB_FONT) { - EditFont *ef= ((Curve*)ob->data)->editfont; - int i, selstart, selend; - - if(ef && BKE_font_getselection(ob, &selstart, &selend)) { - for(i=selstart; i<=selend; i++) - ef->textbufinfo[i].mat_nr = ob->actcol-1; - } - } - } - - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); - - return OPERATOR_FINISHED; -} - -void OBJECT_OT_material_slot_assign(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Assign Material Slot"; - ot->idname= "OBJECT_OT_material_slot_assign"; - ot->description="Assign the material in the selected material slot to the selected vertices."; - - /* api callbacks */ - ot->exec= material_slot_assign_exec; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - -static int material_slot_de_select(bContext *C, int select) -{ - Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; - - if(!ob) - return OPERATOR_CANCELLED; - - if(ob->type == OB_MESH) { - EditMesh *em= ((Mesh*)ob->data)->edit_mesh; - - if(em) { - if(select) - EM_select_by_material(em, ob->actcol-1); - else - EM_deselect_by_material(em, ob->actcol-1); - } - } - else if ELEM(ob->type, OB_CURVE, OB_SURF) { - ListBase *editnurb= ((Curve*)ob->data)->editnurb; - Nurb *nu; - BPoint *bp; - BezTriple *bezt; - int a; - - for(nu= editnurb->first; nu; nu=nu->next) { - if(nu->mat_nr==ob->actcol-1) { - if(nu->bezt) { - a= nu->pntsu; - bezt= nu->bezt; - while(a--) { - if(bezt->hide==0) { - if(select) { - bezt->f1 |= SELECT; - bezt->f2 |= SELECT; - bezt->f3 |= SELECT; - } - else { - bezt->f1 &= ~SELECT; - bezt->f2 &= ~SELECT; - bezt->f3 &= ~SELECT; - } - } - bezt++; - } - } - else if(nu->bp) { - a= nu->pntsu*nu->pntsv; - bp= nu->bp; - while(a--) { - if(bp->hide==0) { - if(select) bp->f1 |= SELECT; - else bp->f1 &= ~SELECT; - } - bp++; - } - } - } - } - } - - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, ob->data); - - return OPERATOR_FINISHED; -} - -static int material_slot_select_exec(bContext *C, wmOperator *op) -{ - return material_slot_de_select(C, 1); -} - -void OBJECT_OT_material_slot_select(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Select Material Slot"; - ot->idname= "OBJECT_OT_material_slot_select"; - ot->description="Select vertices assigned to the selected material slot."; - - /* api callbacks */ - ot->exec= material_slot_select_exec; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - -static int material_slot_deselect_exec(bContext *C, wmOperator *op) -{ - return material_slot_de_select(C, 0); -} - -void OBJECT_OT_material_slot_deselect(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Deselect Material Slot"; - ot->idname= "OBJECT_OT_material_slot_deselect"; - ot->description="Deselect vertices assigned to the selected material slot."; - - /* api callbacks */ - ot->exec= material_slot_deselect_exec; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - -/********************** new material operator *********************/ - -static int new_material_exec(bContext *C, wmOperator *op) -{ - Material *ma= CTX_data_pointer_get_type(C, "material", &RNA_Material).data; - Object *ob; - PointerRNA ptr; - int index; - - /* add or copy material */ - if(ma) - ma= copy_material(ma); - else - ma= add_material("Material"); - - ma->id.us--; /* compensating for us++ in assign_material */ - - /* attempt to assign to material slot */ - ptr= CTX_data_pointer_get_type(C, "material_slot", &RNA_MaterialSlot); - - if(ptr.data) { - ob= ptr.id.data; - index= (Material**)ptr.data - ob->mat; - - assign_material(ob, ma, index+1); - - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); - } - - WM_event_add_notifier(C, NC_MATERIAL|NA_ADDED, ma); - - return OPERATOR_FINISHED; -} - -void MATERIAL_OT_new(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "New Material"; - ot->idname= "MATERIAL_OT_new"; - ot->description="Add a new material."; - - /* api callbacks */ - ot->exec= new_material_exec; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - -/********************** new texture operator *********************/ - -static int new_texture_exec(bContext *C, wmOperator *op) -{ - Tex *tex= CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data; - ID *id; - MTex *mtex; - PointerRNA ptr; - - /* add or copy texture */ - if(tex) - tex= copy_texture(tex); - else - tex= add_texture("Texture"); - - id_us_min(&tex->id); - - /* attempt to assign to texture slot */ - ptr= CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot); - - if(ptr.data) { - id= ptr.id.data; - mtex= ptr.data; - - if(mtex) { - if(mtex->tex) - id_us_min(&mtex->tex->id); - mtex->tex= tex; - id_us_plus(&tex->id); - } - - /* XXX nodes, notifier .. */ - } - - WM_event_add_notifier(C, NC_TEXTURE|NA_ADDED, tex); - - return OPERATOR_FINISHED; -} - -void TEXTURE_OT_new(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "New Texture"; - ot->idname= "TEXTURE_OT_new"; - ot->description="Add a new texture."; - - /* api callbacks */ - ot->exec= new_texture_exec; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - -/********************** new world operator *********************/ - -static int new_world_exec(bContext *C, wmOperator *op) -{ - Scene *scene= CTX_data_scene(C); - World *wo= CTX_data_pointer_get_type(C, "world", &RNA_World).data; - - /* add or copy world */ - if(wo) - wo= copy_world(wo); - else - wo= add_world("World"); - - /* assign to scene */ - if(scene->world) - id_us_min(&scene->world->id); - scene->world= wo; - - WM_event_add_notifier(C, NC_WORLD|NA_ADDED, wo); - - return OPERATOR_FINISHED; -} - -void WORLD_OT_new(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "New World"; - ot->idname= "WORLD_OT_new"; - ot->description= "Add a new world."; - - /* api callbacks */ - ot->exec= new_world_exec; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - - - -/********************** particle system slot operators *********************/ - -static int particle_system_add_exec(bContext *C, wmOperator *op) -{ - Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; - Scene *scene = CTX_data_scene(C); - - if(!scene || !ob) - return OPERATOR_CANCELLED; - - object_add_particle_system(scene, ob); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); - - return OPERATOR_FINISHED; -} - -void OBJECT_OT_particle_system_add(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Add Particle System Slot"; - ot->idname= "OBJECT_OT_particle_system_add"; - ot->description="Add a particle system."; - - /* api callbacks */ - ot->exec= particle_system_add_exec; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - -static int particle_system_remove_exec(bContext *C, wmOperator *op) -{ - Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; - Scene *scene = CTX_data_scene(C); - - if(!scene || !ob) - return OPERATOR_CANCELLED; - - object_remove_particle_system(scene, ob); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); - - return OPERATOR_FINISHED; -} - -void OBJECT_OT_particle_system_remove(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Remove Particle System Slot"; - ot->idname= "OBJECT_OT_particle_system_remove"; - ot->description="Remove the selected particle system."; - - /* api callbacks */ - ot->exec= particle_system_remove_exec; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - -/********************** new particle settings operator *********************/ - -static int psys_poll(bContext *C) -{ - PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); - return (ptr.data != NULL); -} - -static int new_particle_settings_exec(bContext *C, wmOperator *op) -{ - Scene *scene = CTX_data_scene(C); - Main *bmain= CTX_data_main(C); - ParticleSystem *psys; - ParticleSettings *part = NULL; - Object *ob; - PointerRNA ptr; - - ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); - - psys = ptr.data; - - /* add or copy particle setting */ - if(psys->part) - part= psys_copy_settings(psys->part); - else - part= psys_new_settings("ParticleSettings", bmain); - - ob= ptr.id.data; - - if(psys->part) - psys->part->id.us--; - - psys->part = part; - - psys_check_boid_data(psys); - - DAG_scene_sort(scene); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); - - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); - - return OPERATOR_FINISHED; -} - -void PARTICLE_OT_new(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "New Particle Settings"; - ot->idname= "PARTICLE_OT_new"; - ot->description="Add new particle settings."; - - /* api callbacks */ - ot->exec= new_particle_settings_exec; - ot->poll= psys_poll; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - -/********************** keyed particle target operators *********************/ - -static int new_particle_target_exec(bContext *C, wmOperator *op) -{ - Scene *scene = CTX_data_scene(C); - PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); - ParticleSystem *psys= ptr.data; - Object *ob = ptr.id.data; - - ParticleTarget *pt; - - if(!psys) - return OPERATOR_CANCELLED; - - pt = psys->targets.first; - for(; pt; pt=pt->next) - pt->flag &= ~PTARGET_CURRENT; - - pt = MEM_callocN(sizeof(ParticleTarget), "keyed particle target"); - - pt->flag |= PTARGET_CURRENT; - pt->psys = 1; - - BLI_addtail(&psys->targets, pt); - - DAG_scene_sort(scene); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); - - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); - - return OPERATOR_FINISHED; -} - -void PARTICLE_OT_new_target(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "New Particle Target"; - ot->idname= "PARTICLE_OT_new_target"; - ot->description="Add a new particle target."; - - /* api callbacks */ - ot->exec= new_particle_target_exec; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - -static int remove_particle_target_exec(bContext *C, wmOperator *op) -{ - Scene *scene = CTX_data_scene(C); - PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); - ParticleSystem *psys= ptr.data; - Object *ob = ptr.id.data; - - ParticleTarget *pt; - - if(!psys) - return OPERATOR_CANCELLED; - - pt = psys->targets.first; - for(; pt; pt=pt->next) { - if(pt->flag & PTARGET_CURRENT) { - BLI_remlink(&psys->targets, pt); - MEM_freeN(pt); - break; - } - - } - pt = psys->targets.last; - - if(pt) - pt->flag |= PTARGET_CURRENT; - - DAG_scene_sort(scene); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); - - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); - - return OPERATOR_FINISHED; -} - -void PARTICLE_OT_remove_target(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Remove Particle Target"; - ot->idname= "PARTICLE_OT_remove_target"; - ot->description="Remove the selected particle target."; - - /* api callbacks */ - ot->exec= remove_particle_target_exec; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - -/************************ move up particle target operator *********************/ - -static int target_move_up_exec(bContext *C, wmOperator *op) -{ - PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); - ParticleSystem *psys= ptr.data; - Object *ob = ptr.id.data; - ParticleTarget *pt; - - if(!psys) - return OPERATOR_CANCELLED; - - pt = psys->targets.first; - for(; pt; pt=pt->next) { - if(pt->flag & PTARGET_CURRENT && pt->prev) { - BLI_remlink(&psys->targets, pt); - BLI_insertlink(&psys->targets, pt->prev->prev, pt); - - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); - break; - } - } - - return OPERATOR_FINISHED; -} - -void PARTICLE_OT_target_move_up(wmOperatorType *ot) -{ - ot->name= "Move Up Target"; - ot->idname= "PARTICLE_OT_target_move_up"; - ot->description= "Move particle target up in the list."; - - ot->exec= target_move_up_exec; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - -/************************ move down particle target operator *********************/ - -static int target_move_down_exec(bContext *C, wmOperator *op) -{ - PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); - ParticleSystem *psys= ptr.data; - Object *ob = ptr.id.data; - ParticleTarget *pt; - - if(!psys) - return OPERATOR_CANCELLED; - pt = psys->targets.first; - for(; pt; pt=pt->next) { - if(pt->flag & PTARGET_CURRENT && pt->next) { - BLI_remlink(&psys->targets, pt); - BLI_insertlink(&psys->targets, pt->next, pt); - - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); - break; - } - } - - return OPERATOR_FINISHED; -} - -void PARTICLE_OT_target_move_down(wmOperatorType *ot) -{ - ot->name= "Move Down Target"; - ot->idname= "PARTICLE_OT_target_move_down"; - ot->description= "Move particle target down in the list."; - - ot->exec= target_move_down_exec; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - -/************************ connect/disconnect hair operators *********************/ - -static void disconnect_hair(Scene *scene, Object *ob, ParticleSystem *psys) -{ - ParticleSystemModifierData *psmd = psys_get_modifier(ob,psys); - ParticleData *pa = psys->particles; - PTCacheEdit *edit = psys->edit; - PTCacheEditPoint *point = edit ? edit->points : NULL; - PTCacheEditKey *ekey = NULL; - HairKey *key; - int i, k; - float hairmat[4][4]; - - if(!ob || !psys || psys->flag & PSYS_GLOBAL_HAIR) - return; - - if(!psys->part || psys->part->type != PART_HAIR) - return; - - for(i=0; i<psys->totpart; i++,pa++) { - if(point) { - ekey = point->keys; - point++; - } - - psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat); - - for(k=0,key=pa->hair; k<pa->totkey; k++,key++) { - Mat4MulVecfl(hairmat,key->co); - - if(ekey) { - ekey->flag &= ~PEK_USE_WCO; - ekey++; - } - } - } - - psys_free_path_cache(psys, psys->edit); - - psys->flag |= PSYS_GLOBAL_HAIR; - - PE_update_object(scene, ob, 0); -} - -static int disconnect_hair_exec(bContext *C, wmOperator *op) -{ - Scene *scene= CTX_data_scene(C); - Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; - PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); - ParticleSystem *psys= NULL; - int all = RNA_boolean_get(op->ptr, "all"); - - if(!ob) - return OPERATOR_CANCELLED; - - if(all) { - for(psys=ob->particlesystem.first; psys; psys=psys->next) { - disconnect_hair(scene, ob, psys); - } - } - else { - psys = ptr.data; - disconnect_hair(scene, ob, psys); - } - - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); - - return OPERATOR_FINISHED; -} - -void PARTICLE_OT_disconnect_hair(wmOperatorType *ot) -{ - ot->name= "Disconnect Hair"; - ot->description= "Disconnect hair from the emitter mesh."; - ot->idname= "PARTICLE_OT_disconnect_hair"; - - ot->exec= disconnect_hair_exec; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - - RNA_def_boolean(ot->srna, "all", 0, "All hair", "Disconnect all hair systems from the emitter mesh"); -} - -static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys) -{ - ParticleSystemModifierData *psmd = psys_get_modifier(ob,psys); - ParticleData *pa = psys->particles; - PTCacheEdit *edit = psys->edit; - PTCacheEditPoint *point = edit ? edit->points : NULL; - PTCacheEditKey *ekey; - HairKey *key; - BVHTreeFromMesh bvhtree; - BVHTreeNearest nearest; - MFace *mface; - DerivedMesh *dm = NULL; - int numverts; - int i, k; - float hairmat[4][4], imat[4][4]; - float v[4][3], vec[3]; - - if(!psys || !psys->part || psys->part->type != PART_HAIR) - return; - - if(psmd->dm->deformedOnly) - dm= psmd->dm; - else - dm= mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH); - - numverts = dm->getNumVerts (dm); - - memset( &bvhtree, 0, sizeof(bvhtree) ); - - /* convert to global coordinates */ - for (i=0; i<numverts; i++) - Mat4MulVecfl (ob->obmat, CDDM_get_vert(dm, i)->co); - - bvhtree_from_mesh_faces(&bvhtree, dm, 0.0, 2, 6); - - for(i=0; i<psys->totpart; i++,pa++) { - key = pa->hair; - - nearest.index = -1; - nearest.dist = FLT_MAX; - - BLI_bvhtree_find_nearest(bvhtree.tree, key->co, &nearest, bvhtree.nearest_callback, &bvhtree); - - if(nearest.index == -1) { - printf("No nearest point found for hair root!"); - continue; - } - - mface = CDDM_get_face(dm,nearest.index); - - VecCopyf(v[0], CDDM_get_vert(dm,mface->v1)->co); - VecCopyf(v[1], CDDM_get_vert(dm,mface->v2)->co); - VecCopyf(v[2], CDDM_get_vert(dm,mface->v3)->co); - if(mface->v4) { - VecCopyf(v[3], CDDM_get_vert(dm,mface->v4)->co); - MeanValueWeights(v, 4, nearest.co, pa->fuv); - } - else - MeanValueWeights(v, 3, nearest.co, pa->fuv); - - pa->num = nearest.index; - pa->num_dmcache = psys_particle_dm_face_lookup(ob,psmd->dm,pa->num,pa->fuv,NULL); - - psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat); - Mat4Invert(imat,hairmat); - - VECSUB(vec, nearest.co, key->co); - - if(point) { - ekey = point->keys; - point++; - } - - for(k=0,key=pa->hair; k<pa->totkey; k++,key++) { - VECADD(key->co, key->co, vec); - Mat4MulVecfl(imat,key->co); - - if(ekey) { - ekey->flag |= PEK_USE_WCO; - ekey++; - } - } - } - - free_bvhtree_from_mesh(&bvhtree); - if(!psmd->dm->deformedOnly) - dm->release(dm); - - psys_free_path_cache(psys, psys->edit); - - psys->flag &= ~PSYS_GLOBAL_HAIR; - - PE_update_object(scene, ob, 0); -} - -static int connect_hair_exec(bContext *C, wmOperator *op) -{ - Scene *scene= CTX_data_scene(C); - Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; - PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); - ParticleSystem *psys= NULL; - int all = RNA_boolean_get(op->ptr, "all"); - - if(!ob) - return OPERATOR_CANCELLED; - - if(all) { - for(psys=ob->particlesystem.first; psys; psys=psys->next) { - connect_hair(scene, ob, psys); - } - } - else { - psys = ptr.data; - connect_hair(scene, ob, psys); - } - - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); - - return OPERATOR_FINISHED; -} - -void PARTICLE_OT_connect_hair(wmOperatorType *ot) -{ - ot->name= "Connect Hair"; - ot->description= "Connect hair to the emitter mesh."; - ot->idname= "PARTICLE_OT_connect_hair"; - - ot->exec= connect_hair_exec; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - - RNA_def_boolean(ot->srna, "all", 0, "All hair", "Connect all hair systems to the emitter mesh"); -} - -/********************** render layer operators *********************/ - -static int render_layer_add_exec(bContext *C, wmOperator *op) -{ - Scene *scene= CTX_data_scene(C); - - scene_add_render_layer(scene); - scene->r.actlay= BLI_countlist(&scene->r.layers) - 1; - - WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene); - - return OPERATOR_FINISHED; -} - -void SCENE_OT_render_layer_add(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Add Render Layer"; - ot->idname= "SCENE_OT_render_layer_add"; - ot->description="Add a render layer."; - - /* api callbacks */ - ot->exec= render_layer_add_exec; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - -static int render_layer_remove_exec(bContext *C, wmOperator *op) -{ - Scene *scene= CTX_data_scene(C); - SceneRenderLayer *rl; - int act= scene->r.actlay; - - if(BLI_countlist(&scene->r.layers) <= 1) - return OPERATOR_CANCELLED; - - rl= BLI_findlink(&scene->r.layers, scene->r.actlay); - BLI_remlink(&scene->r.layers, rl); - MEM_freeN(rl); - - scene->r.actlay= 0; - - if(scene->nodetree) { - bNode *node; - for(node= scene->nodetree->nodes.first; node; node= node->next) { - if(node->type==CMP_NODE_R_LAYERS && node->id==NULL) { - if(node->custom1==act) - node->custom1= 0; - else if(node->custom1>act) - node->custom1--; - } - } - } - - WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene); - - return OPERATOR_FINISHED; -} - -void SCENE_OT_render_layer_remove(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Remove Render Layer"; - ot->idname= "SCENE_OT_render_layer_remove"; - ot->description="Remove the selected render layer."; - - /* api callbacks */ - ot->exec= render_layer_remove_exec; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - /********************** toolbox operator *********************/ static int toolbox_invoke(bContext *C, wmOperator *op, wmEvent *event) @@ -1069,10 +89,10 @@ static int file_browse_exec(bContext *C, wmOperator *op) FileBrowseOp *fbo= op->customdata; char *str; - if (RNA_property_is_set(op->ptr, "filename")==0 || fbo==NULL) + if (RNA_property_is_set(op->ptr, "path")==0 || fbo==NULL) return OPERATOR_CANCELLED; - str= RNA_string_get_alloc(op->ptr, "filename", 0, 0); + str= RNA_string_get_alloc(op->ptr, "path", 0, 0); RNA_property_string_set(&fbo->ptr, fbo->prop, str); RNA_property_update(C, &fbo->ptr, fbo->prop); MEM_freeN(str); @@ -1107,7 +127,7 @@ static int file_browse_invoke(bContext *C, wmOperator *op, wmEvent *event) op->customdata= fbo; str= RNA_property_string_get_alloc(&ptr, prop, 0, 0); - RNA_string_set(op->ptr, "filename", str); + RNA_string_set(op->ptr, "path", str); MEM_freeN(str); WM_event_add_fileselect(C, op); @@ -1128,6 +148,6 @@ void BUTTONS_OT_file_browse(wmOperatorType *ot) ot->cancel= file_browse_cancel; /* properties */ - WM_operator_properties_filesel(ot, 0); + WM_operator_properties_filesel(ot, 0, FILE_SPECIAL); } diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index d4ad77daca7..6ffbb79f273 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -57,7 +57,7 @@ #include "UI_resources.h" #include "UI_view2d.h" -#include "ED_previewrender.h" +#include "ED_render.h" #include "buttons_intern.h" // own include @@ -138,11 +138,11 @@ static SpaceLink *buttons_duplicate(SpaceLink *sl) /* add handlers, stuff you only do once or on area/region changes */ static void buttons_main_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; ED_region_panels_init(wm, ar); - keymap= WM_keymap_listbase(wm, "Buttons Generic", SPACE_BUTS, 0); + keymap= WM_keymap_find(wm, "Buttons Generic", SPACE_BUTS, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); } @@ -176,6 +176,8 @@ static void buttons_main_area_draw(const bContext *C, ARegion *ar) ED_region_panels(C, ar, vertical, "modifier", sbuts->mainb); else if (sbuts->mainb == BCONTEXT_CONSTRAINT) ED_region_panels(C, ar, vertical, "constraint", sbuts->mainb); + else if(sbuts->mainb == BCONTEXT_BONE_CONSTRAINT) + ED_region_panels(C, ar, vertical, "bone_constraint", sbuts->mainb); sbuts->re_align= 0; sbuts->mainbo= sbuts->mainb; @@ -183,40 +185,13 @@ static void buttons_main_area_draw(const bContext *C, ARegion *ar) void buttons_operatortypes(void) { - WM_operatortype_append(OBJECT_OT_group_add); - WM_operatortype_append(OBJECT_OT_group_remove); - - WM_operatortype_append(OBJECT_OT_material_slot_add); - WM_operatortype_append(OBJECT_OT_material_slot_remove); - WM_operatortype_append(OBJECT_OT_material_slot_assign); - WM_operatortype_append(OBJECT_OT_material_slot_select); - WM_operatortype_append(OBJECT_OT_material_slot_deselect); - - WM_operatortype_append(MATERIAL_OT_new); - WM_operatortype_append(TEXTURE_OT_new); - WM_operatortype_append(WORLD_OT_new); - - WM_operatortype_append(OBJECT_OT_particle_system_add); - WM_operatortype_append(OBJECT_OT_particle_system_remove); - - WM_operatortype_append(PARTICLE_OT_new); - WM_operatortype_append(PARTICLE_OT_new_target); - WM_operatortype_append(PARTICLE_OT_remove_target); - WM_operatortype_append(PARTICLE_OT_target_move_up); - WM_operatortype_append(PARTICLE_OT_target_move_down); - WM_operatortype_append(PARTICLE_OT_connect_hair); - WM_operatortype_append(PARTICLE_OT_disconnect_hair); - - WM_operatortype_append(SCENE_OT_render_layer_add); - WM_operatortype_append(SCENE_OT_render_layer_remove); - WM_operatortype_append(BUTTONS_OT_toolbox); WM_operatortype_append(BUTTONS_OT_file_browse); } void buttons_keymap(struct wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "Buttons Generic", SPACE_BUTS, 0); + wmKeyMap *keymap= WM_keymap_find(wm, "Buttons Generic", SPACE_BUTS, 0); WM_keymap_add_item(keymap, "BUTTONS_OT_toolbox", RIGHTMOUSE, KM_PRESS, 0, 0); } @@ -259,58 +234,6 @@ static void buttons_header_area_draw(const bContext *C, ARegion *ar) UI_view2d_view_restore(C); } -#if 0 -/* add handlers, stuff you only do once or on area/region changes */ -static void buttons_context_area_init(wmWindowManager *wm, ARegion *ar) -{ - UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy); -} - -#define CONTEXTY 30 - -static void buttons_context_area_draw(const bContext *C, ARegion *ar) -{ - SpaceButs *sbuts= CTX_wm_space_buts(C); - uiStyle *style= U.uistyles.first; - uiBlock *block; - uiLayout *layout; - View2D *v2d= &ar->v2d; - float col[3]; - int x, y, w, h; - - buttons_context_compute(C, sbuts); - - w= v2d->cur.xmax - v2d->cur.xmin; - h= v2d->cur.ymax - v2d->cur.ymin; - UI_view2d_view_ortho(C, v2d); - - /* create UI */ - block= uiBeginBlock(C, ar, "buttons_context", UI_EMBOSS); - layout= uiBlockLayout(block, UI_LAYOUT_HORIZONTAL, UI_LAYOUT_PANEL, - style->panelspace, h - (h-UI_UNIT_Y)/2, w, 20, style); - - buttons_context_draw(C, layout); - - uiBlockLayoutResolve(C, block, &x, &y); - uiEndBlock(C, block); - - /* draw */ - UI_SetTheme(SPACE_BUTS, RGN_TYPE_WINDOW); /* XXX */ - - UI_GetThemeColor3fv(TH_BACK, col); - glClearColor(col[0], col[1], col[2], 0.0); - glClear(GL_COLOR_BUFFER_BIT); - - UI_view2d_totRect_set(v2d, x, -y); - UI_view2d_view_ortho(C, v2d); - - uiDrawBlock(C, block); - - /* restore view matrix */ - UI_view2d_view_restore(C); -} -#endif - /* reused! */ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn) { @@ -424,19 +347,6 @@ void ED_spacetype_buttons(void) art->draw= buttons_header_area_draw; BLI_addhead(&st->regiontypes, art); -#if 0 - /* regions: context */ - art= MEM_callocN(sizeof(ARegionType), "spacetype buttons region"); - art->regionid = RGN_TYPE_CHANNELS; - art->minsizey= CONTEXTY; - art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_FRAMES; - art->init= buttons_context_area_init; - art->draw= buttons_context_area_draw;; - art->listener= buttons_area_listener; - - BLI_addhead(&st->regiontypes, art); -#endif - BKE_spacetype_register(st); } diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c index 2120b97becf..ccf7dbff946 100644 --- a/source/blender/editors/space_console/console_ops.c +++ b/source/blender/editors/space_console/console_ops.c @@ -51,6 +51,7 @@ #include "BKE_library.h" #include "BKE_main.h" #include "BKE_report.h" +#include "BKE_text.h" /* only for character utility funcs */ #include "WM_api.h" #include "WM_types.h" @@ -119,6 +120,48 @@ static int console_line_cursor_set(ConsoleLine *cl, int cursor) return 1; } +static char cursor_char(ConsoleLine *cl) +{ + /* assume cursor is clamped */ + return cl->line[cl->cursor]; +} + +static char cursor_char_prev(ConsoleLine *cl) +{ + /* assume cursor is clamped */ + if(cl->cursor <= 0) + return '\0'; + + return cl->line[cl->cursor-1]; +} + +static char cursor_char_next(ConsoleLine *cl) +{ + /* assume cursor is clamped */ + if(cl->cursor + 1 >= cl->len) + return '\0'; + + return cl->line[cl->cursor+1]; +} + +static void console_lb_debug__internal(ListBase *lb) +{ + ConsoleLine *cl; + + printf("%d: ", BLI_countlist(lb)); + for(cl= lb->first; cl; cl= cl->next) + printf("<%s> ", cl->line); + printf("\n"); + +} + +static void console_history_debug(const bContext *C) +{ + SpaceConsole *sc= CTX_wm_space_console(C); + + console_lb_debug__internal(&sc->history); +} + static ConsoleLine *console_lb_add__internal(ListBase *lb, ConsoleLine *from) { ConsoleLine *ci= MEM_callocN(sizeof(ConsoleLine), "ConsoleLine Add"); @@ -251,7 +294,7 @@ static EnumPropertyItem move_type_items[]= { {PREV_WORD, "PREVIOUS_WORD", 0, "Previous Word", ""}, {NEXT_WORD, "NEXT_WORD", 0, "Next Word", ""}, {0, NULL, 0, NULL, NULL}}; - + static int move_exec(bContext *C, wmOperator *op) { ConsoleLine *ci= console_history_verify(C); @@ -272,6 +315,37 @@ static int move_exec(bContext *C, wmOperator *op) case NEXT_CHAR: done= console_line_cursor_set(ci, ci->cursor+1); break; + + /* - if the character is a delimiter then skip delimiters (including white space) + * - when jump over the word */ + case PREV_WORD: + while(text_check_delim(cursor_char_prev(ci))) + if(console_line_cursor_set(ci, ci->cursor-1)==FALSE) + break; + + while(text_check_delim(cursor_char_prev(ci))==FALSE) + if(console_line_cursor_set(ci, ci->cursor-1)==FALSE) + break; + + /* This isnt used for NEXT_WORD because when going back + * its more useful to have the cursor directly after a word then whitespace */ + while(text_check_whitespace(cursor_char_prev(ci))==TRUE) + if(console_line_cursor_set(ci, ci->cursor-1)==FALSE) + break; + + done= 1; /* assume changed */ + break; + case NEXT_WORD: + while(text_check_delim(cursor_char(ci))==TRUE) + if (console_line_cursor_set(ci, ci->cursor+1)==FALSE) + break; + + while(text_check_delim(cursor_char(ci))==FALSE) + if (console_line_cursor_set(ci, ci->cursor+1)==FALSE) + break; + + done= 1; /* assume changed */ + break; } if(done) { @@ -466,7 +540,16 @@ static int history_cycle_exec(bContext *C, wmOperator *op) ConsoleLine *ci= console_history_verify(C); /* TODO - stupid, just prevernts crashes when no command line */ short reverse= RNA_boolean_get(op->ptr, "reverse"); /* assumes down, reverse is up */ - + + /* keep a copy of the line above so when history is cycled + * this is the only function that needs to know about the double-up */ + if(ci->prev) { + ConsoleLine *ci_prev= (ConsoleLine *)ci->prev; + + if(strcmp(ci->line, ci_prev->line)==0) + console_history_free(sc, ci_prev); + } + if(reverse) { /* last item in mistory */ ci= sc->history.last; BLI_remlink(&sc->history, ci); @@ -477,9 +560,17 @@ static int history_cycle_exec(bContext *C, wmOperator *op) BLI_remlink(&sc->history, ci); BLI_addtail(&sc->history, ci); } - + + { /* add a duplicate of the new arg and remove all other instances */ + ConsoleLine *cl; + while((cl= console_history_find(sc, ci->line, ci))) + console_history_free(sc, cl); + + console_history_add(C, (ConsoleLine *)sc->history.last); + } + ED_area_tag_redraw(CTX_wm_area(C)); - + return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c index dfaaa269970..19fb575ed16 100644 --- a/source/blender/editors/space_console/space_console.c +++ b/source/blender/editors/space_console/space_console.c @@ -147,12 +147,12 @@ static SpaceLink *console_duplicate(SpaceLink *sl) /* add handlers, stuff you only do once or on area/region changes */ static void console_main_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy); /* own keymap */ - keymap= WM_keymap_listbase(wm, "Console", SPACE_CONSOLE, 0); /* XXX weak? */ + keymap= WM_keymap_find(wm, "Console", SPACE_CONSOLE, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } @@ -174,6 +174,9 @@ static void console_main_area_draw(const bContext *C, ARegion *ar) console_scrollback_add_str(C, "Autocomplete: Ctrl+Space", 0); console_scrollback_add_str(C, "Ctrl +/- Wheel: Zoom", 0); console_scrollback_add_str(C, "Builtin Modules: bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.ui", 0); + + /* This is normally set by python but to start with its easier just to set it like this rather then running python with no args */ + strcpy(sc->prompt, ">>> "); } /* clear and setup matrix */ @@ -231,15 +234,15 @@ void console_operatortypes(void) void console_keymap(struct wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "Console", SPACE_CONSOLE, 0); + wmKeyMap *keymap= WM_keymap_find(wm, "Console", SPACE_CONSOLE, 0); - #ifdef __APPLE__ +#ifdef __APPLE__ RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", LEFTARROWKEY, KM_PRESS, KM_OSKEY, 0)->ptr, "type", LINE_BEGIN); RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", RIGHTARROWKEY, KM_PRESS, KM_OSKEY, 0)->ptr, "type", LINE_END); - #endif +#endif - RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", LEFTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", LINE_BEGIN); - RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", RIGHTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", LINE_END); + RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", LEFTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", PREV_WORD); + RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", RIGHTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", NEXT_WORD); RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", HOMEKEY, KM_PRESS, 0, 0)->ptr, "type", LINE_BEGIN); RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", ENDKEY, KM_PRESS, 0, 0)->ptr, "type", LINE_END); diff --git a/source/blender/editors/space_file/SConscript b/source/blender/editors/space_file/SConscript index e6fba38fb8f..b22a265dcbc 100644 --- a/source/blender/editors/space_file/SConscript +++ b/source/blender/editors/space_file/SConscript @@ -15,4 +15,11 @@ if env['WITH_BF_OPENJPEG']: if env['WITH_BF_OPENEXR']: defs.append('WITH_OPENEXR') +if env['OURPLATFORM'] == 'linux2': + cflags='-pthread' + incs += ' ../../../extern/binreloc/include' + +if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): + incs += ' ' + env['BF_PTHREADS_INC'] + env.BlenderLib ( 'bf_editors_space_file', sources, Split(incs), defs, libtype=['core'], priority=[115] ) diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 00024ffa961..77a1b671054 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -133,24 +133,24 @@ static void do_file_buttons(bContext *C, void *arg, int event) void file_draw_buttons(const bContext *C, ARegion *ar) { /* Button layout. */ - const short min_x = 10; - const short max_x = ar->winx - 10; - const short line1_y = IMASEL_BUTTONS_HEIGHT/2 + IMASEL_BUTTONS_MARGIN*2; - const short line2_y = IMASEL_BUTTONS_MARGIN; - const short input_minw = 20; - const short btn_h = UI_UNIT_Y; - const short btn_fn_w = UI_UNIT_X; - const short btn_minw = 80; - const short btn_margin = 20; - const short separator = 4; + const int min_x = 10; + const int max_x = ar->winx - 10; + const int line1_y = IMASEL_BUTTONS_HEIGHT/2 + IMASEL_BUTTONS_MARGIN*2; + const int line2_y = IMASEL_BUTTONS_MARGIN; + const int input_minw = 20; + const int btn_h = UI_UNIT_Y; + const int btn_fn_w = UI_UNIT_X; + const int btn_minw = 80; + const int btn_margin = 20; + const int separator = 4; /* Additional locals. */ char name[20]; - short loadbutton; - short fnumbuttons; - short available_w = max_x - min_x; - short line1_w = available_w; - short line2_w = available_w; + int loadbutton; + int fnumbuttons; + int available_w = max_x - min_x; + int line1_w = available_w; + int line2_w = available_w; uiBut* but; uiBlock* block; @@ -189,7 +189,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar) if (available_w > 0) { but = uiDefBut(block, TEX, B_FS_DIRNAME, "", min_x, line1_y, line1_w, btn_h, - params->dir, 0.0, (float)FILE_MAXDIR-1, 0, 0, + params->dir, 0.0, (float)FILE_MAX-1, 0, 0, "File path."); uiButSetCompleteFunc(but, autocomplete_directory, NULL); uiDefBut(block, TEX, B_FS_FILENAME, "", @@ -230,7 +230,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar) } -static void draw_tile(short sx, short sy, short width, short height, int colorid, int shade) +static void draw_tile(int sx, int sy, int width, int height, int colorid, int shade) { UI_ThemeColorShade(colorid, shade); uiSetRoundBox(15); @@ -310,25 +310,25 @@ static int get_file_icon(struct direntry *file) return ICON_FILE_BLANK; } -static void file_draw_icon(short sx, short sy, int icon, short width, short height) +static void file_draw_icon(int sx, int sy, int icon, int width, int height) { float x,y; - int blend=0; + float alpha=1.0f; x = (float)(sx); y = (float)(sy-height); - if (icon == ICON_FILE_BLANK) blend = -80; + if (icon == ICON_FILE_BLANK) alpha = 0.375f; glEnable(GL_BLEND); - UI_icon_draw_aspect_blended(x, y, icon, 1.f, blend); + UI_icon_draw_aspect(x, y, icon, 1.f, alpha); } -static void file_draw_string(short sx, short sy, const char* string, float width, short height, int flag) +static void file_draw_string(int sx, int sy, const char* string, float width, int height, int flag) { - short soffs; + int soffs; char fname[FILE_MAXFILE]; float sw; float x,y; @@ -350,18 +350,19 @@ void file_calc_previews(const bContext *C, ARegion *ar) View2D *v2d= &ar->v2d; ED_fileselect_init_layout(sfile, ar); - UI_view2d_totRect_set(v2d, sfile->layout->width, sfile->layout->height); + /* +SCROLL_HEIGHT is bad hack to work around issue in UI_view2d_totRect_set */ + UI_view2d_totRect_set(v2d, sfile->layout->width, sfile->layout->height+V2D_SCROLL_HEIGHT); } -static void file_draw_preview(short sx, short sy, ImBuf *imb, FileLayout *layout, short dropshadow) +static void file_draw_preview(int sx, int sy, ImBuf *imb, FileLayout *layout, short dropshadow) { if (imb) { float fx, fy; float dx, dy; - short xco, yco; + int xco, yco; float scaledx, scaledy; float scale; - short ex, ey; + int ex, ey; if ( (imb->x > layout->prv_w) || (imb->y > layout->prv_h) ) { if (imb->x > imb->y) { @@ -379,8 +380,8 @@ static void file_draw_preview(short sx, short sy, ImBuf *imb, FileLayout *layout scaledy = (float)imb->y; scale = 1.0; } - ex = (short)scaledx; - ey = (short)scaledy; + ex = (int)scaledx; + ey = (int)scaledy; fx = ((float)layout->prv_w - (float)ex)/2.0f; fy = ((float)layout->prv_h - (float)ey)/2.0f; dx = (fx + 0.5f + layout->prv_border_x); @@ -442,7 +443,7 @@ static void renamebutton_cb(bContext *C, void *arg1, char *oldname) static void draw_background(FileLayout *layout, View2D *v2d) { int i; - short sy; + int sy; /* alternating flat shade background */ for (i=0; (i <= layout->rows); i+=2) @@ -457,7 +458,7 @@ static void draw_background(FileLayout *layout, View2D *v2d) static void draw_dividers(FileLayout *layout, View2D *v2d) { - short sx; + int sx; /* vertical column dividers */ sx = v2d->tot.xmin; @@ -483,7 +484,7 @@ void file_draw_list(const bContext *C, ARegion *ar) int numfiles; int numfiles_layout; int colorid = 0; - short sx, sy; + int sx, sy; int offset; int i; float sw, spos; @@ -491,12 +492,6 @@ void file_draw_list(const bContext *C, ARegion *ar) numfiles = filelist_numfiles(files); - sx = ar->v2d.tot.xmin + layout->tile_border_x/2; - sy = ar->v2d.cur.ymax - layout->tile_border_y; - - offset = ED_fileselect_layout_offset(layout, 0, 0); - if (offset<0) offset=0; - if (params->display != FILE_IMGDISPLAY) { draw_background(layout, v2d); @@ -504,9 +499,9 @@ void file_draw_list(const bContext *C, ARegion *ar) draw_dividers(layout, v2d); } - sx = ar->v2d.cur.xmin + layout->tile_border_x; - sy = ar->v2d.cur.ymax - layout->tile_border_y; - + offset = ED_fileselect_layout_offset(layout, ar->v2d.cur.xmin, -ar->v2d.cur.ymax); + if (offset<0) offset=0; + numfiles_layout = ED_fileselect_layout_numfiles(layout, ar); for (i=offset; (i < numfiles) && (i<offset+numfiles_layout); ++i) @@ -552,7 +547,7 @@ void file_draw_list(const bContext *C, ARegion *ar) sw = file_string_width(file->relname); if (file->flags & EDITING) { - short but_width = (FILE_IMGDISPLAY == params->display) ? layout->tile_w : layout->column_widths[COLUMN_NAME]; + int but_width = (FILE_IMGDISPLAY == params->display) ? layout->tile_w : layout->column_widths[COLUMN_NAME]; uiBlock *block = uiBeginBlock(C, ar, "FileName", UI_EMBOSS); uiBut *but = uiDefBut(block, TEX, 1, "", spos, sy-layout->tile_h-3, but_width, layout->textheight*2, file->relname, 1.0f, (float)FILE_MAX,0,0,""); @@ -573,15 +568,14 @@ void file_draw_list(const bContext *C, ARegion *ar) spos += layout->column_widths[COLUMN_NAME] + 12; if (!(file->type & S_IFDIR)) { 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); + spos += layout->column_widths[COLUMN_SIZE] + 12; } } else if (params->display == FILE_LONGDISPLAY) { spos += layout->column_widths[COLUMN_NAME] + 12; #ifndef WIN32 /* rwx rwx rwx */ - spos += 20; sw = file_string_width(file->mode1); file_draw_string(spos, sy, file->mode1, sw, layout->tile_h, FILE_SHORTEN_END); spos += layout->column_widths[COLUMN_MODE1] + 12; @@ -609,8 +603,8 @@ void file_draw_list(const bContext *C, ARegion *ar) if (!(file->type & S_IFDIR)) { 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); + spos += layout->column_widths[COLUMN_SIZE] + 12; } } } diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index e1a6e346ce2..75230813a41 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -68,25 +68,15 @@ /* ---------- FILE SELECTION ------------ */ -static int find_file_mouse(SpaceFile *sfile, struct ARegion* ar, short x, short y, short clamp) +static int find_file_mouse(SpaceFile *sfile, struct ARegion* ar, int x, int 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) { - if(clamp) active_file= 0; - else active_file= -1; - } - else if(active_file >= numfiles) { - if(clamp) active_file= numfiles-1; - else active_file= -1; - } return active_file; } @@ -109,6 +99,31 @@ typedef enum FileSelect { FILE_SELECT_DIR = 1, FILE_SELECT_FILE = 2 } FileSelect; +static void clamp_to_filelist(int numfiles, int *first_file, int *last_file) +{ + /* border select before the first file */ + if ( (*first_file < 0) && (*last_file >=0 ) ) { + *first_file = 0; + } + /* don't select if everything is outside filelist */ + if ( (*first_file >= numfiles) && ((*last_file < 0) || (*last_file >= numfiles)) ) { + *first_file = -1; + *last_file = -1; + } + + /* fix if last file invalid */ + if ( (*first_file > 0) && (*last_file < 0) ) + *last_file = numfiles-1; + + /* clamp */ + if ( (*first_file >= numfiles) ) { + *first_file = numfiles-1; + } + if ( (*last_file >= numfiles) ) { + *last_file = numfiles-1; + } +} + static FileSelect file_select(SpaceFile* sfile, ARegion* ar, const rcti* rect, short val) { int first_file = -1; @@ -123,9 +138,11 @@ static FileSelect file_select(SpaceFile* sfile, ARegion* ar, const rcti* rect, s int numfiles = filelist_numfiles(sfile->files); params->selstate = NOTACTIVE; - first_file = find_file_mouse(sfile, ar, rect->xmin, rect->ymax, 1); - last_file = find_file_mouse(sfile, ar, rect->xmax, rect->ymin, 1); + first_file = find_file_mouse(sfile, ar, rect->xmin, rect->ymax); + last_file = find_file_mouse(sfile, ar, rect->xmax, rect->ymin); + clamp_to_filelist(numfiles, &first_file, &last_file); + /* select all valid files between first and last indicated */ if ( (first_file >= 0) && (first_file < numfiles) && (last_file >= 0) && (last_file < numfiles) ) { for (act_file = first_file; act_file <= last_file; act_file++) { @@ -137,6 +154,9 @@ static FileSelect file_select(SpaceFile* sfile, ARegion* ar, const rcti* rect, s } } + /* Don't act on multiple selected files */ + if (first_file != last_file) selecting= 0; + /* make the last file active */ if (selecting && (last_file >= 0 && last_file < numfiles)) { struct direntry* file = filelist_file(sfile->files, last_file); @@ -168,7 +188,7 @@ static FileSelect file_select(SpaceFile* sfile, ARegion* ar, const rcti* rect, s } } - } + } return retval; } @@ -449,7 +469,7 @@ int file_hilight_set(SpaceFile *sfile, ARegion *ar, int mx, int my) my -= ar->winrct.ymin; if(BLI_in_rcti(&ar->v2d.mask, mx, my)) { - actfile = find_file_mouse(sfile, ar, mx , my, 0); + actfile = find_file_mouse(sfile, ar, mx , my); if((actfile >= 0) && (actfile < numfiles)) params->active_file=actfile; @@ -496,9 +516,26 @@ int file_cancel_exec(bContext *C, wmOperator *unused) WM_event_fileselect_event(C, sfile->op, EVT_FILESELECT_CANCEL); sfile->op = NULL; + if (sfile->files) { + filelist_freelib(sfile->files); + filelist_free(sfile->files); + MEM_freeN(sfile->files); + sfile->files= NULL; + } + return OPERATOR_FINISHED; } +int file_operator_poll(bContext *C) +{ + int poll = ED_operator_file_active(C); + SpaceFile *sfile= CTX_wm_space_file(C); + + if (!sfile || !sfile->op) poll= 0; + + return poll; +} + void FILE_OT_cancel(struct wmOperatorType *ot) { /* identifiers */ @@ -507,7 +544,7 @@ void FILE_OT_cancel(struct wmOperatorType *ot) /* api callbacks */ ot->exec= file_cancel_exec; - ot->poll= ED_operator_file_active; + ot->poll= file_operator_poll; } /* sends events now, so things get handled on windowqueue level */ @@ -520,9 +557,16 @@ int file_exec(bContext *C, wmOperator *unused) wmOperator *op= sfile->op; sfile->op = NULL; + RNA_string_set(op->ptr, "filename", sfile->params->file); BLI_strncpy(name, sfile->params->dir, sizeof(name)); + RNA_string_set(op->ptr, "directory", name); strcat(name, sfile->params->file); - RNA_string_set(op->ptr, "filename", name); + + if(RNA_struct_find_property(op->ptr, "relative_paths")) + if(RNA_boolean_get(op->ptr, "relative_paths")) + BLI_makestringcode(G.sce, name); + + RNA_string_set(op->ptr, "path", name); /* some ops have multiple files to select */ { @@ -561,6 +605,11 @@ int file_exec(bContext *C, wmOperator *unused) BLI_make_file_string(G.sce, name, BLI_gethome(), ".Bfs"); fsmenu_write_file(fsmenu_get(), name); WM_event_fileselect_event(C, op, EVT_FILESELECT_EXEC); + + filelist_freelib(sfile->files); + filelist_free(sfile->files); + MEM_freeN(sfile->files); + sfile->files= NULL; } return OPERATOR_FINISHED; @@ -574,7 +623,7 @@ void FILE_OT_execute(struct wmOperatorType *ot) /* api callbacks */ ot->exec= file_exec; - ot->poll= ED_operator_file_active; /* <- important, handler is on window level */ + ot->poll= file_operator_poll; } @@ -699,7 +748,9 @@ int file_directory_new_exec(bContext *C, wmOperator *unused) BLI_join_dirfile(tmpstr, tmpstr, tmpdir); } BLI_recurdir_fileops(tmpstr); - if (!BLI_exists(tmpstr)) { + if (BLI_exists(tmpstr)) { + BLI_strncpy(sfile->params->renamefile, tmpdir, FILE_MAXFILE); + } else { filelist_free(sfile->files); filelist_parent(sfile->files); BLI_strncpy(sfile->params->dir, filelist_dir(sfile->files), FILE_MAX); @@ -847,13 +898,9 @@ int file_bookmark_toggle_exec(bContext *C, wmOperator *unused) ScrArea *sa= CTX_wm_area(C); ARegion *ar= file_buttons_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); - } + if(ar) + ED_region_toggle_hidden(C, ar); + return OPERATOR_FINISHED; } @@ -872,11 +919,13 @@ void FILE_OT_bookmark_toggle(struct wmOperatorType *ot) int file_filenum_exec(bContext *C, wmOperator *op) { SpaceFile *sfile= CTX_wm_space_file(C); + ScrArea *sa= CTX_wm_area(C); int inc = RNA_int_get(op->ptr, "increment"); if(sfile->params && (inc != 0)) { BLI_newname(sfile->params->file, inc); - WM_event_add_notifier(C, NC_WINDOW, NULL); + ED_area_tag_redraw(sa); + // WM_event_add_notifier(C, NC_WINDOW, NULL); } return OPERATOR_FINISHED; @@ -916,6 +965,24 @@ int file_rename_exec(bContext *C, wmOperator *op) } +int file_rename_poll(bContext *C) +{ + int poll = ED_operator_file_active(C); + SpaceFile *sfile= CTX_wm_space_file(C); + + if (sfile && sfile->params) { + if (sfile->params->active_file < 0) { + poll= 0; + } else { + char dir[FILE_MAX], group[FILE_MAX]; + if (filelist_islibrary(sfile->files, dir, group)) poll= 0; + } + } + else + poll= 0; + return poll; +} + void FILE_OT_rename(struct wmOperatorType *ot) { /* identifiers */ @@ -924,7 +991,7 @@ void FILE_OT_rename(struct wmOperatorType *ot) /* api callbacks */ ot->exec= file_rename_exec; - ot->poll= ED_operator_file_active; /* <- important, handler is on window level */ + ot->poll= file_rename_poll; } @@ -938,6 +1005,8 @@ int file_delete_poll(bContext *C) if (sfile->params->active_file < 0) { poll= 0; } else { + char dir[FILE_MAX], group[FILE_MAX]; + if (filelist_islibrary(sfile->files, dir, group)) poll= 0; file = filelist_file(sfile->files, sfile->params->active_file); if (file && S_ISDIR(file->type)) poll= 0; } diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c index 24c3f9b4ca1..1b54277c383 100644 --- a/source/blender/editors/space_file/file_panels.c +++ b/source/blender/editors/space_file/file_panels.c @@ -181,6 +181,12 @@ static void file_panel_operator(const bContext *C, Panel *pa) RNA_STRUCT_BEGIN(op->ptr, prop) { if(strcmp(RNA_property_identifier(prop), "rna_type") == 0) continue; + if(strcmp(RNA_property_identifier(prop), "filemode") == 0) + continue; + if(strcmp(RNA_property_identifier(prop), "path") == 0) + continue; + if(strcmp(RNA_property_identifier(prop), "directory") == 0) + continue; if(strcmp(RNA_property_identifier(prop), "filename") == 0) continue; if(strcmp(RNA_property_identifier(prop), "display") == 0) diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 538c1e4fce7..8257aa5482f 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -60,6 +60,7 @@ #include "BKE_library.h" #include "BKE_global.h" #include "BKE_main.h" +#include "BKE_report.h" #include "BLO_readfile.h" #include "DNA_space_types.h" @@ -109,7 +110,6 @@ typedef struct FileList { struct direntry *filelist; int *fidx; - int numfiles; int numfiltered; char dir[FILE_MAX]; @@ -118,6 +118,12 @@ typedef struct FileList short hide_dot; unsigned int filter; short changed; + + struct BlendHandle *libfiledata; + short hide_parent; + + void (*read)(struct FileList *); + ListBase loadimages; ListBase threads; } FileList; @@ -277,12 +283,20 @@ static int compare_extension(const void *a1, const void *a2) { void filelist_filter(FileList* filelist) { + /* char dir[FILE_MAX], group[GROUP_MAX]; XXXXX */ int num_filtered = 0; int i, j; if (!filelist->filelist) return; + /* XXXXX TODO: check if the filter can be handled outside the filelist + if ( ( (filelist->type == FILE_LOADLIB) && BIF_filelist_islibrary(filelist, dir, group)) + || (filelist->type == FILE_MAIN) ) { + filelist->filter = 0; + } + */ + if (!filelist->filter) { if (filelist->fidx) { MEM_freeN(filelist->fidx); @@ -438,23 +452,29 @@ void folderlist_free(ListBase* folderlist) folderlist= NULL; } +static void filelist_read_main(struct FileList* filelist); +static void filelist_read_library(struct FileList* filelist); +static void filelist_read_dir(struct FileList* filelist); + //------------------FILELIST------------------------// -struct FileList* filelist_new() +struct FileList* filelist_new(short type) { FileList* p = MEM_callocN( sizeof(FileList), "filelist" ); - return p; -} - -struct FileList* filelist_copy(struct FileList* filelist) -{ - FileList* p = filelist_new(); - BLI_strncpy(p->dir, filelist->dir, FILE_MAX); - p->filelist = NULL; - p->fidx = NULL; + switch(type) { + case FILE_MAIN: + p->read = filelist_read_main; + break; + case FILE_LOADLIB: + p->read = filelist_read_library; + break; + default: + p->read = filelist_read_dir; + } return p; } + void filelist_free(struct FileList* filelist) { int i; @@ -493,6 +513,18 @@ void filelist_free(struct FileList* filelist) filelist->hide_dot =0; } +void filelist_freelib(struct FileList* filelist) +{ + if(filelist->libfiledata) + BLO_blendhandle_close(filelist->libfiledata); + filelist->libfiledata= 0; +} + +struct BlendHandle *filelist_lib(struct FileList* filelist) +{ + return filelist->libfiledata; +} + int filelist_numfiles(struct FileList* filelist) { return filelist->numfiltered; @@ -560,10 +592,12 @@ void filelist_loadimage_timer(struct FileList* filelist) } if (limg->done) { FileImage *oimg = limg; - BLI_remlink(&filelist->loadimages, oimg); BLI_remove_thread(&filelist->threads, oimg); + /* brecht: keep failed images in the list, otherwise + it keeps trying to load them over and over? + BLI_remlink(&filelist->loadimages, oimg); + MEM_freeN(oimg);*/ limg = oimg->next; - MEM_freeN(oimg); refresh = 1; } else { limg= limg->next; @@ -733,16 +767,16 @@ void filelist_setfilter(struct FileList* filelist, unsigned int filter) filelist->filter = filter; } -void filelist_readdir(struct FileList* filelist) +static void filelist_read_dir(struct FileList* filelist) { char wdir[FILE_MAX]; - if (!filelist) return; + filelist->fidx = 0; filelist->filelist = 0; BLI_getwdN(wdir); - + BLI_cleanup_dir(G.sce, filelist->dir); BLI_hide_dot_files(filelist->hide_dot); filelist->numfiles = BLI_getdir(filelist->dir, &(filelist->filelist)); @@ -750,12 +784,52 @@ void filelist_readdir(struct FileList* filelist) chdir(wdir); filelist_setfiletypes(filelist, G.have_quicktime); filelist_filter(filelist); - + if (!filelist->threads.first) { BLI_init_threads(&filelist->threads, exec_loadimages, 2); } } +static void filelist_read_main(struct FileList* filelist) +{ + if (!filelist) return; + filelist_from_main(filelist); +} + +static void filelist_read_library(struct FileList* filelist) +{ + if (!filelist) return; + BLI_cleanup_dir(G.sce, filelist->dir); + filelist_from_library(filelist); + if(!filelist->libfiledata) { + int num; + struct direntry *file; + + BLI_make_exist(filelist->dir); + filelist_read_dir(filelist); + file = filelist->filelist; + for(num=0; num<filelist->numfiles; num++, file++) { + if(BLO_has_bfile_extension(file->relname)) { + char name[FILE_MAXDIR+FILE_MAXFILE]; + + BLI_strncpy(name, filelist->dir, sizeof(name)); + strcat(name, file->relname); + + /* prevent current file being used as acceptable dir */ + if (BLI_streq(G.main->name, name)==0) { + file->type &= ~S_IFMT; + file->type |= S_IFDIR; + } + } + } + } +} + +void filelist_readdir(struct FileList* filelist) +{ + filelist->read(filelist); +} + int filelist_empty(struct FileList* filelist) { return filelist->filelist == 0; @@ -937,3 +1011,259 @@ void filelist_sort(struct FileList* filelist, short sort) filelist_filter(filelist); } + + +int filelist_islibrary(struct FileList* filelist, char* dir, char* group) +{ + return BLO_is_a_library(filelist->dir, dir, group); +} + +static int groupname_to_code(char *group) +{ + char buf[32]; + char *lslash; + + BLI_strncpy(buf, group, 31); + lslash= BLI_last_slash(buf); + if (lslash) + lslash[0]= '\0'; + + return BLO_idcode_from_name(buf); +} + +void filelist_from_library(struct FileList* filelist) +{ + LinkNode *l, *names, *previews; + struct ImBuf* ima; + int ok, i, nnames, idcode; + char filename[FILE_MAXDIR+FILE_MAXFILE]; + char dir[FILE_MAX], group[GROUP_MAX]; + + /* name test */ + ok= filelist_islibrary(filelist, dir, group); + if (!ok) { + /* free */ + if(filelist->libfiledata) BLO_blendhandle_close(filelist->libfiledata); + filelist->libfiledata= 0; + return; + } + + BLI_strncpy(filename, G.sce, sizeof(filename)); // G.sce = last file loaded, for UI + + /* there we go */ + /* for the time being only read filedata when libfiledata==0 */ + if (filelist->libfiledata==0) { + filelist->libfiledata= BLO_blendhandle_from_file(dir); + if(filelist->libfiledata==0) return; + } + + idcode= groupname_to_code(group); + + // memory for strings is passed into filelist[i].relname + // and free'd in freefilelist + previews = NULL; + if (idcode) { + previews= BLO_blendhandle_get_previews(filelist->libfiledata, idcode); + names= BLO_blendhandle_get_datablock_names(filelist->libfiledata, idcode); + /* ugh, no rewind, need to reopen */ + BLO_blendhandle_close(filelist->libfiledata); + filelist->libfiledata= BLO_blendhandle_from_file(dir); + + } else { + names= BLO_blendhandle_get_linkable_groups(filelist->libfiledata); + } + + nnames= BLI_linklist_length(names); + + filelist->numfiles= nnames + 1; + filelist->filelist= malloc(filelist->numfiles * sizeof(*filelist->filelist)); + memset(filelist->filelist, 0, filelist->numfiles * sizeof(*filelist->filelist)); + + filelist->filelist[0].relname= BLI_strdup(".."); + filelist->filelist[0].type |= S_IFDIR; + + for (i=0, l= names; i<nnames; i++, l= l->next) { + char *blockname= l->link; + + filelist->filelist[i + 1].relname= BLI_strdup(blockname); + if (!idcode) + filelist->filelist[i + 1].type |= S_IFDIR; + } + + if(previews) { + for (i=0, l= previews; i<nnames; i++, l= l->next) { + PreviewImage *img= l->link; + + if (img) { + unsigned int w = img->w[PREVIEW_MIPMAP_LARGE]; + unsigned int h = img->h[PREVIEW_MIPMAP_LARGE]; + unsigned int *rect = img->rect[PREVIEW_MIPMAP_LARGE]; + + /* first allocate imbuf for copying preview into it */ + if (w > 0 && h > 0 && rect) { + ima = IMB_allocImBuf(w, h, 32, IB_rect, 0); + memcpy(ima->rect, rect, w*h*sizeof(unsigned int)); + filelist->filelist[i + 1].image = ima; + filelist->filelist[i + 1].flags = IMAGEFILE; + } + } + } + } + + BLI_linklist_free(names, free); + if (previews) BLI_linklist_free(previews, (void(*)(void*)) MEM_freeN); + + filelist_sort(filelist, FILE_SORT_ALPHA); + + BLI_strncpy(G.sce, filename, sizeof(filename)); // prevent G.sce to change + + filelist->filter = 0; + filelist_filter(filelist); +} + +void filelist_hideparent(struct FileList* filelist, short hide) +{ + filelist->hide_parent = hide; +} + +void filelist_from_main(struct FileList *filelist) +{ + ID *id; + struct direntry *files, *firstlib = NULL; + ListBase *lb; + int a, fake, idcode, ok, totlib, totbl; + + // filelist->type = FILE_MAIN; // XXXXX TODO: add modes to filebrowser + + if(filelist->dir[0]=='/') filelist->dir[0]= 0; + + if(filelist->dir[0]) { + idcode= groupname_to_code(filelist->dir); + if(idcode==0) filelist->dir[0]= 0; + } + + if( filelist->dir[0]==0) { + + /* make directories */ + filelist->numfiles= 23; + filelist->filelist= (struct direntry *)malloc(filelist->numfiles * sizeof(struct direntry)); + + for(a=0; a<filelist->numfiles; a++) { + memset( &(filelist->filelist[a]), 0 , sizeof(struct direntry)); + filelist->filelist[a].type |= S_IFDIR; + } + + filelist->filelist[0].relname= BLI_strdup(".."); + filelist->filelist[2].relname= BLI_strdup("Scene"); + filelist->filelist[3].relname= BLI_strdup("Object"); + filelist->filelist[4].relname= BLI_strdup("Mesh"); + filelist->filelist[5].relname= BLI_strdup("Curve"); + filelist->filelist[6].relname= BLI_strdup("Metaball"); + filelist->filelist[7].relname= BLI_strdup("Material"); + filelist->filelist[8].relname= BLI_strdup("Texture"); + filelist->filelist[9].relname= BLI_strdup("Image"); + filelist->filelist[10].relname= BLI_strdup("Ika"); + filelist->filelist[11].relname= BLI_strdup("Wave"); + filelist->filelist[12].relname= BLI_strdup("Lattice"); + filelist->filelist[13].relname= BLI_strdup("Lamp"); + filelist->filelist[14].relname= BLI_strdup("Camera"); + filelist->filelist[15].relname= BLI_strdup("Ipo"); + filelist->filelist[16].relname= BLI_strdup("World"); + filelist->filelist[17].relname= BLI_strdup("Screen"); + filelist->filelist[18].relname= BLI_strdup("VFont"); + filelist->filelist[19].relname= BLI_strdup("Text"); + filelist->filelist[20].relname= BLI_strdup("Armature"); + filelist->filelist[21].relname= BLI_strdup("Action"); + filelist->filelist[22].relname= BLI_strdup("NodeTree"); + filelist_sort(filelist, FILE_SORT_ALPHA); + } + else { + + /* make files */ + idcode= groupname_to_code(filelist->dir); + + lb= wich_libbase(G.main, idcode ); + if(lb==0) return; + + id= lb->first; + filelist->numfiles= 0; + while(id) { + if (!filelist->hide_dot || id->name[2] != '.') { + filelist->numfiles++; + } + + id= id->next; + } + + /* XXXXX TODO: if databrowse F4 or append/link filelist->hide_parent has to be set */ + if (!filelist->hide_parent) filelist->numfiles+= 1; + filelist->filelist= (struct direntry *)malloc(filelist->numfiles * sizeof(struct direntry)); + + files = filelist->filelist; + + if (!filelist->hide_parent) { + memset( &(filelist->filelist[0]), 0 , sizeof(struct direntry)); + filelist->filelist[0].relname= BLI_strdup(".."); + filelist->filelist[0].type |= S_IFDIR; + + files++; + } + + id= lb->first; + totlib= totbl= 0; + + while(id) { + ok = 1; + if(ok) { + if (!filelist->hide_dot || id->name[2] != '.') { + memset( files, 0 , sizeof(struct direntry)); + if(id->lib==NULL) + files->relname= BLI_strdup(id->name+2); + else { + files->relname= MEM_mallocN(FILE_MAXDIR+FILE_MAXFILE+32, "filename for lib"); + sprintf(files->relname, "%s | %s", id->lib->name, id->name+2); + } + /* files->type |= S_IFDIR; */ +#if 0 // XXXXX TODO show the selection status of the objects + if(!filelist->has_func) { /* F4 DATA BROWSE */ + if(idcode==ID_OB) { + if( ((Object *)id)->flag & SELECT) files->flags |= ACTIVE; + } + else if(idcode==ID_SCE) { + if( ((Scene *)id)->r.scemode & R_BG_RENDER) files->flags |= ACTIVE; + } + } +#endif + files->nr= totbl+1; + files->poin= id; + fake= id->flag & LIB_FAKEUSER; + if(idcode == ID_MA || idcode == ID_TE || idcode == ID_LA || idcode == ID_WO || idcode == ID_IM) { + files->flags |= IMAGEFILE; + } + if(id->lib && fake) sprintf(files->extra, "LF %d", id->us); + else if(id->lib) sprintf(files->extra, "L %d", id->us); + else if(fake) sprintf(files->extra, "F %d", id->us); + else sprintf(files->extra, " %d", id->us); + + if(id->lib) { + if(totlib==0) firstlib= files; + totlib++; + } + + files++; + } + totbl++; + } + + id= id->next; + } + + /* only qsort of library blocks */ + if(totlib>1) { + qsort(firstlib, totlib, sizeof(struct direntry), compare_name); + } + } + filelist->filter = 0; + filelist_filter(filelist); +} + diff --git a/source/blender/editors/space_file/filelist.h b/source/blender/editors/space_file/filelist.h index dd3c2c766c1..a8d909f899e 100644 --- a/source/blender/editors/space_file/filelist.h +++ b/source/blender/editors/space_file/filelist.h @@ -42,12 +42,13 @@ struct FolderList; struct direntry; struct BlendHandle; struct Scene; +struct Main; struct rcti; +struct ReportList; -struct FileList * filelist_new(); +struct FileList * filelist_new(short type); void filelist_init_icons(); void filelist_free_icons(); -struct FileList * filelist_copy(struct FileList* filelist); int filelist_find(struct FileList* filelist, char *file); void filelist_free(struct FileList* filelist); void filelist_sort(struct FileList* filelist, short sort); @@ -71,6 +72,13 @@ int filelist_empty(struct FileList* filelist); void filelist_parent(struct FileList* filelist); void filelist_setfiletypes(struct FileList* filelist, short has_quicktime); + +int filelist_islibrary (struct FileList* filelist, char* dir, char* group); +void filelist_from_main(struct FileList* filelist); +void filelist_from_library(struct FileList* filelist); +void filelist_freelib(struct FileList* filelist); +void filelist_hideparent(struct FileList* filelist, short hide); + struct ListBase * folderlist_new(); void folderlist_free(struct ListBase* folderlist); void folderlist_popdir(struct ListBase* folderlist, char *dir); diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index f300505933f..1f461f1bbd5 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -123,6 +123,22 @@ short ED_fileselect_set_params(SpaceFile *sfile) /* set the parameters from the operator, if it exists */ if (op) { BLI_strncpy(params->title, op->type->name, sizeof(params->title)); + + params->type = RNA_int_get(op->ptr, "filemode"); + + if (RNA_property_is_set(op->ptr, "path")) { + RNA_string_get(op->ptr, "path", name); + if (params->type == FILE_LOADLIB) { + BLI_strncpy(params->dir, name, sizeof(params->dir)); + BLI_cleanup_dir(G.sce, params->dir); + } else { + /* if operator has path set, use it, otherwise keep the last */ + BLI_convertstringcode(name, G.sce); + BLI_split_dirfile(name, dir, file); + BLI_strncpy(params->file, file, sizeof(params->file)); + BLI_make_file_string(G.sce, params->dir, dir, ""); /* XXX needed ? - also solve G.sce */ + } + } params->filter = 0; params->filter |= RNA_boolean_get(op->ptr, "filter_blender") ? BLENDERFILE : 0; params->filter |= RNA_boolean_get(op->ptr, "filter_image") ? IMAGEFILE : 0; @@ -137,36 +153,33 @@ short ED_fileselect_set_params(SpaceFile *sfile) params->flag |= FILE_FILTER; params->flag |= FILE_HIDE_DOT; - + + if (params->type == FILE_LOADLIB) { + params->flag |= RNA_boolean_get(op->ptr, "link") ? FILE_LINK : 0; + params->flag |= RNA_boolean_get(op->ptr, "autoselect") ? FILE_AUTOSELECT : 0; + params->flag |= RNA_boolean_get(op->ptr, "active_layer") ? FILE_ACTIVELAY : 0; + } + if(params->filter & (IMAGEFILE|MOVIEFILE)) params->display= FILE_IMGDISPLAY; else params->display= FILE_SHORTDISPLAY; - /* if operator has path set, use it, otherwise keep the last */ - if (RNA_property_is_set(op->ptr, "filename")) { - RNA_string_get(op->ptr, "filename", name); - BLI_convertstringcode(name, G.sce); - BLI_split_dirfile(name, dir, file); - BLI_strncpy(params->file, file, sizeof(params->file)); - BLI_make_file_string(G.sce, params->dir, dir, ""); /* XXX needed ? - also solve G.sce */ - } } else { /* default values, if no operator */ + params->type = FILE_UNIX; params->flag |= FILE_HIDE_DOT; params->display = FILE_SHORTDISPLAY; params->filter = 0; params->sort = FILE_SORT_ALPHA; } - /* new params, refresh file list */ - if(sfile->files) filelist_free(sfile->files); - return 1; } void ED_fileselect_reset_params(SpaceFile *sfile) { + sfile->params->type = FILE_UNIX; sfile->params->flag = 0; sfile->params->title[0] = '\0'; } @@ -176,14 +189,14 @@ int ED_fileselect_layout_numfiles(FileLayout* layout, struct ARegion *ar) int numfiles; if (layout->flag & FILE_LAYOUT_HOR) { - short width = ar->v2d.cur.xmax - ar->v2d.cur.xmin - 2*layout->tile_border_x; + int width = ar->v2d.cur.xmax - ar->v2d.cur.xmin - 2*layout->tile_border_x; numfiles = width/layout->tile_w + 1; + return numfiles*layout->rows; } else { - short height = ar->v2d.cur.ymax - ar->v2d.cur.ymin - 2*layout->tile_border_y; + int height = ar->v2d.cur.ymax - ar->v2d.cur.ymin - 2*layout->tile_border_y; numfiles = height/layout->tile_h + 1; + return numfiles*layout->columns; } - - return layout->columns*layout->rows; } int ED_fileselect_layout_offset(FileLayout* layout, int x, int y) @@ -207,7 +220,7 @@ int ED_fileselect_layout_offset(FileLayout* layout, int x, int y) return active_file; } -void ED_fileselect_layout_tilepos(FileLayout* layout, int tile, short *x, short *y) +void ED_fileselect_layout_tilepos(FileLayout* layout, int tile, int *x, int *y) { if (layout->flag == FILE_LAYOUT_HOR) { *x = layout->tile_border_x + (tile/layout->rows)*(layout->tile_w+2*layout->tile_border_x); @@ -250,7 +263,7 @@ static void column_widths(struct FileList* files, struct FileLayout* layout) if (file) { int len; len = file_string_width(file->relname); - if (len > layout->column_widths[COLUMN_NAME]) layout->column_widths[COLUMN_NAME] = len; + if (len > layout->column_widths[COLUMN_NAME]) layout->column_widths[COLUMN_NAME] = len + 20; 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); @@ -322,18 +335,23 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar) column_widths(sfile->files, layout); if (params->display == FILE_SHORTDISPLAY) { - maxlen = layout->column_widths[COLUMN_NAME] + + maxlen = layout->column_widths[COLUMN_NAME] + 12 + layout->column_widths[COLUMN_SIZE]; - maxlen += 20+2*10; // for icon and space between columns + maxlen += 20; // for icon } else { - maxlen = layout->column_widths[COLUMN_NAME] + - layout->column_widths[COLUMN_DATE] + - layout->column_widths[COLUMN_TIME] + + maxlen = layout->column_widths[COLUMN_NAME] + 12 + +#ifndef WIN32 + layout->column_widths[COLUMN_MODE1] + 12 + + layout->column_widths[COLUMN_MODE2] + 12 + + layout->column_widths[COLUMN_MODE3] + 12 + + layout->column_widths[COLUMN_OWNER] + 12 + +#endif + layout->column_widths[COLUMN_DATE] + 12 + + layout->column_widths[COLUMN_TIME] + 12 + 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 + maxlen += 20; // for icon } - layout->tile_w = maxlen + 40; + layout->tile_w = maxlen; if(layout->rows > 0) layout->columns = numfiles/layout->rows + 1; // XXX dirty, modulo is zero else { @@ -357,19 +375,15 @@ FileLayout* ED_fileselect_get_layout(struct SpaceFile *sfile, struct ARegion *ar void file_change_dir(struct SpaceFile *sfile) { if (sfile->params) { - if (BLI_exists(sfile->params->dir)) { - filelist_setdir(sfile->files, sfile->params->dir); + filelist_setdir(sfile->files, sfile->params->dir); - if(folderlist_clear_next(sfile)) - folderlist_free(sfile->folders_next); + if(folderlist_clear_next(sfile)) + folderlist_free(sfile->folders_next); - folderlist_pushdir(sfile->folders_prev, sfile->params->dir); + folderlist_pushdir(sfile->folders_prev, sfile->params->dir); - filelist_free(sfile->files); - sfile->params->active_file = -1; - } else { - BLI_strncpy(sfile->params->dir, filelist_dir(sfile->files), FILE_MAX); - } + filelist_free(sfile->files); + sfile->params->active_file = -1; } } @@ -408,13 +422,16 @@ void autocomplete_directory(struct bContext *C, char *str, void *arg_v) struct direntry* file = filelist_file(sfile->files, i); const char* dir = filelist_dir(sfile->files); if (file && S_ISDIR(file->type)) { - BLI_make_file_string(G.sce, tmp, dir, file->relname); + // BLI_make_file_string(G.sce, tmp, dir, file->relname); + BLI_join_dirfile(tmp, dir, file->relname); autocomplete_do_name(autocpl,tmp); } } autocomplete_end(autocpl, str); if (BLI_exists(str)) { BLI_add_slash(str); + } else { + BLI_make_exist(str); } } } diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index 722fa475727..77f50d91e77 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -45,6 +45,7 @@ #include "BLI_blenlib.h" #include "BLI_arithb.h" #include "BLI_rand.h" +#include "BLI_storage_types.h" #include "BKE_colortools.h" #include "BKE_context.h" @@ -119,6 +120,7 @@ static void file_free(SpaceLink *sl) SpaceFile *sfile= (SpaceFile *) sl; if(sfile->files) { + filelist_freelib(sfile->files); filelist_free(sfile->files); MEM_freeN(sfile->files); sfile->files= NULL; @@ -153,7 +155,10 @@ static void file_free(SpaceLink *sl) /* spacetype; init callback, area size changes, screen set, etc */ static void file_init(struct wmWindowManager *wm, ScrArea *sa) { + SpaceFile *sfile= (SpaceFile*)sa->spacedata.first; printf("file_init\n"); + + if(sfile->layout) sfile->layout->dirty= 1; } @@ -165,7 +170,8 @@ static SpaceLink *file_duplicate(SpaceLink *sl) /* clear or remove stuff from old */ sfilen->op = NULL; /* file window doesn't own operators */ - sfilen->files = filelist_new(); + if (sfileo->params) + sfilen->files = filelist_new(sfileo->params->type); if(sfileo->folders_prev) sfilen->folders_prev = MEM_dupallocN(sfileo->folders_prev); @@ -190,7 +196,7 @@ static void file_refresh(const bContext *C, ScrArea *sa) if (!sfile->folders_prev) sfile->folders_prev = folderlist_new(); if (!sfile->files) { - sfile->files = filelist_new(); + sfile->files = filelist_new(params->type); file_change_dir(sfile); params->active_file = -1; // added this so it opens nicer (ton) } @@ -199,9 +205,20 @@ static void file_refresh(const bContext *C, ScrArea *sa) if (filelist_empty(sfile->files)) { filelist_readdir(sfile->files); + BLI_strncpy(params->dir, filelist_dir(sfile->files), FILE_MAX); } if(params->sort!=FILE_SORT_NONE) filelist_sort(sfile->files, params->sort); - + + if (params->renamefile[0] != '\0') { + int idx = filelist_find(sfile->files, params->renamefile); + if (idx >= 0) { + struct direntry *file= filelist_file(sfile->files, idx); + if (file) { + file->flags |= EDITING; + } + } + params->renamefile[0] = '\0'; + } if (sfile->layout) sfile->layout->dirty= 1; } @@ -231,15 +248,15 @@ static void file_listener(ScrArea *sa, wmNotifier *wmn) /* add handlers, stuff you only do once or on area/region changes */ static void file_main_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy); /* own keymaps */ - keymap= WM_keymap_listbase(wm, "File", SPACE_FILE, 0); + keymap= WM_keymap_find(wm, "File", SPACE_FILE, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); - keymap= WM_keymap_listbase(wm, "FileMain", SPACE_FILE, 0); + keymap= WM_keymap_find(wm, "FileMain", SPACE_FILE, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); @@ -351,7 +368,7 @@ void file_keymap(struct wmWindowManager *wm) { wmKeymapItem *kmi; /* keys for all areas */ - ListBase *keymap= WM_keymap_listbase(wm, "File", SPACE_FILE, 0); + wmKeyMap *keymap= WM_keymap_find(wm, "File", SPACE_FILE, 0); WM_keymap_add_item(keymap, "FILE_OT_bookmark_toggle", NKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "FILE_OT_parent", PKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "FILE_OT_add_bookmark", BKEY, KM_PRESS, KM_CTRL, 0); @@ -360,9 +377,10 @@ void file_keymap(struct wmWindowManager *wm) WM_keymap_add_item(keymap, "FILE_OT_next", BACKSPACEKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "FILE_OT_directory_new", IKEY, KM_PRESS, 0, 0); /* XXX needs button */ WM_keymap_add_item(keymap, "FILE_OT_delete", XKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "FILE_OT_delete", DELKEY, KM_PRESS, 0, 0); /* keys for main area */ - keymap= WM_keymap_listbase(wm, "FileMain", SPACE_FILE, 0); + keymap= WM_keymap_find(wm, "FileMain", SPACE_FILE, 0); WM_keymap_add_item(keymap, "FILE_OT_select", LEFTMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "FILE_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "FILE_OT_select_border", BKEY, KM_PRESS, 0, 0); @@ -383,7 +401,7 @@ void file_keymap(struct wmWindowManager *wm) RNA_int_set(kmi->ptr, "increment",-100); /* keys for button area (top) */ - keymap= WM_keymap_listbase(wm, "FileButtons", SPACE_FILE, 0); + keymap= WM_keymap_find(wm, "FileButtons", SPACE_FILE, 0); WM_keymap_add_item(keymap, "FILE_OT_filenum", PADPLUSKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADPLUSKEY, KM_PRESS, 0, 0); RNA_int_set(kmi->ptr, "increment", 1); @@ -402,12 +420,12 @@ void file_keymap(struct wmWindowManager *wm) static void file_channel_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; ED_region_panels_init(wm, ar); /* own keymaps */ - keymap= WM_keymap_listbase(wm, "File", SPACE_FILE, 0); + keymap= WM_keymap_find(wm, "File", SPACE_FILE, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } @@ -438,15 +456,15 @@ static void file_header_area_draw(const bContext *C, ARegion *ar) /* add handlers, stuff you only do once or on area/region changes */ static void file_ui_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy); /* own keymap */ - keymap= WM_keymap_listbase(wm, "File", SPACE_FILE, 0); /* XXX weak? */ + keymap= WM_keymap_find(wm, "File", SPACE_FILE, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); - keymap= WM_keymap_listbase(wm, "FileButtons", SPACE_FILE, 0); /* XXX weak? */ + keymap= WM_keymap_find(wm, "FileButtons", SPACE_FILE, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } diff --git a/source/blender/editors/space_file/writeimage.c b/source/blender/editors/space_file/writeimage.c index 994f38320f2..045c790b9cd 100644 --- a/source/blender/editors/space_file/writeimage.c +++ b/source/blender/editors/space_file/writeimage.c @@ -115,15 +115,18 @@ static void save_rendered_image_cb_real(char *name, int confirm) if(overwrite) { if(scene->r.imtype==R_MULTILAYER) { - RenderResult *rr= RE_GetResult(RE_GetRender(scene->id.name)); + Render *re= RE_GetRender(scene->id.name); + RenderResult *rr= RE_AcquireResultRead(re); if(rr) RE_WriteRenderResult(rr, str, scene->r.quality); + RE_ReleaseResult(re); } else { + Render *re= RE_GetRender(scene->id.name); RenderResult rres; ImBuf *ibuf; - RE_GetResultImage(RE_GetRender(scene->id.name), &rres); + RE_AcquireResultImage(re, &rres); waitcursor(1); /* from screen.c */ @@ -137,6 +140,8 @@ static void save_rendered_image_cb_real(char *name, int confirm) BKE_write_ibuf(scene, ibuf, str, scene->r.imtype, scene->r.subimtype, scene->r.quality); IMB_freeImBuf(ibuf); /* imbuf knows rects are not part of ibuf */ + + RE_ReleaseResultImage(re); } strcpy(G.ima, name); @@ -231,9 +236,10 @@ void BIF_save_rendered_image(char *name) /* calls fileselect */ void BIF_save_rendered_image_fs(Scene *scene) { + Render *re= RE_GetRender(scene->id.name); RenderResult rres; - RE_GetResultImage(RE_GetRender(scene->id.name), &rres); + RE_AcquireResultImage(re, &rres); if(!rres.rectf && !rres.rect32) { error("No image rendered"); @@ -250,6 +256,8 @@ void BIF_save_rendered_image_fs(Scene *scene) save_image_filesel_str(scene, str); activate_fileselect(FILE_SPECIAL, str, G.ima, save_rendered_image_cb); } + + RE_ReleaseResultImage(re); } diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index fb995285ab7..09008f8d2d1 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -46,15 +46,16 @@ #include "BLI_editVert.h" #include "BLI_rand.h" -#include "BKE_animsys.h" #include "BKE_action.h" +#include "BKE_animsys.h" #include "BKE_context.h" #include "BKE_curve.h" #include "BKE_customdata.h" #include "BKE_depsgraph.h" #include "BKE_fcurve.h" +#include "BKE_library.h" +#include "BKE_main.h" #include "BKE_object.h" -#include "BKE_global.h" #include "BKE_scene.h" #include "BKE_screen.h" #include "BKE_utildefines.h" @@ -250,6 +251,22 @@ static int graph_panel_drivers_poll(const bContext *C, PanelType *pt) return graph_panel_context(C, NULL, NULL); } +static void test_obpoin_but(struct bContext *C, char *name, ID **idpp) +{ + ID *id; + + id= CTX_data_main(C)->object.first; + while(id) { + if( strcmp(name, id->name+2)==0 ) { + *idpp= id; + id_lib_extern(id); /* checks lib data, sets correct flag for saving then */ + return; + } + id= id->next; + } + *idpp= NULL; +} + /* driver settings for active F-Curve (only for 'Drivers' mode) */ static void graph_panel_drivers(const bContext *C, Panel *pa) { @@ -427,13 +444,9 @@ static int graph_properties(bContext *C, wmOperator *op) ScrArea *sa= CTX_wm_area(C); ARegion *ar= graph_has_buttons_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); - } + if(ar) + ED_region_toggle_hidden(C, ar); + return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index 9ae7e8263ee..57e2208f089 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -91,6 +91,26 @@ extern void gl_round_box(int mode, float minx, float miny, float maxx, float maxy, float rad); /* *************************** */ +/* Utility Drawing Defines */ + +/* determine the alpha value that should be used when + * drawing components for some F-Curve (fcu) + * - selected F-Curves should be more visible than partially visible ones + */ +#define drawFCurveFade(fcu) ( ((fcu)->flag & FCURVE_SELECTED)? 1.0f : 0.5f ) + +/* set the colour for some point from some value given packed into an int + * - intV: integer value containing color info packed into an int + * - alpha: float value describing the + */ +#define cpackA(intVC, alpha) \ + { \ + float _cpackCol[3]; \ + cpack_to_rgb(intVC, &_cpackCol[0], &_cpackCol[1], &_cpackCol[2]); \ + glColor4f(_cpackCol[0], _cpackCol[1], _cpackCol[2], alpha); \ + } + +/* *************************** */ /* F-Curve Modifier Drawing */ /* Envelope -------------- */ @@ -258,22 +278,20 @@ static void draw_fcurve_vertices_handles (FCurve *fcu, View2D *v2d, short sel) /* helper func - set color to draw F-Curve data with */ static void set_fcurve_vertex_color (SpaceIpo *sipo, FCurve *fcu, short sel) { -#if 0 - if (sipo->showkey) { - if (sel) UI_ThemeColor(TH_TEXT_HI); - else UI_ThemeColor(TH_TEXT); - } -#endif - if ((fcu->flag & FCURVE_PROTECTED)==0) { - /* Curve's points are being edited */ - if (sel) UI_ThemeColor(TH_VERTEX_SELECT); - else UI_ThemeColor(TH_VERTEX); - } - else { - /* Curve's points cannot be edited */ - if (sel) UI_ThemeColor(TH_TEXT_HI); - else UI_ThemeColor(TH_TEXT); - } + /* Fade the 'intensity' of the vertices based on the selection of the curves too */ + int alphaOffset= (int)((drawFCurveFade(fcu) - 1.0f) * 255); + + /* Set color of curve vertex based on state of curve (i.e. 'Edit' Mode) */ + if ((fcu->flag & FCURVE_PROTECTED)==0) { + /* Curve's points ARE BEING edited */ + if (sel) UI_ThemeColorShadeAlpha(TH_VERTEX_SELECT, 0, alphaOffset); + else UI_ThemeColorShadeAlpha(TH_VERTEX, 0, alphaOffset); + } + else { + /* Curve's points CANNOT BE edited */ + if (sel) UI_ThemeColorShadeAlpha(TH_TEXT_HI, 0, alphaOffset); + else UI_ThemeColorShadeAlpha(TH_TEXT, 0, alphaOffset); + } } @@ -322,7 +340,7 @@ static void draw_fcurve_handles (SpaceIpo *sipo, ARegion *ar, FCurve *fcu) if ((sipo->flag & SIPO_NOHANDLES) || (fcu->flag & FCURVE_PROTECTED) || (fcu->flag & FCURVE_INT_VALUES)) return; - /* slightly hacky, but we want to draw unselected points before selected ones*/ + /* slightly hacky, but we want to draw unselected points before selected ones */ for (sel= 0; sel < 2; sel++) { BezTriple *bezt=fcu->bezt, *prevbezt=NULL; float *fp; @@ -337,7 +355,7 @@ static void draw_fcurve_handles (SpaceIpo *sipo, ARegion *ar, FCurve *fcu) /* only draw first handle if previous segment had handles */ if ( (!prevbezt && (bezt->ipo==BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo==BEZT_IPO_BEZ)) ) { - cpack(col[(unsigned char)bezt->h1]); + cpackA(col[(unsigned char)bezt->h1], drawFCurveFade(fcu)); glBegin(GL_LINE_STRIP); glVertex2fv(fp); glVertex2fv(fp+3); glEnd(); @@ -347,7 +365,7 @@ static void draw_fcurve_handles (SpaceIpo *sipo, ARegion *ar, FCurve *fcu) /* only draw second handle if this segment is bezier */ if (bezt->ipo == BEZT_IPO_BEZ) { - cpack(col[(unsigned char)bezt->h2]); + cpackA(col[(unsigned char)bezt->h2], drawFCurveFade(fcu)); glBegin(GL_LINE_STRIP); glVertex2fv(fp+3); glVertex2fv(fp+6); glEnd(); @@ -359,7 +377,7 @@ static void draw_fcurve_handles (SpaceIpo *sipo, ARegion *ar, FCurve *fcu) ( (!prevbezt && (bezt->ipo==BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo==BEZT_IPO_BEZ)) ) ) { fp= bezt->vec[0]; - cpack(col[(unsigned char)bezt->h1]); + cpackA(col[(unsigned char)bezt->h1], drawFCurveFade(fcu)); glBegin(GL_LINE_STRIP); glVertex2fv(fp); glVertex2fv(fp+3); @@ -371,7 +389,7 @@ static void draw_fcurve_handles (SpaceIpo *sipo, ARegion *ar, FCurve *fcu) (bezt->ipo == BEZT_IPO_BEZ) ) { fp= bezt->vec[1]; - cpack(col[(unsigned char)bezt->h2]); + cpackA(col[(unsigned char)bezt->h2], drawFCurveFade(fcu)); glBegin(GL_LINE_STRIP); glVertex2fv(fp); glVertex2fv(fp+3); @@ -410,7 +428,6 @@ static void draw_fcurve_sample_control (float x, float y, float xscale, float ys glScalef(1.0f/xscale*hsize, 1.0f/yscale*hsize, 1.0f); /* anti-aliased lines for more consistent appearance */ - // XXX needed here? glEnable(GL_LINE_SMOOTH); glEnable(GL_BLEND); @@ -506,7 +523,6 @@ static void draw_fcurve_curve (FCurve *fcu, SpaceIpo *sipo, View2D *v2d, View2DG } /* helper func - draw a samples-based F-Curve */ -// TODO: add offset stuff... static void draw_fcurve_curve_samples (FCurve *fcu, View2D *v2d) { FPoint *prevfpt= fcu->fpt; @@ -647,7 +663,7 @@ static void draw_fcurve_curve_bezts (FCurve *fcu, View2D *v2d, View2DGrid *grid) */ /* resol not depending on horizontal resolution anymore, drivers for example... */ - // XXX need to take into account the scale + // TODO: would be nice to make this depend on the scale of the graph too... if (fcu->driver) resol= 32; else @@ -809,7 +825,7 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGri /* 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)); + glColor4f(fcu->color[0], fcu->color[1], fcu->color[2], drawFCurveFade(fcu)); } /* anti-aliased lines for less jagged appearance */ @@ -855,7 +871,10 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGri else if ( ((fcu->bezt) || (fcu->fpt)) && (fcu->totvert) ) { if (fcu->bezt) { /* only draw handles/vertices on keyframes */ - draw_fcurve_handles(sipo, ar, fcu); + glEnable(GL_BLEND); + draw_fcurve_handles(sipo, ar, fcu); + glDisable(GL_BLEND); + draw_fcurve_vertices(sipo, ar, fcu); } else { diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index d718ef28e99..3e0f9760773 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -1296,8 +1296,7 @@ void GRAPH_OT_handle_type (wmOperatorType *ot) /* set of three euler-rotation F-Curves */ typedef struct tEulerFilter { ID *id; /* ID-block which owns the channels */ - FCurve *fcu1, *fcu2, *fcu3; /* x,y,z rotation curves */ - int i1, i2, i3; /* current index for each curve */ + FCurve (*fcurves)[3]; /* 3 Pointers to F-Curves */ } tEulerFilter; static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op) @@ -1336,7 +1335,7 @@ static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op) if (ELEM(0, fcu->rna_path, strstr(fcu->rna_path, "rotation"))) continue; if (strstr(fcu->rna_path, "pose.pose_channels")) { - if (strstr(fcu->rna_path, "euler_rotation") == 0) + if (strstr(fcu->rna_path, "rotation_euler") == 0) continue; } @@ -1345,12 +1344,30 @@ static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op) * - first check if id-blocks are compatible */ if ((euf) && (ale->id != euf->id)) { + /* if the paths match, add this curve to the set of curves */ + // NOTE: simple string compare for now... could be a bit more fancy... } + else { + /* just add to a new block */ + euf= MEM_callocN(sizeof(tEulerFilter), "tEulerFilter"); + BLI_addtail(&eulers, euf); + + euf->id= ale->id; + euf->fcurves[fcu->array_index]= fcu; + } } + BLI_freelistN(&anim_data); - // XXX for now - return OPERATOR_CANCELLED; + /* step 2: go through each set of curves, processing the values at each keyframe + * - it is assumed that there must be a full set of keyframes at each keyframe position + */ + for (euf= eulers.first; euf; euf= euf->next) { + + } + BLI_freelistN(&eulers); + + return OPERATOR_FINISHED; } void GRAPH_OT_euler_filter (wmOperatorType *ot) @@ -1710,13 +1727,18 @@ static int graph_fmodifier_add_invoke (bContext *C, wmOperator *op, wmEvent *eve /* start from 1 to skip the 'Invalid' modifier type */ for (i = 1; i < FMODIFIER_NUM_TYPES; i++) { FModifierTypeInfo *fmi= get_fmodifier_typeinfo(i); + PointerRNA props_ptr; /* check if modifier is valid for this context */ if (fmi == NULL) continue; - /* add entry to add this type of modifier */ - uiItemEnumO(layout, fmi->name, 0, "GRAPH_OT_fmodifier_add", "type", i); + /* create operator menu item with relevant properties filled in */ + props_ptr= uiItemFullO(layout, fmi->name, 0, "GRAPH_OT_fmodifier_add", NULL, WM_OP_EXEC_REGION_WIN, UI_ITEM_O_RETURN_PROPS); + /* the only thing that gets set from the menu is the type of F-Modifier to add */ + RNA_enum_set(&props_ptr, "type", i); + /* the following properties are just repeats of existing ones... */ + RNA_boolean_set(&props_ptr, "only_active", RNA_boolean_get(op->ptr, "only_active")); } uiItemS(layout); @@ -1728,36 +1750,41 @@ static int graph_fmodifier_add_invoke (bContext *C, wmOperator *op, wmEvent *eve static int graph_fmodifier_add_exec(bContext *C, wmOperator *op) { bAnimContext ac; + ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; - FCurve *fcu; - FModifier *fcm; + int filter; short type; /* get editor data */ if (ANIM_animdata_get_context(C, &ac) == 0) return OPERATOR_CANCELLED; - - // xxx call the raw methods here instead? - ale= get_active_fcurve_channel(&ac); - if (ale == NULL) - return OPERATOR_CANCELLED; - fcu= (FCurve *)ale->data; - MEM_freeN(ale); - if (fcu == NULL) - return OPERATOR_CANCELLED; - /* get type of modifier to add */ type= RNA_enum_get(op->ptr, "type"); - /* add F-Modifier of specified type to active F-Curve, and make it the active one */ - fcm= add_fmodifier(&fcu->modifiers, type); - if (fcm) - set_active_fmodifier(&fcu->modifiers, fcm); - else { - BKE_report(op->reports, RPT_ERROR, "Modifier couldn't be added. See console for details."); - return OPERATOR_CANCELLED; + /* filter data */ + filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE| ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY); + if (RNA_boolean_get(op->ptr, "only_active")) + filter |= ANIMFILTER_ACTIVE; + else + filter |= ANIMFILTER_SEL; + ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); + + /* smooth keyframes */ + for (ale= anim_data.first; ale; ale= ale->next) { + FCurve *fcu= (FCurve *)ale->data; + FModifier *fcm; + + /* add F-Modifier of specified type to active F-Curve, and make it the active one */ + fcm= add_fmodifier(&fcu->modifiers, type); + if (fcm) + set_active_fmodifier(&fcu->modifiers, fcm); + else { // TODO: stop when this happens? + BKE_report(op->reports, RPT_ERROR, "Modifier couldn't be added. See console for details."); + break; + } } + BLI_freelistN(&anim_data); /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); @@ -1779,13 +1806,14 @@ void GRAPH_OT_fmodifier_add (wmOperatorType *ot) /* api callbacks */ ot->invoke= graph_fmodifier_add_invoke; ot->exec= graph_fmodifier_add_exec; - ot->poll= graphop_active_fcurve_poll; + ot->poll= graphop_selected_fcurve_poll; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ RNA_def_enum(ot->srna, "type", fmodifier_type_items, 0, "Type", ""); + RNA_def_boolean(ot->srna, "only_active", 1, "Only Active", "Only add F-Modifier to active F-Curve."); } /* ************************************************************************** */ diff --git a/source/blender/editors/space_graph/graph_header.c b/source/blender/editors/space_graph/graph_header.c index dd304cd8cf3..98d58c92da4 100644 --- a/source/blender/editors/space_graph/graph_header.c +++ b/source/blender/editors/space_graph/graph_header.c @@ -298,29 +298,7 @@ void graph_header_buttons(const bContext *C, ARegion *ar) xco+= 120; /* filtering buttons */ - if (sipo->ads) { - //uiBlockBeginAlign(block); - uiDefIconButBitI(block, TOG, ADS_FILTER_ONLYSEL, B_REDR, ICON_RESTRICT_SELECT_OFF, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Only display selected Objects"); - //uiBlockEndAlign(block); - xco += 5; - - uiBlockBeginAlign(block); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOSCE, B_REDR, ICON_SCENE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Scene Animation"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOWOR, B_REDR, ICON_WORLD_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display World Animation"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOSHAPEKEYS, B_REDR, ICON_SHAPEKEY_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display ShapeKeys"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMAT, B_REDR, ICON_MATERIAL_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Materials"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOLAM, B_REDR, ICON_LAMP_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Lamps"); - 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"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMBA, B_REDR, ICON_META_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display MetaBalls"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOPART, B_REDR, ICON_PARTICLE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Particles"); - uiBlockEndAlign(block); - xco += 30; - } - else { - // XXX this case shouldn't happen at all... for now, just pad out same amount of space - xco += 10*XIC + 30; - } + xco= ANIM_headerUI_standard_buttons(C, sipo->ads, block, xco, yco); /* auto-snap selector */ if (sipo->flag & SIPO_DRAWTIME) { diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h index 2e8d0655d2d..83a565e485f 100644 --- a/source/blender/editors/space_graph/graph_intern.h +++ b/source/blender/editors/space_graph/graph_intern.h @@ -155,6 +155,7 @@ short fcurve_needs_draw_fmodifier_controls(struct FCurve *fcu, struct FModifier int graphop_visible_keyframes_poll(struct bContext *C); int graphop_editable_keyframes_poll(struct bContext *C); int graphop_active_fcurve_poll(struct bContext *C); +int graphop_selected_fcurve_poll(struct bContext *C); /* ***************************************** */ /* graph_ops.c */ diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index fc4c05915c9..b82055064f8 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -141,7 +141,7 @@ void graphedit_operatortypes(void) /* ************************** registration - keymaps **********************************/ -static void graphedit_keymap_keyframes (wmWindowManager *wm, ListBase *keymap) +static void graphedit_keymap_keyframes (wmWindowManager *wm, wmKeyMap *keymap) { wmKeymapItem *kmi; @@ -221,7 +221,7 @@ static void graphedit_keymap_keyframes (wmWindowManager *wm, ListBase *keymap) WM_keymap_add_item(keymap, "GRAPH_OT_view_all", HOMEKEY, KM_PRESS, 0, 0); /* F-Modifiers */ - WM_keymap_add_item(keymap, "GRAPH_OT_fmodifier_add", MKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0); + RNA_boolean_set(WM_keymap_add_item(keymap, "GRAPH_OT_fmodifier_add", MKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "only_active", 0); /* transform system */ @@ -232,10 +232,10 @@ static void graphedit_keymap_keyframes (wmWindowManager *wm, ListBase *keymap) void graphedit_keymap(wmWindowManager *wm) { - ListBase *keymap; + wmKeyMap *keymap; /* keymap for all regions */ - keymap= WM_keymap_listbase(wm, "GraphEdit Generic", SPACE_IPO, 0); + keymap= WM_keymap_find(wm, "GraphEdit Generic", SPACE_IPO, 0); WM_keymap_add_item(keymap, "GRAPH_OT_properties", NKEY, KM_PRESS, 0, 0); /* channels */ @@ -245,7 +245,7 @@ void graphedit_keymap(wmWindowManager *wm) */ /* keyframes */ - keymap= WM_keymap_listbase(wm, "GraphEdit Keys", SPACE_IPO, 0); + keymap= WM_keymap_find(wm, "GraphEdit Keys", SPACE_IPO, 0); graphedit_keymap_keyframes(wm, keymap); } diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index 728c9310a47..7eec9f31d86 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -142,9 +142,13 @@ 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); - /* deactivate the F-Curve, and deselect if deselecting keyframes */ + /* deactivate the F-Curve, and deselect if deselecting keyframes. + * otherwise select the F-Curve too since we've selected all the keyframes + */ if (sel == SELECT_SUBTRACT) fcu->flag &= ~FCURVE_SELECTED; + else + fcu->flag |= FCURVE_SELECTED; fcu->flag &= ~FCURVE_ACTIVE; } @@ -259,8 +263,9 @@ static void borderselect_graphkeys (bAnimContext *ac, rcti rect, short mode, sho /* select the curve too * NOTE: this should really only happen if the curve got touched... */ - if (selectmode == SELECT_ADD) + if (selectmode == SELECT_ADD) { fcu->flag |= FCURVE_SELECTED; + } } /* cleanup */ diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c index f00e7845549..25087441b6a 100644 --- a/source/blender/editors/space_graph/graph_utils.c +++ b/source/blender/editors/space_graph/graph_utils.c @@ -285,4 +285,33 @@ int graphop_active_fcurve_poll (bContext *C) return has_fcurve; } +/* has selected F-Curve that's editable */ +int graphop_selected_fcurve_poll (bContext *C) +{ + bAnimContext ac; + ListBase anim_data = {NULL, NULL}; + ScrArea *sa= CTX_wm_area(C); + int filter, items; + short found = 0; + + /* firstly, check if in Graph Editor */ + // TODO: also check for region? + if ((sa == NULL) || (sa->spacetype != SPACE_IPO)) + return 0; + + /* try to init Anim-Context stuff ourselves and check */ + if (ANIM_animdata_get_context(C, &ac) == 0) + return 0; + + /* get the editable + selected F-Curves, and as long as we got some, we can return */ + filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY); + items = ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); + if (items == 0) + return 0; + + /* cleanup and return findings */ + BLI_freelistN(&anim_data); + return found; +} + /* ************************************************************** */ diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index 8887d464f30..a7ea2294ed4 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -203,14 +203,14 @@ static SpaceLink *graph_duplicate(SpaceLink *sl) /* add handlers, stuff you only do once or on area/region changes */ static void graph_main_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy); /* own keymap */ - keymap= WM_keymap_listbase(wm, "GraphEdit Keys", SPACE_IPO, 0); /* XXX weak? */ + keymap= WM_keymap_find(wm, "GraphEdit Keys", SPACE_IPO, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); - keymap= WM_keymap_listbase(wm, "GraphEdit Generic", SPACE_IPO, 0); + keymap= WM_keymap_find(wm, "GraphEdit Generic", SPACE_IPO, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); } @@ -281,14 +281,14 @@ static void graph_main_area_draw(const bContext *C, ARegion *ar) static void graph_channel_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy); /* own keymap */ - keymap= WM_keymap_listbase(wm, "Animation_Channels", 0, 0); /* XXX weak? */ + keymap= WM_keymap_find(wm, "Animation_Channels", 0, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); - keymap= WM_keymap_listbase(wm, "GraphEdit Generic", SPACE_IPO, 0); + keymap= WM_keymap_find(wm, "GraphEdit Generic", SPACE_IPO, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); } @@ -352,11 +352,11 @@ static void graph_header_area_draw(const bContext *C, ARegion *ar) /* add handlers, stuff you only do once or on area/region changes */ static void graph_buttons_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; ED_region_panels_init(wm, ar); - keymap= WM_keymap_listbase(wm, "GraphEdit Generic", SPACE_IPO, 0); + keymap= WM_keymap_find(wm, "GraphEdit Generic", SPACE_IPO, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } @@ -374,6 +374,7 @@ static void graph_region_listener(ARegion *ar, wmNotifier *wmn) break; case NC_SCENE: switch(wmn->data) { + case ND_RENDER_OPTIONS: case ND_OB_ACTIVE: case ND_FRAME: case ND_MARKERS: diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 21fccdc65f8..67fb95b1f6b 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -100,8 +100,6 @@ #define B_FACESEL_PAINT_TEST 11 #define B_SIMA_RECORD 12 #define B_SIMA_PLAY 13 -#define B_SIMARANGE 14 -#define B_SIMACURVES 15 #define B_SIMANOTHING 16 #define B_SIMABRUSHCHANGE 17 @@ -116,10 +114,8 @@ #define B_SIMACLONEDELETE 26 /* XXX */ -static int okee() {return 0;} static int simaFaceDraw_Check() {return 0;} static int simaUVSel_Check() {return 0;} -static int is_uv_tface_editing_allowed_silent() {return 0;} /* XXX */ /* proto */ @@ -135,13 +131,6 @@ static void do_image_panel_events(bContext *C, void *arg, int event) switch(event) { case B_REDR: break; - case B_SIMACURVES: - curvemapping_do_ibuf(sima->cumap, ED_space_image_buffer(sima)); - break; - case B_SIMARANGE: - curvemapping_set_black_white(sima->cumap, NULL, NULL); - curvemapping_do_ibuf(sima->cumap, ED_space_image_buffer(sima)); - break; case B_TRANS_IMAGE: image_editvertex_buts(C, NULL); break; @@ -149,12 +138,11 @@ static void do_image_panel_events(bContext *C, void *arg, int event) image_editcursor_buts(C, &ar->v2d, NULL); break; } + /* all events now */ WM_event_add_notifier(C, NC_IMAGE, sima->image); } - - static void image_info(Image *ima, ImBuf *ibuf, char *str) { int ofs= 0; @@ -168,12 +156,12 @@ static void image_info(Image *ima, ImBuf *ibuf, char *str) } if(ima->source==IMA_SRC_MOVIE) { - ofs= sprintf(str, "Movie "); + ofs= sprintf(str, "Movie"); if(ima->anim) ofs+= sprintf(str+ofs, "%d frs", IMB_anim_get_duration(ima->anim)); } else - ofs= sprintf(str, "Image "); + ofs= sprintf(str, "Image"); ofs+= sprintf(str+ofs, ": size %d x %d,", ibuf->x, ibuf->y); @@ -216,11 +204,7 @@ struct ImageUser *ntree_get_active_iuser(bNodeTree *ntree) /* this function gets the values for cursor and vertex number buttons */ static void image_transform_but_attr(SpaceImage *sima, int *imx, int *imy, int *step, int *digits) /*, float *xcoord, float *ycoord)*/ { - ImBuf *ibuf= ED_space_image_buffer(sima); - if(ibuf) { - *imx= ibuf->x; - *imy= ibuf->y; - } + ED_space_image_size(sima, imx, imy); if (sima->flag & SI_COORDFLOATS) { *step= 1; @@ -246,10 +230,6 @@ static void image_editvertex_buts(const bContext *C, uiBlock *block) EditFace *efa; MTFace *tf; - if(obedit==NULL || obedit->type!=OB_MESH) return; - - if( is_uv_tface_editing_allowed_silent()==0 ) return; - image_transform_but_attr(sima, &imx, &imy, &step, &digits); em= BKE_mesh_get_editmesh((Mesh *)obedit->data); @@ -354,8 +334,6 @@ static void image_editcursor_buts(const bContext *C, View2D *v2d, uiBlock *block int imx= 256, imy= 256; int step, digits; - if( is_uv_tface_editing_allowed_silent()==0 ) return; - image_transform_but_attr(sima, &imx, &imy, &step, &digits); if(block) { // do the buttons @@ -388,59 +366,6 @@ static void image_editcursor_buts(const bContext *C, View2D *v2d, uiBlock *block #if 0 static void image_panel_view_properties(const bContext *C, Panel *pa) { - SpaceImage *sima= CTX_wm_space_image(C); - ARegion *ar= CTX_wm_region(C); - Object *obedit= CTX_data_edit_object(C); - uiBlock *block; - - 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"); - uiDefButBitI(block, TOG, SI_COORDFLOATS, B_REDR, "Normalized Coords", 165,160,145,19, &sima->flag, 0, 0, 0, 0, "Display coords from 0.0 to 1.0 rather then in pixels"); - - if (sima->image) { - uiDefBut(block, LABEL, B_NOP, "Image Display:", 10,140,140,19, 0, 0, 0, 0, 0, ""); - uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_REDR, "AspX:", 10,120,140,19, &sima->image->aspx, 0.1, 5000.0, 100, 0, "X Display Aspect for this image, does not affect renderingm 0 disables."); - uiDefButF(block, NUM, B_REDR, "AspY:", 10,100,140,19, &sima->image->aspy, 0.1, 5000.0, 100, 0, "X Display Aspect for this image, does not affect rendering 0 disables."); - uiBlockEndAlign(block); - } - - if (obedit && obedit->type==OB_MESH) { - Mesh *me= obedit->data; - 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, ""); - uiBlockBeginAlign(block); - uiDefButC(block, ROW, B_REDR, "Outline", 10,60,58,19, &sima->dt_uv, 0.0, SI_UVDT_OUTLINE, 0, 0, "Outline Wire UV drawtype"); - uiDefButC(block, ROW, B_REDR, "Dash", 68, 60,58,19, &sima->dt_uv, 0.0, SI_UVDT_DASH, 0, 0, "Dashed Wire UV drawtype"); - uiDefButC(block, ROW, B_REDR, "Black", 126, 60,58,19, &sima->dt_uv, 0.0, SI_UVDT_BLACK, 0, 0, "Black Wire UV drawtype"); - uiDefButC(block, ROW, B_REDR, "White", 184,60,58,19, &sima->dt_uv, 0.0, SI_UVDT_WHITE, 0, 0, "White Wire UV drawtype"); - - uiBlockEndAlign(block); - uiDefButBitI(block, TOG, SI_SMOOTH_UV, B_REDR, "Smooth", 250,60,60,19, &sima->flag, 0, 0, 0, 0, "Display smooth lines in the UV view"); - - - uiDefButBitI(block, TOG, ME_DRAWFACES, B_REDR, "Faces", 10,30,60,19, &me->drawflag, 0, 0, 0, 0, "Displays all faces as shades in the 3d view and UV editor"); - uiDefButBitI(block, TOG, ME_DRAWEDGES, B_REDR, "Edges", 70, 30,60,19, &me->drawflag, 0, 0, 0, 0, "Displays selected edges using hilights in the 3d view and UV editor"); - - uiDefButBitI(block, TOG, SI_DRAWSHADOW, B_REDR, "Final Shadow", 130, 30,110,19, &sima->flag, 0, 0, 0, 0, "Draw the final result from the objects modifiers"); - uiDefButBitI(block, TOG, SI_DRAW_OTHER, B_REDR, "Other Objs", 230, 30, 80, 19, &sima->flag, 0, 0, 0, 0, "Also draw all 3d view selected mesh objects that use this image"); - - uiDefButBitI(block, TOG, SI_DRAW_STRETCH, B_REDR, "UV Stretch", 10,0,100,19, &sima->flag, 0, 0, 0, 0, "Difference between UV's and the 3D coords (blue for low distortion, red is high)"); - if (sima->flag & SI_DRAW_STRETCH) { - uiBlockBeginAlign(block); - uiDefButC(block, ROW, B_REDR, "Area", 120,0,60,19, &sima->dt_uvstretch, 0.0, SI_UVDT_STRETCH_AREA, 0, 0, "Area distortion between UV's and 3D coords"); - uiDefButC(block, ROW, B_REDR, "Angle", 180,0,60,19, &sima->dt_uvstretch, 0.0, SI_UVDT_STRETCH_ANGLE, 0, 0, "Angle distortion between UV's and 3D coords"); - uiBlockEndAlign(block); - } - } - - BKE_mesh_end_editmesh(me, em); - } - image_editcursor_buts(C, &ar->v2d, block); } #endif @@ -524,8 +449,8 @@ void brush_buttons(const bContext *C, uiBlock *block, short fromsima, uiDefIconButBitS(block, TOG|BIT, BRUSH_ALPHA_PRESSURE, evt_nop, ICON_STYLUS_PRESSURE, 180,yco-20,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets"); uiDefButI(block, NUMSLI, evt_nop, "Size ", 0,yco-40,180,19, &brush->size, 1, 200, 0, 0, "The size of the brush"); uiDefIconButBitS(block, TOG|BIT, BRUSH_SIZE_PRESSURE, evt_nop, ICON_STYLUS_PRESSURE, 180,yco-40,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets"); - uiDefButF(block, NUMSLI, evt_nop, "Falloff ", 0,yco-60,180,19, &brush->innerradius, 0.0, 1.0, 0, 0, "The fall off radius of the brush"); - uiDefIconButBitS(block, TOG|BIT, BRUSH_RAD_PRESSURE, evt_nop, ICON_STYLUS_PRESSURE, 180,yco-60,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets"); +// uiDefButF(block, NUMSLI, evt_nop, "Falloff ", 0,yco-60,180,19, &brush->innerradius, 0.0, 1.0, 0, 0, "The fall off radius of the brush"); +// uiDefIconButBitS(block, TOG|BIT, BRUSH_RAD_PRESSURE, evt_nop, ICON_STYLUS_PRESSURE, 180,yco-60,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets"); uiDefButF(block, NUMSLI, evt_nop, "Spacing ",0,yco-80,180,19, &brush->spacing, 1.0, 100.0, 0, 0, "Repeating paint on %% of brush diameter"); uiDefIconButBitS(block, TOG|BIT, BRUSH_SPACING_PRESSURE, evt_nop, ICON_STYLUS_PRESSURE, 180,yco-80,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets"); uiBlockEndAlign(block); @@ -565,105 +490,36 @@ void brush_buttons(const bContext *C, uiBlock *block, short fromsima, #endif } -static int image_panel_paint_poll(const bContext *C, PanelType *pt) +static int image_panel_poll(const bContext *C, PanelType *pt) { SpaceImage *sima= CTX_wm_space_image(C); - return (sima->image && (sima->flag & SI_DRAWTOOL)); -} - -static void image_panel_paintcolor(const bContext *C, Panel *pa) -{ - SpaceImage *sima= CTX_wm_space_image(C); - ToolSettings *settings= CTX_data_tool_settings(C); - Brush *brush= paint_brush(&settings->imapaint.paint); - uiBlock *block; - static float hsv[3], old[3]; // used as temp mem for picker - static char hexcol[128]; - - if(!sima->image || (sima->flag & SI_DRAWTOOL)==0) - return; - - block= uiLayoutFreeBlock(pa->layout); - uiBlockSetHandleFunc(block, do_image_panel_events, NULL); - - if(brush) - uiBlockPickerButtons(block, brush->rgb, hsv, old, hexcol, 'f', B_REDR); + return ED_space_image_has_buffer(sima); } -static void image_panel_paint(const bContext *C, Panel *pa) -{ - SpaceImage *sima= CTX_wm_space_image(C); - uiBlock *block; - - if(!sima->image || (sima->flag & SI_DRAWTOOL)==0) - return; - - 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); -} - -static void image_panel_curves_reset(bContext *C, void *cumap_v, void *ibuf_v) -{ - SpaceImage *sima= CTX_wm_space_image(C); - CurveMapping *cumap = cumap_v; - int a; - - for(a=0; a<CM_TOT; a++) - curvemap_reset(cumap->cm+a, &cumap->clipr); - - cumap->black[0]=cumap->black[1]=cumap->black[2]= 0.0f; - cumap->white[0]=cumap->white[1]=cumap->white[2]= 1.0f; - curvemapping_set_black_white(cumap, NULL, NULL); - - curvemapping_changed(cumap, 0); - curvemapping_do_ibuf(cumap, ibuf_v); - - WM_event_add_notifier(C, NC_IMAGE, sima->image); -} - - static void image_panel_curves(const bContext *C, Panel *pa) { + bScreen *sc= CTX_wm_screen(C); SpaceImage *sima= CTX_wm_space_image(C); ImBuf *ibuf; - uiBlock *block; - uiBut *bt; - - /* and we check for spare */ - ibuf= ED_space_image_buffer(sima); + PointerRNA simaptr; + int levels; + void *lock; - block= uiLayoutFreeBlock(pa->layout); - uiBlockSetHandleFunc(block, do_image_panel_events, NULL); + ibuf= ED_space_image_acquire_buffer(sima, &lock); - if (ibuf) { - rctf rect; - + if(ibuf) { if(sima->cumap==NULL) sima->cumap= curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f); - - rect.xmin= 110; rect.xmax= 310; - rect.ymin= 10; rect.ymax= 200; - curvemap_buttons(block, sima->cumap, 'c', B_SIMACURVES, B_REDR, &rect); - - /* curvemap min/max only works for RGBA */ - if(ibuf->channels==4) { - bt=uiDefBut(block, BUT, B_SIMARANGE, "Reset", 10, 160, 90, 19, NULL, 0.0f, 0.0f, 0, 0, "Reset Black/White point and curves"); - uiButSetFunc(bt, image_panel_curves_reset, sima->cumap, ibuf); - - uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_SIMARANGE, "Min R:", 10, 120, 90, 19, sima->cumap->black, -1000.0f, 1000.0f, 10, 2, "Black level"); - uiDefButF(block, NUM, B_SIMARANGE, "Min G:", 10, 100, 90, 19, sima->cumap->black+1, -1000.0f, 1000.0f, 10, 2, "Black level"); - uiDefButF(block, NUM, B_SIMARANGE, "Min B:", 10, 80, 90, 19, sima->cumap->black+2, -1000.0f, 1000.0f, 10, 2, "Black level"); - - uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_SIMARANGE, "Max R:", 10, 50, 90, 19, sima->cumap->white, -1000.0f, 1000.0f, 10, 2, "White level"); - uiDefButF(block, NUM, B_SIMARANGE, "Max G:", 10, 30, 90, 19, sima->cumap->white+1, -1000.0f, 1000.0f, 10, 2, "White level"); - uiDefButF(block, NUM, B_SIMARANGE, "Max B:", 10, 10, 90, 19, sima->cumap->white+2, -1000.0f, 1000.0f, 10, 2, "White level"); - } + + /* curvemap black/white levels only works for RGBA */ + levels= (ibuf->channels==4); + + RNA_pointer_create(&sc->id, &RNA_SpaceImageEditor, sima, &simaptr); + uiTemplateCurveMapping(pa->layout, &simaptr, "curves", 'c', levels); } + + ED_space_image_release_buffer(sima, lock); } #if 0 @@ -799,81 +655,11 @@ static void image_panel_preview(ScrArea *sa, short cntrl) // IMAGE_HANDLER_PREVI uiBlockSetDrawExtraFunc(block, preview_cb); } - -static void image_panel_gpencil(short cntrl) // IMAGE_HANDLER_GREASEPENCIL -{ - uiBlock *block; - SpaceImage *sima; - - sima= curarea->spacedata.first; - - 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; - - /* allocate memory for gpd if drawing enabled (this must be done first or else we crash) */ - if (sima->flag & SI_DISPGP) { - if (sima->gpd == NULL) - gpencil_data_setactive(curarea, gpencil_data_addnew()); - } - - if (sima->flag & SI_DISPGP) { - bGPdata *gpd= sima->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 */ - uiDefButBitI(block, TOG, SI_DISPGP, B_REDR, "Use Grease Pencil", 10, 225, 150, 20, &sima->flag, 0, 0, 0, 0, "Display freehand annotations overlay over this Image/UV Editor (draw using Shift-LMB)"); - - /* extend the panel if the contents won't fit */ - newheight= draw_gpencil_panel(block, gpd, curarea); - uiNewPanelHeight(block, newheight); - } - else { - uiDefButBitI(block, TOG, SI_DISPGP, B_REDR, "Use Grease Pencil", 10, 225, 150, 20, &sima->flag, 0, 0, 0, 0, "Display freehand annotations overlay over this Image/UV Editor"); - uiDefBut(block, LABEL, 1, " ", 160, 180, 150, 20, NULL, 0.0, 0.0, 0, 0, ""); - } -} #endif /* ********************* callbacks for standard image buttons *************** */ -/* called from fileselect or button */ -static void load_image_cb(bContext *C, char *str, void *ima_pp_v, void *iuser_v) -{ - Image **ima_pp= (Image **)ima_pp_v; - Image *ima= NULL; - - ima= BKE_add_image_file(str, 0); - if(ima) { - if(*ima_pp) { - (*ima_pp)->id.us--; - } - *ima_pp= ima; - - BKE_image_signal(ima, iuser_v, IMA_SIGNAL_RELOAD); - WM_event_add_notifier(C, NC_IMAGE, ima); - - /* button event gets lost when it goes via filewindow */ -// if(G.buts && G.buts->lockpoin) { -// Tex *tex= G.buts->lockpoin; -// if(GS(tex->id.name)==ID_TE) { -// BIF_preview_changed(ID_TE); -// allqueue(REDRAWBUTSSHADING, 0); -// allqueue(REDRAWVIEW3D, 0); -// allqueue(REDRAWOOPS, 0); -// } -// } - } - - ED_undo_push(C, "Load image"); -} - static char *layer_menu(RenderResult *rr, short *curlay) { RenderLayer *rl; @@ -937,92 +723,6 @@ static void set_frames_cb(bContext *C, void *ima_v, void *iuser_v) } } -static void image_src_change_cb(bContext *C, void *ima_v, void *iuser_v) -{ - BKE_image_signal(ima_v, iuser_v, IMA_SIGNAL_SRC_CHANGE); -} - -/* buttons have 2 arg callbacks, filewindow has 3 args... so thats why the wrapper below */ -static void image_browse_cb1(bContext *C, void *ima_pp_v, void *iuser_v) -{ - Image **ima_pp= (Image **)ima_pp_v; - ImageUser *iuser= iuser_v; - - if(ima_pp) { - Image *ima= *ima_pp; - - if(iuser->menunr== -2) { - // XXX activate_databrowse_args(&ima->id, ID_IM, 0, &iuser->menunr, image_browse_cb1, ima_pp, iuser); - } - else if (iuser->menunr>0) { - Image *newima= (Image*) BLI_findlink(&CTX_data_main(C)->image, iuser->menunr-1); - - if (newima && newima!=ima) { - *ima_pp= newima; - id_us_plus(&newima->id); - if(ima) ima->id.us--; - - BKE_image_signal(newima, iuser, IMA_SIGNAL_USER_NEW_IMAGE); - - ED_undo_push(C, "Browse image"); - } - } - } -} - -static void image_browse_cb(bContext *C, void *ima_pp_v, void *iuser_v) -{ - image_browse_cb1(C, ima_pp_v, iuser_v); -} - -static void image_reload_cb(bContext *C, void *ima_v, void *iuser_v) -{ - if(ima_v) { - BKE_image_signal(ima_v, iuser_v, IMA_SIGNAL_RELOAD); - } -} - -static void image_field_test(bContext *C, void *ima_v, void *iuser_v) -{ - Image *ima= ima_v; - - if(ima) { - ImBuf *ibuf= BKE_image_get_ibuf(ima, iuser_v); - if(ibuf) { - short nr= 0; - if( !(ima->flag & IMA_FIELDS) && (ibuf->flags & IB_fields) ) nr= 1; - if( (ima->flag & IMA_FIELDS) && !(ibuf->flags & IB_fields) ) nr= 1; - if(nr) { - BKE_image_signal(ima, iuser_v, IMA_SIGNAL_FREE); - } - } - } -} - -static void image_unlink_cb(bContext *C, void *ima_pp_v, void *unused) -{ - Image **ima_pp= (Image **)ima_pp_v; - - if(ima_pp && *ima_pp) { - Image *ima= *ima_pp; - /* (for time being, texturefaces are no users, conflict in design...) */ - if(ima->id.us>1) - ima->id.us--; - *ima_pp= NULL; - } -} - -static void image_load_fs_cb(bContext *C, void *ima_pp_v, void *iuser_v) -{ - ScrArea *sa= CTX_wm_area(C); -// Image **ima_pp= (Image **)ima_pp_v; - - if(sa->spacetype==SPACE_IMAGE) - WM_operator_name_call(C, "IMAGE_OT_open", WM_OP_INVOKE_REGION_WIN, NULL); - else - printf("not supported yet\n"); -} - /* 5 layer button callbacks... */ static void image_multi_cb(bContext *C, void *rr_v, void *iuser_v) { @@ -1077,6 +777,7 @@ static void image_multi_decpass_cb(bContext *C, void *rr_v, void *iuser_v) } } +#if 0 static void image_pack_cb(bContext *C, void *ima_v, void *iuser_v) { if(ima_v) { @@ -1106,338 +807,328 @@ static void image_pack_cb(bContext *C, void *ima_v, void *iuser_v) } } } +#endif -static void image_load_cb(bContext *C, void *ima_pp_v, void *iuser_v) -{ - if(ima_pp_v) { - Image *ima= *((Image **)ima_pp_v); - ImBuf *ibuf= BKE_image_get_ibuf(ima, iuser_v); - char str[FILE_MAX]; - - /* name in ima has been changed by button! */ - BLI_strncpy(str, ima->name, FILE_MAX); - if(ibuf) BLI_strncpy(ima->name, ibuf->name, FILE_MAX); - - load_image_cb(C, str, ima_pp_v, iuser_v); - } -} - +#if 0 static void image_freecache_cb(bContext *C, void *ima_v, void *unused) { Scene *scene= CTX_data_scene(C); BKE_image_free_anim_ibufs(ima_v, scene->r.cfra); WM_event_add_notifier(C, NC_IMAGE, ima_v); } +#endif -static void image_generated_change_cb(bContext *C, void *ima_v, void *iuser_v) -{ - BKE_image_signal(ima_v, iuser_v, IMA_SIGNAL_FREE); -} - +#if 0 static void image_user_change(bContext *C, void *iuser_v, void *unused) { Scene *scene= CTX_data_scene(C); BKE_image_user_calc_imanr(iuser_v, scene->r.cfra, 0); } +#endif -static void uiblock_layer_pass_buttons(uiBlock *block, RenderResult *rr, ImageUser *iuser, int event, int x, int y, int w) +static void uiblock_layer_pass_buttons(uiLayout *layout, RenderResult *rr, ImageUser *iuser, int w) { + uiBlock *block= uiLayoutGetBlock(layout); uiBut *but; RenderLayer *rl= NULL; int wmenu1, wmenu2; char *strp; + uiLayoutRow(layout, 1); + /* layer menu is 1/3 larger than pass */ wmenu1= (3*w)/5; wmenu2= (2*w)/5; /* menu buts */ strp= layer_menu(rr, &iuser->layer); - but= uiDefButS(block, MENU, event, strp, x, y, wmenu1, 20, &iuser->layer, 0,0,0,0, "Select Layer"); + but= uiDefButS(block, MENU, 0, strp, 0, 0, wmenu1, 20, &iuser->layer, 0,0,0,0, "Select Layer"); uiButSetFunc(but, image_multi_cb, rr, iuser); MEM_freeN(strp); rl= BLI_findlink(&rr->layers, iuser->layer - (rr->rectf?1:0)); /* fake compo layer, return NULL is meant to be */ strp= pass_menu(rl, &iuser->pass); - but= uiDefButS(block, MENU, event, strp, x+wmenu1, y, wmenu2, 20, &iuser->pass, 0,0,0,0, "Select Pass"); + but= uiDefButS(block, MENU, 0, strp, 0, 0, wmenu2, 20, &iuser->pass, 0,0,0,0, "Select Pass"); uiButSetFunc(but, image_multi_cb, rr, iuser); MEM_freeN(strp); } -static void uiblock_layer_pass_arrow_buttons(uiBlock *block, RenderResult *rr, ImageUser *iuser, int imagechanged) +static void uiblock_layer_pass_arrow_buttons(uiLayout *layout, RenderResult *rr, ImageUser *iuser) { + uiBlock *block= uiLayoutGetBlock(layout); + uiLayout *row; uiBut *but; + row= uiLayoutRow(layout, 1); + if(rr==NULL || iuser==NULL) return; if(rr->layers.first==NULL) { - uiDefBut(block, LABEL, 0, "No Layers in Render Result,", 10, 107, 300, 20, NULL, 1, 0, 0, 0, ""); + uiItemL(row, "No Layers in Render Result.", 0); return; } - - uiBlockBeginAlign(block); /* decrease, increase arrows */ - but= uiDefIconBut(block, BUT, imagechanged, ICON_TRIA_LEFT, 10,107,17,20, NULL, 0, 0, 0, 0, "Previous Layer"); + but= uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0,0,17,20, NULL, 0, 0, 0, 0, "Previous Layer"); uiButSetFunc(but, image_multi_declay_cb, rr, iuser); - but= uiDefIconBut(block, BUT, imagechanged, ICON_TRIA_RIGHT, 27,107,18,20, NULL, 0, 0, 0, 0, "Next Layer"); + but= uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0,0,18,20, NULL, 0, 0, 0, 0, "Next Layer"); uiButSetFunc(but, image_multi_inclay_cb, rr, iuser); - uiblock_layer_pass_buttons(block, rr, iuser, imagechanged, 45, 107, 230); + uiblock_layer_pass_buttons(row, rr, iuser, 230); /* decrease, increase arrows */ - but= uiDefIconBut(block, BUT, imagechanged, ICON_TRIA_LEFT, 275,107,17,20, NULL, 0, 0, 0, 0, "Previous Pass"); + but= uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0,0,17,20, NULL, 0, 0, 0, 0, "Previous Pass"); uiButSetFunc(but, image_multi_decpass_cb, rr, iuser); - but= uiDefIconBut(block, BUT, imagechanged, ICON_TRIA_RIGHT, 292,107,18,20, NULL, 0, 0, 0, 0, "Next Pass"); + but= uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0,0,18,20, NULL, 0, 0, 0, 0, "Next Pass"); uiButSetFunc(but, image_multi_incpass_cb, rr, iuser); uiBlockEndAlign(block); - } // XXX HACK! -static int packdummy=0; +// static int packdummy=0; -/* The general Image panel with the loadsa callbacks! */ -void ED_image_uiblock_panel(const bContext *C, uiBlock *block, Image **ima_pp, ImageUser *iuser, - short redraw, short imagechanged) +typedef struct RNAUpdateCb { + PointerRNA ptr; + PropertyRNA *prop; + ImageUser *iuser; +} RNAUpdateCb; + +static void rna_update_cb(bContext *C, void *arg_cb, void *arg_unused) +{ + RNAUpdateCb *cb= (RNAUpdateCb*)arg_cb; + + /* ideally this would be done by RNA itself, but there we have + no image user available, so we just update this flag here */ + cb->iuser->ok= 1; + + /* we call update here on the pointer property, this way the + owner of the image pointer can still define it's own update + and notifier */ + RNA_property_update(C, &cb->ptr, cb->prop); +} + +void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname, PointerRNA *userptr, int compact) { + PropertyRNA *prop; + PointerRNA imaptr; + RNAUpdateCb *cb; + Image *ima; + ImageUser *iuser; + ImBuf *ibuf; Scene *scene= CTX_data_scene(C); - SpaceImage *sima= CTX_wm_space_image(C); - Image *ima= *ima_pp; + uiLayout *row, *split, *col; + uiBlock *block; uiBut *but; - char str[128], *strp; + char str[128]; + void *lock; + + if(!ptr->data) + return; - /* different stuff when we show viewer */ - if(ima && ima->source==IMA_SRC_VIEWER) { - ImBuf *ibuf= BKE_image_get_ibuf(ima, iuser); - - image_info(ima, ibuf, str); - uiDefBut(block, LABEL, 0, ima->id.name+2, 10, 180, 300, 20, NULL, 1, 0, 0, 0, ""); - uiDefBut(block, LABEL, 0, str, 10, 160, 300, 20, NULL, 1, 0, 0, 0, ""); - - if(ima->type==IMA_TYPE_COMPOSITE) { - iuser= ntree_get_active_iuser(scene->nodetree); - if(iuser) { - uiBlockBeginAlign(block); - uiDefIconTextBut(block, BUT, B_SIMA_RECORD, ICON_REC, "Record", 10,120,100,20, 0, 0, 0, 0, 0, ""); - uiDefIconTextBut(block, BUT, B_SIMA_PLAY, ICON_PLAY, "Play", 110,120,100,20, 0, 0, 0, 0, 0, ""); - but= uiDefBut(block, BUT, B_NOP, "Free Cache", 210,120,100,20, 0, 0, 0, 0, 0, ""); - uiButSetFunc(but, image_freecache_cb, ima, NULL); - - if(iuser->frames) - sprintf(str, "(%d) Frames:", iuser->framenr); - else strcpy(str, "Frames:"); - uiBlockBeginAlign(block); - uiDefButI(block, NUM, imagechanged, str, 10, 90,150, 20, &iuser->frames, 0.0, MAXFRAMEF, 0, 0, "Sets the number of images of a movie to use"); - uiDefButI(block, NUM, imagechanged, "StartFr:", 160,90,150,20, &iuser->sfra, 1.0, MAXFRAMEF, 0, 0, "Sets the global starting frame of the movie"); - } - } - else if(ima->type==IMA_TYPE_R_RESULT) { - /* browse layer/passes */ - uiblock_layer_pass_arrow_buttons(block, RE_GetResult(RE_GetRender(scene->id.name)), iuser, imagechanged); - } + prop= RNA_struct_find_property(ptr, propname); + if(!prop) { + printf("uiTemplateImage: property not found: %s\n", propname); return; } - - /* the main ima source types */ + + block= uiLayoutGetBlock(layout); + + imaptr= RNA_property_pointer_get(ptr, prop); + ima= imaptr.data; + iuser= userptr->data; + + cb= MEM_callocN(sizeof(RNAUpdateCb), "RNAUpdateCb"); + cb->ptr= *ptr; + cb->prop= prop; + cb->iuser= iuser; + + if(!compact) + uiTemplateID(layout, C, ptr, propname, "IMAGE_OT_new", "IMAGE_OT_open", NULL); + + // XXX missing: reload, pack + if(ima) { -// XXX uiSetButLock(ima->id.lib!=NULL, ERROR_LIBDATA_MESSAGE); - uiBlockBeginAlign(block); - uiBlockSetFunc(block, image_src_change_cb, ima, iuser); - uiDefButS(block, ROW, imagechanged, "Still", 0, 180, 105, 20, &ima->source, 0.0, IMA_SRC_FILE, 0, 0, "Single Image file"); - uiDefButS(block, ROW, imagechanged, "Movie", 105, 180, 105, 20, &ima->source, 0.0, IMA_SRC_MOVIE, 0, 0, "Movie file"); - uiDefButS(block, ROW, imagechanged, "Sequence", 210, 180, 105, 20, &ima->source, 0.0, IMA_SRC_SEQUENCE, 0, 0, "Multiple Image files, as a sequence"); - uiDefButS(block, ROW, imagechanged, "Generated", 315, 180, 105, 20, &ima->source, 0.0, IMA_SRC_GENERATED, 0, 0, "Generated Image"); - uiBlockSetFunc(block, NULL, NULL, NULL); - } - else - uiDefBut(block, LABEL, 0, " ", 0, 180, 440, 20, 0, 0, 0, 0, 0, ""); /* for align in panel */ + uiBlockSetNFunc(block, rna_update_cb, MEM_dupallocN(cb), NULL); + + if(ima->source == IMA_SRC_VIEWER) { + ibuf= BKE_image_acquire_ibuf(ima, iuser, &lock); + image_info(ima, ibuf, str); + BKE_image_release_ibuf(ima, lock); + + uiItemL(layout, ima->id.name+2, 0); + uiItemL(layout, str, 0); + + if(ima->type==IMA_TYPE_COMPOSITE) { + // XXX not working yet +#if 0 + iuser= ntree_get_active_iuser(scene->nodetree); + if(iuser) { + uiBlockBeginAlign(block); + uiDefIconTextBut(block, BUT, B_SIMA_RECORD, ICON_REC, "Record", 10,120,100,20, 0, 0, 0, 0, 0, ""); + uiDefIconTextBut(block, BUT, B_SIMA_PLAY, ICON_PLAY, "Play", 110,120,100,20, 0, 0, 0, 0, 0, ""); + but= uiDefBut(block, BUT, B_NOP, "Free Cache", 210,120,100,20, 0, 0, 0, 0, 0, ""); + uiButSetFunc(but, image_freecache_cb, ima, NULL); + + if(iuser->frames) + sprintf(str, "(%d) Frames:", iuser->framenr); + else strcpy(str, "Frames:"); + uiBlockBeginAlign(block); + uiDefButI(block, NUM, imagechanged, str, 10, 90,150, 20, &iuser->frames, 0.0, MAXFRAMEF, 0, 0, "Sets the number of images of a movie to use"); + uiDefButI(block, NUM, imagechanged, "StartFr:", 160,90,150,20, &iuser->sfra, 1.0, MAXFRAMEF, 0, 0, "Sets the global starting frame of the movie"); + } +#endif + } + else if(ima->type==IMA_TYPE_R_RESULT) { + /* browse layer/passes */ + Render *re= RE_GetRender(scene->id.name); + RenderResult *rr= RE_AcquireResultRead(re); + uiblock_layer_pass_arrow_buttons(layout, rr, iuser); + RE_ReleaseResult(re); + } + } + else { + row= uiLayoutRow(layout, 0); + uiItemR(row, NULL, 0, &imaptr, "source", (compact)? 0: UI_ITEM_R_EXPAND); + + if(ima->source != IMA_SRC_GENERATED) { + row= uiLayoutRow(layout, 0); + uiItemR(row, "", 0, &imaptr, "filename", 0); + //uiItemO(row, "Reload", 0, "image.reload"); + } + + // XXX what was this for? +#if 0 + /* check for re-render, only buttons */ + if(imagechanged==B_IMAGECHANGED) { + if(iuser->flag & IMA_ANIM_REFRESHED) { + iuser->flag &= ~IMA_ANIM_REFRESHED; + WM_event_add_notifier(C, NC_IMAGE, ima); + } + } +#endif + + /* multilayer? */ + if(ima->type==IMA_TYPE_MULTILAYER && ima->rr) { + uiblock_layer_pass_arrow_buttons(layout, ima->rr, iuser); + } + else if(ima->source != IMA_SRC_GENERATED) { + ibuf= BKE_image_acquire_ibuf(ima, iuser, &lock); + image_info(ima, ibuf, str); + BKE_image_release_ibuf(ima, lock); + uiItemL(layout, str, 0); + } + + if(ima->source != IMA_SRC_GENERATED) { + uiItemS(layout); + + split= uiLayoutSplit(layout, 0); + + col= uiLayoutColumn(split, 0); + uiItemR(col, NULL, 0, &imaptr, "fields", 0); + row= uiLayoutRow(col, 0); + uiItemR(row, NULL, 0, &imaptr, "field_order", UI_ITEM_R_EXPAND); + uiLayoutSetActive(row, RNA_boolean_get(&imaptr, "fields")); + + col= uiLayoutColumn(split, 0); + uiItemR(col, NULL, 0, &imaptr, "antialias", 0); + uiItemR(col, NULL, 0, &imaptr, "premultiply", 0); + } + + if(ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) { + uiItemS(layout); + + split= uiLayoutSplit(layout, 0); + + col= uiLayoutColumn(split, 0); - /* Browse */ - IMAnames_to_pupstring(&strp, NULL, NULL, &(CTX_data_main(C)->image), NULL, &iuser->menunr); - - uiBlockBeginAlign(block); - but= uiDefButS(block, MENU, imagechanged, strp, 0,155,40,20, &iuser->menunr, 0, 0, 0, 0, "Selects an existing Image or Movie"); - uiButSetFunc(but, image_browse_cb, ima_pp, iuser); - - MEM_freeN(strp); - - /* name + options, or only load */ - if(ima) { - int drawpack= (ima->source!=IMA_SRC_SEQUENCE && ima->source!=IMA_SRC_MOVIE && ima->ok); - - but= uiDefBut(block, TEX, B_IDNAME, "IM:", 40, 155, 220, 20, ima->id.name+2, 0.0, 21.0, 0, 0, "Current Image Datablock name."); - uiButSetFunc(but, test_idbutton_cb, ima->id.name, NULL); - but= uiDefBut(block, BUT, imagechanged, "Reload", 260, 155, 70, 20, NULL, 0, 0, 0, 0, "Reloads Image or Movie"); - uiButSetFunc(but, image_reload_cb, ima, iuser); - - but= uiDefIconBut(block, BUT, imagechanged, ICON_X, 330, 155, 40, 20, 0, 0, 0, 0, 0, "Unlink Image block"); - uiButSetFunc(but, image_unlink_cb, ima_pp, NULL); - sprintf(str, "%d", ima->id.us); - uiDefBut(block, BUT, B_NOP, str, 370, 155, 40, 20, 0, 0, 0, 0, 0, "Only displays number of users of Image block"); - uiBlockEndAlign(block); - - uiBlockBeginAlign(block); - but= uiDefIconBut(block, BUT, imagechanged, ICON_FILESEL, 0, 130, 40, 20, 0, 0, 0, 0, 0, "Open Fileselect to load new Image"); - uiButSetFunc(but, image_load_fs_cb, ima_pp, iuser); - but= uiDefBut(block, TEX, imagechanged, "", 40,130, 340+(drawpack?0:20),20, ima->name, 0.0, 239.0, 0, 0, "Image/Movie file name, change to load new"); - uiButSetFunc(but, image_load_cb, ima_pp, iuser); - uiBlockEndAlign(block); - - if(drawpack) { - if (ima->packedfile) packdummy = 1; - else packdummy = 0; - but= uiDefIconButBitI(block, TOG, 1, redraw, ICON_PACKAGE, 380, 130, 40, 20, &packdummy, 0, 0, 0, 0, "Toggles Packed status of this Image"); - uiButSetFunc(but, image_pack_cb, ima, iuser); - } - - } - else { - but= uiDefBut(block, BUT, imagechanged, "Load", 33, 155, 200,20, NULL, 0, 0, 0, 0, "Load new Image of Movie"); - uiButSetFunc(but, image_load_fs_cb, ima_pp, iuser); - } - uiBlockEndAlign(block); - - if(ima) { - ImBuf *ibuf= BKE_image_get_ibuf(ima, iuser); - - /* check for re-render, only buttons */ - if(imagechanged==B_IMAGECHANGED) { - if(iuser->flag & IMA_ANIM_REFRESHED) { - iuser->flag &= ~IMA_ANIM_REFRESHED; - WM_event_add_notifier(C, NC_IMAGE, ima); - } - } - - /* multilayer? */ - if(ima->type==IMA_TYPE_MULTILAYER && ima->rr) { - uiblock_layer_pass_arrow_buttons(block, ima->rr, iuser, imagechanged); - } - else { - image_info(ima, ibuf, str); - uiDefBut(block, LABEL, 0, str, 10, 112, 300, 20, NULL, 1, 0, 0, 0, ""); - } - - /* exception, let's do because we only use this panel 3 times in blender... but not real good code! */ - if( (paint_facesel_test(CTX_data_active_object(C))) && sima && &sima->iuser==iuser) - return; - /* left side default per-image options, right half the additional options */ - - /* fields */ - - but= uiDefButBitS(block, TOGBUT, IMA_FIELDS, imagechanged, "Fields", 0, 80, 200, 20, &ima->flag, 0, 0, 0, 0, "Click to enable use of fields in Image"); - uiButSetFunc(but, image_field_test, ima, iuser); - uiDefButBitS(block, TOGBUT, IMA_STD_FIELD, B_NOP, "Odd", 0, 55, 200, 20, &ima->flag, 0, 0, 0, 0, "Standard Field Toggle"); - - - uiBlockSetFunc(block, image_reload_cb, ima, iuser); - uiDefButBitS(block, TOGBUT, IMA_ANTIALI, B_NOP, "Anti", 0, 5, 200, 20, &ima->flag, 0, 0, 0, 0, "Toggles Image anti-aliasing, only works with solid colors"); - uiDefButBitS(block, TOGBUT, IMA_DO_PREMUL, imagechanged, "Premul", 0, -20, 200, 20, &ima->flag, 0, 0, 0, 0, "Toggles premultiplying alpha"); - - - if( ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) { - sprintf(str, "(%d) Frames:", iuser->framenr); - - //uiBlockBeginAlign(block); - uiBlockSetFunc(block, image_user_change, iuser, NULL); - - if(ima->anim) { - uiBlockBeginAlign(block); - uiDefButI(block, NUM, imagechanged, str, 220, 80, 160, 20, &iuser->frames, 0.0, MAXFRAMEF, 0, 0, "Sets the number of images of a movie to use"); - but= uiDefBut(block, BUT, redraw, "<", 380, 80, 40, 20, 0, 0, 0, 0, 0, "Copies number of frames in movie file to Frames: button"); - uiButSetFunc(but, set_frames_cb, ima, iuser); - uiBlockEndAlign(block); - } - else - uiDefButI(block, NUM, imagechanged, str, 220, 80, 200, 20, &iuser->frames, 0.0, MAXFRAMEF, 0, 0, "Sets the number of images of a movie to use"); - - uiDefButI(block, NUM, imagechanged, "Start Frame:", 220, 55, 200, 20, &iuser->sfra, 1.0, MAXFRAMEF, 0, 0, "Sets the global starting frame of the movie"); - uiDefButI(block, NUM, imagechanged, "Offset:", 220, 30, 200, 20, &iuser->offset, -MAXFRAMEF, MAXFRAMEF, 0, 0, "Offsets the number of the frame to use in the animation"); - uiDefButS(block, NUM, imagechanged, "Fields:", 0, 30, 200, 20, &iuser->fie_ima, 1.0, 200.0, 0, 0, "The number of fields per rendered frame (2 fields is 1 image)"); - - uiDefButBitS(block, TOG, IMA_ANIM_ALWAYS, B_NOP, "Auto Refresh", 220, 5, 200, 20, &iuser->flag, 0, 0, 0, 0, "Always refresh Image on frame changes"); - - uiDefButS(block, TOG, imagechanged, "Cyclic", 220, -20, 200, 20, &iuser->cycl, 0.0, 1.0, 0, 0, "Cycle the images in the movie"); - - uiBlockSetFunc(block, NULL, iuser, NULL); - } - else if(ima->source==IMA_SRC_GENERATED) { - - uiDefBut(block, LABEL, 0, "Size:", 220, 80, 200, 20, 0, 0, 0, 0, 0, ""); - - uiBlockBeginAlign(block); - uiBlockSetFunc(block, image_generated_change_cb, ima, iuser); - uiDefButS(block, NUM, imagechanged, "X:", 220, 55,200,20, &ima->gen_x, 1.0, 5000.0, 0, 0, "Image size x"); - uiDefButS(block, NUM, imagechanged, "Y:", 220, 35,200,20, &ima->gen_y, 1.0, 5000.0, 0, 0, "Image size y"); - uiBlockEndAlign(block); - - uiDefButS(block, TOGBUT, imagechanged, "UV Test grid", 220,10,200,20, &ima->gen_type, 0.0, 1.0, 0, 0, ""); - uiBlockSetFunc(block, NULL, NULL, NULL); - } - } - uiBlockEndAlign(block); -} + sprintf(str, "(%d) Frames", iuser->framenr); + row= uiLayoutRow(col, 1); + uiItemR(col, str, 0, userptr, "frames", 0); + if(ima->anim) { + block= uiLayoutGetBlock(row); + but= uiDefBut(block, BUT, 0, "<", 0, 0, UI_UNIT_X*2, UI_UNIT_Y, 0, 0, 0, 0, 0, "Set the number of frames from the movie or sequence."); + uiButSetFunc(but, set_frames_cb, ima, iuser); + } + + uiItemR(col, "Start", 0, userptr, "start_frame", 0); + uiItemR(col, NULL, 0, userptr, "offset", 0); + + col= uiLayoutColumn(split, 0); + uiItemR(col, "Fields", 0, userptr, "fields_per_frame", 0); + uiItemR(col, NULL, 0, userptr, "auto_refresh", 0); + uiItemR(col, NULL, 0, userptr, "cyclic", 0); + } + else if(ima->source==IMA_SRC_GENERATED) { + split= uiLayoutSplit(layout, 0); + + col= uiLayoutColumn(split, 1); + uiItemR(col, "X", 0, &imaptr, "generated_width", 0); + uiItemR(col, "Y", 0, &imaptr, "generated_height", 0); + + col= uiLayoutColumn(split, 0); + uiItemR(col, NULL, 0, &imaptr, "generated_type", UI_ITEM_R_EXPAND); + } + + } + + uiBlockSetNFunc(block, NULL, NULL, NULL); + } + + MEM_freeN(cb); +} void uiTemplateImageLayers(uiLayout *layout, bContext *C, Image *ima, ImageUser *iuser) { - uiBlock *block= uiLayoutFreeBlock(layout); Scene *scene= CTX_data_scene(C); RenderResult *rr; /* render layers and passes */ if(ima && iuser) { - rr= BKE_image_get_renderresult(scene, ima); + rr= BKE_image_acquire_renderresult(scene, ima); - if(rr) { - uiBlockBeginAlign(block); - uiblock_layer_pass_buttons(block, rr, iuser, 0, 0, 0, 160); - uiBlockEndAlign(block); - } + if(rr) + uiblock_layer_pass_buttons(layout, rr, iuser, 160); + + BKE_image_release_renderresult(scene, ima); } } -static void image_panel_properties(const bContext *C, Panel *pa) +static int image_panel_uv_poll(const bContext *C, PanelType *pt) { - SpaceImage *sima= CTX_wm_space_image(C); + Object *obedit= CTX_data_edit_object(C); + return ED_uvedit_test(obedit); +} + +static void image_panel_uv(const bContext *C, Panel *pa) +{ + ARegion *ar= CTX_wm_region(C); uiBlock *block; 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); + image_editcursor_buts(C, &ar->v2d, block); } void image_buttons_register(ARegionType *art) { 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 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; + pt= MEM_callocN(sizeof(PanelType), "spacetype image panel uv"); + strcpy(pt->idname, "IMAGE_PT_uv"); + strcpy(pt->label, "UV"); + pt->draw= image_panel_uv; + pt->poll= image_panel_uv_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; + pt->poll= image_panel_poll; + pt->flag |= PNL_DEFAULT_CLOSED; BLI_addtail(&art->paneltypes, pt); pt= MEM_callocN(sizeof(PanelType), "spacetype image panel gpencil"); @@ -1452,13 +1143,9 @@ static int image_properties(bContext *C, wmOperator *op) ScrArea *sa= CTX_wm_area(C); ARegion *ar= image_has_buttons_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); - } + if(ar) + ED_region_toggle_hidden(C, ar); + return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index cf9bac1ebee..a42fec30c45 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -533,15 +533,18 @@ void draw_image_grease_pencil(bContext *C, short onlyv2d) if (onlyv2d) { /* assume that UI_view2d_ortho(C) has been called... */ SpaceImage *sima= (SpaceImage *)CTX_wm_space_data(C); - ImBuf *ibuf= ED_space_image_buffer(sima); + void *lock; + ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock); /* draw grease-pencil ('image' strokes) */ //if (sima->flag & SI_DISPGP) draw_gpencil_2dimage(C, ibuf); + + ED_space_image_release_buffer(sima, lock); } else { /* assume that UI_view2d_restore(C) has been called... */ - SpaceImage *sima= (SpaceImage *)CTX_wm_space_data(C); + //SpaceImage *sima= (SpaceImage *)CTX_wm_space_data(C); /* draw grease-pencil ('screen' strokes) */ //if (sima->flag & SI_DISPGP) @@ -654,6 +657,7 @@ void draw_image_main(SpaceImage *sima, ARegion *ar, Scene *scene) ImBuf *ibuf; float zoomx, zoomy; int show_viewer, show_render; + void *lock; /* XXX can we do this in refresh? */ #if 0 @@ -675,11 +679,9 @@ void draw_image_main(SpaceImage *sima, ARegion *ar, Scene *scene) } #endif - /* put scene context variable in iuser */ - sima->iuser.scene= scene; /* retrieve the image and information about it */ ima= ED_space_image(sima); - ibuf= ED_space_image_buffer(sima); + ibuf= ED_space_image_acquire_buffer(sima, &lock); ED_space_image_zoom(sima, ar, &zoomx, &zoomy); show_viewer= (ima && ima->source == IMA_SRC_VIEWER); @@ -718,5 +720,7 @@ void draw_image_main(SpaceImage *sima, ARegion *ar, Scene *scene) } } #endif + + ED_space_image_release_buffer(sima, lock); } diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index bee06e6892f..89427ba8535 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -112,7 +112,7 @@ static int space_image_poll(bContext *C) { SpaceImage *sima= CTX_wm_space_image(C); if(sima && sima->spacetype==SPACE_IMAGE) - if(ED_space_image_buffer(sima)) + if(ED_space_image_has_buffer(sima)) return 1; return 0; } @@ -121,10 +121,15 @@ static int space_image_file_exists_poll(bContext *C) { if(space_image_poll(C)) { SpaceImage *sima= CTX_wm_space_image(C); - ImBuf *ibuf= ED_space_image_buffer(sima); + ImBuf *ibuf; + void *lock; + int poll; - if(ibuf && BLI_exists(ibuf->name) && BLI_is_writable(ibuf->name)) - return 1; + ibuf= ED_space_image_acquire_buffer(sima, &lock); + poll= (ibuf && BLI_exists(ibuf->name) && BLI_is_writable(ibuf->name)); + ED_space_image_release_buffer(sima, lock); + + return poll; } return 0; } @@ -161,7 +166,7 @@ static void view_pan_init(bContext *C, wmOperator *op, wmEvent *event) vpd->xof= sima->xof; vpd->yof= sima->yof; - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); } static void view_pan_exit(bContext *C, wmOperator *op, int cancel) @@ -224,7 +229,7 @@ static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event) view_pan_exec(C, op); break; case MIDDLEMOUSE: - if(event->val==0) { + if(event->val==KM_RELEASE) { view_pan_exit(C, op, 0); return OPERATOR_FINISHED; } @@ -280,7 +285,7 @@ static void view_zoom_init(bContext *C, wmOperator *op, wmEvent *event) vpd->y= event->y; vpd->zoom= sima->zoom; - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); } static void view_zoom_exit(bContext *C, wmOperator *op, int cancel) @@ -339,7 +344,7 @@ static int view_zoom_modal(bContext *C, wmOperator *op, wmEvent *event) ED_area_tag_redraw(CTX_wm_area(C)); break; case MIDDLEMOUSE: - if(event->val==0) { + if(event->val==KM_RELEASE) { view_zoom_exit(C, op, 0); return OPERATOR_FINISHED; } @@ -388,7 +393,6 @@ static int view_all_exec(bContext *C, wmOperator *op) ARegion *ar; Scene *scene; Object *obedit; - ImBuf *ibuf; float aspx, aspy, zoomx, zoomy, w, h; int width, height; @@ -398,7 +402,6 @@ static int view_all_exec(bContext *C, wmOperator *op) scene= (Scene*)CTX_data_scene(C); obedit= CTX_data_edit_object(C); - ibuf= ED_space_image_buffer(sima); ED_space_image_size(sima, &width, &height); ED_space_image_aspect(sima, &aspx, &aspy); @@ -445,7 +448,6 @@ static int view_selected_exec(bContext *C, wmOperator *op) Scene *scene; Object *obedit; Image *ima; - ImBuf *ibuf; float size, min[2], max[2], d[2]; int width, height; @@ -456,7 +458,6 @@ static int view_selected_exec(bContext *C, wmOperator *op) obedit= CTX_data_edit_object(C); ima= ED_space_image(sima); - ibuf= ED_space_image_buffer(sima); ED_space_image_size(sima, &width, &height); /* get bounds */ @@ -609,7 +610,7 @@ static const EnumPropertyItem image_file_type_items[] = { static void image_filesel(bContext *C, wmOperator *op, const char *path) { - RNA_string_set(op->ptr, "filename", path); + RNA_string_set(op->ptr, "path", path); WM_event_add_fileselect(C, op); } @@ -623,14 +624,19 @@ static int open_exec(bContext *C, wmOperator *op) Image *ima= NULL; char str[FILE_MAX]; - RNA_string_get(op->ptr, "filename", str); + RNA_string_get(op->ptr, "path", str); ima= BKE_add_image_file(str, scene->r.cfra); if(!ima) return OPERATOR_CANCELLED; + + /* already set later */ + ima->id.us--; - BKE_image_signal(ima, &sima->iuser, IMA_SIGNAL_RELOAD); - ED_space_image_set(C, sima, scene, obedit, ima); + // XXX other users? + BKE_image_signal(ima, (sima)? &sima->iuser: NULL, IMA_SIGNAL_RELOAD); + if(sima) + ED_space_image_set(C, sima, scene, obedit, ima); return OPERATOR_FINISHED; } @@ -638,9 +644,9 @@ static int open_exec(bContext *C, wmOperator *op) static int open_invoke(bContext *C, wmOperator *op, wmEvent *event) { SpaceImage *sima= CTX_wm_space_image(C); - char *path= (sima->image)? sima->image->name: U.textudir; + char *path= (sima && sima->image)? sima->image->name: U.textudir; - if(RNA_property_is_set(op->ptr, "filename")) + if(RNA_property_is_set(op->ptr, "path")) return open_exec(C, op); image_filesel(C, op, path); @@ -651,19 +657,18 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *event) void IMAGE_OT_open(wmOperatorType *ot) { /* identifiers */ - ot->name= "Open Image"; + ot->name= "Open"; ot->idname= "IMAGE_OT_open"; /* api callbacks */ ot->exec= open_exec; ot->invoke= open_invoke; - ot->poll= ED_operator_image_active; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE); + WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL); } /******************** replace image operator ********************/ @@ -676,7 +681,7 @@ static int replace_exec(bContext *C, wmOperator *op) if(!sima->image) return OPERATOR_CANCELLED; - RNA_string_get(op->ptr, "filename", str); + RNA_string_get(op->ptr, "path", str); BLI_strncpy(sima->image->name, str, sizeof(sima->image->name)-1); /* we cant do much if the str is longer then 240 :/ */ BKE_image_signal(sima->image, &sima->iuser, IMA_SIGNAL_RELOAD); @@ -693,7 +698,7 @@ static int replace_invoke(bContext *C, wmOperator *op, wmEvent *event) if(!sima->image) return OPERATOR_CANCELLED; - if(RNA_property_is_set(op->ptr, "filename")) + if(RNA_property_is_set(op->ptr, "path")) return replace_exec(C, op); image_filesel(C, op, path); @@ -716,7 +721,7 @@ void IMAGE_OT_replace(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE); + WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL); } /******************** save image as operator ********************/ @@ -726,7 +731,8 @@ void IMAGE_OT_replace(wmOperatorType *ot) static void save_image_doit(bContext *C, SpaceImage *sima, Scene *scene, wmOperator *op, char *name) { Image *ima= ED_space_image(sima); - ImBuf *ibuf= ED_space_image_buffer(sima); + void *lock; + ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock); int len; if (ibuf) { @@ -747,7 +753,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, Scene *scene, wmOpera WM_cursor_wait(1); if(sima->imtypenr==R_MULTILAYER) { - RenderResult *rr= BKE_image_get_renderresult(scene, ima); + RenderResult *rr= BKE_image_acquire_renderresult(scene, ima); if(rr) { RE_WriteRenderResult(rr, name, scene->r.quality); @@ -761,6 +767,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, Scene *scene, wmOpera } else BKE_report(op->reports, RPT_ERROR, "Did not write, no Multilayer Image"); + BKE_image_release_renderresult(scene, ima); } else if (BKE_write_ibuf(scene, ibuf, name, sima->imtypenr, scene->r.subimtype, scene->r.quality)) { BLI_strncpy(ima->name, name, sizeof(ima->name)); @@ -788,6 +795,8 @@ static void save_image_doit(bContext *C, SpaceImage *sima, Scene *scene, wmOpera WM_cursor_wait(0); } + + ED_space_image_release_buffer(sima, lock); } static int save_as_exec(bContext *C, wmOperator *op) @@ -801,7 +810,7 @@ static int save_as_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; sima->imtypenr= RNA_enum_get(op->ptr, "file_type"); - RNA_string_get(op->ptr, "filename", str); + RNA_string_get(op->ptr, "path", str); save_image_doit(C, sima, scene, op, str); @@ -812,16 +821,19 @@ static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *event) { SpaceImage *sima= CTX_wm_space_image(C); Image *ima = ED_space_image(sima); - ImBuf *ibuf= ED_space_image_buffer(sima); Scene *scene= CTX_data_scene(C); + ImBuf *ibuf; + void *lock; - if(RNA_property_is_set(op->ptr, "filename")) + if(RNA_property_is_set(op->ptr, "path")) return save_as_exec(C, op); if(!ima) return OPERATOR_CANCELLED; /* always opens fileselect */ + ibuf= ED_space_image_acquire_buffer(sima, &lock); + if(ibuf) { /* cant save multilayer sequence, ima->rr isn't valid for a specific frame */ if(ima->rr && !(ima->source==IMA_SRC_SEQUENCE && ima->type==IMA_TYPE_MULTILAYER)) @@ -838,10 +850,14 @@ static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *event) // XXX note: we can give default menu enums to operator for this image_filesel(C, op, ibuf->name); + + ED_space_image_release_buffer(sima, lock); return OPERATOR_RUNNING_MODAL; } + ED_space_image_release_buffer(sima, lock); + return OPERATOR_CANCELLED; } @@ -861,7 +877,7 @@ void IMAGE_OT_save_as(wmOperatorType *ot) /* properties */ RNA_def_enum(ot->srna, "file_type", image_file_type_items, R_PNG, "File Type", "File type to save image as."); - WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE); + WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL); } /******************** save image operator ********************/ @@ -870,12 +886,16 @@ static int save_exec(bContext *C, wmOperator *op) { SpaceImage *sima= CTX_wm_space_image(C); Image *ima = ED_space_image(sima); - ImBuf *ibuf= ED_space_image_buffer(sima); + void *lock; + ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock); Scene *scene= CTX_data_scene(C); + RenderResult *rr; char name[FILE_MAX]; - if(!ima || !ibuf) + if(!ima || !ibuf) { + ED_space_image_release_buffer(sima, lock); return OPERATOR_CANCELLED; + } /* if exists, saves over without fileselect */ @@ -884,14 +904,21 @@ static int save_exec(bContext *C, wmOperator *op) BLI_strncpy(name, G.ima, FILE_MAX); if(BLI_exists(name) && BLI_is_writable(name)) { - if(BKE_image_get_renderresult(scene, ima)) + rr= BKE_image_acquire_renderresult(scene, ima); + + if(rr) sima->imtypenr= R_MULTILAYER; else sima->imtypenr= BKE_ftype_to_imtype(ibuf->ftype); + + BKE_image_release_renderresult(scene, ima); + ED_space_image_release_buffer(sima, lock); save_image_doit(C, sima, scene, op, name); } else { + ED_space_image_release_buffer(sima, lock); + BKE_report(op->reports, RPT_ERROR, "Can not save image."); return OPERATOR_CANCELLED; } @@ -1051,8 +1078,12 @@ static int new_exec(bContext *C, wmOperator *op) color[3]= RNA_float_get(op->ptr, "alpha"); ima = BKE_add_image_size(width, height, name, floatbuf, uvtestgrid, color); - BKE_image_signal(sima->image, &sima->iuser, IMA_SIGNAL_USER_NEW_IMAGE); - ED_space_image_set(C, sima, scene, obedit, ima); + ima->id.us--; /* already set later */ + + if(sima) { // XXX other users? + BKE_image_signal(sima->image, &sima->iuser, IMA_SIGNAL_USER_NEW_IMAGE); + ED_space_image_set(C, sima, scene, obedit, ima); + } return OPERATOR_FINISHED; } @@ -1066,7 +1097,6 @@ void IMAGE_OT_new(wmOperatorType *ot) /* api callbacks */ ot->exec= new_exec; ot->invoke= WM_operator_props_popup; - ot->poll= ED_operator_image_active; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1103,9 +1133,8 @@ static int pack_test(bContext *C, wmOperator *op) static int pack_exec(bContext *C, wmOperator *op) { - SpaceImage *sima= CTX_wm_space_image(C); - Image *ima= ED_space_image(sima); - ImBuf *ibuf= ED_space_image_buffer(sima); + Image *ima= CTX_data_edit_image(C); + ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL); int as_png= RNA_boolean_get(op->ptr, "as_png"); if(!pack_test(C, op)) @@ -1126,8 +1155,8 @@ static int pack_exec(bContext *C, wmOperator *op) static int pack_invoke(bContext *C, wmOperator *op, wmEvent *event) { - SpaceImage *sima= CTX_wm_space_image(C); - ImBuf *ibuf= ED_space_image_buffer(sima); + Image *ima= CTX_data_edit_image(C); + ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL); uiPopupMenu *pup; uiLayout *layout; int as_png= RNA_boolean_get(op->ptr, "as_png"); @@ -1287,6 +1316,7 @@ typedef struct ImageSampleInfo { ARegionType *art; void *draw_handle; int x, y; + int channels; char col[4]; float colf[4]; @@ -1303,14 +1333,9 @@ typedef struct ImageSampleInfo { static void sample_draw(const bContext *C, ARegion *ar, void *arg_info) { - SpaceImage *sima= CTX_wm_space_image(C); - ImBuf *ibuf= ED_space_image_buffer(sima); ImageSampleInfo *info= arg_info; - if(ibuf == NULL) - return; - - draw_image_info(ar, ibuf->channels, info->x, info->y, info->colp, + draw_image_info(ar, info->channels, info->x, info->y, info->colp, info->colfp, info->zp, info->zfp); } @@ -1318,13 +1343,16 @@ static void sample_apply(bContext *C, wmOperator *op, wmEvent *event) { SpaceImage *sima= CTX_wm_space_image(C); ARegion *ar= CTX_wm_region(C); - ImBuf *ibuf= ED_space_image_buffer(sima); + void *lock; + ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock); ImageSampleInfo *info= op->customdata; float fx, fy; int x, y; - if(ibuf == NULL) + if(ibuf == NULL) { + ED_space_image_release_buffer(sima, lock); return; + } x= event->x - ar->winrct.xmin; y= event->y - ar->winrct.ymin; @@ -1341,6 +1369,7 @@ static void sample_apply(bContext *C, wmOperator *op, wmEvent *event) info->x= x; info->y= y; info->draw= 1; + info->channels= ibuf->channels; info->colp= NULL; info->colfp= NULL; @@ -1417,6 +1446,7 @@ static void sample_apply(bContext *C, wmOperator *op, wmEvent *event) else info->draw= 0; + ED_space_image_release_buffer(sima, lock); ED_area_tag_redraw(CTX_wm_area(C)); } @@ -1433,10 +1463,9 @@ static int sample_invoke(bContext *C, wmOperator *op, wmEvent *event) { SpaceImage *sima= CTX_wm_space_image(C); ARegion *ar= CTX_wm_region(C); - ImBuf *ibuf= ED_space_image_buffer(sima); ImageSampleInfo *info; - if(ibuf == NULL) + if(!ED_space_image_has_buffer(sima)) return OPERATOR_CANCELLED; info= MEM_callocN(sizeof(ImageSampleInfo), "ImageSampleInfo"); @@ -1446,7 +1475,7 @@ static int sample_invoke(bContext *C, wmOperator *op, wmEvent *event) sample_apply(C, op, event); - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } @@ -1614,7 +1643,7 @@ static int record_composite_invoke(bContext *C, wmOperator *op, wmEvent *event) rcd= op->customdata; rcd->timer= WM_event_add_window_timer(CTX_wm_window(C), TIMER, 0.0f); - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); if(!record_composite_apply(C, op)) return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index c57bc5773b0..4cf59c9a28e 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -204,7 +204,7 @@ void image_operatortypes(void) void image_keymap(struct wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "Image Generic", SPACE_IMAGE, 0); + wmKeyMap *keymap= WM_keymap_find(wm, "Image Generic", SPACE_IMAGE, 0); WM_keymap_add_item(keymap, "IMAGE_OT_new", NKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "IMAGE_OT_open", OKEY, KM_PRESS, KM_ALT, 0); @@ -212,7 +212,7 @@ void image_keymap(struct wmWindowManager *wm) WM_keymap_add_item(keymap, "IMAGE_OT_save", SKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "IMAGE_OT_properties", NKEY, KM_PRESS, 0, 0); - keymap= WM_keymap_listbase(wm, "Image", SPACE_IMAGE, 0); + keymap= WM_keymap_find(wm, "Image", SPACE_IMAGE, 0); WM_keymap_add_item(keymap, "IMAGE_OT_view_all", HOMEKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "IMAGE_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0); @@ -232,9 +232,9 @@ void image_keymap(struct wmWindowManager *wm) RNA_float_set(WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_ratio", PAD4, KM_PRESS, 0, 0)->ptr, "ratio", 0.25f); RNA_float_set(WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_ratio", PAD8, KM_PRESS, 0, 0)->ptr, "ratio", 0.125f); - WM_keymap_add_item(keymap, "PAINT_OT_image_paint", ACTIONMOUSE, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "PAINT_OT_grab_clone", SELECTMOUSE, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "PAINT_OT_sample_color", SELECTMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "PAINT_OT_image_paint", LEFTMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "PAINT_OT_grab_clone", RIGHTMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "PAINT_OT_sample_color", RIGHTMOUSE, KM_PRESS, 0, 0); RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_image_paint_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE); RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_image_paint_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH); @@ -328,7 +328,7 @@ static int image_context(const bContext *C, const char *member, bContextDataResu /************************** main region ***************************/ /* sets up the fields of the View2D from zoom and offset */ -static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar, Scene *scene) +static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar) { Image *ima= ED_space_image(sima); float x1, y1, w, h; @@ -336,24 +336,9 @@ static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar, Scene *sce #if 0 if(image_preview_active(curarea, &width, &height)); -#endif - if(sima->image) { - ImBuf *ibuf= ED_space_image_buffer(sima); - - if(ibuf) { - width= ibuf->x; - height= ibuf->y; - } - else if(sima->image->type==IMA_TYPE_R_RESULT) { - /* not very important, just nice */ - width= (scene->r.xsch*scene->r.size)/100; - height= (scene->r.ysch*scene->r.size)/100; - } - else - ED_space_image_size(sima, &width, &height); - } else - ED_space_image_size(sima, &width, &height); +#endif + ED_space_image_size(sima, &width, &height); w= width; h= height; @@ -374,8 +359,8 @@ static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar, Scene *sce ar->v2d.mask.ymax= winy; /* which part of the image space do we see? */ - x1= ar->winrct.xmin+(winx-sima->zoom*w)/2; - y1= ar->winrct.ymin+(winy-sima->zoom*h)/2; + x1= ar->winrct.xmin+(winx-sima->zoom*w)/2.0f; + y1= ar->winrct.ymin+(winy-sima->zoom*h)/2.0f; x1-= sima->zoom*sima->xof; y1-= sima->zoom*sima->yof; @@ -398,23 +383,22 @@ static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar, Scene *sce /* add handlers, stuff you only do once or on area/region changes */ static void image_main_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; // image space manages own v2d // UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_STANDARD, ar->winx, ar->winy); /* image paint polls for mode */ - keymap= WM_keymap_listbase(wm, "ImagePaint", SPACE_IMAGE, 0); + keymap= WM_keymap_find(wm, "Image Paint", SPACE_IMAGE, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); - /* XXX need context here? - keymap= WM_keymap_listbase(wm, "UVEdit", 0, 0); - WM_event_add_keymap_handler(&ar->handlers, keymap);*/ + keymap= WM_keymap_find(wm, "UVEdit", 0, 0); + WM_event_add_keymap_handler(&ar->handlers, keymap); /* own keymaps */ - keymap= WM_keymap_listbase(wm, "Image Generic", SPACE_IMAGE, 0); + keymap= WM_keymap_find(wm, "Image Generic", SPACE_IMAGE, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); - keymap= WM_keymap_listbase(wm, "Image", SPACE_IMAGE, 0); + keymap= WM_keymap_find(wm, "Image", SPACE_IMAGE, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } @@ -432,20 +416,25 @@ static void image_main_area_draw(const bContext *C, ARegion *ar) UI_GetThemeColor3fv(TH_BACK, col); glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); - + + /* put scene context variable in iuser */ + sima->iuser.scene= scene; + /* we set view2d from own zoom and offset each time */ - image_main_area_set_view2d(sima, ar, scene); + image_main_area_set_view2d(sima, ar); /* we draw image in pixelspace */ draw_image_main(sima, ar, scene); /* and uvs in 0.0-1.0 space */ UI_view2d_view_ortho(C, v2d); - draw_uvedit_main(sima, ar, scene, obedit); - ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST); + draw_uvedit_main(sima, ar, scene, obedit); + + ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST); - /* Grease Pencil too (in addition to UV's) */ - draw_image_grease_pencil((bContext *)C, 1); + /* Grease Pencil too (in addition to UV's) */ + draw_image_grease_pencil((bContext *)C, 1); + UI_view2d_view_restore(C); /* draw Grease Pencil - screen space only */ @@ -457,29 +446,11 @@ static void image_main_area_draw(const bContext *C, ARegion *ar) UI_view2d_scrollers_free(scrollers);*/ } -static void image_modal_keymaps(wmWindowManager *wm, ARegion *ar, int stype) -{ - ListBase *keymap; - - keymap= WM_keymap_listbase(wm, "UVEdit", 0, 0); - - if(stype==NS_EDITMODE_MESH) - WM_event_add_keymap_handler(&ar->handlers, keymap); - else - WM_event_remove_keymap_handler(&ar->handlers, keymap); -} - static void image_main_area_listener(ARegion *ar, wmNotifier *wmn) { /* context changes */ switch(wmn->category) { - case NC_SCENE: - switch(wmn->data) { - case ND_MODE: - image_modal_keymaps(wmn->wm, ar, wmn->subtype); - break; - } - break; + /* nothing yet */ } } @@ -488,11 +459,11 @@ static void image_main_area_listener(ARegion *ar, wmNotifier *wmn) /* add handlers, stuff you only do once or on area/region changes */ static void image_buttons_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; ED_region_panels_init(wm, ar); - keymap= WM_keymap_listbase(wm, "Image Generic", SPACE_IMAGE, 0); + keymap= WM_keymap_find(wm, "Image Generic", SPACE_IMAGE, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); } @@ -505,7 +476,10 @@ static void image_buttons_area_listener(ARegion *ar, wmNotifier *wmn) { /* context changes */ switch(wmn->category) { - + case NC_BRUSH: + if(wmn->action==NA_EDITED) + ED_region_tag_redraw(ar); + break; } } @@ -635,17 +609,17 @@ void ED_space_image_set(bContext *C, SpaceImage *sima, Scene *scene, Object *obe } } -ImBuf *ED_space_image_buffer(SpaceImage *sima) +ImBuf *ED_space_image_acquire_buffer(SpaceImage *sima, void **lock_r) { ImBuf *ibuf; - if(sima->image) { + if(sima && sima->image) { #if 0 if(sima->image->type==IMA_TYPE_R_RESULT && BIF_show_render_spare()) return BIF_render_spare_imbuf(); else #endif - ibuf= BKE_image_get_ibuf(sima->image, &sima->iuser); + ibuf= BKE_image_acquire_ibuf(sima->image, &sima->iuser, lock_r); if(ibuf && (ibuf->rect || ibuf->rect_float)) return ibuf; @@ -654,11 +628,32 @@ ImBuf *ED_space_image_buffer(SpaceImage *sima) return NULL; } -void ED_image_size(Image *ima, int *width, int *height) +void ED_space_image_release_buffer(SpaceImage *sima, void *lock) +{ + if(sima && sima->image) + BKE_image_release_ibuf(sima->image, lock); +} + +int ED_space_image_has_buffer(SpaceImage *sima) { ImBuf *ibuf; + void *lock; + int has_buffer; - ibuf= (ima)? BKE_image_get_ibuf(ima, NULL): NULL; + ibuf= ED_space_image_acquire_buffer(sima, &lock); + has_buffer= (ibuf != NULL); + ED_space_image_release_buffer(sima, lock); + + return has_buffer; +} + +void ED_image_size(Image *ima, int *width, int *height) +{ + ImBuf *ibuf= NULL; + void *lock; + + if(ima) + ibuf= BKE_image_acquire_ibuf(ima, NULL, &lock); if(ibuf && ibuf->x > 0 && ibuf->y > 0) { *width= ibuf->x; @@ -668,24 +663,36 @@ void ED_image_size(Image *ima, int *width, int *height) *width= 256; *height= 256; } + + if(ima) + BKE_image_release_ibuf(ima, lock); } void ED_space_image_size(SpaceImage *sima, int *width, int *height) { + Scene *scene= sima->iuser.scene; ImBuf *ibuf; + void *lock; - ibuf= ED_space_image_buffer(sima); + ibuf= ED_space_image_acquire_buffer(sima, &lock); if(ibuf && ibuf->x > 0 && ibuf->y > 0) { *width= ibuf->x; *height= ibuf->y; } + else if(sima->image && sima->image->type==IMA_TYPE_R_RESULT && scene) { + /* not very important, just nice */ + *width= (scene->r.xsch*scene->r.size)/100; + *height= (scene->r.ysch*scene->r.size)/100; + } /* I know a bit weak... but preview uses not actual image size */ // XXX else if(image_preview_active(sima, width, height)); else { *width= 256; *height= 256; } + + ED_space_image_release_buffer(sima, lock); } void ED_image_aspect(Image *ima, float *aspx, float *aspy) diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c index 640c968742c..f4d8682b8ea 100644 --- a/source/blender/editors/space_info/info_ops.c +++ b/source/blender/editors/space_info/info_ops.c @@ -300,11 +300,11 @@ void FILE_OT_report_missing_files(wmOperatorType *ot) static int find_missing_files_exec(bContext *C, wmOperator *op) { - char *filename; + char *path; - filename= RNA_string_get_alloc(op->ptr, "filename", NULL, 0); - findMissingFiles(filename); - MEM_freeN(filename); + path= RNA_string_get_alloc(op->ptr, "path", NULL, 0); + findMissingFiles(path); + MEM_freeN(path); return OPERATOR_FINISHED; } @@ -330,7 +330,7 @@ void FILE_OT_find_missing_files(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - WM_operator_properties_filesel(ot, 0); + WM_operator_properties_filesel(ot, 0, FILE_SPECIAL); } #if 0 diff --git a/source/blender/editors/space_logic/logic_buttons.c b/source/blender/editors/space_logic/logic_buttons.c index 58c1eddb6c1..304c3601cdd 100644 --- a/source/blender/editors/space_logic/logic_buttons.c +++ b/source/blender/editors/space_logic/logic_buttons.c @@ -124,13 +124,9 @@ static int logic_properties(bContext *C, wmOperator *op) ScrArea *sa= CTX_wm_area(C); ARegion *ar= logic_has_buttons_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); - } + if(ar) + ED_region_toggle_hidden(C, ar); + return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index 3040d73bda9..dc8b111821d 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -39,6 +39,9 @@ #include "DNA_screen_types.h" #include "DNA_sensor_types.h" #include "DNA_sound_types.h" +#include "DNA_armature_types.h" +#include "DNA_constraint_types.h" +#include "DNA_action_types.h" #include "DNA_windowmanager_types.h" #include "MEM_guardedalloc.h" @@ -608,6 +611,8 @@ static char *sensor_name(int type) return "Keyboard"; case SENS_PROPERTY: return "Property"; + case SENS_ARMATURE: + return "Armature"; case SENS_ACTUATOR: return "Actuator"; case SENS_DELAY: @@ -635,7 +640,7 @@ static char *sensor_pup(void) /* the number needs to match defines in game.h */ return "Sensors %t|Always %x0|Delay %x13|Keyboard %x3|Mouse %x5|" "Touch %x1|Collision %x6|Near %x2|Radar %x7|" - "Property %x4|Random %x8|Ray %x9|Message %x10|Joystick %x11|Actuator %x12"; + "Property %x4|Random %x8|Ray %x9|Message %x10|Joystick %x11|Actuator %x12|Armature %x14"; } static char *controller_name(int type) @@ -709,6 +714,8 @@ static char *actuator_name(int type) return "Parent"; case ACT_STATE: return "State"; + case ACT_ARMATURE: + return "Armature"; } return "unknown"; } @@ -721,7 +728,7 @@ static char *actuator_pup(Object *owner) switch (owner->type) { case OB_ARMATURE: - return "Actuators %t|Action %x15|Motion %x0|Constraint %x9|Ipo %x1" + return "Actuators %t|Action %x15|Armature %x23|Motion %x0|Constraint %x9|Ipo %x1" "|Camera %x3|Sound %x5|Property %x6|Edit Object %x10" "|Scene %x11|Random %x13|Message %x14|Game %x17" "|Visibility %x18|2D Filter %x19|Parent %x20|State %x22"; @@ -936,6 +943,7 @@ static int get_col_sensor(int type) case SENS_NEAR: return TH_PANEL; case SENS_KEYBOARD: return TH_PANEL; case SENS_PROPERTY: return TH_PANEL; + case SENS_ARMATURE: return TH_PANEL; case SENS_ACTUATOR: return TH_PANEL; case SENS_MOUSE: return TH_PANEL; case SENS_RADAR: return TH_PANEL; @@ -965,6 +973,120 @@ static void verify_logicbutton_func(bContext *C, void *data1, void *data2) } } +static void test_scriptpoin_but(struct bContext *C, char *name, ID **idpp) +{ + ID *id; + + id= CTX_data_main(C)->text.first; + while(id) { + if( strcmp(name, id->name+2)==0 ) { + *idpp= id; + return; + } + id= id->next; + } + *idpp= NULL; +} + +static void test_actionpoin_but(struct bContext *C, char *name, ID **idpp) +{ + ID *id; + + id= CTX_data_main(C)->action.first; + while(id) { + if( strcmp(name, id->name+2)==0 ) { + id_us_plus(id); + *idpp= id; + return; + } + id= id->next; + } + *idpp= NULL; +} + + +static void test_obpoin_but(struct bContext *C, char *name, ID **idpp) +{ + ID *id; + + id= CTX_data_main(C)->object.first; + while(id) { + if( strcmp(name, id->name+2)==0 ) { + *idpp= id; + id_lib_extern(id); /* checks lib data, sets correct flag for saving then */ + return; + } + id= id->next; + } + *idpp= NULL; +} + +static void test_meshpoin_but(struct bContext *C, char *name, ID **idpp) +{ + ID *id; + + if( *idpp ) (*idpp)->us--; + + id= CTX_data_main(C)->mesh.first; + while(id) { + if( strcmp(name, id->name+2)==0 ) { + *idpp= id; + id_us_plus(id); + return; + } + id= id->next; + } + *idpp= NULL; +} + +static void test_matpoin_but(struct bContext *C, char *name, ID **idpp) +{ + ID *id; + + if( *idpp ) (*idpp)->us--; + + id= CTX_data_main(C)->mat.first; + while(id) { + if( strcmp(name, id->name+2)==0 ) { + *idpp= id; + id_us_plus(id); + return; + } + id= id->next; + } + *idpp= NULL; +} + +static void test_scenepoin_but(struct bContext *C, char *name, ID **idpp) +{ + ID *id; + + if( *idpp ) (*idpp)->us--; + + id= CTX_data_main(C)->scene.first; + while(id) { + if( strcmp(name, id->name+2)==0 ) { + *idpp= id; + id_us_plus(id); + return; + } + id= id->next; + } + *idpp= NULL; +} + + +static void test_keyboard_event(struct bContext *C, void *arg_ks, void *arg_unused) +{ + bKeyboardSensor *ks= (bKeyboardSensor*)arg_ks; + + if(!ISKEYBOARD(ks->key)) + ks->key= 0; + if(!ISKEYBOARD(ks->qual)) + ks->qual= 0; + if(!ISKEYBOARD(ks->qual2)) + ks->qual2= 0; +} /** * Draws a toggle for pulse mode, a frequency field and a toggle to invert @@ -1015,12 +1137,51 @@ static void draw_default_sensor_header(bSensor *sens, "Invert the level (output) of this sensor"); } -static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short yco, short width,char* objectname) +static void check_armature_bone_constraint(Object *ob, char *posechannel, char *constraint) +{ + /* check that bone exist in the active object */ + if (ob->type == OB_ARMATURE && ob->pose) { + bPoseChannel *pchan; + bPose *pose = ob->pose; + for (pchan=pose->chanbase.first; pchan; pchan=pchan->next) { + if (!strcmp(pchan->name, posechannel)) { + /* found it, now look for constraint channel */ + bConstraint *con; + for (con=pchan->constraints.first; con; con=con->next) { + if (!strcmp(con->name, constraint)) { + /* found it, all ok */ + return; + } + } + /* didn't find constraint, make empty */ + constraint[0] = 0; + return; + } + } + } + /* didn't find any */ + posechannel[0] = 0; + constraint[0] = 0; +} + +static void check_armature_sensor(bContext *C, void *arg1_but, void *arg2_sens) +{ + bArmatureSensor *sens = arg2_sens; + uiBut *but = arg1_but; + Object *ob= CTX_data_active_object(C); + + /* check that bone exist in the active object */ + but->retval = B_REDR; + check_armature_bone_constraint(ob, sens->posechannel, sens->constraint); +} + +static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short xco, short yco, short width,char* objectname) { bNearSensor *ns = NULL; bTouchSensor *ts = NULL; bKeyboardSensor *ks = NULL; bPropertySensor *ps = NULL; + bArmatureSensor *arm = NULL; bMouseSensor *ms = NULL; bCollisionSensor *cs = NULL; bRadarSensor *rs = NULL; @@ -1030,6 +1191,7 @@ static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short bJoystickSensor *joy = NULL; bActuatorSensor *as = NULL; bDelaySensor *ds = NULL; + uiBut *but; short ysize; char *str; @@ -1178,12 +1340,15 @@ static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short if ((ks->type&1)==0) { /* is All Keys option off? */ /* line 2: hotkey and allkeys toggle */ - uiDefKeyevtButS(block, 0, "", xco+40, yco-44, (width)/2, 19, &ks->key, "Key code"); + but= uiDefKeyevtButS(block, 0, "", xco+40, yco-44, (width)/2, 19, &ks->key, "Key code"); + uiButSetFunc(but, test_keyboard_event, ks, NULL); /* line 3: two key modifyers (qual1, qual2) */ uiDefBut(block, LABEL, 0, "Hold", xco, yco-68, 40, 19, NULL, 0, 0, 0, 0, ""); - uiDefKeyevtButS(block, 0, "", xco+40, yco-68, (width-50)/2, 19, &ks->qual, "Modifier key code"); - uiDefKeyevtButS(block, 0, "", xco+40+(width-50)/2, yco-68, (width-50)/2, 19, &ks->qual2, "Second Modifier key code"); + but= uiDefKeyevtButS(block, 0, "", xco+40, yco-68, (width-50)/2, 19, &ks->qual, "Modifier key code"); + uiButSetFunc(but, test_keyboard_event, ks, NULL); + but= uiDefKeyevtButS(block, 0, "", xco+40+(width-50)/2, yco-68, (width-50)/2, 19, &ks->qual2, "Second Modifier key code"); + uiButSetFunc(but, test_keyboard_event, ks, NULL); } /* line 4: toggle property for string logging mode */ @@ -1242,6 +1407,45 @@ static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short yco-= ysize; break; } + case SENS_ARMATURE: + { + ysize= 70; + + glRects(xco, yco-ysize, xco+width, yco); + uiEmboss((float)xco, (float)yco-ysize, + (float)xco+width, (float)yco, 1); + + draw_default_sensor_header(sens, block, xco, yco, width); + arm= sens->data; + + if (ob->type == OB_ARMATURE) { + uiBlockBeginAlign(block); + but = uiDefBut(block, TEX, 1, "Bone: ", + (xco+10), (yco-44), (width-20)/2, 19, + arm->posechannel, 0, 31, 0, 0, + "Bone on which you want to check a constraint"); + uiButSetFunc(but, check_armature_sensor, but, arm); + but = uiDefBut(block, TEX, 1, "Cons: ", + (xco+10)+(width-20)/2, (yco-44), (width-20)/2, 19, + arm->constraint, 0, 31, 0, 0, + "Name of the constraint you want to control"); + uiButSetFunc(but, check_armature_sensor, but, arm); + uiBlockEndAlign(block); + + str= "Type %t|State changed %x0|Lin error below %x1|Lin error above %x2|Rot error below %x3|Rot error above %x4"; + + uiDefButI(block, MENU, B_REDR, str, xco+10,yco-66,0.4*(width-20), 19, + &arm->type, 0, 31, 0, 0, "Type"); + + if (arm->type != SENS_ARM_STATE_CHANGED) + { + uiDefButF(block, NUM, 1, "Value: ", xco+10+0.4*(width-20),yco-66,0.6*(width-20), 19, + &arm->value, -10000.0, 10000.0, 100, 0, "Test the error against this value"); + } + } + yco-= ysize; + break; + } case SENS_ACTUATOR: { ysize= 48; @@ -1534,7 +1738,7 @@ static short draw_controllerbuttons(bController *cont, uiBlock *block, short xco uiBlockBeginAlign(block); uiDefButI(block, MENU, B_REDR, "Execution Method%t|Script%x0|Module%x1", xco+4,yco-23, 66, 19, &pc->mode, 0, 0, 0, 0, "Python script type (textblock or module - faster)"); if(pc->mode==0) - uiDefIDPoinBut(block, test_scriptpoin_but, ID_SCRIPT, 1, "", xco+70,yco-23,width-74, 19, &pc->text, "Blender textblock to run as a script"); + uiDefIDPoinBut(block, test_scriptpoin_but, ID_TXT, 1, "", xco+70,yco-23,width-74, 19, &pc->text, "Blender textblock to run as a script"); else { uiDefBut(block, TEX, 1, "", xco+70,yco-23,(width-70)-25, 19, pc->module, 0, 63, 0, 0, "Module name and function to run e.g. \"someModule.main\". Internal texts and external python files can be used"); uiDefButBitI(block, TOG, CONT_PY_DEBUG, B_REDR, "D", (xco+width)-25, yco-23, 19, 19, &pc->flag, 0, 0, 0, 0, "Continuously reload the module from disk for editing external modules without restarting"); @@ -1576,6 +1780,7 @@ static int get_col_actuator(int type) case ACT_VISIBILITY: return TH_PANEL; case ACT_CONSTRAINT: return TH_PANEL; case ACT_STATE: return TH_PANEL; + case ACT_ARMATURE: return TH_PANEL; default: return TH_PANEL; } } @@ -1656,6 +1861,18 @@ static void check_state_mask(bContext *C, void *arg1_but, void *arg2_mask) but->retval = B_REDR; } +static void check_armature_actuator(bContext *C, void *arg1_but, void *arg2_act) +{ + bArmatureActuator *act = arg2_act; + uiBut *but = arg1_but; + Object *ob= CTX_data_active_object(C); + + /* check that bone exist in the active object */ + but->retval = B_REDR; + check_armature_bone_constraint(ob, act->posechannel, act->constraint); +} + + static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, short xco, short yco, short width) { bSoundActuator *sa = NULL; @@ -1675,6 +1892,7 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh bTwoDFilterActuator *tdfa = NULL; bParentActuator *parAct = NULL; bStateActuator *staAct = NULL; + bArmatureActuator *armAct = NULL; float *fp; short ysize = 0, wval; @@ -2702,6 +2920,48 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh yco-= ysize; break; + case ACT_ARMATURE: + armAct = act->data; + + if (ob->type == OB_ARMATURE) { + str= "Constraint %t|Run armature %x0|Enable %x1|Disable %x2|Set target %x3|Set weight %x4"; + uiDefButI(block, MENU, B_REDR, str, xco+5, yco-24, (width-10)*0.35, 19, &armAct->type, 0.0, 0.0, 0, 0, ""); + + switch (armAct->type) { + case ACT_ARM_RUN: + ysize = 28; + break; + default: + uiBlockBeginAlign(block); + but = uiDefBut(block, TEX, 1, "Bone: ", + (xco+5), (yco-44), (width-10)/2, 19, + armAct->posechannel, 0, 31, 0, 0, + "Bone on which the constraint is defined"); + uiButSetFunc(but, check_armature_actuator, but, armAct); + but = uiDefBut(block, TEX, 1, "Cons: ", + (xco+5)+(width-10)/2, (yco-44), (width-10)/2, 19, + armAct->constraint, 0, 31, 0, 0, + "Name of the constraint you want to controle"); + uiButSetFunc(but, check_armature_actuator, but, armAct); + uiBlockEndAlign(block); + ysize = 48; + switch (armAct->type) { + case ACT_ARM_SETTARGET: + uiDefIDPoinBut(block, test_obpoin_but, ID_OB, 1, "Target: ", xco+5, yco-64, (width-10), 19, &(armAct->target), "Set this object as the target of the constraint"); + uiDefIDPoinBut(block, test_obpoin_but, ID_OB, 1, "Secondary Target: ", xco+5, yco-84, (width-10), 19, &(armAct->subtarget), "Set this object as the secondary target of the constraint (only IK polar target at the moment)"); + ysize += 40; + break; + case ACT_ARM_SETWEIGHT: + uiDefButF(block, NUM, B_REDR, "Weight:", xco+5+(width-10)*0.35,yco-24,(width-10)*0.65,19,&armAct->weight,0.0,1.0,0.0,0.0,"Set weight of this constraint"); + break; + } + } + } + glRects(xco, yco-ysize, xco+width, yco); + uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1); + yco-= ysize; + break; + default: ysize= 4; @@ -3216,7 +3476,7 @@ void logic_buttons(bContext *C, ARegion *ar) uiButSetFunc(but, make_unique_prop_names_cb, sens->name, (void*) 0); sens->otype= sens->type; - yco= draw_sensorbuttons(sens, block, xco, yco, width,ob->id.name); + yco= draw_sensorbuttons(ob, sens, block, xco, yco, width,ob->id.name); if(yco-6 < ycoo) ycoo= (yco+ycoo-20)/2; } else { diff --git a/source/blender/editors/space_logic/space_logic.c b/source/blender/editors/space_logic/space_logic.c index 3c46522bba2..7043d625ab0 100644 --- a/source/blender/editors/space_logic/space_logic.c +++ b/source/blender/editors/space_logic/space_logic.c @@ -188,7 +188,7 @@ void logic_operatortypes(void) void logic_keymap(struct wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "Logic Generic", SPACE_LOGIC, 0); + wmKeyMap *keymap= WM_keymap_find(wm, "Logic Generic", SPACE_LOGIC, 0); WM_keymap_add_item(keymap, "LOGIC_OT_properties", NKEY, KM_PRESS, 0, 0); } @@ -234,12 +234,12 @@ static int logic_context(const bContext *C, const char *member, bContextDataResu /* add handlers, stuff you only do once or on area/region changes */ static void logic_main_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy); /* own keymaps */ - keymap= WM_keymap_listbase(wm, "Logic Generic", SPACE_LOGIC, 0); + keymap= WM_keymap_find(wm, "Logic Generic", SPACE_LOGIC, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); } @@ -276,11 +276,11 @@ static void logic_main_area_draw(const bContext *C, ARegion *ar) /* add handlers, stuff you only do once or on area/region changes */ static void logic_buttons_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; ED_region_panels_init(wm, ar); - keymap= WM_keymap_listbase(wm, "Logic Generic", SPACE_LOGIC, 0); + keymap= WM_keymap_find(wm, "Logic Generic", SPACE_LOGIC, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); } diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index 8532d78aa06..b193b89d65a 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -114,34 +114,69 @@ static int nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA if (ANIM_animdata_get_context(C, &ac) == 0) return 0; - /* extract list of active channel(s), of which we should only take the first one (expecting it to be an NLA track) */ - filter= (ANIMFILTER_VISIBLE|ANIMFILTER_ACTIVE); + /* extract list of active channel(s), of which we should only take the first one + * - we need the channels flag to get the active AnimData block when there are no NLA Tracks + */ + filter= (ANIMFILTER_VISIBLE|ANIMFILTER_ACTIVE|ANIMFILTER_CHANNELS); ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); for (ale= anim_data.first; ale; ale= ale->next) { - // TODO: need some way to select active animdata too... - if (ale->type == ANIMTYPE_NLATRACK) { - NlaTrack *nlt= (NlaTrack *)ale->data; - AnimData *adt= ale->adt; - - /* found it, now set the pointers */ - if (adt_ptr) { - /* AnimData pointer */ - RNA_pointer_create(ale->id, &RNA_AnimData, adt, adt_ptr); - } - if (nlt_ptr) { - /* NLA-Track pointer */ - RNA_pointer_create(ale->id, &RNA_NlaTrack, nlt, nlt_ptr); - } - if (strip_ptr) { - /* NLA-Strip pointer */ - NlaStrip *strip= BKE_nlastrip_find_active(nlt); - RNA_pointer_create(ale->id, &RNA_NlaStrip, strip, strip_ptr); + switch (ale->type) { + case ANIMTYPE_NLATRACK: /* NLA Track - The primary data type which should get caught */ + { + NlaTrack *nlt= (NlaTrack *)ale->data; + AnimData *adt= ale->adt; + + /* found it, now set the pointers */ + if (adt_ptr) { + /* AnimData pointer */ + RNA_pointer_create(ale->id, &RNA_AnimData, adt, adt_ptr); + } + if (nlt_ptr) { + /* NLA-Track pointer */ + RNA_pointer_create(ale->id, &RNA_NlaTrack, nlt, nlt_ptr); + } + if (strip_ptr) { + /* NLA-Strip pointer */ + NlaStrip *strip= BKE_nlastrip_find_active(nlt); + RNA_pointer_create(ale->id, &RNA_NlaStrip, strip, strip_ptr); + } + + found= 1; } - - found= 1; - break; + break; + + case ANIMTYPE_SCENE: /* Top-Level Widgets doubling up as datablocks */ + case ANIMTYPE_OBJECT: + case ANIMTYPE_FILLACTD: /* Action Expander */ + case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */ + case ANIMTYPE_DSLAM: + case ANIMTYPE_DSCAM: + case ANIMTYPE_DSCUR: + case ANIMTYPE_DSSKEY: + case ANIMTYPE_DSWOR: + case ANIMTYPE_DSPART: + case ANIMTYPE_DSMBALL: + case ANIMTYPE_DSARM: + { + /* for these channels, we only do AnimData */ + if (ale->id && ale->adt) { + if (adt_ptr) { + /* AnimData pointer */ + RNA_pointer_create(ale->id, &RNA_AnimData, ale->adt, adt_ptr); + + /* set found status to -1, since setting to 1 would break the loop + * and potentially skip an active NLA-Track in some cases... + */ + found= -1; + } + } + } + break; } + + if (found > 0) + break; } /* free temp data */ @@ -211,7 +246,7 @@ static void nla_panel_animdata (const bContext *C, Panel *pa) /* Active Action Properties ------------------------------------- */ /* action */ row= uiLayoutRow(layout, 1); - uiTemplateID(row, (bContext *)C, &adt_ptr, "action", NULL /*"ACT_OT_new"*/, NULL, NULL /*"ACT_OT_unlink"*/); // XXX: need to make these operators + uiTemplateID(row, (bContext *)C, &adt_ptr, "action", "ACT_OT_new", NULL, NULL /*"ACT_OT_unlink"*/); // XXX: need to make these operators /* extrapolation */ row= uiLayoutRow(layout, 1); @@ -458,13 +493,9 @@ static int nla_properties(bContext *C, wmOperator *op) ScrArea *sa= CTX_wm_area(C); ARegion *ar= nla_has_buttons_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); - } + if(ar) + ED_region_toggle_hidden(C, ar); + return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c index ccf23266427..07dc3f0ad89 100644 --- a/source/blender/editors/space_nla/nla_channels.c +++ b/source/blender/editors/space_nla/nla_channels.c @@ -116,18 +116,22 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho } /* action to take depends on what channel we've got */ + // WARNING: must keep this in sync with the equivalent function in anim_channels_edit.c switch (ale->type) { case ANIMTYPE_SCENE: { Scene *sce= (Scene *)ale->data; + AnimData *adt= sce->adt; /* set selection status */ if (selectmode == SELECT_INVERT) { /* swap select */ sce->flag ^= SCE_DS_SELECTED; + if (adt) adt->flag ^= ADT_UI_SELECTED; } else { sce->flag |= SCE_DS_SELECTED; + if (adt) adt->flag |= ADT_UI_SELECTED; } notifierFlags |= ND_ANIMCHAN_SELECT; @@ -139,6 +143,7 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho Scene *sce= (Scene *)ads->source; Base *base= (Base *)ale->data; Object *ob= base->object; + AnimData *adt= ob->adt; if (nlaedit_is_tweakmode_on(ac) == 0) { /* set selection status */ @@ -146,23 +151,30 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho /* swap select */ base->flag ^= SELECT; ob->flag= base->flag; + + if (adt) adt->flag ^= ADT_UI_SELECTED; } else { Base *b; - /* deleselect all */ + /* deselect all */ + // TODO: should this deselect all other types of channels too? for (b= sce->base.first; b; b= b->next) { b->flag &= ~SELECT; b->object->flag= b->flag; + if (b->object->adt) b->object->adt->flag &= ~(ADT_UI_SELECTED|ADT_UI_ACTIVE); } /* select object now */ base->flag |= SELECT; ob->flag |= SELECT; + if (adt) adt->flag |= ADT_UI_SELECTED; } /* xxx should be ED_base_object_activate(), but we need context pointer for that... */ //set_active_base(base); + if ((adt) && (adt->flag & ADT_UI_SELECTED)) + adt->flag |= ADT_UI_ACTIVE; /* notifiers - channel was selected */ notifierFlags |= ND_ANIMCHAN_SELECT; @@ -170,6 +182,39 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho } break; + case ANIMTYPE_FILLACTD: /* Action Expander */ + case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */ + case ANIMTYPE_DSLAM: + case ANIMTYPE_DSCAM: + case ANIMTYPE_DSCUR: + case ANIMTYPE_DSSKEY: + case ANIMTYPE_DSWOR: + case ANIMTYPE_DSPART: + case ANIMTYPE_DSMBALL: + case ANIMTYPE_DSARM: + { + /* sanity checking... */ + if (ale->adt) { + /* select/deselect */ + if (selectmode == SELECT_INVERT) { + /* inverse selection status of this AnimData block only */ + ale->adt->flag ^= ADT_UI_SELECTED; + } + else { + /* select AnimData block by itself */ + ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); + ale->adt->flag |= ADT_UI_SELECTED; + } + + /* set active? */ + if ((ale->adt) && (ale->adt->flag & ADT_UI_SELECTED)) + ale->adt->flag |= ADT_UI_ACTIVE; + } + + notifierFlags |= ND_ANIMCHAN_SELECT; + } + break; + case ANIMTYPE_NLATRACK: { NlaTrack *nlt= (NlaTrack *)ale->data; diff --git a/source/blender/editors/space_nla/nla_header.c b/source/blender/editors/space_nla/nla_header.c index 0d3bf2cb6b1..4eb9fac5cb8 100644 --- a/source/blender/editors/space_nla/nla_header.c +++ b/source/blender/editors/space_nla/nla_header.c @@ -246,31 +246,7 @@ void nla_header_buttons(const bContext *C, ARegion *ar) uiBlockSetEmboss(block, UI_EMBOSS); /* filtering buttons */ - if (snla->ads) { - uiBlockBeginAlign(block); - uiDefIconButBitI(block, TOG, ADS_FILTER_ONLYSEL, B_REDR, ICON_RESTRICT_SELECT_OFF, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Only display selected Objects"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NLA_NOACT, B_REDR, ICON_ACTION, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Include AnimData blocks with no NLA Data"); - uiBlockEndAlign(block); - xco += 5; - - uiBlockBeginAlign(block); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOSCE, B_REDR, ICON_SCENE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Scene Animation"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOWOR, B_REDR, ICON_WORLD_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display World Animation"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOSHAPEKEYS, B_REDR, ICON_SHAPEKEY_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display ShapeKeys"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMAT, B_REDR, ICON_MATERIAL_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Materials"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOLAM, B_REDR, ICON_LAMP_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Lamps"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCAM, B_REDR, ICON_CAMERA_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->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, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Curves"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMBA, B_REDR, ICON_META_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display MetaBalls"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOPART, B_REDR, ICON_PARTICLE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Particles"); - uiBlockEndAlign(block); - xco += 15; - } - else { - // XXX this case shouldn't happen at all... for now, just pad out same amount of space - xco += 10*XIC + 15; - } - xco += (XIC + 8); + xco= ANIM_headerUI_standard_buttons(C, snla->ads, block, xco, yco); /* auto-snap selector */ if (snla->flag & SNLA_DRAWTIME) { diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c index ad5f5174690..5ea2e99ad6a 100644 --- a/source/blender/editors/space_nla/nla_ops.c +++ b/source/blender/editors/space_nla/nla_ops.c @@ -167,7 +167,7 @@ void nla_operatortypes(void) /* ************************** registration - keymaps **********************************/ -static void nla_keymap_channels (wmWindowManager *wm, ListBase *keymap) +static void nla_keymap_channels (wmWindowManager *wm, wmKeyMap *keymap) { /* NLA-specific (different to standard channels keymap) -------------------------- */ /* selection */ @@ -210,7 +210,7 @@ static void nla_keymap_channels (wmWindowManager *wm, ListBase *keymap) RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_collapse", PADMINUS, KM_PRESS, KM_CTRL, 0)->ptr, "all", 1); } -static void nla_keymap_main (wmWindowManager *wm, ListBase *keymap) +static void nla_keymap_main (wmWindowManager *wm, wmKeyMap *keymap) { wmKeymapItem *kmi; @@ -284,10 +284,10 @@ static void nla_keymap_main (wmWindowManager *wm, ListBase *keymap) void nla_keymap(wmWindowManager *wm) { - ListBase *keymap; + wmKeyMap *keymap; /* keymap for all regions */ - keymap= WM_keymap_listbase(wm, "NLA Generic", SPACE_NLA, 0); + keymap= WM_keymap_find(wm, "NLA Generic", SPACE_NLA, 0); WM_keymap_add_item(keymap, "NLA_OT_properties", NKEY, KM_PRESS, 0, 0); /* channels */ @@ -297,11 +297,11 @@ void nla_keymap(wmWindowManager *wm) * * However, those operations which involve clicking on channels and/or the placement of them in the view are implemented here instead */ - keymap= WM_keymap_listbase(wm, "NLA Channels", SPACE_NLA, 0); + keymap= WM_keymap_find(wm, "NLA Channels", SPACE_NLA, 0); nla_keymap_channels(wm, keymap); /* data */ - keymap= WM_keymap_listbase(wm, "NLA Data", SPACE_NLA, 0); + keymap= WM_keymap_find(wm, "NLA Data", SPACE_NLA, 0); nla_keymap_main(wm, keymap); } diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c index 89d4e7cddf2..41435810889 100644 --- a/source/blender/editors/space_nla/space_nla.c +++ b/source/blender/editors/space_nla/space_nla.c @@ -208,15 +208,15 @@ static SpaceLink *nla_duplicate(SpaceLink *sl) /* add handlers, stuff you only do once or on area/region changes */ static void nla_channel_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy); /* own keymap */ // TODO: cannot use generic copy, need special NLA version - keymap= WM_keymap_listbase(wm, "NLA Channels", SPACE_NLA, 0); /* XXX weak? */ + keymap= WM_keymap_find(wm, "NLA Channels", SPACE_NLA, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); - keymap= WM_keymap_listbase(wm, "NLA Generic", SPACE_NLA, 0); + keymap= WM_keymap_find(wm, "NLA Generic", SPACE_NLA, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } @@ -254,14 +254,14 @@ static void nla_channel_area_draw(const bContext *C, ARegion *ar) /* add handlers, stuff you only do once or on area/region changes */ static void nla_main_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy); /* own keymap */ - keymap= WM_keymap_listbase(wm, "NLA Data", SPACE_NLA, 0); /* XXX weak? */ + keymap= WM_keymap_find(wm, "NLA Data", SPACE_NLA, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); - keymap= WM_keymap_listbase(wm, "NLA Generic", SPACE_NLA, 0); + keymap= WM_keymap_find(wm, "NLA Generic", SPACE_NLA, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); } @@ -354,11 +354,11 @@ static void nla_header_area_draw(const bContext *C, ARegion *ar) /* add handlers, stuff you only do once or on area/region changes */ static void nla_buttons_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; ED_region_panels_init(wm, ar); - keymap= WM_keymap_listbase(wm, "NLA Generic", SPACE_NLA, 0); + keymap= WM_keymap_find(wm, "NLA Generic", SPACE_NLA, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } @@ -409,6 +409,7 @@ static void nla_main_area_listener(ARegion *ar, wmNotifier *wmn) break; case NC_SCENE: switch(wmn->data) { + case ND_RENDER_OPTIONS: case ND_OB_ACTIVE: case ND_FRAME: case ND_MARKERS: diff --git a/source/blender/editors/space_node/SConscript b/source/blender/editors/space_node/SConscript index 5453aa7dd44..fd0dfe83852 100644 --- a/source/blender/editors/space_node/SConscript +++ b/source/blender/editors/space_node/SConscript @@ -14,5 +14,12 @@ if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): if env['CC'] == 'gcc': #cf.append('-Werror') pass - + +if env['OURPLATFORM'] == 'linux2': + cflags='-pthread' + incs += ' ../../../extern/binreloc/include' + +if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): + incs += ' ' + env['BF_PTHREADS_INC'] + env.BlenderLib ( 'bf_editors_space_node', sources, Split(incs), defs, libtype=['core'], priority=[55], compileflags=cf ) diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 05adb5b75ca..b8da42079c4 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -22,7 +22,7 @@ * * The Original Code is: all of this file. * - * Contributor(s): David Millan Escriva, Juho Vepsäläinen, Bob Holcomb + * Contributor(s): David Millan Escriva, Juho Vepsäläinen, Bob Holcomb, Thomas Dinges * * ***** END GPL LICENSE BLOCK ***** */ @@ -170,9 +170,13 @@ static void node_group_alone_cb(bContext *C, void *node_v, void *unused_v) /* ****************** BUTTON CALLBACKS FOR ALL TREES ***************** */ -static int node_buts_group(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_buts_group(uiLayout *layout, PointerRNA *ptr) { - if(block && node->id) { + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + rctf *butr= &node->butr; + + if(node->id) { uiBut *bt; short width; @@ -197,112 +201,95 @@ static int node_buts_group(uiBlock *block, bNodeTree *ntree, bNode *node, rctf * uiBlockEndAlign(block); } - return 19; } #endif -static int node_buts_value(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_buts_value(uiLayout *layout, PointerRNA *ptr) { - if(block) { - bNodeSocket *sock= node->outputs.first; /* first socket stores value */ - - uiDefButF(block, NUM, B_NODE_EXEC, "", - (short)butr->xmin, (short)butr->ymin, butr->xmax-butr->xmin, 20, - sock->ns.vec, sock->ns.min, sock->ns.max, 10, 2, ""); - - } - return 20; + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + rctf *butr= &node->butr; + bNodeSocket *sock= node->outputs.first; /* first socket stores value */ + + uiDefButF(block, NUM, B_NODE_EXEC, "", + (short)butr->xmin, (short)butr->ymin, butr->xmax-butr->xmin, 20, + sock->ns.vec, sock->ns.min, sock->ns.max, 10, 2, ""); } -static int node_buts_rgb(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_buts_rgb(uiLayout *layout, PointerRNA *ptr) { - if(block) { - bNodeSocket *sock= node->outputs.first; /* first socket stores value */ - if(sock) { - /* enforce square box drawing */ - uiBlockSetEmboss(block, UI_EMBOSSP); - - uiDefButF(block, HSVCUBE, B_NODE_EXEC, "", - (short)butr->xmin, (short)butr->ymin, butr->xmax-butr->xmin, 12, - sock->ns.vec, 0.0f, 1.0f, 3, 0, ""); - uiDefButF(block, HSVCUBE, B_NODE_EXEC, "", - (short)butr->xmin, (short)butr->ymin+15, butr->xmax-butr->xmin, butr->ymax-butr->ymin -15 -15, - sock->ns.vec, 0.0f, 1.0f, 2, 0, ""); - uiDefButF(block, COL, B_NOP, "", - (short)butr->xmin, (short)butr->ymax-12, butr->xmax-butr->xmin, 12, - sock->ns.vec, 0.0, 0.0, -1, 0, ""); - /* the -1 above prevents col button to popup a color picker */ - - uiBlockSetEmboss(block, UI_EMBOSS); - } - } - return 30 + (int)(node->width-NODE_DY); -} + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + rctf *butr= &node->butr; + bNodeSocket *sock= node->outputs.first; /* first socket stores value */ -static int node_buts_mix_rgb(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) -{ - if(block) { - uiBut *bt; - int a_but= (ntree->type==NTREE_COMPOSIT); + if(sock) { + /* enforce square box drawing */ + uiBlockSetEmboss(block, UI_EMBOSSP); - /* blend type */ - uiBlockBeginAlign(block); - bt=uiDefButS(block, MENU, B_NODE_EXEC, "Mix %x0|Add %x1|Subtract %x3|Multiply %x2|Screen %x4|Overlay %x9|Divide %x5|Difference %x6|Darken %x7|Lighten %x8|Dodge %x10|Burn %x11|Color %x15|Value %x14|Saturation %x13|Hue %x12|Soft Light %x16|Linear Light %x17", - (short)butr->xmin, (short)butr->ymin, butr->xmax-butr->xmin -(a_but?20:0), 20, - &node->custom1, 0, 0, 0, 0, ""); - uiButSetFunc(bt, node_but_title_cb, node, bt); - /* Alpha option, composite */ - if(a_but) - uiDefIconButS(block, TOG, B_NODE_EXEC, ICON_IMAGE_RGB_ALPHA, - (short)butr->xmax-20, (short)butr->ymin, 20, 20, - &node->custom2, 0, 0, 0, 0, "Include Alpha of 2nd input in this operation"); + uiDefButF(block, HSVCUBE, B_NODE_EXEC, "", + (short)butr->xmin, (short)butr->ymin, butr->xmax-butr->xmin, 12, + sock->ns.vec, 0.0f, 1.0f, 3, 0, ""); + uiDefButF(block, HSVCUBE, B_NODE_EXEC, "", + (short)butr->xmin, (short)butr->ymin+15, butr->xmax-butr->xmin, butr->xmax-butr->xmin -15 -15, + sock->ns.vec, 0.0f, 1.0f, 2, 0, ""); + uiDefButF(block, COL, B_NOP, "", + (short)butr->xmin, (short)butr->ymax-12, butr->xmax-butr->xmin, 12, + sock->ns.vec, 0.0, 0.0, -1, 0, ""); + /* the -1 above prevents col button to popup a color picker */ + + uiBlockSetEmboss(block, UI_EMBOSS); } - return 20; } -static int node_buts_time(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) -{ - if(block) { - CurveMapping *cumap= node->storage; - short dx= (short)((butr->xmax-butr->xmin)/2); - butr->ymin += 26; +static void node_buts_mix_rgb(uiLayout *layout, PointerRNA *ptr) +{ + uiLayout *row; - curvemap_buttons(block, node->storage, 's', B_NODE_EXEC, B_REDR, butr); - - if(cumap) { - //cumap->flag |= CUMA_DRAW_CFRA; - //if(node->custom1<node->custom2) - // cumap->sample[0]= (float)(CFRA - node->custom1)/(float)(node->custom2-node->custom1); - } + bNodeTree *ntree= (bNodeTree*)ptr->id.data; - uiBlockBeginAlign(block); - uiDefButS(block, NUM, B_NODE_EXEC, "Sta:", - (short)butr->xmin, (short)butr->ymin-22, dx, 19, - &node->custom1, 1.0, 20000.0, 0, 0, "Start frame"); - uiDefButS(block, NUM, B_NODE_EXEC, "End:", - (short)butr->xmin+dx, (short)butr->ymin-22, dx, 19, - &node->custom2, 1.0, 20000.0, 0, 0, "End frame"); - } + row= uiLayoutRow(layout, 1); + uiItemR(row, "", 0, ptr, "blend_type", 0); + if(ntree->type == NTREE_COMPOSIT) + uiItemR(row, "", ICON_IMAGE_RGB_ALPHA, ptr, "alpha", 0); +} + +static void node_buts_time(uiLayout *layout, PointerRNA *ptr) +{ + uiLayout *row; +#if 0 + /* XXX no context access here .. */ + bNode *node= ptr->data; + CurveMapping *cumap= node->storage; - return node->width-NODE_DY; + if(cumap) { + cumap->flag |= CUMA_DRAW_CFRA; + if(node->custom1<node->custom2) + cumap->sample[0]= (float)(CFRA - node->custom1)/(float)(node->custom2-node->custom1); + } +#endif + + uiTemplateCurveMapping(layout, ptr, "curve", 's', 0); + + row= uiLayoutRow(layout, 1); + uiItemR(row, "Sta", 0, ptr, "start", 0); + uiItemR(row, "End", 0, ptr, "end", 0); } -static int node_buts_valtorgb(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_buts_valtorgb(uiLayout *layout, PointerRNA *ptr) { - if(block) { - if(node->storage) { - uiBlockColorbandButtons(block, node->storage, butr, B_NODE_EXEC); - } + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + rctf *butr= &node->butr; + + if(node->storage) { + uiBlockColorbandButtons(block, node->storage, butr, B_NODE_EXEC); } - return 40; } -static int node_buts_curvevec(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_buts_curvevec(uiLayout *layout, PointerRNA *ptr) { - if(block) { - curvemap_buttons(block, node->storage, 'v', B_NODE_EXEC, B_REDR, butr); - } - return (int)(node->width-NODE_DY); + uiTemplateCurveMapping(layout, ptr, "mapping", 'v', 0); } static float *_sample_col= NULL; // bad bad, 2.5 will do better? @@ -311,33 +298,31 @@ void node_curvemap_sample(float *col) _sample_col= col; } -static int node_buts_curvecol(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_buts_curvecol(uiLayout *layout, PointerRNA *ptr) { - if(block) { - CurveMapping *cumap= node->storage; - if(_sample_col) { - cumap->flag |= CUMA_DRAW_SAMPLE; - VECCOPY(cumap->sample, _sample_col); - } - else - cumap->flag &= ~CUMA_DRAW_SAMPLE; + bNode *node= ptr->data; + CurveMapping *cumap= node->storage; - curvemap_buttons(block, node->storage, 'c', B_NODE_EXEC, B_REDR, butr); - } - return (int)(node->width-NODE_DY); + if(_sample_col) { + cumap->flag |= CUMA_DRAW_SAMPLE; + VECCOPY(cumap->sample, _sample_col); + } + else + cumap->flag &= ~CUMA_DRAW_SAMPLE; + + uiTemplateCurveMapping(layout, ptr, "mapping", 'c', 0); } -static int node_buts_normal(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_buts_normal(uiLayout *layout, PointerRNA *ptr) { - if(block) { - bNodeSocket *sock= node->outputs.first; /* first socket stores normal */ - - uiDefButF(block, BUT_NORMAL, B_NODE_EXEC, "", - (short)butr->xmin, (short)butr->ymin, butr->xmax-butr->xmin, butr->ymax-butr->ymin, - sock->ns.vec, 0.0f, 1.0f, 0, 0, ""); - - } - return (int)(node->width-NODE_DY); + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + rctf *butr= &node->butr; + bNodeSocket *sock= node->outputs.first; /* first socket stores normal */ + + uiDefButF(block, BUT_NORMAL, B_NODE_EXEC, "", + (short)butr->xmin, (short)butr->xmin, butr->xmax-butr->xmin, butr->xmax-butr->xmin, + sock->ns.vec, 0.0f, 1.0f, 0, 0, ""); } static void node_browse_tex_cb(bContext *C, void *ntree_v, void *node_v) @@ -401,8 +386,13 @@ static void node_dynamic_update_cb(bContext *C, void *ntree_v, void *node_v) // XXX BIF_preview_changed(ID_MA); } -static int node_buts_texture(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_buts_texture(uiLayout *layout, PointerRNA *ptr) { + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + bNodeTree *ntree= ptr->id.data; + rctf *butr= &node->butr; + short multi = ( node->id && ((Tex*)node->id)->use_nodes && @@ -410,49 +400,44 @@ static int node_buts_texture(uiBlock *block, bNodeTree *ntree, bNode *node, rctf (node->type != TEX_NODE_TEXTURE) ); - if(block) { - uiBut *bt; - char *strp; - short width = (short)(butr->xmax - butr->xmin); - - /* browse button texture */ - uiBlockBeginAlign(block); - IDnames_to_pupstring(&strp, NULL, "", &(G.main->tex), NULL, NULL); - node->menunr= 0; - bt= uiDefButS(block, MENU, B_NODE_EXEC, strp, - butr->xmin, butr->ymin+(multi?30:0), 20, 19, - &node->menunr, 0, 0, 0, 0, "Browse texture"); - uiButSetFunc(bt, node_browse_tex_cb, ntree, node); - if(strp) MEM_freeN(strp); - - if(node->id) { - bt= uiDefBut(block, TEX, B_NOP, "TE:", - butr->xmin+19, butr->ymin+(multi?30:0), butr->xmax-butr->xmin-19, 19, - node->id->name+2, 0.0, 19.0, 0, 0, "Texture name"); - uiButSetFunc(bt, node_ID_title_cb, node, NULL); - } - uiBlockEndAlign(block); - - if(multi) { - char *menustr = ntreeTexOutputMenu(((Tex*)node->id)->nodetree); - uiDefButS(block, MENU, B_MATPRV, menustr, butr->xmin, butr->ymin, width, 19, &node->custom1, 0, 0, 0, 0, "Which output to use, for multi-output textures"); - free(menustr); - return 50; - } - return 20; - } - else return multi? 50: 20; + uiBut *bt; + char *strp; + short width = (short)(butr->xmax - butr->xmin); + + /* browse button texture */ + uiBlockBeginAlign(block); + IDnames_to_pupstring(&strp, NULL, "", &(G.main->tex), NULL, NULL); + node->menunr= 0; + bt= uiDefButS(block, MENU, B_NODE_EXEC, strp, + butr->xmin, butr->ymin+(multi?30:0), 20, 19, + &node->menunr, 0, 0, 0, 0, "Browse texture"); + uiButSetFunc(bt, node_browse_tex_cb, ntree, node); + if(strp) MEM_freeN(strp); + + if(node->id) { + bt= uiDefBut(block, TEX, B_NOP, "TE:", + butr->xmin+19, butr->ymin+(multi?30:0), butr->xmax-butr->xmin-19, 19, + node->id->name+2, 0.0, 19.0, 0, 0, "Texture name"); + uiButSetFunc(bt, node_ID_title_cb, node, NULL); + } + uiBlockEndAlign(block); + + if(multi) { + char *menustr = ntreeTexOutputMenu(((Tex*)node->id)->nodetree); + uiDefButS(block, MENU, B_MATPRV, menustr, butr->xmin, butr->ymin, width, 19, &node->custom1, 0, 0, 0, 0, "Which output to use, for multi-output textures"); + free(menustr); + } } -static int node_buts_math(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_buts_math(uiLayout *layout, PointerRNA *ptr) { - if(block) { - uiBut *bt; + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + rctf *butr= &node->butr; + uiBut *bt; - bt=uiDefButS(block, MENU, B_NODE_EXEC, "Add %x0|Subtract %x1|Multiply %x2|Divide %x3|Sine %x4|Cosine %x5|Tangent %x6|Arcsine %x7|Arccosine %x8|Arctangent %x9|Power %x10|Logarithm %x11|Minimum %x12|Maximum %x13|Round %x14|Less Than %x15|Greater Than %x16", butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, &node->custom1, 0, 0, 0, 0, ""); - uiButSetFunc(bt, node_but_title_cb, node, bt); - } - return 20; + bt=uiDefButS(block, MENU, B_NODE_EXEC, "Add %x0|Subtract %x1|Multiply %x2|Divide %x3|Sine %x4|Cosine %x5|Tangent %x6|Arcsine %x7|Arccosine %x8|Arctangent %x9|Power %x10|Logarithm %x11|Minimum %x12|Maximum %x13|Round %x14|Less Than %x15|Greater Than %x16", butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, &node->custom1, 0, 0, 0, 0, ""); + uiButSetFunc(bt, node_but_title_cb, node, bt); } @@ -556,192 +541,192 @@ static void node_texmap_cb(bContext *C, void *texmap_v, void *unused_v) init_mapping(texmap_v); } -static int node_shader_buts_material(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_shader_buts_material(uiLayout *layout, PointerRNA *ptr) { - if(block) { - uiBut *bt; - short dx= (short)((butr->xmax-butr->xmin)/3.0f), has_us= (node->id && node->id->us>1); - short dy= (short)butr->ymin; - char *strp; - - /* WATCH IT: we use this callback in material buttons, but then only want first row */ - 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); - node->menunr= 0; - bt= uiDefButS(block, MENU, B_NOP, strp, - butr->xmin, dy, 19, 19, - &node->menunr, 0, 0, 0, 0, "Browses existing choices or adds NEW"); - uiButSetFunc(bt, node_browse_mat_cb, ntree, node); - if(strp) MEM_freeN(strp); + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + bNodeTree *ntree= ptr->id.data; + rctf *butr= &node->butr; + uiBut *bt; + short dx= (short)((butr->xmax-butr->xmin)/3.0f), has_us= (node->id && node->id->us>1); + short dy= (short)butr->ymin; + char *strp; + + /* WATCH IT: we use this callback in material buttons, but then only want first row */ + 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); + node->menunr= 0; + bt= uiDefButS(block, MENU, B_NOP, strp, + butr->xmin, dy, 19, 19, + &node->menunr, 0, 0, 0, 0, "Browses existing choices or adds NEW"); + uiButSetFunc(bt, node_browse_mat_cb, ntree, node); + if(strp) MEM_freeN(strp); + + /* Add New button */ + if(node->id==NULL) { + bt= uiDefBut(block, BUT, B_NOP, "Add New", + 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); + } + else { + /* name button */ + short width= (short)(butr->xmax-butr->xmin-19.0f - (has_us?19.0f:0.0f)); + bt= uiDefBut(block, TEX, B_NOP, "MA:", + butr->xmin+19, dy, width, 19, + node->id->name+2, 0.0, 19.0, 0, 0, "Material name"); + uiButSetFunc(bt, node_ID_title_cb, node, NULL); - /* Add New button */ - if(node->id==NULL) { - bt= uiDefBut(block, BUT, B_NOP, "Add New", - 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); + /* user amount */ + if(has_us) { + char str1[32]; + sprintf(str1, "%d", node->id->us); + bt= uiDefBut(block, BUT, B_NOP, str1, + butr->xmax-19, dy, 19, 19, + NULL, 0, 0, 0, 0, "Displays number of users. Click to make a single-user copy."); + uiButSetFunc(bt, node_mat_alone_cb, node, NULL); } - else { - /* name button */ - short width= (short)(butr->xmax-butr->xmin-19.0f - (has_us?19.0f:0.0f)); - bt= uiDefBut(block, TEX, B_NOP, "MA:", - butr->xmin+19, dy, width, 19, - node->id->name+2, 0.0, 19.0, 0, 0, "Material name"); - uiButSetFunc(bt, node_ID_title_cb, node, NULL); - - /* user amount */ - if(has_us) { - char str1[32]; - sprintf(str1, "%d", node->id->us); - bt= uiDefBut(block, BUT, B_NOP, str1, - butr->xmax-19, dy, 19, 19, - NULL, 0, 0, 0, 0, "Displays number of users. Click to make a single-user copy."); - uiButSetFunc(bt, node_mat_alone_cb, node, NULL); - } - - /* WATCH IT: we use this callback in material buttons, but then only want first row */ - if(butr->ymax-butr->ymin > 21.0f) { - /* node options */ - 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"); - uiDefButBitS(block, TOG, SH_NODE_MAT_SPEC, B_NODE_EXEC, "Spec", - butr->xmin+dx, butr->ymin, dx, 19, - &node->custom1, 0, 0, 0, 0, "Material Node outputs Specular"); - uiDefButBitS(block, TOG, SH_NODE_MAT_NEG, B_NODE_EXEC, "Neg Normal", - butr->xmax-dx, butr->ymin, dx, 19, - &node->custom1, 0, 0, 0, 0, "Material Node uses inverted Normal"); - } + + /* WATCH IT: we use this callback in material buttons, but then only want first row */ + if(butr->ymax-butr->ymin > 21.0f) { + /* node options */ + 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"); + uiDefButBitS(block, TOG, SH_NODE_MAT_SPEC, B_NODE_EXEC, "Spec", + butr->xmin+dx, butr->ymin, dx, 19, + &node->custom1, 0, 0, 0, 0, "Material Node outputs Specular"); + uiDefButBitS(block, TOG, SH_NODE_MAT_NEG, B_NODE_EXEC, "Neg Normal", + butr->xmax-dx, butr->ymin, dx, 19, + &node->custom1, 0, 0, 0, 0, "Material Node uses inverted Normal"); } - uiBlockEndAlign(block); - } - return 38; + } + uiBlockEndAlign(block); } -static int node_shader_buts_mapping(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_shader_buts_mapping(uiLayout *layout, PointerRNA *ptr) { - if(block) { - TexMapping *texmap= node->storage; - short dx= (short)((butr->xmax-butr->xmin)/7.0f); - short dy= (short)(butr->ymax-19); - - uiBlockSetFunc(block, node_texmap_cb, texmap, NULL); /* all buttons get this */ - - uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+dx, dy, 2*dx, 19, texmap->loc, -1000.0f, 1000.0f, 10, 2, ""); - uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+3*dx, dy, 2*dx, 19, texmap->loc+1, -1000.0f, 1000.0f, 10, 2, ""); - uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+5*dx, dy, 2*dx, 19, texmap->loc+2, -1000.0f, 1000.0f, 10, 2, ""); - dy-= 19; - uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+dx, dy, 2*dx, 19, texmap->rot, -1000.0f, 1000.0f, 1000, 1, ""); - uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+3*dx, dy, 2*dx, 19, texmap->rot+1, -1000.0f, 1000.0f, 1000, 1, ""); - uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+5*dx, dy, 2*dx, 19, texmap->rot+2, -1000.0f, 1000.0f, 1000, 1, ""); - dy-= 19; - uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+dx, dy, 2*dx, 19, texmap->size, -1000.0f, 1000.0f, 10, 2, ""); - uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+3*dx, dy, 2*dx, 19, texmap->size+1, -1000.0f, 1000.0f, 10, 2, ""); - uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+5*dx, dy, 2*dx, 19, texmap->size+2, -1000.0f, 1000.0f, 10, 2, ""); - dy-= 25; - uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+dx, dy, 2*dx, 19, texmap->min, -10.0f, 10.0f, 100, 2, ""); - uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+3*dx, dy, 2*dx, 19, texmap->min+1, -10.0f, 10.0f, 100, 2, ""); - uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+5*dx, dy, 2*dx, 19, texmap->min+2, -10.0f, 10.0f, 100, 2, ""); - dy-= 19; - uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+dx, dy, 2*dx, 19, texmap->max, -10.0f, 10.0f, 10, 2, ""); - uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+3*dx, dy, 2*dx, 19, texmap->max+1, -10.0f, 10.0f, 10, 2, ""); - uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+5*dx, dy, 2*dx, 19, texmap->max+2, -10.0f, 10.0f, 10, 2, ""); - uiBlockEndAlign(block); - - /* labels/options */ - - dy= (short)(butr->ymax-19); - uiDefBut(block, LABEL, B_NOP, "Loc", butr->xmin, dy, dx, 19, NULL, 0.0f, 0.0f, 0, 0, ""); - dy-= 19; - uiDefBut(block, LABEL, B_NOP, "Rot", butr->xmin, dy, dx, 19, NULL, 0.0f, 0.0f, 0, 0, ""); - dy-= 19; - uiDefBut(block, LABEL, B_NOP, "Size", butr->xmin, dy, dx, 19, NULL, 0.0f, 0.0f, 0, 0, ""); - dy-= 25; - uiDefButBitI(block, TOG, TEXMAP_CLIP_MIN, B_NODE_EXEC, "Min", butr->xmin, dy, dx-4, 19, &texmap->flag, 0.0f, 0.0f, 0, 0, ""); - dy-= 19; - uiDefButBitI(block, TOG, TEXMAP_CLIP_MAX, B_NODE_EXEC, "Max", butr->xmin, dy, dx-4, 19, &texmap->flag, 0.0f, 0.0f, 0, 0, ""); - - } - return 5*19 + 6; + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + rctf *butr= &node->butr; + TexMapping *texmap= node->storage; + short dx= (short)((butr->xmax-butr->xmin)/7.0f); + short dy= (short)(butr->ymax-19); + + uiBlockSetFunc(block, node_texmap_cb, texmap, NULL); /* all buttons get this */ + + uiBlockBeginAlign(block); + uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+dx, dy, 2*dx, 19, texmap->loc, -1000.0f, 1000.0f, 10, 2, ""); + uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+3*dx, dy, 2*dx, 19, texmap->loc+1, -1000.0f, 1000.0f, 10, 2, ""); + uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+5*dx, dy, 2*dx, 19, texmap->loc+2, -1000.0f, 1000.0f, 10, 2, ""); + dy-= 19; + uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+dx, dy, 2*dx, 19, texmap->rot, -1000.0f, 1000.0f, 1000, 1, ""); + uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+3*dx, dy, 2*dx, 19, texmap->rot+1, -1000.0f, 1000.0f, 1000, 1, ""); + uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+5*dx, dy, 2*dx, 19, texmap->rot+2, -1000.0f, 1000.0f, 1000, 1, ""); + dy-= 19; + uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+dx, dy, 2*dx, 19, texmap->size, -1000.0f, 1000.0f, 10, 2, ""); + uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+3*dx, dy, 2*dx, 19, texmap->size+1, -1000.0f, 1000.0f, 10, 2, ""); + uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+5*dx, dy, 2*dx, 19, texmap->size+2, -1000.0f, 1000.0f, 10, 2, ""); + dy-= 25; + uiBlockBeginAlign(block); + uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+dx, dy, 2*dx, 19, texmap->min, -10.0f, 10.0f, 100, 2, ""); + uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+3*dx, dy, 2*dx, 19, texmap->min+1, -10.0f, 10.0f, 100, 2, ""); + uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+5*dx, dy, 2*dx, 19, texmap->min+2, -10.0f, 10.0f, 100, 2, ""); + dy-= 19; + uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+dx, dy, 2*dx, 19, texmap->max, -10.0f, 10.0f, 10, 2, ""); + uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+3*dx, dy, 2*dx, 19, texmap->max+1, -10.0f, 10.0f, 10, 2, ""); + uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+5*dx, dy, 2*dx, 19, texmap->max+2, -10.0f, 10.0f, 10, 2, ""); + uiBlockEndAlign(block); + + /* labels/options */ + + dy= (short)(butr->ymax-19); + uiDefBut(block, LABEL, B_NOP, "Loc", butr->xmin, dy, dx, 19, NULL, 0.0f, 0.0f, 0, 0, ""); + dy-= 19; + uiDefBut(block, LABEL, B_NOP, "Rot", butr->xmin, dy, dx, 19, NULL, 0.0f, 0.0f, 0, 0, ""); + dy-= 19; + uiDefBut(block, LABEL, B_NOP, "Size", butr->xmin, dy, dx, 19, NULL, 0.0f, 0.0f, 0, 0, ""); + dy-= 25; + uiDefButBitI(block, TOG, TEXMAP_CLIP_MIN, B_NODE_EXEC, "Min", butr->xmin, dy, dx-4, 19, &texmap->flag, 0.0f, 0.0f, 0, 0, ""); + dy-= 19; + uiDefButBitI(block, TOG, TEXMAP_CLIP_MAX, B_NODE_EXEC, "Max", butr->xmin, dy, dx-4, 19, &texmap->flag, 0.0f, 0.0f, 0, 0, ""); } -static int node_shader_buts_vect_math(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_shader_buts_vect_math(uiLayout *layout, PointerRNA *ptr) { - if(block) { - uiBut *bt; - - bt=uiDefButS(block, MENU, B_NODE_EXEC, "Add %x0|Subtract %x1|Average %x2|Dot Product %x3 |Cross Product %x4|Normalize %x5", butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, &node->custom1, 0, 0, 0, 0, ""); - uiButSetFunc(bt, node_but_title_cb, node, bt); - } - return 20; + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + rctf *butr= &node->butr; + uiBut *bt; + + bt=uiDefButS(block, MENU, B_NODE_EXEC, "Add %x0|Subtract %x1|Average %x2|Dot Product %x3 |Cross Product %x4|Normalize %x5", butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, &node->custom1, 0, 0, 0, 0, ""); + uiButSetFunc(bt, node_but_title_cb, node, bt); } -static int node_shader_buts_geometry(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_shader_buts_geometry(uiLayout *layout, PointerRNA *ptr) { - if(block) { - uiBut *but; - NodeGeometry *ngeo= (NodeGeometry*)node->storage; + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + rctf *butr= &node->butr; + uiBut *but; + NodeGeometry *ngeo= (NodeGeometry*)node->storage; - // 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"); - // XXX uiButSetCompleteFunc(but, autocomplete_uv, NULL); + // 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"); + // XXX uiButSetCompleteFunc(but, autocomplete_uv, NULL); - if(!verify_valid_vcol_name(ngeo->colname)); + 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); - } - - return 40; + 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); } -static int node_shader_buts_dynamic(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_shader_buts_dynamic(uiLayout *layout, PointerRNA *ptr) { - if (block) { - uiBut *bt; - // XXX SpaceNode *snode= curarea->spacedata.first; - short dy= (short)butr->ymin; - int xoff=0; - - /* B_NODE_EXEC is handled in butspace.c do_node_buts */ - if(!node->id) { - char *strp; - IDnames_to_pupstring(&strp, NULL, "", &(G.main->text), NULL, NULL); - node->menunr= 0; - bt= uiDefButS(block, MENU, B_NODE_EXEC/*+node->nr*/, strp, - butr->xmin, dy, 19, 19, - &node->menunr, 0, 0, 0, 0, "Browses existing choices"); - uiButSetFunc(bt, node_browse_text_cb, ntree, node); - xoff=19; - if(strp) MEM_freeN(strp); - } - else { - bt = uiDefBut(block, BUT, B_NOP, "Update", - butr->xmin+xoff, butr->ymin+20, 50, 19, - &node->menunr, 0.0, 19.0, 0, 0, "Refresh this node (and all others that use the same script)"); - uiButSetFunc(bt, node_dynamic_update_cb, ntree, node); - - if (BTST(node->custom1, NODE_DYNAMIC_ERROR)) { - // UI_ThemeColor(TH_REDALERT); - // XXX ui_rasterpos_safe(butr->xmin + xoff, butr->ymin + 5, snode->aspect); - // XXX snode_drawstring(snode, "Error! Check console...", butr->xmax - butr->xmin); - ; - } + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + bNodeTree *ntree= ptr->id.data; + rctf *butr= &node->butr; + uiBut *bt; + // XXX SpaceNode *snode= curarea->spacedata.first; + short dy= (short)butr->ymin; + int xoff=0; + + /* B_NODE_EXEC is handled in butspace.c do_node_buts */ + if(!node->id) { + char *strp; + IDnames_to_pupstring(&strp, NULL, "", &(G.main->text), NULL, NULL); + node->menunr= 0; + bt= uiDefButS(block, MENU, B_NODE_EXEC/*+node->nr*/, strp, + butr->xmin, dy, 19, 19, + &node->menunr, 0, 0, 0, 0, "Browses existing choices"); + uiButSetFunc(bt, node_browse_text_cb, ntree, node); + xoff=19; + if(strp) MEM_freeN(strp); + } + else { + bt = uiDefBut(block, BUT, B_NOP, "Update", + butr->xmin+xoff, butr->ymin+20, 50, 19, + &node->menunr, 0.0, 19.0, 0, 0, "Refresh this node (and all others that use the same script)"); + uiButSetFunc(bt, node_dynamic_update_cb, ntree, node); + + if (BTST(node->custom1, NODE_DYNAMIC_ERROR)) { + // UI_ThemeColor(TH_REDALERT); + // XXX ui_rasterpos_safe(butr->xmin + xoff, butr->ymin + 5, snode->aspect); + // XXX snode_drawstring(snode, "Error! Check console...", butr->xmax - butr->xmin); + ; } } - return 20+19; } /* only once called */ @@ -752,49 +737,49 @@ static void node_shader_set_butfunc(bNodeType *ntype) case SH_NODE_MATERIAL: case SH_NODE_MATERIAL_EXT: - ntype->butfunc= node_shader_buts_material; + ntype->uifunc= node_shader_buts_material; break; case SH_NODE_TEXTURE: - ntype->butfunc= node_buts_texture; + ntype->uifunc= node_buts_texture; break; case SH_NODE_NORMAL: - ntype->butfunc= node_buts_normal; + ntype->uifunc= node_buts_normal; break; case SH_NODE_CURVE_VEC: - ntype->butfunc= node_buts_curvevec; + ntype->uifunc= node_buts_curvevec; break; case SH_NODE_CURVE_RGB: - ntype->butfunc= node_buts_curvecol; + ntype->uifunc= node_buts_curvecol; break; case SH_NODE_MAPPING: - ntype->butfunc= node_shader_buts_mapping; + ntype->uifunc= node_shader_buts_mapping; break; case SH_NODE_VALUE: - ntype->butfunc= node_buts_value; + ntype->uifunc= node_buts_value; break; case SH_NODE_RGB: - ntype->butfunc= node_buts_rgb; + ntype->uifunc= node_buts_rgb; break; case SH_NODE_MIX_RGB: - ntype->butfunc= node_buts_mix_rgb; + ntype->uifunc= node_buts_mix_rgb; break; case SH_NODE_VALTORGB: - ntype->butfunc= node_buts_valtorgb; + ntype->uifunc= node_buts_valtorgb; break; case SH_NODE_MATH: - ntype->butfunc= node_buts_math; + ntype->uifunc= node_buts_math; break; case SH_NODE_VECT_MATH: - ntype->butfunc= node_shader_buts_vect_math; + ntype->uifunc= node_shader_buts_vect_math; break; case SH_NODE_GEOMETRY: - ntype->butfunc= node_shader_buts_geometry; + ntype->uifunc= node_shader_buts_geometry; break; case NODE_DYNAMIC: - ntype->butfunc= node_shader_buts_dynamic; + ntype->uifunc= node_shader_buts_dynamic; break; default: - ntype->butfunc= NULL; + ntype->uifunc= NULL; } } @@ -879,112 +864,102 @@ static void image_layer_cb(bContext *C, void *ima_v, void *iuser_v) // allqueue(REDRAWNODE, 0); } -static int node_composit_buts_image(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_image(uiLayout *layout, PointerRNA *ptr) { + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + bNodeTree *ntree= ptr->id.data; + rctf *butr= &node->butr; ImageUser *iuser= node->storage; + uiBut *bt; + short dy= (short)butr->ymax-19; + char *strp; - if(block) { - uiBut *bt; - short dy= (short)butr->ymax-19; - char *strp; + uiBlockBeginAlign(block); + + /* browse button */ + IMAnames_to_pupstring(&strp, NULL, "LOAD NEW %x32767", &(G.main->image), NULL, NULL); + node->menunr= 0; + bt= uiDefButS(block, MENU, B_NOP, strp, + butr->xmin, dy, 19, 19, + &node->menunr, 0, 0, 0, 0, "Browses existing choices"); + uiButSetFunc(bt, node_browse_image_cb, ntree, node); + if(strp) MEM_freeN(strp); + + /* Add New button */ + if(node->id==NULL) { + bt= uiDefBut(block, BUT, B_NODE_LOADIMAGE, "Load New", + 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); + } + else { + /* name button + type */ + Image *ima= (Image *)node->id; + short xmin= (short)butr->xmin, xmax= (short)butr->xmax; + short width= xmax - xmin - 45; + short icon= ICON_IMAGE_DATA; - uiBlockBeginAlign(block); + if(ima->source==IMA_SRC_MOVIE) icon= ICON_SEQUENCE; + else if(ima->source==IMA_SRC_SEQUENCE) icon= ICON_IMAGE_COL; + else if(ima->source==IMA_SRC_GENERATED) icon= ICON_BLANK1; - /* browse button */ - IMAnames_to_pupstring(&strp, NULL, "LOAD NEW %x32767", &(G.main->image), NULL, NULL); - node->menunr= 0; - bt= uiDefButS(block, MENU, B_NOP, strp, - butr->xmin, dy, 19, 19, - &node->menunr, 0, 0, 0, 0, "Browses existing choices"); - uiButSetFunc(bt, node_browse_image_cb, ntree, node); - if(strp) MEM_freeN(strp); + bt= uiDefBut(block, TEX, B_NOP, "IM:", + xmin+19, dy, width, 19, + node->id->name+2, 0.0, 19.0, 0, 0, "Image name"); + uiButSetFunc(bt, node_ID_title_cb, node, NULL); - /* Add New button */ - if(node->id==NULL) { - bt= uiDefBut(block, BUT, B_NODE_LOADIMAGE, "Load New", - 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); - } - else { - /* name button + type */ - Image *ima= (Image *)node->id; - short xmin= (short)butr->xmin, xmax= (short)butr->xmax; - short width= xmax - xmin - 45; - short icon= ICON_IMAGE_DATA; - - if(ima->source==IMA_SRC_MOVIE) icon= ICON_SEQUENCE; - else if(ima->source==IMA_SRC_SEQUENCE) icon= ICON_IMAGE_COL; - else if(ima->source==IMA_SRC_GENERATED) icon= ICON_BLANK1; - - bt= uiDefBut(block, TEX, B_NOP, "IM:", - xmin+19, dy, width, 19, - node->id->name+2, 0.0, 19.0, 0, 0, "Image name"); - uiButSetFunc(bt, node_ID_title_cb, node, NULL); - - /* buffer type option */ - strp= node_image_type_pup(); - bt= uiDefIconTextButS(block, MENU, B_NOP, icon, strp, - xmax-26, dy, 26, 19, - &ima->source, 0.0, 19.0, 0, 0, "Image type"); - uiButSetFunc(bt, node_image_type_cb, node, ima); - MEM_freeN(strp); + /* buffer type option */ + strp= node_image_type_pup(); + bt= uiDefIconTextButS(block, MENU, B_NOP, icon, strp, + xmax-26, dy, 26, 19, + &ima->source, 0.0, 19.0, 0, 0, "Image type"); + uiButSetFunc(bt, node_image_type_cb, node, ima); + MEM_freeN(strp); + + if( ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE) ) { + width= (xmax-xmin)/2; - if( ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE) ) { - width= (xmax-xmin)/2; - - dy-= 19; - uiDefButI(block, NUM, B_NODE_EXEC, "Frs:", - xmin, dy, width, 19, - &iuser->frames, 1.0, MAXFRAMEF, 0, 0, "Amount of images used in animation"); - uiDefButI(block, NUM, B_NODE_EXEC, "SFra:", - xmin+width, dy, width, 19, - &iuser->sfra, 1.0, MAXFRAMEF, 0, 0, "Start frame of animation"); + dy-= 19; + uiDefButI(block, NUM, B_NODE_EXEC, "Frs:", + xmin, dy, width, 19, + &iuser->frames, 1.0, MAXFRAMEF, 0, 0, "Amount of images used in animation"); + uiDefButI(block, NUM, B_NODE_EXEC, "SFra:", + xmin+width, dy, width, 19, + &iuser->sfra, 1.0, MAXFRAMEF, 0, 0, "Start frame of animation"); + dy-= 19; + uiDefButI(block, NUM, B_NODE_EXEC, "Offs:", + xmin, dy, width, 19, + &iuser->offset, -MAXFRAMEF, MAXFRAMEF, 0, 0, "Offsets the number of the frame to use in the animation"); + uiDefButS(block, TOG, B_NODE_EXEC, "Cycl", + xmin+width, dy, width-20, 19, + &iuser->cycl, 0.0, 0.0, 0, 0, "Make animation go cyclic"); + uiDefIconButBitS(block, TOG, IMA_ANIM_ALWAYS, B_NODE_EXEC, ICON_AUTO, + xmax-20, dy, 20, 19, + &iuser->flag, 0.0, 0.0, 0, 0, "Always refresh Image on frame changes"); + } + if( ima->type==IMA_TYPE_MULTILAYER && ima->rr) { + RenderLayer *rl= BLI_findlink(&ima->rr->layers, iuser->layer); + if(rl) { + width= (xmax-xmin); dy-= 19; - uiDefButI(block, NUM, B_NODE_EXEC, "Offs:", + strp= layer_menu(ima->rr); + bt= uiDefButS(block, MENU, B_NODE_EXEC, strp, xmin, dy, width, 19, - &iuser->offset, -MAXFRAMEF, MAXFRAMEF, 0, 0, "Offsets the number of the frame to use in the animation"); - uiDefButS(block, TOG, B_NODE_EXEC, "Cycl", - xmin+width, dy, width-20, 19, - &iuser->cycl, 0.0, 0.0, 0, 0, "Make animation go cyclic"); - uiDefIconButBitS(block, TOG, IMA_ANIM_ALWAYS, B_NODE_EXEC, ICON_AUTO, - xmax-20, dy, 20, 19, - &iuser->flag, 0.0, 0.0, 0, 0, "Always refresh Image on frame changes"); - } - if( ima->type==IMA_TYPE_MULTILAYER && ima->rr) { - RenderLayer *rl= BLI_findlink(&ima->rr->layers, iuser->layer); - if(rl) { - width= (xmax-xmin); - dy-= 19; - strp= layer_menu(ima->rr); - bt= uiDefButS(block, MENU, B_NODE_EXEC, strp, - xmin, dy, width, 19, - &iuser->layer, 0.0, 10000.0, 0, 0, "Layer"); - uiButSetFunc(bt, image_layer_cb, ima->rr, node->storage); - MEM_freeN(strp); - } + &iuser->layer, 0.0, 10000.0, 0, 0, "Layer"); + uiButSetFunc(bt, image_layer_cb, ima->rr, node->storage); + MEM_freeN(strp); } } + } - } if(node->id) { - Image *ima= (Image *)node->id; - int retval= 19; - /* for each draw we test for anim refresh event */ if(iuser->flag & IMA_ANIM_REFRESHED) { iuser->flag &= ~IMA_ANIM_REFRESHED; // addqueue(curarea->win, UI_BUT_EVENT, B_NODE_EXEC); XXX } - - if( ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE) ) - retval+= 38; - if( ima->type==IMA_TYPE_MULTILAYER) - retval+= 19; - return retval; } - else - return 19; } /* if we use render layers from other scene, we make a nice title */ @@ -1057,9 +1032,14 @@ static void node_browse_scene_cb(bContext *C, void *ntree_v, void *node_v) } -static int node_composit_buts_renderlayers(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_renderlayers(uiLayout *layout, PointerRNA *ptr) { - if(block && node->id) { + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + bNodeTree *ntree= ptr->id.data; + rctf *butr= &node->butr; + + if(node->id) { Scene *scene= (Scene *)node->id; uiBut *bt; char *strp; @@ -1094,7 +1074,6 @@ static int node_composit_buts_renderlayers(uiBlock *block, bNodeTree *ntree, bNo &node->custom2, 0, 0, 0, 0, "Re-render this Layer"); } - return 19; } static void node_blur_relative_cb(bContext *C, void *node, void *poin2) @@ -1126,734 +1105,426 @@ static void node_blur_update_sizey_cb(bContext *C, void *node, void *poin2) nbd->sizey= (int)(nbd->percenty*nbd->image_in_height); } -static int node_composit_buts_blur(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_blur(uiLayout *layout, PointerRNA *ptr) { - if(block) { - NodeBlurData *nbd= node->storage; - uiBut *bt; - short dy= butr->ymin+58; - short dx= (butr->xmax-butr->xmin)/2; - char str[256]; - - uiBlockBeginAlign(block); - sprintf(str, "Filter Type%%t|Flat %%x%d|Tent %%x%d|Quad %%x%d|Cubic %%x%d|Gauss %%x%d|Fast 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_FAST_GAUSS, R_FILTER_CATROM, R_FILTER_MITCH); - uiDefButS(block, MENU, B_NODE_EXEC,str, - butr->xmin, dy, dx*2, 19, - &nbd->filtertype, 0, 0, 0, 0, "Set sampling filter for blur"); - dy-=19; - if (nbd->filtertype != R_FILTER_FAST_GAUSS) { - uiDefButC(block, TOG, B_NODE_EXEC, "Bokeh", - butr->xmin, dy, dx, 19, - &nbd->bokeh, 0, 0, 0, 0, "Uses circular filter, warning it's slow!"); - uiDefButC(block, TOG, B_NODE_EXEC, "Gamma", - butr->xmin+dx, dy, dx, 19, - &nbd->gamma, 0, 0, 0, 0, "Applies filter on gamma corrected values"); - } else { - uiBlockEndAlign(block); - uiBlockBeginAlign(block); - } - dy-=19; - bt= uiDefButS(block, TOG, B_NOP, "Relative", - butr->xmin, dy, dx*2, 19, - &nbd->relative, 0, 0, 0, 0, "Use relative (percent) values to define blur radius"); - uiButSetFunc(bt, node_blur_relative_cb, node, NULL); - - dy-=19; - if(nbd->relative) { - bt= uiDefButF(block, NUM, B_NODE_EXEC, "X:", - butr->xmin, dy, dx, 19, - &nbd->percentx, 0.0f, 1.0f, 0, 0, ""); - uiButSetFunc(bt, node_blur_update_sizex_cb, node, NULL); - bt= uiDefButF(block, NUM, B_NODE_EXEC, "Y:", - butr->xmin+dx, dy, dx, 19, - &nbd->percenty, 0.0f, 1.0f, 0, 0, ""); - uiButSetFunc(bt, node_blur_update_sizey_cb, node, NULL); - } - else { - uiDefButS(block, NUM, B_NODE_EXEC, "X:", - butr->xmin, dy, dx, 19, - &nbd->sizex, 0, 256, 0, 0, ""); - uiDefButS(block, NUM, B_NODE_EXEC, "Y:", - butr->xmin+dx, dy, dx, 19, - &nbd->sizey, 0, 256, 0, 0, ""); - } - uiBlockEndAlign(block); + uiLayout *col; + + col= uiLayoutColumn(layout, 0); + + uiItemR(col, "", 0, ptr, "filter_type", 0); + /* Only for "Fast Gaussian" */ + if (RNA_enum_get(ptr, "filter_type")!= 7) { + uiItemR(col, NULL, 0, ptr, "bokeh", 0); + uiItemR(col, NULL, 0, ptr, "gamma", 0); + } + + uiItemR(col, NULL, 0, ptr, "relative", 0); + col= uiLayoutColumn(layout, 1); + if (RNA_boolean_get(ptr, "relative")== 1) { + uiItemR(col, "X", 0, ptr, "factor_x", 0); + uiItemR(col, "Y", 0, ptr, "factor_y", 0); + } + else { + uiItemR(col, "X", 0, ptr, "sizex", 0); + uiItemR(col, "Y", 0, ptr, "sizey", 0); } - return 77; } -static int node_composit_buts_dblur(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_dblur(uiLayout *layout, PointerRNA *ptr) { - if(block) { - NodeDBlurData *ndbd = node->storage; - short dy = butr->ymin + 171; - short dx = butr->xmax - butr->xmin; - short halfdx= (short)dx/2; - - uiBlockBeginAlign(block); - uiDefButS(block, NUM, B_NODE_EXEC, "Iterations:", - butr->xmin, dy, dx, 19, - &ndbd->iter, 1, 32, 10, 0, "Amount of iterations"); - uiDefButC(block, TOG, B_NODE_EXEC, "Wrap", - butr->xmin, dy-= 19, dx, 19, - &ndbd->wrap, 0, 0, 0, 0, "Wrap blur"); - uiBlockEndAlign(block); - - dy-= 9; - - uiDefBut(block, LABEL, B_NOP, "Center", butr->xmin, dy-= 19, dx, 19, NULL, 0.0f, 0.0f, 0, 0, ""); - - uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_NODE_EXEC, "X:", - butr->xmin, dy-= 19, halfdx, 19, - &ndbd->center_x, 0.0f, 1.0f, 10, 0, "X center in percents"); - uiDefButF(block, NUM, B_NODE_EXEC, "Y:", - butr->xmin+halfdx, dy, halfdx, 19, - &ndbd->center_y, 0.0f, 1.0f, 10, 0, "Y center in percents"); - uiBlockEndAlign(block); + uiLayout *col; + + uiItemR(layout, NULL, 0, ptr, "iterations", 0); + uiItemR(layout, NULL, 0, ptr, "wrap", 0); + + col= uiLayoutColumn(layout, 1); + uiItemL(col, "Center:", 0); + uiItemR(col, "X", 0, ptr, "center_x", 0); + uiItemR(col, "Y", 0, ptr, "center_y", 0); + + uiItemS(layout); + + col= uiLayoutColumn(layout, 1); + uiItemR(col, NULL, 0, ptr, "distance", 0); + uiItemR(col, NULL, 0, ptr, "angle", 0); + + uiItemS(layout); + + uiItemR(layout, NULL, 0, ptr, "spin", 0); + uiItemR(layout, NULL, 0, ptr, "zoom", 0); +} - dy-= 9; +static void node_composit_buts_bilateralblur(uiLayout *layout, PointerRNA *ptr) +{ + uiLayout *col; + + col= uiLayoutColumn(layout, 1); + uiItemR(col, NULL, 0, ptr, "iterations", 0); + uiItemR(col, NULL, 0, ptr, "sigma_color", 0); + uiItemR(col, NULL, 0, ptr, "sigma_space", 0); +} - uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_NODE_EXEC, "Distance:", - butr->xmin, dy-= 19, dx, 19, - &ndbd->distance, -1.0f, 1.0f, 10, 0, "Amount of which the image moves"); - uiDefButF(block, NUM, B_NODE_EXEC, "Angle:", - butr->xmin, dy-= 19, dx, 19, - &ndbd->angle, 0.0f, 360.0f, 1000, 0, "Angle in which the image will be moved"); - uiBlockEndAlign(block); +/* qdn: defocus node */ +static void node_composit_buts_defocus(uiLayout *layout, PointerRNA *ptr) +{ + uiLayout *sub, *col; + + col= uiLayoutColumn(layout, 0); + uiItemL(col, "Bokeh Type:", 0); + uiItemR(col, "", 0, ptr, "bokeh", 0); + uiItemR(col, NULL, 0, ptr, "angle", 0); - dy-= 9; + uiItemR(layout, NULL, 0, ptr, "gamma_correction", 0); - uiDefButF(block, NUM, B_NODE_EXEC, "Spin:", - butr->xmin, dy-= 19, dx, 19, - &ndbd->spin, -360.0f, 360.0f, 1000, 0, "Angle that is used to spin the image"); + col = uiLayoutColumn(layout, 0); + uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_zbuffer")==0); + uiItemR(col, NULL, 0, ptr, "f_stop", 0); - dy-= 9; + uiItemR(layout, NULL, 0, ptr, "max_blur", 0); + uiItemR(layout, NULL, 0, ptr, "threshold", 0); + + // Preview + col = uiLayoutColumn(layout, 0); + uiItemR(col, NULL, 0, ptr, "preview", 0); + sub = uiLayoutColumn(col, 0); + uiLayoutSetActive(sub, RNA_boolean_get(ptr, "preview")); + uiItemR(sub, NULL, 0, ptr, "samples", 0); + + // Z-Buffer + col = uiLayoutColumn(layout, 0); + uiItemR(col, NULL, 0, ptr, "use_zbuffer", 0); + sub = uiLayoutColumn(col, 0); + uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_zbuffer")); + uiItemR(sub, NULL, 0, ptr, "z_scale", 0); +} - uiDefButF(block, NUM, B_NODE_EXEC, "Zoom:", - butr->xmin, dy-= 19, dx, 19, - &ndbd->zoom, 0.0f, 100.0f, 100, 0, "Amount of which the image is zoomed"); +/* qdn: glare node */ +static void node_composit_buts_glare(uiLayout *layout, PointerRNA *ptr) +{ + uiItemR(layout, "", 0, ptr, "glare_type", 0); + uiItemR(layout, "", 0, ptr, "quality", 0); + if (RNA_enum_get(ptr, "glare_type")!= 1) { + uiItemR(layout, NULL, 0, ptr, "iterations", 0); + + if (RNA_enum_get(ptr, "glare_type")!= 0) + uiItemR(layout, NULL, 0, ptr, "color_modulation", UI_ITEM_R_SLIDER); } - return 190; -} + + uiItemR(layout, NULL, 0, ptr, "mix", 0); + uiItemR(layout, NULL, 0, ptr, "threshold", 0); -static int node_composit_buts_bilateralblur(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) -{ - if(block) { - NodeBilateralBlurData *nbbd= node->storage; - short dy= butr->ymin+38; - short dx= (butr->xmax-butr->xmin); - - uiBlockBeginAlign(block); - uiDefButS(block, NUM, B_NODE_EXEC, "Iterations:", - butr->xmin, dy, dx, 19, - &nbbd->iter, 1, 128, 0, 0, "Amount of iterations"); - dy-=19; - uiDefButF(block, NUM, B_NODE_EXEC, "Color Sigma:", - butr->xmin, dy, dx, 19, - &nbbd->sigma_color,0.01, 3, 10, 0, "Sigma value used to modify color"); - dy-=19; - uiDefButF(block, NUM, B_NODE_EXEC, "Space Sigma:", - butr->xmin, dy, dx, 19, - &nbbd->sigma_space ,0.01, 30, 10, 0, "Sigma value used to modify space"); + if (RNA_enum_get(ptr, "glare_type")== 2) { + uiItemR(layout, NULL, 0, ptr, "streaks", 0); + uiItemR(layout, NULL, 0, ptr, "angle_offset", 0); + } + if (RNA_enum_get(ptr, "glare_type")== 0 || RNA_enum_get(ptr, "glare_type")== 2) { + uiItemR(layout, NULL, 0, ptr, "fade", UI_ITEM_R_SLIDER); + if (RNA_enum_get(ptr, "glare_type")== 0) + uiItemR(layout, NULL, 0, ptr, "rotate_45", 0); } - return 57; -} - -/* qdn: defocus node */ -static int node_composit_buts_defocus(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) -{ - if(block) { - NodeDefocus *nqd = node->storage; - short dy = butr->ymin + 209; - short dx = butr->xmax - butr->xmin; - char* mstr1 = "Bokeh Type%t|Octagon %x8|Heptagon %x7|Hexagon %x6|Pentagon %x5|Square %x4|Triangle %x3|Disk %x0"; - - uiDefBut(block, LABEL, B_NOP, "Bokeh Type", butr->xmin, dy, dx, 19, NULL, 0, 0, 0, 0, ""); - uiDefButC(block, MENU, B_NODE_EXEC, mstr1, - butr->xmin, dy-19, dx, 19, - &nqd->bktype, 0, 0, 0, 0, "Bokeh type"); - if (nqd->bktype) { /* for some reason rotating a disk doesn't seem to work... ;) */ - uiDefButC(block, NUM, B_NODE_EXEC, "Rotate:", - butr->xmin, dy-38, dx, 19, - &nqd->rotation, 0, 90, 0, 0, "Bokeh shape rotation offset in degrees"); - } - uiDefButC(block, TOG, B_NODE_EXEC, "Gamma Correct", - butr->xmin, dy-57, dx, 19, - &nqd->gamco, 0, 0, 0, 0, "Enable gamma correction before and after main process"); - if (nqd->no_zbuf==0) { - // only needed for zbuffer input - uiDefButF(block, NUM, B_NODE_EXEC, "fStop:", - butr->xmin, dy-76, dx, 19, - &nqd->fstop, 0.5, 128, 10, 0, "Amount of focal blur, 128=infinity=perfect focus, half the value doubles the blur radius"); - } - uiDefButF(block, NUM, B_NODE_EXEC, "Maxblur:", - butr->xmin, dy-95, dx, 19, - &nqd->maxblur, 0, 10000, 1000, 0, "blur limit, maximum CoC radius, 0=no limit"); - uiDefButF(block, NUM, B_NODE_EXEC, "BThreshold:", - butr->xmin, dy-114, dx, 19, - &nqd->bthresh, 0, 100, 100, 0, "CoC radius threshold, prevents background bleed on in-focus midground, 0=off"); - uiDefButC(block, TOG, B_NODE_EXEC, "Preview", - butr->xmin, dy-142, dx, 19, - &nqd->preview, 0, 0, 0, 0, "Enable sampling mode, useful for preview when using low samplecounts"); - if (nqd->preview) { - /* only visible when sampling mode enabled */ - uiDefButS(block, NUM, B_NODE_EXEC, "Samples:", - butr->xmin, dy-161, dx, 19, - &nqd->samples, 16, 256, 0, 0, "Number of samples (16=grainy, higher=less noise)"); - } - uiDefButS(block, TOG, B_NODE_EXEC, "No zbuffer", - butr->xmin, dy-190, dx, 19, - &nqd->no_zbuf, 0, 0, 0, 0, "Enable when using an image as input instead of actual zbuffer (auto enabled if node not image based, eg. time node)"); - if (nqd->no_zbuf) { - uiDefButF(block, NUM, B_NODE_EXEC, "Zscale:", - butr->xmin, dy-209, dx, 19, - &nqd->scale, 0, 1000, 100, 0, "Scales the Z input when not using a zbuffer, controls maximum blur designated by the color white or input value 1"); - } + if (RNA_enum_get(ptr, "glare_type")== 1) { + uiItemR(layout, NULL, 0, ptr, "size", 0); } - return 228; } +/* qdn: tonemap node */ +static void node_composit_buts_tonemap(uiLayout *layout, PointerRNA *ptr) +{ + uiLayout *col; -/* qdn: glare node */ -static int node_composit_buts_glare(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) -{ - if(block) { - NodeGlare *ndg = node->storage; - short dy = butr->ymin + 152, dx = butr->xmax - butr->xmin; - char* mn1 = "Type%t|Ghosts%x3|Streaks%x2|Fog Glow%x1|Simple Star%x0"; - char* mn2 = "Quality/Speed%t|High/Slow%x0|Medium/Medium%x1|Low/Fast%x2"; - uiDefButC(block, MENU, B_NODE_EXEC, mn1, - butr->xmin, dy, dx, 19, - &ndg->type, 0, 0, 0, 0, "Glow/Flare/Bloom type"); - uiDefButC(block, MENU, B_NODE_EXEC, mn2, - butr->xmin, dy-19, dx, 19, - &ndg->quality, 0, 0, 0, 0, - "Quality speed trade off, if not set to high quality, effect will be applied to low-res copy of source image"); - if (ndg->type != 1) { - uiDefButC(block, NUM, B_NODE_EXEC, "Iterations:", - butr->xmin, dy-38, dx, 19, - &ndg->iter, 2, 5, 1, 0, - "higher values will generate longer/more streaks/ghosts"); - if (ndg->type != 0) - uiDefButF(block, NUM, B_NODE_EXEC, "ColMod:", - butr->xmin, dy-57, dx, 19, - &ndg->colmod, 0, 1, 10, 0, - "Amount of Color Modulation, modulates colors of streaks and ghosts for a spectral dispersion effect"); - } - uiDefButF(block, NUM, B_NODE_EXEC, "Mix:", - butr->xmin, dy-76, dx, 19, - &ndg->mix, -1, 1, 10, 0, - "Mix balance, -1 is original image only, 0 is exact 50/50 mix, 1 is processed image only"); - uiDefButF(block, NUM, B_NODE_EXEC, "Threshold:", - butr->xmin, dy-95, dx, 19, - &ndg->threshold, 0, 1000, 10, 0, - "Brightness threshold, the glarefilter will be applied only to pixels brighter than this value"); - if ((ndg->type == 2) || (ndg->type == 0)) - { - if (ndg->type == 2) { - uiDefButC(block, NUM, B_NODE_EXEC, "streaks:", - butr->xmin, dy-114, dx, 19, - &ndg->angle, 2, 16, 1000, 0, - "Total number of streaks"); - uiDefButC(block, NUM, B_NODE_EXEC, "AngOfs:", - butr->xmin, dy-133, dx, 19, - &ndg->angle_ofs, 0, 180, 1000, 0, - "Streak angle rotation offset in degrees"); - } - uiDefButF(block, NUM, B_NODE_EXEC, "Fade:", - butr->xmin, dy-152, dx, 19, - &ndg->fade, 0.75, 1, 5, 0, - "Streak fade out factor"); - } - if (ndg->type == 0) - uiDefButC(block, TOG, B_NODE_EXEC, "Rot45", - butr->xmin, dy-114, dx, 19, - &ndg->angle, 0, 0, 0, 0, - "simple star filter, add 45 degree rotation offset"); - if ((ndg->type == 1) || (ndg->type > 3)) // PBGH and fog glow - uiDefButC(block, NUM, B_NODE_EXEC, "Size:", - butr->xmin, dy-114, dx, 19, - &ndg->size, 6, 9, 1000, 0, - "glow/glare size (not actual size, relative to initial size of bright area of pixels)"); + col = uiLayoutColumn(layout, 0); + uiItemR(col, "", 0, ptr, "tonemap_type", 0); + if (RNA_enum_get(ptr, "tonemap_type")== 0) { + uiItemR(col, NULL, 0, ptr, "key", UI_ITEM_R_SLIDER); + uiItemR(col, NULL, 0, ptr, "offset", 0); + uiItemR(col, NULL, 0, ptr, "gamma", 0); } - return 171; -} - -/* qdn: tonemap node */ -static int node_composit_buts_tonemap(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) -{ - if(block) { - NodeTonemap *ntm = node->storage; - short dy = butr->ymin + 76, dx = butr->xmax - butr->xmin; - char* mn = "Type%t|R/D Photoreceptor%x1|Rh Simple%x0"; - - uiBlockBeginAlign(block); - uiDefButI(block, MENU, B_NODE_EXEC, mn, - butr->xmin, dy, dx, 19, - &ntm->type, 0, 0, 0, 0, - "Tone mapping type"); - if (ntm->type == 0) { - uiDefButF(block, NUM, B_NODE_EXEC, "Key:", - butr->xmin, dy-19, dx, 19, - &ntm->key, 0, 1, 5, 0, - "The value the average luminance is mapped to"); - uiDefButF(block, NUM, B_NODE_EXEC, "Offset:", - butr->xmin, dy-38, dx, 19, - &ntm->offset, 0.001, 10, 5, 0, - "Tonemap offset, normally always 1, but can be used as an extra control to alter the brightness curve"); - uiDefButF(block, NUM, B_NODE_EXEC, "Gamma:", - butr->xmin, dy-57, dx, 19, - &ntm->gamma, 0.001, 3, 5, 0, - "Gamma factor, if not used, set to 1"); - } - else { - uiDefButF(block, NUM, B_NODE_EXEC, "Intensity:", - butr->xmin, dy-19, dx, 19, - &ntm->f, -8, 8, 10, 0, "if less than zero, darkens image, otherwise makes it brighter"); - uiDefButF(block, NUM, B_NODE_EXEC, "Contrast:", - butr->xmin, dy-38, dx, 19, - &ntm->m, 0, 1, 5, 0, "Set to 0 to use estimate from input image"); - uiDefButF(block, NUM, B_NODE_EXEC, "Adaptation:", - butr->xmin, dy-57, dx, 19, - &ntm->a, 0, 1, 5, 0, "if 0, global, if 1, based on pixel intensity"); - uiDefButF(block, NUM, B_NODE_EXEC, "ColCorrect:", - butr->xmin, dy-76, dx, 19, - &ntm->c, 0, 1, 5, 0, "color correction, if 0, same for all channels, if 1, each independent"); - } - uiBlockEndAlign(block); + else { + uiItemR(col, NULL, 0, ptr, "intensity", 0); + uiItemR(col, NULL, 0, ptr, "contrast", UI_ITEM_R_SLIDER); + uiItemR(col, NULL, 0, ptr, "adaptation", UI_ITEM_R_SLIDER); + uiItemR(col, NULL, 0, ptr, "correction", UI_ITEM_R_SLIDER); } - return 95; } /* qdn: lens distortion node */ -static int node_composit_buts_lensdist(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_lensdist(uiLayout *layout, PointerRNA *ptr) { - if(block) { - NodeLensDist *nld = node->storage; - short dy = butr->ymin + 19, dx = butr->xmax - butr->xmin; - uiBlockBeginAlign(block); - uiDefButS(block, TOG, B_NODE_EXEC, "Projector", - butr->xmin, dy, dx, 19, - &nld->proj, 0, 0, 0, 0, - "Enable/disable projector mode, effect is applied in horizontal direction only"); - if (!nld->proj) { - uiDefButS(block, TOG, B_NODE_EXEC, "Jitter", - butr->xmin, dy-19, dx/2, 19, - &nld->jit, 0, 0, 0, 0, - "Enable/disable jittering, faster, but also noisier"); - uiDefButS(block, TOG, B_NODE_EXEC, "Fit", - butr->xmin+dx/2, dy-19, dx/2, 19, - &nld->fit, 0, 0, 0, 0, - "For positive distortion factor only, scale image such that black areas are not visible"); - } - uiBlockEndAlign(block); - } - return 38; -} + uiLayout *col; + col= uiLayoutColumn(layout, 0); + uiItemR(col, NULL, 0, ptr, "projector", 0); -static int node_composit_buts_vecblur(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) -{ - if(block) { - PointerRNA ptr; - short dy= butr->ymin; - short dx= (butr->xmax-butr->xmin); - - RNA_pointer_create((ID *)ntree, &RNA_Node, node, &ptr); - - uiBlockBeginAlign(block); - uiDefButR(block, NUM, B_NODE_EXEC, NULL, - butr->xmin, dy+76, dx, 19, - &ptr, "samples", 0, 1, 256, 0, 0, NULL); - uiDefButR(block, NUM, B_NODE_EXEC, NULL, - butr->xmin, dy+57, dx, 19, - &ptr, "min_speed", 0, 0, 1024, 0, 0, NULL); - uiDefButR(block, NUM, B_NODE_EXEC, NULL, - butr->xmin, dy+38, dx, 19, - &ptr, "max_speed", 0, 0, 1024, 0, 0, NULL); - uiDefButR(block, NUM, B_NODE_EXEC, "Blur", - butr->xmin, dy+19, dx, 19, - &ptr, "factor", 0, 0, 2, 10, 2, NULL); - uiDefButR(block, TOG, B_NODE_EXEC, NULL, - butr->xmin, dy, dx, 19, - &ptr, "curved", 0, 0, 2, 10, 2, NULL); - uiBlockEndAlign(block); - } - return 95; + col = uiLayoutColumn(col, 0); + uiLayoutSetActive(col, RNA_boolean_get(ptr, "projector")==0); + uiItemR(col, NULL, 0, ptr, "jitter", 0); + uiItemR(col, NULL, 0, ptr, "fit", 0); } -static int node_composit_buts_filter(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_vecblur(uiLayout *layout, PointerRNA *ptr) { - if(block) { - uiBut *bt; - - /* blend type */ - bt=uiDefButS(block, MENU, B_NODE_EXEC, "Soften %x0|Sharpen %x1|Laplace %x2|Sobel %x3|Prewitt %x4|Kirsch %x5|Shadow %x6", - butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, - &node->custom1, 0, 0, 0, 0, ""); - uiButSetFunc(bt, node_but_title_cb, node, bt); - } - return 20; + uiLayout *col; + + col= uiLayoutColumn(layout, 0); + uiItemR(col, NULL, 0, ptr, "samples", 0); + uiItemR(col, "Blur", 0, ptr, "factor", 0); + + col= uiLayoutColumn(layout, 1); + uiItemL(col, "Speed:", 0); + uiItemR(col, "Min", 0, ptr, "min_speed", 0); + uiItemR(col, "Max", 0, ptr, "max_speed", 0); + + uiItemR(layout, NULL, 0, ptr, "curved", 0); } -static int node_composit_buts_flip(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_filter(uiLayout *layout, PointerRNA *ptr) { - if(block) { - uiBut *bt; - - /* flip x\y */ - bt=uiDefButS(block, MENU, B_NODE_EXEC, "Flip X %x0|Flip Y %x1|Flip X & Y %x2", - butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, - &node->custom1, 0, 0, 0, 0, ""); - uiButSetFunc(bt, node_but_title_cb, node, bt); - } - return 20; + uiItemR(layout, "", 0, ptr, "filter_type", 0); } -static int node_composit_buts_crop(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_flip(uiLayout *layout, PointerRNA *ptr) { - if(block) { - NodeTwoXYs *ntxy= node->storage; - char elementheight = 19; - short dx= (butr->xmax-butr->xmin)/2; - short dy= butr->ymax - elementheight; - short xymin= 0, xymax= 10000; - - uiBlockBeginAlign(block); - - /* crop image size toggle */ - uiDefButS(block, TOG, B_NODE_EXEC, "Crop Image Size", - butr->xmin, dy, dx*2, elementheight, - &node->custom1, 0, 0, 0, 0, "Crop the size of the input image."); - - dy-=elementheight; - - /* x1 */ - uiDefButS(block, NUM, B_NODE_EXEC, "X1:", - butr->xmin, dy, dx, elementheight, - &ntxy->x1, xymin, xymax, 0, 0, ""); - /* y1 */ - uiDefButS(block, NUM, B_NODE_EXEC, "Y1:", - butr->xmin+dx, dy, dx, elementheight, - &ntxy->y1, xymin, xymax, 0, 0, ""); - - dy-=elementheight; - - /* x2 */ - uiDefButS(block, NUM, B_NODE_EXEC, "X2:", - butr->xmin, dy, dx, elementheight, - &ntxy->x2, xymin, xymax, 0, 0, ""); - /* y2 */ - uiDefButS(block, NUM, B_NODE_EXEC, "Y2:", - butr->xmin+dx, dy, dx, elementheight, - &ntxy->y2, xymin, xymax, 0, 0, ""); - - uiBlockEndAlign(block); - } - return 60; + uiItemR(layout, "", 0, ptr, "axis", 0); } -static int node_composit_buts_splitviewer(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_crop(uiLayout *layout, PointerRNA *ptr) { - if(block) { - uiBlockBeginAlign(block); - - uiDefButS(block, ROW, B_NODE_EXEC, "X", - butr->xmin, butr->ymin+19, (butr->xmax-butr->xmin)/2, 20, - &node->custom2, 0.0, 0.0, 0, 0, ""); - uiDefButS(block, ROW, B_NODE_EXEC, "Y", - butr->xmin+(butr->xmax-butr->xmin)/2, butr->ymin+19, (butr->xmax-butr->xmin)/2, 20, - &node->custom2, 0.0, 1.0, 0, 0, ""); - - uiDefButS(block, NUMSLI, B_NODE_EXEC, "Split %: ", - butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, &node->custom1, 0, 100, 10, 0, ""); - } - return 40; -} - -static int node_composit_buts_map_value(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) -{ - if(block) { - TexMapping *texmap= node->storage; - short xstart= (short)butr->xmin; - short dy= (short)(butr->ymax-19.0f); - short dx= (short)(butr->xmax-butr->xmin)/2; - - uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_NODE_EXEC, "Offs:", xstart, dy, 2*dx, 19, texmap->loc, -1000.0f, 1000.0f, 10, 2, ""); - dy-= 19; - uiDefButF(block, NUM, B_NODE_EXEC, "Size:", xstart, dy, 2*dx, 19, texmap->size, -1000.0f, 1000.0f, 10, 3, ""); - dy-= 23; - uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, TEXMAP_CLIP_MIN, B_NODE_EXEC, "Min", xstart, dy, dx, 19, &texmap->flag, 0.0f, 0.0f, 0, 0, ""); - uiDefButF(block, NUM, B_NODE_EXEC, "", xstart+dx, dy, dx, 19, texmap->min, -1000.0f, 1000.0f, 10, 2, ""); - dy-= 19; - uiDefButBitI(block, TOG, TEXMAP_CLIP_MAX, B_NODE_EXEC, "Max", xstart, dy, dx, 19, &texmap->flag, 0.0f, 0.0f, 0, 0, ""); - uiDefButF(block, NUM, B_NODE_EXEC, "", xstart+dx, dy, dx, 19, texmap->max, -1000.0f, 1000.0f, 10, 2, ""); - } - return 80; + uiLayout *col; + + uiItemR(layout, NULL, 0, ptr, "crop_size", 0); + + col= uiLayoutColumn(layout, 1); + uiItemR(col, "Left", 0, ptr, "x1", 0); + uiItemR(col, "Right", 0, ptr, "x2", 0); + uiItemR(col, "Up", 0, ptr, "y1", 0); + uiItemR(col, "Down", 0, ptr, "y2", 0); } -static int node_composit_buts_alphaover(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_splitviewer(uiLayout *layout, PointerRNA *ptr) { - if(block) { - NodeTwoFloats *ntf= node->storage; - - /* alpha type */ - uiDefButS(block, TOG, B_NODE_EXEC, "ConvertPremul", - butr->xmin, butr->ymin+19, butr->xmax-butr->xmin, 19, - &node->custom1, 0, 0, 0, 0, ""); - /* mix factor */ - uiDefButF(block, NUM, B_NODE_EXEC, "Premul: ", - butr->xmin, butr->ymin, butr->xmax-butr->xmin, 19, - &ntf->x, 0.0f, 1.0f, 100, 0, ""); - } - return 38; + uiLayout *row, *col; + + col= uiLayoutColumn(layout, 0); + row= uiLayoutRow(col, 0); + uiItemR(row, NULL, 0, ptr, "axis", UI_ITEM_R_EXPAND); + uiItemR(col, NULL, 0, ptr, "factor", 0); } -static int node_composit_buts_hue_sat(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_map_value(uiLayout *layout, PointerRNA *ptr) { - if(block) { - NodeHueSat *nhs= node->storage; - - uiBlockBeginAlign(block); - uiDefButF(block, NUMSLI, B_NODE_EXEC, "Hue: ", - butr->xmin, butr->ymin+40.0f, butr->xmax-butr->xmin, 20, - &nhs->hue, 0.0f, 1.0f, 100, 0, ""); - uiDefButF(block, NUMSLI, B_NODE_EXEC, "Sat: ", - butr->xmin, butr->ymin+20.0f, butr->xmax-butr->xmin, 20, - &nhs->sat, 0.0f, 2.0f, 100, 0, ""); - uiDefButF(block, NUMSLI, B_NODE_EXEC, "Val: ", - butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, - &nhs->val, 0.0f, 2.0f, 100, 0, ""); - } - return 60; + uiLayout *sub, *col; + + col =uiLayoutColumn(layout, 1); + uiItemR(col, NULL, 0, ptr, "offset", 0); + uiItemR(col, NULL, 0, ptr, "size", 0); + + col =uiLayoutColumn(layout, 1); + uiItemR(col, NULL, 0, ptr, "use_min", 0); + sub =uiLayoutColumn(col, 0); + uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_min")); + uiItemR(sub, "", 0, ptr, "min", 0); + + col =uiLayoutColumn(layout, 1); + uiItemR(col, NULL, 0, ptr, "use_max", 0); + sub =uiLayoutColumn(col, 0); + uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_max")); + uiItemR(sub, "", 0, ptr, "max", 0); } -static int node_composit_buts_dilateerode(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_alphaover(uiLayout *layout, PointerRNA *ptr) +{ + uiLayout *col; + + col =uiLayoutColumn(layout, 1); + /* alpha type */ + uiItemR(col, NULL, 0, ptr, "convert_premul", 0); + /* mix factor */ + uiItemR(col, NULL, 0, ptr, "premul", 0); +} + +static void node_composit_buts_hue_sat(uiLayout *layout, PointerRNA *ptr) { - if(block) { - uiDefButS(block, NUM, B_NODE_EXEC, "Distance:", - butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, - &node->custom2, -100, 100, 0, 0, "Distance to grow/shrink (number of iterations)"); - } - return 20; + uiLayout *col; + + col =uiLayoutColumn(layout, 0); + uiItemR(col, NULL, 0, ptr, "hue", UI_ITEM_R_SLIDER); + uiItemR(col, NULL, 0, ptr, "sat", UI_ITEM_R_SLIDER); + uiItemR(col, NULL, 0, ptr, "val", UI_ITEM_R_SLIDER); } -static int node_composit_buts_diff_matte(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_dilateerode(uiLayout *layout, PointerRNA *ptr) { - if(block) { - NodeChroma *c= node->storage; - - uiBlockBeginAlign(block); - uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "Tolerance: ", - butr->xmin, butr->ymin+20, butr->xmax-butr->xmin, 20, - &c->t1, 0.0f, 1.0f, 100, 0, "Color differences below this threshold are keyed."); - uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "Falloff: ", - butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, - &c->t2, 0.0f, 1.0f, 100, 0, "Color differences below this additional threshold are partially keyed."); - uiBlockEndAlign(block); - } - return 40; + uiItemR(layout, NULL, 0, ptr, "distance", 0); } -static int node_composit_buts_distance_matte(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_diff_matte(uiLayout *layout, PointerRNA *ptr) { - if(block) { - NodeChroma *c= node->storage; - - uiBlockBeginAlign(block); - uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "Tolerance: ", - butr->xmin, butr->ymin+20, butr->xmax-butr->xmin, 20, - &c->t1, 0.0f, 1.0f, 100, 0, "Color distances below this threshold are keyed."); - uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "Falloff: ", - butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, - &c->t2, 0.0f, 1.0f, 100, 0, "Color distances below this additional threshold are partially keyed."); - uiBlockEndAlign(block); - } - return 40; + uiLayout *col; + + col =uiLayoutColumn(layout, 1); + uiItemR(col, NULL, 0, ptr, "tolerance", UI_ITEM_R_SLIDER); + uiItemR(col, NULL, 0, ptr, "falloff", UI_ITEM_R_SLIDER); } -static int node_composit_buts_color_spill(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_distance_matte(uiLayout *layout, PointerRNA *ptr) { - if(block) { - short dx= (butr->xmax-butr->xmin)/3; + uiLayout *col; + + col =uiLayoutColumn(layout, 1); + uiItemR(col, NULL, 0, ptr, "tolerance", UI_ITEM_R_SLIDER); + uiItemR(col, NULL, 0, ptr, "falloff", UI_ITEM_R_SLIDER); +} - NodeChroma *c=node->storage; - uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_NODE_EXEC, "Enhance: ", - butr->xmin, butr->ymin+20.0, butr->xmax-butr->xmin, 20, - &c->t1, 0.0f, 0.5f, 100, 2, "Adjusts how much selected channel is affected by color spill algorithm"); - uiDefButS(block, ROW, B_NODE_EXEC, "R", - butr->xmin,butr->ymin,dx,20, - &node->custom1,1,1, 0, 0, "Red Spill Suppression"); - uiDefButS(block, ROW, B_NODE_EXEC, "G", - butr->xmin+dx,butr->ymin,dx,20, - &node->custom1,1,2, 0, 0, "Green Spill Suppression"); - uiDefButS(block, ROW, B_NODE_EXEC, "B", - butr->xmin+2*dx,butr->ymin,dx,20, - &node->custom1, 1, 3, 0, 0, "Blue Spill Suppression"); - uiBlockEndAlign(block); - } - return 60; +static void node_composit_buts_color_spill(uiLayout *layout, PointerRNA *ptr) +{ + uiLayout *row, *col; + + col =uiLayoutColumn(layout, 0); + uiItemR(col, NULL, 0, ptr, "factor", 0); + row= uiLayoutRow(col, 0); + uiItemR(row, NULL, 0, ptr, "channel", UI_ITEM_R_EXPAND); } -static int node_composit_buts_chroma_matte(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_chroma_matte(uiLayout *layout, PointerRNA *ptr) { - if(block) { - short dx=(butr->xmax-butr->xmin)/2; - NodeChroma *c= node->storage; - uiBlockBeginAlign(block); + uiLayout *col; + + col= uiLayoutColumn(layout, 0); + uiItemR(col, NULL, 0, ptr, "acceptance", 0); + uiItemR(col, NULL, 0, ptr, "cutoff", 0); + + col= uiLayoutColumn(layout, 1); + uiItemR(col, NULL, 0, ptr, "lift", UI_ITEM_R_SLIDER); + uiItemR(col, NULL, 0, ptr, "gain", UI_ITEM_R_SLIDER); + uiItemR(col, NULL, 0, ptr, "shadow_adjust", UI_ITEM_R_SLIDER); - uiDefButF(block, NUMSLI, B_NODE_EXEC, "Acceptance ", - butr->xmin, butr->ymin+60, butr->xmax-butr->xmin, 20, - &c->t1, 1.0f, 80.0f, 100, 0, "Tolerance for colors to be considered a keying color"); - uiDefButF(block, NUMSLI, B_NODE_EXEC, "Cutoff ", - butr->xmin, butr->ymin+40, butr->xmax-butr->xmin, 20, - &c->t2, 0.0f, 30.0f, 100, 0, "Colors below this will be considered as exact matches for keying color"); - - uiDefButF(block, NUMSLI, B_NODE_EXEC, "Lift ", - butr->xmin, butr->ymin+20, dx, 20, - &c->fsize, 0.0f, 1.0f, 100, 0, "Alpha Lift"); - uiDefButF(block, NUMSLI, B_NODE_EXEC, "Gain ", - butr->xmin+dx, butr->ymin+20, dx, 20, - &c->fstrength, 0.0f, 1.0f, 100, 0, "Alpha Gain"); - - uiDefButF(block, NUMSLI, B_NODE_EXEC, "Shadow Adjust ", - butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, - &c->t3, 0.0f, 1.0f, 100, 0, "Adjusts the brightness of any shadows captured"); - uiBlockEndAlign(block); +// uiBlock *block= uiLayoutFreeBlock(layout); +// bNode *node= ptr->data; +// rctf *butr= &node->butr; +// short dx=(butr->xmax-butr->xmin)/2; +// NodeChroma *c= node->storage; - if(c->t2 > c->t1) - c->t2=c->t1; - } - return 80; +// uiBlockBeginAlign(block); +// +// uiDefButF(block, NUMSLI, B_NODE_EXEC, "Acceptance ", butr->xmin, butr->ymin+60, butr->xmax-butr->xmin, 20, &c->t1, 1.0f, 80.0f, 100, 0, "Tolerance for colors to be considered a keying color"); +// uiDefButF(block, NUMSLI, B_NODE_EXEC, "Cutoff ", butr->xmin, butr->ymin+40, butr->xmax-butr->xmin, 20, &c->t2, 0.0f, 30.0f, 100, 0, "Colors below this will be considered as exact matches for keying color"); +// +// uiDefButF(block, NUMSLI, B_NODE_EXEC, "Lift ", butr->xmin, butr->ymin+20, dx, 20, &c->fsize, 0.0f, 1.0f, 100, 0, "Alpha Lift"); +// uiDefButF(block, NUMSLI, B_NODE_EXEC, "Gain ", butr->xmin+dx, butr->ymin+20, dx, 20, &c->fstrength, 0.0f, 1.0f, 100, 0, "Alpha Gain"); +// +// uiDefButF(block, NUMSLI, B_NODE_EXEC, "Shadow Adjust ", butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, &c->t3, 0.0f, 1.0f, 100, 0, "Adjusts the brightness of any shadows captured"); +// uiBlockEndAlign(block); +// +// if(c->t2 > c->t1) +// c->t2=c->t1; } -static int node_composit_buts_color_matte(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_color_matte(uiLayout *layout, PointerRNA *ptr) { - if(block) { - NodeChroma *c= node->storage; - uiBlockBeginAlign(block); - - uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "H: ", - butr->xmin, butr->ymin+40, butr->xmax-butr->xmin, 20, - &c->t1, 0.0f, 0.25f, 100, 0, "Hue tolerance for colors to be considered a keying color"); - uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "S: ", - butr->xmin, butr->ymin+20, butr->xmax-butr->xmin, 20, - &c->t2, 0.0f, 1.0f, 100, 0, "Saturation Tolerance for the color"); - uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "V: ", - butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, - &c->t3, 0.0f, 1.0f, 100, 0, "Value Tolerance for the color"); - - uiBlockEndAlign(block); - } - return 60; + uiLayout *col; + + col= uiLayoutColumn(layout, 1); + uiItemR(col, NULL, 0, ptr, "h", UI_ITEM_R_SLIDER); + uiItemR(col, NULL, 0, ptr, "s", UI_ITEM_R_SLIDER); + uiItemR(col, NULL, 0, ptr, "v", UI_ITEM_R_SLIDER); } - -static int node_composit_buts_channel_matte(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_channel_matte(uiLayout *layout, PointerRNA *ptr) { - if(block) { - short sx= (butr->xmax-butr->xmin)/4; - short cx= (butr->xmax-butr->xmin)/3; - NodeChroma *c=node->storage; - char *c1, *c2, *c3; - - /*color space selectors*/ - uiBlockBeginAlign(block); - uiDefButS(block, ROW,B_NODE_EXEC,"RGB", - butr->xmin,butr->ymin+60,sx,20,&node->custom1,1,1, 0, 0, "RGB Color Space"); - uiDefButS(block, ROW,B_NODE_EXEC,"HSV", - butr->xmin+sx,butr->ymin+60,sx,20,&node->custom1,1,2, 0, 0, "HSV Color Space"); - uiDefButS(block, ROW,B_NODE_EXEC,"YUV", - butr->xmin+2*sx,butr->ymin+60,sx,20,&node->custom1,1,3, 0, 0, "YUV Color Space"); - uiDefButS(block, ROW,B_NODE_EXEC,"YCC", - butr->xmin+3*sx,butr->ymin+60,sx,20,&node->custom1,1,4, 0, 0, "YCbCr Color Space"); - - if (node->custom1==1) { - c1="R"; c2="G"; c3="B"; - } - else if(node->custom1==2){ - c1="H"; c2="S"; c3="V"; - } - else if(node->custom1==3){ - c1="Y"; c2="U"; c3="V"; - } - else { // if(node->custom1==4){ - c1="Y"; c2="Cb"; c3="Cr"; - } - - /*channel selector */ - uiDefButS(block, ROW, B_NODE_EXEC, c1, - butr->xmin,butr->ymin+40,cx,20,&node->custom2,1, 1, 0, 0, "Channel 1"); - uiDefButS(block, ROW, B_NODE_EXEC, c2, - butr->xmin+cx,butr->ymin+40,cx,20,&node->custom2,1, 2, 0, 0, "Channel 2"); - uiDefButS(block, ROW, B_NODE_EXEC, c3, - butr->xmin+cx+cx,butr->ymin+40,cx,20,&node->custom2, 1, 3, 0, 0, "Channel 3"); - - /*tolerance sliders */ - uiDefButF(block, NUMSLI, B_NODE_EXEC, "High ", - butr->xmin, butr->ymin+20.0, butr->xmax-butr->xmin, 20, - &c->t1, 0.0f, 1.0f, 100, 0, "Values higher than this setting are 100% opaque"); - uiDefButF(block, NUMSLI, B_NODE_EXEC, "Low ", - butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, - &c->t2, 0.0f, 1.0f, 100, 0, "Values lower than this setting are 100% keyed"); - uiBlockEndAlign(block); - - /*keep t2 (low) less than t1 (high) */ - if(c->t2 > c->t1) { - c->t2=c->t1; - } + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + rctf *butr= &node->butr; + short sx= (butr->xmax-butr->xmin)/4; + short cx= (butr->xmax-butr->xmin)/3; + NodeChroma *c=node->storage; + char *c1, *c2, *c3; + + /*color space selectors*/ + uiBlockBeginAlign(block); + uiDefButS(block, ROW,B_NODE_EXEC,"RGB", + butr->xmin,butr->ymin+60,sx,20,&node->custom1,1,1, 0, 0, "RGB Color Space"); + uiDefButS(block, ROW,B_NODE_EXEC,"HSV", + butr->xmin+sx,butr->ymin+60,sx,20,&node->custom1,1,2, 0, 0, "HSV Color Space"); + uiDefButS(block, ROW,B_NODE_EXEC,"YUV", + butr->xmin+2*sx,butr->ymin+60,sx,20,&node->custom1,1,3, 0, 0, "YUV Color Space"); + uiDefButS(block, ROW,B_NODE_EXEC,"YCC", + butr->xmin+3*sx,butr->ymin+60,sx,20,&node->custom1,1,4, 0, 0, "YCbCr Color Space"); + + if (node->custom1==1) { + c1="R"; c2="G"; c3="B"; + } + else if(node->custom1==2){ + c1="H"; c2="S"; c3="V"; + } + else if(node->custom1==3){ + c1="Y"; c2="U"; c3="V"; + } + else { // if(node->custom1==4){ + c1="Y"; c2="Cb"; c3="Cr"; + } + + /*channel selector */ + uiDefButS(block, ROW, B_NODE_EXEC, c1, + butr->xmin,butr->ymin+40,cx,20,&node->custom2,1, 1, 0, 0, "Channel 1"); + uiDefButS(block, ROW, B_NODE_EXEC, c2, + butr->xmin+cx,butr->ymin+40,cx,20,&node->custom2,1, 2, 0, 0, "Channel 2"); + uiDefButS(block, ROW, B_NODE_EXEC, c3, + butr->xmin+cx+cx,butr->ymin+40,cx,20,&node->custom2, 1, 3, 0, 0, "Channel 3"); + + /*tolerance sliders */ + uiDefButF(block, NUMSLI, B_NODE_EXEC, "High ", + butr->xmin, butr->ymin+20.0, butr->xmax-butr->xmin, 20, + &c->t1, 0.0f, 1.0f, 100, 0, "Values higher than this setting are 100% opaque"); + uiDefButF(block, NUMSLI, B_NODE_EXEC, "Low ", + butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, + &c->t2, 0.0f, 1.0f, 100, 0, "Values lower than this setting are 100% keyed"); + uiBlockEndAlign(block); + + /*keep t2 (low) less than t1 (high) */ + if(c->t2 > c->t1) { + c->t2=c->t1; } - return 80; } -static int node_composit_buts_luma_matte(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_luma_matte(uiLayout *layout, PointerRNA *ptr) { - if(block) { - NodeChroma *c=node->storage; - - /*tolerance sliders */ - uiDefButF(block, NUMSLI, B_NODE_EXEC, "High ", - butr->xmin, butr->ymin+20.0, butr->xmax-butr->xmin, 20, - &c->t1, 0.0f, 1.0f, 100, 0, "Values higher than this setting are 100% opaque"); - uiDefButF(block, NUMSLI, B_NODE_EXEC, "Low ", - butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, - &c->t2, 0.0f, 1.0f, 100, 0, "Values lower than this setting are 100% keyed"); - uiBlockEndAlign(block); - - /*keep t2 (low) less than t1 (high) */ - if(c->t2 > c->t1) { - c->t2=c->t1; - } + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + rctf *butr= &node->butr; + NodeChroma *c=node->storage; + + /*tolerance sliders */ + uiDefButF(block, NUMSLI, B_NODE_EXEC, "High ", + butr->xmin, butr->ymin+20.0, butr->xmax-butr->xmin, 20, + &c->t1, 0.0f, 1.0f, 100, 0, "Values higher than this setting are 100% opaque"); + uiDefButF(block, NUMSLI, B_NODE_EXEC, "Low ", + butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, + &c->t2, 0.0f, 1.0f, 100, 0, "Values lower than this setting are 100% keyed"); + uiBlockEndAlign(block); + + /*keep t2 (low) less than t1 (high) */ + if(c->t2 > c->t1) { + c->t2=c->t1; } - return 40; } -static int node_composit_buts_map_uv(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_map_uv(uiLayout *layout, PointerRNA *ptr) { - if(block) { - uiDefButS(block, NUM, B_NODE_EXEC, "Alpha:", - butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, - &node->custom1, 0, 100, 0, 0, "Conversion percentage of UV differences to Alpha"); - } - return 20; + uiItemR(layout, NULL, 0, ptr, "alpha", 0); } -static int node_composit_buts_id_mask(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_id_mask(uiLayout *layout, PointerRNA *ptr) { - if(block) { - uiDefButS(block, NUM, B_NODE_EXEC, "ID:", - butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, - &node->custom1, 0, 10000, 0, 0, "Pass Index number to convert to Alpha"); - } - return 20; + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + rctf *butr= &node->butr; + + uiDefButS(block, NUM, B_NODE_EXEC, "ID:", + butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, + &node->custom1, 0, 10000, 0, 0, "Pass Index number to convert to Alpha"); } /* allocate sufficient! */ @@ -1880,58 +1551,58 @@ static void node_set_image_cb(bContext *C, void *ntree_v, void *node_v) nodeSetActive(ntree, node); } -static int node_composit_buts_file_output(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_file_output(uiLayout *layout, PointerRNA *ptr) { - if(block) { - NodeImageFile *nif= node->storage; - uiBut *bt; - short x= (short)butr->xmin; - short y= (short)butr->ymin; - short w= (short)butr->xmax-butr->xmin; - char str[320]; - - node_imagetype_string(str); - - uiBlockBeginAlign(block); - - bt = uiDefIconBut(block, BUT, B_NODE_SETIMAGE, ICON_FILESEL, - x, y+60, 20, 20, - 0, 0, 0, 0, 0, "Open Fileselect to get Backbuf image"); - uiButSetFunc(bt, node_set_image_cb, ntree, node); - - uiDefBut(block, TEX, B_NOP, "", - 20+x, y+60, w-20, 20, - nif->name, 0.0f, 240.0f, 0, 0, ""); - - uiDefButS(block, MENU, B_NOP, str, - x, y+40, w, 20, - &nif->imtype, 0.0f, 1.0f, 0, 0, ""); - - if(nif->imtype==R_OPENEXR) { - uiDefButBitS(block, TOG, R_OPENEXR_HALF, B_REDR, "Half", - x, y+20, w/2, 20, - &nif->subimtype, 0, 0, 0, 0, ""); - - uiDefButS(block, MENU,B_NOP, "Codec %t|None %x0|Pxr24 (lossy) %x1|ZIP (lossless) %x2|PIZ (lossless) %x3|RLE (lossless) %x4", - x+w/2, y+20, w/2, 20, - &nif->codec, 0, 0, 0, 0, ""); - } - else { - uiDefButS(block, NUM, B_NOP, "Quality: ", - x, y+20, w, 20, - &nif->quality, 10.0f, 100.0f, 10, 0, ""); - } - - /* start frame, end frame */ - uiDefButI(block, NUM, B_NODE_EXEC, "SFra: ", - x, y, w/2, 20, - &nif->sfra, 1, MAXFRAMEF, 10, 0, ""); - uiDefButI(block, NUM, B_NODE_EXEC, "EFra: ", - x+w/2, y, w/2, 20, - &nif->efra, 1, MAXFRAMEF, 10, 0, ""); - + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + bNodeTree *ntree= ptr->id.data; + rctf *butr= &node->butr; + NodeImageFile *nif= node->storage; + uiBut *bt; + short x= (short)butr->xmin; + short y= (short)butr->ymin; + short w= (short)butr->xmax-butr->xmin; + char str[320]; + + node_imagetype_string(str); + + uiBlockBeginAlign(block); + + bt = uiDefIconBut(block, BUT, B_NODE_SETIMAGE, ICON_FILESEL, + x, y+60, 20, 20, + 0, 0, 0, 0, 0, "Open Fileselect to get Backbuf image"); + uiButSetFunc(bt, node_set_image_cb, ntree, node); + + uiDefBut(block, TEX, B_NOP, "", + 20+x, y+60, w-20, 20, + nif->name, 0.0f, 240.0f, 0, 0, ""); + + uiDefButS(block, MENU, B_NOP, str, + x, y+40, w, 20, + &nif->imtype, 0.0f, 1.0f, 0, 0, ""); + + if(nif->imtype==R_OPENEXR) { + uiDefButBitS(block, TOG, R_OPENEXR_HALF, B_REDR, "Half", + x, y+20, w/2, 20, + &nif->subimtype, 0, 0, 0, 0, ""); + + uiDefButS(block, MENU,B_NOP, "Codec %t|None %x0|Pxr24 (lossy) %x1|ZIP (lossless) %x2|PIZ (lossless) %x3|RLE (lossless) %x4", + x+w/2, y+20, w/2, 20, + &nif->codec, 0, 0, 0, 0, ""); } - return 80; + else { + uiDefButS(block, NUM, B_NOP, "Quality: ", + x, y+20, w, 20, + &nif->quality, 10.0f, 100.0f, 10, 0, ""); + } + + /* start frame, end frame */ + uiDefButI(block, NUM, B_NODE_EXEC, "SFra: ", + x, y, w/2, 20, + &nif->sfra, 1, MAXFRAMEF, 10, 0, ""); + uiDefButI(block, NUM, B_NODE_EXEC, "EFra: ", + x+w/2, y, w/2, 20, + &nif->efra, 1, MAXFRAMEF, 10, 0, ""); } static void node_scale_cb(bContext *C, void *node_v, void *unused_v) @@ -1952,68 +1623,36 @@ static void node_scale_cb(bContext *C, void *node_v, void *unused_v) } } -static int node_composit_buts_scale(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_scale(uiLayout *layout, PointerRNA *ptr) { - if(block) { - uiBut *bt= uiDefButS(block, MENU, B_NODE_EXEC, "Relative %x0|Absolute %x1|Scene Size % %x2|", - butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, - &node->custom1, 0, 0, 0, 0, "Scale new image to absolute pixel size, size relative to the incoming image, or using the 'percent' size of the scene"); - uiButSetFunc(bt, node_scale_cb, node, NULL); - } - return 20; + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + rctf *butr= &node->butr; + uiBut *bt= uiDefButS(block, MENU, B_NODE_EXEC, "Relative %x0|Absolute %x1|Scene Size % %x2|", + butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, + &node->custom1, 0, 0, 0, 0, "Scale new image to absolute pixel size, size relative to the incoming image, or using the 'percent' size of the scene"); + uiButSetFunc(bt, node_scale_cb, node, NULL); } -static int node_composit_buts_invert(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_invert(uiLayout *layout, PointerRNA *ptr) { - if(block) { - uiBlockBeginAlign(block); - uiDefButBitS(block, TOG, CMP_CHAN_RGB, B_NODE_EXEC, "RGB", - butr->xmin, butr->ymin, (butr->xmax-butr->xmin)/2, 20, - &node->custom1, 0, 0, 0, 0, ""); - uiDefButBitS(block, TOG, CMP_CHAN_A, B_NODE_EXEC, "A", - butr->xmin+(butr->xmax-butr->xmin)/2, butr->ymin, (butr->xmax-butr->xmin)/2, 20, - &node->custom1, 0, 0, 0, 0, ""); - uiBlockEndAlign(block); - } - return 20; + uiLayout *col; + + col= uiLayoutColumn(layout, 0); + uiItemR(col, NULL, 0, ptr, "rgb", 0); + uiItemR(col, NULL, 0, ptr, "alpha", 0); } -static int node_composit_buts_premulkey(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_premulkey(uiLayout *layout, PointerRNA *ptr) { - if(block) { - uiBut *bt; - - /* blend type */ - bt=uiDefButS(block, MENU, B_NODE_EXEC, "Key to Premul %x0|Premul to Key %x1", - butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, - &node->custom1, 0, 0, 0, 0, "Conversion between premultiplied alpha and key alpha"); - } - return 20; + uiItemR(layout, "", 0, ptr, "mapping", 0); } -static int node_composit_buts_view_levels(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_composit_buts_view_levels(uiLayout *layout, PointerRNA *ptr) { - if(block) { - short sx= (butr->xmax-butr->xmin)/5; - - /*color space selectors*/ - uiBlockBeginAlign(block); - uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"C", - butr->xmin,butr->ymin,sx,20,&node->custom1,1,1, 0, 0, "Combined RGB"); - uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"R", - butr->xmin+sx,butr->ymin,sx,20,&node->custom1,1,2, 0, 0, "Red Channel"); - uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"G", - butr->xmin+2*sx,butr->ymin,sx,20,&node->custom1,1,3, 0, 0, "Green Channel"); - uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"B", - butr->xmin+3*sx,butr->ymin,sx,20,&node->custom1,1,4, 0, 0, "Blue Channel"); - uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"L", - butr->xmin+4*sx,butr->ymin,sx,20,&node->custom1,1,5, 0, 0, "Luminenc Channel"); - uiBlockEndAlign(block); - } - return 20; + uiItemR(layout, NULL, 0, ptr, "color_space", UI_ITEM_R_EXPAND); } - /* only once called */ static void node_composit_set_butfunc(bNodeType *ntype) { @@ -2021,181 +1660,181 @@ static void node_composit_set_butfunc(bNodeType *ntype) /* case NODE_GROUP: note, typeinfo for group is generated... see "XXX ugly hack" */ case CMP_NODE_IMAGE: - ntype->butfunc= node_composit_buts_image; + ntype->uifunc= node_composit_buts_image; break; case CMP_NODE_R_LAYERS: - ntype->butfunc= node_composit_buts_renderlayers; + ntype->uifunc= node_composit_buts_renderlayers; break; case CMP_NODE_NORMAL: - ntype->butfunc= node_buts_normal; + ntype->uifunc= node_buts_normal; break; case CMP_NODE_CURVE_VEC: - ntype->butfunc= node_buts_curvevec; + ntype->uifunc= node_buts_curvevec; break; case CMP_NODE_CURVE_RGB: - ntype->butfunc= node_buts_curvecol; + ntype->uifunc= node_buts_curvecol; break; case CMP_NODE_VALUE: - ntype->butfunc= node_buts_value; + ntype->uifunc= node_buts_value; break; case CMP_NODE_RGB: - ntype->butfunc= node_buts_rgb; + ntype->uifunc= node_buts_rgb; break; case CMP_NODE_FLIP: - ntype->butfunc= node_composit_buts_flip; + ntype->uifunc= node_composit_buts_flip; break; case CMP_NODE_SPLITVIEWER: - ntype->butfunc= node_composit_buts_splitviewer; + ntype->uifunc= node_composit_buts_splitviewer; break; case CMP_NODE_MIX_RGB: - ntype->butfunc= node_buts_mix_rgb; + ntype->uifunc= node_buts_mix_rgb; break; case CMP_NODE_VALTORGB: - ntype->butfunc= node_buts_valtorgb; + ntype->uifunc= node_buts_valtorgb; break; case CMP_NODE_CROP: - ntype->butfunc= node_composit_buts_crop; + ntype->uifunc= node_composit_buts_crop; break; case CMP_NODE_BLUR: - ntype->butfunc= node_composit_buts_blur; + ntype->uifunc= node_composit_buts_blur; break; case CMP_NODE_DBLUR: - ntype->butfunc= node_composit_buts_dblur; + ntype->uifunc= node_composit_buts_dblur; break; case CMP_NODE_BILATERALBLUR: - ntype->butfunc= node_composit_buts_bilateralblur; + ntype->uifunc= node_composit_buts_bilateralblur; break; /* qdn: defocus node */ case CMP_NODE_DEFOCUS: - ntype->butfunc = node_composit_buts_defocus; + ntype->uifunc = node_composit_buts_defocus; break; /* qdn: glare node */ case CMP_NODE_GLARE: - ntype->butfunc = node_composit_buts_glare; + ntype->uifunc = node_composit_buts_glare; break; /* qdn: tonemap node */ case CMP_NODE_TONEMAP: - ntype->butfunc = node_composit_buts_tonemap; + ntype->uifunc = node_composit_buts_tonemap; break; /* qdn: lens distortion node */ case CMP_NODE_LENSDIST: - ntype->butfunc = node_composit_buts_lensdist; + ntype->uifunc = node_composit_buts_lensdist; break; case CMP_NODE_VECBLUR: - ntype->butfunc= node_composit_buts_vecblur; + ntype->uifunc= node_composit_buts_vecblur; break; case CMP_NODE_FILTER: - ntype->butfunc= node_composit_buts_filter; + ntype->uifunc= node_composit_buts_filter; break; case CMP_NODE_MAP_VALUE: - ntype->butfunc= node_composit_buts_map_value; + ntype->uifunc= node_composit_buts_map_value; break; case CMP_NODE_TIME: - ntype->butfunc= node_buts_time; + ntype->uifunc= node_buts_time; break; case CMP_NODE_ALPHAOVER: - ntype->butfunc= node_composit_buts_alphaover; + ntype->uifunc= node_composit_buts_alphaover; break; case CMP_NODE_HUE_SAT: - ntype->butfunc= node_composit_buts_hue_sat; + ntype->uifunc= node_composit_buts_hue_sat; break; case CMP_NODE_TEXTURE: - ntype->butfunc= node_buts_texture; + ntype->uifunc= node_buts_texture; break; case CMP_NODE_DILATEERODE: - ntype->butfunc= node_composit_buts_dilateerode; + ntype->uifunc= node_composit_buts_dilateerode; break; case CMP_NODE_OUTPUT_FILE: - ntype->butfunc= node_composit_buts_file_output; + ntype->uifunc= node_composit_buts_file_output; break; case CMP_NODE_DIFF_MATTE: - ntype->butfunc=node_composit_buts_diff_matte; + ntype->uifunc=node_composit_buts_diff_matte; break; case CMP_NODE_DIST_MATTE: - ntype->butfunc=node_composit_buts_distance_matte; + ntype->uifunc=node_composit_buts_distance_matte; break; case CMP_NODE_COLOR_SPILL: - ntype->butfunc=node_composit_buts_color_spill; + ntype->uifunc=node_composit_buts_color_spill; break; case CMP_NODE_CHROMA_MATTE: - ntype->butfunc=node_composit_buts_chroma_matte; + ntype->uifunc=node_composit_buts_chroma_matte; break; case CMP_NODE_COLOR_MATTE: - ntype->butfunc=node_composit_buts_color_matte; + ntype->uifunc=node_composit_buts_color_matte; break; case CMP_NODE_SCALE: - ntype->butfunc= node_composit_buts_scale; + ntype->uifunc= node_composit_buts_scale; break; case CMP_NODE_CHANNEL_MATTE: - ntype->butfunc= node_composit_buts_channel_matte; + ntype->uifunc= node_composit_buts_channel_matte; break; case CMP_NODE_LUMA_MATTE: - ntype->butfunc= node_composit_buts_luma_matte; + ntype->uifunc= node_composit_buts_luma_matte; break; case CMP_NODE_MAP_UV: - ntype->butfunc= node_composit_buts_map_uv; + ntype->uifunc= node_composit_buts_map_uv; break; case CMP_NODE_ID_MASK: - ntype->butfunc= node_composit_buts_id_mask; + ntype->uifunc= node_composit_buts_id_mask; break; case CMP_NODE_MATH: - ntype->butfunc= node_buts_math; + ntype->uifunc= node_buts_math; break; case CMP_NODE_INVERT: - ntype->butfunc= node_composit_buts_invert; + ntype->uifunc= node_composit_buts_invert; break; case CMP_NODE_PREMULKEY: - ntype->butfunc= node_composit_buts_premulkey; + ntype->uifunc= node_composit_buts_premulkey; break; case CMP_NODE_VIEW_LEVELS: - ntype->butfunc=node_composit_buts_view_levels; + ntype->uifunc=node_composit_buts_view_levels; break; default: - ntype->butfunc= NULL; + ntype->uifunc= NULL; } } /* ****************** BUTTON CALLBACKS FOR TEXTURE NODES ***************** */ -static int node_texture_buts_bricks(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_texture_buts_bricks(uiLayout *layout, PointerRNA *ptr) { - if(block) { - short w = butr->xmax-butr->xmin; - short ofw = 32; - - uiBlockBeginAlign(block); - - /* Offset */ - uiDefButF( - block, NUM, B_NODE_EXEC, "Offset", - butr->xmin, butr->ymin+20, w-ofw, 20, - &node->custom3, - 0, 1, 0.25, 2, - "Offset amount" ); - uiDefButS( - block, NUM, B_NODE_EXEC, "", - butr->xmin+w-ofw, butr->ymin+20, ofw, 20, - &node->custom1, - 2, 99, 0, 0, - "Offset every N rows" ); - - /* Squash */ - uiDefButF( - block, NUM, B_NODE_EXEC, "Squash", - butr->xmin, butr->ymin+0, w-ofw, 20, - &node->custom4, - 0, 99, 0.25, 2, - "Stretch amount" ); - uiDefButS( - block, NUM, B_NODE_EXEC, "", - butr->xmin+w-ofw, butr->ymin+0, ofw, 20, - &node->custom2, - 2, 99, 0, 0, - "Stretch every N rows" ); - - uiBlockEndAlign(block); - } - return 40; + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + rctf *butr= &node->butr; + short w = butr->xmax-butr->xmin; + short ofw = 32; + + uiBlockBeginAlign(block); + + /* Offset */ + uiDefButF( + block, NUM, B_NODE_EXEC, "Offset", + butr->xmin, butr->ymin+20, w-ofw, 20, + &node->custom3, + 0, 1, 0.25, 2, + "Offset amount" ); + uiDefButS( + block, NUM, B_NODE_EXEC, "", + butr->xmin+w-ofw, butr->ymin+20, ofw, 20, + &node->custom1, + 2, 99, 0, 0, + "Offset every N rows" ); + + /* Squash */ + uiDefButF( + block, NUM, B_NODE_EXEC, "Squash", + butr->xmin, butr->ymin+0, w-ofw, 20, + &node->custom4, + 0, 99, 0.25, 2, + "Stretch amount" ); + uiDefButS( + block, NUM, B_NODE_EXEC, "", + butr->xmin+w-ofw, butr->ymin+0, ofw, 20, + &node->custom2, + 2, 99, 0, 0, + "Stretch every N rows" ); + + uiBlockEndAlign(block); } /* Copied from buttons_shading.c -- needs unifying */ @@ -2206,208 +1845,196 @@ static char* noisebasis_menu() return nbmenu; } -static int node_texture_buts_proc(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_texture_buts_proc(uiLayout *layout, PointerRNA *ptr) { + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + rctf *butr= &node->butr; Tex *tex = (Tex *)node->storage; short x,y,w,h; - if( block ) { - x = butr->xmin; - y = butr->ymin; - w = butr->xmax - x; - h = butr->ymax - y; - } - else - return 0; + x = butr->xmin; + y = butr->ymin; + w = butr->xmax - x; + h = butr->ymax - y; switch( tex->type ) { case TEX_BLEND: - if( block ) { - uiBlockBeginAlign( block ); - uiDefButS( block, MENU, B_NODE_EXEC, - "Linear %x0|Quad %x1|Ease %x2|Diag %x3|Sphere %x4|Halo %x5|Radial %x6", - x, y+20, w, 20, &tex->stype, 0, 1, 0, 0, "Blend Type" ); - uiDefButBitS(block, TOG, TEX_FLIPBLEND, B_NODE_EXEC, "Flip XY", x, y, w, 20, - &tex->flag, 0, 0, 0, 0, "Flips the direction of the progression 90 degrees"); - uiBlockEndAlign( block ); - } - return 40; - + uiBlockBeginAlign( block ); + uiDefButS( block, MENU, B_NODE_EXEC, + "Linear %x0|Quad %x1|Ease %x2|Diag %x3|Sphere %x4|Halo %x5|Radial %x6", + x, y+20, w, 20, &tex->stype, 0, 1, 0, 0, "Blend Type" ); + uiDefButBitS(block, TOG, TEX_FLIPBLEND, B_NODE_EXEC, "Flip XY", x, y, w, 20, + &tex->flag, 0, 0, 0, 0, "Flips the direction of the progression 90 degrees"); + uiBlockEndAlign( block ); + break; case TEX_MARBLE: - if( block ) { - uiBlockBeginAlign(block); + uiBlockBeginAlign(block); + + uiDefButS(block, ROW, B_NODE_EXEC, "Soft", 0*w/3+x, 40+y, w/3, 18, &tex->stype, 2.0, (float)TEX_SOFT, 0, 0, "Uses soft marble"); + uiDefButS(block, ROW, B_NODE_EXEC, "Sharp", 1*w/3+x, 40+y, w/3, 18, &tex->stype, 2.0, (float)TEX_SHARP, 0, 0, "Uses more clearly defined marble"); + uiDefButS(block, ROW, B_NODE_EXEC, "Sharper", 2*w/3+x, 40+y, w/3, 18, &tex->stype, 2.0, (float)TEX_SHARPER, 0, 0, "Uses very clearly defined marble"); - uiDefButS(block, ROW, B_NODE_EXEC, "Soft", 0*w/3+x, 40+y, w/3, 18, &tex->stype, 2.0, (float)TEX_SOFT, 0, 0, "Uses soft marble"); - uiDefButS(block, ROW, B_NODE_EXEC, "Sharp", 1*w/3+x, 40+y, w/3, 18, &tex->stype, 2.0, (float)TEX_SHARP, 0, 0, "Uses more clearly defined marble"); - uiDefButS(block, ROW, B_NODE_EXEC, "Sharper", 2*w/3+x, 40+y, w/3, 18, &tex->stype, 2.0, (float)TEX_SHARPER, 0, 0, "Uses very clearly defined marble"); - - uiDefButS(block, ROW, B_NODE_EXEC, "Soft noise", 0*w/2+x, 20+y, w/2, 19, &tex->noisetype, 12.0, (float)TEX_NOISESOFT, 0, 0, "Generates soft noise"); - uiDefButS(block, ROW, B_NODE_EXEC, "Hard noise", 1*w/2+x, 20+y, w/2, 19, &tex->noisetype, 12.0, (float)TEX_NOISEPERL, 0, 0, "Generates hard noise"); - - uiDefButS(block, ROW, B_NODE_EXEC, "Sin", 0*w/3+x, 0+y, w/3, 18, &tex->noisebasis2, 8.0, 0.0, 0, 0, "Uses a sine wave to produce bands."); - uiDefButS(block, ROW, B_NODE_EXEC, "Saw", 1*w/3+x, 0+y, w/3, 18, &tex->noisebasis2, 8.0, 1.0, 0, 0, "Uses a saw wave to produce bands"); - uiDefButS(block, ROW, B_NODE_EXEC, "Tri", 2*w/3+x, 0+y, w/3, 18, &tex->noisebasis2, 8.0, 2.0, 0, 0, "Uses a triangle wave to produce bands"); - - uiBlockEndAlign(block); - } - return 60; + uiDefButS(block, ROW, B_NODE_EXEC, "Soft noise", 0*w/2+x, 20+y, w/2, 19, &tex->noisetype, 12.0, (float)TEX_NOISESOFT, 0, 0, "Generates soft noise"); + uiDefButS(block, ROW, B_NODE_EXEC, "Hard noise", 1*w/2+x, 20+y, w/2, 19, &tex->noisetype, 12.0, (float)TEX_NOISEPERL, 0, 0, "Generates hard noise"); + + uiDefButS(block, ROW, B_NODE_EXEC, "Sin", 0*w/3+x, 0+y, w/3, 18, &tex->noisebasis2, 8.0, 0.0, 0, 0, "Uses a sine wave to produce bands."); + uiDefButS(block, ROW, B_NODE_EXEC, "Saw", 1*w/3+x, 0+y, w/3, 18, &tex->noisebasis2, 8.0, 1.0, 0, 0, "Uses a saw wave to produce bands"); + uiDefButS(block, ROW, B_NODE_EXEC, "Tri", 2*w/3+x, 0+y, w/3, 18, &tex->noisebasis2, 8.0, 2.0, 0, 0, "Uses a triangle wave to produce bands"); + + uiBlockEndAlign(block); + break; case TEX_WOOD: - if( block ) { - uiDefButS(block, MENU, B_TEXPRV, noisebasis_menu(), x, y+64, w, 18, &tex->noisebasis, 0,0,0,0, "Sets the noise basis used for turbulence"); - - uiBlockBeginAlign(block); - uiDefButS(block, ROW, B_TEXPRV, "Bands", x, 40+y, w/2, 18, &tex->stype, 2.0, (float)TEX_BANDNOISE, 0, 0, "Uses standard noise"); - uiDefButS(block, ROW, B_TEXPRV, "Rings", w/2+x, 40+y, w/2, 18, &tex->stype, 2.0, (float)TEX_RINGNOISE, 0, 0, "Lets Noise return RGB value"); - - uiDefButS(block, ROW, B_NODE_EXEC, "Sin", 0*w/3+x, 20+y, w/3, 18, &tex->noisebasis2, 8.0, (float)TEX_SIN, 0, 0, "Uses a sine wave to produce bands."); - uiDefButS(block, ROW, B_NODE_EXEC, "Saw", 1*w/3+x, 20+y, w/3, 18, &tex->noisebasis2, 8.0, (float)TEX_SAW, 0, 0, "Uses a saw wave to produce bands"); - uiDefButS(block, ROW, B_NODE_EXEC, "Tri", 2*w/3+x, 20+y, w/3, 18, &tex->noisebasis2, 8.0, (float)TEX_TRI, 0, 0, "Uses a triangle wave to produce bands"); - - uiDefButS(block, ROW, B_NODE_EXEC, "Soft noise", 0*w/2+x, 0+y, w/2, 19, &tex->noisetype, 12.0, (float)TEX_NOISESOFT, 0, 0, "Generates soft noise"); - uiDefButS(block, ROW, B_NODE_EXEC, "Hard noise", 1*w/2+x, 0+y, w/2, 19, &tex->noisetype, 12.0, (float)TEX_NOISEPERL, 0, 0, "Generates hard noise"); - uiBlockEndAlign(block); - } - return 80; + uiDefButS(block, MENU, B_TEXPRV, noisebasis_menu(), x, y+64, w, 18, &tex->noisebasis, 0,0,0,0, "Sets the noise basis used for turbulence"); + + uiBlockBeginAlign(block); + uiDefButS(block, ROW, B_TEXPRV, "Bands", x, 40+y, w/2, 18, &tex->stype, 2.0, (float)TEX_BANDNOISE, 0, 0, "Uses standard noise"); + uiDefButS(block, ROW, B_TEXPRV, "Rings", w/2+x, 40+y, w/2, 18, &tex->stype, 2.0, (float)TEX_RINGNOISE, 0, 0, "Lets Noise return RGB value"); + + uiDefButS(block, ROW, B_NODE_EXEC, "Sin", 0*w/3+x, 20+y, w/3, 18, &tex->noisebasis2, 8.0, (float)TEX_SIN, 0, 0, "Uses a sine wave to produce bands."); + uiDefButS(block, ROW, B_NODE_EXEC, "Saw", 1*w/3+x, 20+y, w/3, 18, &tex->noisebasis2, 8.0, (float)TEX_SAW, 0, 0, "Uses a saw wave to produce bands"); + uiDefButS(block, ROW, B_NODE_EXEC, "Tri", 2*w/3+x, 20+y, w/3, 18, &tex->noisebasis2, 8.0, (float)TEX_TRI, 0, 0, "Uses a triangle wave to produce bands"); + + uiDefButS(block, ROW, B_NODE_EXEC, "Soft noise", 0*w/2+x, 0+y, w/2, 19, &tex->noisetype, 12.0, (float)TEX_NOISESOFT, 0, 0, "Generates soft noise"); + uiDefButS(block, ROW, B_NODE_EXEC, "Hard noise", 1*w/2+x, 0+y, w/2, 19, &tex->noisetype, 12.0, (float)TEX_NOISEPERL, 0, 0, "Generates hard noise"); + uiBlockEndAlign(block); + break; case TEX_CLOUDS: - if( block ) { - uiDefButS(block, MENU, B_TEXPRV, noisebasis_menu(), x, y+60, w, 18, &tex->noisebasis, 0,0,0,0, "Sets the noise basis used for turbulence"); - - uiBlockBeginAlign(block); - uiDefButS(block, ROW, B_TEXPRV, "B/W", x, y+38, w/2, 18, &tex->stype, 2.0, (float)TEX_DEFAULT, 0, 0, "Uses standard noise"); - uiDefButS(block, ROW, B_TEXPRV, "Color", w/2+x, y+38, w/2, 18, &tex->stype, 2.0, (float)TEX_COLOR, 0, 0, "Lets Noise return RGB value"); - uiDefButS(block, ROW, B_TEXPRV, "Soft", x, y+20, w/2, 18, &tex->noisetype, 12.0, (float)TEX_NOISESOFT, 0, 0, "Generates soft noise"); - uiDefButS(block, ROW, B_TEXPRV, "Hard", w/2+x, y+20, w/2, 18, &tex->noisetype, 12.0, (float)TEX_NOISEPERL, 0, 0, "Generates hard noise"); - uiBlockEndAlign(block); - - uiDefButS(block, NUM, B_TEXPRV, "Depth:", x, y, w, 18, &tex->noisedepth, 0.0, 6.0, 0, 0, "Sets the depth of the cloud calculation"); - } - return 80; + uiDefButS(block, MENU, B_TEXPRV, noisebasis_menu(), x, y+60, w, 18, &tex->noisebasis, 0,0,0,0, "Sets the noise basis used for turbulence"); + + uiBlockBeginAlign(block); + uiDefButS(block, ROW, B_TEXPRV, "B/W", x, y+38, w/2, 18, &tex->stype, 2.0, (float)TEX_DEFAULT, 0, 0, "Uses standard noise"); + uiDefButS(block, ROW, B_TEXPRV, "Color", w/2+x, y+38, w/2, 18, &tex->stype, 2.0, (float)TEX_COLOR, 0, 0, "Lets Noise return RGB value"); + uiDefButS(block, ROW, B_TEXPRV, "Soft", x, y+20, w/2, 18, &tex->noisetype, 12.0, (float)TEX_NOISESOFT, 0, 0, "Generates soft noise"); + uiDefButS(block, ROW, B_TEXPRV, "Hard", w/2+x, y+20, w/2, 18, &tex->noisetype, 12.0, (float)TEX_NOISEPERL, 0, 0, "Generates hard noise"); + uiBlockEndAlign(block); + + uiDefButS(block, NUM, B_TEXPRV, "Depth:", x, y, w, 18, &tex->noisedepth, 0.0, 6.0, 0, 0, "Sets the depth of the cloud calculation"); + break; case TEX_DISTNOISE: - if( block ) { - uiBlockBeginAlign(block); - uiDefButS(block, MENU, B_TEXPRV, noisebasis_menu(), x, y+18, w, 18, &tex->noisebasis2, 0,0,0,0, "Sets the noise basis to distort"); - uiDefButS(block, MENU, B_TEXPRV, noisebasis_menu(), x, y, w, 18, &tex->noisebasis, 0,0,0,0, "Sets the noise basis which does the distortion"); - uiBlockEndAlign(block); - } - return 36; + uiBlockBeginAlign(block); + uiDefButS(block, MENU, B_TEXPRV, noisebasis_menu(), x, y+18, w, 18, &tex->noisebasis2, 0,0,0,0, "Sets the noise basis to distort"); + uiDefButS(block, MENU, B_TEXPRV, noisebasis_menu(), x, y, w, 18, &tex->noisebasis, 0,0,0,0, "Sets the noise basis which does the distortion"); + uiBlockEndAlign(block); + break; } - return 0; } -static int node_texture_buts_image(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_texture_buts_image(uiLayout *layout, PointerRNA *ptr) { + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + bNodeTree *ntree= ptr->id.data; + rctf *butr= &node->butr; char *strp; uiBut *bt; + + uiBlockBeginAlign(block); - if( block ) { - uiBlockBeginAlign(block); - - /* browse button */ - IMAnames_to_pupstring(&strp, NULL, "LOAD NEW %x32767", &(G.main->image), NULL, NULL); - node->menunr= 0; - bt= uiDefButS(block, MENU, B_NOP, strp, - butr->xmin, butr->ymin, 19, 19, - &node->menunr, 0, 0, 0, 0, "Browses existing choices"); - uiButSetFunc(bt, node_browse_image_cb, ntree, node); - if(strp) MEM_freeN(strp); + /* browse button */ + IMAnames_to_pupstring(&strp, NULL, "LOAD NEW %x32767", &(G.main->image), NULL, NULL); + node->menunr= 0; + bt= uiDefButS(block, MENU, B_NOP, strp, + butr->xmin, butr->ymin, 19, 19, + &node->menunr, 0, 0, 0, 0, "Browses existing choices"); + uiButSetFunc(bt, node_browse_image_cb, ntree, node); + if(strp) MEM_freeN(strp); + + /* Add New button */ + if(node->id==NULL) { + bt= uiDefBut(block, BUT, B_NODE_LOADIMAGE, "Load New", + 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); + } + else { + /* name button */ + short xmin= (short)butr->xmin, xmax= (short)butr->xmax; + short width= xmax - xmin - 19; - /* Add New button */ - if(node->id==NULL) { - bt= uiDefBut(block, BUT, B_NODE_LOADIMAGE, "Load New", - 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); - } - else { - /* name button */ - short xmin= (short)butr->xmin, xmax= (short)butr->xmax; - short width= xmax - xmin - 19; - - bt= uiDefBut(block, TEX, B_NOP, "IM:", - xmin+19, butr->ymin, width, 19, - node->id->name+2, 0.0, 19.0, 0, 0, "Image name"); - uiButSetFunc(bt, node_ID_title_cb, node, NULL); - } + bt= uiDefBut(block, TEX, B_NOP, "IM:", + xmin+19, butr->ymin, width, 19, + node->id->name+2, 0.0, 19.0, 0, 0, "Image name"); + uiButSetFunc(bt, node_ID_title_cb, node, NULL); } - return 20; } -static int node_texture_buts_output(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +static void node_texture_buts_output(uiLayout *layout, PointerRNA *ptr) { - if( block ) { - uiBut *bt; - short width; - char *name = ((TexNodeOutput*)node->storage)->name; - - uiBlockBeginAlign(block); - - width = (short)(butr->xmax - butr->xmin); - - bt = uiDefBut( - block, TEX, B_NOP, - "Name:", - butr->xmin, butr->ymin, - width, 19, - name, 0, 31, - 0, 0, - "Name this output" - ); - - uiBlockEndAlign(block); - } - return 19; + uiBlock *block= uiLayoutFreeBlock(layout); + bNode *node= ptr->data; + rctf *butr= &node->butr; + uiBut *bt; + short width; + char *name = ((TexNodeOutput*)node->storage)->name; + + uiBlockBeginAlign(block); + + width = (short)(butr->xmax - butr->xmin); + + bt = uiDefBut( + block, TEX, B_NOP, + "Name:", + butr->xmin, butr->ymin, + width, 19, + name, 0, 31, + 0, 0, + "Name this output" + ); + + uiBlockEndAlign(block); } /* only once called */ static void node_texture_set_butfunc(bNodeType *ntype) { if( ntype->type >= TEX_NODE_PROC && ntype->type < TEX_NODE_PROC_MAX ) { - ntype->butfunc = node_texture_buts_proc; + ntype->uifunc = node_texture_buts_proc; } else switch(ntype->type) { case TEX_NODE_MATH: - ntype->butfunc = node_buts_math; + ntype->uifunc = node_buts_math; break; case TEX_NODE_MIX_RGB: - ntype->butfunc = node_buts_mix_rgb; + ntype->uifunc = node_buts_mix_rgb; break; case TEX_NODE_VALTORGB: - ntype->butfunc = node_buts_valtorgb; + ntype->uifunc = node_buts_valtorgb; break; case TEX_NODE_CURVE_RGB: - ntype->butfunc= node_buts_curvecol; + ntype->uifunc= node_buts_curvecol; break; case TEX_NODE_CURVE_TIME: - ntype->butfunc = node_buts_time; + ntype->uifunc = node_buts_time; break; case TEX_NODE_TEXTURE: - ntype->butfunc = node_buts_texture; + ntype->uifunc = node_buts_texture; break; case TEX_NODE_BRICKS: - ntype->butfunc = node_texture_buts_bricks; + ntype->uifunc = node_texture_buts_bricks; break; case TEX_NODE_IMAGE: - ntype->butfunc = node_texture_buts_image; + ntype->uifunc = node_texture_buts_image; break; case TEX_NODE_OUTPUT: - ntype->butfunc = node_texture_buts_output; + ntype->uifunc = node_texture_buts_output; break; default: - ntype->butfunc= NULL; + ntype->uifunc= NULL; } } diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index f3df7a29c2e..3fc91fea914 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -48,8 +48,9 @@ #include "DNA_text_types.h" #include "DNA_userdef_types.h" -#include "BLI_blenlib.h" #include "BLI_arithb.h" +#include "BLI_blenlib.h" +#include "BLI_threads.h" #include "MEM_guardedalloc.h" #include "BKE_context.h" @@ -81,6 +82,8 @@ #include "UI_resources.h" #include "UI_view2d.h" +#include "RNA_access.h" + #include "CMP_node.h" #include "SHD_node.h" @@ -91,6 +94,50 @@ 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 ui_draw_tria_icon(float x, float y, float aspect, char dir); +void ED_node_changed_update(bContext *C, bNode *node) +{ + SpaceNode *snode= CTX_wm_space_node(C); + + if(!snode) + return; + + if(snode->treetype==NTREE_SHADER) { + WM_event_add_notifier(C, NC_MATERIAL|ND_SHADING, snode->id); + } + else if(snode->treetype==NTREE_COMPOSIT) { + NodeTagChanged(snode->edittree, node); + /* don't use NodeTagIDChanged, it gives far too many recomposites for image, scene layers, ... */ + + /* not the best implementation of the world... but we need it to work now :) */ + if(node->type==CMP_NODE_R_LAYERS && node->custom2) { + /* add event for this window (after render curarea can be changed) */ + //addqueue(curarea->win, UI_BUT_EVENT, B_NODE_TREE_EXEC); + + //composite_node_render(snode, node); + //snode_handle_recalc(snode); + + /* add another event, a render can go fullscreen and open new window */ + //addqueue(curarea->win, UI_BUT_EVENT, B_NODE_TREE_EXEC); + } + else { + node= node_tree_get_editgroup(snode->nodetree); + if(node) + NodeTagIDChanged(snode->nodetree, node->id); + } + WM_event_add_notifier(C, NC_SCENE|ND_NODES, CTX_data_scene(C)); + } + else if(snode->treetype==NTREE_TEXTURE) { + WM_event_add_notifier(C, NC_TEXTURE|ND_NODES, snode->id); + } + +} + +static void do_node_internal_buttons(bContext *C, void *node_v, int event) +{ + if(event==B_NODE_EXEC) + ED_node_changed_update(C, node_v); +} + static void node_scaling_widget(int color_id, float aspect, float xmin, float ymin, float xmax, float ymax) { @@ -110,10 +157,14 @@ static void node_scaling_widget(int color_id, float aspect, float xmin, float ym } /* based on settings in node, sets drawing rect info. each redraw! */ -static void node_update(bNode *node) +static void node_update(const bContext *C, bNodeTree *ntree, bNode *node) { + uiLayout *layout; + PointerRNA ptr; bNodeSocket *nsock; float dy= node->locy; + int buty; + char str[32]; /* header */ dy-= NODE_DY; @@ -121,7 +172,7 @@ static void node_update(bNode *node) /* little bit space in top */ if(node->outputs.first) dy-= NODE_DYS/2; - + /* output sockets */ for(nsock= node->outputs.first; nsock; nsock= nsock->next) { if(!(nsock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))) { @@ -130,13 +181,15 @@ static void node_update(bNode *node) dy-= NODE_DY; } } - - node->prvr.xmin= node->butr.xmin= node->locx + NODE_DYS; - node->prvr.xmax= node->butr.xmax= node->locx + node->width- NODE_DYS; + + node->prvr.xmin= node->locx + NODE_DYS; + node->prvr.xmax= node->locx + node->width- NODE_DYS; /* preview rect? */ if(node->flag & NODE_PREVIEW) { /* only recalculate size when there's a preview actually, otherwise we use stored result */ + BLI_lock_thread(LOCK_PREVIEW); + if(node->preview && node->preview->rect) { float aspect= 1.0f; @@ -172,20 +225,41 @@ static void node_update(bNode *node) node->prvr.ymin= dy - oldh; dy= node->prvr.ymin - NODE_DYS/2; } + + BLI_unlock_thread(LOCK_PREVIEW); } /* XXX ugly hack, typeinfo for group is generated */ if(node->type == NODE_GROUP) - ; // XXX node->typeinfo->butfunc= node_buts_group; + ; // XXX node->typeinfo->uifunc= node_buts_group; + + /* ui block */ + sprintf(str, "node buttons %p", node); + node->block= uiBeginBlock(C, CTX_wm_region(C), str, UI_EMBOSS); + uiBlockSetHandleFunc(node->block, do_node_internal_buttons, node); /* buttons rect? */ - if((node->flag & NODE_OPTIONS) && node->typeinfo->butfunc) { + if((node->flag & NODE_OPTIONS) && node->typeinfo->uifunc) { dy-= NODE_DYS/2; - node->butr.ymax= dy; - node->butr.ymin= dy - (float)node->typeinfo->butfunc(NULL, NULL, node, NULL); - dy= node->butr.ymin - NODE_DYS/2; + + /* set this for uifunc() that don't use layout engine yet */ + node->butr.xmin= 0; + node->butr.xmax= node->width - 2*NODE_DYS; + node->butr.ymin= 0; + node->butr.ymax= 0; + + RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr); + + layout= uiBlockLayout(node->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, + node->locx+NODE_DYS, dy, node->butr.xmax, 20, U.uistyles.first); + + node->typeinfo->uifunc(layout, &ptr); + uiBlockEndAlign(node->block); + uiBlockLayoutResolve(node->block, NULL, &buty); + + dy= buty - NODE_DYS/2; } - + /* input sockets */ for(nsock= node->inputs.first; nsock; nsock= nsock->next) { if(!(nsock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))) { @@ -198,7 +272,7 @@ static void node_update(bNode *node) /* little bit space in end */ if(node->inputs.first || (node->flag & (NODE_OPTIONS|NODE_PREVIEW))==0 ) dy-= NODE_DYS/2; - + node->totr.xmin= node->locx; node->totr.xmax= node->locx + node->width; node->totr.ymax= node->locy; @@ -206,11 +280,12 @@ static void node_update(bNode *node) } /* based on settings in node, sets drawing rect info. each redraw! */ -static void node_update_hidden(bNode *node) +static void node_update_hidden(const bContext *C, bNode *node) { bNodeSocket *nsock; float rad, drad, hiddenrad= HIDDEN_RAD; int totin=0, totout=0, tot; + char str[32]; /* calculate minimal radius */ for(nsock= node->inputs.first; nsock; nsock= nsock->next) @@ -251,6 +326,11 @@ static void node_update_hidden(bNode *node) rad+= drad; } } + + /* ui block */ + sprintf(str, "node buttons %p", node); + node->block= uiBeginBlock(C, CTX_wm_region(C), str, UI_EMBOSS); + uiBlockSetHandleFunc(node->block, do_node_internal_buttons, node); } static int node_get_colorid(bNode *node) @@ -275,7 +355,7 @@ static int node_get_colorid(bNode *node) /* based on settings in node, sets drawing rect info. each redraw! */ /* note: this assumes only 1 group at a time is drawn (linked data) */ /* in node->totr the entire boundbox for the group is stored */ -static void node_update_group(bNode *gnode) +static void node_update_group(const bContext *C, bNodeTree *ntree, bNode *gnode) { bNodeTree *ngroup= (bNodeTree *)gnode->id; bNode *node; @@ -288,9 +368,9 @@ static void node_update_group(bNode *gnode) node->locx+= gnode->locx; node->locy+= gnode->locy; if(node->flag & NODE_HIDDEN) - node_update_hidden(node); + node_update_hidden(C, node); else - node_update(node); + node_update(C, ntree, node); node->locx-= gnode->locx; node->locy-= gnode->locy; } @@ -492,6 +572,7 @@ static uiBlock *socket_vector_menu(bContext *C, ARegion *ar, void *socket_v) } block= uiBeginBlock(C, ar, "socket menu", UI_EMBOSS); + uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN); /* use this for a fake extra empy space around the buttons */ uiDefBut(block, LABEL, 0, "", -4, -4, 188, 68, NULL, 0, 0, 0, 0, ""); @@ -575,61 +656,15 @@ static void node_draw_preview(bNodePreview *preview, rctf *prv) } -static void do_node_internal_buttons(bContext *C, void *node_v, int event) -{ - SpaceNode *snode= CTX_wm_space_node(C); - - if(event==B_NODE_EXEC) { - if(snode->treetype==NTREE_SHADER) { - WM_event_add_notifier(C, NC_MATERIAL|ND_SHADING, snode->id); - } - else if(snode->treetype==NTREE_COMPOSIT) { - bNode *node= node_v; - - NodeTagChanged(snode->edittree, node); - /* don't use NodeTagIDChanged, it gives far too many recomposites for image, scene layers, ... */ - - /* not the best implementation of the world... but we need it to work now :) */ - if(node->type==CMP_NODE_R_LAYERS && node->custom2) { - /* add event for this window (after render curarea can be changed) */ - //addqueue(curarea->win, UI_BUT_EVENT, B_NODE_TREE_EXEC); - - //composite_node_render(snode, node); - //snode_handle_recalc(snode); - - /* add another event, a render can go fullscreen and open new window */ - //addqueue(curarea->win, UI_BUT_EVENT, B_NODE_TREE_EXEC); - } - else { - node= snode_get_editgroup(snode); - if(node) - NodeTagIDChanged(snode->nodetree, node->id); - } - WM_event_add_notifier(C, NC_SCENE|ND_NODES, CTX_data_scene(C)); - } - else if(snode->treetype==NTREE_TEXTURE) { - WM_event_add_notifier(C, NC_TEXTURE|ND_NODES, snode->id); - } - } - -} - static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bNode *node) { bNodeSocket *sock; - 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); @@ -655,7 +690,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN icon_id= ICON_MATERIAL_DATA; iconofs-= 18.0f; glEnable(GL_BLEND); - UI_icon_draw_aspect_blended(iconofs, rct->ymax-NODE_DY+2, icon_id, snode->aspect, -60); + UI_icon_draw_aspect(iconofs, rct->ymax-NODE_DY+2, icon_id, snode->aspect, 0.5f); glDisable(GL_BLEND); } if(node->type == NODE_GROUP) { @@ -663,21 +698,18 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN iconofs-= 18.0f; glEnable(GL_BLEND); if(node->id->lib) { - glPixelTransferf(GL_GREEN_SCALE, 0.7f); - glPixelTransferf(GL_BLUE_SCALE, 0.3f); - UI_icon_draw_aspect(iconofs, rct->ymax-NODE_DY+2, ICON_NODE, snode->aspect); - glPixelTransferf(GL_GREEN_SCALE, 1.0f); - glPixelTransferf(GL_BLUE_SCALE, 1.0f); + float rgb[3] = {1.0f, 0.7f, 0.3f}; + UI_icon_draw_aspect_color(iconofs, rct->ymax-NODE_DY+2, ICON_NODE, snode->aspect, rgb); } else { - UI_icon_draw_aspect_blended(iconofs, rct->ymax-NODE_DY+2, ICON_NODE, snode->aspect, -60); + UI_icon_draw_aspect(iconofs, rct->ymax-NODE_DY+2, ICON_NODE, snode->aspect, 0.5f); } glDisable(GL_BLEND); } if(node->typeinfo->flag & NODE_OPTIONS) { iconofs-= 18.0f; glEnable(GL_BLEND); - UI_icon_draw_aspect_blended(iconofs, rct->ymax-NODE_DY+2, ICON_BUTS, snode->aspect, -60); + UI_icon_draw_aspect(iconofs, rct->ymax-NODE_DY+2, ICON_BUTS, snode->aspect, 0.5f); glDisable(GL_BLEND); } { /* always hide/reveal unused sockets */ @@ -690,7 +722,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN else*/ shade= -90; glEnable(GL_BLEND); - UI_icon_draw_aspect_blended(iconofs, rct->ymax-NODE_DY+2, ICON_PLUS, snode->aspect, shade); + UI_icon_draw_aspect(iconofs, rct->ymax-NODE_DY+2, ICON_PLUS, snode->aspect, 0.5f); glDisable(GL_BLEND); } @@ -715,7 +747,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN else BLI_strncpy(showname, node->name, 128); - uiDefBut(block, LABEL, 0, showname, (short)(rct->xmin+15), (short)(rct->ymax-NODE_DY), + uiDefBut(node->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 */ @@ -743,7 +775,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN /* hurmf... another candidate for callback, have to see how this works first */ - if(node->id && block && snode->treetype==NTREE_SHADER) + if(node->id && node->block && snode->treetype==NTREE_SHADER) nodeShaderSynchronizeID(node, 0); /* socket inputs, buttons */ @@ -751,38 +783,38 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN if(!(sock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))) { socket_circle_draw(sock, NODE_SOCKSIZE); - if(block && sock->link==NULL) { + if(node->block && sock->link==NULL) { float *butpoin= sock->ns.vec; if(sock->type==SOCK_VALUE) { - bt= uiDefButF(block, NUM, B_NODE_EXEC, sock->name, + bt= uiDefButF(node->block, NUM, B_NODE_EXEC, sock->name, (short)sock->locx+NODE_DYS, (short)(sock->locy)-9, (short)node->width-NODE_DY, 17, butpoin, sock->ns.min, sock->ns.max, 10, 2, ""); uiButSetFunc(bt, node_sync_cb, snode, node); } else if(sock->type==SOCK_VECTOR) { - uiDefBlockBut(block, socket_vector_menu, sock, sock->name, + uiDefBlockBut(node->block, socket_vector_menu, sock, sock->name, (short)sock->locx+NODE_DYS, (short)sock->locy-9, (short)node->width-NODE_DY, 17, ""); } - else if(block && sock->type==SOCK_RGBA) { + else if(node->block && sock->type==SOCK_RGBA) { short labelw= (short)node->width-NODE_DY-40, width; if(labelw>0) width= 40; else width= (short)node->width-NODE_DY; - bt= uiDefButF(block, COL, B_NODE_EXEC, "", + bt= uiDefButF(node->block, COL, B_NODE_EXEC, "", (short)(sock->locx+NODE_DYS), (short)sock->locy-8, width, 15, butpoin, 0, 0, 0, 0, ""); uiButSetFunc(bt, node_sync_cb, snode, node); - if(labelw>0) uiDefBut(block, LABEL, 0, sock->name, + if(labelw>0) uiDefBut(node->block, LABEL, 0, sock->name, (short)(sock->locx+NODE_DYS) + 40, (short)sock->locy-8, labelw, 15, NULL, 0, 0, 0, 0, ""); } } else { - uiDefBut(block, LABEL, 0, sock->name, (short)(sock->locx+3.0f), (short)(sock->locy-9.0f), + uiDefBut(node->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, ""); } } @@ -803,43 +835,32 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN slen= snode->aspect*UI_GetStringWidth(sock->name+ofs); } - uiDefBut(block, LABEL, 0, sock->name+ofs, (short)(sock->locx-15.0f-slen), (short)(sock->locy-9.0f), + uiDefBut(node->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, ""); } } /* preview */ - if(node->flag & NODE_PREVIEW) + if(node->flag & NODE_PREVIEW) { + BLI_lock_thread(LOCK_PREVIEW); if(node->preview && node->preview->rect) node_draw_preview(node->preview, &node->prvr); - - /* buttons */ - if(node->flag & NODE_OPTIONS) { - if(block) { - if(node->typeinfo->butfunc) { - node->typeinfo->butfunc(block, snode->nodetree, node, &node->butr); - } - } + BLI_unlock_thread(LOCK_PREVIEW); } - - uiEndBlock(C, block); - uiDrawBlock(C, block); + + uiEndBlock(C, node->block); + uiDrawBlock(C, node->block); + node->block= NULL; } 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 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); + char showname[128]; /* 128 is used below */ /* shadow */ uiSetRoundBox(15); @@ -884,7 +905,7 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b else BLI_strncpy(showname, node->name, 128); - uiDefBut(block, LABEL, 0, showname, (short)(rct->xmin+15), (short)(centy-10), + uiDefBut(node->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, ""); } @@ -910,9 +931,9 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b socket_circle_draw(sock, NODE_SOCKSIZE); } - uiEndBlock(C, block); - uiDrawBlock(C, block); - + uiEndBlock(C, node->block); + uiDrawBlock(C, node->block); + node->block= NULL; } static void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree) @@ -1081,11 +1102,11 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d) /* for now, we set drawing coordinates on each redraw */ for(node= snode->nodetree->nodes.first; node; node= node->next) { if(node->flag & NODE_GROUP_EDIT) - node_update_group(node); + node_update_group(C, snode->nodetree, node); else if(node->flag & NODE_HIDDEN) - node_update_hidden(node); + node_update_hidden(C, node); else - node_update(node); + node_update(C, snode->nodetree, node); } node_draw_nodetree(C, ar, snode, snode->nodetree); diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index bc81c25d106..50a99650ec0 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -58,10 +58,11 @@ #include "BKE_material.h" #include "BKE_paint.h" #include "BKE_texture.h" +#include "BKE_report.h" #include "BKE_scene.h" #include "BKE_utildefines.h" -#include "ED_previewrender.h" +#include "ED_render.h" #include "BIF_gl.h" @@ -84,6 +85,7 @@ #include "WM_api.h" #include "WM_types.h" +#include "UI_interface.h" #include "UI_view2d.h" #include "node_intern.h" @@ -150,7 +152,7 @@ static void compo_startjob(void *cjv, short *stop, short *do_update) { CompoJob *cj= cjv; bNodeTree *ntree= cj->localtree; - + if(cj->scene->use_nodes==0) return; @@ -174,8 +176,11 @@ static void compo_startjob(void *cjv, short *stop, short *do_update) void snode_composite_job(const bContext *C, ScrArea *sa) { SpaceNode *snode= sa->spacedata.first; - wmJob *steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa); - CompoJob *cj= MEM_callocN(sizeof(CompoJob), "compo job"); + wmJob *steve; + CompoJob *cj; + + steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa, WM_JOB_EXCL_RENDER); + cj= MEM_callocN(sizeof(CompoJob), "compo job"); /* customdata for preview thread */ cj->scene= CTX_data_scene(C); @@ -327,12 +332,12 @@ static void set_node_imagepath(char *str) /* called from fileselect */ #endif /* 0 */ -bNode *snode_get_editgroup(SpaceNode *snode) +bNode *node_tree_get_editgroup(bNodeTree *nodetree) { bNode *gnode; /* get the groupnode */ - for(gnode= snode->nodetree->nodes.first; gnode; gnode= gnode->next) + for(gnode= nodetree->nodes.first; gnode; gnode= gnode->next) if(gnode->flag & NODE_GROUP_EDIT) break; return gnode; @@ -441,7 +446,7 @@ static void composit_node_event(SpaceNode *snode, short event) addqueue(curarea->win, UI_BUT_EVENT, B_NODE_TREE_EXEC); } else { - node= snode_get_editgroup(snode); + node= node_tree_get_editgroup(snode->nodetree); if(node) NodeTagIDChanged(snode->nodetree, node->id); @@ -722,7 +727,7 @@ void node_set_active(SpaceNode *snode, bNode *node) NodeTagChanged(snode->edittree, node); /* if inside group, tag entire group */ - gnode= snode_get_editgroup(snode); + gnode= node_tree_get_editgroup(snode->nodetree); if(gnode) NodeTagIDChanged(snode->nodetree, gnode->id); @@ -753,6 +758,8 @@ void node_set_active(SpaceNode *snode, bNode *node) #endif /* 0 */ } +/* ***************** Edit Group operator ************* */ + void snode_make_group_editable(SpaceNode *snode, bNode *gnode) { bNode *node; @@ -768,12 +775,9 @@ void snode_make_group_editable(SpaceNode *snode, bNode *gnode) } if(gnode && gnode->type==NODE_GROUP && gnode->id) { - if(gnode->id->lib) { - // XXX if(okee("Make Group Local")) - // ntreeMakeLocal((bNodeTree *)gnode->id); - // else - return; - } + if(gnode->id->lib) + ntreeMakeLocal((bNodeTree *)gnode->id); + gnode->flag |= NODE_GROUP_EDIT; snode->edittree= (bNodeTree *)gnode->id; @@ -794,43 +798,102 @@ void snode_make_group_editable(SpaceNode *snode, bNode *gnode) // XXX BIF_preview_changed(-1); /* temp hack to force texture preview to update */ } +} + +static int node_group_edit_exec(bContext *C, wmOperator *op) +{ + SpaceNode *snode = CTX_wm_space_node(C); + bNode *gnode; + + gnode= nodeGetActive(snode->edittree); + snode_make_group_editable(snode, gnode); + + WM_event_add_notifier(C, NC_SCENE|ND_NODES, NULL); + + return OPERATOR_FINISHED; +} + +static int node_group_edit_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + SpaceNode *snode = CTX_wm_space_node(C); + bNode *gnode; + + gnode= nodeGetActive(snode->edittree); + if(gnode && gnode->type==NODE_GROUP && gnode->id && gnode->id->lib) { + uiPupMenuOkee(C, op->type->idname, "Make group local?"); + return OPERATOR_CANCELLED; + } + + return node_group_edit_exec(C, op); +} + +void NODE_OT_group_edit(wmOperatorType *ot) +{ + /* identifiers */ + ot->name = "Edit Group"; + ot->description = "Edit node group."; + ot->idname = "NODE_OT_group_edit"; + + /* api callbacks */ + ot->invoke = node_group_edit_invoke; + ot->exec = node_group_edit_exec; + ot->poll = ED_operator_node_active; - // allqueue(REDRAWNODE, 0); + /* flags */ + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } -#if 0 +/* ******************** Ungroup operator ********************** */ -void node_ungroup(SpaceNode *snode) +static int node_group_ungroup_exec(bContext *C, wmOperator *op) { + SpaceNode *snode = CTX_wm_space_node(C); bNode *gnode; /* are we inside of a group? */ - gnode= snode_get_editgroup(snode); + gnode= node_tree_get_editgroup(snode->nodetree); if(gnode) snode_make_group_editable(snode, NULL); gnode= nodeGetActive(snode->edittree); - if(gnode==NULL) return; + if(gnode==NULL) + return OPERATOR_CANCELLED; - if(gnode->type!=NODE_GROUP) - error("Not a group"); - else { - if(nodeGroupUnGroup(snode->edittree, gnode)) { - - // allqueue(REDRAWNODE, 0); - } - else - error("Can't ungroup"); + if(gnode->type!=NODE_GROUP) { + BKE_report(op->reports, RPT_ERROR, "Not a group"); + return OPERATOR_CANCELLED; + } + else if(!nodeGroupUnGroup(snode->edittree, gnode)) { + BKE_report(op->reports, RPT_ERROR, "Can't ungroup"); + return OPERATOR_CANCELLED; } + + WM_event_add_notifier(C, NC_SCENE|ND_NODES, NULL); + + return OPERATOR_FINISHED; +} + +void NODE_OT_group_ungroup(wmOperatorType *ot) +{ + /* identifiers */ + ot->name = "Ungroup"; + ot->description = "Ungroup selected nodes."; + ot->idname = "NODE_OT_group_ungroup"; + + /* api callbacks */ + ot->exec = node_group_ungroup_exec; + ot->poll = ED_operator_node_active; + + /* flags */ + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } -#endif /* 0 */ /* when links in groups change, inputs/outputs change, nodes added/deleted... */ -static void snode_verify_groups(SpaceNode *snode) +static void node_tree_verify_groups(bNodeTree *nodetree) { bNode *gnode; - gnode= snode_get_editgroup(snode); + gnode= node_tree_get_editgroup(nodetree); /* does all materials */ if(gnode) @@ -1156,7 +1219,7 @@ static int node_resize_invoke(bContext *C, wmOperator *op, wmEvent *event) nsw->oldwidth= node->width; /* add modal handler */ - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } @@ -1229,27 +1292,14 @@ Material *editnode_get_active_material(Material *ma) /* no undo here! */ -void node_deselectall(SpaceNode *snode, int swap) +void node_deselectall(SpaceNode *snode) { bNode *node; - if(swap) { - for(node= snode->edittree->nodes.first; node; node= node->next) - if(node->flag & SELECT) - break; - if(node==NULL) { - for(node= snode->edittree->nodes.first; node; node= node->next) - node->flag |= SELECT; - return; - } - /* else pass on to deselect */ - } - for(node= snode->edittree->nodes.first; node; node= node->next) node->flag &= ~SELECT; } - int node_has_hidden_sockets(bNode *node) { bNodeSocket *sock; @@ -1276,7 +1326,7 @@ static void node_hide_unhide_sockets(SpaceNode *snode, bNode *node) sock->flag &= ~SOCK_HIDDEN; } else { - bNode *gnode= snode_get_editgroup(snode); + bNode *gnode= node_tree_get_editgroup(snode->nodetree); /* hiding inside group should not break links in other group users */ if(gnode) { @@ -1304,7 +1354,7 @@ static void node_hide_unhide_sockets(SpaceNode *snode, bNode *node) } // allqueue(REDRAWNODE, 1); - snode_verify_groups(snode); + node_tree_verify_groups(snode->nodetree); } @@ -1431,7 +1481,7 @@ void node_active_link_viewer(SpaceNode *snode) float mx=0, my=0; // XXX short mval[2]; - gnode= snode_get_editgroup(snode); + gnode= node_tree_get_editgroup(snode->nodetree); if(gnode==NULL) return 0; // XXX getmouseco_areawin(mval); @@ -1606,7 +1656,7 @@ bNode *node_add_node(SpaceNode *snode, Scene *scene, int type, float locx, float { bNode *node= NULL, *gnode; - node_deselectall(snode, 0); + node_deselectall(snode); if(type>=NODE_DYNAMIC_MENU) { node= nodeAddNodeType(snode->edittree, type, NULL, NULL); @@ -1631,13 +1681,13 @@ bNode *node_add_node(SpaceNode *snode, Scene *scene, int type, float locx, float node->locy= locy + 60.0f; // arbitrary.. so its visible node->flag |= SELECT; - gnode= snode_get_editgroup(snode); + gnode= node_tree_get_editgroup(snode->nodetree); if(gnode) { node->locx -= gnode->locx; node->locy -= gnode->locy; } - snode_verify_groups(snode); + node_tree_verify_groups(snode->nodetree); node_set_active(snode, node); if(snode->nodetree->type==NTREE_COMPOSIT) { @@ -1667,7 +1717,7 @@ void node_mute(SpaceNode *snode) bNode *node; /* no disabling inside of groups */ - if(snode_get_editgroup(snode)) + if(node_tree_get_editgroup(snode->nodetree)) return; for(node= snode->edittree->nodes.first; node; node= node->next) { @@ -1693,7 +1743,7 @@ int node_duplicate_exec(bContext *C, wmOperator *op) ntreeCopyTree(snode->edittree, 1); /* 1 == internally selected nodes */ ntreeSolveOrder(snode->edittree); - snode_verify_groups(snode); + node_tree_verify_groups(snode->nodetree); snode_handle_recalc(C, snode); return OPERATOR_FINISHED; @@ -1904,7 +1954,7 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event) } ntreeSolveOrder(snode->edittree); - snode_verify_groups(snode); + node_tree_verify_groups(snode->nodetree); snode_handle_recalc(C, snode); MEM_freeN(op->customdata); @@ -1986,7 +2036,7 @@ static int node_link_invoke(bContext *C, wmOperator *op, wmEvent *event) nldrag->link= nodeAddLink(snode->edittree, NULL, NULL, nldrag->node, nldrag->sock); /* add modal handler */ - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } @@ -2013,35 +2063,6 @@ void NODE_OT_link(wmOperatorType *ot) } -void node_delete(SpaceNode *snode) -{ - bNode *node, *next; - bNodeSocket *sock; - - for(node= snode->edittree->nodes.first; node; node= next) { - next= node->next; - if(node->flag & SELECT) { - /* set selin and selout NULL if the sockets belong to a node to be deleted */ - for(sock= node->inputs.first; sock; sock= sock->next) - if(snode->edittree->selin == sock) snode->edittree->selin= NULL; - - for(sock= node->outputs.first; sock; sock= sock->next) - if(snode->edittree->selout == sock) snode->edittree->selout= NULL; - - /* check id user here, nodeFreeNode is called for free dbase too */ - if(node->id) - node->id->us--; - nodeFreeNode(snode->edittree, node); - } - } - - snode_verify_groups(snode); - // NODE_FIX_ME - // snode_handle_recalc(snode); - // allqueue(REDRAWNODE, 1); -} - - void node_hide(SpaceNode *snode) { bNode *node; @@ -2091,32 +2112,6 @@ void node_insert_key(SpaceNode *snode) } } -void node_select_linked(SpaceNode *snode, int out) -{ - bNodeLink *link; - bNode *node; - - /* NODE_TEST is the free flag */ - for(node= snode->edittree->nodes.first; node; node= node->next) - node->flag &= ~NODE_TEST; - - for(link= snode->edittree->links.first; link; link= link->next) { - if(out) { - if(link->fromnode->flag & NODE_SELECT) - link->tonode->flag |= NODE_TEST; - } - else { - if(link->tonode->flag & NODE_SELECT) - link->fromnode->flag |= NODE_TEST; - } - } - - for(node= snode->edittree->nodes.first; node; node= node->next) - if(node->flag & NODE_TEST) - node->flag |= NODE_SELECT; - -} - /* makes a link between selected output and input sockets */ void node_make_link(SpaceNode *snode) { @@ -2137,7 +2132,7 @@ void node_make_link(SpaceNode *snode) else return; ntreeSolveOrder(snode->edittree); - snode_verify_groups(snode); + node_tree_verify_groups(snode->nodetree); // XXX snode_handle_recalc(snode); } @@ -2192,7 +2187,7 @@ static int cut_links_exec(bContext *C, wmOperator *op) } ntreeSolveOrder(snode->edittree); - snode_verify_groups(snode); + node_tree_verify_groups(snode->nodetree); snode_handle_recalc(C, snode); return OPERATOR_FINISHED; @@ -2292,15 +2287,16 @@ void imagepaint_composite_tags(bNodeTree *ntree, Image *image, ImageUser *iuser) } } -/* ********************** */ +/* ****************** Make Group operator ******************* */ -void node_make_group(SpaceNode *snode) +static int node_group_make_exec(bContext *C, wmOperator *op) { + SpaceNode *snode = CTX_wm_space_node(C); bNode *gnode; if(snode->edittree!=snode->nodetree) { -// XXX error("Can not add a new Group in a Group"); - return; + BKE_report(op->reports, RPT_ERROR, "Can not add a new Group in a Group"); + return OPERATOR_CANCELLED; } /* for time being... is too complex to handle */ @@ -2310,20 +2306,39 @@ void node_make_group(SpaceNode *snode) if(gnode->type==CMP_NODE_R_LAYERS) break; } + if(gnode) { -// XXX error("Can not add RenderLayer in a Group"); - return; + BKE_report(op->reports, RPT_ERROR, "Can not add RenderLayer in a Group"); + return OPERATOR_CANCELLED; } } gnode= nodeMakeGroupFromSelected(snode->nodetree); if(gnode==NULL) { -// XXX error("Can not make Group"); + BKE_report(op->reports, RPT_ERROR, "Can not make Group"); + return OPERATOR_CANCELLED; } else { nodeSetActive(snode->nodetree, gnode); ntreeSolveOrder(snode->nodetree); } + + return OPERATOR_FINISHED; +} + +void NODE_OT_group_make(wmOperatorType *ot) +{ + /* identifiers */ + ot->name = "Group"; + ot->description = "Make group from selected nodes."; + ot->idname = "NODE_OT_group_make"; + + /* api callbacks */ + ot->exec = node_group_make_exec; + ot->poll = ED_operator_node_active; + + /* flags */ + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } #if 0 @@ -2451,9 +2466,6 @@ void winqreadnodespace(ScrArea *sa, void *spacedata, BWinEvent *evt) if(fromlib) fromlib= -1; else toolbox_n_add(); } - else if(G.qual==0) { - node_deselectall(snode, 1); - } break; case BKEY: if(G.qual==0) @@ -2540,29 +2552,50 @@ void winqreadnodespace(ScrArea *sa, void *spacedata, BWinEvent *evt) } #endif -static int node_delete_selection_exec(bContext *C, wmOperator *op) +/* ****************** Delete operator ******************* */ + +static int node_delete_exec(bContext *C, wmOperator *op) { SpaceNode *snode= CTX_wm_space_node(C); - ARegion *ar= CTX_wm_region(C); + bNode *node, *next; + bNodeSocket *sock; + + for(node= snode->edittree->nodes.first; node; node= next) { + next= node->next; + if(node->flag & SELECT) { + /* set selin and selout NULL if the sockets belong to a node to be deleted */ + for(sock= node->inputs.first; sock; sock= sock->next) + if(snode->edittree->selin == sock) snode->edittree->selin= NULL; + + for(sock= node->outputs.first; sock; sock= sock->next) + if(snode->edittree->selout == sock) snode->edittree->selout= NULL; + + /* check id user here, nodeFreeNode is called for free dbase too */ + if(node->id) + node->id->us--; + nodeFreeNode(snode->edittree, node); + } + } - node_delete(snode); - ED_region_tag_redraw(ar); + node_tree_verify_groups(snode->nodetree); + + // NODE_FIX_ME + // snode_handle_recalc(snode); + WM_event_add_notifier(C, NC_SCENE|ND_NODES, NULL); /* Do we need to pass the scene? */ return OPERATOR_FINISHED; } -/* operators */ - void NODE_OT_delete(wmOperatorType *ot) { - /* identifiers */ ot->name= "Delete"; + ot->description = "Delete selected nodes."; ot->idname= "NODE_OT_delete"; /* api callbacks */ - ot->exec= node_delete_selection_exec; + ot->exec= node_delete_exec; ot->poll= ED_operator_node_active; /* flags */ diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h index 5c66c902797..2a929472c68 100644 --- a/source/blender/editors/space_node/node_intern.h +++ b/source/blender/editors/space_node/node_intern.h @@ -58,6 +58,9 @@ void node_keymap(wmWindowManager *wm); /* node_select.c */ void NODE_OT_select(struct wmOperatorType *ot); void NODE_OT_select_extend(struct wmOperatorType *ot); +void NODE_OT_select_all(wmOperatorType *ot); +void NODE_OT_select_linked_to(wmOperatorType *ot); +void NODE_OT_select_linked_from(wmOperatorType *ot); void NODE_OT_visibility_toggle(struct wmOperatorType *ot); void NODE_OT_view_all(struct wmOperatorType *ot); void NODE_OT_select_border(struct wmOperatorType *ot); @@ -76,9 +79,9 @@ void snode_set_context(SpaceNode *snode, Scene *scene); void snode_make_group_editable(SpaceNode *snode, bNode *gnode); void snode_home(ScrArea *sa, ARegion *ar, SpaceNode *snode); void node_set_active(SpaceNode *snode, bNode *node); -void node_deselectall(SpaceNode *snode, int swap); +void node_deselectall(SpaceNode *snode); void snode_composite_job(const struct bContext *C, ScrArea *sa); -bNode *snode_get_editgroup(SpaceNode *snode); +bNode *node_tree_get_editgroup(bNodeTree *ntree); void snode_autoconnect(SpaceNode *snode, bNode *node_to, int flag); void NODE_OT_duplicate(struct wmOperatorType *ot); @@ -86,6 +89,9 @@ void NODE_OT_link(struct wmOperatorType *ot); void NODE_OT_delete(struct wmOperatorType *ot); void NODE_OT_resize(struct wmOperatorType *ot); void NODE_OT_links_cut(struct wmOperatorType *ot); +void NODE_OT_group_make(struct wmOperatorType *ot); +void NODE_OT_group_ungroup(struct wmOperatorType *ot); +void NODE_OT_group_edit(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 f78abb28313..f47e9aa2a6f 100644 --- a/source/blender/editors/space_node/node_ops.c +++ b/source/blender/editors/space_node/node_ops.c @@ -51,6 +51,9 @@ void node_operatortypes(void) { WM_operatortype_append(NODE_OT_select); WM_operatortype_append(NODE_OT_select_extend); + WM_operatortype_append(NODE_OT_select_all); + WM_operatortype_append(NODE_OT_select_linked_to); + WM_operatortype_append(NODE_OT_select_linked_from); WM_operatortype_append(NODE_OT_visibility_toggle); WM_operatortype_append(NODE_OT_view_all); WM_operatortype_append(NODE_OT_select_border); @@ -59,12 +62,14 @@ void node_operatortypes(void) WM_operatortype_append(NODE_OT_resize); WM_operatortype_append(NODE_OT_links_cut); WM_operatortype_append(NODE_OT_duplicate); - + WM_operatortype_append(NODE_OT_group_make); + WM_operatortype_append(NODE_OT_group_ungroup); + WM_operatortype_append(NODE_OT_group_edit); } void node_keymap(struct wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "Node", SPACE_NODE, 0); + wmKeyMap *keymap= WM_keymap_find(wm, "Node", SPACE_NODE, 0); /* mouse select in nodes used to be both keys, it's UI elements... */ RNA_enum_set(WM_keymap_add_item(keymap, "NODE_OT_select", ACTIONMOUSE, KM_PRESS, 0, 0)->ptr, "select_type", NODE_SELECT_MOUSE); @@ -82,6 +87,15 @@ void node_keymap(struct wmWindowManager *wm) WM_keymap_add_item(keymap, "NODE_OT_view_all", HOMEKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "NODE_OT_select_border", BKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "NODE_OT_delete", XKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "NODE_OT_delete", DELKEY, KM_PRESS, 0, 0); + + WM_keymap_add_item(keymap, "NODE_OT_select_all", AKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "NODE_OT_select_linked_to", LKEY, KM_PRESS, KM_SHIFT, 0); + WM_keymap_add_item(keymap, "NODE_OT_select_linked_from", LKEY, KM_PRESS, 0, 0); + + WM_keymap_add_item(keymap, "NODE_OT_group_make", GKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "NODE_OT_group_ungroup", GKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_add_item(keymap, "NODE_OT_group_edit", TABKEY, KM_PRESS, 0, 0); transform_keymap_for_space(wm, keymap, SPACE_NODE); } diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c index 73becc1ebe8..5e482758c9d 100644 --- a/source/blender/editors/space_node/node_select.c +++ b/source/blender/editors/space_node/node_select.c @@ -83,7 +83,7 @@ static void node_mouse_select(SpaceNode *snode, ARegion *ar, short *mval, short } if(node) { if((extend & KM_SHIFT)==0) - node_deselectall(snode, 0); + node_deselectall(snode); if(extend & KM_SHIFT) { if(node->flag & SELECT) @@ -140,7 +140,7 @@ static int node_select_modal(bContext *C, wmOperator *op, wmEvent *event) printf("%d %d\n", event->x, event->y); break; case SELECTMOUSE: - //if (event->val==0) { + //if (event->val==KM_RELEASE) { /* calculate overall delta mouse-movement for redo */ printf("done translating\n"); //WM_cursor_restore(CTX_wm_window(C)); @@ -224,12 +224,6 @@ void NODE_OT_select(wmOperatorType *ot) /* ****** Border Select ****** */ -static EnumPropertyItem prop_select_types[] = { - {NODE_EXCLUSIVE, "EXCLUSIVE", 0, "Exclusive", ""}, /* right mouse */ - {NODE_EXTEND, "EXTEND", 0, "Extend", ""}, /* left mouse */ - {0, NULL, 0, NULL, NULL} -}; - static int node_borderselect_exec(bContext *C, wmOperator *op) { SpaceNode *snode= CTX_wm_space_node(C); @@ -288,6 +282,122 @@ void NODE_OT_select_border(wmOperatorType *ot) RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX); RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX); RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX); +} + +/* ****** Select/Deselect All ****** */ + +static int node_select_all_exec(bContext *C, wmOperator *op) +{ + SpaceNode *snode = CTX_wm_space_node(C); + bNode *first = snode->edittree->nodes.first; + bNode *node; + int count= 0; + + for(node=first; node; node=node->next) + if(node->flag & NODE_SELECT) + count++; + + if(count) { + for(node=first; node; node=node->next) + node->flag &= ~NODE_SELECT; + } + else { + for(node=first; node; node=node->next) + node->flag |= NODE_SELECT; + } + + WM_event_add_notifier(C, NC_SCENE|ND_NODES, NULL); + return OPERATOR_FINISHED; +} + +void NODE_OT_select_all(wmOperatorType *ot) +{ + /* identifiers */ + ot->name = "Select/Deselect All"; + ot->description = "(De)select all nodes."; + ot->idname = "NODE_OT_select_all"; + + /* api callbacks */ + ot->exec = node_select_all_exec; + ot->poll = ED_operator_node_active; + + /* flags */ + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/* ****** Select Linked To ****** */ + +static int node_select_linked_to_exec(bContext *C, wmOperator *op) +{ + SpaceNode *snode = CTX_wm_space_node(C); + bNodeLink *link; + bNode *node; + + for (node=snode->edittree->nodes.first; node; node=node->next) + node->flag &= ~NODE_TEST; + + for (link=snode->edittree->links.first; link; link=link->next) + if (link->fromnode->flag & NODE_SELECT) + link->tonode->flag |= NODE_TEST; + + for (node=snode->edittree->nodes.first; node; node=node->next) + if (node->flag & NODE_TEST) + node->flag |= NODE_SELECT; + + WM_event_add_notifier(C, NC_SCENE|ND_NODES, NULL); + return OPERATOR_FINISHED; +} + +void NODE_OT_select_linked_to(wmOperatorType *ot) +{ + /* identifiers */ + ot->name = "Select Linked To"; + ot->description = "Select nodes linked to the selected ones."; + ot->idname = "NODE_OT_select_linked_to"; + + /* api callbacks */ + ot->exec = node_select_linked_to_exec; + ot->poll = ED_operator_node_active; + + /* flags */ + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/* ****** Select Linked From ****** */ + +static int node_select_linked_from_exec(bContext *C, wmOperator *op) +{ + SpaceNode *snode = CTX_wm_space_node(C); + bNodeLink *link; + bNode *node; + + for(node=snode->edittree->nodes.first; node; node=node->next) + node->flag &= ~NODE_TEST; + + for(link=snode->edittree->links.first; link; link=link->next) + if(link->tonode->flag & NODE_SELECT) + link->fromnode->flag |= NODE_TEST; + + for(node=snode->edittree->nodes.first; node; node=node->next) + if(node->flag & NODE_TEST) + node->flag |= NODE_SELECT; + + WM_event_add_notifier(C, NC_SCENE|ND_NODES, NULL); + return OPERATOR_FINISHED; +} - RNA_def_enum(ot->srna, "type", prop_select_types, 0, "Type", ""); +void NODE_OT_select_linked_from(wmOperatorType *ot) +{ + /* identifiers */ + ot->name = "Select Linked From"; + ot->description = "Select nodes linked from the selected ones."; + ot->idname = "NODE_OT_select_linked_from"; + + /* api callbacks */ + ot->exec = node_select_linked_from_exec; + ot->poll = ED_operator_node_active; + + /* flags */ + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } + diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c index d3a445b18c0..2cfd9d99123 100644 --- a/source/blender/editors/space_node/space_node.c +++ b/source/blender/editors/space_node/space_node.c @@ -48,7 +48,7 @@ #include "BKE_screen.h" #include "BKE_node.h" -#include "ED_previewrender.h" +#include "ED_render.h" #include "ED_space_api.h" #include "ED_screen.h" @@ -245,12 +245,12 @@ static void node_channel_area_draw(const bContext *C, ARegion *ar) /* Initialise main area, setting handlers. */ static void node_main_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy); /* own keymap */ - keymap= WM_keymap_listbase(wm, "Node", SPACE_NODE, 0); /* XXX weak? */ + keymap= WM_keymap_find(wm, "Node", SPACE_NODE, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index a3b47d505fd..e62c1dedb1b 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -4324,7 +4324,7 @@ static void outliner_draw_tree_element(bContext *C, Scene *scene, ARegion *ar, S tselem= TREESTORE(te); - if(*starty >= ar->v2d.cur.ymin && *starty<= ar->v2d.cur.ymax) { + if(*starty+2*OL_H >= ar->v2d.cur.ymin && *starty<= ar->v2d.cur.ymax) { glEnable(GL_BLEND); @@ -4579,7 +4579,7 @@ static void outliner_back(ARegion *ar, SpaceOops *soops) ystart= (int)ar->v2d.tot.ymax; ystart= OL_H*(ystart/(OL_H)); - while(ystart > ar->v2d.cur.ymin) { + while(ystart+2*OL_H > ar->v2d.cur.ymin) { glRecti(0, ystart, (int)ar->v2d.cur.xmax, ystart+OL_H); ystart-= 2*OL_H; } @@ -4597,7 +4597,7 @@ static void outliner_draw_restrictcols(ARegion *ar, SpaceOops *soops) ystart= (int)ar->v2d.tot.ymax; ystart= OL_H*(ystart/(OL_H)); - while(ystart > ar->v2d.cur.ymin) { + while(ystart+2*OL_H > ar->v2d.cur.ymin) { glRecti((int)ar->v2d.cur.xmax-OL_TOGW, ystart, (int)ar->v2d.cur.xmax, ystart+OL_H); ystart-= 2*OL_H; } @@ -4812,7 +4812,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar for(te= lb->first; te; te= te->next) { tselem= TREESTORE(te); - if(te->ys >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) { + if(te->ys+2*OL_H >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) { /* objects have toggle-able restriction flags */ if(tselem->type==0 && te->idcode==ID_OB) { ob = (Object *)tselem->id; @@ -4924,7 +4924,7 @@ static void outliner_draw_rnabuts(uiBlock *block, Scene *scene, ARegion *ar, Spa for(te= lb->first; te; te= te->next) { tselem= TREESTORE(te); - if(te->ys >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) { + if(te->ys+2*OL_H >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) { if(tselem->type == TSE_RNA_PROPERTY) { ptr= &te->rnaptr; prop= te->directdata; @@ -5049,6 +5049,8 @@ static char *keymap_mouse_menu(void) str += sprintf(str, formatstr, "Left Mouse", LEFTMOUSE); str += sprintf(str, formatstr, "Middle Mouse", MIDDLEMOUSE); str += sprintf(str, formatstr, "Right Mouse", RIGHTMOUSE); + str += sprintf(str, formatstr, "Button4 Mouse ", BUTTON4MOUSE); + str += sprintf(str, formatstr, "Button5 Mouse ", BUTTON5MOUSE); str += sprintf(str, formatstr, "Action Mouse", ACTIONMOUSE); str += sprintf(str, formatstr, "Select Mouse", SELECTMOUSE); str += sprintf(str, formatstr, "Mouse Move", MOUSEMOVE); @@ -5071,6 +5073,8 @@ static char *keymap_tweak_menu(void) str += sprintf(str, formatstr, "Left Mouse", EVT_TWEAK_L); str += sprintf(str, formatstr, "Middle Mouse", EVT_TWEAK_M); str += sprintf(str, formatstr, "Right Mouse", EVT_TWEAK_R); + str += sprintf(str, formatstr, "Button4 Mouse ", BUTTON4MOUSE); + str += sprintf(str, formatstr, "Button5 Mouse ", BUTTON5MOUSE); str += sprintf(str, formatstr, "Action Mouse", EVT_TWEAK_A); str += sprintf(str, formatstr, "Select Mouse", EVT_TWEAK_S); @@ -5135,7 +5139,7 @@ static void outliner_draw_keymapbuts(uiBlock *block, ARegion *ar, SpaceOops *soo for(te= lb->first; te; te= te->next) { tselem= TREESTORE(te); - if(te->ys >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) { + if(te->ys+2*OL_H >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) { uiBut *but; char *str; int xstart= 240; @@ -5213,7 +5217,7 @@ static void outliner_buttons(const bContext *C, uiBlock *block, ARegion *ar, Spa for(te= lb->first; te; te= te->next) { tselem= TREESTORE(te); - if(te->ys >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) { + if(te->ys+2*OL_H >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) { if(tselem->flag & TSE_TEXTBUT) { diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c index 2e11eb379b4..a35b91249db 100644 --- a/source/blender/editors/space_outliner/outliner_ops.c +++ b/source/blender/editors/space_outliner/outliner_ops.c @@ -76,7 +76,7 @@ void outliner_operatortypes(void) void outliner_keymap(wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "Outliner", SPACE_OUTLINER, 0); + wmKeyMap *keymap= WM_keymap_find(wm, "Outliner", SPACE_OUTLINER, 0); RNA_boolean_set(WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_PRESS, 0, 0)->ptr, "extend", 0); RNA_boolean_set(WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1); diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index 5058a167a29..e7e6c2d0128 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -72,12 +72,12 @@ static void outliner_main_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy); /* own keymap */ - keymap= WM_keymap_listbase(wm, "Outliner", SPACE_OUTLINER, 0); /* XXX weak? */ + keymap= WM_keymap_find(wm, "Outliner", SPACE_OUTLINER, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c index 88b8dccc6c9..c17793b28f8 100644 --- a/source/blender/editors/space_script/script_edit.c +++ b/source/blender/editors/space_script/script_edit.c @@ -64,10 +64,10 @@ static int run_pyfile_exec(bContext *C, wmOperator *op) ARegion *ar= CTX_wm_region(C); - char filename[512]; - RNA_string_get(op->ptr, "filename", filename); + char path[512]; + RNA_string_get(op->ptr, "path", path); #ifndef DISABLE_PYTHON - if(BPY_run_python_script(C, filename, NULL, op->reports)) { + if(BPY_run_python_script(C, path, NULL, op->reports)) { ED_region_tag_redraw(ar); return OPERATOR_FINISHED; } @@ -85,7 +85,7 @@ void SCRIPT_OT_python_file_run(wmOperatorType *ot) ot->exec= run_pyfile_exec; ot->poll= ED_operator_areaactive; - RNA_def_string_file_path(ot->srna, "filename", "", 512, "Filename", ""); + RNA_def_string_file_path(ot->srna, "path", "", 512, "Path", ""); } static int run_ui_scripts_exec(bContext *C, wmOperator *op) diff --git a/source/blender/editors/space_script/script_ops.c b/source/blender/editors/space_script/script_ops.c index aa35ba54b7f..0e6ea9cf4fd 100644 --- a/source/blender/editors/space_script/script_ops.c +++ b/source/blender/editors/space_script/script_ops.c @@ -65,10 +65,10 @@ void script_operatortypes(void) void script_keymap(wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "Script", SPACE_SCRIPT, 0); + wmKeyMap *keymap= WM_keymap_find(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_python_file_run", PKEY, KM_PRESS, KM_CTRL|KM_SHIFT|KM_ALT, 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, "path", "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 99233cc5020..a0e73082701 100644 --- a/source/blender/editors/space_script/space_script.c +++ b/source/blender/editors/space_script/space_script.c @@ -133,12 +133,12 @@ static SpaceLink *script_duplicate(SpaceLink *sl) /* add handlers, stuff you only do once or on area/region changes */ static void script_main_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_STANDARD, ar->winx, ar->winy); /* own keymap */ - keymap= WM_keymap_listbase(wm, "Script", SPACE_SCRIPT, 0); /* XXX weak? */ + keymap= WM_keymap_find(wm, "Script", SPACE_SCRIPT, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index 8a1b3bf3465..bd5259ddb52 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -289,7 +289,7 @@ static int sequencer_add_movie_strip_exec(bContext *C, wmOperator *op) Editing *ed= seq_give_editing(scene, TRUE); struct anim *an; - char filename[FILE_MAX]; + char path[FILE_MAX]; Sequence *seq, *soundseq=NULL; /* generic strip vars */ Strip *strip; @@ -301,12 +301,12 @@ static int sequencer_add_movie_strip_exec(bContext *C, wmOperator *op) channel= RNA_int_get(op->ptr, "channel"); sound = RNA_boolean_get(op->ptr, "sound"); - RNA_string_get(op->ptr, "filename", filename); + RNA_string_get(op->ptr, "path", path); - an = openanim(filename, IB_rect); + an = openanim(path, IB_rect); if (an==NULL) { - BKE_reportf(op->reports, RPT_ERROR, "Filename \"%s\" could not be loaded as a movie", filename); + BKE_reportf(op->reports, RPT_ERROR, "File \"%s\" could not be loaded as a movie", path); return OPERATOR_CANCELLED; } @@ -323,7 +323,7 @@ static int sequencer_add_movie_strip_exec(bContext *C, wmOperator *op) strip->stripdata= se= MEM_callocN(seq->len*sizeof(StripElem), "stripelem"); - BLI_split_dirfile_basic(filename, strip->dir, se->name); + BLI_split_dirfile_basic(path, strip->dir, se->name); RNA_string_get(op->ptr, "name", seq->name); @@ -332,7 +332,7 @@ static int sequencer_add_movie_strip_exec(bContext *C, wmOperator *op) if(sound) { - soundseq = sequencer_add_sound_strip(C, NULL, start_frame, channel+1, filename); + soundseq = sequencer_add_sound_strip(C, NULL, start_frame, channel+1, path); if(soundseq != NULL) RNA_string_get(op->ptr, "name", soundseq->name); } @@ -376,7 +376,7 @@ void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - WM_operator_properties_filesel(ot, FOLDERFILE|MOVIEFILE); + WM_operator_properties_filesel(ot, FOLDERFILE|MOVIEFILE, FILE_SPECIAL); sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME); RNA_def_boolean(ot->srna, "sound", TRUE, "Sound", "Load sound with the movie"); } @@ -384,7 +384,7 @@ void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot) /* add sound operator */ static int sequencer_add_sound_strip_exec(bContext *C, wmOperator *op) { - char filename[FILE_MAX]; + char path[FILE_MAX]; Scene *scene= CTX_data_scene(C); Sequence *seq; /* generic strip vars */ int start_frame, channel; /* operator props */ @@ -392,9 +392,9 @@ static int sequencer_add_sound_strip_exec(bContext *C, wmOperator *op) start_frame= RNA_int_get(op->ptr, "start_frame"); channel= RNA_int_get(op->ptr, "channel"); - RNA_string_get(op->ptr, "filename", filename); + RNA_string_get(op->ptr, "path", path); - seq = sequencer_add_sound_strip(C, op, start_frame, channel, filename); + seq = sequencer_add_sound_strip(C, op, start_frame, channel, path); if(seq == NULL) return OPERATOR_CANCELLED; @@ -442,7 +442,7 @@ void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE); + WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE, FILE_SPECIAL); sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME); RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory."); } @@ -455,7 +455,7 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op) int tot_images; - char filename[FILE_MAX]; + char path[FILE_MAX]; Sequence *seq; /* generic strip vars */ Strip *strip; @@ -466,14 +466,14 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op) start_frame= RNA_int_get(op->ptr, "start_frame"); channel= RNA_int_get(op->ptr, "channel"); - RNA_string_get(op->ptr, "filename", filename); + RNA_string_get(op->ptr, "path", path); seq = alloc_sequence(ed->seqbasep, start_frame, channel); seq->type= SEQ_IMAGE; /* basic defaults */ seq->strip= strip= MEM_callocN(sizeof(Strip), "strip"); - BLI_split_dirfile_basic(filename, strip->dir, NULL); + BLI_split_dirfile_basic(path, strip->dir, NULL); tot_images= RNA_property_collection_length(op->ptr, RNA_struct_find_property(op->ptr, "files")); @@ -490,7 +490,7 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op) RNA_END; } else { - BLI_split_dirfile_basic(filename, NULL, se->name); + BLI_split_dirfile_basic(path, NULL, se->name); } RNA_string_get(op->ptr, "name", seq->name); @@ -538,7 +538,7 @@ void SEQUENCER_OT_image_strip_add(struct wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE); + WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL); sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME); RNA_def_collection_runtime(ot->srna, "files", &RNA_OperatorFileListElement, "Files", ""); @@ -606,15 +606,15 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op) strip->stripdata= se= MEM_callocN(seq->len*sizeof(StripElem), "stripelem"); if (seq->type==SEQ_PLUGIN) { - char filename[FILE_MAX]; - RNA_string_get(op->ptr, "filename", filename); + char path[FILE_MAX]; + RNA_string_get(op->ptr, "path", path); - sh.init_plugin(seq, filename); + sh.init_plugin(seq, path); if(seq->plugin==NULL) { BLI_remlink(ed->seqbasep, seq); seq_free_sequence(scene, seq); - BKE_reportf(op->reports, RPT_ERROR, "Sequencer plugin \"%s\" could not load.", filename); + BKE_reportf(op->reports, RPT_ERROR, "Sequencer plugin \"%s\" could not load.", path); return OPERATOR_CANCELLED; } } @@ -673,7 +673,7 @@ void SEQUENCER_OT_effect_strip_add(struct wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - WM_operator_properties_filesel(ot, 0); + WM_operator_properties_filesel(ot, 0, FILE_SPECIAL); sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME|SEQPROP_ENDFRAME); RNA_def_enum(ot->srna, "type", sequencer_prop_effect_types, SEQ_CROSS, "Type", "Sequencer effect type"); RNA_def_float_vector(ot->srna, "color", 3, NULL, 0.0f, 1.0f, "Color", "Initialize the strip with this color (only used when type='COLOR')", 0.0f, 1.0f); diff --git a/source/blender/editors/space_sequencer/sequencer_buttons.c b/source/blender/editors/space_sequencer/sequencer_buttons.c index 789843f5490..72cbacd9b6d 100644 --- a/source/blender/editors/space_sequencer/sequencer_buttons.c +++ b/source/blender/editors/space_sequencer/sequencer_buttons.c @@ -112,13 +112,9 @@ static int sequencer_properties(bContext *C, wmOperator *op) ScrArea *sa= CTX_wm_area(C); ARegion *ar= sequencer_has_buttons_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); - } + if(ar) + ED_region_toggle_hidden(C, ar); + return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c index 74f22b86b75..ac125c10b2d 100644 --- a/source/blender/editors/space_sequencer/sequencer_ops.c +++ b/source/blender/editors/space_sequencer/sequencer_ops.c @@ -105,7 +105,7 @@ void sequencer_operatortypes(void) void sequencer_keymap(wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "Sequencer", SPACE_SEQ, 0); + wmKeyMap *keymap= WM_keymap_find(wm, "Sequencer", SPACE_SEQ, 0); wmKeymapItem *kmi; WM_keymap_add_item(keymap, "SEQUENCER_OT_properties", NKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index 26ffd88ae67..c2756b05946 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -185,12 +185,12 @@ static SpaceLink *sequencer_duplicate(SpaceLink *sl) /* add handlers, stuff you only do once or on area/region changes */ static void sequencer_main_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy); /* own keymap */ - keymap= WM_keymap_listbase(wm, "Sequencer", SPACE_SEQ, 0); /* XXX weak? */ + keymap= WM_keymap_find(wm, "Sequencer", SPACE_SEQ, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } diff --git a/source/blender/editors/space_sound/space_sound.c b/source/blender/editors/space_sound/space_sound.c index f8ef2b21ae7..6713e19b6de 100644 --- a/source/blender/editors/space_sound/space_sound.c +++ b/source/blender/editors/space_sound/space_sound.c @@ -142,12 +142,12 @@ static SpaceLink *sound_duplicate(SpaceLink *sl) /* add handlers, stuff you only do once or on area/region changes */ static void sound_main_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy); /* own keymap */ - keymap= WM_keymap_listbase(wm, "Sound", SPACE_SOUND, 0); /* XXX weak? */ + keymap= WM_keymap_find(wm, "Sound", SPACE_SOUND, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c index 1f919fc9cd7..e068c1a70bb 100644 --- a/source/blender/editors/space_text/space_text.c +++ b/source/blender/editors/space_text/space_text.c @@ -208,7 +208,9 @@ static void text_operatortypes(void) static void text_keymap(struct wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "Text", SPACE_TEXT, 0); + wmKeyMap *keymap; + + keymap= WM_keymap_find(wm, "Text", SPACE_TEXT, 0); #ifdef __APPLE__ RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", LEFTARROWKEY, KM_PRESS, KM_OSKEY, 0)->ptr, "type", LINE_BEGIN); @@ -329,12 +331,12 @@ static int text_context(const bContext *C, const char *member, bContextDataResul /* add handlers, stuff you only do once or on area/region changes */ static void text_main_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_STANDARD, ar->winx, ar->winy); /* own keymap */ - keymap= WM_keymap_listbase(wm, "Text", SPACE_TEXT, 0); /* XXX weak? */ + keymap= WM_keymap_find(wm, "Text", SPACE_TEXT, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 9721fbc2b9c..5996770c206 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -425,60 +425,6 @@ static void format_draw_color(char formatchar) } } -/*********************** utilities ************************/ - -int text_check_bracket(char ch) -{ - int a; - char opens[] = "([{"; - char close[] = ")]}"; - - for(a=0; a<3; a++) { - if(ch==opens[a]) - return a+1; - else if(ch==close[a]) - return -(a+1); - } - return 0; -} - -int text_check_delim(char ch) -{ - int a; - char delims[] = "():\"\' ~!%^&*-+=[]{};/<>|.#\t,"; - - for(a=0; a<28; a++) { - if(ch==delims[a]) - return 1; - } - return 0; -} - -int text_check_digit(char ch) -{ - if(ch < '0') return 0; - if(ch <= '9') return 1; - return 0; -} - -int text_check_identifier(char ch) -{ - if(ch < '0') return 0; - if(ch <= '9') return 1; - if(ch < 'A') return 0; - if(ch <= 'Z' || ch == '_') return 1; - if(ch < 'a') return 0; - if(ch <= 'z') return 1; - return 0; -} - -int text_check_whitespace(char ch) -{ - if(ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n') - return 1; - return 0; -} - /************************** draw text *****************************/ /***********************/ /* diff --git a/source/blender/editors/space_text/text_header.c b/source/blender/editors/space_text/text_header.c index 089436cfcf9..d0a02f558e1 100644 --- a/source/blender/editors/space_text/text_header.c +++ b/source/blender/editors/space_text/text_header.c @@ -186,15 +186,6 @@ ARegion *text_has_properties_region(ScrArea *sa) return arnew; } -void text_toggle_properties_region(bContext *C, ScrArea *sa, ARegion *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); -} - static int properties_poll(bContext *C) { return (CTX_wm_space_text(C) != NULL); @@ -206,7 +197,7 @@ static int properties_exec(bContext *C, wmOperator *op) ARegion *ar= text_has_properties_region(sa); if(ar) - text_toggle_properties_region(C, sa, ar); + ED_region_toggle_hidden(C, ar); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 3411d9114df..8e81336912b 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -192,7 +192,7 @@ static int open_exec(bContext *C, wmOperator *op) Text *text; char str[FILE_MAX]; - RNA_string_get(op->ptr, "filename", str); + RNA_string_get(op->ptr, "path", str); text= add_text(str, G.sce); @@ -211,10 +211,10 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *event) Text *text= CTX_data_edit_text(C); char *path= (text && text->name)? text->name: G.sce; - if(RNA_property_is_set(op->ptr, "filename")) + if(RNA_property_is_set(op->ptr, "path")) return open_exec(C, op); - RNA_string_set(op->ptr, "filename", path); + RNA_string_set(op->ptr, "path", path); WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; @@ -233,7 +233,7 @@ void TEXT_OT_open(wmOperatorType *ot) ot->poll= text_new_poll; /* properties */ - WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE|PYSCRIPTFILE); + WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE|PYSCRIPTFILE, FILE_SPECIAL); } /******************* reload operator *********************/ @@ -420,7 +420,7 @@ static int save_as_exec(bContext *C, wmOperator *op) if(!text) return OPERATOR_CANCELLED; - RNA_string_get(op->ptr, "filename", str); + RNA_string_get(op->ptr, "path", str); if(text->name) MEM_freeN(text->name); text->name= BLI_strdup(str); @@ -438,7 +438,7 @@ static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *event) Text *text= CTX_data_edit_text(C); char *str; - if(RNA_property_is_set(op->ptr, "filename")) + if(RNA_property_is_set(op->ptr, "path")) return save_as_exec(C, op); if(text->name) @@ -448,7 +448,7 @@ static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *event) else str= G.sce; - RNA_string_set(op->ptr, "filename", str); + RNA_string_set(op->ptr, "path", str); WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; @@ -467,7 +467,7 @@ void TEXT_OT_save_as(wmOperatorType *ot) ot->poll= text_edit_poll; /* properties */ - WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE|PYSCRIPTFILE); + WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE|PYSCRIPTFILE, FILE_SPECIAL); } /******************* run script operator *********************/ @@ -1731,7 +1731,7 @@ static int scroll_invoke(bContext *C, wmOperator *op, wmEvent *event) st->flags|= ST_SCROLL_SELECT; - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } @@ -1860,7 +1860,7 @@ static int scroll_bar_invoke(bContext *C, wmOperator *op, wmEvent *event) st->flags|= ST_SCROLL_SELECT; - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } @@ -2115,7 +2115,7 @@ static int set_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event) scu->sell= txt_get_span(st->text->lines.first, st->text->sell); scu->selc= st->text->selc; - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); set_cursor_apply(C, op, event); diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c index 8f7486f81d9..0f05eb0149d 100644 --- a/source/blender/editors/space_time/space_time.c +++ b/source/blender/editors/space_time/space_time.c @@ -202,12 +202,12 @@ static void time_draw_keyframes(const bContext *C, SpaceTime *stime, ARegion *ar /* add handlers, stuff you only do once or on area/region changes */ static void time_main_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy); /* own keymap */ - keymap= WM_keymap_listbase(wm, "TimeLine", SPACE_TIME, 0); /* XXX weak? */ + keymap= WM_keymap_find(wm, "TimeLine", SPACE_TIME, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } diff --git a/source/blender/editors/space_time/time_ops.c b/source/blender/editors/space_time/time_ops.c index a833cca095c..2b073f269bf 100644 --- a/source/blender/editors/space_time/time_ops.c +++ b/source/blender/editors/space_time/time_ops.c @@ -142,7 +142,7 @@ void time_operatortypes(void) void time_keymap(wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "TimeLine", SPACE_TIME, 0); + wmKeyMap *keymap= WM_keymap_find(wm, "TimeLine", SPACE_TIME, 0); WM_keymap_add_item(keymap, "TIME_OT_start_frame_set", SKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "TIME_OT_end_frame_set", EKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/space_view3d/Makefile b/source/blender/editors/space_view3d/Makefile index 07102157854..9204f2482c6 100644 --- a/source/blender/editors/space_view3d/Makefile +++ b/source/blender/editors/space_view3d/Makefile @@ -53,6 +53,9 @@ CPPFLAGS += -I../../render/extern/include CPPFLAGS += -I../../blenfont CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include CPPFLAGS += -I$(NAN_SMOKE)/include -# own include +ifneq ($(NAN_NO_KETSJI),true) + CPPFLAGS += -I../../../kernel/gen_system +endif +# own include CPPFLAGS += -I../include diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index fa810677fe8..028d666dc71 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -639,7 +639,7 @@ static void draw_sphere_bone_dist(float smat[][4], float imat[][4], int boneflag /* figure out the sizes of spheres */ if (ebone) { - /* this routine doesn't call set_matrix_editbone() that calculates it */ + /* this routine doesn't call get_matrix_editbone() that calculates it */ ebone->length = VecLenf(ebone->head, ebone->tail); length= ebone->length; @@ -749,7 +749,7 @@ static void draw_sphere_bone_wire(float smat[][4], float imat[][4], int armflag, /* figure out the sizes of spheres */ if (ebone) { - /* this routine doesn't call set_matrix_editbone() that calculates it */ + /* this routine doesn't call get_matrix_editbone() that calculates it */ ebone->length = VecLenf(ebone->head, ebone->tail); length= ebone->length; @@ -1516,15 +1516,25 @@ static void draw_pose_dofs(Object *ob) } } +static void bone_matrix_translate_y(float mat[][4], float y) +{ + float trans[3]; + + VECCOPY(trans, mat[1]); + VecMulf(trans, y); + VecAddf(mat[3], mat[3], trans); +} + /* assumes object is Armature with pose */ -static void draw_pose_channels(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, int dt) +static void draw_pose_channels(Scene *scene, View3D *v3d, ARegion *ar, Base *base, int dt) { + RegionView3D *rv3d= ar->regiondata; Object *ob= base->object; bArmature *arm= ob->data; bPoseChannel *pchan; Bone *bone; GLfloat tmp; - float smat[4][4], imat[4][4]; + float smat[4][4], imat[4][4], bmat[4][4]; int index= -1; short do_dashed= 3, draw_wire= 0; short flag, constflag; @@ -1809,15 +1819,21 @@ 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); - view3d_object_text_draw_add(vec[0], vec[1], vec[2], pchan->name, 10); + view3d_cached_text_draw_add(vec[0], vec[1], vec[2], pchan->name, 10); } /* Draw additional axes on the bone tail */ if ( (arm->flag & ARM_DRAWAXES) && (arm->flag & ARM_POSEMODE) ) { glPushMatrix(); - glMultMatrixf(pchan->pose_mat); - glTranslatef(0.0f, pchan->bone->length, 0.0f); - drawaxes(0.25f*pchan->bone->length, 0, OB_ARROWS); + Mat4CpyMat4(bmat, pchan->pose_mat); + bone_matrix_translate_y(bmat, pchan->bone->length); + glMultMatrixf(bmat); + + /* do cached text draw immediate to include transform */ + view3d_cached_text_draw_begin(); + drawaxes(pchan->bone->length*0.25f, 0, OB_ARROWS); + view3d_cached_text_draw_end(v3d, ar, 1, bmat); + glPopMatrix(); } } @@ -1830,32 +1846,28 @@ static void draw_pose_channels(Scene *scene, View3D *v3d, RegionView3D *rv3d, Ba } /* in editmode, we don't store the bone matrix... */ -static void set_matrix_editbone(EditBone *eBone) +static void get_matrix_editbone(EditBone *eBone, float bmat[][4]) { - float delta[3],offset[3]; - float mat[3][3], bmat[4][4]; + float delta[3]; + float mat[3][3]; /* Compose the parent transforms (i.e. their translations) */ - VECCOPY(offset, eBone->head); - - glTranslatef(offset[0],offset[1],offset[2]); - VecSubf(delta, eBone->tail, eBone->head); eBone->length = (float)sqrt(delta[0]*delta[0] + delta[1]*delta[1] +delta[2]*delta[2]); vec_roll_to_mat3(delta, eBone->roll, mat); Mat4CpyMat3(bmat, mat); - - glMultMatrixf(bmat); - + + VecAddf(bmat[3], bmat[3], eBone->head); } -static void draw_ebones(View3D *v3d, RegionView3D *rv3d, Object *ob, int dt) +static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt) { + RegionView3D *rv3d= ar->regiondata; EditBone *eBone; bArmature *arm= ob->data; - float smat[4][4], imat[4][4]; + float smat[4][4], imat[4][4], bmat[4][4]; unsigned int index; int flag; @@ -1893,7 +1905,8 @@ static void draw_ebones(View3D *v3d, RegionView3D *rv3d, Object *ob, int dt) if (eBone->layer & arm->layer) { if ((eBone->flag & BONE_HIDDEN_A)==0) { glPushMatrix(); - set_matrix_editbone(eBone); + get_matrix_editbone(eBone, bmat); + glMultMatrixf(bmat); /* catch exception for bone with hidden parent */ flag= eBone->flag; @@ -1941,7 +1954,8 @@ static void draw_ebones(View3D *v3d, RegionView3D *rv3d, Object *ob, int dt) } else { glPushMatrix(); - set_matrix_editbone(eBone); + get_matrix_editbone(eBone, bmat); + glMultMatrixf(bmat); if (arm->drawtype == ARM_LINE) draw_line_bone(arm->flag, flag, 0, index, NULL, eBone); @@ -1994,14 +2008,20 @@ 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); - view3d_object_text_draw_add(vec[0], vec[1], vec[2], eBone->name, 10); + view3d_cached_text_draw_add(vec[0], vec[1], vec[2], eBone->name, 10); } /* Draw additional axes */ if (arm->flag & ARM_DRAWAXES) { glPushMatrix(); - set_matrix_editbone(eBone); - glTranslatef(0.0f, eBone->length, 0.0f); + get_matrix_editbone(eBone, bmat); + bone_matrix_translate_y(bmat, eBone->length); + glMultMatrixf(bmat); + + /* do cached text draw immediate to include transform */ + view3d_cached_text_draw_begin(); drawaxes(eBone->length*0.25f, 0, OB_ARROWS); + view3d_cached_text_draw_end(v3d, ar, 1, bmat); + glPopMatrix(); } @@ -2021,8 +2041,9 @@ static void draw_ebones(View3D *v3d, RegionView3D *rv3d, Object *ob, int dt) /* draw bone paths * - in view space */ -static void draw_pose_paths(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob) +static void draw_pose_paths(Scene *scene, View3D *v3d, ARegion *ar, Object *ob) { + RegionView3D *rv3d= ar->regiondata; AnimData *adt= BKE_animdata_from_id(&ob->id); bArmature *arm= ob->data; bPoseChannel *pchan; @@ -2155,12 +2176,12 @@ 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) { sprintf(str, "%d", (a+sfra)); - view3d_object_text_draw_add(fp[0], fp[1], fp[2], str, 0); + view3d_cached_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)) { sprintf(str, "%d", (a+sfra)); - view3d_object_text_draw_add(fp[0], fp[1], fp[2], str, 0); + view3d_cached_text_draw_add(fp[0], fp[1], fp[2], str, 0); } } } @@ -2202,7 +2223,7 @@ static void draw_pose_paths(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec char str[32]; sprintf(str, "%d", (a+sfra)); - view3d_object_text_draw_add(fp[0], fp[1], fp[2], str, 0); + view3d_cached_text_draw_add(fp[0], fp[1], fp[2], str, 0); } } } @@ -2253,7 +2274,7 @@ static void ghost_poses_tag_unselected(Object *ob, short unset) /* draw ghosts that occur within a frame range * note: object should be in posemode */ -static void draw_ghost_poses_range(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base) +static void draw_ghost_poses_range(Scene *scene, View3D *v3d, ARegion *ar, Base *base) { Object *ob= base->object; AnimData *adt= BKE_animdata_from_id(&ob->id); @@ -2295,7 +2316,7 @@ static void draw_ghost_poses_range(Scene *scene, View3D *v3d, RegionView3D *rv3d BKE_animsys_evaluate_animdata(&ob->id, adt, (float)CFRA, ADT_RECALC_ALL); where_is_pose(scene, ob); - draw_pose_channels(scene, v3d, rv3d, base, OB_WIRE); + draw_pose_channels(scene, v3d, ar, base, OB_WIRE); } glDisable(GL_BLEND); if (v3d->zbuf) glEnable(GL_DEPTH_TEST); @@ -2315,7 +2336,7 @@ static void draw_ghost_poses_range(Scene *scene, View3D *v3d, RegionView3D *rv3d /* draw ghosts on keyframes in action within range * - object should be in posemode */ -static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base) +static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, ARegion *ar, Base *base) { Object *ob= base->object; AnimData *adt= BKE_animdata_from_id(&ob->id); @@ -2374,7 +2395,7 @@ static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, RegionView3D *rv3d, BKE_animsys_evaluate_animdata(&ob->id, adt, (float)CFRA, ADT_RECALC_ALL); where_is_pose(scene, ob); - draw_pose_channels(scene, v3d, rv3d, base, OB_WIRE); + draw_pose_channels(scene, v3d, ar, base, OB_WIRE); } glDisable(GL_BLEND); if (v3d->zbuf) glEnable(GL_DEPTH_TEST); @@ -2394,7 +2415,7 @@ static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, RegionView3D *rv3d, /* draw ghosts around current frame * - object is supposed to be armature in posemode */ -static void draw_ghost_poses(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base) +static void draw_ghost_poses(Scene *scene, View3D *v3d, ARegion *ar, Base *base) { Object *ob= base->object; AnimData *adt= BKE_animdata_from_id(&ob->id); @@ -2444,7 +2465,7 @@ static void draw_ghost_poses(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base if (CFRA != cfrao) { BKE_animsys_evaluate_animdata(&ob->id, adt, (float)CFRA, ADT_RECALC_ALL); where_is_pose(scene, ob); - draw_pose_channels(scene, v3d, rv3d, base, OB_WIRE); + draw_pose_channels(scene, v3d, ar, base, OB_WIRE); } } @@ -2459,7 +2480,7 @@ static void draw_ghost_poses(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base if (CFRA != cfrao) { BKE_animsys_evaluate_animdata(&ob->id, adt, (float)CFRA, ADT_RECALC_ALL); where_is_pose(scene, ob); - draw_pose_channels(scene, v3d, rv3d, base, OB_WIRE); + draw_pose_channels(scene, v3d, ar, base, OB_WIRE); } } } @@ -2480,7 +2501,7 @@ static void draw_ghost_poses(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base /* ********************************** Armature Drawing - Main ************************* */ /* called from drawobject.c, return 1 if nothing was drawn */ -int draw_armature(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, int dt, int flag) +int draw_armature(Scene *scene, View3D *v3d, ARegion *ar, Base *base, int dt, int flag) { Object *ob= base->object; bArmature *arm= ob->data; @@ -2504,7 +2525,7 @@ int draw_armature(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, int /* editmode? */ if(arm->edbo) { arm->flag |= ARM_EDITMODE; - draw_ebones(v3d, rv3d, ob, dt); + draw_ebones(v3d, ar, ob, dt); arm->flag &= ~ARM_EDITMODE; } else{ @@ -2513,32 +2534,36 @@ int draw_armature(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, int /* drawing posemode selection indices or colors only in these cases */ if(!(base->flag & OB_FROMDUPLI)) { if(G.f & G_PICKSEL) { - if(ob->mode & OB_MODE_POSE) + if(OBACT && (OBACT->mode & OB_MODE_WEIGHT_PAINT)) { + if(ob==modifiers_isDeformedByArmature(OBACT)) + arm->flag |= ARM_POSEMODE; + } + else if(ob->mode & OB_MODE_POSE) arm->flag |= ARM_POSEMODE; } else if(ob->mode & OB_MODE_POSE) { if (arm->ghosttype == ARM_GHOST_RANGE) { - draw_ghost_poses_range(scene, v3d, rv3d, base); + draw_ghost_poses_range(scene, v3d, ar, base); } else if (arm->ghosttype == ARM_GHOST_KEYS) { - draw_ghost_poses_keys(scene, v3d, rv3d, base); + draw_ghost_poses_keys(scene, v3d, ar, base); } else if (arm->ghosttype == ARM_GHOST_CUR) { if (arm->ghostep) - draw_ghost_poses(scene, v3d, rv3d, base); + draw_ghost_poses(scene, v3d, ar, base); } if ((flag & DRAW_SCENESET)==0) { if(ob==OBACT) arm->flag |= ARM_POSEMODE; - else if(ob->mode & OB_MODE_WEIGHT_PAINT) { - if(OBACT && ob==modifiers_isDeformedByArmature(OBACT)) + else if(OBACT && (OBACT->mode & OB_MODE_WEIGHT_PAINT)) { + if(ob==modifiers_isDeformedByArmature(OBACT)) arm->flag |= ARM_POSEMODE; } - draw_pose_paths(scene, v3d, rv3d, ob); + draw_pose_paths(scene, v3d, ar, ob); } } } - draw_pose_channels(scene, v3d, rv3d, base, dt); + draw_pose_channels(scene, v3d, ar, base, dt); arm->flag &= ~ARM_POSEMODE; if(ob->mode & OB_MODE_POSE) diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index fb53184b890..eedcc33af37 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -435,11 +435,11 @@ void drawaxes(float size, int flag, char drawtype) // patch for 3d cards crashing on glSelect for text drawing (IBM) if((flag & DRAW_PICKING) == 0) { if (axis==0) - view3d_object_text_draw_add(v2[0], v2[1], v2[2], "x", 0); + view3d_cached_text_draw_add(v2[0], v2[1], v2[2], "x", 0); else if (axis==1) - view3d_object_text_draw_add(v2[0], v2[1], v2[2], "y", 0); + view3d_cached_text_draw_add(v2[0], v2[1], v2[2], "y", 0); else - view3d_object_text_draw_add(v2[0], v2[1], v2[2], "z", 0); + view3d_cached_text_draw_add(v2[0], v2[1], v2[2], "z", 0); } } break; @@ -497,23 +497,32 @@ 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}; +/* *********** text drawing for object/particles/armature ************* */ -typedef struct ViewObjectString { - struct ViewObjectString *next, *prev; +static ListBase CachedText[3]; +static int CachedTextLevel= 0; + +typedef struct ViewCachedString { + struct ViewCachedString *next, *prev; float vec[3], col[4]; char str[128]; short mval[2]; short xoffs; -} ViewObjectString; +} ViewCachedString; +void view3d_cached_text_draw_begin() +{ + ListBase *strings= &CachedText[CachedTextLevel]; + strings->first= strings->last= NULL; + CachedTextLevel++; +} -void view3d_object_text_draw_add(float x, float y, float z, char *str, short xoffs) +void view3d_cached_text_draw_add(float x, float y, float z, char *str, short xoffs) { - ViewObjectString *vos= MEM_callocN(sizeof(ViewObjectString), "ViewObjectString"); + ListBase *strings= &CachedText[CachedTextLevel-1]; + ViewCachedString *vos= MEM_callocN(sizeof(ViewCachedString), "ViewCachedString"); - BLI_addtail(&strings, vos); + BLI_addtail(strings, vos); BLI_strncpy(vos->str, str, 128); vos->vec[0]= x; vos->vec[1]= y; @@ -522,22 +531,23 @@ void view3d_object_text_draw_add(float x, float y, float z, char *str, short xof vos->xoffs= xoffs; } -static void view3d_object_text_draw(View3D *v3d, ARegion *ar) +void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, int depth_write, float mat[][4]) { - ViewObjectString *vos; - int tot= 0; + RegionView3D *rv3d= ar->regiondata; + ListBase *strings= &CachedText[CachedTextLevel-1]; + ViewCachedString *vos; + int a, tot= 0; /* project first and test */ - for(vos= strings.first; vos; vos= vos->next) { + for(vos= strings->first; vos; vos= vos->next) { + if(mat) + Mat4MulVecfl(mat, vos->vec); 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); @@ -545,16 +555,22 @@ static void view3d_object_text_draw(View3D *v3d, ARegion *ar) wmPushMatrix(); ED_region_pixelspace(ar); - if(v3d->zbuf) glDisable(GL_DEPTH_TEST); + if(depth_write) { + if(v3d->zbuf) glDisable(GL_DEPTH_TEST); + } + else glDepthMask(0); - for(vos= strings.first; vos; vos= vos->next) { + 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); + BLF_draw_default((float)vos->mval[0]+vos->xoffs, (float)vos->mval[1], (depth_write)? 0.0f: 2.0f, vos->str); } } - if(v3d->zbuf) glEnable(GL_DEPTH_TEST); + if(depth_write) { + if(v3d->zbuf) glEnable(GL_DEPTH_TEST); + } + else glDepthMask(1); wmPopMatrix(); @@ -563,10 +579,14 @@ static void view3d_object_text_draw(View3D *v3d, ARegion *ar) glEnable(GL_CLIP_PLANE0+a); } - if(strings.first) - BLI_freelistN(&strings); + if(strings->first) + BLI_freelistN(strings); + + CachedTextLevel--; } +/* ******************** primitive drawing ******************* */ + static void drawcube(void) { @@ -2240,7 +2260,7 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, Object *ob, E else sprintf(val, conv_float, VecLenf(v1, v2)); - view3d_object_text_draw_add(x, y, z, val, 0); + view3d_cached_text_draw_add(x, y, z, val, 0); } } } @@ -2279,7 +2299,7 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, Object *ob, E else sprintf(val, conv_float, area); - view3d_object_text_draw_add(efa->cent[0], efa->cent[1], efa->cent[2], val, 0); + view3d_cached_text_draw_add(efa->cent[0], efa->cent[1], efa->cent[2], val, 0); } } } @@ -2319,31 +2339,31 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, Object *ob, E if( (e4->f & e1->f & SELECT) || (G.moving && (efa->v1->f & SELECT)) ) { /* Vec 1 */ - sprintf(val,"%.3f", VecAngle3(v4, v1, v2)); + sprintf(val,"%.3f", RAD2DEG(VecAngle3(v4, v1, v2))); VecLerpf(fvec, efa->cent, efa->v1->co, 0.8f); - view3d_object_text_draw_add(efa->cent[0], efa->cent[1], efa->cent[2], val, 0); + view3d_cached_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)); + sprintf(val,"%.3f", RAD2DEG(VecAngle3(v1, v2, v3))); VecLerpf(fvec, efa->cent, efa->v2->co, 0.8f); - view3d_object_text_draw_add(fvec[0], fvec[1], fvec[2], val, 0); + view3d_cached_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 */ if(efa->v4) - sprintf(val,"%.3f", VecAngle3(v2, v3, v4)); + sprintf(val,"%.3f", RAD2DEG(VecAngle3(v2, v3, v4))); else - sprintf(val,"%.3f", VecAngle3(v2, v3, v1)); + sprintf(val,"%.3f", RAD2DEG(VecAngle3(v2, v3, v1))); VecLerpf(fvec, efa->cent, efa->v3->co, 0.8f); - view3d_object_text_draw_add(fvec[0], fvec[1], fvec[2], val, 0); + view3d_cached_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)); + sprintf(val,"%.3f", RAD2DEG(VecAngle3(v3, v4, v1))); VecLerpf(fvec, efa->cent, efa->v4->co, 0.8f); - view3d_object_text_draw_add(fvec[0], fvec[1], fvec[2], val, 0); + view3d_cached_text_draw_add(fvec[0], fvec[1], fvec[2], val, 0); } } } @@ -3336,82 +3356,8 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas return retval; } -/* *********** text drawing for particles ************* */ -static ListBase pstrings= {NULL, NULL}; - -typedef struct ViewParticleString { - struct ViewParticleString *next, *prev; - float vec[3], col[4]; - char str[128]; - short mval[2]; - short xoffs; -} ViewParticleString; - - -void view3d_particle_text_draw_add(float x, float y, float z, char *str, short xoffs) -{ - ViewObjectString *vos= MEM_callocN(sizeof(ViewObjectString), "ViewObjectString"); - - BLI_addtail(&pstrings, 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_particle_text_draw(View3D *v3d, ARegion *ar) -{ - ViewObjectString *vos; - int tot= 0; - - /* project first and test */ - for(vos= pstrings.first; vos; vos= vos->next) { - project_short(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) glDepthMask(0); +/* *********** drawing for particles ************* */ - for(vos= pstrings.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], 2.0, vos->str); - } - } - - if(v3d->zbuf) glDepthMask(1); - - wmPopMatrix(); - - if(rv3d->rflag & RV3D_CLIPPING) - for(a=0; a<6; a++) - glEnable(GL_CLIP_PLANE0+a); - } - - if(pstrings.first) - BLI_freelistN(&pstrings); -} -typedef struct ParticleDrawData { - float *vdata, *vd; - float *ndata, *nd; - float *cdata, *cd; - float *vedata, *ved; - float *ma_r, *ma_g, *ma_b; -} ParticleDrawData; static void draw_particle(ParticleKey *state, int draw_as, short draw, float pixsize, float imat[4][4], float *draw_line, ParticleBillboardData *bb, ParticleDrawData *pdd) { float vec[3], vec2[3]; @@ -3576,7 +3522,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv ParticleData *pars, *pa; ParticleKey state, *states=0; ParticleBillboardData bb; - ParticleDrawData pdd; + ParticleSimulationData sim = {scene, ob, psys, NULL}; + ParticleDrawData *pdd = psys->pdd; Material *ma; float vel[3], imat[4][4]; float timestep, pixsize=1.0, pa_size, r_tilt, r_length; @@ -3607,9 +3554,11 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv if(part->draw_as==PART_DRAW_NOT) return; /* 2. */ + sim.psmd = psmd = psys_get_modifier(ob,psys); + if(part->phystype==PART_PHYS_KEYED){ if(psys->flag&PSYS_KEYED){ - psys_count_keyed_targets(ob,psys); + psys_count_keyed_targets(&sim); if(psys->totkeyed==0) return; } @@ -3627,8 +3576,6 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv totchild=0; else totchild=psys->totchild*part->disp/100; - - memset(&pdd, 0, sizeof(ParticleDrawData)); ma= give_current_material(ob,part->omat); @@ -3643,18 +3590,18 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv ma_g = ma->g; ma_b = ma->b; - pdd.ma_r = &ma_r; - pdd.ma_g = &ma_g; - pdd.ma_b = &ma_b; + if(pdd) { + pdd->ma_r = &ma_r; + pdd->ma_g = &ma_g; + pdd->ma_b = &ma_b; + } create_cdata = 1; } else cpack(0); - psmd= psys_get_modifier(ob,psys); - - timestep= psys_get_timestep(part); + timestep= psys_get_timestep(&sim); if( (base->flag & OB_FROMDUPLI) && (ob->flag & OB_FROMGROUP) ) { float mat[4][4]; @@ -3748,54 +3695,65 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv /* 4. */ if(draw_as && draw_as!=PART_DRAW_PATH) { int tot_vec_size = (totpart + totchild) * 3 * sizeof(float); - + + if(!pdd) + pdd = psys->pdd = MEM_callocN(sizeof(ParticleDrawData), "ParticlDrawData"); + if(part->draw_as == PART_DRAW_REND && part->trail_count > 1) { tot_vec_size *= part->trail_count; psys_make_temp_pointcache(ob, psys); } + if(pdd->tot_vec_size != tot_vec_size) + psys_free_pdd(psys); + 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) - pdd.cdata = MEM_callocN(tot_vec_size * 6, "particle_cdata"); - pdd.vdata = MEM_callocN(tot_vec_size * 6, "particle_vdata"); + if(!pdd->cdata) pdd->cdata = MEM_callocN(tot_vec_size * 6, "particle_cdata"); + if(!pdd->vdata) pdd->vdata = MEM_callocN(tot_vec_size * 6, "particle_vdata"); break; case PART_DRAW_LINE: if(create_cdata) - pdd.cdata = MEM_callocN(tot_vec_size * 2, "particle_cdata"); - pdd.vdata = MEM_callocN(tot_vec_size * 2, "particle_vdata"); + if(!pdd->cdata) pdd->cdata = MEM_callocN(tot_vec_size * 2, "particle_cdata"); + if(!pdd->vdata) pdd->vdata = MEM_callocN(tot_vec_size * 2, "particle_vdata"); break; case PART_DRAW_BB: if(create_cdata) - pdd.cdata = MEM_callocN(tot_vec_size * 4, "particle_cdata"); - pdd.vdata = MEM_callocN(tot_vec_size * 4, "particle_vdata"); - pdd.ndata = MEM_callocN(tot_vec_size * 4, "particle_vdata"); + if(!pdd->cdata) pdd->cdata = MEM_callocN(tot_vec_size * 4, "particle_cdata"); + if(!pdd->vdata) pdd->vdata = MEM_callocN(tot_vec_size * 4, "particle_vdata"); + if(!pdd->ndata) pdd->ndata = MEM_callocN(tot_vec_size * 4, "particle_vdata"); break; default: if(create_cdata) - pdd.cdata=MEM_callocN(tot_vec_size, "particle_cdata"); - pdd.vdata=MEM_callocN(tot_vec_size, "particle_vdata"); + if(!pdd->cdata) pdd->cdata=MEM_callocN(tot_vec_size, "particle_cdata"); + if(!pdd->vdata) pdd->vdata=MEM_callocN(tot_vec_size, "particle_vdata"); } } if(part->draw & PART_DRAW_VEL && draw_as != PART_DRAW_LINE) { - pdd.vedata = MEM_callocN(tot_vec_size * 2, "particle_vedata"); + if(!pdd->vedata) pdd->vedata = MEM_callocN(tot_vec_size * 2, "particle_vedata"); need_v = 1; } - pdd.vd= pdd.vdata; - pdd.ved= pdd.vedata; - pdd.cd= pdd.cdata; - pdd.nd= pdd.ndata; + pdd->vd= pdd->vdata; + pdd->ved= pdd->vedata; + pdd->cd= pdd->cdata; + pdd->nd= pdd->ndata; + pdd->tot_vec_size= tot_vec_size; - psys->lattice= psys_get_lattice(scene, ob, psys); + psys->lattice= psys_get_lattice(&sim); } if(draw_as){ /* 5. */ - for(a=0,pa=pars; a<totpart+totchild; a++, pa++){ + if((pdd->flag & PARTICLE_DRAW_DATA_UPDATED) + && (pdd->vedata || part->draw & (PART_DRAW_SIZE|PART_DRAW_NUM|PART_DRAW_HEALTH))==0) { + totpoint = pdd->totpoint; /* draw data is up to date */ + } + else 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; @@ -3805,9 +3763,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv pa_birthtime=pa->time; pa_dietime = pa->dietime; pa_size=pa->size; - if(part->phystype==PART_PHYS_BOIDS) { + if(part->phystype==PART_PHYS_BOIDS) pa_health = pa->boid->data.health; - } else pa_health = -1.0; @@ -3842,10 +3799,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv } #endif // XXX old animation system - BLI_srandom(psys->seed+a); - - r_tilt = 2.0f*(BLI_frand() - 0.5f); - r_length = BLI_frand(); + r_tilt = 2.0f*(PSYS_FRAND(a + 21) - 0.5f); + r_length = PSYS_FRAND(a + 22); } else{ ChildParticle *cpa= &psys->child[a-totpart]; @@ -3876,8 +3831,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv pa_health = -1.0; - r_tilt = 2.0f * cpa->rand[2]; - r_length = cpa->rand[1]; + r_tilt = 2.0f*(PSYS_FRAND(a + 21) - 0.5f); + r_length = PSYS_FRAND(a + 22); } if(draw_as!=PART_DRAW_PATH){ @@ -3899,7 +3854,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv continue; state.time = (part->draw & PART_ABS_PATH_TIME) ? -ct : -(pa_birthtime + ct * (pa_dietime - pa_birthtime)); - psys_get_particle_on_path(scene,ob,psys,a,&state,need_v); + psys_get_particle_on_path(&sim,a,&state,need_v); if(psys->parent) Mat4MulVecfl(psys->parent->obmat, state.co); @@ -3911,7 +3866,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv bb.time = ct; } - draw_particle(&state, draw_as, part->draw, pixsize, imat, part->draw_line, &bb, &pdd); + draw_particle(&state, draw_as, part->draw, pixsize, imat, part->draw_line, &bb, psys->pdd); totpoint++; drawn = 1; @@ -3920,7 +3875,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv else { state.time=cfra; - if(psys_get_particle_state(scene,ob,psys,a,&state,0)){ + if(psys_get_particle_state(&sim,a,&state,0)){ if(psys->parent) Mat4MulVecfl(psys->parent->obmat, state.co); @@ -3931,7 +3886,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv bb.time = pa_time; } - draw_particle(&state, draw_as, part->draw, pixsize, imat, part->draw_line, &bb, &pdd); + draw_particle(&state, draw_as, part->draw, pixsize, imat, part->draw_line, &bb, pdd); totpoint++; drawn = 1; @@ -3941,13 +3896,13 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv if(drawn) { /* additional things to draw for each particle */ /* (velocity, size and number) */ - if(pdd.vedata){ - VECCOPY(pdd.ved,state.co); - pdd.ved+=3; + if(pdd->vedata){ + VECCOPY(pdd->ved,state.co); + pdd->ved+=3; VECCOPY(vel,state.vel); VecMulf(vel,timestep); - VECADD(pdd.ved,state.co,vel); - pdd.ved+=3; + VECADD(pdd->ved,state.co,vel); + pdd->ved+=3; totve++; } @@ -3971,7 +3926,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv sprintf(val, "%s %.2f", val, pa_health); /* in path drawing state.co is the end point */ - view3d_particle_text_draw_add(state.co[0], state.co[1], state.co[2], val, 0); + view3d_cached_text_draw_add(state.co[0], state.co[1], state.co[2], val, 0); } } } @@ -4059,17 +4014,17 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv glDisableClientState(GL_COLOR_ARRAY); /* setup created data arrays */ - if(pdd.vdata){ + if(pdd->vdata){ glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, 0, pdd.vdata); + glVertexPointer(3, GL_FLOAT, 0, pdd->vdata); } else glDisableClientState(GL_VERTEX_ARRAY); /* billboards are drawn this way */ - if(pdd.ndata && ob_dt>OB_WIRE){ + if(pdd->ndata && ob_dt>OB_WIRE){ glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(GL_FLOAT, 0, pdd.ndata); + glNormalPointer(GL_FLOAT, 0, pdd->ndata); glEnable(GL_LIGHTING); } else{ @@ -4077,9 +4032,9 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv glDisable(GL_LIGHTING); } - if(pdd.cdata){ + if(pdd->cdata){ glEnableClientState(GL_COLOR_ARRAY); - glColorPointer(3, GL_FLOAT, 0, pdd.cdata); + glColorPointer(3, GL_FLOAT, 0, pdd->cdata); } /* draw created data arrays */ @@ -4101,14 +4056,17 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv glDrawArrays(GL_POINTS, 0, totpoint); break; } + + pdd->flag |= PARTICLE_DRAW_DATA_UPDATED; + pdd->totpoint = totpoint; } - if(pdd.vedata){ + if(pdd->vedata){ glDisableClientState(GL_COLOR_ARRAY); cpack(0xC0C0C0); glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, 0, pdd.vedata); + glVertexPointer(3, GL_FLOAT, 0, pdd->vedata); glDrawArrays(GL_LINES, 0, 2*totve); } @@ -4125,14 +4083,6 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv if(states) MEM_freeN(states); - if(pdd.vdata) - MEM_freeN(pdd.vdata); - if(pdd.vedata) - MEM_freeN(pdd.vedata); - if(pdd.cdata) - MEM_freeN(pdd.cdata); - if(pdd.ndata) - MEM_freeN(pdd.ndata); psys->flag &= ~PSYS_DRAWING; @@ -4159,10 +4109,8 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Obj float *pathcol = NULL, *pcol; - if(edit->psys && edit->psys->flag & PSYS_HAIR_UPDATED) { + if(edit->psys && edit->psys->flag & PSYS_HAIR_UPDATED) PE_update_object(scene, ob, 0); - edit->psys->flag &= ~PSYS_HAIR_UPDATED; - } /* create path and child path cache if it doesn't exist already */ if(edit->pathcache==0) @@ -5193,8 +5141,9 @@ static void drawtexspace(Object *ob) } /* draws wire outline */ -static void drawSolidSelect(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base) +static void drawSolidSelect(Scene *scene, View3D *v3d, ARegion *ar, Base *base) { + RegionView3D *rv3d= ar->regiondata; Object *ob= base->object; glLineWidth(2.0); @@ -5213,7 +5162,7 @@ static void drawSolidSelect(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base } else if(ob->type==OB_ARMATURE) { if(!(ob->mode & OB_MODE_POSE)) - draw_armature(scene, v3d, rv3d, base, OB_WIRE, 0); + draw_armature(scene, v3d, ar, base, OB_WIRE, 0); } glLineWidth(1.0); @@ -5323,11 +5272,11 @@ void drawRBpivot(bRigidBodyJointConstraint *data) glVertex3fv(v); glEnd(); if (axis==0) - view3d_object_text_draw_add(v[0], v[1], v[2], "px", 0); + view3d_cached_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); + view3d_cached_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); + view3d_cached_text_draw_add(v[0], v[1], v[2], "pz", 0); } glLineWidth (1.0f); setlinestyle(0); @@ -5370,6 +5319,9 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) } } + /* no return after this point, otherwise leaks */ + view3d_cached_text_draw_begin(); + /* draw keys? */ #if 0 // XXX old animation system if(base==(scene->basact) || (base->flag & (SELECT+BA_WAS_SEL))) { @@ -5554,7 +5506,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) if(dt>OB_WIRE && dt<OB_TEXTURE && ob!=scene->obedit && (flag && DRAW_SCENESET)==0) { if (!(ob->dtx&OB_DRAWWIRE) && (ob->flag&SELECT) && !(flag&DRAW_PICKING)) { - drawSolidSelect(scene, v3d, rv3d, base); + drawSolidSelect(scene, v3d, ar, base); } } } @@ -5700,7 +5652,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) break; case OB_ARMATURE: if(dt>OB_WIRE) GPU_enable_material(0, NULL); // we use default material - empty_object= draw_armature(scene, v3d, rv3d, base, dt, flag); + empty_object= draw_armature(scene, v3d, ar, base, dt, flag); if(dt>OB_WIRE) GPU_disable_material(); break; default: @@ -5720,10 +5672,12 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) wmLoadMatrix(rv3d->viewmat); + view3d_cached_text_draw_begin(); + for(psys=ob->particlesystem.first; psys; psys=psys->next) draw_new_particle_system(scene, v3d, rv3d, base, psys, dt); - view3d_particle_text_draw(v3d, ar); + view3d_cached_text_draw_end(v3d, ar, 0, NULL); wmMultMatrix(ob->obmat); @@ -5791,16 +5745,61 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) { if(!smd->domain->wt || !(smd->domain->viewsettings & MOD_SMOKE_VIEW_SHOWBIG)) { +// #if 0 smd->domain->tex = NULL; GPU_create_smoke(smd, 0); - draw_volume(scene, ar, v3d, base, smd->domain->tex, smd->domain->res, smd->domain->dx, smd->domain->tex_shadow); + draw_volume(scene, ar, v3d, base, smd->domain->tex, smd->domain->p0, smd->domain->p1, smd->domain->res, smd->domain->dx, smd->domain->tex_shadow); GPU_free_smoke(smd); +// #endif +#if 0 + int x, y, z; + float *density = smoke_get_density(smd->domain->fluid); + + wmLoadMatrix(rv3d->viewmat); + // wmMultMatrix(ob->obmat); + + if(col || (ob->flag & SELECT)) cpack(0xFFFFFF); + glDepthMask(GL_FALSE); + glEnable(GL_BLEND); + + + // glPointSize(3.0); + bglBegin(GL_POINTS); + + for(x = 0; x < smd->domain->res[0]; x++) + for(y = 0; y < smd->domain->res[1]; y++) + for(z = 0; z < smd->domain->res[2]; z++) + { + float tmp[3]; + int index = smoke_get_index(x, smd->domain->res[0], y, smd->domain->res[1], z); + + if(density[index] > FLT_EPSILON) + { + float color[3]; + VECCOPY(tmp, smd->domain->p0); + tmp[0] += smd->domain->dx * x + smd->domain->dx * 0.5; + tmp[1] += smd->domain->dx * y + smd->domain->dx * 0.5; + tmp[2] += smd->domain->dx * z + smd->domain->dx * 0.5; + color[0] = color[1] = color[2] = density[index]; + glColor3fv(color); + bglVertex3fv(tmp); + } + } + + bglEnd(); + glPointSize(1.0); + + wmMultMatrix(ob->obmat); + glDisable(GL_BLEND); + glDepthMask(GL_TRUE); + if(col) cpack(col); +#endif } - else if(smd->domain->wt || (smd->domain->viewsettings & MOD_SMOKE_VIEW_SHOWBIG)) + else if(smd->domain->wt && (smd->domain->viewsettings & MOD_SMOKE_VIEW_SHOWBIG)) { smd->domain->tex = NULL; GPU_create_smoke(smd, 1); - draw_volume(scene, ar, v3d, base, smd->domain->tex, smd->domain->res_wt, smd->domain->dx_wt, smd->domain->tex_shadow); + draw_volume(scene, ar, v3d, base, smd->domain->tex, smd->domain->p0, smd->domain->p1, smd->domain->res_wt, smd->domain->dx_wt, smd->domain->tex_shadow); GPU_free_smoke(smd); } } @@ -5830,7 +5829,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) { - view3d_object_text_draw_add(0.0f, 0.0f, 0.0f, ob->id.name+2, 10); + view3d_cached_text_draw_add(0.0f, 0.0f, 0.0f, ob->id.name+2, 10); } } /*if(dtx & OB_DRAWIMAGE) drawDispListwire(&ob->disp);*/ @@ -5853,7 +5852,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) } /* return warning, this is cached text draw */ - view3d_object_text_draw(v3d, ar); + view3d_cached_text_draw_end(v3d, ar, 1, NULL); wmLoadMatrix(rv3d->viewmat); diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c index c8eda10566c..ef3627e2b12 100644 --- a/source/blender/editors/space_view3d/drawvolume.c +++ b/source/blender/editors/space_view3d/drawvolume.c @@ -121,31 +121,7 @@ struct GPUTexture; -/* draw slices of smoke is adapted from c++ code authored by: Johannes Schmid and Ingemar Rask, 2006, johnny@grob.org */ -static float cv[][3] = { - {1.0f, 1.0f, 1.0f}, {-1.0f, 1.0f, 1.0f}, {-1.0f, -1.0f, 1.0f}, {1.0f, -1.0f, 1.0f}, - {1.0f, 1.0f, -1.0f}, {-1.0f, 1.0f, -1.0f}, {-1.0f, -1.0f, -1.0f}, {1.0f, -1.0f, -1.0f} -}; - -// edges have the form edges[n][0][xyz] + t*edges[n][1][xyz] -static float edges[12][2][3] = { - {{1.0f, 1.0f, -1.0f}, {0.0f, 0.0f, 1.0f}}, - {{-1.0f, 1.0f, -1.0f}, {0.0f, 0.0f, 1.0f}}, - {{-1.0f, -1.0f, -1.0f}, {0.0f, 0.0f, 1.0f}}, - {{1.0f, -1.0f, -1.0f}, {0.0f, 0.0f, 1.0f}}, - - {{1.0f, -1.0f, 1.0f}, {0.0f, 1.0f, 0.0f}}, - {{-1.0f, -1.0f, 1.0f}, {0.0f, 1.0f, 0.0f}}, - {{-1.0f, -1.0f, -1.0f}, {0.0f, 1.0f, 0.0f}}, - {{1.0f, -1.0f, -1.0f}, {0.0f, 1.0f, 0.0f}}, - - {{-1.0f, 1.0f, 1.0f}, {1.0f, 0.0f, 0.0f}}, - {{-1.0f, -1.0f, 1.0f}, {1.0f, 0.0f, 0.0f}}, - {{-1.0f, -1.0f, -1.0f}, {1.0f, 0.0f, 0.0f}}, - {{-1.0f, 1.0f, -1.0f}, {1.0f, 0.0f, 0.0f}} -}; - -int intersect_edges(float *points, float a, float b, float c, float d) +int intersect_edges(float *points, float a, float b, float c, float d, float edges[12][2][3]) { int i; float t; @@ -154,7 +130,7 @@ int intersect_edges(float *points, float a, float b, float c, float d) for (i=0; i<12; i++) { t = -(a*edges[i][0][0] + b*edges[i][0][1] + c*edges[i][0][2] + d) / (a*edges[i][1][0] + b*edges[i][1][1] + c*edges[i][1][2]); - if ((t>0)&&(t<2)) { + if ((t>0)&&(t<1)) { points[numpoints * 3 + 0] = edges[i][0][0] + edges[i][1][0]*t; points[numpoints * 3 + 1] = edges[i][0][1] + edges[i][1][1]*t; points[numpoints * 3 + 2] = edges[i][0][2] + edges[i][1][2]*t; @@ -191,9 +167,8 @@ static int larger_pow2(int n) return n*2; } -void draw_volume(Scene *scene, ARegion *ar, View3D *v3d, Base *base, GPUTexture *tex, int res[3], float dx, GPUTexture *tex_shadow) +void draw_volume(Scene *scene, ARegion *ar, View3D *v3d, Base *base, GPUTexture *tex, float *min, float *max, int res[3], float dx, GPUTexture *tex_shadow) { - Object *ob = base->object; RegionView3D *rv3d= ar->regiondata; float viewnormal[3]; @@ -204,6 +179,30 @@ void draw_volume(Scene *scene, ARegion *ar, View3D *v3d, Base *base, GPUTexture float cor[3] = {1.,1.,1.}; int gl_depth = 0, gl_blend = 0; + /* draw slices of smoke is adapted from c++ code authored by: Johannes Schmid and Ingemar Rask, 2006, johnny@grob.org */ + float cv[][3] = { + {1.0f, 1.0f, 1.0f}, {-1.0f, 1.0f, 1.0f}, {-1.0f, -1.0f, 1.0f}, {1.0f, -1.0f, 1.0f}, + {1.0f, 1.0f, -1.0f}, {-1.0f, 1.0f, -1.0f}, {-1.0f, -1.0f, -1.0f}, {1.0f, -1.0f, -1.0f} + }; + + // edges have the form edges[n][0][xyz] + t*edges[n][1][xyz] + float edges[12][2][3] = { + {{1.0f, 1.0f, -1.0f}, {0.0f, 0.0f, 2.0f}}, + {{-1.0f, 1.0f, -1.0f}, {0.0f, 0.0f, 2.0f}}, + {{-1.0f, -1.0f, -1.0f}, {0.0f, 0.0f, 2.0f}}, + {{1.0f, -1.0f, -1.0f}, {0.0f, 0.0f, 2.0f}}, + + {{1.0f, -1.0f, 1.0f}, {0.0f, 2.0f, 0.0f}}, + {{-1.0f, -1.0f, 1.0f}, {0.0f, 2.0f, 0.0f}}, + {{-1.0f, -1.0f, -1.0f}, {0.0f, 2.0f, 0.0f}}, + {{1.0f, -1.0f, -1.0f}, {0.0f, 2.0f, 0.0f}}, + + {{-1.0f, 1.0f, 1.0f}, {2.0f, 0.0f, 0.0f}}, + {{-1.0f, -1.0f, 1.0f}, {2.0f, 0.0f, 0.0f}}, + {{-1.0f, -1.0f, -1.0f}, {2.0f, 0.0f, 0.0f}}, + {{-1.0f, 1.0f, -1.0f}, {2.0f, 0.0f, 0.0f}} + }; + /* Fragment program to calculate the 3dview of smoke */ /* using 2 textures, density and shadow */ const char *text = "!!ARBfp1.0\n" @@ -223,13 +222,84 @@ void draw_volume(Scene *scene, ARegion *ar, View3D *v3d, Base *base, GPUTexture "MUL temp.b, temp.b, shadow.r;\n" "MOV result.color, temp;\n" "END\n"; - unsigned int prog; + GLuint prog; + + + float size[3]; + + VECSUB(size, max, min); + + // maxx, maxy, maxz + cv[0][0] = max[0]; + cv[0][1] = max[1]; + cv[0][2] = max[2]; + // minx, maxy, maxz + cv[1][0] = min[0]; + cv[1][1] = max[1]; + cv[1][2] = max[2]; + // minx, miny, maxz + cv[2][0] = min[0]; + cv[2][1] = min[1]; + cv[2][2] = max[2]; + // maxx, miny, maxz + cv[3][0] = max[0]; + cv[3][1] = min[1]; + cv[3][2] = max[2]; + + // maxx, maxy, minz + cv[4][0] = max[0]; + cv[4][1] = max[1]; + cv[4][2] = min[2]; + // minx, maxy, minz + cv[5][0] = min[0]; + cv[5][1] = max[1]; + cv[5][2] = min[2]; + // minx, miny, minz + cv[6][0] = min[0]; + cv[6][1] = min[1]; + cv[6][2] = min[2]; + // maxx, miny, minz + cv[7][0] = max[0]; + cv[7][1] = min[1]; + cv[7][2] = min[2]; + + VECCOPY(edges[0][0], cv[4]); // maxx, maxy, minz + VECCOPY(edges[1][0], cv[5]); // minx, maxy, minz + VECCOPY(edges[2][0], cv[6]); // minx, miny, minz + VECCOPY(edges[3][0], cv[7]); // maxx, miny, minz + + VECCOPY(edges[4][0], cv[3]); // maxx, miny, maxz + VECCOPY(edges[5][0], cv[2]); // minx, miny, maxz + VECCOPY(edges[6][0], cv[6]); // minx, miny, minz + VECCOPY(edges[7][0], cv[7]); // maxx, miny, minz + + VECCOPY(edges[8][0], cv[1]); // minx, maxy, maxz + VECCOPY(edges[9][0], cv[2]); // minx, miny, maxz + VECCOPY(edges[10][0], cv[6]); // minx, miny, minz + VECCOPY(edges[11][0], cv[5]); // minx, maxy, minz + + // printf("size x: %f, y: %f, z: %f\n", size[0], size[1], size[2]); + + edges[0][1][2] = size[2]; + edges[1][1][2] = size[2]; + edges[2][1][2] = size[2]; + edges[3][1][2] = size[2]; + + edges[4][1][1] = size[1]; + edges[5][1][1] = size[1]; + edges[6][1][1] = size[1]; + edges[7][1][1] = size[1]; + + edges[8][1][0] = size[0]; + edges[9][1][0] = size[0]; + edges[10][1][0] = size[0]; + edges[11][1][0] = size[0]; glGetBooleanv(GL_BLEND, (GLboolean *)&gl_blend); glGetBooleanv(GL_DEPTH_TEST, (GLboolean *)&gl_depth); wmLoadMatrix(rv3d->viewmat); - wmMultMatrix(ob->obmat); + // wmMultMatrix(ob->obmat); glDepthMask(GL_FALSE); glDisable(GL_DEPTH_TEST); @@ -248,17 +318,19 @@ void draw_volume(Scene *scene, ARegion *ar, View3D *v3d, Base *base, GPUTexture y = cv[i][1] + viewnormal[1]; z = cv[i][2] + viewnormal[2]; - if ((x>=-1.0f)&&(x<=1.0f) - &&(y>=-1.0f)&&(y<=1.0f) - &&(z>=-1.0f)&&(z<=1.0f)) { + if ((x>=min[0])&&(x<=max[0]) + &&(y>=min[1])&&(y<=max[1]) + &&(z>=min[2])&&(z<=max[2])) { break; } } - if(GLEW_ARB_fragment_program) + // printf("i: %d\n", i); + + if (GL_TRUE == glewIsSupported("GL_ARB_fragment_program")) { - glGenProgramsARB(1, &prog); glEnable(GL_FRAGMENT_PROGRAM_ARB); + glGenProgramsARB(1, &prog); glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, prog); glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, (GLsizei)strlen(text), text); @@ -268,10 +340,14 @@ void draw_volume(Scene *scene, ARegion *ar, View3D *v3d, Base *base, GPUTexture // custom parameter for smoke style (higher = thicker) glProgramLocalParameter4fARB (GL_FRAGMENT_PROGRAM_ARB, 1, 7.0, 7.0, 7.0, 1.0); } + else + printf("Your gfx card does not support 3dview smoke drawing.\n"); GPU_texture_bind(tex, 0); if(tex_shadow) GPU_texture_bind(tex_shadow, 1); + else + printf("No volume shadow\n"); if (!GLEW_ARB_texture_non_power_of_two) { cor[0] = (float)res[0]/(float)larger_pow2(res[0]); @@ -295,7 +371,7 @@ void draw_volume(Scene *scene, ARegion *ar, View3D *v3d, Base *base, GPUTexture float p0[3]; // intersect_edges returns the intersection points of all cube edges with // the given plane that lie within the cube - numpoints = intersect_edges(points, viewnormal[0], viewnormal[1], viewnormal[2], d); + numpoints = intersect_edges(points, viewnormal[0], viewnormal[1], viewnormal[2], d, edges); if (numpoints > 2) { VECCOPY(p0, points); @@ -318,7 +394,7 @@ void draw_volume(Scene *scene, ARegion *ar, View3D *v3d, Base *base, GPUTexture glBegin(GL_POLYGON); for (i = 0; i < numpoints; i++) { glColor3f(1.0, 1.0, 1.0); - glTexCoord3d((points[i * 3 + 0] + 1.0)*cor[0]/2.0, (points[i * 3 + 1] + 1)*cor[1]/2.0, (points[i * 3 + 2] + 1.0)*cor[2]/2.0); + glTexCoord3d((points[i * 3 + 0] - min[0] )*cor[0]/size[0], (points[i * 3 + 1] - min[1])*cor[1]/size[1], (points[i * 3 + 2] - min[2])*cor[2]/size[2]); glVertex3f(points[i * 3 + 0], points[i * 3 + 1], points[i * 3 + 2]); } glEnd(); diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 2250c2e7718..c175f835d67 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -190,6 +190,8 @@ static SpaceLink *view3d_new(const bContext *C) v3d->lens= 35.0f; v3d->near= 0.01f; v3d->far= 500.0f; + + v3d->twtype= V3D_MANIP_TRANSLATE; /* header */ ar= MEM_callocN(sizeof(ARegion), "header for view3d"); @@ -257,7 +259,6 @@ static SpaceLink *view3d_duplicate(SpaceLink *sl) if(v3do->localvd) { v3do->localvd= NULL; v3do->properties_storage= NULL; - v3do->localview= 0; v3do->lay= v3dn->localvd->lay; v3do->lay &= 0xFFFFFF; } @@ -273,101 +274,68 @@ static SpaceLink *view3d_duplicate(SpaceLink *sl) return (SpaceLink *)v3dn; } -static void view3d_modal_keymaps(wmWindowManager *wm, ARegion *ar, int stype) -{ - RegionView3D *rv3d= ar->regiondata; - ListBase *keymap; - - /* copy last mode, then we can re-init the region maps */ - rv3d->lastmode= stype; - - keymap= WM_keymap_listbase(wm, "Object Mode", 0, 0); - if(ELEM(stype, 0, NS_MODE_OBJECT)) - WM_event_add_keymap_handler(&ar->handlers, keymap); - else - WM_event_remove_keymap_handler(&ar->handlers, keymap); - - keymap= WM_keymap_listbase(wm, "EditMesh", 0, 0); - if(stype==NS_EDITMODE_MESH) - WM_event_add_keymap_handler(&ar->handlers, keymap); - else - WM_event_remove_keymap_handler(&ar->handlers, keymap); - - keymap= WM_keymap_listbase(wm, "Curve", 0, 0); - if(stype==NS_EDITMODE_CURVE) - WM_event_add_keymap_handler(&ar->handlers, keymap); - else - WM_event_remove_keymap_handler(&ar->handlers, keymap); - - keymap= WM_keymap_listbase(wm, "Armature", 0, 0); - if(stype==NS_EDITMODE_ARMATURE) - WM_event_add_keymap_handler(&ar->handlers, keymap); - else - WM_event_remove_keymap_handler(&ar->handlers, keymap); - - keymap= WM_keymap_listbase(wm, "Pose", 0, 0); - if(stype==NS_MODE_POSE) - WM_event_add_keymap_handler(&ar->handlers, keymap); - else - WM_event_remove_keymap_handler(&ar->handlers, keymap); - - keymap= WM_keymap_listbase(wm, "Metaball", 0, 0); - if(stype==NS_EDITMODE_MBALL) - WM_event_add_keymap_handler(&ar->handlers, keymap); - else - WM_event_remove_keymap_handler(&ar->handlers, keymap); - - keymap= WM_keymap_listbase(wm, "Lattice", 0, 0); - if(stype==NS_EDITMODE_LATTICE) - WM_event_add_keymap_handler(&ar->handlers, keymap); - else - WM_event_remove_keymap_handler(&ar->handlers, keymap); - - /* armature sketching needs to take over mouse */ - keymap= WM_keymap_listbase(wm, "Armature_Sketch", 0, 0); - if(stype==NS_EDITMODE_ARMATURE) - WM_event_add_keymap_handler_priority(&ar->handlers, keymap, 10); - else - WM_event_remove_keymap_handler(&ar->handlers, keymap); - - keymap= WM_keymap_listbase(wm, "Particle", 0, 0); - if(stype==NS_MODE_PARTICLE) - WM_event_add_keymap_handler(&ar->handlers, keymap); - else - WM_event_remove_keymap_handler(&ar->handlers, keymap); - - /* editfont keymap swallows all... */ - keymap= WM_keymap_listbase(wm, "Font", 0, 0); - if(stype==NS_EDITMODE_TEXT) - WM_event_add_keymap_handler_priority(&ar->handlers, keymap, 10); - else - WM_event_remove_keymap_handler(&ar->handlers, keymap); -} - /* add handlers, stuff you only do once or on area/region changes */ static void view3d_main_area_init(wmWindowManager *wm, ARegion *ar) { - RegionView3D *rv3d= ar->regiondata; - ListBase *keymap; + wmKeyMap *keymap; + + /* object ops. */ + keymap= WM_keymap_find(wm, "Object Non-modal", 0, 0); + WM_event_add_keymap_handler(&ar->handlers, keymap); - /* own keymap */ - keymap= WM_keymap_listbase(wm, "View3D Generic", SPACE_VIEW3D, 0); + /* pose is not modal, operator poll checks for this */ + keymap= WM_keymap_find(wm, "Pose", 0, 0); + WM_event_add_keymap_handler(&ar->handlers, keymap); + + keymap= WM_keymap_find(wm, "Object Mode", 0, 0); + WM_event_add_keymap_handler(&ar->handlers, keymap); + + keymap= WM_keymap_find(wm, "Image Paint", 0, 0); + WM_event_add_keymap_handler(&ar->handlers, keymap); + + keymap= WM_keymap_find(wm, "Vertex Paint", 0, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); - keymap= WM_keymap_listbase(wm, "View3D", SPACE_VIEW3D, 0); + + keymap= WM_keymap_find(wm, "Weight Paint", 0, 0); + WM_event_add_keymap_handler(&ar->handlers, keymap); + + keymap= WM_keymap_find(wm, "Sculpt", 0, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); - /* object ops. */ - keymap= WM_keymap_listbase(wm, "Object Non-modal", 0, 0); + keymap= WM_keymap_find(wm, "EditMesh", 0, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); - /* pose is not modal, operator poll checks for this */ - keymap= WM_keymap_listbase(wm, "Pose", 0, 0); + keymap= WM_keymap_find(wm, "Curve", 0, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); - /* modal ops keymaps */ - view3d_modal_keymaps(wm, ar, rv3d->lastmode); - /* operator poll checks for modes */ - keymap= WM_keymap_listbase(wm, "ImagePaint", 0, 0); + keymap= WM_keymap_find(wm, "Armature", 0, 0); + WM_event_add_keymap_handler(&ar->handlers, keymap); + + keymap= WM_keymap_find(wm, "Pose", 0, 0); + WM_event_add_keymap_handler(&ar->handlers, keymap); + + keymap= WM_keymap_find(wm, "Metaball", 0, 0); + WM_event_add_keymap_handler(&ar->handlers, keymap); + + keymap= WM_keymap_find(wm, "Lattice", 0, 0); + WM_event_add_keymap_handler(&ar->handlers, keymap); + + /* armature sketching needs to take over mouse */ + keymap= WM_keymap_find(wm, "Armature_Sketch", 0, 0); + WM_event_add_keymap_handler(&ar->handlers, keymap); + + keymap= WM_keymap_find(wm, "Particle", 0, 0); + WM_event_add_keymap_handler(&ar->handlers, keymap); + + /* editfont keymap swallows all... */ + keymap= WM_keymap_find(wm, "Font", 0, 0); + WM_event_add_keymap_handler(&ar->handlers, keymap); + + /* own keymap, last so modes can override it */ + keymap= WM_keymap_find(wm, "View3D Generic", SPACE_VIEW3D, 0); + WM_event_add_keymap_handler(&ar->handlers, keymap); + + keymap= WM_keymap_find(wm, "View3D", SPACE_VIEW3D, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); } @@ -442,7 +410,6 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw(ar); break; case ND_MODE: - view3d_modal_keymaps(wmn->wm, ar, wmn->subtype); ED_region_tag_redraw(ar); break; } @@ -452,6 +419,7 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) case ND_BONE_ACTIVE: case ND_BONE_SELECT: case ND_TRANSFORM: + case ND_POSE: case ND_DRAW: case ND_MODIFIER: case ND_CONSTRAINT: @@ -480,12 +448,21 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw(ar); break; } + break; + case NC_WORLD: + switch(wmn->data) { + case ND_WORLD_DRAW: + ED_region_tag_redraw(ar); + break; + } + break; case NC_LAMP: switch(wmn->data) { case ND_LIGHTING_DRAW: ED_region_tag_redraw(ar); break; } + break; case NC_IMAGE: /* this could be more fine grained checks if we had * more context than just the region */ @@ -514,7 +491,7 @@ static void view3d_main_area_cursor(wmWindow *win, ScrArea *sa, ARegion *ar) /* add handlers, stuff you only do once or on area/region changes */ static void view3d_header_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap= WM_keymap_listbase(wm, "View3D Generic", SPACE_VIEW3D, 0); + wmKeyMap *keymap= WM_keymap_find(wm, "View3D Generic", SPACE_VIEW3D, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); @@ -550,11 +527,11 @@ static void view3d_header_area_listener(ARegion *ar, wmNotifier *wmn) /* add handlers, stuff you only do once or on area/region changes */ static void view3d_buttons_area_init(wmWindowManager *wm, ARegion *ar) { - ListBase *keymap; + wmKeyMap *keymap; ED_region_panels_init(wm, ar); - keymap= WM_keymap_listbase(wm, "View3D Generic", SPACE_VIEW3D, 0); + keymap= WM_keymap_find(wm, "View3D Generic", SPACE_VIEW3D, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); } @@ -592,6 +569,7 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn) case ND_BONE_ACTIVE: case ND_BONE_SELECT: case ND_TRANSFORM: + case ND_POSE: case ND_DRAW: case ND_KEYS: ED_region_tag_redraw(ar); @@ -606,6 +584,10 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn) break; } break; + case NC_BRUSH: + if(wmn->action==NA_EDITED) + ED_region_tag_redraw(ar); + break; case NC_SPACE: if(wmn->data == ND_SPACE_VIEW3D) ED_region_tag_redraw(ar); @@ -616,16 +598,14 @@ 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; + wmKeyMap *keymap; ED_region_panels_init(wm, ar); - keymap= WM_keymap_listbase(wm, "View3D Generic", SPACE_VIEW3D, 0); + keymap= WM_keymap_find(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, CTX_data_mode_string(C), -1); @@ -910,7 +890,7 @@ void ED_spacetype_view3d(void) /* regions: listview/buttons */ art= MEM_callocN(sizeof(ARegionType), "spacetype view3d region"); art->regionid = RGN_TYPE_UI; - art->minsizex= 220; // XXX + art->minsizex= 180; // XXX art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_FRAMES; art->listener= view3d_buttons_area_listener; art->init= view3d_buttons_area_init; diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 54a8c375e69..ec72d72013b 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -302,60 +302,68 @@ static void v3d_editvertex_buts(const bContext *C, uiBlock *block, View3D *v3d, if((ob->parent) && (ob->partype == PARBONE)) but_y = 135; else but_y = 150; - uiBlockBeginAlign(block); - uiDefButBitS(block, TOG, V3D_GLOBAL_STATS, B_REDR, "Global", 0, 20, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays global values"); - uiDefButBitS(block, TOGN, V3D_GLOBAL_STATS, B_REDR, "Local", 100, 20, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays local values"); - uiBlockEndAlign(block); + memcpy(tfp->ve_median, median, sizeof(tfp->ve_median)); uiBlockBeginAlign(block); if(tot==1) { uiDefBut(block, LABEL, 0, "Vertex:", 0, 130, 200, 20, 0, 0, 0, 0, 0, ""); + uiBlockBeginAlign(block); uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "X:", 0, 110, 200, 20, &(tfp->ve_median[0]), -lim, lim, 10, 3, ""); uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Y:", 0, 90, 200, 20, &(tfp->ve_median[1]), -lim, lim, 10, 3, ""); uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Z:", 0, 70, 200, 20, &(tfp->ve_median[2]), -lim, lim, 10, 3, ""); - if(totw==1) - uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Vertex W:", 0, 50, 200, 19, &(tfp->ve_median[3]), 0.01, 100.0, 10, 3, ""); - uiBlockEndAlign(block); - - if(defstr[0]) { - uiDefBut(block, LABEL, 1, "Vertex Deform Groups", 0, 40, 200, 20, NULL, 0.0, 0.0, 0, 0, ""); - + + if(totw==1) { + uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "W:", 0, 50, 200, 20, &(tfp->ve_median[3]), 0.01, 100.0, 10, 3, ""); + uiBlockBeginAlign(block); + uiDefButBitS(block, TOG, V3D_GLOBAL_STATS, B_REDR, "Global", 0, 25, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays global values"); + uiDefButBitS(block, TOGN, V3D_GLOBAL_STATS, B_REDR, "Local", 100, 25, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays local values"); + uiBlockEndAlign(block); + if(totweight) + uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Weight:", 0, 0, 200, 20, &(tfp->ve_median[4]), 0.0, 1.0, 10, 3, ""); + } + else { uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_NOP, "Weight:", 10, 20, 150, 20, tfp->defweightp, 0.0f, 1.0f, 10, 3, "Weight value"); - uiDefButI(block, MENU, B_REDR, defstr, 160, 20, 140, 20, &tfp->curdef, 0.0, 0.0, 0, 0, "Current Vertex Group"); + uiDefButBitS(block, TOG, V3D_GLOBAL_STATS, B_REDR, "Global", 0, 45, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays global values"); + uiDefButBitS(block, TOGN, V3D_GLOBAL_STATS, B_REDR, "Local", 100, 45, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays local values"); uiBlockEndAlign(block); + if(totweight) + uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Weight:", 0, 20, 200, 20, &(tfp->ve_median[4]), 0.0, 1.0, 10, 3, ""); } - else if(totweight) - uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Weight:", 0, 20, 200, 20, &(tfp->ve_median[4]), 0.0, 1.0, 10, 3, ""); - } else { - uiDefBut(block, LABEL, 0, "Median:", 0, 130, 200, 20, 0, 0, 0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "Median:", 0, 130, 200, 20, 0, 0, 0, 0, 0, ""); + uiBlockBeginAlign(block); uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "X:", 0, 110, 200, 20, &(tfp->ve_median[0]), -lim, lim, 10, 3, ""); uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Y:", 0, 90, 200, 20, &(tfp->ve_median[1]), -lim, lim, 10, 3, ""); uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Z:", 0, 70, 200, 20, &(tfp->ve_median[2]), -lim, lim, 10, 3, ""); - if(totw==tot) + if(totw==tot) { uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "W:", 0, 50, 200, 20, &(tfp->ve_median[3]), 0.01, 100.0, 10, 3, ""); - uiBlockEndAlign(block); - if(totweight) - uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Weight:", 0, 20, 200, 20, &(tfp->ve_median[4]), 0.0, 1.0, 10, 3, "Weight is used for SoftBody Goal"); - } - - if(ob->type==OB_CURVE && (totw==0)) { /* bez curves have no w */ - uiBlockBeginAlign(block); - uiDefBut(block, BUT,B_SETPT_AUTO,"Auto", 10, 44, 72, 19, 0, 0, 0, 0, 0, "Auto handles (Shift H)"); - uiDefBut(block, BUT,B_SETPT_VECTOR,"Vector",82, 44, 73, 19, 0, 0, 0, 0, 0, "Vector handles (V)"); - uiDefBut(block, BUT,B_SETPT_ALIGN,"Align",155, 44, 73, 19, 0, 0, 0, 0, 0, "Align handles (H Toggles)"); - uiDefBut(block, BUT,B_SETPT_FREE,"Free", 227, 44, 72, 19, 0, 0, 0, 0, 0, "Align handles (H Toggles)"); - uiBlockEndAlign(block); + uiBlockEndAlign(block); + uiBlockBeginAlign(block); + uiDefButBitS(block, TOG, V3D_GLOBAL_STATS, B_REDR, "Global", 0, 25, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays global values"); + uiDefButBitS(block, TOGN, V3D_GLOBAL_STATS, B_REDR, "Local", 100, 25, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays local values"); + uiBlockEndAlign(block); + if(totweight) + uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Weight:", 0, 0, 200, 20, &(tfp->ve_median[4]), 0.0, 1.0, 10, 3, "Weight is used for SoftBody Goal"); + uiBlockEndAlign(block); + } + else { + uiBlockBeginAlign(block); + uiDefButBitS(block, TOG, V3D_GLOBAL_STATS, B_REDR, "Global", 0, 45, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays global values"); + uiDefButBitS(block, TOGN, V3D_GLOBAL_STATS, B_REDR, "Local", 100, 45, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays local values"); + uiBlockEndAlign(block); + if(totweight) + uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Weight:", 0, 20, 200, 20, &(tfp->ve_median[4]), 0.0, 1.0, 10, 3, "Weight is used for SoftBody Goal"); + uiBlockEndAlign(block); + } } - + if(totedge==1) - uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Crease W:", 0, 45, 200, 20, &(tfp->ve_median[3]), 0.0, 1.0, 10, 3, ""); + uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Crease:", 0, 20, 200, 20, &(tfp->ve_median[3]), 0.0, 1.0, 10, 3, ""); else if(totedge>1) - uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Median Crease W:", 0, 45, 200, 20, &(tfp->ve_median[3]), 0.0, 1.0, 10, 3, ""); + uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Median Crease:", 0, 20, 200, 20, &(tfp->ve_median[3]), 0.0, 1.0, 10, 3, ""); } else { // apply @@ -468,6 +476,7 @@ static void v3d_editvertex_buts(const bContext *C, uiBlock *block, View3D *v3d, } } +#if 0 /* assumes armature active */ static void validate_bonebutton_cb(bContext *C, void *bonev, void *namev) { @@ -486,10 +495,10 @@ static void validate_bonebutton_cb(bContext *C, void *bonev, void *namev) ED_armature_bone_rename(ob->data, oldname, newname); // editarmature.c } } +#endif static void v3d_posearmature_buts(uiBlock *block, View3D *v3d, Object *ob, float lim) { - uiBut *but; bArmature *arm; bPoseChannel *pchan; Bone *bone= NULL; @@ -503,22 +512,18 @@ static void v3d_posearmature_buts(uiBlock *block, View3D *v3d, Object *ob, float if(bone && (bone->flag & BONE_ACTIVE) && (bone->layer & arm->layer)) break; } - if (!pchan || !bone) return; - - if((ob->parent) && (ob->partype == PARBONE)) - but= uiDefBut (block, TEX, B_NOP, "Bone:", 160, 130, 140, 19, bone->name, 1, 31, 0, 0, ""); - else - but= uiDefBut(block, TEX, B_NOP, "Bone:", 160, 140, 140, 19, bone->name, 1, 31, 0, 0, ""); - uiButSetFunc(but, validate_bonebutton_cb, bone, NULL); - uiButSetCompleteFunc(but, autocomplete_bone, (void *)ob); + if (!pchan) { + uiDefBut(block, LABEL, 0, "No Bone Active", 0, 240, 100, 20, 0, 0, 0, 0, 0, ""); + return; + } - if (pchan->rotmode == PCHAN_ROT_AXISANGLE) { + if (pchan->rotmode == ROT_MODE_AXISANGLE) { float quat[4]; /* convert to euler, passing through quats... */ AxisAngleToQuat(quat, &pchan->quat[1], pchan->quat[0]); QuatToEul(quat, tfp->ob_eul); } - else if (pchan->rotmode == PCHAN_ROT_QUAT) + else if (pchan->rotmode == ROT_MODE_QUAT) QuatToEul(pchan->quat, tfp->ob_eul); else VecCopyf(tfp->ob_eul, pchan->eul); @@ -526,29 +531,43 @@ static void v3d_posearmature_buts(uiBlock *block, View3D *v3d, Object *ob, float tfp->ob_eul[1]*= 180.0/M_PI; tfp->ob_eul[2]*= 180.0/M_PI; + uiDefBut(block, LABEL, 0, "Location:", 0, 240, 100, 20, 0, 0, 0, 0, 0, ""); uiBlockBeginAlign(block); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCX, B_REDR, ICON_UNLOCKED, 10,140,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed"); - uiDefButF(block, NUM, B_ARMATUREPANEL2, "LocX:", 30, 140, 120, 19, pchan->loc, -lim, lim, 100, 3, ""); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCY, B_REDR, ICON_UNLOCKED, 10,120,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed"); - uiDefButF(block, NUM, B_ARMATUREPANEL2, "LocY:", 30, 120, 120, 19, pchan->loc+1, -lim, lim, 100, 3, ""); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCZ, B_REDR, ICON_UNLOCKED, 10,100,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed"); - uiDefButF(block, NUM, B_ARMATUREPANEL2, "LocZ:", 30, 100, 120, 19, pchan->loc+2, -lim, lim, 100, 3, ""); - + uiDefButF(block, NUM, B_ARMATUREPANEL2, "X:", 0, 220, 120, 19, pchan->loc, -lim, lim, 100, 3, ""); + uiDefButF(block, NUM, B_ARMATUREPANEL2, "Y:", 0, 200, 120, 19, pchan->loc+1, -lim, lim, 100, 3, ""); + uiDefButF(block, NUM, B_ARMATUREPANEL2, "Z:", 0, 180, 120, 19, pchan->loc+2, -lim, lim, 100, 3, ""); + uiBlockEndAlign(block); + + uiBlockBeginAlign(block); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCX, B_REDR, ICON_UNLOCKED, 125, 220, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects X Location value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCY, B_REDR, ICON_UNLOCKED, 125, 200, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects Y Location value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCZ, B_REDR, ICON_UNLOCKED, 125, 180, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects Z Location value from being Transformed"); + uiBlockEndAlign(block); + + uiDefBut(block, LABEL, 0, "Rotation:", 0, 160, 100, 20, 0, 0, 0, 0, 0, ""); + uiBlockBeginAlign(block); + uiDefButF(block, NUM, B_ARMATUREPANEL3, "X:", 0, 140, 120, 19, tfp->ob_eul, -1000.0, 1000.0, 100, 3, ""); + uiDefButF(block, NUM, B_ARMATUREPANEL3, "Y:", 0, 120, 120, 19, tfp->ob_eul+1, -1000.0, 1000.0, 100, 3, ""); + uiDefButF(block, NUM, B_ARMATUREPANEL3, "Z:", 0, 100, 120, 19, tfp->ob_eul+2, -1000.0, 1000.0, 100, 3, ""); + uiBlockEndAlign(block); + uiBlockBeginAlign(block); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTX, B_REDR, ICON_UNLOCKED, 10,70,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed"); - uiDefButF(block, NUM, B_ARMATUREPANEL3, "RotX:", 30, 70, 120, 19, tfp->ob_eul, -1000.0, 1000.0, 100, 3, ""); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTY, B_REDR, ICON_UNLOCKED, 10,50,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed"); - uiDefButF(block, NUM, B_ARMATUREPANEL3, "RotY:", 30, 50, 120, 19, tfp->ob_eul+1, -1000.0, 1000.0, 100, 3, ""); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTZ, B_REDR, ICON_UNLOCKED, 10,30,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed"); - uiDefButF(block, NUM, B_ARMATUREPANEL3, "RotZ:", 30, 30, 120, 19, tfp->ob_eul+2, -1000.0, 1000.0, 100, 3, ""); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTX, B_REDR, ICON_UNLOCKED, 125, 140, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects X Rotation value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTY, B_REDR, ICON_UNLOCKED, 125, 120, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects Y Rotation value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTZ, B_REDR, ICON_UNLOCKED, 125, 100, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects Z Rotation value from being Transformed"); + uiBlockEndAlign(block); + + uiDefBut(block, LABEL, 0, "Scale:", 0, 80, 100, 20, 0, 0, 0, 0, 0, ""); + uiBlockBeginAlign(block); + uiDefButF(block, NUM, B_ARMATUREPANEL2, "X:", 0, 60, 120, 19, pchan->size, -lim, lim, 10, 3, ""); + uiDefButF(block, NUM, B_ARMATUREPANEL2, "Y:", 0, 40, 120, 19, pchan->size+1, -lim, lim, 10, 3, ""); + uiDefButF(block, NUM, B_ARMATUREPANEL2, "Z:", 0, 20, 120, 19, pchan->size+2, -lim, lim, 10, 3, ""); + uiBlockEndAlign(block); uiBlockBeginAlign(block); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEX, B_REDR, ICON_UNLOCKED, 160,70,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed"); - uiDefButF(block, NUM, B_ARMATUREPANEL2, "ScaleX:", 180, 70, 120, 19, pchan->size, -lim, lim, 10, 3, ""); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEY, B_REDR, ICON_UNLOCKED, 160,50,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed"); - uiDefButF(block, NUM, B_ARMATUREPANEL2, "ScaleY:", 180, 50, 120, 19, pchan->size+1, -lim, lim, 10, 3, ""); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEZ, B_REDR, ICON_UNLOCKED, 160,30,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed"); - uiDefButF(block, NUM, B_ARMATUREPANEL2, "ScaleZ:", 180, 30, 120, 19, pchan->size+2, -lim, lim, 10, 3, ""); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEX, B_REDR, ICON_UNLOCKED, 125, 60, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects X Scale value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEY, B_REDR, ICON_UNLOCKED, 125, 40, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects Y Scale value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEZ, B_REDR, ICON_UNLOCKED, 125, 20, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects z Scale value from being Transformed"); uiBlockEndAlign(block); } @@ -572,7 +591,6 @@ static void v3d_editarmature_buts(uiBlock *block, View3D *v3d, Object *ob, float { bArmature *arm= ob->data; EditBone *ebone; - uiBut *but; TransformProperties *tfp= v3d->properties_storage; ebone= arm->edbo->first; @@ -585,34 +603,31 @@ static void v3d_editarmature_buts(uiBlock *block, View3D *v3d, Object *ob, float if (!ebone) return; - if((ob->parent) && (ob->partype == PARBONE)) - but= uiDefBut(block, TEX, B_NOP, "Bone:", 160, 130, 140, 19, ebone->name, 1, 31, 0, 0, ""); - else - but= uiDefBut(block, TEX, B_NOP, "Bone:", 160, 150, 140, 19, ebone->name, 1, 31, 0, 0, ""); - uiButSetFunc(but, validate_editbonebutton_cb, ebone, NULL); - + uiDefBut(block, LABEL, 0, "Head:", 0, 210, 100, 20, 0, 0, 0, 0, 0, ""); uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_ARMATUREPANEL1, "HeadX:", 10, 70, 140, 19, ebone->head, -lim, lim, 10, 3, ""); - uiDefButF(block, NUM, B_ARMATUREPANEL1, "HeadY:", 10, 50, 140, 19, ebone->head+1, -lim, lim, 10, 3, ""); - uiDefButF(block, NUM, B_ARMATUREPANEL1, "HeadZ:", 10, 30, 140, 19, ebone->head+2, -lim, lim, 10, 3, ""); + uiDefButF(block, NUM, B_ARMATUREPANEL1, "X:", 0, 190, 100, 19, ebone->head, -lim, lim, 10, 3, "X Location of the head end of the bone"); + uiDefButF(block, NUM, B_ARMATUREPANEL1, "Y:", 0, 170, 100, 19, ebone->head+1, -lim, lim, 10, 3, "Y Location of the head end of the bone"); + uiDefButF(block, NUM, B_ARMATUREPANEL1, "Z:", 0, 150, 100, 19, ebone->head+2, -lim, lim, 10, 3, "Z Location of the head end of the bone"); + if (ebone->parent && ebone->flag & BONE_CONNECTED ) + uiDefButF(block, NUM, B_ARMATUREPANEL1, "Radius:", 0, 130, 100, 19, &ebone->parent->rad_tail, 0, lim, 10, 3, "Head radius. Visualize with the Envelope display option"); + else + uiDefButF(block, NUM, B_ARMATUREPANEL1, "Radius:", 0, 130, 100, 19, &ebone->rad_head, 0, lim, 10, 3, "Head radius. Visualize with the Envelope display option"); + uiBlockEndAlign(block); + + uiBlockEndAlign(block); + uiDefBut(block, LABEL, 0, "Tail:", 0, 110, 100, 20, 0, 0, 0, 0, 0, ""); uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_ARMATUREPANEL1, "TailX:", 160, 70, 140, 19, ebone->tail, -lim, lim, 10, 3, ""); - uiDefButF(block, NUM, B_ARMATUREPANEL1, "TailY:", 160, 50, 140, 19, ebone->tail+1, -lim, lim, 10, 3, ""); - uiDefButF(block, NUM, B_ARMATUREPANEL1, "TailZ:", 160, 30, 140, 19, ebone->tail+2, -lim, lim, 10, 3, ""); + uiDefButF(block, NUM, B_ARMATUREPANEL1, "X:", 0, 90, 100, 19, ebone->tail, -lim, lim, 10, 3, "X Location of the tail end of the bone"); + uiDefButF(block, NUM, B_ARMATUREPANEL1, "Y:", 0, 70, 100, 19, ebone->tail+1, -lim, lim, 10, 3, "Y Location of the tail end of the bone"); + uiDefButF(block, NUM, B_ARMATUREPANEL1, "Z:", 0, 50, 100, 19, ebone->tail+2, -lim, lim, 10, 3, "Z Location of the tail end of the bone"); + uiDefButF(block, NUM, B_ARMATUREPANEL1, "Radius:", 0, 30, 100, 19, &ebone->rad_tail, 0, lim, 10, 3, "Tail radius. Visualize with the Envelope display option"); uiBlockEndAlign(block); tfp->ob_eul[0]= 180.0*ebone->roll/M_PI; - uiDefButF(block, NUM, B_ARMATUREPANEL1, "Roll:", 10, 100, 140, 19, tfp->ob_eul, -lim, lim, 1000, 3, ""); - - uiDefButBitI(block, TOG, BONE_EDITMODE_LOCKED, B_REDR, "Lock", 160, 100, 140, 19, &(ebone->flag), 0, 0, 0, 0, "Prevents bone from being transformed in edit mode"); - + uiDefButF(block, NUM, B_ARMATUREPANEL1, "Roll:", 0, 0, 100, 19, tfp->ob_eul, -lim, lim, 1000, 3, "Bone rotation around head-tail axis"); uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_ARMATUREPANEL1, "TailRadius:", 10, 150, 140, 19, &ebone->rad_tail, 0, lim, 10, 3, ""); - if (ebone->parent && ebone->flag & BONE_CONNECTED ) - uiDefButF(block, NUM, B_ARMATUREPANEL1, "HeadRadius:", 10, 130, 140, 19, &ebone->parent->rad_tail, 0, lim, 10, 3, ""); - else - uiDefButF(block, NUM, B_ARMATUREPANEL1, "HeadRadius:", 10, 130, 140, 19, &ebone->rad_head, 0, lim, 10, 3, ""); - uiBlockEndAlign(block); + + } static void v3d_editmetaball_buts(uiBlock *block, Object *ob, float lim) @@ -851,13 +866,13 @@ static void do_view3d_region_buttons(bContext *C, void *arg, int event) eul[1]= M_PI*tfp->ob_eul[1]/180.0; eul[2]= M_PI*tfp->ob_eul[2]/180.0; - if (pchan->rotmode == PCHAN_ROT_AXISANGLE) { + if (pchan->rotmode == ROT_MODE_AXISANGLE) { float quat[4]; /* convert to axis-angle, passing through quats */ EulToQuat(eul, quat); QuatToAxisAngle(quat, &pchan->quat[1], &pchan->quat[0]); } - else if (pchan->rotmode == PCHAN_ROT_QUAT) + else if (pchan->rotmode == ROT_MODE_QUAT) EulToQuat(eul, pchan->quat); else VecCopyf(pchan->eul, eul); @@ -871,7 +886,7 @@ static void do_view3d_region_buttons(bContext *C, void *arg, int event) } break; case B_TRANSFORMSPACEADD: - BIF_manageTransformOrientation(C, 1, 0); + BIF_createTransformOrientation(C, NULL, "", 1, 0); break; case B_TRANSFORMSPACECLEAR: BIF_clearTransformOrientation(C); @@ -1083,19 +1098,8 @@ static void view3d_panel_object(const bContext *C, Panel *pa) if(ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT)) { } else { - //bt= uiDefBut(block, TEX, B_IDNAME, "OB: ", 10,180,140,20, ob->id.name+2, 0.0, 21.0, 0, 0, ""); - //uiButSetFunc(bt, test_idbutton_cb, ob->id.name, NULL); - if((ob->mode & OB_MODE_PARTICLE_EDIT)==0) { - // uiBlockBeginAlign(block); - // uiDefIDPoinBut(block, test_obpoin_but, ID_OB, B_OBJECTPANELPARENT, "Par:", 160, 180, 140, 20, &ob->parent, "Parent Object"); - if((ob->parent) && (ob->partype == PARBONE)) { - // bt= uiDefBut(block, TEX, B_OBJECTPANELPARENT, "ParBone:", 160, 160, 140, 20, ob->parsubstr, 0, 30, 0, 0, ""); - // uiButSetCompleteFunc(bt, autocomplete_bone, (void *)ob->parent); - } - else { - strcpy(ob->parsubstr, ""); - } + strcpy(ob->parsubstr, ""); uiBlockEndAlign(block); } } @@ -1113,14 +1117,18 @@ static void view3d_panel_object(const bContext *C, Panel *pa) else { BoundBox *bb = NULL; - uiDefBut(block, LABEL, 0, "Location:", 10, 170, 100, 20, 0, 0, 0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "Location:", 0, 300, 100, 20, 0, 0, 0, 0, 0, ""); + uiBlockBeginAlign(block); + uiDefButF(block, NUM, B_OBJECTPANEL, "X:", 0, 280, 120, 19, &(ob->loc[0]), -lim, lim, 100, 3, ""); + uiDefButF(block, NUM, B_OBJECTPANEL, "Y:", 0, 260, 120, 19, &(ob->loc[1]), -lim, lim, 100, 3, ""); + uiDefButF(block, NUM, B_OBJECTPANEL, "Z:", 0, 240, 120, 19, &(ob->loc[2]), -lim, lim, 100, 3, ""); + uiBlockEndAlign(block); + uiBlockBeginAlign(block); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCX, B_REDR, ICON_UNLOCKED, 10,150,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed"); - uiDefButF(block, NUM, B_OBJECTPANEL, "X:", 30, 150, 120, 19, &(ob->loc[0]), -lim, lim, 100, 3, ""); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCY, B_REDR, ICON_UNLOCKED, 10,130,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed"); - uiDefButF(block, NUM, B_OBJECTPANEL, "Y:", 30, 130, 120, 19, &(ob->loc[1]), -lim, lim, 100, 3, ""); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCZ, B_REDR, ICON_UNLOCKED, 10,110,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed"); - uiDefButF(block, NUM, B_OBJECTPANEL, "Z:", 30, 110, 120, 19, &(ob->loc[2]), -lim, lim, 100, 3, ""); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCX, B_REDR, ICON_UNLOCKED, 125, 280, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects X Location value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCY, B_REDR, ICON_UNLOCKED, 125, 260, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects Y Location value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCZ, B_REDR, ICON_UNLOCKED, 125, 240, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects Z Location value from being Transformed"); + uiBlockEndAlign(block); tfp->ob_eul[0]= 180.0*ob->rot[0]/M_PI; tfp->ob_eul[1]= 180.0*ob->rot[1]/M_PI; @@ -1128,40 +1136,53 @@ static void view3d_panel_object(const bContext *C, Panel *pa) uiBlockBeginAlign(block); if ((ob->parent) && (ob->partype == PARBONE)) { - uiDefBut(block, LABEL, 0, "Rotation:", 160, 170, 100, 20, 0, 0, 0, 0, 0, ""); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTX, B_REDR, ICON_UNLOCKED, 160,130,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed"); - uiDefButF(block, NUM, B_OBJECTPANELROT, "X:", 180, 130, 120, 19, &(tfp->ob_eul[0]), -lim, lim, 1000, 3, ""); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTY, B_REDR, ICON_UNLOCKED, 160,110,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed"); - uiDefButF(block, NUM, B_OBJECTPANELROT, "Y:", 180, 110, 120, 19, &(tfp->ob_eul[1]), -lim, lim, 1000, 3, ""); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTZ, B_REDR, ICON_UNLOCKED, 160,90,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed"); - uiDefButF(block, NUM, B_OBJECTPANELROT, "Z:", 180, 90, 120, 19, &(tfp->ob_eul[2]), -lim, lim, 1000, 3, ""); + uiDefBut(block, LABEL, 0, "Rotation:", 0, 220, 100, 20, 0, 0, 0, 0, 0, ""); + uiBlockBeginAlign(block); + uiDefButF(block, NUM, B_OBJECTPANELROT, "X:", 0, 200, 120, 19, &(tfp->ob_eul[0]), -lim, lim, 1000, 3, ""); + uiDefButF(block, NUM, B_OBJECTPANELROT, "Y:", 0, 180, 120, 19, &(tfp->ob_eul[1]), -lim, lim, 1000, 3, ""); + uiDefButF(block, NUM, B_OBJECTPANELROT, "Z:", 0, 160, 120, 19, &(tfp->ob_eul[2]), -lim, lim, 1000, 3, ""); + uiBlockEndAlign(block); + + uiBlockBeginAlign(block); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTX, B_REDR, ICON_UNLOCKED, 125, 200, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects X Rotation from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTY, B_REDR, ICON_UNLOCKED, 125, 180, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects Y Rotation value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTZ, B_REDR, ICON_UNLOCKED, 125, 160, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects Z Rotation value from being Transformed"); + uiBlockEndAlign(block); } else { - uiDefBut(block, LABEL, 0, "Rotation:", 160, 170, 100, 20, 0, 0, 0, 0, 0, ""); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTX, B_REDR, ICON_UNLOCKED, 160,150,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed"); - uiDefButF(block, NUM, B_OBJECTPANELROT, "X:", 180, 150, 120, 19, &(tfp->ob_eul[0]), -lim, lim, 1000, 3, ""); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTY, B_REDR, ICON_UNLOCKED, 160,130,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed"); - uiDefButF(block, NUM, B_OBJECTPANELROT, "Y:", 180, 130, 120, 19, &(tfp->ob_eul[1]), -lim, lim, 1000, 3, ""); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTZ, B_REDR, ICON_UNLOCKED, 160,110,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed"); - uiDefButF(block, NUM, B_OBJECTPANELROT, "Z:", 180, 110, 120, 19, &(tfp->ob_eul[2]), -lim, lim, 1000, 3, ""); + uiDefBut(block, LABEL, 0, "Rotation:", 0, 220, 100, 20, 0, 0, 0, 0, 0, ""); + uiBlockBeginAlign(block); + uiDefButF(block, NUM, B_OBJECTPANELROT, "X:", 0, 200, 120, 19, &(tfp->ob_eul[0]), -lim, lim, 1000, 3, ""); + uiDefButF(block, NUM, B_OBJECTPANELROT, "Y:", 0, 180, 120, 19, &(tfp->ob_eul[1]), -lim, lim, 1000, 3, ""); + uiDefButF(block, NUM, B_OBJECTPANELROT, "Z:", 0, 160, 120, 19, &(tfp->ob_eul[2]), -lim, lim, 1000, 3, ""); + uiBlockEndAlign(block); + + uiBlockBeginAlign(block); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTX, B_REDR, ICON_UNLOCKED, 125, 200, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects X Rotation value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTY, B_REDR, ICON_UNLOCKED, 125, 180, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects Y Rotation value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTZ, B_REDR, ICON_UNLOCKED, 125, 160, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects Z Rotation value from being Transformed"); + uiBlockEndAlign(block); } tfp->ob_scale[0]= ob->size[0]; tfp->ob_scale[1]= ob->size[1]; tfp->ob_scale[2]= ob->size[2]; - uiDefBut(block, LABEL, 0, "Scale:", 10, 90, 100, 20, 0, 0, 0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "Scale:", 0, 140, 100, 20, 0, 0, 0, 0, 0, ""); + uiDefButS(block, OPTION, B_REDR, "Link", 60, 140, 50, 19, &(tfp->link_scale), 0, 1, 0, 0, "Scale values vary proportionally in all directions"); uiBlockBeginAlign(block); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEX, B_REDR, ICON_UNLOCKED, 10, 70, 20, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed"); - uiDefButF(block, NUM, B_OBJECTPANELSCALE, "X:", 30, 70, 120, 19, &(tfp->ob_scale[0]), -lim, lim, 10, 3, ""); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEY, B_REDR, ICON_UNLOCKED, 10, 50, 20, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed"); - uiDefButF(block, NUM, B_OBJECTPANELSCALE, "Y:", 30, 50, 120, 19, &(tfp->ob_scale[1]), -lim, lim, 10, 3, ""); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEZ, B_REDR, ICON_UNLOCKED, 10, 30, 20, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed"); - uiDefButF(block, NUM, B_OBJECTPANELSCALE, "Z:", 30, 30, 120, 19, &(tfp->ob_scale[2]), -lim, lim, 10, 3, ""); + uiDefButF(block, NUM, B_OBJECTPANELSCALE, "X:", 0, 120, 120, 19, &(tfp->ob_scale[0]), -lim, lim, 10, 3, ""); + uiDefButF(block, NUM, B_OBJECTPANELSCALE, "Y:", 0, 100, 120, 19, &(tfp->ob_scale[1]), -lim, lim, 10, 3, ""); + uiDefButF(block, NUM, B_OBJECTPANELSCALE, "Z:", 0, 80, 120, 19, &(tfp->ob_scale[2]), -lim, lim, 10, 3, ""); uiBlockEndAlign(block); - uiDefButS(block, TOG, B_REDR, "Link Scale", 10, 0, 140, 19, &(tfp->link_scale), 0, 1, 0, 0, "Scale values vary proportionally in all directions"); + uiBlockBeginAlign(block); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEX, B_REDR, ICON_UNLOCKED, 125, 120, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects X Scale value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEY, B_REDR, ICON_UNLOCKED, 125, 100, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects Y Scale value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEZ, B_REDR, ICON_UNLOCKED, 125, 80, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects Z Scale value from being Transformed"); + + bb= object_get_boundbox(ob); if (bb) { @@ -1175,19 +1196,19 @@ static void view3d_panel_object(const bContext *C, Panel *pa) if ((ob->parent) && (ob->partype == PARBONE)) { - uiDefBut(block, LABEL, 0, "Dimensions:", 160, 90, 100, 20, 0, 0, 0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "Dimensions:", 0, 60, 100, 20, 0, 0, 0, 0, 0, ""); uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_OBJECTPANELDIMS, "X:", 160, 70, 140, 19, &(tfp->ob_dims[0]), 0.0, lim, 10, 3, "Manipulate bounding box size"); - uiDefButF(block, NUM, B_OBJECTPANELDIMS, "Y:", 160, 50, 140, 19, &(tfp->ob_dims[1]), 0.0, lim, 10, 3, "Manipulate bounding box size"); - uiDefButF(block, NUM, B_OBJECTPANELDIMS, "Z:", 160, 30, 140, 19, &(tfp->ob_dims[2]), 0.0, lim, 10, 3, "Manipulate bounding box size"); + uiDefButF(block, NUM, B_OBJECTPANELDIMS, "X:", 0, 40, 150, 19, &(tfp->ob_dims[0]), 0.0, lim, 10, 3, "Manipulate X bounding box size"); + uiDefButF(block, NUM, B_OBJECTPANELDIMS, "Y:", 0, 20, 150, 19, &(tfp->ob_dims[1]), 0.0, lim, 10, 3, "Manipulate Y bounding box size"); + uiDefButF(block, NUM, B_OBJECTPANELDIMS, "Z:", 0, 0, 150, 19, &(tfp->ob_dims[2]), 0.0, lim, 10, 3, "Manipulate Z bounding box size"); } else { - uiDefBut(block, LABEL, 0, "Dimensions:", 160, 90, 100, 20, 0, 0, 0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "Dimensions:", 0, 60, 100, 20, 0, 0, 0, 0, 0, ""); uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_OBJECTPANELDIMS, "X:", 160, 70, 140, 19, &(tfp->ob_dims[0]), 0.0, lim, 10, 3, "Manipulate bounding box size"); - uiDefButF(block, NUM, B_OBJECTPANELDIMS, "Y:", 160, 50, 140, 19, &(tfp->ob_dims[1]), 0.0, lim, 10, 3, "Manipulate bounding box size"); - uiDefButF(block, NUM, B_OBJECTPANELDIMS, "Z:", 160, 30, 140, 19, &(tfp->ob_dims[2]), 0.0, lim, 10, 3, "Manipulate bounding box size"); + uiDefButF(block, NUM, B_OBJECTPANELDIMS, "X:", 0, 40, 150, 19, &(tfp->ob_dims[0]), 0.0, lim, 10, 3, "Manipulate X bounding box size"); + uiDefButF(block, NUM, B_OBJECTPANELDIMS, "Y:", 0, 20, 150, 19, &(tfp->ob_dims[1]), 0.0, lim, 10, 3, "Manipulate Y bounding box size"); + uiDefButF(block, NUM, B_OBJECTPANELDIMS, "Z:", 0, 0, 150, 19, &(tfp->ob_dims[2]), 0.0, lim, 10, 3, "Manipulate Z bounding box size"); } uiBlockEndAlign(block); @@ -1430,25 +1451,12 @@ void view3d_buttons_register(ARegionType *art) 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); } @@ -1458,13 +1466,9 @@ static int view3d_properties(bContext *C, wmOperator *op) ScrArea *sa= CTX_wm_area(C); ARegion *ar= view3d_has_buttons_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); - } + if(ar) + ED_region_toggle_hidden(C, ar); + return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 66113ec4941..5612e60e899 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -732,7 +732,7 @@ static void draw_viewport_name(ARegion *ar, View3D *v3d) char *name = view3d_get_name(v3d, rv3d); char *printable = NULL; - if (v3d->localview) { + if (v3d->localvd) { printable = malloc(strlen(name) + strlen(" (Local)_")); /* '_' gives space for '\0' */ strcpy(printable, name); strcat(printable, " (Local)"); @@ -742,10 +742,10 @@ static void draw_viewport_name(ARegion *ar, View3D *v3d) if (printable) { UI_ThemeColor(TH_TEXT_HI); - BLF_draw_default(10, ar->winy-20, 0.0f, printable); + BLF_draw_default(22, ar->winy-17, 0.0f, printable); } - if (v3d->localview) { + if (v3d->localvd) { free(printable); } } @@ -1416,12 +1416,9 @@ static void draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - -// glaDefine2DArea(&ar->winrct); + /* need to use wm push/pop matrix because ED_region_pixelspace + uses the wm functions too, otherwise gets out of sync */ + wmPushMatrix(); ED_region_pixelspace(ar); glEnable(GL_BLEND); @@ -1433,10 +1430,7 @@ static void draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d) glPixelZoom(1.0, 1.0); glPixelTransferf(GL_ALPHA_SCALE, 1.0f); - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - glMatrixMode(GL_MODELVIEW); - glPopMatrix(); + wmPopMatrix(); glDisable(GL_BLEND); if(v3d->zbuf) glEnable(GL_DEPTH_TEST); diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index bbcee0415f8..c07d9108993 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -239,9 +239,10 @@ typedef struct ViewOpsData { float ofs[3], obofs[3]; float reverse, dist0; float grid, far; + short axis_snap; /* view rotate only */ int origx, origy, oldx, oldy; - int origkey; + int origkey; /* the key that triggered the operator */ } ViewOpsData; @@ -289,7 +290,7 @@ static void viewops_data(bContext *C, wmOperator *op, wmEvent *event) QUATCOPY(vod->oldquat, rv3d->viewquat); vod->origx= vod->oldx= event->x; vod->origy= vod->oldy= event->y; - vod->origkey= event->type; + vod->origkey= event->type; /* the key that triggered the operator. */ /* lookup, we dont pass on v3d to prevent confusement */ vod->grid= v3d->grid; @@ -357,11 +358,52 @@ static float snapquats[39][6] = { {0.0, 0.0, 0.0, 1.0, 0, 0} }; +enum { + VIEW_PASS= 0, + VIEW_APPLY, + VIEW_CONFIRM +}; + +/* NOTE: these defines are saved in keymap files, do not change values but just add new ones */ +#define VIEW_MODAL_CONFIRM 1 /* used for all view operations */ +#define VIEWROT_MODAL_AXIS_SNAP_ENABLE 2 +#define VIEWROT_MODAL_AXIS_SNAP_DISABLE 3 + + +/* called in transform_ops.c, on each regeneration of keymaps */ +void viewrotate_modal_keymap(wmWindowManager *wm) +{ + static EnumPropertyItem modal_items[] = { + {VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Cancel", ""}, + + {VIEWROT_MODAL_AXIS_SNAP_ENABLE, "AXIS_SNAP_ENABLE", 0, "Enable Axis Snap", ""}, + {VIEWROT_MODAL_AXIS_SNAP_DISABLE, "AXIS_SNAP_DISABLE", 0, "Enable Axis Snap", ""}, + + {0, NULL, 0, NULL, NULL}}; + + wmKeyMap *keymap= WM_modalkeymap_get(wm, "View3D Rotate Modal"); -static void viewrotate_apply(ViewOpsData *vod, int x, int y, int ctrl) + /* this function is called for each spacetype, only needs to add map once */ + if(keymap) return; + + keymap= WM_modalkeymap_add(wm, "View3D Rotate Modal", modal_items); + + /* items for modal map */ + WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, VIEW_MODAL_CONFIRM); + WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, VIEW_MODAL_CONFIRM); + + WM_modalkeymap_add_item(keymap, LEFTCTRLKEY, KM_PRESS, KM_ANY, 0, VIEWROT_MODAL_AXIS_SNAP_ENABLE); + WM_modalkeymap_add_item(keymap, LEFTCTRLKEY, KM_RELEASE, KM_ANY, 0, VIEWROT_MODAL_AXIS_SNAP_DISABLE); + + /* assign map to operators */ + WM_modalkeymap_assign(keymap, "VIEW3D_OT_rotate"); + +} + +static void viewrotate_apply(ViewOpsData *vod, int x, int y) { RegionView3D *rv3d= vod->rv3d; - int use_sel= 0; /* XXX */ + int use_sel= U.uiflag & USER_ORBIT_SELECTION; rv3d->view= 0; /* need to reset everytime because of view snapping */ @@ -462,7 +504,7 @@ static void viewrotate_apply(ViewOpsData *vod, int x, int y, int ctrl) } /* check for view snap */ - if (ctrl){ + if (vod->axis_snap){ int i; float viewmat[3][3]; @@ -496,23 +538,41 @@ static void viewrotate_apply(ViewOpsData *vod, int x, int y, int ctrl) static int viewrotate_modal(bContext *C, wmOperator *op, wmEvent *event) { ViewOpsData *vod= op->customdata; + short event_code= VIEW_PASS; /* execute the events */ - switch(event->type) { - case MOUSEMOVE: - viewrotate_apply(vod, event->x, event->y, event->ctrl); - break; + if(event->type==MOUSEMOVE) { + event_code= VIEW_APPLY; + } + else if(event->type==EVT_MODAL_MAP) { + switch (event->val) { + case VIEW_MODAL_CONFIRM: + event_code= VIEW_CONFIRM; + break; + case VIEWROT_MODAL_AXIS_SNAP_ENABLE: + vod->axis_snap= TRUE; + event_code= VIEW_APPLY; + break; + case VIEWROT_MODAL_AXIS_SNAP_DISABLE: + vod->axis_snap= FALSE; + event_code= VIEW_APPLY; + break; + } + } + else if(event->type==vod->origkey && event->val==KM_RELEASE) { + event_code= VIEW_CONFIRM; + } - default: - /* origkey may be zero when invoked from a button */ - if(ELEM3(event->type, ESCKEY, LEFTMOUSE, RIGHTMOUSE) || (event->type==vod->origkey && event->val==0)) { - request_depth_update(CTX_wm_region_view3d(C)); + if(event_code==VIEW_APPLY) { + viewrotate_apply(vod, event->x, event->y); + } + else if (event_code==VIEW_CONFIRM) { + request_depth_update(CTX_wm_region_view3d(C)); - MEM_freeN(vod); - op->customdata= NULL; + MEM_freeN(vod); + op->customdata= NULL; - return OPERATOR_FINISHED; - } + return OPERATOR_FINISHED; } return OPERATOR_RUNNING_MODAL; @@ -541,19 +601,19 @@ static int viewrotate_invoke(bContext *C, wmOperator *op, wmEvent *event) } /* add temp handler */ - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } -void VIEW3D_OT_viewrotate(wmOperatorType *ot) +void VIEW3D_OT_rotate(wmOperatorType *ot) { /* identifiers */ ot->name= "Rotate view"; ot->description = "Rotate the view."; - ot->idname= "VIEW3D_OT_viewrotate"; + ot->idname= "VIEW3D_OT_rotate"; /* api callbacks */ ot->invoke= viewrotate_invoke; @@ -566,6 +626,33 @@ void VIEW3D_OT_viewrotate(wmOperatorType *ot) /* ************************ viewmove ******************************** */ + +/* NOTE: these defines are saved in keymap files, do not change values but just add new ones */ + +/* called in transform_ops.c, on each regeneration of keymaps */ +void viewmove_modal_keymap(wmWindowManager *wm) +{ + static EnumPropertyItem modal_items[] = { + {VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""}, + + {0, NULL, 0, NULL, NULL}}; + + wmKeyMap *keymap= WM_modalkeymap_get(wm, "View3D Move Modal"); + + /* this function is called for each spacetype, only needs to add map once */ + if(keymap) return; + + keymap= WM_modalkeymap_add(wm, "View3D Move Modal", modal_items); + + /* items for modal map */ + WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, VIEW_MODAL_CONFIRM); + WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, VIEW_MODAL_CONFIRM); + + /* assign map to operators */ + WM_modalkeymap_assign(keymap, "VIEW3D_OT_move"); +} + + static void viewmove_apply(ViewOpsData *vod, int x, int y) { if(vod->rv3d->persp==V3D_CAMOB) { @@ -596,24 +683,35 @@ static void viewmove_apply(ViewOpsData *vod, int x, int y) static int viewmove_modal(bContext *C, wmOperator *op, wmEvent *event) { + ViewOpsData *vod= op->customdata; + short event_code= VIEW_PASS; /* execute the events */ - switch(event->type) { - case MOUSEMOVE: - viewmove_apply(vod, event->x, event->y); - break; + if(event->type==MOUSEMOVE) { + event_code= VIEW_APPLY; + } + else if(event->type==EVT_MODAL_MAP) { + switch (event->val) { + case VIEW_MODAL_CONFIRM: + event_code= VIEW_CONFIRM; + break; + } + } + else if(event->type==vod->origkey && event->val==KM_RELEASE) { + event_code= VIEW_CONFIRM; + } - default: - /* origkey may be zero when invoked from a button */ - if(ELEM3(event->type, ESCKEY, LEFTMOUSE, RIGHTMOUSE) || (event->type==vod->origkey && event->val==0)) { - request_depth_update(CTX_wm_region_view3d(C)); + if(event_code==VIEW_APPLY) { + viewmove_apply(vod, event->x, event->y); + } + else if (event_code==VIEW_CONFIRM) { + request_depth_update(CTX_wm_region_view3d(C)); - MEM_freeN(vod); - op->customdata= NULL; + MEM_freeN(vod); + op->customdata= NULL; - return OPERATOR_FINISHED; - } + return OPERATOR_FINISHED; } return OPERATOR_RUNNING_MODAL; @@ -625,19 +723,19 @@ static int viewmove_invoke(bContext *C, wmOperator *op, wmEvent *event) viewops_data(C, op, event); /* add temp handler */ - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } -void VIEW3D_OT_viewmove(wmOperatorType *ot) +void VIEW3D_OT_move(wmOperatorType *ot) { /* identifiers */ ot->name= "Move view"; ot->description = "Move the view."; - ot->idname= "VIEW3D_OT_viewmove"; + ot->idname= "VIEW3D_OT_move"; /* api callbacks */ ot->invoke= viewmove_invoke; @@ -650,6 +748,29 @@ void VIEW3D_OT_viewmove(wmOperatorType *ot) /* ************************ viewzoom ******************************** */ +/* called in transform_ops.c, on each regeneration of keymaps */ +void viewzoom_modal_keymap(wmWindowManager *wm) +{ + static EnumPropertyItem modal_items[] = { + {VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""}, + + {0, NULL, 0, NULL, NULL}}; + + wmKeyMap *keymap= WM_modalkeymap_get(wm, "View3D Zoom Modal"); + + /* this function is called for each spacetype, only needs to add map once */ + if(keymap) return; + + keymap= WM_modalkeymap_add(wm, "View3D Zoom Modal", modal_items); + + /* items for modal map */ + WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, VIEW_MODAL_CONFIRM); + WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, VIEW_MODAL_CONFIRM); + + /* assign map to operators */ + WM_modalkeymap_assign(keymap, "VIEW3D_OT_zoom"); +} + static void view_zoom_mouseloc(ARegion *ar, float dfac, int mx, int my) { RegionView3D *rv3d= ar->regiondata; @@ -758,23 +879,33 @@ static void viewzoom_apply(ViewOpsData *vod, int x, int y) static int viewzoom_modal(bContext *C, wmOperator *op, wmEvent *event) { ViewOpsData *vod= op->customdata; + short event_code= VIEW_PASS; /* execute the events */ - switch(event->type) { - case MOUSEMOVE: - viewzoom_apply(vod, event->x, event->y); - break; + if(event->type==MOUSEMOVE) { + event_code= VIEW_APPLY; + } + else if(event->type==EVT_MODAL_MAP) { + switch (event->val) { + case VIEW_MODAL_CONFIRM: + event_code= VIEW_CONFIRM; + break; + } + } + else if(event->type==vod->origkey && event->val==KM_RELEASE) { + event_code= VIEW_CONFIRM; + } - default: - /* origkey may be zero when invoked from a button */ - if(ELEM3(event->type, ESCKEY, LEFTMOUSE, RIGHTMOUSE) || (event->type==vod->origkey && event->val==0)) { - request_depth_update(CTX_wm_region_view3d(C)); + if(event_code==VIEW_APPLY) { + viewzoom_apply(vod, event->x, event->y); + } + else if (event_code==VIEW_CONFIRM) { + request_depth_update(CTX_wm_region_view3d(C)); - MEM_freeN(vod); - op->customdata= NULL; + MEM_freeN(vod); + op->customdata= NULL; - return OPERATOR_FINISHED; - } + return OPERATOR_FINISHED; } return OPERATOR_RUNNING_MODAL; @@ -823,7 +954,7 @@ static int viewzoom_invoke(bContext *C, wmOperator *op, wmEvent *event) viewops_data(C, op, event); /* add temp handler */ - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; } @@ -925,7 +1056,7 @@ static int viewhome_exec(bContext *C, wmOperator *op) /* was view3d_home() in 2. void VIEW3D_OT_view_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "View home"; + ot->name= "View All"; ot->description = "View all objects in scene."; ot->idname= "VIEW3D_OT_view_all"; @@ -1064,7 +1195,7 @@ void VIEW3D_OT_view_center(wmOperatorType *ot) { /* identifiers */ - ot->name= "View center"; + ot->name= "View Selected"; ot->description = "Move the view to the selection center."; ot->idname= "VIEW3D_OT_view_center"; @@ -1628,7 +1759,7 @@ static int viewpersportho_exec(bContext *C, wmOperator *op) void VIEW3D_OT_view_persportho(wmOperatorType *ot) { /* identifiers */ - ot->name= "View persp/ortho"; + ot->name= "View Persp/Ortho"; ot->description = "Switch the current view from perspective/orthographic."; ot->idname= "VIEW3D_OT_view_persportho"; @@ -1850,8 +1981,7 @@ static int set_3dcursor_invoke(bContext *C, wmOperator *op, wmEvent *event) // XXX notifier for scene */ ED_area_tag_redraw(CTX_wm_area(C)); - /* prevent other mouse ops to fail */ - return OPERATOR_PASS_THROUGH; + return OPERATOR_FINISHED; } void VIEW3D_OT_cursor3d(wmOperatorType *ot) @@ -2339,7 +2469,7 @@ void viewmoveNDOF(Scene *scene, ARegion *ar, View3D *v3d, int mode) if (use_sel) { QuatConj(q1); /* conj == inv for unit quat */ - VecSubf(v3d->ofs, v3d->ofs, obofs); + VecSubf(rv3d->ofs, rv3d->ofs, obofs); QuatMulVecf(q1, rv3d->ofs); VecAddf(rv3d->ofs, rv3d->ofs, obofs); } diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index a633969d557..45828d654aa 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -177,7 +177,7 @@ static void handle_view3d_lock(bContext *C) View3D *v3d= CTX_wm_view3d(C); if (v3d != NULL && sa != NULL) { - if(v3d->localview==0 && v3d->scenelock && sa->spacetype==SPACE_VIEW3D) { + if(v3d->localvd==NULL && v3d->scenelock && sa->spacetype==SPACE_VIEW3D) { /* copy to scene */ scene->lay= v3d->lay; @@ -195,27 +195,38 @@ static int layers_exec(bContext *C, wmOperator *op) View3D *v3d= sa->spacedata.first; int nr= RNA_int_get(op->ptr, "nr"); - if(nr<=0) + if(nr < 0) return OPERATOR_CANCELLED; - nr--; - - if(RNA_boolean_get(op->ptr, "extend")) - v3d->lay |= (1<<nr); - else - v3d->lay = (1<<nr); - - /* set active layer, ensure to always have one */ - if(v3d->lay & (1<<nr)) - v3d->layact= 1<<nr; - else if((v3d->lay & v3d->layact)==0) { - int bit= 0; + + + if(nr == 0) { + /* all layers */ + v3d->lay |= (1<<20)-1; + + if(!v3d->layact) + v3d->layact= 1; + } + else { + nr--; + + if(RNA_boolean_get(op->ptr, "extend")) + v3d->lay |= (1<<nr); + else + v3d->lay = (1<<nr); - while(bit<32) { - if(v3d->lay & (1<<bit)) { - v3d->layact= 1<<bit; - break; + /* set active layer, ensure to always have one */ + if(v3d->lay & (1<<nr)) + v3d->layact= 1<<nr; + else if((v3d->lay & v3d->layact)==0) { + int bit= 0; + + while(bit<32) { + if(v3d->lay & (1<<bit)) { + v3d->layact= 1<<bit; + break; + } + bit++; } - bit++; } } @@ -263,8 +274,8 @@ void VIEW3D_OT_layers(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "nr", 1, 0, 20, "Number", "", 0, 20); - RNA_def_boolean(ot->srna, "extend", 0, "Extend", ""); + RNA_def_int(ot->srna, "nr", 1, 0, 20, "Number", "The layer number to set, zero for all layers", 0, 20); + RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Add this layer to the current view layers"); } #if 0 @@ -1801,8 +1812,10 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event) ED_area_tag_redraw(sa); break; case B_NDOF: + ED_area_tag_redraw(sa); break; case B_MAN_MODE: + ED_area_tag_redraw(sa); break; case B_VIEW_BUTSEDIT: break; @@ -2076,7 +2089,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) } /* LAYERS */ - if(obedit==NULL && v3d->localview==0) { + if(obedit==NULL && v3d->localvd==NULL) { int ob_lay = ob ? ob->lay : 0; uiBlockBeginAlign(block); for(a=0; a<5; a++) { diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index 00b0b5c4fd1..e7ab79ab955 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -66,8 +66,8 @@ void view3d_keymap(struct wmWindowManager *wm); /* view3d_edit.c */ void VIEW3D_OT_zoom(struct wmOperatorType *ot); -void VIEW3D_OT_viewmove(struct wmOperatorType *ot); -void VIEW3D_OT_viewrotate(struct wmOperatorType *ot); +void VIEW3D_OT_move(struct wmOperatorType *ot); +void VIEW3D_OT_rotate(struct wmOperatorType *ot); void VIEW3D_OT_view_all(struct wmOperatorType *ot); void VIEW3D_OT_viewnumpad(struct wmOperatorType *ot); void VIEW3D_OT_view_center(struct wmOperatorType *ot); @@ -89,10 +89,13 @@ 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); + +void view3d_cached_text_draw_begin(void); +void view3d_cached_text_draw_add(float x, float y, float z, char *str, short xoffs); +void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, int depth_write, float mat[][4]); /* drawarmature.c */ -int draw_armature(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, int dt, int flag); +int draw_armature(Scene *scene, View3D *v3d, ARegion *ar, Base *base, int dt, int flag); /* drawmesh.c */ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, struct DerivedMesh *dm, int faceselect); @@ -121,6 +124,7 @@ void VIEW3D_OT_smoothview(struct wmOperatorType *ot); void VIEW3D_OT_setcameratoview(struct wmOperatorType *ot); void VIEW3D_OT_localview(struct wmOperatorType *ot); void VIEW3D_OT_game_start(struct wmOperatorType *ot); +void VIEW3D_OT_fly(struct wmOperatorType *ot); int boundbox_clip(RegionView3D *rv3d, float obmat[][4], struct BoundBox *bb); @@ -132,6 +136,11 @@ void smooth_view(struct bContext *C, Object *, Object *, float *ofs, float *quat void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect); /* rect: for picking */ void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d); +void fly_modal_keymap(struct wmWindowManager *wm); +void viewrotate_modal_keymap(struct wmWindowManager *wm); +void viewmove_modal_keymap(struct wmWindowManager *wm); +void viewzoom_modal_keymap(struct wmWindowManager *wm); + /* view3d_buttons.c */ void VIEW3D_OT_properties(struct wmOperatorType *ot); void view3d_buttons_register(struct ARegionType *art); @@ -157,7 +166,7 @@ ARegion *view3d_has_buttons_region(ScrArea *sa); ARegion *view3d_has_tools_region(ScrArea *sa); /* draw_volume.c */ -void draw_volume(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, struct Base *base, struct GPUTexture *tex, int res[3], float dx, struct GPUTexture *tex_shadow); +void draw_volume(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, struct Base *base, struct GPUTexture *tex, float *min, float *max, int res[3], float dx, struct GPUTexture *tex_shadow); #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 7da2e591b10..f9cedbd28a1 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -62,8 +62,8 @@ void view3d_operatortypes(void) { - WM_operatortype_append(VIEW3D_OT_viewrotate); - WM_operatortype_append(VIEW3D_OT_viewmove); + WM_operatortype_append(VIEW3D_OT_rotate); + WM_operatortype_append(VIEW3D_OT_move); WM_operatortype_append(VIEW3D_OT_zoom); WM_operatortype_append(VIEW3D_OT_view_all); WM_operatortype_append(VIEW3D_OT_viewnumpad); @@ -85,6 +85,7 @@ void view3d_operatortypes(void) WM_operatortype_append(VIEW3D_OT_drawtype); WM_operatortype_append(VIEW3D_OT_localview); WM_operatortype_append(VIEW3D_OT_game_start); + WM_operatortype_append(VIEW3D_OT_fly); WM_operatortype_append(VIEW3D_OT_layers); WM_operatortype_append(VIEW3D_OT_properties); @@ -103,44 +104,28 @@ void view3d_operatortypes(void) void view3d_keymap(wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "View3D Generic", SPACE_VIEW3D, 0); + wmKeyMap *keymap; wmKeymapItem *km; + keymap= WM_keymap_find(wm, "View3D Generic", SPACE_VIEW3D, 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); - - /* paint poll checks mode */ - WM_keymap_verify_item(keymap, "PAINT_OT_vertex_paint", LEFTMOUSE, KM_PRESS, 0, 0); - WM_keymap_verify_item(keymap, "PAINT_OT_weight_paint", LEFTMOUSE, KM_PRESS, 0, 0); - - WM_keymap_add_item(keymap, "PAINT_OT_image_paint", LEFTMOUSE, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "PAINT_OT_sample_color", RIGHTMOUSE, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "PAINT_OT_clone_cursor_set", LEFTMOUSE, KM_PRESS, KM_CTRL, 0); - - WM_keymap_add_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0); - - /* sketch poll checks mode */ - WM_keymap_add_item(keymap, "SKETCH_OT_gesture", ACTIONMOUSE, KM_PRESS, KM_SHIFT, 0); - WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", ACTIONMOUSE, KM_PRESS, 0, 0); - km = WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", ACTIONMOUSE, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(km->ptr, "snap", 1); - WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, 0, 0); - km = WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, KM_CTRL, 0); - RNA_boolean_set(km->ptr, "snap", 1); + keymap= WM_keymap_find(wm, "View3D", SPACE_VIEW3D, 0); WM_keymap_verify_item(keymap, "VIEW3D_OT_manipulator", LEFTMOUSE, KM_PRESS, 0, 0); /* manipulator always on left mouse, not on action mouse*/ WM_keymap_verify_item(keymap, "VIEW3D_OT_cursor3d", ACTIONMOUSE, KM_PRESS, 0, 0); - WM_keymap_verify_item(keymap, "VIEW3D_OT_viewrotate", MIDDLEMOUSE, KM_PRESS, 0, 0); - WM_keymap_verify_item(keymap, "VIEW3D_OT_viewmove", MIDDLEMOUSE, KM_PRESS, KM_SHIFT, 0); + WM_keymap_verify_item(keymap, "VIEW3D_OT_rotate", MIDDLEMOUSE, KM_PRESS, 0, 0); + WM_keymap_verify_item(keymap, "VIEW3D_OT_move", MIDDLEMOUSE, KM_PRESS, KM_SHIFT, 0); WM_keymap_verify_item(keymap, "VIEW3D_OT_zoom", MIDDLEMOUSE, KM_PRESS, KM_CTRL, 0); WM_keymap_verify_item(keymap, "VIEW3D_OT_view_center", PADPERIOD, KM_PRESS, 0, 0); + WM_keymap_verify_item(keymap, "VIEW3D_OT_fly", FKEY, KM_PRESS, KM_SHIFT, 0); + WM_keymap_verify_item(keymap, "VIEW3D_OT_smoothview", TIMER1, KM_ANY, KM_ANY, 0); RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_zoom", PADPLUSKEY, KM_PRESS, 0, 0)->ptr, "delta", 1); @@ -175,6 +160,7 @@ void view3d_keymap(wmWindowManager *wm) WM_keymap_add_item(keymap, "VIEW3D_OT_game_start", PKEY, KM_PRESS, 0, 0); /* layers, shift + alt are properties set in invoke() */ + RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", ACCENTGRAVEKEY, KM_PRESS, 0, 0)->ptr, "nr", 0); RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", ONEKEY, KM_PRESS, KM_ANY, 0)->ptr, "nr", 1); RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", TWOKEY, KM_PRESS, KM_ANY, 0)->ptr, "nr", 2); RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", THREEKEY, KM_PRESS, KM_ANY, 0)->ptr, "nr", 3); @@ -201,7 +187,25 @@ void view3d_keymap(wmWindowManager *wm) /* selection*/ WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1); + RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", TRUE); + RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0)->ptr, "center", TRUE); + RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "enumerate", TRUE); + + /* selection key-combinations */ + km = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL, 0); + RNA_boolean_set(km->ptr, "center", TRUE); + RNA_boolean_set(km->ptr, "extend", TRUE); + km = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT, 0); + RNA_boolean_set(km->ptr, "center", TRUE); + RNA_boolean_set(km->ptr, "enumerate", TRUE); + km = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0); + RNA_boolean_set(km->ptr, "extend", TRUE); + RNA_boolean_set(km->ptr, "enumerate", TRUE); + km = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL|KM_ALT, 0); + RNA_boolean_set(km->ptr, "center", TRUE); + RNA_boolean_set(km->ptr, "extend", TRUE); + RNA_boolean_set(km->ptr, "enumerate", TRUE); + WM_keymap_add_item(keymap, "VIEW3D_OT_select_border", BKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0); RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_SHIFT|KM_CTRL, 0)->ptr, "deselect", 1); @@ -214,20 +218,12 @@ void view3d_keymap(wmWindowManager *wm) WM_keymap_add_item(keymap, "VIEW3D_OT_camera_to_view", PAD0, KM_PRESS, KM_ALT|KM_CTRL, 0); WM_keymap_add_item(keymap, "VIEW3D_OT_snap_menu", SKEY, KM_PRESS, KM_SHIFT, 0); - - /* radial control */ - RNA_enum_set(WM_keymap_add_item(keymap, "SCULPT_OT_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE); - RNA_enum_set(WM_keymap_add_item(keymap, "SCULPT_OT_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH); - RNA_enum_set(WM_keymap_add_item(keymap, "SCULPT_OT_radial_control", FKEY, KM_PRESS, KM_CTRL, 0)->ptr, "mode", WM_RADIALCONTROL_ANGLE); - - RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_vertex_paint_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE); - RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_weight_paint_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE); - RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_texture_paint_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE); - RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_vertex_paint_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH); - 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); transform_keymap_for_space(wm, keymap, SPACE_VIEW3D); + fly_modal_keymap(wm); + viewrotate_modal_keymap(wm); + viewmove_modal_keymap(wm); + viewzoom_modal_keymap(wm); } diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index a7696d9fe31..a37e916064c 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -53,6 +53,7 @@ #include "BLI_blenlib.h" #include "BLI_editVert.h" #include "BLI_rand.h" +#include "BLI_linklist.h" #include "BKE_action.h" #include "BKE_context.h" @@ -845,56 +846,87 @@ static void deselectall_except(Scene *scene, Base *b) /* deselect all except b } } -static Base *mouse_select_menu(ViewContext *vc, unsigned int *buffer, int hits, short *mval) +static Base *mouse_select_menu(bContext *C, ViewContext *vc, unsigned int *buffer, int hits, short *mval, short extend) { - Scene *scene= vc->scene; - View3D *v3d= vc->v3d; - Base *baseList[SEL_MENU_SIZE]={NULL}; /*baseList is used to store all possible bases to bring up a menu */ - Base *base; short baseCount = 0; - char menuText[20 + SEL_MENU_SIZE*32] = "Select Object%t"; /* max ob name = 22 */ - char str[32]; - - for(base=FIRSTBASE; base; base= base->next) { - if (BASE_SELECTABLE(v3d, base)) { - baseList[baseCount] = NULL; - - /* two selection methods, the CTRL select uses max dist of 15 */ - if(buffer) { - int a; - for(a=0; a<hits; a++) { - /* index was converted */ - if(base->selcol==buffer[ (4 * a) + 3 ]) baseList[baseCount] = base; - } - } - else { - int temp, dist=15; - - project_short(vc->ar, base->object->obmat[3], &base->sx); - - temp= abs(base->sx -mval[0]) + abs(base->sy -mval[1]); - if(temp<dist ) baseList[baseCount] = base; + short ok; + LinkNode *linklist= NULL; + + CTX_DATA_BEGIN(C, Base*, base, selectable_bases) { + ok= FALSE; + + /* two selection methods, the CTRL select uses max dist of 15 */ + if(buffer) { + int a; + for(a=0; a<hits; a++) { + /* index was converted */ + if(base->selcol==buffer[ (4 * a) + 3 ]) + ok= TRUE; } + } + else { + int temp, dist=15; + + project_short(vc->ar, base->object->obmat[3], &base->sx); - if(baseList[baseCount]) { - if (baseCount < SEL_MENU_SIZE) { - baseList[baseCount] = base; - sprintf(str, "|%s %%x%d", base->object->id.name+2, baseCount+1); /* max ob name == 22 */ - strcat(menuText, str); - baseCount++; - } - } + temp= abs(base->sx -mval[0]) + abs(base->sy -mval[1]); + if(temp < dist) + ok= TRUE; + } + + if(ok) { + baseCount++; + BLI_linklist_prepend(&linklist, base); + + if (baseCount==SEL_MENU_SIZE) + break; } } + CTX_DATA_END; + + if(baseCount) - if(baseCount<=1) return baseList[0]; + + if(baseCount==0) { + return NULL; + } + if(baseCount == 1) { + Base *base= (Base *)linklist->link; + BLI_linklist_free(linklist, NULL); + return base; + } else { - baseCount = -1; // XXX = pupmenu(menuText); - - if (baseCount != -1) { /* If nothing is selected then dont do anything */ - return baseList[baseCount-1]; + /* UI */ + uiPopupMenu *pup= uiPupMenuBegin(C, "Select Object", 0); + uiLayout *layout= uiPupMenuLayout(pup); + uiLayout *split= uiLayoutSplit(layout, 0); + uiLayout *column= uiLayoutColumn(split, 0); + LinkNode *node; + + node= linklist; + while(node) { + Base *base=node->link; + Object *ob= base->object; + char *name= ob->id.name+2; + /* annoying!, since we need to set 2 props cant use this. */ + /* uiItemStringO(column, name, 0, "OBJECT_OT_select_name", "name", name); */ + + { + PointerRNA ptr; + + WM_operator_properties_create(&ptr, "OBJECT_OT_select_name"); + RNA_string_set(&ptr, "name", name); + RNA_boolean_set(&ptr, "extend", extend); + uiItemFullO(column, name, uiIconFromID((ID *)ob), "OBJECT_OT_select_name", ptr.data, WM_OP_EXEC_DEFAULT, 0); + } + + node= node->next; } - else return NULL; + + uiPupMenuEnd(C, pup); + + BLI_linklist_free(linklist, NULL); + return NULL; } } @@ -958,14 +990,13 @@ static short mixed_bones_object_selectbuffer(ViewContext *vc, unsigned int *buff /* mval is region coords */ -static void mouse_select(bContext *C, short *mval, short extend, short obcenter) +static void mouse_select(bContext *C, short *mval, short extend, short obcenter, short enumerate) { ViewContext vc; ARegion *ar= CTX_wm_region(C); View3D *v3d= CTX_wm_view3d(C); Scene *scene= CTX_data_scene(C); Base *base, *startbase=NULL, *basact=NULL, *oldbasact=NULL; - unsigned int buffer[4*MAXPICKBUF]; int temp, a, dist=100; short hits; @@ -981,10 +1012,9 @@ static void mouse_select(bContext *C, short *mval, short extend, short obcenter) if(vc.obedit==NULL && obcenter) { /* note; shift+alt goes to group-flush-selecting */ - /* XXX solve */ - if(0) - basact= mouse_select_menu(&vc, NULL, 0, mval); - else { + if(enumerate) { + basact= mouse_select_menu(C, &vc, NULL, 0, mval, extend); + } else { base= startbase; while(base) { if (BASE_SELECTABLE(v3d, base)) { @@ -1006,6 +1036,8 @@ static void mouse_select(bContext *C, short *mval, short extend, short obcenter) } } else { + unsigned int buffer[4*MAXPICKBUF]; + /* if objects have posemode set, the bones are in the same selection buffer */ hits= mixed_bones_object_selectbuffer(&vc, buffer, mval); @@ -1016,9 +1048,9 @@ static void mouse_select(bContext *C, short *mval, short extend, short obcenter) for(a=0; a<hits; a++) if(buffer[4*a+3] & 0xFFFF0000) has_bones= 1; /* note; shift+alt goes to group-flush-selecting */ - if(has_bones==0 && 0) - basact= mouse_select_menu(&vc, buffer, hits, mval); - else { + if(has_bones==0 && enumerate) { + basact= mouse_select_menu(C, &vc, buffer, hits, mval, extend); + } else { static short lastmval[2]={-100, -100}; int donearest= 0; @@ -1116,7 +1148,7 @@ static void mouse_select(bContext *C, short *mval, short extend, short obcenter) WM_event_add_notifier(C, NC_OBJECT|ND_BONE_ACTIVE, basact->object); /* in weightpaint, we use selected bone to select vertexgroup, so no switch to new active object */ - if(basact->object->mode & OB_MODE_WEIGHT_PAINT) { + if(BASACT && BASACT->object->mode & OB_MODE_WEIGHT_PAINT) { /* prevent activating */ basact= NULL; } @@ -1560,7 +1592,7 @@ void VIEW3D_OT_select_border(wmOperatorType *ot) RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX); RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX); - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everyting first."); + RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first."); } /* ****** Mouse Select ****** */ @@ -1571,6 +1603,8 @@ static int view3d_select_invoke(bContext *C, wmOperator *op, wmEvent *event) Object *obedit= CTX_data_edit_object(C); Object *obact= CTX_data_active_object(C); short extend= RNA_boolean_get(op->ptr, "extend"); + short center= RNA_boolean_get(op->ptr, "center"); + short enumerate= RNA_boolean_get(op->ptr, "enumerate"); view3d_operator_needs_opengl(C); @@ -1590,7 +1624,7 @@ static int view3d_select_invoke(bContext *C, wmOperator *op, wmEvent *event) else if(obact && obact->mode & OB_MODE_PARTICLE_EDIT) PE_mouse_particles(C, event->mval, extend); else - mouse_select(C, event->mval, extend, 0); + mouse_select(C, event->mval, extend, center, enumerate); /* allowing tweaks */ return OPERATOR_PASS_THROUGH|OPERATOR_FINISHED; @@ -1611,7 +1645,9 @@ void VIEW3D_OT_select(wmOperatorType *ot) ot->flag= OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everyting first."); + RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first."); + RNA_def_boolean(ot->srna, "center", 0, "Center", "Use the object center when selecting (object mode only)."); + RNA_def_boolean(ot->srna, "enumerate", 0, "Enumerate", "List objects under the mouse (object mode only)."); } diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index b4b54cd1d88..767f18649fa 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -1122,13 +1122,13 @@ static int snap_menu_invoke(bContext *C, wmOperator *unused, wmEvent *event) uiPopupMenu *pup= uiPupMenuBegin(C, "Snap", 0); uiLayout *layout= uiPupMenuLayout(pup); - 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"); + uiItemO(layout, "Selected to Grid", 0, "VIEW3D_OT_snap_selected_to_grid"); + uiItemO(layout, "Selected to Cursor", 0, "VIEW3D_OT_snap_selected_to_cursor"); + uiItemO(layout, "Selected to Center", 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"); + uiItemO(layout, "Cursor to Selected", 0, "VIEW3D_OT_snap_cursor_to_selected"); + uiItemO(layout, "Cursor to Grid", 0, "VIEW3D_OT_snap_cursor_to_grid"); + uiItemO(layout, "Cursor to Active", 0, "VIEW3D_OT_snap_cursor_to_active"); uiPupMenuEnd(C, pup); diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index 58248f675da..e1c6f70bde0 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -163,7 +163,7 @@ static void view3d_panel_operator_redo(const bContext *C, Panel *pa) if(op==NULL) return; - if(op->type->poll && op->type->poll((bContext *)C)==0) + if(WM_operator_poll((bContext*)C, op->type) == 0) return; block= uiLayoutGetBlock(pa->layout); @@ -208,7 +208,7 @@ static void operator_search_cb(const struct bContext *C, void *arg, char *str, u for(; ot; ot= ot->next) { if(BLI_strcasestr(ot->name, str)) { - if(ot->poll==NULL || ot->poll((bContext *)C)) { + if(WM_operator_poll((bContext*)C, ot)) { if(0==uiSearchItemAdd(items, ot->name, ot, 0)) break; @@ -309,13 +309,9 @@ 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); - } + if(ar) + ED_region_toggle_hidden(C, ar); + return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 7831d604ddf..f722a97963d 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -56,9 +56,11 @@ #include "BKE_object.h" #include "BKE_global.h" #include "BKE_main.h" +#include "BKE_report.h" #include "BKE_scene.h" #include "BKE_screen.h" #include "BKE_utildefines.h" +#include "BKE_depsgraph.h" /* for fly mode updating */ #include "RE_pipeline.h" // make_stars @@ -110,7 +112,7 @@ void view3d_operator_needs_opengl(const bContext *C) float *give_cursor(Scene *scene, View3D *v3d) { - if(v3d && v3d->localview) return v3d->cursor; + if(v3d && v3d->localvd) return v3d->cursor; else return scene->cursor; } @@ -384,26 +386,31 @@ void VIEW3D_OT_smoothview(wmOperatorType *ot) ot->poll= ED_operator_view3d_active; } -static int view3d_setcameratoview_exec(bContext *C, wmOperator *op) +static void setcameratoview3d(View3D *v3d, RegionView3D *rv3d, Object *ob) { - View3D *v3d = CTX_wm_view3d(C); - RegionView3D *rv3d= CTX_wm_region_view3d(C); - Object *ob; float dvec[3]; - ob= v3d->camera; dvec[0]= rv3d->dist*rv3d->viewinv[2][0]; dvec[1]= rv3d->dist*rv3d->viewinv[2][1]; dvec[2]= rv3d->dist*rv3d->viewinv[2][2]; VECCOPY(ob->loc, dvec); - VecSubf(ob->loc, ob->loc, v3d->ofs); + VecSubf(ob->loc, ob->loc, rv3d->ofs); rv3d->viewquat[0]= -rv3d->viewquat[0]; QuatToEul(rv3d->viewquat, ob->rot); rv3d->viewquat[0]= -rv3d->viewquat[0]; ob->recalc= OB_RECALC_OB; +} + + +static int view3d_setcameratoview_exec(bContext *C, wmOperator *op) +{ + View3D *v3d = CTX_wm_view3d(C); + RegionView3D *rv3d= CTX_wm_region_view3d(C); + + setcameratoview3d(v3d, rv3d, v3d->camera); WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, CTX_data_scene(C)); @@ -1303,7 +1310,6 @@ static void initlocalview(Scene *scene, ScrArea *sa) base->object->lay= base->lay; } } - v3d->localview= 0; } } @@ -1325,7 +1331,6 @@ static void restore_localviewdata(ScrArea *sa, int free) if(free) { MEM_freeN(v3d->localvd); v3d->localvd= NULL; - v3d->localview= 0; } for(ar= sa->regionbase.first; ar; ar= ar->next) { @@ -1416,8 +1421,6 @@ static void SaveState(bContext *C) glPushAttrib(GL_ALL_ATTRIB_BITS); - GPU_state_init(); - if(obact && obact->mode & OB_MODE_TEXTURE_PAINT) GPU_paint_set_mipmap(1); @@ -1446,6 +1449,8 @@ static void RestoreState(bContext *C) win->queue= queue_back; + GPU_state_init(); + glPopAttrib(); } @@ -1574,6 +1579,802 @@ void VIEW3D_OT_game_start(wmOperatorType *ot) ot->poll= game_engine_poll; } + +/* NOTE: these defines are saved in keymap files, do not change values but just add new ones */ +#define FLY_MODAL_CANCEL 1 +#define FLY_MODAL_CONFIRM 2 +#define FLY_MODAL_ACCELERATE 3 +#define FLY_MODAL_DECELERATE 4 +#define FLY_MODAL_PAN_ENABLE 5 +#define FLY_MODAL_PAN_DISABLE 6 +#define FLY_MODAL_DIR_FORWARD 7 +#define FLY_MODAL_DIR_BACKWARD 8 +#define FLY_MODAL_DIR_LEFT 9 +#define FLY_MODAL_DIR_RIGHT 10 +#define FLY_MODAL_DIR_UP 11 +#define FLY_MODAL_DIR_DOWN 12 +#define FLY_MODAL_AXIS_LOCK_X 13 +#define FLY_MODAL_AXIS_LOCK_Z 14 +#define FLY_MODAL_PRECISION_ENABLE 15 +#define FLY_MODAL_PRECISION_DISABLE 16 + +/* called in transform_ops.c, on each regeneration of keymaps */ +void fly_modal_keymap(wmWindowManager *wm) +{ + static EnumPropertyItem modal_items[] = { + {FLY_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""}, + {FLY_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""}, + {FLY_MODAL_ACCELERATE, "ACCELERATE", 0, "Accelerate", ""}, + {FLY_MODAL_DECELERATE, "DECELERATE", 0, "Decelerate", ""}, + + {FLY_MODAL_PAN_ENABLE, "PAN_ENABLE", 0, "Pan Enable", ""}, + {FLY_MODAL_PAN_DISABLE, "PAN_DISABLE", 0, "Pan Disable", ""}, + + {FLY_MODAL_DIR_FORWARD, "FORWARD", 0, "Fly Forward", ""}, + {FLY_MODAL_DIR_BACKWARD,"BACKWARD", 0, "Fly Backward", ""}, + {FLY_MODAL_DIR_LEFT, "LEFT", 0, "Fly Left", ""}, + {FLY_MODAL_DIR_RIGHT, "RIGHT", 0, "Fly Right", ""}, + {FLY_MODAL_DIR_UP, "UP", 0, "Fly Up", ""}, + {FLY_MODAL_DIR_DOWN, "DOWN", 0, "Fly Down", ""}, + + {FLY_MODAL_AXIS_LOCK_X, "AXIS_LOCK_X", 0, "X Axis Correction", "X axis correction (toggle)"}, + {FLY_MODAL_AXIS_LOCK_Z, "AXIS_LOCK_Z", 0, "X Axis Correction", "Z axis correction (toggle)"}, + + {FLY_MODAL_PRECISION_ENABLE, "PRECISION_ENABLE", 0, "Precision Enable", ""}, + {FLY_MODAL_PRECISION_DISABLE, "PRECISION_DISABLE", 0, "Precision Disable", ""}, + + {0, NULL, 0, NULL, NULL}}; + + wmKeyMap *keymap= WM_modalkeymap_get(wm, "View3D Fly Modal"); + + /* this function is called for each spacetype, only needs to add map once */ + if(keymap) return; + + keymap= WM_modalkeymap_add(wm, "View3D Fly Modal", modal_items); + + /* items for modal map */ + WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, FLY_MODAL_CANCEL); + WM_modalkeymap_add_item(keymap, RIGHTMOUSE, KM_ANY, KM_ANY, 0, FLY_MODAL_CANCEL); + + WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_ANY, KM_ANY, 0, FLY_MODAL_CONFIRM); + WM_modalkeymap_add_item(keymap, RETKEY, KM_PRESS, KM_ANY, 0, FLY_MODAL_CONFIRM); + WM_modalkeymap_add_item(keymap, PADENTER, KM_PRESS, KM_ANY, 0, FLY_MODAL_CONFIRM); + + WM_modalkeymap_add_item(keymap, PADPLUSKEY, KM_PRESS, 0, 0, FLY_MODAL_ACCELERATE); + WM_modalkeymap_add_item(keymap, PADMINUS, KM_PRESS, 0, 0, FLY_MODAL_DECELERATE); + WM_modalkeymap_add_item(keymap, WHEELUPMOUSE, KM_PRESS, 0, 0, FLY_MODAL_ACCELERATE); + WM_modalkeymap_add_item(keymap, WHEELDOWNMOUSE, KM_PRESS, 0, 0, FLY_MODAL_DECELERATE); + + WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_PRESS, KM_ANY, 0, FLY_MODAL_PAN_ENABLE); + WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, FLY_MODAL_PAN_DISABLE); /* XXX - Bug in the event system, middle mouse release doesnt work */ + + /* WASD */ + WM_modalkeymap_add_item(keymap, WKEY, KM_PRESS, 0, 0, FLY_MODAL_DIR_FORWARD); + WM_modalkeymap_add_item(keymap, SKEY, KM_PRESS, 0, 0, FLY_MODAL_DIR_BACKWARD); + WM_modalkeymap_add_item(keymap, AKEY, KM_PRESS, 0, 0, FLY_MODAL_DIR_LEFT); + WM_modalkeymap_add_item(keymap, DKEY, KM_PRESS, 0, 0, FLY_MODAL_DIR_RIGHT); + WM_modalkeymap_add_item(keymap, RKEY, KM_PRESS, 0, 0, FLY_MODAL_DIR_UP); + WM_modalkeymap_add_item(keymap, FKEY, KM_PRESS, 0, 0, FLY_MODAL_DIR_DOWN); + + WM_modalkeymap_add_item(keymap, XKEY, KM_PRESS, 0, 0, FLY_MODAL_AXIS_LOCK_X); + WM_modalkeymap_add_item(keymap, ZKEY, KM_PRESS, 0, 0, FLY_MODAL_AXIS_LOCK_Z); + + WM_modalkeymap_add_item(keymap, LEFTSHIFTKEY, KM_PRESS, KM_ANY, 0, FLY_MODAL_PRECISION_ENABLE); + WM_modalkeymap_add_item(keymap, LEFTSHIFTKEY, KM_RELEASE, KM_ANY, 0, FLY_MODAL_PRECISION_DISABLE); + + /* assign map to operators */ + WM_modalkeymap_assign(keymap, "VIEW3D_OT_fly"); + +} + +typedef struct FlyInfo { + /* context stuff */ + RegionView3D *rv3d; + View3D *v3d; + ARegion *ar; + Scene *scene; + + wmTimer *timer; /* needed for redraws */ + + short state; + short use_precision; + short redraw; + short mval[2]; + + /* fly state state */ + float speed; /* the speed the view is moving per redraw */ + short axis; /* Axis index to move allong by default Z to move allong the view */ + short pan_view; /* when true, pan the view instead of rotating */ + + /* relative view axis locking - xlock, zlock + 0; disabled + 1; enabled but not checking because mouse hasnt moved outside the margin since locking was checked an not needed + when the mouse moves, locking is set to 2 so checks are done. + 2; mouse moved and checking needed, if no view altering is donem its changed back to 1 */ + short xlock, zlock; + float xlock_momentum, zlock_momentum; /* nicer dynamics */ + float grid; /* world scale 1.0 default */ + + /* backup values */ + float dist_backup; /* backup the views distance since we use a zero dist for fly mode */ + float ofs_backup[3]; /* backup the views offset incase the user cancels flying in non camera mode */ + float rot_backup[4]; /* backup the views quat incase the user cancels flying in non camera mode. (quat for view, eul for camera) */ + short persp_backup; /* remember if were ortho or not, only used for restoring the view if it was a ortho view */ + + /* compare between last state */ + double time_lastwheel; /* used to accelerate when using the mousewheel a lot */ + double time_lastdraw; /* time between draws */ + + /* use for some lag */ + float dvec_prev[3]; /* old for some lag */ + +} FlyInfo; + +/* FlyInfo->state */ +#define FLY_RUNNING 0 +#define FLY_CANCEL 1 +#define FLY_CONFIRM 2 + +int initFlyInfo (bContext *C, FlyInfo *fly, wmOperator *op, wmEvent *event) +{ + float upvec[3]; // tmp + float mat[3][3]; + + fly->rv3d= CTX_wm_region_view3d(C); + fly->v3d = CTX_wm_view3d(C); + fly->ar = CTX_wm_region(C); + fly->scene= CTX_data_scene(C); + + if(fly->rv3d->persp==V3D_CAMOB && fly->v3d->camera->id.lib) { + BKE_report(op->reports, RPT_ERROR, "Cannot fly a camera from an external library"); + return FALSE; + } + + if(fly->v3d->ob_centre) { + BKE_report(op->reports, RPT_ERROR, "Cannot fly when the view is locked to an object"); + return FALSE; + } + + if(fly->rv3d->persp==V3D_CAMOB && fly->v3d->camera->constraints.first) { + BKE_report(op->reports, RPT_ERROR, "Cannot fly an object with constraints"); + return FALSE; + } + + fly->state= FLY_RUNNING; + fly->speed= 0.0f; + fly->axis= 2; + fly->pan_view= FALSE; + fly->xlock= FALSE; + fly->zlock= TRUE; + fly->xlock_momentum=0.0f; + fly->zlock_momentum=0.0f; + fly->grid= 1.0f; + fly->use_precision= 0; + + fly->dvec_prev[0]= fly->dvec_prev[1]= fly->dvec_prev[2]= 0.0f; + + fly->timer= WM_event_add_window_timer(CTX_wm_window(C), TIMER, 0.01f); + + + /* we have to rely on events to give proper mousecoords after a warp_pointer */ +//XXX2.5 warp_pointer(cent_orig[0], cent_orig[1]); + //fly->mval[0]= (fly->sa->winx)/2; + //fly->mval[1]= (fly->sa->winy)/2; + + fly->mval[0] = event->x - fly->ar->winrct.xmin; + fly->mval[1] = event->y - fly->ar->winrct.ymin; + + + fly->time_lastdraw= fly->time_lastwheel= PIL_check_seconds_timer(); + + fly->rv3d->rflag |= RV3D_FLYMODE; /* so we draw the corner margins */ + + /* detect weather to start with Z locking */ + upvec[0]=1.0f; upvec[1]=0.0f; upvec[2]=0.0f; + Mat3CpyMat4(mat, fly->rv3d->viewinv); + Mat3MulVecfl(mat, upvec); + if (fabs(upvec[2]) < 0.1) + fly->zlock = 1; + upvec[0]=0; upvec[1]=0; upvec[2]=0; + + fly->persp_backup= fly->rv3d->persp; + fly->dist_backup= fly->rv3d->dist; + if (fly->rv3d->persp==V3D_CAMOB) { + /* store the origoinal camera loc and rot */ + VECCOPY(fly->ofs_backup, fly->v3d->camera->loc); + VECCOPY(fly->rot_backup, fly->v3d->camera->rot); + + where_is_object(fly->scene, fly->v3d->camera); + VECCOPY(fly->rv3d->ofs, fly->v3d->camera->obmat[3]); + VecMulf(fly->rv3d->ofs, -1.0f); /*flip the vector*/ + + fly->rv3d->dist=0.0; + fly->rv3d->viewbut=0; + + /* used for recording */ +//XXX2.5 if(v3d->camera->ipoflag & OB_ACTION_OB) +//XXX2.5 actname= "Object"; + + } else { + /* perspective or ortho */ + if (fly->rv3d->persp==V3D_ORTHO) + fly->rv3d->persp= V3D_PERSP; /*if ortho projection, make perspective */ + QUATCOPY(fly->rot_backup, fly->rv3d->viewquat); + VECCOPY(fly->ofs_backup, fly->rv3d->ofs); + fly->rv3d->dist= 0.0; + + upvec[2]= fly->dist_backup; /*x and y are 0*/ + Mat3MulVecfl(mat, upvec); + VecSubf(fly->rv3d->ofs, fly->rv3d->ofs, upvec); + /*Done with correcting for the dist*/ + } + + return 1; +} + +static int flyEnd(bContext *C, FlyInfo *fly) +{ + RegionView3D *rv3d= fly->rv3d; + View3D *v3d = fly->v3d; + + float upvec[3]; + + if(fly->state == FLY_RUNNING) + return OPERATOR_RUNNING_MODAL; + + WM_event_remove_window_timer(CTX_wm_window(C), fly->timer); + + rv3d->dist= fly->dist_backup; + + if (fly->state == FLY_CANCEL) { + /* Revert to original view? */ + if (fly->persp_backup==V3D_CAMOB) { /* a camera view */ + rv3d->viewbut=1; + VECCOPY(v3d->camera->loc, fly->ofs_backup); + VECCOPY(v3d->camera->rot, fly->rot_backup); + DAG_id_flush_update(&v3d->camera->id, OB_RECALC_OB); + } else { + /* Non Camera we need to reset the view back to the original location bacause the user canceled*/ + QUATCOPY(rv3d->viewquat, fly->rot_backup); + VECCOPY(rv3d->ofs, fly->ofs_backup); + rv3d->persp= fly->persp_backup; + } + } + else if (fly->persp_backup==V3D_CAMOB) { /* camera */ + float mat3[3][3]; + Mat3CpyMat4(mat3, v3d->camera->obmat); + Mat3ToCompatibleEul(mat3, v3d->camera->rot, fly->rot_backup); + + DAG_id_flush_update(&v3d->camera->id, OB_RECALC_OB); +#if 0 //XXX2.5 + if (IS_AUTOKEY_MODE(NORMAL)) { + allqueue(REDRAWIPO, 0); + allspace(REMAKEIPO, 0); + allqueue(REDRAWNLA, 0); + allqueue(REDRAWTIME, 0); + } +#endif + } + else { /* not camera */ + /* Apply the fly mode view */ + /*restore the dist*/ + float mat[3][3]; + upvec[0]= upvec[1]= 0; + upvec[2]= fly->dist_backup; /*x and y are 0*/ + Mat3CpyMat4(mat, rv3d->viewinv); + Mat3MulVecfl(mat, upvec); + VecAddf(rv3d->ofs, rv3d->ofs, upvec); + /*Done with correcting for the dist */ + } + + rv3d->rflag &= ~RV3D_FLYMODE; +//XXX2.5 BIF_view3d_previewrender_signal(fly->sa, PR_DBASE|PR_DISPRECT); /* not working at the moment not sure why */ + + + if(fly->state == FLY_CONFIRM) { + MEM_freeN(fly); + return OPERATOR_FINISHED; + } + + MEM_freeN(fly); + return OPERATOR_CANCELLED; +} + +void flyEvent(FlyInfo *fly, wmEvent *event) +{ + if (event->type == TIMER) { + fly->redraw = 1; + } + else if (event->type == MOUSEMOVE) { + fly->mval[0] = event->x - fly->ar->winrct.xmin; + fly->mval[1] = event->y - fly->ar->winrct.ymin; + } /* handle modal keymap first */ + else if (event->type == EVT_MODAL_MAP) { + switch (event->val) { + case FLY_MODAL_CANCEL: + fly->state = FLY_CANCEL; + break; + case FLY_MODAL_CONFIRM: + fly->state = FLY_CONFIRM; + break; + + case FLY_MODAL_ACCELERATE: + { + double time_currwheel; + float time_wheel; + + time_currwheel= PIL_check_seconds_timer(); + time_wheel = (float)(time_currwheel - fly->time_lastwheel); + fly->time_lastwheel = time_currwheel; + /*printf("Wheel %f\n", time_wheel);*/ + /*Mouse wheel delays range from 0.5==slow to 0.01==fast*/ + time_wheel = 1+ (10 - (20*MIN2(time_wheel, 0.5))); /* 0-0.5 -> 0-5.0 */ + + if (fly->speed<0.0f) fly->speed= 0.0f; + else { + if (event->shift) + fly->speed+= fly->grid*time_wheel*0.1; + else + fly->speed+= fly->grid*time_wheel; + } + break; + } + case FLY_MODAL_DECELERATE: + { + double time_currwheel; + float time_wheel; + + time_currwheel= PIL_check_seconds_timer(); + time_wheel = (float)(time_currwheel - fly->time_lastwheel); + fly->time_lastwheel = time_currwheel; + time_wheel = 1+ (10 - (20*MIN2(time_wheel, 0.5))); /* 0-0.5 -> 0-5.0 */ + + if (fly->speed>0) fly->speed=0; + else { + if (event->shift) + fly->speed-= fly->grid*time_wheel*0.1; + else + fly->speed-= fly->grid*time_wheel; + } + break; + } + case FLY_MODAL_PAN_ENABLE: + fly->pan_view= TRUE; + break; + case FLY_MODAL_PAN_DISABLE: +//XXX2.5 warp_pointer(cent_orig[0], cent_orig[1]); + fly->pan_view= FALSE; + break; + + /* impliment WASD keys */ + case FLY_MODAL_DIR_FORWARD: + if (fly->speed < 0.0f) fly->speed= -fly->speed; /* flip speed rather then stopping, game like motion */ + else fly->speed += fly->grid; /* increse like mousewheel if were alredy moving in that difection*/ + fly->axis= 2; + break; + case FLY_MODAL_DIR_BACKWARD: + if (fly->speed>0) fly->speed= -fly->speed; + else fly->speed -= fly->grid; + fly->axis= 2; + break; + case FLY_MODAL_DIR_LEFT: + if (fly->speed < 0.0f) fly->speed= -fly->speed; + fly->axis= 0; + break; + case FLY_MODAL_DIR_RIGHT: + if (fly->speed > 0.0f) fly->speed= -fly->speed; + fly->axis= 0; + break; + + case FLY_MODAL_DIR_UP: + if (fly->speed < 0.0f) fly->speed= -fly->speed; + fly->axis= 1; + break; + + case FLY_MODAL_DIR_DOWN: + if (fly->speed > 0.0f) fly->speed= -fly->speed; + fly->axis= 1; + break; + + case FLY_MODAL_AXIS_LOCK_X: + if (fly->xlock) fly->xlock=0; + else { + fly->xlock = 2; + fly->xlock_momentum = 0.0; + } + break; + case FLY_MODAL_AXIS_LOCK_Z: + if (fly->zlock) fly->zlock=0; + else { + fly->zlock = 2; + fly->zlock_momentum = 0.0; + } + break; + + case FLY_MODAL_PRECISION_ENABLE: + fly->use_precision= TRUE; + break; + case FLY_MODAL_PRECISION_DISABLE: + fly->use_precision= FALSE; + break; + + } + } +} + +//int fly_exec(bContext *C, wmOperator *op) +int flyApply(FlyInfo *fly) +{ + /* + fly mode - Shift+F + a fly loop where the user can move move the view as if they are flying + */ + RegionView3D *rv3d= fly->rv3d; + View3D *v3d = fly->v3d; + ARegion *ar = fly->ar; + Scene *scene= fly->scene; + + float mat[3][3], /* 3x3 copy of the view matrix so we can move allong the view axis */ + dvec[3]={0,0,0}, /* this is the direction thast added to the view offset per redraw */ + + /* Camera Uprighting variables */ + upvec[3]={0,0,0}, /* stores the view's up vector */ + + moffset[2], /* mouse offset from the views center */ + tmp_quat[4]; /* used for rotating the view */ + + int cent_orig[2], /* view center */ +//XXX- can avoid using // cent[2], /* view center modified */ + xmargin, ymargin; /* x and y margin are define the safe area where the mouses movement wont rotate the view */ + unsigned char + apply_rotation= 1; /* if the user presses shift they can look about without movinf the direction there looking*/ + + /* for recording */ +#if 0 //XXX2.5 todo, get animation recording working again. + int playing_anim = 0; //XXX has_screenhandler(G.curscreen, SCREEN_HANDLER_ANIM); + int cfra = -1; /*so the first frame always has a key added */ + char *actname=""; +#endif + /* the dist defines a vector that is infront of the offset + to rotate the view about. + this is no good for fly mode because we + want to rotate about the viewers center. + but to correct the dist removal we must + alter offset so the view doesn't jump. */ + + xmargin= ar->winx/20.0f; + ymargin= ar->winy/20.0f; + + cent_orig[0]= ar->winrct.xmin + ar->winx/2; + cent_orig[1]= ar->winrct.ymin + ar->winy/2; + + { + + /* mouse offset from the center */ + moffset[0]= fly->mval[0]- ar->winx/2; + moffset[1]= fly->mval[1]- ar->winy/2; + + /* enforce a view margin */ + if (moffset[0]>xmargin) moffset[0]-=xmargin; + else if (moffset[0] < -xmargin) moffset[0]+=xmargin; + else moffset[0]=0; + + if (moffset[1]>ymargin) moffset[1]-=ymargin; + else if (moffset[1] < -ymargin) moffset[1]+=ymargin; + else moffset[1]=0; + + + /* scale the mouse movement by this value - scales mouse movement to the view size + * moffset[0]/(ar->winx-xmargin*2) - window size minus margin (same for y) + * + * the mouse moves isnt linear */ + + if(moffset[0]) { + moffset[0] /= ar->winx - (xmargin*2); + moffset[0] *= fabs(moffset[0]); + } + + if(moffset[1]) { + moffset[1] /= ar->winy - (ymargin*2); + moffset[1] *= fabs(moffset[1]); + } + + /* Should we redraw? */ + if(fly->speed != 0.0f || moffset[0] || moffset[1] || fly->zlock || fly->xlock || dvec[0] || dvec[1] || dvec[2] ) { + float dvec_tmp[3]; + double time_current, time_redraw; /*time how fast it takes for us to redraw, this is so simple scenes dont fly too fast */ + float time_redraw_clamped; + + time_current= PIL_check_seconds_timer(); + time_redraw= (float)(time_current - fly->time_lastdraw); + time_redraw_clamped= MIN2(0.05f, time_redraw); /* clamt the redraw time to avoid jitter in roll correction */ + fly->time_lastdraw= time_current; + /*fprintf(stderr, "%f\n", time_redraw);*/ /* 0.002 is a small redraw 0.02 is larger */ + + /* Scale the time to use shift to scale the speed down- just like + shift slows many other areas of blender down */ + if (fly->use_precision) + fly->speed= fly->speed * (1.0f-time_redraw_clamped); + + Mat3CpyMat4(mat, rv3d->viewinv); + + if (fly->pan_view==TRUE) { + /* pan only */ + dvec_tmp[0]= -moffset[0]; + dvec_tmp[1]= -moffset[1]; + dvec_tmp[2]= 0; + + if (fly->use_precision) { + dvec_tmp[0] *= 0.1; + dvec_tmp[1] *= 0.1; + } + + Mat3MulVecfl(mat, dvec_tmp); + VecMulf(dvec_tmp, time_redraw*200.0 * fly->grid); + + } else { + float roll; /* similar to the angle between the camera's up and the Z-up, but its very rough so just roll*/ + + /* rotate about the X axis- look up/down */ + if (moffset[1]) { + upvec[0]=1; + upvec[1]=0; + upvec[2]=0; + Mat3MulVecfl(mat, upvec); + VecRotToQuat( upvec, (float)moffset[1]*-time_redraw*20, tmp_quat); /* Rotate about the relative up vec */ + QuatMul(rv3d->viewquat, rv3d->viewquat, tmp_quat); + + if (fly->xlock) fly->xlock = 2; /*check for rotation*/ + if (fly->zlock) fly->zlock = 2; + fly->xlock_momentum= 0.0f; + } + + /* rotate about the Y axis- look left/right */ + if (moffset[0]) { + + /* if we're upside down invert the moffset */ + upvec[0]=0; + upvec[1]=1; + upvec[2]=0; + Mat3MulVecfl(mat, upvec); + + if(upvec[2] < 0.0f) + moffset[0]= -moffset[0]; + + /* make the lock vectors */ + if (fly->zlock) { + upvec[0]=0; + upvec[1]=0; + upvec[2]=1; + } else { + upvec[0]=0; + upvec[1]=1; + upvec[2]=0; + Mat3MulVecfl(mat, upvec); + } + + VecRotToQuat( upvec, (float)moffset[0]*time_redraw*20, tmp_quat); /* Rotate about the relative up vec */ + QuatMul(rv3d->viewquat, rv3d->viewquat, tmp_quat); + + if (fly->xlock) fly->xlock = 2;/*check for rotation*/ + if (fly->zlock) fly->zlock = 2; + } + + if (fly->zlock==2) { + upvec[0]=1; + upvec[1]=0; + upvec[2]=0; + Mat3MulVecfl(mat, upvec); + + /*make sure we have some z rolling*/ + if (fabs(upvec[2]) > 0.00001f) { + roll= upvec[2]*5; + upvec[0]=0; /*rotate the view about this axis*/ + upvec[1]=0; + upvec[2]=1; + + Mat3MulVecfl(mat, upvec); + VecRotToQuat( upvec, roll*time_redraw_clamped*fly->zlock_momentum*0.1, tmp_quat); /* Rotate about the relative up vec */ + QuatMul(rv3d->viewquat, rv3d->viewquat, tmp_quat); + + fly->zlock_momentum += 0.05f; + } else { + fly->zlock=1; /* dont check until the view rotates again */ + fly->zlock_momentum= 0.0f; + } + } + + if (fly->xlock==2 && moffset[1]==0) { /*only apply xcorrect when mouse isnt applying x rot*/ + upvec[0]=0; + upvec[1]=0; + upvec[2]=1; + Mat3MulVecfl(mat, upvec); + /*make sure we have some z rolling*/ + if (fabs(upvec[2]) > 0.00001) { + roll= upvec[2] * -5; + + upvec[0]= 1.0f; /*rotate the view about this axis*/ + upvec[1]= 0.0f; + upvec[2]= 0.0f; + + Mat3MulVecfl(mat, upvec); + + VecRotToQuat( upvec, roll*time_redraw_clamped*fly->xlock_momentum*0.1f, tmp_quat); /* Rotate about the relative up vec */ + QuatMul(rv3d->viewquat, rv3d->viewquat, tmp_quat); + + fly->xlock_momentum += 0.05f; + } else { + fly->xlock=1; /* see above */ + fly->xlock_momentum= 0.0f; + } + } + + + if (apply_rotation) { + /* Normal operation */ + /* define dvec, view direction vector */ + dvec_tmp[0]= dvec_tmp[1]= dvec_tmp[2]= 0.0f; + /* move along the current axis */ + dvec_tmp[fly->axis]= 1.0f; + + Mat3MulVecfl(mat, dvec_tmp); + + VecMulf(dvec_tmp, fly->speed * time_redraw * 0.25f); + } + } + + /* impose a directional lag */ + VecLerpf(dvec, dvec_tmp, fly->dvec_prev, (1.0f/(1.0f+(time_redraw*5.0f)))); + + if (rv3d->persp==V3D_CAMOB) { + if (v3d->camera->protectflag & OB_LOCK_LOCX) + dvec[0] = 0.0; + if (v3d->camera->protectflag & OB_LOCK_LOCY) + dvec[1] = 0.0; + if (v3d->camera->protectflag & OB_LOCK_LOCZ) + dvec[2] = 0.0; + } + + VecAddf(rv3d->ofs, rv3d->ofs, dvec); +#if 0 //XXX2.5 + if (fly->zlock && fly->xlock) + headerprint("FlyKeys Speed:(+/- | Wheel), Upright Axis:X on/Z on, Slow:Shift, Direction:WASDRF, Ok:LMB, Pan:MMB, Cancel:RMB"); + else if (fly->zlock) + headerprint("FlyKeys Speed:(+/- | Wheel), Upright Axis:X off/Z on, Slow:Shift, Direction:WASDRF, Ok:LMB, Pan:MMB, Cancel:RMB"); + else if (fly->xlock) + headerprint("FlyKeys Speed:(+/- | Wheel), Upright Axis:X on/Z off, Slow:Shift, Direction:WASDRF, Ok:LMB, Pan:MMB, Cancel:RMB"); + else + headerprint("FlyKeys Speed:(+/- | Wheel), Upright Axis:X off/Z off, Slow:Shift, Direction:WASDRF, Ok:LMB, Pan:MMB, Cancel:RMB"); +#endif + +//XXX2.5 do_screenhandlers(G.curscreen); /* advance the next frame */ + + /* we are in camera view so apply the view ofs and quat to the view matrix and set the camera to the view */ + if (rv3d->persp==V3D_CAMOB) { + rv3d->persp= V3D_PERSP; /*set this so setviewmatrixview3d uses the ofs and quat instead of the camera */ + setviewmatrixview3d(scene, v3d, rv3d); + + setcameratoview3d(v3d, rv3d, v3d->camera); + + { //XXX - some reason setcameratoview3d doesnt copy, shouldnt not be needed! + VECCOPY(v3d->camera->loc, rv3d->ofs); + VecNegf(v3d->camera->loc); + } + + rv3d->persp= V3D_CAMOB; +#if 0 //XXX2.5 + /* record the motion */ + if (IS_AUTOKEY_MODE(NORMAL) && (!playing_anim || cfra != G.scene->r.cfra)) { + cfra = G.scene->r.cfra; + + if (fly->xlock || fly->zlock || moffset[0] || moffset[1]) { + insertkey(&v3d->camera->id, ID_OB, actname, NULL, OB_ROT_X, 0); + insertkey(&v3d->camera->id, ID_OB, actname, NULL, OB_ROT_Y, 0); + insertkey(&v3d->camera->id, ID_OB, actname, NULL, OB_ROT_Z, 0); + } + if (fly->speed) { + insertkey(&v3d->camera->id, ID_OB, actname, NULL, OB_LOC_X, 0); + insertkey(&v3d->camera->id, ID_OB, actname, NULL, OB_LOC_Y, 0); + insertkey(&v3d->camera->id, ID_OB, actname, NULL, OB_LOC_Z, 0); + } + } +#endif + } +//XXX2.5 scrarea_do_windraw(curarea); +//XXX2.5 screen_swapbuffers(); + } else + /*were not redrawing but we need to update the time else the view will jump */ + fly->time_lastdraw= PIL_check_seconds_timer(); + /* end drawing */ + VECCOPY(fly->dvec_prev, dvec); + } + +/* moved to flyEnd() */ + + return OPERATOR_FINISHED; +} + + + +static int fly_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + RegionView3D *rv3d= CTX_wm_region_view3d(C); + FlyInfo *fly; + + if(rv3d->viewlock) + return OPERATOR_CANCELLED; + + fly= MEM_callocN(sizeof(FlyInfo), "FlyOperation"); + + op->customdata= fly; + + if(initFlyInfo(C, fly, op, event)==FALSE) { + MEM_freeN(op->customdata); + return OPERATOR_CANCELLED; + } + + flyEvent(fly, event); + + WM_event_add_modal_handler(C, op); + + return OPERATOR_RUNNING_MODAL; +} + +static int fly_cancel(bContext *C, wmOperator *op) +{ + FlyInfo *fly = op->customdata; + + fly->state = FLY_CANCEL; + flyEnd(C, fly); + op->customdata= NULL; + + return OPERATOR_CANCELLED; +} + +static int fly_modal(bContext *C, wmOperator *op, wmEvent *event) +{ + int exit_code; + + FlyInfo *fly = op->customdata; + + fly->redraw= 0; + + flyEvent(fly, event); + + if(event->type==TIMER) + flyApply(fly); + + if(fly->redraw) {; + ED_region_tag_redraw(CTX_wm_region(C)); + } + + exit_code = flyEnd(C, fly); + + if(exit_code!=OPERATOR_RUNNING_MODAL) + ED_region_tag_redraw(CTX_wm_region(C)); + + return exit_code; +} + +void VIEW3D_OT_fly(wmOperatorType *ot) +{ + + /* identifiers */ + ot->name= "Fly Navigation"; + ot->description= "Interactively fly around the scene."; + ot->idname= "VIEW3D_OT_fly"; + + /* api callbacks */ + ot->invoke= fly_invoke; + ot->cancel= fly_cancel; + ot->modal= fly_modal; + ot->poll= ED_operator_view3d_active; + + /* flags */ + ot->flag= OPTYPE_BLOCKING; + +} + /* ************************************** */ void view3d_align_axis_to_vector(View3D *v3d, RegionView3D *rv3d, int axisidx, float vec[3]) diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index e877f1fecae..84e42294946 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -100,6 +100,7 @@ #include "ED_markers.h" #include "ED_util.h" #include "ED_view3d.h" +#include "ED_mesh.h" #include "UI_view2d.h" #include "WM_types.h" @@ -108,6 +109,8 @@ #include "BLI_arithb.h" #include "BLI_blenlib.h" #include "BLI_editVert.h" +#include "BLI_ghash.h" +#include "BLI_linklist.h" #include "PIL_time.h" /* sleep */ @@ -1318,7 +1321,12 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) if (t->flag & T_MODAL) { ts->prop_mode = t->prop_mode; - ts->proportional = proportional; + + /* only save back if it wasn't automatically disabled */ + if ((t->options & CTX_NO_PET) == 0) + { + ts->proportional = proportional; + } if(t->spacetype == SPACE_VIEW3D) { @@ -1428,6 +1436,9 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int case TFM_BONE_ENVELOPE: initBoneEnvelope(t); break; + case TFM_EDGE_SLIDE: + initEdgeSlide(t); + break; case TFM_BONE_ROLL: initBoneRoll(t); break; @@ -1705,38 +1716,30 @@ static void constraintTransLim(TransInfo *t, TransData *td) bConstraintTypeInfo *cti= get_constraint_typeinfo(CONSTRAINT_TYPE_LOCLIMIT); bConstraintOb cob; bConstraint *con; - + /* Make a temporary bConstraintOb for using these limit constraints * - they only care that cob->matrix is correctly set ;-) * - current space should be local */ memset(&cob, 0, sizeof(bConstraintOb)); Mat4One(cob.matrix); - if (td->tdi) { - TransDataIpokey *tdi= td->tdi; - cob.matrix[3][0]= tdi->locx[0]; - cob.matrix[3][1]= tdi->locy[0]; - cob.matrix[3][2]= tdi->locz[0]; - } - else { - VECCOPY(cob.matrix[3], td->loc); - } - + VECCOPY(cob.matrix[3], td->loc); + /* Evaluate valid constraints */ for (con= td->con; con; con= con->next) { float tmat[4][4]; - + /* only consider constraint if enabled */ if (con->flag & CONSTRAINT_DISABLE) continue; if (con->enforce == 0.0f) continue; - + /* only use it if it's tagged for this purpose (and the right type) */ if (con->type == CONSTRAINT_TYPE_LOCLIMIT) { bLocLimitConstraint *data= con->data; - + if ((data->flag2 & LIMIT_TRANSFORM)==0) continue; - + /* do space conversions */ if (con->ownspace == CONSTRAINT_SPACE_WORLD) { /* just multiply by td->mtx (this should be ok) */ @@ -1747,10 +1750,10 @@ static void constraintTransLim(TransInfo *t, TransData *td) /* skip... incompatable spacetype */ continue; } - + /* do constraint */ cti->evaluate_constraint(con, &cob, NULL); - + /* convert spaces again */ if (con->ownspace == CONSTRAINT_SPACE_WORLD) { /* just multiply by td->mtx (this should be ok) */ @@ -1759,17 +1762,9 @@ static void constraintTransLim(TransInfo *t, TransData *td) } } } - + /* copy results from cob->matrix */ - if (td->tdi) { - TransDataIpokey *tdi= td->tdi; - tdi->locx[0]= cob.matrix[3][0]; - tdi->locy[0]= cob.matrix[3][1]; - tdi->locz[0]= cob.matrix[3][2]; - } - else { - VECCOPY(td->loc, cob.matrix[3]); - } + VECCOPY(td->loc, cob.matrix[3]); } } @@ -1785,25 +1780,14 @@ static void constraintRotLim(TransInfo *t, TransData *td) * - current space should be local */ memset(&cob, 0, sizeof(bConstraintOb)); - if (td->flag & TD_USEQUAT) { + if (td->rotOrder == ROT_MODE_QUAT) { /* quats */ if (td->ext) QuatToMat4(td->ext->quat, cob.matrix); else return; } - else if (td->tdi) { // XXX depreceated - /* ipo-keys eulers */ - TransDataIpokey *tdi= td->tdi; - float eul[3]; - - eul[0]= tdi->rotx[0]; - eul[1]= tdi->roty[0]; - eul[2]= tdi->rotz[0]; - - EulOToMat4(eul, td->rotOrder, cob.matrix); - } - else if (td->rotOrder == PCHAN_ROT_AXISANGLE) { + else if (td->rotOrder == ROT_MODE_AXISANGLE) { /* axis angle */ if (td->ext) AxisAngleToMat4(&td->ext->quat[1], td->ext->quat[0], cob.matrix); @@ -1857,22 +1841,11 @@ static void constraintRotLim(TransInfo *t, TransData *td) } /* copy results from cob->matrix */ - if (td->flag & TD_USEQUAT) { + if (td->rotOrder == ROT_MODE_QUAT) { /* quats */ Mat4ToQuat(cob.matrix, td->ext->quat); } - else if (td->tdi) { - /* ipo-keys eulers */ - TransDataIpokey *tdi= td->tdi; - float eul[3]; - - Mat4ToEulO(cob.matrix, eul, td->rotOrder); - - tdi->rotx[0]= eul[0]; - tdi->roty[0]= eul[1]; - tdi->rotz[0]= eul[2]; - } - else if (td->rotOrder == PCHAN_ROT_AXISANGLE) { + else if (td->rotOrder == ROT_MODE_AXISANGLE) { /* axis angle */ Mat4ToAxisAngle(cob.matrix, &td->ext->quat[1], &td->ext->quat[0]); } @@ -1889,22 +1862,13 @@ static void constraintSizeLim(TransInfo *t, TransData *td) bConstraintTypeInfo *cti= get_constraint_typeinfo(CONSTRAINT_TYPE_SIZELIMIT); bConstraintOb cob; bConstraint *con; - + /* Make a temporary bConstraintOb for using these limit constraints * - they only care that cob->matrix is correctly set ;-) * - current space should be local */ memset(&cob, 0, sizeof(bConstraintOb)); - if (td->tdi) { - TransDataIpokey *tdi= td->tdi; - float size[3]; - - size[0]= tdi->sizex[0]; - size[1]= tdi->sizey[0]; - size[2]= tdi->sizez[0]; - SizeToMat4(size, cob.matrix); - } - else if ((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)) { + if ((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)) { /* scale val and reset size */ return; // TODO: fix this case } @@ -1912,25 +1876,25 @@ static void constraintSizeLim(TransInfo *t, TransData *td) /* Reset val if SINGLESIZE but using a constraint */ if (td->flag & TD_SINGLESIZE) return; - + SizeToMat4(td->ext->size, cob.matrix); } - + /* Evaluate valid constraints */ for (con= td->con; con; con= con->next) { /* only consider constraint if enabled */ if (con->flag & CONSTRAINT_DISABLE) continue; if (con->enforce == 0.0f) continue; - + /* we're only interested in Limit-Scale constraints */ if (con->type == CONSTRAINT_TYPE_SIZELIMIT) { bSizeLimitConstraint *data= con->data; float tmat[4][4]; - + /* only use it if it's tagged for this purpose */ if ((data->flag2 & LIMIT_TRANSFORM)==0) continue; - + /* do space conversions */ if (con->ownspace == CONSTRAINT_SPACE_WORLD) { /* just multiply by td->mtx (this should be ok) */ @@ -1941,10 +1905,10 @@ static void constraintSizeLim(TransInfo *t, TransData *td) /* skip... incompatable spacetype */ continue; } - + /* do constraint */ cti->evaluate_constraint(con, &cob, NULL); - + /* convert spaces again */ if (con->ownspace == CONSTRAINT_SPACE_WORLD) { /* just multiply by td->mtx (this should be ok) */ @@ -1953,19 +1917,9 @@ static void constraintSizeLim(TransInfo *t, TransData *td) } } } - + /* copy results from cob->matrix */ - if (td->tdi) { - TransDataIpokey *tdi= td->tdi; - float size[3]; - - Mat4ToSize(cob.matrix, size); - - tdi->sizex[0]= size[0]; - tdi->sizey[0]= size[1]; - tdi->sizez[0]= size[2]; - } - else if ((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)) { + if ((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)) { /* scale val and reset size */ return; // TODO: fix this case } @@ -1973,7 +1927,7 @@ static void constraintSizeLim(TransInfo *t, TransData *td) /* Reset val if SINGLESIZE but using a constraint */ if (td->flag & TD_SINGLESIZE) return; - + Mat4ToSize(cob.matrix, td->ext->size); } } @@ -1985,21 +1939,21 @@ void initWarp(TransInfo *t) { float max[3], min[3]; int i; - + t->mode = TFM_WARP; t->transform = Warp; t->handleEvent = handleEventWarp; - + initMouseInputMode(t, &t->mouse, INPUT_HORIZONTAL_RATIO); - + t->idx_max = 0; t->num.idx_max = 0; t->snap[0] = 0.0f; t->snap[1] = 5.0f; 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]; @@ -2014,7 +1968,7 @@ void initWarp(TransInfo *t) VECCOPY(min, center); } } - + t->center[0]= (min[0]+max[0])/2.0f; t->center[1]= (min[1]+max[1])/2.0f; t->center[2]= (min[2]+max[2])/2.0f; @@ -2026,7 +1980,7 @@ void initWarp(TransInfo *t) int handleEventWarp(TransInfo *t, wmEvent *event) { int status = 0; - + if (event->type == MIDDLEMOUSE && event->val==KM_PRESS) { // Use customData pointer to signal warp direction @@ -2034,10 +1988,10 @@ int handleEventWarp(TransInfo *t, wmEvent *event) t->customData = (void*)1; else t->customData = 0; - + status = 1; } - + return status; } @@ -2047,7 +2001,7 @@ int Warp(TransInfo *t, short mval[2]) float vec[3], circumfac, dist, phi0, co, si, *curs, cursor[3], gcursor[3]; int i; char str[50]; - + curs= give_cursor(t->scene, t->view); /* * gcursor is the one used for helpline. @@ -2068,73 +2022,73 @@ int Warp(TransInfo *t, short mval[2]) } Mat4MulVecfl(t->viewmat, cursor); VecSubf(cursor, cursor, t->viewmat[3]); - + /* amount of degrees for warp */ circumfac = 360.0f * t->values[0]; - + if (t->customData) /* non-null value indicates reversed input */ { circumfac *= -1; } - + snapGrid(t, &circumfac); applyNumInput(&t->num, &circumfac); - + /* header print for NumInput */ if (hasNumInput(&t->num)) { char c[20]; - + outputNumInput(&(t->num), c); - + sprintf(str, "Warp: %s", c); } else { /* default header print */ sprintf(str, "Warp: %.3f", circumfac); } - + circumfac*= (float)(-M_PI/360.0); - + for(i = 0; i < t->total; i++, td++) { float loc[3]; if (td->flag & TD_NOACTION) break; - + if (td->flag & TD_SKIP) continue; - + /* translate point to center, rotate in such a way that outline==distance */ VECCOPY(vec, td->iloc); Mat3MulVecfl(td->mtx, vec); Mat4MulVecfl(t->viewmat, vec); VecSubf(vec, vec, t->viewmat[3]); - + dist= vec[0]-cursor[0]; - + /* t->val is X dimension projected boundbox */ phi0= (circumfac*dist/t->val); - + vec[1]= (vec[1]-cursor[1]); - + co= (float)cos(phi0); si= (float)sin(phi0); loc[0]= -si*vec[1]+cursor[0]; loc[1]= co*vec[1]+cursor[1]; loc[2]= vec[2]; - + Mat4MulVecfl(t->viewinv, loc); VecSubf(loc, loc, t->viewinv[3]); Mat3MulVecfl(td->smtx, loc); - + VecSubf(loc, loc, td->iloc); VecMulf(loc, td->factor); VecAddf(td->loc, td->iloc, loc); } - + recalcData(t); - + ED_area_headerprint(t->sa, str); - + return 1; } @@ -2145,22 +2099,22 @@ void initShear(TransInfo *t) t->mode = TFM_SHEAR; t->transform = Shear; t->handleEvent = handleEventShear; - + initMouseInputMode(t, &t->mouse, INPUT_HORIZONTAL_ABSOLUTE); - + t->idx_max = 0; t->num.idx_max = 0; t->snap[0] = 0.0f; t->snap[1] = 0.1f; t->snap[2] = t->snap[1] * 0.1f; - + t->flag |= T_NO_CONSTRAINT; } int handleEventShear(TransInfo *t, wmEvent *event) { int status = 0; - + if (event->type == MIDDLEMOUSE && event->val==KM_PRESS) { // Use customData pointer to signal Shear direction @@ -2174,10 +2128,10 @@ int handleEventShear(TransInfo *t, wmEvent *event) initMouseInputMode(t, &t->mouse, INPUT_HORIZONTAL_ABSOLUTE); t->customData = 0; } - + status = 1; } - + return status; } @@ -2190,47 +2144,47 @@ int Shear(TransInfo *t, short mval[2]) float value; int i; char str[50]; - + Mat3CpyMat4(persmat, t->viewmat); Mat3Inv(persinv, persmat); - + value = 0.05f * t->values[0]; - + snapGrid(t, &value); - + applyNumInput(&t->num, &value); - + /* header print for NumInput */ if (hasNumInput(&t->num)) { char c[20]; - + outputNumInput(&(t->num), c); - + sprintf(str, "Shear: %s %s", c, t->proptext); } else { /* default header print */ sprintf(str, "Shear: %.3f %s", value, t->proptext); } - + Mat3One(smat); - + // Custom data signals shear direction if (t->customData == 0) smat[1][0] = value; else smat[0][1] = value; - + Mat3MulMat3(tmat, smat, persmat); Mat3MulMat3(totmat, persinv, tmat); - + for(i = 0 ; i < t->total; i++, td++) { if (td->flag & TD_NOACTION) break; - + if (td->flag & TD_SKIP) continue; - + if (t->obedit) { float mat3[3][3]; Mat3MulMat3(mat3, totmat, td->mtx); @@ -2240,19 +2194,19 @@ int Shear(TransInfo *t, short mval[2]) Mat3CpyMat3(tmat, totmat); } VecSubf(vec, td->center, t->center); - + Mat3MulVecfl(tmat, vec); - + VecAddf(vec, vec, t->center); VecSubf(vec, vec, td->center); - + VecMulf(vec, td->factor); - + VecAddf(td->loc, td->iloc, vec); } - + recalcData(t); - + ED_area_headerprint(t->sa, str); return 1; @@ -2264,9 +2218,9 @@ void initResize(TransInfo *t) { t->mode = TFM_RESIZE; t->transform = Resize; - + initMouseInputMode(t, &t->mouse, INPUT_SPRING_FLIP); - + t->flag |= T_NULL_ONE; t->num.flag |= NUM_NULL_ONE; t->num.flag |= NUM_AFFECT_ALL; @@ -2274,7 +2228,7 @@ void initResize(TransInfo *t) t->flag |= T_NO_ZERO; t->num.flag |= NUM_NO_ZERO; } - + t->idx_max = 2; t->num.idx_max = 2; t->snap[0] = 0.0f; @@ -2292,7 +2246,7 @@ static void headerResize(TransInfo *t, float vec[3], char *str) { sprintf(&tvec[20], "%.4f", vec[1]); sprintf(&tvec[40], "%.4f", vec[2]); } - + if (t->con.mode & CON_APPLY) { switch(t->num.idx_max) { case 0: @@ -2320,14 +2274,14 @@ static void headerResize(TransInfo *t, float vec[3], char *str) { static void TransMat3ToSize( float mat[][3], float smat[][3], float *size) { float vec[3]; - + VecCopyf(vec, mat[0]); size[0]= Normalize(vec); VecCopyf(vec, mat[1]); size[1]= Normalize(vec); VecCopyf(vec, mat[2]); size[2]= Normalize(vec); - + /* first tried with dotproduct... but the sign flip is crucial */ if( VECSIGNFLIP(mat[0], smat[0]) ) size[0]= -size[0]; if( VECSIGNFLIP(mat[1], smat[1]) ) size[1]= -size[1]; @@ -2338,7 +2292,7 @@ static void TransMat3ToSize( float mat[][3], float smat[][3], float *size) static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) { float tmat[3][3], smat[3][3], center[3]; float vec[3]; - + if (t->flag & T_EDIT) { Mat3MulMat3(smat, mat, td->mtx); Mat3MulMat3(tmat, td->smtx, smat); @@ -2346,18 +2300,18 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) { else { Mat3CpyMat3(tmat, mat); } - + if (t->con.applySize) { t->con.applySize(t, td, tmat); } - + /* local constraint shouldn't alter center */ if (t->around == V3D_LOCAL) { if (t->flag & T_OBJECT) { VECCOPY(center, td->center); } else if (t->flag & T_EDIT) { - + if(t->around==V3D_LOCAL && (t->settings->selectmode & SCE_SELECT_FACE)) { VECCOPY(center, td->center); } @@ -2372,10 +2326,10 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) { else { VECCOPY(center, t->center); } - + if (td->ext) { float fsize[3]; - + if (t->flag & (T_OBJECT|T_TEXTURE|T_POSE)) { float obsizemat[3][3]; // Reorient the size mat to fit the oriented object. @@ -2387,28 +2341,14 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) { else { Mat3ToSize(tmat, fsize); } - + protectedSizeBits(td->protectflag, fsize); - + if ((t->flag & T_V3D_ALIGN)==0) { // align mode doesn't resize objects itself - /* handle ipokeys? */ - if(td->tdi) { - TransDataIpokey *tdi= td->tdi; - /* calculate delta size (equal for size and dsize) */ - - vec[0]= (tdi->oldsize[0])*(fsize[0] -1.0f) * td->factor; - vec[1]= (tdi->oldsize[1])*(fsize[1] -1.0f) * td->factor; - vec[2]= (tdi->oldsize[2])*(fsize[2] -1.0f) * td->factor; - - add_tdi_poin(tdi->sizex, tdi->oldsize, vec[0]); - add_tdi_poin(tdi->sizey, tdi->oldsize+1, vec[1]); - add_tdi_poin(tdi->sizez, tdi->oldsize+2, vec[2]); - - } - else if((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)){ + if((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)){ /* scale val and reset size */ *td->val = td->ival * fsize[0] * td->factor; - + td->ext->size[0] = td->ext->isize[0]; td->ext->size[1] = td->ext->isize[1]; td->ext->size[2] = td->ext->isize[2]; @@ -2417,46 +2357,39 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) { /* Reset val if SINGLESIZE but using a constraint */ if (td->flag & TD_SINGLESIZE) *td->val = td->ival; - + td->ext->size[0] = td->ext->isize[0] * (fsize[0]) * td->factor; td->ext->size[1] = td->ext->isize[1] * (fsize[1]) * td->factor; td->ext->size[2] = td->ext->isize[2] * (fsize[2]) * td->factor; } } - + constraintSizeLim(t, td); } - + /* For individual element center, Editmode need to use iloc */ if (t->flag & T_POINTS) VecSubf(vec, td->iloc, center); else VecSubf(vec, td->center, center); - + Mat3MulVecfl(tmat, vec); - + VecAddf(vec, vec, center); if (t->flag & T_POINTS) VecSubf(vec, vec, td->iloc); else VecSubf(vec, vec, td->center); - + VecMulf(vec, td->factor); - + if (t->flag & (T_OBJECT|T_POSE)) { Mat3MulVecfl(td->smtx, vec); } - + protectedTransBits(td->protectflag, vec); - - if(td->tdi) { - TransDataIpokey *tdi= td->tdi; - add_tdi_poin(tdi->locx, tdi->oldloc, vec[0]); - add_tdi_poin(tdi->locy, tdi->oldloc+1, vec[1]); - add_tdi_poin(tdi->locz, tdi->oldloc+2, vec[2]); - } - else VecAddf(td->loc, td->iloc, vec); - + VecAddf(td->loc, td->iloc, vec); + constraintTransLim(t, td); } @@ -2467,7 +2400,7 @@ int Resize(TransInfo *t, short mval[2]) float ratio; int i; char str[200]; - + /* for manipulator, center handle, the scaling can't be done relative to center */ if( (t->flag & T_USES_MANIPULATOR) && t->con.mode==0) { @@ -2477,60 +2410,60 @@ int Resize(TransInfo *t, short mval[2]) { ratio = t->values[0]; } - + size[0] = size[1] = size[2] = ratio; - + snapGrid(t, size); - + if (hasNumInput(&t->num)) { applyNumInput(&t->num, size); constraintNumInput(t, size); } - + applySnapping(t, size); - + if (t->flag & T_AUTOVALUES) { VECCOPY(size, t->auto_values); } - + VECCOPY(t->values, size); - + SizeToMat3(size, mat); - + if (t->con.applySize) { t->con.applySize(t, NULL, mat); } - + Mat3CpyMat3(t->mat, mat); // used in manipulator - + headerResize(t, size, str); - + for(i = 0, td=t->data; i < t->total; i++, td++) { if (td->flag & TD_NOACTION) break; - + if (td->flag & TD_SKIP) continue; - + ElementResize(t, td, mat); } - + /* evil hack - redo resize if cliping needed */ if (t->flag & T_CLIP_UV && clipUVTransform(t, size, 1)) { SizeToMat3(size, mat); - + if (t->con.applySize) t->con.applySize(t, NULL, mat); - + for(i = 0, td=t->data; i < t->total; i++, td++) ElementResize(t, td, mat); } - + recalcData(t); - + ED_area_headerprint(t->sa, str); - + return 1; } @@ -2540,26 +2473,26 @@ void initToSphere(TransInfo *t) { TransData *td = t->data; int i; - + t->mode = TFM_TOSPHERE; t->transform = ToSphere; - + initMouseInputMode(t, &t->mouse, INPUT_HORIZONTAL_RATIO); - + t->idx_max = 0; t->num.idx_max = 0; t->snap[0] = 0.0f; t->snap[1] = 0.1f; t->snap[2] = t->snap[1] * 0.1f; - + 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); } - + t->val /= (float)t->total; } @@ -2570,56 +2503,56 @@ int ToSphere(TransInfo *t, short mval[2]) int i; char str[64]; TransData *td = t->data; - + ratio = t->values[0]; - + snapGrid(t, &ratio); - + applyNumInput(&t->num, &ratio); - + if (ratio < 0) ratio = 0.0f; else if (ratio > 1) ratio = 1.0f; - + /* header print for NumInput */ if (hasNumInput(&t->num)) { char c[20]; - + outputNumInput(&(t->num), c); - + sprintf(str, "To Sphere: %s %s", c, t->proptext); } else { /* default header print */ sprintf(str, "To Sphere: %.4f %s", ratio, t->proptext); } - - + + for(i = 0 ; i < t->total; i++, td++) { float tratio; if (td->flag & TD_NOACTION) break; - + if (td->flag & TD_SKIP) continue; - + VecSubf(vec, td->iloc, t->center); - + radius = Normalize(vec); - + tratio = ratio * td->factor; - + VecMulf(vec, radius * (1.0f - tratio) + t->val * tratio); - + VecAddf(td->loc, t->center, vec); } - - + + recalcData(t); - + ED_area_headerprint(t->sa, str); - + return 1; } @@ -2630,19 +2563,19 @@ void initRotation(TransInfo *t) { t->mode = TFM_ROTATION; t->transform = Rotation; - + initMouseInputMode(t, &t->mouse, INPUT_ANGLE); - + t->ndof.axis = 16; /* Scale down and flip input for rotation */ t->ndof.factor[0] = -0.2f; - + t->idx_max = 0; t->num.idx_max = 0; t->snap[0] = 0.0f; t->snap[1] = (float)((5.0/180)*M_PI); t->snap[2] = t->snap[1] * 0.2f; - + if (t->flag & T_2D_EDIT) t->flag |= T_NO_CONSTRAINT; } @@ -2651,7 +2584,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short float vec[3], totmat[3][3], smat[3][3]; float eul[3], fmat[3][3], quat[4]; float *center = t->center; - + /* local constraint shouldn't alter center */ if (around == V3D_LOCAL) { if (t->flag & (T_OBJECT|T_POSE)) { @@ -2664,27 +2597,28 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short } } } - + if (t->flag & T_POINTS) { Mat3MulMat3(totmat, mat, td->mtx); Mat3MulMat3(smat, td->smtx, totmat); - + VecSubf(vec, td->iloc, center); Mat3MulVecfl(smat, vec); - + VecAddf(td->loc, vec, center); - + VecSubf(vec,td->loc,td->iloc); protectedTransBits(td->protectflag, vec); VecAddf(td->loc, td->iloc, vec); - + + if(td->flag & TD_USEQUAT) { Mat3MulSerie(fmat, td->mtx, mat, td->smtx, 0, 0, 0, 0, 0); Mat3ToQuat(fmat, quat); // Actual transform - + if(td->ext->quat){ QuatMul(td->ext->quat, quat, td->ext->iquat); - + /* is there a reason not to have this here? -jahka */ protectedQuaternionBits(td->protectflag, td->ext->quat, td->ext->iquat); } @@ -2704,48 +2638,48 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short */ else if (t->flag & T_POSE) { float pmtx[3][3], imtx[3][3]; - + // Extract and invert armature object matrix Mat3CpyMat4(pmtx, t->poseobj->obmat); Mat3Inv(imtx, pmtx); - + if ((td->flag & TD_NO_LOC) == 0) { VecSubf(vec, td->center, center); - + Mat3MulVecfl(pmtx, vec); // To Global space Mat3MulVecfl(mat, vec); // Applying rotation Mat3MulVecfl(imtx, vec); // To Local space - + VecAddf(vec, vec, center); /* vec now is the location where the object has to be */ - + VecSubf(vec, vec, td->center); // Translation needed from the initial location - + Mat3MulVecfl(pmtx, vec); // To Global space Mat3MulVecfl(td->smtx, vec);// To Pose space - + protectedTransBits(td->protectflag, vec); - + VecAddf(td->loc, td->iloc, vec); - + constraintTransLim(t, td); } - + /* rotation */ if ((t->flag & T_V3D_ALIGN)==0) { // align mode doesn't rotate objects itself /* euler or quaternion/axis-angle? */ - if (td->flag & TD_USEQUAT) { + if (td->rotOrder == ROT_MODE_QUAT) { Mat3MulSerie(fmat, td->mtx, mat, td->smtx, 0, 0, 0, 0, 0); - + Mat3ToQuat(fmat, quat); // Actual transform - + QuatMul(td->ext->quat, quat, td->ext->iquat); /* this function works on end result */ protectedQuaternionBits(td->protectflag, td->ext->quat, td->ext->iquat); } - else if (td->rotOrder == PCHAN_ROT_AXISANGLE) { + else if (td->rotOrder == ROT_MODE_AXISANGLE) { /* calculate effect based on quats */ float iquat[4]; @@ -2797,93 +2731,67 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short /* vec now is the location where the object has to be */ VecSubf(vec, vec, td->center); Mat3MulVecfl(td->smtx, vec); - + protectedTransBits(td->protectflag, vec); - - if(td->tdi) { - TransDataIpokey *tdi= td->tdi; - add_tdi_poin(tdi->locx, tdi->oldloc, vec[0]); - add_tdi_poin(tdi->locy, tdi->oldloc+1, vec[1]); - add_tdi_poin(tdi->locz, tdi->oldloc+2, vec[2]); - } - else VecAddf(td->loc, td->iloc, vec); + + VecAddf(td->loc, td->iloc, vec); } - - + + constraintTransLim(t, td); - + /* rotation */ if ((t->flag & T_V3D_ALIGN)==0) { // align mode doesn't rotate objects itself /* euler or quaternion? */ - if (td->flag & TD_USEQUAT) { + if ((td->rotOrder == ROT_MODE_QUAT) || (td->flag & TD_USEQUAT)) { Mat3MulSerie(fmat, td->mtx, mat, td->smtx, 0, 0, 0, 0, 0); Mat3ToQuat(fmat, quat); // Actual transform - + QuatMul(td->ext->quat, quat, td->ext->iquat); /* this function works on end result */ protectedQuaternionBits(td->protectflag, td->ext->quat, td->ext->iquat); } + else if (td->rotOrder == ROT_MODE_AXISANGLE) { + /* calculate effect based on quats */ + float iquat[4]; + + /* td->ext->(i)quat is in axis-angle form, not quats! */ + AxisAngleToQuat(iquat, &td->ext->iquat[1], td->ext->iquat[0]); + + Mat3MulSerie(fmat, td->mtx, mat, td->smtx, 0, 0, 0, 0, 0); + Mat3ToQuat(fmat, quat); // Actual transform + + QuatMul(td->ext->quat, quat, iquat); + + /* make temp copy (since stored in same place) */ + QUATCOPY(quat, td->ext->quat); // this is just a 4d vector copying macro + QuatToAxisAngle(quat, &td->ext->quat[1], &td->ext->quat[0]); + + /* this function works on end result */ + protectedAxisAngleBits(td->protectflag, td->ext->quat, td->ext->iquat); + } else { float obmat[3][3]; - - /* are there ipo keys? */ - if(td->tdi) { - TransDataIpokey *tdi= td->tdi; - float current_rot[3]; - float rot[3]; - - /* current IPO value for compatible euler */ - current_rot[0] = (tdi->rotx) ? tdi->rotx[0] : 0.0f; - current_rot[1] = (tdi->roty) ? tdi->roty[0] : 0.0f; - current_rot[2] = (tdi->rotz) ? tdi->rotz[0] : 0.0f; - VecMulf(current_rot, (float)(M_PI_2 / 9.0)); - - /* calculate the total rotatation in eulers */ - VecAddf(eul, td->ext->irot, td->ext->drot); - EulToMat3(eul, obmat); - /* mat = transform, obmat = object rotation */ - Mat3MulMat3(fmat, mat, obmat); - - Mat3ToCompatibleEul(fmat, eul, current_rot); - - /* correct back for delta rot */ - if(tdi->flag & TOB_IPODROT) { - VecSubf(rot, eul, td->ext->irot); - } - else { - VecSubf(rot, eul, td->ext->drot); - } - - VecMulf(rot, (float)(9.0/M_PI_2)); - VecSubf(rot, rot, tdi->oldrot); - - protectedRotateBits(td->protectflag, rot, tdi->oldrot); - - add_tdi_poin(tdi->rotx, tdi->oldrot, rot[0]); - add_tdi_poin(tdi->roty, tdi->oldrot+1, rot[1]); - add_tdi_poin(tdi->rotz, tdi->oldrot+2, rot[2]); - } - else { - Mat3MulMat3(totmat, mat, td->mtx); - Mat3MulMat3(smat, td->smtx, totmat); - - /* calculate the total rotatation in eulers */ - VecAddf(eul, td->ext->irot, td->ext->drot); /* we have to correct for delta rot */ - EulToMat3(eul, obmat); - /* mat = transform, obmat = object rotation */ - Mat3MulMat3(fmat, smat, obmat); - - Mat3ToCompatibleEul(fmat, eul, td->ext->rot); - - /* correct back for delta rot */ - VecSubf(eul, eul, td->ext->drot); - - /* and apply */ - protectedRotateBits(td->protectflag, eul, td->ext->irot); - VECCOPY(td->ext->rot, eul); - } + + Mat3MulMat3(totmat, mat, td->mtx); + Mat3MulMat3(smat, td->smtx, totmat); + + /* calculate the total rotatation in eulers */ + VecAddf(eul, td->ext->irot, td->ext->drot); /* we have to correct for delta rot */ + EulOToMat3(eul, td->rotOrder, obmat); + /* mat = transform, obmat = object rotation */ + Mat3MulMat3(fmat, smat, obmat); + + Mat3ToCompatibleEulO(fmat, eul, td->ext->rot, td->rotOrder); + + /* correct back for delta rot */ + VecSubf(eul, eul, td->ext->drot); + + /* and apply */ + protectedRotateBits(td->protectflag, eul, td->ext->irot); + VECCOPY(td->ext->rot, eul); } - + constraintRotLim(t, td); } } @@ -2894,17 +2802,17 @@ static void applyRotation(TransInfo *t, float angle, float axis[3]) TransData *td = t->data; float mat[3][3]; int i; - + VecRotToMat3(axis, angle, mat); - + for(i = 0 ; i < t->total; i++, td++) { - + if (td->flag & TD_NOACTION) break; - + if (td->flag & TD_SKIP) continue; - + if (t->con.applyRot) { t->con.applyRot(t, td, axis, NULL); VecRotToMat3(axis, angle * td->factor, mat); @@ -2912,7 +2820,7 @@ static void applyRotation(TransInfo *t, float angle, float axis[3]) else if (t->flag & T_PROP_EDIT) { VecRotToMat3(axis, angle * td->factor, mat); } - + ElementRotation(t, td, mat, t->around); } } @@ -2920,62 +2828,62 @@ static void applyRotation(TransInfo *t, float angle, float axis[3]) int Rotation(TransInfo *t, short mval[2]) { char str[64]; - + float final; - + float axis[3]; float mat[3][3]; - + VECCOPY(axis, t->viewinv[2]); VecMulf(axis, -1.0f); Normalize(axis); - + final = t->values[0]; - + applyNDofInput(&t->ndof, &final); - + snapGrid(t, &final); - + if (t->con.applyRot) { t->con.applyRot(t, NULL, axis, &final); } - + applySnapping(t, &final); - + if (hasNumInput(&t->num)) { char c[20]; - + applyNumInput(&t->num, &final); - + outputNumInput(&(t->num), c); - + sprintf(str, "Rot: %s %s %s", &c[0], t->con.text, t->proptext); - + /* Clamp between -180 and 180 */ while (final >= 180.0) final -= 360.0; - + while (final <= -180.0) final += 360.0; - + final *= (float)(M_PI / 180.0); } else { sprintf(str, "Rot: %.2f%s %s", 180.0*final/M_PI, t->con.text, t->proptext); } - + VecRotToMat3(axis, final, mat); - + // TRANSFORM_FIX_ME // t->values[0] = final; // used in manipulator // Mat3CpyMat3(t->mat, mat); // used in manipulator - + applyRotation(t, final, axis); - + recalcData(t); - + ED_area_headerprint(t->sa, str); - + return 1; } @@ -3193,10 +3101,10 @@ static void applyTranslation(TransInfo *t, float vec[3]) { for(i = 0 ; i < t->total; i++, td++) { if (td->flag & TD_NOACTION) break; - + if (td->flag & TD_SKIP) continue; - + /* handle snapping rotation before doing the translation */ if (usingSnappingNormal(t)) { @@ -3207,26 +3115,26 @@ static void applyTranslation(TransInfo *t, float vec[3]) { float quat[4]; float mat[3][3]; float angle; - + Crossf(axis, original_normal, t->tsnap.snapNormal); angle = saacos(Inpf(original_normal, t->tsnap.snapNormal)); - + AxisAngleToQuat(quat, axis, angle); - + QuatToMat3(quat, mat); - + ElementRotation(t, td, mat, V3D_LOCAL); } else { float mat[3][3]; - + Mat3One(mat); - + ElementRotation(t, td, mat, V3D_LOCAL); } } - + if (t->con.applyVec) { float pvec[3]; t->con.applyVec(t, td, vec, tvec, pvec); @@ -3234,21 +3142,14 @@ static void applyTranslation(TransInfo *t, float vec[3]) { else { VECCOPY(tvec, vec); } - + Mat3MulVecfl(td->smtx, tvec); VecMulf(tvec, td->factor); - + protectedTransBits(td->protectflag, tvec); - - /* transdata ipokey */ - if(td->tdi) { - TransDataIpokey *tdi= td->tdi; - add_tdi_poin(tdi->locx, tdi->oldloc, tvec[0]); - add_tdi_poin(tdi->locy, tdi->oldloc+1, tvec[1]); - add_tdi_poin(tdi->locz, tdi->oldloc+2, tvec[2]); - } - else VecAddf(td->loc, td->iloc, tvec); - + + VecAddf(td->loc, td->iloc, tvec); + constraintTransLim(t, td); } } @@ -3915,7 +3816,7 @@ int BoneSize(TransInfo *t, short mval[2]) float ratio; int i; char str[60]; - + // TRANSFORM_FIX_ME MOVE TO MOUSE INPUT /* for manipulator, center handle, the scaling can't be done relative to center */ if( (t->flag & T_USES_MANIPULATOR) && t->con.mode==0) @@ -3926,40 +3827,40 @@ int BoneSize(TransInfo *t, short mval[2]) { ratio = t->values[0]; } - + size[0] = size[1] = size[2] = ratio; - + snapGrid(t, size); - + if (hasNumInput(&t->num)) { applyNumInput(&t->num, size); constraintNumInput(t, size); } - + SizeToMat3(size, mat); - + if (t->con.applySize) { t->con.applySize(t, NULL, mat); } - + Mat3CpyMat3(t->mat, mat); // used in manipulator - + headerBoneSize(t, size, str); - + for(i = 0 ; i < t->total; i++, td++) { if (td->flag & TD_NOACTION) break; - + if (td->flag & TD_SKIP) continue; - + ElementBoneSize(t, td, mat); } - + recalcData(t); - + ED_area_headerprint(t->sa, str); - + return 1; } @@ -3970,15 +3871,15 @@ void initBoneEnvelope(TransInfo *t) { t->mode = TFM_BONE_ENVELOPE; t->transform = BoneEnvelope; - + initMouseInputMode(t, &t->mouse, INPUT_SPRING); - + t->idx_max = 0; t->num.idx_max = 0; t->snap[0] = 0.0f; t->snap[1] = 0.1f; t->snap[2] = t->snap[1] * 0.1f; - + t->flag |= T_NO_CONSTRAINT; } @@ -3988,31 +3889,31 @@ int BoneEnvelope(TransInfo *t, short mval[2]) float ratio; int i; char str[50]; - + ratio = t->values[0]; - + snapGrid(t, &ratio); - + applyNumInput(&t->num, &ratio); - + /* header print for NumInput */ if (hasNumInput(&t->num)) { char c[20]; - + outputNumInput(&(t->num), c); sprintf(str, "Envelope: %s", c); } else { sprintf(str, "Envelope: %3f", ratio); } - + for(i = 0 ; i < t->total; i++, td++) { if (td->flag & TD_NOACTION) break; - + if (td->flag & TD_SKIP) continue; - + if (td->val) { /* if the old/original value was 0.0f, then just use ratio */ if (td->ival) @@ -4021,6 +3922,693 @@ int BoneEnvelope(TransInfo *t, short mval[2]) *td->val= ratio; } } + + recalcData(t); + + ED_area_headerprint(t->sa, str); + + return 1; +} + +/* ******************** Edge Slide *************** */ + +static int createSlideVerts(TransInfo *t) +{ + Mesh *me = t->obedit->data; + EditMesh *em = me->edit_mesh; + EditFace *efa; + EditEdge *eed,*first=NULL,*last=NULL, *temp = NULL; + EditVert *ev, *nearest = NULL; + LinkNode *edgelist = NULL, *vertlist=NULL, *look; + GHash *vertgh; + TransDataSlideVert *tempsv; + float perc = 0, percp = 0,vertdist; // XXX, projectMat[4][4]; + float shiftlabda= 0.0f,len = 0.0f; + int i, j, numsel, numadded=0, timesthrough = 0, vertsel=0, prop=1, cancel = 0,flip=0; + int wasshift = 0; + /* UV correction vars */ + GHash **uvarray= NULL; + SlideData *sld = MEM_callocN(sizeof(*sld), "sld"); + int uvlay_tot= CustomData_number_of_layers(&em->fdata, CD_MTFACE); + int uvlay_idx; + TransDataSlideUv *slideuvs=NULL, *suv=NULL, *suv_last=NULL; + RegionView3D *v3d = t->ar->regiondata; + float projectMat[4][4]; + float start[3] = {0.0f, 0.0f, 0.0f}, end[3] = {0.0f, 0.0f, 0.0f}; + float vec[3]; + //short mval[2], mvalo[2]; + float labda = 0.0f, totvec=0.0; + + if (!v3d) { + /*ok, let's try to survive this*/ + Mat4One(projectMat); + } else { + view3d_get_object_project_mat(v3d, t->obedit, projectMat); + } + + //mvalo[0] = -1; mvalo[1] = -1; + numsel =0; + + // Get number of selected edges and clear some flags + for(eed=em->edges.first;eed;eed=eed->next) { + eed->f1 = 0; + eed->f2 = 0; + if(eed->f & SELECT) numsel++; + } + + for(ev=em->verts.first;ev;ev=ev->next) { + ev->f1 = 0; + } + + //Make sure each edge only has 2 faces + // make sure loop doesn't cross face + for(efa=em->faces.first;efa;efa=efa->next) { + int ct = 0; + if(efa->e1->f & SELECT) { + ct++; + efa->e1->f1++; + if(efa->e1->f1 > 2) { + //BKE_report(op->reports, RPT_ERROR, "3+ face edge"); + return 0; + } + } + if(efa->e2->f & SELECT) { + ct++; + efa->e2->f1++; + if(efa->e2->f1 > 2) { + //BKE_report(op->reports, RPT_ERROR, "3+ face edge"); + return 0; + } + } + if(efa->e3->f & SELECT) { + ct++; + efa->e3->f1++; + if(efa->e3->f1 > 2) { + //BKE_report(op->reports, RPT_ERROR, "3+ face edge"); + return 0; + } + } + if(efa->e4 && efa->e4->f & SELECT) { + ct++; + efa->e4->f1++; + if(efa->e4->f1 > 2) { + //BKE_report(op->reports, RPT_ERROR, "3+ face edge"); + return 0; + } + } + // Make sure loop is not 2 edges of same face + if(ct > 1) { + //BKE_report(op->reports, RPT_ERROR, "Loop crosses itself"); + return 0; + } + } + + // Get # of selected verts + for(ev=em->verts.first;ev;ev=ev->next) { + if(ev->f & SELECT) vertsel++; + } + + // Test for multiple segments + if(vertsel > numsel+1) { + //BKE_report(op->reports, RPT_ERROR, "Please choose a single edge loop"); + return 0; + } + + // Get the edgeloop in order - mark f1 with SELECT once added + for(eed=em->edges.first;eed;eed=eed->next) { + if((eed->f & SELECT) && !(eed->f1 & SELECT)) { + // If this is the first edge added, just put it in + if(!edgelist) { + BLI_linklist_prepend(&edgelist,eed); + numadded++; + first = eed; + last = eed; + eed->f1 = SELECT; + } else { + if(editedge_getSharedVert(eed, last)) { + BLI_linklist_append(&edgelist,eed); + eed->f1 = SELECT; + numadded++; + last = eed; + } else if(editedge_getSharedVert(eed, first)) { + BLI_linklist_prepend(&edgelist,eed); + eed->f1 = SELECT; + numadded++; + first = eed; + } + } + } + if(eed->next == NULL && numadded != numsel) { + eed=em->edges.first; + timesthrough++; + } + + // It looks like there was an unexpected case - Hopefully should not happen + if(timesthrough >= numsel*2) { + BLI_linklist_free(edgelist,NULL); + //BKE_report(op->reports, RPT_ERROR, "Could not order loop"); + return 0; + } + } + + // Put the verts in order in a linklist + look = edgelist; + while(look) { + eed = look->link; + if(!vertlist) { + if(look->next) { + temp = look->next->link; + + //This is the first entry takes care of extra vert + if(eed->v1 != temp->v1 && eed->v1 != temp->v2) { + BLI_linklist_append(&vertlist,eed->v1); + eed->v1->f1 = 1; + } else { + BLI_linklist_append(&vertlist,eed->v2); + eed->v2->f1 = 1; + } + } else { + //This is the case that we only have 1 edge + BLI_linklist_append(&vertlist,eed->v1); + eed->v1->f1 = 1; + } + } + // for all the entries + if(eed->v1->f1 != 1) { + BLI_linklist_append(&vertlist,eed->v1); + eed->v1->f1 = 1; + } else if(eed->v2->f1 != 1) { + BLI_linklist_append(&vertlist,eed->v2); + eed->v2->f1 = 1; + } + look = look->next; + } + + // populate the SlideVerts + + vertgh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp); + look = vertlist; + while(look) { + i=0; + j=0; + ev = look->link; + tempsv = (struct TransDataSlideVert*)MEM_mallocN(sizeof(struct TransDataSlideVert),"SlideVert"); + tempsv->up = NULL; + tempsv->down = NULL; + tempsv->origvert.co[0] = ev->co[0]; + tempsv->origvert.co[1] = ev->co[1]; + tempsv->origvert.co[2] = ev->co[2]; + tempsv->origvert.no[0] = ev->no[0]; + tempsv->origvert.no[1] = ev->no[1]; + tempsv->origvert.no[2] = ev->no[2]; + // i is total edges that vert is on + // j is total selected edges that vert is on + + for(eed=em->edges.first;eed;eed=eed->next) { + if(eed->v1 == ev || eed->v2 == ev) { + i++; + if(eed->f & SELECT) { + j++; + } + } + } + // If the vert is in the middle of an edge loop, it touches 2 selected edges and 2 unselected edges + if(i == 4 && j == 2) { + for(eed=em->edges.first;eed;eed=eed->next) { + if(editedge_containsVert(eed, ev)) { + if(!(eed->f & SELECT)) { + if(!tempsv->up) { + tempsv->up = eed; + } else if (!(tempsv->down)) { + tempsv->down = eed; + } + } + } + } + } + // If it is on the end of the loop, it touches 1 selected and as least 2 more unselected + if(i >= 3 && j == 1) { + for(eed=em->edges.first;eed;eed=eed->next) { + if(editedge_containsVert(eed, ev) && eed->f & SELECT) { + for(efa = em->faces.first;efa;efa=efa->next) { + if(editface_containsEdge(efa, eed)) { + if(editedge_containsVert(efa->e1, ev) && efa->e1 != eed) { + if(!tempsv->up) { + tempsv->up = efa->e1; + } else if (!(tempsv->down)) { + tempsv->down = efa->e1; + } + } + if(editedge_containsVert(efa->e2, ev) && efa->e2 != eed) { + if(!tempsv->up) { + tempsv->up = efa->e2; + } else if (!(tempsv->down)) { + tempsv->down = efa->e2; + } + } + if(editedge_containsVert(efa->e3, ev) && efa->e3 != eed) { + if(!tempsv->up) { + tempsv->up = efa->e3; + } else if (!(tempsv->down)) { + tempsv->down = efa->e3; + } + } + if(efa->e4) { + if(editedge_containsVert(efa->e4, ev) && efa->e4 != eed) { + if(!tempsv->up) { + tempsv->up = efa->e4; + } else if (!(tempsv->down)) { + tempsv->down = efa->e4; + } + } + } + + } + } + } + } + } + if(i > 4 && j == 2) { + BLI_ghash_free(vertgh, NULL, (GHashValFreeFP)MEM_freeN); + BLI_linklist_free(vertlist,NULL); + BLI_linklist_free(edgelist,NULL); + return 0; + } + BLI_ghash_insert(vertgh,ev,tempsv); + + look = look->next; + } + + // make sure the UPs nad DOWNs are 'faceloops' + // Also find the nearest slidevert to the cursor + + look = vertlist; + nearest = NULL; + vertdist = -1; + while(look) { + tempsv = BLI_ghash_lookup(vertgh,(EditVert*)look->link); + + if(!tempsv->up || !tempsv->down) { + //BKE_report(op->reports, RPT_ERROR, "Missing rails"); + BLI_ghash_free(vertgh, NULL, (GHashValFreeFP)MEM_freeN); + BLI_linklist_free(vertlist,NULL); + BLI_linklist_free(edgelist,NULL); + return 0; + } + + if(me->drawflag & ME_DRAW_EDGELEN) { + if(!(tempsv->up->f & SELECT)) { + tempsv->up->f |= SELECT; + tempsv->up->f2 |= 16; + } else { + tempsv->up->f2 |= ~16; + } + if(!(tempsv->down->f & SELECT)) { + tempsv->down->f |= SELECT; + tempsv->down->f2 |= 16; + } else { + tempsv->down->f2 |= ~16; + } + } + + if(look->next != NULL) { + TransDataSlideVert *sv; + + ev = (EditVert*)look->next->link; + sv = BLI_ghash_lookup(vertgh, ev); + + if(sv) { + float co[3], co2[3], vec[3]; + + ev = (EditVert*)look->link; + + if(!sharesFace(em, tempsv->up,sv->up)) { + EditEdge *swap; + swap = sv->up; + sv->up = sv->down; + sv->down = swap; + } + + if (v3d) { + view3d_project_float(t->ar, tempsv->up->v1->co, co, projectMat); + view3d_project_float(t->ar, tempsv->up->v2->co, co2, projectMat); + } + + if (ev == tempsv->up->v1) { + VecSubf(vec, co, co2); + } else { + VecSubf(vec, co2, co); + } + + VecAddf(start, start, vec); + + if (v3d) { + view3d_project_float(t->ar, tempsv->down->v1->co, co, projectMat); + view3d_project_float(t->ar, tempsv->down->v2->co, co2, projectMat); + } + + if (ev == tempsv->down->v1) { + VecSubf(vec, co2, co); + } else { + VecSubf(vec, co, co2); + } + + VecAddf(end, end, vec); + + totvec += 1.0f; + nearest = (EditVert*)look->link; + } + } + + + + look = look->next; + } + + VecAddf(start, start, end); + VecMulf(start, 0.5*(1.0/totvec)); + VECCOPY(vec, start); + start[0] = t->mval[0]; + start[1] = t->mval[1]; + VecAddf(end, start, vec); + + sld->start[0] = (short) start[0]; + sld->start[1] = (short) start[1]; + sld->end[0] = (short) end[0]; + sld->end[1] = (short) end[1]; + + if (uvlay_tot) { // XXX && (scene->toolsettings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT)) { + int maxnum = 0; + + uvarray = MEM_callocN( uvlay_tot * sizeof(GHash *), "SlideUVs Array"); + sld->totuv = uvlay_tot; + suv_last = slideuvs = MEM_callocN( uvlay_tot * (numadded+1) * sizeof(TransDataSlideUv), "SlideUVs"); /* uvLayers * verts */ + suv = NULL; + + for (uvlay_idx=0; uvlay_idx<uvlay_tot; uvlay_idx++) { + + uvarray[uvlay_idx] = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp); + + for(ev=em->verts.first;ev;ev=ev->next) { + ev->tmp.l = 0; + } + look = vertlist; + while(look) { + float *uv_new; + tempsv = BLI_ghash_lookup(vertgh,(EditVert*)look->link); + + ev = look->link; + suv = NULL; + for(efa = em->faces.first;efa;efa=efa->next) { + if (ev->tmp.l != -1) { /* test for self, in this case its invalid */ + int k=-1; /* face corner */ + + /* Is this vert in the faces corner? */ + if (efa->v1==ev) k=0; + else if (efa->v2==ev) k=1; + else if (efa->v3==ev) k=2; + else if (efa->v4 && efa->v4==ev) k=3; + + if (k != -1) { + MTFace *tf = CustomData_em_get_n(&em->fdata, efa->data, CD_MTFACE, uvlay_idx); + EditVert *ev_up, *ev_down; + + uv_new = tf->uv[k]; + + if (ev->tmp.l) { + if (fabs(suv->origuv[0]-uv_new[0]) > 0.0001 || fabs(suv->origuv[1]-uv_new[1])) { + ev->tmp.l = -1; /* Tag as invalid */ + BLI_linklist_free(suv->fuv_list,NULL); + suv->fuv_list = NULL; + BLI_ghash_remove(uvarray[uvlay_idx],ev, NULL, NULL); + suv = NULL; + break; + } + } else { + ev->tmp.l = 1; + suv = suv_last; + + suv->fuv_list = NULL; + suv->uv_up = suv->uv_down = NULL; + suv->origuv[0] = uv_new[0]; + suv->origuv[1] = uv_new[1]; + + BLI_linklist_prepend(&suv->fuv_list, uv_new); + BLI_ghash_insert(uvarray[uvlay_idx],ev,suv); + + suv_last++; /* advance to next slide UV */ + maxnum++; + } + + /* Now get the uvs along the up or down edge if we can */ + if (suv) { + if (!suv->uv_up) { + ev_up = editedge_getOtherVert(tempsv->up,ev); + if (efa->v1==ev_up) suv->uv_up = tf->uv[0]; + else if (efa->v2==ev_up) suv->uv_up = tf->uv[1]; + else if (efa->v3==ev_up) suv->uv_up = tf->uv[2]; + else if (efa->v4 && efa->v4==ev_up) suv->uv_up = tf->uv[3]; + } + if (!suv->uv_down) { /* if the first face was apart of the up edge, it cant be apart of the down edge */ + ev_down = editedge_getOtherVert(tempsv->down,ev); + if (efa->v1==ev_down) suv->uv_down = tf->uv[0]; + else if (efa->v2==ev_down) suv->uv_down = tf->uv[1]; + else if (efa->v3==ev_down) suv->uv_down = tf->uv[2]; + else if (efa->v4 && efa->v4==ev_down) suv->uv_down = tf->uv[3]; + } + + /* Copy the pointers to the face UV's */ + BLI_linklist_prepend(&suv->fuv_list, uv_new); + } + } + } + } + look = look->next; + } + } /* end uv layer loop */ + } /* end uvlay_tot */ + + sld->uvhash = uvarray; + sld->slideuv = slideuvs; + sld->vhash = vertgh; + sld->nearest = nearest; + sld->vertlist = vertlist; + sld->edgelist = edgelist; + sld->suv_last = suv_last; + sld->uvlay_tot = uvlay_tot; + + // we should have enough info now to slide + + t->customData = sld; + + return 1; +} + +void freeSlideVerts(TransInfo *t) +{ + TransDataSlideUv *suv; + SlideData *sld = t->customData; + int uvlay_idx; + + //BLI_ghash_free(edgesgh, freeGHash, NULL); + BLI_ghash_free(sld->vhash, NULL, (GHashValFreeFP)MEM_freeN); + BLI_linklist_free(sld->vertlist, NULL); + BLI_linklist_free(sld->edgelist, NULL); + + if (sld->uvlay_tot) { + for (uvlay_idx=0; uvlay_idx<sld->uvlay_tot; uvlay_idx++) { + BLI_ghash_free(sld->uvhash[uvlay_idx], NULL, NULL); + } + + suv = sld->suv_last-1; + while (suv >= sld->slideuv) { + if (suv->fuv_list) { + BLI_linklist_free(suv->fuv_list,NULL); + } + suv--; + } + + MEM_freeN(sld->slideuv); + MEM_freeN(sld->uvhash); + } + + MEM_freeN(sld); + t->customData = NULL; +} + +void initEdgeSlide(TransInfo *t) +{ + SlideData *sld; + + t->mode = TFM_EDGE_SLIDE; + t->transform = EdgeSlide; + + createSlideVerts(t); + sld = t->customData; + + if (!sld) + return; + + t->customFree = freeSlideVerts; + + initMouseInputMode(t, &t->mouse, INPUT_CUSTOM_RATIO); + setCustomPoints(t, &t->mouse, sld->end, sld->start); + + t->idx_max = 0; + t->num.idx_max = 0; + t->snap[0] = 0.0f; + t->snap[1] = (float)((5.0/180)*M_PI); + t->snap[2] = t->snap[1] * 0.2f; + + t->flag |= T_NO_CONSTRAINT; +} + +int doEdgeSlide(TransInfo *t, float perc) +{ + Mesh *me= t->obedit->data; + EditMesh *em = me->edit_mesh; + SlideData *sld = t->customData; + EditEdge *first=NULL,*last=NULL, *temp = NULL; + EditVert *ev, *nearest = sld->nearest; + EditVert *centerVert, *upVert, *downVert; + LinkNode *edgelist = sld->edgelist, *vertlist=sld->vertlist, *look; + GHash *vertgh = sld->vhash; + TransDataSlideVert *tempsv; + float shiftlabda= 0.0f,len = 0.0f; + int i = 0, numadded=0, timesthrough = 0, vertsel=0, prop=1, cancel = 0,flip=0; + int wasshift = 0; + /* UV correction vars */ + GHash **uvarray= sld->uvhash; + int uvlay_tot= CustomData_number_of_layers(&em->fdata, CD_MTFACE); + int uvlay_idx; + TransDataSlideUv *slideuvs=sld->slideuv, *suv=sld->slideuv, *suv_last=NULL; + float uv_tmp[2]; + LinkNode *fuv_link; + float labda = 0.0f; + + len = 0.0f; + + tempsv = BLI_ghash_lookup(vertgh,nearest); + + centerVert = editedge_getSharedVert(tempsv->up, tempsv->down); + upVert = editedge_getOtherVert(tempsv->up, centerVert); + downVert = editedge_getOtherVert(tempsv->down, centerVert); + + len = MIN2(perc, VecLenf(upVert->co,downVert->co)); + len = MAX2(len, 0); + + //Adjust Edgeloop + if(prop) { + look = vertlist; + while(look) { + EditVert *tempev; + ev = look->link; + tempsv = BLI_ghash_lookup(vertgh,ev); + + tempev = editedge_getOtherVert((perc>=0)?tempsv->up:tempsv->down, ev); + VecLerpf(ev->co, tempsv->origvert.co, tempev->co, fabs(perc)); + + if (uvlay_tot) { // XXX scene->toolsettings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT) { + for (uvlay_idx=0; uvlay_idx<uvlay_tot; uvlay_idx++) { + suv = BLI_ghash_lookup( uvarray[uvlay_idx], ev ); + if (suv && suv->fuv_list && suv->uv_up && suv->uv_down) { + Vec2Lerpf(uv_tmp, suv->origuv, (perc>=0)?suv->uv_up:suv->uv_down, fabs(perc)); + fuv_link = suv->fuv_list; + while (fuv_link) { + VECCOPY2D(((float *)fuv_link->link), uv_tmp); + fuv_link = fuv_link->next; + } + } + } + } + + look = look->next; + } + } + else { + //Non prop code + look = vertlist; + while(look) { + float newlen; + ev = look->link; + tempsv = BLI_ghash_lookup(vertgh,ev); + newlen = (len / VecLenf(editedge_getOtherVert(tempsv->up,ev)->co,editedge_getOtherVert(tempsv->down,ev)->co)); + if(newlen > 1.0) {newlen = 1.0;} + if(newlen < 0.0) {newlen = 0.0;} + if(flip == 0) { + VecLerpf(ev->co, editedge_getOtherVert(tempsv->down,ev)->co, editedge_getOtherVert(tempsv->up,ev)->co, fabs(newlen)); + if (uvlay_tot) { // XXX scene->toolsettings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT) { + /* dont do anything if no UVs */ + for (uvlay_idx=0; uvlay_idx<uvlay_tot; uvlay_idx++) { + suv = BLI_ghash_lookup( uvarray[uvlay_idx], ev ); + if (suv && suv->fuv_list && suv->uv_up && suv->uv_down) { + Vec2Lerpf(uv_tmp, suv->uv_down, suv->uv_up, fabs(newlen)); + fuv_link = suv->fuv_list; + while (fuv_link) { + VECCOPY2D(((float *)fuv_link->link), uv_tmp); + fuv_link = fuv_link->next; + } + } + } + } + } else{ + VecLerpf(ev->co, editedge_getOtherVert(tempsv->up,ev)->co, editedge_getOtherVert(tempsv->down,ev)->co, fabs(newlen)); + + if (uvlay_tot) { // XXX scene->toolsettings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT) { + /* dont do anything if no UVs */ + for (uvlay_idx=0; uvlay_idx<uvlay_tot; uvlay_idx++) { + suv = BLI_ghash_lookup( uvarray[uvlay_idx], ev ); + if (suv && suv->fuv_list && suv->uv_up && suv->uv_down) { + Vec2Lerpf(uv_tmp, suv->uv_up, suv->uv_down, fabs(newlen)); + fuv_link = suv->fuv_list; + while (fuv_link) { + VECCOPY2D(((float *)fuv_link->link), uv_tmp); + fuv_link = fuv_link->next; + } + } + } + } + } + look = look->next; + } + + } + + return 1; +} + +int EdgeSlide(TransInfo *t, short mval[2]) +{ + TransData *td = t->data; + char str[50]; + float final; + + final = t->values[0]; + + snapGrid(t, &final); + + if (hasNumInput(&t->num)) { + char c[20]; + + applyNumInput(&t->num, &final); + + outputNumInput(&(t->num), c); + + sprintf(str, "Edge Slide Percent: %s", &c[0]); + } + else { + sprintf(str, "Edge Slide Percent: %.2f", final); + } + + CLAMP(final, -1.0f, 1.0f); + + /*do stuff here*/ + if (t->customData) + doEdgeSlide(t, final); + else { + strcpy(str, "Invalid Edge Selection"); + t->state = TRANS_CANCEL; + } recalcData(t); @@ -4029,7 +4617,6 @@ int BoneEnvelope(TransInfo *t, short mval[2]) return 1; } - /* ******************** EditBone roll *************** */ void initBoneRoll(TransInfo *t) diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index e5bd405c0cd..2c19bf932eb 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -32,10 +32,13 @@ #include "ED_transform.h" +#include "BLI_editVert.h" + /* ************************** Types ***************************** */ struct TransInfo; struct TransData; +struct TransformOrientation; struct TransSnap; struct NumInput; struct Object; @@ -52,6 +55,7 @@ struct bContext; struct wmEvent; struct wmTimer; struct ARegion; +struct ReportList; typedef struct NDofInput { int flag; @@ -118,20 +122,9 @@ typedef struct TransCon { /* Apply function pointer for rotation transformation */ } TransCon; -typedef struct TransDataIpokey { - int flag; /* which keys */ - float *locx, *locy, *locz; /* channel pointers */ - float *rotx, *roty, *rotz; - float *quatx, *quaty, *quatz, *quatw; - float *sizex, *sizey, *sizez; - float oldloc[9]; /* storage old values */ - float oldrot[9]; - float oldsize[9]; - float oldquat[12]; -} TransDataIpokey; - typedef struct TransDataExtension { float drot[3]; /* Initial object drot */ + float dquat[4]; /* Initial object dquat */ float dsize[3]; /* Initial object dsize */ float *rot; /* Rotation of the data to transform (Faculative) */ float irot[3]; /* Initial rotation */ @@ -179,6 +172,31 @@ typedef struct TransDataNla { int handle; /* handle-index: 0 for dummy entry, -1 for start, 1 for end, 2 for both ends */ } TransDataNla; +struct LinkNode; +struct EditEdge; +struct EditVert; +struct GHash; +typedef struct TransDataSlideUv { + float origuv[2]; + float *uv_up, *uv_down; + //float *fuv[4]; + struct LinkNode *fuv_list; +} TransDataSlideUv; + +typedef struct TransDataSlideVert { + struct EditEdge *up, *down; + struct EditVert origvert; +} TransDataSlideVert; + +typedef struct SlideData { + TransDataSlideUv *slideuv, *suv_last; + int totuv, uvlay_tot; + struct GHash *vhash, **uvhash; + struct EditVert *nearest; + struct LinkNode *edgelist, *vertlist; + short start[2], end[2]; +} SlideData; + typedef struct TransData { float dist; /* Distance needed to affect element (for Proportionnal Editing) */ float rdist; /* Distance to the nearest element (for Proportionnal Editing) */ @@ -194,7 +212,6 @@ typedef struct TransData { struct Object *ob; struct bConstraint *con; /* for objects/bones, the first constraint in its constraint stack */ TransDataExtension *ext; /* for objects, poses. 1 single malloc per TransInfo! */ - TransDataIpokey *tdi; /* for objects, ipo keys. per transdata a malloc */ TransDataCurveHandleFlags *hdata; /* for curves, stores handle flags for modification/cancel */ void *extra; /* extra data (mirrored element pointer, in editmode mesh to EditVert) (editbone for roll fixing) (...) */ short flag; /* Various flags */ @@ -210,6 +227,7 @@ typedef struct MouseInput { short precision_mval[2]; /* mouse position when precision key was pressed */ int center[2]; float factor; + void *data; /* additional data, if needed by the particular function */ } MouseInput; typedef struct TransInfo { @@ -263,6 +281,7 @@ typedef struct TransInfo { struct Object *poseobj; /* if t->flag & T_POSE, this denotes pose object */ void *customData; /* Per Transform custom data */ + void (*customFree)(struct TransInfo *); /* if a special free function is needed */ /*************** NEW STUFF *********************/ @@ -466,6 +485,9 @@ int BoneEnvelope(TransInfo *t, short mval[2]); void initBoneRoll(TransInfo *t); int BoneRoll(TransInfo *t, short mval[2]); +void initEdgeSlide(TransInfo *t); +int EdgeSlide(TransInfo *t, short mval[2]); + void initTimeTranslate(TransInfo *t); int TimeTranslate(TransInfo *t, short mval[2]); @@ -575,7 +597,8 @@ typedef enum { INPUT_HORIZONTAL_RATIO, INPUT_HORIZONTAL_ABSOLUTE, INPUT_VERTICAL_RATIO, - INPUT_VERTICAL_ABSOLUTE + INPUT_VERTICAL_ABSOLUTE, + INPUT_CUSTOM_RATIO } MouseInputMode; void initMouseInput(TransInfo *t, MouseInput *mi, int center[2], short mval[2]); @@ -583,6 +606,8 @@ void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode); int handleMouseInput(struct TransInfo *t, struct MouseInput *mi, struct wmEvent *event); void applyMouseInput(struct TransInfo *t, struct MouseInput *mi, short mval[2], float output[3]); +void setCustomPoints(TransInfo *t, MouseInput *mi, short start[2], short end[2]); + /*********************** Generics ********************************/ int initTransInfo(struct bContext *C, TransInfo *t, struct wmOperator *op, struct wmEvent *event); @@ -640,18 +665,17 @@ int handleNDofInput(NDofInput *n, struct wmEvent *event); void initTransformOrientation(struct bContext *C, TransInfo *t); -int manageObjectSpace(struct bContext *C, int confirm, int set); -int manageMeshSpace(struct bContext *C, int confirm, int set); -int manageBoneSpace(struct bContext *C, int confirm, int set); +struct TransformOrientation *createObjectSpace(struct bContext *C, struct ReportList *reports, char *name, int overwrite); +struct TransformOrientation *createMeshSpace(struct bContext *C, struct ReportList *reports, char *name, int overwrite); +struct TransformOrientation *createBoneSpace(struct bContext *C, struct ReportList *reports, char *name, int overwrite); /* Those two fill in mat and return non-zero on success */ int createSpaceNormal(float mat[3][3], float normal[3]); int createSpaceNormalTangent(float mat[3][3], float normal[3], float tangent[3]); -int addMatrixSpace(struct bContext *C, float mat[3][3], char name[]); +struct TransformOrientation *addMatrixSpace(struct bContext *C, float mat[3][3], char name[], int overwrite); int addObjectSpace(struct bContext *C, struct Object *ob); -void applyTransformOrientation(const struct bContext *C, TransInfo *t); - +void applyTransformOrientation(const struct bContext *C, float mat[3][3], char *name); #define ORIENTATION_NONE 0 #define ORIENTATION_NORMAL 1 @@ -663,6 +687,8 @@ int getTransformOrientation(const struct bContext *C, float normal[3], float pla int createSpaceNormal(float mat[3][3], float normal[3]); int createSpaceNormalTangent(float mat[3][3], float normal[3], float tangent[3]); +void freeSlideVerts(TransInfo *t); + #endif diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 6386c0d4eb7..f6d30a7bec9 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -379,7 +379,6 @@ static void createTransEdge(bContext *C, TransInfo *t) { Mat3CpyMat3(td->mtx, mtx); td->ext = NULL; - td->tdi = NULL; if (t->mode == TFM_BWEIGHT) { td->val = &(eed->bweight); td->ival = eed->bweight; @@ -509,7 +508,7 @@ static short apply_targetless_ik(Object *ob) /* rotation */ if (parchan->rotmode > 0) Mat3ToEulO(rmat3, parchan->eul, parchan->rotmode); - else if (parchan->rotmode == PCHAN_ROT_AXISANGLE) + else if (parchan->rotmode == ROT_MODE_AXISANGLE) Mat3ToAxisAngle(rmat3, &parchan->quat[1], &parchan->quat[0]); else Mat3ToQuat(rmat3, parchan->quat); @@ -519,7 +518,7 @@ static short apply_targetless_ik(Object *ob) if (data->flag & CONSTRAINT_IK_STRETCH) { if (parchan->rotmode > 0) EulOToMat3(parchan->eul, parchan->rotmode, qrmat); - else if (parchan->rotmode == PCHAN_ROT_AXISANGLE) + else if (parchan->rotmode == ROT_MODE_AXISANGLE) AxisAngleToMat3(&parchan->quat[1], parchan->quat[0], qrmat); else QuatToMat3(parchan->quat, qrmat); @@ -556,10 +555,6 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr td->ob = ob; td->flag = TD_SELECTED; - if (pchan->rotmode == PCHAN_ROT_QUAT) - { - td->flag |= TD_USEQUAT; - } if (bone->flag & BONE_HINGE_CHILD_TRANSFORM) { td->flag |= TD_NOCENTER; @@ -584,15 +579,14 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr td->ext->quat= NULL; VECCOPY(td->ext->irot, pchan->eul); - td->rotOrder= pchan->rotmode; } else { td->ext->rot= NULL; td->ext->quat= pchan->quat; QUATCOPY(td->ext->iquat, pchan->quat); - td->rotOrder= pchan->rotmode; } + td->rotOrder= pchan->rotmode; /* proper way to get parent transform + own transform + constraints transform */ @@ -1016,7 +1010,6 @@ static void createTransPose(bContext *C, TransInfo *t, Object *ob) tdx = t->ext = MEM_callocN(t->total*sizeof(TransDataExtension), "TransPoseBoneExt"); for(i=0; i<t->total; i++, td++, tdx++) { td->ext= tdx; - td->tdi = NULL; td->val = NULL; } @@ -1100,7 +1093,6 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t) td->loc = NULL; td->ext = NULL; - td->tdi = NULL; td++; } @@ -1116,7 +1108,6 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t) td->loc = NULL; td->ext = NULL; - td->tdi = NULL; td++; } @@ -1151,7 +1142,6 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t) Mat3Ortho(td->axismtx); td->ext = NULL; - td->tdi = NULL; td++; } @@ -1168,7 +1158,6 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t) td->flag= TD_SELECTED; td->ext = NULL; - td->tdi = NULL; td++; } @@ -1196,7 +1185,6 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t) } td->ext = NULL; - td->tdi = NULL; td->val = NULL; td++; @@ -1219,7 +1207,6 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t) td->extra = ebo; /* to fix roll */ td->ext = NULL; - td->tdi = NULL; td->val = NULL; td++; @@ -1272,7 +1259,6 @@ static void createTransMBallVerts(bContext *C, TransInfo *t) Mat3CpyMat3(td->mtx, mtx); td->ext = tx; - td->tdi = NULL; /* Radius of MetaElem (mass of MetaElem influence) */ if(ml->flag & MB_SCALE_RAD){ @@ -1437,7 +1423,6 @@ static void createTransCurveVerts(bContext *C, TransInfo *t) else td->flag= 0; } td->ext = NULL; - td->tdi = NULL; td->val = NULL; hdata = initTransDataCurveHandes(td, bezt); @@ -1458,7 +1443,6 @@ static void createTransCurveVerts(bContext *C, TransInfo *t) if(bezt->f2 & SELECT) td->flag= TD_SELECTED; else td->flag= 0; td->ext = NULL; - td->tdi = NULL; if (t->mode==TFM_CURVE_SHRINKFATTEN) { /* || t->mode==TFM_RESIZE) {*/ /* TODO - make points scale */ td->val = &(bezt->radius); @@ -1498,7 +1482,6 @@ static void createTransCurveVerts(bContext *C, TransInfo *t) else td->flag= 0; } td->ext = NULL; - td->tdi = NULL; td->val = NULL; if (hdata==NULL) { /* if the handle was not saved by the previous handle */ @@ -1538,7 +1521,6 @@ static void createTransCurveVerts(bContext *C, TransInfo *t) if(bp->f1 & SELECT) td->flag= TD_SELECTED; else td->flag= 0; td->ext = NULL; - td->tdi = NULL; if (t->mode==TFM_CURVE_SHRINKFATTEN || t->mode==TFM_RESIZE) { td->val = &(bp->radius); @@ -1614,7 +1596,6 @@ static void createTransLatticeVerts(bContext *C, TransInfo *t) Mat3CpyMat3(td->mtx, mtx); td->ext = NULL; - td->tdi = NULL; td->val = NULL; td++; @@ -1725,7 +1706,6 @@ static void createTransParticleVerts(bContext *C, TransInfo *t) td->ob = ob; td->ext = tx; - td->tdi = NULL; if(t->mode == TFM_BAKE_TIME) { td->val = key->time; td->ival = *(key->time); @@ -1949,7 +1929,6 @@ static void VertsToTransData(TransInfo *t, TransData *td, EditMesh *em, EditVert td->axismtx[1][2] = 0.0f; td->ext = NULL; - td->tdi = NULL; td->val = NULL; td->extra = NULL; if (t->mode == TFM_BWEIGHT) { @@ -2429,7 +2408,7 @@ static void UVsToTransData(SpaceImage *sima, TransData *td, TransData2D *td2d, f memset(td->axismtx, 0, sizeof(td->axismtx)); td->axismtx[2][2] = 1.0f; - td->ext= NULL; td->tdi= NULL; td->val= NULL; + td->ext= NULL; td->val= NULL; if(selected) { td->flag |= TD_SELECTED; @@ -2729,7 +2708,7 @@ static void createTransNlaData(bContext *C, TransInfo *t) memset(td->axismtx, 0, sizeof(td->axismtx)); td->axismtx[2][2] = 1.0f; - td->ext= NULL; td->tdi= NULL; td->val= NULL; + td->ext= NULL; td->val= NULL; td->flag |= TD_SELECTED; td->dist= 0.0f; @@ -2760,7 +2739,7 @@ static void createTransNlaData(bContext *C, TransInfo *t) memset(td->axismtx, 0, sizeof(td->axismtx)); td->axismtx[2][2] = 1.0f; - td->ext= NULL; td->tdi= NULL; td->val= NULL; + td->ext= NULL; td->val= NULL; td->flag |= TD_SELECTED; td->dist= 0.0f; @@ -3311,7 +3290,7 @@ static void bezt_to_transdata (TransData *td, TransData2D *td2d, AnimData *adt, memset(td->axismtx, 0, sizeof(td->axismtx)); td->axismtx[2][2] = 1.0f; - td->ext= NULL; td->tdi= NULL; td->val= NULL; + td->ext= NULL; td->val= NULL; /* store AnimData info in td->extra, for applying mapping when flushing */ td->extra= adt; @@ -3744,98 +3723,6 @@ void flushTransGraphData(TransInfo *t) } } -/* **************** IpoKey stuff, for Object TransData ********** */ - -/* while transforming */ -void add_tdi_poin(float *poin, float *old, float delta) -{ - if(poin) { - poin[0]= old[0]+delta; - poin[-3]= old[3]+delta; - poin[3]= old[6]+delta; - } -} - -#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 - TransDataIpokey *tdi= td->tdi; - BezTriple *bezt; - int a, delta= 0; - - td->val= NULL; // is read on ESC - - for(a=0; a<OB_TOTIPO; a++) { - if(ik->data[a]) { - bezt= ik->data[a]; - - switch( ob_ar[a] ) { - case OB_LOC_X: - case OB_DLOC_X: - tdi->locx= &(bezt->vec[1][1]); break; - case OB_LOC_Y: - case OB_DLOC_Y: - tdi->locy= &(bezt->vec[1][1]); break; - case OB_LOC_Z: - case OB_DLOC_Z: - tdi->locz= &(bezt->vec[1][1]); break; - - case OB_DROT_X: - delta= 1; - case OB_ROT_X: - tdi->rotx= &(bezt->vec[1][1]); break; - case OB_DROT_Y: - delta= 1; - case OB_ROT_Y: - tdi->roty= &(bezt->vec[1][1]); break; - case OB_DROT_Z: - delta= 1; - case OB_ROT_Z: - tdi->rotz= &(bezt->vec[1][1]); break; - - case OB_SIZE_X: - case OB_DSIZE_X: - tdi->sizex= &(bezt->vec[1][1]); break; - case OB_SIZE_Y: - case OB_DSIZE_Y: - tdi->sizey= &(bezt->vec[1][1]); break; - case OB_SIZE_Z: - case OB_DSIZE_Z: - tdi->sizez= &(bezt->vec[1][1]); break; - } - } - } - - /* oldvals for e.g. undo */ - if(tdi->locx) set_tdi_old(tdi->oldloc, tdi->locx); - if(tdi->locy) set_tdi_old(tdi->oldloc+1, tdi->locy); - if(tdi->locz) set_tdi_old(tdi->oldloc+2, tdi->locz); - - /* remember, for mapping curves ('1'=10 degrees) */ - if(tdi->rotx) set_tdi_old(tdi->oldrot, tdi->rotx); - if(tdi->roty) set_tdi_old(tdi->oldrot+1, tdi->roty); - if(tdi->rotz) set_tdi_old(tdi->oldrot+2, tdi->rotz); - - /* this is not allowed to be dsize! */ - if(tdi->sizex) set_tdi_old(tdi->oldsize, tdi->sizex); - if(tdi->sizey) set_tdi_old(tdi->oldsize+1, tdi->sizey); - if(tdi->sizez) set_tdi_old(tdi->oldsize+2, tdi->sizez); - - tdi->flag= TOB_IPO; - if(delta) tdi->flag |= TOB_IPODROT; -} -#endif - /* *************************** Object Transform data ******************* */ /* Little helper function for ObjectToTransData used to give certain @@ -4053,7 +3940,7 @@ static TransData *SeqToTransData(TransInfo *t, TransData *td, TransData2D *td2d, memset(td->axismtx, 0, sizeof(td->axismtx)); td->axismtx[2][2] = 1.0f; - td->ext= NULL; td->tdi= NULL; td->val= NULL; + td->ext= NULL; td->val= NULL; td->flag |= TD_SELECTED; td->dist= 0.0; @@ -4194,20 +4081,20 @@ static void ObjectToTransData(bContext *C, TransInfo *t, TransData *td, Object * if (skip_invert == 0 && (ob->track || constinv==0)) { track= ob->track; ob->track= NULL; - + if (constinv == 0) { fakecons.first = ob->constraints.first; fakecons.last = ob->constraints.last; ob->constraints.first = ob->constraints.last = NULL; } - + where_is_object(t->scene, ob); - + if (constinv == 0) { ob->constraints.first = fakecons.first; ob->constraints.last = fakecons.last; } - + ob->track= track; } else @@ -4221,6 +4108,10 @@ static void ObjectToTransData(bContext *C, TransInfo *t, TransData *td, Object * td->ext->rot = ob->rot; VECCOPY(td->ext->irot, ob->rot); VECCOPY(td->ext->drot, ob->drot); + + td->ext->quat = ob->quat; + QUATCOPY(td->ext->iquat, ob->quat); + QUATCOPY(td->ext->dquat, ob->dquat); td->ext->size = ob->size; VECCOPY(td->ext->isize, ob->size); @@ -4262,7 +4153,7 @@ static void ObjectToTransData(bContext *C, TransInfo *t, TransData *td, Object * /* it deselects Bases, so we have to call the clear function always after */ static void set_trans_object_base_flags(bContext *C, TransInfo *t) { - Scene *sce = CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); View3D *v3d = t->view; /* @@ -4279,15 +4170,15 @@ static void set_trans_object_base_flags(bContext *C, TransInfo *t) copy_baseflags(t->scene); /* handle pending update events, otherwise they got copied below */ - for (base= sce->base.first; base; base= base->next) { + for (base= scene->base.first; base; base= base->next) { if(base->object->recalc) object_handle_update(t->scene, base->object); } - for (base= sce->base.first; base; base= base->next) { + for (base= scene->base.first; base; base= base->next) { base->flag &= ~BA_WAS_SEL; - if(TESTBASELIB(v3d, base)) { + if(TESTBASELIB_BGMODE(v3d, base)) { Object *ob= base->object; Object *parsel= ob->parent; @@ -4319,7 +4210,7 @@ static void set_trans_object_base_flags(bContext *C, TransInfo *t) /* and we store them temporal in base (only used for transform code) */ /* this because after doing updates, the object->recalc is cleared */ - for (base= sce->base.first; base; base= base->next) { + for (base= scene->base.first; base; base= base->next) { if(base->object->recalc & OB_RECALC_OB) base->flag |= BA_HAS_RECALC_OB; if(base->object->recalc & OB_RECALC_DATA) @@ -4516,15 +4407,16 @@ void autokeyframe_pose_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode, 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); + // FIXME: better to just use the keyingsets for this instead... + if (pchan->rotmode == ROT_MODE_QUAT) { + sprintf(buf, "pose.pose_channels[\"%s\"].rotation_quaternion", pchan->name); 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); + sprintf(buf, "pose.pose_channels[\"%s\"].rotation_euler", pchan->name); 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); @@ -4544,7 +4436,8 @@ void autokeyframe_pose_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode, 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) { + // FIXME: better to just use the keyingsets for this instead... + if (pchan->rotmode == ROT_MODE_QUAT) { sprintf(buf, "pose.pose_channels[\"%s\"].rotation", pchan->name); insert_keyframe(id, NULL, pchan->name, buf, 0, cfra, flag); insert_keyframe(id, NULL, pchan->name, buf, 1, cfra, flag); @@ -4552,7 +4445,7 @@ void autokeyframe_pose_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode, insert_keyframe(id, NULL, pchan->name, buf, 3, cfra, flag); } else { - sprintf(buf, "pose.pose_channels[\"%s\"].euler_rotation", pchan->name); + sprintf(buf, "pose.pose_channels[\"%s\"].rotation_euler", pchan->name); 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); @@ -4932,7 +4825,7 @@ void special_aftertrans_update(TransInfo *t) // allqueue(REDRAWBUTSEDIT, 0); } - else if(t->scene->basact && (ob = t->scene->basact->object) && ob->mode & OB_MODE_PARTICLE_EDIT) { + else if(t->scene->basact && (ob = t->scene->basact->object) && (ob->mode & OB_MODE_PARTICLE_EDIT) && PE_get_current(t->scene, ob)) { ; } else { @@ -4946,8 +4839,19 @@ void special_aftertrans_update(TransInfo *t) ob= base->object; if (base->flag & SELECT && (t->mode != TFM_DUMMY)) { + ListBase pidlist; + PTCacheID *pid; + + /* flag object caches as outdated */ + BKE_ptcache_ids_from_object(&pidlist, ob); + for(pid=pidlist.first; pid; pid=pid->next) { + if(pid->type != PTCACHE_TYPE_PARTICLES) /* particles don't need reset on geometry change */ + pid->cache->flag |= PTCACHE_OUTDATED; + } + BLI_freelistN(&pidlist); + /* pointcache refresh */ - if (BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_DEPSGRAPH)) + if (BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_OUTDATED)) ob->recalc |= OB_RECALC_DATA; /* Needed for proper updating of "quick cached" dynamics. */ @@ -4991,30 +4895,7 @@ static void createTransObject(bContext *C, TransInfo *t) set_trans_object_base_flags(C, t); /* count */ -#if 0 // TRANSFORM_FIX_ME - CTX_DATA_BEGIN(C, Object*, ob, selected_objects) - { - /* store ipo keys? */ - if ((ob->id.lib == 0) && (ob->ipo) && (ob->ipo->showkey) && (ob->ipoflag & OB_DRAWKEY)) { - elems.first= elems.last= NULL; - make_ipokey_transform(ob, &elems, 1); /* '1' only selected keys */ - - pushdata(&elems, sizeof(ListBase)); - - for(ik= elems.first; ik; ik= ik->next) - t->total++; - - if(elems.first==NULL) - t->total++; - } -// else { - t->total++; -// } - } - CTX_DATA_END; -#else t->total= CTX_DATA_COUNT(C, selected_objects); -#endif if(!t->total) { /* clear here, main transform function escapes too */ @@ -5028,92 +4909,27 @@ static void createTransObject(bContext *C, TransInfo *t) CTX_DATA_BEGIN(C, Base*, base, selected_bases) { Object *ob= base->object; - + td->flag = TD_SELECTED; td->protectflag= ob->protectflag; td->ext = tx; - + td->rotOrder= ob->rotmode; + if (base->flag & BA_TRANSFORM_CHILD) { td->flag |= TD_NOCENTER; td->flag |= TD_NO_LOC; } - + /* select linked objects, but skip them later */ if (ob->id.lib != 0) { td->flag |= TD_SKIP; } - - /* store ipo keys? */ - // TRANSFORM_FIX_ME -#if 0 - if((ob->id.lib == 0) && (ob->ipo) && (ob->ipo->showkey) && (ob->ipoflag & OB_DRAWKEY)) { - - popfirst(&elems); // bring back pushed listbase - - if(elems.first) { - int cfraont; - int ipoflag; - - base->flag |= BA_DO_IPO+BA_WAS_SEL; - base->flag &= ~SELECT; - - cfraont= CFRA; - set_no_parent_ipo(1); - ipoflag= ob->ipoflag; - ob->ipoflag &= ~OB_OFFS_OB; - - /* - * This is really EVIL code that pushes down Object values - * (loc, dloc, orig, size, dsize, rot, drot) - * */ - - pushdata((void*)ob->loc, 7 * 3 * sizeof(float)); // tsk! tsk! - - for(ik= elems.first; ik; ik= ik->next) { - - /* weak... this doesn't correct for floating values, giving small errors */ - CFRA= (int)(ik->val/t->scene->r.framelen); - - do_ob_ipo(ob); - ObjectToTransData(C, t, td, ob); // does where_is_object() - - td->flag= TD_SELECTED; - - td->tdi= MEM_callocN(sizeof(TransDataIpokey), "TransDataIpokey"); - /* also does tdi->flag and oldvals, needs to be after ob_to_transob()! */ - ipokey_to_transdata(ik, td); - - td++; - tx++; - if(ik->next) td->ext= tx; // prevent corrupting mem! - } - free_ipokey(&elems); - - poplast(ob->loc); - set_no_parent_ipo(0); - - CFRA= cfraont; - ob->ipoflag= ipoflag; - - where_is_object(t->scene, ob); // restore - } - else { - ObjectToTransData(C, t, td, ob); - td->tdi = NULL; - td->val = NULL; - td++; - tx++; - } - } -#endif -// else { - ObjectToTransData(C, t, td, ob); - td->tdi = NULL; - td->val = NULL; - td++; - tx++; -// } + + ObjectToTransData(C, t, td, ob); + td->val = NULL; + td++; + tx++; } CTX_DATA_END; } @@ -5135,7 +4951,7 @@ static void NodeToTransData(TransData *td, TransData2D *td2d, bNode *node) memset(td->axismtx, 0, sizeof(td->axismtx)); td->axismtx[2][2] = 1.0f; - td->ext= NULL; td->tdi= NULL; td->val= NULL; + td->ext= NULL; td->val= NULL; td->flag |= TD_SELECTED; td->dist= 0.0; @@ -5279,7 +5095,7 @@ void createTransData(bContext *C, TransInfo *t) { if(ob_armature->type==OB_ARMATURE) { - if(ob_armature->mode & OB_MODE_POSE) + if((ob_armature->mode & OB_MODE_POSE) && ob_armature == modifiers_isDeformedByArmature(ob)) { createTransPose(C, t, ob_armature); break; @@ -5302,6 +5118,8 @@ void createTransData(bContext *C, TransInfo *t) } else { t->flag &= ~T_PROP_EDIT; /* no proportional edit in object mode */ + t->options |= CTX_NO_PET; + createTransObject(C, t); t->flag |= T_OBJECT; @@ -5309,7 +5127,7 @@ void createTransData(bContext *C, TransInfo *t) { View3D *v3d = t->view; RegionView3D *rv3d = CTX_wm_region_view3d(C); - if((t->flag & T_OBJECT) && v3d->camera == OBACT && rv3d->persp==V3D_CAMOB) + if(rv3d && (t->flag & T_OBJECT) && v3d->camera == OBACT && rv3d->persp==V3D_CAMOB) { t->flag |= T_CAMERA; } diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 0b7029adde0..6637122ffb8 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -92,6 +92,7 @@ #include "ED_markers.h" #include "ED_mesh.h" #include "ED_retopo.h" +#include "ED_particle.h" #include "ED_screen_types.h" #include "ED_space_api.h" #include "ED_uvedit.h" @@ -125,19 +126,19 @@ void getViewVector(TransInfo *t, float coord[3], float vec[3]) if (t->persp != V3D_ORTHO) { float p1[4], p2[4]; - + VECCOPY(p1, coord); p1[3] = 1.0f; VECCOPY(p2, p1); p2[3] = 1.0f; Mat4MulVec4fl(t->viewmat, p2); - + p2[0] = 2.0f * p2[0]; p2[1] = 2.0f * p2[1]; p2[2] = 2.0f * p2[2]; - + Mat4MulVec4fl(t->viewinv, p2); - + VecSubf(vec, p1, p2); } else { @@ -153,11 +154,11 @@ static void clipMirrorModifier(TransInfo *t, Object *ob) ModifierData *md= ob->modifiers.first; float tolerance[3] = {0.0f, 0.0f, 0.0f}; int axis = 0; - + for (; md; md=md->next) { if (md->type==eModifierType_Mirror) { MirrorModifierData *mmd = (MirrorModifierData*) md; - + if(mmd->flag & MOD_MIR_CLIPPING) { axis = 0; if(mmd->flag & MOD_MIR_AXIS_X) { @@ -176,35 +177,35 @@ static void clipMirrorModifier(TransInfo *t, Object *ob) float mtx[4][4], imtx[4][4]; int i; TransData *td = t->data; - + if (mmd->mirror_ob) { float obinv[4][4]; - + Mat4Invert(obinv, mmd->mirror_ob->obmat); Mat4MulMat4(mtx, ob->obmat, obinv); Mat4Invert(imtx, mtx); } - + for(i = 0 ; i < t->total; i++, td++) { int clip; float loc[3], iloc[3]; - + if (td->flag & TD_NOACTION) break; if (td->loc==NULL) break; - + if (td->flag & TD_SKIP) continue; - + VecCopyf(loc, td->loc); VecCopyf(iloc, td->iloc); - + if (mmd->mirror_ob) { VecMat4MulVecfl(loc, mtx, loc); VecMat4MulVecfl(iloc, mtx, iloc); } - + clip = 0; if(axis & 1) { if(fabs(iloc[0])<=tolerance[0] || @@ -213,7 +214,7 @@ static void clipMirrorModifier(TransInfo *t, Object *ob) clip = 1; } } - + if(axis & 2) { if(fabs(iloc[1])<=tolerance[1] || loc[1]*iloc[1]<0.0f) { @@ -236,7 +237,7 @@ static void clipMirrorModifier(TransInfo *t, Object *ob) } } } - + } } } @@ -248,7 +249,7 @@ static void editmesh_apply_to_mirror(TransInfo *t) TransData *td = t->data; EditVert *eve; int i; - + for(i = 0 ; i < t->total; i++, td++) { if (td->flag & TD_NOACTION) break; @@ -256,7 +257,7 @@ static void editmesh_apply_to_mirror(TransInfo *t) break; if (td->flag & TD_SKIP) continue; - + eve = td->extra; if(eve) { eve->co[0]= -td->loc[0]; @@ -346,7 +347,7 @@ void recalcData(TransInfo *t) if (t->obedit) { } - else if(base && base->object->mode & OB_MODE_PARTICLE_EDIT) { + else if(base && (base->object->mode & OB_MODE_PARTICLE_EDIT) && PE_get_current(scene, base->object)) { flushTransParticles(t); } if (t->spacetype==SPACE_NODE) { @@ -620,9 +621,9 @@ void recalcData(TransInfo *t) if ELEM(t->obedit->type, OB_CURVE, OB_SURF) { Curve *cu= t->obedit->data; Nurb *nu= cu->editnurb->first; - + DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA); /* sets recalc flags */ - + if (t->state == TRANS_CANCEL) { while(nu) { calchandlesNurb(nu); /* Cant do testhandlesNurb here, it messes up the h1 and h2 flags */ @@ -648,11 +649,11 @@ void recalcData(TransInfo *t) else if (t->obedit->type == OB_MESH) { if(t->spacetype==SPACE_IMAGE) { SpaceImage *sima= t->sa->spacedata.first; - + flushTransUVs(t); if(sima->flag & SI_LIVE_UNWRAP) ED_uvedit_live_unwrap_re_solve(); - + DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA); } else { EditMesh *em = ((Mesh*)t->obedit->data)->edit_mesh; @@ -667,9 +668,9 @@ void recalcData(TransInfo *t) } if((t->options & CTX_NO_MIRROR) == 0 && (t->flag & T_MIRROR)) editmesh_apply_to_mirror(t); - + DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA); /* sets recalc flags */ - + recalc_editnormals(em); } } @@ -679,10 +680,10 @@ void recalcData(TransInfo *t) EditBone *ebo; TransData *td = t->data; int i; - + /* Ensure all bones are correctly adjusted */ for (ebo = edbo->first; ebo; ebo = ebo->next){ - + if ((ebo->flag & BONE_CONNECTED) && ebo->parent){ /* If this bone has a parent tip that has been moved */ if (ebo->parent->flag & BONE_TIPSEL){ @@ -695,7 +696,7 @@ void recalcData(TransInfo *t) if(t->mode==TFM_BONE_ENVELOPE) ebo->parent->rad_tail= ebo->rad_head; } } - + /* on extrude bones, oldlength==0.0f, so we scale radius of points */ ebo->length= VecLenf(ebo->head, ebo->tail); if(ebo->oldlength==0.0f) { @@ -715,8 +716,8 @@ void recalcData(TransInfo *t) ebo->oldlength= ebo->length; } } - - + + if (t->mode != TFM_BONE_ROLL) { /* fix roll */ @@ -726,10 +727,10 @@ void recalcData(TransInfo *t) { float vec[3], up_axis[3]; float qrot[4]; - + ebo = td->extra; VECCOPY(up_axis, td->axismtx[2]); - + if (t->mode != TFM_ROTATION) { VecSubf(vec, ebo->tail, ebo->head); @@ -741,15 +742,15 @@ void recalcData(TransInfo *t) { Mat3MulVecfl(t->mat, up_axis); } - + ebo->roll = ED_rollBoneToVector(ebo, up_axis); } } } - + if(arm->flag & ARM_MIRROR_EDIT) transform_armature_mirror_update(t->obedit); - + } else DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA); /* sets recalc flags */ @@ -757,7 +758,7 @@ void recalcData(TransInfo *t) else if( (t->flag & T_POSE) && t->poseobj) { Object *ob= t->poseobj; bArmature *arm= ob->data; - + /* if animtimer is running, and the object already has animation data, * check if the auto-record feature means that we should record 'samples' * (i.e. uneditable animation values) @@ -769,7 +770,7 @@ void recalcData(TransInfo *t) animrecord_check_state(t->scene, &ob->id, t->animtimer); autokeyframe_pose_cb_func(t->scene, (View3D *)t->view, ob, t->mode, targetless_ik); } - + /* old optimize trick... this enforces to bypass the depgraph */ if (!(arm->flag & ARM_DELAYDEFORM)) { DAG_id_flush_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */ @@ -780,13 +781,13 @@ void recalcData(TransInfo *t) else { for(base= FIRSTBASE; base; base= base->next) { Object *ob= base->object; - + /* this flag is from depgraph, was stored in initialize phase, handled in drawview.c */ if(base->flag & BA_HAS_RECALC_OB) ob->recalc |= OB_RECALC_OB; if(base->flag & BA_HAS_RECALC_DATA) ob->recalc |= OB_RECALC_DATA; - + /* if object/base is selected */ if ((base->flag & SELECT) || (ob->flag & SELECT)) { /* if animtimer is running, and the object already has animation data, @@ -799,7 +800,7 @@ void recalcData(TransInfo *t) autokeyframe_ob_cb_func(t->scene, (View3D *)t->view, ob, t->mode); } } - + /* proxy exception */ if(ob->proxy) ob->proxy->recalc |= ob->recalc; @@ -807,7 +808,7 @@ void recalcData(TransInfo *t) group_tag_recalc(ob->proxy_group->dup_group); } } - + /* update shaded drawmode while transform */ if(t->spacetype==SPACE_VIEW3D && ((View3D*)t->view)->drawtype == OB_SHADED) reshadeall_displist(t->scene); @@ -821,18 +822,18 @@ void drawLine(TransInfo *t, float *center, float *dir, char axis, short options) if (t->spacetype == SPACE_VIEW3D) { View3D *v3d = t->view; - + glPushMatrix(); - + //if(t->obedit) glLoadMatrixf(t->obedit->obmat); // sets opengl viewing - - + + VecCopyf(v3, dir); VecMulf(v3, v3d->far); - + VecSubf(v2, center, v3); VecAddf(v1, center, v3); - + if (options & DRAWLIGHT) { col[0] = col[1] = col[2] = 220; } @@ -841,13 +842,13 @@ void drawLine(TransInfo *t, float *center, float *dir, char axis, short options) } UI_make_axis_color(col, col2, axis); glColor3ubv((GLubyte *)col2); - + setlinestyle(0); glBegin(GL_LINE_STRIP); glVertex3fv(v1); glVertex3fv(v2); glEnd(); - + glPopMatrix(); } } @@ -864,33 +865,33 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event) ARegion *ar = CTX_wm_region(C); ScrArea *sa = CTX_wm_area(C); Object *obedit = CTX_data_edit_object(C); - + /* moving: is shown in drawobject() (transform color) */ // TRANSFORM_FIX_ME // if(obedit || (t->flag & T_POSE) ) G.moving= G_TRANSFORM_EDIT; // else if(G.f & G_PARTICLEEDIT) G.moving= G_TRANSFORM_PARTICLE; // else G.moving= G_TRANSFORM_OBJ; - + t->scene = sce; t->sa = sa; t->ar = ar; t->obedit = obedit; t->settings = ts; - + t->data = NULL; t->ext = NULL; - + t->helpline = HLP_NONE; - + t->flag = 0; - + t->redraw = 1; /* redraw first time */ - + if (event) { t->imval[0] = event->x - t->ar->winrct.xmin; t->imval[1] = event->y - t->ar->winrct.ymin; - + t->event_type = event->type; } else @@ -898,45 +899,45 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event) t->imval[0] = 0; t->imval[1] = 0; } - + t->con.imval[0] = t->imval[0]; t->con.imval[1] = t->imval[1]; - + t->mval[0] = t->imval[0]; t->mval[1] = t->imval[1]; - + t->transform = NULL; t->handleEvent = NULL; - + t->total = 0; - + t->val = 0.0f; - + t->vec[0] = t->vec[1] = t->vec[2] = 0.0f; - + t->center[0] = t->center[1] = t->center[2] = 0.0f; - + Mat3One(t->mat); - + t->spacetype = sa->spacetype; if(t->spacetype == SPACE_VIEW3D) { View3D *v3d = sa->spacedata.first; - + t->view = v3d; t->animtimer= CTX_wm_screen(C)->animtimer; - + if(v3d->flag & V3D_ALIGN) t->flag |= T_V3D_ALIGN; t->around = v3d->around; - + if (op && RNA_struct_find_property(op->ptr, "constraint_axis") && RNA_property_is_set(op->ptr, "constraint_orientation")) { t->current_orientation = RNA_enum_get(op->ptr, "constraint_orientation"); - + if (t->current_orientation >= V3D_MANIP_CUSTOM + BIF_countTransformOrientation(C) - 1) { t->current_orientation = V3D_MANIP_GLOBAL; @@ -958,10 +959,10 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event) { // XXX for now, get View2D from the active region t->view = &ar->v2d; - + t->around = V3D_CENTER; } - + if (op && RNA_struct_find_property(op->ptr, "mirror") && RNA_property_is_set(op->ptr, "mirror")) { if (RNA_boolean_get(op->ptr, "mirror")) @@ -977,57 +978,66 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event) t->flag |= T_MIRROR; } } - - /* setting PET flag */ - if (op && RNA_struct_find_property(op->ptr, "proportional") && RNA_property_is_set(op->ptr, "proportional")) + + /* setting PET flag only if property exist in operator. Otherwise, assume it's not supported */ + if (op && RNA_struct_find_property(op->ptr, "proportional")) { - switch(RNA_enum_get(op->ptr, "proportional")) + if (RNA_property_is_set(op->ptr, "proportional")) { - case 2: /* XXX connected constant */ - t->flag |= T_PROP_CONNECTED; - case 1: /* XXX prop on constant */ - t->flag |= T_PROP_EDIT; - break; + switch(RNA_enum_get(op->ptr, "proportional")) + { + case 2: /* XXX connected constant */ + t->flag |= T_PROP_CONNECTED; + case 1: /* XXX prop on constant */ + t->flag |= T_PROP_EDIT; + break; + } } - } - else - { - if ((t->options & CTX_NO_PET) == 0 && (ts->proportional)) { - t->flag |= T_PROP_EDIT; - - if(ts->proportional == 2) - t->flag |= T_PROP_CONNECTED; // yes i know, has to become define + else + { + if ((t->options & CTX_NO_PET) == 0 && (ts->proportional)) { + t->flag |= T_PROP_EDIT; + + if(ts->proportional == 2) + t->flag |= T_PROP_CONNECTED; // yes i know, has to become define + } + } + + if (op && RNA_struct_find_property(op->ptr, "proportional_size") && RNA_property_is_set(op->ptr, "proportional_size")) + { + t->prop_size = RNA_float_get(op->ptr, "proportional_size"); + } + else + { + t->prop_size = ts->proportional_size; + } + + + /* TRANSFORM_FIX_ME rna restrictions */ + if (t->prop_size <= 0) + { + t->prop_size = 1.0f; + } + + if (op && RNA_struct_find_property(op->ptr, "proportional_editing_falloff") && RNA_property_is_set(op->ptr, "proportional_editing_falloff")) + { + t->prop_mode = RNA_enum_get(op->ptr, "proportional_editing_falloff"); + } + else + { + t->prop_mode = ts->prop_mode; } } - - if (op && RNA_struct_find_property(op->ptr, "proportional_size") && RNA_property_is_set(op->ptr, "proportional_size")) - { - t->prop_size = RNA_float_get(op->ptr, "proportional_size"); - } - else - { - t->prop_size = ts->proportional_size; - } - - if (op && RNA_struct_find_property(op->ptr, "proportional_editing_falloff") && RNA_property_is_set(op->ptr, "proportional_editing_falloff")) - { - t->prop_mode = RNA_enum_get(op->ptr, "proportional_editing_falloff"); - } - else - { - t->prop_mode = ts->prop_mode; - } - - /* TRANSFORM_FIX_ME rna restrictions */ - if (t->prop_size <= 0) + else /* add not pet option to context when not available */ { - t->prop_size = 1.0f; + t->options |= CTX_NO_PET; } - + + setTransformViewMatrices(t); initNumInput(&t->num); initNDofInput(&t->ndof); - + return 1; } @@ -1035,45 +1045,53 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event) void postTrans (TransInfo *t) { TransData *td; - + if (t->draw_handle) { ED_region_draw_cb_exit(t->ar->type, t->draw_handle); } - + /* postTrans can be called when nothing is selected, so data is NULL already */ if (t->data) { int a; - + /* since ipokeys are optional on objects, we mallocced them per trans-data */ for(a=0, td= t->data; a<t->total; a++, td++) { - if(td->tdi) MEM_freeN(td->tdi); - if (td->flag & TD_BEZTRIPLE) MEM_freeN(td->hdata); + if (td->flag & TD_BEZTRIPLE) + MEM_freeN(td->hdata); } MEM_freeN(t->data); } - + if (t->ext) MEM_freeN(t->ext); if (t->data2d) { MEM_freeN(t->data2d); t->data2d= NULL; } - + if(t->spacetype==SPACE_IMAGE) { SpaceImage *sima= t->sa->spacedata.first; if(sima->flag & SI_LIVE_UNWRAP) ED_uvedit_live_unwrap_end(t->state == TRANS_CANCEL); } - else if(ELEM(t->spacetype, SPACE_ACTION, SPACE_NLA)) { - if (t->customData) - MEM_freeN(t->customData); + + if (t->mouse.data) + { + MEM_freeN(t->mouse.data); + } + + if (t->customFree) { + t->customFree(t); + } + else if (t->customData) { + MEM_freeN(t->customData); } } void applyTransObjects(TransInfo *t) { TransData *td; - + for (td = t->data; td < t->data + t->total; td++) { VECCOPY(td->iloc, td->loc); if (td->ext->rot) { @@ -1086,16 +1104,6 @@ void applyTransObjects(TransInfo *t) recalcData(t); } -/* helper for below */ -static void restore_ipokey(float *poin, float *old) -{ - if(poin) { - poin[0]= old[0]; - poin[-3]= old[3]; - poin[3]= old[6]; - } -} - static void restoreElement(TransData *td) { /* TransData for crease has no loc */ if (td->loc) { @@ -1111,45 +1119,27 @@ static void restoreElement(TransData *td) { if (td->ext->size) { VECCOPY(td->ext->size, td->ext->isize); } - if(td->flag & TD_USEQUAT) { - if (td->ext->quat) { - QUATCOPY(td->ext->quat, td->ext->iquat); - } + if (td->ext->quat) { + QUATCOPY(td->ext->quat, td->ext->iquat); } } - + if (td->flag & TD_BEZTRIPLE) { *(td->hdata->h1) = td->hdata->ih1; *(td->hdata->h2) = td->hdata->ih2; } - - if(td->tdi) { - TransDataIpokey *tdi= td->tdi; - - restore_ipokey(tdi->locx, tdi->oldloc); - restore_ipokey(tdi->locy, tdi->oldloc+1); - restore_ipokey(tdi->locz, tdi->oldloc+2); - - restore_ipokey(tdi->rotx, tdi->oldrot); - restore_ipokey(tdi->roty, tdi->oldrot+1); - restore_ipokey(tdi->rotz, tdi->oldrot+2); - - restore_ipokey(tdi->sizex, tdi->oldsize); - restore_ipokey(tdi->sizey, tdi->oldsize+1); - restore_ipokey(tdi->sizez, tdi->oldsize+2); - } } void restoreTransObjects(TransInfo *t) { TransData *td; - + for (td = t->data; td < t->data + t->total; td++) { restoreElement(td); } - + Mat3One(t->mat); - + recalcData(t); } @@ -1158,7 +1148,7 @@ void calculateCenter2D(TransInfo *t) if (t->flag & (T_EDIT|T_POSE)) { Object *ob= t->obedit?t->obedit:t->poseobj; float vec[3]; - + VECCOPY(vec, t->center); Mat4MulVecfl(ob->obmat, vec); projectIntView(t, vec, t->center2d); @@ -1171,21 +1161,21 @@ void calculateCenter2D(TransInfo *t) void calculateCenterCursor(TransInfo *t) { float *cursor; - + cursor = give_cursor(t->scene, t->view); VECCOPY(t->center, cursor); - + /* If edit or pose mode, move cursor in local space */ if (t->flag & (T_EDIT|T_POSE)) { Object *ob = t->obedit?t->obedit:t->poseobj; float mat[3][3], imat[3][3]; - + VecSubf(t->center, t->center, ob->obmat[3]); Mat3CpyMat4(mat, ob->obmat); Mat3Inv(imat, mat); Mat3MulVecfl(imat, t->center); } - + calculateCenter2D(t); } @@ -1193,15 +1183,15 @@ void calculateCenterCursor2D(TransInfo *t) { View2D *v2d= t->view; float aspx=1.0, aspy=1.0; - + if(t->spacetype==SPACE_IMAGE) /* only space supported right now but may change */ ED_space_image_uv_aspect(t->sa->spacedata.first, &aspx, &aspy); - + if (v2d) { t->center[0] = v2d->cursor[0] * aspx; t->center[1] = v2d->cursor[1] * aspy; } - + calculateCenter2D(t); } @@ -1210,7 +1200,7 @@ void calculateCenterMedian(TransInfo *t) float partial[3] = {0.0f, 0.0f, 0.0f}; int total = 0; int i; - + for(i = 0; i < t->total; i++) { if (t->data[i].flag & TD_SELECTED) { if (!(t->data[i].flag & TD_NOCENTER)) @@ -1230,7 +1220,7 @@ void calculateCenterMedian(TransInfo *t) if(i) VecMulf(partial, 1.0f / total); VECCOPY(t->center, partial); - + calculateCenter2D(t); } @@ -1260,7 +1250,7 @@ void calculateCenterBound(TransInfo *t) } VecAddf(t->center, min, max); VecMulf(t->center, 0.5); - + calculateCenter2D(t); } @@ -1296,7 +1286,7 @@ void calculateCenter(TransInfo *t) break; } /* END EDIT MODE ACTIVE ELEMENT */ #endif - + calculateCenterMedian(t); if((t->flag & (T_EDIT|T_POSE))==0) { @@ -1308,10 +1298,10 @@ void calculateCenter(TransInfo *t) projectIntView(t, t->center, t->center2d); } } - + } } - + /* setting constraint center */ VECCOPY(t->con.center, t->center); if(t->flag & (T_EDIT|T_POSE)) @@ -1319,8 +1309,8 @@ void calculateCenter(TransInfo *t) Object *ob= t->obedit?t->obedit:t->poseobj; Mat4MulVecfl(ob->obmat, t->con.center); } - - /* voor panning from cameraview */ + + /* for panning from cameraview */ if(t->flag & T_OBJECT) { if(t->spacetype==SPACE_VIEW3D && t->ar->regiontype == RGN_TYPE_WINDOW) @@ -1328,21 +1318,21 @@ void calculateCenter(TransInfo *t) View3D *v3d = t->view; Scene *scene = t->scene; RegionView3D *rv3d = t->ar->regiondata; - + if(v3d->camera == OBACT && rv3d->persp==V3D_CAMOB) { float axis[3]; /* persinv is nasty, use viewinv instead, always right */ VECCOPY(axis, t->viewinv[2]); Normalize(axis); - + /* 6.0 = 6 grid units */ axis[0]= t->center[0]- 6.0f*axis[0]; axis[1]= t->center[1]- 6.0f*axis[1]; axis[2]= t->center[2]- 6.0f*axis[2]; - + projectIntView(t, axis, t->center2d); - + /* rotate only needs correct 2d center, grab needs initgrabz() value */ if(t->mode==TFM_TRANSLATION) { @@ -1352,14 +1342,14 @@ void calculateCenter(TransInfo *t) } } } - + if(t->spacetype==SPACE_VIEW3D) { /* initgrabz() defines a factor for perspective depth correction, used in window_to_3d_delta() */ if(t->flag & (T_EDIT|T_POSE)) { Object *ob= t->obedit?t->obedit:t->poseobj; float vec[3]; - + VECCOPY(vec, t->center); Mat4MulVecfl(ob->obmat, vec); initgrabz(t->ar->regiondata, vec[0], vec[1], vec[2]); @@ -1399,7 +1389,7 @@ void calculatePropRatio(TransInfo *t) /* Use rdist for falloff calculations, it is the real distance */ td->flag &= ~TD_NOACTION; dist= (t->prop_size-td->rdist)/t->prop_size; - + /* * Clamp to positive numbers. * Certain corner cases with connectivity and individual centers @@ -1407,7 +1397,7 @@ void calculatePropRatio(TransInfo *t) */ if (dist < 0.0f) dist = 0.0f; - + switch(t->prop_mode) { case PROP_SHARP: td->factor= dist*dist; @@ -1474,20 +1464,20 @@ float get_drawsize(ARegion *ar, float *co) { RegionView3D *rv3d= ar->regiondata; float size, vec[3], len1, len2; - + /* size calculus, depending ortho/persp settings, like initgrabz() */ size= rv3d->persmat[0][3]*co[0]+ rv3d->persmat[1][3]*co[1]+ rv3d->persmat[2][3]*co[2]+ rv3d->persmat[3][3]; - + VECCOPY(vec, rv3d->persinv[0]); len1= Normalize(vec); VECCOPY(vec, rv3d->persinv[1]); len2= Normalize(vec); - + size*= 0.01f*(len1>len2?len1:len2); - + /* correct for window size to make widgets appear fixed size */ if(ar->winx > ar->winy) size*= 1000.0f/(float)ar->winx; else size*= 1000.0f/(float)ar->winy; - + return size; } diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c index 6bd0a8c8d42..83d4a314057 100644 --- a/source/blender/editors/transform/transform_input.c +++ b/source/blender/editors/transform/transform_input.c @@ -34,7 +34,7 @@ #include "transform.h" - +#include "MEM_guardedalloc.h" /* ************************** INPUT FROM MOUSE *************************** */ @@ -163,6 +163,47 @@ void InputVerticalAbsolute(TransInfo *t, MouseInput *mi, short mval[2], float ou output[0] = Inpf(t->viewinv[1], vec) * 2.0f; } +void setCustomPoints(TransInfo *t, MouseInput *mi, short start[2], short end[2]) +{ + short *data = mi->data; + + data[0] = start[0]; + data[1] = start[1]; + data[2] = end[0]; + data[3] = end[1]; +} + +void InputCustomRatio(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) +{ + float length; + float distance; + short *data = mi->data; + short dx, dy; + + dx = data[2] - data[0]; + dy = data[3] - data[1]; + + length = (float)sqrtf(dx*dx + dy*dy); + + if (mi->precision) { + /* deal with Shift key by adding motion / 10 to motion before shift press */ + short mdx, mdy; + mdx = (mi->precision_mval[0] + (float)(mval[0] - mi->precision_mval[0]) / 10.0f) - data[2]; + mdy = (mi->precision_mval[1] + (float)(mval[1] - mi->precision_mval[1]) / 10.0f) - data[3]; + + distance = (mdx*dx + mdy*dy) / length; + } + else { + short mdx, mdy; + mdx = mval[0] - data[2]; + mdy = mval[1] - data[3]; + + distance = (mdx*dx + mdy*dy) / length; + } + + output[0] = distance / length; +} + void InputAngle(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { double dx2 = mval[0] - mi->center[0]; @@ -291,6 +332,11 @@ void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode) mi->apply = InputVerticalAbsolute; t->helpline = HLP_VARROW; break; + case INPUT_CUSTOM_RATIO: + mi->apply = InputCustomRatio; + t->helpline = HLP_NONE; + mi->data = MEM_callocN(sizeof(short) * 4, "custom points"); + break; case INPUT_NONE: default: mi->apply = NULL; diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index 93bc02d7180..bdf0a91bf89 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -412,6 +412,9 @@ int calc_manipulator_stats(const bContext *C) if(ob && totsel) { switch(v3d->twmode) { + + case V3D_MANIP_GLOBAL: + break; /* nothing to do */ case V3D_MANIP_NORMAL: if(obedit || ob->mode & OB_MODE_POSE) { @@ -473,8 +476,12 @@ int calc_manipulator_stats(const bContext *C) } break; default: /* V3D_MANIP_CUSTOM */ - // XXX applyTransformOrientation(C, t); - break; + { + float mat[3][3]; + applyTransformOrientation(C, mat, NULL); + Mat4CpyMat3(rv3d->twmat, mat); + break; + } } } @@ -1602,7 +1609,7 @@ int BIF_do_manipulator(bContext *C, struct wmEvent *event, wmOperator *op) break; } RNA_boolean_set_array(op->ptr, "constraint_axis", constraint_axis); - WM_operator_name_call(C, "TFM_OT_translate", WM_OP_INVOKE_REGION_WIN, op->ptr); + WM_operator_name_call(C, "TFM_OT_translate", WM_OP_INVOKE_DEFAULT, op->ptr); } else if (drawflags & MAN_SCALE_C) { switch(drawflags) { @@ -1632,10 +1639,10 @@ int BIF_do_manipulator(bContext *C, struct wmEvent *event, wmOperator *op) break; } RNA_boolean_set_array(op->ptr, "constraint_axis", constraint_axis); - WM_operator_name_call(C, "TFM_OT_resize", WM_OP_INVOKE_REGION_WIN, op->ptr); + WM_operator_name_call(C, "TFM_OT_resize", WM_OP_INVOKE_DEFAULT, op->ptr); } else if (drawflags == MAN_ROT_T) { /* trackball need special case, init is different */ - WM_operator_name_call(C, "TFM_OT_trackball", WM_OP_INVOKE_REGION_WIN, op->ptr); + WM_operator_name_call(C, "TFM_OT_trackball", WM_OP_INVOKE_DEFAULT, op->ptr); } else if (drawflags & MAN_ROT_C) { switch(drawflags) { @@ -1650,7 +1657,7 @@ int BIF_do_manipulator(bContext *C, struct wmEvent *event, wmOperator *op) break; } RNA_boolean_set_array(op->ptr, "constraint_axis", constraint_axis); - WM_operator_name_call(C, "TFM_OT_rotate", WM_OP_INVOKE_REGION_WIN, op->ptr); + WM_operator_name_call(C, "TFM_OT_rotate", WM_OP_INVOKE_DEFAULT, op->ptr); } } /* after transform, restore drawflags */ diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 4ae0bca3284..0440a957539 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -99,6 +99,7 @@ char OP_SHRINK_FATTEN[] = "TFM_OT_shrink_fatten"; char OP_TILT[] = "TFM_OT_tilt"; char OP_TRACKBALL[] = "TFM_OT_trackball"; char OP_MIRROR[] = "TFM_OT_mirror"; +char OP_EDGE_SLIDE[] = "TFM_OT_edge_slide"; TransformModeItem transform_modes[] = @@ -113,6 +114,7 @@ TransformModeItem transform_modes[] = {OP_TILT, TFM_TILT}, {OP_TRACKBALL, TFM_TRACKBALL}, {OP_MIRROR, TFM_MIRROR}, + {OP_EDGE_SLIDE, TFM_EDGE_SLIDE}, {NULL, 0} }; @@ -150,8 +152,9 @@ void TFM_OT_select_orientation(struct wmOperatorType *ot) /* identifiers */ ot->name = "Select Orientation"; - ot->description= "Select orientation type."; + ot->description= "Select transformation orientation."; ot->idname = "TFM_OT_select_orientation"; + ot->flag = OPTYPE_UNDO; /* api callbacks */ ot->invoke = select_orientation_invoke; @@ -162,6 +165,92 @@ void TFM_OT_select_orientation(struct wmOperatorType *ot) RNA_def_enum_funcs(prop, select_orientation_itemf); } + +static int delete_orientation_exec(bContext *C, wmOperator *op) +{ + View3D *v3d = CTX_wm_view3d(C); + int selected_index = (v3d->twmode - V3D_MANIP_CUSTOM); + + BIF_removeTransformOrientationIndex(C, selected_index); + + return OPERATOR_FINISHED; +} + +static int delete_orientation_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + return delete_orientation_exec(C, op); +} + +static int delete_orientation_poll(bContext *C) +{ + int selected_index = -1; + View3D *v3d = CTX_wm_view3d(C); + + if (ED_operator_areaactive(C) == 0) + return 0; + + + if(v3d) { + selected_index = (v3d->twmode - V3D_MANIP_CUSTOM); + } + + return selected_index >= 0; +} + +void TFM_OT_delete_orientation(struct wmOperatorType *ot) +{ + /* identifiers */ + ot->name = "Delete Orientation"; + ot->description= "Delete transformation orientation."; + ot->idname = "TFM_OT_delete_orientation"; + ot->flag = OPTYPE_UNDO; + + /* api callbacks */ + ot->invoke = delete_orientation_invoke; + ot->exec = delete_orientation_exec; + ot->poll = delete_orientation_poll; +} + +static int create_orientation_exec(bContext *C, wmOperator *op) +{ + char name[36]; + int use = RNA_boolean_get(op->ptr, "use"); + int overwrite = RNA_boolean_get(op->ptr, "overwrite"); + + RNA_string_get(op->ptr, "name", name); + + BIF_createTransformOrientation(C, op->reports, name, use, overwrite); + + /* Do we need more refined tags? */ + WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL); + + return OPERATOR_FINISHED; +} + +static int create_orientation_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + return create_orientation_exec(C, op); +} + +void TFM_OT_create_orientation(struct wmOperatorType *ot) +{ + /* identifiers */ + ot->name = "Create Orientation"; + ot->description= "Create transformation orientation from selection."; + ot->idname = "TFM_OT_create_orientation"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + + /* api callbacks */ + ot->invoke = create_orientation_invoke; + ot->exec = create_orientation_exec; + ot->poll = ED_operator_areaactive; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + + RNA_def_string(ot->srna, "name", "", 35, "Name", "Text to insert at the cursor position."); + RNA_def_boolean(ot->srna, "use", 0, "Use after creation", "Select orientation after its creation"); + RNA_def_boolean(ot->srna, "overwrite", 0, "Overwrite previous", "Overwrite previously created orientation with same name"); +} + static void transformops_exit(bContext *C, wmOperator *op) { saveTransform(C, op->customdata, op); @@ -270,7 +359,7 @@ static int transform_invoke(bContext *C, wmOperator *op, wmEvent *event) TransInfo *t = op->customdata; /* add temp handler */ - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); t->flag |= T_MODAL; // XXX meh maybe somewhere else @@ -523,7 +612,7 @@ void TFM_OT_tosphere(struct wmOperatorType *ot) ot->cancel = transform_cancel; ot->poll = ED_operator_areaactive; - RNA_def_float_percentage(ot->srna, "value", 0, 0, 1, "Percentage", "", 0, 1); + RNA_def_float_factor(ot->srna, "value", 0, 0, 1, "Factor", "", 0, 1); Properties_Proportional(ot); @@ -549,6 +638,26 @@ void TFM_OT_mirror(struct wmOperatorType *ot) Properties_Constraints(ot); } +void TFM_OT_edge_slide(struct wmOperatorType *ot) +{ + /* identifiers */ + ot->name = "Edge Slide"; + ot->description= "Slide an edge loop along a mesh."; + ot->idname = OP_EDGE_SLIDE; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; + + /* api callbacks */ + ot->invoke = transform_invoke; + ot->exec = transform_exec; + ot->modal = transform_modal; + ot->cancel = transform_cancel; + ot->poll = ED_operator_editmesh; + + RNA_def_float_factor(ot->srna, "value", 0, -1.0f, 1.0f, "Factor", "", -1.0f, 1.0f); + + RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); +} + void TFM_OT_transform(struct wmOperatorType *ot) { static EnumPropertyItem transform_mode_types[] = { @@ -578,6 +687,7 @@ void TFM_OT_transform(struct wmOperatorType *ot) {TFM_BEVEL, "BEVEL", 0, "Bevel", ""}, {TFM_BWEIGHT, "BWEIGHT", 0, "Bweight", ""}, {TFM_ALIGN, "ALIGN", 0, "Align", ""}, + {TFM_EDGE_SLIDE, "EDGESLIDE", 0, "Edge Slide", ""}, {0, NULL, 0, NULL, NULL} }; @@ -617,11 +727,14 @@ void transform_operatortypes(void) WM_operatortype_append(TFM_OT_tilt); WM_operatortype_append(TFM_OT_trackball); WM_operatortype_append(TFM_OT_mirror); + WM_operatortype_append(TFM_OT_edge_slide); WM_operatortype_append(TFM_OT_select_orientation); + WM_operatortype_append(TFM_OT_create_orientation); + WM_operatortype_append(TFM_OT_delete_orientation); } -void transform_keymap_for_space(struct wmWindowManager *wm, struct ListBase *keymap, int spaceid) +void transform_keymap_for_space(struct wmWindowManager *wm, struct wmKeyMap *keymap, int spaceid) { wmKeymapItem *km; @@ -641,7 +754,7 @@ void transform_keymap_for_space(struct wmWindowManager *wm, struct ListBase *key km = WM_keymap_add_item(keymap, "TFM_OT_warp", WKEY, KM_PRESS, KM_SHIFT, 0); - km = WM_keymap_add_item(keymap, "TFM_OT_tosphere", SKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0); + km = WM_keymap_add_item(keymap, "TFM_OT_tosphere", SKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0); km = WM_keymap_add_item(keymap, "TFM_OT_shear", SKEY, KM_PRESS, KM_ALT|KM_CTRL|KM_SHIFT, 0); @@ -651,6 +764,9 @@ void transform_keymap_for_space(struct wmWindowManager *wm, struct ListBase *key km = WM_keymap_add_item(keymap, "TFM_OT_select_orientation", SPACEKEY, KM_PRESS, KM_ALT, 0); + km = WM_keymap_add_item(keymap, "TFM_OT_create_orientation", SPACEKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); + RNA_boolean_set(km->ptr, "use", 1); + break; case SPACE_ACTION: km= WM_keymap_add_item(keymap, "TFM_OT_transform", GKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 9416425704f..c9344b97fb2 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -23,6 +23,7 @@ */ #include <string.h> +#include <ctype.h> #include "MEM_guardedalloc.h" @@ -43,6 +44,7 @@ #include "BKE_utildefines.h" #include "BKE_armature.h" #include "BKE_context.h" +#include "BKE_report.h" #include "BLI_arithb.h" #include "BLI_blenlib.h" @@ -67,108 +69,131 @@ void BIF_clearTransformOrientation(bContext *C) { + View3D *v3d = CTX_wm_view3d(C); + ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces; BLI_freelistN(transform_spaces); - // TRANSFORM_FIX_ME // Need to loop over all view3d -// if (G.vd->twmode >= V3D_MANIP_CUSTOM) -// G.vd->twmode = V3D_MANIP_GLOBAL; /* fallback to global */ + if(v3d && v3d->twmode >= V3D_MANIP_CUSTOM) { + v3d->twmode = V3D_MANIP_GLOBAL; /* fallback to global */ + } +} + +TransformOrientation* findOrientationName(bContext *C, char *name) +{ + ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces; + TransformOrientation *ts= NULL; + + for (ts = transform_spaces->first; ts; ts = ts->next) { + if (strncmp(ts->name, name, 35) == 0) { + return ts; + } + } + + return NULL; +} + +void uniqueOrientationName(bContext *C, char *name) +{ + if (findOrientationName(C, name) != NULL) + { + char tempname[64]; + int number; + char *dot; + + + number = strlen(name); + + if (number && isdigit(name[number-1])) + { + dot = strrchr(name, '.'); // last occurrence + if (dot) + *dot=0; + } + + for (number = 1; number <= 999; number++) + { + sprintf(tempname, "%s.%03d", name, number); + if (findOrientationName(C, tempname) == NULL) + { + BLI_strncpy(name, tempname, 32); + break; + } + } + } } - -void BIF_manageTransformOrientation(bContext *C, int confirm, int set) { + +void BIF_createTransformOrientation(bContext *C, ReportList *reports, char *name, int use, int overwrite) +{ Object *obedit = CTX_data_edit_object(C); Object *ob = CTX_data_active_object(C); - int index = -1; + TransformOrientation *ts = NULL; if (obedit) { if (obedit->type == OB_MESH) - index = manageMeshSpace(C, confirm, set); + ts = createMeshSpace(C, reports, name, overwrite); else if (obedit->type == OB_ARMATURE) - index = manageBoneSpace(C, confirm, set); + ts = createBoneSpace(C, reports, name, overwrite); } else if (ob && (ob->mode & OB_MODE_POSE)) { - index = manageBoneSpace(C, confirm, set); + ts = createBoneSpace(C, reports, name, overwrite); } else { - index = manageObjectSpace(C, confirm, set); + ts = createObjectSpace(C, reports, name, overwrite); } - if (set && index != -1) + if (use && ts != NULL) { - BIF_selectTransformOrientationValue(C, V3D_MANIP_CUSTOM + index); + BIF_selectTransformOrientation(C, ts); } } -int manageObjectSpace(bContext *C, int confirm, int set) { +TransformOrientation *createObjectSpace(bContext *C, ReportList *reports, char *name, int overwrite) { Base *base = CTX_data_active_base(C); + Object *ob; + float mat[3][3]; if (base == NULL) - return -1; - -//XXX if (confirm == 0) { -// if (set && pupmenu("Custom Orientation %t|Add and Use Active Object%x1") != 1) { -// return -1; -// } -// else if (set == 0 && pupmenu("Custom Orientation %t|Add Active Object%x1") != 1) { -// return -1; -// } -// } - - return addObjectSpace(C, base->object); -} + return NULL; -/* return 1 on confirm */ -int confirmSpace(int set, char text[]) -{ - char menu[64]; + + ob = base->object; - if (set) { - sprintf(menu, "Custom Orientation %%t|Add and Use %s%%x1", text); - } - else { - sprintf(menu, "Custom Orientation %%t|Add %s%%x1", text); + Mat3CpyMat4(mat, ob->obmat); + Mat3Ortho(mat); + + /* use object name if no name is given */ + if (name[0] == 0) + { + strncpy(name, ob->id.name+2, 35); } - -//XXX if (pupmenu(menu) == 1) { - return 1; -// } -// else { -// return 0; -// } + + return addMatrixSpace(C, mat, name, overwrite); } -int manageBoneSpace(bContext *C, int confirm, int set) { +TransformOrientation *createBoneSpace(bContext *C, ReportList *reports, char *name, int overwrite) { float mat[3][3]; float normal[3], plane[3]; - char name[36] = ""; - int index; getTransformOrientation(C, normal, plane, 0); - - if (confirm == 0 && confirmSpace(set, "Bone") == 0) { - return -1; - } if (createSpaceNormalTangent(mat, normal, plane) == 0) { -//XXX error("Cannot use zero-length bone"); - return -1; + BKE_reports_prepend(reports, "Cannot use zero-length bone"); + return NULL; } - strcpy(name, "Bone"); - - /* Input name */ -//XXX sbutton(name, 1, 35, "name: "); + if (name[0] == 0) + { + strcpy(name, "Bone"); + } - index = addMatrixSpace(C, mat, name); - return index; + return addMatrixSpace(C, mat, name, overwrite); } -int manageMeshSpace(bContext *C, int confirm, int set) { +TransformOrientation *createMeshSpace(bContext *C, ReportList *reports, char *name, int overwrite) { float mat[3][3]; float normal[3], plane[3]; - char name[36] = ""; - int index; int type; type = getTransformOrientation(C, normal, plane, 0); @@ -176,51 +201,44 @@ int manageMeshSpace(bContext *C, int confirm, int set) { switch (type) { case ORIENTATION_VERT: - if (confirm == 0 && confirmSpace(set, "vertex") == 0) { - return -1; - } - if (createSpaceNormal(mat, normal) == 0) { -// XXX error("Cannot use vertex with zero-length normal"); - return -1; + BKE_reports_prepend(reports, "Cannot use vertex with zero-length normal"); + return NULL; } - strcpy(name, "Vertex"); + if (name[0] == 0) + { + strcpy(name, "Vertex"); + } break; case ORIENTATION_EDGE: - if (confirm == 0 && confirmSpace(set, "Edge") == 0) { - return -1; - } - if (createSpaceNormalTangent(mat, normal, plane) == 0) { -// XXX error("Cannot use zero-length edge"); - return -1; + BKE_reports_prepend(reports, "Cannot use zero-length edge"); + return NULL; } - strcpy(name, "Edge"); + if (name[0] == 0) + { + strcpy(name, "Edge"); + } break; case ORIENTATION_FACE: - if (confirm == 0 && confirmSpace(set, "Face") == 0) { - return -1; - } - if (createSpaceNormalTangent(mat, normal, plane) == 0) { -// XXX error("Cannot use zero-area face"); - return -1; + BKE_reports_prepend(reports, "Cannot use zero-area face"); + return NULL; } - strcpy(name, "Face"); + if (name[0] == 0) + { + strcpy(name, "Face"); + } break; default: - return -1; + return NULL; break; } - /* Input name */ -//XXX sbutton(name, 1, 35, "name: "); - - index = addMatrixSpace(C, mat, name); - return index; + return addMatrixSpace(C, mat, name, overwrite); } int createSpaceNormal(float mat[3][3], float normal[3]) @@ -271,32 +289,17 @@ int createSpaceNormalTangent(float mat[3][3], float normal[3], float tangent[3]) return 1; } - -int addObjectSpace(bContext *C, Object *ob) { - float mat[3][3]; - char name[36] = ""; - - Mat3CpyMat4(mat, ob->obmat); - Mat3Ortho(mat); - - strncpy(name, ob->id.name+2, 35); - - /* Input name */ -//XXX sbutton(name, 1, 35, "name: "); - - return addMatrixSpace(C, mat, name); -} - -int addMatrixSpace(bContext *C, float mat[3][3], char name[]) { +TransformOrientation* addMatrixSpace(bContext *C, float mat[3][3], char name[], int overwrite) { ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces; - TransformOrientation *ts; - int index = 0; + TransformOrientation *ts = NULL; - /* if name is found in list, reuse that transform space */ - for (index = 0, ts = transform_spaces->first; ts; ts = ts->next, index++) { - if (strncmp(ts->name, name, 35) == 0) { - break; - } + if (overwrite) + { + ts = findOrientationName(C, name); + } + else + { + uniqueOrientationName(C, name); } /* if not, create a new one */ @@ -310,31 +313,61 @@ int addMatrixSpace(bContext *C, float mat[3][3], char name[]) { /* copy matrix into transform space */ Mat3CpyMat3(ts->mat, mat); - ED_undo_push(C, "Add/Update Transform Orientation"); - - return index; + return ts; } void BIF_removeTransformOrientation(bContext *C, TransformOrientation *target) { ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces; TransformOrientation *ts = transform_spaces->first; - //int selected_index = (G.vd->twmode - V3D_MANIP_CUSTOM); int i; for (i = 0, ts = transform_spaces->first; ts; ts = ts->next, i++) { if (ts == target) { - // Transform_fix_me NEED TO DO THIS FOR ALL VIEW3D -// if (selected_index == i) { -// G.vd->twmode = V3D_MANIP_GLOBAL; /* fallback to global */ -// } -// else if (selected_index > i) -// G.vd->twmode--; + View3D *v3d = CTX_wm_view3d(C); + if(v3d) { + int selected_index = (v3d->twmode - V3D_MANIP_CUSTOM); + + // Transform_fix_me NEED TO DO THIS FOR ALL VIEW3D + if (selected_index == i) { + v3d->twmode = V3D_MANIP_GLOBAL; /* fallback to global */ + } + else if (selected_index > i) { + v3d->twmode--; + } + + } + + BLI_freelinkN(transform_spaces, ts); + break; + } + } +} + +void BIF_removeTransformOrientationIndex(bContext *C, int index) { + ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces; + TransformOrientation *ts = transform_spaces->first; + int i; + + for (i = 0, ts = transform_spaces->first; ts; ts = ts->next, i++) { + if (i == index) { + View3D *v3d = CTX_wm_view3d(C); + if(v3d) { + int selected_index = (v3d->twmode - V3D_MANIP_CUSTOM); + + // Transform_fix_me NEED TO DO THIS FOR ALL VIEW3D + if (selected_index == i) { + v3d->twmode = V3D_MANIP_GLOBAL; /* fallback to global */ + } + else if (selected_index > i) { + v3d->twmode--; + } + + } BLI_freelinkN(transform_spaces, ts); break; } } - ED_undo_push(C, "Remove Transform Orientation"); } void BIF_selectTransformOrientation(bContext *C, TransformOrientation *target) { @@ -353,7 +386,8 @@ void BIF_selectTransformOrientation(bContext *C, TransformOrientation *target) { void BIF_selectTransformOrientationValue(bContext *C, int orientation) { View3D *v3d = CTX_wm_view3d(C); - v3d->twmode = orientation; + if(v3d) /* currently using generic poll */ + v3d->twmode = orientation; } EnumPropertyItem *BIF_enumTransformOrientation(bContext *C) @@ -432,7 +466,7 @@ int BIF_countTransformOrientation(const bContext *C) { return count; } -void applyTransformOrientation(const bContext *C, TransInfo *t) { +void applyTransformOrientation(const bContext *C, float mat[3][3], char *name) { TransformOrientation *ts; View3D *v3d = CTX_wm_view3d(C); int selected_index = (v3d->twmode - V3D_MANIP_CUSTOM); @@ -441,8 +475,11 @@ void applyTransformOrientation(const bContext *C, TransInfo *t) { if (selected_index >= 0) { for (i = 0, ts = CTX_data_scene(C)->transform_spaces.first; ts; ts = ts->next, i++) { if (selected_index == i) { - strcpy(t->spacename, ts->name); - Mat3CpyMat3(t->spacemtx, ts->mat); + + if (name) + strcpy(name, ts->name); + + Mat3CpyMat3(mat, ts->mat); break; } } @@ -557,7 +594,7 @@ void initTransformOrientation(bContext *C, TransInfo *t) } break; default: /* V3D_MANIP_CUSTOM */ - applyTransformOrientation(C, t); + applyTransformOrientation(C, t->spacemtx, t->spacename); break; } } diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 9438581409b..84dc9e69e7a 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -539,7 +539,6 @@ void CalcSnapGeometry(TransInfo *t, float *vec) float no[3]; int found = 0; int dist = SNAP_MIN_DISTANCE; // Use a user defined value here - SnapMode mode; if (t->settings->snap_mode == SCE_SNAP_MODE_VOLUME) { @@ -634,16 +633,7 @@ void CalcSnapGeometry(TransInfo *t, float *vec) } else { - if (t->obedit == NULL) - { - mode = SNAP_NOT_SELECTED; - } - else - { - mode = SNAP_NOT_OBEDIT; - } - - found = snapObjectsTransform(t, t->mval, &dist, loc, no, mode); + found = snapObjectsTransform(t, t->mval, &dist, loc, no, t->tsnap.mode); } if (found == 1) diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index a58ee9772e9..fbd12007c16 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -251,17 +251,17 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, EditMesh *em, MTFac if(efa->v4) { #if 0 /* Simple but slow, better reuse normalized vectors */ - uvang1 = VecAngle3_2D(tf_uv[3], tf_uv[0], tf_uv[1]); - ang1 = VecAngle3(efa->v4->co, efa->v1->co, efa->v2->co); + uvang1 = RAD2DEG(Vec2Angle3(tf_uv[3], tf_uv[0], tf_uv[1])); + ang1 = RAD2DEG(VecAngle3(efa->v4->co, efa->v1->co, efa->v2->co)); - uvang2 = VecAngle3_2D(tf_uv[0], tf_uv[1], tf_uv[2]); - ang2 = VecAngle3(efa->v1->co, efa->v2->co, efa->v3->co); + uvang2 = RAD2DEG(Vec2Angle3(tf_uv[0], tf_uv[1], tf_uv[2])); + ang2 = RAD2DEG(VecAngle3(efa->v1->co, efa->v2->co, efa->v3->co)); - uvang3 = VecAngle3_2D(tf_uv[1], tf_uv[2], tf_uv[3]); - ang3 = VecAngle3(efa->v2->co, efa->v3->co, efa->v4->co); + uvang3 = RAD2DEG(Vec2Angle3(tf_uv[1], tf_uv[2], tf_uv[3])); + ang3 = RAD2DEG(VecAngle3(efa->v2->co, efa->v3->co, efa->v4->co)); - uvang4 = VecAngle3_2D(tf_uv[2], tf_uv[3], tf_uv[0]); - ang4 = VecAngle3(efa->v3->co, efa->v4->co, efa->v1->co); + uvang4 = RAD2DEG(Vec2Angle3(tf_uv[2], tf_uv[3], tf_uv[0])); + ang4 = RAD2DEG(VecAngle3(efa->v3->co, efa->v4->co, efa->v1->co)); #endif /* uv angles */ @@ -315,14 +315,14 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, EditMesh *em, MTFac } else { #if 0 /* Simple but slow, better reuse normalized vectors */ - uvang1 = VecAngle3_2D(tf_uv[2], tf_uv[0], tf_uv[1]); - ang1 = VecAngle3(efa->v3->co, efa->v1->co, efa->v2->co); + uvang1 = RAD2DEG(Vec2Angle3(tf_uv[2], tf_uv[0], tf_uv[1])); + ang1 = RAD2DEG(VecAngle3(efa->v3->co, efa->v1->co, efa->v2->co)); - uvang2 = VecAngle3_2D(tf_uv[0], tf_uv[1], tf_uv[2]); - ang2 = VecAngle3(efa->v1->co, efa->v2->co, efa->v3->co); + uvang2 = RAD2DEG(Vec2Angle3(tf_uv[0], tf_uv[1], tf_uv[2])); + ang2 = RAD2DEG(VecAngle3(efa->v1->co, efa->v2->co, efa->v3->co)); - uvang3 = 180-(uvang1+uvang2); - ang3 = 180-(ang1+ang2); + uvang3 = M_PI-(uvang1+uvang2); + ang3 = M_PI-(ang1+ang2); #endif /* uv angles */ diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 9051300e117..9216cfb5cdc 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -77,7 +77,7 @@ int ED_uvedit_test(Object *obedit) EditMesh *em; int ret; - if(obedit->type != OB_MESH) + if(!obedit || obedit->type != OB_MESH) return 0; em = BKE_mesh_get_editmesh(obedit->data); @@ -180,7 +180,13 @@ static void uvedit_pixel_to_float(SpaceImage *sima, float *dist, float pixeldist { int width, height; - ED_space_image_size(sima, &width, &height); + if(sima) { + ED_space_image_size(sima, &width, &height); + } + else { + width= 256; + height= 256; + } dist[0]= pixeldist/width; dist[1]= pixeldist/height; @@ -1097,11 +1103,11 @@ static int stitch_exec(bContext *C, wmOperator *op) if(RNA_boolean_get(op->ptr, "use_limit")) { UvVertMap *vmap; UvMapVert *vlist, *iterv; - float newuv[2], limit[2], pixels; + float newuv[2], limit[2]; int a, vtot; - pixels= RNA_float_get(op->ptr, "limit"); - uvedit_pixel_to_float(sima, limit, pixels); + limit[0]= RNA_float_get(op->ptr, "limit"); + limit[1]= limit[0]; EM_init_index_arrays(em, 0, 0, 1); vmap= EM_make_uv_vert_map(em, 1, 0, limit); @@ -1255,7 +1261,7 @@ void UV_OT_stitch(wmOperatorType *ot) /* properties */ RNA_def_boolean(ot->srna, "use_limit", 1, "Use Limit", "Stitch UVs within a specified limit distance."); - RNA_def_float(ot->srna, "limit", 20.0, 0.0f, FLT_MAX, "Limit", "Limit distance in image pixels.", -FLT_MAX, FLT_MAX); + RNA_def_float(ot->srna, "limit", 0.01f, 0.0f, FLT_MAX, "Limit", "Limit distance in normalized coordinates.", -FLT_MAX, FLT_MAX); } /* ******************** (de)select all operator **************** */ @@ -1439,7 +1445,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop) else { sync= 0; selectmode= ts->uv_selectmode; - sticky= sima->sticky; + sticky= (sima)? sima->sticky: 1; } /* find nearest element */ @@ -2471,13 +2477,18 @@ static int snap_uvs_to_adjacent_unselected(Scene *scene, Image *ima, Object *obe static int snap_uvs_to_pixels(SpaceImage *sima, Scene *scene, Object *obedit) { EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); - Image *ima= sima->image; + Image *ima; EditFace *efa; MTFace *tface; int width= 0, height= 0; float w, h; short change = 0; + if(!sima) + return 0; + + ima= sima->image; + ED_space_image_size(sima, &width, &height); w = (float)width; h = (float)height; @@ -2657,6 +2668,7 @@ static int hide_exec(bContext *C, wmOperator *op) EditFace *efa; MTFace *tf; int swap= RNA_boolean_get(op->ptr, "unselected"); + int facemode= sima ? sima->flag & SI_SELACTFACE : 0; if(ts->uv_flag & UV_SYNC_SELECTION) { EM_hide_mesh(em, swap); @@ -2670,7 +2682,7 @@ static int hide_exec(bContext *C, wmOperator *op) for(efa= em->faces.first; efa; efa= efa->next) { if(efa->f & SELECT) { tf= CustomData_em_get(&em->fdata, efa->data, CD_MTFACE); - if(sima->flag & SI_SELACTFACE) { + if(facemode) { /* Pretend face mode */ if(( (efa->v4==NULL && ( tf->flag & (TF_SEL1|TF_SEL2|TF_SEL3)) == (TF_SEL1|TF_SEL2|TF_SEL3) ) || @@ -2715,7 +2727,7 @@ static int hide_exec(bContext *C, wmOperator *op) if(efa->f & SELECT) { tf= CustomData_em_get(&em->fdata, efa->data, CD_MTFACE); - if(sima->flag & SI_SELACTFACE) { + if(facemode) { if( (efa->v4==NULL && ( tf->flag & (TF_SEL1|TF_SEL2|TF_SEL3)) == (TF_SEL1|TF_SEL2|TF_SEL3) ) || ( tf->flag & (TF_SEL1|TF_SEL2|TF_SEL3|TF_SEL4)) == (TF_SEL1|TF_SEL2|TF_SEL3|TF_SEL4) ) { @@ -2799,6 +2811,8 @@ static int reveal_exec(bContext *C, wmOperator *op) EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; + int facemode= sima ? sima->flag & SI_SELACTFACE : 0; + int stickymode= sima ? (sima->sticky != SI_STICKY_DISABLE) : 1; /* call the mesh function if we are in mesh sync sel */ if(ts->uv_flag & UV_SYNC_SELECTION) { @@ -2809,7 +2823,7 @@ static int reveal_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } - if(sima->flag & SI_SELACTFACE) { + if(facemode) { if(em->selectmode == SCE_SELECT_FACE) { for(efa= em->faces.first; efa; efa= efa->next) { if(!(efa->h) && !(efa->f & SELECT)) { @@ -2821,7 +2835,7 @@ static int reveal_exec(bContext *C, wmOperator *op) } else { /* enable adjacent faces to have disconnected UV selections if sticky is disabled */ - if(sima->sticky == SI_STICKY_DISABLE) { + if(!stickymode) { for(efa= em->faces.first; efa; efa= efa->next) { if(!(efa->h) && !(efa->f & SELECT)) { /* All verts must be unselected for the face to be selected in the UV view */ @@ -3072,7 +3086,10 @@ void ED_operatortypes_uvedit(void) void ED_keymap_uvedit(wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "UVEdit", 0, 0); + wmKeyMap *keymap; + + keymap= WM_keymap_find(wm, "UVEdit", 0, 0); + keymap->poll= ED_operator_uvedit; /* pick selection */ WM_keymap_add_item(keymap, "UV_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index ccdc51430bc..c7258e616fa 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -342,7 +342,7 @@ static int minimize_stretch_invoke(bContext *C, wmOperator *op, wmEvent *event) minimize_stretch_iteration(C, op, 1); ms= op->customdata; - WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + WM_event_add_modal_handler(C, op); ms->timer= WM_event_add_window_timer(CTX_wm_window(C), TIMER, 0.01f); return OPERATOR_RUNNING_MODAL; @@ -423,7 +423,7 @@ void UV_OT_minimize_stretch(wmOperatorType *ot) /* properties */ RNA_def_boolean(ot->srna, "fill_holes", 1, "Fill Holes", "Virtual fill holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry."); - RNA_def_float_percentage(ot->srna, "blend", 0.0f, 0.0f, 1.0f, "Blend", "Blend factor between stretch minimized and original.", 0.0f, 1.0f); + RNA_def_float_factor(ot->srna, "blend", 0.0f, 0.0f, 1.0f, "Blend", "Blend factor between stretch minimized and original.", 0.0f, 1.0f); RNA_def_int(ot->srna, "iterations", 0, 0, INT_MAX, "Iterations", "Number of iterations to run, 0 is unlimited when run interactively.", 0, 100); } |