correct some warnings, also sensor_x was being paassed to object_camera_matrix(....
authorCampbell Barton <ideasman42@gmail.com>
Fri, 4 Nov 2011 15:21:34 +0000 (15:21 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 4 Nov 2011 15:21:34 +0000 (15:21 +0000)
build_files/cmake/project_info.py
doc/python_api/sphinx_doc_gen.py
release/scripts/startup/bl_ui/properties_data_camera.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
source/blender/blenkernel/intern/object.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/space_view3d/view3d_draw.c

index da1f2087f4f15c7c0a5e2bbea0dfc96c29526b68..eed002ce7ba4c868ba7caa5c2bfdd95aef93f8a9 100755 (executable)
@@ -234,4 +234,3 @@ def project_name_get(path, fallback="Blender", prefix="Blender_"):
             if "/branches/" in l:
                 return prefix + l.rsplit("/branches/", 1)[-1].split("/", 1)[0]
     return fallback
             if "/branches/" in l:
                 return prefix + l.rsplit("/branches/", 1)[-1].split("/", 1)[0]
     return fallback
-
index b0127c50b294a3e24b72742c2cbeb5dd9c57a32d..3c43b5bc4dab1ef3195ed5404c5f57644bb2eb65 100644 (file)
@@ -121,9 +121,7 @@ except ImportError:
     EXCLUDE_MODULES = EXCLUDE_MODULES + ("aud", )
 
 
     EXCLUDE_MODULES = EXCLUDE_MODULES + ("aud", )
 
 
-
 # import rpdb2; rpdb2.start_embedded_debugger('test')
 # import rpdb2; rpdb2.start_embedded_debugger('test')
-
 import os
 import inspect
 import bpy
 import os
 import inspect
 import bpy
@@ -327,7 +325,7 @@ def py_descr2sphinx(ident, fw, descr, module_name, type_name, identifier):
         fw(ident + ".. attribute:: %s\n\n" % identifier)
         write_indented_lines(ident + "   ", fw, doc, False)
         fw("\n")
         fw(ident + ".. attribute:: %s\n\n" % identifier)
         write_indented_lines(ident + "   ", fw, doc, False)
         fw("\n")
-    elif type(descr) == MemberDescriptorType: # same as above but use 'data'
+    elif type(descr) == MemberDescriptorType:  # same as above but use 'data'
         fw(ident + ".. data:: %s\n\n" % identifier)
         write_indented_lines(ident + "   ", fw, doc, False)
         fw("\n")
         fw(ident + ".. data:: %s\n\n" % identifier)
         write_indented_lines(ident + "   ", fw, doc, False)
         fw("\n")
@@ -443,7 +441,7 @@ def pymodule2sphinx(BASEPATH, module_name, module, title):
         # naughty, we also add getset's into PyStructs, this is not typical py but also not incorrect.
 
         # type_name is only used for examples and messages
         # naughty, we also add getset's into PyStructs, this is not typical py but also not incorrect.
 
         # type_name is only used for examples and messages
-        type_name = str(type(module)).strip("<>").split(" ", 1)[-1][1:-1] # "<class 'bpy.app.handlers'>" --> bpy.app.handlers
+        type_name = str(type(module)).strip("<>").split(" ", 1)[-1][1:-1]  # "<class 'bpy.app.handlers'>" --> bpy.app.handlers
         if type(descr) == types.GetSetDescriptorType:
             py_descr2sphinx("", fw, descr, module_name, type_name, key)
             attribute_set.add(key)
         if type(descr) == types.GetSetDescriptorType:
             py_descr2sphinx("", fw, descr, module_name, type_name, key)
             attribute_set.add(key)
@@ -467,7 +465,7 @@ def pymodule2sphinx(BASEPATH, module_name, module, title):
             # ack, cant use typical reference because we double up once here
             # and one fort he module!
             full_name = "%s.%s" % (module_name, type_name)
             # ack, cant use typical reference because we double up once here
             # and one fort he module!
             full_name = "%s.%s" % (module_name, type_name)
-            fw("   :ref:`%s submodule details <%s>`\n\n\n" % (full_name, module_id_as_ref(full_name))) #  % (module_name, type_name)
+            fw("   :ref:`%s submodule details <%s>`\n\n\n" % (full_name, module_id_as_ref(full_name)))
             del full_name
 
         attribute_set.add(key)
             del full_name
 
         attribute_set.add(key)
@@ -1306,7 +1304,7 @@ def rna2sphinx(BASEPATH):
         from bpy import app as module
         pymodule2sphinx(BASEPATH, "bpy.app", module, "Application Data")
 
         from bpy import app as module
         pymodule2sphinx(BASEPATH, "bpy.app", module, "Application Data")
 
-    if "bpy.app.handlers" not in EXCLUDE_MODULES:    
+    if "bpy.app.handlers" not in EXCLUDE_MODULES:
         from bpy.app import handlers as module
         pymodule2sphinx(BASEPATH, "bpy.app.handlers", module, "Application Handlers")
 
         from bpy.app import handlers as module
         pymodule2sphinx(BASEPATH, "bpy.app.handlers", module, "Application Handlers")
 
index 4adaad75e42863a6f1e56b1be2aa3190edadc490..4061a331261054d202bd501262f1431855e74d7f 100644 (file)
@@ -142,7 +142,7 @@ class DATA_PT_camera(CameraButtonsPanel, Panel):
 
         col = split.column(align=True)
         col.prop(cam, "sensor_fit", text="")
 
         col = split.column(align=True)
         col.prop(cam, "sensor_fit", text="")
+
         layout.label(text="Clipping:")
         row = layout.row(align=True)
         row.prop(cam, "clip_start", text="Start")
         layout.label(text="Clipping:")
         row = layout.row(align=True)
         row.prop(cam, "clip_start", text="Start")
index 591191321eea68b4627d2ada2a8b2cf3a3e253d8..96201a4b9607d2a2f14e75a29a26710767d463d3 100644 (file)
@@ -1133,7 +1133,7 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel, Panel):
         sub.prop(ipaint, "normal_angle", text="")
 
         split = layout.split()
         sub.prop(ipaint, "normal_angle", text="")
 
         split = layout.split()
-        
+
         split.active = (use_projection)
         split.prop(ipaint, "use_stencil_layer", text="Stencil")
 
         split.active = (use_projection)
         split.prop(ipaint, "use_stencil_layer", text="Stencil")
 
@@ -1148,10 +1148,10 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel, Panel):
         row.menu("VIEW3D_MT_tools_projectpaint_clone", text=mesh.uv_texture_clone.name)
 
         layout.prop(ipaint, "seam_bleed")
         row.menu("VIEW3D_MT_tools_projectpaint_clone", text=mesh.uv_texture_clone.name)
 
         layout.prop(ipaint, "seam_bleed")
-        
+
         col = layout.column()
         col.label(text="External Editing:")
         col = layout.column()
         col.label(text="External Editing:")
-        
+
         row = col.split(align=True, percentage=0.55)
         row.operator("image.project_edit", text="Quick Edit")
         row.operator("image.project_apply", text="Apply")
         row = col.split(align=True, percentage=0.55)
         row.operator("image.project_edit", text="Quick Edit")
         row.operator("image.project_apply", text="Apply")
index cec2f0f6895301b5b578f952858a0a9ac0be683f..9a0dbd2a2ebf166895e60b7a9c41dcb8d5e10a72 100644 (file)
@@ -3045,7 +3045,7 @@ void object_camera_matrix(
                else if((*sensor_fit)==CAMERA_SENSOR_FIT_HOR) {
                        viewfac= winx;
                }
                else if((*sensor_fit)==CAMERA_SENSOR_FIT_HOR) {
                        viewfac= winx;
                }
-               else {
+               else { /* if((*sensor_fit)==CAMERA_SENSOR_FIT_VERT) { */
                        viewfac= (*ycor) * winy;
                }
 
                        viewfac= (*ycor) * winy;
                }
 
@@ -3060,7 +3060,7 @@ void object_camera_matrix(
                else if((*sensor_fit)==CAMERA_SENSOR_FIT_HOR) {
                        viewfac= ((*lens) * winx) / (*sensor_x);
                }
                else if((*sensor_fit)==CAMERA_SENSOR_FIT_HOR) {
                        viewfac= ((*lens) * winx) / (*sensor_x);
                }
-               else if((*sensor_fit)==CAMERA_SENSOR_FIT_VERT) {
+               else { /* if((*sensor_fit)==CAMERA_SENSOR_FIT_VERT) { */
                        viewfac= ((*lens) * winy) / (*sensor_y);
                }
 
                        viewfac= ((*lens) * winy) / (*sensor_y);
                }
 
index 0f230df049e39fb2196ccded5d220001e6d2c278..b77f3977355ba4a5951104deda030f6b0adb5c2a 100644 (file)
@@ -3408,20 +3408,20 @@ static void ui_ndofedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, wmND
 {
        float *hsv= ui_block_hsv_get(but->block);
        float rgb[3];
 {
        float *hsv= ui_block_hsv_get(but->block);
        float rgb[3];
-       float phi, r, sqr, v[2];
-       float sensitivity = (shift?0.15:0.3) * ndof->dt;
+       float phi, r /*, sqr */ /* UNUSED */, v[2];
+       float sensitivity = (shift ? 0.15f : 0.3f) * ndof->dt;
        
        ui_get_but_vectorf(but, rgb);
        rgb_to_hsv_compat(rgb[0], rgb[1], rgb[2], hsv, hsv+1, hsv+2);
        
        /* Convert current colour on hue/sat disc to circular coordinates phi, r */
        
        ui_get_but_vectorf(but, rgb);
        rgb_to_hsv_compat(rgb[0], rgb[1], rgb[2], hsv, hsv+1, hsv+2);
        
        /* Convert current colour on hue/sat disc to circular coordinates phi, r */
-       phi = fmodf(hsv[0]+0.25, 1.0f) * -2.0f*M_PI;
+       phi = fmodf(hsv[0]+0.25f, 1.0f) * -2.0f*M_PI;
        r = hsv[1];
        r = hsv[1];
-       sqr = r>0.f?sqrtf(r):1;
+       /* sqr= r>0.f?sqrtf(r):1; */ /* UNUSED */
        
        /* Convert to 2d vectors */
        
        /* Convert to 2d vectors */
-       v[0] = r * cos(phi);
-       v[1] = r * sin(phi);
+       v[0] = r * cosf(phi);
+       v[1] = r * sinf(phi);
        
        /* Use ndof device y and x rotation to move the vector in 2d space */
        v[0] += ndof->ry * sensitivity;
        
        /* Use ndof device y and x rotation to move the vector in 2d space */
        v[0] += ndof->ry * sensitivity;
@@ -3431,19 +3431,19 @@ static void ui_ndofedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, wmND
        phi = atan2(v[0], v[1])/(2.0f*(float)M_PI) + 0.5f;
        
        /* use ndof z rotation to additionally rotate hue */
        phi = atan2(v[0], v[1])/(2.0f*(float)M_PI) + 0.5f;
        
        /* use ndof z rotation to additionally rotate hue */
-       phi -= ndof->rz * sensitivity * 0.5;
+       phi -= ndof->rz * sensitivity * 0.5f;
        
        r = len_v2(v);
        CLAMP(r, 0.0f, 1.0f);
        
        /* convert back to hsv values, in range [0,1] */
        
        r = len_v2(v);
        CLAMP(r, 0.0f, 1.0f);
        
        /* convert back to hsv values, in range [0,1] */
-       hsv[0] = fmodf(phi, 1.0);
+       hsv[0] = fmodf(phi, 1.0f);
        hsv[1] = r;
 
        /* exception, when using color wheel in 'locked' value state:
         * allow choosing a hue for black values, by giving a tiny increment */
        if (but->flag & UI_BUT_COLOR_LOCK) { // lock
        hsv[1] = r;
 
        /* exception, when using color wheel in 'locked' value state:
         * allow choosing a hue for black values, by giving a tiny increment */
        if (but->flag & UI_BUT_COLOR_LOCK) { // lock
-               if (hsv[2] == 0.f) hsv[2] = 0.0001f;
+               if (hsv[2] == 0.0f) hsv[2] = 0.0001f;
        }
        
        hsv_to_rgb(hsv[0], hsv[1], hsv[2], data->vec, data->vec+1, data->vec+2);
        }
        
        hsv_to_rgb(hsv[0], hsv[1], hsv[2], data->vec, data->vec+1, data->vec+2);
index 92544b2309c8123a2695b2464181fc9fe4ebc6d5..6b6003fb098ae646be22a1ad6dc9102eb5de76b2 100644 (file)
@@ -3014,7 +3014,7 @@ static void project_paint_begin(ProjPaintState *ps)
                                object_camera_mode(&ps->scene->r, camera);
                                object_camera_matrix(&ps->scene->r, camera, ps->winx, ps->winy, 0,
                                                winmat, &_viewplane, &ps->clipsta, &ps->clipend,
                                object_camera_mode(&ps->scene->r, camera);
                                object_camera_matrix(&ps->scene->r, camera, ps->winx, ps->winy, 0,
                                                winmat, &_viewplane, &ps->clipsta, &ps->clipend,
-                                               &_lens, &_sensor_x, &_sensor_x, &_sensor_fit, &_ycor, &_viewdx, &_viewdy);
+                                               &_lens, &_sensor_x, &_sensor_y, &_sensor_fit, &_ycor, &_viewdx, &_viewdy);
 
                                ps->is_ortho= (ps->scene->r.mode & R_ORTHO) ? 1 : 0;
                        }
 
                                ps->is_ortho= (ps->scene->r.mode & R_ORTHO) ? 1 : 0;
                        }
index a764ae77c9d4f7d2c7f0f84b126abb7913cbb2ab..aa69e7121e0d35aec6fba55236aa7100a671b229 100644 (file)
@@ -1228,7 +1228,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d)
                if (ca && (ca->flag & CAM_SHOWSENSOR)) {
                        /* assume fixed sensor width for now */
 
                if (ca && (ca->flag & CAM_SHOWSENSOR)) {
                        /* assume fixed sensor width for now */
 
-                       float sensor_aspect = ca->sensor_x / ca->sensor_y;
+                       /* float sensor_aspect = ca->sensor_x / ca->sensor_y; */ /* UNUSED */
                        float sensor_scale = (x2i-x1i) / ca->sensor_x;
                        float sensor_height = sensor_scale * ca->sensor_y;
 
                        float sensor_scale = (x2i-x1i) / ca->sensor_x;
                        float sensor_height = sensor_scale * ca->sensor_y;
 
@@ -1238,7 +1238,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d)
 
                        UI_ThemeColorShade(TH_WIRE, 100);
 
 
                        UI_ThemeColorShade(TH_WIRE, 100);
 
-                       uiDrawBox(GL_LINE_LOOP, x1i, sy1, x2i, sy2, 2.0);
+                       uiDrawBox(GL_LINE_LOOP, x1i, sy1, x2i, sy2, 2.0f);
                }
        }
 
                }
        }