diff options
-rwxr-xr-x | build_files/cmake/project_info.py | 1 | ||||
-rw-r--r-- | doc/python_api/sphinx_doc_gen.py | 10 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_data_camera.py | 2 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 4 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 18 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 4 |
8 files changed, 22 insertions, 25 deletions
diff --git a/build_files/cmake/project_info.py b/build_files/cmake/project_info.py index da1f2087f4f..eed002ce7ba 100755 --- a/build_files/cmake/project_info.py +++ b/build_files/cmake/project_info.py @@ -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 - diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index b0127c50b29..3c43b5bc4da 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -121,9 +121,7 @@ except ImportError: EXCLUDE_MODULES = EXCLUDE_MODULES + ("aud", ) - # import rpdb2; rpdb2.start_embedded_debugger('test') - 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") - 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") @@ -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 - 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) @@ -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) - 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) @@ -1306,7 +1304,7 @@ def rna2sphinx(BASEPATH): 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") diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py index 4adaad75e42..4061a331261 100644 --- a/release/scripts/startup/bl_ui/properties_data_camera.py +++ b/release/scripts/startup/bl_ui/properties_data_camera.py @@ -142,7 +142,7 @@ class DATA_PT_camera(CameraButtonsPanel, Panel): 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") diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 591191321ee..96201a4b960 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1133,7 +1133,7 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel, Panel): sub.prop(ipaint, "normal_angle", text="") split = layout.split() - + 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") - + 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") diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index cec2f0f6895..9a0dbd2a2eb 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -3045,7 +3045,7 @@ void object_camera_matrix( else if((*sensor_fit)==CAMERA_SENSOR_FIT_HOR) { viewfac= winx; } - else { + else { /* if((*sensor_fit)==CAMERA_SENSOR_FIT_VERT) { */ 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_VERT) { + else { /* if((*sensor_fit)==CAMERA_SENSOR_FIT_VERT) { */ viewfac= ((*lens) * winy) / (*sensor_y); } diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 0f230df049e..b77f3977355 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -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 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 */ - 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]; - sqr = r>0.f?sqrtf(r):1; + /* sqr= r>0.f?sqrtf(r):1; */ /* UNUSED */ /* 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; @@ -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 -= 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] */ - 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 - 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); diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 92544b2309c..6b6003fb098 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -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, - &_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; } diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index a764ae77c9d..aa69e7121e0 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -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 */ - 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; @@ -1238,7 +1238,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) 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); } } |