correct misc warnings

This commit is contained in:
Campbell Barton
2011-07-26 13:33:04 +00:00
parent 40353fe0d8
commit ca293c835f
5 changed files with 10 additions and 6 deletions

View File

@@ -806,14 +806,14 @@ static int object_delete_exec(bContext *C, wmOperator *UNUSED(op))
{
Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
int islamp= 0;
/* int islamp= 0; */ /* UNUSED */
if(CTX_data_edit_object(C))
return OPERATOR_CANCELLED;
CTX_DATA_BEGIN(C, Base*, base, selected_bases) {
if(base->object->type==OB_LAMP) islamp= 1;
/* if(base->object->type==OB_LAMP) islamp= 1; */
/* deselect object -- it could be used in other scenes */
base->object->flag &= ~SELECT;

View File

@@ -129,7 +129,6 @@ void ED_view3d_camera_lock_sync(View3D *v3d, RegionView3D *rv3d)
}
else {
ED_view3d_to_object(v3d->camera, rv3d->ofs, rv3d->viewquat, rv3d->dist);
root_parent= v3d->camera;
DAG_id_tag_update(&v3d->camera->id, OB_RECALC_OB);
WM_main_add_notifier(NC_OBJECT|ND_TRANSFORM, v3d->camera);
}

View File

@@ -1944,6 +1944,11 @@ static void applyGrid(TransInfo *t, float *val, int max_index, float fac[3], Gea
int i;
float asp[3] = {1.0f, 1.0f, 1.0f}; // TODO: Remove hard coded limit here (3)
if(max_index > 3) {
printf("applyGrid: invalid index %d, clamping\n", max_index);
max_index= 3;
}
// Early bailing out if no need to snap
if (fac[action] == 0.0f)
return;

View File

@@ -1060,8 +1060,8 @@ static void weld_align_uv(bContext *C, int tool)
if(tool == 's' || tool == 't' || tool == 'u') {
/* pass 1&2 variables */
int i, j;
int starttmpl= -1, connectedtostarttmpl, startcorner;
int endtmpl= -1, connectedtoendtmpl, endcorner;
int starttmpl= -1, connectedtostarttmpl= -1, startcorner;
int endtmpl= -1, connectedtoendtmpl= -1, endcorner;
MTFace *startface, *endface;
int itmpl, jtmpl;
EditVert *eve;

View File

@@ -544,7 +544,7 @@ void RNA_api_object(StructRNA *srna)
/* location of point for test and max distance */
parm= RNA_def_float_vector(func, "point", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4);
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_float(func, "max_dist", sqrt(FLT_MAX), 0.0, FLT_MAX, "", "", 0.0, FLT_MAX);
RNA_def_float(func, "max_dist", sqrt(FLT_MAX), 0.0, FLT_MAX, "", "", 0.0, FLT_MAX);
/* return location and normal */
parm= RNA_def_float_vector(func, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "The location on the object closest to the point", -1e4, 1e4);