diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-03-31 16:39:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-03-31 16:39:08 +0400 |
commit | 097a3756c009f5cd9764c5ac1af14d80c2ebbfac (patch) | |
tree | e617cb4c0ef7ba8775d9e8b6025b4c8fd2927808 /source/blender/editors | |
parent | 847b7bcbeaa95311e9713a4ca77d8e3fbe91b5fb (diff) |
Code cleanup: use bool
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 6 | ||||
-rw-r--r-- | source/blender/editors/armature/armature_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/armature/armature_skinning.c | 4 | ||||
-rw-r--r-- | source/blender/editors/gpencil/drawgpencil.c | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_armature.h | 4 | ||||
-rw-r--r-- | source/blender/editors/include/ED_gpencil.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_image.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_keyframing.h | 6 | ||||
-rw-r--r-- | source/blender/editors/include/ED_node.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_object.h | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 2 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_intern.h | 4 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_draw.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_intern.h | 2 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_view.c | 2 |
16 files changed, 24 insertions, 24 deletions
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 069f66135e3..c2d8332b6fd 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -843,7 +843,7 @@ static float visualkey_get_value(PointerRNA *ptr, PropertyRNA *prop, int array_i * the keyframe insertion. These include the 'visual' keyframing modes, quick refresh, * and extra keyframe filtering. */ -short insert_keyframe_direct(ReportList *reports, PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, float cfra, short flag) +bool insert_keyframe_direct(ReportList *reports, PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, float cfra, short flag) { float curval = 0.0f; @@ -2049,7 +2049,7 @@ short id_frame_has_keyframe(ID *id, float frame, short filter) /* ************************************************** */ -int ED_autokeyframe_object(bContext *C, Scene *scene, Object *ob, KeyingSet *ks) +bool ED_autokeyframe_object(bContext *C, Scene *scene, Object *ob, KeyingSet *ks) { /* auto keyframing */ if (autokeyframe_cfra_can_key(scene, &ob->id)) { @@ -2071,7 +2071,7 @@ int ED_autokeyframe_object(bContext *C, Scene *scene, Object *ob, KeyingSet *ks) } } -int ED_autokeyframe_pchan(bContext *C, Scene *scene, Object *ob, bPoseChannel *pchan, KeyingSet *ks) +bool ED_autokeyframe_pchan(bContext *C, Scene *scene, Object *ob, bPoseChannel *pchan, KeyingSet *ks) { if (autokeyframe_cfra_can_key(scene, &ob->id)) { ListBase dsources = {NULL, NULL}; diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c index db57e762848..63869f50c1b 100644 --- a/source/blender/editors/armature/armature_edit.c +++ b/source/blender/editors/armature/armature_edit.c @@ -200,7 +200,7 @@ void ED_armature_origin_set(Scene *scene, Object *ob, float cursor[3], int cente /* adjust bone roll to align Z axis with vector * vec is in local space and is normalized */ -float ED_rollBoneToVector(EditBone *bone, const float align_axis[3], const short axis_only) +float ED_rollBoneToVector(EditBone *bone, const float align_axis[3], const bool axis_only) { float mat[3][3], nor[3]; diff --git a/source/blender/editors/armature/armature_skinning.c b/source/blender/editors/armature/armature_skinning.c index 2a3688526d0..e3059e113d6 100644 --- a/source/blender/editors/armature/armature_skinning.c +++ b/source/blender/editors/armature/armature_skinning.c @@ -235,7 +235,7 @@ static void envelope_bone_weighting(Object *ob, Mesh *mesh, float (*verts)[3], i } } -static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob, Object *par, int heat, int mirror) +static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob, Object *par, int heat, bool mirror) { /* This functions implements the automatic computation of vertex group * weights, either through envelopes or using a heat equilibrium. @@ -415,7 +415,7 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob, MEM_freeN(verts); } -void create_vgroups_from_armature(ReportList *reports, Scene *scene, Object *ob, Object *par, int mode, int mirror) +void create_vgroups_from_armature(ReportList *reports, Scene *scene, Object *ob, Object *par, int mode, bool mirror) { /* Lets try to create some vertex groups * based on the bones of the parent armature. diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 971ab4dbda5..c10f081b4fa 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -741,7 +741,7 @@ void draw_gpencil_2dimage(const bContext *C) /* draw grease-pencil sketches to specified 2d-view assuming that matrices are already set correctly * Note: this gets called twice - first time with onlyv2d=1 to draw 'canvas' strokes, * second time with onlyv2d=0 for screen-aligned strokes */ -void draw_gpencil_view2d(const bContext *C, short onlyv2d) +void draw_gpencil_view2d(const bContext *C, bool onlyv2d) { ScrArea *sa = CTX_wm_area(C); ARegion *ar = CTX_wm_region(C); diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h index dea4b2448ff..4cf2257f6a1 100644 --- a/source/blender/editors/include/ED_armature.h +++ b/source/blender/editors/include/ED_armature.h @@ -127,7 +127,7 @@ int ED_do_pose_selectbuffer(struct Scene *scene, struct Base *base, unsigned int bool mouse_armature(struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle); int join_armature_exec(struct bContext *C, struct wmOperator *op); struct Bone *get_indexed_bone(struct Object *ob, int index); -float ED_rollBoneToVector(EditBone *bone, const float new_up_axis[3], const short axis_only); +float ED_rollBoneToVector(EditBone *bone, const float new_up_axis[3], const bool axis_only); EditBone *ED_armature_bone_find_name(const ListBase *edbo, const char *name); EditBone *ED_armature_bone_get_mirrored(const struct ListBase *edbo, EditBone *ebo); void ED_armature_sync_selection(struct ListBase *edbo); @@ -154,7 +154,7 @@ void ED_armature_transform(struct bArmature *arm, float mat[4][4]); #define ARM_GROUPS_ENVELOPE 2 #define ARM_GROUPS_AUTO 3 -void create_vgroups_from_armature(struct ReportList *reports, struct Scene *scene, struct Object *ob, struct Object *par, int mode, int mirror); +void create_vgroups_from_armature(struct ReportList *reports, struct Scene *scene, struct Object *ob, struct Object *par, int mode, bool mirror); void unique_editbone_name(struct ListBase *ebones, char *name, EditBone *bone); /* if bone is already in list, pass it as param to ignore it */ void ED_armature_bone_rename(struct bArmature *arm, const char *oldnamep, const char *newnamep); diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index 4e05c6c9fb6..e31221a42df 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -78,7 +78,7 @@ void ED_operatortypes_gpencil(void); /* drawgpencil.c */ void draw_gpencil_2dimage(const struct bContext *C); -void draw_gpencil_view2d(const struct bContext *C, short onlyv2d); +void draw_gpencil_view2d(const struct bContext *C, bool onlyv2d); void draw_gpencil_view3d(struct Scene *scene, struct View3D *v3d, struct ARegion *ar, bool only3d); void gpencil_panel_standard_header(const struct bContext *C, struct Panel *pa); diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h index 36f31897c7d..adb147d4ff0 100644 --- a/source/blender/editors/include/ED_image.h +++ b/source/blender/editors/include/ED_image.h @@ -75,7 +75,7 @@ bool ED_space_image_check_show_maskedit(struct Scene *scene, struct SpaceImage * int ED_space_image_maskedit_poll(struct bContext *C); int ED_space_image_maskedit_mask_poll(struct bContext *C); -void ED_image_draw_info(struct Scene *scene, struct ARegion *ar, int color_manage, int use_default_view, int channels, int x, int y, +void ED_image_draw_info(struct Scene *scene, struct ARegion *ar, bool color_manage, bool use_default_view, int channels, int x, int y, const unsigned char cp[4], const float fp[4], const float linearcol[4], int *zp, float *zpf); #endif /* __ED_IMAGE_H__ */ diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index ad5f61a12f6..a73b8821173 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -108,7 +108,7 @@ int insert_vert_fcurve(struct FCurve *fcu, float x, float y, short flag); * Use this to insert a keyframe using the current value being keyframed, in the * nominated F-Curve (no creation of animation data performed). Returns success. */ -short insert_keyframe_direct(struct ReportList *reports, struct PointerRNA ptr, struct PropertyRNA *prop, struct FCurve *fcu, float cfra, short flag); +bool insert_keyframe_direct(struct ReportList *reports, struct PointerRNA ptr, struct PropertyRNA *prop, struct FCurve *fcu, float cfra, short flag); /* -------- */ @@ -324,8 +324,8 @@ typedef enum eAnimFilterFlags { } eAnimFilterFlags; /* utility funcs for auto keyframe */ -int ED_autokeyframe_object(struct bContext *C, struct Scene *scene, struct Object *ob, struct KeyingSet *ks); -int ED_autokeyframe_pchan(struct bContext *C, struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, struct KeyingSet *ks); +bool ED_autokeyframe_object(struct bContext *C, struct Scene *scene, struct Object *ob, struct KeyingSet *ks); +bool ED_autokeyframe_pchan(struct bContext *C, struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, struct KeyingSet *ks); /* Names for builtin keying sets so we don't confuse these with labels/text, * defined in python script: keyingsets_builtins.py */ diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h index f00af1dfede..b26dddd6f42 100644 --- a/source/blender/editors/include/ED_node.h +++ b/source/blender/editors/include/ED_node.h @@ -108,7 +108,7 @@ void ED_node_composite_job(const struct bContext *C, struct bNodeTree *nodetree, void ED_operatormacros_node(void); /* node_view.c */ -int ED_space_node_color_sample(struct SpaceNode *snode, struct ARegion *ar, int mval[2], float r_col[3]); +bool ED_space_node_color_sample(struct SpaceNode *snode, struct ARegion *ar, int mval[2], float r_col[3]); #endif /* __ED_NODE_H__ */ diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 4e3526fac7d..5504b7e0352 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -110,7 +110,7 @@ void ED_keymap_proportional_cycle(struct wmKeyConfig *keyconf, struct wmKeyMap * void ED_keymap_proportional_obmode(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap); void ED_keymap_proportional_maskmode(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap); void ED_keymap_proportional_editmode(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap, - const short do_connected); + const bool do_connected); /* send your own notifier for select! */ void ED_base_object_select(struct Base *base, short mode); diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index 46684149e02..eee811abeee 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -473,7 +473,7 @@ void ED_keymap_proportional_maskmode(struct wmKeyConfig *UNUSED(keyconf), struct } void ED_keymap_proportional_editmode(struct wmKeyConfig *UNUSED(keyconf), struct wmKeyMap *keymap, - const short do_connected) + const bool do_connected) { wmKeyMapItem *kmi; diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index c04f8439fe3..5f8091cbeb7 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -3558,7 +3558,7 @@ static void sculpt_update_tex(const Scene *scene, Sculpt *sd, SculptSession *ss) * \param need_mask So the DerivedMesh thats returned has mask data */ void sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob, - int need_pmap, int need_mask) + bool need_pmap, bool need_mask) { DerivedMesh *dm; SculptSession *ss = ob->sculpt; diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index 6e8be18bea9..9c0e937c35c 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -60,7 +60,7 @@ int sculpt_mode_poll_view3d(struct bContext *C); int sculpt_poll(struct bContext *C); int sculpt_poll_view3d(struct bContext *C); void sculpt_update_mesh_elements(struct Scene *scene, struct Sculpt *sd, struct Object *ob, - int need_pmap, int need_mask); + bool need_pmap, bool need_mask); /* Stroke */ bool sculpt_stroke_get_location(bContext *C, float out[3], const float mouse[2]); @@ -111,7 +111,7 @@ typedef struct SculptUndoNode { /* bmesh */ struct BMLogEntry *bm_entry; - int applied; + bool applied; CustomData bm_enter_vdata; CustomData bm_enter_edata; CustomData bm_enter_ldata; diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 672549f0402..2cdd105fac9 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -162,7 +162,7 @@ static void draw_render_info(Scene *scene, Image *ima, ARegion *ar, float zoomx, } /* used by node view too */ -void ED_image_draw_info(Scene *scene, ARegion *ar, int color_manage, int use_default_view, int channels, int x, int y, +void ED_image_draw_info(Scene *scene, ARegion *ar, bool color_manage, bool use_default_view, int channels, int x, int y, const unsigned char cp[4], const float fp[4], const float linearcol[4], int *zp, float *zpf) { rcti color_rect; @@ -639,7 +639,7 @@ static void draw_image_buffer_repeated(const bContext *C, SpaceImage *sima, AReg /* draw uv edit */ /* draw grease pencil */ -void draw_image_grease_pencil(bContext *C, short onlyv2d) +void draw_image_grease_pencil(bContext *C, bool onlyv2d) { /* draw in View2D space? */ if (onlyv2d) { diff --git a/source/blender/editors/space_image/image_intern.h b/source/blender/editors/space_image/image_intern.h index f1a20f39c7c..30fa5f4baa2 100644 --- a/source/blender/editors/space_image/image_intern.h +++ b/source/blender/editors/space_image/image_intern.h @@ -53,7 +53,7 @@ extern const char *image_context_dir[]; /* doc access */ /* image_draw.c */ void draw_image_main(const struct bContext *C, struct ARegion *ar); -void draw_image_grease_pencil(struct bContext *C, short onlyv2d); +void draw_image_grease_pencil(struct bContext *C, bool onlyv2d); void draw_image_sample_line(struct SpaceImage *sima); /* image_ops.c */ diff --git a/source/blender/editors/space_node/node_view.c b/source/blender/editors/space_node/node_view.c index c93dd7e9e0b..a8ab96067d5 100644 --- a/source/blender/editors/space_node/node_view.c +++ b/source/blender/editors/space_node/node_view.c @@ -419,7 +419,7 @@ static void sample_draw(const bContext *C, ARegion *ar, void *arg_info) /* returns color in SRGB */ /* matching ED_space_image_color_sample() */ -int ED_space_node_color_sample(SpaceNode *snode, ARegion *ar, int mval[2], float r_col[3]) +bool ED_space_node_color_sample(SpaceNode *snode, ARegion *ar, int mval[2], float r_col[3]) { void *lock; Image *ima; |