diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-03-24 16:13:13 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-03-24 16:13:13 +0400 |
commit | 385c72f5f26ae9c86bf40c127c44216ceea0e6c1 (patch) | |
tree | 6c0432578abee5437adc94e96b5a91c593b866b4 /source/blender/editors/include | |
parent | 5841d1c8145ba50addeb17fa0231705d949d8b3d (diff) | |
parent | b5ce1b1a23a3befbcc4cd3c67a5ec6a76d77aa5a (diff) |
Merged changes in the trunk up to revision 55546.
Conflicts resolved:
source/blenderplayer/bad_level_call_stubs/SConscript
Partly reverted changes to intern/cycles/blender/addon/ui.py in revision 52899
to make it easier to merge trunk changes.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_anim_api.h | 4 | ||||
-rw-r--r-- | source/blender/editors/include/ED_armature.h | 4 | ||||
-rw-r--r-- | source/blender/editors/include/ED_curve.h | 3 | ||||
-rw-r--r-- | source/blender/editors/include/ED_gpencil.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_mball.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_mesh.h | 58 | ||||
-rw-r--r-- | source/blender/editors/include/ED_object.h | 9 | ||||
-rw-r--r-- | source/blender/editors/include/ED_particle.h | 6 | ||||
-rw-r--r-- | source/blender/editors/include/ED_transform.h | 6 | ||||
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 38 | ||||
-rw-r--r-- | source/blender/editors/include/UI_icons.h | 6 | ||||
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 9 | ||||
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/UI_view2d.h | 16 |
14 files changed, 85 insertions, 80 deletions
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 1c2ec27a061..b8ad40b2bd9 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -474,7 +474,7 @@ void ANIM_timecode_string_from_frame(char *str, struct Scene *scene, int power, /* ---------- Current Frame Drawing ---------------- */ /* flags for Current Frame Drawing */ -enum { +enum eAnimEditDraw_CurrentFrame { /* plain time indicator with no special indicators */ DRAWCFRA_PLAIN = 0, /* draw box indicating current frame number */ @@ -483,7 +483,7 @@ enum { DRAWCFRA_UNIT_SECONDS = (1 << 1), /* draw indicator extra wide (for timeline) */ DRAWCFRA_WIDE = (1 << 2) -} eAnimEditDraw_CurrentFrame; +}; /* main call to draw current-frame indicator in an Animation Editor */ void ANIM_draw_cfra(const struct bContext *C, struct View2D *v2d, short flag); diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h index 310b60f13e8..3367dcb9c4c 100644 --- a/source/blender/editors/include/ED_armature.h +++ b/source/blender/editors/include/ED_armature.h @@ -123,8 +123,8 @@ void ED_armature_deselect_all(struct Object *obedit, int toggle); void ED_armature_deselect_all_visible(struct Object *obedit); int ED_do_pose_selectbuffer(struct Scene *scene, struct Base *base, unsigned int *buffer, - short hits, short extend, short deselect, short toggle); -int mouse_armature(struct bContext *C, const int mval[2], int extend, int deselect, int toggle); + short hits, bool extend, bool deselect, bool toggle); +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); diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h index 66c1798f507..1d26204095c 100644 --- a/source/blender/editors/include/ED_curve.h +++ b/source/blender/editors/include/ED_curve.h @@ -63,12 +63,11 @@ void load_editNurb(struct Object *obedit); void make_editNurb(struct Object *obedit); void free_editNurb(struct Object *obedit); -int mouse_nurb(struct bContext *C, const int mval[2], int extend, int deselect, int toggle); +bool mouse_nurb(struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle); struct Nurb *add_nurbs_primitive(struct bContext *C, struct Object *obedit, float mat[4][4], int type, int newob); int isNurbsel(struct Nurb *nu); -void ED_nurb_set_spline_type(struct Nurb *nu, int type); int join_curve_exec(struct bContext *C, struct wmOperator *op); diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index 29d4097521d..cb4a81be8b8 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -79,7 +79,7 @@ void ED_operatortypes_gpencil(void); void draw_gpencil_2dimage(const struct bContext *C); void draw_gpencil_view2d(const struct bContext *C, short onlyv2d); -void draw_gpencil_view3d(struct Scene *scene, struct View3D *v3d, struct ARegion *ar, short only3d); +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); void gpencil_panel_standard(const struct bContext *C, struct Panel *pa); diff --git a/source/blender/editors/include/ED_mball.h b/source/blender/editors/include/ED_mball.h index 4655188a3dd..da96aba011e 100644 --- a/source/blender/editors/include/ED_mball.h +++ b/source/blender/editors/include/ED_mball.h @@ -41,7 +41,7 @@ void ED_keymap_metaball(struct wmKeyConfig *keyconf); struct MetaElem *add_metaball_primitive(struct bContext *C, struct Object *obedit, float mat[4][4], float dia, int type, int newname); -int mouse_mball(struct bContext *C, const int mval[2], int extend, int deselect, int toggle); +bool mouse_mball(struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle); void free_editMball(struct Object *obedit); void make_editMball(struct Object *obedit); diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index e704b8f0bf3..f84281a4f08 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -74,7 +74,7 @@ struct rcti; /* editmesh_utils.c */ -void EDBM_verts_mirror_cache_begin(struct BMEditMesh *em, const short use_select); /* note, replaces EM_cache_x_mirror_vert in trunk */ +void EDBM_verts_mirror_cache_begin(struct BMEditMesh *em, const bool use_select); /* note, replaces EM_cache_x_mirror_vert in trunk */ void EDBM_verts_mirror_apply(struct BMEditMesh *em, const int sel_from, const int sel_to); struct BMVert *EDBM_verts_mirror_get(struct BMEditMesh *em, struct BMVert *v); void EDBM_verts_mirror_cache_clear(struct BMEditMesh *em, struct BMVert *v); @@ -93,7 +93,7 @@ void EDBM_index_arrays_ensure(struct BMEditMesh *em, const char htype) void EDBM_index_arrays_init(struct BMEditMesh *em, const char htype); void EDBM_index_arrays_free(struct BMEditMesh *em); #ifndef NDEBUG -int EDBM_index_arrays_check(struct BMEditMesh *em); +bool EDBM_index_arrays_check(struct BMEditMesh *em); #endif struct BMVert *EDBM_vert_at_index(struct BMEditMesh *em, int index); struct BMEdge *EDBM_edge_at_index(struct BMEditMesh *em, int index); @@ -137,30 +137,33 @@ void EDBM_flag_disable_all(struct BMEditMesh *em, const char hflag); /* editmesh_select.c */ -void EDBM_select_mirrored(struct Object *obedit, struct BMEditMesh *em, int extend); +void EDBM_select_mirrored(struct Object *obedit, struct BMEditMesh *em, bool extend); void EDBM_automerge(struct Scene *scene, struct Object *ob, int update); -int EDBM_backbuf_border_init(struct ViewContext *vc, short xmin, short ymin, short xmax, short ymax); +bool EDBM_backbuf_border_init(struct ViewContext *vc, short xmin, short ymin, short xmax, short ymax); int EDBM_backbuf_check(unsigned int index); void EDBM_backbuf_free(void); -int EDBM_backbuf_border_mask_init(struct ViewContext *vc, const int mcords[][2], short tot, +bool EDBM_backbuf_border_mask_init(struct ViewContext *vc, const int mcords[][2], short tot, short xmin, short ymin, short xmax, short ymax); -int EDBM_backbuf_circle_init(struct ViewContext *vc, short xs, short ys, short rads); +bool EDBM_backbuf_circle_init(struct ViewContext *vc, short xs, short ys, short rads); -struct BMVert *EDBM_vert_find_nearest(struct ViewContext *vc, float *r_dist, const short sel, const short strict); +struct BMVert *EDBM_vert_find_nearest(struct ViewContext *vc, float *r_dist, const bool sel, const bool strict); struct BMEdge *EDBM_edge_find_nearest(struct ViewContext *vc, float *r_dist); struct BMFace *EDBM_face_find_nearest(struct ViewContext *vc, float *r_dist); -int EDBM_select_pick(struct bContext *C, const int mval[2], short extend, short deselect, short toggle); +bool EDBM_select_pick(struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle); void EDBM_selectmode_set(struct BMEditMesh *em); void EDBM_selectmode_convert(struct BMEditMesh *em, const short selectmode_old, const short selectmode_new); /* user access this */ -int EDBM_selectmode_toggle(struct bContext *C, const short selectmode_new, - const int action, const int use_extend, const int use_expand); +bool EDBM_selectmode_toggle(struct bContext *C, const short selectmode_new, + const int action, const bool use_extend, const bool use_expand); +bool EDBM_selectmode_disable(struct Scene *scene, struct BMEditMesh *em, + const short selectmode_disable, + const short selectmode_fallback); void EDBM_deselect_by_material(struct BMEditMesh *em, const short index, const short select); @@ -183,17 +186,17 @@ void EMBM_project_snap_verts(struct bContext *C, struct ARegion *ar, struct BMEd /* editface.c */ void paintface_flush_flags(struct Object *ob); -int paintface_mouse_select(struct bContext *C, struct Object *ob, const int mval[2], int extend, int deselect, int toggle); -int do_paintface_box_select(struct ViewContext *vc, struct rcti *rect, int select, int extend); -void paintface_deselect_all_visible(struct Object *ob, int action, short flush_flags); +bool paintface_mouse_select(struct bContext *C, struct Object *ob, const int mval[2], bool extend, bool deselect, bool toggle); +int do_paintface_box_select(struct ViewContext *vc, struct rcti *rect, bool select, bool extend); +void paintface_deselect_all_visible(struct Object *ob, int action, bool flush_flags); void paintface_select_linked(struct bContext *C, struct Object *ob, const int mval[2], int mode); -int paintface_minmax(struct Object *ob, float r_min[3], float r_max[3]); +bool paintface_minmax(struct Object *ob, float r_min[3], float r_max[3]); void paintface_hide(struct Object *ob, const int unselected); void paintface_reveal(struct Object *ob); -void paintvert_deselect_all_visible(struct Object *ob, int action, short flush_flags); -void paintvert_select_ungrouped(struct Object *ob, short extend, short flush_flags); +void paintvert_deselect_all_visible(struct Object *ob, int action, bool flush_flags); +void paintvert_select_ungrouped(struct Object *ob, bool extend, bool flush_flags); void paintvert_flush_flags(struct Object *ob); /* mirrtopo */ @@ -204,9 +207,9 @@ typedef struct MirrTopoStore_t { int prev_ob_mode; } MirrTopoStore_t; -int ED_mesh_mirrtopo_recalc_check(struct Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_topo_store); +bool ED_mesh_mirrtopo_recalc_check(struct Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_topo_store); void ED_mesh_mirrtopo_init(struct Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_topo_store, - const short skip_em_vert_array_init); + const bool skip_em_vert_array_init); void ED_mesh_mirrtopo_free(MirrTopoStore_t *mesh_topo_store); @@ -251,13 +254,16 @@ void ED_mesh_calc_tessface(struct Mesh *mesh); void ED_mesh_material_link(struct Mesh *me, struct Material *ma); void ED_mesh_update(struct Mesh *mesh, struct bContext *C, int calc_edges, int calc_tessface); -int ED_mesh_uv_texture_add(struct bContext *C, struct Mesh *me, const char *name, int active_set); -int ED_mesh_uv_texture_remove(struct bContext *C, struct Object *ob, struct Mesh *me); +int ED_mesh_uv_texture_add(struct Mesh *me, const char *name, const bool active_set); +bool ED_mesh_uv_texture_remove_index(struct Mesh *me, const int n); +bool ED_mesh_uv_texture_remove_active(struct Mesh *me); +bool ED_mesh_uv_texture_remove_named(struct Mesh *me, const char *name); int ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me); int ED_mesh_uv_loop_reset_ex(struct Mesh *me, const int layernum); -int ED_mesh_color_add(struct bContext *C, struct Scene *scene, struct Object *ob, struct Mesh *me, const char *name, int active_set); -int ED_mesh_color_remove(struct bContext *C, struct Object *ob, struct Mesh *me); -int ED_mesh_color_remove_named(struct bContext *C, struct Object *ob, struct Mesh *me, const char *name); +int ED_mesh_color_add(struct Mesh *me, const char *name, const bool active_set); +bool ED_mesh_color_remove_index(struct Mesh *me, const int n); +bool ED_mesh_color_remove_active(struct Mesh *me); +bool ED_mesh_color_remove_named(struct Mesh *me, const char *name); /* mesh backup */ typedef struct BMBackup { @@ -286,9 +292,9 @@ int mesh_get_x_mirror_vert(struct Object *ob, int index); struct BMVert *editbmesh_get_x_mirror_vert(struct Object *ob, struct BMEditMesh *em, struct BMVert *eve, const float co[3], int index); int *mesh_get_x_mirror_faces(struct Object *ob, struct BMEditMesh *em); -int ED_mesh_pick_vert(struct bContext *C, struct Object *ob, const int mval[2], unsigned int *index, int size, int use_zbuf); -int ED_mesh_pick_face(struct bContext *C, struct Object *ob, const int mval[2], unsigned int *index, int size); -int ED_mesh_pick_face_vert(struct bContext *C, struct Object *ob, const int mval[2], unsigned int *index, int size); +bool ED_mesh_pick_vert(struct bContext *C, struct Object *ob, const int mval[2], unsigned int *index, int size, bool use_zbuf); +bool ED_mesh_pick_face(struct bContext *C, struct Object *ob, const int mval[2], unsigned int *index, int size); +bool ED_mesh_pick_face_vert(struct bContext *C, struct Object *ob, const int mval[2], unsigned int *index, int size); #define ED_MESH_PICK_DEFAULT_VERT_SIZE 50 #define ED_MESH_PICK_DEFAULT_FACE_SIZE 3 diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 2c43f6e4f25..e23465f15a8 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -128,8 +128,9 @@ void ED_object_toggle_modes(struct bContext *C, int mode); #define EM_WAITCURSOR 4 #define EM_DO_UNDO 8 #define EM_IGNORE_LAYER 16 -void ED_object_exit_editmode(struct bContext *C, int flag); -void ED_object_enter_editmode(struct bContext *C, int flag); +void ED_object_editmode_exit(struct bContext *C, int flag); +void ED_object_editmode_enter(struct bContext *C, int flag); +bool ED_object_editmode_load(struct Object *obedit); void ED_object_location_from_view(struct bContext *C, float loc[3]); void ED_object_rotation_from_view(struct bContext *C, float rot[3]); @@ -164,7 +165,7 @@ void ED_object_constraint_update(struct Object *ob); void ED_object_constraint_dependency_update(struct Main *bmain, struct Object *ob); /* object_lattice.c */ -int mouse_lattice(struct bContext *C, const int mval[2], int extend, int deselect, int toggle); +bool mouse_lattice(struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle); void undo_push_lattice(struct bContext *C, const char *name); /* object_lattice.c */ @@ -190,7 +191,7 @@ int ED_object_modifier_apply(struct ReportList *reports, struct Scene *scene, struct Object *ob, struct ModifierData *md, int mode); int ED_object_modifier_copy(struct ReportList *reports, struct Object *ob, struct ModifierData *md); -int ED_object_iter_other(struct Main *bmain, struct Object *orig_ob, int include_orig, +int ED_object_iter_other(struct Main *bmain, struct Object *orig_ob, const bool include_orig, int (*callback)(struct Object *ob, void *callback_data), void *callback_data); diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h index dee97c7882a..f9516f255cf 100644 --- a/source/blender/editors/include/ED_particle.h +++ b/source/blender/editors/include/ED_particle.h @@ -58,10 +58,10 @@ void PE_hide_keys_time(struct Scene *scene, struct PTCacheEdit *edit, float cfra void PE_update_object(struct Scene *scene, struct Object *ob, int useflag); /* selection tools */ -int PE_mouse_particles(struct bContext *C, const int mval[2], int extend, int deselect, int toggle); -int PE_border_select(struct bContext *C, struct rcti *rect, int select, int extend); +int PE_mouse_particles(struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle); +int PE_border_select(struct bContext *C, struct rcti *rect, bool select, bool extend); int PE_circle_select(struct bContext *C, int selecting, const int mval[2], float rad); -int PE_lasso_select(struct bContext *C, const int mcords[][2], const short moves, short extend, short select); +int PE_lasso_select(struct bContext *C, const int mcords[][2], const short moves, bool extend, bool select); void PE_deselect_all_visible(struct PTCacheEdit *edit); /* undo */ diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index 6101d03b946..d43582fa8d1 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -52,7 +52,7 @@ void transform_operatortypes(void); /* ******************** Macros & Prototypes *********************** */ /* MODE AND NUMINPUT FLAGS */ -enum { +enum TfmMode { TFM_INIT = -1, TFM_DUMMY, TFM_TRANSLATION, @@ -85,7 +85,7 @@ enum { TFM_EDGE_SLIDE, TFM_VERT_SLIDE, TFM_SEQ_SLIDE -} TfmMode; +}; /* TRANSFORM CONTEXTS */ #define CTX_NONE 0 @@ -125,7 +125,7 @@ void BIF_createTransformOrientation(struct bContext *C, struct ReportList *repor void BIF_selectTransformOrientation(struct bContext *C, struct TransformOrientation *ts); void BIF_selectTransformOrientationValue(struct bContext *C, int orientation); -void ED_getTransformOrientationMatrix(const struct bContext *C, float orientation_mat[3][3], int activeOnly); +void ED_getTransformOrientationMatrix(const struct bContext *C, float orientation_mat[3][3], const bool activeOnly); struct EnumPropertyItem *BIF_enumTransformOrientation(struct bContext *C); const char *BIF_menustringTransformOrientation(const struct bContext *C, const char *title); /* the returned value was allocated and needs to be freed after use */ diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 12afeb2d343..81f49b4e1f8 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -79,7 +79,7 @@ typedef struct ViewDepths { float *depths; double depth_range[2]; - char damaged; + bool damaged; } ViewDepths; float *give_cursor(struct Scene *scene, struct View3D *v3d); @@ -201,8 +201,10 @@ void ED_view3d_global_to_vector(const struct RegionView3D *rv3d, const float coo void ED_view3d_win_to_3d(const struct ARegion *ar, const float depth_pt[3], const float mval[2], float out[3]); void ED_view3d_win_to_delta(const struct ARegion *ar, const float mval[2], float out[3], const float zfac); void ED_view3d_win_to_vector(const struct ARegion *ar, const float mval[2], float out[3]); -void ED_view3d_win_to_segment(const struct ARegion *ar, struct View3D *v3d, const float mval[2], float ray_start[3], float ray_end[3]); -int ED_view3d_win_to_segment_clip(const struct ARegion *ar, struct View3D *v3d, const float mval[2], float ray_start[3], float ray_end[3]); +void ED_view3d_win_to_segment(const struct ARegion *ar, struct View3D *v3d, const float mval[2], + float ray_start[3], float ray_end[3]); +bool ED_view3d_win_to_segment_clip(const struct ARegion *ar, struct View3D *v3d, const float mval[2], + float ray_start[3], float ray_end[3]); void ED_view3d_ob_project_mat_get(const struct RegionView3D *v3d, struct Object *ob, float pmat[4][4]); void ED_view3d_unproject(struct bglMats *mats, float out[3], const float x, const float y, const float z); @@ -223,7 +225,7 @@ void ED_view3d_calc_camera_border_size(struct Scene *scene, struct ARegion *ar, void ED_view3d_clipping_calc(struct BoundBox *bb, float planes[4][4], struct bglMats *mats, const struct rcti *rect); void ED_view3d_clipping_local(struct RegionView3D *rv3d, float mat[4][4]); -int ED_view3d_clipping_test(struct RegionView3D *rv3d, const float co[3], const bool is_local); +bool ED_view3d_clipping_test(struct RegionView3D *rv3d, const float co[3], const bool is_local); void ED_view3d_clipping_set(struct RegionView3D *rv3d); void ED_view3d_clipping_enable(void); void ED_view3d_clipping_disable(void); @@ -244,13 +246,13 @@ unsigned int view3d_sample_backbuf_rect(struct ViewContext *vc, const int mval[2 unsigned int view3d_sample_backbuf(struct ViewContext *vc, int x, int y); /* draws and does a 4x4 sample */ -int ED_view3d_autodist(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, const int mval[2], float mouse_worldloc[3], bool alphaoverride); +bool ED_view3d_autodist(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, const int mval[2], float mouse_worldloc[3], bool alphaoverride); /* only draw so ED_view3d_autodist_simple can be called many times after */ -int ED_view3d_autodist_init(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, int mode); -int ED_view3d_autodist_simple(struct ARegion *ar, const int mval[2], float mouse_worldloc[3], int margin, float *force_depth); -int ED_view3d_autodist_depth(struct ARegion *ar, const int mval[2], int margin, float *depth); -int ED_view3d_autodist_depth_seg(struct ARegion *ar, const int mval_sta[2], const int mval_end[2], int margin, float *depth); +void ED_view3d_autodist_init(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, int mode); +bool ED_view3d_autodist_simple(struct ARegion *ar, const int mval[2], float mouse_worldloc[3], int margin, float *force_depth); +bool ED_view3d_autodist_depth(struct ARegion *ar, const int mval[2], int margin, float *depth); +bool ED_view3d_autodist_depth_seg(struct ARegion *ar, const int mval_sta[2], const int mval_end[2], int margin, float *depth); /* select */ #define MAXPICKBUF 10000 @@ -264,11 +266,11 @@ void view3d_opengl_read_pixels(struct ARegion *ar, int x, int y, int w, int h, i void view3d_get_transformation(const struct ARegion *ar, struct RegionView3D *rv3d, struct Object *ob, struct bglMats *mats); /* XXX should move to BLI_math */ -int edge_inside_circle(const float cent[2], float radius, const float screen_co_a[2], const float screen_co_b[2]); +bool edge_inside_circle(const float cent[2], float radius, const float screen_co_a[2], const float screen_co_b[2]); /* get 3d region from context, also if mouse is in header or toolbar */ struct RegionView3D *ED_view3d_context_rv3d(struct bContext *C); -int ED_view3d_context_user_region(struct bContext *C, struct View3D **r_v3d, struct ARegion **r_ar); +bool ED_view3d_context_user_region(struct bContext *C, struct View3D **r_v3d, struct ARegion **r_ar); int ED_operator_rv3d_user_region_poll(struct bContext *C); void ED_view3d_init_mats_rv3d(struct Object *ob, struct RegionView3D *rv3d); @@ -276,19 +278,19 @@ void ED_view3d_init_mats_rv3d_gl(struct Object *ob, struct RegionView3D *rv3d); int ED_view3d_scene_layer_set(int lay, const int *values, int *active); -int ED_view3d_context_activate(struct bContext *C); +bool ED_view3d_context_activate(struct bContext *C); void ED_view3d_draw_offscreen_init(struct Scene *scene, struct View3D *v3d); void ED_view3d_draw_offscreen(struct Scene *scene, struct View3D *v3d, struct ARegion *ar, - int winx, int winy, float viewmat[4][4], float winmat[4][4], int do_bgpic); + int winx, int winy, float viewmat[4][4], float winmat[4][4], bool do_bgpic); struct ImBuf *ED_view3d_draw_offscreen_imbuf(struct Scene *scene, struct View3D *v3d, struct ARegion *ar, int sizex, int sizey, unsigned int flag, - int draw_background, int alpha_mode, char err_out[256]); + bool draw_background, int alpha_mode, char err_out[256]); struct ImBuf *ED_view3d_draw_offscreen_imbuf_simple(struct Scene *scene, struct Object *camera, int width, int height, unsigned int flag, int drawtype, - int use_solid_tex, int draw_background, int alpha_mode, char err_out[256]); + bool use_solid_tex, bool draw_background, int alpha_mode, char err_out[256]); void ED_view3d_offscreen_sky_color_get(struct Scene *scene, float sky_color[3]); struct Base *ED_view3d_give_base_under_cursor(struct bContext *C, const int mval[2]); -void ED_view3d_quadview_update(struct ScrArea *sa, struct ARegion *ar, short do_clip); +void ED_view3d_quadview_update(struct ScrArea *sa, struct ARegion *ar, bool do_clip); void ED_view3d_update_viewmat(struct Scene *scene, struct View3D *v3d, struct ARegion *ar, float viewmat[4][4], float winmat[4][4]); bool ED_view3d_lock(struct RegionView3D *rv3d); @@ -297,11 +299,11 @@ uint64_t ED_view3d_screen_datamask(struct bScreen *screen); uint64_t ED_view3d_object_datamask(struct Scene *scene); /* camera lock functions */ -int ED_view3d_camera_lock_check(struct View3D *v3d, struct RegionView3D *rv3d); +bool ED_view3d_camera_lock_check(struct View3D *v3d, struct RegionView3D *rv3d); /* copy the camera to the view before starting a view transformation */ void ED_view3d_camera_lock_init(struct View3D *v3d, struct RegionView3D *rv3d); /* copy the view to the camera, return TRUE if */ -int ED_view3d_camera_lock_sync(struct View3D *v3d, struct RegionView3D *rv3d); +bool ED_view3d_camera_lock_sync(struct View3D *v3d, struct RegionView3D *rv3d); void ED_view3D_lock_clear(struct View3D *v3d); diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index 0560cbd69cc..2e2842210c2 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -748,10 +748,8 @@ DEF_ICON(PASTEFLIPDOWN) DEF_ICON(BLANK230) #endif DEF_ICON(SNAP_SURFACE) -#ifndef DEF_ICON_BLANK_SKIP - DEF_ICON(BLANK232) - DEF_ICON(BLANK233) -#endif +DEF_ICON(AUTOMERGE_ON) +DEF_ICON(AUTOMERGE_OFF) DEF_ICON(RETOPO) DEF_ICON(UV_VERTEXSEL) DEF_ICON(UV_EDGESEL) diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index f805b199280..3b4415703d5 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -223,7 +223,7 @@ typedef enum { NUMSLI = (14 << 9), COLOR = (15 << 9), IDPOIN = (16 << 9), - HSVSLI = (17 << 9), /* UNUSED, but code still references */ + /* HSVSLI = (17 << 9), */ /* UNUSED */ SCROLL = (18 << 9), BLOCK = (19 << 9), BUTM = (20 << 9), @@ -608,7 +608,7 @@ uiBut *uiDefHotKeyevtButS(uiBlock *block, int retval, const char *str, int x, in uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxlen, int x, int y, short width, short height, float a1, float a2, const char *tip); uiBut *uiDefAutoButR(uiBlock *block, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, const char *name, int icon, int x1, int y1, int x2, int y2); -int uiDefAutoButsRNA(uiLayout *layout, struct PointerRNA *ptr, int (*check_prop)(struct PointerRNA *, struct PropertyRNA *), const char label_align); +int uiDefAutoButsRNA(uiLayout *layout, struct PointerRNA *ptr, bool (*check_prop)(struct PointerRNA *, struct PropertyRNA *), const char label_align); /* Links * @@ -762,7 +762,7 @@ void uiLayoutSetContextPointer(uiLayout *layout, const char *name, struct Pointe void uiLayoutContextCopy(uiLayout *layout, struct bContextStore *context); const char *uiLayoutIntrospect(uiLayout *layout); // XXX - testing void uiLayoutOperatorButs(const struct bContext *C, struct uiLayout *layout, struct wmOperator *op, - int (*check_prop)(struct PointerRNA *, struct PropertyRNA *), + bool (*check_prop)(struct PointerRNA *, struct PropertyRNA *), const char label_align, const short flag); struct MenuType *uiButGetMenuType(uiBut *but); @@ -922,5 +922,4 @@ void UI_template_fix_linking(void); int UI_editsource_enable_check(void); void UI_editsource_active_but_test(uiBut *but); -#endif /* __UI_INTERFACE_H__ */ - +#endif /* __UI_INTERFACE_H__ */ diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 308ca8c9355..050e9c81f2a 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -310,4 +310,4 @@ const unsigned char *UI_ThemeGetColorPtr(struct bTheme *btheme, int spacetype, i void UI_make_axis_color(const unsigned char *src_col, unsigned char *dst_col, const char axis); -#endif /* UI_ICONS_H */ +#endif /* UI_RESOURCES_H */ diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h index 3743539a9bd..100e72e18ed 100644 --- a/source/blender/editors/include/UI_view2d.h +++ b/source/blender/editors/include/UI_view2d.h @@ -47,7 +47,7 @@ * and settings for a View2D region, and that set of settings is used in more * than one specific place */ -enum { +enum eView2D_CommonViewTypes { /* custom view type (region has defined all necessary flags already) */ V2D_COMMONVIEW_CUSTOM = -1, /* standard (only use this when setting up a new view, as a sensible base for most settings) */ @@ -60,7 +60,7 @@ enum { V2D_COMMONVIEW_HEADER, /* ui region containing panels */ V2D_COMMONVIEW_PANELS_UI -} eView2D_CommonViewTypes; +}; /* ---- Defines for Scroller/Grid Arguments ----- */ @@ -68,7 +68,7 @@ enum { #define V2D_ARG_DUMMY -1 /* Grid units */ -enum { +enum eView2D_Units { /* for drawing time */ V2D_UNIT_SECONDS = 0, V2D_UNIT_FRAMES, @@ -79,16 +79,16 @@ enum { V2D_UNIT_DEGREES, V2D_UNIT_TIME, V2D_UNIT_SECONDSSEQ -} eView2D_Units; +}; /* clamping of grid values to whole numbers */ -enum { +enum eView2D_Clamp { V2D_GRID_NOCLAMP = 0, V2D_GRID_CLAMP -} eView2D_Clamp; +}; /* flags for grid-lines to draw */ -enum { +enum eView2D_Gridlines { V2D_HORIZONTAL_LINES = (1 << 0), V2D_VERTICAL_LINES = (1 << 1), V2D_HORIZONTAL_AXIS = (1 << 2), @@ -97,7 +97,7 @@ enum { V2D_GRIDLINES_MAJOR = (V2D_VERTICAL_LINES | V2D_VERTICAL_AXIS | V2D_HORIZONTAL_LINES | V2D_HORIZONTAL_AXIS), V2D_GRIDLINES_ALL = (V2D_GRIDLINES_MAJOR | V2D_HORIZONTAL_FINELINES), -} eView2D_Gridlines; +}; /* ------ Defines for Scrollers ----- */ |