diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-01-12 06:41:12 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-01-12 06:41:12 +0300 |
commit | 63018144badeb10c858504c918a3f66047c068b0 (patch) | |
tree | 5982ba549aa3e23a68a412877f51d100ae1bb920 /source/blender/editors | |
parent | 21fc4cabaff9b1caa476af9d700195fb239a07c6 (diff) |
remove redundant assignments & unused vars.
also minor functional changes
- OBJECT_OT_make_links_data() type property is now assigned to the operator property (so popup menu can find it)
- removing BG image now returns cancelled if no image is removed.
Diffstat (limited to 'source/blender/editors')
25 files changed, 67 insertions, 85 deletions
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index e9d0645ceba..d4f25c10e30 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -1691,7 +1691,7 @@ void generateMissingArcsFromNode(RigGraph *rigg, ReebNode *node, int multi_level void generateMissingArcs(RigGraph *rigg) { - ReebGraph *reebg = rigg->link_mesh; + ReebGraph *reebg; int multi_level_limit = 5; for (reebg = rigg->link_mesh; reebg; reebg = reebg->link_up) diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 73db7b1a377..ce4a61b5cff 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -2194,7 +2194,7 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op)) /* loop over selection segments of a curve, smooth each */ /* Start BezTriple code, this is duplicated below for points, make sure these functions stay in sync */ - start_sel = end_sel = -1; + start_sel = -1; for(bezt=nu->bezt+last_sel, a=last_sel; a<nu->pntsu; a++, bezt++) { if(bezt->f2 & SELECT) { start_sel = a; @@ -2256,7 +2256,7 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op)) /* loop over selection segments of a curve, smooth each */ /* Start BezTriple code, this is duplicated below for points, make sure these functions stay in sync */ - start_sel = end_sel = -1; + start_sel = -1; for(bp=nu->bp+last_sel, a=last_sel; a<nu->pntsu; a++, bp++) { if(bp->f1 & SELECT) { start_sel = a; diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index f719d41e7b6..ffb18bcad4d 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -3461,7 +3461,7 @@ static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButt if(event->type==LEFTMOUSE && event->val==KM_PRESS) { CurveMapping *cumap= (CurveMapping*)but->poin; CurveMap *cuma= cumap->cm+cumap->cur; - CurveMapPoint *cmp= cuma->curve; + CurveMapPoint *cmp; float fx, fy, zoomx, zoomy, offsx, offsy; float dist, mindist= 200.0f; // 14 pixels radius int sel= -1; diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 69e866d9c1c..1f25f968213 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -2334,7 +2334,6 @@ static void do_running_jobs(bContext *C, void *UNUSED(arg), int event) void uiTemplateRunningJobs(uiLayout *layout, bContext *C) { bScreen *screen= CTX_wm_screen(C); - Scene *scene= CTX_data_scene(C); wmWindowManager *wm= CTX_wm_manager(C); ScrArea *sa= CTX_wm_area(C); uiBlock *block; @@ -2352,6 +2351,7 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C) handle_event= B_STOPCOMPO; } else { + Scene *scene; /* another scene can be rendering too, for example via compositor */ for(scene= CTX_data_main(C)->scene.first; scene; scene= scene->id.next) if(WM_jobs_test(wm, scene)) diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index b2f74e435b1..5e3a0c6022a 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -466,7 +466,7 @@ static void ui_theme_init_new(bTheme *btheme) */ void ui_theme_init_default(void) { - bTheme *btheme= U.themes.first; + bTheme *btheme; /* we search for the theme with name Default */ for(btheme= U.themes.first; btheme; btheme= btheme->next) { diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c index 1f70dd84d94..3647d32c28d 100644 --- a/source/blender/editors/object/object_lattice.c +++ b/source/blender/editors/object/object_lattice.c @@ -86,8 +86,6 @@ void make_editLatt(Object *obedit) free_editLatt(obedit); - lt= obedit->data; - actkey= ob_get_keyblock(obedit); if(actkey) key_to_latt(actkey, lt); diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index ab53a95a156..a0d8e3c9733 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1338,8 +1338,6 @@ void OBJECT_OT_make_links_data(wmOperatorType *ot) {MAKE_LINKS_MODIFIERS, "MODIFIERS", 0, "Modifiers", ""}, {0, NULL, 0, NULL, NULL}}; - PropertyRNA *prop; - /* identifiers */ ot->name= "Link Data"; ot->description = "Make links from the active object to other selected objects"; @@ -1353,7 +1351,7 @@ void OBJECT_OT_make_links_data(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - prop= RNA_def_enum(ot->srna, "type", make_links_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", make_links_items, 0, "Type", ""); } @@ -1464,7 +1462,8 @@ void single_obdata_users(Main *bmain, Scene *scene, int flag) ob->data= copy_camera(ob->data); break; case OB_MESH: - me= ob->data= copy_mesh(ob->data); + ob->data= copy_mesh(ob->data); + //me= ob->data; //if(me && me->key) // ipo_idnew(me->key->ipo); /* drivers */ break; diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 82c2f614af1..6f4f996d004 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -639,9 +639,8 @@ static int project_paint_PickColor(const ProjPaintState *ps, float pt[2], float } } else { - xi = (int)((uv[0]*ibuf->x) + 0.5f); - yi = (int)((uv[1]*ibuf->y) + 0.5f); - + //xi = (int)((uv[0]*ibuf->x) + 0.5f); + //yi = (int)((uv[1]*ibuf->y) + 0.5f); //if (xi<0 || xi>=ibuf->x || yi<0 || yi>=ibuf->y) return 0; /* wrap */ diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index a62f01e88f0..832d657428c 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -1430,7 +1430,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P Object *ob; Mesh *me; float mat[4][4]; - float paintweight= ts->vgroup_weight; + float paintweight; int *indexar; int totindex, index, totw, flip; float alpha; diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 825b462c08f..4719c10e941 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -442,7 +442,6 @@ static void insert_action_keys(bAnimContext *ac, short mode) ReportList *reports = ac->reports; Scene *scene= ac->scene; - float cfra= (float)CFRA; short flag = 0; /* filter data */ @@ -459,7 +458,8 @@ static void insert_action_keys(bAnimContext *ac, short mode) for (ale= anim_data.first; ale; ale= ale->next) { AnimData *adt= ANIM_nla_mapping_get(ac, ale); FCurve *fcu= (FCurve *)ale->key_data; - + float cfra; + /* adjust current frame for NLA-scaling */ if (adt) cfra= BKE_nla_tweakedit_remap(adt, (float)CFRA, NLATIME_CONVERT_UNMAP); diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 84090c88abc..98547dbe798 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -280,12 +280,12 @@ static void file_draw_icon(uiBlock *block, char *path, int sx, int sy, int icon, { uiBut *but; float x,y; - float alpha=1.0f; + /*float alpha=1.0f;*/ x = (float)(sx); y = (float)(sy-height); - if (icon == ICON_FILE_BLANK) alpha = 0.375f; + /*if (icon == ICON_FILE_BLANK) alpha = 0.375f;*/ but= uiDefIconBut(block, LABEL, 0, icon, x, y, width, height, NULL, 0.0, 0.0, 0, 0, ""); uiButSetDragPath(but, path); diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 154c955c48e..fe9296b7227 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -410,7 +410,6 @@ static void insert_graph_keys(bAnimContext *ac, short mode) ReportList *reports = ac->reports; Scene *scene= ac->scene; - float cfra= (float)CFRA; short flag = 0; /* filter data */ @@ -426,6 +425,7 @@ static void insert_graph_keys(bAnimContext *ac, short mode) for (ale= anim_data.first; ale; ale= ale->next) { AnimData *adt= ANIM_nla_mapping_get(ac, ale); FCurve *fcu= (FCurve *)ale->key_data; + float cfra; /* adjust current frame for NLA-mapping */ if (adt) diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 69bbfb78d81..d1230d82f71 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -438,7 +438,6 @@ static int view_all_exec(bContext *C, wmOperator *UNUSED(op)) { SpaceImage *sima; ARegion *ar; - Scene *scene; Object *obedit; float aspx, aspy, zoomx, zoomy, w, h; int width, height; @@ -446,7 +445,6 @@ static int view_all_exec(bContext *C, wmOperator *UNUSED(op)) /* retrieve state */ sima= CTX_wm_space_image(C); ar= CTX_wm_region(C); - scene= (Scene*)CTX_data_scene(C); obedit= CTX_data_edit_object(C); ED_space_image_size(sima, &width, &height); @@ -2030,7 +2028,7 @@ static int record_composite_exec(bContext *C, wmOperator *op) static int record_composite_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - RecordCompositeData *rcd= op->customdata; + RecordCompositeData *rcd; if(!record_composite_init(C, op)) return OPERATOR_CANCELLED; diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index c911adb0c16..af4e496f68a 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -586,13 +586,13 @@ static void image_refresh(const bContext *C, ScrArea *UNUSED(sa)) MTFace *tf; if(em && EM_texFaceCheck(em)) { - sima->image= ima= NULL; + sima->image= NULL; tf = EM_get_active_mtface(em, NULL, NULL, 1); /* partially selected face is ok */ if(tf && (tf->mode & TF_TEX)) { /* don't need to check for pin here, see above */ - sima->image= ima= tf->tpage; + sima->image= tf->tpage; if(sima->flag & SI_EDITTILE); else sima->curtile= tf->tile; diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index eb7ae1d8011..ad54eff1fd4 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -201,7 +201,6 @@ static int sequencer_add_scene_strip_exec(bContext *C, wmOperator *op) Sequence *seq; /* generic strip vars */ Strip *strip; - StripElem *se; int start_frame, channel; /* operator props */ @@ -227,7 +226,7 @@ static int sequencer_add_scene_strip_exec(bContext *C, wmOperator *op) strip->len = seq->len = sce_seq->r.efra - sce_seq->r.sfra + 1; strip->us= 1; - strip->stripdata= se= MEM_callocN(seq->len*sizeof(StripElem), "stripelem"); + strip->stripdata= MEM_callocN(seq->len*sizeof(StripElem), "stripelem"); strcpy(seq->name+2, sce_seq->id.name+2); seqbase_unique_name_recursive(&ed->seqbase, seq); @@ -559,7 +558,6 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op) Sequence *seq; /* generic strip vars */ Strip *strip; - StripElem *se; struct SeqEffectHandle sh; int start_frame, end_frame, channel, type; /* operator props */ @@ -614,7 +612,7 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op) strip->len = seq->len; strip->us= 1; if(seq->len>0) - strip->stripdata= se= MEM_callocN(seq->len*sizeof(StripElem), "stripelem"); + strip->stripdata= MEM_callocN(seq->len*sizeof(StripElem), "stripelem"); if (seq->type==SEQ_PLUGIN) { char path[FILE_MAX]; diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 318c64f87a7..eb69374b5b7 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -1029,10 +1029,8 @@ static TextLine *first_visible_line(SpaceText *st, ARegion *ar, int *wrap_top) Text *text= st->text; TextLine* pline= text->lines.first; int i= st->top, lineno= 0; - DrawCache *drawcache; text_update_drawcache(st, ar); - drawcache= (DrawCache *)st->drawcache; if(wrap_top) *wrap_top= 0; diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index 18a83e16ca1..901aaba2cb1 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -630,15 +630,15 @@ static float co[16] ={ /* smat, imat = mat & imat to draw screenaligned */ static void draw_sphere_bone_dist(float smat[][4], float imat[][4], bPoseChannel *pchan, EditBone *ebone) { - float head, tail, length, dist; + float head, tail, dist /*, length*/; float *headvec, *tailvec, dirvec[3]; /* figure out the sizes of spheres */ if (ebone) { /* this routine doesn't call get_matrix_editbone() that calculates it */ ebone->length = len_v3v3(ebone->head, ebone->tail); - - length= ebone->length; + + /*length= ebone->length;*/ /*UNUSED*/ tail= ebone->rad_tail; dist= ebone->dist; if (ebone->parent && (ebone->flag & BONE_CONNECTED)) @@ -649,7 +649,7 @@ static void draw_sphere_bone_dist(float smat[][4], float imat[][4], bPoseChannel tailvec= ebone->tail; } else { - length= pchan->bone->length; + /*length= pchan->bone->length;*/ /*UNUSED*/ tail= pchan->bone->rad_tail; dist= pchan->bone->dist; if (pchan->parent && (pchan->bone->flag & BONE_CONNECTED)) diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index c6cbfe44df4..caac8d1d9fe 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -93,13 +93,10 @@ static EdgeHash *get_tface_mesh_marked_edge_info(Mesh *me) EdgeHash *eh = BLI_edgehash_new(); int i; MFace *mf; - MTFace *tf = NULL; for (i=0; i<me->totface; i++) { mf = &me->mface[i]; - if (me->mtface) - tf = &me->mtface[i]; - + if (mf->v3) { if (!(mf->flag&ME_HIDE)) { unsigned int flags = eEdge_Visible; diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 19353e9f29e..26445c4d742 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -3448,7 +3448,6 @@ static void draw_particle(ParticleKey *state, int draw_as, short draw, float pix static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, ParticleSystem *psys, int ob_dt) { Object *ob=base->object; - ParticleSystemModifierData *psmd; ParticleEditSettings *pset = PE_settings(scene); ParticleSettings *part; ParticleData *pars, *pa; @@ -3460,7 +3459,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv float vel[3], imat[4][4]; float timestep, pixsize=1.0, pa_size, r_tilt, r_length; float pa_time, pa_birthtime, pa_dietime, pa_health; - float cfra= bsystem_time(scene, ob,(float)CFRA,0.0); + float cfra; float ma_r=0.0f, ma_g=0.0f, ma_b=0.0f; int a, totpart, totpoint=0, totve=0, drawn, draw_as, totchild=0; int select=ob->flag&SELECT, create_cdata=0, need_v=0; @@ -3496,7 +3495,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv sim.scene= scene; sim.ob= ob; sim.psys= psys; - sim.psmd = psmd = psys_get_modifier(ob,psys); + sim.psmd = psys_get_modifier(ob,psys); if(part->phystype==PART_PHYS_KEYED){ if(psys->flag&PSYS_KEYED){ diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 35cddda5362..4eeacd6f05f 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -2314,20 +2314,21 @@ void VIEW3D_OT_background_image_add(wmOperatorType *ot) /* ***** remove image operator ******* */ static int background_image_remove_exec(bContext *C, wmOperator *op) { - BGpic *bgpic_rem = CTX_data_pointer_get_type(C, "bgpic", &RNA_BackgroundImage).data; View3D *vd = CTX_wm_view3d(C); int index = RNA_int_get(op->ptr, "index"); + BGpic *bgpic_rem= BLI_findlink(&vd->bgpicbase, index); - bgpic_rem = BLI_findlink(&vd->bgpicbase, index); if(bgpic_rem) { BLI_remlink(&vd->bgpicbase, bgpic_rem); if(bgpic_rem->ima) bgpic_rem->ima->id.us--; MEM_freeN(bgpic_rem); + WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, vd); + return OPERATOR_FINISHED; + } + else { + return OPERATOR_CANCELLED; } - WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, vd); - - return OPERATOR_FINISHED; } void VIEW3D_OT_background_image_remove(wmOperatorType *ot) diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index a259e29e9a0..2f7a24d600f 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -1743,7 +1743,6 @@ int ED_view3d_context_activate(bContext *C) bScreen *sc= CTX_wm_screen(C); ScrArea *sa= CTX_wm_area(C); ARegion *ar; - RegionView3D *rv3d; /* sa can be NULL when called from python */ if(sa==NULL || sa->spacetype != SPACE_VIEW3D) @@ -1764,7 +1763,6 @@ int ED_view3d_context_activate(bContext *C) // bad context switch .. CTX_wm_area_set(C, sa); CTX_wm_region_set(C, ar); - rv3d= ar->regiondata; return 1; } diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 65e58d8a608..23f4f103eae 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -4849,18 +4849,16 @@ int doEdgeSlide(TransInfo *t, float perc) LinkNode *vertlist=sld->vertlist, *look; GHash *vertgh = sld->vhash; TransDataSlideVert *tempsv; - float len = 0.0f; + float len; int prop=1, flip=0; /* UV correction vars */ GHash **uvarray= sld->uvhash; int uvlay_tot= CustomData_number_of_layers(&em->fdata, CD_MTFACE); int uvlay_idx; - TransDataSlideUv *suv=sld->slideuv; + TransDataSlideUv *suv; float uv_tmp[2]; LinkNode *fuv_link; - len = 0.0f; - tempsv = BLI_ghash_lookup(vertgh,nearest); centerVert = editedge_getSharedVert(tempsv->up, tempsv->down); diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 55699a345c2..3047df06523 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -838,39 +838,38 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac switch(spaceid) { case SPACE_VIEW3D: - km = WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0); - km= WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_S, KM_ANY, 0, 0); + WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_S, KM_ANY, 0, 0); - km = WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0); - km = WM_keymap_add_item(keymap, OP_RESIZE, SKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_RESIZE, SKEY, KM_PRESS, 0, 0); - km = WM_keymap_add_item(keymap, OP_WARP, WKEY, KM_PRESS, KM_SHIFT, 0); + WM_keymap_add_item(keymap, OP_WARP, WKEY, KM_PRESS, KM_SHIFT, 0); - km = WM_keymap_add_item(keymap, OP_TOSPHERE, SKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0); + WM_keymap_add_item(keymap, OP_TOSPHERE, SKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0); - km = WM_keymap_add_item(keymap, OP_SHEAR, SKEY, KM_PRESS, KM_ALT|KM_CTRL|KM_SHIFT, 0); + WM_keymap_add_item(keymap, OP_SHEAR, SKEY, KM_PRESS, KM_ALT|KM_CTRL|KM_SHIFT, 0); - km = WM_keymap_add_item(keymap, "TRANSFORM_OT_select_orientation", SPACEKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_add_item(keymap, "TRANSFORM_OT_select_orientation", SPACEKEY, KM_PRESS, KM_ALT, 0); km = WM_keymap_add_item(keymap, "TRANSFORM_OT_create_orientation", SPACEKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); RNA_boolean_set(km->ptr, "use", 1); - km = WM_keymap_add_item(keymap, OP_MIRROR, MKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, OP_MIRROR, MKEY, KM_PRESS, KM_CTRL, 0); km = WM_keymap_add_item(keymap, "WM_OT_context_toggle", TABKEY, KM_PRESS, KM_SHIFT, 0); RNA_string_set(km->ptr, "data_path", "tool_settings.use_snap"); - km = WM_keymap_add_item(keymap, "TRANSFORM_OT_snap_type", TABKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0); - + WM_keymap_add_item(keymap, "TRANSFORM_OT_snap_type", TABKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0); + km = WM_keymap_add_item(keymap, OP_TRANSLATION, TKEY, KM_PRESS, KM_SHIFT, 0); RNA_boolean_set(km->ptr, "texture_space", 1); - + km = WM_keymap_add_item(keymap, OP_RESIZE, TKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0); RNA_boolean_set(km->ptr, "texture_space", 1); - break; case SPACE_ACTION: km= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", GKEY, KM_PRESS, 0, 0); @@ -889,16 +888,16 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac RNA_int_set(km->ptr, "mode", TFM_TIME_SLIDE); break; case SPACE_IPO: - km= WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0); - km= WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_S, KM_ANY, 0, 0); + WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_S, KM_ANY, 0, 0); km= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", EKEY, KM_PRESS, 0, 0); RNA_int_set(km->ptr, "mode", TFM_TIME_EXTEND); - km = WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0); - km = WM_keymap_add_item(keymap, OP_RESIZE, SKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_RESIZE, SKEY, KM_PRESS, 0, 0); break; case SPACE_NLA: km= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", GKEY, KM_PRESS, 0, 0); @@ -914,35 +913,35 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac RNA_int_set(km->ptr, "mode", TFM_TIME_SCALE); break; case SPACE_NODE: - km= WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0); km= WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_A, KM_ANY, 0, 0); RNA_enum_set(km->ptr, "release_confirm", 1); km= WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_S, KM_ANY, 0, 0); RNA_enum_set(km->ptr, "release_confirm", 1); - km = WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0); - km = WM_keymap_add_item(keymap, OP_RESIZE, SKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_RESIZE, SKEY, KM_PRESS, 0, 0); break; case SPACE_SEQ: - km= WM_keymap_add_item(keymap, OP_SEQ_SLIDE, GKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_SEQ_SLIDE, GKEY, KM_PRESS, 0, 0); - km= WM_keymap_add_item(keymap, OP_SEQ_SLIDE, EVT_TWEAK_S, KM_ANY, 0, 0); + WM_keymap_add_item(keymap, OP_SEQ_SLIDE, EVT_TWEAK_S, KM_ANY, 0, 0); km= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", EKEY, KM_PRESS, 0, 0); RNA_int_set(km->ptr, "mode", TFM_TIME_EXTEND); break; case SPACE_IMAGE: - km = WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0); - km= WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_S, KM_ANY, 0, 0); + WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_S, KM_ANY, 0, 0); - km = WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0); - km = WM_keymap_add_item(keymap, OP_RESIZE, SKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_RESIZE, SKEY, KM_PRESS, 0, 0); - km = WM_keymap_add_item(keymap, "TRANSFORM_OT_mirror", MKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "TRANSFORM_OT_mirror", MKEY, KM_PRESS, KM_CTRL, 0); km = WM_keymap_add_item(keymap, "WM_OT_context_toggle", TABKEY, KM_PRESS, KM_SHIFT, 0); RNA_string_set(km->ptr, "data_path", "tool_settings.use_snap"); diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 2c6870f20c0..fb3758d2b0b 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -290,7 +290,7 @@ TransformOrientation* addMatrixSpace(bContext *C, float mat[3][3], char name[], void BIF_removeTransformOrientation(bContext *C, TransformOrientation *target) { ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces; - TransformOrientation *ts = transform_spaces->first; + TransformOrientation *ts; int i; for (i = 0, ts = transform_spaces->first; ts; ts = ts->next, i++) { @@ -341,7 +341,7 @@ void BIF_removeTransformOrientationIndex(bContext *C, int index) { void BIF_selectTransformOrientation(bContext *C, TransformOrientation *target) { ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces; View3D *v3d = CTX_wm_view3d(C); - TransformOrientation *ts = transform_spaces->first; + TransformOrientation *ts; int i; for (i = 0, ts = transform_spaces->first; ts; ts = ts->next, i++) { diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index fc217411386..98c71407631 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -426,7 +426,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) DerivedMesh *finaldm, *cagedm; unsigned char col1[4], col2[4]; float pointsize; - int drawfaces, interpedges, lastsel, sel; + int drawfaces, interpedges; Image *ima= sima->image; em= BKE_mesh_get_editmesh(me); @@ -627,8 +627,8 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) glColor4ubv((unsigned char *)col2); if(me->drawflag & ME_DRAWEDGES) { + int lastsel= 0, sel; UI_GetThemeColor4ubv(TH_VERTEX_SELECT, col1); - lastsel = sel = 0; if(interpedges) { glShadeModel(GL_SMOOTH); |