diff options
Diffstat (limited to 'source/blender/editors')
23 files changed, 57 insertions, 80 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index f62fb83deca..2252c926c71 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -1209,12 +1209,10 @@ static int separate_armature_exec (bContext *C, wmOperator *UNUSED(op)) Object *obedit= CTX_data_edit_object(C); Object *oldob, *newob; Base *oldbase, *newbase; - bArmature *arm; /* sanity checks */ if (obedit == NULL) return OPERATOR_CANCELLED; - arm= obedit->data; /* set wait cursor in case this takes a while */ WM_cursor_wait(1); diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index d4f25c10e30..cabf81ea85e 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -2730,8 +2730,6 @@ static void retargetGraphs(bContext *C, RigGraph *rigg) BIF_flagMultiArcs(reebg, ARC_FREE); /* return to first level */ - reebg = rigg->link_mesh; - inode = rigg->head; matchMultiResolutionStartingNode(rigg, reebg, inode); @@ -2887,7 +2885,6 @@ void BIF_retargetArc(bContext *C, ReebArc *earc, RigGraph *template_rigg) Object *ob; RigGraph *rigg; RigArc *iarc; - bArmature *arm; char *side_string = scene->toolsettings->skgen_side_string; char *num_string = scene->toolsettings->skgen_num_string; int free_template = 0; @@ -2895,14 +2892,12 @@ void BIF_retargetArc(bContext *C, ReebArc *earc, RigGraph *template_rigg) if (template_rigg) { ob = template_rigg->ob; - arm = ob->data; } else { free_template = 1; - ob = obedit; - arm = ob->data; - template_rigg = armatureSelectedToGraph(C, ob, arm); + ob = obedit; + template_rigg = armatureSelectedToGraph(C, ob, ob->data); } if (template_rigg->arcs.first == NULL) diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index cae6491378e..6c1adcb2ccb 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -667,7 +667,7 @@ void pose_copy_menu(Scene *scene) { Object *obedit= scene->obedit; // XXX context Object *ob= OBACT; - bArmature *arm= ob->data; + bArmature *arm; bPoseChannel *pchan, *pchanact; short nr=0; int i=0; @@ -680,7 +680,8 @@ void pose_copy_menu(Scene *scene) if (pchan==NULL) return; pchanact= pchan; - + arm= ob->data; + /* if proxy-protected bones selected, some things (such as locks + displays) shouldn't be changable, * but for constraints (just add local constraints) */ @@ -1241,7 +1242,6 @@ static int pose_group_assign_exec (bContext *C, wmOperator *op) { ScrArea *sa= CTX_wm_area(C); Object *ob; - bArmature *arm; bPose *pose; short done= 0; @@ -1254,7 +1254,7 @@ static int pose_group_assign_exec (bContext *C, wmOperator *op) /* only continue if there's an object, and a pose there too */ if (ELEM(NULL, ob, ob->pose)) return OPERATOR_CANCELLED; - arm= ob->data; + pose= ob->pose; /* set the active group number to the one from operator props @@ -1306,8 +1306,6 @@ static int pose_group_unassign_exec (bContext *C, wmOperator *UNUSED(op)) { ScrArea *sa= CTX_wm_area(C); Object *ob; - bArmature *arm; - bPose *pose; short done= 0; /* since this call may also be used from the buttons window, we need to check for where to get the object */ @@ -1319,8 +1317,6 @@ static int pose_group_unassign_exec (bContext *C, wmOperator *UNUSED(op)) /* only continue if there's an object, and a pose there too */ if (ELEM(NULL, ob, ob->pose)) return OPERATOR_CANCELLED; - pose= ob->pose; - arm= ob->data; /* find selected bones to remove from all bone groups */ CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones) @@ -1561,16 +1557,17 @@ void POSE_OT_autoside_names (wmOperatorType *ot) void pose_activate_flipped_bone(Scene *scene) { Object *ob= OBACT; - bArmature *arm= ob->data; - + if(ob==NULL) return; if(ob->mode & OB_MODE_WEIGHT_PAINT) { ob= modifiers_isDeformedByArmature(ob); } + if(ob && (ob->mode & OB_MODE_POSE)) { bPoseChannel *pchanf; - + bArmature *arm= ob->data; + if(arm->act_bone) { char name[32]; flip_side_name(name, arm->act_bone->name, TRUE); diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c index 780dc8827c4..29ba72ce604 100644 --- a/source/blender/editors/armature/reeb.c +++ b/source/blender/editors/armature/reeb.c @@ -2558,10 +2558,10 @@ ReebGraph * generateReebGraph(EditMesh *em, int subdivisions) EditVert *eve; EditFace *efa; int index; - int totvert; - int totfaces; + /*int totvert;*/ #ifdef DEBUG_REEB + int totfaces; int countfaces = 0; #endif @@ -2569,8 +2569,10 @@ ReebGraph * generateReebGraph(EditMesh *em, int subdivisions) rg->resolution = subdivisions; - totvert = BLI_countlist(&em->verts); + /*totvert = BLI_countlist(&em->verts);*/ /*UNUSED*/ +#ifdef DEBUG_REEB totfaces = BLI_countlist(&em->faces); +#endif renormalizeWeight(em, 1.0f); @@ -2641,7 +2643,7 @@ void renormalizeWeight(EditMesh *em, float newmax) eve = em->verts.first; minimum = weightData(eve); maximum = minimum; - for(eve = em->verts.first; eve; eve = eve->next) + for(; eve; eve = eve->next) { maximum = MAX2(maximum, weightData(eve)); minimum = MIN2(minimum, weightData(eve)); diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index d74a907d785..2620db30b39 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1801,7 +1801,7 @@ static double soft_range_round_down(double value, double max) void ui_set_but_soft_range(uiBut *but, double value) { PropertyType type; - double softmin, softmax, step, precision; + double softmin, softmax /*, step, precision*/; if(but->rnaprop) { type= RNA_property_type(but->rnaprop); @@ -1814,8 +1814,8 @@ void ui_set_but_soft_range(uiBut *but, double value) RNA_property_int_ui_range(&but->rnapoin, but->rnaprop, &imin, &imax, &istep); softmin= (imin == INT_MIN)? -1e4: imin; softmax= (imin == INT_MAX)? 1e4: imax; - step= istep; - precision= 1; + /*step= istep;*/ /*UNUSED*/ + /*precision= 1;*/ /*UNUSED*/ } else if(type == PROP_FLOAT) { float fmin, fmax, fstep, fprecision; @@ -1823,8 +1823,8 @@ void ui_set_but_soft_range(uiBut *but, double value) RNA_property_float_ui_range(&but->rnapoin, but->rnaprop, &fmin, &fmax, &fstep, &fprecision); softmin= (fmin == -FLT_MAX)? -1e4: fmin; softmax= (fmax == FLT_MAX)? 1e4: fmax; - step= fstep; - precision= fprecision; + /*step= fstep;*/ /*UNUSED*/ + /*precision= fprecision;*/ /*UNUSED*/ } else return; diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 1f25f968213..e96740d6353 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -1893,15 +1893,12 @@ void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, const char *propname, int groups, cols, layers; int group, col, layer, row; int cols_per_group = 5; - const char *desc; - + prop= RNA_struct_find_property(ptr, propname); if (!prop) { printf("uiTemplateLayer: layers property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname); return; } - - desc= RNA_property_description(prop); /* the number of layers determines the way we group them * - we want 2 rows only (for now) diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c index 54a3adc5da3..cdccc1e0110 100644 --- a/source/blender/editors/mesh/editmesh_mods.c +++ b/source/blender/editors/mesh/editmesh_mods.c @@ -4474,8 +4474,6 @@ static int mesh_noise_exec(bContext *C, wmOperator *op) void MESH_OT_noise(wmOperatorType *ot) { - PropertyRNA *prop; - /* identifiers */ ot->name= "Noise"; ot->description= "Use vertex coordinate as texture coordinate"; @@ -4488,8 +4486,7 @@ void MESH_OT_noise(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - prop= RNA_def_float(ot->srna, "factor", 0.1f, -FLT_MAX, FLT_MAX, "Factor", "", 0.0f, 1.0f); - + RNA_def_float(ot->srna, "factor", 0.1f, -FLT_MAX, FLT_MAX, "Factor", "", 0.0f, 1.0f); } void flipface(EditMesh *em, EditFace *efa) diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 0fde8d75990..3e359101f3a 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -5685,7 +5685,7 @@ static int collapseEdges(EditMesh *em) CollectedEdge *curredge; Collection *edgecollection; - int totedges, groupcount, mergecount,vcount; + int totedges, mergecount,vcount /*, groupcount*/; float avgcount[3]; allcollections.first = 0; @@ -5694,7 +5694,7 @@ static int collapseEdges(EditMesh *em) mergecount = 0; build_edgecollection(em, &allcollections); - groupcount = BLI_countlist(&allcollections); + /*groupcount = BLI_countlist(&allcollections);*/ /*UNUSED*/ for(edgecollection = allcollections.first; edgecollection; edgecollection = edgecollection->next){ diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index 682010be4db..b2cb3e06de3 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -231,7 +231,7 @@ void ED_keymap_mesh(wmKeyConfig *keyconf) 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_edgering_select", SELECTMOUSE, KM_PRESS, KM_ALT|KM_CTRL, 0); + 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); diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index 3e7b7604448..c4fe5f8fbc1 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -92,9 +92,9 @@ int join_mesh_exec(bContext *C, wmOperator *op) Object *ob= CTX_data_active_object(C); Material **matar, *ma; Mesh *me; - MVert *mvert, *mv, *mvertmain; - MEdge *medge = NULL, *medgemain; - MFace *mface = NULL, *mfacemain; + MVert *mvert, *mv; + MEdge *medge = NULL; + MFace *mface = NULL; Key *key, *nkey=NULL; KeyBlock *kb, *okb, *kbn; float imat[4][4], cmat[4][4], *fp1, *fp2, curpos; @@ -280,11 +280,7 @@ int join_mesh_exec(bContext *C, wmOperator *op) mvert= CustomData_add_layer(&vdata, CD_MVERT, CD_CALLOC, NULL, totvert); medge= CustomData_add_layer(&edata, CD_MEDGE, CD_CALLOC, NULL, totedge); mface= CustomData_add_layer(&fdata, CD_MFACE, CD_CALLOC, NULL, totface); - - mvertmain= mvert; - medgemain= medge; - mfacemain= mface; - + vertofs= 0; edgeofs= 0; faceofs= 0; diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index e4fc8c16470..cd2b0f79f1a 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -680,9 +680,7 @@ static int object_lamp_add_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; ob= ED_object_add_type(C, OB_LAMP, loc, rot, FALSE, layer); - if(ob && ob->data) - ((Lamp*)ob->data)->type= type; - + ((Lamp*)ob->data)->type= type; rename_id((ID *)ob, get_lamp_defname(type)); rename_id((ID *)ob->data, get_lamp_defname(type)); diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 9ce8488c461..0017fd0130a 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -1036,10 +1036,8 @@ static void recalc_emitter_field(Object *ob, ParticleSystem *psys) { DerivedMesh *dm=psys_get_modifier(ob,psys)->dm; PTCacheEdit *edit= psys->edit; - MFace *mface; - MVert *mvert; float *vec, *nor; - int i, totface, totvert; + int i, totface /*, totvert*/; if(!dm) return; @@ -1050,7 +1048,7 @@ static void recalc_emitter_field(Object *ob, ParticleSystem *psys) BLI_kdtree_free(edit->emitter_field); totface=dm->getNumFaces(dm); - totvert=dm->getNumVerts(dm); + /*totvert=dm->getNumVerts(dm);*/ /*UNSUED*/ edit->emitter_cosnos=MEM_callocN(totface*6*sizeof(float),"emitter cosnos"); @@ -1059,9 +1057,9 @@ static void recalc_emitter_field(Object *ob, ParticleSystem *psys) vec=edit->emitter_cosnos; nor=vec+3; - mvert=dm->getVertDataArray(dm,CD_MVERT); for(i=0; i<totface; i++, vec+=6, nor+=6) { - mface=dm->getFaceData(dm,i,CD_MFACE); + MFace *mface=dm->getFaceData(dm,i,CD_MFACE); + MVert *mvert; mvert=dm->getVertData(dm,mface->v1,CD_MVERT); VECCOPY(vec,mvert->co); @@ -2062,12 +2060,11 @@ static int remove_tagged_particles(Object *ob, ParticleSystem *psys, int mirror) POINT_P; PTCacheEditPoint *npoint=0, *new_points=0; ParticleSystemModifierData *psmd; - int i, totpart, new_totpart= psys->totpart, removed= 0; + int i, new_totpart= psys->totpart, removed= 0; if(mirror) { /* mirror tags */ psmd= psys_get_modifier(ob, psys); - totpart= psys->totpart; LOOP_TAGGED_POINTS { PE_mirror_particle(ob, psmd->dm, psys, psys->particles + p, NULL); diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 8a4a0433eb8..c2b2a0ad457 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -130,20 +130,19 @@ static void screen_opengl_render_apply(OGLRender *oglrender) */ if(view_context) { - int is_ortho; GPU_offscreen_bind(oglrender->ofs); /* bind */ /* render 3d view */ if(rv3d->persp==RV3D_CAMOB && v3d->camera) { + /*int is_ortho= scene->r.mode & R_ORTHO;*/ RE_GetCameraWindow(oglrender->re, v3d->camera, scene->r.cfra, winmat); - is_ortho= scene->r.mode & R_ORTHO; } else { rctf viewplane; float clipsta, clipend; - - is_ortho= get_view3d_viewplane(v3d, rv3d, sizex, sizey, &viewplane, &clipsta, &clipend, NULL); + + int is_ortho= get_view3d_viewplane(v3d, rv3d, sizex, sizey, &viewplane, &clipsta, &clipend, NULL); if(is_ortho) orthographic_m4(winmat, viewplane.xmin, viewplane.xmax, viewplane.ymin, viewplane.ymax, -clipend, clipend); else perspective_m4(winmat, viewplane.xmin, viewplane.xmax, viewplane.ymin, viewplane.ymax, clipsta, clipend); } diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 44fce4819f3..560819b5e0f 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -851,6 +851,10 @@ static int save_envmap(wmOperator *op, Scene *scene, EnvMap *env, char *str, int ibuf = IMB_allocImBuf(dx, dx, 24, IB_rectfloat); IMB_rectcpy(ibuf, env->cube[1], 0, 0, 0, 0, dx, dx); } + else { + BKE_report(op->reports, RPT_ERROR, "Invalid environment map type"); + return OPERATOR_CANCELLED; + } if (scene->r.color_mgt_flag & R_COLOR_MANAGEMENT) ibuf->profile = IB_PROFILE_LINEAR_RGB; diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index 9e29967a792..939a8450cb6 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -349,12 +349,18 @@ float file_string_width(const char* str) float file_font_pointsize() { +#if 0 float s; char tmp[2] = "X"; uiStyle *style= U.uistyles.first; uiStyleFontSet(&style->widget); s = BLF_height(style->widget.uifont_id, tmp); return style->widget.points; +#else + uiStyle *style= U.uistyles.first; + uiStyleFontSet(&style->widget); + return style->widget.points; +#endif } static void column_widths(struct FileList* files, struct FileLayout* layout) diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index 4f529df24dc..95c499c263b 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -299,7 +299,7 @@ static void graphedit_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap) RNA_boolean_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", 1); /* borderselect */ - kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, 0, 0); + 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, KM_ALT, 0); RNA_boolean_set(kmi->ptr, "axis_range", 1); diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index d1230d82f71..3f4c10c8155 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -438,14 +438,12 @@ static int view_all_exec(bContext *C, wmOperator *UNUSED(op)) { SpaceImage *sima; ARegion *ar; - Object *obedit; float aspx, aspy, zoomx, zoomy, w, h; int width, height; /* retrieve state */ sima= CTX_wm_space_image(C); ar= CTX_wm_region(C); - obedit= CTX_data_edit_object(C); ED_space_image_size(sima, &width, &height); ED_space_image_aspect(sima, &aspx, &aspy); diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index b0634ff25c7..c8766f5c4c1 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -4771,8 +4771,6 @@ void logic_buttons(bContext *C, ARegion *ar) uiDefButBitS(block, TOG, BUTS_CONT_LINK, B_REDR, "Link", xco+110+2*(width-100)/3, yco+35, (width-100)/3, UI_UNIT_Y, &slogic->scaflag, 0, 0, 0, 0, "Show linked Objects to Sensor/Actuator"); uiBlockEndAlign(block); - ob= CTX_data_active_object(C); - for(a=0; a<count; a++) { unsigned int controller_state_mask = 0; /* store a bitmask for states that are used */ diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c index 2a03f00e787..650205c2f44 100644 --- a/source/blender/editors/space_nla/nla_channels.c +++ b/source/blender/editors/space_nla/nla_channels.c @@ -296,7 +296,6 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho static int nlachannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent *event) { bAnimContext ac; - Scene *scene; ARegion *ar; View2D *v2d; int mval[2], channel_index; @@ -309,7 +308,6 @@ static int nlachannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent *e return OPERATOR_CANCELLED; /* get useful pointers from animation context data */ - scene= ac.scene; ar= ac.ar; v2d= &ar->v2d; diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index 901aaba2cb1..f16078ba454 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -760,7 +760,7 @@ static void draw_sphere_bone_dist(float smat[][4], float imat[][4], bPoseChannel /* smat, imat = mat & imat to draw screenaligned */ static void draw_sphere_bone_wire(float smat[][4], float imat[][4], int armflag, int boneflag, int constflag, unsigned int id, bPoseChannel *pchan, EditBone *ebone) { - float head, tail, length; + float head, tail /*, length*/; float *headvec, *tailvec, dirvec[3]; /* figure out the sizes of spheres */ @@ -768,7 +768,7 @@ static void draw_sphere_bone_wire(float smat[][4], float imat[][4], int armflag, /* 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; if (ebone->parent && (boneflag & BONE_CONNECTED)) head= ebone->parent->rad_tail; @@ -778,7 +778,7 @@ static void draw_sphere_bone_wire(float smat[][4], float imat[][4], int armflag, tailvec= ebone->tail; } else { - length= pchan->bone->length; + /*length= pchan->bone->length;*/ /*UNUSED*/ tail= pchan->bone->rad_tail; if ((pchan->parent) && (boneflag & BONE_CONNECTED)) head= pchan->parent->bone->rad_tail; diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 3047df06523..82cec1eec42 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -408,7 +408,7 @@ void Transform_Properties(struct wmOperatorType *ot, int flags) if (flags & P_CONSTRAINT) { - prop= RNA_def_boolean_vector(ot->srna, "constraint_axis", 3, NULL, "Constraint Axis", ""); + RNA_def_boolean_vector(ot->srna, "constraint_axis", 3, NULL, "Constraint Axis", ""); prop= RNA_def_property(ot->srna, "constraint_orientation", PROP_ENUM, PROP_NONE); RNA_def_property_ui_text(prop, "Orientation", "Transformation orientation"); RNA_def_enum_funcs(prop, rna_TransformOrientation_itemf); @@ -455,7 +455,7 @@ void Transform_Properties(struct wmOperatorType *ot, int flags) } // Add confirm method all the time. At the end because it's not really that important and should be hidden only in log, not in keymap edit - prop = RNA_def_boolean(ot->srna, "release_confirm", 0, "Confirm on Release", "Always confirm operation when releasing button"); + /*prop =*/ RNA_def_boolean(ot->srna, "release_confirm", 0, "Confirm on Release", "Always confirm operation when releasing button"); //RNA_def_property_flag(prop, PROP_HIDDEN); } diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 3eae81d52f1..089f192cdc8 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -1591,8 +1591,7 @@ int snapObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, float mv Object *ob = base->object; retval |= snapObject(scene, ar, ob, 0, ob->obmat, ray_start, ray_normal, mval, loc, no, dist, &depth); } - - base= FIRSTBASE; + for ( base = FIRSTBASE; base != NULL; base = base->next ) { if ( BASE_VISIBLE(v3d, base) && (base->flag & (BA_HAS_RECALC_OB|BA_HAS_RECALC_DATA)) == 0 && ((mode == SNAP_NOT_SELECTED && (base->flag & (SELECT|BA_WAS_SEL)) == 0) || (ELEM(mode, SNAP_ALL, SNAP_NOT_OBEDIT) && base != BASACT)) ) { Object *ob = base->object; diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 033cfdc2912..8a2a52df2c8 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -1086,7 +1086,6 @@ typedef struct UVVertAverage { static int stitch_exec(bContext *C, wmOperator *op) { - SpaceImage *sima; Scene *scene; Object *obedit; EditMesh *em; @@ -1094,8 +1093,7 @@ static int stitch_exec(bContext *C, wmOperator *op) EditVert *eve; Image *ima; MTFace *tf; - - sima= CTX_wm_space_image(C); + scene= CTX_data_scene(C); obedit= CTX_data_edit_object(C); em= BKE_mesh_get_editmesh((Mesh*)obedit->data); |