diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/animation/keyframes_general.c | 4 | ||||
-rw-r--r-- | source/blender/editors/interface/interface.c | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/view2d_ops.c | 8 | ||||
-rw-r--r-- | source/blender/editors/object/object_select.c | 4 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_proj.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_info/textview.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 8 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_draw.c | 2 |
8 files changed, 18 insertions, 14 deletions
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index 640568a99e4..8f5510a2273 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -408,8 +408,8 @@ void sample_fcurve(FCurve *fcu) * keyframes while sampling will affect the outcome... * - only start sampling+adding from index=1, so that we don't overwrite original keyframe */ - range = (int)(ceil(end->vec[1][0] - start->vec[1][0]) ); - sfra = (int)(floor(start->vec[1][0]) ); + range = (int)(ceil(end->vec[1][0] - start->vec[1][0])); + sfra = (int)(floor(start->vec[1][0])); if (range) { value_cache = MEM_callocN(sizeof(TempFrameValCache) * range, "IcuFrameValCache"); diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 6981f90d644..695c8866d08 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1523,7 +1523,7 @@ void uiComposeLinks(uiBlock *block) } } else if (link->poin) { - bt = ui_find_inlink(block, *(link->poin) ); + bt = ui_find_inlink(block, *link->poin); if (bt) { if ((but->flag & UI_BUT_SCA_LINK_GREY) || (bt->flag & UI_BUT_SCA_LINK_GREY)) { ui_add_link_line(&link->lines, but, bt, true); diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 4c3aa8540fe..895a5f145f0 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -1561,7 +1561,7 @@ enum { */ static short mouse_in_scroller_handle(int mouse, int sc_min, int sc_max, int sh_min, int sh_max) { - short in_min, in_max, in_bar, out_min, out_max, in_view = 1; + bool in_min, in_max, in_bar, out_min, out_max, in_view = 1; /* firstly, check if * - 'bubble' fills entire scroller @@ -1584,9 +1584,9 @@ static short mouse_in_scroller_handle(int mouse, int sc_min, int sc_max, int sh_ /* check if mouse is in or past either handle */ /* TODO: check if these extents are still valid or not */ - in_max = ( (mouse >= (sh_max - V2D_SCROLLER_HANDLE_SIZE)) && (mouse <= (sh_max + V2D_SCROLLER_HANDLE_SIZE)) ); - in_min = ( (mouse <= (sh_min + V2D_SCROLLER_HANDLE_SIZE)) && (mouse >= (sh_min - V2D_SCROLLER_HANDLE_SIZE)) ); - in_bar = ( (mouse < (sh_max - V2D_SCROLLER_HANDLE_SIZE)) && (mouse > (sh_min + V2D_SCROLLER_HANDLE_SIZE)) ); + in_max = ((mouse >= (sh_max - V2D_SCROLLER_HANDLE_SIZE)) && (mouse <= (sh_max + V2D_SCROLLER_HANDLE_SIZE))); + in_min = ((mouse <= (sh_min + V2D_SCROLLER_HANDLE_SIZE)) && (mouse >= (sh_min - V2D_SCROLLER_HANDLE_SIZE))); + in_bar = ((mouse < (sh_max - V2D_SCROLLER_HANDLE_SIZE)) && (mouse > (sh_min + V2D_SCROLLER_HANDLE_SIZE))); out_min = mouse < (sh_min - V2D_SCROLLER_HANDLE_SIZE); out_max = mouse > (sh_max + V2D_SCROLLER_HANDLE_SIZE); diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index 9b1aa054f84..e295a63848a 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -753,11 +753,11 @@ static bool select_grouped_color(bContext *C, Object *ob) static bool objects_share_gameprop(Object *a, Object *b) { bProperty *prop; - /*make a copy of all its properties*/ for (prop = a->prop.first; prop; prop = prop->next) { - if (BKE_bproperty_object_get(b, prop->name) ) + if (BKE_bproperty_object_get(b, prop->name)) { return 1; + } } return 0; } diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 614c16654bb..72c226f825b 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -2954,7 +2954,7 @@ static void project_paint_begin(ProjPaintState *ps) ps->dm_release = true; } - if (!CustomData_has_layer(&ps->dm->faceData, CD_MTFACE) ) { + if (!CustomData_has_layer(&ps->dm->faceData, CD_MTFACE)) { if (ps->dm_release) ps->dm->release(ps->dm); diff --git a/source/blender/editors/space_info/textview.c b/source/blender/editors/space_info/textview.c index c09c684ac7a..33333e4c992 100644 --- a/source/blender/editors/space_info/textview.c +++ b/source/blender/editors/space_info/textview.c @@ -290,7 +290,7 @@ int textview_draw(TextViewContext *tvc, const int draw, int mval[2], void **mous cdc.lheight = tvc->lheight; cdc.lofs = -BLF_descender(mono); /* note, scroll bar must be already subtracted () */ - cdc.console_width = (tvc->winx - (CONSOLE_DRAW_MARGIN * 2) ) / cdc.cwidth; + cdc.console_width = (tvc->winx - (CONSOLE_DRAW_MARGIN * 2)) / cdc.cwidth; /* avoid divide by zero on small windows */ if (cdc.console_width < 1) cdc.console_width = 1; diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 286585f5f1d..b760d9f5aa8 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -946,9 +946,13 @@ static void node_shader_buts_subsurface(uiLayout *layout, bContext *C, PointerRN PointerRNA scene = CTX_data_pointer_get(C, "scene"); if (scene.data) { PointerRNA cscene = RNA_pointer_get(&scene, "cycles"); - if (cscene.data && (RNA_enum_get(&cscene, "device") == 1 && U.compute_device_type != 0 - && RNA_enum_get(&cscene, "feature_set") == 0)) + if (cscene.data && + ((U.compute_device_type != USER_COMPUTE_DEVICE_NONE) && + (RNA_enum_get(&cscene, "device") == 1) && + (RNA_enum_get(&cscene, "feature_set") == 0))) + { uiItemL(layout, IFACE_("Only enabled in experimental GPU kernel"), ICON_ERROR); + } } uiItemR(layout, ptr, "falloff", 0, "", ICON_NONE); diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index a87d9854e6c..7b5ec38f4c6 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -138,7 +138,7 @@ void ED_node_tag_update_id(ID *id) DAG_id_tag_update(id, 0); WM_main_add_notifier(NC_TEXTURE | ND_NODES, id); } - else if(id == &ntree->id) { + else if (id == &ntree->id) { /* node groups */ DAG_id_tag_update(id, 0); } |