This commit is contained in:
Campbell Barton 2014-08-27 09:49:31 +10:00
parent e827d904ae
commit e71f2fc3ba
11 changed files with 26 additions and 21 deletions

@ -873,9 +873,9 @@ bool BKE_object_is_in_wpaint_select_vert(Object *ob)
{
if (ob->type == OB_MESH) {
Mesh *me = ob->data;
return ( (ob->mode & OB_MODE_WEIGHT_PAINT) &&
return ((ob->mode & OB_MODE_WEIGHT_PAINT) &&
(me->edit_btmesh == NULL) &&
(ME_EDIT_PAINT_SEL_MODE(me) == SCE_SELECT_VERTEX) );
(ME_EDIT_PAINT_SEL_MODE(me) == SCE_SELECT_VERTEX));
}
return false;
@ -2306,7 +2306,7 @@ static bool where_is_object_parslow(Object *ob, float obmat[4][4], float slowmat
int a;
/* include framerate */
fac1 = (1.0f / (1.0f + fabsf(ob->sf)) );
fac1 = (1.0f / (1.0f + fabsf(ob->sf)));
if (fac1 >= 1.0f) return 0;
fac2 = 1.0f - fac1;

@ -686,7 +686,7 @@ static int implicit_leafs_index(BVHBuildHelper *data, int depth, int child_index
/* This functions returns the number of branches needed to have the requested number of leafs. */
static int implicit_needed_branches(int tree_type, int leafs)
{
return max_ii(1, (leafs + tree_type - 3) / (tree_type - 1) );
return max_ii(1, (leafs + tree_type - 3) / (tree_type - 1));
}
/**

@ -366,11 +366,12 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
for (md = ob->modifiers.first; md; md = md->next) {
if (md->type == eModifierType_ParticleSystem) {
ParticleSystemModifierData *pmd = (ParticleSystemModifierData*) md;
if (pmd->psys && pmd->psys->clmd)
ParticleSystemModifierData *pmd = (ParticleSystemModifierData *)md;
if (pmd->psys && pmd->psys->clmd) {
pmd->psys->clmd->sim_parms->vel_damping = 1.0f;
}
}
}
}
}
}

@ -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");

@ -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);

@ -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);

@ -753,12 +753,12 @@ 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;
}

@ -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);

@ -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;

@ -946,10 +946,14 @@ 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);
}

@ -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);
}