style cleanup

This commit is contained in:
2013-03-08 04:00:06 +00:00
parent ff336aca02
commit c36f20a7d2
41 changed files with 88 additions and 78 deletions

View File

@@ -192,7 +192,7 @@ void BKE_sequencer_pixel_from_sequencer_space_v4(struct Scene *scene, float pixe
/* **********************************************************************
* sequencer scene functions
* ********************************************************************** */
struct Editing *BKE_sequencer_editing_get(struct Scene *scene, int alloc);
struct Editing *BKE_sequencer_editing_get(struct Scene *scene, bool alloc);
struct Editing *BKE_sequencer_editing_ensure(struct Scene *scene);
void BKE_sequencer_editing_free(struct Scene *scene);

View File

@@ -26,7 +26,6 @@
* \ingroup bke
*/
#include <stddef.h>
#include "BLO_sys_types.h" /* for intptr_t */
@@ -34,7 +33,6 @@
#include "MEM_guardedalloc.h"
#include "DNA_sequence_types.h"
#include "BKE_sequencer.h"
#include "IMB_moviecache.h"
#include "IMB_imbuf.h"
@@ -42,6 +40,8 @@
#include "BLI_listbase.h"
#include "BKE_sequencer.h"
typedef struct SeqCacheKey {
struct Sequence *seq;
SeqRenderData context;

View File

@@ -245,7 +245,7 @@ static void seq_free_sequence_recurse(Scene *scene, Sequence *seq)
}
Editing *BKE_sequencer_editing_get(Scene *scene, int alloc)
Editing *BKE_sequencer_editing_get(Scene *scene, bool alloc)
{
if (alloc) {
BKE_sequencer_editing_ensure(scene);

View File

@@ -31,7 +31,7 @@ struct Scene;
struct Sequence;
struct SpaceSeq;
void ED_sequencer_select_sequence_single(struct Scene *scene, struct Sequence *seq, int deselect_all);
void ED_sequencer_select_sequence_single(struct Scene *scene, struct Sequence *seq, bool deselect_all);
void ED_sequencer_deselect_all(struct Scene *scene);
int ED_space_sequencer_maskedit_mask_poll(struct bContext *C);

View File

@@ -408,11 +408,13 @@ typedef struct UndoImageTile {
* paint operation, but for now just give a public interface */
static ImagePaintPartialRedraw imapaintpartial = {0, 0, 0, 0, 0};
ImagePaintPartialRedraw *get_imapaintpartial(void) {
ImagePaintPartialRedraw *get_imapaintpartial(void)
{
return &imapaintpartial;
}
void set_imapaintpartial(struct ImagePaintPartialRedraw *ippr) {
void set_imapaintpartial(struct ImagePaintPartialRedraw *ippr)
{
imapaintpartial = *ippr;
}

View File

@@ -944,7 +944,8 @@ int paint_2d_stroke(void *ps, const int mval[2], float pressure, int eraser)
return redraw;
}
void *paint_2d_new_stroke(bContext *C, wmOperator *op) {
void *paint_2d_new_stroke(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
ToolSettings *settings = scene->toolsettings;
Brush *brush = paint_brush(&settings->imapaint.paint);
@@ -980,7 +981,8 @@ void *paint_2d_new_stroke(bContext *C, wmOperator *op) {
return s;
}
void paint_2d_redraw (const bContext *C, void *ps, int final) {
void paint_2d_redraw (const bContext *C, void *ps, int final)
{
ImagePaintState *s = ps;
if (final) {
@@ -998,7 +1000,8 @@ void paint_2d_redraw (const bContext *C, void *ps, int final) {
}
}
void paint_2d_stroke_done(void *ps) {
void paint_2d_stroke_done(void *ps)
{
ImagePaintState *s = ps;
paint_2d_canvas_free(s);

View File

@@ -24,7 +24,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
/** \file blender/editors/sculpt_paint/paint_image.c
/** \file blender/editors/sculpt_paint/paint_image_proj.c
* \ingroup edsculpt
* \brief Functions to paint images in 2D and 3D.
*/
@@ -4310,7 +4310,8 @@ static void paint_redraw(const bContext *C, PaintOperation *pop, int final)
{
if (pop->mode == PAINT_MODE_2D) {
paint_2d_redraw(C, pop->custom_paint, final);
} else {
}
else {
if (final) {
/* compositor listener deals with updating */
WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, NULL);
@@ -4509,8 +4510,10 @@ static void paint_stroke_done(const bContext *C, struct PaintStroke *stroke)
paint_brush_exit_tex(pop->ps.brush);
project_paint_end(&pop->ps);
} else
}
else {
paint_2d_stroke_done(pop->custom_paint);
}
paint_redraw(C, pop, 1);
undo_paint_push_end(UNDO_PAINT_IMAGE);
@@ -4529,7 +4532,8 @@ static void paint_stroke_done(const bContext *C, struct PaintStroke *stroke)
}
}
static int paint_stroke_test_start(bContext * UNUSED(C), wmOperator * UNUSED(op), const float UNUSED(mouse[2])) {
static int paint_stroke_test_start(bContext *UNUSED(C), wmOperator *UNUSED(op), const float UNUSED(mouse[2]))
{
return true;
}

View File

@@ -338,7 +338,8 @@ bool paint_supports_dynamic_size(Brush *br)
!ELEM4(br->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_THUMB, SCULPT_TOOL_ROTATE, SCULPT_TOOL_SNAKE_HOOK);
}
bool paint_supports_jitter(PaintMode mode) {
bool paint_supports_jitter(PaintMode mode)
{
return ELEM(mode, PAINT_SCULPT, PAINT_TEXTURE_PROJECTIVE);
}

View File

@@ -526,9 +526,9 @@ static void sequence_cb(int event, TreeElement *te, TreeStoreElem *tselem, void
Sequence *seq = (Sequence *)te->directdata;
if (event == 1) {
Scene *scene = (Scene *)scene_ptr;
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
Editing *ed = BKE_sequencer_editing_get(scene, false);
if (BLI_findindex(ed->seqbasep, seq) != -1) {
ED_sequencer_select_sequence_single(scene, seq, TRUE);
ED_sequencer_select_sequence_single(scene, seq, true);
}
}

View File

@@ -162,7 +162,7 @@ void select_surround_from_last(Scene *scene)
}
#endif
void ED_sequencer_select_sequence_single(Scene * scene, Sequence * seq, int deselect_all)
void ED_sequencer_select_sequence_single(Scene *scene, Sequence *seq, bool deselect_all)
{
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);