Cleanup: style

This commit is contained in:
2019-03-06 10:51:11 +11:00
parent 104d9b475d
commit 85b667716a
7 changed files with 20 additions and 17 deletions

View File

@@ -83,7 +83,7 @@ void visibility_animated_check_cb(ID * /*id*/, FCurve *fcu, void *user_data)
bool is_object_visibility_animated(const Depsgraph *graph, Object *object)
{
AnimData* anim_data = BKE_animdata_from_id(&object->id);
AnimData *anim_data = BKE_animdata_from_id(&object->id);
if (anim_data == NULL) {
return false;
}

View File

@@ -97,8 +97,7 @@ void drw_state_set(DRWState state)
/* Raster Discard */
{
if (CHANGED_ANY(DRW_STATE_RASTERIZER_ENABLED))
{
if (CHANGED_ANY(DRW_STATE_RASTERIZER_ENABLED)) {
if ((state & DRW_STATE_RASTERIZER_ENABLED) != 0) {
glDisable(GL_RASTERIZER_DISCARD);
}

View File

@@ -757,10 +757,11 @@ void GPENCIL_OT_duplicate(wmOperatorType *ot)
/* ************** Extrude Selected Strokes **************** */
/* helper to copy a point to temp area */
static void copy_point(bGPDstroke *gps,
bGPDspoint *temp_points,
MDeformVert *temp_dverts,
int from_idx, int to_idx)
static void copy_point(
bGPDstroke *gps,
bGPDspoint *temp_points,
MDeformVert *temp_dverts,
int from_idx, int to_idx)
{
bGPDspoint *pt = &temp_points[from_idx];
bGPDspoint *pt_final = &gps->points[to_idx];

View File

@@ -355,9 +355,10 @@ void ED_operatormacros_gpencil(void)
wmOperatorTypeMacro *otmacro;
/* Duplicate + Move = Interactively place newly duplicated strokes */
ot = WM_operatortype_append_macro("GPENCIL_OT_duplicate_move", "Duplicate Strokes",
"Make copies of the selected Grease Pencil strokes and move them",
OPTYPE_UNDO | OPTYPE_REGISTER);
ot = WM_operatortype_append_macro(
"GPENCIL_OT_duplicate_move", "Duplicate Strokes",
"Make copies of the selected Grease Pencil strokes and move them",
OPTYPE_UNDO | OPTYPE_REGISTER);
WM_operatortype_macro_define(ot, "GPENCIL_OT_duplicate");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_boolean_set(otmacro->ptr, "gpencil_strokes", true);
@@ -365,9 +366,10 @@ void ED_operatormacros_gpencil(void)
RNA_boolean_set(otmacro->ptr, "mirror", false);
/* Extrude + Move = Interactively add new points */
ot = WM_operatortype_append_macro("GPENCIL_OT_extrude_move", "Extrude Stroke Points",
"Extrude selected points and move them",
OPTYPE_UNDO | OPTYPE_REGISTER);
ot = WM_operatortype_append_macro(
"GPENCIL_OT_extrude_move", "Extrude Stroke Points",
"Extrude selected points and move them",
OPTYPE_UNDO | OPTYPE_REGISTER);
WM_operatortype_macro_define(ot, "GPENCIL_OT_extrude");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_boolean_set(otmacro->ptr, "gpencil_strokes", true);

View File

@@ -3132,8 +3132,8 @@ static void project_paint_face_init(
in_bounds = false;
}
else if ((seam_data->corner_dist_sq[1] > 0.0f) &&
(len_squared_v2v2(puv, seam_data->seam_puvs[1]) < seam_data->corner_dist_sq[1]) &&
(len_squared_v2v2(puv, lt_puv[fidx2]) > ps->seam_bleed_px_sq))
(len_squared_v2v2(puv, seam_data->seam_puvs[1]) < seam_data->corner_dist_sq[1]) &&
(len_squared_v2v2(puv, lt_puv[fidx2]) > ps->seam_bleed_px_sq))
{
in_bounds = false;
}

View File

@@ -1647,7 +1647,8 @@ static int file_smoothscroll_invoke(bContext *C, wmOperator *UNUSED(op), const w
/* check if we have reached our final scroll position */
if ((sfile->scroll_offset >= offset + numfiles_layout_margin) &&
(sfile->scroll_offset < offset + numfiles_layout - numfiles_layout_margin)) {
(sfile->scroll_offset < offset + numfiles_layout - numfiles_layout_margin))
{
WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), sfile->smoothscroll_timer);
sfile->smoothscroll_timer = NULL;
/* Postscroll (after rename has been validated by user) is done, rename process is totally finisehd, cleanup. */

View File

@@ -290,7 +290,7 @@ static bNode *ntree_shader_output_node_from_group(bNodeTree *ntree, int target)
/* Search if node groups do not contain valid output nodes (recursively). */
for (bNode *node = ntree->nodes.first; node; node = node->next) {
if (!ELEM(node->type, NODE_GROUP)){
if (!ELEM(node->type, NODE_GROUP)) {
continue;
}
if (node->id != NULL) {