diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-01-16 03:13:12 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-01-16 03:13:12 +0400 |
commit | e0df491d1e465588cc018c6f6d00f72739b71516 (patch) | |
tree | fe4cbcdaa4633545bbc817c28eb780b551e5ac05 /source/blender/editors | |
parent | 76a211d80947a453f594e4cf0a1e0acc6786eddf (diff) | |
parent | 23806a2b7d50082d70a0e4ecab22aafb8433708a (diff) |
Merged changes in the trunk up to revision 43404.
Conflicts resolved:
source/blender/python/SConscript
Diffstat (limited to 'source/blender/editors')
141 files changed, 3486 insertions, 2727 deletions
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index 569125e1055..32e5fe82ed4 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -180,7 +180,7 @@ void ANIM_timecode_string_from_frame (char *str, Scene *scene, int power, short static void draw_cfra_number (Scene *scene, View2D *v2d, float cfra, short time) { float xscale, yscale, x, y; - char str[32] = " t"; /* t is the character to start replacing from */ + char numstr[32] = " t"; /* t is the character to start replacing from */ short slen; /* because the frame number text is subject to the same scaling as the contents of the view */ @@ -193,10 +193,10 @@ static void draw_cfra_number (Scene *scene, View2D *v2d, float cfra, short time) * but power = 1 is required for frames (to get integer frames) */ if (time) - ANIM_timecode_string_from_frame(&str[4], scene, 0, time, FRA2TIME(cfra)); + ANIM_timecode_string_from_frame(&numstr[4], scene, 0, time, FRA2TIME(cfra)); else - ANIM_timecode_string_from_frame(&str[4], scene, 1, time, cfra); - slen= (short)UI_GetStringWidth(str) - 1; + ANIM_timecode_string_from_frame(&numstr[4], scene, 1, time, cfra); + slen= (short)UI_GetStringWidth(numstr) - 1; /* get starting coordinates for drawing */ x= cfra * xscale; @@ -208,7 +208,7 @@ static void draw_cfra_number (Scene *scene, View2D *v2d, float cfra, short time) /* draw current frame number - black text */ UI_ThemeColor(TH_TEXT); - UI_DrawString(x-5, y+3, str); + UI_DrawString(x-5, y+3, numstr); /* restore view transform */ glScalef(xscale, 1.0, 1.0); diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c index 8c4e0065a19..169d6b94413 100644 --- a/source/blender/editors/animation/anim_ipo_utils.c +++ b/source/blender/editors/animation/anim_ipo_utils.c @@ -134,8 +134,8 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu) char c= RNA_property_array_item_char(prop, fcu->array_index); /* we need to write the index to a temp buffer (in py syntax) */ - if (c) sprintf(arrayindbuf, "%c ", c); - else sprintf(arrayindbuf, "[%d]", fcu->array_index); + if (c) BLI_snprintf(arrayindbuf, sizeof(arrayindbuf), "%c ", c); + else BLI_snprintf(arrayindbuf, sizeof(arrayindbuf), "[%d]", fcu->array_index); arrayname= &arrayindbuf[0]; } diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index aa61afbac78..5b246e63a20 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -277,78 +277,12 @@ static void ANIM_OT_previewrange_clear(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -/* ****************** time display toggle operator ****************************/ - -static int toggle_time_exec(bContext *C, wmOperator *UNUSED(op)) -{ - ScrArea *curarea= CTX_wm_area(C); - - if (curarea == NULL) - return OPERATOR_CANCELLED; - - /* simply toggle draw frames flag in applicable spaces */ - // XXX or should relevant spaces define their own version of this? - switch (curarea->spacetype) { - case SPACE_TIME: /* TimeLine */ - { - SpaceTime *stime= CTX_wm_space_time(C); - stime->flag ^= TIME_DRAWFRAMES; - } - break; - case SPACE_ACTION: /* Action Editor */ - { - SpaceAction *saction= CTX_wm_space_action(C); - saction->flag ^= SACTION_DRAWTIME; - } - break; - case SPACE_IPO: /* Graph Editor */ - { - SpaceIpo *sipo= CTX_wm_space_graph(C); - sipo->flag ^= SIPO_DRAWTIME; - } - break; - case SPACE_NLA: /* NLA Editor */ - { - SpaceNla *snla= CTX_wm_space_nla(C); - snla->flag ^= SNLA_DRAWTIME; - } - break; - case SPACE_SEQ: /* Sequencer */ - { - SpaceSeq *sseq= CTX_wm_space_seq(C); - sseq->flag ^= SEQ_DRAWFRAMES; - } - break; - - default: /* editor doesn't show frames */ - return OPERATOR_CANCELLED; // XXX or should we pass through instead? - } - - ED_area_tag_redraw(curarea); - - return OPERATOR_FINISHED; -} - -static void ANIM_OT_time_toggle(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Toggle Frames/Seconds"; - ot->idname= "ANIM_OT_time_toggle"; - ot->description= "Toggle whether timing is displayed in frames or seconds for active timeline view"; - - /* api callbacks */ - ot->exec= toggle_time_exec; - - ot->poll= ED_operator_animview_active; -} - /* ************************** registration **********************************/ void ED_operatortypes_anim(void) { /* Animation Editors only -------------------------- */ WM_operatortype_append(ANIM_OT_change_frame); - WM_operatortype_append(ANIM_OT_time_toggle); WM_operatortype_append(ANIM_OT_previewrange_set); WM_operatortype_append(ANIM_OT_previewrange_clear); @@ -382,11 +316,14 @@ void ED_operatortypes_anim(void) void ED_keymap_anim(wmKeyConfig *keyconf) { wmKeyMap *keymap= WM_keymap_find(keyconf, "Animation", 0, 0); + wmKeyMapItem *kmi; /* frame management */ /* NOTE: 'ACTIONMOUSE' not 'LEFTMOUSE', as user may have swapped mouse-buttons */ WM_keymap_add_item(keymap, "ANIM_OT_change_frame", ACTIONMOUSE, KM_PRESS, 0, 0); - WM_keymap_verify_item(keymap, "ANIM_OT_time_toggle", TKEY, KM_PRESS, KM_CTRL, 0); + + kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", TKEY, KM_PRESS, KM_CTRL, 0); + RNA_string_set(kmi->ptr, "data_path", "space_data.show_seconds"); /* preview range */ WM_keymap_verify_item(keymap, "ANIM_OT_previewrange_set", PKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/armature/armature_intern.h b/source/blender/editors/armature/armature_intern.h index 87254c20c0f..40d909380a0 100644 --- a/source/blender/editors/armature/armature_intern.h +++ b/source/blender/editors/armature/armature_intern.h @@ -99,7 +99,6 @@ void POSE_OT_copy(struct wmOperatorType *ot); void POSE_OT_paste(struct wmOperatorType *ot); void POSE_OT_select_all(struct wmOperatorType *ot); -void POSE_OT_select_inverse(struct wmOperatorType *ot); void POSE_OT_select_parent(struct wmOperatorType *ot); void POSE_OT_select_hierarchy(struct wmOperatorType *ot); void POSE_OT_select_linked(struct wmOperatorType *ot); diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c index d559aef6fe2..81482466a30 100644 --- a/source/blender/editors/armature/armature_ops.c +++ b/source/blender/editors/armature/armature_ops.c @@ -114,7 +114,6 @@ void ED_operatortypes_armature(void) WM_operatortype_append(POSE_OT_paste); WM_operatortype_append(POSE_OT_select_all); - WM_operatortype_append(POSE_OT_select_inverse); WM_operatortype_append(POSE_OT_select_parent); WM_operatortype_append(POSE_OT_select_hierarchy); @@ -227,9 +226,10 @@ void ED_keymap_armature(wmKeyConfig *keyconf) RNA_boolean_set(kmi->ptr, "snap", 1); /* only set in editmode armature, by space_view3d listener */ - WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, 0, 0); + kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "unselected", FALSE); kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "unselected", 1); + RNA_boolean_set(kmi->ptr, "unselected", TRUE); WM_keymap_add_item(keymap, "ARMATURE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "ARMATURE_OT_align", AKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); WM_keymap_add_item(keymap, "ARMATURE_OT_calculate_roll", NKEY, KM_PRESS, KM_CTRL, 0); @@ -241,20 +241,24 @@ void ED_keymap_armature(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "ARMATURE_OT_parent_set", PKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "ARMATURE_OT_parent_clear", PKEY, KM_PRESS, KM_ALT, 0); - WM_keymap_add_item(keymap, "ARMATURE_OT_select_all", AKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "ARMATURE_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_all", AKEY, KM_PRESS, 0, 0); + RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE); + kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0); + RNA_enum_set(kmi->ptr, "action", SEL_INVERT); kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); + RNA_boolean_set(kmi->ptr, "extend", FALSE); kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); - RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_boolean_set(kmi->ptr, "extend", TRUE); kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); + RNA_boolean_set(kmi->ptr, "extend", FALSE); kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); - RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_boolean_set(kmi->ptr, "extend", TRUE); WM_keymap_add_item(keymap, "ARMATURE_OT_select_linked", LKEY, KM_PRESS, 0, 0); @@ -321,22 +325,26 @@ void ED_keymap_armature(wmKeyConfig *keyconf) kmi= WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0); RNA_boolean_set(kmi->ptr, "flipped", 1); - WM_keymap_add_item(keymap, "POSE_OT_select_all", AKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "POSE_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "POSE_OT_select_all", AKEY, KM_PRESS, 0, 0); + RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE); + kmi = WM_keymap_add_item(keymap, "POSE_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0); + RNA_enum_set(kmi->ptr, "action", SEL_INVERT); WM_keymap_add_item(keymap, "POSE_OT_select_parent", PKEY, KM_PRESS, KM_SHIFT, 0); kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); + RNA_boolean_set(kmi->ptr, "extend", FALSE); kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); - RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_boolean_set(kmi->ptr, "extend", TRUE); kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); + RNA_boolean_set(kmi->ptr, "extend", FALSE); kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); - RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_boolean_set(kmi->ptr, "extend", TRUE); WM_keymap_add_item(keymap, "POSE_OT_select_linked", LKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "POSE_OT_select_grouped", GKEY, KM_PRESS, KM_SHIFT, 0); diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index becc7e9b68f..5df4d42ad96 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -3457,7 +3457,7 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op) Object *obedit = CTX_data_edit_object(C); EditBone *bone; float obmat[3][3], curs[3], viewmat[3][3], totmat[3][3], imat[3][3]; - char name[32]; + char name[MAXBONENAME]; RNA_string_get(op->ptr, "name", name); @@ -3507,7 +3507,7 @@ void ARMATURE_OT_bone_primitive_add(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_string(ot->srna, "name", "Bone", 32, "Name", "Name of the newly created bone"); + RNA_def_string(ot->srna, "name", "Bone", MAXBONENAME, "Name", "Name of the newly created bone"); } @@ -5031,38 +5031,6 @@ void POSE_OT_transforms_clear(wmOperatorType *ot) /* ***************** selections ********************** */ -static int pose_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) -{ - - /* Set the flags */ - CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones) - { - if ((pchan->bone->flag & BONE_UNSELECTABLE) == 0) { - pchan->bone->flag ^= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL); - } - } - CTX_DATA_END; - - WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, NULL); - - return OPERATOR_FINISHED; -} - -void POSE_OT_select_inverse(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Select Inverse"; - ot->idname= "POSE_OT_select_inverse"; - ot->description= "Flip the selection status of bones (selected -> unselected, unselected -> selected)"; - - /* api callbacks */ - ot->exec= pose_select_inverse_exec; - ot->poll= ED_operator_posemode; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - -} static int pose_de_select_all_exec(bContext *C, wmOperator *op) { int action = RNA_enum_get(op->ptr, "action"); @@ -5499,7 +5467,7 @@ static int armature_autoside_names_exec (bContext *C, wmOperator *op) { Object *ob= CTX_data_edit_object(C); bArmature *arm; - char newname[32]; + char newname[MAXBONENAME]; short axis= RNA_enum_get(op->ptr, "type"); /* paranoia checks */ diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index 451e672da7c..9ec27b69835 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -450,7 +450,7 @@ static void renameTemplateBone(char *name, char *template_name, ListBase *editbo { int i, j; - for (i = 0, j = 0; template_name[i] != '\0' && i < 31 && j < 31; i++) + for (i = 0, j = 0; template_name[i] != '\0' && i < (MAXBONENAME-1) && j < (MAXBONENAME-1); i++) { if (template_name[i] == '&') { @@ -485,7 +485,7 @@ static void renameTemplateBone(char *name, char *template_name, ListBase *editbo static RigControl *cloneControl(RigGraph *rg, RigGraph *src_rg, RigControl *src_ctrl, GHash *ptr_hash, char *side_string, char *num_string) { RigControl *ctrl; - char name[32]; + char name[MAXBONENAME]; ctrl = newRigControl(rg); @@ -541,7 +541,7 @@ static RigArc *cloneArc(RigGraph *rg, RigGraph *src_rg, RigArc *src_arc, GHash * if (src_edge->bone != NULL) { - char name[32]; + char name[MAXBONENAME]; renameTemplateBone(name, src_edge->bone->name, rg->editbones, side_string, num_string); edge->bone = duplicateEditBoneObjects(src_edge->bone, name, rg->editbones, src_rg->ob, rg->ob); edge->bone->flag &= ~(BONE_TIPSEL|BONE_SELECTED|BONE_ROOTSEL); @@ -1453,7 +1453,7 @@ static void RIG_printCtrl(RigControl *ctrl, char *indent) printf("%sBone: %s\n", indent, ctrl->bone->name); printf("%sLink: %s\n", indent, ctrl->link ? ctrl->link->name : "!NONE!"); - sprintf(text, "%soffset", indent); + BLI_snprintf(text, sizeof(text), "%soffset", indent); print_v3(text, ctrl->offset); printf("%sFlag: %i\n", indent, ctrl->flag); diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index 502da1be8ac..e33b778a168 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -45,6 +45,7 @@ #include "BLI_edgehash.h" #include "BLI_memarena.h" #include "BLI_utildefines.h" +#include "BLI_string.h" #include "BKE_DerivedMesh.h" #include "BKE_modifier.h" @@ -1613,7 +1614,7 @@ static void meshdeform_matrix_solve(MeshDeformModifierData *mmd, MeshDeformBind NLContext *context; float vec[3], gridvec[3]; int a, b, x, y, z, totvar; - char message[1024]; + char message[256]; /* setup variable indices */ mdb->varidx= MEM_callocN(sizeof(int)*mdb->size3, "MeshDeformDSvaridx"); @@ -1715,7 +1716,7 @@ static void meshdeform_matrix_solve(MeshDeformModifierData *mmd, MeshDeformBind break; } - sprintf(message, "Mesh deform solve %d / %d |||", a+1, mdb->totcagevert); + BLI_snprintf(message, sizeof(message), "Mesh deform solve %d / %d |||", a+1, mdb->totcagevert); progress_bar((float)(a+1)/(float)(mdb->totcagevert), message); } diff --git a/source/blender/editors/armature/poseSlide.c b/source/blender/editors/armature/poseSlide.c index efc8ffe4c7d..c28b688e377 100644 --- a/source/blender/editors/armature/poseSlide.c +++ b/source/blender/editors/armature/poseSlide.c @@ -523,28 +523,28 @@ static void pose_slide_reset (tPoseSlideOp *pso) /* draw percentage indicator in header */ static void pose_slide_draw_status (tPoseSlideOp *pso) { - char statusStr[32]; - char mode[32]; + char status_str[32]; + char mode_str[32]; switch (pso->mode) { case POSESLIDE_PUSH: - strcpy(mode, "Push Pose"); + strcpy(mode_str, "Push Pose"); break; case POSESLIDE_RELAX: - strcpy(mode, "Relax Pose"); + strcpy(mode_str, "Relax Pose"); break; case POSESLIDE_BREAKDOWN: - strcpy(mode, "Breakdown"); + strcpy(mode_str, "Breakdown"); break; default: // unknown - strcpy(mode, "Sliding-Tool"); + strcpy(mode_str, "Sliding-Tool"); break; } - sprintf(statusStr, "%s: %d %%", mode, (int)(pso->percentage*100.0f)); - ED_area_headerprint(pso->sa, statusStr); + BLI_snprintf(status_str, sizeof(status_str), "%s: %d %%", mode_str, (int)(pso->percentage*100.0f)); + ED_area_headerprint(pso->sa, status_str); } /* common code for invoke() methods */ diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index 5cdb9c76396..dcddde207f0 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -977,7 +977,9 @@ static void poselib_preview_apply (bContext *C, wmOperator *op) /* do header print - if interactively previewing */ if (pld->state == PL_PREVIEW_RUNNING) { if (pld->flag & PL_PREVIEW_SHOWORIGINAL) { - sprintf(pld->headerstr, "PoseLib Previewing Pose: [Showing Original Pose] | Use Tab to start previewing poses again"); + BLI_strncpy(pld->headerstr, + "PoseLib Previewing Pose: [Showing Original Pose] | Use Tab to start previewing poses again", + sizeof(pld->headerstr)); ED_area_headerprint(pld->sa, pld->headerstr); } else if (pld->searchstr[0]) { @@ -988,10 +990,10 @@ static void poselib_preview_apply (bContext *C, wmOperator *op) /* get search-string */ index= pld->search_cursor; - if (index >= 0 && index <= 64) { + if (index >= 0 && index <= sizeof(tempstr) - 1) { memcpy(&tempstr[0], &pld->searchstr[0], index); tempstr[index]= '|'; - memcpy(&tempstr[index+1], &pld->searchstr[index], 64-index); + memcpy(&tempstr[index+1], &pld->searchstr[index], (sizeof(tempstr) - 1) - index); } else { BLI_strncpy(tempstr, pld->searchstr, sizeof(tempstr)); @@ -1000,11 +1002,18 @@ static void poselib_preview_apply (bContext *C, wmOperator *op) /* get marker name */ BLI_strncpy(markern, pld->marker ? pld->marker->name : "No Matches", sizeof(markern)); - sprintf(pld->headerstr, "PoseLib Previewing Pose: Filter - [%s] | Current Pose - \"%s\" | Use ScrollWheel or PageUp/Down to change", tempstr, markern); + BLI_snprintf(pld->headerstr, sizeof(pld->headerstr), + "PoseLib Previewing Pose: Filter - [%s] | " + "Current Pose - \"%s\" | " + "Use ScrollWheel or PageUp/Down to change", + tempstr, markern); ED_area_headerprint(pld->sa, pld->headerstr); } else { - sprintf(pld->headerstr, "PoseLib Previewing Pose: \"%s\" | Use ScrollWheel or PageUp/Down to change", pld->marker->name); + BLI_snprintf(pld->headerstr, sizeof(pld->headerstr), + "PoseLib Previewing Pose: \"%s\" | " + "Use ScrollWheel or PageUp/Down to change", + pld->marker->name); ED_area_headerprint(pld->sa, pld->headerstr); } } diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index 832ee55997b..b14ce7e4690 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -1777,7 +1777,7 @@ static int pose_autoside_names_exec (bContext *C, wmOperator *op) { Object *ob= object_pose_armature_get(CTX_data_active_object(C)); bArmature *arm; - char newname[32]; + char newname[MAXBONENAME]; short axis= RNA_enum_get(op->ptr, "axis"); /* paranoia checks */ diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c index 80278c95d05..fe9eb6dcd01 100644 --- a/source/blender/editors/armature/reeb.c +++ b/source/blender/editors/armature/reeb.c @@ -2035,10 +2035,9 @@ void REEB_exportGraph(ReebGraph *rg, int count) if (count == -1) { - sprintf(filename, "test.txt"); + strcpy(filename, "test.txt"); } - else - { + else { sprintf(filename, "test%05i.txt", count); } f = fopen(filename, "w"); diff --git a/source/blender/editors/curve/curve_intern.h b/source/blender/editors/curve/curve_intern.h index 3287ebfb92f..2014345e163 100644 --- a/source/blender/editors/curve/curve_intern.h +++ b/source/blender/editors/curve/curve_intern.h @@ -106,7 +106,6 @@ void SURFACE_OT_primitive_nurbs_surface_torus_add(struct wmOperatorType *ot); void CURVE_OT_de_select_first(struct wmOperatorType *ot); void CURVE_OT_de_select_last(struct wmOperatorType *ot); void CURVE_OT_select_all(struct wmOperatorType *ot); -void CURVE_OT_select_inverse(struct wmOperatorType *ot); void CURVE_OT_select_linked(struct wmOperatorType *ot); void CURVE_OT_select_linked_pick(struct wmOperatorType *ot); void CURVE_OT_select_row(struct wmOperatorType *ot); diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c index 1384b86065b..60fca7ae4bd 100644 --- a/source/blender/editors/curve/curve_ops.c +++ b/source/blender/editors/curve/curve_ops.c @@ -116,7 +116,6 @@ void ED_operatortypes_curve(void) WM_operatortype_append(CURVE_OT_de_select_first); WM_operatortype_append(CURVE_OT_de_select_last); WM_operatortype_append(CURVE_OT_select_all); - WM_operatortype_append(CURVE_OT_select_inverse); WM_operatortype_append(CURVE_OT_select_linked); WM_operatortype_append(CURVE_OT_select_linked_pick); WM_operatortype_append(CURVE_OT_select_row); @@ -159,7 +158,7 @@ void ED_operatormacros_curve(void) void ED_keymap_curve(wmKeyConfig *keyconf) { wmKeyMap *keymap; -// wmKeyMapItem *kmi; + wmKeyMapItem *kmi; keymap= WM_keymap_find(keyconf, "Font", 0, 0); keymap->poll= ED_operator_editfont; @@ -223,11 +222,14 @@ void ED_keymap_curve(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "CURVE_OT_vertex_add", LEFTMOUSE, KM_CLICK, KM_CTRL, 0); - WM_keymap_add_item(keymap, "CURVE_OT_select_all", AKEY, KM_PRESS, 0, 0); + kmi = WM_keymap_add_item(keymap, "CURVE_OT_select_all", AKEY, KM_PRESS, 0, 0); + RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE); + kmi = WM_keymap_add_item(keymap, "CURVE_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0); + RNA_enum_set(kmi->ptr, "action", SEL_INVERT); + WM_keymap_add_item(keymap, "CURVE_OT_select_row", RKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "CURVE_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "CURVE_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0); - WM_keymap_add_item(keymap, "CURVE_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "CURVE_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "CURVE_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0); RNA_boolean_set(WM_keymap_add_item(keymap, "CURVE_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "deselect", 1); diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 762564c1cc9..a20fbad874e 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -1069,17 +1069,17 @@ static void curve_rename_fcurves(Object *obedit, ListBase *orig_curves) while (a--) { keyIndex= getCVKeyIndex(editnurb, bezt); if(keyIndex) { - sprintf(rna_path, "splines[%d].bezier_points[%d]", nu_index, pt_index); - sprintf(orig_rna_path, "splines[%d].bezier_points[%d]", keyIndex->nu_index, keyIndex->pt_index); + BLI_snprintf(rna_path, sizeof(rna_path), "splines[%d].bezier_points[%d]", nu_index, pt_index); + BLI_snprintf(orig_rna_path, sizeof(orig_rna_path), "splines[%d].bezier_points[%d]", keyIndex->nu_index, keyIndex->pt_index); if(keyIndex->switched) { char handle_path[64], orig_handle_path[64]; - sprintf(orig_handle_path, "%s.handle_left", orig_rna_path); - sprintf(handle_path, "%s.handle_right", rna_path); + BLI_snprintf(orig_handle_path, sizeof(orig_rna_path), "%s.handle_left", orig_rna_path); + BLI_snprintf(handle_path, sizeof(rna_path), "%s.handle_right", rna_path); fcurve_path_rename(ad, orig_handle_path, handle_path, orig_curves, &curves); - sprintf(orig_handle_path, "%s.handle_right", orig_rna_path); - sprintf(handle_path, "%s.handle_left", rna_path); + BLI_snprintf(orig_handle_path, sizeof(orig_rna_path), "%s.handle_right", orig_rna_path); + BLI_snprintf(handle_path, sizeof(rna_path), "%s.handle_left", rna_path); fcurve_path_rename(ad, orig_handle_path, handle_path, orig_curves, &curves); } @@ -1100,8 +1100,8 @@ static void curve_rename_fcurves(Object *obedit, ListBase *orig_curves) while (a--) { keyIndex= getCVKeyIndex(editnurb, bp); if(keyIndex) { - sprintf(rna_path, "splines[%d].points[%d]", nu_index, pt_index); - sprintf(orig_rna_path, "splines[%d].points[%d]", keyIndex->nu_index, keyIndex->pt_index); + BLI_snprintf(rna_path, sizeof(rna_path), "splines[%d].points[%d]", nu_index, pt_index); + BLI_snprintf(orig_rna_path, sizeof(orig_rna_path), "splines[%d].points[%d]", keyIndex->nu_index, keyIndex->pt_index); fcurve_path_rename(ad, orig_rna_path, rna_path, orig_curves, &curves); keyIndex->nu_index= nu_index; @@ -1140,8 +1140,8 @@ static void curve_rename_fcurves(Object *obedit, ListBase *orig_curves) } if(keyIndex) { - sprintf(rna_path, "splines[%d]", nu_index); - sprintf(orig_rna_path, "splines[%d]", keyIndex->nu_index); + BLI_snprintf(rna_path, sizeof(rna_path), "splines[%d]", nu_index); + BLI_snprintf(orig_rna_path, sizeof(orig_rna_path), "splines[%d]", keyIndex->nu_index); fcurve_path_rename(ad, orig_rna_path, rna_path, orig_curves, &curves); } @@ -2749,64 +2749,6 @@ void CURVE_OT_reveal(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -/********************** select invert operator *********************/ - -static int select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) -{ - Object *obedit= CTX_data_edit_object(C); - Curve *cu= obedit->data; - ListBase *editnurb= object_editcurve_get(obedit); - Nurb *nu; - BPoint *bp; - BezTriple *bezt; - int a; - - cu->lastsel= NULL; - - for(nu= editnurb->first; nu; nu= nu->next) { - if(nu->type == CU_BEZIER) { - bezt= nu->bezt; - a= nu->pntsu; - while(a--) { - if(bezt->hide==0) { - bezt->f2 ^= SELECT; /* always do the center point */ - if((cu->drawflag & CU_HIDE_HANDLES)==0) { - bezt->f1 ^= SELECT; - bezt->f3 ^= SELECT; - } - } - bezt++; - } - } - else { - bp= nu->bp; - a= nu->pntsu*nu->pntsv; - while(a--) { - swap_selection_bpoint(bp); - bp++; - } - } - } - - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); - - return OPERATOR_FINISHED; -} - -void CURVE_OT_select_inverse(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Select Inverse"; - ot->idname= "CURVE_OT_select_inverse"; - - /* api callbacks */ - ot->exec= select_inverse_exec; - ot->poll= ED_operator_editsurfcurve; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - /********************** subdivide operator *********************/ /** Divide the line segments associated with the currently selected @@ -4607,8 +4549,6 @@ static int addvert_Nurb(bContext *C, short mode, float location[3]) } } - // XXX retopo_do_all(); - if(ok) { test2DNurb(nu); @@ -4636,7 +4576,7 @@ static int add_vertex_invoke(bContext *C, wmOperator *op, wmEvent *event) { RegionView3D *rv3d= CTX_wm_region_view3d(C); - if(rv3d && !RNA_property_is_set(op->ptr, "location")) { + if(rv3d && !RNA_struct_property_is_set(op->ptr, "location")) { Curve *cu; ViewContext vc; float location[3]; diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index 40812808d06..a2cbe6f7def 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -398,7 +398,7 @@ static int paste_file_exec(bContext *C, wmOperator *op) static int paste_file_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - if(RNA_property_is_set(op->ptr, "filepath")) + if(RNA_struct_property_is_set(op->ptr, "filepath")) return paste_file_exec(C, op); WM_event_add_fileselect(C, op); @@ -1190,7 +1190,7 @@ static int insert_text_exec(bContext *C, wmOperator *op) wchar_t *inserted_text; int a, len; - if(!RNA_property_is_set(op->ptr, "text")) + if(!RNA_struct_property_is_set(op->ptr, "text")) return OPERATOR_CANCELLED; inserted_utf8= RNA_string_get_alloc(op->ptr, "text", NULL, 0); @@ -1223,10 +1223,10 @@ static int insert_text_invoke(bContext *C, wmOperator *op, wmEvent *evt) int event= evt->type, val= evt->val; wchar_t inserted_text[2]= {0}; - if(RNA_property_is_set(op->ptr, "text")) + if(RNA_struct_property_is_set(op->ptr, "text")) return insert_text_exec(C, op); - if(RNA_property_is_set(op->ptr, "accent")) { + if(RNA_struct_property_is_set(op->ptr, "accent")) { if(cu->len!=0 && cu->pos>0) accentcode= 1; return OPERATOR_FINISHED; @@ -1673,7 +1673,7 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) path = (font && strcmp(font->name, FO_BUILTIN_NAME) != 0)? font->name: U.fontdir; - if(RNA_property_is_set(op->ptr, "filepath")) + if(RNA_struct_property_is_set(op->ptr, "filepath")) return font_open_exec(C, op); RNA_string_set(op->ptr, "filepath", path); diff --git a/source/blender/editors/datafiles/Bfont.c b/source/blender/editors/datafiles/Bfont.c index 8a9e2748983..7f40f579ff9 100644 --- a/source/blender/editors/datafiles/Bfont.c +++ b/source/blender/editors/datafiles/Bfont.c @@ -34,4 +34,1579 @@ int datatoc_Bfont_size= 25181; -char datatoc_Bfont[25181]= {128, 1, 228, 1, 0, 0, 37, 33, 80, 83, 45, 65, 100, 111, 98, 101, 70, 111, 110, 116, 45, 49, 46, 48, 58, 32, 66, 102, 111, 110, 116, 32, 48, 48, 49, 46, 48, 48, 49, 10, 49, 49, 32, 100, 105, 99, 116, 32, 98, 101, 103, 105, 110, 10, 47, 70, 111, 110, 116, 73, 110, 102, 111, 32, 49, 48, 32, 100, 105, 99, 116, 32, 100, 117, 112, 32, 98, 101, 103, 105, 110, 10, 47, 118, 101, 114, 115, 105, 111, 110, 32, 40, 48, 48, 49, 46, 48, 48, 49, 41, 32, 114, 101, 97, 100, 111, 110, 108, 121, 32, 100, 101, 102, 10, 47, 70, 117, 108, 108, 78, 97, 109, 101, 32, 40, 66, 102, 111, 110, 116, 41, 32, 114, 101, 97, 100, 111, 110, 108, 121, 32, 100, 101, 102, 10, 47, 70, 97, 109, 105, 108, 121, 78, 97, 109, 101, 32, 40, 66, 102, 111, 110, 116, 41, 32, 114, 101, 97, 100, 111, 110, 108, 121, 32, 100, 101, 102, 10, 47, 87, 101, 105, 103, 104, 116, 32, 40, 82, 101, 103, 117, 108, 97, 114, 41, 32, 114, 101, 97, 100, 111, 110, 108, 121, 32, 100, 101, 102, 10, 47, 73, 116, 97, 108, 105, 99, 65, 110, 103, 108, 101, 32, 48, 32, 100, 101, 102, 10, 47, 105, 115, 70, 105, 120, 101, 100, 80, 105, 116, 99, 104, 32, 102, 97, 108, 115, 101, 32, 100, 101, 102, 10, 47, 85, 110, 100, 101, 114, 108, 105, 110, 101, 80, 111, 115, 105, 116, 105, 111, 110, 32, 45, 49, 48, 48, 32, 100, 101, 102, 10, 47, 85, 110, 100, 101, 114, 108, 105, 110, 101, 84, 104, 105, 99, 107, 110, 101, 115, 115, 32, 53, 48, 32, 100, 101, 102, 10, 101, 110, 100, 32, 114, 101, 97, 100, 111, 110, 108, 121, 32, 100, 101, 102, 10, 47, 70, 111, 110, 116, 78, 97, 109, 101, 32, 47, 66, 102, 111, 110, 116, 32, 100, 101, 102, 10, 47, 69, 110, 99, 111, 100, 105, 110, 103, 32, 83, 116, 97, 110, 100, 97, 114, 100, 69, 110, 99, 111, 100, 105, 110, 103, 32, 100, 101, 102, 10, 47, 80, 97, 105, 110, 116, 84, 121, 112, 101, 32, 48, 32, 100, 101, 102, 10, 47, 70, 111, 110, 116, 84, 121, 112, 101, 32, 49, 32, 100, 101, 102, 10, 47, 70, 111, 110, 116, 77, 97, 116, 114, 105, 120, 32, 91, 48, 46, 48, 48, 49, 32, 48, 32, 48, 32, 48, 46, 48, 48, 49, 32, 48, 32, 48, 93, 32, 114, 101, 97, 100, 111, 110, 108, 121, 32, 100, 101, 102, 10, 99, 117, 114, 114, 101, 110, 116, 100, 105, 99, 116, 32, 101, 110, 100, 10, 99, 117, 114, 114, 101, 110, 116, 102, 105, 108, 101, 32, 101, 101, 120, 101, 99, 10, 128, 2, 146, 94, 0, 0, 217, 214, 111, 99, 59, 132, 106, 152, 155, 153, 116, 176, 23, 159, 198, 204, 68, 91, 194, 192, 49, 3, 198, 133, 112, 167, 179, 84, 164, 162, 128, 174, 111, 191, 127, 152, 247, 90, 132, 186, 206, 45, 3, 106, 107, 81, 184, 72, 73, 49, 89, 29, 146, 229, 6, 158, 98, 38, 213, 173, 204, 93, 228, 248, 16, 122, 166, 154, 53, 181, 95, 106, 155, 75, 79, 147, 197, 108, 35, 188, 198, 29, 215, 191, 143, 50, 242, 29, 88, 228, 26, 95, 121, 12, 238, 47, 2, 175, 73, 134, 149, 233, 12, 29, 11, 210, 89, 231, 91, 2, 25, 48, 11, 15, 105, 44, 51, 119, 156, 42, 166, 122, 232, 81, 122, 190, 18, 48, 8, 69, 34, 74, 246, 173, 93, 169, 219, 154, 26, 58, 64, 251, 6, 179, 106, 156, 205, 105, 18, 85, 7, 252, 45, 233, 208, 65, 132, 199, 96, 66, 240, 63, 207, 209, 83, 132, 0, 35, 151, 42, 129, 42, 185, 179, 203, 86, 112, 193, 206, 39, 89, 113, 28, 117, 41, 66, 98, 214, 242, 145, 175, 155, 124, 118, 7, 30, 218, 126, 122, 208, 38, 33, 98, 50, 34, 185, 54, 8, 122, 178, 127, 254, 95, 7, 134, 71, 6, 101, 146, 24, 61, 195, 71, 174, 146, 230, 191, 86, 177, 123, 237, 206, 19, 104, 70, 246, 162, 163, 118, 171, 140, 11, 192, 255, 78, 52, 125, 32, 253, 14, 199, 126, 250, 177, 240, 99, 49, 0, 20, 141, 42, 125, 47, 210, 31, 18, 90, 170, 205, 143, 219, 153, 121, 131, 43, 103, 13, 138, 170, 118, 210, 18, 186, 181, 97, 70, 25, 144, 150, 12, 53, 110, 184, 216, 233, 243, 198, 93, 157, 254, 127, 140, 44, 138, 123, 43, 233, 158, 99, 255, 108, 134, 136, 60, 29, 229, 7, 141, 163, 185, 30, 3, 228, 132, 13, 221, 109, 48, 227, 60, 227, 135, 117, 220, 128, 67, 195, 147, 32, 118, 71, 190, 131, 11, 245, 200, 93, 30, 226, 32, 114, 26, 39, 232, 138, 33, 109, 232, 1, 11, 233, 212, 78, 221, 88, 158, 135, 95, 159, 14, 38, 31, 12, 106, 255, 51, 147, 42, 139, 254, 210, 119, 6, 96, 221, 226, 140, 183, 213, 222, 5, 205, 13, 140, 253, 214, 125, 103, 227, 52, 60, 102, 31, 250, 163, 147, 228, 167, 58, 207, 156, 68, 166, 150, 167, 169, 116, 83, 194, 150, 104, 152, 31, 7, 157, 38, 76, 29, 10, 247, 63, 57, 194, 106, 230, 183, 120, 135, 187, 201, 211, 82, 234, 168, 182, 167, 90, 56, 37, 109, 160, 144, 13, 48, 204, 190, 14, 169, 103, 127, 136, 102, 24, 81, 61, 32, 233, 228, 158, 18, 235, 189, 28, 0, 222, 67, 17, 110, 143, 71, 223, 181, 33, 17, 66, 81, 210, 7, 23, 186, 245, 229, 198, 143, 62, 113, 33, 80, 236, 87, 148, 65, 42, 27, 111, 128, 223, 196, 140, 45, 32, 91, 123, 158, 136, 153, 166, 144, 126, 115, 133, 220, 254, 234, 192, 123, 14, 239, 75, 199, 116, 28, 241, 25, 30, 66, 226, 248, 159, 142, 46, 41, 10, 237, 111, 205, 31, 230, 72, 196, 49, 200, 50, 29, 115, 153, 141, 198, 225, 218, 157, 86, 56, 67, 249, 99, 50, 25, 151, 14, 200, 35, 186, 250, 204, 151, 187, 209, 51, 129, 161, 68, 118, 130, 31, 25, 134, 255, 75, 170, 240, 225, 113, 144, 5, 178, 133, 45, 85, 242, 66, 10, 10, 65, 138, 93, 147, 72, 210, 250, 209, 123, 148, 135, 12, 156, 94, 13, 250, 31, 211, 157, 82, 128, 132, 143, 11, 155, 47, 211, 151, 232, 142, 253, 82, 104, 234, 231, 190, 169, 78, 32, 90, 2, 41, 201, 122, 142, 205, 144, 234, 204, 198, 227, 56, 57, 6, 63, 8, 237, 89, 199, 30, 226, 169, 48, 198, 191, 38, 114, 87, 135, 189, 98, 251, 224, 210, 154, 58, 87, 26, 56, 41, 219, 119, 124, 109, 83, 182, 169, 166, 123, 255, 190, 35, 121, 177, 37, 92, 128, 242, 247, 132, 218, 149, 140, 116, 184, 163, 13, 248, 138, 68, 124, 229, 211, 89, 210, 101, 172, 149, 221, 182, 113, 36, 182, 46, 5, 141, 127, 147, 54, 118, 67, 107, 105, 187, 40, 53, 208, 170, 25, 45, 113, 216, 110, 135, 56, 7, 26, 14, 225, 61, 79, 228, 72, 30, 39, 220, 195, 227, 229, 153, 196, 28, 6, 107, 240, 54, 67, 6, 94, 143, 0, 34, 180, 49, 14, 41, 111, 9, 41, 94, 203, 184, 139, 142, 34, 140, 138, 90, 25, 216, 89, 252, 45, 46, 132, 169, 154, 230, 131, 15, 20, 100, 99, 235, 106, 73, 185, 89, 6, 66, 230, 171, 202, 22, 213, 227, 183, 32, 138, 116, 253, 208, 230, 121, 16, 63, 238, 132, 69, 28, 135, 88, 115, 18, 21, 11, 102, 172, 200, 37, 222, 255, 100, 221, 80, 173, 218, 53, 210, 250, 148, 211, 241, 97, 150, 185, 43, 250, 138, 14, 122, 133, 30, 191, 54, 158, 118, 22, 12, 232, 25, 228, 60, 101, 206, 119, 29, 57, 12, 99, 36, 167, 182, 153, 86, 195, 21, 70, 154, 102, 106, 45, 236, 70, 151, 143, 185, 207, 252, 106, 46, 168, 80, 216, 206, 157, 171, 118, 77, 82, 153, 24, 54, 165, 128, 160, 27, 195, 117, 241, 141, 93, 151, 233, 239, 244, 73, 123, 133, 42, 138, 123, 68, 159, 225, 209, 171, 242, 70, 212, 6, 168, 19, 116, 228, 0, 14, 148, 191, 132, 10, 254, 83, 125, 20, 17, 71, 126, 142, 56, 80, 55, 48, 125, 184, 172, 156, 163, 161, 72, 249, 105, 204, 207, 179, 217, 115, 177, 2, 82, 220, 142, 14, 180, 138, 254, 83, 139, 36, 70, 203, 91, 81, 82, 229, 20, 253, 78, 132, 213, 64, 154, 163, 59, 93, 245, 168, 38, 148, 48, 228, 13, 186, 204, 95, 140, 184, 118, 22, 130, 111, 27, 38, 139, 127, 106, 172, 161, 254, 136, 187, 166, 48, 162, 152, 124, 69, 27, 186, 50, 126, 7, 144, 43, 75, 176, 145, 159, 202, 244, 7, 78, 203, 250, 32, 42, 195, 71, 186, 90, 92, 162, 126, 98, 44, 195, 163, 47, 88, 124, 43, 177, 122, 251, 254, 29, 161, 70, 98, 235, 133, 52, 12, 28, 184, 67, 145, 73, 88, 99, 69, 60, 227, 142, 15, 218, 82, 167, 57, 225, 230, 218, 131, 251, 171, 11, 63, 191, 65, 236, 178, 63, 159, 213, 211, 114, 64, 200, 85, 73, 40, 94, 123, 108, 171, 89, 169, 206, 99, 196, 31, 15, 152, 138, 77, 137, 210, 197, 228, 255, 73, 126, 120, 249, 214, 170, 212, 168, 73, 54, 125, 113, 78, 226, 37, 137, 249, 188, 239, 33, 231, 244, 125, 116, 137, 126, 187, 31, 193, 194, 118, 121, 19, 80, 250, 87, 48, 80, 62, 246, 29, 121, 247, 135, 198, 193, 253, 148, 211, 17, 210, 17, 247, 44, 205, 91, 1, 190, 195, 236, 66, 95, 144, 58, 235, 2, 42, 79, 25, 82, 164, 167, 244, 114, 188, 192, 101, 23, 55, 69, 141, 168, 28, 89, 60, 116, 91, 162, 121, 28, 123, 96, 252, 165, 180, 69, 56, 232, 54, 122, 138, 223, 158, 131, 94, 171, 82, 4, 112, 13, 160, 117, 170, 146, 28, 241, 154, 211, 119, 16, 233, 141, 96, 94, 167, 13, 37, 118, 105, 73, 211, 97, 109, 148, 131, 190, 119, 45, 124, 208, 225, 39, 94, 48, 62, 33, 188, 248, 154, 233, 46, 158, 7, 144, 1, 121, 0, 235, 71, 25, 52, 13, 46, 1, 25, 171, 27, 179, 170, 164, 231, 2, 25, 182, 226, 250, 96, 192, 23, 185, 218, 218, 16, 140, 36, 180, 216, 59, 95, 49, 165, 162, 134, 252, 47, 168, 65, 242, 178, 211, 62, 10, 239, 153, 65, 219, 247, 72, 17, 105, 49, 254, 85, 136, 211, 117, 240, 218, 77, 221, 166, 41, 145, 198, 4, 104, 136, 241, 48, 0, 158, 210, 236, 207, 26, 145, 140, 95, 164, 117, 198, 0, 183, 104, 161, 59, 9, 189, 8, 32, 44, 26, 255, 157, 119, 245, 250, 49, 176, 156, 227, 102, 228, 105, 83, 24, 153, 85, 196, 129, 133, 128, 208, 129, 202, 62, 204, 173, 137, 91, 223, 112, 208, 243, 87, 180, 109, 82, 141, 56, 239, 210, 40, 86, 200, 173, 31, 32, 230, 140, 202, 61, 220, 176, 92, 108, 207, 177, 213, 169, 238, 172, 158, 254, 38, 242, 141, 6, 115, 217, 193, 134, 166, 227, 36, 208, 119, 86, 44, 34, 195, 71, 119, 94, 234, 241, 122, 79, 169, 173, 36, 221, 120, 68, 23, 3, 44, 125, 38, 78, 72, 230, 25, 62, 18, 205, 206, 66, 140, 79, 125, 229, 223, 0, 92, 25, 118, 253, 161, 219, 51, 228, 229, 212, 13, 155, 26, 50, 54, 105, 54, 38, 85, 152, 49, 150, 233, 88, 191, 111, 0, 122, 147, 95, 215, 50, 33, 176, 209, 77, 136, 198, 6, 71, 97, 100, 152, 0, 159, 94, 91, 202, 7, 148, 125, 254, 58, 38, 107, 49, 101, 14, 194, 163, 12, 79, 253, 153, 150, 54, 30, 37, 140, 189, 241, 141, 47, 57, 139, 145, 74, 88, 15, 178, 179, 63, 241, 91, 129, 30, 79, 19, 104, 72, 56, 215, 37, 124, 242, 77, 81, 109, 155, 0, 233, 122, 186, 107, 91, 145, 92, 162, 90, 4, 113, 170, 84, 211, 132, 142, 64, 27, 93, 152, 248, 107, 94, 93, 160, 109, 249, 241, 251, 102, 130, 66, 96, 51, 112, 140, 245, 151, 65, 45, 189, 157, 117, 188, 91, 97, 49, 138, 107, 106, 135, 204, 203, 38, 119, 33, 149, 87, 122, 158, 198, 8, 142, 218, 3, 56, 249, 80, 86, 253, 82, 246, 203, 231, 57, 160, 50, 52, 187, 24, 108, 130, 253, 193, 24, 51, 201, 50, 3, 67, 176, 187, 124, 165, 172, 142, 252, 156, 155, 220, 252, 51, 237, 105, 94, 48, 44, 233, 187, 188, 123, 100, 218, 223, 36, 114, 54, 219, 223, 39, 156, 112, 206, 46, 19, 10, 213, 139, 69, 12, 138, 134, 44, 130, 94, 136, 4, 111, 77, 21, 115, 225, 162, 15, 38, 159, 218, 138, 102, 171, 2, 142, 48, 158, 57, 94, 59, 182, 17, 127, 190, 223, 196, 66, 238, 107, 50, 154, 2, 142, 167, 152, 18, 25, 226, 1, 253, 251, 17, 102, 20, 111, 28, 97, 136, 15, 60, 65, 230, 39, 49, 25, 166, 31, 18, 54, 4, 24, 89, 211, 226, 250, 74, 226, 185, 67, 138, 29, 18, 85, 156, 124, 145, 84, 17, 175, 167, 51, 13, 54, 82, 97, 64, 206, 201, 111, 199, 214, 210, 235, 148, 55, 181, 241, 136, 86, 254, 219, 122, 64, 103, 179, 79, 113, 163, 126, 75, 107, 79, 102, 244, 21, 147, 198, 210, 251, 35, 136, 73, 15, 32, 45, 150, 134, 253, 113, 83, 111, 161, 110, 212, 242, 33, 12, 12, 16, 143, 194, 199, 37, 228, 251, 110, 7, 213, 198, 55, 80, 32, 209, 140, 34, 47, 102, 249, 217, 166, 118, 31, 106, 2, 18, 106, 46, 146, 148, 125, 0, 208, 89, 209, 247, 55, 143, 177, 19, 183, 127, 71, 118, 20, 136, 3, 233, 109, 119, 181, 115, 223, 110, 139, 182, 171, 109, 104, 72, 62, 152, 143, 14, 157, 82, 154, 253, 142, 215, 59, 1, 11, 98, 107, 140, 12, 240, 144, 56, 38, 14, 220, 237, 154, 174, 151, 179, 207, 104, 234, 222, 84, 126, 157, 90, 52, 118, 126, 96, 23, 203, 135, 134, 41, 16, 196, 210, 44, 125, 68, 145, 232, 236, 52, 222, 102, 131, 80, 101, 237, 218, 244, 215, 205, 95, 58, 96, 18, 66, 213, 91, 247, 58, 44, 57, 150, 193, 139, 135, 36, 143, 236, 94, 209, 236, 213, 227, 42, 176, 173, 206, 87, 151, 240, 145, 185, 45, 209, 177, 201, 123, 32, 196, 44, 158, 83, 203, 202, 6, 106, 54, 93, 43, 209, 12, 114, 76, 100, 242, 104, 165, 138, 15, 143, 5, 33, 228, 195, 243, 111, 81, 249, 174, 15, 167, 40, 165, 51, 97, 185, 215, 150, 118, 253, 22, 103, 9, 21, 185, 238, 189, 94, 49, 104, 100, 98, 165, 196, 31, 148, 112, 125, 199, 46, 103, 252, 79, 100, 165, 112, 104, 82, 249, 219, 205, 34, 198, 31, 198, 191, 181, 72, 212, 182, 62, 87, 13, 53, 171, 84, 222, 156, 131, 201, 162, 173, 47, 44, 187, 105, 119, 132, 47, 228, 184, 36, 85, 218, 11, 251, 242, 124, 205, 168, 252, 24, 245, 49, 84, 161, 107, 211, 21, 63, 219, 89, 15, 116, 192, 18, 208, 86, 95, 75, 71, 239, 247, 105, 124, 85, 174, 144, 220, 24, 188, 94, 40, 209, 132, 234, 225, 53, 69, 240, 42, 47, 92, 18, 240, 120, 210, 140, 168, 218, 105, 60, 246, 247, 238, 188, 247, 10, 162, 24, 136, 226, 91, 107, 157, 168, 51, 186, 15, 79, 68, 154, 225, 52, 41, 228, 127, 35, 41, 224, 97, 225, 44, 85, 16, 225, 99, 198, 48, 182, 98, 235, 255, 178, 24, 210, 58, 14, 200, 84, 18, 132, 137, 35, 171, 63, 195, 238, 195, 167, 167, 8, 207, 232, 214, 100, 91, 195, 90, 233, 86, 98, 207, 185, 229, 196, 140, 253, 236, 219, 150, 62, 62, 2, 15, 51, 232, 157, 44, 234, 107, 188, 220, 214, 209, 42, 165, 18, 94, 143, 235, 241, 192, 254, 106, 155, 48, 246, 239, 123, 17, 140, 12, 101, 251, 102, 156, 126, 130, 2, 38, 62, 255, 27, 134, 182, 120, 23, 158, 103, 4, 48, 154, 78, 236, 14, 254, 222, 239, 42, 228, 224, 138, 87, 211, 236, 78, 212, 1, 107, 139, 81, 5, 238, 185, 84, 205, 51, 83, 67, 52, 42, 135, 255, 244, 123, 157, 185, 116, 114, 160, 116, 246, 30, 147, 127, 129, 156, 51, 229, 39, 122, 2, 122, 145, 229, 25, 122, 2, 151, 7, 125, 246, 76, 129, 209, 110, 138, 246, 211, 33, 183, 60, 192, 108, 167, 161, 157, 173, 188, 134, 192, 179, 203, 195, 136, 84, 41, 110, 193, 122, 131, 11, 75, 124, 83, 139, 80, 12, 71, 93, 214, 179, 43, 70, 139, 91, 53, 228, 97, 105, 67, 230, 118, 92, 183, 131, 114, 231, 74, 140, 48, 135, 180, 10, 184, 148, 46, 75, 182, 205, 83, 47, 151, 206, 84, 243, 232, 233, 126, 142, 30, 11, 113, 219, 252, 153, 18, 16, 215, 238, 121, 155, 255, 21, 214, 89, 6, 196, 3, 201, 131, 48, 187, 159, 235, 14, 27, 155, 245, 77, 229, 130, 112, 168, 164, 253, 69, 23, 253, 242, 175, 19, 232, 155, 161, 27, 158, 95, 160, 90, 79, 109, 133, 203, 42, 70, 181, 120, 247, 244, 85, 191, 167, 255, 36, 251, 115, 54, 191, 78, 211, 182, 252, 5, 12, 100, 32, 48, 200, 26, 234, 123, 25, 161, 253, 134, 168, 60, 15, 187, 62, 24, 239, 177, 98, 92, 109, 195, 112, 78, 242, 161, 250, 224, 210, 94, 111, 34, 100, 196, 71, 103, 74, 123, 216, 217, 180, 160, 33, 64, 105, 123, 183, 125, 84, 77, 80, 99, 109, 247, 173, 168, 239, 122, 88, 233, 117, 237, 148, 43, 144, 195, 255, 222, 124, 214, 133, 156, 117, 244, 7, 73, 13, 100, 164, 68, 175, 191, 93, 225, 252, 128, 96, 77, 231, 196, 150, 223, 120, 56, 23, 101, 94, 23, 50, 76, 38, 27, 89, 184, 93, 140, 37, 79, 249, 66, 199, 27, 220, 230, 114, 176, 179, 228, 201, 12, 56, 113, 1, 25, 207, 104, 177, 191, 79, 237, 143, 226, 104, 92, 21, 249, 98, 205, 22, 105, 215, 184, 142, 178, 107, 8, 194, 13, 32, 156, 84, 109, 146, 152, 57, 241, 72, 62, 74, 122, 212, 88, 179, 57, 23, 186, 74, 73, 82, 37, 80, 182, 165, 40, 89, 30, 244, 209, 110, 163, 24, 182, 201, 139, 145, 225, 148, 219, 184, 1, 109, 99, 156, 37, 247, 177, 111, 50, 209, 221, 208, 78, 0, 72, 6, 236, 76, 79, 63, 132, 26, 227, 72, 142, 229, 248, 120, 160, 148, 155, 91, 51, 61, 40, 22, 192, 96, 139, 193, 192, 41, 116, 79, 140, 116, 158, 248, 64, 168, 227, 174, 56, 114, 92, 160, 31, 200, 94, 82, 99, 139, 67, 95, 47, 76, 180, 152, 43, 131, 149, 177, 4, 212, 56, 209, 190, 209, 102, 122, 224, 72, 234, 244, 111, 175, 138, 120, 23, 203, 9, 146, 234, 239, 94, 241, 28, 21, 170, 51, 2, 176, 125, 179, 217, 99, 83, 17, 16, 113, 123, 111, 68, 94, 156, 200, 90, 117, 30, 174, 131, 42, 161, 91, 76, 85, 199, 44, 75, 199, 0, 159, 111, 158, 236, 63, 252, 73, 67, 220, 113, 169, 158, 74, 7, 81, 214, 149, 155, 222, 129, 91, 63, 169, 196, 168, 208, 230, 83, 168, 4, 19, 27, 176, 157, 146, 56, 42, 254, 143, 171, 119, 60, 127, 57, 37, 107, 84, 255, 246, 76, 159, 38, 176, 233, 13, 97, 107, 64, 55, 206, 201, 204, 218, 3, 139, 123, 150, 151, 110, 28, 198, 99, 247, 167, 155, 37, 184, 253, 214, 21, 253, 250, 179, 26, 233, 98, 205, 117, 109, 94, 222, 15, 151, 184, 119, 219, 159, 26, 52, 234, 55, 66, 100, 108, 175, 174, 17, 111, 135, 189, 244, 238, 173, 23, 17, 241, 136, 78, 124, 75, 203, 114, 135, 228, 221, 79, 244, 180, 84, 215, 120, 58, 193, 234, 17, 21, 132, 110, 10, 93, 93, 0, 183, 245, 134, 61, 95, 68, 191, 141, 237, 95, 126, 87, 58, 149, 134, 213, 110, 116, 216, 192, 10, 112, 38, 232, 50, 35, 120, 57, 45, 172, 232, 37, 77, 226, 153, 110, 131, 253, 210, 168, 180, 83, 56, 51, 56, 189, 222, 97, 193, 136, 138, 42, 148, 50, 111, 24, 19, 254, 177, 109, 42, 4, 65, 172, 96, 251, 160, 54, 58, 165, 202, 64, 75, 38, 58, 75, 176, 216, 98, 146, 125, 118, 248, 14, 106, 228, 226, 81, 241, 251, 127, 27, 23, 92, 157, 140, 12, 59, 86, 252, 122, 13, 128, 14, 184, 55, 155, 44, 253, 29, 47, 123, 191, 185, 154, 163, 114, 250, 216, 48, 218, 24, 41, 137, 186, 200, 209, 147, 86, 234, 11, 251, 42, 56, 181, 243, 238, 166, 135, 92, 151, 86, 174, 89, 79, 71, 14, 24, 5, 179, 87, 131, 135, 102, 59, 186, 66, 1, 6, 72, 5, 28, 79, 49, 186, 194, 62, 179, 53, 186, 31, 143, 15, 105, 32, 251, 188, 138, 11, 244, 36, 100, 101, 80, 187, 253, 53, 90, 154, 212, 181, 126, 209, 58, 10, 55, 168, 27, 236, 115, 101, 224, 193, 103, 231, 231, 76, 130, 169, 64, 247, 143, 160, 6, 12, 187, 62, 115, 85, 133, 97, 131, 157, 164, 5, 18, 51, 69, 53, 226, 170, 32, 248, 133, 194, 58, 114, 243, 156, 53, 219, 228, 37, 51, 150, 240, 227, 74, 100, 66, 140, 115, 100, 103, 47, 160, 145, 39, 160, 75, 222, 218, 28, 108, 232, 107, 91, 0, 57, 250, 136, 6, 33, 118, 115, 103, 179, 221, 108, 40, 142, 175, 185, 2, 12, 192, 66, 213, 152, 41, 233, 223, 41, 212, 85, 17, 52, 58, 211, 181, 46, 211, 206, 189, 26, 8, 90, 115, 224, 151, 195, 224, 213, 34, 162, 189, 222, 218, 155, 78, 201, 101, 242, 9, 56, 215, 152, 239, 247, 121, 3, 16, 221, 56, 45, 35, 243, 146, 128, 44, 114, 215, 132, 101, 220, 233, 180, 2, 29, 87, 203, 185, 144, 16, 37, 113, 60, 244, 214, 140, 191, 24, 192, 37, 255, 161, 147, 216, 30, 40, 155, 88, 60, 186, 135, 11, 23, 228, 43, 157, 203, 102, 196, 197, 1, 1, 87, 218, 126, 80, 76, 30, 182, 207, 153, 135, 248, 6, 181, 215, 77, 128, 200, 10, 19, 107, 138, 202, 84, 120, 191, 140, 117, 50, 32, 27, 105, 174, 224, 170, 123, 53, 76, 48, 210, 6, 227, 195, 114, 235, 87, 145, 150, 26, 21, 17, 214, 198, 245, 125, 109, 156, 170, 204, 143, 228, 62, 196, 128, 21, 243, 153, 91, 71, 164, 113, 164, 255, 48, 36, 238, 105, 220, 163, 93, 3, 33, 47, 150, 241, 211, 190, 111, 157, 234, 189, 25, 58, 247, 75, 118, 247, 167, 171, 118, 223, 1, 180, 98, 83, 0, 2, 109, 17, 255, 116, 244, 107, 101, 220, 100, 70, 21, 133, 179, 90, 210, 116, 32, 197, 24, 82, 114, 120, 218, 14, 147, 80, 194, 80, 69, 78, 223, 157, 183, 130, 49, 139, 162, 34, 12, 176, 45, 242, 103, 232, 128, 68, 88, 225, 181, 149, 3, 210, 20, 38, 155, 6, 206, 136, 22, 170, 92, 156, 165, 116, 142, 250, 72, 203, 235, 193, 116, 244, 4, 209, 55, 186, 29, 8, 33, 193, 221, 73, 27, 212, 204, 22, 197, 179, 8, 122, 134, 8, 255, 96, 51, 2, 169, 193, 96, 128, 178, 109, 143, 131, 50, 219, 208, 58, 159, 103, 233, 100, 26, 2, 177, 129, 122, 168, 120, 71, 39, 115, 228, 108, 114, 161, 243, 24, 10, 221, 105, 0, 32, 230, 75, 208, 233, 4, 70, 249, 98, 37, 46, 87, 158, 145, 60, 85, 229, 199, 236, 126, 80, 183, 181, 12, 68, 3, 15, 23, 36, 92, 146, 109, 61, 24, 128, 78, 239, 88, 230, 215, 204, 90, 147, 118, 171, 51, 168, 95, 93, 23, 90, 244, 164, 172, 201, 222, 112, 143, 193, 209, 130, 201, 207, 118, 175, 51, 3, 83, 144, 53, 7, 2, 223, 146, 50, 101, 168, 159, 133, 28, 66, 29, 64, 233, 76, 182, 133, 172, 68, 223, 114, 254, 236, 111, 30, 73, 137, 130, 164, 131, 196, 189, 111, 155, 147, 217, 64, 194, 115, 143, 201, 77, 22, 153, 228, 83, 191, 53, 210, 87, 234, 21, 34, 187, 184, 28, 63, 179, 214, 83, 14, 112, 32, 169, 159, 133, 207, 19, 169, 188, 147, 111, 186, 114, 43, 118, 152, 25, 71, 184, 247, 239, 62, 39, 125, 8, 176, 91, 46, 127, 37, 169, 247, 186, 170, 231, 106, 124, 93, 82, 203, 135, 50, 177, 85, 74, 115, 219, 76, 96, 173, 44, 242, 38, 163, 171, 14, 0, 95, 76, 99, 75, 14, 39, 213, 116, 182, 72, 2, 234, 176, 65, 98, 150, 36, 70, 86, 137, 151, 218, 245, 141, 17, 24, 233, 41, 185, 58, 178, 56, 54, 122, 148, 231, 151, 41, 214, 96, 4, 243, 46, 63, 200, 233, 128, 161, 95, 138, 244, 183, 141, 145, 14, 25, 91, 197, 70, 3, 227, 187, 203, 223, 48, 120, 113, 7, 0, 130, 193, 160, 67, 108, 185, 71, 237, 171, 101, 159, 96, 98, 34, 4, 142, 114, 155, 160, 147, 193, 170, 48, 115, 253, 172, 245, 59, 145, 176, 55, 203, 245, 60, 24, 247, 235, 79, 12, 117, 74, 18, 151, 14, 208, 7, 227, 230, 138, 182, 107, 33, 172, 211, 232, 244, 91, 86, 80, 237, 55, 154, 175, 32, 221, 17, 151, 79, 104, 238, 25, 226, 76, 155, 72, 39, 90, 209, 93, 119, 54, 17, 9, 222, 62, 18, 136, 25, 15, 59, 194, 203, 57, 150, 0, 52, 122, 104, 84, 199, 104, 180, 154, 180, 177, 141, 173, 169, 154, 113, 35, 75, 198, 157, 150, 80, 44, 212, 248, 174, 232, 251, 140, 74, 214, 189, 41, 120, 113, 156, 65, 16, 15, 201, 18, 45, 16, 210, 104, 247, 38, 33, 40, 249, 61, 119, 153, 179, 72, 88, 122, 109, 208, 91, 186, 231, 246, 201, 154, 26, 36, 115, 126, 217, 44, 194, 140, 103, 229, 15, 250, 227, 140, 106, 204, 118, 169, 157, 84, 150, 31, 128, 194, 254, 144, 221, 84, 79, 211, 148, 33, 60, 107, 211, 170, 159, 248, 105, 63, 114, 0, 23, 234, 92, 230, 240, 118, 6, 250, 181, 184, 227, 64, 186, 40, 94, 67, 225, 133, 89, 15, 16, 174, 144, 165, 59, 6, 73, 13, 18, 29, 10, 46, 237, 23, 51, 33, 27, 193, 212, 63, 194, 5, 79, 66, 177, 81, 200, 84, 254, 225, 36, 110, 208, 225, 202, 213, 89, 214, 140, 142, 227, 223, 60, 214, 19, 145, 92, 92, 164, 207, 222, 158, 250, 12, 146, 150, 67, 204, 120, 211, 109, 95, 186, 40, 167, 178, 90, 34, 46, 234, 28, 109, 171, 182, 83, 197, 36, 51, 69, 152, 168, 121, 48, 71, 179, 22, 218, 168, 182, 160, 147, 195, 177, 176, 201, 234, 213, 209, 135, 222, 9, 1, 157, 170, 240, 175, 246, 218, 255, 92, 53, 102, 171, 22, 235, 180, 248, 118, 10, 85, 14, 24, 218, 184, 132, 191, 225, 112, 66, 3, 231, 36, 235, 34, 214, 181, 57, 104, 151, 76, 69, 101, 83, 20, 39, 170, 108, 161, 239, 236, 126, 9, 144, 27, 117, 209, 174, 173, 92, 16, 185, 25, 8, 65, 29, 134, 67, 1, 248, 62, 221, 239, 134, 12, 15, 252, 203, 140, 179, 52, 247, 3, 230, 34, 184, 102, 82, 118, 76, 218, 254, 242, 24, 115, 22, 119, 90, 4, 149, 236, 176, 116, 68, 77, 123, 201, 192, 255, 188, 107, 195, 3, 217, 184, 106, 219, 116, 81, 207, 193, 227, 101, 41, 29, 232, 72, 85, 236, 151, 74, 93, 150, 166, 171, 155, 81, 131, 81, 109, 171, 184, 37, 190, 114, 106, 113, 144, 234, 76, 143, 92, 98, 190, 112, 151, 198, 151, 181, 99, 7, 182, 50, 190, 157, 141, 17, 199, 148, 230, 14, 240, 95, 238, 139, 161, 96, 85, 137, 154, 79, 67, 168, 101, 253, 126, 23, 165, 143, 47, 33, 157, 100, 6, 130, 253, 188, 66, 21, 205, 243, 116, 62, 241, 161, 177, 199, 234, 61, 135, 55, 113, 25, 153, 27, 129, 149, 189, 140, 112, 211, 49, 176, 38, 44, 110, 29, 135, 178, 122, 233, 3, 166, 97, 175, 61, 159, 98, 61, 54, 46, 62, 246, 137, 17, 150, 249, 165, 99, 211, 172, 76, 7, 104, 39, 106, 119, 221, 159, 210, 96, 33, 236, 87, 164, 112, 47, 226, 247, 236, 140, 185, 182, 20, 201, 51, 88, 97, 52, 198, 70, 49, 248, 96, 51, 82, 115, 169, 78, 73, 112, 123, 106, 120, 113, 184, 93, 194, 224, 68, 211, 200, 237, 209, 41, 160, 127, 89, 163, 55, 9, 27, 252, 78, 93, 147, 141, 12, 156, 44, 226, 106, 126, 159, 181, 106, 84, 25, 39, 220, 41, 134, 184, 173, 69, 141, 128, 221, 57, 194, 56, 41, 148, 107, 242, 241, 174, 129, 152, 123, 81, 101, 1, 204, 9, 109, 154, 97, 169, 63, 167, 52, 96, 239, 63, 116, 163, 122, 158, 94, 221, 35, 90, 184, 69, 186, 220, 155, 205, 65, 191, 31, 209, 62, 120, 156, 77, 154, 212, 58, 165, 208, 254, 65, 204, 148, 200, 121, 78, 129, 79, 121, 39, 34, 3, 169, 118, 120, 52, 35, 119, 142, 29, 15, 144, 156, 90, 134, 101, 105, 11, 112, 32, 74, 0, 219, 159, 132, 100, 7, 106, 88, 142, 42, 159, 159, 133, 11, 175, 92, 88, 144, 12, 55, 185, 47, 142, 31, 43, 39, 16, 83, 122, 54, 7, 150, 158, 215, 14, 143, 136, 147, 141, 231, 157, 67, 152, 119, 164, 114, 159, 71, 210, 144, 98, 127, 44, 132, 218, 170, 183, 6, 185, 210, 94, 95, 99, 240, 116, 30, 126, 76, 115, 212, 246, 102, 92, 96, 159, 252, 177, 173, 238, 87, 145, 120, 239, 83, 103, 148, 111, 193, 200, 157, 199, 84, 245, 167, 68, 43, 9, 69, 55, 83, 164, 109, 90, 46, 101, 215, 36, 23, 74, 170, 73, 31, 151, 63, 13, 233, 151, 107, 248, 28, 92, 35, 70, 5, 235, 85, 219, 20, 213, 153, 157, 249, 176, 37, 255, 191, 49, 221, 195, 243, 205, 150, 238, 234, 168, 137, 153, 201, 222, 205, 199, 162, 119, 146, 41, 89, 105, 114, 144, 27, 194, 167, 15, 17, 102, 155, 81, 20, 64, 25, 235, 217, 63, 154, 242, 225, 13, 33, 182, 38, 116, 47, 107, 50, 207, 110, 29, 136, 55, 33, 139, 136, 214, 63, 92, 125, 90, 118, 202, 7, 13, 45, 43, 162, 106, 53, 143, 13, 190, 171, 226, 196, 144, 17, 49, 136, 120, 246, 99, 28, 219, 184, 171, 145, 232, 242, 225, 86, 216, 29, 251, 249, 41, 244, 144, 111, 2, 13, 67, 69, 97, 59, 202, 92, 254, 71, 189, 6, 119, 180, 186, 203, 34, 18, 85, 115, 103, 178, 15, 139, 42, 154, 39, 24, 0, 19, 22, 240, 255, 252, 93, 217, 151, 118, 89, 76, 228, 117, 200, 137, 13, 190, 247, 255, 24, 253, 162, 24, 184, 20, 70, 173, 242, 65, 255, 14, 85, 235, 99, 103, 131, 181, 84, 80, 63, 156, 184, 204, 191, 61, 156, 252, 59, 37, 109, 229, 102, 139, 94, 178, 178, 164, 231, 49, 155, 35, 56, 196, 15, 169, 144, 251, 215, 89, 129, 230, 72, 219, 139, 197, 78, 109, 102, 25, 48, 44, 123, 211, 216, 106, 185, 237, 124, 133, 39, 37, 162, 20, 211, 134, 155, 168, 11, 222, 152, 143, 211, 112, 133, 136, 21, 169, 89, 187, 92, 61, 144, 126, 142, 165, 91, 64, 45, 41, 56, 164, 108, 49, 241, 137, 99, 44, 191, 100, 11, 225, 166, 244, 183, 14, 69, 141, 184, 193, 220, 72, 211, 67, 223, 16, 43, 227, 34, 87, 91, 32, 229, 84, 162, 113, 251, 125, 218, 118, 31, 254, 16, 33, 170, 201, 209, 49, 30, 113, 104, 193, 212, 82, 64, 80, 214, 32, 149, 217, 244, 237, 193, 223, 104, 77, 128, 228, 140, 55, 252, 204, 229, 187, 36, 99, 153, 241, 138, 135, 171, 169, 62, 250, 184, 63, 167, 139, 183, 57, 170, 36, 217, 201, 129, 169, 222, 78, 153, 65, 153, 195, 211, 229, 159, 191, 0, 145, 12, 209, 25, 247, 122, 19, 108, 173, 163, 187, 235, 254, 87, 80, 25, 110, 179, 158, 48, 232, 20, 138, 81, 198, 78, 18, 44, 75, 181, 18, 238, 96, 61, 247, 229, 254, 2, 55, 169, 32, 180, 136, 177, 161, 213, 132, 128, 108, 93, 159, 201, 212, 238, 223, 233, 186, 243, 4, 248, 5, 33, 214, 193, 214, 95, 51, 141, 60, 72, 63, 142, 184, 37, 122, 118, 136, 97, 93, 142, 245, 8, 147, 224, 126, 67, 93, 170, 105, 121, 231, 171, 85, 105, 191, 126, 88, 57, 42, 253, 179, 85, 251, 193, 163, 112, 71, 28, 137, 104, 199, 121, 13, 122, 58, 231, 160, 176, 50, 200, 80, 65, 99, 25, 67, 129, 91, 97, 178, 131, 195, 111, 148, 134, 71, 57, 145, 113, 209, 177, 51, 154, 29, 28, 180, 74, 13, 69, 147, 96, 210, 108, 176, 89, 248, 238, 64, 140, 85, 196, 169, 20, 251, 238, 194, 41, 56, 39, 59, 226, 189, 130, 178, 90, 176, 226, 46, 108, 156, 204, 174, 85, 118, 165, 137, 184, 160, 133, 89, 170, 184, 37, 48, 65, 241, 224, 117, 164, 248, 213, 112, 143, 128, 23, 130, 133, 216, 66, 190, 63, 238, 179, 84, 71, 27, 50, 83, 199, 91, 126, 164, 192, 76, 107, 100, 229, 6, 25, 164, 89, 235, 117, 247, 61, 109, 205, 76, 128, 230, 41, 243, 85, 58, 189, 128, 216, 21, 53, 68, 80, 1, 25, 171, 203, 71, 176, 46, 6, 84, 35, 150, 95, 144, 144, 253, 210, 78, 10, 31, 218, 179, 248, 95, 81, 244, 79, 215, 63, 196, 100, 165, 120, 54, 14, 180, 125, 152, 106, 173, 125, 14, 108, 211, 161, 131, 229, 114, 56, 252, 16, 221, 16, 242, 74, 87, 168, 121, 127, 247, 212, 200, 71, 204, 116, 246, 255, 154, 24, 137, 127, 45, 177, 212, 17, 212, 102, 236, 29, 88, 177, 166, 135, 107, 210, 230, 219, 124, 71, 98, 50, 230, 107, 222, 79, 222, 190, 37, 241, 242, 167, 27, 117, 253, 201, 76, 251, 186, 18, 135, 96, 191, 207, 15, 107, 67, 146, 251, 105, 102, 25, 200, 71, 209, 165, 125, 192, 18, 228, 162, 238, 214, 221, 138, 49, 40, 100, 122, 249, 20, 121, 57, 199, 11, 0, 243, 76, 57, 23, 211, 110, 212, 250, 218, 95, 154, 145, 179, 173, 45, 233, 155, 246, 67, 35, 203, 93, 5, 2, 91, 121, 116, 93, 64, 69, 31, 182, 179, 74, 59, 198, 41, 19, 102, 51, 76, 126, 224, 153, 65, 254, 186, 90, 16, 91, 220, 154, 130, 20, 187, 103, 141, 248, 188, 245, 250, 139, 191, 48, 138, 40, 199, 201, 155, 147, 83, 62, 254, 80, 3, 107, 104, 36, 103, 186, 94, 186, 225, 107, 167, 118, 230, 199, 85, 241, 219, 139, 20, 28, 233, 5, 131, 144, 101, 21, 228, 236, 249, 115, 82, 62, 147, 175, 251, 174, 128, 176, 255, 248, 142, 239, 113, 165, 254, 238, 22, 99, 162, 202, 108, 79, 235, 246, 32, 220, 11, 51, 239, 109, 4, 204, 179, 212, 86, 38, 5, 232, 170, 76, 151, 131, 165, 206, 122, 105, 124, 107, 28, 137, 196, 99, 194, 6, 122, 29, 75, 178, 26, 232, 70, 33, 231, 24, 73, 33, 187, 181, 240, 75, 22, 114, 163, 98, 114, 6, 93, 2, 32, 16, 79, 93, 119, 219, 153, 15, 182, 129, 123, 242, 162, 182, 152, 200, 24, 14, 95, 48, 35, 60, 237, 71, 183, 152, 92, 134, 31, 82, 174, 53, 155, 170, 96, 221, 93, 137, 90, 31, 128, 20, 131, 15, 86, 154, 93, 190, 178, 124, 214, 130, 43, 64, 134, 249, 0, 48, 215, 92, 236, 202, 24, 47, 60, 232, 190, 124, 3, 71, 145, 183, 215, 240, 1, 100, 235, 203, 185, 205, 122, 222, 41, 199, 127, 4, 74, 57, 92, 80, 227, 109, 81, 197, 32, 38, 35, 53, 94, 245, 9, 141, 245, 223, 223, 95, 42, 175, 157, 209, 215, 90, 64, 0, 248, 244, 246, 25, 60, 7, 169, 138, 246, 184, 96, 155, 68, 94, 155, 22, 15, 241, 169, 20, 49, 215, 209, 111, 239, 200, 144, 5, 33, 153, 142, 239, 148, 110, 117, 109, 248, 67, 98, 109, 157, 187, 172, 160, 169, 85, 54, 0, 153, 129, 217, 150, 67, 124, 151, 101, 106, 131, 207, 134, 5, 255, 139, 146, 192, 0, 115, 91, 6, 129, 58, 60, 103, 106, 223, 52, 211, 102, 252, 153, 7, 36, 34, 32, 136, 111, 24, 231, 218, 101, 114, 49, 128, 185, 58, 235, 26, 108, 148, 216, 2, 109, 127, 76, 170, 230, 167, 77, 230, 144, 120, 234, 183, 78, 246, 204, 228, 134, 249, 88, 100, 196, 198, 168, 113, 216, 42, 35, 193, 234, 34, 195, 152, 125, 79, 79, 24, 161, 173, 16, 174, 46, 67, 170, 131, 156, 232, 86, 89, 173, 30, 39, 209, 177, 50, 137, 84, 109, 203, 25, 179, 105, 42, 151, 141, 56, 47, 146, 109, 175, 225, 243, 210, 206, 81, 196, 237, 159, 201, 165, 55, 181, 153, 69, 153, 117, 118, 217, 130, 65, 139, 68, 118, 59, 201, 202, 82, 129, 162, 23, 102, 61, 155, 109, 206, 125, 41, 111, 139, 83, 174, 133, 242, 44, 2, 235, 186, 58, 247, 99, 136, 173, 106, 250, 248, 34, 152, 133, 3, 208, 170, 129, 23, 60, 73, 212, 46, 191, 190, 88, 207, 221, 164, 178, 45, 215, 131, 204, 225, 117, 173, 138, 180, 3, 0, 15, 14, 221, 73, 184, 22, 167, 83, 216, 31, 137, 254, 108, 90, 21, 235, 5, 68, 143, 236, 218, 177, 170, 239, 180, 8, 168, 140, 226, 189, 16, 145, 62, 163, 225, 93, 205, 37, 120, 98, 129, 249, 129, 253, 213, 174, 200, 19, 143, 140, 9, 177, 50, 105, 134, 69, 113, 244, 133, 6, 120, 25, 155, 132, 254, 226, 207, 43, 56, 168, 69, 169, 95, 83, 166, 34, 69, 213, 187, 98, 243, 119, 143, 121, 249, 119, 129, 165, 103, 146, 140, 13, 136, 238, 160, 170, 253, 171, 212, 98, 239, 172, 195, 249, 68, 207, 60, 24, 130, 128, 167, 163, 178, 130, 220, 6, 139, 198, 201, 110, 26, 91, 155, 144, 143, 212, 85, 106, 50, 198, 74, 210, 168, 146, 232, 172, 30, 152, 206, 69, 44, 47, 88, 165, 180, 221, 45, 252, 248, 47, 26, 33, 142, 189, 77, 77, 20, 185, 247, 249, 88, 67, 117, 249, 151, 118, 57, 18, 137, 128, 189, 134, 148, 85, 7, 47, 60, 142, 110, 105, 252, 45, 165, 187, 134, 50, 255, 180, 56, 130, 137, 76, 189, 218, 152, 46, 148, 44, 1, 239, 47, 72, 192, 70, 14, 74, 90, 136, 245, 35, 40, 171, 29, 17, 97, 77, 184, 32, 38, 38, 252, 12, 0, 226, 11, 222, 132, 183, 121, 209, 83, 3, 164, 243, 32, 111, 109, 145, 203, 57, 241, 192, 5, 107, 164, 128, 3, 218, 69, 178, 200, 222, 45, 65, 105, 110, 115, 184, 75, 243, 221, 49, 226, 170, 189, 49, 246, 129, 33, 150, 38, 203, 3, 214, 111, 206, 150, 168, 137, 162, 228, 3, 96, 105, 184, 27, 106, 81, 32, 147, 230, 60, 219, 199, 176, 74, 100, 18, 80, 140, 70, 128, 115, 119, 111, 82, 172, 8, 6, 168, 188, 56, 197, 112, 159, 169, 216, 200, 90, 251, 104, 112, 19, 179, 71, 59, 181, 138, 224, 158, 252, 148, 50, 65, 55, 33, 120, 142, 137, 108, 20, 142, 236, 144, 89, 197, 190, 188, 19, 102, 227, 240, 38, 170, 129, 123, 69, 123, 193, 13, 37, 133, 44, 167, 210, 141, 172, 154, 208, 42, 156, 35, 126, 176, 1, 98, 193, 135, 102, 235, 229, 22, 34, 187, 18, 111, 64, 83, 107, 17, 157, 241, 117, 59, 8, 211, 60, 200, 87, 184, 89, 132, 249, 60, 18, 81, 237, 225, 53, 221, 131, 255, 218, 64, 239, 194, 7, 181, 40, 3, 46, 108, 220, 52, 108, 62, 254, 140, 37, 116, 15, 40, 169, 90, 47, 136, 102, 253, 7, 223, 132, 207, 60, 234, 21, 134, 155, 63, 112, 37, 72, 222, 55, 59, 20, 34, 167, 71, 222, 221, 164, 161, 92, 131, 244, 235, 243, 237, 184, 129, 77, 165, 160, 139, 171, 234, 234, 69, 113, 128, 93, 215, 9, 84, 41, 213, 35, 164, 24, 120, 204, 180, 178, 153, 47, 245, 57, 22, 175, 206, 12, 175, 203, 129, 39, 93, 127, 18, 12, 55, 43, 36, 252, 1, 104, 116, 59, 135, 193, 145, 183, 41, 62, 78, 165, 189, 232, 128, 224, 11, 142, 255, 2, 223, 95, 80, 219, 87, 249, 121, 31, 181, 50, 241, 31, 127, 174, 99, 238, 176, 116, 65, 220, 160, 189, 25, 204, 103, 20, 231, 42, 195, 34, 180, 105, 121, 110, 99, 149, 139, 1, 221, 124, 67, 172, 47, 189, 207, 14, 229, 79, 158, 187, 203, 126, 236, 14, 53, 121, 243, 132, 78, 39, 72, 7, 165, 22, 78, 41, 101, 128, 20, 168, 136, 198, 109, 226, 32, 135, 168, 104, 155, 115, 57, 50, 66, 17, 72, 245, 124, 70, 188, 194, 144, 89, 140, 85, 8, 10, 129, 227, 167, 15, 15, 201, 54, 239, 194, 154, 204, 129, 27, 190, 245, 102, 166, 178, 201, 7, 197, 78, 149, 69, 245, 4, 143, 4, 84, 13, 217, 59, 242, 223, 226, 199, 231, 118, 188, 55, 115, 56, 15, 217, 3, 0, 181, 190, 3, 162, 127, 120, 206, 181, 8, 225, 155, 148, 202, 117, 70, 96, 81, 246, 165, 253, 115, 148, 217, 138, 44, 203, 36, 44, 221, 59, 122, 68, 170, 248, 235, 88, 242, 209, 42, 71, 31, 117, 5, 149, 221, 216, 154, 116, 41, 231, 138, 123, 85, 128, 71, 109, 111, 17, 72, 163, 225, 109, 7, 40, 133, 74, 76, 155, 107, 34, 193, 114, 240, 61, 31, 24, 46, 215, 197, 96, 114, 213, 18, 214, 57, 119, 50, 18, 5, 175, 254, 21, 246, 64, 145, 171, 217, 243, 159, 250, 231, 228, 64, 164, 97, 61, 150, 9, 230, 11, 138, 132, 95, 209, 138, 97, 87, 139, 190, 171, 135, 158, 170, 99, 198, 18, 127, 44, 102, 1, 236, 90, 73, 214, 135, 116, 107, 247, 175, 46, 238, 51, 79, 163, 249, 5, 137, 145, 92, 138, 23, 207, 158, 50, 109, 131, 84, 61, 184, 252, 232, 20, 67, 107, 189, 61, 198, 27, 6, 189, 119, 34, 236, 94, 105, 65, 140, 181, 248, 32, 12, 119, 126, 0, 14, 226, 78, 7, 121, 111, 47, 30, 49, 206, 187, 125, 247, 235, 6, 229, 34, 161, 174, 72, 154, 37, 94, 8, 88, 125, 54, 182, 100, 46, 84, 144, 213, 251, 62, 71, 177, 120, 255, 194, 14, 105, 206, 151, 179, 144, 140, 191, 167, 248, 44, 70, 227, 154, 142, 32, 174, 159, 199, 154, 78, 165, 68, 96, 73, 8, 13, 246, 162, 155, 48, 7, 121, 90, 173, 40, 226, 166, 189, 35, 87, 225, 45, 209, 220, 70, 22, 156, 216, 39, 126, 84, 142, 207, 100, 219, 155, 166, 43, 253, 161, 255, 143, 148, 93, 17, 7, 109, 176, 112, 14, 87, 147, 186, 123, 32, 159, 252, 83, 111, 182, 250, 28, 239, 207, 92, 64, 17, 26, 216, 0, 41, 24, 142, 246, 19, 172, 32, 137, 234, 69, 147, 251, 234, 207, 95, 6, 113, 209, 107, 69, 122, 198, 148, 13, 18, 28, 238, 191, 168, 205, 144, 234, 181, 247, 192, 151, 176, 95, 157, 60, 224, 26, 120, 24, 16, 66, 102, 51, 185, 111, 39, 6, 205, 187, 16, 1, 141, 45, 234, 48, 144, 26, 92, 155, 213, 218, 88, 151, 0, 111, 109, 28, 44, 172, 24, 215, 205, 186, 42, 119, 124, 48, 41, 199, 85, 81, 244, 24, 170, 71, 156, 141, 249, 234, 193, 174, 77, 184, 47, 107, 112, 235, 124, 254, 7, 163, 156, 71, 59, 122, 224, 196, 215, 71, 81, 145, 207, 178, 97, 118, 45, 154, 109, 190, 143, 63, 83, 135, 110, 166, 174, 47, 195, 33, 0, 234, 212, 223, 11, 248, 210, 158, 17, 139, 239, 15, 57, 133, 185, 152, 71, 56, 2, 62, 10, 103, 243, 247, 182, 81, 10, 38, 49, 7, 131, 10, 202, 184, 79, 149, 84, 213, 122, 133, 208, 24, 141, 132, 12, 244, 251, 160, 41, 56, 219, 123, 120, 23, 240, 40, 29, 32, 213, 222, 36, 49, 173, 176, 11, 209, 145, 104, 154, 154, 182, 183, 5, 60, 131, 70, 224, 47, 125, 110, 47, 246, 180, 222, 125, 243, 251, 55, 25, 147, 77, 164, 116, 218, 152, 191, 244, 47, 199, 68, 208, 209, 49, 90, 197, 176, 2, 191, 127, 198, 48, 16, 168, 243, 41, 195, 50, 175, 33, 172, 92, 185, 254, 96, 221, 65, 24, 36, 187, 10, 104, 242, 101, 185, 176, 206, 215, 166, 82, 189, 245, 208, 62, 38, 207, 97, 192, 45, 46, 98, 66, 201, 69, 95, 206, 211, 204, 225, 137, 204, 100, 110, 58, 84, 29, 112, 144, 51, 15, 1, 170, 79, 41, 239, 77, 1, 208, 209, 80, 208, 214, 27, 168, 153, 229, 188, 40, 250, 13, 240, 23, 96, 54, 235, 23, 202, 165, 215, 109, 143, 163, 161, 136, 101, 109, 98, 102, 54, 231, 141, 157, 22, 5, 201, 89, 10, 241, 113, 225, 185, 234, 128, 212, 206, 186, 59, 114, 79, 69, 43, 171, 208, 219, 63, 219, 112, 54, 77, 156, 116, 150, 140, 113, 186, 79, 131, 109, 231, 205, 170, 253, 131, 97, 141, 107, 242, 5, 238, 167, 32, 135, 194, 143, 151, 71, 22, 81, 254, 84, 120, 103, 131, 61, 86, 126, 66, 51, 201, 0, 170, 70, 18, 38, 152, 225, 3, 117, 98, 100, 141, 114, 39, 161, 189, 146, 148, 43, 55, 189, 18, 157, 181, 185, 7, 117, 77, 56, 229, 91, 80, 233, 79, 165, 140, 24, 98, 197, 130, 50, 70, 44, 111, 230, 241, 92, 204, 246, 78, 19, 18, 231, 219, 201, 207, 84, 205, 137, 138, 113, 45, 4, 72, 145, 204, 3, 86, 230, 200, 208, 166, 218, 183, 217, 21, 89, 23, 40, 107, 161, 68, 230, 96, 236, 91, 106, 15, 38, 255, 132, 13, 248, 98, 106, 177, 223, 54, 247, 114, 82, 147, 161, 42, 43, 10, 192, 12, 94, 200, 248, 200, 85, 231, 247, 246, 201, 221, 180, 217, 113, 12, 222, 88, 53, 21, 6, 26, 214, 220, 152, 253, 92, 56, 158, 17, 233, 218, 95, 234, 91, 97, 71, 148, 11, 3, 226, 199, 250, 201, 132, 92, 244, 18, 210, 248, 212, 89, 182, 96, 73, 121, 250, 222, 59, 121, 118, 19, 28, 221, 126, 48, 119, 190, 217, 72, 194, 91, 4, 213, 17, 137, 34, 246, 7, 6, 143, 245, 97, 192, 252, 55, 145, 82, 10, 77, 111, 31, 80, 74, 156, 14, 68, 111, 82, 76, 168, 203, 9, 220, 54, 233, 175, 186, 169, 104, 243, 2, 143, 109, 213, 247, 163, 196, 181, 37, 16, 50, 218, 28, 129, 118, 162, 187, 98, 202, 226, 244, 39, 27, 90, 255, 235, 125, 98, 206, 155, 179, 211, 58, 135, 80, 97, 220, 32, 136, 18, 226, 60, 251, 51, 170, 165, 47, 4, 63, 160, 41, 105, 85, 23, 122, 32, 145, 69, 85, 159, 147, 73, 209, 201, 169, 25, 225, 164, 6, 151, 92, 9, 223, 55, 137, 202, 67, 221, 100, 161, 248, 10, 209, 195, 27, 146, 4, 219, 227, 190, 203, 134, 228, 10, 160, 34, 221, 250, 110, 203, 33, 186, 60, 136, 185, 235, 72, 45, 105, 176, 161, 36, 169, 185, 174, 168, 146, 23, 57, 128, 198, 162, 194, 197, 62, 254, 102, 200, 154, 140, 98, 40, 208, 128, 95, 151, 77, 40, 190, 88, 75, 156, 47, 207, 220, 11, 125, 159, 24, 89, 142, 60, 2, 156, 25, 44, 203, 39, 222, 166, 122, 93, 215, 91, 87, 57, 199, 69, 211, 244, 140, 241, 106, 43, 193, 10, 150, 65, 226, 163, 202, 165, 155, 93, 219, 207, 28, 174, 157, 201, 199, 169, 174, 28, 36, 117, 106, 155, 87, 209, 223, 171, 104, 72, 76, 180, 101, 196, 248, 163, 252, 150, 33, 224, 118, 128, 130, 145, 211, 28, 80, 17, 174, 33, 156, 108, 139, 120, 225, 111, 9, 46, 228, 79, 112, 121, 35, 181, 170, 12, 131, 173, 169, 4, 40, 8, 101, 34, 154, 227, 200, 57, 50, 118, 220, 128, 21, 208, 62, 131, 68, 193, 52, 163, 35, 96, 45, 225, 26, 219, 50, 194, 44, 22, 181, 83, 21, 82, 35, 100, 10, 241, 218, 12, 104, 240, 254, 190, 54, 48, 213, 87, 65, 183, 27, 232, 23, 246, 169, 179, 164, 55, 66, 70, 219, 7, 214, 128, 58, 244, 120, 52, 255, 213, 170, 81, 235, 16, 46, 18, 229, 186, 139, 118, 127, 12, 74, 173, 106, 171, 161, 3, 108, 3, 113, 211, 2, 88, 90, 227, 202, 196, 195, 69, 88, 168, 40, 87, 247, 210, 5, 26, 117, 159, 42, 3, 73, 148, 247, 236, 110, 16, 236, 169, 179, 22, 198, 32, 79, 138, 96, 70, 6, 161, 27, 71, 155, 241, 112, 60, 188, 51, 134, 154, 0, 207, 203, 43, 102, 88, 180, 139, 239, 72, 26, 46, 174, 76, 65, 14, 135, 202, 211, 124, 201, 4, 227, 40, 119, 46, 102, 23, 71, 143, 167, 164, 77, 192, 135, 16, 27, 148, 127, 123, 191, 209, 160, 49, 93, 138, 94, 161, 181, 205, 80, 80, 33, 73, 203, 45, 36, 194, 173, 86, 7, 234, 200, 138, 20, 62, 20, 110, 84, 16, 238, 207, 123, 175, 233, 40, 135, 51, 85, 136, 64, 204, 198, 207, 151, 162, 133, 207, 58, 246, 187, 201, 91, 185, 76, 46, 209, 173, 153, 71, 158, 241, 109, 66, 129, 109, 19, 70, 30, 186, 76, 249, 125, 197, 243, 223, 219, 16, 93, 134, 232, 59, 188, 42, 4, 155, 129, 236, 145, 166, 244, 222, 103, 3, 166, 145, 150, 57, 129, 19, 253, 157, 242, 66, 97, 165, 107, 87, 180, 245, 247, 47, 19, 34, 135, 219, 94, 76, 118, 156, 247, 148, 44, 142, 164, 20, 184, 96, 179, 138, 54, 39, 212, 235, 96, 215, 39, 45, 51, 215, 39, 47, 119, 120, 22, 197, 166, 158, 26, 115, 21, 16, 110, 23, 166, 132, 209, 232, 103, 248, 200, 133, 238, 224, 13, 50, 110, 33, 211, 154, 5, 239, 137, 226, 87, 131, 152, 225, 59, 208, 49, 204, 237, 81, 149, 34, 167, 46, 181, 121, 110, 31, 108, 226, 10, 80, 6, 47, 84, 180, 176, 86, 70, 171, 221, 85, 143, 172, 227, 120, 229, 75, 140, 133, 195, 176, 173, 92, 82, 179, 97, 115, 116, 236, 224, 70, 44, 166, 206, 23, 99, 0, 213, 47, 203, 153, 221, 178, 246, 196, 30, 74, 208, 100, 245, 85, 136, 132, 6, 213, 73, 199, 248, 61, 206, 141, 74, 61, 100, 181, 157, 51, 131, 95, 116, 217, 218, 162, 32, 136, 10, 115, 221, 65, 16, 223, 19, 163, 172, 73, 140, 97, 69, 67, 199, 116, 137, 251, 188, 106, 68, 78, 25, 225, 202, 40, 117, 161, 114, 10, 208, 29, 48, 217, 82, 234, 75, 134, 156, 9, 253, 241, 144, 22, 186, 139, 101, 111, 37, 72, 95, 33, 177, 20, 246, 210, 132, 1, 255, 84, 153, 171, 140, 222, 57, 86, 34, 181, 228, 39, 13, 158, 35, 57, 113, 16, 61, 97, 111, 39, 48, 192, 88, 102, 201, 83, 73, 113, 227, 116, 20, 73, 169, 135, 107, 8, 96, 250, 23, 25, 242, 51, 166, 29, 160, 169, 43, 239, 90, 254, 198, 209, 54, 249, 31, 217, 23, 118, 57, 192, 20, 69, 77, 50, 24, 34, 190, 166, 28, 181, 49, 126, 222, 133, 171, 0, 85, 212, 226, 94, 35, 11, 186, 253, 42, 162, 231, 111, 41, 53, 21, 0, 196, 211, 17, 73, 180, 211, 43, 10, 11, 169, 42, 217, 100, 220, 106, 211, 8, 68, 44, 65, 124, 214, 103, 198, 30, 191, 25, 71, 54, 175, 38, 179, 199, 70, 138, 97, 108, 255, 138, 125, 40, 227, 161, 76, 237, 137, 181, 151, 130, 199, 147, 50, 202, 63, 204, 201, 210, 176, 96, 34, 56, 67, 123, 183, 1, 76, 154, 235, 179, 216, 12, 117, 188, 46, 156, 252, 113, 160, 233, 197, 85, 136, 30, 248, 140, 12, 94, 134, 65, 86, 195, 234, 246, 91, 169, 22, 246, 179, 50, 9, 114, 221, 181, 117, 75, 248, 250, 178, 13, 27, 17, 253, 242, 46, 217, 38, 173, 41, 199, 29, 74, 40, 35, 68, 210, 208, 58, 180, 133, 244, 138, 113, 207, 34, 225, 122, 92, 111, 221, 183, 24, 150, 49, 7, 21, 66, 56, 58, 165, 114, 83, 27, 31, 48, 14, 6, 160, 66, 45, 64, 87, 184, 7, 29, 123, 248, 231, 76, 1, 133, 82, 122, 54, 198, 43, 143, 135, 5, 173, 90, 234, 193, 11, 13, 158, 200, 210, 235, 34, 16, 147, 34, 12, 162, 125, 17, 42, 120, 178, 254, 70, 247, 98, 239, 253, 121, 6, 228, 136, 142, 224, 84, 181, 244, 122, 130, 165, 247, 26, 40, 7, 194, 75, 69, 109, 154, 8, 69, 73, 19, 187, 93, 141, 133, 163, 142, 102, 230, 167, 64, 60, 82, 140, 73, 205, 221, 44, 139, 106, 67, 75, 232, 192, 201, 199, 198, 3, 138, 228, 140, 161, 212, 57, 55, 51, 94, 38, 89, 225, 92, 37, 239, 56, 35, 50, 203, 123, 145, 140, 62, 37, 78, 17, 223, 236, 211, 3, 152, 48, 200, 73, 18, 202, 203, 100, 185, 171, 51, 254, 143, 39, 141, 125, 28, 236, 179, 45, 234, 126, 20, 65, 174, 97, 241, 242, 45, 63, 49, 10, 137, 234, 137, 186, 225, 132, 36, 54, 195, 173, 21, 185, 163, 118, 125, 244, 66, 172, 145, 124, 242, 5, 21, 230, 51, 165, 24, 71, 157, 116, 172, 183, 147, 176, 148, 136, 88, 84, 10, 83, 22, 173, 67, 228, 17, 37, 136, 248, 234, 77, 233, 145, 111, 253, 31, 77, 212, 111, 222, 215, 46, 77, 29, 10, 192, 121, 17, 173, 70, 252, 53, 136, 16, 177, 162, 28, 113, 124, 181, 146, 235, 248, 80, 80, 242, 94, 21, 192, 162, 236, 21, 163, 244, 217, 15, 167, 84, 195, 43, 216, 220, 177, 69, 99, 35, 58, 217, 252, 195, 102, 13, 196, 105, 6, 217, 48, 209, 199, 143, 139, 51, 227, 180, 80, 148, 206, 183, 153, 31, 245, 60, 182, 205, 199, 153, 244, 232, 251, 209, 169, 42, 163, 67, 217, 181, 27, 57, 115, 107, 78, 192, 254, 236, 183, 230, 114, 42, 155, 19, 142, 83, 207, 172, 53, 20, 250, 2, 150, 37, 214, 186, 35, 8, 179, 170, 90, 214, 160, 218, 251, 130, 197, 24, 191, 23, 236, 227, 157, 3, 96, 32, 168, 173, 248, 215, 41, 14, 14, 80, 134, 34, 65, 108, 106, 46, 195, 150, 150, 123, 103, 56, 121, 202, 213, 107, 245, 191, 129, 192, 40, 90, 5, 30, 100, 119, 156, 208, 22, 206, 119, 48, 69, 54, 22, 230, 217, 97, 167, 114, 105, 155, 188, 78, 3, 170, 226, 209, 167, 147, 154, 90, 126, 193, 12, 253, 228, 165, 3, 31, 102, 106, 2, 235, 18, 39, 152, 173, 182, 194, 126, 183, 114, 202, 209, 32, 68, 98, 99, 185, 55, 21, 116, 89, 224, 79, 160, 166, 171, 39, 179, 173, 146, 79, 167, 36, 75, 195, 22, 248, 177, 97, 122, 14, 86, 234, 99, 20, 138, 252, 2, 31, 47, 191, 187, 136, 224, 233, 172, 28, 59, 77, 231, 124, 86, 67, 25, 9, 222, 119, 157, 29, 30, 166, 111, 107, 138, 153, 254, 26, 105, 243, 91, 208, 2, 249, 188, 40, 34, 138, 91, 32, 171, 246, 64, 57, 7, 145, 243, 155, 93, 228, 228, 158, 94, 185, 149, 63, 236, 176, 186, 35, 145, 171, 209, 213, 214, 1, 158, 143, 185, 33, 248, 84, 1, 91, 201, 0, 174, 112, 52, 165, 202, 24, 20, 234, 125, 255, 142, 35, 138, 21, 87, 157, 40, 87, 150, 222, 226, 114, 119, 127, 190, 123, 25, 10, 175, 20, 66, 35, 8, 253, 203, 17, 79, 239, 79, 49, 92, 111, 62, 64, 94, 150, 95, 50, 246, 19, 78, 89, 247, 4, 25, 146, 142, 201, 101, 137, 36, 179, 93, 80, 158, 144, 34, 248, 173, 20, 245, 180, 30, 132, 241, 10, 120, 205, 10, 200, 119, 195, 193, 48, 205, 143, 48, 53, 155, 242, 50, 99, 181, 154, 182, 44, 243, 5, 18, 121, 140, 60, 56, 141, 213, 156, 158, 122, 28, 125, 42, 152, 83, 47, 132, 16, 54, 246, 164, 123, 68, 237, 151, 20, 161, 128, 24, 251, 153, 36, 9, 100, 227, 235, 15, 204, 33, 69, 90, 175, 71, 200, 215, 24, 28, 136, 123, 224, 112, 205, 183, 171, 130, 119, 157, 87, 155, 55, 89, 50, 121, 143, 12, 118, 51, 131, 109, 111, 39, 194, 206, 119, 150, 89, 9, 199, 86, 88, 207, 32, 241, 141, 106, 11, 19, 241, 140, 74, 19, 241, 116, 186, 224, 216, 139, 83, 35, 186, 189, 122, 64, 168, 121, 63, 182, 101, 232, 152, 96, 4, 162, 191, 152, 73, 12, 240, 55, 51, 112, 218, 216, 129, 30, 39, 49, 209, 132, 24, 140, 22, 17, 216, 218, 120, 221, 248, 40, 169, 24, 78, 198, 219, 99, 86, 225, 233, 255, 239, 118, 13, 44, 190, 145, 152, 207, 101, 102, 168, 204, 212, 179, 109, 54, 101, 48, 155, 91, 170, 10, 87, 131, 49, 95, 165, 199, 62, 162, 187, 239, 186, 7, 225, 128, 178, 201, 39, 223, 213, 194, 202, 65, 216, 188, 204, 161, 53, 103, 200, 108, 56, 119, 205, 152, 227, 105, 8, 55, 99, 100, 226, 227, 206, 104, 172, 249, 126, 39, 185, 1, 243, 134, 226, 104, 36, 176, 242, 51, 27, 83, 252, 250, 219, 2, 201, 197, 64, 156, 102, 171, 172, 59, 35, 60, 154, 112, 32, 14, 252, 78, 91, 162, 54, 139, 223, 154, 97, 157, 236, 49, 33, 253, 67, 60, 100, 127, 204, 83, 235, 7, 217, 215, 136, 85, 76, 172, 161, 180, 54, 61, 43, 187, 207, 125, 50, 157, 246, 96, 159, 203, 17, 61, 26, 184, 206, 206, 232, 73, 32, 222, 252, 64, 156, 78, 140, 41, 121, 73, 222, 133, 72, 98, 45, 161, 172, 42, 230, 164, 248, 139, 255, 140, 84, 5, 244, 131, 158, 185, 177, 5, 27, 201, 68, 69, 37, 32, 11, 79, 15, 218, 201, 41, 61, 220, 82, 102, 143, 137, 93, 161, 93, 184, 133, 140, 9, 118, 220, 217, 184, 157, 227, 184, 1, 219, 35, 183, 183, 154, 195, 123, 59, 124, 166, 251, 151, 248, 83, 199, 158, 163, 206, 4, 131, 32, 69, 137, 93, 52, 213, 84, 219, 225, 85, 146, 26, 21, 122, 138, 108, 189, 93, 29, 36, 19, 127, 185, 251, 186, 134, 1, 139, 130, 148, 24, 147, 113, 153, 18, 156, 113, 220, 136, 99, 207, 16, 224, 118, 5, 125, 247, 223, 187, 255, 176, 45, 225, 100, 65, 230, 94, 247, 106, 236, 139, 48, 170, 135, 188, 110, 72, 245, 77, 229, 119, 121, 221, 117, 80, 161, 11, 83, 111, 104, 7, 16, 215, 200, 76, 70, 30, 235, 109, 255, 108, 51, 22, 39, 118, 166, 185, 10, 201, 25, 135, 139, 123, 47, 231, 94, 237, 44, 205, 224, 101, 159, 219, 52, 75, 219, 117, 127, 94, 37, 98, 166, 26, 218, 182, 135, 79, 97, 128, 47, 80, 11, 129, 232, 199, 73, 238, 20, 96, 73, 8, 13, 246, 150, 113, 16, 93, 29, 63, 99, 184, 127, 48, 184, 15, 201, 41, 8, 73, 20, 254, 186, 190, 85, 57, 106, 219, 50, 222, 245, 19, 1, 224, 126, 204, 176, 212, 46, 202, 253, 246, 139, 139, 157, 165, 224, 100, 16, 48, 50, 146, 146, 189, 215, 105, 250, 219, 7, 105, 27, 195, 58, 185, 223, 24, 132, 199, 121, 183, 28, 15, 242, 170, 196, 120, 116, 16, 197, 209, 226, 57, 221, 6, 20, 154, 98, 50, 100, 209, 68, 35, 57, 77, 168, 139, 101, 179, 73, 182, 158, 237, 54, 140, 39, 181, 108, 154, 139, 112, 185, 112, 88, 51, 125, 93, 26, 202, 77, 157, 48, 88, 66, 74, 64, 55, 153, 78, 123, 156, 171, 59, 43, 11, 142, 249, 137, 25, 136, 219, 244, 210, 117, 44, 156, 136, 80, 224, 236, 213, 190, 71, 252, 135, 37, 95, 7, 5, 28, 172, 241, 27, 217, 140, 19, 42, 138, 107, 71, 12, 75, 179, 112, 29, 129, 191, 9, 141, 179, 255, 1, 162, 7, 118, 105, 47, 49, 105, 44, 20, 86, 185, 2, 125, 146, 241, 159, 105, 176, 221, 115, 213, 14, 66, 202, 95, 250, 213, 43, 248, 176, 4, 46, 39, 84, 19, 186, 80, 242, 53, 182, 156, 3, 43, 8, 79, 88, 156, 127, 11, 247, 179, 199, 208, 251, 37, 217, 22, 207, 191, 128, 53, 160, 16, 159, 197, 19, 214, 240, 29, 193, 212, 73, 191, 244, 27, 189, 229, 99, 251, 254, 50, 42, 191, 199, 15, 149, 141, 81, 60, 25, 135, 120, 231, 40, 84, 127, 59, 150, 127, 45, 154, 135, 124, 109, 252, 186, 204, 98, 148, 162, 133, 10, 234, 232, 152, 88, 216, 54, 242, 206, 78, 160, 12, 78, 10, 228, 2, 238, 50, 9, 230, 116, 204, 206, 160, 9, 199, 12, 12, 224, 13, 153, 81, 51, 253, 140, 197, 148, 47, 192, 14, 187, 255, 216, 110, 141, 198, 35, 212, 244, 67, 77, 48, 87, 46, 46, 113, 205, 220, 81, 105, 109, 9, 248, 194, 100, 71, 187, 160, 9, 221, 178, 176, 119, 196, 36, 136, 12, 68, 34, 113, 221, 250, 250, 4, 251, 20, 137, 70, 241, 172, 178, 185, 214, 23, 55, 196, 31, 160, 76, 214, 230, 139, 192, 144, 120, 188, 225, 215, 132, 33, 105, 178, 83, 69, 92, 192, 112, 123, 221, 34, 7, 73, 145, 233, 56, 12, 67, 106, 152, 77, 143, 77, 217, 102, 6, 199, 53, 14, 162, 12, 134, 91, 59, 169, 181, 18, 47, 11, 206, 69, 65, 66, 27, 160, 98, 149, 22, 24, 53, 196, 119, 231, 84, 211, 246, 231, 218, 99, 120, 197, 151, 30, 153, 192, 120, 253, 70, 234, 253, 239, 34, 74, 6, 233, 149, 155, 214, 12, 127, 57, 92, 225, 201, 233, 116, 48, 226, 94, 159, 212, 78, 222, 99, 116, 29, 187, 3, 59, 167, 68, 108, 162, 146, 125, 6, 178, 230, 60, 158, 60, 85, 94, 113, 93, 2, 75, 195, 234, 66, 200, 148, 128, 50, 56, 58, 205, 79, 226, 11, 189, 189, 88, 32, 67, 83, 84, 188, 31, 180, 79, 252, 9, 177, 199, 53, 163, 66, 54, 110, 245, 174, 113, 225, 204, 180, 149, 6, 141, 18, 250, 150, 168, 229, 99, 107, 110, 108, 63, 70, 43, 146, 216, 64, 42, 3, 227, 146, 223, 233, 6, 140, 108, 238, 21, 245, 70, 14, 152, 92, 109, 138, 104, 200, 195, 248, 125, 230, 8, 4, 138, 125, 228, 221, 225, 98, 146, 230, 91, 225, 247, 207, 29, 112, 185, 202, 157, 218, 18, 193, 45, 54, 47, 215, 162, 29, 92, 95, 13, 88, 40, 129, 1, 150, 106, 203, 117, 76, 176, 157, 169, 61, 45, 201, 67, 35, 238, 149, 21, 174, 50, 162, 150, 120, 22, 144, 195, 187, 214, 239, 178, 231, 165, 200, 167, 170, 107, 98, 242, 205, 72, 113, 166, 163, 6, 197, 57, 210, 106, 231, 192, 17, 112, 77, 83, 171, 216, 127, 73, 143, 182, 224, 111, 104, 137, 123, 119, 52, 153, 42, 205, 161, 145, 174, 167, 38, 117, 130, 82, 31, 228, 102, 234, 30, 199, 194, 207, 73, 109, 64, 231, 55, 221, 65, 225, 203, 28, 113, 2, 120, 201, 22, 125, 211, 76, 82, 58, 75, 181, 33, 121, 189, 138, 70, 122, 155, 252, 133, 51, 35, 241, 193, 121, 148, 48, 44, 155, 123, 240, 9, 169, 145, 15, 79, 213, 180, 160, 30, 198, 225, 209, 186, 124, 186, 53, 240, 246, 13, 188, 52, 211, 221, 181, 212, 140, 143, 187, 178, 11, 181, 202, 78, 50, 55, 119, 228, 113, 120, 231, 184, 165, 122, 121, 94, 181, 222, 248, 225, 204, 245, 174, 205, 63, 219, 192, 246, 82, 101, 109, 115, 160, 153, 82, 131, 38, 219, 229, 58, 114, 205, 138, 141, 137, 237, 89, 94, 245, 84, 177, 166, 0, 38, 16, 173, 56, 248, 67, 55, 114, 252, 89, 251, 146, 93, 24, 104, 113, 181, 37, 164, 37, 158, 96, 137, 191, 214, 21, 51, 215, 58, 123, 111, 161, 116, 157, 112, 211, 188, 210, 52, 105, 219, 91, 213, 191, 133, 171, 47, 102, 174, 51, 170, 180, 10, 30, 181, 17, 43, 76, 13, 242, 136, 41, 45, 155, 24, 45, 79, 146, 218, 6, 107, 47, 142, 32, 141, 94, 165, 12, 149, 84, 170, 122, 202, 67, 130, 126, 39, 129, 244, 187, 19, 227, 22, 108, 234, 94, 98, 61, 155, 251, 228, 212, 43, 37, 254, 81, 222, 41, 67, 5, 225, 124, 53, 203, 111, 24, 212, 64, 17, 85, 194, 255, 56, 190, 115, 192, 203, 55, 170, 152, 187, 166, 116, 85, 66, 167, 213, 247, 129, 15, 118, 86, 104, 224, 195, 108, 109, 6, 200, 191, 34, 138, 117, 74, 182, 209, 18, 204, 182, 139, 184, 27, 107, 175, 14, 145, 155, 197, 251, 53, 141, 209, 98, 130, 230, 2, 91, 91, 90, 254, 131, 252, 91, 85, 39, 212, 73, 90, 57, 184, 144, 26, 163, 6, 32, 243, 234, 162, 234, 236, 167, 234, 73, 113, 50, 77, 165, 129, 122, 211, 6, 34, 194, 184, 29, 135, 226, 91, 114, 14, 96, 246, 243, 22, 200, 242, 220, 174, 227, 244, 168, 199, 197, 55, 114, 62, 215, 172, 58, 60, 82, 41, 205, 8, 107, 253, 62, 108, 122, 249, 78, 137, 39, 167, 14, 35, 153, 136, 62, 193, 211, 120, 49, 237, 232, 22, 215, 190, 132, 161, 250, 249, 174, 253, 90, 93, 210, 35, 222, 35, 62, 60, 204, 107, 63, 198, 121, 147, 68, 213, 75, 49, 50, 3, 5, 74, 30, 92, 119, 11, 223, 133, 222, 29, 233, 248, 93, 87, 194, 139, 84, 52, 214, 44, 146, 19, 241, 82, 204, 163, 154, 253, 130, 159, 88, 148, 116, 207, 29, 114, 117, 150, 154, 24, 81, 78, 95, 1, 208, 84, 197, 172, 141, 3, 107, 18, 192, 120, 196, 91, 30, 82, 90, 232, 163, 10, 142, 96, 198, 62, 126, 212, 153, 100, 207, 146, 122, 233, 92, 188, 147, 27, 9, 102, 204, 119, 209, 242, 71, 222, 108, 114, 249, 173, 59, 14, 67, 26, 104, 240, 136, 199, 70, 131, 39, 134, 18, 1, 152, 79, 224, 130, 104, 195, 179, 215, 90, 186, 244, 238, 12, 90, 181, 145, 75, 238, 84, 158, 111, 63, 187, 121, 152, 132, 167, 150, 138, 62, 203, 40, 70, 138, 154, 210, 37, 50, 226, 69, 253, 143, 26, 0, 243, 131, 5, 139, 79, 48, 48, 115, 122, 61, 71, 41, 1, 232, 239, 4, 96, 74, 209, 253, 128, 224, 222, 158, 97, 150, 16, 30, 132, 240, 199, 197, 118, 13, 71, 56, 160, 190, 35, 215, 110, 165, 254, 26, 69, 43, 195, 163, 30, 245, 138, 48, 80, 140, 245, 89, 83, 165, 65, 39, 20, 83, 115, 119, 111, 90, 202, 101, 172, 91, 178, 35, 17, 120, 45, 118, 91, 60, 189, 180, 133, 34, 19, 137, 152, 143, 16, 186, 214, 4, 46, 242, 23, 179, 229, 204, 55, 218, 22, 188, 5, 222, 140, 69, 195, 43, 31, 34, 159, 131, 53, 28, 83, 208, 158, 112, 163, 16, 61, 175, 3, 69, 113, 134, 174, 21, 125, 162, 91, 182, 251, 120, 17, 94, 100, 252, 199, 118, 35, 248, 64, 206, 179, 38, 121, 176, 84, 197, 9, 2, 45, 111, 244, 161, 250, 199, 130, 208, 167, 250, 0, 155, 57, 0, 95, 39, 206, 237, 5, 23, 58, 142, 137, 77, 164, 152, 219, 94, 57, 237, 16, 219, 119, 57, 58, 101, 189, 104, 205, 228, 28, 237, 119, 143, 99, 241, 5, 160, 115, 91, 215, 246, 198, 153, 60, 186, 64, 248, 126, 67, 56, 155, 179, 55, 102, 3, 47, 68, 145, 41, 209, 45, 148, 106, 11, 71, 191, 171, 245, 33, 6, 133, 216, 1, 109, 128, 56, 120, 247, 17, 169, 150, 173, 61, 111, 0, 65, 2, 95, 229, 63, 59, 185, 148, 213, 149, 140, 190, 57, 151, 163, 73, 9, 231, 250, 76, 126, 211, 12, 175, 14, 38, 146, 30, 102, 22, 124, 58, 137, 239, 181, 99, 176, 2, 184, 48, 196, 132, 248, 140, 90, 194, 95, 6, 90, 242, 171, 254, 189, 235, 8, 68, 244, 115, 89, 217, 10, 61, 172, 252, 75, 186, 117, 212, 216, 62, 253, 98, 156, 233, 96, 139, 55, 91, 251, 168, 221, 67, 231, 18, 140, 250, 38, 232, 143, 65, 220, 234, 129, 106, 184, 63, 171, 119, 96, 32, 9, 45, 151, 74, 71, 81, 162, 109, 58, 194, 125, 191, 169, 244, 9, 190, 37, 38, 98, 36, 238, 176, 38, 150, 30, 227, 0, 191, 60, 189, 0, 4, 178, 196, 238, 182, 233, 8, 126, 14, 236, 73, 100, 16, 150, 49, 26, 104, 152, 197, 132, 53, 229, 100, 196, 206, 7, 74, 91, 143, 23, 206, 120, 252, 52, 73, 161, 148, 41, 160, 137, 29, 207, 222, 13, 128, 144, 191, 162, 60, 24, 226, 187, 250, 73, 76, 246, 240, 31, 254, 109, 144, 102, 248, 207, 215, 44, 182, 29, 202, 54, 141, 107, 124, 239, 205, 243, 54, 158, 0, 148, 202, 98, 65, 233, 201, 60, 169, 34, 64, 81, 62, 205, 225, 228, 233, 250, 23, 146, 53, 104, 120, 68, 71, 179, 26, 156, 230, 25, 225, 235, 138, 20, 196, 223, 72, 176, 237, 67, 107, 202, 211, 32, 31, 184, 26, 178, 64, 134, 225, 115, 8, 227, 9, 200, 33, 31, 31, 58, 82, 251, 249, 54, 46, 60, 12, 233, 66, 222, 144, 243, 111, 110, 25, 117, 77, 108, 223, 211, 209, 23, 78, 162, 154, 77, 84, 251, 166, 89, 207, 45, 78, 51, 85, 18, 51, 14, 56, 9, 131, 186, 111, 229, 230, 11, 197, 196, 201, 184, 134, 147, 52, 14, 185, 145, 14, 9, 164, 157, 82, 3, 252, 42, 244, 140, 207, 189, 77, 13, 232, 248, 139, 10, 137, 30, 189, 91, 92, 202, 63, 249, 97, 212, 139, 39, 155, 251, 253, 10, 249, 13, 115, 238, 203, 112, 147, 186, 185, 46, 239, 51, 143, 148, 251, 163, 208, 254, 121, 240, 243, 22, 162, 47, 196, 44, 249, 0, 59, 127, 144, 82, 11, 69, 124, 76, 131, 231, 236, 169, 97, 172, 168, 157, 24, 17, 61, 108, 229, 182, 153, 0, 196, 23, 118, 40, 70, 167, 178, 79, 47, 113, 75, 93, 46, 135, 148, 121, 57, 20, 150, 28, 66, 210, 141, 142, 91, 131, 112, 239, 188, 35, 5, 181, 128, 2, 59, 120, 6, 228, 206, 130, 132, 104, 30, 219, 147, 82, 12, 48, 9, 98, 51, 34, 196, 135, 236, 115, 178, 10, 25, 8, 205, 28, 231, 140, 199, 224, 224, 162, 123, 88, 194, 202, 218, 116, 49, 233, 137, 112, 72, 235, 157, 125, 137, 74, 132, 49, 69, 232, 249, 247, 241, 47, 8, 112, 5, 72, 138, 149, 121, 2, 148, 204, 93, 231, 44, 129, 140, 149, 206, 104, 37, 208, 181, 86, 67, 122, 167, 114, 166, 200, 134, 180, 179, 139, 120, 16, 106, 171, 93, 58, 179, 175, 179, 244, 148, 36, 83, 171, 157, 182, 146, 111, 22, 0, 144, 110, 105, 47, 90, 236, 177, 47, 44, 35, 250, 237, 111, 141, 89, 6, 186, 22, 196, 32, 166, 23, 143, 17, 96, 127, 58, 139, 137, 29, 250, 164, 52, 141, 1, 13, 117, 82, 93, 241, 254, 120, 139, 165, 1, 114, 105, 7, 135, 180, 57, 252, 202, 233, 69, 253, 38, 11, 88, 223, 17, 203, 64, 162, 170, 127, 59, 163, 90, 8, 58, 149, 20, 214, 159, 26, 160, 120, 244, 123, 91, 203, 31, 86, 237, 20, 242, 66, 14, 182, 206, 127, 54, 119, 36, 182, 41, 129, 128, 193, 81, 19, 182, 120, 85, 23, 210, 220, 177, 202, 204, 102, 143, 81, 243, 233, 15, 67, 183, 157, 96, 122, 120, 130, 79, 154, 118, 36, 78, 152, 24, 123, 90, 86, 169, 200, 20, 29, 57, 210, 133, 16, 52, 24, 202, 20, 173, 101, 230, 61, 47, 105, 94, 244, 47, 217, 207, 87, 87, 93, 204, 138, 110, 8, 150, 200, 248, 129, 139, 134, 225, 34, 34, 150, 247, 70, 194, 144, 167, 21, 98, 161, 7, 38, 78, 3, 36, 42, 134, 161, 157, 203, 87, 34, 171, 28, 199, 64, 186, 130, 223, 103, 121, 88, 130, 50, 174, 10, 50, 79, 13, 92, 162, 99, 1, 85, 168, 122, 61, 132, 80, 85, 112, 238, 6, 179, 207, 162, 53, 16, 198, 250, 218, 206, 202, 242, 248, 31, 74, 86, 197, 133, 193, 36, 99, 133, 160, 223, 55, 36, 153, 101, 165, 188, 184, 179, 189, 36, 198, 254, 51, 199, 13, 116, 24, 10, 135, 101, 208, 166, 54, 107, 1, 166, 97, 38, 201, 45, 86, 218, 44, 163, 60, 173, 129, 69, 17, 204, 55, 85, 141, 80, 100, 88, 127, 108, 205, 65, 73, 159, 204, 216, 250, 240, 17, 121, 196, 196, 121, 46, 64, 25, 215, 88, 102, 221, 244, 35, 248, 96, 114, 66, 125, 134, 7, 83, 97, 0, 80, 166, 224, 216, 22, 213, 18, 42, 242, 126, 182, 81, 224, 10, 37, 193, 43, 174, 74, 159, 147, 58, 65, 217, 147, 110, 214, 95, 122, 174, 125, 121, 74, 66, 144, 74, 99, 52, 132, 104, 105, 139, 225, 128, 62, 1, 188, 7, 43, 185, 222, 134, 6, 216, 52, 211, 213, 83, 109, 176, 166, 152, 161, 48, 211, 124, 198, 241, 52, 237, 139, 155, 20, 233, 140, 55, 147, 68, 77, 166, 106, 81, 213, 250, 74, 125, 165, 213, 65, 147, 92, 31, 208, 242, 169, 90, 30, 239, 165, 143, 196, 85, 247, 121, 147, 38, 181, 170, 75, 30, 224, 105, 121, 27, 197, 246, 172, 39, 109, 6, 209, 42, 208, 13, 148, 153, 97, 247, 38, 168, 185, 76, 42, 102, 145, 166, 27, 242, 37, 136, 45, 245, 32, 200, 177, 225, 248, 154, 117, 172, 184, 37, 156, 208, 100, 151, 64, 16, 193, 254, 213, 205, 140, 207, 153, 64, 155, 57, 47, 237, 59, 231, 10, 130, 204, 72, 30, 17, 60, 76, 115, 161, 237, 104, 5, 38, 254, 90, 152, 208, 49, 194, 160, 243, 106, 78, 41, 251, 143, 104, 130, 180, 241, 98, 211, 238, 194, 224, 36, 242, 39, 109, 180, 67, 130, 210, 44, 8, 162, 150, 16, 76, 83, 40, 86, 97, 87, 187, 42, 50, 63, 35, 98, 192, 23, 138, 236, 90, 3, 157, 19, 5, 252, 228, 211, 239, 1, 85, 190, 54, 144, 218, 221, 184, 19, 89, 75, 138, 53, 115, 206, 31, 100, 99, 187, 80, 162, 222, 134, 167, 238, 117, 84, 36, 62, 178, 224, 147, 119, 160, 65, 244, 245, 157, 188, 184, 222, 42, 53, 188, 84, 51, 5, 22, 214, 229, 92, 249, 17, 78, 6, 79, 145, 92, 201, 53, 58, 45, 87, 90, 19, 194, 253, 18, 68, 87, 58, 48, 206, 85, 241, 173, 40, 0, 38, 75, 210, 227, 254, 150, 117, 168, 88, 41, 180, 31, 77, 239, 136, 37, 106, 222, 33, 63, 239, 217, 245, 29, 11, 255, 94, 181, 132, 91, 80, 152, 15, 224, 253, 187, 104, 191, 95, 180, 55, 108, 24, 65, 32, 27, 147, 201, 102, 102, 64, 245, 14, 196, 154, 169, 133, 191, 117, 49, 108, 75, 133, 72, 95, 48, 126, 1, 166, 187, 129, 223, 94, 96, 39, 225, 222, 196, 210, 129, 35, 24, 186, 145, 6, 173, 82, 67, 130, 97, 167, 138, 167, 57, 181, 228, 249, 247, 44, 29, 9, 140, 245, 49, 164, 210, 119, 91, 176, 15, 31, 206, 88, 229, 155, 23, 72, 114, 224, 237, 190, 194, 147, 133, 233, 170, 22, 64, 241, 162, 204, 52, 208, 138, 159, 29, 94, 25, 117, 103, 132, 232, 65, 198, 90, 183, 113, 6, 76, 52, 141, 199, 166, 170, 128, 199, 251, 60, 137, 86, 78, 52, 16, 72, 64, 112, 174, 67, 54, 73, 63, 55, 183, 30, 11, 48, 131, 7, 94, 151, 17, 166, 115, 62, 5, 221, 71, 30, 137, 35, 181, 250, 187, 68, 26, 187, 51, 202, 249, 76, 162, 63, 10, 144, 123, 119, 217, 155, 15, 214, 212, 52, 39, 208, 109, 210, 206, 230, 242, 186, 254, 170, 138, 52, 40, 130, 7, 102, 67, 28, 38, 106, 152, 122, 172, 184, 166, 81, 30, 236, 149, 213, 236, 174, 130, 140, 44, 143, 199, 9, 118, 58, 11, 30, 126, 139, 39, 128, 92, 83, 242, 207, 200, 157, 245, 147, 84, 207, 140, 120, 59, 56, 228, 145, 177, 130, 48, 139, 78, 101, 124, 42, 228, 129, 172, 14, 248, 144, 142, 189, 38, 158, 58, 85, 84, 75, 136, 180, 175, 13, 184, 0, 26, 128, 234, 151, 167, 40, 6, 163, 8, 23, 57, 69, 42, 89, 174, 50, 0, 216, 186, 166, 7, 143, 123, 95, 23, 26, 134, 127, 125, 199, 117, 26, 215, 129, 212, 119, 83, 2, 66, 96, 247, 126, 241, 49, 171, 186, 222, 146, 234, 115, 199, 123, 112, 79, 147, 53, 210, 95, 192, 166, 49, 137, 245, 80, 120, 14, 184, 242, 237, 131, 27, 141, 100, 178, 185, 54, 245, 152, 55, 243, 88, 45, 122, 48, 229, 214, 55, 118, 105, 222, 26, 189, 68, 42, 21, 34, 57, 165, 246, 109, 35, 84, 45, 76, 196, 116, 127, 88, 180, 10, 179, 103, 226, 208, 33, 91, 111, 12, 231, 221, 166, 64, 199, 93, 87, 58, 164, 108, 23, 126, 169, 216, 119, 68, 104, 24, 51, 156, 71, 175, 181, 93, 184, 124, 171, 34, 72, 115, 95, 148, 72, 166, 241, 178, 223, 36, 10, 12, 219, 50, 172, 139, 152, 26, 232, 185, 249, 95, 249, 8, 244, 20, 78, 136, 141, 145, 169, 168, 2, 208, 9, 30, 37, 50, 149, 47, 50, 17, 64, 214, 168, 32, 23, 228, 232, 31, 78, 219, 77, 8, 80, 253, 41, 79, 8, 123, 65, 234, 36, 78, 151, 23, 68, 18, 70, 10, 9, 9, 33, 142, 129, 115, 143, 191, 127, 209, 141, 202, 189, 55, 120, 16, 148, 184, 122, 178, 77, 10, 149, 18, 30, 6, 101, 53, 90, 155, 239, 253, 82, 57, 11, 125, 84, 7, 175, 116, 62, 210, 232, 112, 130, 253, 105, 153, 203, 31, 120, 251, 241, 45, 41, 127, 96, 146, 11, 187, 180, 115, 21, 63, 182, 213, 196, 175, 255, 162, 31, 233, 65, 197, 110, 42, 136, 54, 118, 234, 176, 3, 252, 83, 4, 107, 133, 19, 226, 34, 163, 232, 31, 39, 171, 178, 242, 36, 69, 64, 33, 167, 139, 81, 184, 160, 207, 119, 37, 137, 40, 165, 50, 167, 243, 188, 82, 142, 91, 2, 0, 209, 16, 166, 152, 134, 113, 185, 236, 253, 161, 120, 90, 94, 189, 81, 201, 224, 60, 66, 82, 23, 12, 199, 197, 86, 198, 16, 54, 174, 237, 121, 186, 244, 141, 50, 26, 152, 120, 78, 52, 71, 115, 40, 94, 156, 22, 162, 241, 219, 90, 212, 236, 21, 153, 170, 142, 20, 200, 251, 49, 98, 192, 173, 14, 167, 199, 167, 176, 235, 111, 61, 243, 30, 215, 35, 113, 127, 122, 250, 79, 162, 40, 130, 81, 31, 51, 177, 240, 9, 31, 192, 210, 151, 171, 78, 201, 50, 102, 227, 75, 196, 239, 232, 175, 240, 119, 205, 191, 180, 209, 68, 123, 86, 244, 114, 244, 209, 7, 35, 17, 16, 89, 133, 89, 42, 9, 18, 124, 21, 252, 101, 244, 88, 79, 214, 234, 145, 140, 52, 118, 47, 44, 121, 43, 14, 6, 157, 26, 16, 172, 252, 85, 94, 84, 59, 134, 19, 119, 10, 70, 91, 157, 246, 8, 74, 32, 15, 23, 230, 2, 205, 188, 103, 237, 92, 19, 88, 21, 147, 135, 117, 124, 107, 140, 39, 152, 51, 56, 246, 122, 153, 174, 106, 145, 140, 146, 78, 180, 243, 212, 62, 46, 3, 131, 137, 78, 56, 79, 160, 252, 117, 84, 126, 199, 194, 240, 227, 23, 188, 40, 206, 72, 68, 40, 58, 91, 183, 80, 40, 31, 65, 9, 70, 23, 34, 64, 199, 213, 138, 80, 140, 58, 202, 215, 115, 223, 92, 181, 218, 116, 252, 210, 190, 210, 54, 166, 241, 66, 132, 62, 98, 109, 158, 51, 52, 89, 69, 24, 171, 176, 235, 116, 175, 18, 111, 80, 167, 209, 170, 150, 194, 152, 23, 96, 162, 41, 244, 232, 80, 85, 76, 226, 126, 240, 196, 214, 81, 40, 183, 225, 102, 10, 166, 57, 231, 230, 232, 149, 164, 116, 112, 122, 0, 182, 53, 199, 252, 55, 50, 111, 243, 200, 64, 191, 29, 240, 86, 187, 126, 133, 121, 249, 249, 37, 58, 174, 209, 39, 152, 103, 151, 131, 127, 207, 154, 14, 188, 239, 28, 107, 33, 10, 57, 82, 158, 116, 63, 225, 29, 103, 80, 134, 84, 245, 37, 13, 1, 70, 95, 180, 82, 191, 0, 67, 243, 67, 218, 148, 30, 248, 160, 133, 92, 83, 190, 197, 251, 150, 117, 28, 178, 121, 17, 16, 209, 4, 188, 155, 55, 82, 134, 128, 3, 104, 142, 132, 144, 32, 101, 0, 223, 166, 79, 49, 108, 64, 231, 162, 6, 27, 94, 116, 68, 235, 168, 36, 115, 39, 191, 151, 28, 202, 228, 35, 90, 53, 172, 170, 173, 151, 236, 174, 197, 19, 85, 216, 192, 158, 128, 35, 6, 88, 21, 25, 158, 92, 18, 213, 22, 136, 119, 149, 124, 213, 103, 197, 6, 206, 174, 36, 196, 199, 208, 68, 57, 84, 28, 218, 251, 214, 75, 157, 254, 46, 61, 228, 188, 87, 93, 125, 155, 38, 175, 4, 36, 160, 31, 177, 70, 222, 245, 85, 246, 69, 109, 45, 77, 151, 175, 202, 23, 17, 139, 66, 77, 166, 155, 251, 82, 156, 11, 77, 102, 222, 20, 170, 255, 232, 162, 41, 73, 26, 89, 118, 58, 126, 212, 207, 108, 55, 5, 136, 150, 240, 223, 185, 103, 231, 115, 182, 189, 39, 164, 162, 182, 112, 113, 11, 93, 250, 108, 247, 231, 143, 172, 67, 223, 221, 224, 24, 116, 128, 119, 232, 143, 90, 27, 149, 49, 226, 195, 238, 66, 233, 15, 97, 137, 170, 155, 236, 124, 185, 95, 192, 121, 36, 82, 76, 249, 31, 46, 102, 185, 14, 243, 30, 244, 217, 184, 156, 156, 207, 35, 38, 89, 107, 212, 139, 75, 161, 16, 78, 232, 76, 209, 7, 92, 94, 80, 159, 58, 162, 138, 216, 206, 231, 93, 85, 198, 140, 90, 200, 170, 79, 118, 26, 52, 168, 111, 165, 224, 91, 45, 85, 42, 162, 142, 55, 0, 19, 167, 142, 86, 74, 235, 43, 230, 3, 162, 93, 33, 239, 43, 181, 253, 155, 106, 28, 48, 150, 43, 234, 102, 187, 247, 187, 40, 43, 158, 33, 48, 242, 214, 95, 182, 126, 3, 25, 218, 47, 163, 140, 217, 6, 221, 199, 57, 76, 182, 244, 110, 49, 168, 240, 129, 31, 226, 185, 35, 18, 185, 189, 2, 17, 190, 134, 137, 29, 76, 118, 48, 216, 33, 188, 103, 160, 66, 143, 23, 230, 255, 24, 238, 6, 111, 18, 214, 163, 244, 30, 36, 4, 216, 31, 162, 60, 127, 235, 203, 67, 34, 69, 20, 227, 220, 56, 107, 78, 81, 10, 160, 169, 19, 255, 211, 126, 46, 77, 46, 152, 46, 114, 135, 139, 23, 3, 172, 52, 80, 86, 11, 5, 190, 51, 86, 190, 67, 0, 75, 17, 160, 229, 12, 254, 152, 221, 3, 213, 220, 213, 244, 51, 157, 73, 251, 206, 213, 43, 113, 247, 245, 189, 52, 226, 250, 109, 212, 4, 168, 132, 24, 137, 160, 175, 219, 204, 156, 32, 253, 121, 8, 209, 200, 96, 88, 93, 66, 243, 84, 76, 148, 142, 229, 86, 31, 106, 10, 23, 136, 200, 132, 152, 150, 51, 125, 202, 13, 202, 63, 110, 38, 125, 12, 113, 17, 162, 92, 217, 24, 108, 235, 209, 81, 65, 202, 179, 60, 176, 11, 91, 62, 45, 126, 96, 9, 66, 153, 134, 11, 40, 231, 205, 66, 5, 249, 92, 99, 119, 206, 105, 108, 207, 79, 44, 61, 10, 179, 18, 7, 33, 15, 68, 204, 40, 214, 171, 223, 177, 98, 94, 176, 243, 165, 152, 231, 154, 1, 67, 226, 236, 109, 137, 202, 72, 234, 243, 23, 156, 41, 105, 118, 40, 72, 112, 147, 53, 76, 126, 158, 255, 145, 213, 214, 43, 241, 194, 125, 227, 104, 241, 196, 244, 237, 140, 214, 62, 210, 249, 207, 143, 58, 106, 182, 10, 75, 247, 114, 19, 127, 210, 217, 102, 190, 200, 149, 36, 59, 137, 204, 222, 223, 123, 63, 215, 84, 249, 49, 149, 83, 137, 205, 224, 192, 44, 166, 101, 109, 181, 98, 219, 17, 169, 186, 35, 11, 108, 131, 75, 185, 220, 58, 214, 129, 67, 15, 106, 220, 67, 76, 7, 247, 154, 201, 146, 25, 224, 51, 169, 180, 61, 73, 169, 216, 163, 64, 179, 144, 61, 184, 163, 163, 8, 113, 40, 42, 53, 46, 80, 50, 199, 156, 6, 138, 44, 86, 130, 12, 195, 251, 191, 99, 122, 127, 116, 155, 248, 205, 86, 172, 49, 197, 132, 101, 124, 32, 23, 225, 78, 252, 23, 182, 27, 10, 93, 135, 220, 98, 246, 62, 157, 134, 102, 1, 113, 244, 65, 39, 3, 106, 168, 22, 142, 16, 64, 140, 15, 80, 99, 35, 22, 179, 165, 166, 85, 100, 233, 90, 229, 18, 78, 92, 204, 255, 218, 224, 121, 218, 149, 146, 101, 90, 237, 209, 141, 172, 71, 193, 90, 175, 189, 165, 169, 88, 27, 15, 197, 225, 132, 32, 122, 215, 89, 92, 130, 175, 160, 186, 201, 20, 61, 64, 162, 133, 3, 43, 242, 1, 253, 252, 181, 136, 253, 218, 163, 130, 111, 36, 14, 133, 7, 219, 204, 145, 34, 32, 170, 193, 236, 151, 74, 74, 147, 76, 138, 107, 121, 122, 117, 158, 28, 246, 50, 255, 135, 138, 164, 17, 38, 164, 210, 75, 174, 116, 208, 146, 145, 163, 54, 161, 142, 104, 242, 253, 76, 97, 186, 92, 131, 69, 189, 217, 241, 225, 157, 78, 37, 78, 96, 220, 194, 3, 246, 214, 121, 178, 93, 26, 46, 165, 137, 4, 223, 97, 14, 94, 50, 52, 234, 50, 86, 69, 141, 165, 121, 202, 152, 37, 85, 22, 135, 212, 233, 30, 106, 208, 152, 10, 196, 23, 144, 2, 199, 18, 43, 47, 236, 83, 30, 54, 249, 7, 145, 116, 239, 36, 191, 115, 171, 101, 77, 39, 102, 167, 249, 152, 234, 193, 141, 24, 143, 254, 132, 241, 49, 221, 223, 189, 103, 12, 245, 20, 240, 213, 121, 152, 82, 69, 179, 192, 186, 6, 66, 56, 22, 22, 144, 240, 125, 87, 13, 248, 93, 108, 229, 245, 148, 14, 62, 131, 45, 100, 201, 63, 68, 118, 249, 66, 98, 132, 141, 74, 140, 20, 220, 81, 134, 141, 172, 190, 199, 149, 205, 93, 57, 45, 113, 240, 15, 161, 4, 122, 228, 28, 150, 220, 183, 88, 226, 51, 117, 6, 107, 122, 39, 165, 25, 15, 197, 199, 149, 157, 131, 214, 44, 253, 240, 247, 241, 139, 229, 232, 212, 218, 113, 23, 188, 132, 147, 250, 252, 14, 145, 7, 246, 101, 27, 190, 155, 27, 224, 20, 37, 63, 2, 54, 38, 5, 34, 186, 2, 107, 221, 161, 66, 248, 217, 63, 79, 202, 83, 53, 253, 127, 87, 252, 108, 133, 175, 14, 82, 140, 132, 150, 94, 234, 120, 120, 214, 32, 234, 53, 81, 60, 107, 255, 166, 188, 89, 153, 9, 173, 234, 85, 244, 11, 76, 217, 190, 22, 16, 147, 80, 23, 113, 126, 241, 84, 57, 134, 84, 152, 42, 97, 158, 176, 247, 138, 249, 54, 110, 103, 112, 170, 52, 238, 109, 27, 131, 137, 84, 37, 53, 162, 45, 12, 135, 228, 179, 197, 44, 163, 143, 33, 0, 125, 198, 45, 122, 93, 252, 148, 208, 163, 242, 99, 126, 195, 122, 247, 103, 141, 22, 208, 148, 113, 236, 210, 223, 57, 241, 128, 9, 40, 105, 207, 109, 69, 229, 204, 238, 98, 124, 100, 227, 17, 185, 226, 18, 119, 192, 50, 24, 98, 196, 187, 230, 224, 60, 191, 157, 41, 179, 95, 76, 153, 6, 217, 232, 93, 2, 110, 41, 148, 140, 203, 9, 156, 225, 174, 26, 16, 1, 182, 20, 242, 221, 114, 72, 21, 141, 226, 213, 200, 17, 198, 16, 100, 176, 216, 73, 240, 76, 6, 237, 78, 200, 119, 77, 39, 240, 158, 31, 148, 131, 187, 63, 232, 210, 64, 179, 250, 232, 53, 78, 40, 18, 89, 33, 39, 140, 209, 56, 112, 249, 146, 222, 7, 127, 161, 65, 146, 33, 146, 127, 56, 114, 32, 84, 80, 24, 112, 229, 230, 213, 94, 91, 148, 244, 109, 13, 157, 111, 51, 201, 173, 173, 66, 136, 150, 6, 111, 111, 154, 11, 17, 116, 13, 27, 209, 242, 59, 99, 21, 169, 222, 68, 72, 222, 164, 61, 217, 201, 53, 205, 33, 15, 141, 10, 80, 10, 215, 82, 125, 43, 165, 54, 184, 26, 151, 71, 203, 206, 50, 58, 57, 161, 52, 168, 22, 242, 179, 125, 111, 43, 91, 87, 3, 7, 126, 177, 54, 163, 148, 93, 255, 55, 124, 43, 141, 72, 166, 34, 147, 163, 135, 0, 50, 126, 152, 165, 1, 244, 118, 95, 96, 80, 4, 187, 206, 110, 239, 214, 183, 209, 125, 252, 40, 182, 126, 134, 2, 45, 182, 138, 179, 2, 102, 138, 101, 19, 92, 134, 39, 69, 120, 57, 190, 57, 130, 245, 73, 221, 23, 174, 183, 93, 28, 157, 42, 231, 217, 206, 139, 115, 38, 188, 129, 124, 12, 110, 89, 108, 132, 51, 142, 244, 135, 245, 251, 68, 128, 56, 218, 26, 248, 129, 34, 157, 167, 84, 138, 245, 95, 64, 172, 74, 9, 252, 17, 188, 73, 110, 229, 78, 230, 153, 231, 44, 191, 46, 126, 39, 241, 123, 223, 46, 47, 39, 69, 139, 118, 7, 184, 183, 166, 171, 61, 112, 200, 111, 196, 61, 123, 217, 188, 193, 102, 212, 105, 92, 0, 159, 27, 176, 74, 50, 250, 107, 68, 26, 196, 203, 239, 0, 42, 184, 35, 143, 14, 106, 172, 76, 147, 112, 100, 25, 215, 41, 170, 126, 95, 108, 218, 82, 36, 9, 116, 177, 182, 123, 254, 190, 56, 53, 125, 239, 66, 243, 145, 10, 61, 102, 57, 109, 197, 80, 159, 97, 253, 120, 48, 249, 97, 177, 2, 185, 153, 14, 201, 121, 165, 107, 133, 118, 248, 220, 68, 206, 96, 137, 154, 121, 215, 217, 189, 74, 76, 204, 222, 35, 222, 227, 83, 52, 77, 180, 122, 123, 184, 249, 212, 240, 22, 200, 136, 194, 206, 111, 120, 162, 253, 186, 155, 213, 149, 39, 97, 252, 132, 95, 70, 241, 47, 54, 19, 143, 188, 149, 148, 238, 161, 194, 121, 17, 93, 111, 133, 242, 201, 212, 183, 138, 152, 178, 37, 230, 140, 107, 137, 122, 163, 75, 5, 135, 225, 186, 32, 50, 131, 104, 197, 16, 87, 163, 180, 251, 170, 27, 181, 241, 85, 179, 126, 116, 219, 206, 79, 242, 5, 101, 41, 165, 80, 223, 66, 32, 68, 71, 88, 53, 117, 216, 209, 172, 112, 212, 129, 152, 49, 109, 61, 236, 79, 222, 156, 11, 239, 31, 202, 61, 123, 205, 58, 128, 7, 95, 27, 139, 135, 91, 119, 192, 187, 13, 99, 165, 103, 254, 140, 195, 234, 100, 79, 231, 154, 176, 233, 82, 214, 191, 60, 193, 53, 143, 213, 250, 131, 91, 40, 145, 225, 212, 106, 77, 201, 106, 185, 120, 141, 225, 195, 5, 110, 132, 235, 189, 95, 42, 90, 55, 194, 116, 222, 147, 91, 172, 175, 220, 232, 23, 95, 201, 4, 150, 102, 250, 23, 196, 86, 120, 28, 42, 188, 48, 46, 144, 66, 85, 124, 42, 187, 137, 212, 196, 230, 245, 111, 147, 204, 161, 63, 35, 100, 22, 144, 232, 208, 88, 101, 151, 10, 31, 210, 90, 1, 4, 202, 135, 120, 102, 81, 121, 189, 201, 44, 222, 209, 48, 188, 152, 108, 250, 65, 173, 13, 240, 1, 123, 109, 36, 163, 137, 172, 69, 250, 162, 10, 75, 89, 57, 102, 147, 77, 18, 93, 4, 104, 216, 225, 207, 229, 24, 57, 187, 228, 99, 218, 204, 58, 115, 44, 120, 209, 99, 200, 214, 156, 221, 139, 17, 131, 159, 164, 233, 160, 6, 2, 27, 15, 60, 204, 219, 18, 190, 164, 210, 203, 188, 34, 116, 36, 134, 101, 193, 75, 88, 189, 222, 245, 174, 203, 0, 199, 161, 57, 22, 4, 219, 77, 24, 36, 141, 70, 215, 219, 31, 92, 105, 10, 70, 102, 169, 244, 215, 230, 169, 88, 240, 157, 190, 5, 130, 186, 232, 76, 117, 45, 230, 181, 115, 67, 35, 172, 15, 165, 30, 125, 180, 57, 245, 25, 97, 244, 170, 182, 180, 107, 24, 231, 195, 140, 97, 50, 220, 220, 193, 196, 144, 49, 32, 90, 62, 206, 109, 85, 35, 135, 220, 249, 255, 78, 103, 207, 98, 156, 228, 213, 254, 22, 231, 247, 191, 152, 250, 37, 8, 172, 204, 136, 181, 30, 75, 9, 174, 226, 175, 172, 238, 237, 107, 27, 230, 46, 197, 240, 140, 162, 225, 65, 165, 249, 209, 49, 152, 19, 102, 96, 96, 206, 145, 40, 39, 155, 68, 8, 228, 176, 0, 112, 6, 27, 164, 12, 220, 185, 140, 95, 71, 202, 125, 234, 15, 246, 52, 206, 5, 103, 198, 6, 65, 12, 209, 87, 223, 121, 239, 124, 120, 128, 156, 194, 250, 239, 133, 247, 227, 76, 107, 73, 38, 228, 241, 33, 19, 61, 138, 70, 37, 45, 58, 239, 13, 176, 27, 17, 41, 202, 233, 62, 223, 175, 157, 36, 234, 192, 23, 180, 64, 61, 231, 103, 173, 83, 169, 241, 51, 201, 81, 67, 217, 79, 246, 203, 247, 233, 117, 253, 153, 252, 50, 54, 251, 120, 254, 215, 105, 168, 47, 128, 61, 139, 243, 91, 142, 166, 179, 26, 97, 65, 171, 167, 244, 114, 188, 192, 101, 23, 55, 115, 205, 222, 209, 59, 111, 83, 147, 188, 26, 163, 123, 244, 252, 98, 148, 104, 110, 81, 27, 167, 67, 200, 85, 251, 80, 163, 117, 36, 78, 137, 95, 34, 59, 163, 172, 164, 89, 247, 72, 64, 181, 41, 86, 255, 184, 158, 238, 185, 226, 70, 112, 123, 179, 3, 73, 1, 111, 110, 161, 49, 29, 112, 124, 244, 110, 238, 247, 14, 14, 76, 199, 159, 197, 179, 250, 244, 247, 85, 172, 56, 98, 70, 232, 99, 204, 226, 75, 121, 73, 239, 205, 191, 210, 74, 92, 4, 0, 234, 193, 196, 194, 173, 68, 44, 15, 40, 155, 166, 205, 197, 52, 207, 169, 123, 143, 5, 179, 234, 31, 202, 86, 56, 24, 233, 62, 121, 211, 133, 19, 209, 88, 32, 158, 85, 70, 85, 248, 249, 48, 225, 47, 86, 13, 128, 6, 140, 36, 31, 128, 58, 215, 176, 81, 129, 125, 172, 224, 209, 207, 246, 173, 207, 193, 22, 97, 60, 173, 183, 77, 253, 155, 18, 178, 36, 113, 186, 216, 70, 53, 47, 176, 176, 110, 88, 134, 81, 218, 164, 230, 45, 241, 27, 80, 100, 97, 7, 241, 118, 72, 200, 165, 187, 155, 190, 94, 40, 30, 205, 153, 71, 104, 141, 15, 220, 15, 153, 177, 200, 155, 239, 120, 101, 136, 17, 153, 255, 88, 163, 185, 221, 199, 216, 98, 69, 95, 59, 175, 164, 233, 253, 133, 225, 2, 156, 121, 93, 233, 11, 172, 164, 252, 66, 25, 59, 141, 195, 114, 131, 224, 50, 139, 227, 135, 240, 4, 171, 14, 206, 140, 207, 55, 211, 159, 135, 8, 193, 239, 233, 207, 53, 244, 238, 84, 19, 73, 1, 94, 104, 42, 148, 26, 3, 101, 198, 153, 239, 239, 34, 230, 253, 108, 6, 54, 59, 54, 252, 49, 86, 67, 90, 174, 196, 140, 239, 181, 64, 85, 11, 44, 9, 229, 249, 136, 72, 125, 199, 191, 242, 156, 145, 81, 70, 193, 44, 181, 133, 36, 211, 242, 30, 144, 244, 7, 89, 97, 98, 244, 61, 184, 3, 174, 101, 173, 221, 239, 145, 166, 225, 182, 82, 202, 76, 76, 150, 198, 93, 120, 100, 254, 47, 21, 168, 61, 38, 165, 48, 31, 76, 59, 37, 89, 106, 87, 203, 179, 248, 156, 162, 64, 50, 76, 5, 123, 113, 9, 215, 226, 23, 205, 44, 245, 117, 179, 251, 160, 106, 205, 130, 187, 253, 151, 224, 24, 32, 107, 210, 221, 62, 9, 133, 192, 119, 143, 232, 69, 204, 98, 5, 86, 121, 17, 245, 180, 249, 233, 48, 185, 56, 62, 20, 215, 140, 6, 220, 139, 44, 46, 180, 236, 215, 250, 81, 195, 254, 101, 135, 40, 135, 235, 141, 22, 183, 1, 31, 3, 89, 252, 87, 207, 58, 24, 161, 225, 28, 217, 174, 122, 71, 46, 100, 25, 85, 189, 177, 45, 185, 53, 210, 109, 222, 240, 244, 82, 75, 188, 17, 191, 45, 184, 220, 132, 105, 75, 151, 12, 5, 236, 148, 150, 10, 22, 199, 26, 143, 142, 159, 137, 87, 142, 70, 241, 67, 5, 15, 235, 87, 20, 224, 207, 210, 38, 60, 245, 34, 238, 108, 193, 204, 194, 179, 7, 131, 158, 63, 245, 255, 95, 34, 247, 63, 100, 39, 85, 51, 182, 220, 69, 125, 88, 223, 39, 160, 176, 115, 100, 232, 150, 20, 40, 205, 132, 231, 201, 97, 40, 66, 207, 53, 195, 39, 59, 4, 191, 140, 210, 66, 46, 104, 196, 64, 35, 22, 151, 210, 88, 220, 108, 96, 95, 175, 97, 70, 25, 90, 111, 112, 123, 106, 204, 22, 59, 106, 248, 232, 178, 149, 32, 36, 16, 254, 191, 202, 95, 177, 177, 116, 95, 213, 205, 170, 254, 96, 184, 233, 166, 10, 156, 95, 254, 105, 205, 55, 158, 61, 129, 215, 98, 230, 107, 3, 63, 157, 155, 207, 247, 157, 79, 254, 138, 189, 94, 248, 244, 152, 167, 111, 16, 202, 234, 81, 38, 253, 1, 180, 210, 24, 89, 184, 252, 85, 6, 35, 223, 9, 34, 83, 254, 224, 69, 138, 199, 37, 90, 24, 21, 136, 15, 51, 50, 30, 54, 216, 227, 156, 117, 242, 100, 52, 163, 89, 33, 164, 98, 17, 89, 176, 21, 155, 15, 146, 216, 86, 117, 168, 3, 121, 75, 252, 116, 80, 199, 162, 215, 74, 4, 31, 118, 186, 206, 249, 116, 221, 99, 65, 54, 33, 13, 78, 210, 35, 210, 53, 122, 190, 198, 221, 183, 134, 204, 79, 8, 25, 210, 188, 253, 85, 201, 46, 250, 3, 232, 208, 37, 12, 223, 72, 151, 148, 238, 168, 204, 252, 31, 1, 28, 118, 248, 170, 149, 73, 59, 32, 202, 101, 151, 15, 8, 189, 163, 217, 141, 150, 116, 65, 129, 166, 147, 54, 1, 66, 214, 228, 77, 76, 12, 105, 1, 82, 129, 123, 28, 50, 106, 239, 115, 189, 81, 165, 89, 64, 162, 72, 173, 162, 12, 143, 161, 42, 195, 52, 49, 79, 130, 231, 207, 125, 113, 21, 43, 184, 120, 97, 79, 162, 36, 125, 204, 253, 23, 235, 22, 87, 250, 129, 46, 51, 140, 184, 122, 5, 176, 91, 77, 121, 99, 94, 246, 217, 247, 181, 100, 190, 81, 43, 71, 97, 216, 82, 144, 50, 215, 72, 88, 136, 202, 167, 146, 20, 108, 111, 48, 8, 128, 77, 59, 179, 227, 116, 102, 106, 170, 123, 183, 150, 15, 20, 226, 177, 244, 199, 210, 225, 96, 11, 232, 230, 107, 230, 92, 88, 7, 200, 250, 162, 143, 245, 215, 194, 174, 126, 31, 145, 211, 158, 210, 125, 222, 86, 80, 105, 207, 96, 197, 240, 16, 121, 229, 16, 43, 32, 18, 97, 116, 249, 105, 53, 10, 109, 163, 226, 90, 43, 205, 27, 190, 20, 75, 5, 119, 97, 81, 100, 236, 30, 13, 42, 30, 148, 237, 225, 149, 35, 17, 17, 5, 142, 35, 250, 215, 197, 155, 17, 111, 145, 129, 53, 57, 0, 200, 249, 89, 176, 189, 1, 116, 36, 15, 140, 182, 95, 214, 143, 116, 235, 82, 165, 53, 192, 181, 183, 131, 106, 5, 142, 35, 31, 235, 177, 90, 203, 121, 167, 216, 165, 33, 47, 225, 21, 227, 222, 235, 82, 74, 195, 197, 215, 79, 205, 108, 145, 185, 88, 224, 207, 185, 43, 148, 199, 55, 206, 55, 53, 36, 83, 228, 15, 155, 240, 52, 139, 36, 169, 202, 140, 11, 148, 201, 100, 116, 5, 4, 93, 209, 255, 14, 104, 27, 30, 138, 224, 182, 136, 68, 27, 18, 127, 61, 231, 13, 79, 211, 129, 170, 83, 133, 121, 42, 201, 91, 161, 157, 93, 92, 228, 230, 85, 42, 72, 252, 142, 85, 49, 49, 90, 248, 105, 64, 101, 17, 183, 104, 71, 66, 88, 231, 243, 185, 127, 109, 96, 16, 144, 67, 137, 142, 51, 15, 176, 229, 195, 244, 121, 225, 235, 1, 47, 26, 187, 199, 29, 84, 42, 209, 192, 23, 24, 66, 139, 105, 59, 42, 98, 42, 59, 121, 42, 19, 252, 216, 83, 170, 15, 153, 227, 209, 242, 192, 84, 127, 225, 7, 106, 52, 122, 11, 197, 13, 114, 196, 194, 67, 217, 106, 201, 9, 33, 188, 44, 80, 156, 138, 13, 234, 189, 29, 240, 190, 247, 231, 194, 113, 145, 182, 63, 184, 81, 203, 88, 173, 43, 148, 126, 63, 55, 30, 179, 169, 8, 4, 211, 7, 73, 48, 152, 169, 65, 139, 239, 39, 42, 66, 67, 209, 4, 20, 102, 193, 58, 22, 155, 229, 248, 233, 99, 238, 62, 173, 71, 56, 43, 153, 129, 253, 161, 69, 87, 94, 50, 53, 1, 18, 167, 179, 253, 232, 5, 244, 180, 73, 202, 206, 199, 177, 156, 168, 144, 156, 112, 247, 187, 93, 121, 233, 149, 16, 80, 145, 67, 175, 57, 252, 185, 218, 56, 13, 0, 164, 160, 84, 19, 68, 168, 14, 89, 77, 225, 2, 14, 83, 124, 56, 55, 162, 229, 39, 196, 249, 27, 240, 90, 133, 241, 237, 79, 169, 233, 173, 143, 255, 36, 249, 166, 116, 116, 177, 216, 149, 224, 26, 64, 44, 177, 25, 5, 253, 13, 50, 65, 237, 15, 138, 43, 95, 108, 20, 129, 184, 138, 121, 110, 240, 91, 12, 102, 187, 183, 232, 196, 253, 140, 90, 174, 171, 9, 150, 159, 88, 97, 56, 227, 158, 92, 227, 209, 227, 137, 248, 248, 182, 167, 229, 110, 188, 85, 30, 74, 7, 72, 99, 106, 178, 181, 90, 248, 101, 59, 184, 64, 26, 188, 1, 76, 145, 191, 118, 78, 161, 90, 157, 108, 121, 235, 154, 90, 112, 236, 204, 226, 67, 193, 204, 136, 84, 224, 47, 165, 0, 44, 46, 226, 144, 113, 146, 133, 73, 73, 101, 61, 49, 183, 45, 136, 209, 10, 185, 207, 24, 241, 253, 134, 113, 248, 233, 113, 75, 161, 177, 2, 66, 216, 62, 176, 59, 4, 163, 90, 175, 96, 238, 243, 195, 62, 32, 61, 225, 75, 178, 126, 96, 109, 122, 231, 239, 180, 196, 203, 20, 193, 0, 203, 49, 146, 34, 127, 250, 192, 204, 89, 255, 86, 9, 155, 120, 161, 237, 64, 148, 50, 54, 120, 95, 190, 121, 93, 65, 125, 191, 202, 190, 16, 112, 191, 77, 28, 125, 90, 84, 128, 7, 218, 251, 177, 71, 144, 162, 60, 43, 217, 255, 49, 53, 101, 131, 42, 192, 64, 123, 188, 33, 217, 147, 248, 63, 75, 61, 69, 149, 248, 90, 112, 148, 132, 15, 114, 114, 66, 235, 198, 222, 166, 108, 140, 172, 248, 14, 252, 63, 158, 153, 145, 61, 115, 160, 194, 30, 202, 34, 18, 158, 139, 132, 175, 73, 77, 36, 10, 85, 156, 180, 44, 92, 245, 67, 124, 21, 55, 3, 181, 208, 16, 78, 144, 45, 150, 153, 171, 99, 203, 120, 102, 144, 205, 149, 16, 168, 245, 60, 67, 171, 105, 163, 74, 101, 197, 243, 77, 206, 187, 79, 125, 54, 232, 50, 99, 60, 209, 21, 224, 203, 240, 54, 5, 64, 190, 113, 52, 43, 114, 153, 57, 24, 246, 249, 67, 5, 116, 108, 167, 24, 152, 157, 145, 145, 184, 135, 9, 21, 19, 40, 208, 87, 254, 48, 249, 255, 162, 39, 75, 119, 20, 188, 245, 166, 23, 134, 69, 64, 7, 242, 184, 89, 17, 166, 36, 158, 76, 105, 235, 212, 75, 14, 179, 168, 51, 204, 42, 50, 187, 5, 118, 76, 173, 58, 155, 172, 195, 168, 44, 28, 129, 9, 188, 8, 114, 79, 57, 233, 150, 175, 36, 213, 59, 176, 207, 25, 10, 148, 80, 3, 116, 14, 120, 161, 233, 250, 36, 212, 116, 26, 203, 37, 129, 42, 24, 65, 190, 157, 65, 193, 132, 195, 181, 27, 125, 161, 237, 17, 53, 203, 32, 29, 134, 120, 218, 120, 84, 139, 39, 121, 244, 190, 167, 179, 165, 113, 169, 219, 31, 137, 86, 15, 43, 237, 99, 71, 43, 151, 167, 221, 182, 112, 157, 111, 40, 91, 133, 17, 87, 222, 83, 221, 39, 188, 149, 51, 45, 135, 104, 27, 148, 246, 248, 28, 160, 219, 125, 198, 41, 151, 206, 26, 167, 167, 94, 41, 105, 251, 4, 35, 251, 166, 1, 111, 156, 209, 126, 39, 93, 105, 234, 197, 64, 185, 177, 48, 182, 153, 99, 34, 27, 109, 126, 192, 183, 20, 117, 131, 209, 93, 37, 71, 96, 87, 4, 183, 52, 16, 4, 125, 12, 53, 9, 76, 104, 151, 170, 9, 186, 74, 152, 140, 173, 231, 52, 113, 11, 115, 6, 75, 62, 208, 192, 102, 71, 112, 204, 74, 206, 20, 82, 5, 153, 16, 194, 186, 179, 190, 170, 219, 251, 109, 24, 88, 223, 137, 185, 190, 217, 168, 80, 101, 210, 105, 223, 115, 124, 71, 91, 192, 48, 42, 206, 220, 14, 48, 3, 232, 99, 51, 247, 39, 146, 151, 148, 230, 92, 113, 123, 184, 124, 169, 55, 5, 249, 226, 156, 86, 81, 167, 144, 164, 169, 73, 241, 61, 56, 20, 247, 116, 172, 147, 170, 3, 6, 80, 189, 3, 220, 11, 62, 56, 129, 179, 145, 205, 91, 46, 65, 29, 114, 184, 208, 118, 239, 103, 33, 224, 177, 109, 150, 19, 19, 100, 136, 166, 97, 101, 168, 9, 7, 29, 143, 169, 93, 186, 76, 23, 3, 227, 93, 240, 235, 94, 195, 2, 46, 188, 75, 37, 252, 60, 62, 186, 250, 143, 133, 96, 127, 208, 127, 55, 176, 247, 232, 99, 196, 99, 197, 107, 162, 234, 47, 109, 27, 121, 66, 73, 160, 1, 52, 29, 72, 89, 252, 231, 65, 236, 250, 198, 186, 129, 21, 102, 98, 57, 20, 184, 221, 174, 48, 37, 11, 185, 123, 187, 102, 78, 92, 3, 69, 161, 222, 33, 150, 250, 117, 85, 118, 111, 4, 145, 242, 62, 255, 27, 48, 72, 87, 253, 32, 157, 130, 68, 63, 224, 223, 227, 29, 217, 177, 173, 61, 206, 34, 14, 205, 70, 161, 224, 28, 131, 197, 203, 105, 33, 178, 131, 144, 186, 147, 119, 167, 172, 7, 116, 52, 214, 52, 191, 16, 20, 138, 241, 150, 60, 17, 30, 90, 22, 144, 187, 227, 163, 134, 176, 66, 121, 14, 1, 232, 99, 93, 57, 25, 113, 177, 243, 126, 46, 49, 0, 67, 207, 198, 255, 38, 164, 52, 221, 52, 220, 90, 196, 191, 73, 33, 136, 99, 74, 195, 31, 231, 194, 199, 182, 140, 82, 157, 188, 8, 12, 81, 84, 107, 2, 2, 35, 89, 168, 58, 130, 16, 60, 88, 163, 212, 87, 132, 194, 194, 63, 187, 98, 243, 115, 64, 245, 175, 9, 218, 0, 32, 210, 197, 40, 166, 44, 15, 234, 238, 33, 153, 224, 250, 120, 51, 0, 227, 120, 219, 44, 30, 86, 64, 104, 234, 171, 137, 78, 125, 204, 253, 60, 134, 211, 218, 47, 15, 145, 50, 231, 108, 143, 126, 99, 80, 109, 242, 211, 146, 142, 83, 22, 234, 150, 48, 123, 227, 52, 208, 213, 137, 83, 217, 82, 43, 155, 212, 230, 162, 139, 107, 243, 220, 45, 253, 220, 250, 97, 103, 239, 54, 14, 22, 131, 74, 171, 99, 219, 98, 40, 216, 176, 158, 82, 250, 106, 254, 2, 99, 49, 56, 168, 119, 184, 140, 182, 116, 186, 29, 103, 223, 20, 9, 95, 6, 36, 28, 134, 90, 8, 57, 65, 158, 33, 238, 155, 61, 210, 236, 126, 109, 144, 252, 222, 44, 104, 106, 212, 140, 195, 31, 222, 141, 131, 55, 1, 160, 236, 52, 155, 170, 173, 154, 85, 238, 6, 154, 93, 244, 172, 20, 207, 3, 249, 143, 52, 22, 77, 100, 14, 227, 254, 35, 66, 27, 37, 222, 98, 7, 22, 145, 202, 214, 116, 214, 33, 222, 138, 32, 154, 51, 86, 104, 119, 28, 107, 68, 13, 217, 155, 196, 223, 205, 180, 94, 22, 149, 156, 167, 202, 45, 125, 37, 105, 207, 145, 26, 162, 155, 167, 7, 155, 51, 201, 3, 72, 182, 154, 209, 14, 197, 215, 140, 114, 186, 121, 172, 94, 77, 16, 142, 0, 103, 184, 23, 29, 55, 101, 211, 60, 229, 54, 78, 121, 246, 79, 212, 96, 239, 52, 182, 132, 42, 214, 208, 28, 48, 252, 79, 113, 145, 90, 110, 46, 145, 190, 80, 63, 166, 210, 77, 34, 111, 125, 51, 102, 10, 3, 194, 209, 9, 160, 15, 155, 36, 235, 142, 252, 125, 174, 44, 186, 78, 171, 54, 62, 14, 227, 191, 192, 234, 43, 84, 99, 96, 201, 1, 12, 101, 98, 237, 12, 249, 186, 148, 221, 17, 209, 11, 181, 148, 166, 177, 44, 162, 16, 85, 35, 214, 85, 114, 100, 249, 76, 82, 74, 70, 30, 146, 99, 230, 15, 157, 117, 154, 219, 131, 163, 193, 175, 216, 30, 147, 176, 224, 116, 82, 144, 224, 131, 249, 50, 247, 196, 237, 65, 178, 102, 105, 252, 20, 31, 166, 17, 217, 207, 140, 216, 254, 123, 59, 77, 17, 111, 98, 168, 210, 237, 76, 110, 107, 16, 100, 40, 46, 208, 81, 201, 160, 52, 137, 25, 180, 136, 37, 214, 173, 172, 95, 113, 210, 195, 95, 222, 172, 118, 119, 189, 98, 253, 123, 107, 18, 98, 111, 201, 224, 197, 109, 136, 150, 149, 5, 87, 124, 188, 37, 201, 73, 198, 26, 6, 62, 134, 188, 136, 206, 126, 101, 46, 234, 17, 202, 47, 135, 223, 57, 59, 53, 114, 38, 89, 31, 1, 76, 76, 238, 143, 11, 190, 30, 76, 230, 46, 162, 51, 0, 186, 207, 126, 107, 219, 156, 18, 104, 247, 158, 244, 145, 20, 84, 31, 68, 141, 55, 190, 221, 105, 102, 56, 81, 154, 125, 71, 123, 126, 236, 179, 81, 231, 220, 167, 119, 206, 115, 106, 59, 166, 166, 3, 137, 43, 56, 32, 5, 45, 215, 145, 162, 47, 148, 234, 114, 18, 3, 166, 248, 209, 117, 192, 103, 35, 83, 79, 19, 212, 230, 12, 128, 214, 142, 148, 173, 234, 212, 62, 78, 144, 8, 141, 63, 252, 255, 188, 27, 191, 132, 53, 215, 220, 19, 191, 75, 253, 145, 230, 122, 156, 115, 250, 73, 171, 210, 22, 233, 244, 91, 58, 47, 75, 68, 116, 182, 98, 182, 75, 66, 36, 159, 64, 205, 176, 102, 50, 237, 38, 107, 148, 58, 61, 64, 1, 249, 68, 75, 235, 104, 25, 228, 147, 233, 46, 25, 190, 118, 196, 34, 39, 1, 60, 201, 67, 77, 64, 9, 43, 0, 150, 41, 73, 57, 254, 211, 96, 93, 129, 231, 63, 12, 177, 106, 238, 70, 73, 87, 251, 7, 254, 51, 212, 34, 34, 137, 127, 209, 207, 70, 60, 68, 71, 74, 208, 119, 211, 153, 100, 173, 21, 178, 95, 113, 6, 103, 244, 204, 200, 141, 58, 156, 13, 21, 109, 169, 215, 206, 184, 10, 248, 214, 219, 2, 22, 108, 37, 247, 157, 102, 167, 253, 142, 139, 177, 62, 243, 59, 147, 69, 231, 150, 123, 177, 231, 224, 33, 29, 75, 184, 115, 143, 218, 4, 10, 125, 35, 50, 201, 143, 44, 175, 108, 206, 247, 152, 81, 249, 135, 221, 23, 132, 80, 104, 24, 6, 10, 208, 155, 97, 45, 9, 52, 29, 232, 152, 176, 75, 242, 241, 111, 128, 127, 144, 96, 159, 171, 73, 250, 52, 163, 43, 158, 232, 89, 227, 65, 219, 151, 153, 227, 61, 46, 232, 177, 170, 203, 237, 9, 253, 225, 222, 224, 200, 86, 146, 180, 104, 8, 15, 189, 184, 94, 177, 36, 57, 170, 206, 62, 47, 152, 67, 77, 106, 10, 26, 180, 44, 124, 175, 5, 81, 96, 215, 143, 142, 152, 61, 2, 81, 216, 66, 142, 216, 71, 8, 175, 245, 51, 144, 186, 166, 28, 230, 64, 159, 150, 90, 249, 65, 151, 10, 136, 91, 38, 146, 1, 243, 23, 141, 224, 125, 108, 4, 166, 186, 241, 55, 10, 202, 251, 230, 96, 252, 248, 197, 48, 29, 239, 129, 204, 184, 15, 10, 89, 130, 175, 144, 59, 155, 33, 171, 121, 32, 19, 252, 109, 220, 191, 115, 237, 37, 243, 233, 121, 122, 90, 250, 66, 142, 44, 35, 203, 218, 145, 243, 140, 28, 161, 213, 153, 231, 76, 138, 76, 251, 151, 7, 11, 64, 193, 73, 230, 191, 196, 153, 83, 5, 94, 107, 104, 1, 65, 203, 149, 153, 209, 76, 82, 60, 0, 21, 153, 63, 172, 119, 106, 223, 51, 212, 244, 144, 25, 25, 126, 216, 9, 93, 42, 46, 188, 134, 154, 195, 84, 46, 126, 128, 136, 111, 21, 90, 103, 219, 198, 39, 161, 53, 255, 151, 213, 105, 135, 115, 226, 94, 28, 48, 252, 80, 33, 60, 213, 206, 247, 191, 175, 195, 227, 118, 54, 185, 205, 195, 248, 11, 238, 202, 13, 236, 38, 182, 1, 1, 51, 111, 190, 234, 249, 87, 189, 234, 35, 148, 226, 72, 131, 77, 249, 214, 48, 36, 116, 58, 228, 77, 168, 222, 190, 115, 193, 157, 174, 213, 105, 120, 23, 98, 134, 22, 205, 150, 192, 202, 128, 65, 128, 85, 254, 99, 135, 227, 170, 80, 96, 234, 225, 173, 172, 156, 179, 234, 81, 185, 34, 227, 155, 41, 242, 244, 138, 148, 58, 255, 232, 63, 146, 184, 233, 157, 105, 206, 181, 53, 42, 165, 59, 77, 71, 206, 219, 169, 168, 246, 61, 114, 171, 147, 22, 101, 218, 92, 93, 58, 103, 80, 240, 152, 80, 137, 179, 181, 175, 203, 245, 111, 231, 4, 41, 158, 94, 224, 189, 172, 122, 97, 92, 93, 126, 47, 229, 239, 52, 225, 102, 38, 25, 61, 196, 121, 227, 94, 27, 148, 133, 61, 98, 247, 7, 82, 187, 159, 106, 74, 51, 245, 171, 42, 69, 188, 227, 34, 178, 136, 210, 137, 62, 86, 101, 8, 204, 106, 6, 234, 105, 133, 51, 69, 50, 164, 84, 182, 73, 94, 107, 10, 134, 19, 165, 111, 191, 145, 238, 0, 8, 188, 57, 123, 185, 132, 9, 169, 43, 215, 92, 74, 108, 176, 219, 88, 26, 227, 255, 172, 198, 175, 40, 106, 120, 227, 148, 24, 151, 195, 121, 182, 70, 177, 251, 105, 27, 168, 16, 142, 207, 176, 74, 47, 217, 161, 139, 28, 60, 228, 196, 246, 233, 249, 184, 212, 36, 196, 96, 125, 79, 197, 37, 17, 133, 251, 89, 226, 187, 232, 38, 238, 158, 183, 92, 96, 35, 3, 28, 247, 68, 111, 103, 174, 110, 81, 164, 146, 165, 195, 219, 114, 27, 207, 83, 255, 253, 126, 88, 242, 198, 111, 102, 218, 249, 114, 9, 153, 221, 223, 176, 188, 88, 17, 208, 46, 178, 238, 36, 253, 109, 224, 222, 79, 154, 125, 18, 200, 101, 116, 57, 1, 129, 97, 201, 151, 111, 183, 222, 140, 135, 114, 156, 95, 84, 178, 241, 159, 177, 112, 62, 25, 125, 115, 232, 102, 251, 62, 203, 14, 5, 150, 92, 99, 241, 219, 53, 250, 69, 48, 65, 141, 243, 130, 124, 225, 30, 176, 59, 17, 175, 145, 254, 49, 241, 235, 137, 226, 136, 42, 0, 251, 160, 205, 156, 192, 10, 9, 85, 55, 14, 59, 38, 172, 192, 24, 221, 66, 54, 237, 238, 147, 90, 228, 189, 22, 9, 220, 164, 100, 218, 76, 176, 128, 184, 136, 152, 252, 67, 162, 227, 119, 133, 5, 15, 108, 130, 165, 211, 24, 19, 34, 74, 234, 209, 206, 203, 5, 232, 5, 133, 92, 251, 111, 242, 81, 57, 100, 12, 116, 139, 189, 113, 167, 141, 181, 174, 47, 10, 105, 237, 10, 170, 195, 140, 245, 184, 206, 44, 7, 175, 182, 148, 159, 209, 239, 141, 192, 194, 7, 189, 225, 93, 37, 161, 90, 81, 167, 97, 32, 161, 12, 147, 110, 81, 128, 14, 78, 146, 252, 19, 252, 221, 57, 196, 233, 98, 192, 166, 49, 199, 150, 96, 30, 247, 169, 183, 252, 210, 201, 226, 23, 114, 193, 229, 123, 251, 93, 187, 191, 44, 195, 214, 222, 243, 9, 180, 215, 34, 89, 67, 220, 162, 195, 200, 67, 126, 247, 59, 142, 35, 82, 238, 128, 25, 51, 135, 152, 238, 100, 52, 59, 118, 152, 147, 111, 133, 138, 41, 196, 210, 24, 241, 10, 35, 73, 163, 94, 97, 181, 32, 144, 24, 172, 191, 205, 12, 25, 230, 108, 130, 138, 248, 164, 98, 141, 92, 99, 56, 180, 192, 55, 63, 70, 173, 164, 57, 26, 95, 135, 243, 255, 159, 211, 163, 47, 128, 71, 155, 98, 187, 81, 159, 191, 1, 55, 225, 241, 16, 174, 240, 168, 122, 37, 40, 97, 207, 157, 157, 176, 7, 252, 81, 133, 214, 128, 83, 249, 33, 72, 143, 4, 87, 8, 197, 231, 21, 222, 74, 138, 132, 149, 108, 102, 24, 221, 154, 83, 187, 80, 31, 7, 63, 116, 180, 169, 84, 202, 18, 188, 14, 118, 98, 166, 75, 244, 10, 1, 219, 79, 105, 163, 0, 249, 253, 96, 86, 201, 39, 97, 83, 83, 174, 48, 249, 73, 39, 191, 208, 168, 34, 67, 151, 254, 16, 18, 135, 92, 157, 224, 225, 41, 254, 45, 203, 41, 197, 216, 141, 15, 210, 33, 219, 67, 189, 220, 69, 50, 19, 79, 43, 75, 122, 1, 93, 44, 65, 197, 15, 29, 234, 39, 175, 233, 136, 5, 65, 123, 116, 109, 136, 63, 92, 59, 31, 158, 1, 40, 219, 158, 94, 39, 236, 207, 198, 124, 247, 209, 150, 168, 146, 27, 164, 80, 109, 251, 220, 101, 150, 29, 142, 44, 199, 71, 232, 27, 36, 118, 69, 230, 84, 26, 172, 252, 227, 46, 19, 35, 168, 239, 5, 15, 220, 128, 95, 212, 106, 205, 242, 56, 128, 9, 20, 28, 24, 33, 11, 177, 244, 110, 237, 131, 233, 183, 223, 121, 115, 90, 225, 223, 160, 83, 66, 136, 70, 58, 153, 13, 104, 136, 207, 39, 234, 129, 140, 247, 219, 176, 72, 120, 211, 185, 133, 118, 131, 212, 59, 186, 178, 199, 228, 54, 231, 97, 187, 224, 97, 237, 206, 215, 9, 22, 12, 12, 147, 21, 38, 165, 78, 149, 245, 145, 118, 103, 245, 129, 120, 5, 142, 49, 0, 211, 224, 239, 77, 114, 48, 172, 158, 171, 19, 224, 201, 82, 218, 78, 168, 91, 134, 15, 40, 187, 114, 42, 26, 8, 142, 211, 61, 233, 8, 155, 177, 147, 149, 232, 160, 1, 177, 135, 245, 144, 69, 22, 157, 156, 200, 109, 133, 201, 157, 212, 254, 134, 213, 191, 255, 101, 255, 20, 235, 105, 62, 221, 210, 159, 64, 246, 136, 181, 60, 41, 149, 129, 224, 46, 79, 173, 136, 105, 125, 192, 244, 16, 236, 172, 194, 247, 136, 160, 191, 219, 24, 101, 151, 204, 189, 254, 69, 160, 79, 84, 149, 43, 108, 90, 65, 16, 75, 49, 182, 29, 211, 188, 135, 145, 131, 108, 143, 97, 95, 38, 38, 244, 117, 92, 157, 91, 38, 118, 118, 134, 108, 123, 83, 215, 239, 228, 186, 45, 112, 202, 166, 127, 199, 80, 183, 251, 112, 113, 237, 49, 148, 92, 31, 54, 242, 208, 12, 47, 101, 74, 79, 19, 78, 122, 60, 125, 85, 133, 3, 52, 123, 236, 60, 62, 178, 101, 111, 91, 89, 228, 63, 62, 116, 53, 148, 71, 46, 153, 133, 244, 59, 87, 117, 171, 67, 182, 119, 3, 204, 215, 205, 128, 248, 11, 59, 34, 15, 115, 249, 177, 240, 198, 58, 52, 23, 101, 132, 118, 39, 181, 199, 49, 39, 98, 196, 23, 179, 199, 62, 65, 165, 246, 218, 161, 150, 163, 253, 94, 124, 215, 10, 245, 71, 135, 168, 59, 251, 229, 157, 39, 75, 179, 211, 83, 33, 172, 81, 2, 30, 222, 174, 66, 80, 11, 196, 187, 123, 255, 127, 187, 208, 236, 106, 88, 54, 93, 253, 37, 33, 155, 82, 26, 156, 57, 87, 148, 130, 44, 84, 207, 171, 200, 131, 82, 28, 61, 122, 155, 114, 160, 253, 29, 177, 50, 168, 100, 73, 18, 132, 92, 136, 67, 24, 156, 149, 164, 120, 109, 130, 170, 156, 164, 248, 104, 83, 152, 231, 211, 100, 78, 59, 170, 147, 101, 86, 254, 127, 143, 124, 178, 232, 35, 35, 243, 3, 220, 198, 182, 146, 71, 250, 50, 61, 152, 253, 101, 219, 219, 159, 58, 34, 239, 111, 144, 29, 8, 99, 24, 212, 123, 176, 171, 0, 132, 253, 35, 140, 166, 157, 68, 215, 217, 105, 78, 224, 18, 118, 216, 79, 227, 101, 59, 153, 27, 217, 243, 250, 193, 213, 100, 184, 69, 78, 229, 7, 144, 107, 5, 214, 223, 139, 123, 44, 140, 165, 131, 215, 65, 77, 181, 143, 101, 218, 198, 87, 47, 191, 10, 102, 231, 0, 239, 23, 128, 83, 11, 218, 62, 104, 185, 73, 211, 216, 40, 70, 231, 92, 187, 172, 255, 66, 159, 93, 156, 35, 172, 123, 2, 230, 123, 236, 241, 154, 88, 136, 179, 147, 174, 89, 50, 5, 158, 169, 128, 127, 215, 231, 82, 83, 159, 66, 241, 205, 103, 143, 20, 248, 239, 143, 31, 210, 249, 39, 25, 8, 8, 242, 111, 111, 188, 35, 190, 251, 17, 114, 164, 49, 24, 113, 159, 50, 115, 56, 190, 180, 91, 125, 237, 99, 116, 211, 36, 208, 115, 12, 73, 61, 99, 110, 81, 64, 83, 163, 131, 154, 211, 9, 165, 11, 30, 177, 177, 43, 241, 7, 108, 203, 224, 75, 25, 246, 160, 33, 148, 32, 131, 183, 190, 0, 219, 28, 208, 242, 134, 174, 91, 92, 51, 36, 240, 43, 139, 147, 101, 183, 51, 216, 249, 42, 166, 52, 133, 115, 249, 6, 240, 23, 27, 23, 77, 180, 40, 175, 240, 173, 104, 70, 137, 83, 82, 171, 155, 215, 136, 131, 4, 172, 19, 100, 255, 146, 160, 199, 128, 177, 130, 163, 56, 104, 107, 102, 44, 178, 196, 187, 0, 38, 53, 230, 191, 148, 218, 207, 105, 66, 106, 103, 52, 241, 119, 233, 63, 63, 182, 45, 101, 61, 210, 89, 175, 101, 98, 89, 172, 252, 236, 36, 54, 143, 131, 55, 35, 189, 128, 57, 73, 34, 229, 250, 206, 253, 43, 37, 53, 136, 172, 73, 221, 27, 205, 207, 21, 120, 92, 6, 220, 166, 66, 95, 45, 241, 209, 112, 72, 22, 31, 221, 232, 220, 157, 248, 78, 105, 214, 230, 41, 193, 211, 46, 249, 26, 11, 242, 42, 225, 116, 207, 166, 141, 116, 185, 223, 86, 218, 190, 255, 185, 250, 199, 181, 56, 188, 132, 37, 27, 85, 248, 112, 161, 182, 164, 153, 129, 40, 37, 13, 8, 67, 236, 36, 182, 151, 130, 96, 131, 65, 26, 103, 239, 65, 243, 234, 162, 7, 90, 237, 24, 99, 145, 47, 181, 99, 65, 38, 36, 112, 157, 239, 225, 127, 161, 168, 6, 66, 231, 252, 142, 154, 225, 138, 189, 243, 66, 142, 71, 61, 239, 55, 230, 59, 40, 224, 134, 104, 100, 189, 166, 249, 66, 91, 146, 154, 28, 67, 78, 138, 40, 114, 71, 172, 3, 168, 233, 9, 106, 228, 143, 56, 193, 227, 243, 144, 51, 222, 94, 224, 43, 79, 149, 212, 245, 52, 68, 200, 17, 235, 45, 164, 147, 62, 118, 52, 216, 195, 78, 13, 66, 190, 188, 241, 142, 234, 182, 85, 48, 148, 214, 123, 57, 223, 188, 229, 119, 169, 180, 193, 70, 250, 215, 249, 29, 88, 123, 88, 226, 210, 171, 170, 32, 80, 85, 3, 26, 219, 109, 97, 134, 11, 96, 118, 71, 130, 86, 182, 77, 116, 137, 214, 28, 140, 242, 227, 178, 167, 200, 214, 175, 107, 96, 132, 33, 40, 64, 93, 206, 90, 129, 132, 221, 170, 242, 113, 235, 251, 172, 193, 35, 58, 85, 70, 9, 75, 104, 71, 161, 99, 214, 6, 33, 204, 250, 172, 199, 33, 183, 246, 250, 109, 251, 50, 106, 114, 16, 134, 150, 19, 219, 21, 60, 63, 251, 204, 157, 45, 106, 233, 133, 154, 145, 135, 201, 77, 59, 178, 176, 217, 109, 236, 19, 19, 200, 5, 165, 235, 81, 14, 42, 153, 40, 189, 86, 92, 90, 239, 77, 53, 136, 65, 112, 94, 130, 104, 71, 55, 79, 22, 250, 34, 178, 14, 91, 24, 145, 250, 4, 197, 96, 72, 118, 142, 31, 83, 137, 14, 57, 115, 36, 202, 144, 10, 19, 123, 176, 23, 93, 35, 90, 145, 73, 163, 124, 66, 156, 8, 82, 243, 22, 204, 59, 77, 49, 222, 1, 246, 7, 75, 15, 234, 110, 9, 232, 29, 156, 239, 250, 88, 24, 244, 123, 15, 169, 66, 180, 254, 210, 233, 134, 27, 100, 162, 103, 158, 223, 149, 226, 167, 140, 53, 34, 57, 105, 221, 112, 116, 72, 207, 169, 98, 200, 189, 33, 72, 181, 162, 166, 4, 29, 98, 157, 184, 244, 188, 127, 186, 35, 186, 202, 24, 21, 185, 160, 63, 17, 112, 78, 96, 49, 87, 60, 154, 215, 49, 196, 179, 122, 60, 253, 154, 86, 177, 227, 70, 1, 80, 205, 58, 66, 103, 146, 170, 108, 34, 134, 149, 134, 160, 225, 152, 63, 18, 199, 101, 158, 199, 235, 124, 98, 105, 8, 62, 100, 92, 248, 81, 59, 108, 190, 156, 216, 106, 103, 90, 69, 199, 160, 21, 66, 203, 125, 157, 189, 8, 115, 15, 158, 77, 105, 124, 171, 180, 227, 134, 50, 208, 245, 254, 35, 231, 215, 231, 193, 218, 216, 68, 204, 229, 233, 95, 120, 177, 105, 108, 92, 9, 181, 119, 196, 19, 97, 5, 145, 254, 112, 156, 70, 9, 68, 39, 84, 33, 80, 2, 21, 228, 184, 145, 218, 19, 202, 231, 144, 3, 29, 22, 14, 146, 193, 90, 216, 63, 95, 197, 70, 198, 68, 235, 132, 16, 31, 100, 179, 19, 105, 19, 178, 210, 222, 118, 148, 37, 202, 50, 222, 84, 246, 89, 36, 25, 183, 80, 175, 79, 154, 38, 119, 89, 125, 133, 56, 21, 61, 187, 123, 80, 224, 187, 15, 84, 46, 19, 1, 24, 246, 250, 32, 226, 193, 49, 118, 252, 1, 47, 172, 161, 175, 60, 113, 56, 248, 198, 100, 117, 78, 138, 154, 40, 231, 118, 120, 23, 223, 8, 239, 145, 51, 43, 82, 146, 83, 129, 43, 146, 75, 171, 20, 186, 157, 174, 137, 205, 187, 198, 37, 10, 108, 65, 154, 212, 207, 63, 178, 11, 51, 5, 62, 172, 122, 219, 147, 16, 223, 243, 134, 146, 161, 173, 118, 113, 185, 212, 199, 29, 83, 5, 241, 42, 54, 160, 57, 100, 116, 111, 218, 193, 39, 66, 67, 141, 161, 179, 141, 54, 87, 16, 43, 15, 93, 41, 240, 62, 66, 231, 59, 42, 48, 46, 207, 141, 27, 160, 156, 247, 138, 129, 130, 68, 34, 66, 69, 177, 45, 108, 26, 36, 50, 109, 46, 238, 82, 187, 219, 166, 225, 115, 204, 121, 228, 122, 92, 65, 67, 69, 162, 104, 10, 117, 17, 33, 113, 110, 10, 9, 2, 41, 24, 227, 173, 49, 10, 2, 147, 115, 197, 93, 133, 139, 86, 38, 138, 102, 92, 17, 94, 115, 74, 101, 5, 12, 222, 186, 229, 16, 126, 16, 234, 105, 191, 184, 182, 27, 59, 152, 118, 179, 114, 78, 65, 15, 21, 43, 215, 7, 215, 110, 207, 152, 128, 14, 106, 188, 73, 230, 183, 23, 101, 92, 95, 250, 115, 245, 40, 58, 167, 157, 201, 1, 229, 233, 39, 243, 103, 253, 104, 135, 248, 219, 74, 127, 91, 135, 224, 240, 42, 6, 70, 70, 48, 23, 52, 78, 12, 212, 203, 55, 134, 108, 107, 185, 237, 129, 120, 234, 54, 243, 252, 231, 19, 190, 190, 46, 48, 115, 200, 145, 119, 195, 140, 122, 21, 85, 120, 189, 33, 208, 59, 39, 181, 57, 55, 128, 144, 149, 120, 65, 77, 113, 75, 203, 194, 251, 217, 77, 110, 56, 54, 93, 240, 101, 219, 52, 174, 163, 153, 193, 24, 16, 112, 103, 178, 252, 57, 2, 7, 55, 184, 80, 176, 248, 128, 236, 73, 250, 66, 218, 63, 16, 230, 149, 32, 149, 237, 199, 168, 81, 147, 63, 211, 251, 112, 223, 62, 92, 60, 114, 156, 203, 12, 225, 232, 250, 166, 123, 194, 227, 56, 82, 4, 104, 168, 170, 38, 93, 122, 232, 207, 228, 68, 58, 247, 162, 96, 128, 20, 249, 114, 93, 37, 199, 229, 152, 134, 168, 14, 212, 153, 137, 31, 241, 189, 163, 223, 247, 196, 22, 67, 27, 105, 10, 235, 28, 24, 177, 249, 230, 19, 247, 145, 228, 151, 195, 17, 201, 93, 226, 167, 76, 227, 85, 207, 200, 139, 37, 148, 40, 243, 214, 60, 55, 241, 183, 126, 160, 97, 6, 129, 104, 182, 207, 250, 77, 123, 235, 211, 158, 171, 52, 171, 186, 53, 121, 24, 137, 105, 164, 247, 172, 132, 201, 31, 135, 123, 0, 164, 164, 235, 167, 103, 63, 40, 54, 102, 46, 197, 185, 194, 14, 195, 159, 182, 120, 4, 36, 14, 194, 219, 155, 23, 233, 148, 169, 113, 158, 92, 103, 68, 247, 133, 214, 252, 9, 220, 50, 198, 251, 75, 34, 10, 115, 209, 172, 147, 168, 185, 81, 70, 174, 155, 80, 111, 246, 78, 199, 155, 192, 2, 241, 162, 123, 123, 77, 228, 101, 22, 241, 89, 245, 63, 3, 235, 76, 162, 20, 12, 81, 228, 254, 50, 146, 76, 149, 112, 226, 88, 231, 167, 229, 27, 250, 21, 98, 84, 235, 251, 213, 238, 209, 111, 34, 144, 181, 190, 22, 60, 112, 244, 98, 241, 19, 51, 163, 4, 198, 8, 50, 194, 200, 241, 155, 192, 97, 95, 173, 49, 94, 169, 112, 21, 87, 23, 229, 226, 75, 60, 134, 126, 21, 10, 86, 84, 238, 113, 19, 77, 205, 3, 158, 105, 241, 98, 86, 237, 233, 190, 97, 136, 202, 234, 147, 121, 253, 156, 176, 238, 222, 71, 35, 185, 127, 212, 211, 0, 86, 129, 131, 93, 111, 167, 121, 138, 69, 251, 4, 90, 229, 43, 48, 144, 138, 0, 48, 249, 202, 203, 46, 117, 175, 27, 96, 230, 119, 93, 156, 129, 186, 122, 133, 114, 160, 196, 50, 81, 97, 63, 13, 188, 146, 63, 4, 220, 222, 165, 9, 236, 124, 117, 145, 91, 244, 186, 233, 35, 78, 241, 45, 38, 127, 179, 165, 20, 253, 131, 171, 41, 230, 158, 162, 83, 50, 19, 23, 83, 128, 121, 67, 248, 17, 145, 98, 112, 190, 250, 237, 243, 248, 64, 146, 41, 16, 44, 154, 33, 60, 162, 161, 156, 229, 176, 172, 49, 42, 240, 235, 85, 90, 162, 151, 170, 183, 27, 21, 183, 40, 134, 187, 193, 75, 183, 76, 63, 235, 27, 90, 133, 26, 138, 83, 150, 77, 206, 233, 166, 204, 90, 125, 211, 133, 229, 10, 166, 12, 146, 184, 152, 107, 242, 245, 52, 145, 154, 34, 249, 13, 102, 253, 209, 20, 3, 225, 88, 156, 137, 30, 182, 206, 211, 255, 149, 39, 64, 133, 16, 125, 5, 115, 220, 51, 122, 242, 121, 222, 212, 239, 237, 208, 31, 72, 98, 36, 131, 185, 9, 124, 14, 55, 236, 196, 38, 68, 82, 17, 197, 255, 168, 199, 158, 94, 52, 58, 126, 100, 57, 118, 184, 214, 42, 65, 249, 156, 128, 82, 139, 234, 63, 119, 55, 89, 108, 207, 209, 226, 34, 198, 134, 54, 131, 154, 87, 96, 31, 11, 241, 1, 11, 97, 61, 167, 20, 223, 188, 163, 31, 250, 189, 13, 29, 196, 209, 218, 119, 102, 13, 172, 149, 149, 219, 251, 64, 238, 211, 212, 136, 82, 237, 150, 140, 188, 201, 123, 191, 83, 133, 193, 253, 25, 27, 246, 72, 60, 212, 227, 241, 209, 206, 142, 29, 11, 11, 146, 182, 203, 214, 25, 192, 236, 197, 176, 6, 216, 105, 145, 191, 115, 161, 107, 170, 194, 121, 148, 205, 65, 116, 157, 96, 173, 217, 30, 96, 174, 239, 178, 151, 121, 46, 3, 86, 65, 32, 120, 195, 66, 86, 144, 206, 91, 36, 148, 42, 216, 208, 164, 203, 149, 69, 230, 49, 78, 224, 177, 23, 175, 103, 191, 111, 181, 130, 255, 215, 189, 173, 134, 189, 64, 36, 226, 134, 89, 116, 138, 92, 81, 246, 202, 10, 243, 21, 81, 165, 210, 235, 49, 99, 217, 19, 184, 54, 71, 102, 132, 49, 135, 228, 156, 67, 170, 38, 173, 200, 239, 244, 255, 65, 211, 100, 161, 118, 111, 218, 219, 87, 23, 57, 9, 246, 102, 252, 157, 205, 98, 12, 97, 198, 183, 141, 223, 154, 23, 180, 123, 80, 156, 144, 231, 95, 42, 135, 31, 244, 164, 121, 138, 116, 154, 207, 222, 138, 32, 84, 185, 56, 114, 9, 244, 11, 213, 237, 166, 91, 31, 217, 20, 179, 168, 121, 139, 237, 181, 221, 90, 174, 2, 176, 34, 210, 130, 241, 130, 240, 178, 89, 176, 130, 185, 243, 52, 101, 116, 112, 6, 60, 84, 6, 110, 29, 246, 66, 10, 164, 130, 46, 75, 163, 179, 45, 250, 32, 57, 48, 74, 169, 133, 44, 167, 241, 103, 31, 119, 243, 74, 208, 4, 162, 17, 11, 72, 126, 10, 81, 117, 188, 103, 222, 163, 78, 206, 72, 216, 73, 2, 221, 230, 122, 107, 141, 126, 1, 236, 63, 51, 169, 160, 14, 165, 208, 174, 9, 91, 74, 252, 146, 198, 79, 238, 175, 39, 102, 75, 150, 40, 109, 143, 117, 77, 153, 234, 82, 38, 162, 23, 242, 107, 124, 217, 13, 51, 55, 92, 1, 28, 138, 62, 209, 69, 222, 63, 62, 150, 221, 74, 232, 220, 181, 21, 36, 203, 182, 193, 183, 173, 113, 157, 241, 208, 131, 172, 0, 176, 55, 229, 63, 54, 84, 197, 105, 196, 154, 60, 52, 50, 191, 230, 202, 129, 85, 235, 75, 245, 172, 58, 230, 0, 251, 250, 104, 123, 247, 224, 120, 118, 30, 50, 223, 144, 233, 243, 213, 58, 228, 124, 24, 168, 194, 24, 192, 4, 63, 107, 39, 55, 202, 196, 254, 149, 141, 189, 136, 218, 108, 203, 100, 198, 121, 240, 252, 208, 200, 230, 178, 117, 199, 2, 55, 165, 214, 210, 246, 142, 178, 63, 86, 249, 156, 100, 172, 202, 197, 148, 222, 76, 185, 221, 248, 71, 7, 231, 224, 158, 236, 27, 44, 53, 58, 181, 65, 176, 146, 223, 254, 5, 249, 207, 218, 160, 212, 245, 14, 114, 246, 153, 139, 55, 230, 89, 143, 125, 133, 103, 249, 123, 91, 229, 195, 214, 65, 251, 219, 11, 48, 167, 72, 9, 131, 110, 207, 244, 197, 159, 23, 51, 161, 135, 251, 220, 52, 242, 122, 199, 21, 231, 34, 185, 84, 140, 112, 3, 164, 231, 64, 162, 192, 103, 182, 162, 112, 2, 142, 22, 148, 62, 71, 79, 232, 85, 38, 15, 87, 230, 232, 112, 203, 94, 230, 172, 233, 219, 158, 246, 87, 61, 155, 22, 14, 157, 23, 61, 99, 196, 97, 70, 216, 173, 236, 211, 120, 197, 28, 231, 47, 215, 66, 71, 46, 66, 28, 29, 223, 77, 173, 144, 82, 220, 222, 99, 229, 74, 53, 88, 116, 123, 162, 240, 168, 216, 142, 205, 144, 183, 127, 135, 4, 162, 91, 176, 78, 26, 178, 249, 104, 195, 76, 105, 206, 143, 20, 158, 220, 22, 67, 201, 237, 78, 241, 56, 111, 63, 160, 240, 168, 131, 253, 62, 8, 51, 88, 43, 174, 217, 235, 243, 71, 50, 210, 7, 235, 56, 63, 128, 111, 32, 244, 187, 217, 170, 77, 152, 65, 7, 200, 30, 47, 83, 126, 139, 170, 142, 219, 184, 156, 54, 102, 249, 94, 32, 2, 204, 206, 77, 230, 60, 184, 143, 167, 110, 241, 203, 60, 44, 174, 128, 150, 186, 215, 218, 189, 87, 107, 216, 84, 76, 166, 171, 91, 23, 16, 208, 211, 181, 234, 61, 203, 224, 172, 128, 129, 66, 7, 249, 0, 75, 157, 235, 49, 244, 154, 157, 107, 205, 70, 146, 38, 188, 6, 218, 133, 231, 204, 168, 234, 133, 17, 245, 85, 253, 163, 242, 168, 56, 9, 99, 142, 236, 237, 67, 20, 226, 60, 4, 86, 83, 208, 243, 19, 127, 168, 6, 156, 67, 179, 66, 170, 242, 211, 170, 199, 188, 71, 231, 191, 67, 42, 109, 37, 117, 154, 231, 116, 63, 232, 206, 107, 141, 17, 127, 143, 79, 247, 160, 62, 151, 234, 116, 126, 14, 223, 8, 5, 52, 82, 8, 99, 17, 9, 7, 4, 208, 106, 11, 208, 156, 157, 85, 51, 236, 128, 41, 66, 99, 243, 220, 153, 131, 111, 78, 189, 95, 219, 51, 100, 41, 150, 188, 218, 35, 37, 176, 31, 122, 252, 207, 222, 214, 142, 95, 19, 136, 159, 195, 209, 39, 182, 19, 97, 185, 72, 83, 165, 208, 249, 83, 4, 244, 230, 30, 7, 13, 161, 90, 200, 121, 138, 67, 151, 252, 197, 165, 44, 215, 9, 81, 118, 179, 159, 15, 3, 156, 105, 151, 104, 109, 161, 202, 143, 199, 41, 187, 172, 154, 64, 105, 69, 67, 173, 226, 34, 234, 111, 69, 244, 45, 230, 49, 11, 18, 158, 56, 184, 55, 124, 46, 252, 215, 109, 236, 124, 156, 172, 148, 159, 44, 147, 129, 50, 49, 230, 128, 213, 137, 161, 125, 140, 222, 36, 90, 117, 223, 146, 237, 122, 39, 118, 188, 93, 11, 40, 49, 114, 230, 80, 31, 221, 58, 199, 174, 192, 112, 31, 236, 98, 56, 76, 27, 199, 78, 28, 48, 62, 246, 207, 30, 85, 50, 31, 4, 143, 58, 241, 131, 83, 203, 70, 241, 124, 150, 160, 88, 30, 227, 177, 213, 75, 139, 122, 83, 83, 41, 97, 140, 78, 157, 188, 172, 85, 52, 202, 76, 47, 145, 76, 126, 144, 228, 49, 239, 103, 196, 149, 203, 133, 159, 201, 215, 241, 71, 245, 114, 49, 125, 228, 22, 192, 235, 230, 246, 247, 100, 110, 76, 74, 214, 226, 221, 120, 140, 250, 108, 9, 203, 40, 92, 19, 184, 136, 86, 76, 250, 177, 64, 76, 214, 79, 190, 86, 8, 131, 178, 0, 200, 171, 245, 144, 94, 2, 236, 11, 187, 119, 165, 83, 130, 252, 49, 126, 254, 131, 38, 43, 245, 170, 53, 7, 183, 205, 84, 71, 16, 127, 86, 249, 31, 169, 65, 33, 207, 146, 111, 155, 43, 145, 85, 250, 216, 38, 95, 18, 129, 186, 14, 3, 158, 43, 183, 44, 205, 90, 37, 141, 27, 130, 115, 4, 121, 67, 113, 43, 109, 251, 71, 103, 32, 129, 163, 73, 116, 252, 32, 149, 17, 150, 117, 168, 218, 56, 163, 173, 125, 84, 103, 136, 195, 89, 46, 27, 45, 153, 6, 184, 81, 93, 131, 28, 42, 171, 87, 177, 135, 109, 24, 78, 80, 103, 110, 168, 3, 251, 165, 139, 171, 25, 77, 166, 250, 193, 166, 168, 195, 160, 12, 25, 110, 36, 0, 132, 247, 199, 195, 30, 177, 14, 176, 197, 58, 142, 93, 43, 151, 126, 28, 184, 231, 179, 113, 227, 26, 165, 98, 180, 183, 218, 182, 150, 125, 231, 102, 231, 206, 39, 57, 121, 193, 43, 11, 254, 173, 29, 251, 45, 171, 106, 87, 114, 38, 58, 153, 72, 84, 193, 36, 2, 142, 215, 121, 147, 160, 11, 37, 243, 213, 217, 181, 152, 112, 191, 155, 217, 136, 117, 175, 182, 125, 134, 218, 58, 212, 239, 39, 250, 119, 220, 113, 214, 143, 204, 124, 11, 153, 200, 158, 215, 253, 40, 35, 17, 232, 45, 217, 47, 191, 159, 199, 82, 41, 106, 158, 244, 222, 254, 133, 109, 151, 43, 187, 203, 165, 61, 163, 205, 7, 217, 12, 252, 123, 90, 255, 255, 88, 221, 122, 76, 173, 185, 85, 185, 33, 228, 226, 161, 72, 217, 34, 197, 140, 190, 18, 7, 142, 177, 203, 49, 93, 91, 12, 12, 29, 35, 100, 136, 58, 22, 174, 49, 71, 209, 218, 199, 125, 51, 110, 117, 45, 205, 141, 81, 192, 148, 211, 238, 218, 84, 227, 191, 160, 49, 110, 207, 190, 8, 156, 184, 167, 148, 228, 69, 19, 39, 3, 210, 204, 196, 230, 123, 64, 123, 133, 115, 33, 85, 15, 45, 144, 218, 31, 192, 34, 60, 208, 166, 113, 151, 122, 249, 171, 207, 8, 164, 207, 138, 246, 217, 251, 34, 27, 145, 144, 57, 60, 165, 203, 117, 199, 80, 141, 218, 36, 65, 24, 115, 33, 152, 139, 152, 34, 72, 99, 192, 219, 49, 65, 187, 217, 14, 208, 56, 62, 143, 12, 51, 225, 187, 38, 19, 114, 83, 118, 117, 17, 249, 224, 185, 225, 237, 71, 79, 67, 75, 51, 0, 92, 123, 155, 122, 154, 105, 101, 235, 17, 160, 35, 152, 108, 45, 151, 154, 92, 149, 63, 255, 77, 153, 104, 98, 208, 251, 112, 189, 38, 102, 205, 117, 255, 232, 150, 109, 51, 70, 5, 11, 224, 41, 141, 200, 227, 170, 1, 220, 34, 103, 112, 185, 169, 207, 141, 183, 172, 61, 129, 113, 126, 200, 59, 197, 93, 245, 240, 58, 232, 40, 90, 125, 37, 134, 210, 82, 118, 234, 200, 115, 169, 124, 188, 1, 172, 236, 31, 79, 211, 213, 146, 195, 206, 105, 57, 241, 59, 237, 145, 32, 6, 24, 253, 23, 60, 211, 2, 94, 42, 190, 180, 213, 177, 23, 167, 104, 3, 226, 171, 208, 95, 96, 57, 53, 141, 115, 88, 174, 10, 206, 234, 150, 182, 157, 242, 93, 97, 80, 9, 154, 152, 166, 94, 141, 238, 212, 68, 231, 244, 0, 36, 167, 2, 9, 169, 16, 151, 170, 33, 51, 1, 105, 210, 194, 224, 146, 221, 227, 137, 63, 144, 14, 5, 140, 30, 193, 203, 47, 90, 20, 233, 169, 66, 192, 91, 252, 161, 140, 67, 202, 12, 24, 190, 242, 46, 208, 121, 8, 194, 164, 164, 125, 216, 194, 242, 125, 131, 35, 5, 45, 18, 152, 157, 240, 35, 56, 246, 144, 175, 2, 7, 123, 13, 158, 168, 115, 221, 195, 54, 236, 35, 132, 246, 7, 100, 108, 120, 17, 23, 210, 61, 238, 38, 73, 149, 28, 249, 29, 5, 232, 28, 131, 84, 79, 155, 26, 82, 96, 150, 219, 122, 167, 231, 56, 233, 176, 154, 213, 126, 14, 155, 13, 68, 157, 25, 236, 244, 64, 125, 74, 247, 241, 123, 177, 102, 43, 244, 122, 173, 75, 132, 244, 248, 236, 246, 161, 138, 68, 86, 2, 52, 121, 232, 96, 100, 207, 238, 219, 64, 197, 162, 8, 97, 144, 89, 121, 66, 146, 166, 233, 7, 145, 217, 223, 51, 254, 128, 1, 211, 1, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 10, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 10, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 10, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 10, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 10, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 10, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 10, 99, 108, 101, 97, 114, 116, 111, 109, 97, 114, 107, 10, 128, 3}; +char datatoc_Bfont[25181]= { +128, 1, 228, 1, 0, 0, 37, 33, 80, 83, 45, 65, 100, 111, 98, 101, +70, 111, 110, 116, 45, 49, 46, 48, 58, 32, 66, 102, 111, 110, 116, 32, +48, 48, 49, 46, 48, 48, 49, 10, 49, 49, 32, 100, 105, 99, 116, 32, +98, 101, 103, 105, 110, 10, 47, 70, 111, 110, 116, 73, 110, 102, 111, 32, +49, 48, 32, 100, 105, 99, 116, 32, 100, 117, 112, 32, 98, 101, 103, 105, +110, 10, 47, 118, 101, 114, 115, 105, 111, 110, 32, 40, 48, 48, 49, 46, +48, 48, 49, 41, 32, 114, 101, 97, 100, 111, 110, 108, 121, 32, 100, 101, +102, 10, 47, 70, 117, 108, 108, 78, 97, 109, 101, 32, 40, 66, 102, 111, +110, 116, 41, 32, 114, 101, 97, 100, 111, 110, 108, 121, 32, 100, 101, 102, +10, 47, 70, 97, 109, 105, 108, 121, 78, 97, 109, 101, 32, 40, 66, 102, +111, 110, 116, 41, 32, 114, 101, 97, 100, 111, 110, 108, 121, 32, 100, 101, +102, 10, 47, 87, 101, 105, 103, 104, 116, 32, 40, 82, 101, 103, 117, 108, +97, 114, 41, 32, 114, 101, 97, 100, 111, 110, 108, 121, 32, 100, 101, 102, +10, 47, 73, 116, 97, 108, 105, 99, 65, 110, 103, 108, 101, 32, 48, 32, +100, 101, 102, 10, 47, 105, 115, 70, 105, 120, 101, 100, 80, 105, 116, 99, +104, 32, 102, 97, 108, 115, 101, 32, 100, 101, 102, 10, 47, 85, 110, 100, +101, 114, 108, 105, 110, 101, 80, 111, 115, 105, 116, 105, 111, 110, 32, 45, +49, 48, 48, 32, 100, 101, 102, 10, 47, 85, 110, 100, 101, 114, 108, 105, +110, 101, 84, 104, 105, 99, 107, 110, 101, 115, 115, 32, 53, 48, 32, 100, +101, 102, 10, 101, 110, 100, 32, 114, 101, 97, 100, 111, 110, 108, 121, 32, +100, 101, 102, 10, 47, 70, 111, 110, 116, 78, 97, 109, 101, 32, 47, 66, +102, 111, 110, 116, 32, 100, 101, 102, 10, 47, 69, 110, 99, 111, 100, 105, +110, 103, 32, 83, 116, 97, 110, 100, 97, 114, 100, 69, 110, 99, 111, 100, +105, 110, 103, 32, 100, 101, 102, 10, 47, 80, 97, 105, 110, 116, 84, 121, +112, 101, 32, 48, 32, 100, 101, 102, 10, 47, 70, 111, 110, 116, 84, 121, +112, 101, 32, 49, 32, 100, 101, 102, 10, 47, 70, 111, 110, 116, 77, 97, +116, 114, 105, 120, 32, 91, 48, 46, 48, 48, 49, 32, 48, 32, 48, 32, +48, 46, 48, 48, 49, 32, 48, 32, 48, 93, 32, 114, 101, 97, 100, 111, +110, 108, 121, 32, 100, 101, 102, 10, 99, 117, 114, 114, 101, 110, 116, 100, +105, 99, 116, 32, 101, 110, 100, 10, 99, 117, 114, 114, 101, 110, 116, 102, +105, 108, 101, 32, 101, 101, 120, 101, 99, 10, 128, 2, 146, 94, 0, 0, +217, 214, 111, 99, 59, 132, 106, 152, 155, 153, 116, 176, 23, 159, 198, 204, +68, 91, 194, 192, 49, 3, 198, 133, 112, 167, 179, 84, 164, 162, 128, 174, +111, 191, 127, 152, 247, 90, 132, 186, 206, 45, 3, 106, 107, 81, 184, 72, +73, 49, 89, 29, 146, 229, 6, 158, 98, 38, 213, 173, 204, 93, 228, 248, +16, 122, 166, 154, 53, 181, 95, 106, 155, 75, 79, 147, 197, 108, 35, 188, +198, 29, 215, 191, 143, 50, 242, 29, 88, 228, 26, 95, 121, 12, 238, 47, +2, 175, 73, 134, 149, 233, 12, 29, 11, 210, 89, 231, 91, 2, 25, 48, +11, 15, 105, 44, 51, 119, 156, 42, 166, 122, 232, 81, 122, 190, 18, 48, +8, 69, 34, 74, 246, 173, 93, 169, 219, 154, 26, 58, 64, 251, 6, 179, +106, 156, 205, 105, 18, 85, 7, 252, 45, 233, 208, 65, 132, 199, 96, 66, +240, 63, 207, 209, 83, 132, 0, 35, 151, 42, 129, 42, 185, 179, 203, 86, +112, 193, 206, 39, 89, 113, 28, 117, 41, 66, 98, 214, 242, 145, 175, 155, +124, 118, 7, 30, 218, 126, 122, 208, 38, 33, 98, 50, 34, 185, 54, 8, +122, 178, 127, 254, 95, 7, 134, 71, 6, 101, 146, 24, 61, 195, 71, 174, +146, 230, 191, 86, 177, 123, 237, 206, 19, 104, 70, 246, 162, 163, 118, 171, +140, 11, 192, 255, 78, 52, 125, 32, 253, 14, 199, 126, 250, 177, 240, 99, +49, 0, 20, 141, 42, 125, 47, 210, 31, 18, 90, 170, 205, 143, 219, 153, +121, 131, 43, 103, 13, 138, 170, 118, 210, 18, 186, 181, 97, 70, 25, 144, +150, 12, 53, 110, 184, 216, 233, 243, 198, 93, 157, 254, 127, 140, 44, 138, +123, 43, 233, 158, 99, 255, 108, 134, 136, 60, 29, 229, 7, 141, 163, 185, +30, 3, 228, 132, 13, 221, 109, 48, 227, 60, 227, 135, 117, 220, 128, 67, +195, 147, 32, 118, 71, 190, 131, 11, 245, 200, 93, 30, 226, 32, 114, 26, +39, 232, 138, 33, 109, 232, 1, 11, 233, 212, 78, 221, 88, 158, 135, 95, +159, 14, 38, 31, 12, 106, 255, 51, 147, 42, 139, 254, 210, 119, 6, 96, +221, 226, 140, 183, 213, 222, 5, 205, 13, 140, 253, 214, 125, 103, 227, 52, +60, 102, 31, 250, 163, 147, 228, 167, 58, 207, 156, 68, 166, 150, 167, 169, +116, 83, 194, 150, 104, 152, 31, 7, 157, 38, 76, 29, 10, 247, 63, 57, +194, 106, 230, 183, 120, 135, 187, 201, 211, 82, 234, 168, 182, 167, 90, 56, +37, 109, 160, 144, 13, 48, 204, 190, 14, 169, 103, 127, 136, 102, 24, 81, +61, 32, 233, 228, 158, 18, 235, 189, 28, 0, 222, 67, 17, 110, 143, 71, +223, 181, 33, 17, 66, 81, 210, 7, 23, 186, 245, 229, 198, 143, 62, 113, +33, 80, 236, 87, 148, 65, 42, 27, 111, 128, 223, 196, 140, 45, 32, 91, +123, 158, 136, 153, 166, 144, 126, 115, 133, 220, 254, 234, 192, 123, 14, 239, +75, 199, 116, 28, 241, 25, 30, 66, 226, 248, 159, 142, 46, 41, 10, 237, +111, 205, 31, 230, 72, 196, 49, 200, 50, 29, 115, 153, 141, 198, 225, 218, +157, 86, 56, 67, 249, 99, 50, 25, 151, 14, 200, 35, 186, 250, 204, 151, +187, 209, 51, 129, 161, 68, 118, 130, 31, 25, 134, 255, 75, 170, 240, 225, +113, 144, 5, 178, 133, 45, 85, 242, 66, 10, 10, 65, 138, 93, 147, 72, +210, 250, 209, 123, 148, 135, 12, 156, 94, 13, 250, 31, 211, 157, 82, 128, +132, 143, 11, 155, 47, 211, 151, 232, 142, 253, 82, 104, 234, 231, 190, 169, +78, 32, 90, 2, 41, 201, 122, 142, 205, 144, 234, 204, 198, 227, 56, 57, +6, 63, 8, 237, 89, 199, 30, 226, 169, 48, 198, 191, 38, 114, 87, 135, +189, 98, 251, 224, 210, 154, 58, 87, 26, 56, 41, 219, 119, 124, 109, 83, +182, 169, 166, 123, 255, 190, 35, 121, 177, 37, 92, 128, 242, 247, 132, 218, +149, 140, 116, 184, 163, 13, 248, 138, 68, 124, 229, 211, 89, 210, 101, 172, +149, 221, 182, 113, 36, 182, 46, 5, 141, 127, 147, 54, 118, 67, 107, 105, +187, 40, 53, 208, 170, 25, 45, 113, 216, 110, 135, 56, 7, 26, 14, 225, +61, 79, 228, 72, 30, 39, 220, 195, 227, 229, 153, 196, 28, 6, 107, 240, +54, 67, 6, 94, 143, 0, 34, 180, 49, 14, 41, 111, 9, 41, 94, 203, +184, 139, 142, 34, 140, 138, 90, 25, 216, 89, 252, 45, 46, 132, 169, 154, +230, 131, 15, 20, 100, 99, 235, 106, 73, 185, 89, 6, 66, 230, 171, 202, +22, 213, 227, 183, 32, 138, 116, 253, 208, 230, 121, 16, 63, 238, 132, 69, +28, 135, 88, 115, 18, 21, 11, 102, 172, 200, 37, 222, 255, 100, 221, 80, +173, 218, 53, 210, 250, 148, 211, 241, 97, 150, 185, 43, 250, 138, 14, 122, +133, 30, 191, 54, 158, 118, 22, 12, 232, 25, 228, 60, 101, 206, 119, 29, +57, 12, 99, 36, 167, 182, 153, 86, 195, 21, 70, 154, 102, 106, 45, 236, +70, 151, 143, 185, 207, 252, 106, 46, 168, 80, 216, 206, 157, 171, 118, 77, +82, 153, 24, 54, 165, 128, 160, 27, 195, 117, 241, 141, 93, 151, 233, 239, +244, 73, 123, 133, 42, 138, 123, 68, 159, 225, 209, 171, 242, 70, 212, 6, +168, 19, 116, 228, 0, 14, 148, 191, 132, 10, 254, 83, 125, 20, 17, 71, +126, 142, 56, 80, 55, 48, 125, 184, 172, 156, 163, 161, 72, 249, 105, 204, +207, 179, 217, 115, 177, 2, 82, 220, 142, 14, 180, 138, 254, 83, 139, 36, +70, 203, 91, 81, 82, 229, 20, 253, 78, 132, 213, 64, 154, 163, 59, 93, +245, 168, 38, 148, 48, 228, 13, 186, 204, 95, 140, 184, 118, 22, 130, 111, +27, 38, 139, 127, 106, 172, 161, 254, 136, 187, 166, 48, 162, 152, 124, 69, +27, 186, 50, 126, 7, 144, 43, 75, 176, 145, 159, 202, 244, 7, 78, 203, +250, 32, 42, 195, 71, 186, 90, 92, 162, 126, 98, 44, 195, 163, 47, 88, +124, 43, 177, 122, 251, 254, 29, 161, 70, 98, 235, 133, 52, 12, 28, 184, +67, 145, 73, 88, 99, 69, 60, 227, 142, 15, 218, 82, 167, 57, 225, 230, +218, 131, 251, 171, 11, 63, 191, 65, 236, 178, 63, 159, 213, 211, 114, 64, +200, 85, 73, 40, 94, 123, 108, 171, 89, 169, 206, 99, 196, 31, 15, 152, +138, 77, 137, 210, 197, 228, 255, 73, 126, 120, 249, 214, 170, 212, 168, 73, +54, 125, 113, 78, 226, 37, 137, 249, 188, 239, 33, 231, 244, 125, 116, 137, +126, 187, 31, 193, 194, 118, 121, 19, 80, 250, 87, 48, 80, 62, 246, 29, +121, 247, 135, 198, 193, 253, 148, 211, 17, 210, 17, 247, 44, 205, 91, 1, +190, 195, 236, 66, 95, 144, 58, 235, 2, 42, 79, 25, 82, 164, 167, 244, +114, 188, 192, 101, 23, 55, 69, 141, 168, 28, 89, 60, 116, 91, 162, 121, +28, 123, 96, 252, 165, 180, 69, 56, 232, 54, 122, 138, 223, 158, 131, 94, +171, 82, 4, 112, 13, 160, 117, 170, 146, 28, 241, 154, 211, 119, 16, 233, +141, 96, 94, 167, 13, 37, 118, 105, 73, 211, 97, 109, 148, 131, 190, 119, +45, 124, 208, 225, 39, 94, 48, 62, 33, 188, 248, 154, 233, 46, 158, 7, +144, 1, 121, 0, 235, 71, 25, 52, 13, 46, 1, 25, 171, 27, 179, 170, +164, 231, 2, 25, 182, 226, 250, 96, 192, 23, 185, 218, 218, 16, 140, 36, +180, 216, 59, 95, 49, 165, 162, 134, 252, 47, 168, 65, 242, 178, 211, 62, +10, 239, 153, 65, 219, 247, 72, 17, 105, 49, 254, 85, 136, 211, 117, 240, +218, 77, 221, 166, 41, 145, 198, 4, 104, 136, 241, 48, 0, 158, 210, 236, +207, 26, 145, 140, 95, 164, 117, 198, 0, 183, 104, 161, 59, 9, 189, 8, +32, 44, 26, 255, 157, 119, 245, 250, 49, 176, 156, 227, 102, 228, 105, 83, +24, 153, 85, 196, 129, 133, 128, 208, 129, 202, 62, 204, 173, 137, 91, 223, +112, 208, 243, 87, 180, 109, 82, 141, 56, 239, 210, 40, 86, 200, 173, 31, +32, 230, 140, 202, 61, 220, 176, 92, 108, 207, 177, 213, 169, 238, 172, 158, +254, 38, 242, 141, 6, 115, 217, 193, 134, 166, 227, 36, 208, 119, 86, 44, +34, 195, 71, 119, 94, 234, 241, 122, 79, 169, 173, 36, 221, 120, 68, 23, +3, 44, 125, 38, 78, 72, 230, 25, 62, 18, 205, 206, 66, 140, 79, 125, +229, 223, 0, 92, 25, 118, 253, 161, 219, 51, 228, 229, 212, 13, 155, 26, +50, 54, 105, 54, 38, 85, 152, 49, 150, 233, 88, 191, 111, 0, 122, 147, +95, 215, 50, 33, 176, 209, 77, 136, 198, 6, 71, 97, 100, 152, 0, 159, +94, 91, 202, 7, 148, 125, 254, 58, 38, 107, 49, 101, 14, 194, 163, 12, +79, 253, 153, 150, 54, 30, 37, 140, 189, 241, 141, 47, 57, 139, 145, 74, +88, 15, 178, 179, 63, 241, 91, 129, 30, 79, 19, 104, 72, 56, 215, 37, +124, 242, 77, 81, 109, 155, 0, 233, 122, 186, 107, 91, 145, 92, 162, 90, +4, 113, 170, 84, 211, 132, 142, 64, 27, 93, 152, 248, 107, 94, 93, 160, +109, 249, 241, 251, 102, 130, 66, 96, 51, 112, 140, 245, 151, 65, 45, 189, +157, 117, 188, 91, 97, 49, 138, 107, 106, 135, 204, 203, 38, 119, 33, 149, +87, 122, 158, 198, 8, 142, 218, 3, 56, 249, 80, 86, 253, 82, 246, 203, +231, 57, 160, 50, 52, 187, 24, 108, 130, 253, 193, 24, 51, 201, 50, 3, +67, 176, 187, 124, 165, 172, 142, 252, 156, 155, 220, 252, 51, 237, 105, 94, +48, 44, 233, 187, 188, 123, 100, 218, 223, 36, 114, 54, 219, 223, 39, 156, +112, 206, 46, 19, 10, 213, 139, 69, 12, 138, 134, 44, 130, 94, 136, 4, +111, 77, 21, 115, 225, 162, 15, 38, 159, 218, 138, 102, 171, 2, 142, 48, +158, 57, 94, 59, 182, 17, 127, 190, 223, 196, 66, 238, 107, 50, 154, 2, +142, 167, 152, 18, 25, 226, 1, 253, 251, 17, 102, 20, 111, 28, 97, 136, +15, 60, 65, 230, 39, 49, 25, 166, 31, 18, 54, 4, 24, 89, 211, 226, +250, 74, 226, 185, 67, 138, 29, 18, 85, 156, 124, 145, 84, 17, 175, 167, +51, 13, 54, 82, 97, 64, 206, 201, 111, 199, 214, 210, 235, 148, 55, 181, +241, 136, 86, 254, 219, 122, 64, 103, 179, 79, 113, 163, 126, 75, 107, 79, +102, 244, 21, 147, 198, 210, 251, 35, 136, 73, 15, 32, 45, 150, 134, 253, +113, 83, 111, 161, 110, 212, 242, 33, 12, 12, 16, 143, 194, 199, 37, 228, +251, 110, 7, 213, 198, 55, 80, 32, 209, 140, 34, 47, 102, 249, 217, 166, +118, 31, 106, 2, 18, 106, 46, 146, 148, 125, 0, 208, 89, 209, 247, 55, +143, 177, 19, 183, 127, 71, 118, 20, 136, 3, 233, 109, 119, 181, 115, 223, +110, 139, 182, 171, 109, 104, 72, 62, 152, 143, 14, 157, 82, 154, 253, 142, +215, 59, 1, 11, 98, 107, 140, 12, 240, 144, 56, 38, 14, 220, 237, 154, +174, 151, 179, 207, 104, 234, 222, 84, 126, 157, 90, 52, 118, 126, 96, 23, +203, 135, 134, 41, 16, 196, 210, 44, 125, 68, 145, 232, 236, 52, 222, 102, +131, 80, 101, 237, 218, 244, 215, 205, 95, 58, 96, 18, 66, 213, 91, 247, +58, 44, 57, 150, 193, 139, 135, 36, 143, 236, 94, 209, 236, 213, 227, 42, +176, 173, 206, 87, 151, 240, 145, 185, 45, 209, 177, 201, 123, 32, 196, 44, +158, 83, 203, 202, 6, 106, 54, 93, 43, 209, 12, 114, 76, 100, 242, 104, +165, 138, 15, 143, 5, 33, 228, 195, 243, 111, 81, 249, 174, 15, 167, 40, +165, 51, 97, 185, 215, 150, 118, 253, 22, 103, 9, 21, 185, 238, 189, 94, +49, 104, 100, 98, 165, 196, 31, 148, 112, 125, 199, 46, 103, 252, 79, 100, +165, 112, 104, 82, 249, 219, 205, 34, 198, 31, 198, 191, 181, 72, 212, 182, +62, 87, 13, 53, 171, 84, 222, 156, 131, 201, 162, 173, 47, 44, 187, 105, +119, 132, 47, 228, 184, 36, 85, 218, 11, 251, 242, 124, 205, 168, 252, 24, +245, 49, 84, 161, 107, 211, 21, 63, 219, 89, 15, 116, 192, 18, 208, 86, +95, 75, 71, 239, 247, 105, 124, 85, 174, 144, 220, 24, 188, 94, 40, 209, +132, 234, 225, 53, 69, 240, 42, 47, 92, 18, 240, 120, 210, 140, 168, 218, +105, 60, 246, 247, 238, 188, 247, 10, 162, 24, 136, 226, 91, 107, 157, 168, +51, 186, 15, 79, 68, 154, 225, 52, 41, 228, 127, 35, 41, 224, 97, 225, +44, 85, 16, 225, 99, 198, 48, 182, 98, 235, 255, 178, 24, 210, 58, 14, +200, 84, 18, 132, 137, 35, 171, 63, 195, 238, 195, 167, 167, 8, 207, 232, +214, 100, 91, 195, 90, 233, 86, 98, 207, 185, 229, 196, 140, 253, 236, 219, +150, 62, 62, 2, 15, 51, 232, 157, 44, 234, 107, 188, 220, 214, 209, 42, +165, 18, 94, 143, 235, 241, 192, 254, 106, 155, 48, 246, 239, 123, 17, 140, +12, 101, 251, 102, 156, 126, 130, 2, 38, 62, 255, 27, 134, 182, 120, 23, +158, 103, 4, 48, 154, 78, 236, 14, 254, 222, 239, 42, 228, 224, 138, 87, +211, 236, 78, 212, 1, 107, 139, 81, 5, 238, 185, 84, 205, 51, 83, 67, +52, 42, 135, 255, 244, 123, 157, 185, 116, 114, 160, 116, 246, 30, 147, 127, +129, 156, 51, 229, 39, 122, 2, 122, 145, 229, 25, 122, 2, 151, 7, 125, +246, 76, 129, 209, 110, 138, 246, 211, 33, 183, 60, 192, 108, 167, 161, 157, +173, 188, 134, 192, 179, 203, 195, 136, 84, 41, 110, 193, 122, 131, 11, 75, +124, 83, 139, 80, 12, 71, 93, 214, 179, 43, 70, 139, 91, 53, 228, 97, +105, 67, 230, 118, 92, 183, 131, 114, 231, 74, 140, 48, 135, 180, 10, 184, +148, 46, 75, 182, 205, 83, 47, 151, 206, 84, 243, 232, 233, 126, 142, 30, +11, 113, 219, 252, 153, 18, 16, 215, 238, 121, 155, 255, 21, 214, 89, 6, +196, 3, 201, 131, 48, 187, 159, 235, 14, 27, 155, 245, 77, 229, 130, 112, +168, 164, 253, 69, 23, 253, 242, 175, 19, 232, 155, 161, 27, 158, 95, 160, +90, 79, 109, 133, 203, 42, 70, 181, 120, 247, 244, 85, 191, 167, 255, 36, +251, 115, 54, 191, 78, 211, 182, 252, 5, 12, 100, 32, 48, 200, 26, 234, +123, 25, 161, 253, 134, 168, 60, 15, 187, 62, 24, 239, 177, 98, 92, 109, +195, 112, 78, 242, 161, 250, 224, 210, 94, 111, 34, 100, 196, 71, 103, 74, +123, 216, 217, 180, 160, 33, 64, 105, 123, 183, 125, 84, 77, 80, 99, 109, +247, 173, 168, 239, 122, 88, 233, 117, 237, 148, 43, 144, 195, 255, 222, 124, +214, 133, 156, 117, 244, 7, 73, 13, 100, 164, 68, 175, 191, 93, 225, 252, +128, 96, 77, 231, 196, 150, 223, 120, 56, 23, 101, 94, 23, 50, 76, 38, +27, 89, 184, 93, 140, 37, 79, 249, 66, 199, 27, 220, 230, 114, 176, 179, +228, 201, 12, 56, 113, 1, 25, 207, 104, 177, 191, 79, 237, 143, 226, 104, +92, 21, 249, 98, 205, 22, 105, 215, 184, 142, 178, 107, 8, 194, 13, 32, +156, 84, 109, 146, 152, 57, 241, 72, 62, 74, 122, 212, 88, 179, 57, 23, +186, 74, 73, 82, 37, 80, 182, 165, 40, 89, 30, 244, 209, 110, 163, 24, +182, 201, 139, 145, 225, 148, 219, 184, 1, 109, 99, 156, 37, 247, 177, 111, +50, 209, 221, 208, 78, 0, 72, 6, 236, 76, 79, 63, 132, 26, 227, 72, +142, 229, 248, 120, 160, 148, 155, 91, 51, 61, 40, 22, 192, 96, 139, 193, +192, 41, 116, 79, 140, 116, 158, 248, 64, 168, 227, 174, 56, 114, 92, 160, +31, 200, 94, 82, 99, 139, 67, 95, 47, 76, 180, 152, 43, 131, 149, 177, +4, 212, 56, 209, 190, 209, 102, 122, 224, 72, 234, 244, 111, 175, 138, 120, +23, 203, 9, 146, 234, 239, 94, 241, 28, 21, 170, 51, 2, 176, 125, 179, +217, 99, 83, 17, 16, 113, 123, 111, 68, 94, 156, 200, 90, 117, 30, 174, +131, 42, 161, 91, 76, 85, 199, 44, 75, 199, 0, 159, 111, 158, 236, 63, +252, 73, 67, 220, 113, 169, 158, 74, 7, 81, 214, 149, 155, 222, 129, 91, +63, 169, 196, 168, 208, 230, 83, 168, 4, 19, 27, 176, 157, 146, 56, 42, +254, 143, 171, 119, 60, 127, 57, 37, 107, 84, 255, 246, 76, 159, 38, 176, +233, 13, 97, 107, 64, 55, 206, 201, 204, 218, 3, 139, 123, 150, 151, 110, +28, 198, 99, 247, 167, 155, 37, 184, 253, 214, 21, 253, 250, 179, 26, 233, +98, 205, 117, 109, 94, 222, 15, 151, 184, 119, 219, 159, 26, 52, 234, 55, +66, 100, 108, 175, 174, 17, 111, 135, 189, 244, 238, 173, 23, 17, 241, 136, +78, 124, 75, 203, 114, 135, 228, 221, 79, 244, 180, 84, 215, 120, 58, 193, +234, 17, 21, 132, 110, 10, 93, 93, 0, 183, 245, 134, 61, 95, 68, 191, +141, 237, 95, 126, 87, 58, 149, 134, 213, 110, 116, 216, 192, 10, 112, 38, +232, 50, 35, 120, 57, 45, 172, 232, 37, 77, 226, 153, 110, 131, 253, 210, +168, 180, 83, 56, 51, 56, 189, 222, 97, 193, 136, 138, 42, 148, 50, 111, +24, 19, 254, 177, 109, 42, 4, 65, 172, 96, 251, 160, 54, 58, 165, 202, +64, 75, 38, 58, 75, 176, 216, 98, 146, 125, 118, 248, 14, 106, 228, 226, +81, 241, 251, 127, 27, 23, 92, 157, 140, 12, 59, 86, 252, 122, 13, 128, +14, 184, 55, 155, 44, 253, 29, 47, 123, 191, 185, 154, 163, 114, 250, 216, +48, 218, 24, 41, 137, 186, 200, 209, 147, 86, 234, 11, 251, 42, 56, 181, +243, 238, 166, 135, 92, 151, 86, 174, 89, 79, 71, 14, 24, 5, 179, 87, +131, 135, 102, 59, 186, 66, 1, 6, 72, 5, 28, 79, 49, 186, 194, 62, +179, 53, 186, 31, 143, 15, 105, 32, 251, 188, 138, 11, 244, 36, 100, 101, +80, 187, 253, 53, 90, 154, 212, 181, 126, 209, 58, 10, 55, 168, 27, 236, +115, 101, 224, 193, 103, 231, 231, 76, 130, 169, 64, 247, 143, 160, 6, 12, +187, 62, 115, 85, 133, 97, 131, 157, 164, 5, 18, 51, 69, 53, 226, 170, +32, 248, 133, 194, 58, 114, 243, 156, 53, 219, 228, 37, 51, 150, 240, 227, +74, 100, 66, 140, 115, 100, 103, 47, 160, 145, 39, 160, 75, 222, 218, 28, +108, 232, 107, 91, 0, 57, 250, 136, 6, 33, 118, 115, 103, 179, 221, 108, +40, 142, 175, 185, 2, 12, 192, 66, 213, 152, 41, 233, 223, 41, 212, 85, +17, 52, 58, 211, 181, 46, 211, 206, 189, 26, 8, 90, 115, 224, 151, 195, +224, 213, 34, 162, 189, 222, 218, 155, 78, 201, 101, 242, 9, 56, 215, 152, +239, 247, 121, 3, 16, 221, 56, 45, 35, 243, 146, 128, 44, 114, 215, 132, +101, 220, 233, 180, 2, 29, 87, 203, 185, 144, 16, 37, 113, 60, 244, 214, +140, 191, 24, 192, 37, 255, 161, 147, 216, 30, 40, 155, 88, 60, 186, 135, +11, 23, 228, 43, 157, 203, 102, 196, 197, 1, 1, 87, 218, 126, 80, 76, +30, 182, 207, 153, 135, 248, 6, 181, 215, 77, 128, 200, 10, 19, 107, 138, +202, 84, 120, 191, 140, 117, 50, 32, 27, 105, 174, 224, 170, 123, 53, 76, +48, 210, 6, 227, 195, 114, 235, 87, 145, 150, 26, 21, 17, 214, 198, 245, +125, 109, 156, 170, 204, 143, 228, 62, 196, 128, 21, 243, 153, 91, 71, 164, +113, 164, 255, 48, 36, 238, 105, 220, 163, 93, 3, 33, 47, 150, 241, 211, +190, 111, 157, 234, 189, 25, 58, 247, 75, 118, 247, 167, 171, 118, 223, 1, +180, 98, 83, 0, 2, 109, 17, 255, 116, 244, 107, 101, 220, 100, 70, 21, +133, 179, 90, 210, 116, 32, 197, 24, 82, 114, 120, 218, 14, 147, 80, 194, +80, 69, 78, 223, 157, 183, 130, 49, 139, 162, 34, 12, 176, 45, 242, 103, +232, 128, 68, 88, 225, 181, 149, 3, 210, 20, 38, 155, 6, 206, 136, 22, +170, 92, 156, 165, 116, 142, 250, 72, 203, 235, 193, 116, 244, 4, 209, 55, +186, 29, 8, 33, 193, 221, 73, 27, 212, 204, 22, 197, 179, 8, 122, 134, +8, 255, 96, 51, 2, 169, 193, 96, 128, 178, 109, 143, 131, 50, 219, 208, +58, 159, 103, 233, 100, 26, 2, 177, 129, 122, 168, 120, 71, 39, 115, 228, +108, 114, 161, 243, 24, 10, 221, 105, 0, 32, 230, 75, 208, 233, 4, 70, +249, 98, 37, 46, 87, 158, 145, 60, 85, 229, 199, 236, 126, 80, 183, 181, +12, 68, 3, 15, 23, 36, 92, 146, 109, 61, 24, 128, 78, 239, 88, 230, +215, 204, 90, 147, 118, 171, 51, 168, 95, 93, 23, 90, 244, 164, 172, 201, +222, 112, 143, 193, 209, 130, 201, 207, 118, 175, 51, 3, 83, 144, 53, 7, +2, 223, 146, 50, 101, 168, 159, 133, 28, 66, 29, 64, 233, 76, 182, 133, +172, 68, 223, 114, 254, 236, 111, 30, 73, 137, 130, 164, 131, 196, 189, 111, +155, 147, 217, 64, 194, 115, 143, 201, 77, 22, 153, 228, 83, 191, 53, 210, +87, 234, 21, 34, 187, 184, 28, 63, 179, 214, 83, 14, 112, 32, 169, 159, +133, 207, 19, 169, 188, 147, 111, 186, 114, 43, 118, 152, 25, 71, 184, 247, +239, 62, 39, 125, 8, 176, 91, 46, 127, 37, 169, 247, 186, 170, 231, 106, +124, 93, 82, 203, 135, 50, 177, 85, 74, 115, 219, 76, 96, 173, 44, 242, +38, 163, 171, 14, 0, 95, 76, 99, 75, 14, 39, 213, 116, 182, 72, 2, +234, 176, 65, 98, 150, 36, 70, 86, 137, 151, 218, 245, 141, 17, 24, 233, +41, 185, 58, 178, 56, 54, 122, 148, 231, 151, 41, 214, 96, 4, 243, 46, +63, 200, 233, 128, 161, 95, 138, 244, 183, 141, 145, 14, 25, 91, 197, 70, +3, 227, 187, 203, 223, 48, 120, 113, 7, 0, 130, 193, 160, 67, 108, 185, +71, 237, 171, 101, 159, 96, 98, 34, 4, 142, 114, 155, 160, 147, 193, 170, +48, 115, 253, 172, 245, 59, 145, 176, 55, 203, 245, 60, 24, 247, 235, 79, +12, 117, 74, 18, 151, 14, 208, 7, 227, 230, 138, 182, 107, 33, 172, 211, +232, 244, 91, 86, 80, 237, 55, 154, 175, 32, 221, 17, 151, 79, 104, 238, +25, 226, 76, 155, 72, 39, 90, 209, 93, 119, 54, 17, 9, 222, 62, 18, +136, 25, 15, 59, 194, 203, 57, 150, 0, 52, 122, 104, 84, 199, 104, 180, +154, 180, 177, 141, 173, 169, 154, 113, 35, 75, 198, 157, 150, 80, 44, 212, +248, 174, 232, 251, 140, 74, 214, 189, 41, 120, 113, 156, 65, 16, 15, 201, +18, 45, 16, 210, 104, 247, 38, 33, 40, 249, 61, 119, 153, 179, 72, 88, +122, 109, 208, 91, 186, 231, 246, 201, 154, 26, 36, 115, 126, 217, 44, 194, +140, 103, 229, 15, 250, 227, 140, 106, 204, 118, 169, 157, 84, 150, 31, 128, +194, 254, 144, 221, 84, 79, 211, 148, 33, 60, 107, 211, 170, 159, 248, 105, +63, 114, 0, 23, 234, 92, 230, 240, 118, 6, 250, 181, 184, 227, 64, 186, +40, 94, 67, 225, 133, 89, 15, 16, 174, 144, 165, 59, 6, 73, 13, 18, +29, 10, 46, 237, 23, 51, 33, 27, 193, 212, 63, 194, 5, 79, 66, 177, +81, 200, 84, 254, 225, 36, 110, 208, 225, 202, 213, 89, 214, 140, 142, 227, +223, 60, 214, 19, 145, 92, 92, 164, 207, 222, 158, 250, 12, 146, 150, 67, +204, 120, 211, 109, 95, 186, 40, 167, 178, 90, 34, 46, 234, 28, 109, 171, +182, 83, 197, 36, 51, 69, 152, 168, 121, 48, 71, 179, 22, 218, 168, 182, +160, 147, 195, 177, 176, 201, 234, 213, 209, 135, 222, 9, 1, 157, 170, 240, +175, 246, 218, 255, 92, 53, 102, 171, 22, 235, 180, 248, 118, 10, 85, 14, +24, 218, 184, 132, 191, 225, 112, 66, 3, 231, 36, 235, 34, 214, 181, 57, +104, 151, 76, 69, 101, 83, 20, 39, 170, 108, 161, 239, 236, 126, 9, 144, +27, 117, 209, 174, 173, 92, 16, 185, 25, 8, 65, 29, 134, 67, 1, 248, +62, 221, 239, 134, 12, 15, 252, 203, 140, 179, 52, 247, 3, 230, 34, 184, +102, 82, 118, 76, 218, 254, 242, 24, 115, 22, 119, 90, 4, 149, 236, 176, +116, 68, 77, 123, 201, 192, 255, 188, 107, 195, 3, 217, 184, 106, 219, 116, +81, 207, 193, 227, 101, 41, 29, 232, 72, 85, 236, 151, 74, 93, 150, 166, +171, 155, 81, 131, 81, 109, 171, 184, 37, 190, 114, 106, 113, 144, 234, 76, +143, 92, 98, 190, 112, 151, 198, 151, 181, 99, 7, 182, 50, 190, 157, 141, +17, 199, 148, 230, 14, 240, 95, 238, 139, 161, 96, 85, 137, 154, 79, 67, +168, 101, 253, 126, 23, 165, 143, 47, 33, 157, 100, 6, 130, 253, 188, 66, +21, 205, 243, 116, 62, 241, 161, 177, 199, 234, 61, 135, 55, 113, 25, 153, +27, 129, 149, 189, 140, 112, 211, 49, 176, 38, 44, 110, 29, 135, 178, 122, +233, 3, 166, 97, 175, 61, 159, 98, 61, 54, 46, 62, 246, 137, 17, 150, +249, 165, 99, 211, 172, 76, 7, 104, 39, 106, 119, 221, 159, 210, 96, 33, +236, 87, 164, 112, 47, 226, 247, 236, 140, 185, 182, 20, 201, 51, 88, 97, +52, 198, 70, 49, 248, 96, 51, 82, 115, 169, 78, 73, 112, 123, 106, 120, +113, 184, 93, 194, 224, 68, 211, 200, 237, 209, 41, 160, 127, 89, 163, 55, +9, 27, 252, 78, 93, 147, 141, 12, 156, 44, 226, 106, 126, 159, 181, 106, +84, 25, 39, 220, 41, 134, 184, 173, 69, 141, 128, 221, 57, 194, 56, 41, +148, 107, 242, 241, 174, 129, 152, 123, 81, 101, 1, 204, 9, 109, 154, 97, +169, 63, 167, 52, 96, 239, 63, 116, 163, 122, 158, 94, 221, 35, 90, 184, +69, 186, 220, 155, 205, 65, 191, 31, 209, 62, 120, 156, 77, 154, 212, 58, +165, 208, 254, 65, 204, 148, 200, 121, 78, 129, 79, 121, 39, 34, 3, 169, +118, 120, 52, 35, 119, 142, 29, 15, 144, 156, 90, 134, 101, 105, 11, 112, +32, 74, 0, 219, 159, 132, 100, 7, 106, 88, 142, 42, 159, 159, 133, 11, +175, 92, 88, 144, 12, 55, 185, 47, 142, 31, 43, 39, 16, 83, 122, 54, +7, 150, 158, 215, 14, 143, 136, 147, 141, 231, 157, 67, 152, 119, 164, 114, +159, 71, 210, 144, 98, 127, 44, 132, 218, 170, 183, 6, 185, 210, 94, 95, +99, 240, 116, 30, 126, 76, 115, 212, 246, 102, 92, 96, 159, 252, 177, 173, +238, 87, 145, 120, 239, 83, 103, 148, 111, 193, 200, 157, 199, 84, 245, 167, +68, 43, 9, 69, 55, 83, 164, 109, 90, 46, 101, 215, 36, 23, 74, 170, +73, 31, 151, 63, 13, 233, 151, 107, 248, 28, 92, 35, 70, 5, 235, 85, +219, 20, 213, 153, 157, 249, 176, 37, 255, 191, 49, 221, 195, 243, 205, 150, +238, 234, 168, 137, 153, 201, 222, 205, 199, 162, 119, 146, 41, 89, 105, 114, +144, 27, 194, 167, 15, 17, 102, 155, 81, 20, 64, 25, 235, 217, 63, 154, +242, 225, 13, 33, 182, 38, 116, 47, 107, 50, 207, 110, 29, 136, 55, 33, +139, 136, 214, 63, 92, 125, 90, 118, 202, 7, 13, 45, 43, 162, 106, 53, +143, 13, 190, 171, 226, 196, 144, 17, 49, 136, 120, 246, 99, 28, 219, 184, +171, 145, 232, 242, 225, 86, 216, 29, 251, 249, 41, 244, 144, 111, 2, 13, +67, 69, 97, 59, 202, 92, 254, 71, 189, 6, 119, 180, 186, 203, 34, 18, +85, 115, 103, 178, 15, 139, 42, 154, 39, 24, 0, 19, 22, 240, 255, 252, +93, 217, 151, 118, 89, 76, 228, 117, 200, 137, 13, 190, 247, 255, 24, 253, +162, 24, 184, 20, 70, 173, 242, 65, 255, 14, 85, 235, 99, 103, 131, 181, +84, 80, 63, 156, 184, 204, 191, 61, 156, 252, 59, 37, 109, 229, 102, 139, +94, 178, 178, 164, 231, 49, 155, 35, 56, 196, 15, 169, 144, 251, 215, 89, +129, 230, 72, 219, 139, 197, 78, 109, 102, 25, 48, 44, 123, 211, 216, 106, +185, 237, 124, 133, 39, 37, 162, 20, 211, 134, 155, 168, 11, 222, 152, 143, +211, 112, 133, 136, 21, 169, 89, 187, 92, 61, 144, 126, 142, 165, 91, 64, +45, 41, 56, 164, 108, 49, 241, 137, 99, 44, 191, 100, 11, 225, 166, 244, +183, 14, 69, 141, 184, 193, 220, 72, 211, 67, 223, 16, 43, 227, 34, 87, +91, 32, 229, 84, 162, 113, 251, 125, 218, 118, 31, 254, 16, 33, 170, 201, +209, 49, 30, 113, 104, 193, 212, 82, 64, 80, 214, 32, 149, 217, 244, 237, +193, 223, 104, 77, 128, 228, 140, 55, 252, 204, 229, 187, 36, 99, 153, 241, +138, 135, 171, 169, 62, 250, 184, 63, 167, 139, 183, 57, 170, 36, 217, 201, +129, 169, 222, 78, 153, 65, 153, 195, 211, 229, 159, 191, 0, 145, 12, 209, +25, 247, 122, 19, 108, 173, 163, 187, 235, 254, 87, 80, 25, 110, 179, 158, +48, 232, 20, 138, 81, 198, 78, 18, 44, 75, 181, 18, 238, 96, 61, 247, +229, 254, 2, 55, 169, 32, 180, 136, 177, 161, 213, 132, 128, 108, 93, 159, +201, 212, 238, 223, 233, 186, 243, 4, 248, 5, 33, 214, 193, 214, 95, 51, +141, 60, 72, 63, 142, 184, 37, 122, 118, 136, 97, 93, 142, 245, 8, 147, +224, 126, 67, 93, 170, 105, 121, 231, 171, 85, 105, 191, 126, 88, 57, 42, +253, 179, 85, 251, 193, 163, 112, 71, 28, 137, 104, 199, 121, 13, 122, 58, +231, 160, 176, 50, 200, 80, 65, 99, 25, 67, 129, 91, 97, 178, 131, 195, +111, 148, 134, 71, 57, 145, 113, 209, 177, 51, 154, 29, 28, 180, 74, 13, +69, 147, 96, 210, 108, 176, 89, 248, 238, 64, 140, 85, 196, 169, 20, 251, +238, 194, 41, 56, 39, 59, 226, 189, 130, 178, 90, 176, 226, 46, 108, 156, +204, 174, 85, 118, 165, 137, 184, 160, 133, 89, 170, 184, 37, 48, 65, 241, +224, 117, 164, 248, 213, 112, 143, 128, 23, 130, 133, 216, 66, 190, 63, 238, +179, 84, 71, 27, 50, 83, 199, 91, 126, 164, 192, 76, 107, 100, 229, 6, +25, 164, 89, 235, 117, 247, 61, 109, 205, 76, 128, 230, 41, 243, 85, 58, +189, 128, 216, 21, 53, 68, 80, 1, 25, 171, 203, 71, 176, 46, 6, 84, +35, 150, 95, 144, 144, 253, 210, 78, 10, 31, 218, 179, 248, 95, 81, 244, +79, 215, 63, 196, 100, 165, 120, 54, 14, 180, 125, 152, 106, 173, 125, 14, +108, 211, 161, 131, 229, 114, 56, 252, 16, 221, 16, 242, 74, 87, 168, 121, +127, 247, 212, 200, 71, 204, 116, 246, 255, 154, 24, 137, 127, 45, 177, 212, +17, 212, 102, 236, 29, 88, 177, 166, 135, 107, 210, 230, 219, 124, 71, 98, +50, 230, 107, 222, 79, 222, 190, 37, 241, 242, 167, 27, 117, 253, 201, 76, +251, 186, 18, 135, 96, 191, 207, 15, 107, 67, 146, 251, 105, 102, 25, 200, +71, 209, 165, 125, 192, 18, 228, 162, 238, 214, 221, 138, 49, 40, 100, 122, +249, 20, 121, 57, 199, 11, 0, 243, 76, 57, 23, 211, 110, 212, 250, 218, +95, 154, 145, 179, 173, 45, 233, 155, 246, 67, 35, 203, 93, 5, 2, 91, +121, 116, 93, 64, 69, 31, 182, 179, 74, 59, 198, 41, 19, 102, 51, 76, +126, 224, 153, 65, 254, 186, 90, 16, 91, 220, 154, 130, 20, 187, 103, 141, +248, 188, 245, 250, 139, 191, 48, 138, 40, 199, 201, 155, 147, 83, 62, 254, +80, 3, 107, 104, 36, 103, 186, 94, 186, 225, 107, 167, 118, 230, 199, 85, +241, 219, 139, 20, 28, 233, 5, 131, 144, 101, 21, 228, 236, 249, 115, 82, +62, 147, 175, 251, 174, 128, 176, 255, 248, 142, 239, 113, 165, 254, 238, 22, +99, 162, 202, 108, 79, 235, 246, 32, 220, 11, 51, 239, 109, 4, 204, 179, +212, 86, 38, 5, 232, 170, 76, 151, 131, 165, 206, 122, 105, 124, 107, 28, +137, 196, 99, 194, 6, 122, 29, 75, 178, 26, 232, 70, 33, 231, 24, 73, +33, 187, 181, 240, 75, 22, 114, 163, 98, 114, 6, 93, 2, 32, 16, 79, +93, 119, 219, 153, 15, 182, 129, 123, 242, 162, 182, 152, 200, 24, 14, 95, +48, 35, 60, 237, 71, 183, 152, 92, 134, 31, 82, 174, 53, 155, 170, 96, +221, 93, 137, 90, 31, 128, 20, 131, 15, 86, 154, 93, 190, 178, 124, 214, +130, 43, 64, 134, 249, 0, 48, 215, 92, 236, 202, 24, 47, 60, 232, 190, +124, 3, 71, 145, 183, 215, 240, 1, 100, 235, 203, 185, 205, 122, 222, 41, +199, 127, 4, 74, 57, 92, 80, 227, 109, 81, 197, 32, 38, 35, 53, 94, +245, 9, 141, 245, 223, 223, 95, 42, 175, 157, 209, 215, 90, 64, 0, 248, +244, 246, 25, 60, 7, 169, 138, 246, 184, 96, 155, 68, 94, 155, 22, 15, +241, 169, 20, 49, 215, 209, 111, 239, 200, 144, 5, 33, 153, 142, 239, 148, +110, 117, 109, 248, 67, 98, 109, 157, 187, 172, 160, 169, 85, 54, 0, 153, +129, 217, 150, 67, 124, 151, 101, 106, 131, 207, 134, 5, 255, 139, 146, 192, +0, 115, 91, 6, 129, 58, 60, 103, 106, 223, 52, 211, 102, 252, 153, 7, +36, 34, 32, 136, 111, 24, 231, 218, 101, 114, 49, 128, 185, 58, 235, 26, +108, 148, 216, 2, 109, 127, 76, 170, 230, 167, 77, 230, 144, 120, 234, 183, +78, 246, 204, 228, 134, 249, 88, 100, 196, 198, 168, 113, 216, 42, 35, 193, +234, 34, 195, 152, 125, 79, 79, 24, 161, 173, 16, 174, 46, 67, 170, 131, +156, 232, 86, 89, 173, 30, 39, 209, 177, 50, 137, 84, 109, 203, 25, 179, +105, 42, 151, 141, 56, 47, 146, 109, 175, 225, 243, 210, 206, 81, 196, 237, +159, 201, 165, 55, 181, 153, 69, 153, 117, 118, 217, 130, 65, 139, 68, 118, +59, 201, 202, 82, 129, 162, 23, 102, 61, 155, 109, 206, 125, 41, 111, 139, +83, 174, 133, 242, 44, 2, 235, 186, 58, 247, 99, 136, 173, 106, 250, 248, +34, 152, 133, 3, 208, 170, 129, 23, 60, 73, 212, 46, 191, 190, 88, 207, +221, 164, 178, 45, 215, 131, 204, 225, 117, 173, 138, 180, 3, 0, 15, 14, +221, 73, 184, 22, 167, 83, 216, 31, 137, 254, 108, 90, 21, 235, 5, 68, +143, 236, 218, 177, 170, 239, 180, 8, 168, 140, 226, 189, 16, 145, 62, 163, +225, 93, 205, 37, 120, 98, 129, 249, 129, 253, 213, 174, 200, 19, 143, 140, +9, 177, 50, 105, 134, 69, 113, 244, 133, 6, 120, 25, 155, 132, 254, 226, +207, 43, 56, 168, 69, 169, 95, 83, 166, 34, 69, 213, 187, 98, 243, 119, +143, 121, 249, 119, 129, 165, 103, 146, 140, 13, 136, 238, 160, 170, 253, 171, +212, 98, 239, 172, 195, 249, 68, 207, 60, 24, 130, 128, 167, 163, 178, 130, +220, 6, 139, 198, 201, 110, 26, 91, 155, 144, 143, 212, 85, 106, 50, 198, +74, 210, 168, 146, 232, 172, 30, 152, 206, 69, 44, 47, 88, 165, 180, 221, +45, 252, 248, 47, 26, 33, 142, 189, 77, 77, 20, 185, 247, 249, 88, 67, +117, 249, 151, 118, 57, 18, 137, 128, 189, 134, 148, 85, 7, 47, 60, 142, +110, 105, 252, 45, 165, 187, 134, 50, 255, 180, 56, 130, 137, 76, 189, 218, +152, 46, 148, 44, 1, 239, 47, 72, 192, 70, 14, 74, 90, 136, 245, 35, +40, 171, 29, 17, 97, 77, 184, 32, 38, 38, 252, 12, 0, 226, 11, 222, +132, 183, 121, 209, 83, 3, 164, 243, 32, 111, 109, 145, 203, 57, 241, 192, +5, 107, 164, 128, 3, 218, 69, 178, 200, 222, 45, 65, 105, 110, 115, 184, +75, 243, 221, 49, 226, 170, 189, 49, 246, 129, 33, 150, 38, 203, 3, 214, +111, 206, 150, 168, 137, 162, 228, 3, 96, 105, 184, 27, 106, 81, 32, 147, +230, 60, 219, 199, 176, 74, 100, 18, 80, 140, 70, 128, 115, 119, 111, 82, +172, 8, 6, 168, 188, 56, 197, 112, 159, 169, 216, 200, 90, 251, 104, 112, +19, 179, 71, 59, 181, 138, 224, 158, 252, 148, 50, 65, 55, 33, 120, 142, +137, 108, 20, 142, 236, 144, 89, 197, 190, 188, 19, 102, 227, 240, 38, 170, +129, 123, 69, 123, 193, 13, 37, 133, 44, 167, 210, 141, 172, 154, 208, 42, +156, 35, 126, 176, 1, 98, 193, 135, 102, 235, 229, 22, 34, 187, 18, 111, +64, 83, 107, 17, 157, 241, 117, 59, 8, 211, 60, 200, 87, 184, 89, 132, +249, 60, 18, 81, 237, 225, 53, 221, 131, 255, 218, 64, 239, 194, 7, 181, +40, 3, 46, 108, 220, 52, 108, 62, 254, 140, 37, 116, 15, 40, 169, 90, +47, 136, 102, 253, 7, 223, 132, 207, 60, 234, 21, 134, 155, 63, 112, 37, +72, 222, 55, 59, 20, 34, 167, 71, 222, 221, 164, 161, 92, 131, 244, 235, +243, 237, 184, 129, 77, 165, 160, 139, 171, 234, 234, 69, 113, 128, 93, 215, +9, 84, 41, 213, 35, 164, 24, 120, 204, 180, 178, 153, 47, 245, 57, 22, +175, 206, 12, 175, 203, 129, 39, 93, 127, 18, 12, 55, 43, 36, 252, 1, +104, 116, 59, 135, 193, 145, 183, 41, 62, 78, 165, 189, 232, 128, 224, 11, +142, 255, 2, 223, 95, 80, 219, 87, 249, 121, 31, 181, 50, 241, 31, 127, +174, 99, 238, 176, 116, 65, 220, 160, 189, 25, 204, 103, 20, 231, 42, 195, +34, 180, 105, 121, 110, 99, 149, 139, 1, 221, 124, 67, 172, 47, 189, 207, +14, 229, 79, 158, 187, 203, 126, 236, 14, 53, 121, 243, 132, 78, 39, 72, +7, 165, 22, 78, 41, 101, 128, 20, 168, 136, 198, 109, 226, 32, 135, 168, +104, 155, 115, 57, 50, 66, 17, 72, 245, 124, 70, 188, 194, 144, 89, 140, +85, 8, 10, 129, 227, 167, 15, 15, 201, 54, 239, 194, 154, 204, 129, 27, +190, 245, 102, 166, 178, 201, 7, 197, 78, 149, 69, 245, 4, 143, 4, 84, +13, 217, 59, 242, 223, 226, 199, 231, 118, 188, 55, 115, 56, 15, 217, 3, +0, 181, 190, 3, 162, 127, 120, 206, 181, 8, 225, 155, 148, 202, 117, 70, +96, 81, 246, 165, 253, 115, 148, 217, 138, 44, 203, 36, 44, 221, 59, 122, +68, 170, 248, 235, 88, 242, 209, 42, 71, 31, 117, 5, 149, 221, 216, 154, +116, 41, 231, 138, 123, 85, 128, 71, 109, 111, 17, 72, 163, 225, 109, 7, +40, 133, 74, 76, 155, 107, 34, 193, 114, 240, 61, 31, 24, 46, 215, 197, +96, 114, 213, 18, 214, 57, 119, 50, 18, 5, 175, 254, 21, 246, 64, 145, +171, 217, 243, 159, 250, 231, 228, 64, 164, 97, 61, 150, 9, 230, 11, 138, +132, 95, 209, 138, 97, 87, 139, 190, 171, 135, 158, 170, 99, 198, 18, 127, +44, 102, 1, 236, 90, 73, 214, 135, 116, 107, 247, 175, 46, 238, 51, 79, +163, 249, 5, 137, 145, 92, 138, 23, 207, 158, 50, 109, 131, 84, 61, 184, +252, 232, 20, 67, 107, 189, 61, 198, 27, 6, 189, 119, 34, 236, 94, 105, +65, 140, 181, 248, 32, 12, 119, 126, 0, 14, 226, 78, 7, 121, 111, 47, +30, 49, 206, 187, 125, 247, 235, 6, 229, 34, 161, 174, 72, 154, 37, 94, +8, 88, 125, 54, 182, 100, 46, 84, 144, 213, 251, 62, 71, 177, 120, 255, +194, 14, 105, 206, 151, 179, 144, 140, 191, 167, 248, 44, 70, 227, 154, 142, +32, 174, 159, 199, 154, 78, 165, 68, 96, 73, 8, 13, 246, 162, 155, 48, +7, 121, 90, 173, 40, 226, 166, 189, 35, 87, 225, 45, 209, 220, 70, 22, +156, 216, 39, 126, 84, 142, 207, 100, 219, 155, 166, 43, 253, 161, 255, 143, +148, 93, 17, 7, 109, 176, 112, 14, 87, 147, 186, 123, 32, 159, 252, 83, +111, 182, 250, 28, 239, 207, 92, 64, 17, 26, 216, 0, 41, 24, 142, 246, +19, 172, 32, 137, 234, 69, 147, 251, 234, 207, 95, 6, 113, 209, 107, 69, +122, 198, 148, 13, 18, 28, 238, 191, 168, 205, 144, 234, 181, 247, 192, 151, +176, 95, 157, 60, 224, 26, 120, 24, 16, 66, 102, 51, 185, 111, 39, 6, +205, 187, 16, 1, 141, 45, 234, 48, 144, 26, 92, 155, 213, 218, 88, 151, +0, 111, 109, 28, 44, 172, 24, 215, 205, 186, 42, 119, 124, 48, 41, 199, +85, 81, 244, 24, 170, 71, 156, 141, 249, 234, 193, 174, 77, 184, 47, 107, +112, 235, 124, 254, 7, 163, 156, 71, 59, 122, 224, 196, 215, 71, 81, 145, +207, 178, 97, 118, 45, 154, 109, 190, 143, 63, 83, 135, 110, 166, 174, 47, +195, 33, 0, 234, 212, 223, 11, 248, 210, 158, 17, 139, 239, 15, 57, 133, +185, 152, 71, 56, 2, 62, 10, 103, 243, 247, 182, 81, 10, 38, 49, 7, +131, 10, 202, 184, 79, 149, 84, 213, 122, 133, 208, 24, 141, 132, 12, 244, +251, 160, 41, 56, 219, 123, 120, 23, 240, 40, 29, 32, 213, 222, 36, 49, +173, 176, 11, 209, 145, 104, 154, 154, 182, 183, 5, 60, 131, 70, 224, 47, +125, 110, 47, 246, 180, 222, 125, 243, 251, 55, 25, 147, 77, 164, 116, 218, +152, 191, 244, 47, 199, 68, 208, 209, 49, 90, 197, 176, 2, 191, 127, 198, +48, 16, 168, 243, 41, 195, 50, 175, 33, 172, 92, 185, 254, 96, 221, 65, +24, 36, 187, 10, 104, 242, 101, 185, 176, 206, 215, 166, 82, 189, 245, 208, +62, 38, 207, 97, 192, 45, 46, 98, 66, 201, 69, 95, 206, 211, 204, 225, +137, 204, 100, 110, 58, 84, 29, 112, 144, 51, 15, 1, 170, 79, 41, 239, +77, 1, 208, 209, 80, 208, 214, 27, 168, 153, 229, 188, 40, 250, 13, 240, +23, 96, 54, 235, 23, 202, 165, 215, 109, 143, 163, 161, 136, 101, 109, 98, +102, 54, 231, 141, 157, 22, 5, 201, 89, 10, 241, 113, 225, 185, 234, 128, +212, 206, 186, 59, 114, 79, 69, 43, 171, 208, 219, 63, 219, 112, 54, 77, +156, 116, 150, 140, 113, 186, 79, 131, 109, 231, 205, 170, 253, 131, 97, 141, +107, 242, 5, 238, 167, 32, 135, 194, 143, 151, 71, 22, 81, 254, 84, 120, +103, 131, 61, 86, 126, 66, 51, 201, 0, 170, 70, 18, 38, 152, 225, 3, +117, 98, 100, 141, 114, 39, 161, 189, 146, 148, 43, 55, 189, 18, 157, 181, +185, 7, 117, 77, 56, 229, 91, 80, 233, 79, 165, 140, 24, 98, 197, 130, +50, 70, 44, 111, 230, 241, 92, 204, 246, 78, 19, 18, 231, 219, 201, 207, +84, 205, 137, 138, 113, 45, 4, 72, 145, 204, 3, 86, 230, 200, 208, 166, +218, 183, 217, 21, 89, 23, 40, 107, 161, 68, 230, 96, 236, 91, 106, 15, +38, 255, 132, 13, 248, 98, 106, 177, 223, 54, 247, 114, 82, 147, 161, 42, +43, 10, 192, 12, 94, 200, 248, 200, 85, 231, 247, 246, 201, 221, 180, 217, +113, 12, 222, 88, 53, 21, 6, 26, 214, 220, 152, 253, 92, 56, 158, 17, +233, 218, 95, 234, 91, 97, 71, 148, 11, 3, 226, 199, 250, 201, 132, 92, +244, 18, 210, 248, 212, 89, 182, 96, 73, 121, 250, 222, 59, 121, 118, 19, +28, 221, 126, 48, 119, 190, 217, 72, 194, 91, 4, 213, 17, 137, 34, 246, +7, 6, 143, 245, 97, 192, 252, 55, 145, 82, 10, 77, 111, 31, 80, 74, +156, 14, 68, 111, 82, 76, 168, 203, 9, 220, 54, 233, 175, 186, 169, 104, +243, 2, 143, 109, 213, 247, 163, 196, 181, 37, 16, 50, 218, 28, 129, 118, +162, 187, 98, 202, 226, 244, 39, 27, 90, 255, 235, 125, 98, 206, 155, 179, +211, 58, 135, 80, 97, 220, 32, 136, 18, 226, 60, 251, 51, 170, 165, 47, +4, 63, 160, 41, 105, 85, 23, 122, 32, 145, 69, 85, 159, 147, 73, 209, +201, 169, 25, 225, 164, 6, 151, 92, 9, 223, 55, 137, 202, 67, 221, 100, +161, 248, 10, 209, 195, 27, 146, 4, 219, 227, 190, 203, 134, 228, 10, 160, +34, 221, 250, 110, 203, 33, 186, 60, 136, 185, 235, 72, 45, 105, 176, 161, +36, 169, 185, 174, 168, 146, 23, 57, 128, 198, 162, 194, 197, 62, 254, 102, +200, 154, 140, 98, 40, 208, 128, 95, 151, 77, 40, 190, 88, 75, 156, 47, +207, 220, 11, 125, 159, 24, 89, 142, 60, 2, 156, 25, 44, 203, 39, 222, +166, 122, 93, 215, 91, 87, 57, 199, 69, 211, 244, 140, 241, 106, 43, 193, +10, 150, 65, 226, 163, 202, 165, 155, 93, 219, 207, 28, 174, 157, 201, 199, +169, 174, 28, 36, 117, 106, 155, 87, 209, 223, 171, 104, 72, 76, 180, 101, +196, 248, 163, 252, 150, 33, 224, 118, 128, 130, 145, 211, 28, 80, 17, 174, +33, 156, 108, 139, 120, 225, 111, 9, 46, 228, 79, 112, 121, 35, 181, 170, +12, 131, 173, 169, 4, 40, 8, 101, 34, 154, 227, 200, 57, 50, 118, 220, +128, 21, 208, 62, 131, 68, 193, 52, 163, 35, 96, 45, 225, 26, 219, 50, +194, 44, 22, 181, 83, 21, 82, 35, 100, 10, 241, 218, 12, 104, 240, 254, +190, 54, 48, 213, 87, 65, 183, 27, 232, 23, 246, 169, 179, 164, 55, 66, +70, 219, 7, 214, 128, 58, 244, 120, 52, 255, 213, 170, 81, 235, 16, 46, +18, 229, 186, 139, 118, 127, 12, 74, 173, 106, 171, 161, 3, 108, 3, 113, +211, 2, 88, 90, 227, 202, 196, 195, 69, 88, 168, 40, 87, 247, 210, 5, +26, 117, 159, 42, 3, 73, 148, 247, 236, 110, 16, 236, 169, 179, 22, 198, +32, 79, 138, 96, 70, 6, 161, 27, 71, 155, 241, 112, 60, 188, 51, 134, +154, 0, 207, 203, 43, 102, 88, 180, 139, 239, 72, 26, 46, 174, 76, 65, +14, 135, 202, 211, 124, 201, 4, 227, 40, 119, 46, 102, 23, 71, 143, 167, +164, 77, 192, 135, 16, 27, 148, 127, 123, 191, 209, 160, 49, 93, 138, 94, +161, 181, 205, 80, 80, 33, 73, 203, 45, 36, 194, 173, 86, 7, 234, 200, +138, 20, 62, 20, 110, 84, 16, 238, 207, 123, 175, 233, 40, 135, 51, 85, +136, 64, 204, 198, 207, 151, 162, 133, 207, 58, 246, 187, 201, 91, 185, 76, +46, 209, 173, 153, 71, 158, 241, 109, 66, 129, 109, 19, 70, 30, 186, 76, +249, 125, 197, 243, 223, 219, 16, 93, 134, 232, 59, 188, 42, 4, 155, 129, +236, 145, 166, 244, 222, 103, 3, 166, 145, 150, 57, 129, 19, 253, 157, 242, +66, 97, 165, 107, 87, 180, 245, 247, 47, 19, 34, 135, 219, 94, 76, 118, +156, 247, 148, 44, 142, 164, 20, 184, 96, 179, 138, 54, 39, 212, 235, 96, +215, 39, 45, 51, 215, 39, 47, 119, 120, 22, 197, 166, 158, 26, 115, 21, +16, 110, 23, 166, 132, 209, 232, 103, 248, 200, 133, 238, 224, 13, 50, 110, +33, 211, 154, 5, 239, 137, 226, 87, 131, 152, 225, 59, 208, 49, 204, 237, +81, 149, 34, 167, 46, 181, 121, 110, 31, 108, 226, 10, 80, 6, 47, 84, +180, 176, 86, 70, 171, 221, 85, 143, 172, 227, 120, 229, 75, 140, 133, 195, +176, 173, 92, 82, 179, 97, 115, 116, 236, 224, 70, 44, 166, 206, 23, 99, +0, 213, 47, 203, 153, 221, 178, 246, 196, 30, 74, 208, 100, 245, 85, 136, +132, 6, 213, 73, 199, 248, 61, 206, 141, 74, 61, 100, 181, 157, 51, 131, +95, 116, 217, 218, 162, 32, 136, 10, 115, 221, 65, 16, 223, 19, 163, 172, +73, 140, 97, 69, 67, 199, 116, 137, 251, 188, 106, 68, 78, 25, 225, 202, +40, 117, 161, 114, 10, 208, 29, 48, 217, 82, 234, 75, 134, 156, 9, 253, +241, 144, 22, 186, 139, 101, 111, 37, 72, 95, 33, 177, 20, 246, 210, 132, +1, 255, 84, 153, 171, 140, 222, 57, 86, 34, 181, 228, 39, 13, 158, 35, +57, 113, 16, 61, 97, 111, 39, 48, 192, 88, 102, 201, 83, 73, 113, 227, +116, 20, 73, 169, 135, 107, 8, 96, 250, 23, 25, 242, 51, 166, 29, 160, +169, 43, 239, 90, 254, 198, 209, 54, 249, 31, 217, 23, 118, 57, 192, 20, +69, 77, 50, 24, 34, 190, 166, 28, 181, 49, 126, 222, 133, 171, 0, 85, +212, 226, 94, 35, 11, 186, 253, 42, 162, 231, 111, 41, 53, 21, 0, 196, +211, 17, 73, 180, 211, 43, 10, 11, 169, 42, 217, 100, 220, 106, 211, 8, +68, 44, 65, 124, 214, 103, 198, 30, 191, 25, 71, 54, 175, 38, 179, 199, +70, 138, 97, 108, 255, 138, 125, 40, 227, 161, 76, 237, 137, 181, 151, 130, +199, 147, 50, 202, 63, 204, 201, 210, 176, 96, 34, 56, 67, 123, 183, 1, +76, 154, 235, 179, 216, 12, 117, 188, 46, 156, 252, 113, 160, 233, 197, 85, +136, 30, 248, 140, 12, 94, 134, 65, 86, 195, 234, 246, 91, 169, 22, 246, +179, 50, 9, 114, 221, 181, 117, 75, 248, 250, 178, 13, 27, 17, 253, 242, +46, 217, 38, 173, 41, 199, 29, 74, 40, 35, 68, 210, 208, 58, 180, 133, +244, 138, 113, 207, 34, 225, 122, 92, 111, 221, 183, 24, 150, 49, 7, 21, +66, 56, 58, 165, 114, 83, 27, 31, 48, 14, 6, 160, 66, 45, 64, 87, +184, 7, 29, 123, 248, 231, 76, 1, 133, 82, 122, 54, 198, 43, 143, 135, +5, 173, 90, 234, 193, 11, 13, 158, 200, 210, 235, 34, 16, 147, 34, 12, +162, 125, 17, 42, 120, 178, 254, 70, 247, 98, 239, 253, 121, 6, 228, 136, +142, 224, 84, 181, 244, 122, 130, 165, 247, 26, 40, 7, 194, 75, 69, 109, +154, 8, 69, 73, 19, 187, 93, 141, 133, 163, 142, 102, 230, 167, 64, 60, +82, 140, 73, 205, 221, 44, 139, 106, 67, 75, 232, 192, 201, 199, 198, 3, +138, 228, 140, 161, 212, 57, 55, 51, 94, 38, 89, 225, 92, 37, 239, 56, +35, 50, 203, 123, 145, 140, 62, 37, 78, 17, 223, 236, 211, 3, 152, 48, +200, 73, 18, 202, 203, 100, 185, 171, 51, 254, 143, 39, 141, 125, 28, 236, +179, 45, 234, 126, 20, 65, 174, 97, 241, 242, 45, 63, 49, 10, 137, 234, +137, 186, 225, 132, 36, 54, 195, 173, 21, 185, 163, 118, 125, 244, 66, 172, +145, 124, 242, 5, 21, 230, 51, 165, 24, 71, 157, 116, 172, 183, 147, 176, +148, 136, 88, 84, 10, 83, 22, 173, 67, 228, 17, 37, 136, 248, 234, 77, +233, 145, 111, 253, 31, 77, 212, 111, 222, 215, 46, 77, 29, 10, 192, 121, +17, 173, 70, 252, 53, 136, 16, 177, 162, 28, 113, 124, 181, 146, 235, 248, +80, 80, 242, 94, 21, 192, 162, 236, 21, 163, 244, 217, 15, 167, 84, 195, +43, 216, 220, 177, 69, 99, 35, 58, 217, 252, 195, 102, 13, 196, 105, 6, +217, 48, 209, 199, 143, 139, 51, 227, 180, 80, 148, 206, 183, 153, 31, 245, +60, 182, 205, 199, 153, 244, 232, 251, 209, 169, 42, 163, 67, 217, 181, 27, +57, 115, 107, 78, 192, 254, 236, 183, 230, 114, 42, 155, 19, 142, 83, 207, +172, 53, 20, 250, 2, 150, 37, 214, 186, 35, 8, 179, 170, 90, 214, 160, +218, 251, 130, 197, 24, 191, 23, 236, 227, 157, 3, 96, 32, 168, 173, 248, +215, 41, 14, 14, 80, 134, 34, 65, 108, 106, 46, 195, 150, 150, 123, 103, +56, 121, 202, 213, 107, 245, 191, 129, 192, 40, 90, 5, 30, 100, 119, 156, +208, 22, 206, 119, 48, 69, 54, 22, 230, 217, 97, 167, 114, 105, 155, 188, +78, 3, 170, 226, 209, 167, 147, 154, 90, 126, 193, 12, 253, 228, 165, 3, +31, 102, 106, 2, 235, 18, 39, 152, 173, 182, 194, 126, 183, 114, 202, 209, +32, 68, 98, 99, 185, 55, 21, 116, 89, 224, 79, 160, 166, 171, 39, 179, +173, 146, 79, 167, 36, 75, 195, 22, 248, 177, 97, 122, 14, 86, 234, 99, +20, 138, 252, 2, 31, 47, 191, 187, 136, 224, 233, 172, 28, 59, 77, 231, +124, 86, 67, 25, 9, 222, 119, 157, 29, 30, 166, 111, 107, 138, 153, 254, +26, 105, 243, 91, 208, 2, 249, 188, 40, 34, 138, 91, 32, 171, 246, 64, +57, 7, 145, 243, 155, 93, 228, 228, 158, 94, 185, 149, 63, 236, 176, 186, +35, 145, 171, 209, 213, 214, 1, 158, 143, 185, 33, 248, 84, 1, 91, 201, +0, 174, 112, 52, 165, 202, 24, 20, 234, 125, 255, 142, 35, 138, 21, 87, +157, 40, 87, 150, 222, 226, 114, 119, 127, 190, 123, 25, 10, 175, 20, 66, +35, 8, 253, 203, 17, 79, 239, 79, 49, 92, 111, 62, 64, 94, 150, 95, +50, 246, 19, 78, 89, 247, 4, 25, 146, 142, 201, 101, 137, 36, 179, 93, +80, 158, 144, 34, 248, 173, 20, 245, 180, 30, 132, 241, 10, 120, 205, 10, +200, 119, 195, 193, 48, 205, 143, 48, 53, 155, 242, 50, 99, 181, 154, 182, +44, 243, 5, 18, 121, 140, 60, 56, 141, 213, 156, 158, 122, 28, 125, 42, +152, 83, 47, 132, 16, 54, 246, 164, 123, 68, 237, 151, 20, 161, 128, 24, +251, 153, 36, 9, 100, 227, 235, 15, 204, 33, 69, 90, 175, 71, 200, 215, +24, 28, 136, 123, 224, 112, 205, 183, 171, 130, 119, 157, 87, 155, 55, 89, +50, 121, 143, 12, 118, 51, 131, 109, 111, 39, 194, 206, 119, 150, 89, 9, +199, 86, 88, 207, 32, 241, 141, 106, 11, 19, 241, 140, 74, 19, 241, 116, +186, 224, 216, 139, 83, 35, 186, 189, 122, 64, 168, 121, 63, 182, 101, 232, +152, 96, 4, 162, 191, 152, 73, 12, 240, 55, 51, 112, 218, 216, 129, 30, +39, 49, 209, 132, 24, 140, 22, 17, 216, 218, 120, 221, 248, 40, 169, 24, +78, 198, 219, 99, 86, 225, 233, 255, 239, 118, 13, 44, 190, 145, 152, 207, +101, 102, 168, 204, 212, 179, 109, 54, 101, 48, 155, 91, 170, 10, 87, 131, +49, 95, 165, 199, 62, 162, 187, 239, 186, 7, 225, 128, 178, 201, 39, 223, +213, 194, 202, 65, 216, 188, 204, 161, 53, 103, 200, 108, 56, 119, 205, 152, +227, 105, 8, 55, 99, 100, 226, 227, 206, 104, 172, 249, 126, 39, 185, 1, +243, 134, 226, 104, 36, 176, 242, 51, 27, 83, 252, 250, 219, 2, 201, 197, +64, 156, 102, 171, 172, 59, 35, 60, 154, 112, 32, 14, 252, 78, 91, 162, +54, 139, 223, 154, 97, 157, 236, 49, 33, 253, 67, 60, 100, 127, 204, 83, +235, 7, 217, 215, 136, 85, 76, 172, 161, 180, 54, 61, 43, 187, 207, 125, +50, 157, 246, 96, 159, 203, 17, 61, 26, 184, 206, 206, 232, 73, 32, 222, +252, 64, 156, 78, 140, 41, 121, 73, 222, 133, 72, 98, 45, 161, 172, 42, +230, 164, 248, 139, 255, 140, 84, 5, 244, 131, 158, 185, 177, 5, 27, 201, +68, 69, 37, 32, 11, 79, 15, 218, 201, 41, 61, 220, 82, 102, 143, 137, +93, 161, 93, 184, 133, 140, 9, 118, 220, 217, 184, 157, 227, 184, 1, 219, +35, 183, 183, 154, 195, 123, 59, 124, 166, 251, 151, 248, 83, 199, 158, 163, +206, 4, 131, 32, 69, 137, 93, 52, 213, 84, 219, 225, 85, 146, 26, 21, +122, 138, 108, 189, 93, 29, 36, 19, 127, 185, 251, 186, 134, 1, 139, 130, +148, 24, 147, 113, 153, 18, 156, 113, 220, 136, 99, 207, 16, 224, 118, 5, +125, 247, 223, 187, 255, 176, 45, 225, 100, 65, 230, 94, 247, 106, 236, 139, +48, 170, 135, 188, 110, 72, 245, 77, 229, 119, 121, 221, 117, 80, 161, 11, +83, 111, 104, 7, 16, 215, 200, 76, 70, 30, 235, 109, 255, 108, 51, 22, +39, 118, 166, 185, 10, 201, 25, 135, 139, 123, 47, 231, 94, 237, 44, 205, +224, 101, 159, 219, 52, 75, 219, 117, 127, 94, 37, 98, 166, 26, 218, 182, +135, 79, 97, 128, 47, 80, 11, 129, 232, 199, 73, 238, 20, 96, 73, 8, +13, 246, 150, 113, 16, 93, 29, 63, 99, 184, 127, 48, 184, 15, 201, 41, +8, 73, 20, 254, 186, 190, 85, 57, 106, 219, 50, 222, 245, 19, 1, 224, +126, 204, 176, 212, 46, 202, 253, 246, 139, 139, 157, 165, 224, 100, 16, 48, +50, 146, 146, 189, 215, 105, 250, 219, 7, 105, 27, 195, 58, 185, 223, 24, +132, 199, 121, 183, 28, 15, 242, 170, 196, 120, 116, 16, 197, 209, 226, 57, +221, 6, 20, 154, 98, 50, 100, 209, 68, 35, 57, 77, 168, 139, 101, 179, +73, 182, 158, 237, 54, 140, 39, 181, 108, 154, 139, 112, 185, 112, 88, 51, +125, 93, 26, 202, 77, 157, 48, 88, 66, 74, 64, 55, 153, 78, 123, 156, +171, 59, 43, 11, 142, 249, 137, 25, 136, 219, 244, 210, 117, 44, 156, 136, +80, 224, 236, 213, 190, 71, 252, 135, 37, 95, 7, 5, 28, 172, 241, 27, +217, 140, 19, 42, 138, 107, 71, 12, 75, 179, 112, 29, 129, 191, 9, 141, +179, 255, 1, 162, 7, 118, 105, 47, 49, 105, 44, 20, 86, 185, 2, 125, +146, 241, 159, 105, 176, 221, 115, 213, 14, 66, 202, 95, 250, 213, 43, 248, +176, 4, 46, 39, 84, 19, 186, 80, 242, 53, 182, 156, 3, 43, 8, 79, +88, 156, 127, 11, 247, 179, 199, 208, 251, 37, 217, 22, 207, 191, 128, 53, +160, 16, 159, 197, 19, 214, 240, 29, 193, 212, 73, 191, 244, 27, 189, 229, +99, 251, 254, 50, 42, 191, 199, 15, 149, 141, 81, 60, 25, 135, 120, 231, +40, 84, 127, 59, 150, 127, 45, 154, 135, 124, 109, 252, 186, 204, 98, 148, +162, 133, 10, 234, 232, 152, 88, 216, 54, 242, 206, 78, 160, 12, 78, 10, +228, 2, 238, 50, 9, 230, 116, 204, 206, 160, 9, 199, 12, 12, 224, 13, +153, 81, 51, 253, 140, 197, 148, 47, 192, 14, 187, 255, 216, 110, 141, 198, +35, 212, 244, 67, 77, 48, 87, 46, 46, 113, 205, 220, 81, 105, 109, 9, +248, 194, 100, 71, 187, 160, 9, 221, 178, 176, 119, 196, 36, 136, 12, 68, +34, 113, 221, 250, 250, 4, 251, 20, 137, 70, 241, 172, 178, 185, 214, 23, +55, 196, 31, 160, 76, 214, 230, 139, 192, 144, 120, 188, 225, 215, 132, 33, +105, 178, 83, 69, 92, 192, 112, 123, 221, 34, 7, 73, 145, 233, 56, 12, +67, 106, 152, 77, 143, 77, 217, 102, 6, 199, 53, 14, 162, 12, 134, 91, +59, 169, 181, 18, 47, 11, 206, 69, 65, 66, 27, 160, 98, 149, 22, 24, +53, 196, 119, 231, 84, 211, 246, 231, 218, 99, 120, 197, 151, 30, 153, 192, +120, 253, 70, 234, 253, 239, 34, 74, 6, 233, 149, 155, 214, 12, 127, 57, +92, 225, 201, 233, 116, 48, 226, 94, 159, 212, 78, 222, 99, 116, 29, 187, +3, 59, 167, 68, 108, 162, 146, 125, 6, 178, 230, 60, 158, 60, 85, 94, +113, 93, 2, 75, 195, 234, 66, 200, 148, 128, 50, 56, 58, 205, 79, 226, +11, 189, 189, 88, 32, 67, 83, 84, 188, 31, 180, 79, 252, 9, 177, 199, +53, 163, 66, 54, 110, 245, 174, 113, 225, 204, 180, 149, 6, 141, 18, 250, +150, 168, 229, 99, 107, 110, 108, 63, 70, 43, 146, 216, 64, 42, 3, 227, +146, 223, 233, 6, 140, 108, 238, 21, 245, 70, 14, 152, 92, 109, 138, 104, +200, 195, 248, 125, 230, 8, 4, 138, 125, 228, 221, 225, 98, 146, 230, 91, +225, 247, 207, 29, 112, 185, 202, 157, 218, 18, 193, 45, 54, 47, 215, 162, +29, 92, 95, 13, 88, 40, 129, 1, 150, 106, 203, 117, 76, 176, 157, 169, +61, 45, 201, 67, 35, 238, 149, 21, 174, 50, 162, 150, 120, 22, 144, 195, +187, 214, 239, 178, 231, 165, 200, 167, 170, 107, 98, 242, 205, 72, 113, 166, +163, 6, 197, 57, 210, 106, 231, 192, 17, 112, 77, 83, 171, 216, 127, 73, +143, 182, 224, 111, 104, 137, 123, 119, 52, 153, 42, 205, 161, 145, 174, 167, +38, 117, 130, 82, 31, 228, 102, 234, 30, 199, 194, 207, 73, 109, 64, 231, +55, 221, 65, 225, 203, 28, 113, 2, 120, 201, 22, 125, 211, 76, 82, 58, +75, 181, 33, 121, 189, 138, 70, 122, 155, 252, 133, 51, 35, 241, 193, 121, +148, 48, 44, 155, 123, 240, 9, 169, 145, 15, 79, 213, 180, 160, 30, 198, +225, 209, 186, 124, 186, 53, 240, 246, 13, 188, 52, 211, 221, 181, 212, 140, +143, 187, 178, 11, 181, 202, 78, 50, 55, 119, 228, 113, 120, 231, 184, 165, +122, 121, 94, 181, 222, 248, 225, 204, 245, 174, 205, 63, 219, 192, 246, 82, +101, 109, 115, 160, 153, 82, 131, 38, 219, 229, 58, 114, 205, 138, 141, 137, +237, 89, 94, 245, 84, 177, 166, 0, 38, 16, 173, 56, 248, 67, 55, 114, +252, 89, 251, 146, 93, 24, 104, 113, 181, 37, 164, 37, 158, 96, 137, 191, +214, 21, 51, 215, 58, 123, 111, 161, 116, 157, 112, 211, 188, 210, 52, 105, +219, 91, 213, 191, 133, 171, 47, 102, 174, 51, 170, 180, 10, 30, 181, 17, +43, 76, 13, 242, 136, 41, 45, 155, 24, 45, 79, 146, 218, 6, 107, 47, +142, 32, 141, 94, 165, 12, 149, 84, 170, 122, 202, 67, 130, 126, 39, 129, +244, 187, 19, 227, 22, 108, 234, 94, 98, 61, 155, 251, 228, 212, 43, 37, +254, 81, 222, 41, 67, 5, 225, 124, 53, 203, 111, 24, 212, 64, 17, 85, +194, 255, 56, 190, 115, 192, 203, 55, 170, 152, 187, 166, 116, 85, 66, 167, +213, 247, 129, 15, 118, 86, 104, 224, 195, 108, 109, 6, 200, 191, 34, 138, +117, 74, 182, 209, 18, 204, 182, 139, 184, 27, 107, 175, 14, 145, 155, 197, +251, 53, 141, 209, 98, 130, 230, 2, 91, 91, 90, 254, 131, 252, 91, 85, +39, 212, 73, 90, 57, 184, 144, 26, 163, 6, 32, 243, 234, 162, 234, 236, +167, 234, 73, 113, 50, 77, 165, 129, 122, 211, 6, 34, 194, 184, 29, 135, +226, 91, 114, 14, 96, 246, 243, 22, 200, 242, 220, 174, 227, 244, 168, 199, +197, 55, 114, 62, 215, 172, 58, 60, 82, 41, 205, 8, 107, 253, 62, 108, +122, 249, 78, 137, 39, 167, 14, 35, 153, 136, 62, 193, 211, 120, 49, 237, +232, 22, 215, 190, 132, 161, 250, 249, 174, 253, 90, 93, 210, 35, 222, 35, +62, 60, 204, 107, 63, 198, 121, 147, 68, 213, 75, 49, 50, 3, 5, 74, +30, 92, 119, 11, 223, 133, 222, 29, 233, 248, 93, 87, 194, 139, 84, 52, +214, 44, 146, 19, 241, 82, 204, 163, 154, 253, 130, 159, 88, 148, 116, 207, +29, 114, 117, 150, 154, 24, 81, 78, 95, 1, 208, 84, 197, 172, 141, 3, +107, 18, 192, 120, 196, 91, 30, 82, 90, 232, 163, 10, 142, 96, 198, 62, +126, 212, 153, 100, 207, 146, 122, 233, 92, 188, 147, 27, 9, 102, 204, 119, +209, 242, 71, 222, 108, 114, 249, 173, 59, 14, 67, 26, 104, 240, 136, 199, +70, 131, 39, 134, 18, 1, 152, 79, 224, 130, 104, 195, 179, 215, 90, 186, +244, 238, 12, 90, 181, 145, 75, 238, 84, 158, 111, 63, 187, 121, 152, 132, +167, 150, 138, 62, 203, 40, 70, 138, 154, 210, 37, 50, 226, 69, 253, 143, +26, 0, 243, 131, 5, 139, 79, 48, 48, 115, 122, 61, 71, 41, 1, 232, +239, 4, 96, 74, 209, 253, 128, 224, 222, 158, 97, 150, 16, 30, 132, 240, +199, 197, 118, 13, 71, 56, 160, 190, 35, 215, 110, 165, 254, 26, 69, 43, +195, 163, 30, 245, 138, 48, 80, 140, 245, 89, 83, 165, 65, 39, 20, 83, +115, 119, 111, 90, 202, 101, 172, 91, 178, 35, 17, 120, 45, 118, 91, 60, +189, 180, 133, 34, 19, 137, 152, 143, 16, 186, 214, 4, 46, 242, 23, 179, +229, 204, 55, 218, 22, 188, 5, 222, 140, 69, 195, 43, 31, 34, 159, 131, +53, 28, 83, 208, 158, 112, 163, 16, 61, 175, 3, 69, 113, 134, 174, 21, +125, 162, 91, 182, 251, 120, 17, 94, 100, 252, 199, 118, 35, 248, 64, 206, +179, 38, 121, 176, 84, 197, 9, 2, 45, 111, 244, 161, 250, 199, 130, 208, +167, 250, 0, 155, 57, 0, 95, 39, 206, 237, 5, 23, 58, 142, 137, 77, +164, 152, 219, 94, 57, 237, 16, 219, 119, 57, 58, 101, 189, 104, 205, 228, +28, 237, 119, 143, 99, 241, 5, 160, 115, 91, 215, 246, 198, 153, 60, 186, +64, 248, 126, 67, 56, 155, 179, 55, 102, 3, 47, 68, 145, 41, 209, 45, +148, 106, 11, 71, 191, 171, 245, 33, 6, 133, 216, 1, 109, 128, 56, 120, +247, 17, 169, 150, 173, 61, 111, 0, 65, 2, 95, 229, 63, 59, 185, 148, +213, 149, 140, 190, 57, 151, 163, 73, 9, 231, 250, 76, 126, 211, 12, 175, +14, 38, 146, 30, 102, 22, 124, 58, 137, 239, 181, 99, 176, 2, 184, 48, +196, 132, 248, 140, 90, 194, 95, 6, 90, 242, 171, 254, 189, 235, 8, 68, +244, 115, 89, 217, 10, 61, 172, 252, 75, 186, 117, 212, 216, 62, 253, 98, +156, 233, 96, 139, 55, 91, 251, 168, 221, 67, 231, 18, 140, 250, 38, 232, +143, 65, 220, 234, 129, 106, 184, 63, 171, 119, 96, 32, 9, 45, 151, 74, +71, 81, 162, 109, 58, 194, 125, 191, 169, 244, 9, 190, 37, 38, 98, 36, +238, 176, 38, 150, 30, 227, 0, 191, 60, 189, 0, 4, 178, 196, 238, 182, +233, 8, 126, 14, 236, 73, 100, 16, 150, 49, 26, 104, 152, 197, 132, 53, +229, 100, 196, 206, 7, 74, 91, 143, 23, 206, 120, 252, 52, 73, 161, 148, +41, 160, 137, 29, 207, 222, 13, 128, 144, 191, 162, 60, 24, 226, 187, 250, +73, 76, 246, 240, 31, 254, 109, 144, 102, 248, 207, 215, 44, 182, 29, 202, +54, 141, 107, 124, 239, 205, 243, 54, 158, 0, 148, 202, 98, 65, 233, 201, +60, 169, 34, 64, 81, 62, 205, 225, 228, 233, 250, 23, 146, 53, 104, 120, +68, 71, 179, 26, 156, 230, 25, 225, 235, 138, 20, 196, 223, 72, 176, 237, +67, 107, 202, 211, 32, 31, 184, 26, 178, 64, 134, 225, 115, 8, 227, 9, +200, 33, 31, 31, 58, 82, 251, 249, 54, 46, 60, 12, 233, 66, 222, 144, +243, 111, 110, 25, 117, 77, 108, 223, 211, 209, 23, 78, 162, 154, 77, 84, +251, 166, 89, 207, 45, 78, 51, 85, 18, 51, 14, 56, 9, 131, 186, 111, +229, 230, 11, 197, 196, 201, 184, 134, 147, 52, 14, 185, 145, 14, 9, 164, +157, 82, 3, 252, 42, 244, 140, 207, 189, 77, 13, 232, 248, 139, 10, 137, +30, 189, 91, 92, 202, 63, 249, 97, 212, 139, 39, 155, 251, 253, 10, 249, +13, 115, 238, 203, 112, 147, 186, 185, 46, 239, 51, 143, 148, 251, 163, 208, +254, 121, 240, 243, 22, 162, 47, 196, 44, 249, 0, 59, 127, 144, 82, 11, +69, 124, 76, 131, 231, 236, 169, 97, 172, 168, 157, 24, 17, 61, 108, 229, +182, 153, 0, 196, 23, 118, 40, 70, 167, 178, 79, 47, 113, 75, 93, 46, +135, 148, 121, 57, 20, 150, 28, 66, 210, 141, 142, 91, 131, 112, 239, 188, +35, 5, 181, 128, 2, 59, 120, 6, 228, 206, 130, 132, 104, 30, 219, 147, +82, 12, 48, 9, 98, 51, 34, 196, 135, 236, 115, 178, 10, 25, 8, 205, +28, 231, 140, 199, 224, 224, 162, 123, 88, 194, 202, 218, 116, 49, 233, 137, +112, 72, 235, 157, 125, 137, 74, 132, 49, 69, 232, 249, 247, 241, 47, 8, +112, 5, 72, 138, 149, 121, 2, 148, 204, 93, 231, 44, 129, 140, 149, 206, +104, 37, 208, 181, 86, 67, 122, 167, 114, 166, 200, 134, 180, 179, 139, 120, +16, 106, 171, 93, 58, 179, 175, 179, 244, 148, 36, 83, 171, 157, 182, 146, +111, 22, 0, 144, 110, 105, 47, 90, 236, 177, 47, 44, 35, 250, 237, 111, +141, 89, 6, 186, 22, 196, 32, 166, 23, 143, 17, 96, 127, 58, 139, 137, +29, 250, 164, 52, 141, 1, 13, 117, 82, 93, 241, 254, 120, 139, 165, 1, +114, 105, 7, 135, 180, 57, 252, 202, 233, 69, 253, 38, 11, 88, 223, 17, +203, 64, 162, 170, 127, 59, 163, 90, 8, 58, 149, 20, 214, 159, 26, 160, +120, 244, 123, 91, 203, 31, 86, 237, 20, 242, 66, 14, 182, 206, 127, 54, +119, 36, 182, 41, 129, 128, 193, 81, 19, 182, 120, 85, 23, 210, 220, 177, +202, 204, 102, 143, 81, 243, 233, 15, 67, 183, 157, 96, 122, 120, 130, 79, +154, 118, 36, 78, 152, 24, 123, 90, 86, 169, 200, 20, 29, 57, 210, 133, +16, 52, 24, 202, 20, 173, 101, 230, 61, 47, 105, 94, 244, 47, 217, 207, +87, 87, 93, 204, 138, 110, 8, 150, 200, 248, 129, 139, 134, 225, 34, 34, +150, 247, 70, 194, 144, 167, 21, 98, 161, 7, 38, 78, 3, 36, 42, 134, +161, 157, 203, 87, 34, 171, 28, 199, 64, 186, 130, 223, 103, 121, 88, 130, +50, 174, 10, 50, 79, 13, 92, 162, 99, 1, 85, 168, 122, 61, 132, 80, +85, 112, 238, 6, 179, 207, 162, 53, 16, 198, 250, 218, 206, 202, 242, 248, +31, 74, 86, 197, 133, 193, 36, 99, 133, 160, 223, 55, 36, 153, 101, 165, +188, 184, 179, 189, 36, 198, 254, 51, 199, 13, 116, 24, 10, 135, 101, 208, +166, 54, 107, 1, 166, 97, 38, 201, 45, 86, 218, 44, 163, 60, 173, 129, +69, 17, 204, 55, 85, 141, 80, 100, 88, 127, 108, 205, 65, 73, 159, 204, +216, 250, 240, 17, 121, 196, 196, 121, 46, 64, 25, 215, 88, 102, 221, 244, +35, 248, 96, 114, 66, 125, 134, 7, 83, 97, 0, 80, 166, 224, 216, 22, +213, 18, 42, 242, 126, 182, 81, 224, 10, 37, 193, 43, 174, 74, 159, 147, +58, 65, 217, 147, 110, 214, 95, 122, 174, 125, 121, 74, 66, 144, 74, 99, +52, 132, 104, 105, 139, 225, 128, 62, 1, 188, 7, 43, 185, 222, 134, 6, +216, 52, 211, 213, 83, 109, 176, 166, 152, 161, 48, 211, 124, 198, 241, 52, +237, 139, 155, 20, 233, 140, 55, 147, 68, 77, 166, 106, 81, 213, 250, 74, +125, 165, 213, 65, 147, 92, 31, 208, 242, 169, 90, 30, 239, 165, 143, 196, +85, 247, 121, 147, 38, 181, 170, 75, 30, 224, 105, 121, 27, 197, 246, 172, +39, 109, 6, 209, 42, 208, 13, 148, 153, 97, 247, 38, 168, 185, 76, 42, +102, 145, 166, 27, 242, 37, 136, 45, 245, 32, 200, 177, 225, 248, 154, 117, +172, 184, 37, 156, 208, 100, 151, 64, 16, 193, 254, 213, 205, 140, 207, 153, +64, 155, 57, 47, 237, 59, 231, 10, 130, 204, 72, 30, 17, 60, 76, 115, +161, 237, 104, 5, 38, 254, 90, 152, 208, 49, 194, 160, 243, 106, 78, 41, +251, 143, 104, 130, 180, 241, 98, 211, 238, 194, 224, 36, 242, 39, 109, 180, +67, 130, 210, 44, 8, 162, 150, 16, 76, 83, 40, 86, 97, 87, 187, 42, +50, 63, 35, 98, 192, 23, 138, 236, 90, 3, 157, 19, 5, 252, 228, 211, +239, 1, 85, 190, 54, 144, 218, 221, 184, 19, 89, 75, 138, 53, 115, 206, +31, 100, 99, 187, 80, 162, 222, 134, 167, 238, 117, 84, 36, 62, 178, 224, +147, 119, 160, 65, 244, 245, 157, 188, 184, 222, 42, 53, 188, 84, 51, 5, +22, 214, 229, 92, 249, 17, 78, 6, 79, 145, 92, 201, 53, 58, 45, 87, +90, 19, 194, 253, 18, 68, 87, 58, 48, 206, 85, 241, 173, 40, 0, 38, +75, 210, 227, 254, 150, 117, 168, 88, 41, 180, 31, 77, 239, 136, 37, 106, +222, 33, 63, 239, 217, 245, 29, 11, 255, 94, 181, 132, 91, 80, 152, 15, +224, 253, 187, 104, 191, 95, 180, 55, 108, 24, 65, 32, 27, 147, 201, 102, +102, 64, 245, 14, 196, 154, 169, 133, 191, 117, 49, 108, 75, 133, 72, 95, +48, 126, 1, 166, 187, 129, 223, 94, 96, 39, 225, 222, 196, 210, 129, 35, +24, 186, 145, 6, 173, 82, 67, 130, 97, 167, 138, 167, 57, 181, 228, 249, +247, 44, 29, 9, 140, 245, 49, 164, 210, 119, 91, 176, 15, 31, 206, 88, +229, 155, 23, 72, 114, 224, 237, 190, 194, 147, 133, 233, 170, 22, 64, 241, +162, 204, 52, 208, 138, 159, 29, 94, 25, 117, 103, 132, 232, 65, 198, 90, +183, 113, 6, 76, 52, 141, 199, 166, 170, 128, 199, 251, 60, 137, 86, 78, +52, 16, 72, 64, 112, 174, 67, 54, 73, 63, 55, 183, 30, 11, 48, 131, +7, 94, 151, 17, 166, 115, 62, 5, 221, 71, 30, 137, 35, 181, 250, 187, +68, 26, 187, 51, 202, 249, 76, 162, 63, 10, 144, 123, 119, 217, 155, 15, +214, 212, 52, 39, 208, 109, 210, 206, 230, 242, 186, 254, 170, 138, 52, 40, +130, 7, 102, 67, 28, 38, 106, 152, 122, 172, 184, 166, 81, 30, 236, 149, +213, 236, 174, 130, 140, 44, 143, 199, 9, 118, 58, 11, 30, 126, 139, 39, +128, 92, 83, 242, 207, 200, 157, 245, 147, 84, 207, 140, 120, 59, 56, 228, +145, 177, 130, 48, 139, 78, 101, 124, 42, 228, 129, 172, 14, 248, 144, 142, +189, 38, 158, 58, 85, 84, 75, 136, 180, 175, 13, 184, 0, 26, 128, 234, +151, 167, 40, 6, 163, 8, 23, 57, 69, 42, 89, 174, 50, 0, 216, 186, +166, 7, 143, 123, 95, 23, 26, 134, 127, 125, 199, 117, 26, 215, 129, 212, +119, 83, 2, 66, 96, 247, 126, 241, 49, 171, 186, 222, 146, 234, 115, 199, +123, 112, 79, 147, 53, 210, 95, 192, 166, 49, 137, 245, 80, 120, 14, 184, +242, 237, 131, 27, 141, 100, 178, 185, 54, 245, 152, 55, 243, 88, 45, 122, +48, 229, 214, 55, 118, 105, 222, 26, 189, 68, 42, 21, 34, 57, 165, 246, +109, 35, 84, 45, 76, 196, 116, 127, 88, 180, 10, 179, 103, 226, 208, 33, +91, 111, 12, 231, 221, 166, 64, 199, 93, 87, 58, 164, 108, 23, 126, 169, +216, 119, 68, 104, 24, 51, 156, 71, 175, 181, 93, 184, 124, 171, 34, 72, +115, 95, 148, 72, 166, 241, 178, 223, 36, 10, 12, 219, 50, 172, 139, 152, +26, 232, 185, 249, 95, 249, 8, 244, 20, 78, 136, 141, 145, 169, 168, 2, +208, 9, 30, 37, 50, 149, 47, 50, 17, 64, 214, 168, 32, 23, 228, 232, +31, 78, 219, 77, 8, 80, 253, 41, 79, 8, 123, 65, 234, 36, 78, 151, +23, 68, 18, 70, 10, 9, 9, 33, 142, 129, 115, 143, 191, 127, 209, 141, +202, 189, 55, 120, 16, 148, 184, 122, 178, 77, 10, 149, 18, 30, 6, 101, +53, 90, 155, 239, 253, 82, 57, 11, 125, 84, 7, 175, 116, 62, 210, 232, +112, 130, 253, 105, 153, 203, 31, 120, 251, 241, 45, 41, 127, 96, 146, 11, +187, 180, 115, 21, 63, 182, 213, 196, 175, 255, 162, 31, 233, 65, 197, 110, +42, 136, 54, 118, 234, 176, 3, 252, 83, 4, 107, 133, 19, 226, 34, 163, +232, 31, 39, 171, 178, 242, 36, 69, 64, 33, 167, 139, 81, 184, 160, 207, +119, 37, 137, 40, 165, 50, 167, 243, 188, 82, 142, 91, 2, 0, 209, 16, +166, 152, 134, 113, 185, 236, 253, 161, 120, 90, 94, 189, 81, 201, 224, 60, +66, 82, 23, 12, 199, 197, 86, 198, 16, 54, 174, 237, 121, 186, 244, 141, +50, 26, 152, 120, 78, 52, 71, 115, 40, 94, 156, 22, 162, 241, 219, 90, +212, 236, 21, 153, 170, 142, 20, 200, 251, 49, 98, 192, 173, 14, 167, 199, +167, 176, 235, 111, 61, 243, 30, 215, 35, 113, 127, 122, 250, 79, 162, 40, +130, 81, 31, 51, 177, 240, 9, 31, 192, 210, 151, 171, 78, 201, 50, 102, +227, 75, 196, 239, 232, 175, 240, 119, 205, 191, 180, 209, 68, 123, 86, 244, +114, 244, 209, 7, 35, 17, 16, 89, 133, 89, 42, 9, 18, 124, 21, 252, +101, 244, 88, 79, 214, 234, 145, 140, 52, 118, 47, 44, 121, 43, 14, 6, +157, 26, 16, 172, 252, 85, 94, 84, 59, 134, 19, 119, 10, 70, 91, 157, +246, 8, 74, 32, 15, 23, 230, 2, 205, 188, 103, 237, 92, 19, 88, 21, +147, 135, 117, 124, 107, 140, 39, 152, 51, 56, 246, 122, 153, 174, 106, 145, +140, 146, 78, 180, 243, 212, 62, 46, 3, 131, 137, 78, 56, 79, 160, 252, +117, 84, 126, 199, 194, 240, 227, 23, 188, 40, 206, 72, 68, 40, 58, 91, +183, 80, 40, 31, 65, 9, 70, 23, 34, 64, 199, 213, 138, 80, 140, 58, +202, 215, 115, 223, 92, 181, 218, 116, 252, 210, 190, 210, 54, 166, 241, 66, +132, 62, 98, 109, 158, 51, 52, 89, 69, 24, 171, 176, 235, 116, 175, 18, +111, 80, 167, 209, 170, 150, 194, 152, 23, 96, 162, 41, 244, 232, 80, 85, +76, 226, 126, 240, 196, 214, 81, 40, 183, 225, 102, 10, 166, 57, 231, 230, +232, 149, 164, 116, 112, 122, 0, 182, 53, 199, 252, 55, 50, 111, 243, 200, +64, 191, 29, 240, 86, 187, 126, 133, 121, 249, 249, 37, 58, 174, 209, 39, +152, 103, 151, 131, 127, 207, 154, 14, 188, 239, 28, 107, 33, 10, 57, 82, +158, 116, 63, 225, 29, 103, 80, 134, 84, 245, 37, 13, 1, 70, 95, 180, +82, 191, 0, 67, 243, 67, 218, 148, 30, 248, 160, 133, 92, 83, 190, 197, +251, 150, 117, 28, 178, 121, 17, 16, 209, 4, 188, 155, 55, 82, 134, 128, +3, 104, 142, 132, 144, 32, 101, 0, 223, 166, 79, 49, 108, 64, 231, 162, +6, 27, 94, 116, 68, 235, 168, 36, 115, 39, 191, 151, 28, 202, 228, 35, +90, 53, 172, 170, 173, 151, 236, 174, 197, 19, 85, 216, 192, 158, 128, 35, +6, 88, 21, 25, 158, 92, 18, 213, 22, 136, 119, 149, 124, 213, 103, 197, +6, 206, 174, 36, 196, 199, 208, 68, 57, 84, 28, 218, 251, 214, 75, 157, +254, 46, 61, 228, 188, 87, 93, 125, 155, 38, 175, 4, 36, 160, 31, 177, +70, 222, 245, 85, 246, 69, 109, 45, 77, 151, 175, 202, 23, 17, 139, 66, +77, 166, 155, 251, 82, 156, 11, 77, 102, 222, 20, 170, 255, 232, 162, 41, +73, 26, 89, 118, 58, 126, 212, 207, 108, 55, 5, 136, 150, 240, 223, 185, +103, 231, 115, 182, 189, 39, 164, 162, 182, 112, 113, 11, 93, 250, 108, 247, +231, 143, 172, 67, 223, 221, 224, 24, 116, 128, 119, 232, 143, 90, 27, 149, +49, 226, 195, 238, 66, 233, 15, 97, 137, 170, 155, 236, 124, 185, 95, 192, +121, 36, 82, 76, 249, 31, 46, 102, 185, 14, 243, 30, 244, 217, 184, 156, +156, 207, 35, 38, 89, 107, 212, 139, 75, 161, 16, 78, 232, 76, 209, 7, +92, 94, 80, 159, 58, 162, 138, 216, 206, 231, 93, 85, 198, 140, 90, 200, +170, 79, 118, 26, 52, 168, 111, 165, 224, 91, 45, 85, 42, 162, 142, 55, +0, 19, 167, 142, 86, 74, 235, 43, 230, 3, 162, 93, 33, 239, 43, 181, +253, 155, 106, 28, 48, 150, 43, 234, 102, 187, 247, 187, 40, 43, 158, 33, +48, 242, 214, 95, 182, 126, 3, 25, 218, 47, 163, 140, 217, 6, 221, 199, +57, 76, 182, 244, 110, 49, 168, 240, 129, 31, 226, 185, 35, 18, 185, 189, +2, 17, 190, 134, 137, 29, 76, 118, 48, 216, 33, 188, 103, 160, 66, 143, +23, 230, 255, 24, 238, 6, 111, 18, 214, 163, 244, 30, 36, 4, 216, 31, +162, 60, 127, 235, 203, 67, 34, 69, 20, 227, 220, 56, 107, 78, 81, 10, +160, 169, 19, 255, 211, 126, 46, 77, 46, 152, 46, 114, 135, 139, 23, 3, +172, 52, 80, 86, 11, 5, 190, 51, 86, 190, 67, 0, 75, 17, 160, 229, +12, 254, 152, 221, 3, 213, 220, 213, 244, 51, 157, 73, 251, 206, 213, 43, +113, 247, 245, 189, 52, 226, 250, 109, 212, 4, 168, 132, 24, 137, 160, 175, +219, 204, 156, 32, 253, 121, 8, 209, 200, 96, 88, 93, 66, 243, 84, 76, +148, 142, 229, 86, 31, 106, 10, 23, 136, 200, 132, 152, 150, 51, 125, 202, +13, 202, 63, 110, 38, 125, 12, 113, 17, 162, 92, 217, 24, 108, 235, 209, +81, 65, 202, 179, 60, 176, 11, 91, 62, 45, 126, 96, 9, 66, 153, 134, +11, 40, 231, 205, 66, 5, 249, 92, 99, 119, 206, 105, 108, 207, 79, 44, +61, 10, 179, 18, 7, 33, 15, 68, 204, 40, 214, 171, 223, 177, 98, 94, +176, 243, 165, 152, 231, 154, 1, 67, 226, 236, 109, 137, 202, 72, 234, 243, +23, 156, 41, 105, 118, 40, 72, 112, 147, 53, 76, 126, 158, 255, 145, 213, +214, 43, 241, 194, 125, 227, 104, 241, 196, 244, 237, 140, 214, 62, 210, 249, +207, 143, 58, 106, 182, 10, 75, 247, 114, 19, 127, 210, 217, 102, 190, 200, +149, 36, 59, 137, 204, 222, 223, 123, 63, 215, 84, 249, 49, 149, 83, 137, +205, 224, 192, 44, 166, 101, 109, 181, 98, 219, 17, 169, 186, 35, 11, 108, +131, 75, 185, 220, 58, 214, 129, 67, 15, 106, 220, 67, 76, 7, 247, 154, +201, 146, 25, 224, 51, 169, 180, 61, 73, 169, 216, 163, 64, 179, 144, 61, +184, 163, 163, 8, 113, 40, 42, 53, 46, 80, 50, 199, 156, 6, 138, 44, +86, 130, 12, 195, 251, 191, 99, 122, 127, 116, 155, 248, 205, 86, 172, 49, +197, 132, 101, 124, 32, 23, 225, 78, 252, 23, 182, 27, 10, 93, 135, 220, +98, 246, 62, 157, 134, 102, 1, 113, 244, 65, 39, 3, 106, 168, 22, 142, +16, 64, 140, 15, 80, 99, 35, 22, 179, 165, 166, 85, 100, 233, 90, 229, +18, 78, 92, 204, 255, 218, 224, 121, 218, 149, 146, 101, 90, 237, 209, 141, +172, 71, 193, 90, 175, 189, 165, 169, 88, 27, 15, 197, 225, 132, 32, 122, +215, 89, 92, 130, 175, 160, 186, 201, 20, 61, 64, 162, 133, 3, 43, 242, +1, 253, 252, 181, 136, 253, 218, 163, 130, 111, 36, 14, 133, 7, 219, 204, +145, 34, 32, 170, 193, 236, 151, 74, 74, 147, 76, 138, 107, 121, 122, 117, +158, 28, 246, 50, 255, 135, 138, 164, 17, 38, 164, 210, 75, 174, 116, 208, +146, 145, 163, 54, 161, 142, 104, 242, 253, 76, 97, 186, 92, 131, 69, 189, +217, 241, 225, 157, 78, 37, 78, 96, 220, 194, 3, 246, 214, 121, 178, 93, +26, 46, 165, 137, 4, 223, 97, 14, 94, 50, 52, 234, 50, 86, 69, 141, +165, 121, 202, 152, 37, 85, 22, 135, 212, 233, 30, 106, 208, 152, 10, 196, +23, 144, 2, 199, 18, 43, 47, 236, 83, 30, 54, 249, 7, 145, 116, 239, +36, 191, 115, 171, 101, 77, 39, 102, 167, 249, 152, 234, 193, 141, 24, 143, +254, 132, 241, 49, 221, 223, 189, 103, 12, 245, 20, 240, 213, 121, 152, 82, +69, 179, 192, 186, 6, 66, 56, 22, 22, 144, 240, 125, 87, 13, 248, 93, +108, 229, 245, 148, 14, 62, 131, 45, 100, 201, 63, 68, 118, 249, 66, 98, +132, 141, 74, 140, 20, 220, 81, 134, 141, 172, 190, 199, 149, 205, 93, 57, +45, 113, 240, 15, 161, 4, 122, 228, 28, 150, 220, 183, 88, 226, 51, 117, +6, 107, 122, 39, 165, 25, 15, 197, 199, 149, 157, 131, 214, 44, 253, 240, +247, 241, 139, 229, 232, 212, 218, 113, 23, 188, 132, 147, 250, 252, 14, 145, +7, 246, 101, 27, 190, 155, 27, 224, 20, 37, 63, 2, 54, 38, 5, 34, +186, 2, 107, 221, 161, 66, 248, 217, 63, 79, 202, 83, 53, 253, 127, 87, +252, 108, 133, 175, 14, 82, 140, 132, 150, 94, 234, 120, 120, 214, 32, 234, +53, 81, 60, 107, 255, 166, 188, 89, 153, 9, 173, 234, 85, 244, 11, 76, +217, 190, 22, 16, 147, 80, 23, 113, 126, 241, 84, 57, 134, 84, 152, 42, +97, 158, 176, 247, 138, 249, 54, 110, 103, 112, 170, 52, 238, 109, 27, 131, +137, 84, 37, 53, 162, 45, 12, 135, 228, 179, 197, 44, 163, 143, 33, 0, +125, 198, 45, 122, 93, 252, 148, 208, 163, 242, 99, 126, 195, 122, 247, 103, +141, 22, 208, 148, 113, 236, 210, 223, 57, 241, 128, 9, 40, 105, 207, 109, +69, 229, 204, 238, 98, 124, 100, 227, 17, 185, 226, 18, 119, 192, 50, 24, +98, 196, 187, 230, 224, 60, 191, 157, 41, 179, 95, 76, 153, 6, 217, 232, +93, 2, 110, 41, 148, 140, 203, 9, 156, 225, 174, 26, 16, 1, 182, 20, +242, 221, 114, 72, 21, 141, 226, 213, 200, 17, 198, 16, 100, 176, 216, 73, +240, 76, 6, 237, 78, 200, 119, 77, 39, 240, 158, 31, 148, 131, 187, 63, +232, 210, 64, 179, 250, 232, 53, 78, 40, 18, 89, 33, 39, 140, 209, 56, +112, 249, 146, 222, 7, 127, 161, 65, 146, 33, 146, 127, 56, 114, 32, 84, +80, 24, 112, 229, 230, 213, 94, 91, 148, 244, 109, 13, 157, 111, 51, 201, +173, 173, 66, 136, 150, 6, 111, 111, 154, 11, 17, 116, 13, 27, 209, 242, +59, 99, 21, 169, 222, 68, 72, 222, 164, 61, 217, 201, 53, 205, 33, 15, +141, 10, 80, 10, 215, 82, 125, 43, 165, 54, 184, 26, 151, 71, 203, 206, +50, 58, 57, 161, 52, 168, 22, 242, 179, 125, 111, 43, 91, 87, 3, 7, +126, 177, 54, 163, 148, 93, 255, 55, 124, 43, 141, 72, 166, 34, 147, 163, +135, 0, 50, 126, 152, 165, 1, 244, 118, 95, 96, 80, 4, 187, 206, 110, +239, 214, 183, 209, 125, 252, 40, 182, 126, 134, 2, 45, 182, 138, 179, 2, +102, 138, 101, 19, 92, 134, 39, 69, 120, 57, 190, 57, 130, 245, 73, 221, +23, 174, 183, 93, 28, 157, 42, 231, 217, 206, 139, 115, 38, 188, 129, 124, +12, 110, 89, 108, 132, 51, 142, 244, 135, 245, 251, 68, 128, 56, 218, 26, +248, 129, 34, 157, 167, 84, 138, 245, 95, 64, 172, 74, 9, 252, 17, 188, +73, 110, 229, 78, 230, 153, 231, 44, 191, 46, 126, 39, 241, 123, 223, 46, +47, 39, 69, 139, 118, 7, 184, 183, 166, 171, 61, 112, 200, 111, 196, 61, +123, 217, 188, 193, 102, 212, 105, 92, 0, 159, 27, 176, 74, 50, 250, 107, +68, 26, 196, 203, 239, 0, 42, 184, 35, 143, 14, 106, 172, 76, 147, 112, +100, 25, 215, 41, 170, 126, 95, 108, 218, 82, 36, 9, 116, 177, 182, 123, +254, 190, 56, 53, 125, 239, 66, 243, 145, 10, 61, 102, 57, 109, 197, 80, +159, 97, 253, 120, 48, 249, 97, 177, 2, 185, 153, 14, 201, 121, 165, 107, +133, 118, 248, 220, 68, 206, 96, 137, 154, 121, 215, 217, 189, 74, 76, 204, +222, 35, 222, 227, 83, 52, 77, 180, 122, 123, 184, 249, 212, 240, 22, 200, +136, 194, 206, 111, 120, 162, 253, 186, 155, 213, 149, 39, 97, 252, 132, 95, +70, 241, 47, 54, 19, 143, 188, 149, 148, 238, 161, 194, 121, 17, 93, 111, +133, 242, 201, 212, 183, 138, 152, 178, 37, 230, 140, 107, 137, 122, 163, 75, +5, 135, 225, 186, 32, 50, 131, 104, 197, 16, 87, 163, 180, 251, 170, 27, +181, 241, 85, 179, 126, 116, 219, 206, 79, 242, 5, 101, 41, 165, 80, 223, +66, 32, 68, 71, 88, 53, 117, 216, 209, 172, 112, 212, 129, 152, 49, 109, +61, 236, 79, 222, 156, 11, 239, 31, 202, 61, 123, 205, 58, 128, 7, 95, +27, 139, 135, 91, 119, 192, 187, 13, 99, 165, 103, 254, 140, 195, 234, 100, +79, 231, 154, 176, 233, 82, 214, 191, 60, 193, 53, 143, 213, 250, 131, 91, +40, 145, 225, 212, 106, 77, 201, 106, 185, 120, 141, 225, 195, 5, 110, 132, +235, 189, 95, 42, 90, 55, 194, 116, 222, 147, 91, 172, 175, 220, 232, 23, +95, 201, 4, 150, 102, 250, 23, 196, 86, 120, 28, 42, 188, 48, 46, 144, +66, 85, 124, 42, 187, 137, 212, 196, 230, 245, 111, 147, 204, 161, 63, 35, +100, 22, 144, 232, 208, 88, 101, 151, 10, 31, 210, 90, 1, 4, 202, 135, +120, 102, 81, 121, 189, 201, 44, 222, 209, 48, 188, 152, 108, 250, 65, 173, +13, 240, 1, 123, 109, 36, 163, 137, 172, 69, 250, 162, 10, 75, 89, 57, +102, 147, 77, 18, 93, 4, 104, 216, 225, 207, 229, 24, 57, 187, 228, 99, +218, 204, 58, 115, 44, 120, 209, 99, 200, 214, 156, 221, 139, 17, 131, 159, +164, 233, 160, 6, 2, 27, 15, 60, 204, 219, 18, 190, 164, 210, 203, 188, +34, 116, 36, 134, 101, 193, 75, 88, 189, 222, 245, 174, 203, 0, 199, 161, +57, 22, 4, 219, 77, 24, 36, 141, 70, 215, 219, 31, 92, 105, 10, 70, +102, 169, 244, 215, 230, 169, 88, 240, 157, 190, 5, 130, 186, 232, 76, 117, +45, 230, 181, 115, 67, 35, 172, 15, 165, 30, 125, 180, 57, 245, 25, 97, +244, 170, 182, 180, 107, 24, 231, 195, 140, 97, 50, 220, 220, 193, 196, 144, +49, 32, 90, 62, 206, 109, 85, 35, 135, 220, 249, 255, 78, 103, 207, 98, +156, 228, 213, 254, 22, 231, 247, 191, 152, 250, 37, 8, 172, 204, 136, 181, +30, 75, 9, 174, 226, 175, 172, 238, 237, 107, 27, 230, 46, 197, 240, 140, +162, 225, 65, 165, 249, 209, 49, 152, 19, 102, 96, 96, 206, 145, 40, 39, +155, 68, 8, 228, 176, 0, 112, 6, 27, 164, 12, 220, 185, 140, 95, 71, +202, 125, 234, 15, 246, 52, 206, 5, 103, 198, 6, 65, 12, 209, 87, 223, +121, 239, 124, 120, 128, 156, 194, 250, 239, 133, 247, 227, 76, 107, 73, 38, +228, 241, 33, 19, 61, 138, 70, 37, 45, 58, 239, 13, 176, 27, 17, 41, +202, 233, 62, 223, 175, 157, 36, 234, 192, 23, 180, 64, 61, 231, 103, 173, +83, 169, 241, 51, 201, 81, 67, 217, 79, 246, 203, 247, 233, 117, 253, 153, +252, 50, 54, 251, 120, 254, 215, 105, 168, 47, 128, 61, 139, 243, 91, 142, +166, 179, 26, 97, 65, 171, 167, 244, 114, 188, 192, 101, 23, 55, 115, 205, +222, 209, 59, 111, 83, 147, 188, 26, 163, 123, 244, 252, 98, 148, 104, 110, +81, 27, 167, 67, 200, 85, 251, 80, 163, 117, 36, 78, 137, 95, 34, 59, +163, 172, 164, 89, 247, 72, 64, 181, 41, 86, 255, 184, 158, 238, 185, 226, +70, 112, 123, 179, 3, 73, 1, 111, 110, 161, 49, 29, 112, 124, 244, 110, +238, 247, 14, 14, 76, 199, 159, 197, 179, 250, 244, 247, 85, 172, 56, 98, +70, 232, 99, 204, 226, 75, 121, 73, 239, 205, 191, 210, 74, 92, 4, 0, +234, 193, 196, 194, 173, 68, 44, 15, 40, 155, 166, 205, 197, 52, 207, 169, +123, 143, 5, 179, 234, 31, 202, 86, 56, 24, 233, 62, 121, 211, 133, 19, +209, 88, 32, 158, 85, 70, 85, 248, 249, 48, 225, 47, 86, 13, 128, 6, +140, 36, 31, 128, 58, 215, 176, 81, 129, 125, 172, 224, 209, 207, 246, 173, +207, 193, 22, 97, 60, 173, 183, 77, 253, 155, 18, 178, 36, 113, 186, 216, +70, 53, 47, 176, 176, 110, 88, 134, 81, 218, 164, 230, 45, 241, 27, 80, +100, 97, 7, 241, 118, 72, 200, 165, 187, 155, 190, 94, 40, 30, 205, 153, +71, 104, 141, 15, 220, 15, 153, 177, 200, 155, 239, 120, 101, 136, 17, 153, +255, 88, 163, 185, 221, 199, 216, 98, 69, 95, 59, 175, 164, 233, 253, 133, +225, 2, 156, 121, 93, 233, 11, 172, 164, 252, 66, 25, 59, 141, 195, 114, +131, 224, 50, 139, 227, 135, 240, 4, 171, 14, 206, 140, 207, 55, 211, 159, +135, 8, 193, 239, 233, 207, 53, 244, 238, 84, 19, 73, 1, 94, 104, 42, +148, 26, 3, 101, 198, 153, 239, 239, 34, 230, 253, 108, 6, 54, 59, 54, +252, 49, 86, 67, 90, 174, 196, 140, 239, 181, 64, 85, 11, 44, 9, 229, +249, 136, 72, 125, 199, 191, 242, 156, 145, 81, 70, 193, 44, 181, 133, 36, +211, 242, 30, 144, 244, 7, 89, 97, 98, 244, 61, 184, 3, 174, 101, 173, +221, 239, 145, 166, 225, 182, 82, 202, 76, 76, 150, 198, 93, 120, 100, 254, +47, 21, 168, 61, 38, 165, 48, 31, 76, 59, 37, 89, 106, 87, 203, 179, +248, 156, 162, 64, 50, 76, 5, 123, 113, 9, 215, 226, 23, 205, 44, 245, +117, 179, 251, 160, 106, 205, 130, 187, 253, 151, 224, 24, 32, 107, 210, 221, +62, 9, 133, 192, 119, 143, 232, 69, 204, 98, 5, 86, 121, 17, 245, 180, +249, 233, 48, 185, 56, 62, 20, 215, 140, 6, 220, 139, 44, 46, 180, 236, +215, 250, 81, 195, 254, 101, 135, 40, 135, 235, 141, 22, 183, 1, 31, 3, +89, 252, 87, 207, 58, 24, 161, 225, 28, 217, 174, 122, 71, 46, 100, 25, +85, 189, 177, 45, 185, 53, 210, 109, 222, 240, 244, 82, 75, 188, 17, 191, +45, 184, 220, 132, 105, 75, 151, 12, 5, 236, 148, 150, 10, 22, 199, 26, +143, 142, 159, 137, 87, 142, 70, 241, 67, 5, 15, 235, 87, 20, 224, 207, +210, 38, 60, 245, 34, 238, 108, 193, 204, 194, 179, 7, 131, 158, 63, 245, +255, 95, 34, 247, 63, 100, 39, 85, 51, 182, 220, 69, 125, 88, 223, 39, +160, 176, 115, 100, 232, 150, 20, 40, 205, 132, 231, 201, 97, 40, 66, 207, +53, 195, 39, 59, 4, 191, 140, 210, 66, 46, 104, 196, 64, 35, 22, 151, +210, 88, 220, 108, 96, 95, 175, 97, 70, 25, 90, 111, 112, 123, 106, 204, +22, 59, 106, 248, 232, 178, 149, 32, 36, 16, 254, 191, 202, 95, 177, 177, +116, 95, 213, 205, 170, 254, 96, 184, 233, 166, 10, 156, 95, 254, 105, 205, +55, 158, 61, 129, 215, 98, 230, 107, 3, 63, 157, 155, 207, 247, 157, 79, +254, 138, 189, 94, 248, 244, 152, 167, 111, 16, 202, 234, 81, 38, 253, 1, +180, 210, 24, 89, 184, 252, 85, 6, 35, 223, 9, 34, 83, 254, 224, 69, +138, 199, 37, 90, 24, 21, 136, 15, 51, 50, 30, 54, 216, 227, 156, 117, +242, 100, 52, 163, 89, 33, 164, 98, 17, 89, 176, 21, 155, 15, 146, 216, +86, 117, 168, 3, 121, 75, 252, 116, 80, 199, 162, 215, 74, 4, 31, 118, +186, 206, 249, 116, 221, 99, 65, 54, 33, 13, 78, 210, 35, 210, 53, 122, +190, 198, 221, 183, 134, 204, 79, 8, 25, 210, 188, 253, 85, 201, 46, 250, +3, 232, 208, 37, 12, 223, 72, 151, 148, 238, 168, 204, 252, 31, 1, 28, +118, 248, 170, 149, 73, 59, 32, 202, 101, 151, 15, 8, 189, 163, 217, 141, +150, 116, 65, 129, 166, 147, 54, 1, 66, 214, 228, 77, 76, 12, 105, 1, +82, 129, 123, 28, 50, 106, 239, 115, 189, 81, 165, 89, 64, 162, 72, 173, +162, 12, 143, 161, 42, 195, 52, 49, 79, 130, 231, 207, 125, 113, 21, 43, +184, 120, 97, 79, 162, 36, 125, 204, 253, 23, 235, 22, 87, 250, 129, 46, +51, 140, 184, 122, 5, 176, 91, 77, 121, 99, 94, 246, 217, 247, 181, 100, +190, 81, 43, 71, 97, 216, 82, 144, 50, 215, 72, 88, 136, 202, 167, 146, +20, 108, 111, 48, 8, 128, 77, 59, 179, 227, 116, 102, 106, 170, 123, 183, +150, 15, 20, 226, 177, 244, 199, 210, 225, 96, 11, 232, 230, 107, 230, 92, +88, 7, 200, 250, 162, 143, 245, 215, 194, 174, 126, 31, 145, 211, 158, 210, +125, 222, 86, 80, 105, 207, 96, 197, 240, 16, 121, 229, 16, 43, 32, 18, +97, 116, 249, 105, 53, 10, 109, 163, 226, 90, 43, 205, 27, 190, 20, 75, +5, 119, 97, 81, 100, 236, 30, 13, 42, 30, 148, 237, 225, 149, 35, 17, +17, 5, 142, 35, 250, 215, 197, 155, 17, 111, 145, 129, 53, 57, 0, 200, +249, 89, 176, 189, 1, 116, 36, 15, 140, 182, 95, 214, 143, 116, 235, 82, +165, 53, 192, 181, 183, 131, 106, 5, 142, 35, 31, 235, 177, 90, 203, 121, +167, 216, 165, 33, 47, 225, 21, 227, 222, 235, 82, 74, 195, 197, 215, 79, +205, 108, 145, 185, 88, 224, 207, 185, 43, 148, 199, 55, 206, 55, 53, 36, +83, 228, 15, 155, 240, 52, 139, 36, 169, 202, 140, 11, 148, 201, 100, 116, +5, 4, 93, 209, 255, 14, 104, 27, 30, 138, 224, 182, 136, 68, 27, 18, +127, 61, 231, 13, 79, 211, 129, 170, 83, 133, 121, 42, 201, 91, 161, 157, +93, 92, 228, 230, 85, 42, 72, 252, 142, 85, 49, 49, 90, 248, 105, 64, +101, 17, 183, 104, 71, 66, 88, 231, 243, 185, 127, 109, 96, 16, 144, 67, +137, 142, 51, 15, 176, 229, 195, 244, 121, 225, 235, 1, 47, 26, 187, 199, +29, 84, 42, 209, 192, 23, 24, 66, 139, 105, 59, 42, 98, 42, 59, 121, +42, 19, 252, 216, 83, 170, 15, 153, 227, 209, 242, 192, 84, 127, 225, 7, +106, 52, 122, 11, 197, 13, 114, 196, 194, 67, 217, 106, 201, 9, 33, 188, +44, 80, 156, 138, 13, 234, 189, 29, 240, 190, 247, 231, 194, 113, 145, 182, +63, 184, 81, 203, 88, 173, 43, 148, 126, 63, 55, 30, 179, 169, 8, 4, +211, 7, 73, 48, 152, 169, 65, 139, 239, 39, 42, 66, 67, 209, 4, 20, +102, 193, 58, 22, 155, 229, 248, 233, 99, 238, 62, 173, 71, 56, 43, 153, +129, 253, 161, 69, 87, 94, 50, 53, 1, 18, 167, 179, 253, 232, 5, 244, +180, 73, 202, 206, 199, 177, 156, 168, 144, 156, 112, 247, 187, 93, 121, 233, +149, 16, 80, 145, 67, 175, 57, 252, 185, 218, 56, 13, 0, 164, 160, 84, +19, 68, 168, 14, 89, 77, 225, 2, 14, 83, 124, 56, 55, 162, 229, 39, +196, 249, 27, 240, 90, 133, 241, 237, 79, 169, 233, 173, 143, 255, 36, 249, +166, 116, 116, 177, 216, 149, 224, 26, 64, 44, 177, 25, 5, 253, 13, 50, +65, 237, 15, 138, 43, 95, 108, 20, 129, 184, 138, 121, 110, 240, 91, 12, +102, 187, 183, 232, 196, 253, 140, 90, 174, 171, 9, 150, 159, 88, 97, 56, +227, 158, 92, 227, 209, 227, 137, 248, 248, 182, 167, 229, 110, 188, 85, 30, +74, 7, 72, 99, 106, 178, 181, 90, 248, 101, 59, 184, 64, 26, 188, 1, +76, 145, 191, 118, 78, 161, 90, 157, 108, 121, 235, 154, 90, 112, 236, 204, +226, 67, 193, 204, 136, 84, 224, 47, 165, 0, 44, 46, 226, 144, 113, 146, +133, 73, 73, 101, 61, 49, 183, 45, 136, 209, 10, 185, 207, 24, 241, 253, +134, 113, 248, 233, 113, 75, 161, 177, 2, 66, 216, 62, 176, 59, 4, 163, +90, 175, 96, 238, 243, 195, 62, 32, 61, 225, 75, 178, 126, 96, 109, 122, +231, 239, 180, 196, 203, 20, 193, 0, 203, 49, 146, 34, 127, 250, 192, 204, +89, 255, 86, 9, 155, 120, 161, 237, 64, 148, 50, 54, 120, 95, 190, 121, +93, 65, 125, 191, 202, 190, 16, 112, 191, 77, 28, 125, 90, 84, 128, 7, +218, 251, 177, 71, 144, 162, 60, 43, 217, 255, 49, 53, 101, 131, 42, 192, +64, 123, 188, 33, 217, 147, 248, 63, 75, 61, 69, 149, 248, 90, 112, 148, +132, 15, 114, 114, 66, 235, 198, 222, 166, 108, 140, 172, 248, 14, 252, 63, +158, 153, 145, 61, 115, 160, 194, 30, 202, 34, 18, 158, 139, 132, 175, 73, +77, 36, 10, 85, 156, 180, 44, 92, 245, 67, 124, 21, 55, 3, 181, 208, +16, 78, 144, 45, 150, 153, 171, 99, 203, 120, 102, 144, 205, 149, 16, 168, +245, 60, 67, 171, 105, 163, 74, 101, 197, 243, 77, 206, 187, 79, 125, 54, +232, 50, 99, 60, 209, 21, 224, 203, 240, 54, 5, 64, 190, 113, 52, 43, +114, 153, 57, 24, 246, 249, 67, 5, 116, 108, 167, 24, 152, 157, 145, 145, +184, 135, 9, 21, 19, 40, 208, 87, 254, 48, 249, 255, 162, 39, 75, 119, +20, 188, 245, 166, 23, 134, 69, 64, 7, 242, 184, 89, 17, 166, 36, 158, +76, 105, 235, 212, 75, 14, 179, 168, 51, 204, 42, 50, 187, 5, 118, 76, +173, 58, 155, 172, 195, 168, 44, 28, 129, 9, 188, 8, 114, 79, 57, 233, +150, 175, 36, 213, 59, 176, 207, 25, 10, 148, 80, 3, 116, 14, 120, 161, +233, 250, 36, 212, 116, 26, 203, 37, 129, 42, 24, 65, 190, 157, 65, 193, +132, 195, 181, 27, 125, 161, 237, 17, 53, 203, 32, 29, 134, 120, 218, 120, +84, 139, 39, 121, 244, 190, 167, 179, 165, 113, 169, 219, 31, 137, 86, 15, +43, 237, 99, 71, 43, 151, 167, 221, 182, 112, 157, 111, 40, 91, 133, 17, +87, 222, 83, 221, 39, 188, 149, 51, 45, 135, 104, 27, 148, 246, 248, 28, +160, 219, 125, 198, 41, 151, 206, 26, 167, 167, 94, 41, 105, 251, 4, 35, +251, 166, 1, 111, 156, 209, 126, 39, 93, 105, 234, 197, 64, 185, 177, 48, +182, 153, 99, 34, 27, 109, 126, 192, 183, 20, 117, 131, 209, 93, 37, 71, +96, 87, 4, 183, 52, 16, 4, 125, 12, 53, 9, 76, 104, 151, 170, 9, +186, 74, 152, 140, 173, 231, 52, 113, 11, 115, 6, 75, 62, 208, 192, 102, +71, 112, 204, 74, 206, 20, 82, 5, 153, 16, 194, 186, 179, 190, 170, 219, +251, 109, 24, 88, 223, 137, 185, 190, 217, 168, 80, 101, 210, 105, 223, 115, +124, 71, 91, 192, 48, 42, 206, 220, 14, 48, 3, 232, 99, 51, 247, 39, +146, 151, 148, 230, 92, 113, 123, 184, 124, 169, 55, 5, 249, 226, 156, 86, +81, 167, 144, 164, 169, 73, 241, 61, 56, 20, 247, 116, 172, 147, 170, 3, +6, 80, 189, 3, 220, 11, 62, 56, 129, 179, 145, 205, 91, 46, 65, 29, +114, 184, 208, 118, 239, 103, 33, 224, 177, 109, 150, 19, 19, 100, 136, 166, +97, 101, 168, 9, 7, 29, 143, 169, 93, 186, 76, 23, 3, 227, 93, 240, +235, 94, 195, 2, 46, 188, 75, 37, 252, 60, 62, 186, 250, 143, 133, 96, +127, 208, 127, 55, 176, 247, 232, 99, 196, 99, 197, 107, 162, 234, 47, 109, +27, 121, 66, 73, 160, 1, 52, 29, 72, 89, 252, 231, 65, 236, 250, 198, +186, 129, 21, 102, 98, 57, 20, 184, 221, 174, 48, 37, 11, 185, 123, 187, +102, 78, 92, 3, 69, 161, 222, 33, 150, 250, 117, 85, 118, 111, 4, 145, +242, 62, 255, 27, 48, 72, 87, 253, 32, 157, 130, 68, 63, 224, 223, 227, +29, 217, 177, 173, 61, 206, 34, 14, 205, 70, 161, 224, 28, 131, 197, 203, +105, 33, 178, 131, 144, 186, 147, 119, 167, 172, 7, 116, 52, 214, 52, 191, +16, 20, 138, 241, 150, 60, 17, 30, 90, 22, 144, 187, 227, 163, 134, 176, +66, 121, 14, 1, 232, 99, 93, 57, 25, 113, 177, 243, 126, 46, 49, 0, +67, 207, 198, 255, 38, 164, 52, 221, 52, 220, 90, 196, 191, 73, 33, 136, +99, 74, 195, 31, 231, 194, 199, 182, 140, 82, 157, 188, 8, 12, 81, 84, +107, 2, 2, 35, 89, 168, 58, 130, 16, 60, 88, 163, 212, 87, 132, 194, +194, 63, 187, 98, 243, 115, 64, 245, 175, 9, 218, 0, 32, 210, 197, 40, +166, 44, 15, 234, 238, 33, 153, 224, 250, 120, 51, 0, 227, 120, 219, 44, +30, 86, 64, 104, 234, 171, 137, 78, 125, 204, 253, 60, 134, 211, 218, 47, +15, 145, 50, 231, 108, 143, 126, 99, 80, 109, 242, 211, 146, 142, 83, 22, +234, 150, 48, 123, 227, 52, 208, 213, 137, 83, 217, 82, 43, 155, 212, 230, +162, 139, 107, 243, 220, 45, 253, 220, 250, 97, 103, 239, 54, 14, 22, 131, +74, 171, 99, 219, 98, 40, 216, 176, 158, 82, 250, 106, 254, 2, 99, 49, +56, 168, 119, 184, 140, 182, 116, 186, 29, 103, 223, 20, 9, 95, 6, 36, +28, 134, 90, 8, 57, 65, 158, 33, 238, 155, 61, 210, 236, 126, 109, 144, +252, 222, 44, 104, 106, 212, 140, 195, 31, 222, 141, 131, 55, 1, 160, 236, +52, 155, 170, 173, 154, 85, 238, 6, 154, 93, 244, 172, 20, 207, 3, 249, +143, 52, 22, 77, 100, 14, 227, 254, 35, 66, 27, 37, 222, 98, 7, 22, +145, 202, 214, 116, 214, 33, 222, 138, 32, 154, 51, 86, 104, 119, 28, 107, +68, 13, 217, 155, 196, 223, 205, 180, 94, 22, 149, 156, 167, 202, 45, 125, +37, 105, 207, 145, 26, 162, 155, 167, 7, 155, 51, 201, 3, 72, 182, 154, +209, 14, 197, 215, 140, 114, 186, 121, 172, 94, 77, 16, 142, 0, 103, 184, +23, 29, 55, 101, 211, 60, 229, 54, 78, 121, 246, 79, 212, 96, 239, 52, +182, 132, 42, 214, 208, 28, 48, 252, 79, 113, 145, 90, 110, 46, 145, 190, +80, 63, 166, 210, 77, 34, 111, 125, 51, 102, 10, 3, 194, 209, 9, 160, +15, 155, 36, 235, 142, 252, 125, 174, 44, 186, 78, 171, 54, 62, 14, 227, +191, 192, 234, 43, 84, 99, 96, 201, 1, 12, 101, 98, 237, 12, 249, 186, +148, 221, 17, 209, 11, 181, 148, 166, 177, 44, 162, 16, 85, 35, 214, 85, +114, 100, 249, 76, 82, 74, 70, 30, 146, 99, 230, 15, 157, 117, 154, 219, +131, 163, 193, 175, 216, 30, 147, 176, 224, 116, 82, 144, 224, 131, 249, 50, +247, 196, 237, 65, 178, 102, 105, 252, 20, 31, 166, 17, 217, 207, 140, 216, +254, 123, 59, 77, 17, 111, 98, 168, 210, 237, 76, 110, 107, 16, 100, 40, +46, 208, 81, 201, 160, 52, 137, 25, 180, 136, 37, 214, 173, 172, 95, 113, +210, 195, 95, 222, 172, 118, 119, 189, 98, 253, 123, 107, 18, 98, 111, 201, +224, 197, 109, 136, 150, 149, 5, 87, 124, 188, 37, 201, 73, 198, 26, 6, +62, 134, 188, 136, 206, 126, 101, 46, 234, 17, 202, 47, 135, 223, 57, 59, +53, 114, 38, 89, 31, 1, 76, 76, 238, 143, 11, 190, 30, 76, 230, 46, +162, 51, 0, 186, 207, 126, 107, 219, 156, 18, 104, 247, 158, 244, 145, 20, +84, 31, 68, 141, 55, 190, 221, 105, 102, 56, 81, 154, 125, 71, 123, 126, +236, 179, 81, 231, 220, 167, 119, 206, 115, 106, 59, 166, 166, 3, 137, 43, +56, 32, 5, 45, 215, 145, 162, 47, 148, 234, 114, 18, 3, 166, 248, 209, +117, 192, 103, 35, 83, 79, 19, 212, 230, 12, 128, 214, 142, 148, 173, 234, +212, 62, 78, 144, 8, 141, 63, 252, 255, 188, 27, 191, 132, 53, 215, 220, +19, 191, 75, 253, 145, 230, 122, 156, 115, 250, 73, 171, 210, 22, 233, 244, +91, 58, 47, 75, 68, 116, 182, 98, 182, 75, 66, 36, 159, 64, 205, 176, +102, 50, 237, 38, 107, 148, 58, 61, 64, 1, 249, 68, 75, 235, 104, 25, +228, 147, 233, 46, 25, 190, 118, 196, 34, 39, 1, 60, 201, 67, 77, 64, +9, 43, 0, 150, 41, 73, 57, 254, 211, 96, 93, 129, 231, 63, 12, 177, +106, 238, 70, 73, 87, 251, 7, 254, 51, 212, 34, 34, 137, 127, 209, 207, +70, 60, 68, 71, 74, 208, 119, 211, 153, 100, 173, 21, 178, 95, 113, 6, +103, 244, 204, 200, 141, 58, 156, 13, 21, 109, 169, 215, 206, 184, 10, 248, +214, 219, 2, 22, 108, 37, 247, 157, 102, 167, 253, 142, 139, 177, 62, 243, +59, 147, 69, 231, 150, 123, 177, 231, 224, 33, 29, 75, 184, 115, 143, 218, +4, 10, 125, 35, 50, 201, 143, 44, 175, 108, 206, 247, 152, 81, 249, 135, +221, 23, 132, 80, 104, 24, 6, 10, 208, 155, 97, 45, 9, 52, 29, 232, +152, 176, 75, 242, 241, 111, 128, 127, 144, 96, 159, 171, 73, 250, 52, 163, +43, 158, 232, 89, 227, 65, 219, 151, 153, 227, 61, 46, 232, 177, 170, 203, +237, 9, 253, 225, 222, 224, 200, 86, 146, 180, 104, 8, 15, 189, 184, 94, +177, 36, 57, 170, 206, 62, 47, 152, 67, 77, 106, 10, 26, 180, 44, 124, +175, 5, 81, 96, 215, 143, 142, 152, 61, 2, 81, 216, 66, 142, 216, 71, +8, 175, 245, 51, 144, 186, 166, 28, 230, 64, 159, 150, 90, 249, 65, 151, +10, 136, 91, 38, 146, 1, 243, 23, 141, 224, 125, 108, 4, 166, 186, 241, +55, 10, 202, 251, 230, 96, 252, 248, 197, 48, 29, 239, 129, 204, 184, 15, +10, 89, 130, 175, 144, 59, 155, 33, 171, 121, 32, 19, 252, 109, 220, 191, +115, 237, 37, 243, 233, 121, 122, 90, 250, 66, 142, 44, 35, 203, 218, 145, +243, 140, 28, 161, 213, 153, 231, 76, 138, 76, 251, 151, 7, 11, 64, 193, +73, 230, 191, 196, 153, 83, 5, 94, 107, 104, 1, 65, 203, 149, 153, 209, +76, 82, 60, 0, 21, 153, 63, 172, 119, 106, 223, 51, 212, 244, 144, 25, +25, 126, 216, 9, 93, 42, 46, 188, 134, 154, 195, 84, 46, 126, 128, 136, +111, 21, 90, 103, 219, 198, 39, 161, 53, 255, 151, 213, 105, 135, 115, 226, +94, 28, 48, 252, 80, 33, 60, 213, 206, 247, 191, 175, 195, 227, 118, 54, +185, 205, 195, 248, 11, 238, 202, 13, 236, 38, 182, 1, 1, 51, 111, 190, +234, 249, 87, 189, 234, 35, 148, 226, 72, 131, 77, 249, 214, 48, 36, 116, +58, 228, 77, 168, 222, 190, 115, 193, 157, 174, 213, 105, 120, 23, 98, 134, +22, 205, 150, 192, 202, 128, 65, 128, 85, 254, 99, 135, 227, 170, 80, 96, +234, 225, 173, 172, 156, 179, 234, 81, 185, 34, 227, 155, 41, 242, 244, 138, +148, 58, 255, 232, 63, 146, 184, 233, 157, 105, 206, 181, 53, 42, 165, 59, +77, 71, 206, 219, 169, 168, 246, 61, 114, 171, 147, 22, 101, 218, 92, 93, +58, 103, 80, 240, 152, 80, 137, 179, 181, 175, 203, 245, 111, 231, 4, 41, +158, 94, 224, 189, 172, 122, 97, 92, 93, 126, 47, 229, 239, 52, 225, 102, +38, 25, 61, 196, 121, 227, 94, 27, 148, 133, 61, 98, 247, 7, 82, 187, +159, 106, 74, 51, 245, 171, 42, 69, 188, 227, 34, 178, 136, 210, 137, 62, +86, 101, 8, 204, 106, 6, 234, 105, 133, 51, 69, 50, 164, 84, 182, 73, +94, 107, 10, 134, 19, 165, 111, 191, 145, 238, 0, 8, 188, 57, 123, 185, +132, 9, 169, 43, 215, 92, 74, 108, 176, 219, 88, 26, 227, 255, 172, 198, +175, 40, 106, 120, 227, 148, 24, 151, 195, 121, 182, 70, 177, 251, 105, 27, +168, 16, 142, 207, 176, 74, 47, 217, 161, 139, 28, 60, 228, 196, 246, 233, +249, 184, 212, 36, 196, 96, 125, 79, 197, 37, 17, 133, 251, 89, 226, 187, +232, 38, 238, 158, 183, 92, 96, 35, 3, 28, 247, 68, 111, 103, 174, 110, +81, 164, 146, 165, 195, 219, 114, 27, 207, 83, 255, 253, 126, 88, 242, 198, +111, 102, 218, 249, 114, 9, 153, 221, 223, 176, 188, 88, 17, 208, 46, 178, +238, 36, 253, 109, 224, 222, 79, 154, 125, 18, 200, 101, 116, 57, 1, 129, +97, 201, 151, 111, 183, 222, 140, 135, 114, 156, 95, 84, 178, 241, 159, 177, +112, 62, 25, 125, 115, 232, 102, 251, 62, 203, 14, 5, 150, 92, 99, 241, +219, 53, 250, 69, 48, 65, 141, 243, 130, 124, 225, 30, 176, 59, 17, 175, +145, 254, 49, 241, 235, 137, 226, 136, 42, 0, 251, 160, 205, 156, 192, 10, +9, 85, 55, 14, 59, 38, 172, 192, 24, 221, 66, 54, 237, 238, 147, 90, +228, 189, 22, 9, 220, 164, 100, 218, 76, 176, 128, 184, 136, 152, 252, 67, +162, 227, 119, 133, 5, 15, 108, 130, 165, 211, 24, 19, 34, 74, 234, 209, +206, 203, 5, 232, 5, 133, 92, 251, 111, 242, 81, 57, 100, 12, 116, 139, +189, 113, 167, 141, 181, 174, 47, 10, 105, 237, 10, 170, 195, 140, 245, 184, +206, 44, 7, 175, 182, 148, 159, 209, 239, 141, 192, 194, 7, 189, 225, 93, +37, 161, 90, 81, 167, 97, 32, 161, 12, 147, 110, 81, 128, 14, 78, 146, +252, 19, 252, 221, 57, 196, 233, 98, 192, 166, 49, 199, 150, 96, 30, 247, +169, 183, 252, 210, 201, 226, 23, 114, 193, 229, 123, 251, 93, 187, 191, 44, +195, 214, 222, 243, 9, 180, 215, 34, 89, 67, 220, 162, 195, 200, 67, 126, +247, 59, 142, 35, 82, 238, 128, 25, 51, 135, 152, 238, 100, 52, 59, 118, +152, 147, 111, 133, 138, 41, 196, 210, 24, 241, 10, 35, 73, 163, 94, 97, +181, 32, 144, 24, 172, 191, 205, 12, 25, 230, 108, 130, 138, 248, 164, 98, +141, 92, 99, 56, 180, 192, 55, 63, 70, 173, 164, 57, 26, 95, 135, 243, +255, 159, 211, 163, 47, 128, 71, 155, 98, 187, 81, 159, 191, 1, 55, 225, +241, 16, 174, 240, 168, 122, 37, 40, 97, 207, 157, 157, 176, 7, 252, 81, +133, 214, 128, 83, 249, 33, 72, 143, 4, 87, 8, 197, 231, 21, 222, 74, +138, 132, 149, 108, 102, 24, 221, 154, 83, 187, 80, 31, 7, 63, 116, 180, +169, 84, 202, 18, 188, 14, 118, 98, 166, 75, 244, 10, 1, 219, 79, 105, +163, 0, 249, 253, 96, 86, 201, 39, 97, 83, 83, 174, 48, 249, 73, 39, +191, 208, 168, 34, 67, 151, 254, 16, 18, 135, 92, 157, 224, 225, 41, 254, +45, 203, 41, 197, 216, 141, 15, 210, 33, 219, 67, 189, 220, 69, 50, 19, +79, 43, 75, 122, 1, 93, 44, 65, 197, 15, 29, 234, 39, 175, 233, 136, +5, 65, 123, 116, 109, 136, 63, 92, 59, 31, 158, 1, 40, 219, 158, 94, +39, 236, 207, 198, 124, 247, 209, 150, 168, 146, 27, 164, 80, 109, 251, 220, +101, 150, 29, 142, 44, 199, 71, 232, 27, 36, 118, 69, 230, 84, 26, 172, +252, 227, 46, 19, 35, 168, 239, 5, 15, 220, 128, 95, 212, 106, 205, 242, +56, 128, 9, 20, 28, 24, 33, 11, 177, 244, 110, 237, 131, 233, 183, 223, +121, 115, 90, 225, 223, 160, 83, 66, 136, 70, 58, 153, 13, 104, 136, 207, +39, 234, 129, 140, 247, 219, 176, 72, 120, 211, 185, 133, 118, 131, 212, 59, +186, 178, 199, 228, 54, 231, 97, 187, 224, 97, 237, 206, 215, 9, 22, 12, +12, 147, 21, 38, 165, 78, 149, 245, 145, 118, 103, 245, 129, 120, 5, 142, +49, 0, 211, 224, 239, 77, 114, 48, 172, 158, 171, 19, 224, 201, 82, 218, +78, 168, 91, 134, 15, 40, 187, 114, 42, 26, 8, 142, 211, 61, 233, 8, +155, 177, 147, 149, 232, 160, 1, 177, 135, 245, 144, 69, 22, 157, 156, 200, +109, 133, 201, 157, 212, 254, 134, 213, 191, 255, 101, 255, 20, 235, 105, 62, +221, 210, 159, 64, 246, 136, 181, 60, 41, 149, 129, 224, 46, 79, 173, 136, +105, 125, 192, 244, 16, 236, 172, 194, 247, 136, 160, 191, 219, 24, 101, 151, +204, 189, 254, 69, 160, 79, 84, 149, 43, 108, 90, 65, 16, 75, 49, 182, +29, 211, 188, 135, 145, 131, 108, 143, 97, 95, 38, 38, 244, 117, 92, 157, +91, 38, 118, 118, 134, 108, 123, 83, 215, 239, 228, 186, 45, 112, 202, 166, +127, 199, 80, 183, 251, 112, 113, 237, 49, 148, 92, 31, 54, 242, 208, 12, +47, 101, 74, 79, 19, 78, 122, 60, 125, 85, 133, 3, 52, 123, 236, 60, +62, 178, 101, 111, 91, 89, 228, 63, 62, 116, 53, 148, 71, 46, 153, 133, +244, 59, 87, 117, 171, 67, 182, 119, 3, 204, 215, 205, 128, 248, 11, 59, +34, 15, 115, 249, 177, 240, 198, 58, 52, 23, 101, 132, 118, 39, 181, 199, +49, 39, 98, 196, 23, 179, 199, 62, 65, 165, 246, 218, 161, 150, 163, 253, +94, 124, 215, 10, 245, 71, 135, 168, 59, 251, 229, 157, 39, 75, 179, 211, +83, 33, 172, 81, 2, 30, 222, 174, 66, 80, 11, 196, 187, 123, 255, 127, +187, 208, 236, 106, 88, 54, 93, 253, 37, 33, 155, 82, 26, 156, 57, 87, +148, 130, 44, 84, 207, 171, 200, 131, 82, 28, 61, 122, 155, 114, 160, 253, +29, 177, 50, 168, 100, 73, 18, 132, 92, 136, 67, 24, 156, 149, 164, 120, +109, 130, 170, 156, 164, 248, 104, 83, 152, 231, 211, 100, 78, 59, 170, 147, +101, 86, 254, 127, 143, 124, 178, 232, 35, 35, 243, 3, 220, 198, 182, 146, +71, 250, 50, 61, 152, 253, 101, 219, 219, 159, 58, 34, 239, 111, 144, 29, +8, 99, 24, 212, 123, 176, 171, 0, 132, 253, 35, 140, 166, 157, 68, 215, +217, 105, 78, 224, 18, 118, 216, 79, 227, 101, 59, 153, 27, 217, 243, 250, +193, 213, 100, 184, 69, 78, 229, 7, 144, 107, 5, 214, 223, 139, 123, 44, +140, 165, 131, 215, 65, 77, 181, 143, 101, 218, 198, 87, 47, 191, 10, 102, +231, 0, 239, 23, 128, 83, 11, 218, 62, 104, 185, 73, 211, 216, 40, 70, +231, 92, 187, 172, 255, 66, 159, 93, 156, 35, 172, 123, 2, 230, 123, 236, +241, 154, 88, 136, 179, 147, 174, 89, 50, 5, 158, 169, 128, 127, 215, 231, +82, 83, 159, 66, 241, 205, 103, 143, 20, 248, 239, 143, 31, 210, 249, 39, +25, 8, 8, 242, 111, 111, 188, 35, 190, 251, 17, 114, 164, 49, 24, 113, +159, 50, 115, 56, 190, 180, 91, 125, 237, 99, 116, 211, 36, 208, 115, 12, +73, 61, 99, 110, 81, 64, 83, 163, 131, 154, 211, 9, 165, 11, 30, 177, +177, 43, 241, 7, 108, 203, 224, 75, 25, 246, 160, 33, 148, 32, 131, 183, +190, 0, 219, 28, 208, 242, 134, 174, 91, 92, 51, 36, 240, 43, 139, 147, +101, 183, 51, 216, 249, 42, 166, 52, 133, 115, 249, 6, 240, 23, 27, 23, +77, 180, 40, 175, 240, 173, 104, 70, 137, 83, 82, 171, 155, 215, 136, 131, +4, 172, 19, 100, 255, 146, 160, 199, 128, 177, 130, 163, 56, 104, 107, 102, +44, 178, 196, 187, 0, 38, 53, 230, 191, 148, 218, 207, 105, 66, 106, 103, +52, 241, 119, 233, 63, 63, 182, 45, 101, 61, 210, 89, 175, 101, 98, 89, +172, 252, 236, 36, 54, 143, 131, 55, 35, 189, 128, 57, 73, 34, 229, 250, +206, 253, 43, 37, 53, 136, 172, 73, 221, 27, 205, 207, 21, 120, 92, 6, +220, 166, 66, 95, 45, 241, 209, 112, 72, 22, 31, 221, 232, 220, 157, 248, +78, 105, 214, 230, 41, 193, 211, 46, 249, 26, 11, 242, 42, 225, 116, 207, +166, 141, 116, 185, 223, 86, 218, 190, 255, 185, 250, 199, 181, 56, 188, 132, +37, 27, 85, 248, 112, 161, 182, 164, 153, 129, 40, 37, 13, 8, 67, 236, +36, 182, 151, 130, 96, 131, 65, 26, 103, 239, 65, 243, 234, 162, 7, 90, +237, 24, 99, 145, 47, 181, 99, 65, 38, 36, 112, 157, 239, 225, 127, 161, +168, 6, 66, 231, 252, 142, 154, 225, 138, 189, 243, 66, 142, 71, 61, 239, +55, 230, 59, 40, 224, 134, 104, 100, 189, 166, 249, 66, 91, 146, 154, 28, +67, 78, 138, 40, 114, 71, 172, 3, 168, 233, 9, 106, 228, 143, 56, 193, +227, 243, 144, 51, 222, 94, 224, 43, 79, 149, 212, 245, 52, 68, 200, 17, +235, 45, 164, 147, 62, 118, 52, 216, 195, 78, 13, 66, 190, 188, 241, 142, +234, 182, 85, 48, 148, 214, 123, 57, 223, 188, 229, 119, 169, 180, 193, 70, +250, 215, 249, 29, 88, 123, 88, 226, 210, 171, 170, 32, 80, 85, 3, 26, +219, 109, 97, 134, 11, 96, 118, 71, 130, 86, 182, 77, 116, 137, 214, 28, +140, 242, 227, 178, 167, 200, 214, 175, 107, 96, 132, 33, 40, 64, 93, 206, +90, 129, 132, 221, 170, 242, 113, 235, 251, 172, 193, 35, 58, 85, 70, 9, +75, 104, 71, 161, 99, 214, 6, 33, 204, 250, 172, 199, 33, 183, 246, 250, +109, 251, 50, 106, 114, 16, 134, 150, 19, 219, 21, 60, 63, 251, 204, 157, +45, 106, 233, 133, 154, 145, 135, 201, 77, 59, 178, 176, 217, 109, 236, 19, +19, 200, 5, 165, 235, 81, 14, 42, 153, 40, 189, 86, 92, 90, 239, 77, +53, 136, 65, 112, 94, 130, 104, 71, 55, 79, 22, 250, 34, 178, 14, 91, +24, 145, 250, 4, 197, 96, 72, 118, 142, 31, 83, 137, 14, 57, 115, 36, +202, 144, 10, 19, 123, 176, 23, 93, 35, 90, 145, 73, 163, 124, 66, 156, +8, 82, 243, 22, 204, 59, 77, 49, 222, 1, 246, 7, 75, 15, 234, 110, +9, 232, 29, 156, 239, 250, 88, 24, 244, 123, 15, 169, 66, 180, 254, 210, +233, 134, 27, 100, 162, 103, 158, 223, 149, 226, 167, 140, 53, 34, 57, 105, +221, 112, 116, 72, 207, 169, 98, 200, 189, 33, 72, 181, 162, 166, 4, 29, +98, 157, 184, 244, 188, 127, 186, 35, 186, 202, 24, 21, 185, 160, 63, 17, +112, 78, 96, 49, 87, 60, 154, 215, 49, 196, 179, 122, 60, 253, 154, 86, +177, 227, 70, 1, 80, 205, 58, 66, 103, 146, 170, 108, 34, 134, 149, 134, +160, 225, 152, 63, 18, 199, 101, 158, 199, 235, 124, 98, 105, 8, 62, 100, +92, 248, 81, 59, 108, 190, 156, 216, 106, 103, 90, 69, 199, 160, 21, 66, +203, 125, 157, 189, 8, 115, 15, 158, 77, 105, 124, 171, 180, 227, 134, 50, +208, 245, 254, 35, 231, 215, 231, 193, 218, 216, 68, 204, 229, 233, 95, 120, +177, 105, 108, 92, 9, 181, 119, 196, 19, 97, 5, 145, 254, 112, 156, 70, +9, 68, 39, 84, 33, 80, 2, 21, 228, 184, 145, 218, 19, 202, 231, 144, +3, 29, 22, 14, 146, 193, 90, 216, 63, 95, 197, 70, 198, 68, 235, 132, +16, 31, 100, 179, 19, 105, 19, 178, 210, 222, 118, 148, 37, 202, 50, 222, +84, 246, 89, 36, 25, 183, 80, 175, 79, 154, 38, 119, 89, 125, 133, 56, +21, 61, 187, 123, 80, 224, 187, 15, 84, 46, 19, 1, 24, 246, 250, 32, +226, 193, 49, 118, 252, 1, 47, 172, 161, 175, 60, 113, 56, 248, 198, 100, +117, 78, 138, 154, 40, 231, 118, 120, 23, 223, 8, 239, 145, 51, 43, 82, +146, 83, 129, 43, 146, 75, 171, 20, 186, 157, 174, 137, 205, 187, 198, 37, +10, 108, 65, 154, 212, 207, 63, 178, 11, 51, 5, 62, 172, 122, 219, 147, +16, 223, 243, 134, 146, 161, 173, 118, 113, 185, 212, 199, 29, 83, 5, 241, +42, 54, 160, 57, 100, 116, 111, 218, 193, 39, 66, 67, 141, 161, 179, 141, +54, 87, 16, 43, 15, 93, 41, 240, 62, 66, 231, 59, 42, 48, 46, 207, +141, 27, 160, 156, 247, 138, 129, 130, 68, 34, 66, 69, 177, 45, 108, 26, +36, 50, 109, 46, 238, 82, 187, 219, 166, 225, 115, 204, 121, 228, 122, 92, +65, 67, 69, 162, 104, 10, 117, 17, 33, 113, 110, 10, 9, 2, 41, 24, +227, 173, 49, 10, 2, 147, 115, 197, 93, 133, 139, 86, 38, 138, 102, 92, +17, 94, 115, 74, 101, 5, 12, 222, 186, 229, 16, 126, 16, 234, 105, 191, +184, 182, 27, 59, 152, 118, 179, 114, 78, 65, 15, 21, 43, 215, 7, 215, +110, 207, 152, 128, 14, 106, 188, 73, 230, 183, 23, 101, 92, 95, 250, 115, +245, 40, 58, 167, 157, 201, 1, 229, 233, 39, 243, 103, 253, 104, 135, 248, +219, 74, 127, 91, 135, 224, 240, 42, 6, 70, 70, 48, 23, 52, 78, 12, +212, 203, 55, 134, 108, 107, 185, 237, 129, 120, 234, 54, 243, 252, 231, 19, +190, 190, 46, 48, 115, 200, 145, 119, 195, 140, 122, 21, 85, 120, 189, 33, +208, 59, 39, 181, 57, 55, 128, 144, 149, 120, 65, 77, 113, 75, 203, 194, +251, 217, 77, 110, 56, 54, 93, 240, 101, 219, 52, 174, 163, 153, 193, 24, +16, 112, 103, 178, 252, 57, 2, 7, 55, 184, 80, 176, 248, 128, 236, 73, +250, 66, 218, 63, 16, 230, 149, 32, 149, 237, 199, 168, 81, 147, 63, 211, +251, 112, 223, 62, 92, 60, 114, 156, 203, 12, 225, 232, 250, 166, 123, 194, +227, 56, 82, 4, 104, 168, 170, 38, 93, 122, 232, 207, 228, 68, 58, 247, +162, 96, 128, 20, 249, 114, 93, 37, 199, 229, 152, 134, 168, 14, 212, 153, +137, 31, 241, 189, 163, 223, 247, 196, 22, 67, 27, 105, 10, 235, 28, 24, +177, 249, 230, 19, 247, 145, 228, 151, 195, 17, 201, 93, 226, 167, 76, 227, +85, 207, 200, 139, 37, 148, 40, 243, 214, 60, 55, 241, 183, 126, 160, 97, +6, 129, 104, 182, 207, 250, 77, 123, 235, 211, 158, 171, 52, 171, 186, 53, +121, 24, 137, 105, 164, 247, 172, 132, 201, 31, 135, 123, 0, 164, 164, 235, +167, 103, 63, 40, 54, 102, 46, 197, 185, 194, 14, 195, 159, 182, 120, 4, +36, 14, 194, 219, 155, 23, 233, 148, 169, 113, 158, 92, 103, 68, 247, 133, +214, 252, 9, 220, 50, 198, 251, 75, 34, 10, 115, 209, 172, 147, 168, 185, +81, 70, 174, 155, 80, 111, 246, 78, 199, 155, 192, 2, 241, 162, 123, 123, +77, 228, 101, 22, 241, 89, 245, 63, 3, 235, 76, 162, 20, 12, 81, 228, +254, 50, 146, 76, 149, 112, 226, 88, 231, 167, 229, 27, 250, 21, 98, 84, +235, 251, 213, 238, 209, 111, 34, 144, 181, 190, 22, 60, 112, 244, 98, 241, +19, 51, 163, 4, 198, 8, 50, 194, 200, 241, 155, 192, 97, 95, 173, 49, +94, 169, 112, 21, 87, 23, 229, 226, 75, 60, 134, 126, 21, 10, 86, 84, +238, 113, 19, 77, 205, 3, 158, 105, 241, 98, 86, 237, 233, 190, 97, 136, +202, 234, 147, 121, 253, 156, 176, 238, 222, 71, 35, 185, 127, 212, 211, 0, +86, 129, 131, 93, 111, 167, 121, 138, 69, 251, 4, 90, 229, 43, 48, 144, +138, 0, 48, 249, 202, 203, 46, 117, 175, 27, 96, 230, 119, 93, 156, 129, +186, 122, 133, 114, 160, 196, 50, 81, 97, 63, 13, 188, 146, 63, 4, 220, +222, 165, 9, 236, 124, 117, 145, 91, 244, 186, 233, 35, 78, 241, 45, 38, +127, 179, 165, 20, 253, 131, 171, 41, 230, 158, 162, 83, 50, 19, 23, 83, +128, 121, 67, 248, 17, 145, 98, 112, 190, 250, 237, 243, 248, 64, 146, 41, +16, 44, 154, 33, 60, 162, 161, 156, 229, 176, 172, 49, 42, 240, 235, 85, +90, 162, 151, 170, 183, 27, 21, 183, 40, 134, 187, 193, 75, 183, 76, 63, +235, 27, 90, 133, 26, 138, 83, 150, 77, 206, 233, 166, 204, 90, 125, 211, +133, 229, 10, 166, 12, 146, 184, 152, 107, 242, 245, 52, 145, 154, 34, 249, +13, 102, 253, 209, 20, 3, 225, 88, 156, 137, 30, 182, 206, 211, 255, 149, +39, 64, 133, 16, 125, 5, 115, 220, 51, 122, 242, 121, 222, 212, 239, 237, +208, 31, 72, 98, 36, 131, 185, 9, 124, 14, 55, 236, 196, 38, 68, 82, +17, 197, 255, 168, 199, 158, 94, 52, 58, 126, 100, 57, 118, 184, 214, 42, +65, 249, 156, 128, 82, 139, 234, 63, 119, 55, 89, 108, 207, 209, 226, 34, +198, 134, 54, 131, 154, 87, 96, 31, 11, 241, 1, 11, 97, 61, 167, 20, +223, 188, 163, 31, 250, 189, 13, 29, 196, 209, 218, 119, 102, 13, 172, 149, +149, 219, 251, 64, 238, 211, 212, 136, 82, 237, 150, 140, 188, 201, 123, 191, +83, 133, 193, 253, 25, 27, 246, 72, 60, 212, 227, 241, 209, 206, 142, 29, +11, 11, 146, 182, 203, 214, 25, 192, 236, 197, 176, 6, 216, 105, 145, 191, +115, 161, 107, 170, 194, 121, 148, 205, 65, 116, 157, 96, 173, 217, 30, 96, +174, 239, 178, 151, 121, 46, 3, 86, 65, 32, 120, 195, 66, 86, 144, 206, +91, 36, 148, 42, 216, 208, 164, 203, 149, 69, 230, 49, 78, 224, 177, 23, +175, 103, 191, 111, 181, 130, 255, 215, 189, 173, 134, 189, 64, 36, 226, 134, +89, 116, 138, 92, 81, 246, 202, 10, 243, 21, 81, 165, 210, 235, 49, 99, +217, 19, 184, 54, 71, 102, 132, 49, 135, 228, 156, 67, 170, 38, 173, 200, +239, 244, 255, 65, 211, 100, 161, 118, 111, 218, 219, 87, 23, 57, 9, 246, +102, 252, 157, 205, 98, 12, 97, 198, 183, 141, 223, 154, 23, 180, 123, 80, +156, 144, 231, 95, 42, 135, 31, 244, 164, 121, 138, 116, 154, 207, 222, 138, +32, 84, 185, 56, 114, 9, 244, 11, 213, 237, 166, 91, 31, 217, 20, 179, +168, 121, 139, 237, 181, 221, 90, 174, 2, 176, 34, 210, 130, 241, 130, 240, +178, 89, 176, 130, 185, 243, 52, 101, 116, 112, 6, 60, 84, 6, 110, 29, +246, 66, 10, 164, 130, 46, 75, 163, 179, 45, 250, 32, 57, 48, 74, 169, +133, 44, 167, 241, 103, 31, 119, 243, 74, 208, 4, 162, 17, 11, 72, 126, +10, 81, 117, 188, 103, 222, 163, 78, 206, 72, 216, 73, 2, 221, 230, 122, +107, 141, 126, 1, 236, 63, 51, 169, 160, 14, 165, 208, 174, 9, 91, 74, +252, 146, 198, 79, 238, 175, 39, 102, 75, 150, 40, 109, 143, 117, 77, 153, +234, 82, 38, 162, 23, 242, 107, 124, 217, 13, 51, 55, 92, 1, 28, 138, +62, 209, 69, 222, 63, 62, 150, 221, 74, 232, 220, 181, 21, 36, 203, 182, +193, 183, 173, 113, 157, 241, 208, 131, 172, 0, 176, 55, 229, 63, 54, 84, +197, 105, 196, 154, 60, 52, 50, 191, 230, 202, 129, 85, 235, 75, 245, 172, +58, 230, 0, 251, 250, 104, 123, 247, 224, 120, 118, 30, 50, 223, 144, 233, +243, 213, 58, 228, 124, 24, 168, 194, 24, 192, 4, 63, 107, 39, 55, 202, +196, 254, 149, 141, 189, 136, 218, 108, 203, 100, 198, 121, 240, 252, 208, 200, +230, 178, 117, 199, 2, 55, 165, 214, 210, 246, 142, 178, 63, 86, 249, 156, +100, 172, 202, 197, 148, 222, 76, 185, 221, 248, 71, 7, 231, 224, 158, 236, +27, 44, 53, 58, 181, 65, 176, 146, 223, 254, 5, 249, 207, 218, 160, 212, +245, 14, 114, 246, 153, 139, 55, 230, 89, 143, 125, 133, 103, 249, 123, 91, +229, 195, 214, 65, 251, 219, 11, 48, 167, 72, 9, 131, 110, 207, 244, 197, +159, 23, 51, 161, 135, 251, 220, 52, 242, 122, 199, 21, 231, 34, 185, 84, +140, 112, 3, 164, 231, 64, 162, 192, 103, 182, 162, 112, 2, 142, 22, 148, +62, 71, 79, 232, 85, 38, 15, 87, 230, 232, 112, 203, 94, 230, 172, 233, +219, 158, 246, 87, 61, 155, 22, 14, 157, 23, 61, 99, 196, 97, 70, 216, +173, 236, 211, 120, 197, 28, 231, 47, 215, 66, 71, 46, 66, 28, 29, 223, +77, 173, 144, 82, 220, 222, 99, 229, 74, 53, 88, 116, 123, 162, 240, 168, +216, 142, 205, 144, 183, 127, 135, 4, 162, 91, 176, 78, 26, 178, 249, 104, +195, 76, 105, 206, 143, 20, 158, 220, 22, 67, 201, 237, 78, 241, 56, 111, +63, 160, 240, 168, 131, 253, 62, 8, 51, 88, 43, 174, 217, 235, 243, 71, +50, 210, 7, 235, 56, 63, 128, 111, 32, 244, 187, 217, 170, 77, 152, 65, +7, 200, 30, 47, 83, 126, 139, 170, 142, 219, 184, 156, 54, 102, 249, 94, +32, 2, 204, 206, 77, 230, 60, 184, 143, 167, 110, 241, 203, 60, 44, 174, +128, 150, 186, 215, 218, 189, 87, 107, 216, 84, 76, 166, 171, 91, 23, 16, +208, 211, 181, 234, 61, 203, 224, 172, 128, 129, 66, 7, 249, 0, 75, 157, +235, 49, 244, 154, 157, 107, 205, 70, 146, 38, 188, 6, 218, 133, 231, 204, +168, 234, 133, 17, 245, 85, 253, 163, 242, 168, 56, 9, 99, 142, 236, 237, +67, 20, 226, 60, 4, 86, 83, 208, 243, 19, 127, 168, 6, 156, 67, 179, +66, 170, 242, 211, 170, 199, 188, 71, 231, 191, 67, 42, 109, 37, 117, 154, +231, 116, 63, 232, 206, 107, 141, 17, 127, 143, 79, 247, 160, 62, 151, 234, +116, 126, 14, 223, 8, 5, 52, 82, 8, 99, 17, 9, 7, 4, 208, 106, +11, 208, 156, 157, 85, 51, 236, 128, 41, 66, 99, 243, 220, 153, 131, 111, +78, 189, 95, 219, 51, 100, 41, 150, 188, 218, 35, 37, 176, 31, 122, 252, +207, 222, 214, 142, 95, 19, 136, 159, 195, 209, 39, 182, 19, 97, 185, 72, +83, 165, 208, 249, 83, 4, 244, 230, 30, 7, 13, 161, 90, 200, 121, 138, +67, 151, 252, 197, 165, 44, 215, 9, 81, 118, 179, 159, 15, 3, 156, 105, +151, 104, 109, 161, 202, 143, 199, 41, 187, 172, 154, 64, 105, 69, 67, 173, +226, 34, 234, 111, 69, 244, 45, 230, 49, 11, 18, 158, 56, 184, 55, 124, +46, 252, 215, 109, 236, 124, 156, 172, 148, 159, 44, 147, 129, 50, 49, 230, +128, 213, 137, 161, 125, 140, 222, 36, 90, 117, 223, 146, 237, 122, 39, 118, +188, 93, 11, 40, 49, 114, 230, 80, 31, 221, 58, 199, 174, 192, 112, 31, +236, 98, 56, 76, 27, 199, 78, 28, 48, 62, 246, 207, 30, 85, 50, 31, +4, 143, 58, 241, 131, 83, 203, 70, 241, 124, 150, 160, 88, 30, 227, 177, +213, 75, 139, 122, 83, 83, 41, 97, 140, 78, 157, 188, 172, 85, 52, 202, +76, 47, 145, 76, 126, 144, 228, 49, 239, 103, 196, 149, 203, 133, 159, 201, +215, 241, 71, 245, 114, 49, 125, 228, 22, 192, 235, 230, 246, 247, 100, 110, +76, 74, 214, 226, 221, 120, 140, 250, 108, 9, 203, 40, 92, 19, 184, 136, +86, 76, 250, 177, 64, 76, 214, 79, 190, 86, 8, 131, 178, 0, 200, 171, +245, 144, 94, 2, 236, 11, 187, 119, 165, 83, 130, 252, 49, 126, 254, 131, +38, 43, 245, 170, 53, 7, 183, 205, 84, 71, 16, 127, 86, 249, 31, 169, +65, 33, 207, 146, 111, 155, 43, 145, 85, 250, 216, 38, 95, 18, 129, 186, +14, 3, 158, 43, 183, 44, 205, 90, 37, 141, 27, 130, 115, 4, 121, 67, +113, 43, 109, 251, 71, 103, 32, 129, 163, 73, 116, 252, 32, 149, 17, 150, +117, 168, 218, 56, 163, 173, 125, 84, 103, 136, 195, 89, 46, 27, 45, 153, +6, 184, 81, 93, 131, 28, 42, 171, 87, 177, 135, 109, 24, 78, 80, 103, +110, 168, 3, 251, 165, 139, 171, 25, 77, 166, 250, 193, 166, 168, 195, 160, +12, 25, 110, 36, 0, 132, 247, 199, 195, 30, 177, 14, 176, 197, 58, 142, +93, 43, 151, 126, 28, 184, 231, 179, 113, 227, 26, 165, 98, 180, 183, 218, +182, 150, 125, 231, 102, 231, 206, 39, 57, 121, 193, 43, 11, 254, 173, 29, +251, 45, 171, 106, 87, 114, 38, 58, 153, 72, 84, 193, 36, 2, 142, 215, +121, 147, 160, 11, 37, 243, 213, 217, 181, 152, 112, 191, 155, 217, 136, 117, +175, 182, 125, 134, 218, 58, 212, 239, 39, 250, 119, 220, 113, 214, 143, 204, +124, 11, 153, 200, 158, 215, 253, 40, 35, 17, 232, 45, 217, 47, 191, 159, +199, 82, 41, 106, 158, 244, 222, 254, 133, 109, 151, 43, 187, 203, 165, 61, +163, 205, 7, 217, 12, 252, 123, 90, 255, 255, 88, 221, 122, 76, 173, 185, +85, 185, 33, 228, 226, 161, 72, 217, 34, 197, 140, 190, 18, 7, 142, 177, +203, 49, 93, 91, 12, 12, 29, 35, 100, 136, 58, 22, 174, 49, 71, 209, +218, 199, 125, 51, 110, 117, 45, 205, 141, 81, 192, 148, 211, 238, 218, 84, +227, 191, 160, 49, 110, 207, 190, 8, 156, 184, 167, 148, 228, 69, 19, 39, +3, 210, 204, 196, 230, 123, 64, 123, 133, 115, 33, 85, 15, 45, 144, 218, +31, 192, 34, 60, 208, 166, 113, 151, 122, 249, 171, 207, 8, 164, 207, 138, +246, 217, 251, 34, 27, 145, 144, 57, 60, 165, 203, 117, 199, 80, 141, 218, +36, 65, 24, 115, 33, 152, 139, 152, 34, 72, 99, 192, 219, 49, 65, 187, +217, 14, 208, 56, 62, 143, 12, 51, 225, 187, 38, 19, 114, 83, 118, 117, +17, 249, 224, 185, 225, 237, 71, 79, 67, 75, 51, 0, 92, 123, 155, 122, +154, 105, 101, 235, 17, 160, 35, 152, 108, 45, 151, 154, 92, 149, 63, 255, +77, 153, 104, 98, 208, 251, 112, 189, 38, 102, 205, 117, 255, 232, 150, 109, +51, 70, 5, 11, 224, 41, 141, 200, 227, 170, 1, 220, 34, 103, 112, 185, +169, 207, 141, 183, 172, 61, 129, 113, 126, 200, 59, 197, 93, 245, 240, 58, +232, 40, 90, 125, 37, 134, 210, 82, 118, 234, 200, 115, 169, 124, 188, 1, +172, 236, 31, 79, 211, 213, 146, 195, 206, 105, 57, 241, 59, 237, 145, 32, +6, 24, 253, 23, 60, 211, 2, 94, 42, 190, 180, 213, 177, 23, 167, 104, +3, 226, 171, 208, 95, 96, 57, 53, 141, 115, 88, 174, 10, 206, 234, 150, +182, 157, 242, 93, 97, 80, 9, 154, 152, 166, 94, 141, 238, 212, 68, 231, +244, 0, 36, 167, 2, 9, 169, 16, 151, 170, 33, 51, 1, 105, 210, 194, +224, 146, 221, 227, 137, 63, 144, 14, 5, 140, 30, 193, 203, 47, 90, 20, +233, 169, 66, 192, 91, 252, 161, 140, 67, 202, 12, 24, 190, 242, 46, 208, +121, 8, 194, 164, 164, 125, 216, 194, 242, 125, 131, 35, 5, 45, 18, 152, +157, 240, 35, 56, 246, 144, 175, 2, 7, 123, 13, 158, 168, 115, 221, 195, +54, 236, 35, 132, 246, 7, 100, 108, 120, 17, 23, 210, 61, 238, 38, 73, +149, 28, 249, 29, 5, 232, 28, 131, 84, 79, 155, 26, 82, 96, 150, 219, +122, 167, 231, 56, 233, 176, 154, 213, 126, 14, 155, 13, 68, 157, 25, 236, +244, 64, 125, 74, 247, 241, 123, 177, 102, 43, 244, 122, 173, 75, 132, 244, +248, 236, 246, 161, 138, 68, 86, 2, 52, 121, 232, 96, 100, 207, 238, 219, +64, 197, 162, 8, 97, 144, 89, 121, 66, 146, 166, 233, 7, 145, 217, 223, +51, 254, 128, 1, 211, 1, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 10, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 10, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 10, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 10, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 10, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 10, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, +48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 10, 99, +108, 101, 97, 114, 116, 111, 109, 97, 114, 107, 10, 128, 3 +}; diff --git a/source/blender/editors/gpencil/gpencil_buttons.c b/source/blender/editors/gpencil/gpencil_buttons.c index 760faf01b6c..53ef16a70a0 100644 --- a/source/blender/editors/gpencil/gpencil_buttons.c +++ b/source/blender/editors/gpencil/gpencil_buttons.c @@ -143,9 +143,9 @@ static void gp_drawui_layer (uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, con /* name */ if (gpl->flag & GP_LAYER_HIDE) - sprintf(name, "%s (Hidden)", gpl->info); + BLI_snprintf(name, sizeof(name), "%s (Hidden)", gpl->info); else - sprintf(name, "%s (Locked)", gpl->info); + BLI_snprintf(name, sizeof(name), "%s (Locked)", gpl->info); uiItemL(sub, name, ICON_NONE); /* delete button (only if hidden but not locked!) */ diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h index 2e9186b6c2f..d345f16b768 100644 --- a/source/blender/editors/include/ED_armature.h +++ b/source/blender/editors/include/ED_armature.h @@ -62,7 +62,7 @@ typedef struct EditBone normal bones when leaving editmode. */ void *temp; /* Used to store temporary data */ - char name[32]; + char name[64]; /* MAX_NAME */ float roll; /* Roll along axis. We'll ultimately use the axis/angle method for determining the transformation matrix of the bone. The axis is tail-head while roll provides the angle. Refer to Graphics diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h index 27c61e98e21..957b58b141c 100644 --- a/source/blender/editors/include/ED_image.h +++ b/source/blender/editors/include/ED_image.h @@ -66,5 +66,8 @@ int ED_space_image_show_uvshadow(struct SpaceImage *sima, struct Object *obedit) /* UI level image (texture) updating... render calls own stuff (too) */ void ED_image_update_frame(const struct Main *mainp, int cfra); +void ED_image_draw_info(struct ARegion *ar, int color_manage, int channels, + int x, int y, const char cp[4], const float fp[4], int *zp, float *zpf); + #endif /* ED_IMAGE_H */ diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 0562f400700..2148b0d04a6 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -266,8 +266,8 @@ int lasso_inside_edge(int mcords[][2], short moves, int x0, int y0, int x1, int /* get 3d region from context, also if mouse is in header or toolbar */ struct RegionView3D *ED_view3d_context_rv3d(struct bContext *C); -struct ARegion *ED_view3d_context_region_unlock(struct bContext *C); -int ED_operator_rv3d_unlock_poll(struct bContext *C); +int ED_view3d_context_user_region(struct bContext *C, struct View3D **v3d_r, struct ARegion **ar_r); +int ED_operator_rv3d_user_region_poll(struct bContext *C); void ED_view3d_init_mats_rv3d(struct Object *ob, struct RegionView3D *rv3d); void ED_view3d_init_mats_rv3d_gl(struct Object *ob, struct RegionView3D *rv3d); @@ -287,7 +287,8 @@ void ED_view3d_quadview_update(struct ScrArea *sa, struct ARegion *ar, short do_ int ED_view3d_lock(struct RegionView3D *rv3d); uint64_t ED_view3d_datamask(struct Scene *scene, struct View3D *v3d); -uint64_t ED_viewedit_datamask(struct bScreen *screen); +uint64_t ED_view3d_screen_datamask(struct bScreen *screen); +uint64_t ED_view3d_object_datamask(struct Scene *scene); /* camera lock functions */ int ED_view3d_camera_lock_check(struct View3D *v3d, struct RegionView3D *rv3d); diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 4948073f9c6..7ff69277843 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -831,7 +831,9 @@ static void ui_menu_block_set_keymaps(const bContext *C, uiBlock *block) if(but->optype) { IDProperty *prop= (but->opptr)? but->opptr->data: NULL; - if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE, buf, sizeof(buf))) { + if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE, + buf, sizeof(buf))) + { UI_MENU_KEY_STR_CAT } } @@ -846,7 +848,9 @@ static void ui_menu_block_set_keymaps(const bContext *C, uiBlock *block) IDP_AssignString(prop_menu_name, mt->idname, sizeof(mt->idname)); - if(WM_key_event_operator_string(C, "WM_OT_call_menu", WM_OP_INVOKE_REGION_WIN, prop_menu, FALSE, buf, sizeof(buf))) { + if(WM_key_event_operator_string(C, "WM_OT_call_menu", WM_OP_INVOKE_REGION_WIN, prop_menu, FALSE, + buf, sizeof(buf))) + { UI_MENU_KEY_STR_CAT } } @@ -2920,7 +2924,7 @@ static void autocomplete_id(bContext *C, char *str, void *arg_v) /* search if str matches the beginning of an ID struct */ if(str[0]) { - AutoComplete *autocpl= autocomplete_begin(str, 22); + AutoComplete *autocpl= autocomplete_begin(str, MAX_ID_NAME-2); ID *id; for(id= listb->first; id; id= id->next) diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index 1f1228a9bc5..56f7fd04080 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -1511,8 +1511,8 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc else if(scopes->track_preview) { /* additional margin around image */ /* NOTE: should be kept in sync with value from BKE_movieclip_update_scopes */ - const int margin= 2; - float zoomx, zoomy, track_pos[2], off_x, off_y; + const int margin= 3; + float zoomx, zoomy, track_pos[2], off_x, off_y, x0, y0; int a; ImBuf *drawibuf; @@ -1529,11 +1529,11 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc off_x= ((int)track_pos[0]-track_pos[0]+0.5)*zoomx; off_y= ((int)track_pos[1]-track_pos[1]+0.5)*zoomy; + x0= (int)(off_x+rect.xmin-zoomx*(margin-0.5f))+1; + y0= (int)(off_y+rect.ymin-zoomy*(margin-0.5f))+1; drawibuf= scale_trackpreview_ibuf(scopes->track_preview, zoomx, zoomy); - glaDrawPixelsSafe(off_x+rect.xmin-zoomx*(margin-0.5f), off_y+rect.ymin-zoomy*(margin-0.5f), - rect.xmax-rect.xmin+2+(int)(zoomx*(margin-0.5f)-off_x), - rect.ymax-rect.ymin+2+(int)(zoomy*(margin-0.5f)-off_y), + glaDrawPixelsSafe(x0, y0, rect.xmax-x0+1, rect.ymax-y0+1, drawibuf->x, GL_RGBA, GL_UNSIGNED_BYTE, drawibuf->rect); IMB_freeImBuf(drawibuf); diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 525b15ac7e3..3a19bb2a90c 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -4388,7 +4388,9 @@ static void but_shortcut_name_func(bContext *C, void *arg1, int UNUSED(event)) IDProperty *prop= (but->opptr)? but->opptr->data: NULL; /* complex code to change name of button */ - if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE, buf, sizeof(buf))) { + if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE, + buf, sizeof(buf))) + { char *butstr_orig; // XXX but->str changed... should not, remove the hotkey from it diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index e4cc605e3f5..e31d7e39d89 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -444,7 +444,7 @@ extern void ui_draw_aligned_panel(struct uiStyle *style, uiBlock *block, rcti *r /* interface_draw.c */ extern void ui_dropshadow(rctf *rct, float radius, float aspect, int select); -void ui_draw_gradient(rcti *rect, float *hsv, int type, float alpha); +void ui_draw_gradient(rcti *rect, const float hsv[3], int type, float alpha); void ui_draw_but_HISTOGRAM(ARegion *ar, uiBut *but, struct uiWidgetColors *wcol, rcti *rect); void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, struct uiWidgetColors *wcol, rcti *rect); diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 84f0c61cd0c..a01efa25d19 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -1208,7 +1208,7 @@ static void rna_search_cb(const struct bContext *C, void *arg_but, const char *s if(itemptr.type && RNA_struct_is_ID(itemptr.type)) { ID *id= itemptr.data; - char name_ui[32]; + char name_ui[MAX_ID_NAME]; #if 0 /* this name is used for a string comparison and can't be modified, TODO */ name_uiprefix_id(name_ui, id); @@ -2742,6 +2742,11 @@ const char *uiLayoutIntrospect(uiLayout *layout) return str; } +static void ui_layout_operator_buts__reset_cb(bContext *UNUSED(C), void *op_pt, void *UNUSED(arg_dummy2)) +{ + WM_operator_properties_reset((wmOperator *)op_pt); +} + /* this function does not initialize the layout, functions can be called on the layout before and after */ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,int (*check_prop)(struct PointerRNA *, struct PropertyRNA *), const char label_align, const short flag) { @@ -2803,7 +2808,22 @@ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,in uiItemL(layout, IFACE_("No Properties"), ICON_NONE); } } - + + /* its possible that reset can do nothing if all have PROP_SKIP_SAVE enabled + * but this is not so important if this button is drawn in those cases + * (which isn't all that likely anyway) - campbell */ + if (op->properties->len) { + uiBlock *block; + uiBut *but; + uiLayout *col; /* needed to avoid alignment errors with previous buttons */ + + col= uiLayoutColumn(layout, 0); + block= uiLayoutGetBlock(col); + but = uiDefIconTextBut(block , BUT, 0, ICON_FILE_REFRESH, "Reset", 0, 0, 18, 20, NULL, 0.0, 0.0, 0.0, 0.0, + "Reset operator defaults"); + uiButSetFunc(but, ui_layout_operator_buts__reset_cb, op, NULL); + } + /* set various special settings for buttons */ { uiBut *but; diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index c535f2c1ad0..0c5aed83c1b 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -409,7 +409,9 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) /* operator keymap (not menus, they already have it) */ prop= (but->opptr)? but->opptr->data: NULL; - if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE, buf, sizeof(buf))) { + if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE, + buf, sizeof(buf))) + { BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Shortcut: %s"), buf); data->color[data->totline]= 0x888888; data->totline++; @@ -2109,7 +2111,7 @@ uiBlock *ui_block_func_COL(bContext *C, uiPopupBlockHandle *handle, void *arg_bu uiBut *but= arg_but; uiBlock *block; - block= uiBeginBlock(C, handle->region, "colorpicker", UI_EMBOSS); + block= uiBeginBlock(C, handle->region, __func__, UI_EMBOSS); if (but->rnaprop) { if (RNA_property_subtype(but->rnaprop) == PROP_COLOR_GAMMA) { @@ -2299,8 +2301,8 @@ uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut uiStyle *style= UI_GetStyle(); uiPopupBlockHandle *handle; uiPopupMenu *pup; - pup= MEM_callocN(sizeof(uiPopupMenu), "menu dummy"); - pup->block= uiBeginBlock(C, NULL, "ui_button_menu_create", UI_EMBOSSP); + pup= MEM_callocN(sizeof(uiPopupMenu), __func__); + pup->block= uiBeginBlock(C, NULL, __func__, UI_EMBOSSP); pup->layout= uiBlockLayout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, style); pup->slideout= (but && (but->block->flag & UI_BLOCK_LOOP)); pup->but= but; @@ -2361,7 +2363,7 @@ uiPopupMenu *uiPupMenuBegin(bContext *C, const char *title, int icon) uiPopupMenu *pup= MEM_callocN(sizeof(uiPopupMenu), "popup menu"); uiBut *but; - pup->block= uiBeginBlock(C, NULL, "uiPupMenuBegin", UI_EMBOSSP); + pup->block= uiBeginBlock(C, NULL, __func__, UI_EMBOSSP); pup->block->flag |= UI_BLOCK_POPUP_MEMORY; pup->block->puphash= ui_popup_menu_hash(title); pup->layout= uiBlockLayout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, style); diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index 0e9dbaf3022..16b543737d0 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -180,7 +180,7 @@ void uiStyleFontDrawExt(uiFontStyle *fs, rcti *rect, const char *str, if (fs->kerning == 1) BLF_enable(fs->uifont_id, BLF_KERNING_DEFAULT); - BLF_draw(fs->uifont_id, str, 65535); /* XXX, use real length */ + BLF_draw(fs->uifont_id, str, BLF_DRAW_STR_DUMMY_MAX); BLF_disable(fs->uifont_id, BLF_CLIPPING); if (fs->shadow) BLF_disable(fs->uifont_id, BLF_SHADOW); @@ -243,7 +243,7 @@ void uiStyleFontDrawRotated(uiFontStyle *fs, rcti *rect, const char *str) if (fs->kerning == 1) BLF_enable(fs->uifont_id, BLF_KERNING_DEFAULT); - BLF_draw(fs->uifont_id, str, 65535); /* XXX, use real length */ + BLF_draw(fs->uifont_id, str, BLF_DRAW_STR_DUMMY_MAX); BLF_disable(fs->uifont_id, BLF_ROTATION); BLF_disable(fs->uifont_id, BLF_CLIPPING); if (fs->shadow) @@ -291,7 +291,7 @@ void UI_DrawString(float x, float y, const char *str) uiStyleFontSet(&style->widget); BLF_position(style->widget.uifont_id, x, y, 0.0f); - BLF_draw(style->widget.uifont_id, str, 65535); /* XXX, use real length */ + BLF_draw(style->widget.uifont_id, str, BLF_DRAW_STR_DUMMY_MAX); if (style->widget.kerning == 1) BLF_disable(style->widget.uifont_id, BLF_KERNING_DEFAULT); diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 8df43b92760..3a72c98e8f0 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -140,7 +140,7 @@ static void id_search_cb(const bContext *C, void *arg_template, const char *str, continue; if(BLI_strcasestr(id->name+2, str)) { - char name_ui[32]; + char name_ui[MAX_ID_NAME]; name_uiprefix_id(name_ui, id); iconid= ui_id_icon_get((bContext*)C, id, 1); @@ -181,7 +181,7 @@ static uiBlock *id_search_menu(bContext *C, ARegion *ar, void *arg_litem) /* fake button, it holds space for search items */ uiDefBut(block, LABEL, 0, "", 10, 15, w, h, NULL, 0, 0, 0, 0, NULL); - but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, 256, 10, 0, w, 19, template.prv_rows, template.prv_cols, ""); + but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, w, 19, template.prv_rows, template.prv_cols, ""); uiButSetSearchFunc(but, id_search_cb, &template, id_search_call_cb, idptr.data); } /* list view */ @@ -189,7 +189,7 @@ static uiBlock *id_search_menu(bContext *C, ARegion *ar, void *arg_litem) /* 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, 0, 0, ""); + but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, 150, 19, 0, 0, ""); uiButSetSearchFunc(but, id_search_cb, &template, id_search_call_cb, idptr.data); } @@ -414,11 +414,11 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str } if(id->us > 1) { - char str[32]; + char numstr[32]; - BLI_snprintf(str, sizeof(str), "%d", id->us); + BLI_snprintf(numstr, sizeof(numstr), "%d", id->us); - but= uiDefBut(block, BUT, 0, str, 0,0,UI_UNIT_X + ((id->us < 10) ? 0:10), UI_UNIT_Y, NULL, 0, 0, 0, 0, + but= uiDefBut(block, BUT, 0, numstr, 0,0,UI_UNIT_X + ((id->us < 10) ? 0:10), UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Display number of users of this data (click to make a single-user copy)")); uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ALONE)); @@ -1622,7 +1622,7 @@ static uiBlock *curvemap_clipping_func(bContext *C, struct ARegion *ar, void *cu uiBut *bt; float width= 8*UI_UNIT_X; - block= uiBeginBlock(C, ar, "curvemap_clipping_func", UI_EMBOSS); + block = uiBeginBlock(C, ar, __func__, UI_EMBOSS); /* use this for a fake extra empy space around the buttons */ uiDefBut(block, LABEL, 0, "", -4, 16, width+8, 6*UI_UNIT_Y, NULL, 0, 0, 0, 0, ""); @@ -1681,7 +1681,7 @@ static uiBlock *curvemap_tools_func(bContext *C, struct ARegion *ar, void *cumap uiBlock *block; short yco= 0, menuwidth=10*UI_UNIT_X; - block= uiBeginBlock(C, ar, "curvemap_tools_func", UI_EMBOSS); + block= uiBeginBlock(C, ar, __func__, UI_EMBOSS); uiBlockSetButmFunc(block, curvemap_tools_dofunc, cumap_v); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Reset View"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 1, ""); @@ -1703,7 +1703,7 @@ static uiBlock *curvemap_brush_tools_func(bContext *C, struct ARegion *ar, void uiBlock *block; short yco= 0, menuwidth=10*UI_UNIT_X; - block= uiBeginBlock(C, ar, "curvemap_tools_func", UI_EMBOSS); + block= uiBeginBlock(C, ar, __func__, UI_EMBOSS); uiBlockSetButmFunc(block, curvemap_tools_dofunc, cumap_v); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Reset View"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 1, ""); @@ -2282,7 +2282,8 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char * uiBlock *block; uiBut *but; Panel *pa; - char *name, str[32]; + const char *name; + char numstr[32]; int rnaicon=0, icon=0, i= 0, activei= 0, len= 0, items, found, min, max; /* validate arguments */ @@ -2373,7 +2374,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char * uiItemL(row, (name)? name: "", icon); if(name) - MEM_freeN(name); + MEM_freeN((void *)name); } i++; @@ -2386,8 +2387,8 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char * uiItemL(row, "", ICON_NONE); /* next/prev button */ - BLI_snprintf(str, sizeof(str), "%d :", i); - but= uiDefIconTextButR_prop(block, NUM, 0, 0, str, 0,0,UI_UNIT_X*5,UI_UNIT_Y, activeptr, activeprop, 0, 0, 0, 0, 0, ""); + BLI_snprintf(numstr, sizeof(numstr), "%d :", i); + but= uiDefIconTextButR_prop(block, NUM, 0, 0, numstr, 0,0,UI_UNIT_X*5,UI_UNIT_Y, activeptr, activeprop, 0, 0, 0, 0, 0, ""); if(i == 0) uiButSetFlag(but, UI_BUT_DISABLED); } @@ -2471,12 +2472,15 @@ static void operator_search_cb(const bContext *C, void *UNUSED(arg), const char int len= strlen(ot->name); /* display name for menu, can hold hotkey */ - BLI_strncpy(name, ot->name, 256); + BLI_strncpy(name, ot->name, sizeof(name)); /* check for hotkey */ - if(len < 256-6) { - if(WM_key_event_operator_string(C, ot->idname, WM_OP_EXEC_DEFAULT, NULL, TRUE, &name[len+1], 256-len-1)) + if(len < sizeof(name)-6) { + if (WM_key_event_operator_string(C, ot->idname, WM_OP_EXEC_DEFAULT, NULL, TRUE, + &name[len+1], sizeof(name)-len-1)) + { name[len]= '|'; + } } if(0==uiSearchItemAdd(items, name, ot, 0)) diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index d8a34262e81..f5c62f65512 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -130,9 +130,12 @@ typedef struct uiWidgetType { static float cornervec[WIDGET_CURVE_RESOLU][2]= {{0.0, 0.0}, {0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293}, {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}, {1.0, 1.0}}; -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}}; +#define WIDGET_AA_JITTER 8 +static float jit[WIDGET_AA_JITTER][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[3][2]= { {-0.352077, 0.532607}, {-0.352077, -0.549313}, {0.330000, -0.008353}}; @@ -165,14 +168,14 @@ static unsigned int check_tria_face[4][3]= { GLubyte checker_stipple_sml[32*32/8] = { - 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, \ - 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, \ - 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, \ - 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, \ - 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, \ - 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, \ - 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, \ - 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, \ + 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, + 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, + 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, + 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, + 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, + 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, + 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, + 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, }; /* ************************************************* */ @@ -192,7 +195,7 @@ void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y glVertexPointer(2, GL_FLOAT, 0, tri_arr); /* for each AA step */ - for(j=0; j<8; j++) { + for (j = 0; j < WIDGET_AA_JITTER; j++) { glTranslatef(1.0f * jit[j][0], 1.0f * jit[j][1], 0.0f); glDrawArrays(GL_TRIANGLES, 0, 3); glTranslatef(-1.0f * jit[j][0], -1.0f * jit[j][1], 0.0f); @@ -212,7 +215,7 @@ void ui_draw_anti_roundbox(int mode, float minx, float miny, float maxx, float m color[3] *= 0.125f; glColor4fv(color); - for(j=0; j<8; j++) { + for (j = 0; j < WIDGET_AA_JITTER; j++) { glTranslatef(1.0f * jit[j][0], 1.0f * jit[j][1], 0.0f); uiDrawBox(mode, minx, miny, maxx, maxy, rad); glTranslatef(-1.0f * jit[j][0], -1.0f * jit[j][1], 0.0f); @@ -749,6 +752,11 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol) float quad_strip[WIDGET_SIZE_MAX*2+2][2]; /* + 2 because the last pair is wrapped */ float quad_strip_emboss[WIDGET_SIZE_MAX*2][2]; /* only for emboss */ + const unsigned char tcol[4] = {wcol->outline[0], + wcol->outline[1], + wcol->outline[2], + UCHAR_MAX / WIDGET_AA_JITTER}; + widget_verts_to_quad_strip(wtb, wtb->totvert, quad_strip); if(wtb->emboss) { @@ -757,11 +765,11 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol) glEnableClientState(GL_VERTEX_ARRAY); - for(j=0; j<8; j++) { + for (j = 0; j < WIDGET_AA_JITTER; j++) { glTranslatef(1.0f * jit[j][0], 1.0f * jit[j][1], 0.0f); /* outline */ - glColor4ub(wcol->outline[0], wcol->outline[1], wcol->outline[2], 32); + glColor4ubv(tcol); glVertexPointer(2, GL_FLOAT, 0, quad_strip); glDrawArrays(GL_QUAD_STRIP, 0, wtb->totvert*2 + 2); @@ -782,16 +790,20 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol) /* decoration */ if(wtb->tria1.tot || wtb->tria2.tot) { + const unsigned char tcol[4] = {wcol->item[0], + wcol->item[1], + wcol->item[2], + (unsigned char)((float)wcol->item[3] / WIDGET_AA_JITTER)}; /* for each AA step */ - for(j=0; j<8; j++) { + for (j = 0; j < WIDGET_AA_JITTER; j++) { glTranslatef(1.0f * jit[j][0], 1.0f * jit[j][1], 0.0f); if(wtb->tria1.tot) { - glColor4ub(wcol->item[0], wcol->item[1], wcol->item[2], 32); + glColor4ubv(tcol); widget_trias_draw(&wtb->tria1); } if(wtb->tria2.tot) { - glColor4ub(wcol->item[0], wcol->item[1], wcol->item[2], 32); + glColor4ubv(tcol); widget_trias_draw(&wtb->tria2); } @@ -1875,7 +1887,7 @@ static void ui_draw_but_HSVCIRCLE(uiBut *but, uiWidgetColors *wcol, rcti *rect) /* ************ custom buttons, old stuff ************** */ /* draws in resolution of 20x4 colors */ -void ui_draw_gradient(rcti *rect, float *hsv, int type, float alpha) +void ui_draw_gradient(rcti *rect, const float hsv[3], int type, float alpha) { int a; float h= hsv[0], s= hsv[1], v= hsv[2]; @@ -2489,10 +2501,8 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat if (color_profile) linearrgb_to_srgb_v3_v3(col, col); - wcol->inner[0]= FTOCHAR(col[0]); - wcol->inner[1]= FTOCHAR(col[1]); - wcol->inner[2]= FTOCHAR(col[2]); - wcol->inner[3]= FTOCHAR(col[3]); + F4TOCHAR4(col, wcol->inner); + wcol->shaded = 0; wcol->alpha_check = (wcol->inner[3] < 255); @@ -3264,7 +3274,7 @@ void ui_draw_menu_item(uiFontStyle *fstyle, rcti *rect, const char *name, int ic void ui_draw_preview_item(uiFontStyle *fstyle, rcti *rect, const char *name, int iconid, int state) { rcti trect = *rect; - + float font_dims[2] = {0.0f, 0.0f}; uiWidgetType *wt= widget_type(UI_WTYPE_MENU_ITEM); wt->state(wt, state); @@ -3276,10 +3286,12 @@ void ui_draw_preview_item(uiFontStyle *fstyle, rcti *rect, const char *name, int glColor3ubv((unsigned char*)wt->wcol.text); else glColor3ubv((unsigned char*)wt->wcol.text_sel); - + + BLF_width_and_height(fstyle->uifont_id, name, &font_dims[0], &font_dims[1]); + trect.xmin += 0; - trect.xmax = trect.xmin + BLF_width(fstyle->uifont_id, name) + 10; + trect.xmax = trect.xmin + font_dims[0] + 10; trect.ymin += 10; - trect.ymax = trect.ymin + BLF_height(fstyle->uifont_id, name); + trect.ymax = trect.ymin + font_dims[1]; uiStyleFontDraw(fstyle, &trect, name); } diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 57d46de9cb7..b8201d762df 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -1507,7 +1507,7 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short static void scroll_printstr(Scene *scene, float x, float y, float val, int power, short unit, char dir) { int len; - char str[32]; + char timecode_str[32]; /* adjust the scale unit to work ok */ if (dir == 'v') { @@ -1522,10 +1522,10 @@ static void scroll_printstr(Scene *scene, float x, float y, float val, int power } /* get string to print */ - ANIM_timecode_string_from_frame(str, scene, power, (unit == V2D_UNIT_SECONDS), val); + ANIM_timecode_string_from_frame(timecode_str, scene, power, (unit == V2D_UNIT_SECONDS), val); /* get length of string, and adjust printing location to fit it into the horizontal scrollbar */ - len= strlen(str); + len= strlen(timecode_str); if (dir == 'h') { /* seconds/timecode display has slightly longer strings... */ if (unit == V2D_UNIT_SECONDS) @@ -1536,12 +1536,12 @@ static void scroll_printstr(Scene *scene, float x, float y, float val, int power /* Add degree sympbol to end of string for vertical scrollbar? */ if ((dir == 'v') && (unit == V2D_UNIT_DEGREES)) { - str[len]= 186; - str[len+1]= 0; + timecode_str[len]= 186; + timecode_str[len+1]= 0; } /* draw it */ - BLF_draw_default_ascii(x, y, 0.0f, str, sizeof(str)-1); + BLF_draw_default_ascii(x, y, 0.0f, timecode_str, sizeof(timecode_str)); } /* Draw scrollbars in the given 2d-region */ @@ -2093,11 +2093,11 @@ void UI_view2d_text_cache_draw(ARegion *ar) } if(v2s->rect.xmin >= v2s->rect.xmax) - BLF_draw_default((float)v2s->mval[0]+xofs, (float)v2s->mval[1]+yofs, 0.0, str, 65535); + BLF_draw_default((float)v2s->mval[0]+xofs, (float)v2s->mval[1]+yofs, 0.0, str, BLF_DRAW_STR_DUMMY_MAX); else { BLF_clipping_default(v2s->rect.xmin-4, v2s->rect.ymin-4, v2s->rect.xmax+4, v2s->rect.ymax+4); BLF_enable_default(BLF_CLIPPING); - BLF_draw_default(v2s->rect.xmin+xofs, v2s->rect.ymin+yofs, 0.0f, str, 65535); + BLF_draw_default(v2s->rect.xmin+xofs, v2s->rect.ymin+yofs, 0.0f, str, BLF_DRAW_STR_DUMMY_MAX); BLF_disable_default(BLF_CLIPPING); } } diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index a993e651b5f..2959d525cfb 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -1207,6 +1207,7 @@ typedef struct v2dScrollerMove { float delta; /* amount moved by mouse on axis of interest */ float scrollbarwidth; /* width of the scrollbar itself, used for page up/down clicks */ + int scrollbar_orig; /* initial location of scrollbar x/y, mouse relative */ int lastx, lasty; /* previous mouse coordinates (in screen coordinates) for determining movement */ } v2dScrollerMove; @@ -1302,15 +1303,16 @@ static void scroller_activate_init(bContext *C, wmOperator *op, wmEvent *event, vsm->v2d= v2d; vsm->ar= ar; vsm->scroller= in_scroller; - + /* store mouse-coordinates, and convert mouse/screen coordinates to region coordinates */ vsm->lastx = event->x; vsm->lasty = event->y; - /* 'zone' depends on where mouse is relative to bubble * - zooming must be allowed on this axis, otherwise, default to pan */ scrollers= UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY); + + if (in_scroller == 'h') { /* horizontal scroller - calculate adjustment factor first */ mask_size= (float)(v2d->hor.xmax - v2d->hor.xmin); @@ -1325,6 +1327,7 @@ static void scroller_activate_init(bContext *C, wmOperator *op, wmEvent *event, } vsm->scrollbarwidth = scrollers->hor_max - scrollers->hor_min; + vsm->scrollbar_orig = ((scrollers->hor_max + scrollers->hor_min) / 2) + ar->winrct.xmin; } else { /* vertical scroller - calculate adjustment factor first */ @@ -1340,6 +1343,7 @@ static void scroller_activate_init(bContext *C, wmOperator *op, wmEvent *event, } vsm->scrollbarwidth = scrollers->vert_max - scrollers->vert_min; + vsm->scrollbar_orig = ((scrollers->vert_max + scrollers->vert_min) / 2) + + ar->winrct.ymin; } UI_view2d_scrollers_free(scrollers); @@ -1464,6 +1468,7 @@ static int scroller_activate_modal(bContext *C, wmOperator *op, wmEvent *event) break; case LEFTMOUSE: + case MIDDLEMOUSE: if (event->val==KM_RELEASE) { /* single-click was in empty space outside bubble, so scroll by 1 'page' */ if (ELEM(vsm->zone, SCROLLHANDLE_MIN_OUTSIDE, SCROLLHANDLE_MAX_OUTSIDE)) { @@ -1484,6 +1489,7 @@ static int scroller_activate_modal(bContext *C, wmOperator *op, wmEvent *event) } } break; + } return OPERATOR_RUNNING_MODAL; @@ -1508,6 +1514,21 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event) scroller_activate_init(C, op, event, in_scroller); vsm= (v2dScrollerMove *)op->customdata; + /* support for quick jump to location - gtk and qt do this on linux */ + if (event->type == MIDDLEMOUSE) { + switch (vsm->scroller) { + case 'h': /* horizontal scroller - so only horizontal movement ('cur' moves opposite to mouse) */ + vsm->delta= (float)(event->x - vsm->scrollbar_orig); + break; + case 'v': /* vertical scroller - so only vertical movement ('cur' moves opposite to mouse) */ + vsm->delta= (float)(event->y - vsm->scrollbar_orig); + break; + } + scroller_activate_apply(C, op); + + vsm->zone= SCROLLHANDLE_BAR; + } + /* check if zoom zones are inappropriate (i.e. zoom widgets not shown), so cannot continue * NOTE: see view2d.c for latest conditions, and keep this in sync with that */ @@ -1669,6 +1690,10 @@ void UI_view2d_keymap(wmKeyConfig *keyconf) { wmKeyMap *keymap= WM_keymap_find(keyconf, "View2D", 0, 0); + /* scrollers */ + WM_keymap_add_item(keymap, "VIEW2D_OT_scroller_activate", LEFTMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_scroller_activate", MIDDLEMOUSE, KM_PRESS, 0, 0); + /* pan/scroll */ WM_keymap_add_item(keymap, "VIEW2D_OT_pan", MIDDLEMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_pan", MIDDLEMOUSE, KM_PRESS, KM_SHIFT, 0); @@ -1713,12 +1738,13 @@ void UI_view2d_keymap(wmKeyConfig *keyconf) /* borderzoom - drag */ WM_keymap_add_item(keymap, "VIEW2D_OT_zoom_border", BKEY, KM_PRESS, KM_SHIFT, 0); - - /* scrollers */ - WM_keymap_add_item(keymap, "VIEW2D_OT_scroller_activate", LEFTMOUSE, KM_PRESS, 0, 0); /* Alternative keymap for buttons listview */ keymap= WM_keymap_find(keyconf, "View2D Buttons List", 0, 0); + + WM_keymap_add_item(keymap, "VIEW2D_OT_scroller_activate", LEFTMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_scroller_activate", MIDDLEMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_pan", MIDDLEMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_pan", MOUSEPAN, 0, 0, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_down", WHEELDOWNMOUSE, KM_PRESS, 0, 0); @@ -1732,6 +1758,5 @@ void UI_view2d_keymap(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "VIEW2D_OT_zoom_out", PADMINUS, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_zoom_in", PADPLUSKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_reset", HOMEKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "VIEW2D_OT_scroller_activate", LEFTMOUSE, KM_PRESS, 0, 0); } diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c index 7c237808e85..26645b66c7f 100644 --- a/source/blender/editors/mesh/editmesh.c +++ b/source/blender/editors/mesh/editmesh.c @@ -565,8 +565,6 @@ void free_editMesh(EditMesh *em) em->totvert= em->totedge= em->totface= 0; -// XXX if(em->retopo_paint_data) retopo_free_paint_data(em->retopo_paint_data); - em->retopo_paint_data= NULL; em->act_face = NULL; } @@ -1632,7 +1630,6 @@ typedef struct UndoMesh { EditSelectionC *selected; int totvert, totedge, totface, totsel; int selectmode, shapenr; - char retopo_mode; CustomData vdata, edata, fdata; } UndoMesh; @@ -1646,7 +1643,6 @@ static void free_undoMesh(void *umv) if(um->edges) MEM_freeN(um->edges); if(um->faces) MEM_freeN(um->faces); if(um->selected) MEM_freeN(um->selected); -// XXX if(um->retopo_paint_data) retopo_free_paint_data(um->retopo_paint_data); CustomData_free(&um->vdata, um->totvert); CustomData_free(&um->edata, um->totedge); CustomData_free(&um->fdata, um->totface); @@ -1748,9 +1744,6 @@ static void *editMesh_to_undoMesh(void *emv) else if(ese->type == EDITFACE) a = esec->index = ((EditFace*)ese->data)->tmp.l; } -// XXX um->retopo_paint_data= retopo_paint_data_copy(em->retopo_paint_data); -// um->retopo_mode= scene->toolsettings->retopo_mode; - return um; } @@ -1857,16 +1850,6 @@ static void undoMesh_to_editMesh(void *umv, void *emv) EM_nvertices_selected(em); EM_nedges_selected(em); EM_nfaces_selected(em); - -// XXX retopo_free_paint(); -// em->retopo_paint_data= retopo_paint_data_copy(um->retopo_paint_data); -// scene->toolsettings->retopo_mode= um->retopo_mode; -// if(scene->toolsettings->retopo_mode) { -// XXX if(G.vd->depths) G.vd->depths->damaged= 1; -// retopo_queue_updates(G.vd); -// retopo_paint_view_update(G.vd); -// } - } static void *getEditMesh(bContext *C) diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c index a6630090a5e..5004559ba60 100644 --- a/source/blender/editors/mesh/editmesh_mods.c +++ b/source/blender/editors/mesh/editmesh_mods.c @@ -2477,7 +2477,7 @@ static int select_linked_limited_invoke(ViewContext *vc, short all, short sel) static void linked_limit_default(bContext *C, wmOperator *op) { - if(!RNA_property_is_set(op->ptr, "limit")) { + if(!RNA_struct_property_is_set(op->ptr, "limit")) { Object *obedit= CTX_data_edit_object(C); EditMesh *em= BKE_mesh_get_editmesh(obedit->data); if(em->selectmode == SCE_SELECT_FACE) @@ -3401,34 +3401,6 @@ void EM_select_swap(EditMesh *em) /* exported for UV */ // if (EM_texFaceCheck()) } - -static int select_inverse_mesh_exec(bContext *C, wmOperator *UNUSED(op)) -{ - Object *obedit= CTX_data_edit_object(C); - EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); - - EM_select_swap(em); - - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); - - BKE_mesh_end_editmesh(obedit->data, em); - return OPERATOR_FINISHED; -} - -void MESH_OT_select_inverse(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Select Inverse"; - ot->description= "Select inverse of (un)selected vertices, edges or faces"; - ot->idname= "MESH_OT_select_inverse"; - - /* api callbacks */ - ot->exec= select_inverse_mesh_exec; - ot->poll= ED_operator_editmesh; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} /* ******************** (de)select all operator **************** */ diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 658a8db449f..f0687031bae 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -3944,808 +3944,6 @@ short sharesFace(EditMesh *em, EditEdge* e1, EditEdge* e2) return 0; } -#if 0 - -typedef struct SlideUv { - float origuv[2]; - float *uv_up, *uv_down; - //float *fuv[4]; - LinkNode *fuv_list; -} SlideUv; - -typedef struct SlideVert { - EditEdge *up,*down; - EditVert origvert; -} SlideVert; - -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 */ -useless: - goto useless // because it doesn't do anything right now - -// NumInput num; XXX - Mesh *me= NULL; // XXX - EditFace *efa; - EditEdge *eed,*first=NULL,*last=NULL, *temp = NULL; - EditVert *ev, *nearest; - LinkNode *edgelist = NULL, *vertlist=NULL, *look; - GHash *vertgh; - - SlideVert *tempsv; - float perc = 0, percp = 0,vertdist; // XXX, projectMat[4][4]; - float shiftlabda= 0.0f,len = 0.0f; - int i = 0,j, numsel, numadded=0, timesthrough = 0, vertsel=0, prop=1, cancel = 0,flip=0; - int wasshift = 0; - - /* UV correction vars */ - GHash **uvarray= NULL; - int uvlay_tot= CustomData_number_of_layers(&em->fdata, CD_MTFACE); - int uvlay_idx; - SlideUv *slideuvs=NULL, *suv=NULL, *suv_last=NULL; - float uv_tmp[2]; - LinkNode *fuv_link; - - short event, draw=1; - int mval[2], mvalo[2]; - char str[128]; - float labda = 0.0f; - -// initNumInput(&num); - -// view3d_get_object_project_mat(curarea, 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, "EdgeSlide gh"); - look = vertlist; - while(look) { - i=0; - j=0; - ev = look->link; - tempsv = (struct SlideVert*)MEM_mallocN(sizeof(struct SlideVert),"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 -// XXX getmouseco_areawin(mval); - 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_DRAWEXTRA_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) { - SlideVert *sv; - - sv = BLI_ghash_lookup(vertgh,(EditVert*)look->next->link); - - if(sv) { - float tempdist, co[2]; - - if(!sharesFace(em, tempsv->up,sv->up)) { - EditEdge *swap; - swap = sv->up; - sv->up = sv->down; - sv->down = swap; - } - -// view3d_project_float(curarea, tempsv->origvert.co, co, projectMat); - - tempdist = sqrt(pow(co[0] - mval[0],2)+pow(co[1] - mval[1],2)); - - if(vertdist < 0) { - vertdist = tempdist; - nearest = (EditVert*)look->link; - } else if ( tempdist < vertdist ) { - vertdist = tempdist; - nearest = (EditVert*)look->link; - } - } - } - - - - look = look->next; - } - - - if (uvlay_tot) { // XXX && (scene->toolsettings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT)) { - int maxnum = 0; - uvarray = MEM_callocN( uvlay_tot * sizeof(GHash *), "SlideUVs Array"); - suv_last = slideuvs = MEM_callocN( uvlay_tot * (numadded+1) * sizeof(SlideUv), "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, "EdgeSlideUV gh"); - - 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 map loop */ - } /* end uvlay_tot */ - - - - // we should have enough info now to slide - - len = 0.0f; - - percp = -1; - while(draw) { - /* For the % calculation */ - int mval[2]; - float rc[2]; - float v2[2], v3[2]; - EditVert *centerVert, *upVert, *downVert; - -// XXX getmouseco_areawin(mval); - - if (!immediate && (mval[0] == mvalo[0] && mval[1] == mvalo[1])) { - PIL_sleep_ms(10); - } else { - char *p = str; - int ctrl= 0, shift= 0; // XXX - - mvalo[0] = mval[0]; - mvalo[1] = mval[1]; - - - 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); - -// view3d_project_float(curarea, upVert->co, v2, projectMat); -// view3d_project_float(curarea, downVert->co, v3, projectMat); - - /* Determine the % on which the loop should be cut */ - - rc[0]= v3[0]-v2[0]; - rc[1]= v3[1]-v2[1]; - len= rc[0]*rc[0]+ rc[1]*rc[1]; - if (len==0) {len = 0.0001;} - - if (shift) { - wasshift = 0; - labda= ( rc[0]*((mval[0]-v2[0])) + rc[1]*((mval[1]-v2[1])) )/len; - } - else { - if (wasshift==0) { - wasshift = 1; - shiftlabda = labda; - } - labda= ( rc[0]*((mval[0]-v2[0])) + rc[1]*((mval[1]-v2[1])) )/len / 10.0 + shiftlabda; - } - - - if(labda<=0.0) labda=0.0; - else if(labda>=1.0)labda=1.0; - - perc=((1-labda)*2)-1; - - if(shift == 0 && ctrl==0) { - perc *= 100; - perc = floor(perc); - perc /= 100; - } else if (ctrl) { - perc *= 10; - perc = floor(perc); - perc /= 10; - } - - if(prop == 0) { - len = len_v3v3(upVert->co,downVert->co)*((perc+1)/2); - if(flip == 1) { - len = len_v3v3(upVert->co,downVert->co) - len; - } - } - - if (0) // XXX hasNumInput(&num)) - { -// XXX applyNumInput(&num, &perc); - - if (prop) - { - perc = MIN2(perc, 1); - perc = MAX2(perc, -1); - } - else - { - len = MIN2(perc, len_v3v3(upVert->co,downVert->co)); - len = MAX2(len, 0); - } - } - - //Adjust Edgeloop - if(immediate) { - perc = imperc; - } - percp = perc; - 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); - interp_v3_v3v3(ev->co, tempsv->origvert.co, tempev->co, fabs(perc)); - - if (0) { // 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) { - interp_v2_v2v2(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 / len_v3v3(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) { - interp_v3_v3v3(ev->co, editedge_getOtherVert(tempsv->down,ev)->co, editedge_getOtherVert(tempsv->up,ev)->co, fabs(newlen)); - if (0) { // 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) { - interp_v2_v2v2(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{ - interp_v3_v3v3(ev->co, editedge_getOtherVert(tempsv->up,ev)->co, editedge_getOtherVert(tempsv->down,ev)->co, fabs(newlen)); - - if (0) { // 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) { - interp_v2_v2v2(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; - } - - } - - // Highlight the Control Edges -// scrarea_do_windraw(curarea); -// persp(PERSP_VIEW); -// glPushMatrix(); -// mymultmatrix(obedit->obmat); - - glColor3ub(0, 255, 0); - glBegin(GL_LINES); - glVertex3fv(upVert->co); - glVertex3fv(downVert->co); - glEnd(); - - if(prop == 0) { - // draw start edge for non-prop - glPointSize(5); - glBegin(GL_POINTS); - glColor3ub(255,0,255); - if(flip) { - glVertex3fv(upVert->co); - } else { - glVertex3fv(downVert->co); - } - glEnd(); - } - - - glPopMatrix(); - - if(prop) { - p += sprintf(str, "(P)ercentage: "); - } else { - p += sprintf(str, "Non (P)rop Length: "); - } - - if (0) // XXX hasNumInput(&num)) - { - char num_str[20]; - - // XX outputNumInput(&num, num_str); - p += sprintf(p, "%s", num_str); - } - else - { - if (prop) - { - p += sprintf(p, "%f", perc); - } - else - { - p += sprintf(p, "%f", len); - } - } - - - if (prop == 0) { - p += sprintf(p, ", Press (F) to flip control side"); - } - -// headerprint(str); -// screen_swapbuffers(); - } - if(!immediate) { - while(qtest()) { - short val=0; - event= extern_qread(&val); // extern_qread stores important events for the mainloop to handle - - /* val==0 on key-release event */ - if (val) { - if(ELEM(event, ESCKEY, RIGHTMOUSE)) { - prop = 1; // Go back to prop mode - imperc = 0; // This is the % that gets set for immediate - immediate = 1; //Run through eval code 1 more time - cancel = 1; // Return -1 - mvalo[0] = -1; - } else if(ELEM3(event, PADENTER, LEFTMOUSE, RETKEY)) { - draw = 0; // End looping now - } else if(event==MIDDLEMOUSE) { - perc = 0; - immediate = 1; - } else if(event==PKEY) { -// XXX initNumInput(&num); /* reset num input */ - if (prop) { - prop = 0; -// XXX num.flag |= NUM_NO_NEGATIVE; - } - else { - prop = 1; - } - mvalo[0] = -1; - } else if(event==FKEY) { - (flip == 1) ? (flip = 0):(flip = 1); - mvalo[0] = -1; - } else if(ELEM(event, RIGHTARROWKEY, WHEELUPMOUSE)) { // Scroll through Control Edges - look = vertlist; - while(look) { - if(nearest == (EditVert*)look->link) { - if(look->next == NULL) { - nearest = (EditVert*)vertlist->link; - } else { - nearest = (EditVert*)look->next->link; - } - mvalo[0] = -1; - break; - } - look = look->next; - } - } else if(ELEM(event, LEFTARROWKEY, WHEELDOWNMOUSE)) { // Scroll through Control Edges - look = vertlist; - while(look) { - if(look->next) { - if(look->next->link == nearest) { - nearest = (EditVert*)look->link; - mvalo[0] = -1; - break; - } - } else { - if((EditVert*)vertlist->link == nearest) { - nearest = look->link; - mvalo[0] = -1; - break; - } - } - look = look->next; - } - } - -// XXX if (handleNumInput(&num, event)) - { - mvalo[0] = -1; /* NEED A BETTER WAY TO TRIGGER REDRAW */ - } - } - - } - } else { - draw = 0; - } -// DAG_id_tag_update(obedit->data, 0); - } - - - if(me->drawflag & ME_DRAWEXTRA_EDGELEN) { - look = vertlist; - while(look) { - tempsv = BLI_ghash_lookup(vertgh,(EditVert*)look->link); - if(tempsv != NULL) { - tempsv->up->f &= !SELECT; - tempsv->down->f &= !SELECT; - } - look = look->next; - } - } - -// force_draw(0); - - if(!immediate) - EM_automerge(0); -// DAG_id_tag_update(obedit->data, 0); -// scrarea_queue_winredraw(curarea); - - //BLI_ghash_free(edgesgh, freeGHash, NULL); - BLI_ghash_free(vertgh, NULL, (GHashValFreeFP)MEM_freeN); - BLI_linklist_free(vertlist,NULL); - BLI_linklist_free(edgelist,NULL); - - if (uvlay_tot) { // XXX && (scene->toolsettings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT)) { - for (uvlay_idx=0; uvlay_idx<uvlay_tot; uvlay_idx++) { - BLI_ghash_free(uvarray[uvlay_idx], NULL, NULL); - } - MEM_freeN(uvarray); - MEM_freeN(slideuvs); - - suv = suv_last-1; - while (suv >= slideuvs) { - if (suv->fuv_list) { - BLI_linklist_free(suv->fuv_list,NULL); - } - suv--; - } - } - - if(cancel == 1) { - return -1; - } - - return 1; -} -#endif // END OF XXX - int EdgeLoopDelete(EditMesh *UNUSED(em), wmOperator *UNUSED(op)) { #if 0 //XXX won't work with new edgeslide diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 7762203c371..e40c806fd17 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -359,7 +359,7 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event) Mesh *me; Object *obedit; int exitmode= 0; - char name[32]; + char name[MAX_ID_NAME-2]; /* Check context */ if(base==NULL || base->object->type!=OB_MESH) { @@ -368,7 +368,7 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event) } /* check input variables */ - if(RNA_property_is_set(op->ptr, "filepath")) { + if(RNA_struct_property_is_set(op->ptr, "filepath")) { char path[FILE_MAX]; RNA_string_get(op->ptr, "filepath", path); @@ -429,7 +429,7 @@ void MESH_OT_drop_named_image(wmOperatorType *ot) ot->flag= OPTYPE_UNDO; /* properties */ - RNA_def_string(ot->srna, "name", "Image", 24, "Name", "Image name to assign"); + RNA_def_string(ot->srna, "name", "Image", MAX_ID_NAME-2, "Name", "Image name to assign"); RNA_def_string(ot->srna, "filepath", "Path", FILE_MAX, "Filepath", "Path to image file"); } diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h index 352d3f304ea..4139e32bf0e 100644 --- a/source/blender/editors/mesh/mesh_intern.h +++ b/source/blender/editors/mesh/mesh_intern.h @@ -144,7 +144,6 @@ void MESH_OT_loop_select(struct wmOperatorType *ot); void MESH_OT_select_all(struct wmOperatorType *ot); void MESH_OT_select_more(struct wmOperatorType *ot); void MESH_OT_select_less(struct wmOperatorType *ot); -void MESH_OT_select_inverse(struct wmOperatorType *ot); void MESH_OT_select_non_manifold(struct wmOperatorType *ot); void MESH_OT_select_linked(struct wmOperatorType *ot); void MESH_OT_select_linked_pick(struct wmOperatorType *ot); diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index ba68f79f238..21f44ff89bc 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -62,7 +62,6 @@ void ED_operatortypes_mesh(void) WM_operatortype_append(MESH_OT_select_all); WM_operatortype_append(MESH_OT_select_more); WM_operatortype_append(MESH_OT_select_less); - WM_operatortype_append(MESH_OT_select_inverse); WM_operatortype_append(MESH_OT_select_non_manifold); WM_operatortype_append(MESH_OT_select_linked); WM_operatortype_append(MESH_OT_select_linked_pick); @@ -247,25 +246,32 @@ void ED_keymap_mesh(wmKeyConfig *keyconf) /* 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, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); + kmi = WM_keymap_add_item(keymap, "MESH_OT_loop_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0); + RNA_boolean_set(kmi->ptr, "extend", TRUE); - 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); + kmi = WM_keymap_add_item(keymap, "MESH_OT_edgering_select", SELECTMOUSE, KM_PRESS, KM_ALT|KM_CTRL, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); + 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", TRUE); 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", AKEY, KM_PRESS, 0, 0); + kmi = WM_keymap_add_item(keymap, "MESH_OT_select_all", AKEY, KM_PRESS, 0, 0); + RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE); + kmi = WM_keymap_add_item(keymap, "MESH_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0); + RNA_enum_set(kmi->ptr, "action", SEL_INVERT); + 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); - WM_keymap_add_item(keymap, "MESH_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "MESH_OT_select_non_manifold", MKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0); WM_keymap_add_item(keymap, "MESH_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0); - WM_keymap_add_item(keymap, "MESH_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "deselect", 1); + kmi = WM_keymap_add_item(keymap, "MESH_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "deselect", FALSE); + kmi = WM_keymap_add_item(keymap, "MESH_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0); + RNA_boolean_set(kmi->ptr, "deselect", TRUE); WM_keymap_add_item(keymap, "MESH_OT_faces_select_linked_flat", FKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0); @@ -275,13 +281,17 @@ void ED_keymap_mesh(wmKeyConfig *keyconf) WM_keymap_add_menu(keymap, "VIEW3D_MT_edit_mesh_select_mode", TABKEY, KM_PRESS, KM_CTRL, 0); /* hide */ - WM_keymap_add_item(keymap, "MESH_OT_hide", HKEY, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1); + kmi = WM_keymap_add_item(keymap, "MESH_OT_hide", HKEY, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "unselected", FALSE); + kmi = WM_keymap_add_item(keymap, "MESH_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0); + RNA_boolean_set(kmi->ptr, "unselected", TRUE); WM_keymap_add_item(keymap, "MESH_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); /* tools */ - WM_keymap_add_item(keymap, "MESH_OT_normals_make_consistent", NKEY, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_normals_make_consistent", NKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0)->ptr, "inside", 1); + kmi = WM_keymap_add_item(keymap, "MESH_OT_normals_make_consistent", NKEY, KM_PRESS, KM_CTRL, 0); + RNA_boolean_set(kmi->ptr, "inside", FALSE); + kmi = WM_keymap_add_item(keymap, "MESH_OT_normals_make_consistent", NKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0); + RNA_boolean_set(kmi->ptr, "inside", TRUE); WM_keymap_add_item(keymap, "VIEW3D_OT_edit_mesh_extrude_move_normal", EKEY, KM_PRESS, 0, 0); /* python operator */ WM_keymap_add_menu(keymap, "VIEW3D_MT_edit_mesh_extrude", EKEY, KM_PRESS, KM_ALT, 0); @@ -312,8 +322,10 @@ void ED_keymap_mesh(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "MESH_OT_split", YKEY, KM_PRESS, 0, 0); /* use KM_CLICK because same key is used for tweaks */ - WM_keymap_add_item(keymap, "MESH_OT_dupli_extrude_cursor", ACTIONMOUSE, KM_CLICK, KM_CTRL, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_dupli_extrude_cursor", ACTIONMOUSE, KM_CLICK, KM_SHIFT|KM_CTRL, 0)->ptr, "rotate_source", 0); + kmi = WM_keymap_add_item(keymap, "MESH_OT_dupli_extrude_cursor", ACTIONMOUSE, KM_CLICK, KM_CTRL, 0); + RNA_boolean_set(kmi->ptr, "rotate_source", TRUE); + kmi = WM_keymap_add_item(keymap, "MESH_OT_dupli_extrude_cursor", ACTIONMOUSE, KM_CLICK, KM_SHIFT|KM_CTRL, 0); + RNA_boolean_set(kmi->ptr, "rotate_source", FALSE); 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); diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c index 414d3344511..c8adfbda708 100644 --- a/source/blender/editors/metaball/mball_edit.c +++ b/source/blender/editors/metaball/mball_edit.c @@ -181,45 +181,6 @@ void MBALL_OT_select_all(wmOperatorType *ot) WM_operator_properties_select_all(ot); } -/***************************** Select inverse operator *****************************/ - -/* Invert metaball selection */ -static int select_inverse_metaelems_exec(bContext *C, wmOperator *UNUSED(op)) -{ - Object *obedit= CTX_data_edit_object(C); - MetaBall *mb = (MetaBall*)obedit->data; - MetaElem *ml; - - ml= mb->editelems->first; - if(ml) { - while(ml) { - if(ml->flag & SELECT) - ml->flag &= ~SELECT; - else - ml->flag |= SELECT; - ml= ml->next; - } - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, mb); - } - - return OPERATOR_FINISHED; -} - -void MBALL_OT_select_inverse_metaelems(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Inverse"; - ot->description= "Select inverse of (un)selected metaelements"; - ot->idname= "MBALL_OT_select_inverse_metaelems"; - - /* callback functions */ - ot->exec= select_inverse_metaelems_exec; - ot->poll= ED_operator_editmball; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - /***************************** Select random operator *****************************/ /* Random metaball selection */ diff --git a/source/blender/editors/metaball/mball_intern.h b/source/blender/editors/metaball/mball_intern.h index 792fa80e0c5..1cb4c19fc72 100644 --- a/source/blender/editors/metaball/mball_intern.h +++ b/source/blender/editors/metaball/mball_intern.h @@ -43,7 +43,6 @@ void MBALL_OT_delete_metaelems(struct wmOperatorType *ot); void MBALL_OT_duplicate_metaelems(struct wmOperatorType *ot); void MBALL_OT_select_all(struct wmOperatorType *ot); -void MBALL_OT_select_inverse_metaelems(struct wmOperatorType *ot); void MBALL_OT_select_random_metaelems(struct wmOperatorType *ot); #endif diff --git a/source/blender/editors/metaball/mball_ops.c b/source/blender/editors/metaball/mball_ops.c index 4d04fc3e80e..4c69bb3e559 100644 --- a/source/blender/editors/metaball/mball_ops.c +++ b/source/blender/editors/metaball/mball_ops.c @@ -48,13 +48,13 @@ void ED_operatortypes_metaball(void) WM_operatortype_append(MBALL_OT_reveal_metaelems); WM_operatortype_append(MBALL_OT_select_all); - WM_operatortype_append(MBALL_OT_select_inverse_metaelems); WM_operatortype_append(MBALL_OT_select_random_metaelems); } void ED_keymap_metaball(wmKeyConfig *keyconf) { wmKeyMap *keymap; + wmKeyMapItem *kmi; keymap= WM_keymap_find(keyconf, "Metaball", 0, 0); keymap->poll= ED_operator_editmball; @@ -69,7 +69,9 @@ void ED_keymap_metaball(wmKeyConfig *keyconf) 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_all", AKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "MBALL_OT_select_inverse_metaelems", IKEY, KM_PRESS, KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "MBALL_OT_select_all", AKEY, KM_PRESS, 0, 0); + RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE); + kmi = WM_keymap_add_item(keymap, "MBALL_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0); + RNA_enum_set(kmi->ptr, "action", SEL_INVERT); } diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 1547c5daf54..c53549728f6 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -189,52 +189,55 @@ void ED_object_add_generic_props(wmOperatorType *ot, int do_editmode) PropertyRNA *prop; /* note: this property gets hidden for add-camera operator */ - prop= RNA_def_boolean(ot->srna, "view_align", 0, "Align to View", "Align the new object to the view"); + prop = RNA_def_boolean(ot->srna, "view_align", 0, "Align to View", "Align the new object to the view"); RNA_def_property_update_runtime(prop, view_align_update); if(do_editmode) { - prop= RNA_def_boolean(ot->srna, "enter_editmode", 0, "Enter Editmode", "Enter editmode when adding this object"); - RNA_def_property_flag(prop, PROP_HIDDEN); + prop = RNA_def_boolean(ot->srna, "enter_editmode", 0, "Enter Editmode", + "Enter editmode when adding this object"); + RNA_def_property_flag(prop, PROP_HIDDEN|PROP_SKIP_SAVE); } - RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Location for the newly added object", -FLT_MAX, FLT_MAX); - RNA_def_float_rotation(ot->srna, "rotation", 3, NULL, -FLT_MAX, FLT_MAX, "Rotation", "Rotation for the newly added object", (float)-M_PI * 2.0f, (float)M_PI * 2.0f); + prop = RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", + "Location for the newly added object", -FLT_MAX, FLT_MAX); + RNA_def_property_flag(prop, PROP_SKIP_SAVE); + prop = RNA_def_float_rotation(ot->srna, "rotation", 3, NULL, -FLT_MAX, FLT_MAX, "Rotation", + "Rotation for the newly added object", (float)-M_PI * 2.0f, (float)M_PI * 2.0f); + RNA_def_property_flag(prop, PROP_SKIP_SAVE); prop = RNA_def_boolean_layer_member(ot->srna, "layers", 20, NULL, "Layer", ""); - RNA_def_property_flag(prop, PROP_HIDDEN); + RNA_def_property_flag(prop, PROP_HIDDEN|PROP_SKIP_SAVE); } static void object_add_generic_invoke_options(bContext *C, wmOperator *op) { if(RNA_struct_find_property(op->ptr, "enter_editmode")) /* optional */ - if (!RNA_property_is_set(op->ptr, "enter_editmode")) + if (!RNA_struct_property_is_set(op->ptr, "enter_editmode")) RNA_boolean_set(op->ptr, "enter_editmode", U.flag & USER_ADD_EDITMODE); - if(!RNA_property_is_set(op->ptr, "location")) { + if(!RNA_struct_property_is_set(op->ptr, "location")) { float loc[3]; ED_object_location_from_view(C, loc); RNA_float_set_array(op->ptr, "location", loc); } - if(!RNA_property_is_set(op->ptr, "layers")) { + if(!RNA_struct_property_is_set(op->ptr, "layers")) { View3D *v3d = CTX_wm_view3d(C); Scene *scene = CTX_data_scene(C); int a, values[20], layer; - + if(v3d) { layer = (v3d->scenelock && !v3d->localvd)? scene->layact: v3d->layact; - - for(a=0; a<20; a++) - values[a]= (layer & (1<<a)); } else { layer = scene->layact; + } - for(a=0; a<20; a++) - values[a]= (layer & (1<<a)); + for (a=0; a<20; a++) { + values[a]= (layer & (1<<a)); } - + RNA_boolean_set_array(op->ptr, "layers", values); } } @@ -257,7 +260,7 @@ int ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float *loc, *enter_editmode = TRUE; } - if(RNA_property_is_set(op->ptr, "layers")) { + if(RNA_struct_property_is_set(op->ptr, "layers")) { RNA_boolean_get_array(op->ptr, "layers", layer_values); *layer= 0; for(a=0; a<20; a++) { @@ -278,9 +281,9 @@ int ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float *loc, if(v3d && v3d->localvd) *layer |= v3d->lay; - if(RNA_property_is_set(op->ptr, "rotation")) + if(RNA_struct_property_is_set(op->ptr, "rotation")) view_align = FALSE; - else if (RNA_property_is_set(op->ptr, "view_align")) + else if (RNA_struct_property_is_set(op->ptr, "view_align")) view_align = RNA_boolean_get(op->ptr, "view_align"); else { view_align = U.flag & USER_ADD_VIEWALIGNED; @@ -1916,7 +1919,7 @@ static int add_named_exec(bContext *C, wmOperator *op) Object *ob; int linked= RNA_boolean_get(op->ptr, "linked"); int dupflag= (linked)? 0: U.dupflag; - char name[32]; + char name[MAX_ID_NAME-2]; /* find object, create fake base */ RNA_string_get(op->ptr, "name", name); @@ -1971,7 +1974,7 @@ void OBJECT_OT_add_named(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; RNA_def_boolean(ot->srna, "linked", 0, "Linked", "Duplicate object but not object data, linking to the original data"); - RNA_def_string(ot->srna, "name", "Cube", 24, "Name", "Object name to add"); + RNA_def_string(ot->srna, "name", "Cube", MAX_ID_NAME-2, "Name", "Object name to add"); } diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 8266f3501c5..a90edb29c29 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -542,7 +542,7 @@ static int edit_constraint_poll(bContext *C) static void edit_constraint_properties(wmOperatorType *ot) { - RNA_def_string(ot->srna, "constraint", "", 32, "Constraint", "Name of the constraint to edit"); + RNA_def_string(ot->srna, "constraint", "", MAX_NAME, "Constraint", "Name of the constraint to edit"); RNA_def_enum(ot->srna, "owner", constraint_owner_items, 0, "Owner", "The owner of this constraint"); } @@ -553,7 +553,7 @@ static int edit_constraint_invoke_properties(bContext *C, wmOperator *op) bConstraint *con; ListBase *list; - if (RNA_property_is_set(op->ptr, "constraint") && RNA_property_is_set(op->ptr, "owner")) + if (RNA_struct_property_is_set(op->ptr, "constraint") && RNA_struct_property_is_set(op->ptr, "owner")) return 1; if (ptr.data) { @@ -575,7 +575,7 @@ static int edit_constraint_invoke_properties(bContext *C, wmOperator *op) static bConstraint *edit_constraint_property_get(wmOperator *op, Object *ob, int type) { - char constraint_name[32]; + char constraint_name[MAX_NAME]; int owner = RNA_enum_get(op->ptr, "owner"); bConstraint *con; ListBase *list=NULL; diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 6a68a264a28..61ba54e7d36 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -321,9 +321,6 @@ void ED_object_exit_editmode(bContext *C, int flag) // if(EM_texFaceCheck()) -// if(retopo_mesh_paint_check()) -// retopo_end_okee(); - if(me->edit_mesh->totvert>MESH_MAX_VERTS) { error("Too many vertices"); return; @@ -595,132 +592,6 @@ void OBJECT_OT_posemode_toggle(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -/* *********************** */ - -#if 0 -// XXX should be in view3d? - -/* context: ob = lamp */ -/* code should be replaced with proper (custom) transform handles for lamp properties */ -static void spot_interactive(Object *ob, int mode) -{ - Lamp *la= ob->data; - float transfac, dx, dy, ratio, origval; - int keep_running= 1, center2d[2]; - int mval[2], mvalo[2]; - -// getmouseco_areawin(mval); -// getmouseco_areawin(mvalo); - - project_int(ob->obmat[3], center2d); - if( center2d[0] > 100000 ) { /* behind camera */ -// center2d[0]= curarea->winx/2; -// center2d[1]= curarea->winy/2; - } - -// helpline(mval, center2d); - - /* ratio is like scaling */ - dx = (float)(center2d[0] - mval[0]); - dy = (float)(center2d[1] - mval[1]); - transfac = (float)sqrt( dx*dx + dy*dy); - if(transfac==0.0f) transfac= 1.0f; - - if(mode==1) - origval= la->spotsize; - else if(mode==2) - origval= la->dist; - else if(mode==3) - origval= la->clipsta; - else - origval= la->clipend; - - while (keep_running>0) { - -// getmouseco_areawin(mval); - - /* essential for idling subloop */ - if(mval[0]==mvalo[0] && mval[1]==mvalo[1]) { - PIL_sleep_ms(2); - } - else { - char str[32]; - - dx = (float)(center2d[0] - mval[0]); - dy = (float)(center2d[1] - mval[1]); - ratio = (float)(sqrt( dx*dx + dy*dy))/transfac; - - /* do the trick */ - - if(mode==1) { /* spot */ - la->spotsize = ratio*origval; - CLAMP(la->spotsize, 1.0f, 180.0f); - sprintf(str, "Spot size %.2f\n", la->spotsize); - } - else if(mode==2) { /* dist */ - la->dist = ratio*origval; - CLAMP(la->dist, 0.01f, 5000.0f); - sprintf(str, "Distance %.2f\n", la->dist); - } - else if(mode==3) { /* sta */ - la->clipsta = ratio*origval; - CLAMP(la->clipsta, 0.001f, 5000.0f); - sprintf(str, "Distance %.2f\n", la->clipsta); - } - else if(mode==4) { /* end */ - la->clipend = ratio*origval; - CLAMP(la->clipend, 0.1f, 5000.0f); - sprintf(str, "Clip End %.2f\n", la->clipend); - } - - /* cleanup */ - mvalo[0]= mval[0]; - mvalo[1]= mval[1]; - - /* handle shaded mode */ -// XXX shade_buttons_change_3d(); - - /* DRAW */ - headerprint(str); - force_draw_plus(SPACE_BUTS, 0); - -// helpline(mval, center2d); - } - - while( qtest() ) { - short val; - unsigned short event= extern_qread(&val); - - switch (event){ - case ESCKEY: - case RIGHTMOUSE: - keep_running= 0; - break; - case LEFTMOUSE: - case SPACEKEY: - case PADENTER: - case RETKEY: - if(val) - keep_running= -1; - break; - } - } - } - - if(keep_running==0) { - if(mode==1) - la->spotsize= origval; - else if(mode==2) - la->dist= origval; - else if(mode==3) - la->clipsta= origval; - else - la->clipend= origval; - } - -} -#endif - static void copymenu_properties(Scene *scene, View3D *v3d, Object *ob) { //XXX no longer used - to be removed - replaced by game_properties_copy_exec @@ -1609,7 +1480,7 @@ static int game_property_new(bContext *C, wmOperator *op) { Object *ob= CTX_data_active_object(C); bProperty *prop; - char name[32]; + char name[MAX_NAME]; int type= RNA_enum_get(op->ptr, "type"); prop= new_property(type); @@ -1642,7 +1513,7 @@ void OBJECT_OT_game_property_new(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; RNA_def_enum(ot->srna, "type", gameproperty_type_items, 2, "Type", "Type of game property to add"); - RNA_def_string(ot->srna, "name", "", 32, "Name", "Name of the game property to add"); + RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the game property to add"); } static int game_property_remove(bContext *C, wmOperator *op) diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c index 74cf174d7b4..1b8c0fd0840 100644 --- a/source/blender/editors/object/object_group.c +++ b/source/blender/editors/object/object_group.c @@ -192,7 +192,7 @@ static int group_create_exec(bContext *C, wmOperator *op) Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); Group *group= NULL; - char name[32]; /* id name */ + char name[MAX_ID_NAME-2]; /* id name */ RNA_string_get(op->ptr, "name", name); @@ -223,7 +223,7 @@ void GROUP_OT_create(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_string(ot->srna, "name", "Group", 32, "Name", "Name of the new group"); + RNA_def_string(ot->srna, "name", "Group", MAX_ID_NAME-2, "Name", "Name of the new group"); } /****************** properties window operators *********************/ diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c index 7bb91c1fc4b..de991f28e4a 100644 --- a/source/blender/editors/object/object_hook.c +++ b/source/blender/editors/object/object_hook.c @@ -428,7 +428,7 @@ static void add_hook_object(Main *bmain, Scene *scene, Object *obedit, Object *o HookModifierData *hmd = NULL; float cent[3]; int tot, ok, *indexar; - char name[32]; + char name[MAX_NAME]; ok = object_hook_index_array(scene, obedit, &tot, &indexar, name, cent); @@ -747,7 +747,7 @@ static int object_hook_assign_exec(bContext *C, wmOperator *op) Object *ob=NULL; HookModifierData *hmd=NULL; float cent[3]; - char name[32]; + char name[MAX_NAME]; int *indexar, tot; if (ptr.data) { /* if modifier context is available, use that */ diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h index 8973fb88c85..7f416feb0d5 100644 --- a/source/blender/editors/object/object_intern.h +++ b/source/blender/editors/object/object_intern.h @@ -96,14 +96,12 @@ void OBJECT_OT_game_physics_copy(struct wmOperatorType *ot); /* object_select.c */ void OBJECT_OT_select_all(struct wmOperatorType *ot); -void OBJECT_OT_select_inverse(struct wmOperatorType *ot); void OBJECT_OT_select_random(struct wmOperatorType *ot); void OBJECT_OT_select_by_type(struct wmOperatorType *ot); 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); void OBJECT_OT_select_same_group(struct wmOperatorType *ot); /* object_add.c */ diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 9a592bc9324..93f4a31f1ff 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -728,7 +728,7 @@ static int edit_modifier_poll(bContext *C) static void edit_modifier_properties(wmOperatorType *ot) { - RNA_def_string(ot->srna, "modifier", "", 32, "Modifier", "Name of the modifier to edit"); + RNA_def_string(ot->srna, "modifier", "", MAX_NAME, "Modifier", "Name of the modifier to edit"); } static int edit_modifier_invoke_properties(bContext *C, wmOperator *op) @@ -736,7 +736,7 @@ static int edit_modifier_invoke_properties(bContext *C, wmOperator *op) PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_Modifier); ModifierData *md; - if (RNA_property_is_set(op->ptr, "modifier")) + if (RNA_struct_property_is_set(op->ptr, "modifier")) return 1; if (ptr.data) { @@ -750,7 +750,7 @@ static int edit_modifier_invoke_properties(bContext *C, wmOperator *op) static ModifierData *edit_modifier_property_get(wmOperator *op, Object *ob, int type) { - char modifier_name[32]; + char modifier_name[MAX_NAME]; ModifierData *md; RNA_string_get(op->ptr, "modifier", modifier_name); @@ -1209,7 +1209,7 @@ static int multires_external_save_invoke(bContext *C, wmOperator *op, wmEvent *U if(CustomData_external_test(&me->fdata, CD_MDISPS)) return OPERATOR_CANCELLED; - if(RNA_property_is_set(op->ptr, "filepath")) + if(RNA_struct_property_is_set(op->ptr, "filepath")) return multires_external_save_exec(C, op); op->customdata= me; diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index acc318723d8..99eeaf334a8 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -94,7 +94,6 @@ void ED_operatortypes_object(void) WM_operatortype_append(OBJECT_OT_make_links_data); WM_operatortype_append(OBJECT_OT_move_to_layer); - WM_operatortype_append(OBJECT_OT_select_inverse); WM_operatortype_append(OBJECT_OT_select_random); WM_operatortype_append(OBJECT_OT_select_all); WM_operatortype_append(OBJECT_OT_select_same_group); @@ -103,7 +102,6 @@ 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_create); WM_operatortype_append(GROUP_OT_objects_remove); @@ -246,7 +244,7 @@ void ED_operatormacros_object(void) ot= WM_operatortype_append_macro("OBJECT_OT_add_named_cursor", "Add named object at cursor", OPTYPE_UNDO|OPTYPE_REGISTER); if(ot) { ot->description = "Add named object at cursor"; - RNA_def_string(ot->srna, "name", "Cube", 24, "Name", "Object name to add"); + RNA_def_string(ot->srna, "name", "Cube", MAX_ID_NAME-2, "Name", "Object name to add"); WM_operatortype_macro_define(ot, "VIEW3D_OT_cursor3d"); WM_operatortype_macro_define(ot, "OBJECT_OT_add_named"); @@ -297,23 +295,28 @@ void ED_keymap_object(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "VIEW3D_OT_game_start", PKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "OBJECT_OT_select_all", AKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "OBJECT_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "OBJECT_OT_select_all", AKEY, KM_PRESS, 0, 0); + RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE); + kmi = WM_keymap_add_item(keymap, "OBJECT_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0); + RNA_enum_set(kmi->ptr, "action", SEL_INVERT); + WM_keymap_add_item(keymap, "OBJECT_OT_select_linked", LKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "OBJECT_OT_select_grouped", GKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "OBJECT_OT_select_mirror", MKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0); kmi= WM_keymap_add_item(keymap, "OBJECT_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0); RNA_enum_set_identifier(kmi->ptr, "direction", "PARENT"); + RNA_boolean_set(kmi->ptr, "extend", FALSE); kmi= WM_keymap_add_item(keymap, "OBJECT_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); RNA_enum_set_identifier(kmi->ptr, "direction", "PARENT"); - RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_boolean_set(kmi->ptr, "extend", TRUE); kmi= WM_keymap_add_item(keymap, "OBJECT_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0); RNA_enum_set_identifier(kmi->ptr, "direction", "CHILD"); + RNA_boolean_set(kmi->ptr, "extend", FALSE); kmi= WM_keymap_add_item(keymap, "OBJECT_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); RNA_enum_set_identifier(kmi->ptr, "direction", "CHILD"); - RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_boolean_set(kmi->ptr, "extend", TRUE); WM_keymap_verify_item(keymap, "OBJECT_OT_parent_set", PKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_verify_item(keymap, "OBJECT_OT_parent_no_inverse_set", PKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0); diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 1ba0157e8d3..a0bddda0413 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -335,7 +335,7 @@ static int make_proxy_exec (bContext *C, wmOperator *op) if (ob) { Object *newob; Base *newbase, *oldbase= BASACT; - char name[32]; + char name[MAX_ID_NAME+4]; /* Add new object for the proxy */ newob= add_object(scene, OB_EMPTY); @@ -1056,7 +1056,7 @@ static unsigned int move_to_layer_init(bContext *C, wmOperator *op) int values[20], a; unsigned int lay= 0; - if(!RNA_property_is_set(op->ptr, "layers")) { + if(!RNA_struct_property_is_set(op->ptr, "layers")) { /* note: layers are set in bases, library objects work for this */ CTX_DATA_BEGIN(C, Base*, base, selected_bases) { lay |= base->lay; @@ -1890,7 +1890,7 @@ static int drop_named_material_invoke(bContext *C, wmOperator *op, wmEvent *even Main *bmain= CTX_data_main(C); Base *base= ED_view3d_give_base_under_cursor(C, event->mval); Material *ma; - char name[32]; + char name[MAX_ID_NAME-2]; RNA_string_get(op->ptr, "name", name); ma= (Material *)find_id("MA", name); @@ -1923,5 +1923,5 @@ void OBJECT_OT_drop_named_material(wmOperatorType *ot) ot->flag= OPTYPE_UNDO; /* properties */ - RNA_def_string(ot->srna, "name", "Material", 24, "Name", "Material name to assign"); + RNA_def_string(ot->srna, "name", "Material", MAX_ID_NAME-2, "Name", "Material name to assign"); } diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index c4d33b74574..69372ac1a90 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -739,41 +739,6 @@ void OBJECT_OT_select_by_layer(wmOperatorType *ot) RNA_def_int(ot->srna, "layers", 1, 1, 20, "Layer", "", 1, 20); } -/************************** Select Inverse *************************/ - -static int object_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) -{ - CTX_DATA_BEGIN(C, Base*, base, visible_bases) { - if (base->flag & SELECT) - ED_base_object_select(base, BA_DESELECT); - else - ED_base_object_select(base, BA_SELECT); - } - CTX_DATA_END; - - /* undo? */ - WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C)); - - return OPERATOR_FINISHED; -} - -void OBJECT_OT_select_inverse(wmOperatorType *ot) -{ - - /* identifiers */ - ot->name= "Select Inverse"; - ot->description = "Invert selection of all visible objects"; - ot->idname= "OBJECT_OT_select_inverse"; - - /* api callbacks */ - ot->exec= object_select_inverse_exec; - ot->poll= objects_selectable_poll; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - -} - /**************************** (De)select All ****************************/ static int object_select_all_exec(bContext *C, wmOperator *op) @@ -841,7 +806,7 @@ void OBJECT_OT_select_all(wmOperatorType *ot) static int object_select_same_group_exec(bContext *C, wmOperator *op) { Group *group; - char group_name[32]; + char group_name[MAX_ID_NAME]; /* passthrough if no objects are visible */ if (CTX_DATA_COUNT(C, visible_bases) == 0) return OPERATOR_PASS_THROUGH; @@ -882,7 +847,7 @@ void OBJECT_OT_select_same_group(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_string(ot->srna, "group", "", 32, "Group", "Name of the group to select"); + RNA_def_string(ot->srna, "group", "", MAX_ID_NAME, "Group", "Name of the group to select"); } /**************************** Select Mirror ****************************/ @@ -939,63 +904,6 @@ void OBJECT_OT_select_mirror(wmOperatorType *ot) } -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, selectable_bases) { - if(base->flag & SELECT) { - ED_base_object_select(base, BA_DESELECT); - changed= 1; - } - } - CTX_DATA_END; - } - - CTX_DATA_BEGIN(C, Base*, base, selectable_bases) { - /* this is a bit dodjy, there should only be ONE object with this name, but library objects can mess this up */ - if(strcmp(name, base->object->id.name+2)==0) { - ED_base_object_activate(C, base); - 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= objects_selectable_poll; - - /* 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 ****************************/ static int object_select_random_exec(bContext *C, wmOperator *op) diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index a83896e7280..e57574af839 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -645,7 +645,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) /* get the view settings if 'around' isnt set and the view is available */ View3D *v3d= CTX_wm_view3d(C); copy_v3_v3(cursor, give_cursor(scene, v3d)); - if(v3d && !RNA_property_is_set(op->ptr, "center")) + if(v3d && !RNA_struct_property_is_set(op->ptr, "center")) around= v3d->around; } diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index dfe0b94605d..f91740f4b47 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -2058,7 +2058,7 @@ static int vertex_group_poll(bContext *C) return (ob && !ob->id.lib && OB_TYPE_SUPPORT_VGROUP(ob->type) && data && !data->lib); } -static int vertex_group_poll_edit(bContext *C) +static int UNUSED_FUNCTION(vertex_group_poll_edit)(bContext *C) { Object *ob= ED_object_context(C); ID *data= (ob)? ob->data: NULL; diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 52e6d4f6ab8..dbf03e34c32 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -254,13 +254,21 @@ static PTCacheEdit *pe_get_current(Scene *scene, Object *ob, int create) } else if(pset->edittype == PE_TYPE_SOFTBODY && pid->type == PTCACHE_TYPE_SOFTBODY) { if(create && pid->cache->flag & PTCACHE_BAKED && !pid->cache->edit) + { + pset->flag |= PE_FADE_TIME; + // NICE TO HAVE but doesn't work: pset->brushtype = PE_BRUSH_COMB; PE_create_particle_edit(scene, ob, pid->cache, NULL); + } edit = pid->cache->edit; break; } else if(pset->edittype == PE_TYPE_CLOTH && pid->type == PTCACHE_TYPE_CLOTH) { if(create && pid->cache->flag & PTCACHE_BAKED && !pid->cache->edit) + { + pset->flag |= PE_FADE_TIME; + // NICE TO HAVE but doesn't work: pset->brushtype = PE_BRUSH_COMB; PE_create_particle_edit(scene, ob, pid->cache, NULL); + } edit = pid->cache->edit; break; } @@ -1872,43 +1880,6 @@ void PARTICLE_OT_select_more(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -static int select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) -{ - PEData data; - PTCacheEdit *edit; - POINT_P; KEY_K; - - PE_set_data(C, &data); - - edit= PE_get_current(data.scene, data.ob); - - LOOP_VISIBLE_POINTS { - LOOP_KEYS { - key->flag ^= PEK_SELECT; - point->flag |= PEP_EDIT_RECALC; /* redraw selection only */ - } - } - - PE_update_selection(data.scene, data.ob, 1); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_SELECTED, data.ob); - - return OPERATOR_FINISHED; -} - -void PARTICLE_OT_select_inverse(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Select Inverse"; - ot->idname= "PARTICLE_OT_select_inverse"; - - /* api callbacks */ - ot->exec= select_inverse_exec; - ot->poll= PE_poll; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - /************************ rekey operator ************************/ static void rekey_particle(PEData *data, int pa_index) @@ -3659,8 +3630,14 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) PE_update_object(scene, ob, 1); } - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); - + if(edit->psys) + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); + else + { + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); + } + bedit->lastmouse[0]= mouse[0]; bedit->lastmouse[1]= mouse[1]; bedit->first= 0; diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 5294e29d3d5..d652d2c0e5c 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -884,7 +884,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor if(getenv(strEnvName)) { int dlevel = atoi(getenv(strEnvName)); elbeemSetDebugLevel(dlevel); - BLI_snprintf(debugStrBuffer,256,"fluidsimBake::msg: Debug messages activated due to envvar '%s'\n",strEnvName); + BLI_snprintf(debugStrBuffer, sizeof(debugStrBuffer),"fluidsimBake::msg: Debug messages activated due to envvar '%s'\n",strEnvName); elbeemDebugOut(debugStrBuffer); } @@ -921,7 +921,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor /* rough check of settings... */ if(domainSettings->previewresxyz > domainSettings->resolutionxyz) { - BLI_snprintf(debugStrBuffer,256,"fluidsimBake::warning - Preview (%d) >= Resolution (%d)... setting equal.\n", domainSettings->previewresxyz , domainSettings->resolutionxyz); + BLI_snprintf(debugStrBuffer,sizeof(debugStrBuffer),"fluidsimBake::warning - Preview (%d) >= Resolution (%d)... setting equal.\n", domainSettings->previewresxyz , domainSettings->resolutionxyz); elbeemDebugOut(debugStrBuffer); domainSettings->previewresxyz = domainSettings->resolutionxyz; } @@ -941,7 +941,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor } else { gridlevels = domainSettings->maxRefine; } - BLI_snprintf(debugStrBuffer,256,"fluidsimBake::msg: Baking %s, refine: %d\n", fsDomain->id.name , gridlevels ); + BLI_snprintf(debugStrBuffer,sizeof(debugStrBuffer),"fluidsimBake::msg: Baking %s, refine: %d\n", fsDomain->id.name , gridlevels ); elbeemDebugOut(debugStrBuffer); @@ -993,7 +993,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor /* ******** init domain object's matrix ******** */ copy_m4_m4(domainMat, fsDomain->obmat); if(!invert_m4_m4(invDomMat, domainMat)) { - BLI_snprintf(debugStrBuffer,256,"fluidsimBake::error - Invalid obj matrix?\n"); + BLI_snprintf(debugStrBuffer,sizeof(debugStrBuffer),"fluidsimBake::error - Invalid obj matrix?\n"); elbeemDebugOut(debugStrBuffer); BKE_report(reports, RPT_ERROR, "Invalid object matrix"); @@ -1042,7 +1042,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor fsset->surfaceSmoothing = domainSettings->surfaceSmoothing; fsset->surfaceSubdivs = domainSettings->surfaceSubdivs; fsset->farFieldSize = domainSettings->farFieldSize; - BLI_strncpy(fsset->outputPath, targetFile, 240); + BLI_strncpy(fsset->outputPath, targetFile, sizeof(fsset->outputPath)); // domain channels fsset->channelSizeFrameTime = diff --git a/source/blender/editors/physics/physics_intern.h b/source/blender/editors/physics/physics_intern.h index 0dae8b362cd..db6d63f6396 100644 --- a/source/blender/editors/physics/physics_intern.h +++ b/source/blender/editors/physics/physics_intern.h @@ -42,7 +42,6 @@ void PARTICLE_OT_select_tips(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_select_inverse(struct wmOperatorType *ot); void PARTICLE_OT_hide(struct wmOperatorType *ot); void PARTICLE_OT_reveal(struct wmOperatorType *ot); diff --git a/source/blender/editors/physics/physics_ops.c b/source/blender/editors/physics/physics_ops.c index e39b4b97d72..09f99a58dd7 100644 --- a/source/blender/editors/physics/physics_ops.c +++ b/source/blender/editors/physics/physics_ops.c @@ -51,7 +51,6 @@ static void operatortypes_particle(void) 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_select_inverse); WM_operatortype_append(PARTICLE_OT_hide); WM_operatortype_append(PARTICLE_OT_reveal); @@ -95,11 +94,12 @@ static void keymap_particle(wmKeyConfig *keyconf) keymap->poll= PE_poll; WM_keymap_add_item(keymap, "PARTICLE_OT_select_all", AKEY, KM_PRESS, 0, 0); + RNA_enum_set(WM_keymap_add_item(keymap, "PARTICLE_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "action", SEL_INVERT); + 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_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0); 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); @@ -116,11 +116,11 @@ static void keymap_particle(wmKeyConfig *keyconf) /* size radial control */ kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "data_path", "tool_settings.particle_edit.brush.size"); + RNA_string_set(kmi->ptr, "data_path_primary", "tool_settings.particle_edit.brush.size"); /* size radial control */ kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0); - RNA_string_set(kmi->ptr, "data_path", "tool_settings.particle_edit.brush.strength"); + RNA_string_set(kmi->ptr, "data_path_primary", "tool_settings.particle_edit.brush.strength"); WM_keymap_add_menu(keymap, "VIEW3D_MT_particle_specials", WKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index e4597d6afc3..e35df217761 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -160,7 +160,7 @@ void image_buffer_rect_update(Scene *scene, RenderResult *rr, ImBuf *ibuf, volat static void screen_render_scene_layer_set(wmOperator *op, Main *mainp, Scene **scene, SceneRenderLayer **srl) { /* single layer re-render */ - if(RNA_property_is_set(op->ptr, "scene")) { + if(RNA_struct_property_is_set(op->ptr, "scene")) { Scene *scn; char scene_name[MAX_ID_NAME-2]; @@ -176,7 +176,7 @@ static void screen_render_scene_layer_set(wmOperator *op, Main *mainp, Scene **s } } - if(RNA_property_is_set(op->ptr, "layer")) { + if(RNA_struct_property_is_set(op->ptr, "layer")) { SceneRenderLayer *rl; char rl_name[RE_MAXNAME]; @@ -537,7 +537,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event) /* custom scene and single layer re-render */ screen_render_scene_layer_set(op, mainp, &scene, &srl); - if(RNA_property_is_set(op->ptr, "layer")) + if(RNA_struct_property_is_set(op->ptr, "layer")) jobflag |= WM_JOB_SUSPEND; /* job custom data */ diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index be4d54ae2e8..06e15f4a5f6 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -40,11 +40,13 @@ #include "BLI_editVert.h" #include "BLI_dlrbTree.h" #include "BLI_utildefines.h" +#include "BLI_jitter.h" #include "DNA_scene_types.h" #include "DNA_object_types.h" #include "BKE_context.h" +#include "BKE_global.h" #include "BKE_image.h" #include "BKE_main.h" #include "BKE_report.h" @@ -81,6 +83,11 @@ typedef struct OGLRender { RegionView3D *rv3d; ARegion *ar; + ScrArea *prevsa; + ARegion *prevar; + + short obcenter_dia_back; /* temp overwrite */ + Image *ima; ImageUser iuser; @@ -148,28 +155,31 @@ static void screen_opengl_render_apply(OGLRender *oglrender) } else { /* simple accumulation, less hassle then FSAA FBO's */ -# define SAMPLES 5 /* fixed, easy to have more but for now this is ok */ - const float jit_ofs[SAMPLES][2] = {{0, 0}, {0.5f, 0.5f}, {-0.5f,-0.5f}, {-0.5f, 0.5f}, {0.5f, -0.5f}}; + static float jit_ofs[32][2]; float winmat_jitter[4][4]; float *accum_buffer= MEM_mallocN(sizex * sizey * sizeof(float) * 4, "accum1"); float *accum_tmp= MEM_mallocN(sizex * sizey * sizeof(float) * 4, "accum2"); int j; + BLI_initjit(jit_ofs[0], scene->r.osa); + /* first sample buffer, also initializes 'rv3d->persmat' */ ED_view3d_draw_offscreen(scene, v3d, ar, sizex, sizey, NULL, winmat); GPU_offscreen_read_pixels(oglrender->ofs, GL_FLOAT, accum_buffer); /* skip the first sample */ - for(j=1; j < SAMPLES; j++) { + for(j=1; j < scene->r.osa; j++) { copy_m4_m4(winmat_jitter, winmat); - window_translate_m4(winmat_jitter, rv3d->persmat, jit_ofs[j][0] / sizex, jit_ofs[j][1] / sizey); + window_translate_m4(winmat_jitter, rv3d->persmat, + (jit_ofs[j][0] * 2.0f) / sizex, + (jit_ofs[j][1] * 2.0f) / sizey); ED_view3d_draw_offscreen(scene, v3d, ar, sizex, sizey, NULL, winmat_jitter); GPU_offscreen_read_pixels(oglrender->ofs, GL_FLOAT, accum_tmp); add_vn_vn(accum_buffer, accum_tmp, sizex*sizey*sizeof(float)); } - mul_vn_vn_fl(rr->rectf, accum_buffer, sizex*sizey*sizeof(float), 1.0/SAMPLES); + mul_vn_vn_fl(rr->rectf, accum_buffer, sizex*sizey*sizeof(float), 1.0f / scene->r.osa); MEM_freeN(accum_buffer); MEM_freeN(accum_tmp); @@ -243,6 +253,8 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op) { /* new render clears all callbacks */ Scene *scene= CTX_data_scene(C); + ScrArea *prevsa= CTX_wm_area(C); + ARegion *prevar= CTX_wm_region(C); RenderResult *rr; GPUOffScreen *ofs; OGLRender *oglrender; @@ -252,6 +264,11 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op) const short is_write_still= RNA_boolean_get(op->ptr, "write_still"); char err_out[256]= "unknown"; + if(G.background) { + BKE_report(op->reports, RPT_ERROR, "Can't use OpenGL render in background mode (no opengl context)"); + return 0; + } + /* ensure we have a 3d view */ if(!ED_view3d_context_activate(C)) { @@ -303,13 +320,24 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op) oglrender->write_still= is_write_still && !is_animation; + oglrender->obcenter_dia_back = U.obcenter_dia; + U.obcenter_dia = 0; + + oglrender->prevsa= prevsa; + oglrender->prevar= prevar; + if(is_view_context) { - oglrender->v3d= CTX_wm_view3d(C); - oglrender->ar= CTX_wm_region(C); - oglrender->rv3d= CTX_wm_region_view3d(C); + ED_view3d_context_user_region(C, &oglrender->v3d, &oglrender->ar); /* so quad view renders camera */ + oglrender->rv3d= oglrender->ar->regiondata; /* MUST be cleared on exit */ - oglrender->scene->customdata_mask_modal= ED_view3d_datamask(oglrender->scene, oglrender->v3d); + oglrender->scene->customdata_mask_modal = (ED_view3d_datamask(oglrender->scene, oglrender->v3d) | + ED_view3d_object_datamask(oglrender->scene) ); + + /* apply immediately incase we're rendeing from a script, + * running notifiers again will overwrite */ + oglrender->scene->customdata_mask |= oglrender->scene->customdata_mask_modal; + } /* create render */ @@ -354,10 +382,15 @@ static void screen_opengl_render_end(bContext *C, OGLRender *oglrender) WM_cursor_wait(0); WM_event_add_notifier(C, NC_SCENE|ND_RENDER_RESULT, oglrender->scene); + U.obcenter_dia = oglrender->obcenter_dia_back; + GPU_offscreen_free(oglrender->ofs); oglrender->scene->customdata_mask_modal= 0; + CTX_wm_area_set(C, oglrender->prevsa); + CTX_wm_region_set(C, oglrender->prevar); + MEM_freeN(oglrender); } @@ -465,7 +498,8 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op) } if(BKE_imtype_is_movie(scene->r.im_format.imtype)) { - ok= oglrender->mh->append_movie(&scene->r, CFRA, (int*)ibuf->rect, oglrender->sizex, oglrender->sizey, oglrender->reports); + ok= oglrender->mh->append_movie(&scene->r, SFRA, CFRA, (int*)ibuf->rect, + oglrender->sizex, oglrender->sizey, oglrender->reports); if(ok) { printf("Append frame %d", scene->r.cfra); BKE_reportf(op->reports, RPT_INFO, "Appended frame: %d", scene->r.cfra); diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 86328ca2a64..3e34a55a3d9 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -104,7 +104,7 @@ ImBuf* get_brush_icon(Brush *brush) { static const int flags = IB_rect|IB_multilayer|IB_metadata; - char path[240]; + char path[FILE_MAX]; char *folder; if (!(brush->icon_imbuf)) { diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 937f43dfadb..ad3e20ddb2d 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -1269,7 +1269,7 @@ static int envmap_save_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event { //Scene *scene= CTX_data_scene(C); - if(RNA_property_is_set(op->ptr, "filepath")) + if(RNA_struct_property_is_set(op->ptr, "filepath")) return envmap_save_exec(C, op); //RNA_enum_set(op->ptr, "file_type", scene->r.im_format.imtype); diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 7aacd9f7b86..e4088fe10c4 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -478,7 +478,7 @@ void ED_region_do_draw(bContext *C, ARegion *ar) glClear(GL_COLOR_BUFFER_BIT); UI_ThemeColor(TH_TEXT); - BLF_draw_default(20, 8, 0.0f, ar->headerstr, 65535); /* XXX, use real length */ + BLF_draw_default(20, 8, 0.0f, ar->headerstr, BLF_DRAW_STR_DUMMY_MAX); } else if(at->draw) { at->draw(C, ar); @@ -1809,5 +1809,5 @@ void ED_region_info_draw(ARegion *ar, const char *text, int block, float alpha) /* text */ UI_ThemeColor(TH_TEXT_HI); BLF_position(fontid, 12, rect.ymin + 5, 0.0f); - BLF_draw(fontid, text, strlen(text)); + BLF_draw(fontid, text, BLF_DRAW_STR_DUMMY_MAX); } diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 3a0202ad546..25b8b8415d9 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1689,8 +1689,6 @@ ScrArea *ED_screen_full_toggle(bContext *C, wmWindow *win, ScrArea *sa) /* XXX bad code: setscreen() ends with first area active. fullscreen render assumes this too */ CTX_wm_area_set(C, sc->areabase.first); - /* XXX retopo_force_update(); */ - return sc->areabase.first; } diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 98f85009140..2632c239625 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -1348,12 +1348,12 @@ static int area_split_invoke(bContext *C, wmOperator *op, wmEvent *event) int x, y; /* retrieve initial mouse coord, so we can find the active edge */ - if(RNA_property_is_set(op->ptr, "mouse_x")) + if(RNA_struct_property_is_set(op->ptr, "mouse_x")) x= RNA_int_get(op->ptr, "mouse_x"); else x= event->x; - if(RNA_property_is_set(op->ptr, "mouse_y")) + if(RNA_struct_property_is_set(op->ptr, "mouse_y")) y= RNA_int_get(op->ptr, "mouse_y"); else y= event->x; @@ -3062,7 +3062,7 @@ static int screen_animation_play_exec(bContext *C, wmOperator *op) int mode= (RNA_boolean_get(op->ptr, "reverse")) ? -1 : 1; int sync= -1; - if (RNA_property_is_set(op->ptr, "sync")) + if (RNA_struct_property_is_set(op->ptr, "sync")) sync= (RNA_boolean_get(op->ptr, "sync")); return ED_screen_animation_play(C, sync, mode); diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c index fe2dc1fb913..e32277e3789 100644 --- a/source/blender/editors/screen/screendump.c +++ b/source/blender/editors/screen/screendump.c @@ -198,7 +198,7 @@ static int screenshot_exec(bContext *C, wmOperator *op) static int screenshot_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { if(screenshot_data_create(C, op)) { - if(RNA_property_is_set(op->ptr, "filepath")) + if(RNA_struct_property_is_set(op->ptr, "filepath")) return screenshot_exec(C, op); RNA_string_set(op->ptr, "filepath", G.ima); @@ -302,7 +302,9 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float if(sj->dumprect) { if(mh) { - if(mh->append_movie(&rd, rd.cfra, (int *)sj->dumprect, sj->dumpsx, sj->dumpsy, &sj->reports)) { + if(mh->append_movie(&rd, rd.sfra, rd.cfra, (int *)sj->dumprect, + sj->dumpsx, sj->dumpsy, &sj->reports)) + { BKE_reportf(&sj->reports, RPT_INFO, "Appended frame: %d", rd.cfra); printf("Appended frame %d\n", rd.cfra); } else diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 8a4cb8aa78b..8eeca2e4e15 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -1784,16 +1784,7 @@ static void scale_tri(float insetCos[4][3], float *origCos[4], const float inset } #endif //PROJ_DEBUG_NOSEAMBLEED -static float Vec2Lenf_nosqrt(const float *v1, const float *v2) -{ - float x, y; - - x = v1[0]-v2[0]; - y = v1[1]-v2[1]; - return x*x+y*y; -} - -static float Vec2Lenf_nosqrt_other(const float *v1, const float v2_1, const float v2_2) +static float len_squared_v2v2_alt(const float *v1, const float v2_1, const float v2_2) { float x, y; @@ -1802,7 +1793,7 @@ static float Vec2Lenf_nosqrt_other(const float *v1, const float v2_1, const floa return x*x+y*y; } -/* note, use a squared value so we can use Vec2Lenf_nosqrt +/* note, use a squared value so we can use len_squared_v2v2 * be sure that you have done a bounds check first or this may fail */ /* only give bucket_bounds as an arg because we need it elsewhere */ static int project_bucket_isect_circle(const float cent[2], const float radius_squared, rctf *bucket_bounds) @@ -1826,21 +1817,21 @@ static int project_bucket_isect_circle(const float cent[2], const float radius_s if (cent[0] < bucket_bounds->xmin) { /* lower left out of radius test */ if (cent[1] < bucket_bounds->ymin) { - return (Vec2Lenf_nosqrt_other(cent, bucket_bounds->xmin, bucket_bounds->ymin) < radius_squared) ? 1 : 0; + return (len_squared_v2v2_alt(cent, bucket_bounds->xmin, bucket_bounds->ymin) < radius_squared) ? 1 : 0; } /* top left test */ else if (cent[1] > bucket_bounds->ymax) { - return (Vec2Lenf_nosqrt_other(cent, bucket_bounds->xmin, bucket_bounds->ymax) < radius_squared) ? 1 : 0; + return (len_squared_v2v2_alt(cent, bucket_bounds->xmin, bucket_bounds->ymax) < radius_squared) ? 1 : 0; } } else if (cent[0] > bucket_bounds->xmax) { /* lower right out of radius test */ if (cent[1] < bucket_bounds->ymin) { - return (Vec2Lenf_nosqrt_other(cent, bucket_bounds->xmax, bucket_bounds->ymin) < radius_squared) ? 1 : 0; + return (len_squared_v2v2_alt(cent, bucket_bounds->xmax, bucket_bounds->ymin) < radius_squared) ? 1 : 0; } /* top right test */ else if (cent[1] > bucket_bounds->ymax) { - return (Vec2Lenf_nosqrt_other(cent, bucket_bounds->xmax, bucket_bounds->ymax) < radius_squared) ? 1 : 0; + return (len_squared_v2v2_alt(cent, bucket_bounds->xmax, bucket_bounds->ymax) < radius_squared) ? 1 : 0; } } @@ -2946,7 +2937,7 @@ static void project_paint_begin(ProjPaintState *ps) MemArena *arena; /* at the moment this is just ps->arena_mt[0], but use this to show were not multithreading */ - const int diameter= 2*brush_size(ps->brush); + const int diameter= 2*brush_size(ps->scene, ps->brush); /* ---- end defines ---- */ @@ -3589,7 +3580,7 @@ static int project_bucket_iter_init(ProjPaintState *ps, const float mval_f[2]) { if(ps->source==PROJ_SRC_VIEW) { float min_brush[2], max_brush[2]; - const float radius = (float)brush_size(ps->brush); + const float radius = (float)brush_size(ps->scene, ps->brush); /* so we dont have a bucket bounds that is way too small to paint into */ // if (radius < 1.0f) radius = 1.0f; // this doesn't work yet :/ @@ -3627,7 +3618,7 @@ static int project_bucket_iter_init(ProjPaintState *ps, const float mval_f[2]) static int project_bucket_iter_next(ProjPaintState *ps, int *bucket_index, rctf *bucket_bounds, const float mval[2]) { - const int diameter= 2*brush_size(ps->brush); + const int diameter= 2*brush_size(ps->scene, ps->brush); if (ps->thread_tot > 1) BLI_lock_thread(LOCK_CUSTOM1); @@ -3853,7 +3844,7 @@ static void *do_projectpaint_thread(void *ph_v) float co[2]; float mask = 1.0f; /* airbrush wont use mask */ unsigned short mask_short; - const float radius= (float)brush_size(ps->brush); + const float radius= (float)brush_size(ps->scene, ps->brush); const float radius_squared= radius*radius; /* avoid a square root with every dist comparison */ short lock_alpha= ELEM(ps->brush->blend, IMB_BLEND_ERASE_ALPHA, IMB_BLEND_ADD_ALPHA) ? 0 : ps->brush->flag & BRUSH_LOCK_ALPHA; @@ -3901,8 +3892,7 @@ static void *do_projectpaint_thread(void *ph_v) projPixel = (ProjPixel *)node->link; - /*dist = len_v2v2(projPixel->projCoSS, pos);*/ /* correct but uses a sqrtf */ - dist_nosqrt = Vec2Lenf_nosqrt(projPixel->projCoSS, pos); + dist_nosqrt = len_squared_v2v2(projPixel->projCoSS, pos); /*if (dist < radius) {*/ /* correct but uses a sqrtf */ if (dist_nosqrt <= radius_squared) { @@ -3913,7 +3903,7 @@ static void *do_projectpaint_thread(void *ph_v) if (falloff > 0.0f) { if (ps->is_texbrush) { /* note, for clone and smear, we only use the alpha, could be a special function */ - brush_sample_tex(ps->brush, projPixel->projCoSS, rgba, thread_index); + brush_sample_tex(ps->scene, ps->brush, projPixel->projCoSS, rgba, thread_index); alpha = rgba[3]; } else { alpha = 1.0f; @@ -3921,7 +3911,7 @@ static void *do_projectpaint_thread(void *ph_v) if (ps->is_airbrush) { /* for an aurbrush there is no real mask, so just multiply the alpha by it */ - alpha *= falloff * brush_alpha(ps->brush); + alpha *= falloff * brush_alpha(ps->scene, ps->brush); mask = ((float)projPixel->mask)/65535.0f; } else { @@ -3929,7 +3919,7 @@ static void *do_projectpaint_thread(void *ph_v) falloff = 1.0f - falloff; falloff = 1.0f - (falloff * falloff); - mask_short = (unsigned short)(projPixel->mask * (brush_alpha(ps->brush) * falloff)); + mask_short = (unsigned short)(projPixel->mask * (brush_alpha(ps->scene, ps->brush) * falloff)); if (mask_short > projPixel->mask_max) { mask = ((float)mask_short)/65535.0f; projPixel->mask_max = mask_short; @@ -4811,7 +4801,7 @@ static int texture_paint_init(bContext *C, wmOperator *op) if(pop->mode == PAINT_MODE_3D && (pop->s.tool == PAINT_TOOL_CLONE)) pop->s.tool = PAINT_TOOL_DRAW; pop->s.blend = brush->blend; - pop->orig_brush_size= brush_size(brush); + pop->orig_brush_size= brush_size(scene, brush); if(pop->mode != PAINT_MODE_2D) { pop->s.ob = OBACT; @@ -4847,8 +4837,8 @@ static int texture_paint_init(bContext *C, wmOperator *op) return 0; /* Dont allow brush size below 2 */ - if (brush_size(brush) < 2) - brush_set_size(brush, 2); + if (brush_size(scene, brush) < 2) + brush_set_size(scene, brush, 2); /* allocate and initialize spacial data structures */ project_paint_begin(&pop->ps); @@ -4862,7 +4852,7 @@ static int texture_paint_init(bContext *C, wmOperator *op) image_undo_restore, image_undo_free); /* create painter */ - pop->painter= brush_painter_new(pop->s.brush); + pop->painter= brush_painter_new(scene, pop->s.brush); return 1; } @@ -4932,7 +4922,7 @@ static void paint_exit(bContext *C, wmOperator *op) brush_painter_free(pop->painter); if(pop->mode == PAINT_MODE_3D_PROJECT) { - brush_set_size(pop->ps.brush, pop->orig_brush_size); + brush_set_size(scene, pop->ps.brush, pop->orig_brush_size); paint_brush_exit_tex(pop->ps.brush); project_paint_end(&pop->ps); @@ -4968,6 +4958,7 @@ static int paint_exec(bContext *C, wmOperator *op) static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event) { + const Scene *scene = CTX_data_scene(C); PaintOperation *pop= op->customdata; wmTabletData *wmtab; PointerRNA itemptr; @@ -4999,13 +4990,13 @@ 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 (tablet && (pressure >= 0.99f) && ((pop->s.brush->flag & BRUSH_SPACING_PRESSURE) || brush_use_alpha_pressure(pop->s.brush) || brush_use_size_pressure(pop->s.brush))) + if (tablet && (pressure >= 0.99f) && ((pop->s.brush->flag & BRUSH_SPACING_PRESSURE) || brush_use_alpha_pressure(scene, pop->s.brush) || brush_use_size_pressure(scene, pop->s.brush))) return; /* This can be removed once fixed properly in brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, double time, float pressure, void *user) at zero pressure we should do nothing 1/2^12 is .0002 which is the sensitivity of the most sensitive pen tablet available*/ - if (tablet && (pressure < .0002f) && ((pop->s.brush->flag & BRUSH_SPACING_PRESSURE) || brush_use_alpha_pressure(pop->s.brush) || brush_use_size_pressure(pop->s.brush))) + if (tablet && (pressure < .0002f) && ((pop->s.brush->flag & BRUSH_SPACING_PRESSURE) || brush_use_alpha_pressure(scene, pop->s.brush) || brush_use_size_pressure(scene, pop->s.brush))) return; } @@ -5120,12 +5111,13 @@ static void brush_drawcursor(bContext *C, int x, int y, void *UNUSED(customdata) #define PX_SIZE_FADE_MAX 12.0f #define PX_SIZE_FADE_MIN 4.0f + Scene *scene= CTX_data_scene(C); Brush *brush= image_paint_brush(C); - Paint *paint= paint_get_active(CTX_data_scene(C)); + Paint *paint= paint_get_active(scene); if(paint && brush && paint->flags & PAINT_SHOW_BRUSH) { float zoomx, zoomy; - const float size= (float)brush_size(brush); + const float size= (float)brush_size(scene, brush); const short use_zoom= get_imapaint_zoom(C, &zoomx, &zoomy); const float pixel_size= MAX2(size * zoomx, size * zoomy); float alpha= 0.5f; @@ -5579,8 +5571,8 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op) /* override */ ps.is_texbrush= 0; ps.is_airbrush= 1; - orig_brush_size= brush_size(ps.brush); - brush_set_size(ps.brush, 32); /* cover the whole image */ + orig_brush_size= brush_size(scene, ps.brush); + brush_set_size(scene, ps.brush, 32); /* cover the whole image */ ps.tool= PAINT_TOOL_DRAW; /* so pixels are initialized with minimal info */ @@ -5593,7 +5585,7 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op) project_paint_begin(&ps); if(ps.dm==NULL) { - brush_set_size(ps.brush, orig_brush_size); + brush_set_size(scene, ps.brush, orig_brush_size); return OPERATOR_CANCELLED; } else { @@ -5617,7 +5609,7 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op) project_paint_end(&ps); scene->toolsettings->imapaint.flag &= ~IMAGEPAINT_DRAWING; - brush_set_size(ps.brush, orig_brush_size); + brush_set_size(scene, ps.brush, orig_brush_size); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index eb20465a2ab..e81e1f6dc77 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -89,7 +89,8 @@ static void BRUSH_OT_add(wmOperatorType *ot) static int brush_scale_size_exec(bContext *C, wmOperator *op) { - Paint *paint= paint_get_active(CTX_data_scene(C)); + Scene *scene = CTX_data_scene(C); + Paint *paint= paint_get_active(scene); struct Brush *brush= paint_brush(paint); // Object *ob= CTX_data_active_object(C); float scalar= RNA_float_get(op->ptr, "scalar"); @@ -97,7 +98,7 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op) if (brush) { // pixel radius { - const int old_size= brush_size(brush); + const int old_size= brush_size(scene, brush); int size= (int)(scalar*old_size); if (old_size == size) { @@ -110,17 +111,17 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op) } CLAMP(size, 1, 2000); // XXX magic number - brush_set_size(brush, size); + brush_set_size(scene, brush, size); } // unprojected radius { - float unprojected_radius= scalar*brush_unprojected_radius(brush); + float unprojected_radius= scalar*brush_unprojected_radius(scene, brush); if (unprojected_radius < 0.001f) // XXX magic number unprojected_radius= 0.001f; - brush_set_unprojected_radius(brush, unprojected_radius); + brush_set_unprojected_radius(scene, brush, unprojected_radius); } } @@ -475,7 +476,7 @@ typedef enum { } RCFlags; static void set_brush_rc_path(PointerRNA *ptr, const char *brush_path, - const char *output_name, const char *input_name) + const char *output_name, const char *input_name) { char *path; @@ -485,21 +486,35 @@ static void set_brush_rc_path(PointerRNA *ptr, const char *brush_path, } static void set_brush_rc_props(PointerRNA *ptr, const char *paint, - const char *prop, RCFlags flags) + const char *prop, const char *secondary_prop, + RCFlags flags) { + const char *ups_path = "tool_settings.unified_paint_settings"; char *brush_path; brush_path = BLI_sprintfN("tool_settings.%s.brush", paint); - set_brush_rc_path(ptr, brush_path, "data_path", prop); + set_brush_rc_path(ptr, brush_path, "data_path_primary", prop); + if(secondary_prop) { + set_brush_rc_path(ptr, ups_path, "use_secondary", secondary_prop); + set_brush_rc_path(ptr, ups_path, "data_path_secondary", prop); + } + else { + RNA_string_set(ptr, "use_secondary", ""); + RNA_string_set(ptr, "data_path_secondary", ""); + } set_brush_rc_path(ptr, brush_path, "color_path", "cursor_color_add"); set_brush_rc_path(ptr, brush_path, "rotation_path", "texture_slot.angle"); RNA_string_set(ptr, "image_id", brush_path); if(flags & RC_COLOR) set_brush_rc_path(ptr, brush_path, "fill_color_path", "color"); + else + RNA_string_set(ptr, "fill_color_path", ""); if(flags & RC_ZOOM) RNA_string_set(ptr, "zoom_path", "space_data.zoom"); + else + RNA_string_set(ptr, "zoom_path", ""); MEM_freeN(brush_path); } @@ -510,14 +525,14 @@ static void ed_keymap_paint_brush_radial_control(wmKeyMap *keymap, const char *p wmKeyMapItem *kmi; kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, KM_PRESS, 0, 0); - set_brush_rc_props(kmi->ptr, paint, "size", flags); + set_brush_rc_props(kmi->ptr, paint, "size", "use_unified_size", flags); kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0); - set_brush_rc_props(kmi->ptr, paint, "strength", flags); + set_brush_rc_props(kmi->ptr, paint, "strength", "use_unified_strength", flags); if(flags & RC_ROTATION) { kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, KM_PRESS, KM_CTRL, 0); - set_brush_rc_props(kmi->ptr, paint, "texture_slot.angle", flags); + set_brush_rc_props(kmi->ptr, paint, "texture_slot.angle", NULL, flags); } } diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index 7cff37e8814..c3e0c35f524 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -123,19 +123,19 @@ static int same_snap(Snapshot* snap, Brush* brush, ViewContext* vc) { MTex* mtex = &brush->mtex; - return ( (mtex->tex) && - equals_v3v3(mtex->ofs, snap->ofs) && - equals_v3v3(mtex->size, snap->size) && - mtex->rot == snap->rot - ) && - - /* make brush smaller shouldn't cause a resample */ - ( (mtex->brush_map_mode == MTEX_MAP_MODE_FIXED && (brush_size(brush) <= snap->brush_size)) || - (brush_size(brush) == snap->brush_size)) && - - (mtex->brush_map_mode == snap->brush_map_mode) && - (vc->ar->winx == snap->winx) && - (vc->ar->winy == snap->winy); + return (((mtex->tex) && + equals_v3v3(mtex->ofs, snap->ofs) && + equals_v3v3(mtex->size, snap->size) && + mtex->rot == snap->rot) && + + /* make brush smaller shouldn't cause a resample */ + ((mtex->brush_map_mode == MTEX_MAP_MODE_FIXED && + (brush_size(vc->scene, brush) <= snap->brush_size)) || + (brush_size(vc->scene, brush) == snap->brush_size)) && + + (mtex->brush_map_mode == snap->brush_map_mode) && + (vc->ar->winx == snap->winx) && + (vc->ar->winy == snap->winy)); } static void make_snap(Snapshot* snap, Brush* brush, ViewContext* vc) @@ -153,7 +153,7 @@ static void make_snap(Snapshot* snap, Brush* brush, ViewContext* vc) snap->rot = -1; } - snap->brush_size = brush_size(brush); + snap->brush_size = brush_size(vc->scene, brush); snap->winx = vc->ar->winx; snap->winy = vc->ar->winy; } @@ -198,7 +198,7 @@ static int load_tex(Sculpt *sd, Brush* br, ViewContext* vc) make_snap(&snap, br, vc); if (br->mtex.brush_map_mode == MTEX_MAP_MODE_FIXED) { - int s = brush_size(br); + int s = brush_size(vc->scene, br); int r = 1; for (s >>= 1; s > 0; s >>= 1) @@ -239,7 +239,7 @@ static int load_tex(Sculpt *sd, Brush* br, ViewContext* vc) // largely duplicated from tex_strength const float rotation = -br->mtex.rot; - float radius = brush_size(br); + float radius = brush_size(vc->scene, br); int index = j*size + i; float x; float avg; @@ -373,6 +373,7 @@ static int sculpt_get_brush_geometry(bContext* C, int x, int y, int* pixel_radiu float location[3]) { struct PaintStroke *stroke; + const Scene *scene = CTX_data_scene(C); float window[2]; int hit; @@ -384,11 +385,11 @@ static int sculpt_get_brush_geometry(bContext* C, int x, int y, int* pixel_radiu if(stroke->vc.obact->sculpt && stroke->vc.obact->sculpt->pbvh && sculpt_stroke_get_location(C, stroke, location, window)) { *pixel_radius = project_brush_radius(stroke->vc.rv3d, - brush_unprojected_radius(stroke->brush), + brush_unprojected_radius(scene, stroke->brush), location, &stroke->mats); if (*pixel_radius == 0) - *pixel_radius = brush_size(stroke->brush); + *pixel_radius = brush_size(scene, stroke->brush); mul_m4_v3(stroke->vc.obact->obmat, location); @@ -398,7 +399,7 @@ static int sculpt_get_brush_geometry(bContext* C, int x, int y, int* pixel_radiu Sculpt* sd = CTX_data_tool_settings(C)->sculpt; Brush* brush = paint_brush(&sd->paint); - *pixel_radius = brush_size(brush); + *pixel_radius = brush_size(scene, brush); hit = 0; } @@ -453,7 +454,7 @@ static void paint_draw_alpha_overlay(Sculpt *sd, Brush *brush, glTranslatef(-0.5f, -0.5f, 0); /* scale based on tablet pressure */ - if(sd->draw_pressure && brush_use_size_pressure(brush)) { + if(sd->draw_pressure && brush_use_size_pressure(vc->scene, brush)) { glTranslatef(0.5f, 0.5f, 0); glScalef(1.0f/sd->pressure_value, 1.0f/sd->pressure_value, 1); glTranslatef(-0.5f, -0.5f, 0); @@ -468,7 +469,7 @@ static void paint_draw_alpha_overlay(Sculpt *sd, Brush *brush, quad.ymax = aim[1]+sd->anchored_size - win->ymin; } else { - const int radius= brush_size(brush); + const int radius= brush_size(vc->scene, brush); quad.xmin = x - radius; quad.ymin = y - radius; quad.xmax = x + radius; @@ -515,7 +516,7 @@ static void paint_cursor_on_hit(Sculpt *sd, Brush *brush, ViewContext *vc, /* TODO: check whether this should really only be done when brush is over mesh? */ - if(sd->draw_pressure && brush_use_alpha_pressure(brush)) + if(sd->draw_pressure && brush_use_alpha_pressure(vc->scene, brush)) (*visual_strength) *= sd->pressure_value; if(sd->draw_anchored) @@ -524,21 +525,22 @@ static void paint_cursor_on_hit(Sculpt *sd, Brush *brush, ViewContext *vc, if(brush->flag & BRUSH_ANCHORED) projected_radius = 8; else - projected_radius = brush_size(brush); + projected_radius = brush_size(vc->scene, brush); } unprojected_radius = paint_calc_object_space_radius(vc, location, projected_radius); - if(sd->draw_pressure && brush_use_size_pressure(brush)) + if(sd->draw_pressure && brush_use_size_pressure(vc->scene, brush)) unprojected_radius *= sd->pressure_value; - if(!brush_use_locked_size(brush)) - brush_set_unprojected_radius(brush, unprojected_radius); + if(!brush_use_locked_size(vc->scene, brush)) + brush_set_unprojected_radius(vc->scene, brush, unprojected_radius); } static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused)) { - Paint *paint = paint_get_active(CTX_data_scene(C)); + Scene *scene = CTX_data_scene(C); + Paint *paint = paint_get_active(scene); Brush *brush = paint_brush(paint); ViewContext vc; float final_radius; @@ -550,7 +552,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused)) translation[1] = y; outline_alpha = 0.5; outline_col = brush->add_col; - final_radius = brush_size(brush); + final_radius = brush_size(scene, brush); /* check that brush drawing is enabled */ if(!(paint->flags & PAINT_SHOW_BRUSH)) @@ -566,7 +568,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused)) Sculpt *sd = CTX_data_tool_settings(C)->sculpt; float location[3]; int pixel_radius, hit; - const float root_alpha = brush_alpha(brush); + const float root_alpha = brush_alpha(scene, brush); float visual_strength = root_alpha*root_alpha; const float min_alpha = 0.20f; const float max_alpha = 0.80f; @@ -597,8 +599,8 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused)) /* draw overlay */ paint_draw_alpha_overlay(sd, brush, &vc, x, y); - if(brush_use_locked_size(brush)) - brush_set_size(brush, pixel_radius); + if(brush_use_locked_size(scene, brush)) + brush_set_size(scene, brush, pixel_radius); /* check if brush is subtracting, use different color then */ /* TODO: no way currently to know state of pen flip or @@ -668,7 +670,8 @@ static float event_tablet_data(wmEvent *event, int *pen_flip) /* Put the location of the next stroke dot into the stroke RNA and apply it to the mesh */ static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, wmEvent *event, float mouse_in[2]) { - Paint *paint = paint_get_active(CTX_data_scene(C)); + Scene *scene = CTX_data_scene(C); + Paint *paint = paint_get_active(scene); Brush *brush = paint_brush(paint); PaintStroke *stroke = op->customdata; float mouse[3]; @@ -685,7 +688,7 @@ static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, wmEvent *ev if(stroke->vc.obact->sculpt) { float delta[2]; - brush_jitter_pos(brush, mouse_in, mouse); + brush_jitter_pos(scene, brush, mouse_in, mouse); /* XXX: meh, this is round about because brush_jitter_pos isn't written in the best way to @@ -764,16 +767,17 @@ static int paint_space_stroke(bContext *C, wmOperator *op, wmEvent *event, const length = len_v2(vec); if(length > FLT_EPSILON) { + const Scene *scene = CTX_data_scene(C); int steps; int i; float pressure= 1.0f; /* XXX mysterious :) what has 'use size' do with this here... if you don't check for it, pressure fails */ - if(brush_use_size_pressure(stroke->brush)) + if(brush_use_size_pressure(scene, stroke->brush)) pressure = event_tablet_data(event, NULL); if(pressure > FLT_EPSILON) { - scale = (brush_size(stroke->brush)*pressure*stroke->brush->spacing/50.0f) / length; + scale = (brush_size(scene, stroke->brush)*pressure*stroke->brush->spacing/50.0f) / length; if(scale > FLT_EPSILON) { mul_v2_fl(vec, scale); diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 76185d7c5cf..c9a60236d07 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -85,15 +85,6 @@ #include "paint_intern.h" -/* brush->vertexpaint_tool */ -#define VP_MIX 0 -#define VP_ADD 1 -#define VP_SUB 2 -#define VP_MUL 3 -#define VP_BLUR 4 -#define VP_LIGHTEN 5 -#define VP_DARKEN 6 - /* polling - retrieve whether cursor should be set or operator should be done */ @@ -390,7 +381,7 @@ void wpaint_fill(VPaint *wp, Object *ob, float paintweight) { Mesh *me= ob->data; MFace *mf; - MDeformWeight *dw, *uw; + MDeformWeight *dw, *dw_prev; int vgroup_active, vgroup_mirror= -1; unsigned int index; @@ -425,8 +416,8 @@ void wpaint_fill(VPaint *wp, Object *ob, float paintweight) dw= defvert_verify_index(&me->dvert[vidx], vgroup_active); if(dw) { - uw= defvert_verify_index(wp->wpaint_prev+vidx, vgroup_active); - uw->weight= dw->weight; /* set the undo weight */ + dw_prev= defvert_verify_index(wp->wpaint_prev+vidx, vgroup_active); + dw_prev->weight= dw->weight; /* set the undo weight */ dw->weight= paintweight; if(me->editflag & ME_EDIT_MIRROR_X) { /* x mirror painting */ @@ -435,12 +426,12 @@ void wpaint_fill(VPaint *wp, Object *ob, float paintweight) /* copy, not paint again */ if(vgroup_mirror != -1) { dw= defvert_verify_index(me->dvert+j, vgroup_mirror); - uw= defvert_verify_index(wp->wpaint_prev+j, vgroup_mirror); + dw_prev= defvert_verify_index(wp->wpaint_prev+j, vgroup_mirror); } else { dw= defvert_verify_index(me->dvert+j, vgroup_active); - uw= defvert_verify_index(wp->wpaint_prev+j, vgroup_active); + dw_prev= defvert_verify_index(wp->wpaint_prev+j, vgroup_active); } - uw->weight= dw->weight; /* set the undo weight */ + dw_prev->weight= dw->weight; /* set the undo weight */ dw->weight= paintweight; } } @@ -654,34 +645,51 @@ static unsigned int mcol_darken(unsigned int col1, unsigned int col2, int fac) return col; } -static void vpaint_blend(VPaint *vp, unsigned int *col, unsigned int *colorig, unsigned int paintcol, int alpha) +/* wpaint has 'wpaint_blend_tool' */ +static unsigned int vpaint_blend_tool(const int tool, const unsigned int col, + const unsigned int paintcol, const int alpha_i) +{ + switch (tool) { + case PAINT_BLEND_MIX: + case PAINT_BLEND_BLUR: + return mcol_blend(col, paintcol, alpha_i); + case PAINT_BLEND_ADD: + return mcol_add(col, paintcol, alpha_i); + case PAINT_BLEND_SUB: + return mcol_sub(col, paintcol, alpha_i); + case PAINT_BLEND_MUL: + return mcol_mul(col, paintcol, alpha_i); + case PAINT_BLEND_LIGHTEN: + return mcol_lighten(col, paintcol, alpha_i); + case PAINT_BLEND_DARKEN: + return mcol_darken(col, paintcol, alpha_i); + default: + BLI_assert(0); + return 0; + } +} + +/* wpaint has 'wpaint_blend' */ +static unsigned int vpaint_blend(VPaint *vp, unsigned int col, unsigned int colorig, const + unsigned int paintcol, const int alpha_i, + /* pre scaled from [0-1] --> [0-255] */ + const int brush_alpha_value_i) { Brush *brush = paint_brush(&vp->paint); + const int tool = brush->vertexpaint_tool; + + col = vpaint_blend_tool(tool, col, paintcol, alpha_i); - if(brush->vertexpaint_tool==VP_MIX || brush->vertexpaint_tool==VP_BLUR) *col= mcol_blend( *col, paintcol, alpha); - else if(brush->vertexpaint_tool==VP_ADD) *col= mcol_add( *col, paintcol, alpha); - else if(brush->vertexpaint_tool==VP_SUB) *col= mcol_sub( *col, paintcol, alpha); - else if(brush->vertexpaint_tool==VP_MUL) *col= mcol_mul( *col, paintcol, alpha); - else if(brush->vertexpaint_tool==VP_LIGHTEN) *col= mcol_lighten( *col, paintcol, alpha); - else if(brush->vertexpaint_tool==VP_DARKEN) *col= mcol_darken( *col, paintcol, alpha); - /* if no spray, clip color adding with colorig & orig alpha */ if((vp->flag & VP_SPRAY)==0) { - unsigned int testcol=0, a; + unsigned int testcol, a; char *cp, *ct, *co; - alpha= (int)(255.0f*brush_alpha(brush)); - - if(brush->vertexpaint_tool==VP_MIX || brush->vertexpaint_tool==VP_BLUR) testcol= mcol_blend( *colorig, paintcol, alpha); - else if(brush->vertexpaint_tool==VP_ADD) testcol= mcol_add( *colorig, paintcol, alpha); - else if(brush->vertexpaint_tool==VP_SUB) testcol= mcol_sub( *colorig, paintcol, alpha); - else if(brush->vertexpaint_tool==VP_MUL) testcol= mcol_mul( *colorig, paintcol, alpha); - else if(brush->vertexpaint_tool==VP_LIGHTEN) testcol= mcol_lighten( *colorig, paintcol, alpha); - else if(brush->vertexpaint_tool==VP_DARKEN) testcol= mcol_darken( *colorig, paintcol, alpha); + testcol = vpaint_blend_tool(tool, colorig, paintcol, brush_alpha_value_i); - cp= (char *)col; + cp= (char *)&col; ct= (char *)&testcol; - co= (char *)colorig; + co= (char *)&colorig; for(a=0; a<4; a++) { if( ct[a]<co[a] ) { @@ -694,6 +702,8 @@ static void vpaint_blend(VPaint *vp, unsigned int *col, unsigned int *colorig, u } } } + + return col; } @@ -736,7 +746,7 @@ static int sample_backbuf_area(ViewContext *vc, int *indexar, int totface, int x /* whats _dl mean? */ static float calc_vp_strength_dl(VPaint *vp, ViewContext *vc, const float *vert_nor, - const float mval[2], const float brush_size_final) + const float mval[2], const float brush_size_pressure) { Brush *brush = paint_brush(&vp->paint); float dist_squared; @@ -745,24 +755,24 @@ static float calc_vp_strength_dl(VPaint *vp, ViewContext *vc, const float *vert_ project_float_noclip(vc->ar, vert_nor, vertco); sub_v2_v2v2(delta, mval, vertco); dist_squared= dot_v2v2(delta, delta); /* len squared */ - if (dist_squared > brush_size_final * brush_size_final) { + if (dist_squared > brush_size_pressure * brush_size_pressure) { return 0.0f; } else { const float dist = sqrtf(dist_squared); - return brush_curve_strength_clamp(brush, dist, brush_size_final); + return brush_curve_strength_clamp(brush, dist, brush_size_pressure); } } static float calc_vp_alpha_dl(VPaint *vp, ViewContext *vc, float vpimat[][3], const float *vert_nor, const float mval[2], - const float brush_size_final, const float brush_alpha_final) + const float brush_size_pressure, const float brush_alpha_pressure) { - float strength = calc_vp_strength_dl(vp, vc, vert_nor, mval, brush_size_final); + float strength = calc_vp_strength_dl(vp, vc, vert_nor, mval, brush_size_pressure); if (strength > 0.0f) { - float alpha= brush_alpha_final * strength; + float alpha= brush_alpha_pressure * strength; if(vp->flag & VP_NORMALS) { float dvec[3]; @@ -787,86 +797,83 @@ static float calc_vp_alpha_dl(VPaint *vp, ViewContext *vc, return 0.0f; } -static void wpaint_blend(VPaint *wp, MDeformWeight *dw, MDeformWeight *uw, float alpha, float paintval, int flip, int multipaint) +/* vpaint has 'vpaint_blend_tool' */ +/* result is not clamped from [0-1] */ +static float wpaint_blend_tool(const int tool, + /* dw->weight */ + const float weight, + const float paintval, const float alpha) +{ + switch (tool) { + case PAINT_BLEND_MIX: + case PAINT_BLEND_BLUR: + return (paintval * alpha) + (weight * (1.0f - alpha)); + case PAINT_BLEND_ADD: + return (paintval * alpha) + weight; + case PAINT_BLEND_SUB: + return (paintval * alpha) - weight; + case PAINT_BLEND_MUL: + /* first mul, then blend the fac */ + return ((1.0f - alpha) + alpha * paintval) * weight; + case PAINT_BLEND_LIGHTEN: + return (weight < paintval) ? (paintval * alpha) + (weight * (1.0f - alpha)) : weight; + case PAINT_BLEND_DARKEN: + return (weight > paintval) ? (paintval * alpha) + (weight * (1.0f - alpha)) : weight; + default: + BLI_assert(0); + return 0.0f; + } +} + +/* vpaint has 'vpaint_blend' */ +static float wpaint_blend(VPaint *wp, float weight, float weight_prev, + const float alpha, float paintval, + const float brush_alpha_value, + const short do_flip, const short do_multipaint_totsel) { Brush *brush = paint_brush(&wp->paint); int tool = brush->vertexpaint_tool; - if (flip) { + if (do_flip) { switch(tool) { - case VP_MIX: + case PAINT_BLEND_MIX: paintval = 1.f - paintval; break; - case VP_ADD: - tool= VP_SUB; break; - case VP_SUB: - tool= VP_ADD; break; - case VP_LIGHTEN: - tool= VP_DARKEN; break; - case VP_DARKEN: - tool= VP_LIGHTEN; break; + case PAINT_BLEND_ADD: + tool= PAINT_BLEND_SUB; break; + case PAINT_BLEND_SUB: + tool= PAINT_BLEND_ADD; break; + case PAINT_BLEND_LIGHTEN: + tool= PAINT_BLEND_DARKEN; break; + case PAINT_BLEND_DARKEN: + tool= PAINT_BLEND_LIGHTEN; break; } } - if(tool==VP_MIX || tool==VP_BLUR) - dw->weight = paintval*alpha + dw->weight*(1.0f-alpha); - else if(tool==VP_ADD) - dw->weight += paintval*alpha; - else if(tool==VP_SUB) - dw->weight -= paintval*alpha; - else if(tool==VP_MUL) - /* first mul, then blend the fac */ - dw->weight = ((1.0f-alpha) + alpha*paintval)*dw->weight; - else if(tool==VP_LIGHTEN) { - if (dw->weight < paintval) - dw->weight = paintval*alpha + dw->weight*(1.0f-alpha); - } else if(tool==VP_DARKEN) { - if (dw->weight > paintval) - dw->weight = paintval*alpha + dw->weight*(1.0f-alpha); - } - /* delay clamping until the end so multi-paint can function when the active group is at the limits */ - if(multipaint == FALSE) { - CLAMP(dw->weight, 0.0f, 1.0f); + weight = wpaint_blend_tool(tool, weight, paintval, alpha); + + /* delay clamping until the end so multi-paint can function when the active group is at the limits */ + if(do_multipaint_totsel == FALSE) { + CLAMP(weight, 0.0f, 1.0f); } /* if no spray, clip result with orig weight & orig alpha */ - if((wp->flag & VP_SPRAY)==0) { - float testw=0.0f; - - alpha= brush_alpha(brush); - if(tool==VP_MIX || tool==VP_BLUR) - testw = paintval*alpha + uw->weight*(1.0f-alpha); - else if(tool==VP_ADD) - testw = uw->weight + paintval*alpha; - else if(tool==VP_SUB) - testw = uw->weight - paintval*alpha; - else if(tool==VP_MUL) - /* first mul, then blend the fac */ - testw = ((1.0f-alpha) + alpha*paintval)*uw->weight; - else if(tool==VP_LIGHTEN) { - if (uw->weight < paintval) - testw = paintval*alpha + uw->weight*(1.0f-alpha); - else - testw = uw->weight; - } else if(tool==VP_DARKEN) { - if (uw->weight > paintval) - testw = paintval*alpha + uw->weight*(1.0f-alpha); - else - testw = uw->weight; - } + if ((wp->flag & VP_SPRAY) == 0) { + if(do_multipaint_totsel == FALSE) { + float testw = wpaint_blend_tool(tool, weight_prev, paintval, brush_alpha_value); - if(multipaint == FALSE) { CLAMP(testw, 0.0f, 1.0f); - if( testw<uw->weight ) { - if(dw->weight < testw) dw->weight= testw; - else if(dw->weight > uw->weight) dw->weight= uw->weight; + if (testw < weight_prev) { + if(weight < testw) weight = testw; + else if(weight > weight_prev) weight = weight_prev; } else { - if(dw->weight > testw) dw->weight= testw; - else if(dw->weight < uw->weight) dw->weight= uw->weight; + if (weight > testw) weight = testw; + else if (weight < weight_prev) weight = weight_prev; } } } - + + return weight; } /* ----------------------------------------------------- */ @@ -1062,75 +1069,99 @@ void PAINT_OT_weight_sample_group(wmOperatorType *ot) ot->prop= prop; } - -#if 0 /* UNUSED */ -static void do_weight_paint_auto_normalize(MDeformVert *dvert, - int paint_nr, char *map) +static void do_weight_paint_normalize_all(MDeformVert *dvert, const int defbase_tot, const char *vgroup_validmap) { -// MDeformWeight *dw = dvert->dw; - float sum=0.0f, fac=0.0f, paintw=0.0f; - int i, tot=0; + float sum= 0.0f, fac; + unsigned int i, tot=0; + MDeformWeight *dw; + + for (i= dvert->totweight, dw= dvert->dw; i != 0; i--, dw++) { + if (dw->def_nr < defbase_tot && vgroup_validmap[dw->def_nr]) { + tot++; + sum += dw->weight; + } + } - if (!map) + if ((tot == 0) || (sum == 1.0f)) { return; + } - for (i=0; i<dvert->totweight; i++) { - if (dvert->dw[i].def_nr == paint_nr) - paintw = dvert->dw[i].weight; + if (sum != 0.0f) { + fac= 1.0f / sum; - if (map[dvert->dw[i].def_nr]) { - tot += 1; - if (dvert->dw[i].def_nr != paint_nr) - sum += dvert->dw[i].weight; + for (i= dvert->totweight, dw= dvert->dw; i != 0; i--, dw++) { + if (dw->def_nr < defbase_tot && vgroup_validmap[dw->def_nr]) { + dw->weight *= fac; + } } } - - if (!tot || sum <= (1.0f - paintw)) - return; - - fac = sum / (1.0f - paintw); - fac = fac==0.0f ? 1.0f : 1.0f / fac; + else { + /* hrmf, not a factor in this case */ + fac = 1.0f / tot; - for (i=0; i<dvert->totweight; i++) { - if (map[dvert->dw[i].def_nr]) { - if (dvert->dw[i].def_nr != paint_nr) - dvert->dw[i].weight *= fac; + for (i= dvert->totweight, dw= dvert->dw; i != 0; i--, dw++) { + if (dw->def_nr < defbase_tot && vgroup_validmap[dw->def_nr]) { + dw->weight = fac; + } } } } -#endif -/* the active group should be involved in auto normalize */ -static void do_weight_paint_auto_normalize_all_groups(MDeformVert *dvert, const int defbase_tot, - const char *vgroup_validmap, char do_auto_normalize) +/* same as function above except it normalizes against the active vgroup which remains unchanged + * + * note that the active is just the group which is unchanged, it can be any, + * can also be -1 to normalize all but in that case call 'do_weight_paint_normalize_all' */ +static void do_weight_paint_normalize_all_active(MDeformVert *dvert, const int defbase_tot, const char *vgroup_validmap, + const int vgroup_active) { - if (do_auto_normalize == FALSE) { + float sum= 0.0f, fac; + unsigned int i, tot=0; + MDeformWeight *dw; + float act_weight = 0.0f; + + for (i= dvert->totweight, dw= dvert->dw; i != 0; i--, dw++) { + if (dw->def_nr < defbase_tot && vgroup_validmap[dw->def_nr]) { + if (dw->def_nr != vgroup_active) { + sum += dw->weight; + tot++; + } + else { + act_weight = dw->weight; + } + } + } + + if ((tot == 0) || (sum + act_weight == 1.0f)) { return; } - else { - float sum= 0.0f, fac; - unsigned int i, tot=0; - MDeformWeight *dw; + + if (sum != 0.0f) { + fac = (1.0f / sum) * (1.0f - act_weight); for (i= dvert->totweight, dw= dvert->dw; i != 0; i--, dw++) { - if (dw->def_nr < defbase_tot) { - if (vgroup_validmap[dw->def_nr]) { - tot++; - sum += dw->weight; + if (dw->def_nr < defbase_tot && vgroup_validmap[dw->def_nr]) { + if (dw->def_nr != vgroup_active) { + dw->weight *= fac; + + /* paranoid but possibly with float error */ + CLAMP(dw->weight, 0.0f, 1.0f); } } } + } + else { + /* corner case where we need to scale all weights evenly because they're all zero */ - if ((tot == 0) || (sum == 1.0f) || (sum == 0.0f)) { - return; - } + /* hrmf, not a factor in this case */ + fac = (1.0f - act_weight) / tot; - fac= 1.0f / sum; + /* paranoid but possibly with float error */ + CLAMP(fac, 0.0f, 1.0f); for (i= dvert->totweight, dw= dvert->dw; i != 0; i--, dw++) { - if (dw->def_nr < defbase_tot) { - if (vgroup_validmap[dw->def_nr]) { - dw->weight *= fac; + if (dw->def_nr < defbase_tot && vgroup_validmap[dw->def_nr]) { + if (dw->def_nr != vgroup_active) { + dw->weight = fac; } } } @@ -1487,6 +1518,8 @@ typedef struct WeightPaintInfo { char do_flip; char do_multipaint; char do_auto_normalize; + + float brush_alpha_value; /* result of brush_alpha() */ } WeightPaintInfo; /* fresh start to make multi-paint and locking modular */ @@ -1526,7 +1559,10 @@ static int apply_mp_locks_normalize(Mesh *me, const WeightPaintInfo *wpi, enforce_locks(&dv_test, dv, wpi->defbase_tot, wpi->defbase_sel, wpi->lock_flags, wpi->vgroup_validmap, wpi->do_auto_normalize, wpi->do_multipaint); - do_weight_paint_auto_normalize_all_groups(dv, wpi->defbase_tot, wpi->vgroup_validmap, wpi->do_auto_normalize); + if (wpi->do_auto_normalize) { + /* XXX - should we pass the active group? - currently '-1' */ + do_weight_paint_normalize_all(dv, wpi->defbase_tot, wpi->vgroup_validmap); + } if(oldChange && wpi->do_multipaint && wpi->defbase_tot_sel > 1) { if(tdw->weight != oldw) { @@ -1568,55 +1604,151 @@ static int get_first_selected_nonzero_weight(MDeformVert *dvert, const int defba static char *wpaint_make_validmap(Object *ob); -static void do_weight_paint_vertex( /* vars which remain the same for every vert */ +static void do_weight_paint_vertex(/* vars which remain the same for every vert */ VPaint *wp, Object *ob, const WeightPaintInfo *wpi, - /* vars which change on each stroke */ + /* vars which change on each stroke */ const unsigned int index, float alpha, float paintweight ) { Mesh *me= ob->data; MDeformVert *dv= &me->dvert[index]; - MDeformWeight *dw, *uw; + MDeformWeight *dw, *dw_prev; + + /* mirror vars */ + int index_mirr; + int vgroup_mirr; + + MDeformVert *dv_mirr; + MDeformWeight *dw_mirr; + + const short do_multipaint_totsel = (wpi->do_multipaint && wpi->defbase_tot_sel > 1); if(wp->flag & VP_ONLYVGROUP) { dw= defvert_find_index(dv, wpi->vgroup_active); - uw= defvert_find_index(wp->wpaint_prev+index, wpi->vgroup_active); + dw_prev= defvert_find_index(wp->wpaint_prev+index, wpi->vgroup_active); } else { dw= defvert_verify_index(dv, wpi->vgroup_active); - uw= defvert_verify_index(wp->wpaint_prev+index, wpi->vgroup_active); + dw_prev= defvert_verify_index(wp->wpaint_prev+index, wpi->vgroup_active); } - if(dw==NULL || uw==NULL) { + if(dw==NULL || dw_prev==NULL) { return; } + + /* from now on we can check if mirrors enabled if this var is -1 and not bother with the flag */ + if (me->editflag & ME_EDIT_MIRROR_X) { + index_mirr = mesh_get_x_mirror_vert(ob, index); + vgroup_mirr = (wpi->vgroup_mirror != -1) ? wpi->vgroup_mirror : wpi->vgroup_active; + + /* another possible error - mirror group _and_ active group are the same (which is fine), + * but we also are painting onto a center vertex - this would paint the same weight twice */ + if (index_mirr == index && vgroup_mirr == wpi->vgroup_active) { + index_mirr = vgroup_mirr = -1; + } + } + else { + index_mirr = vgroup_mirr = -1; + } + + + /* get the mirror def vars */ + if (index_mirr != -1) { + dv_mirr = &me->dvert[index_mirr]; + if (wp->flag & VP_ONLYVGROUP) { + dw_mirr = defvert_find_index(dv_mirr, vgroup_mirr); + + if (dw_mirr == NULL) { + index_mirr = vgroup_mirr = -1; + dv_mirr = NULL; + } + } + else { + if (index != index_mirr) { + dw_mirr = defvert_verify_index(dv_mirr, vgroup_mirr); + } + else { + /* dv and dv_mirr are the same */ + int totweight_prev = dv_mirr->totweight; + int dw_offset = (int)(dw - dv_mirr->dw); + dw_mirr = defvert_verify_index(dv_mirr, vgroup_mirr); + + /* if we added another, get our old one back */ + if (totweight_prev != dv_mirr->totweight) { + dw = &dv_mirr->dw[dw_offset]; + } + } + } + } + else { + dv_mirr = NULL; + dw_mirr = NULL; + } + + /* TODO: De-duplicate the simple weight paint - jason */ /* ... or not, since its <10 SLOC - campbell */ /* If there are no locks or multipaint, * then there is no need to run the more complicated checks */ - if ( (wpi->do_multipaint == FALSE || wpi->defbase_tot_sel <= 1) && + if ( (do_multipaint_totsel == FALSE) && (wpi->lock_flags == NULL || has_locked_group(dv, wpi->defbase_tot, wpi->vgroup_validmap, wpi->lock_flags) == FALSE)) { - wpaint_blend(wp, dw, uw, alpha, paintweight, wpi->do_flip, FALSE); - - if(me->editflag & ME_EDIT_MIRROR_X) { /* x mirror painting */ - int index_mirr= mesh_get_x_mirror_vert(ob, index); - if(index_mirr != -1) { - MDeformVert *dv_mirr= &me->dvert[index_mirr]; - /* copy, not paint again */ - uw= defvert_verify_index(dv_mirr, (wpi->vgroup_mirror != -1) ? wpi->vgroup_mirror : wpi->vgroup_active); - uw->weight= dw->weight; - } + dw->weight = wpaint_blend(wp, dw->weight, dw_prev->weight, alpha, paintweight, + wpi->brush_alpha_value, wpi->do_flip, FALSE); + + /* WATCH IT: take care of the ordering of applying mirror -> normalize, + * can give wrong results [#26193], least confusing if normalize is done last */ + + /* apply mirror */ + if(index_mirr != -1) { + /* copy, not paint again */ + dw_mirr->weight = dw->weight; } - /* important to normalize after mirror, otherwise mirror gets weight - * which has already been scaled down in relation to other weights, - * then scales a second time [#26193]. Tricky multi-paint code doesn't - * suffer from this problem - campbell */ - do_weight_paint_auto_normalize_all_groups(dv, wpi->defbase_tot, wpi->vgroup_validmap, wpi->do_auto_normalize); + /* apply normalize */ + if (wpi->do_auto_normalize) { + /* note on normalize - this used to be applied after painting and normalize all weights, + * in some ways this is good because there is feedback where the more weights involved would + * 'risist' so you couldn't instantly zero out other weights by painting 1.0 on the active. + * + * However this gave a problem since applying mirror, then normalize both verts + * the resulting weight wont match on both sides. + * + * If this 'resisting', slower normalize is nicer, we could call + * do_weight_paint_normalize_all() and only use... + * do_weight_paint_normalize_all_active() when normalizing the mirror vertex. + * - campbell + */ + do_weight_paint_normalize_all_active(dv, wpi->defbase_tot, wpi->vgroup_validmap, wpi->vgroup_active); + + if (index_mirr != -1) { + /* only normalize if this is not a center vertex, else we get a conflict, normalizing twice */ + if (index != index_mirr) { + do_weight_paint_normalize_all_active(dv_mirr, wpi->defbase_tot, wpi->vgroup_validmap, vgroup_mirr); + } + else { + /* this case accounts for... + * - painting onto a center vertex of a mesh + * - x mirror is enabled + * - auto normalize is enabled + * - the group you are painting onto has a L / R version + * + * We wan't L/R vgroups to have the same weight but this cant be if both are over 0.5, + * We _could_ have special check for that, but this would need its own normalize function which + * holds 2 groups from changing at once. + * + * So! just balance out the 2 weights, it keeps them equal and everything normalized. + * + * While it wont hit the desired weight immediatelty as the user waggles their mouse, + * constant painting and re-normalizing will get there. this is also just simpler logic. + * - campbell */ + dw_mirr->weight = dw->weight = (dw_mirr->weight + dw->weight) * 0.5f; + } + } + } } else { /* use locks and/or multipaint */ @@ -1626,38 +1758,37 @@ static void do_weight_paint_vertex( /* vars which remain the same for every vert float change = 0; float oldChange = 0; int i; - MDeformWeight *tdw = NULL, *tuw; + MDeformWeight *tdw = NULL, *tdw_prev; MDeformVert dv_copy= {NULL}; oldw = dw->weight; - wpaint_blend(wp, dw, uw, alpha, paintweight, wpi->do_flip, wpi->do_multipaint && wpi->defbase_tot_sel >1); - neww = dw->weight; - dw->weight = oldw; + neww = wpaint_blend(wp, dw->weight, dw_prev->weight, alpha, paintweight, + wpi->brush_alpha_value, wpi->do_flip, do_multipaint_totsel); /* setup multi-paint */ - if(wpi->defbase_tot_sel > 1 && wpi->do_multipaint) { + if (do_multipaint_totsel) { dv_copy.dw= MEM_dupallocN(dv->dw); dv_copy.flag = dv->flag; dv_copy.totweight = dv->totweight; tdw = dw; - tuw = uw; + tdw_prev = dw_prev; change = get_mp_change(&wp->wpaint_prev[index], wpi->defbase_tot, wpi->defbase_sel, neww - oldw); if(change) { if(!tdw->weight) { i = get_first_selected_nonzero_weight(dv, wpi->defbase_tot, wpi->defbase_sel); if(i>=0) { tdw = &(dv->dw[i]); - tuw = defvert_verify_index(&wp->wpaint_prev[index], tdw->def_nr); + tdw_prev = defvert_verify_index(&wp->wpaint_prev[index], tdw->def_nr); } else { change = 0; } } - if(change && tuw->weight && tuw->weight * change) { - if(tdw->weight != tuw->weight) { - oldChange = tdw->weight/tuw->weight; - testw = tuw->weight*change; - if( testw > tuw->weight ) { + if(change && tdw_prev->weight && tdw_prev->weight * change) { + if(tdw->weight != tdw_prev->weight) { + oldChange = tdw->weight/tdw_prev->weight; + testw = tdw_prev->weight*change; + if( testw > tdw_prev->weight ) { if(change > oldChange) { /* reset the weights and use the new change */ defvert_reset_to_prev(wp->wpaint_prev+index, dv); @@ -1701,15 +1832,12 @@ static void do_weight_paint_vertex( /* vars which remain the same for every vert (void)dw; /* quiet warnigns */ #endif - if(me->editflag & ME_EDIT_MIRROR_X) { /* x mirror painting */ - int index_mirr= mesh_get_x_mirror_vert(ob, index); - if(index_mirr != -1) { - MDeformVert *dv_mirr= &me->dvert[index_mirr]; - /* copy, not paint again */ - uw= defvert_verify_index(dv_mirr, (wpi->vgroup_mirror != -1) ? wpi->vgroup_mirror : wpi->vgroup_active); - //uw->weight= dw->weight; - apply_mp_locks_normalize(me, wpi, index_mirr, uw, tdw, change, oldChange, oldw, neww); - } + /* x mirror painting */ + if(index_mirr != -1) { + /* copy, not paint again */ + + /* dw_mirr->weight = dw->weight; */ /* TODO, explain the logic in not assigning weight! - campbell */ + apply_mp_locks_normalize(me, wpi, index_mirr, dw_mirr, tdw, change, oldChange, oldw, neww); } } } @@ -1974,6 +2102,7 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, PointerRNA *itemptr) { + Scene *scene= CTX_data_scene(C); ToolSettings *ts= CTX_data_tool_settings(C); VPaint *wp= ts->wpaint; Brush *brush = paint_brush(&wp->paint); @@ -1992,8 +2121,9 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P char *defbase_sel; const float pressure = RNA_float_get(itemptr, "pressure"); - const float brush_size_final = brush_size(brush) * (brush_use_size_pressure(brush) ? pressure : 1.0f); - const float brush_alpha_final = brush_alpha(brush) * (brush_use_alpha_pressure(brush) ? pressure : 1.0f); + const float brush_size_pressure = brush_size(scene, brush) * (brush_use_size_pressure(scene, brush) ? pressure : 1.0f); + const float brush_alpha_value = brush_alpha(scene, brush); + const float brush_alpha_pressure = brush_alpha_value * (brush_use_alpha_pressure(scene, brush) ? pressure : 1.0f); /* intentionally dont initialize as NULL, make sure we initialize all members below */ WeightPaintInfo wpi; @@ -2037,6 +2167,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P wpi.do_flip= RNA_boolean_get(itemptr, "pen_flip"); wpi.do_multipaint= (ts->multipaint != 0); wpi.do_auto_normalize= ((ts->auto_normalize != 0) && (wpi.vgroup_validmap != NULL)); + wpi.brush_alpha_value= brush_alpha_value; /* *** done setting up WeightPaintInfo *** */ @@ -2049,7 +2180,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P if(wp->flag & VP_AREA) { /* Ugly hack, to avoid drawing vertex index when getting the face index buffer - campbell */ me->editflag &= ~ME_EDIT_VERT_SEL; - totindex= sample_backbuf_area(vc, indexar, me->totface, mval[0], mval[1], brush_size_final); + totindex= sample_backbuf_area(vc, indexar, me->totface, mval[0], mval[1], brush_size_pressure); me->editflag |= use_vert_sel ? ME_EDIT_VERT_SEL : 0; } else { @@ -2085,7 +2216,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P /* make sure each vertex gets treated only once */ /* and calculate filter weight */ totw= 0.0f; - if(brush->vertexpaint_tool==VP_BLUR) + if (brush->vertexpaint_tool == PAINT_BLEND_BLUR) paintweight= 0.0f; else paintweight= ts->vgroup_weight; @@ -2107,7 +2238,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P if(mface->v4) me->dvert[mface->v4].flag= 1; } - if(brush->vertexpaint_tool==VP_BLUR) { + if (brush->vertexpaint_tool == PAINT_BLEND_BLUR) { MDeformWeight *dw, *(*dw_func)(MDeformVert *, const int); unsigned int fidx= mface->v4 ? 3:2; @@ -2118,7 +2249,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P do { unsigned int vidx= *(&mface->v1 + fidx); - const float fac = calc_vp_strength_dl(wp, vc, wpd->vertexcosnos+6*vidx, mval, brush_size_final); + const float fac = calc_vp_strength_dl(wp, vc, wpd->vertexcosnos+6*vidx, mval, brush_size_pressure); if (fac > 0.0f) { dw = dw_func(&me->dvert[vidx], wpi.vgroup_active); paintweight += dw ? (dw->weight * fac) : 0.0f; @@ -2131,7 +2262,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P } } - if (brush->vertexpaint_tool==VP_BLUR) { + if (brush->vertexpaint_tool == PAINT_BLEND_BLUR) { paintweight /= totw; } @@ -2145,7 +2276,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P if(me->dvert[vidx].flag) { alpha= calc_vp_alpha_dl(wp, vc, wpd->wpimat, wpd->vertexcosnos+6*vidx, - mval, brush_size_final, brush_alpha_final); + mval, brush_size_pressure, brush_alpha_pressure); if(alpha) { do_weight_paint_vertex(wp, ob, &wpi, vidx, alpha, paintweight); } @@ -2406,7 +2537,7 @@ static int vpaint_stroke_test_start(bContext *C, struct wmOperator *op, wmEvent static void vpaint_paint_face(VPaint *vp, VPaintData *vpd, Object *ob, const unsigned int index, const float mval[2], - const float brush_size_final, const float brush_alpha_final, + const float brush_size_pressure, const float brush_alpha_pressure, int UNUSED(flip)) { ViewContext *vc = &vpd->vc; @@ -2417,12 +2548,14 @@ static void vpaint_paint_face(VPaint *vp, VPaintData *vpd, Object *ob, unsigned int *mcolorig= ((unsigned int*)vp->vpaint_prev) + 4*index; float alpha; int i; + + int brush_alpha_pressure_i; if((vp->flag & VP_COLINDEX && mface->mat_nr!=ob->actcol-1) || ((me->editflag & ME_EDIT_PAINT_MASK) && !(mface->flag & ME_FACE_SEL))) return; - if(brush->vertexpaint_tool==VP_BLUR) { + if (brush->vertexpaint_tool == PAINT_BLEND_BLUR) { unsigned int fcol1= mcol_blend( mcol[0], mcol[1], 128); if(mface->v4) { unsigned int fcol2= mcol_blend( mcol[2], mcol[3], 128); @@ -2431,20 +2564,23 @@ static void vpaint_paint_face(VPaint *vp, VPaintData *vpd, Object *ob, else { vpd->paintcol= mcol_blend( mcol[2], fcol1, 170); } - } + brush_alpha_pressure_i = (int)(brush_alpha_pressure*255.0f); + for(i = 0; i < (mface->v4 ? 4 : 3); ++i) { alpha = calc_vp_alpha_dl(vp, vc, vpd->vpimat, vpd->vertexcosnos+6*(&mface->v1)[i], - mval, brush_size_final, brush_alpha_final); - if(alpha) { - vpaint_blend(vp, mcol+i, mcolorig+i, vpd->paintcol, (int)(alpha*255.0f)); + mval, brush_size_pressure, brush_alpha_pressure); + if (alpha) { + const int alpha_i = (int)(alpha*255.0f); + mcol[i] = vpaint_blend(vp, mcol[i], mcolorig[i], vpd->paintcol, alpha_i, brush_alpha_pressure_i); } } } static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, PointerRNA *itemptr) { + Scene *scene= CTX_data_scene(C); ToolSettings *ts= CTX_data_tool_settings(C); struct VPaintData *vpd = paint_stroke_mode_data(stroke); VPaint *vp= ts->vpaint; @@ -2458,8 +2594,8 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P float mval[2]; const float pressure = RNA_float_get(itemptr, "pressure"); - const float brush_size_final = brush_size(brush) * (brush_use_size_pressure(brush) ? pressure : 1.0f); - const float brush_alpha_final = brush_alpha(brush) * (brush_use_alpha_pressure(brush) ? pressure : 1.0f); + const float brush_size_pressure = brush_size(scene, brush) * (brush_use_size_pressure(scene, brush) ? pressure : 1.0f); + const float brush_alpha_pressure = brush_alpha(scene, brush) * (brush_use_alpha_pressure(scene, brush) ? pressure : 1.0f); RNA_float_get_array(itemptr, "mouse", mval); flip = RNA_boolean_get(itemptr, "pen_flip"); @@ -2475,7 +2611,7 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P /* which faces are involved */ if(vp->flag & VP_AREA) { - totindex= sample_backbuf_area(vc, indexar, me->totface, mval[0], mval[1], brush_size_final); + totindex= sample_backbuf_area(vc, indexar, me->totface, mval[0], mval[1], brush_size_pressure); } else { indexar[0]= view3d_sample_backbuf(vc, mval[0], mval[1]); @@ -2487,14 +2623,14 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P for(index=0; index<totindex; index++) { if (indexar[index] && indexar[index]<=me->totface) { - vpaint_paint_face(vp, vpd, ob, indexar[index]-1, mval, brush_size_final, brush_alpha_final, flip); + vpaint_paint_face(vp, vpd, ob, indexar[index]-1, mval, brush_size_pressure, brush_alpha_pressure, flip); } } swap_m4m4(vc->rv3d->persmat, mat); /* was disabled because it is slow, but necessary for blur */ - if(brush->vertexpaint_tool == VP_BLUR) + if (brush->vertexpaint_tool == PAINT_BLEND_BLUR) do_shared_vertexcol(me); ED_region_tag_redraw(vc->ar); diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 649a993ea69..27a0bc8f502 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -236,7 +236,7 @@ typedef struct StrokeCache { float vertex_rotation; - char saved_active_brush_name[24]; + char saved_active_brush_name[MAX_ID_NAME]; int alt_smooth; float plane_trim_squared; @@ -543,13 +543,14 @@ static float calc_symmetry_feather(Sculpt *sd, StrokeCache* cache) special multiplier found experimentally to scale the strength factor. */ static float brush_strength(Sculpt *sd, StrokeCache *cache, float feather) { + const Scene *scene = cache->vc->scene; Brush *brush = paint_brush(&sd->paint); /* Primary strength input; square it to make lower values more sensitive */ - const float root_alpha = brush_alpha(brush); + const float root_alpha = brush_alpha(scene, brush); float alpha = root_alpha*root_alpha; float dir = brush->flag & BRUSH_DIR_IN ? -1 : 1; - float pressure = brush_use_alpha_pressure(brush) ? cache->pressure : 1; + float pressure = brush_use_alpha_pressure(scene, brush) ? cache->pressure : 1; float pen_flip = cache->pen_flip ? -1 : 1; float invert = cache->invert ? -1 : 1; float accum = integrate_overlap(brush); @@ -679,7 +680,7 @@ static float tex_strength(SculptSession *ss, Brush *br, float point[3], else /* else (mtex->brush_map_mode == MTEX_MAP_MODE_TILED), leave the coordinates relative to the screen */ { - radius = brush_size(br); // use unadjusted size for tiled mode + radius = brush_size(ss->cache->vc->scene, br); // use unadjusted size for tiled mode x = point_2d[0]; y = point_2d[1]; @@ -1167,6 +1168,7 @@ static void do_draw_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) { SculptSession *ss = ob->sculpt; + const Scene *scene = ss->cache->vc->scene; Brush *brush = paint_brush(&sd->paint); float offset[3], area_normal[3]; float bstrength= ss->cache->bstrength; @@ -1182,8 +1184,8 @@ static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod /* we divide out the squared alpha and multiply by the squared crease to give us the pinch strength */ - if(brush_alpha(brush) > 0.0f) - crease_correction = brush->crease_pinch_factor*brush->crease_pinch_factor/(brush_alpha(brush)*brush_alpha(brush)); + if(brush_alpha(scene, brush) > 0.0f) + crease_correction = brush->crease_pinch_factor*brush->crease_pinch_factor/(brush_alpha(scene, brush)*brush_alpha(scene, brush)); else crease_correction = brush->crease_pinch_factor*brush->crease_pinch_factor; @@ -2658,10 +2660,10 @@ static void do_symmetrical_brush_actions(Sculpt *sd, Object *ob) cache->first_time= 0; } -static void sculpt_update_tex(Sculpt *sd, SculptSession *ss) +static void sculpt_update_tex(const Scene *scene, Sculpt *sd, SculptSession *ss) { Brush *brush = paint_brush(&sd->paint); - const int radius= brush_size(brush); + const int radius= brush_size(scene, brush); if(ss->texcache) { MEM_freeN(ss->texcache); @@ -3017,6 +3019,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob, struct PaintStroke *stroke, PointerRNA *ptr) { + Scene *scene = CTX_data_scene(C); SculptSession *ss = ob->sculpt; StrokeCache *cache = ss->cache; Brush *brush = paint_brush(&sd->paint); @@ -3051,19 +3054,19 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob, sd->pressure_value= cache->pressure; cache->previous_pixel_radius = cache->pixel_radius; - cache->pixel_radius = brush_size(brush); + cache->pixel_radius = brush_size(scene, brush); if(cache->first_time) { - if (!brush_use_locked_size(brush)) { - cache->initial_radius= paint_calc_object_space_radius(cache->vc, cache->true_location, brush_size(brush)); - brush_set_unprojected_radius(brush, cache->initial_radius); + if (!brush_use_locked_size(scene, brush)) { + cache->initial_radius= paint_calc_object_space_radius(cache->vc, cache->true_location, brush_size(scene, brush)); + brush_set_unprojected_radius(scene, brush, cache->initial_radius); } else { - cache->initial_radius= brush_unprojected_radius(brush); + cache->initial_radius= brush_unprojected_radius(scene, brush); } } - if(brush_use_size_pressure(brush)) { + if(brush_use_size_pressure(scene, brush)) { cache->pixel_radius *= cache->pressure; cache->radius= cache->initial_radius * cache->pressure; } @@ -3245,7 +3248,7 @@ int sculpt_stroke_get_location(bContext *C, struct PaintStroke *stroke, float ou return srd.hit; } -static void sculpt_brush_init_tex(Sculpt *sd, SculptSession *ss) +static void sculpt_brush_init_tex(const Scene *scene, Sculpt *sd, SculptSession *ss) { Brush *brush = paint_brush(&sd->paint); MTex *mtex= &brush->mtex; @@ -3257,7 +3260,7 @@ static void sculpt_brush_init_tex(Sculpt *sd, SculptSession *ss) /* TODO: Shouldn't really have to do this at the start of every stroke, but sculpt would need some sort of notification when changes are made to the texture. */ - sculpt_update_tex(sd, ss); + sculpt_update_tex(scene, sd, ss); } static int sculpt_brush_stroke_init(bContext *C, wmOperator *op) @@ -3271,7 +3274,7 @@ static int sculpt_brush_stroke_init(bContext *C, wmOperator *op) int is_smooth= 0; view3d_operator_needs_opengl(C); - sculpt_brush_init_tex(sd, ss); + sculpt_brush_init_tex(scene, sd, ss); is_smooth|= mode == BRUSH_STROKE_SMOOTH; is_smooth|= brush->sculpt_tool == SCULPT_TOOL_SMOOTH; @@ -3287,7 +3290,8 @@ static void sculpt_restore_mesh(Sculpt *sd, SculptSession *ss) /* Restore the mesh before continuing with anchored stroke */ if((brush->flag & BRUSH_ANCHORED) || - (brush->sculpt_tool == SCULPT_TOOL_GRAB && brush_use_size_pressure(brush)) || + (brush->sculpt_tool == SCULPT_TOOL_GRAB && + brush_use_size_pressure(ss->cache->vc->scene, brush)) || (brush->flag & BRUSH_RESTORE_MESH)) { StrokeCache *cache = ss->cache; diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index 8eb1f08b5b0..50c436d88f5 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -162,7 +162,7 @@ static int sound_open_exec(bContext *UNUSED(C), wmOperator *op) static int sound_open_invoke(bContext *C, wmOperator *op, wmEvent *event) { - if(RNA_property_is_set(op->ptr, "filepath")) + if(RNA_struct_property_is_set(op->ptr, "filepath")) return sound_open_exec(C, op); sound_open_init(C, op); @@ -359,12 +359,14 @@ static int sound_mixdown_exec(bContext *C, wmOperator *op) static int sound_mixdown_invoke(bContext *C, wmOperator *op, wmEvent *event) { - if(RNA_property_is_set(op->ptr, "filepath")) + if(RNA_struct_property_is_set(op->ptr, "filepath")) return sound_mixdown_exec(C, op); return WM_operator_filesel(C, op, event); } +#ifdef WITH_AUDASPACE + static int sound_mixdown_draw_check_prop(PointerRNA *UNUSED(ptr), PropertyRNA *prop) { const char *prop_id= RNA_property_identifier(prop); @@ -374,7 +376,6 @@ static int sound_mixdown_draw_check_prop(PointerRNA *UNUSED(ptr), PropertyRNA *p ); } -#ifdef WITH_AUDASPACE static void sound_mixdown_draw(bContext *C, wmOperator *op) { static EnumPropertyItem pcm_format_items[] = { @@ -652,7 +653,7 @@ static int sound_unpack_exec(bContext *C, wmOperator *op) bSound* sound= NULL; /* find the suppplied image by name */ - if (RNA_property_is_set(op->ptr, "id")) { + if (RNA_struct_property_is_set(op->ptr, "id")) { char sndname[MAX_ID_NAME-2]; RNA_string_get(op->ptr, "id", sndname); sound = BLI_findstring(&CTX_data_main(C)->sound, sndname, offsetof(ID, name) + 2); @@ -674,7 +675,7 @@ static int sound_unpack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even Editing* ed = CTX_data_scene(C)->ed; bSound* sound; - if(RNA_property_is_set(op->ptr, "id")) + if(RNA_struct_property_is_set(op->ptr, "id")) return sound_unpack_exec(C, op); if(!ed || !ed->act_seq || ed->act_seq->type != SEQ_SOUND) diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c index 619e76e9e50..309b455e2a2 100644 --- a/source/blender/editors/space_action/action_draw.c +++ b/source/blender/editors/space_action/action_draw.c @@ -119,7 +119,7 @@ void draw_channel_names(bContext *C, bAnimContext *ac, ARegion *ar) } } { /* second pass: widgets */ - uiBlock *block= uiBeginBlock(C, ar, "dopesheet channel buttons", UI_EMBOSS); + uiBlock *block= uiBeginBlock(C, ar, __func__, UI_EMBOSS); size_t channel_index = 0; y= (float)ACHANNEL_FIRST; diff --git a/source/blender/editors/space_action/action_ops.c b/source/blender/editors/space_action/action_ops.c index c3af3521918..d4e44dee9c3 100644 --- a/source/blender/editors/space_action/action_ops.c +++ b/source/blender/editors/space_action/action_ops.c @@ -36,6 +36,7 @@ #include "DNA_space_types.h" #include "BLI_blenlib.h" +#include "BLI_utildefines.h" #include "ED_anim_api.h" #include "ED_markers.h" @@ -110,32 +111,45 @@ static void action_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap) /* action_select.c - selection tools */ /* click-select */ - WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0); + kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "column", FALSE); kmi= WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "column", 1); + RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "column", TRUE); kmi= WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "column", FALSE); kmi= WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT|KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", 1); - RNA_boolean_set(kmi->ptr, "column", 1); + RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "column", TRUE); /* select left/right */ - WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_TEST); kmi= WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_TEST); kmi= WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_LEFT); kmi= WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_RIGHT); /* deselect all */ - WM_keymap_add_item(keymap, "ACTION_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "ACTION_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", 1); + kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "invert", FALSE); + kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0); + RNA_boolean_set(kmi->ptr, "invert", TRUE); /* borderselect */ - WM_keymap_add_item(keymap, "ACTION_OT_select_border", BKEY, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "ACTION_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0)->ptr, "axis_range", 1); + kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_border", BKEY, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "axis_range", FALSE); + kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0); + RNA_boolean_set(kmi->ptr, "axis_range", TRUE); /* column select */ RNA_enum_set(WM_keymap_add_item(keymap, "ACTION_OT_select_column", KKEY, KM_PRESS, 0, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_KEYS); diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c index 1c352b1cb21..6777e2c2d85 100644 --- a/source/blender/editors/space_buttons/buttons_header.c +++ b/source/blender/editors/space_buttons/buttons_header.c @@ -108,7 +108,7 @@ void buttons_header_buttons(const bContext *C, ARegion *ar) buttons_context_compute(C, sbuts); - block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS); + block= uiBeginBlock(C, ar, __func__, UI_EMBOSS); uiBlockSetHandleFunc(block, do_buttons_buttons, NULL); xco= ED_area_header_switchbutton(C, block, yco); diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index 05fdcd50067..df05521fa8d 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -103,7 +103,7 @@ static int file_browse_exec(bContext *C, wmOperator *op) char *str, path[FILE_MAX]; const char *path_prop= RNA_struct_find_property(op->ptr, "directory") ? "directory" : "filepath"; - if (RNA_property_is_set(op->ptr, path_prop)==0 || fbo==NULL) + if (RNA_struct_property_is_set(op->ptr, path_prop)==0 || fbo==NULL) return OPERATOR_CANCELLED; str= RNA_string_get_alloc(op->ptr, path_prop, NULL, 0); @@ -200,7 +200,7 @@ static int file_browse_invoke(bContext *C, wmOperator *op, wmEvent *event) /* normally ED_fileselect_get_params would handle this but we need to because of stupid * user-prefs exception - campbell */ if(RNA_struct_find_property(op->ptr, "relative_path")) { - if(!RNA_property_is_set(op->ptr, "relative_path")) { + if(!RNA_struct_property_is_set(op->ptr, "relative_path")) { /* annoying exception!, if were dealign with the user prefs, default relative to be off */ RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS && (ptr.data != &U)); } diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index 0c326af406f..e6928e31dc7 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -96,11 +96,6 @@ static SpaceLink *buttons_new(const bContext *UNUSED(C)) static void buttons_free(SpaceLink *sl) { SpaceButs *sbuts= (SpaceButs*) sl; - - if(sbuts->ri) { - if (sbuts->ri->rect) MEM_freeN(sbuts->ri->rect); - MEM_freeN(sbuts->ri); - } if(sbuts->path) MEM_freeN(sbuts->path); @@ -131,7 +126,6 @@ static SpaceLink *buttons_duplicate(SpaceLink *sl) SpaceButs *sbutsn= MEM_dupallocN(sl); /* clear or remove stuff from old */ - sbutsn->ri= NULL; sbutsn->path= NULL; sbutsn->texuser= NULL; diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index ca2646e9967..eb8f30b6739 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -75,20 +75,20 @@ void clip_draw_curfra_label(SpaceClip *sc, float x, float y) { uiStyle *style= UI_GetStyle(); int fontid= style->widget.uifont_id; - char str[32]; - float fontsize, fontwidth; + char numstr[32]; + float font_dims[2] = {0.0f, 0.0f}; /* frame number */ BLF_size(fontid, 11.0f, U.dpi); - BLI_snprintf(str, sizeof(str), "%d", sc->user.framenr); - fontsize= BLF_height(fontid, str); - fontwidth= BLF_width(fontid, str); + BLI_snprintf(numstr, sizeof(numstr), "%d", sc->user.framenr); - glRecti(x, y, x+fontwidth+6, y+fontsize+4); + BLF_width_and_height(fontid, numstr, &font_dims[0], &font_dims[1]); + + glRecti(x, y, x + font_dims[0] + 6.0f, y + font_dims[1] + 4.0f); UI_ThemeColor(TH_TEXT); BLF_position(fontid, x+2.0f, y+2.0f, 0.0f); - BLF_draw(fontid, str, strlen(str)); + BLF_draw(fontid, numstr, sizeof(numstr)); } static void draw_movieclip_cache(SpaceClip *sc, ARegion *ar, MovieClip *clip, Scene *scene) @@ -250,9 +250,9 @@ static void draw_movieclip_buffer(SpaceClip *sc, ARegion *ar, ImBuf *ibuf, glBegin(GL_LINE_LOOP); glVertex2f(0.0f, 0.0f); - glVertex2f(ibuf->x, 0.0f); - glVertex2f(ibuf->x, ibuf->y); - glVertex2f(0.0f, ibuf->y); + glVertex2f(width, 0.0f); + glVertex2f(width, height); + glVertex2f(0.0f, height); glEnd(); glPopMatrix(); @@ -805,13 +805,13 @@ static void draw_marker_texts(SpaceClip *sc, MovieTrackingTrack *track, MovieTra BLI_snprintf(str, sizeof(str), "%s", track->name); BLF_position(fontid, pos[0], pos[1], 0.0f); - BLF_draw(fontid, str, strlen(str)); + BLF_draw(fontid, str, sizeof(str)); pos[1]-= fontsize; if(track->flag&TRACK_HAS_BUNDLE) { BLI_snprintf(str, sizeof(str), "Average error: %.3f", track->error); BLF_position(fontid, pos[0], pos[1], 0.0f); - BLF_draw(fontid, str, strlen(str)); + BLF_draw(fontid, str, sizeof(str)); pos[1]-= fontsize; } @@ -1259,14 +1259,24 @@ void clip_draw_main(SpaceClip *sc, ARegion *ar, Scene *scene) float smat[4][4], ismat[4][4]; ibuf= ED_space_clip_get_stable_buffer(sc, sc->loc, &sc->scale, &sc->angle); - BKE_tracking_stabdata_to_mat4(width, height, sc->loc, sc->scale, sc->angle, sc->stabmat); - unit_m4(smat); - smat[0][0]= 1.0f/width; - smat[1][1]= 1.0f/height; - invert_m4_m4(ismat, smat); + if(ibuf) { + float loc[2]; + + if(width != ibuf->x) + mul_v2_v2fl(loc, sc->loc, (float)width / ibuf->x); + else + copy_v2_v2(loc, sc->loc); + + BKE_tracking_stabdata_to_mat4(width, height, loc, sc->scale, sc->angle, sc->stabmat); - mul_serie_m4(sc->unistabmat, smat, sc->stabmat, ismat, NULL, NULL, NULL, NULL, NULL); + unit_m4(smat); + smat[0][0]= 1.0f/width; + smat[1][1]= 1.0f/height; + invert_m4_m4(ismat, smat); + + mul_serie_m4(sc->unistabmat, smat, sc->stabmat, ismat, NULL, NULL, NULL, NULL, NULL); + } } else { ibuf= ED_space_clip_get_buffer(sc); diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c index d75df0ab51e..35d870022a4 100644 --- a/source/blender/editors/space_clip/clip_editor.c +++ b/source/blender/editors/space_clip/clip_editor.c @@ -86,7 +86,7 @@ ImBuf *ED_space_clip_get_buffer(SpaceClip *sc) if(sc->clip) { ImBuf *ibuf; - ibuf= BKE_movieclip_get_ibuf(sc->clip, &sc->user); + ibuf= BKE_movieclip_get_postprocessed_ibuf(sc->clip, &sc->user, sc->postproc_flag); if(ibuf && (ibuf->rect || ibuf->rect_float)) return ibuf; @@ -103,7 +103,7 @@ ImBuf *ED_space_clip_get_stable_buffer(SpaceClip *sc, float loc[2], float *scale if(sc->clip) { ImBuf *ibuf; - ibuf= BKE_movieclip_get_stable_ibuf(sc->clip, &sc->user, loc, scale, angle); + ibuf= BKE_movieclip_get_stable_ibuf(sc->clip, &sc->user, loc, scale, angle, sc->postproc_flag); if(ibuf && (ibuf->rect || ibuf->rect_float)) return ibuf; diff --git a/source/blender/editors/space_clip/clip_intern.h b/source/blender/editors/space_clip/clip_intern.h index 64881499a31..3f7456e90dc 100644 --- a/source/blender/editors/space_clip/clip_intern.h +++ b/source/blender/editors/space_clip/clip_intern.h @@ -145,4 +145,7 @@ void CLIP_OT_clean_tracks(struct wmOperatorType *ot); void CLIP_OT_tracking_object_new(struct wmOperatorType *ot); void CLIP_OT_tracking_object_remove(struct wmOperatorType *ot); +void CLIP_OT_copy_tracks(struct wmOperatorType *ot); +void CLIP_OT_paste_tracks(struct wmOperatorType *ot); + #endif /* ED_CLIP_INTERN_H */ diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index fe0b58ddda9..45c7043c44c 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -184,10 +184,10 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) if(clip) path= clip->name; - if(!RNA_property_is_set(op->ptr, "relative_path")) + if(!RNA_struct_property_is_set(op->ptr, "relative_path")) RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); - if(RNA_property_is_set(op->ptr, "filepath")) + if(RNA_struct_property_is_set(op->ptr, "filepath")) return open_exec(C, op); open_init(C, op); @@ -220,14 +220,11 @@ void CLIP_OT_open(wmOperatorType *ot) static int reload_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceClip *sc= CTX_wm_space_clip(C); MovieClip *clip= CTX_data_edit_movieclip(C); if(!clip) return OPERATOR_CANCELLED; - sc->scopes.ok= 0; - BKE_movieclip_reload(clip); WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, clip); diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index 5291121571c..82da9b3b956 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -377,6 +377,10 @@ static void clip_operatortypes(void) /* object tracking */ WM_operatortype_append(CLIP_OT_tracking_object_new); WM_operatortype_append(CLIP_OT_tracking_object_remove); + + /* clipboard */ + WM_operatortype_append(CLIP_OT_copy_tracks); + WM_operatortype_append(CLIP_OT_paste_tracks); } static void clip_keymap(struct wmKeyConfig *keyconf) diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index d6940d14dbf..b67fac69745 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -1220,21 +1220,39 @@ static int track_count_markers(SpaceClip *sc, MovieClip *clip) return tot; } +static void clear_invisible_track_selection(SpaceClip *sc, MovieClip *clip) +{ + ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking); + int hidden = 0; + + if ((sc->flag&SC_SHOW_MARKER_PATTERN)==0) + hidden |= TRACK_AREA_PAT; + + if ((sc->flag&SC_SHOW_MARKER_SEARCH)==0) + hidden |= TRACK_AREA_SEARCH; + + if (hidden) { + MovieTrackingTrack *track = tracksbase->first; + + while(track) { + BKE_tracking_track_flag(track, hidden, SELECT, 1); + + track = track->next; + } + } +} + static void track_init_markers(SpaceClip *sc, MovieClip *clip, int *frames_limit_r) { ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking); MovieTrackingTrack *track; - int framenr= sc->user.framenr, hidden= 0; + int framenr= sc->user.framenr; int frames_limit= 0; - if((sc->flag&SC_SHOW_MARKER_PATTERN)==0) hidden|= TRACK_AREA_PAT; - if((sc->flag&SC_SHOW_MARKER_SEARCH)==0) hidden|= TRACK_AREA_SEARCH; + clear_invisible_track_selection(sc, clip); track= tracksbase->first; while(track) { - if(hidden) - BKE_tracking_track_flag(track, hidden, SELECT, 1); - if(TRACK_SELECTED(track)) { if((track->flag&TRACK_HIDDEN)==0 && (track->flag&TRACK_LOCKED)==0) { BKE_tracking_ensure_marker(track, framenr); @@ -3504,3 +3522,74 @@ void CLIP_OT_tracking_object_remove(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } + +/********************** copy tracks to clipboard operator *********************/ + +static int copy_tracks_exec(bContext *C, wmOperator *UNUSED(op)) +{ + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + MovieTrackingObject *object = BKE_tracking_active_object(tracking); + + clear_invisible_track_selection(sc, clip); + + BKE_tracking_clipboard_copy_tracks(tracking, object); + + return OPERATOR_FINISHED; +} + +void CLIP_OT_copy_tracks(wmOperatorType *ot) +{ + /* identifiers */ + ot->name = "Copy Tracks"; + ot->description = "Copy selected tracks to clipboard"; + ot->idname = "CLIP_OT_copy_tracks"; + + /* api callbacks */ + ot->exec = copy_tracks_exec; + ot->poll = ED_space_clip_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER; +} + +/********************** paste tracks from clipboard operator *********************/ + +static int paste_tracks_poll(bContext *C) +{ + if (ED_space_clip_poll(C)) { + return BKE_tracking_clipboard_has_tracks(); + } + + return 0; +} + +static int paste_tracks_exec(bContext *C, wmOperator *UNUSED(op)) +{ + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + MovieTrackingObject *object = BKE_tracking_active_object(tracking); + + BKE_tracking_clipboard_paste_tracks(tracking, object); + + WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, clip); + + return OPERATOR_FINISHED; +} + +void CLIP_OT_paste_tracks(wmOperatorType *ot) +{ + /* identifiers */ + ot->name = "Paste Tracks"; + ot->description = "Paste tracks from clipboard"; + ot->idname = "CLIP_OT_paste_tracks"; + + /* api callbacks */ + ot->exec = paste_tracks_exec; + ot->poll = paste_tracks_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c index 23316616a57..9640701965c 100644 --- a/source/blender/editors/space_console/console_ops.c +++ b/source/blender/editors/space_console/console_ops.c @@ -410,7 +410,7 @@ static int console_insert_exec(bContext *C, wmOperator *op) static int console_insert_invoke(bContext *C, wmOperator *op, wmEvent *event) { - // if(!RNA_property_is_set(op->ptr, "text")) { /* always set from keymap XXX */ + // if(!RNA_struct_property_is_set(op->ptr, "text")) { /* always set from keymap XXX */ if(!RNA_string_length(op->ptr, "text")) { /* if alt/ctrl/super are pressed pass through */ if(event->ctrl || event->oskey) { @@ -655,7 +655,11 @@ static int console_history_append_exec(bContext *C, wmOperator *op) ED_area_tag_redraw(sa); - console_scroll_bottom(ar); + /* when calling render modally this can be NULL when calling: + * bpy.ops.render.render('INVOKE_DEFAULT') */ + if (ar) { + console_scroll_bottom(ar); + } return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 41aae64445a..c84a9d10ab4 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -118,7 +118,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar) const int separator = 4; /* Additional locals. */ - char name[32]; + char uiblockstr[32]; int loadbutton; int fnumbuttons; int min_x = 10; @@ -134,8 +134,8 @@ void file_draw_buttons(const bContext *C, ARegion *ar) ARegion* artmp; /* Initialize UI block. */ - sprintf(name, "win %p", (void *)ar); - block = uiBeginBlock(C, ar, name, UI_EMBOSS); + BLI_snprintf(uiblockstr, sizeof(uiblockstr), "win %p", (void *)ar); + block = uiBeginBlock(C, ar, uiblockstr, UI_EMBOSS); uiBlockSetHandleFunc(block, do_file_buttons, NULL); /* exception to make space for collapsed region icon */ @@ -450,7 +450,7 @@ void file_draw_list(const bContext *C, ARegion *ar) struct FileList* files = sfile->files; struct direntry *file; ImBuf *imb; - uiBlock *block = uiBeginBlock(C, ar, "FileNames", UI_EMBOSS); + uiBlock *block = uiBeginBlock(C, ar, __func__, UI_EMBOSS); int numfiles; int numfiles_layout; int sx, sy; diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 4682ea3fb60..dee8db88d49 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -970,7 +970,7 @@ 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) +static int groupname_to_code(const char *group) { char buf[32]; char *lslash; @@ -1200,10 +1200,10 @@ void filelist_from_main(struct FileList *filelist) 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 && fake) BLI_snprintf(files->extra, sizeof(files->extra), "LF %d", id->us); + else if(id->lib) BLI_snprintf(files->extra, sizeof(files->extra), "L %d", id->us); + else if(fake) BLI_snprintf(files->extra, sizeof(files->extra), "F %d", id->us); + else BLI_snprintf(files->extra, sizeof(files->extra), " %d", id->us); if(id->lib) { if(totlib==0) firstlib= files; diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index 1d629ad6dea..bf31775a349 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -130,7 +130,7 @@ short ED_fileselect_set_params(SpaceFile *sfile) else params->type = FILE_SPECIAL; - if (is_filepath && RNA_property_is_set(op->ptr, "filepath")) { + if (is_filepath && RNA_struct_property_is_set(op->ptr, "filepath")) { char name[FILE_MAX]; RNA_string_get(op->ptr, "filepath", name); if (params->type == FILE_LOADLIB) { @@ -142,12 +142,12 @@ short ED_fileselect_set_params(SpaceFile *sfile) } } else { - if (is_directory && RNA_property_is_set(op->ptr, "directory")) { + if (is_directory && RNA_struct_property_is_set(op->ptr, "directory")) { RNA_string_get(op->ptr, "directory", params->dir); sfile->params->file[0]= '\0'; } - if (is_filename && RNA_property_is_set(op->ptr, "filename")) { + if (is_filename && RNA_struct_property_is_set(op->ptr, "filename")) { RNA_string_get(op->ptr, "filename", params->file); } } @@ -226,7 +226,7 @@ short ED_fileselect_set_params(SpaceFile *sfile) } if (is_relative_path) { - if (!RNA_property_is_set(op->ptr, "relative_path")) { + if (!RNA_struct_property_is_set(op->ptr, "relative_path")) { RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); } } diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index c1dfa97a508..9e1ff82c20d 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -647,7 +647,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa) uiItemL(row, "Driver Value:", ICON_NONE); - sprintf(valBuf, "%.3f", driver->curval); + BLI_snprintf(valBuf, sizeof(valBuf), "%.3f", driver->curval); uiItemL(row, valBuf, ICON_NONE); } @@ -702,18 +702,18 @@ static void graph_panel_drivers(const bContext *C, Panel *pa) graph_panel_driverVar__transChan(box, ale->id, dvar); break; } - - /* value of variable */ - if (driver->flag & DRIVER_FLAG_SHOWDEBUG) { - char valBuf[32]; - - box= uiLayoutBox(col); - row= uiLayoutRow(box, 1); + + /* value of variable */ + if (driver->flag & DRIVER_FLAG_SHOWDEBUG) { + char valBuf[32]; + + box= uiLayoutBox(col); + row= uiLayoutRow(box, 1); uiItemL(row, "Value:", ICON_NONE); - sprintf(valBuf, "%.3f", dvar->curval); + BLI_snprintf(valBuf, sizeof(valBuf), "%.3f", dvar->curval); uiItemL(row, valBuf, ICON_NONE); - } + } } /* cleanup */ diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index 7091fe094c6..7bdb37d9651 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -1003,7 +1003,7 @@ void graph_draw_channel_names(bContext *C, bAnimContext *ac, ARegion *ar) } } { /* second pass: widgets */ - uiBlock *block= uiBeginBlock(C, ar, "graph channel buttons", UI_EMBOSS); + uiBlock *block= uiBeginBlock(C, ar, __func__, UI_EMBOSS); size_t channel_index = 0; y= (float)ACHANNEL_FIRST; diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 460e46fce30..24b2dc9e41c 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -1046,6 +1046,8 @@ void GRAPH_OT_bake (wmOperatorType *ot) // todo: add props for start/end frames } +#ifdef WITH_AUDASPACE + /* ******************** Sound Bake F-Curve Operator *********************** */ /* This operator bakes the given sound to the selected F-Curves */ @@ -1078,7 +1080,6 @@ static float fcurve_samplingcb_sound (FCurve *UNUSED(fcu), void *data, float eva /* ------------------- */ -#ifdef WITH_AUDASPACE static int graphkeys_sound_bake_exec(bContext *C, wmOperator *op) { bAnimContext ac; diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index 90e99519600..aa245585d11 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -182,43 +182,11 @@ static void GRAPH_OT_cursor_set(wmOperatorType *ot) RNA_def_float(ot->srna, "value", 0, FLT_MIN, FLT_MAX, "Value", "", -100.0f, 100.0f); } -/* Toggle Handles ----------------------------------------------------------------- */ - -static int view_toggle_handles_exec (bContext *C, wmOperator *UNUSED(op)) -{ - SpaceIpo *sipo= CTX_wm_space_graph(C); - ARegion *ar= CTX_wm_region(C); - - if (sipo == NULL) - return OPERATOR_CANCELLED; - - /* toggle flag to hide handles */ - sipo->flag ^= SIPO_NOHANDLES; - - /* request refresh of keys area */ - ED_region_tag_redraw(ar); - - return OPERATOR_FINISHED; -} - -static void GRAPH_OT_view_togglehandles (wmOperatorType *ot) -{ - /* identification */ - ot->name= "Show/Hide All Handles"; - ot->idname= "GRAPH_OT_handles_view_toggle"; - ot->description= "Toggle whether handles are drawn on all keyframes that need them"; - - /* callbacks */ - ot->exec= view_toggle_handles_exec; - ot->poll= ED_operator_graphedit_active; -} - /* ************************** registration - operator types **********************************/ void graphedit_operatortypes(void) { /* view */ - WM_operatortype_append(GRAPH_OT_view_togglehandles); WM_operatortype_append(GRAPH_OT_cursor_set); WM_operatortype_append(GRAPH_OT_previewrange_set); @@ -290,7 +258,9 @@ static void graphedit_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap) wmKeyMapItem *kmi; /* view */ - WM_keymap_add_item(keymap, "GRAPH_OT_handles_view_toggle", HKEY, KM_PRESS, KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", HKEY, KM_PRESS, KM_CTRL, 0); + RNA_string_set(kmi->ptr, "data_path", "space_data.show_handles"); + /* NOTE: 'ACTIONMOUSE' not 'LEFTMOUSE', as user may have swapped mouse-buttons * This keymap is supposed to override ANIM_OT_change_frame, which does the same except it doesn't do y-values */ @@ -299,44 +269,66 @@ static void graphedit_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap) /* graph_select.c - selection tools */ /* click-select */ - WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0); + kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "curves", FALSE); + RNA_boolean_set(kmi->ptr, "column", FALSE); kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "column", 1); + RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "curves", FALSE); + RNA_boolean_set(kmi->ptr, "column", TRUE); kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "curves", FALSE); + RNA_boolean_set(kmi->ptr, "column", FALSE); kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT|KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", 1); - RNA_boolean_set(kmi->ptr, "column", 1); + RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "curves", FALSE); + RNA_boolean_set(kmi->ptr, "column", TRUE); kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "curves", 1); + RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "curves", TRUE); + RNA_boolean_set(kmi->ptr, "column", FALSE); kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT|KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "curves", 1); - RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "curves", TRUE); + RNA_boolean_set(kmi->ptr, "column", FALSE); /* select left/right */ - WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_TEST); kmi= WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_TEST); kmi= WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_LEFT); kmi= WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_RIGHT); /* deselect all */ - WM_keymap_add_item(keymap, "GRAPH_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", 1); + kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "invert", FALSE); + kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0); + RNA_boolean_set(kmi->ptr, "invert", TRUE); /* borderselect */ - WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, 0, 0); + kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "axis_range", FALSE); + RNA_boolean_set(kmi->ptr, "include_handles", FALSE); kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "axis_range", 1); + RNA_boolean_set(kmi->ptr, "axis_range", TRUE); + RNA_boolean_set(kmi->ptr, "include_handles", FALSE); kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "include_handles", 1); + RNA_boolean_set(kmi->ptr, "axis_range", FALSE); + RNA_boolean_set(kmi->ptr, "include_handles", TRUE); kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "axis_range", 1); - RNA_boolean_set(kmi->ptr, "include_handles", 1); + RNA_boolean_set(kmi->ptr, "axis_range", TRUE); + RNA_boolean_set(kmi->ptr, "include_handles", TRUE); /* column select */ RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_column", KKEY, KM_PRESS, 0, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_KEYS); diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index c1268ec61f0..617dd172c05 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -201,7 +201,7 @@ static void borderselect_graphkeys (bAnimContext *ac, rcti rect, short mode, sho { ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; - int filter; + int filter, mapping_flag; SpaceIpo *sipo= (SpaceIpo *)ac->sl; KeyframeEditData ked; @@ -226,8 +226,12 @@ static void borderselect_graphkeys (bAnimContext *ac, rcti rect, short mode, sho ked.data= &rectf; /* treat handles separately? */ - if (incl_handles) + if (incl_handles) { ked.iterflags |= KEYFRAME_ITER_INCL_HANDLES; + mapping_flag= 0; + } + else + mapping_flag= ANIM_UNITCONV_ONLYKEYS; /* loop over data, doing border select */ for (ale= anim_data.first; ale; ale= ale->next) { @@ -235,7 +239,7 @@ static void borderselect_graphkeys (bAnimContext *ac, rcti rect, short mode, sho FCurve *fcu= (FCurve *)ale->key_data; /* apply unit corrections */ - ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, ANIM_UNITCONV_ONLYKEYS); + ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, mapping_flag); /* apply NLA mapping to all the keyframes, since it's easier than trying to * guess when a callback might use something different @@ -274,7 +278,7 @@ static void borderselect_graphkeys (bAnimContext *ac, rcti rect, short mode, sho ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, incl_handles==0); /* unapply unit corrections */ - ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, ANIM_UNITCONV_RESTORE|ANIM_UNITCONV_ONLYKEYS); + ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, ANIM_UNITCONV_RESTORE|mapping_flag); } /* cleanup */ diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 8d8c79386c5..43bea1c311d 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -335,7 +335,7 @@ static void image_panel_preview(ScrArea *sa, short cntrl) // IMAGE_HANDLER_PREVI return; } - block= uiBeginBlock(C, ar, "image_panel_preview", UI_EMBOSS); + block= uiBeginBlock(C, ar, __func__, UI_EMBOSS); uiPanelControl(UI_PNL_SOLID | UI_PNL_CLOSE | UI_PNL_SCALE | cntrl); uiSetPanelHandler(IMAGE_HANDLER_PREVIEW); // for close and esc @@ -682,7 +682,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char uiButSetFunc(but, image_freecache_cb, ima, NULL); if(iuser->frames) - sprintf(str, "(%d) Frames:", iuser->framenr); + BLI_snprintf(str, sizeof(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, "Number of images of a movie to use"); @@ -763,7 +763,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char col= uiLayoutColumn(split, 0); - sprintf(str, "(%d) Frames", iuser->framenr); + BLI_snprintf(str, sizeof(str), "(%d) Frames", iuser->framenr); uiItemR(col, userptr, "frame_duration", 0, str, ICON_NONE); if(ima->anim) { block= uiLayoutGetBlock(col); diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index dc712e286a1..41fc861f8e4 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -110,7 +110,8 @@ static void draw_render_info(Scene *scene, Image *ima, ARegion *ar) BKE_image_release_renderresult(scene, ima); } -void draw_image_info(ARegion *ar, int color_manage, int channels, int x, int y, const char cp[4], const float fp[4], int *zp, float *zpf) +/* used by node view too */ +void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int y, const char cp[4], const float fp[4], int *zp, float *zpf) { char str[256]; float dx= 6; @@ -139,7 +140,7 @@ void draw_image_info(ARegion *ar, int color_manage, int channels, int x, int y, BLF_size(blf_mono_font, 11, 72); glColor3ub(255, 255, 255); - sprintf(str, "X:%-4d Y:%-4d |", x, y); + BLI_snprintf(str, sizeof(str), "X:%-4d Y:%-4d |", x, y); // UI_DrawString(6, 6, str); // works ok but fixed width is nicer. BLF_position(blf_mono_font, dx, 6, 0); BLF_draw_ascii(blf_mono_font, str, sizeof(str)); @@ -147,14 +148,14 @@ void draw_image_info(ARegion *ar, int color_manage, int channels, int x, int y, if(zp) { glColor3ub(255, 255, 255); - sprintf(str, " Z:%-.4f |", 0.5f+0.5f*(((float)*zp)/(float)0x7fffffff)); + BLI_snprintf(str, sizeof(str), " Z:%-.4f |", 0.5f+0.5f*(((float)*zp)/(float)0x7fffffff)); BLF_position(blf_mono_font, dx, 6, 0); BLF_draw_ascii(blf_mono_font, str, sizeof(str)); dx += BLF_width(blf_mono_font, str); } if(zpf) { glColor3ub(255, 255, 255); - sprintf(str, " Z:%-.3f |", *zpf); + BLI_snprintf(str, sizeof(str), " Z:%-.3f |", *zpf); BLF_position(blf_mono_font, dx, 6, 0); BLF_draw_ascii(blf_mono_font, str, sizeof(str)); dx += BLF_width(blf_mono_font, str); @@ -163,33 +164,33 @@ void draw_image_info(ARegion *ar, int color_manage, int channels, int x, int y, if(channels >= 3) { glColor3ubv(red); if (fp) - sprintf(str, " R:%-.4f", fp[0]); + BLI_snprintf(str, sizeof(str), " R:%-.4f", fp[0]); else if (cp) - sprintf(str, " R:%-3d", cp[0]); + BLI_snprintf(str, sizeof(str), " R:%-3d", cp[0]); else - sprintf(str, " R:-"); + BLI_snprintf(str, sizeof(str), " R:-"); BLF_position(blf_mono_font, dx, 6, 0); BLF_draw_ascii(blf_mono_font, str, sizeof(str)); dx += BLF_width(blf_mono_font, str); glColor3ubv(green); if (fp) - sprintf(str, " G:%-.4f", fp[1]); + BLI_snprintf(str, sizeof(str), " G:%-.4f", fp[1]); else if (cp) - sprintf(str, " G:%-3d", cp[1]); + BLI_snprintf(str, sizeof(str), " G:%-3d", cp[1]); else - sprintf(str, " G:-"); + BLI_snprintf(str, sizeof(str), " G:-"); BLF_position(blf_mono_font, dx, 6, 0); BLF_draw_ascii(blf_mono_font, str, sizeof(str)); dx += BLF_width(blf_mono_font, str); glColor3ubv(blue); if (fp) - sprintf(str, " B:%-.4f", fp[2]); + BLI_snprintf(str, sizeof(str), " B:%-.4f", fp[2]); else if (cp) - sprintf(str, " B:%-3d", cp[2]); + BLI_snprintf(str, sizeof(str), " B:%-3d", cp[2]); else - sprintf(str, " B:-"); + BLI_snprintf(str, sizeof(str), " B:-"); BLF_position(blf_mono_font, dx, 6, 0); BLF_draw_ascii(blf_mono_font, str, sizeof(str)); dx += BLF_width(blf_mono_font, str); @@ -197,11 +198,11 @@ void draw_image_info(ARegion *ar, int color_manage, int channels, int x, int y, if(channels == 4) { glColor3ub(255, 255, 255); if (fp) - sprintf(str, " A:%-.4f", fp[3]); + BLI_snprintf(str, sizeof(str), " A:%-.4f", fp[3]); else if (cp) - sprintf(str, " A:%-3d", cp[3]); + BLI_snprintf(str, sizeof(str), " A:%-3d", cp[3]); else - sprintf(str, "- "); + BLI_snprintf(str, sizeof(str), "- "); BLF_position(blf_mono_font, dx, 6, 0); BLF_draw_ascii(blf_mono_font, str, sizeof(str)); dx += BLF_width(blf_mono_font, str); @@ -269,12 +270,12 @@ void draw_image_info(ARegion *ar, int color_manage, int channels, int x, int y, rgb_to_yuv((float)cp[0]/255.0f, (float)cp[0]/255.0f, (float)cp[0]/255.0f, &lum, &u, &v); } - sprintf(str, "V:%-.4f", val); + BLI_snprintf(str, sizeof(str), "V:%-.4f", val); BLF_position(blf_mono_font, dx, 6, 0); BLF_draw_ascii(blf_mono_font, str, sizeof(str)); dx += BLF_width(blf_mono_font, str); - sprintf(str, " L:%-.4f", lum); + BLI_snprintf(str, sizeof(str), " L:%-.4f", lum); BLF_position(blf_mono_font, dx, 6, 0); BLF_draw_ascii(blf_mono_font, str, sizeof(str)); dx += BLF_width(blf_mono_font, str); @@ -289,22 +290,22 @@ void draw_image_info(ARegion *ar, int color_manage, int channels, int x, int y, rgb_to_yuv((float)cp[0]/255.0f, (float)cp[1]/255.0f, (float)cp[2]/255.0f, &lum, &u, &v); } - sprintf(str, "H:%-.4f", hue); + BLI_snprintf(str, sizeof(str), "H:%-.4f", hue); BLF_position(blf_mono_font, dx, 6, 0); BLF_draw_ascii(blf_mono_font, str, sizeof(str)); dx += BLF_width(blf_mono_font, str); - sprintf(str, " S:%-.4f", sat); + BLI_snprintf(str, sizeof(str), " S:%-.4f", sat); BLF_position(blf_mono_font, dx, 6, 0); BLF_draw_ascii(blf_mono_font, str, sizeof(str)); dx += BLF_width(blf_mono_font, str); - sprintf(str, " V:%-.4f", val); + BLI_snprintf(str, sizeof(str), " V:%-.4f", val); BLF_position(blf_mono_font, dx, 6, 0); BLF_draw_ascii(blf_mono_font, str, sizeof(str)); dx += BLF_width(blf_mono_font, str); - sprintf(str, " L:%-.4f", lum); + BLI_snprintf(str, sizeof(str), " L:%-.4f", lum); BLF_position(blf_mono_font, dx, 6, 0); BLF_draw_ascii(blf_mono_font, str, sizeof(str)); dx += BLF_width(blf_mono_font, str); @@ -378,14 +379,14 @@ static void sima_draw_alpha_backdrop(float x1, float y1, float xsize, float ysiz { GLubyte checker_stipple[32*32/8] = { - 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, \ - 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, \ - 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, \ - 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, \ - 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, \ - 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, \ - 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, \ - 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, \ + 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, + 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, + 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, + 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, + 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, + 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, + 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, + 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, }; glColor3ubv(col1); diff --git a/source/blender/editors/space_image/image_intern.h b/source/blender/editors/space_image/image_intern.h index 04156c80c0e..29673f74538 100644 --- a/source/blender/editors/space_image/image_intern.h +++ b/source/blender/editors/space_image/image_intern.h @@ -55,7 +55,6 @@ void IMAGE_OT_toolbox(struct wmOperatorType *ot); /* image_draw.c */ void draw_image_main(struct SpaceImage *sima, struct ARegion *ar, struct Scene *scene); -void draw_image_info(struct ARegion *ar, int color_manage, int channels, int x, int y, const char cp[4], const float fp[4], int *zp, float *zpf); void draw_image_grease_pencil(struct bContext *C, short onlyv2d); /* image_ops.c */ diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 0efc89e802a..06674513868 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -817,7 +817,7 @@ static int image_open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event) if(ima) path= ima->name; - if(RNA_property_is_set(op->ptr, "filepath")) + if(RNA_struct_property_is_set(op->ptr, "filepath")) return image_open_exec(C, op); image_open_init(C, op); @@ -876,10 +876,10 @@ static int image_replace_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve if(!sima->image) return OPERATOR_CANCELLED; - if(RNA_property_is_set(op->ptr, "filepath")) + if(RNA_struct_property_is_set(op->ptr, "filepath")) return image_replace_exec(C, op); - if(!RNA_property_is_set(op->ptr, "relative_path")) + if(!RNA_struct_property_is_set(op->ptr, "relative_path")) RNA_boolean_set(op->ptr, "relative_path", (strncmp(sima->image->name, "//", 2))==0); image_filesel(C, op, sima->image->name); @@ -1011,7 +1011,7 @@ static void save_image_options_from_op(SaveImageOptions *simopts, wmOperator *op simopts->im_format= *(ImageFormatData *)op->customdata; } - if (RNA_property_is_set(op->ptr, "filepath")) { + if (RNA_struct_property_is_set(op->ptr, "filepath")) { RNA_string_get(op->ptr, "filepath", simopts->filepath); BLI_path_abs(simopts->filepath, G.main->name); } @@ -1176,7 +1176,7 @@ static int image_save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve Scene *scene= CTX_data_scene(C); SaveImageOptions simopts; - if(RNA_property_is_set(op->ptr, "filepath")) + if(RNA_struct_property_is_set(op->ptr, "filepath")) return image_save_as_exec(C, op); if (save_image_options_init(&simopts, sima, scene, TRUE) == 0) @@ -1184,7 +1184,7 @@ static int image_save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve save_image_options_to_op(&simopts, op); /* enable save_copy by default for render results */ - if(ELEM(ima->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE) && !RNA_property_is_set(op->ptr, "copy")) { + if(ELEM(ima->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE) && !RNA_struct_property_is_set(op->ptr, "copy")) { RNA_boolean_set(op->ptr, "copy", TRUE); } @@ -1676,7 +1676,7 @@ static int image_unpack_exec(bContext *C, wmOperator *op) int method= RNA_enum_get(op->ptr, "method"); /* find the suppplied image by name */ - if (RNA_property_is_set(op->ptr, "id")) { + if (RNA_struct_property_is_set(op->ptr, "id")) { char imaname[MAX_ID_NAME-2]; RNA_string_get(op->ptr, "id", imaname); ima = BLI_findstring(&CTX_data_main(C)->image, imaname, offsetof(ID, name) + 2); @@ -1708,7 +1708,7 @@ static int image_unpack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even { Image *ima= CTX_data_edit_image(C); - if(RNA_property_is_set(op->ptr, "id")) + if(RNA_struct_property_is_set(op->ptr, "id")) return image_unpack_exec(C, op); if(!ima || !ima->packedfile) @@ -1772,7 +1772,7 @@ static void image_sample_draw(const bContext *UNUSED(C), ARegion *ar, void *arg_ ImageSampleInfo *info= arg_info; if(info->draw) { /* no color management needed for images (color_manage=0) */ - draw_image_info(ar, 0, info->channels, info->x, info->y, info->colp, info->colfp, info->zp, info->zfp); + ED_image_draw_info(ar, 0, info->channels, info->x, info->y, info->colp, info->colfp, info->zp, info->zfp); } } @@ -2016,14 +2016,14 @@ static int image_sample_line_exec(bContext *C, wmOperator *op) hist->data_r[i] = rgb[0]; hist->data_g[i] = rgb[1]; hist->data_b[i] = rgb[2]; - hist->data_luma[i] = (0.299f*rgb[0] + 0.587f*rgb[1] + 0.114f*rgb[2]); + hist->data_luma[i] = rgb_to_luma(rgb); } else if (ibuf->rect) { cp= (unsigned char *)(ibuf->rect + y*ibuf->x + x); hist->data_r[i] = (float)cp[0]/255.0f; hist->data_g[i] = (float)cp[1]/255.0f; hist->data_b[i] = (float)cp[2]/255.0f; - hist->data_luma[i] = (0.299f*cp[0] + 0.587f*cp[1] + 0.114f*cp[2])/255; + hist->data_luma[i] = (float)rgb_to_luma_byte(cp)/255.0f; } } } diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 99c190cd2dd..4421ad8e4f9 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -594,8 +594,13 @@ static void image_refresh(const bContext *C, ScrArea *UNUSED(sa)) /* new shading system, get image from material */ EditFace *efa= EM_get_actFace(em, sloppy); - if(efa) - ED_object_get_active_image(obedit, efa->mat_nr, &sima->image, NULL, NULL); + if(efa) { + Image *node_ima; + ED_object_get_active_image(obedit, efa->mat_nr, &node_ima, NULL, NULL); + + if(node_ima) + sima->image= node_ima; + } } else { /* old shading system, we set texface */ diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c index deff1c77912..2090b4eae0a 100644 --- a/source/blender/editors/space_info/info_ops.c +++ b/source/blender/editors/space_info/info_ops.c @@ -143,7 +143,7 @@ static int unpack_all_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event) Main *bmain= CTX_data_main(C); uiPopupMenu *pup; uiLayout *layout; - char title[128]; + char title[64]; int count = 0; count = countPackedFiles(bmain); @@ -155,9 +155,9 @@ static int unpack_all_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event) } if(count == 1) - sprintf(title, "Unpack 1 file"); + strcpy(title, "Unpack 1 file"); else - sprintf(title, "Unpack %d files", count); + BLI_snprintf(title, sizeof(title), "Unpack %d files", count); pup= uiPupMenuBegin(C, title, ICON_NONE); layout= uiPupMenuLayout(pup); diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c index ce6b7d2e910..0dfcafcf549 100644 --- a/source/blender/editors/space_logic/logic_ops.c +++ b/source/blender/editors/space_logic/logic_ops.c @@ -88,15 +88,15 @@ static int edit_actuator_poll(bContext *C) static void edit_sensor_properties(wmOperatorType *ot) { - RNA_def_string(ot->srna, "sensor", "", 32, "Sensor", "Name of the sensor to edit"); - RNA_def_string(ot->srna, "object", "", 32, "Object", "Name of the object the sensor belongs to"); + RNA_def_string(ot->srna, "sensor", "", MAX_NAME, "Sensor", "Name of the sensor to edit"); + RNA_def_string(ot->srna, "object", "", MAX_NAME, "Object", "Name of the object the sensor belongs to"); } static int edit_sensor_invoke_properties(bContext *C, wmOperator *op) { PointerRNA ptr= CTX_data_pointer_get_type(C, "sensor", &RNA_Sensor); - if (RNA_property_is_set(op->ptr, "sensor") && RNA_property_is_set(op->ptr, "object") ) + if (RNA_struct_property_is_set(op->ptr, "sensor") && RNA_struct_property_is_set(op->ptr, "object") ) return 1; if (ptr.data) { @@ -113,14 +113,14 @@ static int edit_sensor_invoke_properties(bContext *C, wmOperator *op) static Object *edit_object_property_get(bContext *C, wmOperator *op) { - char ob_name[32]; + char ob_name[MAX_NAME]; Object *ob; RNA_string_get(op->ptr, "object", ob_name); /* if ob_name is valid try to find the object with this name otherwise gets the active object */ - if (BLI_strnlen(ob_name, 32) > 0) + if (BLI_strnlen(ob_name, MAX_NAME) > 0) ob = BLI_findstring(&(CTX_data_main(C)->object), ob_name, offsetof(ID, name) + 2); else ob= ED_object_active_context(C); @@ -130,7 +130,7 @@ static Object *edit_object_property_get(bContext *C, wmOperator *op) static bSensor *edit_sensor_property_get(bContext *C, wmOperator *op, Object **ob) { - char sensor_name[32]; + char sensor_name[MAX_NAME]; bSensor *sens; RNA_string_get(op->ptr, "sensor", sensor_name); @@ -144,15 +144,15 @@ static bSensor *edit_sensor_property_get(bContext *C, wmOperator *op, Object **o static void edit_controller_properties(wmOperatorType *ot) { - RNA_def_string(ot->srna, "controller", "", 32, "Controller", "Name of the controller to edit"); - RNA_def_string(ot->srna, "object", "", 32, "Object", "Name of the object the controller belongs to"); + RNA_def_string(ot->srna, "controller", "", MAX_NAME, "Controller", "Name of the controller to edit"); + RNA_def_string(ot->srna, "object", "", MAX_NAME, "Object", "Name of the object the controller belongs to"); } static int edit_controller_invoke_properties(bContext *C, wmOperator *op) { PointerRNA ptr= CTX_data_pointer_get_type(C, "controller", &RNA_Controller); - if (RNA_property_is_set(op->ptr, "controller") && RNA_property_is_set(op->ptr, "object") ) + if (RNA_struct_property_is_set(op->ptr, "controller") && RNA_struct_property_is_set(op->ptr, "object") ) return 1; if (ptr.data) { @@ -169,7 +169,7 @@ static int edit_controller_invoke_properties(bContext *C, wmOperator *op) static bController *edit_controller_property_get(bContext *C, wmOperator *op, Object **ob) { - char controller_name[32]; + char controller_name[MAX_NAME]; bController *cont; RNA_string_get(op->ptr, "controller", controller_name); @@ -183,15 +183,15 @@ static bController *edit_controller_property_get(bContext *C, wmOperator *op, Ob static void edit_actuator_properties(wmOperatorType *ot) { - RNA_def_string(ot->srna, "actuator", "", 32, "Actuator", "Name of the actuator to edit"); - RNA_def_string(ot->srna, "object", "", 32, "Object", "Name of the object the actuator belongs to"); + RNA_def_string(ot->srna, "actuator", "", MAX_NAME, "Actuator", "Name of the actuator to edit"); + RNA_def_string(ot->srna, "object", "", MAX_NAME, "Object", "Name of the object the actuator belongs to"); } static int edit_actuator_invoke_properties(bContext *C, wmOperator *op) { PointerRNA ptr= CTX_data_pointer_get_type(C, "actuator", &RNA_Actuator); - if (RNA_property_is_set(op->ptr, "actuator") && RNA_property_is_set(op->ptr, "object") ) + if (RNA_struct_property_is_set(op->ptr, "actuator") && RNA_struct_property_is_set(op->ptr, "object") ) return 1; if (ptr.data) { @@ -208,7 +208,7 @@ static int edit_actuator_invoke_properties(bContext *C, wmOperator *op) static bActuator *edit_actuator_property_get(bContext *C, wmOperator *op, Object **ob) { - char actuator_name[32]; + char actuator_name[MAX_NAME]; bActuator *act; RNA_string_get(op->ptr, "actuator", actuator_name); @@ -278,7 +278,7 @@ static int sensor_add_exec(bContext *C, wmOperator *op) PointerRNA sens_ptr; PropertyRNA *prop; const char *sens_name; - char name[32]; + char name[MAX_NAME]; int type= RNA_enum_get(op->ptr, "type"); ob= edit_object_property_get(C, op); @@ -293,7 +293,7 @@ static int sensor_add_exec(bContext *C, wmOperator *op) prop = RNA_struct_find_property(&sens_ptr, "type"); RNA_string_get(op->ptr, "name", name); - if(BLI_strnlen(name, 32) < 1){ + if(BLI_strnlen(name, MAX_NAME) < 1){ RNA_property_enum_name(C, &sens_ptr, prop, RNA_property_enum_get(&sens_ptr, prop), &sens_name); BLI_strncpy(sens->name, sens_name, sizeof(sens->name)); } @@ -328,8 +328,8 @@ static void LOGIC_OT_sensor_add(wmOperatorType *ot) /* properties */ ot->prop= prop= RNA_def_enum(ot->srna, "type", DummyRNA_NULL_items, SENS_ALWAYS, "Type", "Type of sensor to add"); RNA_def_enum_funcs(prop, rna_Sensor_type_itemf); - RNA_def_string(ot->srna, "name", "", 32, "Name", "Name of the Sensor to add"); - RNA_def_string(ot->srna, "object", "", 32, "Object", "Name of the Object to add the Sensor to"); + RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the Sensor to add"); + RNA_def_string(ot->srna, "object", "", MAX_NAME, "Object", "Name of the Object to add the Sensor to"); } /* ************* Add/Remove Controller Operator ************* */ @@ -382,7 +382,7 @@ static int controller_add_exec(bContext *C, wmOperator *op) PropertyRNA *prop; const char *cont_name; int bit; - char name[32]; + char name[MAX_NAME]; int type= RNA_enum_get(op->ptr, "type"); ob= edit_object_property_get(C, op); @@ -397,7 +397,7 @@ static int controller_add_exec(bContext *C, wmOperator *op) prop = RNA_struct_find_property(&cont_ptr, "type"); RNA_string_get(op->ptr, "name", name); - if(BLI_strnlen(name, 32) < 1){ + if(BLI_strnlen(name, MAX_NAME) < 1){ RNA_property_enum_name(C, &cont_ptr, prop, RNA_property_enum_get(&cont_ptr, prop), &cont_name); BLI_strncpy(cont->name, cont_name, sizeof(cont->name)); } @@ -442,8 +442,8 @@ static void LOGIC_OT_controller_add(wmOperatorType *ot) /* properties */ ot->prop= RNA_def_enum(ot->srna, "type", controller_type_items, CONT_LOGIC_AND, "Type", "Type of controller to add"); - RNA_def_string(ot->srna, "name", "", 32, "Name", "Name of the Controller to add"); - RNA_def_string(ot->srna, "object", "", 32, "Object", "Name of the Object to add the Controller to"); + RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the Controller to add"); + RNA_def_string(ot->srna, "object", "", MAX_NAME, "Object", "Name of the Object to add the Controller to"); } /* ************* Add/Remove Actuator Operator ************* */ @@ -495,7 +495,7 @@ static int actuator_add_exec(bContext *C, wmOperator *op) PointerRNA act_ptr; PropertyRNA *prop; const char *act_name; - char name[32]; + char name[MAX_NAME]; int type= RNA_enum_get(op->ptr, "type"); ob= edit_object_property_get(C, op); @@ -510,7 +510,7 @@ static int actuator_add_exec(bContext *C, wmOperator *op) prop = RNA_struct_find_property(&act_ptr, "type"); RNA_string_get(op->ptr, "name", name); - if (BLI_strnlen(name, 32) < 1){ + if (BLI_strnlen(name, MAX_NAME) < 1){ RNA_property_enum_name(C, &act_ptr, prop, RNA_property_enum_get(&act_ptr, prop), &act_name); BLI_strncpy(act->name, act_name, sizeof(act->name)); } @@ -545,8 +545,8 @@ static void LOGIC_OT_actuator_add(wmOperatorType *ot) /* properties */ ot->prop= prop= RNA_def_enum(ot->srna, "type", DummyRNA_NULL_items, CONT_LOGIC_AND, "Type", "Type of actuator to add"); RNA_def_enum_funcs(prop, rna_Actuator_type_itemf); - RNA_def_string(ot->srna, "name", "", 32, "Name", "Name of the Actuator to add"); - RNA_def_string(ot->srna, "object", "", 32, "Object", "Name of the Object to add the Actuator to"); + RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the Actuator to add"); + RNA_def_string(ot->srna, "object", "", MAX_NAME, "Object", "Name of the Object to add the Actuator to"); } /* ************* Move Logic Bricks Operator ************* */ diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index e5255448ae9..2c1e7a0c546 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -1187,7 +1187,7 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short ts= sens->data; - /* uiDefBut(block, TEX, 1, "Property:", xco,yco-22,width, 19, &ts->name, 0, 31, 0, 0, "Only look for Objects with this property"); */ + /* uiDefBut(block, TEX, 1, "Property:", xco,yco-22,width, 19, &ts->name, 0, MAX_NAME, 0, 0, "Only look for Objects with this property"); */ uiDefIDPoinBut(block, test_matpoin_but, ID_MA, 1, "MA:",(short)(xco + 10),(short)(yco-44), (short)(width - 20), 19, &ts->ma, "Only look for floors with this Material"); ///* uiDefButF(block, NUM, 1, "Margin:", xco+width/2,yco-44,width/2, 19, &ts->dist, 0.0, 10.0, 100, 0, "Extra margin (distance) for larger sensitivity"); yco-= ysize; @@ -1216,11 +1216,11 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short if (cs->mode & SENS_COLLISION_MATERIAL) { uiDefBut(block, TEX, 1, "Material:", (short)(xco + 10 + 0.40 * (width-20)), - (short)(yco-44), (short)(0.6*(width-20)), 19, &cs->materialName, 0, 31, 0, 0, + (short)(yco-44), (short)(0.6*(width-20)), 19, &cs->materialName, 0, MAX_NAME, 0, 0, "Only look for Objects with this material"); } else { uiDefBut(block, TEX, 1, "Property:", (short)(xco + 10 + 0.40 * (width-20)), (short)(yco-44), - (short)(0.6*(width-20)), 19, &cs->name, 0, 31, 0, 0, + (short)(0.6*(width-20)), 19, &cs->name, 0, MAX_NAME, 0, 0, "Only look for Objects with this property"); } @@ -1240,7 +1240,7 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short ns= sens->data; uiDefBut(block, TEX, 1, "Property:",(short)(10+xco),(short)(yco-44), (short)(width-20), 19, - &ns->name, 0, 31, 0, 0, "Only look for Objects with this property"); + &ns->name, 0, MAX_NAME, 0, 0, "Only look for Objects with this property"); uiDefButF(block, NUM, 1, "Dist",(short)(10+xco),(short)(yco-68),(short)((width-22)/2), 19, &ns->dist, 0.0, 1000.0, 1000, 0, "Trigger distance"); uiDefButF(block, NUM, 1, "Reset",(short)(10+xco+(width-22)/2), (short)(yco-68), (short)((width-22)/2), 19, @@ -1261,7 +1261,7 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short uiDefBut(block, TEX, 1, "Prop:", (short)(10+xco),(short)(yco-44), (short)(0.7 * (width-20)), 19, - &rs->name, 0, 31, 0, 0, + &rs->name, 0, MAX_NAME, 0, 0, "Only look for Objects with this property"); str = "Type %t|+X axis %x0|+Y axis %x1|+Z axis %x2|-X axis %x3|-Y axis %x4|-Z axis %x5"; @@ -1316,14 +1316,14 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short /* line 4: toggle property for string logging mode */ uiDefBut(block, TEX, 1, "LogToggle: ", xco+10, yco-((ks->type&1) ? 68:92), (width-20), 19, - ks->toggleName, 0, 31, 0, 0, + ks->toggleName, 0, MAX_NAME, 0, 0, "Property that indicates whether to log " "keystrokes as a string"); /* line 5: target property for string logging mode */ uiDefBut(block, TEX, 1, "Target: ", xco+10, yco-((ks->type&1) ? 92:116), (width-20), 19, - ks->targetName, 0, 31, 0, 0, + ks->targetName, 0, MAX_NAME, 0, 0, "Property that receives the keystrokes in case " "a string is logged"); @@ -1349,21 +1349,21 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short if (ps->type != SENS_PROP_EXPRESSION) { uiDefBut(block, TEX, 1, "Prop: ", xco+30,yco-68,width-60, 19, - ps->name, 0, 31, 0, 0, "Property name"); + ps->name, 0, MAX_NAME, 0, 0, "Property name"); } if(ps->type == SENS_PROP_INTERVAL) { uiDefBut(block, TEX, 1, "Min: ", xco,yco-92,width/2, 19, - ps->value, 0, 31, 0, 0, "check for min value"); + ps->value, 0, MAX_NAME, 0, 0, "check for min value"); uiDefBut(block, TEX, 1, "Max: ", xco+width/2,yco-92,width/2, 19, - ps->maxvalue, 0, 31, 0, 0, "check for max value"); + ps->maxvalue, 0, MAX_NAME, 0, 0, "check for max value"); } else if(ps->type == SENS_PROP_CHANGED); else { uiDefBut(block, TEX, 1, "Value: ", xco+30,yco-92,width-60, 19, - ps->value, 0, 31, 0, 0, "check for value"); + ps->value, 0, MAX_NAME, 0, 0, "check for value"); } yco-= ysize; @@ -1384,12 +1384,12 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short uiBlockBeginAlign(block); but = uiDefBut(block, TEX, 1, "Bone: ", (xco+10), (yco-44), (width-20)/2, 19, - arm->posechannel, 0, 31, 0, 0, + arm->posechannel, 0, MAX_NAME, 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, + arm->constraint, 0, MAX_NAME, 0, 0, "Name of the constraint you want to control"); uiButSetFunc(but, check_armature_sensor, but, arm); uiBlockEndAlign(block); @@ -1420,7 +1420,7 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short as= sens->data; uiDefBut(block, TEX, 1, "Act: ", xco+30,yco-44,width-60, 19, - as->name, 0, 31, 0, 0, "Actuator name, actuator active state modifications will be detected"); + as->name, 0, MAX_NAME, 0, 0, "Actuator name, actuator active state modifications will be detected"); yco-= ysize; break; } @@ -1513,13 +1513,13 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short if (raySens->mode & SENS_COLLISION_MATERIAL) { uiDefBut(block, TEX, 1, "Material:", xco + 10 + 0.20 * (width-20), yco-44, 0.8*(width-20), 19, - &raySens->matname, 0, 31, 0, 0, + &raySens->matname, 0, MAX_NAME, 0, 0, "Only look for Objects with this material"); } else { uiDefBut(block, TEX, 1, "Property:", xco + 10 + 0.20 * (width-20), yco-44, 0.8*(width-20), 19, - &raySens->propname, 0, 31, 0, 0, + &raySens->propname, 0, MAX_NAME, 0, 0, "Only look for Objects with this property"); } @@ -1557,7 +1557,7 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short /* line 2: Subject filter */ uiDefBut(block, TEX, 1, "Subject: ", (xco+10), (yco-44), (width-20), 19, - mes->subject, 0, 31, 0, 0, + mes->subject, 0, MAX_NAME, 0, 0, "Optional subject filter: only accept messages with this subject" ", or empty for all"); @@ -1683,7 +1683,7 @@ static short draw_controllerbuttons(bController *cont, uiBlock *block, short xco ec= cont->data; /* uiDefBut(block, BUT, 1, "Variables", xco,yco-24,80, 19, NULL, 0, 0, 0, 0, "Available variables for expression"); */ uiDefBut(block, TEX, 1, "Exp:", xco + 10 , yco-21, width-20, 19, - ec->str, 0, 127, 0, 0, + ec->str, 0, sizeof(ec->str), 0, 0, "Expression"); yco-= ysize; @@ -1704,7 +1704,7 @@ static short draw_controllerbuttons(bController *cont, uiBlock *block, short xco if(pc->mode==0) 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"); + uiDefBut(block, TEX, 1, "", xco+70,yco-23,(width-70)-25, 19, pc->module, 0, sizeof(pc->module), 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"); } uiBlockEndAlign(block); @@ -2032,7 +2032,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo if(aa->type == ACT_ACTION_FROM_PROP) { - uiDefBut(block, TEX, 0, "Prop: ",xco+10, yco-44, width-20, 19, aa->name, 0.0, 31.0, 0, 0, "Use this property to define the Action position"); + uiDefBut(block, TEX, 0, "Prop: ",xco+10, yco-44, width-20, 19, aa->name, 0.0, MAX_NAME, 0, 0, "Use this property to define the Action position"); } else { @@ -2043,7 +2043,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo uiDefButS(block, NUM, 0, "Blendin: ", xco+10, yco-64, (width-20)/2, 19, &aa->blendin, 0.0, 32767, 0.0, 0.0, "Number of frames of motion blending"); uiDefButS(block, NUM, 0, "Priority: ", xco+10+(width-20)/2, yco-64, (width-20)/2, 19, &aa->priority, 0.0, 100.0, 0.0, 0.0, "Execution priority - lower numbers will override actions with higher numbers, With 2 or more actions at once, the overriding channels must be lower in the stack"); - uiDefBut(block, TEX, 0, "FrameProp: ",xco+10, yco-84, width-20, 19, aa->frameProp, 0.0, 31.0, 0, 0, "Assign the action's current frame number to this property"); + uiDefBut(block, TEX, 0, "FrameProp: ",xco+10, yco-84, width-20, 19, aa->frameProp, 0.0, MAX_NAME, 0, 0, "Assign the action's current frame number to this property"); #ifdef __NLA_ACTION_BY_MOTION_ACTUATOR @@ -2094,7 +2094,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo if(ia->type==ACT_IPO_FROM_PROP) { uiDefBut(block, TEX, 0, "Prop: ", xco+10, yco-44, width-80, 19, - ia->name, 0.0, 31.0, 0, 0, + ia->name, 0.0, MAX_NAME, 0, 0, "Use this property to define the Ipo position"); } else { @@ -2113,7 +2113,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo "Update IPO on all children Objects as well"); uiDefBut(block, TEX, 0, "FrameProp: ", xco+10, yco-64, width-20, 19, - ia->frameProp, 0.0, 31.0, 0, 0, + ia->frameProp, 0.0, MAX_NAME, 0, 0, "Assign the action's current frame number to this property"); yco-= ysize; @@ -2131,7 +2131,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo str= "Type%t|Assign%x0|Add %x1|Copy %x2|Toggle (bool/int/float/timer)%x3"; uiDefButI(block, MENU, B_REDR, str, xco+30,yco-24,width-60, 19, &pa->type, 0, 31, 0, 0, "Type"); - uiDefBut(block, TEX, 1, "Prop: ", xco+30,yco-44,width-60, 19, pa->name, 0, 31, 0, 0, "Property name"); + uiDefBut(block, TEX, 1, "Prop: ", xco+30,yco-44,width-60, 19, pa->name, 0, MAX_NAME, 0, 0, "Property name"); if(pa->type==ACT_PROP_TOGGLE) { @@ -2140,10 +2140,10 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo } else if(pa->type==ACT_PROP_COPY) { uiDefIDPoinBut(block, test_obpoin_but, ID_OB, 1, "OB:", xco+10, yco-64, (width-20)/2, 19, &(pa->ob), "Copy from this Object"); - uiDefBut(block, TEX, 1, "Prop: ", xco+10+(width-20)/2, yco-64, (width-20)/2, 19, pa->value, 0, 31, 0, 0, "Copy this property"); + uiDefBut(block, TEX, 1, "Prop: ", xco+10+(width-20)/2, yco-64, (width-20)/2, 19, pa->value, 0, MAX_NAME, 0, 0, "Copy this property"); } else { - uiDefBut(block, TEX, 1, "Value: ", xco+30,yco-64,width-60, 19, pa->value, 0, 31, 0, 0, "change with this value, use \"\" around strings"); + uiDefBut(block, TEX, 1, "Value: ", xco+30,yco-64,width-60, 19, pa->value, 0, MAX_NAME, 0, 0, "change with this value, use \"\" around strings"); } yco-= ysize; @@ -2175,7 +2175,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo char dummy_str[] = "Sound mode %t|Play Stop %x0|Play End %x1|Loop Stop %x2|" "Loop End %x3|Loop Ping Pong Stop %x5|Loop Ping Pong %x4"; uiDefBut(block, TEX, B_IDNAME, "SO:",xco+30,yco-22,wval-20,19, - ((ID *)sa->sound)->name+2, 0.0, 21.0, 0, 0, ""); + ((ID *)sa->sound)->name+2, 0.0, MAX_ID_NAME-2, 0, 0, ""); uiDefButS(block, MENU, 1, dummy_str,xco+10,yco-44,width-20, 19, &sa->type, 0.0, 0.0, 0, 0, ""); uiDefButF(block, NUM, 0, "Volume:", xco+10,yco-66,wval, 19, &sa->volume, @@ -2397,13 +2397,13 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo if (coa->flag & ACT_CONST_MATERIAL) { uiDefBut(block, TEX, 1, "Material:", xco + 50, yco-84, (width-60), 19, - coa->matprop, 0, 31, 0, 0, + coa->matprop, 0, MAX_NAME, 0, 0, "Ray detects only Objects with this material"); } else { uiDefBut(block, TEX, 1, "Property:", xco + 50, yco-84, (width-60), 19, - coa->matprop, 0, 31, 0, 0, + coa->matprop, 0, MAX_NAME, 0, 0, "Ray detect only Objects with this property"); } uiDefButBitS(block, TOG, ACT_CONST_PERMANENT, 0, "PER", xco+10, yco-103, 40, 19, @@ -2456,13 +2456,13 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo if (coa->flag & ACT_CONST_MATERIAL) { uiDefBut(block, TEX, 1, "Material:", xco + 50, yco-84, (width-60), 19, - coa->matprop, 0, 31, 0, 0, + coa->matprop, 0, MAX_NAME, 0, 0, "Ray detects only Objects with this material"); } else { uiDefBut(block, TEX, 1, "Property:", xco + 50, yco-84, (width-60), 19, - coa->matprop, 0, 31, 0, 0, + coa->matprop, 0, MAX_NAME, 0, 0, "Ray detect only Objects with this property"); } uiDefButBitS(block, TOG, ACT_CONST_PERMANENT, 0, "PER", xco+10, yco-103, 40, 19, @@ -2554,8 +2554,8 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo ysize = 48; glRects(xco, yco-ysize, xco+width, yco); uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1); - uiDefBut(block, TEX, 1, "File: ", xco+10, yco-44,width-20,19, &(gma->filename), 0, 63, 0, 0, "Load this blend file, use the \"//\" prefix for a path relative to the current blend file"); -// uiDefBut(block, TEX, 1, "Anim: ", xco+10, yco-64,width-20,19, &(gma->loadaniname), 0, 63, 0, 0, "Use this loadinganimation"); + uiDefBut(block, TEX, 1, "File: ", xco+10, yco-44,width-20,19, &(gma->filename), 0, sizeof(gma->filename), 0, 0, "Load this blend file, use the \"//\" prefix for a path relative to the current blend file"); +// uiDefBut(block, TEX, 1, "Anim: ", xco+10, yco-64,width-20,19, &(gma->loadaniname), 0, sizeof(gma->loadaniname), 0, 0, "Use this loadinganimation"); } /* else if (gma->type == ACT_GAME_START) { @@ -2563,8 +2563,8 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo glRects(xco, yco-ysize, xco+width, yco); uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1); - uiDefBut(block, TEX, 1, "File: ", xco+10, yco-44,width-20,19, &(gma->filename), 0, 63, 0, 0, "Load this file"); - uiDefBut(block, TEX, 1, "Anim: ", xco+10, yco-64,width-20,19, &(gma->loadaniname), 0, 63, 0, 0, "Use this loadinganimation"); + uiDefBut(block, TEX, 1, "File: ", xco+10, yco-44,width-20,19, &(gma->filename), 0, sizeof(gma->filename), 0, 0, "Load this file"); + uiDefBut(block, TEX, 1, "Anim: ", xco+10, yco-64,width-20,19, &(gma->loadaniname), 0, sizeof(gma->loadaniname), 0, 0, "Use this loadinganimation"); } */ else if (ELEM4(gma->type, ACT_GAME_RESTART, ACT_GAME_QUIT, ACT_GAME_SAVECFG, ACT_GAME_LOADCFG)) { @@ -2592,11 +2592,11 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo uiDefButS(block, MENU, 1, str, xco+20, yco-24, width-40, 19, &ga->type, 0, 0, 0, 0, ""); if(ga->type==ACT_GROUP_SET) { - uiDefBut(block, TEX, 0, "Key: ", xco+20, yco-44, (width-10)/2, 19, ga->name, 0.0, 31.0, 0, 0, "This name defines groupkey to be set"); + uiDefBut(block, TEX, 0, "Key: ", xco+20, yco-44, (width-10)/2, 19, ga->name, 0.0, MAX_NAME, 0, 0, "This name defines groupkey to be set"); uiDefButI(block, NUM, 0, "Frame:", xco+20+(width-10)/2, yco-44, (width-70)/2, 19, &ga->sta, 0.0, 2500.0, 0, 0, "Set this frame"); } else if(ga->type==ACT_GROUP_FROM_PROP) { - uiDefBut(block, TEX, 0, "Prop: ", xco+20, yco-44, width-40, 19, ga->name, 0.0, 31.0, 0, 0, "Use this property to define the Group position"); + uiDefBut(block, TEX, 0, "Prop: ", xco+20, yco-44, width-40, 19, ga->name, 0.0, MAX_NAME, 0, 0, "Use this property to define the Group position"); } else { uiDefButI(block, NUM, 0, "State", xco+20, yco-44, (width-40)/2, 19, &ga->sta, 0.0, 2500.0, 0, 0, "Start frame"); @@ -2698,7 +2698,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo /* 3. property */ uiDefBut(block, TEX, 1, "Property:", (xco+10), yco-44, (width-20), 19, - &randAct->propname, 0, 31, 0, 0, + &randAct->propname, 0, MAX_NAME, 0, 0, "Assign the random value to this property"); /*4. and 5. arguments for the distribution*/ @@ -2789,13 +2789,13 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo /* line 1: To */ uiDefBut(block, TEX, 1, "To: ", (xco+10), (yco-(myline++*24)), (width-20), 19, - &ma->toPropName, 0, 31, 0, 0, + &ma->toPropName, 0, MAX_NAME, 0, 0, "Optional send message to objects with this name only, or empty to broadcast"); /* line 2: Message Subject */ uiDefBut(block, TEX, 1, "Subject: ", (xco+10), (yco-(myline++*24)), (width-20), 19, - &ma->subject, 0, 31, 0, 0, + &ma->subject, 0, MAX_NAME, 0, 0, "Optional message subject. This is what can be filtered on"); /* line 3: Text/Property */ @@ -2809,14 +2809,14 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo /* line 3: Message Body */ uiDefBut(block, TEX, 1, "Body: ", (xco+10+(0.20*(width-20))),(yco-(myline++*24)),(0.8*(width-20)),19, - &ma->body, 0, 31, 0, 0, + &ma->body, 0, MAX_NAME, 0, 0, "Optional message body Text"); } else { /* line 3: Property body (set by property) */ uiDefBut(block, TEX, 1, "Propname: ", (xco+10+(0.20*(width-20))),(yco-(myline++*24)),(0.8*(width-20)),19, - &ma->body, 0, 31, 0, 0, + &ma->body, 0, MAX_NAME, 0, 0, "The message body will be set by the Property Value"); } @@ -2923,12 +2923,12 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo uiBlockBeginAlign(block); but = uiDefBut(block, TEX, 1, "Bone: ", (xco+5), (yco-44), (width-10)/2, 19, - armAct->posechannel, 0, 31, 0, 0, + armAct->posechannel, 0, MAX_NAME, 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, + armAct->constraint, 0, MAX_NAME, 0, 0, "Name of the constraint you want to control"); uiButSetFunc(but, check_armature_actuator, but, armAct); uiBlockEndAlign(block); @@ -2999,7 +2999,7 @@ static uiBlock *sensor_menu(bContext *C, ARegion *ar, void *UNUSED(arg)) uiBlock *block; int yco=0; - block= uiBeginBlock(C, ar, "filemenu", UI_EMBOSSP); + block= uiBeginBlock(C, ar, __func__, UI_EMBOSSP); uiBlockSetButmFunc(block, do_sensor_menu, NULL); uiDefBut(block, BUTM, 1, "Show Objects", 0, (short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -3048,7 +3048,7 @@ static uiBlock *controller_menu(bContext *C, ARegion *ar, void *UNUSED(arg)) uiBlock *block; int yco=0; - block= uiBeginBlock(C, ar, "filemenu", UI_EMBOSSP); + block= uiBeginBlock(C, ar, __func__, UI_EMBOSSP); uiBlockSetButmFunc(block, do_controller_menu, NULL); uiDefBut(block, BUTM, 1, "Show Objects", 0, (short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -3097,7 +3097,7 @@ static uiBlock *actuator_menu(bContext *C, ARegion *ar, void *UNUSED(arg)) uiBlock *block; int xco=0; - block= uiBeginBlock(C, ar, "filemenu", UI_EMBOSSP); + block= uiBeginBlock(C, ar, __func__, UI_EMBOSSP); uiBlockSetButmFunc(block, do_actuator_menu, NULL); uiDefBut(block, BUTM, 1, "Show Objects", 0, (short)(xco-=20), 160, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -3143,7 +3143,7 @@ static uiBlock *controller_state_mask_menu(bContext *C, ARegion *ar, void *arg_c short yco = 12, xco = 0, stbit, offset; - block= uiBeginBlock(C, ar, "Controller state mask", UI_EMBOSS); + block= uiBeginBlock(C, ar, __func__, UI_EMBOSS); /* use this for a fake extra empy space around the buttons */ uiDefBut(block, LABEL, 0, "", -5, -5, 200, 34, NULL, 0, 0, 0, 0, ""); @@ -3191,7 +3191,7 @@ static uiBlock *object_state_mask_menu(bContext *C, ARegion *ar, void *arg_obj) uiBlock *block; short xco = 0; - block= uiBeginBlock(C, ar, "obstatemenu", UI_EMBOSSP); + block= uiBeginBlock(C, ar, __func__, UI_EMBOSSP); uiBlockSetButmFunc(block, do_object_state_menu, arg_obj); uiDefBut(block, BUTM, 1, "Set all bits", 0, (short)(xco-=20), 160, 19, NULL, 0.0, 0.0, 1, 0, ""); @@ -3580,7 +3580,7 @@ static void draw_controller_header(uiLayout *layout, PointerRNA *ptr, int xco, i bController *cont= (bController *)ptr->data; char state[3]; - sprintf(state, "%d", RNA_int_get(ptr, "states")); + BLI_snprintf(state, sizeof(state), "%d", RNA_int_get(ptr, "states")); box= uiLayoutBox(layout); row= uiLayoutRow(box, 0); @@ -4488,7 +4488,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar) uiLayout *layout, *row, *box; uiBlock *block; uiBut *but; - char name[32]; + char uiblockstr[32]; short a, count; int xco, yco, width; @@ -4497,8 +4497,8 @@ static void logic_buttons_new(bContext *C, ARegion *ar) RNA_pointer_create(NULL, &RNA_SpaceLogicEditor, slogic, &logic_ptr); idar= get_selected_and_linked_obs(C, &count, slogic->scaflag); - sprintf(name, "buttonswin %p", (void *)ar); - block= uiBeginBlock(C, ar, name, UI_EMBOSS); + BLI_snprintf(uiblockstr, sizeof(uiblockstr), "buttonswin %p", (void *)ar); + block= uiBeginBlock(C, ar, uiblockstr, UI_EMBOSS); uiBlockSetHandleFunc(block, do_logic_buts, NULL); /* loop over all objects and set visible/linked flags for the logic bricks */ @@ -4802,7 +4802,7 @@ void logic_buttons(bContext *C, ARegion *ar) int a, iact, stbit, offset; int xco, yco, width, ycoo; short count; - char name[32]; + char numstr[32]; /* pin is a bool used for actuator and sensor drawing with states * pin so changing states dosnt hide the logic brick */ char pin; @@ -4815,8 +4815,8 @@ void logic_buttons(bContext *C, ARegion *ar) if(ob==NULL) return; // uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE); - sprintf(name, "buttonswin %p", (void *)ar); - block= uiBeginBlock(C, ar, name, UI_EMBOSS); + BLI_snprintf(numstr, sizeof(numstr), "buttonswin %p", (void *)ar); + block= uiBeginBlock(C, ar, numstr, UI_EMBOSS); uiBlockSetHandleFunc(block, do_logic_buts, NULL); RNA_pointer_create(NULL, &RNA_SpaceLogicEditor, slogic, &logic_ptr); @@ -4932,13 +4932,13 @@ void logic_buttons(bContext *C, ARegion *ar) uiDefIconButBitS(block, ICONTOG, CONT_SHOW, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, UI_UNIT_Y, &cont->flag, 0, 0, 0, 0, "Controller settings"); uiDefIconButBitS(block, TOG, CONT_PRIO, B_REDR, ICON_BOOKMARKS, (short)(xco+width-66), yco, 22, UI_UNIT_Y, &cont->flag, 0, 0, 0, 0, "Mark controller for execution before all non-marked controllers (good for startup scripts)"); - sprintf(name, "%d", first_bit(cont->state_mask)+1); - uiDefBlockBut(block, controller_state_mask_menu, cont, name, (short)(xco+width-44), yco, 22, UI_UNIT_Y, "Set controller state index (from 1 to 30)"); + sprintf(numstr, "%d", first_bit(cont->state_mask)+1); + uiDefBlockBut(block, controller_state_mask_menu, cont, numstr, (short)(xco+width-44), yco, 22, UI_UNIT_Y, "Set controller state index (from 1 to 30)"); if(cont->flag & CONT_SHOW) { cont->otype= cont->type; uiDefButS(block, MENU, B_CHANGE_CONT, controller_pup(),(short)(xco+22), yco, 70, UI_UNIT_Y, &cont->type, 0, 0, 0, 0, "Controller type"); - but= uiDefBut(block, TEX, 1, "", (short)(xco+92), yco, (short)(width-158), UI_UNIT_Y, cont->name, 0, 31, 0, 0, "Controller name"); + but= uiDefBut(block, TEX, 1, "", (short)(xco+92), yco, (short)(width-158), UI_UNIT_Y, cont->name, 0, MAX_NAME, 0, 0, "Controller name"); uiButSetFunc(but, make_unique_prop_names_cb, cont->name, (void*) 0); ycoo= yco; @@ -5030,7 +5030,7 @@ void logic_buttons(bContext *C, ARegion *ar) if(sens->flag & SENS_SHOW) { uiDefButS(block, MENU, B_CHANGE_SENS, sensor_pup(), (short)(xco+22), yco, 80, UI_UNIT_Y, &sens->type, 0, 0, 0, 0, "Sensor type"); - but= uiDefBut(block, TEX, 1, "", (short)(xco+102), yco, (short)(width-(pin?146:124)), UI_UNIT_Y, sens->name, 0, 31, 0, 0, "Sensor name"); + but= uiDefBut(block, TEX, 1, "", (short)(xco+102), yco, (short)(width-(pin?146:124)), UI_UNIT_Y, sens->name, 0, MAX_NAME, 0, 0, "Sensor name"); uiButSetFunc(but, make_unique_prop_names_cb, sens->name, (void*) 0); sens->otype= sens->type; @@ -5042,7 +5042,7 @@ void logic_buttons(bContext *C, ARegion *ar) glRecti(xco+22, yco, xco+width-22,yco+19); but= uiDefBut(block, LABEL, 0, sensor_name(sens->type), (short)(xco+22), yco, 80, UI_UNIT_Y, sens, 0, 0, 0, 0, ""); //uiButSetFunc(but, old_sca_move_sensor, sens, NULL); - but= uiDefBut(block, LABEL, 0, sens->name, (short)(xco+102), yco, (short)(width-(pin?146:124)), UI_UNIT_Y, sens, 0, 31, 0, 0, ""); + but= uiDefBut(block, LABEL, 0, sens->name, (short)(xco+102), yco, (short)(width-(pin?146:124)), UI_UNIT_Y, sens, 0, MAX_NAME, 0, 0, ""); //uiButSetFunc(but, old_sca_move_sensor, sens, NULL); uiBlockBeginAlign(block); @@ -5108,7 +5108,7 @@ void logic_buttons(bContext *C, ARegion *ar) if(act->flag & ACT_SHOW) { act->otype= act->type; uiDefButS(block, MENU, B_CHANGE_ACT, actuator_pup(ob), (short)(xco+22), yco, 90, UI_UNIT_Y, &act->type, 0, 0, 0, 0, "Actuator type"); - but= uiDefBut(block, TEX, 1, "", (short)(xco+112), yco, (short)(width-(pin?156:134)), UI_UNIT_Y, act->name, 0, 31, 0, 0, "Actuator name"); + but= uiDefBut(block, TEX, 1, "", (short)(xco+112), yco, (short)(width-(pin?156:134)), UI_UNIT_Y, act->name, 0, MAX_NAME, 0, 0, "Actuator name"); uiButSetFunc(but, make_unique_prop_names_cb, act->name, (void*) 0); ycoo= yco; diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index 6af43e7618d..d7a1053f3c1 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -514,7 +514,7 @@ static void nla_draw_strip_frames_text(NlaTrack *UNUSED(nlt), NlaStrip *strip, V { const float ytol = 1.0f; /* small offset to vertical positioning of text, for legibility */ const char col[4] = {220, 220, 220, 255}; /* light grey */ - char str[32] = ""; + char numstr[32] = ""; /* Always draw times above the strip, whereas sequencer drew below + above. @@ -524,12 +524,12 @@ static void nla_draw_strip_frames_text(NlaTrack *UNUSED(nlt), NlaStrip *strip, V * while also preserving some accuracy, since we do use floats */ /* start frame */ - BLI_snprintf(str, sizeof(str), "%.1f", strip->start); - UI_view2d_text_cache_add(v2d, strip->start-1.0f, ymaxc+ytol, str, col); + BLI_snprintf(numstr, sizeof(numstr), "%.1f", strip->start); + UI_view2d_text_cache_add(v2d, strip->start-1.0f, ymaxc+ytol, numstr, col); /* end frame */ - BLI_snprintf(str, sizeof(str), "%.1f", strip->end); - UI_view2d_text_cache_add(v2d, strip->end, ymaxc+ytol, str, col); + BLI_snprintf(numstr, sizeof(numstr), "%.1f", strip->end); + UI_view2d_text_cache_add(v2d, strip->end, ymaxc+ytol, numstr, col); } /* ---------------------- */ @@ -715,7 +715,7 @@ static void draw_nla_channel_list_gl (bAnimContext *ac, ListBase *anim_data, Vie } sel = SEL_NLT(nlt); - strcpy(name, nlt->name); + BLI_strncpy(name, nlt->name, sizeof(name)); // draw manually still doDraw= 1; @@ -958,7 +958,7 @@ void draw_nla_channel_list (bContext *C, bAnimContext *ac, ARegion *ar) draw_nla_channel_list_gl(ac, &anim_data, v2d, y); } { /* second pass: UI widgets */ - uiBlock *block= uiBeginBlock(C, ar, "NLA channel buttons", UI_EMBOSS); + uiBlock *block= uiBeginBlock(C, ar, __func__, UI_EMBOSS); size_t channel_index = 0; y= (float)(-NLACHANNEL_HEIGHT(snla)); diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c index 821e302c13d..f173a3d3835 100644 --- a/source/blender/editors/space_nla/nla_ops.c +++ b/source/blender/editors/space_nla/nla_ops.c @@ -192,28 +192,39 @@ static void nla_keymap_main (wmKeyConfig *keyconf, wmKeyMap *keymap) /* selection */ /* click select */ - WM_keymap_add_item(keymap, "NLA_OT_click_select", SELECTMOUSE, KM_PRESS, 0, 0); + kmi = WM_keymap_add_item(keymap, "NLA_OT_click_select", SELECTMOUSE, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); kmi= WM_keymap_add_item(keymap, "NLA_OT_click_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_boolean_set(kmi->ptr, "extend", TRUE); /* select left/right */ - WM_keymap_add_item(keymap, "NLA_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "NLA_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_TEST); kmi= WM_keymap_add_item(keymap, "NLA_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_TEST); kmi= WM_keymap_add_item(keymap, "NLA_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_LEFT); kmi= WM_keymap_add_item(keymap, "NLA_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_RIGHT); /* deselect all */ - WM_keymap_add_item(keymap, "NLA_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "NLA_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", 1); + /* TODO: uniformize with other select_all ops? */ + kmi = WM_keymap_add_item(keymap, "NLA_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "invert", FALSE); + kmi = WM_keymap_add_item(keymap, "NLA_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0); + RNA_boolean_set(kmi->ptr, "invert", TRUE); /* borderselect */ - WM_keymap_add_item(keymap, "NLA_OT_select_border", BKEY, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "NLA_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0)->ptr, "axis_range", 1); + kmi = WM_keymap_add_item(keymap, "NLA_OT_select_border", BKEY, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "axis_range", FALSE); + kmi = WM_keymap_add_item(keymap, "NLA_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0); + RNA_boolean_set(kmi->ptr, "axis_range", TRUE); /* view*/ /* auto-set range */ diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index bd5292e5154..7d475973c09 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -132,7 +132,7 @@ static uiBlock *socket_component_menu(bContext *C, ARegion *ar, void *args_v) uiBlock *block; uiLayout *layout; - block= uiBeginBlock(C, ar, "socket menu", UI_EMBOSS); + block= uiBeginBlock(C, ar, __func__, UI_EMBOSS); uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN); layout= uiLayoutColumn(uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, args->x, args->y+2, args->width, NODE_DY, UI_GetStyle()), 0); @@ -631,7 +631,7 @@ static void draw_group_socket_name(SpaceNode *snode, bNode *gnode, bNodeSocket * if (sock->flag & SOCK_DYNAMIC) { bt = uiDefBut(gnode->block, TEX, 0, "", sock->locx+xoffset, sock->locy+1+yoffset, 72, NODE_DY, - sock->name, 0, 31, 0, 0, ""); + sock->name, 0, sizeof(sock->name), 0, 0, ""); if (in_out==SOCK_IN) uiButSetFunc(bt, update_group_input_cb, snode, ngroup); else @@ -640,7 +640,7 @@ static void draw_group_socket_name(SpaceNode *snode, bNode *gnode, bNodeSocket * else { uiDefBut(gnode->block, LABEL, 0, sock->name, sock->locx+xoffset, sock->locy+1+yoffset, 72, NODE_DY, - NULL, 0, 31, 0, 0, ""); + NULL, 0, sizeof(sock->name), 0, 0, ""); } } @@ -1203,10 +1203,10 @@ static void node_composit_buts_image(uiLayout *layout, bContext *C, PointerRNA * /* don't use iuser->framenr directly because it may not be updated if auto-refresh is off */ Scene *scene= CTX_data_scene(C); ImageUser *iuser= node->storage; - char tstr[32]; + char numstr[32]; const int framenr= BKE_image_user_get_frame(iuser, CFRA, 0); - BLI_snprintf(tstr, sizeof(tstr), "Frame: %d", framenr); - uiItemL(layout, tstr, ICON_NONE); + BLI_snprintf(numstr, sizeof(numstr), "Frame: %d", framenr); + uiItemL(layout, numstr, ICON_NONE); } if (ELEM(source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE)) { @@ -1472,6 +1472,18 @@ static void node_composit_buts_splitviewer(uiLayout *layout, bContext *UNUSED(C) uiItemR(col, ptr, "factor", 0, NULL, ICON_NONE); } +static void node_composit_buts_double_edge_mask(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) +{ + uiLayout *col; + + col= uiLayoutColumn(layout, 0); + + uiItemL(col, "Inner Edge:", ICON_NONE); + uiItemR(col, ptr, "inner_mode", 0, "", ICON_NONE); + uiItemL(col, "Buffer Edge:", ICON_NONE); + uiItemR(col, ptr, "edge_mode", 0, "", ICON_NONE); +} + static void node_composit_buts_map_value(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) { uiLayout *sub, *col; @@ -1926,6 +1938,9 @@ static void node_composit_set_butfunc(bNodeType *ntype) case CMP_NODE_ID_MASK: ntype->uifunc= node_composit_buts_id_mask; break; + case CMP_NODE_DOUBLEEDGEMASK: + ntype->uifunc= node_composit_buts_double_edge_mask; + break; case CMP_NODE_MATH: ntype->uifunc= node_buts_math; break; @@ -2264,211 +2279,6 @@ void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode, int color_manage) } } -void draw_nodespace_color_info(ARegion *ar, int color_manage, int channels, int x, int y, const char cp[4], const float fp[4]) -{ - char str[256]; - float dx= 6; - /* text colors */ - /* XXX colored text not allowed in Blender UI */ - #if 0 - unsigned char red[3] = {255, 50, 50}; - unsigned char green[3] = {0, 255, 0}; - unsigned char blue[3] = {100, 100, 255}; - #else - unsigned char red[3] = {255, 255, 255}; - unsigned char green[3] = {255, 255, 255}; - unsigned char blue[3] = {255, 255, 255}; - #endif - float hue=0, sat=0, val=0, lum=0, u=0, v=0; - float col[4], finalcol[4]; - - glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); - glEnable(GL_BLEND); - - /* noisy, high contrast make impossible to read if lower alpha is used. */ - glColor4ub(0, 0, 0, 190); - glRecti(0.0, 0.0, ar->winrct.xmax - ar->winrct.xmin + 1, 20); - glDisable(GL_BLEND); - - BLF_size(blf_mono_font, 11, 72); - - glColor3ub(255, 255, 255); - sprintf(str, "X:%-4d Y:%-4d |", x, y); - // UI_DrawString(6, 6, str); // works ok but fixed width is nicer. - BLF_position(blf_mono_font, dx, 6, 0); - BLF_draw_ascii(blf_mono_font, str, sizeof(str)); - dx += BLF_width(blf_mono_font, str); - - #if 0 /* XXX no Z value in compo backdrop atm */ - if(zp) { - glColor3ub(255, 255, 255); - sprintf(str, " Z:%-.4f |", 0.5f+0.5f*(((float)*zp)/(float)0x7fffffff)); - BLF_position(blf_mono_font, dx, 6, 0); - BLF_draw_ascii(blf_mono_font, str, sizeof(str)); - dx += BLF_width(blf_mono_font, str); - } - if(zpf) { - glColor3ub(255, 255, 255); - sprintf(str, " Z:%-.3f |", *zpf); - BLF_position(blf_mono_font, dx, 6, 0); - BLF_draw_ascii(blf_mono_font, str, sizeof(str)); - dx += BLF_width(blf_mono_font, str); - } - #endif - - if(channels >= 3) { - glColor3ubv(red); - if (fp) - sprintf(str, " R:%-.4f", fp[0]); - else if (cp) - sprintf(str, " R:%-3d", cp[0]); - else - sprintf(str, " R:-"); - BLF_position(blf_mono_font, dx, 6, 0); - BLF_draw_ascii(blf_mono_font, str, sizeof(str)); - dx += BLF_width(blf_mono_font, str); - - glColor3ubv(green); - if (fp) - sprintf(str, " G:%-.4f", fp[1]); - else if (cp) - sprintf(str, " G:%-3d", cp[1]); - else - sprintf(str, " G:-"); - BLF_position(blf_mono_font, dx, 6, 0); - BLF_draw_ascii(blf_mono_font, str, sizeof(str)); - dx += BLF_width(blf_mono_font, str); - - glColor3ubv(blue); - if (fp) - sprintf(str, " B:%-.4f", fp[2]); - else if (cp) - sprintf(str, " B:%-3d", cp[2]); - else - sprintf(str, " B:-"); - BLF_position(blf_mono_font, dx, 6, 0); - BLF_draw_ascii(blf_mono_font, str, sizeof(str)); - dx += BLF_width(blf_mono_font, str); - - if(channels == 4) { - glColor3ub(255, 255, 255); - if (fp) - sprintf(str, " A:%-.4f", fp[3]); - else if (cp) - sprintf(str, " A:%-3d", cp[3]); - else - sprintf(str, "- "); - BLF_position(blf_mono_font, dx, 6, 0); - BLF_draw_ascii(blf_mono_font, str, sizeof(str)); - dx += BLF_width(blf_mono_font, str); - } - } - - /* color rectangle */ - if (channels==1) { - if (fp) - col[0] = col[1] = col[2] = fp[0]; - else if (cp) - col[0] = col[1] = col[2] = (float)cp[0]/255.0f; - else - col[0] = col[1] = col[2] = 0.0f; - } - else if (channels==3) { - if (fp) - copy_v3_v3(col, fp); - else if (cp) { - col[0] = (float)cp[0]/255.0f; - col[1] = (float)cp[1]/255.0f; - col[2] = (float)cp[2]/255.0f; - } - else - zero_v3(col); - } - else if (channels==4) { - if (fp) - copy_v4_v4(col, fp); - else if (cp) { - col[0] = (float)cp[0]/255.0f; - col[1] = (float)cp[1]/255.0f; - col[2] = (float)cp[2]/255.0f; - col[3] = (float)cp[3]/255.0f; - } - else - zero_v4(col); - } - if (color_manage) { - linearrgb_to_srgb_v3_v3(finalcol, col); - finalcol[3] = col[3]; - } - else { - copy_v4_v4(finalcol, col); - } - glDisable(GL_BLEND); - glColor3fv(finalcol); - dx += 5; - glBegin(GL_QUADS); - glVertex2f(dx, 3); - glVertex2f(dx, 17); - glVertex2f(dx+30, 17); - glVertex2f(dx+30, 3); - glEnd(); - dx += 35; - - glColor3ub(255, 255, 255); - if(channels == 1) { - if (fp) { - rgb_to_hsv(fp[0], fp[0], fp[0], &hue, &sat, &val); - rgb_to_yuv(fp[0], fp[0], fp[0], &lum, &u, &v); - } - else if (cp) { - rgb_to_hsv((float)cp[0]/255.0f, (float)cp[0]/255.0f, (float)cp[0]/255.0f, &hue, &sat, &val); - rgb_to_yuv((float)cp[0]/255.0f, (float)cp[0]/255.0f, (float)cp[0]/255.0f, &lum, &u, &v); - } - - sprintf(str, "V:%-.4f", val); - BLF_position(blf_mono_font, dx, 6, 0); - BLF_draw_ascii(blf_mono_font, str, sizeof(str)); - dx += BLF_width(blf_mono_font, str); - - sprintf(str, " L:%-.4f", lum); - BLF_position(blf_mono_font, dx, 6, 0); - BLF_draw_ascii(blf_mono_font, str, sizeof(str)); - dx += BLF_width(blf_mono_font, str); - } - else if(channels >= 3) { - if (fp) { - rgb_to_hsv(fp[0], fp[1], fp[2], &hue, &sat, &val); - rgb_to_yuv(fp[0], fp[1], fp[2], &lum, &u, &v); - } - else if (cp) { - rgb_to_hsv((float)cp[0]/255.0f, (float)cp[1]/255.0f, (float)cp[2]/255.0f, &hue, &sat, &val); - rgb_to_yuv((float)cp[0]/255.0f, (float)cp[1]/255.0f, (float)cp[2]/255.0f, &lum, &u, &v); - } - - sprintf(str, "H:%-.4f", hue); - BLF_position(blf_mono_font, dx, 6, 0); - BLF_draw_ascii(blf_mono_font, str, sizeof(str)); - dx += BLF_width(blf_mono_font, str); - - sprintf(str, " S:%-.4f", sat); - BLF_position(blf_mono_font, dx, 6, 0); - BLF_draw_ascii(blf_mono_font, str, sizeof(str)); - dx += BLF_width(blf_mono_font, str); - - sprintf(str, " V:%-.4f", val); - BLF_position(blf_mono_font, dx, 6, 0); - BLF_draw_ascii(blf_mono_font, str, sizeof(str)); - dx += BLF_width(blf_mono_font, str); - - sprintf(str, " L:%-.4f", lum); - BLF_position(blf_mono_font, dx, 6, 0); - BLF_draw_ascii(blf_mono_font, str, sizeof(str)); - dx += BLF_width(blf_mono_font, str); - } - - (void)dx; -} - #if 0 /* note: needs to be userpref or opengl profile option */ static void draw_nodespace_back_tex(ScrArea *sa, SpaceNode *snode) diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index da7f22b2030..a82ea9e9046 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -195,18 +195,18 @@ static void node_scaling_widget(int color_id, float aspect, float xmin, float ym static void node_uiblocks_init(const bContext *C, bNodeTree *ntree) { bNode *node; - char str[32]; + char uiblockstr[32]; /* add node uiBlocks in drawing order - prevents events going to overlapping nodes */ - for(node= ntree->nodes.first; node; node=node->next) { - /* ui block */ - sprintf(str, "node buttons %p", (void *)node); - node->block= uiBeginBlock(C, CTX_wm_region(C), str, UI_EMBOSS); - uiBlockSetHandleFunc(node->block, do_node_internal_buttons, node); - - /* this cancels events for background nodes */ - uiBlockSetFlag(node->block, UI_BLOCK_CLIP_EVENTS); + for (node= ntree->nodes.first; node; node= node->next) { + /* ui block */ + BLI_snprintf(uiblockstr, sizeof(uiblockstr), "node buttons %p", (void *)node); + node->block= uiBeginBlock(C, CTX_wm_region(C), uiblockstr, UI_EMBOSS); + uiBlockSetHandleFunc(node->block, do_node_internal_buttons, node); + + /* this cancels events for background nodes */ + uiBlockSetFlag(node->block, UI_BLOCK_CLIP_EVENTS); } } @@ -673,7 +673,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN BLI_strncpy(showname, nodeLabel(node), sizeof(showname)); //if(node->flag & NODE_MUTED) - // sprintf(showname, "[%s]", showname); + // BLI_snprintf(showname, sizeof(showname), "[%s]", showname); // XXX - dont print into self! 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, ""); @@ -835,7 +835,7 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b BLI_strncpy(showname, nodeLabel(node), sizeof(showname)); //if(node->flag & NODE_MUTED) - // sprintf(showname, "[%s]", showname); + // BLI_snprintf(showname, sizeof(showname), "[%s]", showname); // XXX - dont print into self! 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, ""); diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 20fb385efdd..5beac4ea212 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -71,6 +71,7 @@ #include "IMB_imbuf_types.h" #include "ED_node.h" +#include "ED_image.h" #include "ED_screen.h" #include "ED_space_api.h" #include "ED_render.h" @@ -751,14 +752,14 @@ static int edit_node_poll(bContext *C) static void edit_node_properties(wmOperatorType *ot) { /* XXX could node be a context pointer? */ - RNA_def_string(ot->srna, "node", "", 32, "Node", ""); + RNA_def_string(ot->srna, "node", "", MAX_NAME, "Node", ""); RNA_def_int(ot->srna, "socket", 0, 0, MAX_SOCKET, "Socket", "", 0, MAX_SOCKET); RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, "Socket Side", ""); } static int edit_node_invoke_properties(bContext *C, wmOperator *op) { - if (!RNA_property_is_set(op->ptr, "node")) { + if (!RNA_struct_property_is_set(op->ptr, "node")) { bNode *node= CTX_data_pointer_get_type(C, "node", &RNA_Node).data; if (!node) return 0; @@ -766,10 +767,10 @@ static int edit_node_invoke_properties(bContext *C, wmOperator *op) RNA_string_set(op->ptr, "node", node->name); } - if (!RNA_property_is_set(op->ptr, "in_out")) + if (!RNA_struct_property_is_set(op->ptr, "in_out")) RNA_enum_set(op->ptr, "in_out", SOCK_IN); - if (!RNA_property_is_set(op->ptr, "socket")) + if (!RNA_struct_property_is_set(op->ptr, "socket")) RNA_int_set(op->ptr, "socket", 0); return 1; @@ -779,7 +780,7 @@ static void edit_node_properties_get(wmOperator *op, bNodeTree *ntree, bNode **r { bNode *node; bNodeSocket *sock=NULL; - char nodename[32]; + char nodename[MAX_NAME]; int sockindex; int in_out; @@ -889,20 +890,20 @@ static int node_group_socket_add_exec(bContext *C, wmOperator *op) { SpaceNode *snode = CTX_wm_space_node(C); int in_out= -1; - char name[32]= ""; + char name[MAX_NAME]= ""; int type= SOCK_FLOAT; bNodeTree *ngroup= snode->edittree; /* bNodeSocket *sock; */ /* UNUSED */ ED_preview_kill_jobs(C); - if (RNA_property_is_set(op->ptr, "name")) + if (RNA_struct_property_is_set(op->ptr, "name")) RNA_string_get(op->ptr, "name", name); - if (RNA_property_is_set(op->ptr, "type")) + if (RNA_struct_property_is_set(op->ptr, "type")) type = RNA_enum_get(op->ptr, "type"); - if (RNA_property_is_set(op->ptr, "in_out")) + if (RNA_struct_property_is_set(op->ptr, "in_out")) in_out = RNA_enum_get(op->ptr, "in_out"); else return OPERATOR_CANCELLED; @@ -932,7 +933,7 @@ void NODE_OT_group_socket_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, "Socket Type", "Input or Output"); - RNA_def_string(ot->srna, "name", "", 32, "Name", "Group socket name"); + RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Group socket name"); RNA_def_enum(ot->srna, "type", node_socket_type_items, SOCK_FLOAT, "Type", "Type of the group socket"); } @@ -948,12 +949,12 @@ static int node_group_socket_remove_exec(bContext *C, wmOperator *op) ED_preview_kill_jobs(C); - if (RNA_property_is_set(op->ptr, "index")) + if (RNA_struct_property_is_set(op->ptr, "index")) index = RNA_int_get(op->ptr, "index"); else return OPERATOR_CANCELLED; - if (RNA_property_is_set(op->ptr, "in_out")) + if (RNA_struct_property_is_set(op->ptr, "in_out")) in_out = RNA_enum_get(op->ptr, "in_out"); else return OPERATOR_CANCELLED; @@ -999,12 +1000,12 @@ static int node_group_socket_move_up_exec(bContext *C, wmOperator *op) ED_preview_kill_jobs(C); - if (RNA_property_is_set(op->ptr, "index")) + if (RNA_struct_property_is_set(op->ptr, "index")) index = RNA_int_get(op->ptr, "index"); else return OPERATOR_CANCELLED; - if (RNA_property_is_set(op->ptr, "in_out")) + if (RNA_struct_property_is_set(op->ptr, "in_out")) in_out = RNA_enum_get(op->ptr, "in_out"); else return OPERATOR_CANCELLED; @@ -1069,12 +1070,12 @@ static int node_group_socket_move_down_exec(bContext *C, wmOperator *op) ED_preview_kill_jobs(C); - if (RNA_property_is_set(op->ptr, "index")) + if (RNA_struct_property_is_set(op->ptr, "index")) index = RNA_int_get(op->ptr, "index"); else return OPERATOR_CANCELLED; - if (RNA_property_is_set(op->ptr, "in_out")) + if (RNA_struct_property_is_set(op->ptr, "in_out")) in_out = RNA_enum_get(op->ptr, "in_out"); else return OPERATOR_CANCELLED; @@ -1343,8 +1344,10 @@ static void sample_draw(const bContext *C, ARegion *ar, void *arg_info) { ImageSampleInfo *info= arg_info; - draw_nodespace_color_info(ar, (CTX_data_scene(C)->r.color_mgt_flag & R_COLOR_MANAGEMENT), info->channels, - info->x, info->y, info->col, info->colf); + ED_image_draw_info(ar, (CTX_data_scene(C)->r.color_mgt_flag & R_COLOR_MANAGEMENT), info->channels, + info->x, info->y, info->col, info->colf, + NULL, NULL /* zbuf - unused for nodes */ + ); } static void sample_apply(bContext *C, wmOperator *op, wmEvent *event) @@ -1926,7 +1929,7 @@ static int sort_nodes_locx(void *a, void *b) return 0; } -static int socket_is_available(bNodeTree *ntree, bNodeSocket *sock, int allow_used) +static int socket_is_available(bNodeTree *UNUSED(ntree), bNodeSocket *sock, int allow_used) { if (nodeSocketIsHidden(sock)) return 0; @@ -3435,7 +3438,7 @@ static int node_add_file_exec(bContext *C, wmOperator *op) ntemp.type = -1; /* check input variables */ - if (RNA_property_is_set(op->ptr, "filepath")) + if (RNA_struct_property_is_set(op->ptr, "filepath")) { char path[FILE_MAX]; RNA_string_get(op->ptr, "filepath", path); @@ -3449,9 +3452,9 @@ static int node_add_file_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } } - else if(RNA_property_is_set(op->ptr, "name")) + else if(RNA_struct_property_is_set(op->ptr, "name")) { - char name[32]; + char name[MAX_ID_NAME-2]; RNA_string_get(op->ptr, "name", name); ima= (Image *)find_id("IM", name); @@ -3495,7 +3498,7 @@ static int node_add_file_invoke(bContext *C, wmOperator *op, wmEvent *event) UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &snode->mx, &snode->my); - if (RNA_property_is_set(op->ptr, "filepath") || RNA_property_is_set(op->ptr, "name")) + if (RNA_struct_property_is_set(op->ptr, "filepath") || RNA_struct_property_is_set(op->ptr, "name")) return node_add_file_exec(C, op); else return WM_operator_filesel(C, op, event); @@ -3517,7 +3520,7 @@ void NODE_OT_add_file(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH); //XXX TODO, relative_path - RNA_def_string(ot->srna, "name", "Image", 24, "Name", "Datablock name to assign"); + RNA_def_string(ot->srna, "name", "Image", MAX_ID_NAME-2, "Name", "Datablock name to assign"); } /********************** New node tree operator *********************/ @@ -3534,12 +3537,12 @@ static int new_node_tree_exec(bContext *C, wmOperator *op) /* retrieve state */ snode= CTX_wm_space_node(C); - if (RNA_property_is_set(op->ptr, "type")) + if (RNA_struct_property_is_set(op->ptr, "type")) treetype = RNA_enum_get(op->ptr, "type"); else treetype = snode->treetype; - if (RNA_property_is_set(op->ptr, "name")) + if (RNA_struct_property_is_set(op->ptr, "name")) RNA_string_get(op->ptr, "name", treename); ntree = ntreeAddTree(treename, treetype, 0); diff --git a/source/blender/editors/space_node/node_ops.c b/source/blender/editors/space_node/node_ops.c index b5c435b50e8..b71776f4266 100644 --- a/source/blender/editors/space_node/node_ops.c +++ b/source/blender/editors/space_node/node_ops.c @@ -34,6 +34,8 @@ #include "BKE_context.h" +#include "BLI_utildefines.h" + #include "ED_node.h" #include "ED_screen.h" #include "ED_transform.h" @@ -138,12 +140,14 @@ void node_keymap(struct wmKeyConfig *keyconf) /* mouse select in nodes used to be both keys, but perhaps this should be reduced? * NOTE: mouse-clicks on left-mouse will fall through to allow transform-tweak, but also link/resize */ - WM_keymap_add_item(keymap, "NODE_OT_select", ACTIONMOUSE, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "NODE_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); + kmi = WM_keymap_add_item(keymap, "NODE_OT_select", ACTIONMOUSE, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); + kmi = WM_keymap_add_item(keymap, "NODE_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); kmi= WM_keymap_add_item(keymap, "NODE_OT_select", ACTIONMOUSE, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_boolean_set(kmi->ptr, "extend", TRUE); kmi= WM_keymap_add_item(keymap, "NODE_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_boolean_set(kmi->ptr, "extend", TRUE); RNA_boolean_set(WM_keymap_add_item(keymap, "NODE_OT_select_border", EVT_TWEAK_S, KM_ANY, 0, 0)->ptr, "tweak", 1); /* each of these falls through if not handled... */ diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index f3bab197b3c..f8abfb6f4c3 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -628,7 +628,7 @@ static uiBlock *operator_search_menu(bContext *C, ARegion *ar, void *arg_kmi) /* 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, UI_UNIT_Y, 0, 0, ""); + but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, 150, UI_UNIT_Y, 0, 0, ""); uiButSetSearchFunc(but, operator_search_cb, arg_kmi, operator_call_cb, ot); uiBoundsBlock(block, 6); @@ -1649,7 +1649,7 @@ void draw_outliner(const bContext *C) /* draw outliner stuff (background, hierachy lines and names) */ outliner_back(ar); - block= uiBeginBlock(C, ar, "outliner buttons", UI_EMBOSS); + block= uiBeginBlock(C, ar, __func__, UI_EMBOSS); outliner_draw_tree((bContext *)C, block, scene, ar, soops); if(ELEM(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF)) { diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 9b1bd1d7b31..0ccbf9127c6 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -749,7 +749,7 @@ static void outliner_find_panel(Scene *UNUSED(scene), ARegion *ar, SpaceOops *so TreeElement *last_find; TreeStoreElem *tselem; int ytop, xdelta, prevFound=0; - char name[32]; + char name[sizeof(soops->search_string)]; /* get last found tree-element based on stored search_tse */ last_find= outliner_find_tse(soops, &soops->search_tse); @@ -803,7 +803,7 @@ static void outliner_find_panel(Scene *UNUSED(scene), ARegion *ar, SpaceOops *so /* store selection */ soops->search_tse= *tselem; - BLI_strncpy(soops->search_string, name, 33); + BLI_strncpy(soops->search_string, name, sizeof(soops->search_string)); soops->search_flags= flags; /* redraw */ diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 084e48c0d6e..33e0136b6bb 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -57,7 +57,7 @@ #include "BLI_utildefines.h" #include "BLI_math_base.h" -#if defined WIN32 && !defined _LIBC +#if defined WIN32 && !defined _LIBC || defined __sun # include "BLI_fnmatch.h" /* use fnmatch included in blenlib */ #else # ifndef _GNU_SOURCE @@ -1342,7 +1342,7 @@ static int outliner_filter_has_name(TreeElement *te, const char *name, int flags } else { char fn_name[sizeof(((struct SpaceOops *)NULL)->search_string) + 2]; - sprintf(fn_name, "*%s*", name); + BLI_snprintf(fn_name, sizeof(fn_name), "*%s*", name); found= fnmatch(fn_name, te->name, fn_flag)==0; } return found; diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index 458e6453b77..f1d3d65559d 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -130,7 +130,7 @@ static void sequencer_generic_invoke_xy__internal(bContext *C, wmOperator *op, w RNA_int_set(op->ptr, "frame_start", (int)mval_v2d[0]); - if ((flag & SEQPROP_ENDFRAME) && RNA_property_is_set(op->ptr, "frame_end")==0) + if ((flag & SEQPROP_ENDFRAME) && RNA_struct_property_is_set(op->ptr, "frame_end")==0) RNA_int_set(op->ptr, "frame_end", (int)mval_v2d[0] + 25); // XXX arbitary but ok for now. if (!(flag & SEQPROP_NOPATHS)) { @@ -264,7 +264,7 @@ static int sequencer_add_scene_strip_invoke(bContext *C, wmOperator *op, wmEvent return OPERATOR_CANCELLED; } - if(!RNA_property_is_set(op->ptr, "scene")) + if(!RNA_struct_property_is_set(op->ptr, "scene")) return WM_enum_search_invoke(C, op, event); sequencer_generic_invoke_xy__internal(C, op, event, 0); @@ -371,7 +371,7 @@ static int sequencer_add_movie_strip_invoke(bContext *C, wmOperator *op, wmEvent } /* This is for drag and drop */ - if(RNA_collection_length(op->ptr, "files") || RNA_property_is_set(op->ptr, "filepath")) { + if(RNA_collection_length(op->ptr, "files") || RNA_struct_property_is_set(op->ptr, "filepath")) { sequencer_generic_invoke_xy__internal(C, op, event, SEQPROP_NOPATHS); return sequencer_add_movie_strip_exec(C, op); } @@ -423,7 +423,7 @@ static int sequencer_add_sound_strip_invoke(bContext *C, wmOperator *op, wmEvent } /* This is for drag and drop */ - if(RNA_collection_length(op->ptr, "files") || RNA_property_is_set(op->ptr, "filepath")) { + if(RNA_collection_length(op->ptr, "files") || RNA_struct_property_is_set(op->ptr, "filepath")) { sequencer_generic_invoke_xy__internal(C, op, event, SEQPROP_NOPATHS); return sequencer_add_sound_strip_exec(C, op); } @@ -650,7 +650,7 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op) /* an unset channel is a special case where we automatically go above * the other strips. */ - if(!RNA_property_is_set(op->ptr, "channel")) { + if(!RNA_struct_property_is_set(op->ptr, "channel")) { if(seq->seq1) { int chan= MAX3( seq->seq1 ? seq->seq1->machine : 0, seq->seq2 ? seq->seq2->machine : 0, @@ -686,7 +686,7 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op) /* add color */ static int sequencer_add_effect_strip_invoke(bContext *C, wmOperator *op, wmEvent *event) { - short is_type_set= RNA_property_is_set(op->ptr, "type"); + short is_type_set= RNA_struct_property_is_set(op->ptr, "type"); int type= -1; int prop_flag= SEQPROP_ENDFRAME; diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 2b59a02deae..176ffd91e3b 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -328,7 +328,7 @@ static void draw_seq_handle(View2D *v2d, Sequence *seq, float pixelx, short dire float x1, x2, y1, y2; float handsize; float minhandle, maxhandle; - char str[32]; + char numstr[32]; unsigned int whichsel=0; x1= seq->startdisp; @@ -392,15 +392,15 @@ static void draw_seq_handle(View2D *v2d, Sequence *seq, float pixelx, short dire if(G.moving || (seq->flag & whichsel)) { const char col[4]= {255, 255, 255, 255}; if (direction == SEQ_LEFTHANDLE) { - sprintf(str, "%d", seq->startdisp); + BLI_snprintf(numstr, sizeof(numstr),"%d", seq->startdisp); x1= rx1; y1 -= 0.45f; } else { - sprintf(str, "%d", seq->enddisp - 1); + BLI_snprintf(numstr, sizeof(numstr), "%d", seq->enddisp - 1); x1= x2 - handsize*0.75f; y1= y2 + 0.05f; } - UI_view2d_text_cache_add(v2d, x1, y1, str, col); + UI_view2d_text_cache_add(v2d, x1, y1, numstr, col); } } diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h index 4359e3a6652..812bdbc678f 100644 --- a/source/blender/editors/space_sequencer/sequencer_intern.h +++ b/source/blender/editors/space_sequencer/sequencer_intern.h @@ -122,7 +122,7 @@ void SEQUENCER_OT_rebuild_proxy(struct wmOperatorType *ot); void SEQUENCER_OT_view_all_preview(struct wmOperatorType *ot); /* sequencer_select.c */ -void SEQUENCER_OT_select_all_toggle(struct wmOperatorType *ot); +void SEQUENCER_OT_select_all(struct wmOperatorType *ot); void SEQUENCER_OT_select(struct wmOperatorType *ot); void SEQUENCER_OT_select_more(struct wmOperatorType *ot); void SEQUENCER_OT_select_less(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c index 07ca56cde8b..a6d8b6c2612 100644 --- a/source/blender/editors/space_sequencer/sequencer_ops.c +++ b/source/blender/editors/space_sequencer/sequencer_ops.c @@ -92,8 +92,7 @@ void sequencer_operatortypes(void) WM_operatortype_append(SEQUENCER_OT_change_path); /* sequencer_select.c */ - WM_operatortype_append(SEQUENCER_OT_select_all_toggle); - WM_operatortype_append(SEQUENCER_OT_select_inverse); + WM_operatortype_append(SEQUENCER_OT_select_all); WM_operatortype_append(SEQUENCER_OT_select); WM_operatortype_append(SEQUENCER_OT_select_more); WM_operatortype_append(SEQUENCER_OT_select_less); @@ -133,17 +132,23 @@ void sequencer_keymap(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "SEQUENCER_OT_properties", NKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "SEQUENCER_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "SEQUENCER_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select_all", AKEY, KM_PRESS, 0, 0); + RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE); + kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0); + RNA_enum_set(kmi->ptr, "action", SEL_INVERT); RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_cut", KKEY, KM_PRESS, 0, 0)->ptr, "type", SEQ_CUT_SOFT); RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_cut", KKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", SEQ_CUT_HARD); - WM_keymap_add_item(keymap, "SEQUENCER_OT_mute", HKEY, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_mute", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1); + kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_mute", HKEY, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "unselected", FALSE); + kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_mute", HKEY, KM_PRESS, KM_SHIFT, 0); + RNA_boolean_set(kmi->ptr, "unselected", TRUE); - WM_keymap_add_item(keymap, "SEQUENCER_OT_unmute", HKEY, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_unmute", HKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0)->ptr, "unselected", 1); + kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_unmute", HKEY, KM_PRESS, KM_ALT, 0); + RNA_boolean_set(kmi->ptr, "unselected", FALSE); + kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_unmute", HKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0); + RNA_boolean_set(kmi->ptr, "unselected", TRUE); WM_keymap_add_item(keymap, "SEQUENCER_OT_lock", LKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_unlock", LKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0); @@ -193,8 +198,16 @@ void sequencer_keymap(wmKeyConfig *keyconf) } /* Mouse selection, a bit verbose :/ */ - WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1); + kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "linked_handle", FALSE); + RNA_boolean_set(kmi->ptr, "left_right", FALSE); + RNA_boolean_set(kmi->ptr, "linked_time", FALSE); + kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0); + RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "linked_handle", FALSE); + RNA_boolean_set(kmi->ptr, "left_right", FALSE); + RNA_boolean_set(kmi->ptr, "linked_time", FALSE); /* 2.4x method, now use Alt for handles and select the side based on which handle was selected */ @@ -221,21 +234,31 @@ void sequencer_keymap(wmKeyConfig *keyconf) */ /* 2.5 method, Alt and use selected handle */ - RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "linked_handle", 1); + kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "linked_handle", TRUE); + RNA_boolean_set(kmi->ptr, "left_right", FALSE); + RNA_boolean_set(kmi->ptr, "linked_time", FALSE); kmi= WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "extend", 1); - RNA_boolean_set(kmi->ptr, "linked_handle", 1); + RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "linked_handle", TRUE); + RNA_boolean_set(kmi->ptr, "left_right", FALSE); + RNA_boolean_set(kmi->ptr, "linked_time", FALSE); /* match action editor */ kmi= WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "left_right", 1); /* grr, these conflict - only use left_right if not over an active seq */ - RNA_boolean_set(kmi->ptr, "linked_time", 1); + RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "linked_handle", FALSE); + RNA_boolean_set(kmi->ptr, "left_right", TRUE); /* grr, these conflict - only use left_right if not over an active seq */ + RNA_boolean_set(kmi->ptr, "linked_time", TRUE); /* adjusted since 2.4 */ kmi= WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "extend", 1); - RNA_boolean_set(kmi->ptr, "linked_time", 1); + RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "linked_handle", FALSE); + RNA_boolean_set(kmi->ptr, "left_right", FALSE); + RNA_boolean_set(kmi->ptr, "linked_time", TRUE); WM_keymap_add_item(keymap, "SEQUENCER_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0); diff --git a/source/blender/editors/space_sequencer/sequencer_scopes.c b/source/blender/editors/space_sequencer/sequencer_scopes.c index 8c189d96062..2bb40ce51f4 100644 --- a/source/blender/editors/space_sequencer/sequencer_scopes.c +++ b/source/blender/editors/space_sequencer/sequencer_scopes.c @@ -29,16 +29,17 @@ #include <math.h> #include <string.h> +#include "BLI_math_color.h" #include "BLI_utildefines.h" - - #include "IMB_imbuf_types.h" #include "IMB_imbuf.h" #include "sequencer_intern.h" -static void rgb_to_yuv(float rgb[3], float yuv[3]) +/* XXX, why is this function better then BLI_math version? + * only difference is it does some normalize after, need to double check on this - campbell */ +static void rgb_to_yuv_normalized(const float rgb[3], float yuv[3]) { yuv[0]= 0.299f*rgb[0] + 0.587f*rgb[1] + 0.114f*rgb[2]; yuv[1]= 0.492f*(rgb[2] - yuv[0]); @@ -169,10 +170,7 @@ static struct ImBuf *make_waveform_view_from_ibuf_byte(struct ImBuf * ibuf) for (x = 0; x < ibuf->x; x++) { unsigned char * rgb = src + 4 * (ibuf->x * y + x); - float v = 1.0 * - ( 0.299*rgb[0] - + 0.587*rgb[1] - + 0.114*rgb[2]) / 255.0; + float v = (float)rgb_to_luma_byte(rgb) / 255.0; unsigned char * p = tgt; p += 4 * (w * ((int) (v * (h - 3)) + 1) + x + 1); @@ -215,10 +213,7 @@ static struct ImBuf *make_waveform_view_from_ibuf_float(struct ImBuf * ibuf) for (x = 0; x < ibuf->x; x++) { float * rgb = src + 4 * (ibuf->x * y + x); - float v = 1.0f * - ( 0.299f*rgb[0] - + 0.587f*rgb[1] - + 0.114f*rgb[2]); + float v = rgb_to_luma(rgb); unsigned char * p = tgt; CLAMP(v, 0.0f, 1.0f); @@ -583,7 +578,7 @@ static void vectorscope_put_cross(unsigned char r, unsigned char g, rgb[0]= (float)r/255.0f; rgb[1]= (float)g/255.0f; rgb[2]= (float)b/255.0f; - rgb_to_yuv(rgb, yuv); + rgb_to_yuv_normalized(rgb, yuv); p = tgt + 4 * (w * (int) ((yuv[2] * (h - 3) + 1)) + (int) ((yuv[1] * (w - 3) + 1))); @@ -634,7 +629,7 @@ static struct ImBuf *make_vectorscope_view_from_ibuf_byte(struct ImBuf * ibuf) rgb[0]= (float)src1[0]/255.0f; rgb[1]= (float)src1[1]/255.0f; rgb[2]= (float)src1[2]/255.0f; - rgb_to_yuv(rgb, yuv); + rgb_to_yuv_normalized(rgb, yuv); p = tgt + 4 * (w * (int) ((yuv[2] * (h - 3) + 1)) + (int) ((yuv[1] * (w - 3) + 1))); @@ -684,7 +679,7 @@ static struct ImBuf *make_vectorscope_view_from_ibuf_float(struct ImBuf * ibuf) CLAMP(rgb[1], 0.0f, 1.0f); CLAMP(rgb[2], 0.0f, 1.0f); - rgb_to_yuv(rgb, yuv); + rgb_to_yuv_normalized(rgb, yuv); p = tgt + 4 * (w * (int) ((yuv[2] * (h - 3) + 1)) + (int) ((yuv[1] * (w - 3) + 1))); diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index 9eb900ed427..a6568950a01 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -179,8 +179,6 @@ static void UNUSED_FUNCTION(select_single_seq)(Scene *scene, Sequence *seq, int recurs_sel_seq(seq); } -// remove this function, replace with invert operator -//void swap_select_seq(Scene *scene) #if 0 static void select_neighbor_from_last(Scene *scene, int lr) { @@ -214,48 +212,65 @@ static void select_neighbor_from_last(Scene *scene, int lr) #endif /* (de)select operator */ -static int sequencer_deselect_exec(bContext *C, wmOperator *UNUSED(op)) +static int sequencer_de_select_all_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); + int action = RNA_enum_get(op->ptr, "action"); + + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); Sequence *seq; - int desel = 0; - for(seq= ed->seqbasep->first; seq; seq=seq->next) { - if(seq->flag & SEQ_ALLSEL) { - desel= 1; - break; + if (action == SEL_TOGGLE) { + action = SEL_SELECT; + for (seq = ed->seqbasep->first; seq; seq = seq->next) { + if (seq->flag & SEQ_ALLSEL) { + action = SEL_DESELECT; + break; + } } } - for(seq= ed->seqbasep->first; seq; seq=seq->next) { - if (desel) { - seq->flag &= ~SEQ_ALLSEL; - } - else { - seq->flag &= ~(SEQ_LEFTSEL+SEQ_RIGHTSEL); - seq->flag |= SELECT; + for (seq = ed->seqbasep->first; seq; seq = seq->next) { + switch (action) { + case SEL_SELECT: + seq->flag &= ~(SEQ_LEFTSEL + SEQ_RIGHTSEL); + seq->flag |= SELECT; + break; + case SEL_DESELECT: + seq->flag &= ~SEQ_ALLSEL; + break; + case SEL_INVERT: + if (seq->flag & SEQ_ALLSEL) { + seq->flag &= ~SEQ_ALLSEL; + } + else { + seq->flag &= ~(SEQ_LEFTSEL + SEQ_RIGHTSEL); + seq->flag |= SELECT; + } + break; } } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene); - + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER | NA_SELECTED, scene); + return OPERATOR_FINISHED; } -void SEQUENCER_OT_select_all_toggle(struct wmOperatorType *ot) +void SEQUENCER_OT_select_all(struct wmOperatorType *ot) { /* identifiers */ ot->name= "Select or Deselect All"; - ot->idname= "SEQUENCER_OT_select_all_toggle"; + ot->idname= "SEQUENCER_OT_select_all"; ot->description="Select or deselect all strips"; /* api callbacks */ - ot->exec= sequencer_deselect_exec; + ot->exec= sequencer_de_select_all_exec; ot->poll= sequencer_edit_poll; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + WM_operator_properties_select_all(ot); } diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 637c8fcdbcf..25b9c2f2864 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -75,7 +75,7 @@ static void text_font_end(SpaceText *UNUSED(st)) static int text_font_draw(SpaceText *UNUSED(st), int x, int y, char *str) { BLF_position(mono, x, y, 0); - BLF_draw(mono, str, 65535); /* XXX, use real length */ + BLF_draw(mono, str, BLF_DRAW_STR_DUMMY_MAX); return BLF_width(mono, str); } @@ -1766,7 +1766,7 @@ void draw_text_main(SpaceText *st, ARegion *ar) else UI_ThemeColor(TH_TEXT); - sprintf(linenr, "%*d", st->linenrs_tot, i + linecount + 1); + BLI_snprintf(linenr, sizeof(linenr), "%*d", st->linenrs_tot, i + linecount + 1); /* itoa(i + linecount + 1, linenr, 10); */ /* not ansi-c :/ */ text_font_draw(st, TXT_OFFSET - 7, y, linenr); diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 566659e0391..e8ad6e19fd4 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -276,7 +276,7 @@ static int text_open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) Text *text= CTX_data_edit_text(C); char *path= (text && text->name)? text->name: G.main->name; - if(RNA_property_is_set(op->ptr, "filepath")) + if(RNA_struct_property_is_set(op->ptr, "filepath")) return text_open_exec(C, op); text_open_init(C, op); @@ -534,7 +534,7 @@ static int text_save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even Text *text= CTX_data_edit_text(C); char *str; - if(RNA_property_is_set(op->ptr, "filepath")) + if(RNA_struct_property_is_set(op->ptr, "filepath")) return text_save_as_exec(C, op); if(text->name) @@ -2209,7 +2209,7 @@ static int text_scroll_invoke(bContext *C, wmOperator *op, wmEvent *event) SpaceText *st= CTX_wm_space_text(C); TextScroll *tsc; - if(RNA_property_is_set(op->ptr, "lines")) + if(RNA_struct_property_is_set(op->ptr, "lines")) return text_scroll_exec(C, op); tsc= MEM_callocN(sizeof(TextScroll), "TextScroll"); @@ -2289,7 +2289,7 @@ static int text_scroll_bar_invoke(bContext *C, wmOperator *op, wmEvent *event) const int *mval= event->mval; int zone= -1; - if(RNA_property_is_set(op->ptr, "lines")) + if(RNA_struct_property_is_set(op->ptr, "lines")) return text_scroll_exec(C, op); /* verify we are in the right zone */ @@ -2784,7 +2784,7 @@ static int text_insert_invoke(bContext *C, wmOperator *op, wmEvent *event) { int ret; - // if(!RNA_property_is_set(op->ptr, "text")) { /* always set from keymap XXX */ + // if(!RNA_struct_property_is_set(op->ptr, "text")) { /* always set from keymap XXX */ if(!RNA_string_length(op->ptr, "text")) { /* if alt/ctrl/super are pressed pass through */ if(event->ctrl || event->oskey) { diff --git a/source/blender/editors/space_view3d/drawanimviz.c b/source/blender/editors/space_view3d/drawanimviz.c index 1784d949761..638bf5b41a7 100644 --- a/source/blender/editors/space_view3d/drawanimviz.c +++ b/source/blender/editors/space_view3d/drawanimviz.c @@ -218,23 +218,23 @@ void draw_motion_path_instance(Scene *scene, col[3]= 255; for (i=0, mpv=mpv_start; i < len; i+=stepsize, mpv+=stepsize) { - char str[32]; + char numstr[32]; float co[3]; /* only draw framenum if several consecutive highlighted points don't occur on same point */ if (i == 0) { - sprintf(str, "%d", (i+sfra)); + sprintf(numstr, "%d", (i+sfra)); mul_v3_m4v3(co, ob->imat, mpv->co); - view3d_cached_text_draw_add(co, str, 0, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, col); + view3d_cached_text_draw_add(co, numstr, 0, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, col); } else if ((i > stepsize) && (i < len-stepsize)) { bMotionPathVert *mpvP = (mpv - stepsize); bMotionPathVert *mpvN = (mpv + stepsize); if ((equals_v3v3(mpv->co, mpvP->co)==0) || (equals_v3v3(mpv->co, mpvN->co)==0)) { - sprintf(str, "%d", (sfra+i)); + sprintf(numstr, "%d", (sfra+i)); mul_v3_m4v3(co, ob->imat, mpv->co); - view3d_cached_text_draw_add(co, str, 0, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, col); + view3d_cached_text_draw_add(co, numstr, 0, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, col); } } } @@ -293,11 +293,11 @@ void draw_motion_path_instance(Scene *scene, float mframe= (float)(sfra + i); if (BLI_dlrbTree_search_exact(&keys, compare_ak_cfraPtr, &mframe)) { - char str[32]; + char numstr[32]; - sprintf(str, "%d", (sfra+i)); + sprintf(numstr, "%d", (sfra+i)); mul_v3_m4v3(co, ob->imat, mpv->co); - view3d_cached_text_draw_add(co, str, 0, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, col); + view3d_cached_text_draw_add(co, numstr, 0, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, col); } } } diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index e0b1741b0d0..b1842578c20 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -547,7 +547,7 @@ static int draw_em_tf_mapped__set_draw(void *userData, int index) return draw_tface__set_draw_legacy(tface, data->has_mcol, matnr); } -static int wpaint__setSolidDrawOptions(void *userData, int index, int *drawSmooth_r) +static int wpaint__setSolidDrawOptions_material(void *userData, int index, int *drawSmooth_r) { Mesh *me = (Mesh*)userData; @@ -562,6 +562,16 @@ static int wpaint__setSolidDrawOptions(void *userData, int index, int *drawSmoot return 1; } +/* when face select is on, use face hidden flag */ +static int wpaint__setSolidDrawOptions_facemask(void *userData, int index, int *drawSmooth_r) +{ + Mesh *me = (Mesh*)userData; + MFace *mface = &me->mface[index]; + if (mface->flag & ME_HIDE) return 0; + *drawSmooth_r = 1; + return 1; +} + static void draw_mesh_text(Scene *scene, Object *ob, int glsl) { Mesh *me = ob->data; @@ -700,7 +710,7 @@ void draw_mesh_textured_old(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec } else if(draw_flags & DRAW_FACE_SELECT) { if(ob->mode & OB_MODE_WEIGHT_PAINT) - dm->drawMappedFaces(dm, wpaint__setSolidDrawOptions, GPU_enable_material, NULL, me, 1); + dm->drawMappedFaces(dm, wpaint__setSolidDrawOptions_facemask, GPU_enable_material, NULL, me, 1); else dm->drawMappedFacesTex(dm, me->mface ? draw_tface_mapped__set_draw : NULL, NULL, me); } @@ -857,7 +867,7 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *o /* weight paint mode exception */ int useColors= 1; - dm->drawMappedFaces(dm, wpaint__setSolidDrawOptions, + dm->drawMappedFaces(dm, wpaint__setSolidDrawOptions_material, GPU_enable_material, NULL, ob->data, useColors); } else { diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 1ee765522be..afe11cdd37f 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -2675,7 +2675,7 @@ static void draw_em_measure_stats(View3D *v3d, Object *ob, EditMesh *em, UnitSet EditFace *efa; float v1[3], v2[3], v3[3], v4[3], vmid[3]; float fvec[3]; - char val[32]; /* Stores the measurement display text here */ + char numstr[32]; /* Stores the measurement display text here */ const char *conv_float; /* Use a float conversion matching the grid size */ unsigned char col[4]= {0, 0, 0, 255}; /* color of the text to draw */ float area; /* area of the face */ @@ -2708,11 +2708,11 @@ static void draw_em_measure_stats(View3D *v3d, Object *ob, EditMesh *em, UnitSet mul_mat3_m4_v3(ob->obmat, v2); } if(unit->system) - bUnit_AsString(val, sizeof(val), len_v3v3(v1, v2)*unit->scale_length, 3, unit->system, B_UNIT_LENGTH, do_split, FALSE); + bUnit_AsString(numstr, sizeof(numstr), len_v3v3(v1, v2)*unit->scale_length, 3, unit->system, B_UNIT_LENGTH, do_split, FALSE); else - sprintf(val, conv_float, len_v3v3(v1, v2)); + sprintf(numstr, conv_float, len_v3v3(v1, v2)); - view3d_cached_text_draw_add(vmid, val, 0, V3D_CACHE_TEXT_ASCII, col); + view3d_cached_text_draw_add(vmid, numstr, 0, V3D_CACHE_TEXT_ASCII, col); } } } @@ -2742,11 +2742,11 @@ static void draw_em_measure_stats(View3D *v3d, Object *ob, EditMesh *em, UnitSet area = area_tri_v3(v1, v2, v3); if(unit->system) - bUnit_AsString(val, sizeof(val), area*unit->scale_length, 3, unit->system, B_UNIT_LENGTH, do_split, FALSE); // XXX should be B_UNIT_AREA + bUnit_AsString(numstr, sizeof(numstr), area*unit->scale_length, 3, unit->system, B_UNIT_LENGTH, do_split, FALSE); // XXX should be B_UNIT_AREA else - sprintf(val, conv_float, area); + sprintf(numstr, conv_float, area); - view3d_cached_text_draw_add(efa->cent, val, 0, V3D_CACHE_TEXT_ASCII, col); + view3d_cached_text_draw_add(efa->cent, numstr, 0, V3D_CACHE_TEXT_ASCII, col); } } } @@ -2780,31 +2780,31 @@ static void draw_em_measure_stats(View3D *v3d, Object *ob, EditMesh *em, UnitSet if( (e4->f & e1->f & SELECT) || (do_moving && (efa->v1->f & SELECT)) ) { /* Vec 1 */ - sprintf(val,"%.3g", RAD2DEGF(angle_v3v3v3(v4, v1, v2))); + sprintf(numstr,"%.3g", RAD2DEGF(angle_v3v3v3(v4, v1, v2))); interp_v3_v3v3(fvec, efa->cent, efa->v1->co, 0.8f); - view3d_cached_text_draw_add(fvec, val, 0, V3D_CACHE_TEXT_ASCII, col); + view3d_cached_text_draw_add(fvec, numstr, 0, V3D_CACHE_TEXT_ASCII, col); } if( (e1->f & e2->f & SELECT) || (do_moving && (efa->v2->f & SELECT)) ) { /* Vec 2 */ - sprintf(val,"%.3g", RAD2DEGF(angle_v3v3v3(v1, v2, v3))); + sprintf(numstr,"%.3g", RAD2DEGF(angle_v3v3v3(v1, v2, v3))); interp_v3_v3v3(fvec, efa->cent, efa->v2->co, 0.8f); - view3d_cached_text_draw_add(fvec, val, 0, V3D_CACHE_TEXT_ASCII, col); + view3d_cached_text_draw_add(fvec, numstr, 0, V3D_CACHE_TEXT_ASCII, col); } if( (e2->f & e3->f & SELECT) || (do_moving && (efa->v3->f & SELECT)) ) { /* Vec 3 */ if(efa->v4) - sprintf(val,"%.3g", RAD2DEGF(angle_v3v3v3(v2, v3, v4))); + sprintf(numstr,"%.3g", RAD2DEGF(angle_v3v3v3(v2, v3, v4))); else - sprintf(val,"%.3g", RAD2DEGF(angle_v3v3v3(v2, v3, v1))); + sprintf(numstr,"%.3g", RAD2DEGF(angle_v3v3v3(v2, v3, v1))); interp_v3_v3v3(fvec, efa->cent, efa->v3->co, 0.8f); - view3d_cached_text_draw_add(fvec, val, 0, V3D_CACHE_TEXT_ASCII, col); + view3d_cached_text_draw_add(fvec, numstr, 0, V3D_CACHE_TEXT_ASCII, col); } /* Vec 4 */ if(efa->v4) { if( (e3->f & e4->f & SELECT) || (do_moving && (efa->v4->f & SELECT)) ) { - sprintf(val,"%.3g", RAD2DEGF(angle_v3v3v3(v3, v4, v1))); + sprintf(numstr,"%.3g", RAD2DEGF(angle_v3v3v3(v3, v4, v1))); interp_v3_v3v3(fvec, efa->cent, efa->v4->co, 0.8f); - view3d_cached_text_draw_add(fvec, val, 0, V3D_CACHE_TEXT_ASCII, col); + view3d_cached_text_draw_add(fvec, numstr, 0, V3D_CACHE_TEXT_ASCII, col); } } } @@ -2817,7 +2817,7 @@ static void draw_em_indices(EditMesh *em) EditFace *f; EditVert *v; int i; - char val[32]; + char numstr[32]; float pos[3]; unsigned char col[4]; @@ -2827,8 +2827,8 @@ static void draw_em_indices(EditMesh *em) UI_GetThemeColor3ubv(TH_DRAWEXTRA_FACEANG, col); for (v = em->verts.first, i = 0; v; v = v->next, i++) { if (v->f & SELECT) { - sprintf(val, "%d", i); - view3d_cached_text_draw_add(v->co, val, 0, V3D_CACHE_TEXT_ASCII, col); + sprintf(numstr, "%d", i); + view3d_cached_text_draw_add(v->co, numstr, 0, V3D_CACHE_TEXT_ASCII, col); } } } @@ -2837,9 +2837,9 @@ static void draw_em_indices(EditMesh *em) UI_GetThemeColor3ubv(TH_DRAWEXTRA_EDGELEN, col); for (e = em->edges.first, i = 0; e; e = e->next, i++) { if (e->f & SELECT) { - sprintf(val, "%d", i); + sprintf(numstr, "%d", i); mid_v3_v3v3(pos, e->v1->co, e->v2->co); - view3d_cached_text_draw_add(pos, val, 0, V3D_CACHE_TEXT_ASCII, col); + view3d_cached_text_draw_add(pos, numstr, 0, V3D_CACHE_TEXT_ASCII, col); } } } @@ -2848,8 +2848,8 @@ static void draw_em_indices(EditMesh *em) UI_GetThemeColor3ubv(TH_DRAWEXTRA_FACEAREA, col); for (f = em->faces.first, i = 0; f; f = f->next, i++) { if (f->f & SELECT) { - sprintf(val, "%d", i); - view3d_cached_text_draw_add(f->cent, val, 0, V3D_CACHE_TEXT_ASCII, col); + sprintf(numstr, "%d", i); + view3d_cached_text_draw_add(f->cent, numstr, 0, V3D_CACHE_TEXT_ASCII, col); } } } @@ -3026,8 +3026,6 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, draw_em_fancy_edges(scene, v3d, me, cageDM, 0, eed_act); } if(em) { -// XXX retopo_matrix_update(v3d); - draw_em_fancy_verts(scene, v3d, ob, cageDM, eve_act); if(me->drawflag & ME_DRAWNORMALS) { @@ -3206,6 +3204,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D bglPolygonOffset(rv3d->dist, 0.0); glDepthMask(1); glDisable(GL_LINE_STIPPLE); + glDisable(GL_BLEND); GPU_disable_material(); @@ -4068,7 +4067,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv int a, totpart, totpoint=0, totve=0, drawn, draw_as, totchild=0; int select=ob->flag&SELECT, create_cdata=0, need_v=0; GLint polygonmode[2]; - char val[32]; + char numstr[32]; unsigned char tcol[4]= {0, 0, 0, 255}; /* 1. */ @@ -4456,8 +4455,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv if((part->draw & PART_DRAW_NUM || part->draw & PART_DRAW_HEALTH) && (v3d->flag2 & V3D_RENDER_OVERRIDE)==0){ float vec_txt[3]; - char *val_pos= val; - val[0]= '\0'; + char *val_pos= numstr; + numstr[0]= '\0'; if(part->draw&PART_DRAW_NUM) { if(a < totpart && (part->draw & PART_DRAW_HEALTH) && (part->phystype==PART_PHYS_BOIDS)) { @@ -4476,7 +4475,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv /* in path drawing state.co is the end point */ /* use worldspace beause object matrix is already applied */ mul_v3_m4v3(vec_txt, ob->imat, state.co); - view3d_cached_text_draw_add(vec_txt, val, 10, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, tcol); + view3d_cached_text_draw_add(vec_txt, numstr, 10, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, tcol); } } } @@ -4565,10 +4564,10 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv for(a=0, pa=psys->particles; a<totpart; a++, pa++){ float vec_txt[3]; - sprintf(val, "%i", a); + BLI_snprintf(numstr, sizeof(numstr), "%i", a); /* use worldspace beause object matrix is already applied */ mul_v3_m4v3(vec_txt, ob->imat, cache[a]->co); - view3d_cached_text_draw_add(vec_txt, val, 10, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, tcol); + view3d_cached_text_draw_add(vec_txt, numstr, 10, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, tcol); } } } @@ -5353,8 +5352,6 @@ static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, short hide_handles = (cu->drawflag & CU_HIDE_HANDLES); int index; -// XXX retopo_matrix_update(v3d); - /* DispList */ UI_ThemeColor(TH_WIRE); drawDispList(scene, v3d, rv3d, base, dt); diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index cac5d856652..f2906ca9559 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -154,15 +154,23 @@ RegionView3D *ED_view3d_context_rv3d(bContext *C) /* ideally would return an rv3d but in some cases the region is needed too * so return that, the caller can then access the ar->regiondata */ -ARegion *ED_view3d_context_region_unlock(bContext *C) +int ED_view3d_context_user_region(bContext *C, View3D **v3d_r, ARegion **ar_r) { ScrArea *sa= CTX_wm_area(C); + + *v3d_r = NULL; + *ar_r = NULL; + if(sa && sa->spacetype==SPACE_VIEW3D) { ARegion *ar= CTX_wm_region(C); + View3D *v3d = (View3D *)sa->spacedata.first; + if(ar) { RegionView3D *rv3d= ar->regiondata; if(rv3d && rv3d->viewlock == 0) { - return ar; + *v3d_r = v3d; + *ar_r = ar; + return 1; } else { ARegion *ar_unlock_user= NULL; @@ -182,12 +190,22 @@ ARegion *ED_view3d_context_region_unlock(bContext *C) } /* camera/perspective view get priority when the active region is locked */ - if(ar_unlock_user) return ar_unlock_user; - if(ar_unlock) return ar_unlock; + if(ar_unlock_user) { + *v3d_r = v3d; + *ar_r = ar_unlock_user; + return 1; + } + + if(ar_unlock) { + *v3d_r = v3d; + *ar_r = ar_unlock; + return 1; + } } } } - return NULL; + + return 0; } /* Most of the time this isn't needed since you could assume the view matrix was @@ -553,7 +571,6 @@ static void view3d_main_area_free(ARegion *ar) if(rv3d->localvd) MEM_freeN(rv3d->localvd); if(rv3d->clipbb) MEM_freeN(rv3d->clipbb); - // XXX retopo_free_view_data(rv3d); if(rv3d->ri) { // XXX BIF_view3d_previewrender_free(rv3d); } diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 1b923c7a0cd..985d70d2144 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -188,7 +188,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float dg = BLI_findlink (&ob->defbase, dvert->dw[i].def_nr); if(dg) { max+= BLI_snprintf(str, sizeof(str), "%s %%x%d|", dg->name, dvert->dw[i].def_nr); - if(max<320) strcat(defstr, str); + if (max < sizeof(str)) strcat(defstr, str); } if(tfp->curdef==dvert->dw[i].def_nr) { @@ -1334,7 +1334,7 @@ static void view3d_panel_preview(bContext *C, ARegion *ar, short cntrl) // VIEW3 View3D *v3d= sa->spacedata.first; int ofsx, ofsy; - block= uiBeginBlock(C, ar, "view3d_panel_preview", UI_EMBOSS); + block= uiBeginBlock(C, ar, __func__, UI_EMBOSS); uiPanelControl(UI_PNL_SOLID | UI_PNL_CLOSE | UI_PNL_SCALE | cntrl); uiSetPanelHandler(VIEW3D_HANDLER_PREVIEW); // for close and esc diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index d3a0ee27256..ad85ff6dea8 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -863,24 +863,24 @@ static void draw_selected_name(Scene *scene, Object *ob) } } if(name && markern) - sprintf(info, "(%d) %s %s <%s>", CFRA, ob->id.name+2, name, markern); + BLI_snprintf(info, sizeof(info), "(%d) %s %s <%s>", CFRA, ob->id.name+2, name, markern); else if(name) - sprintf(info, "(%d) %s %s", CFRA, ob->id.name+2, name); + BLI_snprintf(info, sizeof(info), "(%d) %s %s", CFRA, ob->id.name+2, name); else - sprintf(info, "(%d) %s", CFRA, ob->id.name+2); + BLI_snprintf(info, sizeof(info), "(%d) %s", CFRA, ob->id.name+2); } else if(ELEM3(ob->type, OB_MESH, OB_LATTICE, OB_CURVE)) { Key *key= NULL; KeyBlock *kb = NULL; - char shapes[75]; + char shapes[MAX_NAME + 10]; /* try to display active shapekey too */ - shapes[0] = 0; + shapes[0] = '\0'; key = ob_get_key(ob); if(key){ kb = BLI_findlink(&key->block, ob->shapenr-1); if(kb){ - sprintf(shapes, ": %s ", kb->name); + BLI_snprintf(shapes, sizeof(shapes), ": %s ", kb->name); if(ob->shapeflag == OB_SHAPE_LOCK){ strcat(shapes, " (Pinned)"); } @@ -888,16 +888,16 @@ static void draw_selected_name(Scene *scene, Object *ob) } if(markern) - sprintf(info, "(%d) %s %s <%s>", CFRA, ob->id.name+2, shapes, markern); + BLI_snprintf(info, sizeof(info), "(%d) %s %s <%s>", CFRA, ob->id.name+2, shapes, markern); else - sprintf(info, "(%d) %s %s", CFRA, ob->id.name+2, shapes); + BLI_snprintf(info, sizeof(info), "(%d) %s %s", CFRA, ob->id.name+2, shapes); } else { /* standard object */ if (markern) - sprintf(info, "(%d) %s <%s>", CFRA, ob->id.name+2, markern); + BLI_snprintf(info, sizeof(info), "(%d) %s <%s>", CFRA, ob->id.name+2, markern); else - sprintf(info, "(%d) %s", CFRA, ob->id.name+2); + BLI_snprintf(info, sizeof(info), "(%d) %s", CFRA, ob->id.name+2); } /* color depends on whether there is a keyframe */ @@ -909,9 +909,9 @@ static void draw_selected_name(Scene *scene, Object *ob) else { /* no object */ if (markern) - sprintf(info, "(%d) <%s>", CFRA, markern); + BLI_snprintf(info, sizeof(info), "(%d) <%s>", CFRA, markern); else - sprintf(info, "(%d)", CFRA); + BLI_snprintf(info, sizeof(info), "(%d)", CFRA); /* color is always white */ UI_ThemeColor(TH_TEXT_HI); @@ -920,7 +920,7 @@ static void draw_selected_name(Scene *scene, Object *ob) if (U.uiflag & USER_SHOW_ROTVIEWICON) offset = 14 + (U.rvisize * 2); - BLF_draw_default(offset, 10, 0.0f, info, sizeof(info)-1); + BLF_draw_default(offset, 10, 0.0f, info, sizeof(info)); } static void view3d_camera_border(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D *rv3d, rctf *viewborder_r, short no_shift, short no_zoom) @@ -2251,32 +2251,46 @@ CustomDataMask ED_view3d_datamask(Scene *scene, View3D *v3d) return mask; } + +CustomDataMask ED_view3d_object_datamask(Scene *scene) +{ + Object *ob= scene->basact ? scene->basact->object : NULL; + CustomDataMask mask= 0; + + if (ob) { + /* check if we need tfaces & mcols due to face select or texture paint */ + if (paint_facesel_test(ob) || (ob->mode & OB_MODE_TEXTURE_PAINT)) { + mask |= CD_MASK_MTFACE | CD_MASK_MCOL; + } + + /* check if we need mcols due to vertex paint or weightpaint */ + if (ob->mode & OB_MODE_VERTEX_PAINT) { + mask |= CD_MASK_MCOL; + } + + if (ob->mode & OB_MODE_WEIGHT_PAINT) { + mask |= CD_MASK_WEIGHT_MCOL; + } + } + + return mask; +} + /* goes over all modes and view3d settings */ -CustomDataMask ED_viewedit_datamask(bScreen *screen) +CustomDataMask ED_view3d_screen_datamask(bScreen *screen) { Scene *scene= screen->scene; - Object *ob= scene->basact ? scene->basact->object : NULL; CustomDataMask mask = CD_MASK_BAREMESH; ScrArea *sa; - /* check if we need tfaces & mcols due to face select or texture paint */ - if(paint_facesel_test(ob) || (ob && ob->mode & OB_MODE_TEXTURE_PAINT)) - mask |= CD_MASK_MTFACE | CD_MASK_MCOL; - /* check if we need tfaces & mcols due to view mode */ for(sa = screen->areabase.first; sa; sa = sa->next) { if(sa->spacetype == SPACE_VIEW3D) { mask |= ED_view3d_datamask(scene, (View3D *)sa->spacedata.first); } } - - /* check if we need mcols due to vertex paint or weightpaint */ - if(ob) { - if(ob->mode & OB_MODE_VERTEX_PAINT) - mask |= CD_MASK_MCOL; - if(ob->mode & OB_MODE_WEIGHT_PAINT) - mask |= CD_MASK_WEIGHT_MCOL; - } + + mask |= ED_view3d_object_datamask(scene); return mask; } @@ -2609,7 +2623,7 @@ static void draw_viewport_fps(Scene *scene, ARegion *ar) BLI_snprintf(printable, sizeof(printable), "fps: %i", (int)(fps+0.5f)); } - BLF_draw_default_ascii(22, ar->winy-17, 0.0f, printable, sizeof(printable)-1); + BLF_draw_default_ascii(22, ar->winy-17, 0.0f, printable, sizeof(printable)); } static int view3d_main_area_draw_engine(const bContext *C, ARegion *ar) @@ -2876,14 +2890,15 @@ static void view3d_main_area_draw_info(const bContext *C, ARegion *ar, const cha draw_viewport_name(ar, v3d); } if (grid_unit) { /* draw below the viewport name */ - char tstr[32]= ""; + char numstr[32]= ""; UI_ThemeColor(TH_TEXT_HI); if(v3d->grid != 1.0f) { - BLI_snprintf(tstr, sizeof(tstr), "%s x %.4g", grid_unit, v3d->grid); + BLI_snprintf(numstr, sizeof(numstr), "%s x %.4g", grid_unit, v3d->grid); } - BLF_draw_default_ascii(22, ar->winy-(USER_SHOW_VIEWPORTNAME?40:20), 0.0f, tstr[0]?tstr : grid_unit, sizeof(tstr)); /* XXX, use real length */ + BLF_draw_default_ascii(22, ar->winy-(USER_SHOW_VIEWPORTNAME?40:20), 0.0f, + numstr[0] ? numstr : grid_unit, sizeof(numstr)); } } diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index fa970f7f9d8..224df5b9f80 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -1585,8 +1585,8 @@ static int viewzoom_exec(bContext *C, wmOperator *op) v3d= sa->spacedata.first; rv3d= ar->regiondata; - mx= RNA_property_is_set(op->ptr, "mx") ? RNA_int_get(op->ptr, "mx") : ar->winx / 2; - my= RNA_property_is_set(op->ptr, "my") ? RNA_int_get(op->ptr, "my") : ar->winy / 2; + mx= RNA_struct_property_is_set(op->ptr, "mx") ? RNA_int_get(op->ptr, "mx") : ar->winx / 2; + my= RNA_struct_property_is_set(op->ptr, "my") ? RNA_int_get(op->ptr, "my") : ar->winy / 2; use_cam_zoom= (rv3d->persp==RV3D_CAMOB) && !(rv3d->is_persp && ED_view3d_camera_lock_check(v3d, rv3d)); @@ -1667,12 +1667,12 @@ static int viewzoom_invoke(bContext *C, wmOperator *op, wmEvent *event) vod= op->customdata; /* if one or the other zoom position aren't set, set from event */ - if (!RNA_property_is_set(op->ptr, "mx") || !RNA_property_is_set(op->ptr, "my")) { + if (!RNA_struct_property_is_set(op->ptr, "mx") || !RNA_struct_property_is_set(op->ptr, "my")) { RNA_int_set(op->ptr, "mx", event->x); RNA_int_set(op->ptr, "my", event->y); } - if(RNA_property_is_set(op->ptr, "delta")) { + if(RNA_struct_property_is_set(op->ptr, "delta")) { viewzoom_exec(C, op); } else { @@ -1880,12 +1880,12 @@ static int viewdolly_invoke(bContext *C, wmOperator *op, wmEvent *event) vod= op->customdata; /* if one or the other zoom position aren't set, set from event */ - if (!RNA_property_is_set(op->ptr, "mx") || !RNA_property_is_set(op->ptr, "my")) { + if (!RNA_struct_property_is_set(op->ptr, "mx") || !RNA_struct_property_is_set(op->ptr, "my")) { RNA_int_set(op->ptr, "mx", event->x); RNA_int_set(op->ptr, "my", event->y); } - if(RNA_property_is_set(op->ptr, "delta")) { + if(RNA_struct_property_is_set(op->ptr, "delta")) { viewdolly_exec(C, op); } else { @@ -2653,13 +2653,16 @@ static void axis_set_view(bContext *C, View3D *v3d, ARegion *ar, float q1, float static int viewnumpad_exec(bContext *C, wmOperator *op) { - View3D *v3d = CTX_wm_view3d(C); - ARegion *ar= ED_view3d_context_region_unlock(C); - RegionView3D *rv3d= ar->regiondata; /* no NULL check is needed, poll checks */ + View3D *v3d; + ARegion *ar; + RegionView3D *rv3d; Scene *scene= CTX_data_scene(C); - static int perspo=RV3D_PERSP; + static int perspo = RV3D_PERSP; int viewnum, align_active, nextperspo; + ED_view3d_context_user_region(C, &v3d, &ar); + rv3d = ar->regiondata; + viewnum = RNA_enum_get(op->ptr, "type"); align_active = RNA_boolean_get(op->ptr, "align_active"); @@ -2783,7 +2786,7 @@ void VIEW3D_OT_viewnumpad(wmOperatorType *ot) /* api callbacks */ ot->exec= viewnumpad_exec; - ot->poll= ED_operator_rv3d_unlock_poll; + ot->poll= ED_operator_rv3d_user_region_poll; /* flags */ ot->flag= 0; @@ -2801,12 +2804,16 @@ static EnumPropertyItem prop_view_orbit_items[] = { static int vieworbit_exec(bContext *C, wmOperator *op) { - View3D *v3d= CTX_wm_view3d(C); - ARegion *ar= ED_view3d_context_region_unlock(C); - RegionView3D *rv3d= ar->regiondata; /* no NULL check is needed, poll checks */ + View3D *v3d; + ARegion *ar; + RegionView3D *rv3d; float phi, q1[4], new_quat[4]; int orbitdir; + /* no NULL check is needed, poll checks */ + ED_view3d_context_user_region(C, &v3d, &ar); + rv3d = ar->regiondata; + orbitdir = RNA_enum_get(op->ptr, "type"); if(rv3d->viewlock==0) { @@ -2852,7 +2859,7 @@ void VIEW3D_OT_view_orbit(wmOperatorType *ot) /* api callbacks */ ot->exec= vieworbit_exec; - ot->poll= ED_operator_rv3d_unlock_poll; + ot->poll= ED_operator_rv3d_user_region_poll; /* flags */ ot->flag= 0; @@ -2909,8 +2916,13 @@ void VIEW3D_OT_view_pan(wmOperatorType *ot) static int viewpersportho_exec(bContext *C, wmOperator *UNUSED(op)) { - ARegion *ar= ED_view3d_context_region_unlock(C); - RegionView3D *rv3d= ar->regiondata; /* no NULL check is needed, poll checks */ + View3D *v3d_dummy; + ARegion *ar; + RegionView3D *rv3d; + + /* no NULL check is needed, poll checks */ + ED_view3d_context_user_region(C, &v3d_dummy, &ar); + rv3d = ar->regiondata; if(rv3d->viewlock==0) { if(rv3d->persp!=RV3D_ORTHO) @@ -2932,7 +2944,7 @@ void VIEW3D_OT_view_persportho(wmOperatorType *ot) /* api callbacks */ ot->exec= viewpersportho_exec; - ot->poll= ED_operator_rv3d_unlock_poll; + ot->poll= ED_operator_rv3d_user_region_poll; /* flags */ ot->flag= 0; @@ -2960,16 +2972,16 @@ static int background_image_add_invoke(bContext *C, wmOperator *op, wmEvent *UNU View3D *v3d= CTX_wm_view3d(C); Image *ima= NULL; BGpic *bgpic; - char name[32]; + char name[MAX_ID_NAME-2]; /* check input variables */ - if(RNA_property_is_set(op->ptr, "filepath")) { + if(RNA_struct_property_is_set(op->ptr, "filepath")) { char path[FILE_MAX]; RNA_string_get(op->ptr, "filepath", path); ima= BKE_add_image_file(path); } - else if(RNA_property_is_set(op->ptr, "name")) { + else if(RNA_struct_property_is_set(op->ptr, "name")) { RNA_string_get(op->ptr, "name", name); ima= (Image *)find_id("IM", name); } @@ -3007,7 +3019,7 @@ void VIEW3D_OT_background_image_add(wmOperatorType *ot) ot->flag = 0; /* properties */ - RNA_def_string(ot->srna, "name", "Image", 24, "Name", "Image name to assign"); + RNA_def_string(ot->srna, "name", "Image", MAX_ID_NAME-2, "Name", "Image name to assign"); RNA_def_string(ot->srna, "filepath", "Path", FILE_MAX, "Filepath", "Path to image file"); } diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index 42f58ba26f7..e7c9a1bd3a0 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -152,6 +152,7 @@ void VIEW3D_OT_select_extend(struct wmOperatorType *ot); void VIEW3D_OT_select_circle(struct wmOperatorType *ot); void VIEW3D_OT_select_border(struct wmOperatorType *ot); void VIEW3D_OT_select_lasso(struct wmOperatorType *ot); +void VIEW3D_OT_select_menu(struct wmOperatorType *ot); void VIEW3D_OT_smoothview(struct wmOperatorType *ot); void VIEW3D_OT_camera_to_view(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c index aeb850243c5..4594544b4f8 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -85,6 +85,7 @@ void view3d_operatortypes(void) WM_operatortype_append(VIEW3D_OT_enable_manipulator); WM_operatortype_append(VIEW3D_OT_cursor3d); WM_operatortype_append(VIEW3D_OT_select_lasso); + WM_operatortype_append(VIEW3D_OT_select_menu); WM_operatortype_append(VIEW3D_OT_camera_to_view); WM_operatortype_append(VIEW3D_OT_camera_to_view_selected); WM_operatortype_append(VIEW3D_OT_object_as_camera); @@ -261,33 +262,54 @@ void view3d_keymap(wmKeyConfig *keyconf) RNA_string_set(kmi->ptr, "value_2", "SOLID"); /* selection*/ - WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); + kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "center", FALSE); + RNA_boolean_set(kmi->ptr, "object", FALSE); + RNA_boolean_set(kmi->ptr, "enumerate", FALSE); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0); RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "center", FALSE); + RNA_boolean_set(kmi->ptr, "object", FALSE); + RNA_boolean_set(kmi->ptr, "enumerate", FALSE); kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); RNA_boolean_set(kmi->ptr, "center", TRUE); RNA_boolean_set(kmi->ptr, "object", TRUE); /* use Ctrl+Select for 2 purposes */ + RNA_boolean_set(kmi->ptr, "enumerate", FALSE); kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "center", FALSE); + RNA_boolean_set(kmi->ptr, "object", FALSE); RNA_boolean_set(kmi->ptr, "enumerate", TRUE); /* selection key-combinations */ kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "center", TRUE); RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "center", TRUE); + RNA_boolean_set(kmi->ptr, "object", FALSE); + RNA_boolean_set(kmi->ptr, "enumerate", FALSE); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); RNA_boolean_set(kmi->ptr, "center", TRUE); + RNA_boolean_set(kmi->ptr, "object", FALSE); RNA_boolean_set(kmi->ptr, "enumerate", TRUE); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0); RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "center", FALSE); + RNA_boolean_set(kmi->ptr, "object", FALSE); RNA_boolean_set(kmi->ptr, "enumerate", TRUE); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL|KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "center", TRUE); RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "center", TRUE); + RNA_boolean_set(kmi->ptr, "object", FALSE); RNA_boolean_set(kmi->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); + kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0); + RNA_boolean_set(kmi->ptr, "deselect", FALSE); + kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_SHIFT|KM_CTRL, 0); + RNA_boolean_set(kmi->ptr, "deselect", TRUE); WM_keymap_add_item(keymap, "VIEW3D_OT_select_circle", CKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "VIEW3D_OT_clip_border", BKEY, KM_PRESS, KM_ALT, 0); diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 551eb3cd6b5..ce93ca56a65 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -74,6 +74,7 @@ #include "RNA_access.h" #include "RNA_define.h" +#include "RNA_enum_types.h" #include "ED_armature.h" #include "ED_curve.h" @@ -1045,7 +1046,104 @@ static unsigned int samplerect(unsigned int *buf, int size, unsigned int dontdo) /* The max number of menu items in an object select menu */ +typedef struct SelMenuItemF { + char idname[MAX_ID_NAME-2]; + int icon; +} SelMenuItemF; + #define SEL_MENU_SIZE 22 +static SelMenuItemF object_mouse_select_menu_data[SEL_MENU_SIZE]; + +/* special (crappy) operator only for menu select */ +static EnumPropertyItem *object_select_menu_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free) +{ + EnumPropertyItem *item= NULL, item_tmp= {0}; + int totitem= 0; + int i= 0; + + /* dont need context but avoid docgen using this */ + if (C == NULL || object_mouse_select_menu_data[i].idname[0] == '\0') { + return DummyRNA_NULL_items; + } + + for (; i < SEL_MENU_SIZE && object_mouse_select_menu_data[i].idname[0] != '\0'; i++) { + item_tmp.name= object_mouse_select_menu_data[i].idname; + item_tmp.identifier= object_mouse_select_menu_data[i].idname; + item_tmp.value= i; + item_tmp.icon= object_mouse_select_menu_data[i].icon; + RNA_enum_item_add(&item, &totitem, &item_tmp); + } + + RNA_enum_item_end(&item, &totitem); + *free= 1; + + return item; +} + +static int object_select_menu_exec(bContext *C, wmOperator *op) +{ + int name_index= RNA_enum_get(op->ptr, "name"); + short extend= RNA_boolean_get(op->ptr, "extend"); + short changed = 0; + const char *name= object_mouse_select_menu_data[name_index].idname; + + if(!extend) { + CTX_DATA_BEGIN(C, Base*, base, selectable_bases) { + if(base->flag & SELECT) { + ED_base_object_select(base, BA_DESELECT); + changed= 1; + } + } + CTX_DATA_END; + } + + CTX_DATA_BEGIN(C, Base*, base, selectable_bases) { + /* this is a bit dodjy, there should only be ONE object with this name, but library objects can mess this up */ + if(strcmp(name, base->object->id.name+2)==0) { + ED_base_object_activate(C, base); + ED_base_object_select(base, BA_SELECT); + changed= 1; + } + } + CTX_DATA_END; + + /* weak but ensures we activate menu again before using the enum */ + memset(object_mouse_select_menu_data, 0, sizeof(object_mouse_select_menu_data)); + + /* 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 VIEW3D_OT_select_menu(wmOperatorType *ot) +{ + PropertyRNA *prop; + + /* identifiers */ + ot->name= "Select Menu"; + ot->description = "Menu object selection"; + ot->idname= "VIEW3D_OT_select_menu"; + + /* api callbacks */ + ot->invoke= WM_menu_invoke; + ot->exec= object_select_menu_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* keyingset to use (dynamic enum) */ + prop= RNA_def_enum(ot->srna, "name", DummyRNA_NULL_items, 0, "Object Name", ""); + RNA_def_enum_funcs(prop, object_select_menu_enum_itemf); + RNA_def_property_flag(prop, PROP_HIDDEN); + ot->prop= prop; + + RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first"); +} static void deselectall_except(Scene *scene, Base *b) /* deselect all except b */ { @@ -1060,7 +1158,7 @@ static void deselectall_except(Scene *scene, Base *b) /* deselect all except b } } -static Base *mouse_select_menu(bContext *C, ViewContext *vc, unsigned int *buffer, int hits, const int mval[2], short extend) +static Base *object_mouse_select_menu(bContext *C, ViewContext *vc, unsigned int *buffer, int hits, const int mval[2], short extend) { short baseCount = 0; short ok; @@ -1098,9 +1196,6 @@ static Base *mouse_select_menu(bContext *C, ViewContext *vc, unsigned int *buffe } CTX_DATA_END; - if(baseCount) - - if(baseCount==0) { return NULL; } @@ -1110,35 +1205,30 @@ static Base *mouse_select_menu(bContext *C, ViewContext *vc, unsigned int *buffe return base; } else { - /* UI */ - uiPopupMenu *pup= uiPupMenuBegin(C, "Select Object", ICON_NONE); - uiLayout *layout= uiPupMenuLayout(pup); - uiLayout *split= uiLayoutSplit(layout, 0, 0); - uiLayout *column= uiLayoutColumn(split, 0); + /* UI, full in static array values that we later use in an enum function */ LinkNode *node; + int i; + + memset(object_mouse_select_menu_data, 0, sizeof(object_mouse_select_menu_data)); - node= linklist; - while(node) { + for (node = linklist, i = 0; node; node= node->next, i++) { 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; + BLI_strncpy(object_mouse_select_menu_data[i].idname, name, MAX_ID_NAME-2); + object_mouse_select_menu_data[i].icon = uiIconFromID(&ob->id); + } - WM_operator_properties_create(&ptr, "OBJECT_OT_select_name"); - RNA_string_set(&ptr, "name", name); - RNA_boolean_set(&ptr, "extend", extend); - uiItemFullO(column, "OBJECT_OT_select_name", name, uiIconFromID((ID *)ob), ptr.data, WM_OP_EXEC_DEFAULT, 0); - } + { + PointerRNA ptr; - node= node->next; + WM_operator_properties_create(&ptr, "VIEW3D_OT_select_menu"); + RNA_boolean_set(&ptr, "extend", extend); + WM_operator_name_call(C, "VIEW3D_OT_select_menu", WM_OP_INVOKE_DEFAULT, &ptr); + WM_operator_properties_free(&ptr); } - uiPupMenuEnd(C, pup); - BLI_linklist_free(linklist, NULL); return NULL; } @@ -1364,7 +1454,7 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short obce /* note; shift+alt goes to group-flush-selecting */ if(enumerate) { - basact= mouse_select_menu(C, &vc, NULL, 0, mval, extend); + basact= object_mouse_select_menu(C, &vc, NULL, 0, mval, extend); } else { base= startbase; while(base) { @@ -1401,7 +1491,7 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short obce /* note; shift+alt goes to group-flush-selecting */ if(has_bones==0 && enumerate) { - basact= mouse_select_menu(C, &vc, buffer, hits, mval, extend); + basact= object_mouse_select_menu(C, &vc, buffer, hits, mval, extend); } else { basact= mouse_select_eval_buffer(&vc, buffer, hits, mval, startbase, has_bones); } diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index 49b1b3f723e..0705d066f26 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -177,7 +177,7 @@ static uiBlock *tool_search_menu(bContext *C, ARegion *ar, void *arg_listbase) /* 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, OP_MAX_TYPENAME, 10, 0, 150, 19, 0, 0, ""); + but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, 150, 19, 0, 0, ""); uiButSetSearchFunc(but, operator_search_cb, arg_listbase, operator_call_cb, NULL); uiBoundsBlock(block, 6); diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index aa444125287..11492ee7804 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -466,13 +466,18 @@ void VIEW3D_OT_camera_to_view_selected(wmOperatorType *ot) static int view3d_setobjectascamera_exec(bContext *C, wmOperator *UNUSED(op)) -{ - View3D *v3d = CTX_wm_view3d(C); - ARegion *ar= ED_view3d_context_region_unlock(C); - RegionView3D *rv3d= ar->regiondata; /* no NULL check is needed, poll checks */ +{ + View3D *v3d; + ARegion *ar; + RegionView3D *rv3d; + Scene *scene= CTX_data_scene(C); Object *ob = CTX_data_active_object(C); + /* no NULL check is needed, poll checks */ + ED_view3d_context_user_region(C, &v3d, &ar); + rv3d = ar->regiondata; + if(ob) { Object *camera_old= (rv3d->persp == RV3D_CAMOB) ? V3D_CAMERA_SCENE(scene, v3d) : NULL; rv3d->persp= RV3D_CAMOB; @@ -489,9 +494,12 @@ static int view3d_setobjectascamera_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -int ED_operator_rv3d_unlock_poll(bContext *C) +int ED_operator_rv3d_user_region_poll(bContext *C) { - return ED_view3d_context_region_unlock(C) != NULL; + View3D *v3d_dummy; + ARegion *ar_dummy; + + return ED_view3d_context_user_region(C, &v3d_dummy, &ar_dummy); } void VIEW3D_OT_object_as_camera(wmOperatorType *ot) @@ -504,7 +512,7 @@ void VIEW3D_OT_object_as_camera(wmOperatorType *ot) /* api callbacks */ ot->exec= view3d_setobjectascamera_exec; - ot->poll= ED_operator_rv3d_unlock_poll; + ot->poll= ED_operator_rv3d_user_region_poll; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 1029888df23..1e1f6e4279e 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1403,18 +1403,21 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) if (t->flag & T_MODAL) { /* save settings if not set in operator */ - if (RNA_struct_find_property(op->ptr, "proportional") && !RNA_property_is_set(op->ptr, "proportional")) { + if ( (prop = RNA_struct_find_property(op->ptr, "proportional")) && !RNA_property_is_set(op->ptr, prop)) + { if (t->obedit) ts->proportional = proportional; else ts->proportional_objects = (proportional != PROP_EDIT_OFF); } - if (RNA_struct_find_property(op->ptr, "proportional_size") && !RNA_property_is_set(op->ptr, "proportional_size")) { + if ( (prop = RNA_struct_find_property(op->ptr, "proportional_size")) && !RNA_property_is_set(op->ptr, prop)) + { ts->proportional_size = t->prop_size; } - - if (RNA_struct_find_property(op->ptr, "proportional_edit_falloff") && !RNA_property_is_set(op->ptr, "proportional_edit_falloff")) { + + if ( (prop = RNA_struct_find_property(op->ptr, "proportional_edit_falloff")) && !RNA_property_is_set(op->ptr, prop)) + { ts->prop_mode = t->prop_mode; } @@ -1425,8 +1428,9 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) ts->snap_flag &= ~SCE_SNAP; } - if(t->spacetype == SPACE_VIEW3D) { - if (RNA_struct_find_property(op->ptr, "constraint_orientation") && !RNA_property_is_set(op->ptr, "constraint_orientation")) { + if (t->spacetype == SPACE_VIEW3D) { + if ( (prop = RNA_struct_find_property(op->ptr, "constraint_orientation")) && !RNA_property_is_set(op->ptr, prop)) + { View3D *v3d = t->view; v3d->twmode = t->current_orientation; @@ -1441,17 +1445,17 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) RNA_float_set(op->ptr, "proportional_size", t->prop_size); } - if (RNA_struct_find_property(op->ptr, "axis")) + if ((prop = RNA_struct_find_property(op->ptr, "axis"))) { - RNA_float_set_array(op->ptr, "axis", t->axis); + RNA_property_float_set_array(op->ptr, prop, t->axis); } - if (RNA_struct_find_property(op->ptr, "mirror")) + if ((prop = RNA_struct_find_property(op->ptr, "mirror"))) { - RNA_boolean_set(op->ptr, "mirror", t->flag & T_MIRROR); + RNA_property_boolean_set(op->ptr, prop, t->flag & T_MIRROR); } - if (RNA_struct_find_property(op->ptr, "constraint_axis")) + if ((prop = RNA_struct_find_property(op->ptr, "constraint_axis"))) { /* constraint orientation can be global, event if user selects something else * so use the orientation in the constraint if set @@ -1475,7 +1479,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) } } - RNA_boolean_set_array(op->ptr, "constraint_axis", constraint_axis); + RNA_property_boolean_set_array(op->ptr, prop, constraint_axis); } } @@ -1483,6 +1487,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int mode) { int options = 0; + PropertyRNA *prop; t->context = C; @@ -1490,9 +1495,12 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int t->state = TRANS_STARTING; - if(RNA_struct_find_property(op->ptr, "texture_space")) - if(RNA_boolean_get(op->ptr, "texture_space")) + if ( (prop = RNA_struct_find_property(op->ptr, "texture_space")) && RNA_property_is_set(op->ptr, prop)) + { + if(RNA_property_boolean_get(op->ptr, prop)) { options |= CTX_TEXTURE; + } + } t->options = options; @@ -1699,10 +1707,9 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int /* overwrite initial values if operator supplied a non-null vector */ - if (RNA_property_is_set(op->ptr, "value")) + if ( (prop = RNA_struct_find_property(op->ptr, "value")) && RNA_property_is_set(op->ptr, prop)) { float values[4]= {0}; /* incase value isn't length 4, avoid uninitialized memory */ - PropertyRNA *prop= RNA_struct_find_property(op->ptr, "value"); if(RNA_property_array_check(prop)) { RNA_float_get_array(op->ptr, "value", values); @@ -1716,19 +1723,19 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int } /* Transformation axis from operator */ - if (RNA_struct_find_property(op->ptr, "axis") && RNA_property_is_set(op->ptr, "axis")) + if ((prop = RNA_struct_find_property(op->ptr, "axis")) && RNA_property_is_set(op->ptr, prop)) { - RNA_float_get_array(op->ptr, "axis", t->axis); + RNA_property_float_get_array(op->ptr, prop, t->axis); normalize_v3(t->axis); copy_v3_v3(t->axis_orig, t->axis); } /* Constraint init from operator */ - if (RNA_struct_find_property(op->ptr, "constraint_axis") && RNA_property_is_set(op->ptr, "constraint_axis")) + if ((prop = RNA_struct_find_property(op->ptr, "constraint_axis")) && RNA_property_is_set(op->ptr, prop)) { int constraint_axis[3]; - RNA_boolean_get_array(op->ptr, "constraint_axis", constraint_axis); + RNA_property_boolean_get_array(op->ptr, prop, constraint_axis); if (constraint_axis[0] || constraint_axis[1] || constraint_axis[2]) { @@ -2559,9 +2566,9 @@ static void headerResize(TransInfo *t, float vec[3], char *str) outputNumInput(&(t->num), tvec); } else { - sprintf(&tvec[0], "%.4f", vec[0]); - sprintf(&tvec[20], "%.4f", vec[1]); - sprintf(&tvec[40], "%.4f", vec[2]); + BLI_snprintf(&tvec[0], 20, "%.4f", vec[0]); + BLI_snprintf(&tvec[20], 20, "%.4f", vec[1]); + BLI_snprintf(&tvec[40], 20, "%.4f", vec[2]); } if (t->con.mode & CON_APPLY) { @@ -2632,7 +2639,7 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) /* local constraint shouldn't alter center */ if ((t->around == V3D_LOCAL) && ( (t->flag & (T_OBJECT|T_POSE)) || - ((t->flag & T_EDIT) && (t->settings->selectmode & SCE_SELECT_FACE)) || + ((t->flag & T_EDIT) && (t->settings->selectmode & (SCE_SELECT_EDGE|SCE_SELECT_FACE))) || (t->obedit && t->obedit->type == OB_ARMATURE)) ) { @@ -2919,7 +2926,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short /* local constraint shouldn't alter center */ if (around == V3D_LOCAL) { if ( (t->flag & (T_OBJECT|T_POSE)) || - (t->settings->selectmode & SCE_SELECT_FACE) || + (t->settings->selectmode & (SCE_SELECT_EDGE|SCE_SELECT_FACE)) || (t->obedit && t->obedit->type == OB_ARMATURE)) { center = td->center; diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index 2233aeda92e..aab7dda0e86 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -281,7 +281,7 @@ typedef struct TransInfo { char *undostr; /* if set, uses this string for undo */ float spacemtx[3][3]; /* orientation matrix of the current space */ - char spacename[32]; /* name of the current space */ + char spacename[64]; /* name of the current space, MAX_NAME */ struct Object *poseobj; /* if t->flag & T_POSE, this denotes pose object */ diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index b88e57e1861..bd34477c13f 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -59,6 +59,7 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLI_string.h" //#include "blendef.h" // @@ -552,7 +553,7 @@ static void applyObjectConstraintRot(TransInfo *t, TransData *td, float vec[3], void setConstraint(TransInfo *t, float space[3][3], int mode, const char text[]) { - strncpy(t->con.text + 1, text, 48); + BLI_strncpy(t->con.text + 1, text, sizeof(t->con.text) - 1); copy_m3_m3(t->con.mtx, space); t->con.mode = mode; getConstraintMatrix(t); @@ -579,7 +580,7 @@ void setLocalConstraint(TransInfo *t, int mode, const char text[]) setConstraint(t, t->data->axismtx, mode, text); } else { - strncpy(t->con.text + 1, text, 48); + BLI_strncpy(t->con.text + 1, text, sizeof(t->con.text) - 1); copy_m3_m3(t->con.mtx, t->data->axismtx); t->con.mode = mode; getConstraintMatrix(t); @@ -598,7 +599,7 @@ void setLocalConstraint(TransInfo *t, int mode, const char text[]) /* Set the constraint according to the user defined orientation - ftext is a format string passed to sprintf. It will add the name of + ftext is a format string passed to BLI_snprintf. It will add the name of the orientation where %s is (logically). */ void setUserConstraint(TransInfo *t, short orientation, int mode, const char ftext[]) @@ -609,28 +610,28 @@ void setUserConstraint(TransInfo *t, short orientation, int mode, const char fte case V3D_MANIP_GLOBAL: { float mtx[3][3]= MAT3_UNITY; - sprintf(text, ftext, "global"); + BLI_snprintf(text, sizeof(text), ftext, "global"); setConstraint(t, mtx, mode, text); } break; case V3D_MANIP_LOCAL: - sprintf(text, ftext, "local"); + BLI_snprintf(text, sizeof(text), ftext, "local"); setLocalConstraint(t, mode, text); break; case V3D_MANIP_NORMAL: - sprintf(text, ftext, "normal"); + BLI_snprintf(text, sizeof(text), ftext, "normal"); setConstraint(t, t->spacemtx, mode, text); break; case V3D_MANIP_VIEW: - sprintf(text, ftext, "view"); + BLI_snprintf(text, sizeof(text), ftext, "view"); setConstraint(t, t->spacemtx, mode, text); break; case V3D_MANIP_GIMBAL: - sprintf(text, ftext, "gimbal"); + BLI_snprintf(text, sizeof(text), ftext, "gimbal"); setConstraint(t, t->spacemtx, mode, text); break; default: /* V3D_MANIP_CUSTOM */ - sprintf(text, ftext, t->spacename); + BLI_snprintf(text, sizeof(text), ftext, t->spacename); setConstraint(t, t->spacemtx, mode, text); break; } @@ -874,11 +875,11 @@ static void setNearestAxis2d(TransInfo *t) /* no correction needed... just use whichever one is lower */ if ( abs(t->mval[0]-t->con.imval[0]) < abs(t->mval[1]-t->con.imval[1]) ) { t->con.mode |= CON_AXIS1; - sprintf(t->con.text, " along Y axis"); + BLI_snprintf(t->con.text, sizeof(t->con.text), " along Y axis"); } else { t->con.mode |= CON_AXIS0; - sprintf(t->con.text, " along X axis"); + BLI_snprintf(t->con.text, sizeof(t->con.text), " along X axis"); } } @@ -929,31 +930,31 @@ static void setNearestAxis3d(TransInfo *t) if (len[0] <= len[1] && len[0] <= len[2]) { if (t->modifiers & MOD_CONSTRAINT_PLANE) { t->con.mode |= (CON_AXIS1|CON_AXIS2); - sprintf(t->con.text, " locking %s X axis", t->spacename); + BLI_snprintf(t->con.text, sizeof(t->con.text), " locking %s X axis", t->spacename); } else { t->con.mode |= CON_AXIS0; - sprintf(t->con.text, " along %s X axis", t->spacename); + BLI_snprintf(t->con.text, sizeof(t->con.text), " along %s X axis", t->spacename); } } else if (len[1] <= len[0] && len[1] <= len[2]) { if (t->modifiers & MOD_CONSTRAINT_PLANE) { t->con.mode |= (CON_AXIS0|CON_AXIS2); - sprintf(t->con.text, " locking %s Y axis", t->spacename); + BLI_snprintf(t->con.text, sizeof(t->con.text), " locking %s Y axis", t->spacename); } else { t->con.mode |= CON_AXIS1; - sprintf(t->con.text, " along %s Y axis", t->spacename); + BLI_snprintf(t->con.text, sizeof(t->con.text), " along %s Y axis", t->spacename); } } else if (len[2] <= len[1] && len[2] <= len[0]) { if (t->modifiers & MOD_CONSTRAINT_PLANE) { t->con.mode |= (CON_AXIS0|CON_AXIS1); - sprintf(t->con.text, " locking %s Z axis", t->spacename); + BLI_snprintf(t->con.text, sizeof(t->con.text), " locking %s Z axis", t->spacename); } else { t->con.mode |= CON_AXIS2; - sprintf(t->con.text, " along %s Z axis", t->spacename); + BLI_snprintf(t->con.text, sizeof(t->con.text), " along %s Z axis", t->spacename); } } } diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index bc7514b4c9a..44dc909314a 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -1926,6 +1926,19 @@ static void get_face_center(float *cent, EditMesh *em, EditVert *eve) } } +static void get_edge_center(float *cent, EditMesh *em, EditVert *eve) +{ + EditEdge *eed; + + for(eed= em->edges.first; eed; eed= eed->next) + if(eed->f & SELECT) + if(eed->v1==eve || eed->v2==eve) + break; + if(eed) { + mid_v3_v3v3(cent, eed->v1->co, eed->v2->co); + } +} + /* way to overwrite what data is edited with transform * static void VertsToTransData(TransData *td, EditVert *eve, BakeKey *key) */ static void VertsToTransData(TransInfo *t, TransData *td, EditMesh *em, EditVert *eve) @@ -1937,8 +1950,12 @@ static void VertsToTransData(TransInfo *t, TransData *td, EditMesh *em, EditVert td->loc = eve->co; copy_v3_v3(td->center, td->loc); - if(t->around==V3D_LOCAL && (em->selectmode & SCE_SELECT_FACE)) - get_face_center(td->center, em, eve); + if(t->around==V3D_LOCAL) { + if(em->selectmode & SCE_SELECT_FACE) + get_face_center(td->center, em, eve); + else if(em->selectmode & SCE_SELECT_EDGE) + get_edge_center(td->center, em, eve); + } copy_v3_v3(td->iloc, td->loc); // Setting normals diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index f6aca0336be..fff683b1ef6 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -1077,7 +1077,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event) if(v3d->flag & V3D_ALIGN) t->flag |= T_V3D_ALIGN; t->around = v3d->around; - if (op && RNA_struct_find_property(op->ptr, "constraint_orientation") && RNA_property_is_set(op->ptr, "constraint_orientation")) + if (op && RNA_struct_find_property(op->ptr, "constraint_orientation") && RNA_struct_property_is_set(op->ptr, "constraint_orientation")) { t->current_orientation = RNA_enum_get(op->ptr, "constraint_orientation"); @@ -1100,7 +1100,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event) /* initialize UV transform from */ if (op && RNA_struct_find_property(op->ptr, "correct_uv")) { - if(RNA_property_is_set(op->ptr, "correct_uv")) { + if(RNA_struct_property_is_set(op->ptr, "correct_uv")) { if(RNA_boolean_get(op->ptr, "correct_uv")) { t->settings->uvcalc_flag |= UVCALC_TRANSFORM_CORRECT; } @@ -1146,7 +1146,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event) t->around = V3D_CENTER; } - if (op && RNA_property_is_set(op->ptr, "release_confirm")) + if (op && RNA_struct_property_is_set(op->ptr, "release_confirm")) { if (RNA_boolean_get(op->ptr, "release_confirm")) { @@ -1161,7 +1161,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event) } } - if (op && RNA_struct_find_property(op->ptr, "mirror") && RNA_property_is_set(op->ptr, "mirror")) + if (op && RNA_struct_find_property(op->ptr, "mirror") && RNA_struct_property_is_set(op->ptr, "mirror")) { if (RNA_boolean_get(op->ptr, "mirror")) { @@ -1182,7 +1182,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event) /* setting PET flag only if property exist in operator. Otherwise, assume it's not supported */ if (op && RNA_struct_find_property(op->ptr, "proportional")) { - if (RNA_property_is_set(op->ptr, "proportional")) + if (RNA_struct_property_is_set(op->ptr, "proportional")) { switch(RNA_enum_get(op->ptr, "proportional")) { @@ -1215,7 +1215,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event) } } - if (op && RNA_struct_find_property(op->ptr, "proportional_size") && RNA_property_is_set(op->ptr, "proportional_size")) + if (op && RNA_struct_find_property(op->ptr, "proportional_size") && RNA_struct_property_is_set(op->ptr, "proportional_size")) { t->prop_size = RNA_float_get(op->ptr, "proportional_size"); } @@ -1232,7 +1232,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event) t->prop_size = 1.0f; } - if (op && RNA_struct_find_property(op->ptr, "proportional_edit_falloff") && RNA_property_is_set(op->ptr, "proportional_edit_falloff")) + if (op && RNA_struct_find_property(op->ptr, "proportional_edit_falloff") && RNA_struct_property_is_set(op->ptr, "proportional_edit_falloff")) { t->prop_mode = RNA_enum_get(op->ptr, "proportional_edit_falloff"); } diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 90f95bea696..b7aba109cdd 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -268,7 +268,7 @@ static void TRANSFORM_OT_delete_orientation(struct wmOperatorType *ot) static int create_orientation_exec(bContext *C, wmOperator *op) { - char name[36]; + char name[MAX_NAME]; int use = RNA_boolean_get(op->ptr, "use"); int overwrite = RNA_boolean_get(op->ptr, "overwrite"); @@ -301,7 +301,7 @@ static void TRANSFORM_OT_create_orientation(struct wmOperatorType *ot) 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_string(ot->srna, "name", "", MAX_NAME, "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"); } @@ -429,7 +429,7 @@ static int transform_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_CANCELLED; } - if(RNA_property_is_set(op->ptr, "value")) { + if(RNA_struct_property_is_set(op->ptr, "value")) { return transform_exec(C, op); } else { diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 3aa155fc8bb..8a9249f78e5 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -145,7 +145,7 @@ TransformOrientation *createObjectSpace(bContext *C, ReportList *UNUSED(reports) /* use object name if no name is given */ if (name[0] == 0) { - strncpy(name, ob->id.name+2, 35); + strncpy(name, ob->id.name+2, MAX_ID_NAME-2); } return addMatrixSpace(C, mat, name, overwrite); @@ -289,7 +289,7 @@ TransformOrientation* addMatrixSpace(bContext *C, float mat[3][3], char name[], { ts = MEM_callocN(sizeof(TransformOrientation), "UserTransSpace from matrix"); BLI_addtail(transform_spaces, ts); - strncpy(ts->name, name, 35); + strncpy(ts->name, name, sizeof(ts->name)); } /* copy matrix into transform space */ @@ -422,10 +422,11 @@ const char * BIF_menustringTransformOrientation(const bContext *C, const char *t TransformOrientation *ts; int i = V3D_MANIP_CUSTOM; char *str_menu, *p; + const int elem_size = MAX_NAME + 4; title = IFACE_(title); - str_menu = MEM_callocN(strlen(menu) + strlen(title) + 1 + 40 * BIF_countTransformOrientation(C), TIP_("UserTransSpace from matrix")); + str_menu = MEM_callocN(strlen(menu) + strlen(title) + 1 + elem_size * BIF_countTransformOrientation(C), TIP_("UserTransSpace from matrix")); p = str_menu; p += sprintf(str_menu, "%s", title); diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index ed3e949c8a0..d079bd41c10 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -445,18 +445,18 @@ void initSnapping(TransInfo *t, wmOperator *op) resetSnapping(t); /* if snap property exists */ - if (op && RNA_struct_find_property(op->ptr, "snap") && RNA_property_is_set(op->ptr, "snap")) + if (op && RNA_struct_find_property(op->ptr, "snap") && RNA_struct_property_is_set(op->ptr, "snap")) { if (RNA_boolean_get(op->ptr, "snap")) { t->modifiers |= MOD_SNAP; - if (RNA_property_is_set(op->ptr, "snap_target")) + if (RNA_struct_property_is_set(op->ptr, "snap_target")) { snap_target = RNA_enum_get(op->ptr, "snap_target"); } - if (RNA_property_is_set(op->ptr, "snap_point")) + if (RNA_struct_property_is_set(op->ptr, "snap_point")) { RNA_float_get_array(op->ptr, "snap_point", t->tsnap.snapPoint); t->tsnap.status |= SNAP_FORCED|POINT_INIT; diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index 1a1022a5c7f..73322a8292d 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -179,18 +179,18 @@ void unpack_menu(bContext *C, const char *opname, const char *id_name, const cha BLI_strncpy(local_name, abs_name, sizeof(local_name)); BLI_splitdirstring(local_name, fi); - sprintf(local_name, "//%s/%s", folder, fi); + BLI_snprintf(local_name, sizeof(local_name), "//%s/%s", folder, fi); if(strcmp(abs_name, local_name)!=0) { switch(checkPackedFile(local_name, pf)) { case PF_NOFILE: - sprintf(line, "Create %s", local_name); + BLI_snprintf(line, sizeof(line), "Create %s", local_name); props_ptr= uiItemFullO(layout, opname, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&props_ptr, "method", PF_WRITE_LOCAL); RNA_string_set(&props_ptr, "id", id_name); break; case PF_EQUAL: - sprintf(line, "Use %s (identical)", local_name); + BLI_snprintf(line, sizeof(line), "Use %s (identical)", local_name); //uiItemEnumO(layout, opname, line, 0, "method", PF_USE_LOCAL); props_ptr= uiItemFullO(layout, opname, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&props_ptr, "method", PF_USE_LOCAL); @@ -198,13 +198,13 @@ void unpack_menu(bContext *C, const char *opname, const char *id_name, const cha break; case PF_DIFFERS: - sprintf(line, "Use %s (differs)", local_name); + BLI_snprintf(line, sizeof(line), "Use %s (differs)", local_name); //uiItemEnumO(layout, opname, line, 0, "method", PF_USE_LOCAL); props_ptr= uiItemFullO(layout, opname, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&props_ptr, "method", PF_USE_LOCAL); RNA_string_set(&props_ptr, "id", id_name); - sprintf(line, "Overwrite %s", local_name); + BLI_snprintf(line, sizeof(line), "Overwrite %s", local_name); //uiItemEnumO(layout, opname, line, 0, "method", PF_WRITE_LOCAL); props_ptr= uiItemFullO(layout, opname, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&props_ptr, "method", PF_WRITE_LOCAL); @@ -216,27 +216,27 @@ void unpack_menu(bContext *C, const char *opname, const char *id_name, const cha switch(checkPackedFile(abs_name, pf)) { case PF_NOFILE: - sprintf(line, "Create %s", abs_name); + BLI_snprintf(line, sizeof(line), "Create %s", abs_name); //uiItemEnumO(layout, opname, line, 0, "method", PF_WRITE_ORIGINAL); props_ptr= uiItemFullO(layout, opname, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&props_ptr, "method", PF_WRITE_ORIGINAL); RNA_string_set(&props_ptr, "id", id_name); break; case PF_EQUAL: - sprintf(line, "Use %s (identical)", abs_name); + BLI_snprintf(line, sizeof(line), "Use %s (identical)", abs_name); //uiItemEnumO(layout, opname, line, 0, "method", PF_USE_ORIGINAL); props_ptr= uiItemFullO(layout, opname, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&props_ptr, "method", PF_USE_ORIGINAL); RNA_string_set(&props_ptr, "id", id_name); break; case PF_DIFFERS: - sprintf(line, "Use %s (differs)", abs_name); + BLI_snprintf(line, sizeof(line), "Use %s (differs)", abs_name); //uiItemEnumO(layout, opname, line, 0, "method", PF_USE_ORIGINAL); props_ptr= uiItemFullO(layout, opname, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&props_ptr, "method", PF_USE_ORIGINAL); RNA_string_set(&props_ptr, "id", id_name); - sprintf(line, "Overwrite %s", abs_name); + BLI_snprintf(line, sizeof(line), "Overwrite %s", abs_name); //uiItemEnumO(layout, opname, line, 0, "method", PF_WRITE_ORIGINAL); props_ptr= uiItemFullO(layout, opname, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&props_ptr, "method", PF_WRITE_ORIGINAL); diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c index 6c8713aa03e..52422d37f29 100644 --- a/source/blender/editors/util/numinput.c +++ b/source/blender/editors/util/numinput.c @@ -31,9 +31,10 @@ #include <math.h> /* fabs */ -#include <stdio.h> /* for sprintf */ +#include <stdio.h> /* for size_t */ #include "BLI_utildefines.h" +#include "BLI_string.h" #include "WM_types.h" @@ -84,34 +85,34 @@ void outputNumInput(NumInput *n, char *str) inv[0] = 0; if( n->val[i] > 1e10f || n->val[i] < -1e10f ) - sprintf(&str[j*20], "%s%.4e%c", inv, n->val[i], cur); + BLI_snprintf(&str[j*20], 20, "%s%.4e%c", inv, n->val[i], cur); else switch (n->ctrl[i]) { case 0: - sprintf(&str[j*20], "%sNONE%c", inv, cur); + BLI_snprintf(&str[j*20], 20, "%sNONE%c", inv, cur); break; case 1: case -1: - sprintf(&str[j*20], "%s%.0f%c", inv, n->val[i], cur); + BLI_snprintf(&str[j*20], 20, "%s%.0f%c", inv, n->val[i], cur); break; case 10: case -10: - sprintf(&str[j*20], "%s%.f.%c", inv, n->val[i], cur); + BLI_snprintf(&str[j*20], 20, "%s%.f.%c", inv, n->val[i], cur); break; case 100: case -100: - sprintf(&str[j*20], "%s%.1f%c", inv, n->val[i], cur); + BLI_snprintf(&str[j*20], 20, "%s%.1f%c", inv, n->val[i], cur); break; case 1000: case -1000: - sprintf(&str[j*20], "%s%.2f%c", inv, n->val[i], cur); + BLI_snprintf(&str[j*20], 20, "%s%.2f%c", inv, n->val[i], cur); break; case 10000: case -10000: - sprintf(&str[j*20], "%s%.3f%c", inv, n->val[i], cur); + BLI_snprintf(&str[j*20], 20, "%s%.3f%c", inv, n->val[i], cur); break; default: - sprintf(&str[j*20], "%s%.4e%c", inv, n->val[i], cur); + BLI_snprintf(&str[j*20], 20, "%s%.4e%c", inv, n->val[i], cur); } } } diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index 3ec99ca7508..4fb9f916df7 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -509,7 +509,7 @@ static int undo_history_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even /* note: also check ed_undo_step() in top if you change notifiers */ static int undo_history_exec(bContext *C, wmOperator *op) { - if(RNA_property_is_set(op->ptr, "item")) { + if(RNA_struct_property_is_set(op->ptr, "item")) { int undosys= get_undo_system(C); int item= RNA_int_get(op->ptr, "item"); diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 1f71cd8a4c6..7d56d5c479f 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -3360,10 +3360,10 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf) keymap->poll= ED_operator_uvedit; /* pick selection */ - WM_keymap_add_item(keymap, "UV_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1); - WM_keymap_add_item(keymap, "UV_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0)->ptr, "extend", 1); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select", SELECTMOUSE, KM_PRESS, 0, 0)->ptr, "extend", FALSE); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", TRUE); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "extend", FALSE); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0)->ptr, "extend", TRUE); /* border/circle selection */ WM_keymap_add_item(keymap, "UV_OT_select_border", BKEY, KM_PRESS, 0, 0); @@ -3371,8 +3371,8 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "UV_OT_circle_select", CKEY, KM_PRESS, 0, 0); /* selection manipulation */ - WM_keymap_add_item(keymap, "UV_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0); - WM_keymap_add_item(keymap, "UV_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0)->ptr, "extend", FALSE); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0)->ptr, "extend", FALSE); RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked", LKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "extend", TRUE); RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", TRUE); diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 830dc224c94..17e5bebd6b0 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -46,6 +46,7 @@ #include "BLI_editVert.h" #include "BLI_uvproject.h" #include "BLI_utildefines.h" +#include "BLI_string.h" #include "BKE_context.h" #include "BKE_customdata.h" @@ -334,7 +335,7 @@ static void minimize_stretch_iteration(bContext *C, wmOperator *op, int interact param_flush(ms->handle); if(sa) { - sprintf(str, "Minimize Stretch. Blend %.2f", ms->blend); + BLI_snprintf(str, sizeof(str), "Minimize Stretch. Blend %.2f", ms->blend); ED_area_headerprint(sa, str); } @@ -498,7 +499,7 @@ static int pack_islands_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - if(RNA_property_is_set(op->ptr, "margin")) { + if(RNA_struct_property_is_set(op->ptr, "margin")) { scene->toolsettings->uvcalc_margin= RNA_float_get(op->ptr, "margin"); } else { |