Cleanup: style
This commit is contained in:
parent
6c42079b78
commit
e1fb080743
@ -418,7 +418,7 @@ void AbcExporter::createTransformWriter(Object *ob, Object *parent, Object *dupl
|
||||
BLI_assert(ob != dupliObParent);
|
||||
|
||||
/* check if we have already created a transform writer for this object */
|
||||
if (getXForm(name) != NULL){
|
||||
if (getXForm(name) != NULL) {
|
||||
std::cerr << "xform " << name << " already exists\n";
|
||||
return;
|
||||
}
|
||||
|
@ -2126,10 +2126,10 @@ static int gp_count_subdivision_cuts(bGPDstroke *gps)
|
||||
int totnewpoints = 0;
|
||||
for (i = 0, pt = gps->points; i < gps->totpoints && pt; i++, pt++) {
|
||||
if (pt->flag & GP_SPOINT_SELECT) {
|
||||
if (i + 1 < gps->totpoints){
|
||||
if (i + 1 < gps->totpoints) {
|
||||
if (gps->points[i + 1].flag & GP_SPOINT_SELECT) {
|
||||
++totnewpoints;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2184,7 +2184,7 @@ static int gp_stroke_subdivide_exec(bContext *C, wmOperator *op)
|
||||
|
||||
/* if next point is selected add a half way point */
|
||||
if (pt->flag & GP_SPOINT_SELECT) {
|
||||
if (i + 1 < oldtotpoints){
|
||||
if (i + 1 < oldtotpoints) {
|
||||
if (temp_points[i + 1].flag & GP_SPOINT_SELECT) {
|
||||
pt_final = &gps->points[i2];
|
||||
/* Interpolate all values */
|
||||
@ -2196,7 +2196,7 @@ static int gp_stroke_subdivide_exec(bContext *C, wmOperator *op)
|
||||
pt_final->time = interpf(pt->time, next->time, 0.5f);
|
||||
pt_final->flag |= GP_SPOINT_SELECT;
|
||||
++i2;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2174,9 +2174,10 @@ static void ui_litem_layout_row(uiLayout *litem)
|
||||
bool min_flag = item->flag & UI_ITEM_MIN;
|
||||
/* ignore min flag for rows with right or center alignment */
|
||||
if (item->type != ITEM_BUTTON &&
|
||||
ELEM(((uiLayout *)item)->alignment, UI_LAYOUT_ALIGN_RIGHT, UI_LAYOUT_ALIGN_CENTER) &&
|
||||
litem->alignment == UI_LAYOUT_ALIGN_EXPAND &&
|
||||
((uiItem *)litem)->flag & UI_ITEM_MIN) {
|
||||
ELEM(((uiLayout *)item)->alignment, UI_LAYOUT_ALIGN_RIGHT, UI_LAYOUT_ALIGN_CENTER) &&
|
||||
litem->alignment == UI_LAYOUT_ALIGN_EXPAND &&
|
||||
((uiItem *)litem)->flag & UI_ITEM_MIN)
|
||||
{
|
||||
min_flag = false;
|
||||
}
|
||||
|
||||
|
@ -437,7 +437,7 @@ static int wm_collada_import_exec(bContext *C, wmOperator *op)
|
||||
auto_connect,
|
||||
fix_orientation,
|
||||
min_chain_length,
|
||||
keep_bind_info) )
|
||||
keep_bind_info) )
|
||||
{
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
@ -1122,15 +1122,14 @@ static bool snapDerivedMesh(
|
||||
float dist_px_sq = dist_squared_to_projected_aabb_simple(
|
||||
lpmat, snapdata->win_half, ray_min_dist, snapdata->mval,
|
||||
ray_org_local, ray_normal_local, bb->vec[0], bb->vec[6]);
|
||||
if (dist_px_sq > SQUARE(*dist_px))
|
||||
{
|
||||
if (dist_px_sq > SQUARE(*dist_px)) {
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* was BKE_boundbox_ray_hit_check, see: cf6ca226fa58 */
|
||||
if (!isect_ray_aabb_v3_simple(
|
||||
ray_start_local, ray_normal_local, bb->vec[0], bb->vec[6], NULL, NULL))
|
||||
ray_start_local, ray_normal_local, bb->vec[0], bb->vec[6], NULL, NULL))
|
||||
{
|
||||
return retval;
|
||||
}
|
||||
|
@ -809,7 +809,7 @@ int wm_homefile_read(
|
||||
if (userdef_template == NULL) {
|
||||
/* we need to have preferences load to overwrite preferences from previous template */
|
||||
userdef_template = BKE_blendfile_userdef_read_from_memory(
|
||||
datatoc_startup_blend, datatoc_startup_blend_size, NULL);
|
||||
datatoc_startup_blend, datatoc_startup_blend_size, NULL);
|
||||
}
|
||||
if (userdef_template) {
|
||||
BKE_blender_userdef_set_app_template(userdef_template);
|
||||
|
@ -397,7 +397,7 @@ static void wm_window_set_dpi(wmWindow *win)
|
||||
/* Blender's UI drawing assumes DPI 72 as a good default following macOS
|
||||
* while Windows and Linux use DPI 96. GHOST assumes a default 96 so we
|
||||
* remap the DPI to Blender's convention. */
|
||||
int dpi = auto_dpi * U.ui_scale * (72.0/96.0f);
|
||||
int dpi = auto_dpi * U.ui_scale * (72.0 / 96.0f);
|
||||
|
||||
/* Automatically set larger pixel size for high DPI. */
|
||||
int pixelsize = MAX2(1, dpi / 54);
|
||||
|
Loading…
Reference in New Issue
Block a user