diff options
author | Rohan Rathi <rohanrathi08@gmail.com> | 2018-07-21 16:59:15 +0300 |
---|---|---|
committer | Rohan Rathi <rohanrathi08@gmail.com> | 2018-07-21 16:59:15 +0300 |
commit | 4e6bcd10e559ab541df53a3d7b645faac1a7fe27 (patch) | |
tree | ba214c23868fe76ec5d2199b83846814bf79be25 /source/blender/editors/include | |
parent | b6b185691f018f6b175ffb58c65418991cda75f2 (diff) | |
parent | e361e9e99c5b6140b6284e81fa315bdcc48cee58 (diff) |
Merge branch 'blender2.8' into soc-2018-bevel
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_gizmo_library.h | 222 | ||||
-rw-r--r-- | source/blender/editors/include/ED_keyframes_draw.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_manipulator_library.h | 222 | ||||
-rw-r--r-- | source/blender/editors/include/ED_object.h | 1 | ||||
-rw-r--r-- | source/blender/editors/include/ED_scene.h | 5 | ||||
-rw-r--r-- | source/blender/editors/include/ED_screen.h | 22 | ||||
-rw-r--r-- | source/blender/editors/include/ED_transform.h | 20 | ||||
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/UI_icons.h | 80 | ||||
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 142 | ||||
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 12 | ||||
-rw-r--r-- | source/blender/editors/include/UI_view2d.h | 2 |
12 files changed, 393 insertions, 339 deletions
diff --git a/source/blender/editors/include/ED_gizmo_library.h b/source/blender/editors/include/ED_gizmo_library.h new file mode 100644 index 00000000000..2bf3488a8d3 --- /dev/null +++ b/source/blender/editors/include/ED_gizmo_library.h @@ -0,0 +1,222 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file ED_gizmo_library.h + * \ingroup wm + * + * \name Generic Gizmos. + * + * This is exposes pre-defined gizmos for re-use. + */ + + +#ifndef __ED_GIZMO_LIBRARY_H__ +#define __ED_GIZMO_LIBRARY_H__ + +/* initialize gizmos */ +void ED_gizmotypes_arrow_2d(void); +void ED_gizmotypes_arrow_3d(void); +void ED_gizmotypes_button_2d(void); +void ED_gizmotypes_cage_2d(void); +void ED_gizmotypes_cage_3d(void); +void ED_gizmotypes_dial_3d(void); +void ED_gizmotypes_grab_3d(void); +void ED_gizmotypes_facemap_3d(void); +void ED_gizmotypes_primitive_3d(void); + +struct wmGizmo; +struct wmGizmoGroup; + + +/* -------------------------------------------------------------------- */ +/* Shape Presets + * + * Intended to be called by custom draw functions. + */ + +/* gizmo_library_presets.c */ +void ED_gizmo_draw_preset_box( + const struct wmGizmo *gz, float mat[4][4], int select_id); +void ED_gizmo_draw_preset_arrow( + const struct wmGizmo *gz, float mat[4][4], int axis, int select_id); +void ED_gizmo_draw_preset_circle( + const struct wmGizmo *gz, float mat[4][4], int axis, int select_id); +void ED_gizmo_draw_preset_facemap( + const struct bContext *C, const struct wmGizmo *gz, struct Scene *scene, + struct Object *ob, const int facemap, int select_id); + + +/* -------------------------------------------------------------------- */ +/* 3D Arrow Gizmo */ + +enum { + ED_GIZMO_ARROW_STYLE_NORMAL = 0, + ED_GIZMO_ARROW_STYLE_CROSS = 1, + ED_GIZMO_ARROW_STYLE_BOX = 2, + ED_GIZMO_ARROW_STYLE_CONE = 3, +}; + +/* transform */ +enum { + /* inverted offset during interaction - if set it also sets constrained below */ + ED_GIZMO_ARROW_XFORM_FLAG_INVERTED = (1 << 3), + /* clamp arrow interaction to property width */ + ED_GIZMO_ARROW_XFORM_FLAG_CONSTRAINED = (1 << 4), +}; + +/* draw_options */ +enum { + /* Show arrow stem. */ + ED_GIZMO_ARROW_DRAW_FLAG_STEM = (1 << 0), +}; + +void ED_gizmo_arrow3d_set_ui_range(struct wmGizmo *gz, const float min, const float max); +void ED_gizmo_arrow3d_set_range_fac(struct wmGizmo *gz, const float range_fac); + +/* -------------------------------------------------------------------- */ +/* 2D Arrow Gizmo */ + +/* none */ + +/* -------------------------------------------------------------------- */ +/* Cage Gizmo */ + +enum { + ED_GIZMO_CAGE2D_XFORM_FLAG_TRANSLATE = (1 << 0), /* Translates */ + ED_GIZMO_CAGE2D_XFORM_FLAG_ROTATE = (1 << 1), /* Rotates */ + ED_GIZMO_CAGE2D_XFORM_FLAG_SCALE = (1 << 2), /* Scales */ + ED_GIZMO_CAGE2D_XFORM_FLAG_SCALE_UNIFORM = (1 << 3), /* Scales uniformly */ + ED_GIZMO_CAGE2D_XFORM_FLAG_SCALE_SIGNED = (1 << 4), /* Negative scale allowed */ +}; + +/* draw_style */ +enum { + ED_GIZMO_CAGE2D_STYLE_BOX = 0, + ED_GIZMO_CAGE2D_STYLE_CIRCLE = 1, +}; + +/* draw_options */ +enum { + /** Draw a central handle (instead of having the entire area selectable) + * Needed for large rectangles that we don't want to swallow all events. */ + ED_GIZMO_CAGE2D_DRAW_FLAG_XFORM_CENTER_HANDLE = (1 << 0), +}; + +/** #wmGizmo.highlight_part */ +enum { + ED_GIZMO_CAGE2D_PART_TRANSLATE = 0, + ED_GIZMO_CAGE2D_PART_SCALE_MIN_X = 1, + ED_GIZMO_CAGE2D_PART_SCALE_MAX_X = 2, + ED_GIZMO_CAGE2D_PART_SCALE_MIN_Y = 3, + ED_GIZMO_CAGE2D_PART_SCALE_MAX_Y = 4, + /* Corners */ + ED_GIZMO_CAGE2D_PART_SCALE_MIN_X_MIN_Y = 5, + ED_GIZMO_CAGE2D_PART_SCALE_MIN_X_MAX_Y = 6, + ED_GIZMO_CAGE2D_PART_SCALE_MAX_X_MIN_Y = 7, + ED_GIZMO_CAGE2D_PART_SCALE_MAX_X_MAX_Y = 8, + + ED_GIZMO_CAGE2D_PART_ROTATE = 9, +}; + +/** #wmGizmo.highlight_part */ +enum { + /* ordered min/mid/max so we can loop over values (MIN/MID/MAX) on each axis. */ + ED_GIZMO_CAGE3D_PART_SCALE_MIN_X_MIN_Y_MIN_Z = 0, + ED_GIZMO_CAGE3D_PART_SCALE_MIN_X_MIN_Y_MID_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MIN_X_MIN_Y_MAX_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MIN_X_MID_Y_MIN_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MIN_X_MID_Y_MID_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MIN_X_MID_Y_MAX_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MIN_X_MAX_Y_MIN_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MIN_X_MAX_Y_MID_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MIN_X_MAX_Y_MAX_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MID_X_MIN_Y_MIN_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MID_X_MIN_Y_MID_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MID_X_MIN_Y_MAX_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MID_X_MID_Y_MIN_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MID_X_MID_Y_MID_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MID_X_MID_Y_MAX_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MID_X_MAX_Y_MIN_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MID_X_MAX_Y_MID_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MID_X_MAX_Y_MAX_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MAX_X_MIN_Y_MIN_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MAX_X_MIN_Y_MID_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MAX_X_MIN_Y_MAX_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MAX_X_MID_Y_MIN_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MAX_X_MID_Y_MID_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MAX_X_MID_Y_MAX_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MAX_X_MAX_Y_MIN_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MAX_X_MAX_Y_MID_Z, + ED_GIZMO_CAGE3D_PART_SCALE_MAX_X_MAX_Y_MAX_Z, + + ED_GIZMO_CAGE3D_PART_TRANSLATE, + + ED_GIZMO_CAGE3D_PART_ROTATE, +}; + +/* -------------------------------------------------------------------- */ +/* Dial Gizmo */ + +/* draw_options */ +enum { + ED_GIZMO_DIAL_DRAW_FLAG_NOP = 0, + ED_GIZMO_DIAL_DRAW_FLAG_CLIP = (1 << 0), + ED_GIZMO_DIAL_DRAW_FLAG_FILL = (1 << 1), + ED_GIZMO_DIAL_DRAW_FLAG_ANGLE_MIRROR = (1 << 2), + ED_GIZMO_DIAL_DRAW_FLAG_ANGLE_START_Y = (1 << 3), +}; + +/* -------------------------------------------------------------------- */ +/* Grab Gizmo */ + +/* draw_options */ +enum { + ED_GIZMO_GRAB_DRAW_FLAG_NOP = 0, + /* only for solid shapes */ + ED_GIZMO_GRAB_DRAW_FLAG_FILL = (1 << 0), + ED_GIZMO_GRAB_DRAW_FLAG_ALIGN_VIEW = (1 << 1), +}; + +enum { + ED_GIZMO_GRAB_STYLE_RING_2D = 0, + ED_GIZMO_GRAB_STYLE_CROSS_2D = 1, +}; + +/* -------------------------------------------------------------------- */ +/* Button Gizmo */ + +enum { + ED_GIZMO_BUTTON_SHOW_OUTLINE = (1 << 0), + /** + * Draw a line from the origin to the offset (similar to an arrow) + * sometimes needed to show what the button edits. + */ + ED_GIZMO_BUTTON_SHOW_HELPLINE = (1 << 1), +}; + + +/* -------------------------------------------------------------------- */ +/* Primitive Gizmo */ + +enum { + ED_GIZMO_PRIMITIVE_STYLE_PLANE = 0, +}; + +#endif /* __ED_GIZMO_LIBRARY_H__ */ diff --git a/source/blender/editors/include/ED_keyframes_draw.h b/source/blender/editors/include/ED_keyframes_draw.h index 9b0b2c970b2..64dee410526 100644 --- a/source/blender/editors/include/ED_keyframes_draw.h +++ b/source/blender/editors/include/ED_keyframes_draw.h @@ -109,7 +109,7 @@ typedef enum eKeyframeShapeDrawOpts { } eKeyframeShapeDrawOpts; /* draw simple diamond-shape keyframe */ -/* caller should set up vertex format, bind GPU_SHADER_KEYFRAME_DIAMOND, immBegin(GWN_PRIM_POINTS, n), then call this n times */ +/* caller should set up vertex format, bind GPU_SHADER_KEYFRAME_DIAMOND, immBegin(GPU_PRIM_POINTS, n), then call this n times */ void draw_keyframe_shape(float x, float y, float size, bool sel, short key_type, short mode, float alpha, unsigned int pos_id, unsigned int size_id, unsigned int color_id, unsigned int outline_color_id); diff --git a/source/blender/editors/include/ED_manipulator_library.h b/source/blender/editors/include/ED_manipulator_library.h deleted file mode 100644 index fca0f5c8806..00000000000 --- a/source/blender/editors/include/ED_manipulator_library.h +++ /dev/null @@ -1,222 +0,0 @@ -/* - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file ED_manipulator_library.h - * \ingroup wm - * - * \name Generic Manipulators. - * - * This is exposes pre-defined manipulators for re-use. - */ - - -#ifndef __ED_MANIPULATOR_LIBRARY_H__ -#define __ED_MANIPULATOR_LIBRARY_H__ - -/* initialize manipulators */ -void ED_manipulatortypes_arrow_2d(void); -void ED_manipulatortypes_arrow_3d(void); -void ED_manipulatortypes_button_2d(void); -void ED_manipulatortypes_cage_2d(void); -void ED_manipulatortypes_cage_3d(void); -void ED_manipulatortypes_dial_3d(void); -void ED_manipulatortypes_grab_3d(void); -void ED_manipulatortypes_facemap_3d(void); -void ED_manipulatortypes_primitive_3d(void); - -struct wmManipulator; -struct wmManipulatorGroup; - - -/* -------------------------------------------------------------------- */ -/* Shape Presets - * - * Intended to be called by custom draw functions. - */ - -/* manipulator_library_presets.c */ -void ED_manipulator_draw_preset_box( - const struct wmManipulator *mpr, float mat[4][4], int select_id); -void ED_manipulator_draw_preset_arrow( - const struct wmManipulator *mpr, float mat[4][4], int axis, int select_id); -void ED_manipulator_draw_preset_circle( - const struct wmManipulator *mpr, float mat[4][4], int axis, int select_id); -void ED_manipulator_draw_preset_facemap( - const struct bContext *C, const struct wmManipulator *mpr, struct Scene *scene, - struct Object *ob, const int facemap, int select_id); - - -/* -------------------------------------------------------------------- */ -/* 3D Arrow Manipulator */ - -enum { - ED_MANIPULATOR_ARROW_STYLE_NORMAL = 0, - ED_MANIPULATOR_ARROW_STYLE_CROSS = 1, - ED_MANIPULATOR_ARROW_STYLE_BOX = 2, - ED_MANIPULATOR_ARROW_STYLE_CONE = 3, -}; - -/* transform */ -enum { - /* inverted offset during interaction - if set it also sets constrained below */ - ED_MANIPULATOR_ARROW_XFORM_FLAG_INVERTED = (1 << 3), - /* clamp arrow interaction to property width */ - ED_MANIPULATOR_ARROW_XFORM_FLAG_CONSTRAINED = (1 << 4), -}; - -/* draw_options */ -enum { - /* Show arrow stem. */ - ED_MANIPULATOR_ARROW_DRAW_FLAG_STEM = (1 << 0), -}; - -void ED_manipulator_arrow3d_set_ui_range(struct wmManipulator *mpr, const float min, const float max); -void ED_manipulator_arrow3d_set_range_fac(struct wmManipulator *mpr, const float range_fac); - -/* -------------------------------------------------------------------- */ -/* 2D Arrow Manipulator */ - -/* none */ - -/* -------------------------------------------------------------------- */ -/* Cage Manipulator */ - -enum { - ED_MANIPULATOR_CAGE2D_XFORM_FLAG_TRANSLATE = (1 << 0), /* Translates */ - ED_MANIPULATOR_CAGE2D_XFORM_FLAG_ROTATE = (1 << 1), /* Rotates */ - ED_MANIPULATOR_CAGE2D_XFORM_FLAG_SCALE = (1 << 2), /* Scales */ - ED_MANIPULATOR_CAGE2D_XFORM_FLAG_SCALE_UNIFORM = (1 << 3), /* Scales uniformly */ - ED_MANIPULATOR_CAGE2D_XFORM_FLAG_SCALE_SIGNED = (1 << 4), /* Negative scale allowed */ -}; - -/* draw_style */ -enum { - ED_MANIPULATOR_CAGE2D_STYLE_BOX = 0, - ED_MANIPULATOR_CAGE2D_STYLE_CIRCLE = 1, -}; - -/* draw_options */ -enum { - /** Draw a central handle (instead of having the entire area selectable) - * Needed for large rectangles that we don't want to swallow all events. */ - ED_MANIPULATOR_CAGE2D_DRAW_FLAG_XFORM_CENTER_HANDLE = (1 << 0), -}; - -/** #wmManipulator.highlight_part */ -enum { - ED_MANIPULATOR_CAGE2D_PART_TRANSLATE = 0, - ED_MANIPULATOR_CAGE2D_PART_SCALE_MIN_X = 1, - ED_MANIPULATOR_CAGE2D_PART_SCALE_MAX_X = 2, - ED_MANIPULATOR_CAGE2D_PART_SCALE_MIN_Y = 3, - ED_MANIPULATOR_CAGE2D_PART_SCALE_MAX_Y = 4, - /* Corners */ - ED_MANIPULATOR_CAGE2D_PART_SCALE_MIN_X_MIN_Y = 5, - ED_MANIPULATOR_CAGE2D_PART_SCALE_MIN_X_MAX_Y = 6, - ED_MANIPULATOR_CAGE2D_PART_SCALE_MAX_X_MIN_Y = 7, - ED_MANIPULATOR_CAGE2D_PART_SCALE_MAX_X_MAX_Y = 8, - - ED_MANIPULATOR_CAGE2D_PART_ROTATE = 9, -}; - -/** #wmManipulator.highlight_part */ -enum { - /* ordered min/mid/max so we can loop over values (MIN/MID/MAX) on each axis. */ - ED_MANIPULATOR_CAGE3D_PART_SCALE_MIN_X_MIN_Y_MIN_Z = 0, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MIN_X_MIN_Y_MID_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MIN_X_MIN_Y_MAX_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MIN_X_MID_Y_MIN_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MIN_X_MID_Y_MID_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MIN_X_MID_Y_MAX_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MIN_X_MAX_Y_MIN_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MIN_X_MAX_Y_MID_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MIN_X_MAX_Y_MAX_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MID_X_MIN_Y_MIN_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MID_X_MIN_Y_MID_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MID_X_MIN_Y_MAX_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MID_X_MID_Y_MIN_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MID_X_MID_Y_MID_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MID_X_MID_Y_MAX_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MID_X_MAX_Y_MIN_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MID_X_MAX_Y_MID_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MID_X_MAX_Y_MAX_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MAX_X_MIN_Y_MIN_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MAX_X_MIN_Y_MID_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MAX_X_MIN_Y_MAX_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MAX_X_MID_Y_MIN_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MAX_X_MID_Y_MID_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MAX_X_MID_Y_MAX_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MAX_X_MAX_Y_MIN_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MAX_X_MAX_Y_MID_Z, - ED_MANIPULATOR_CAGE3D_PART_SCALE_MAX_X_MAX_Y_MAX_Z, - - ED_MANIPULATOR_CAGE3D_PART_TRANSLATE, - - ED_MANIPULATOR_CAGE3D_PART_ROTATE, -}; - -/* -------------------------------------------------------------------- */ -/* Dial Manipulator */ - -/* draw_options */ -enum { - ED_MANIPULATOR_DIAL_DRAW_FLAG_NOP = 0, - ED_MANIPULATOR_DIAL_DRAW_FLAG_CLIP = (1 << 0), - ED_MANIPULATOR_DIAL_DRAW_FLAG_FILL = (1 << 1), - ED_MANIPULATOR_DIAL_DRAW_FLAG_ANGLE_MIRROR = (1 << 2), - ED_MANIPULATOR_DIAL_DRAW_FLAG_ANGLE_START_Y = (1 << 3), -}; - -/* -------------------------------------------------------------------- */ -/* Grab Manipulator */ - -/* draw_options */ -enum { - ED_MANIPULATOR_GRAB_DRAW_FLAG_NOP = 0, - /* only for solid shapes */ - ED_MANIPULATOR_GRAB_DRAW_FLAG_FILL = (1 << 0), - ED_MANIPULATOR_GRAB_DRAW_FLAG_ALIGN_VIEW = (1 << 1), -}; - -enum { - ED_MANIPULATOR_GRAB_STYLE_RING_2D = 0, - ED_MANIPULATOR_GRAB_STYLE_CROSS_2D = 1, -}; - -/* -------------------------------------------------------------------- */ -/* Button Manipulator */ - -enum { - ED_MANIPULATOR_BUTTON_SHOW_OUTLINE = (1 << 0), - /** - * Draw a line from the origin to the offset (similar to an arrow) - * sometimes needed to show what the button edits. - */ - ED_MANIPULATOR_BUTTON_SHOW_HELPLINE = (1 << 1), -}; - - -/* -------------------------------------------------------------------- */ -/* Primitive Manipulator */ - -enum { - ED_MANIPULATOR_PRIMITIVE_STYLE_PLANE = 0, -}; - -#endif /* __ED_MANIPULATOR_LIBRARY_H__ */ diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 29f7edaebf0..38545137740 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -62,6 +62,7 @@ struct Depsgraph; struct uiLayout; #include "DNA_object_enums.h" +#include "BLI_compiler_attrs.h" /* object_edit.c */ struct Object *ED_object_context(struct bContext *C); /* context.object */ diff --git a/source/blender/editors/include/ED_scene.h b/source/blender/editors/include/ED_scene.h index 9b48187e541..116d9bd24fc 100644 --- a/source/blender/editors/include/ED_scene.h +++ b/source/blender/editors/include/ED_scene.h @@ -31,10 +31,7 @@ enum eSceneCopyMethod; struct Scene *ED_scene_add(struct Main *bmain, struct bContext *C, struct wmWindow *win, enum eSceneCopyMethod method) ATTR_NONNULL(); bool ED_scene_delete(struct bContext *C, struct Main *bmain, struct wmWindow *win, struct Scene *scene) ATTR_NONNULL(); -void ED_scene_change_update( - struct Main *bmain, struct bContext *C, - struct wmWindow *win, const struct bScreen *screen, - struct Scene *scene_old, struct Scene *scene_new) ATTR_NONNULL(); +void ED_scene_change_update(struct Main *bmain, struct Scene *scene, struct ViewLayer *layer) ATTR_NONNULL(); bool ED_scene_view_layer_delete( struct Main *bmain, struct Scene *scene, struct ViewLayer *layer, struct ReportList *reports) ATTR_NONNULL(1, 2, 3); diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 1a7055e2cfa..2445cbdb16c 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -67,7 +67,7 @@ struct PropertyRNA; /* regions */ void ED_region_do_listen( - struct bScreen *sc, struct ScrArea *sa, struct ARegion *ar, + struct wmWindow *win, struct ScrArea *sa, struct ARegion *ar, struct wmNotifier *note, const Scene *scene); void ED_region_do_layout(struct bContext *C, struct ARegion *ar); void ED_region_do_draw(struct bContext *C, struct ARegion *ar); @@ -137,8 +137,7 @@ void ED_area_exit(struct bContext *C, struct ScrArea *sa); int ED_screen_area_active(const struct bContext *C); void ED_screen_global_areas_create( struct wmWindow *win); -void ED_area_do_listen(struct bScreen *sc, ScrArea *sa, struct wmNotifier *note, Scene *scene, - struct WorkSpace *workspace); +void ED_area_do_listen(struct wmWindow *win, ScrArea *sa, struct wmNotifier *note, Scene *scene); void ED_area_tag_redraw(ScrArea *sa); void ED_area_tag_redraw_no_rebuild(ScrArea *sa); void ED_area_tag_redraw_regiontype(ScrArea *sa, int type); @@ -185,10 +184,7 @@ void ED_screen_refresh(struct wmWindowManager *wm, struct wmWindow *win); void ED_screen_ensure_updated(struct wmWindowManager *wm, struct wmWindow *win, struct bScreen *screen); void ED_screen_do_listen(struct bContext *C, struct wmNotifier *note); bool ED_screen_change(struct bContext *C, struct bScreen *sc); -void ED_screen_update_after_scene_change( - const struct bScreen *screen, - struct Scene *scene_new, - struct ViewLayer *view_layer); +void ED_screen_scene_change(struct bContext *C, struct wmWindow *win, struct Scene *scene); void ED_screen_set_active_region(struct bContext *C, struct wmWindow *win, const int xy[2]); void ED_screen_exit(struct bContext *C, struct wmWindow *window, struct bScreen *screen); void ED_screen_animation_timer(struct bContext *C, int redraws, int refresh, int sync, int enable); @@ -208,9 +204,7 @@ void ED_screen_preview_render(const struct bScreen *screen, int size_x, int s /* workspaces */ struct WorkSpace *ED_workspace_add( struct Main *bmain, - const char *name, - Scene *scene, - ViewLayer *act_render_layer) ATTR_NONNULL(); + const char *name) ATTR_NONNULL(); bool ED_workspace_change( struct WorkSpace *workspace_new, struct bContext *C, @@ -224,9 +218,6 @@ bool ED_workspace_delete( struct wmWindowManager *wm) ATTR_NONNULL(); void ED_workspace_scene_data_sync( struct WorkSpaceInstanceHook *hook, Scene *scene) ATTR_NONNULL(); -void ED_workspace_view_layer_unset( - const struct Main *bmain, struct Scene *scene, - const ViewLayer *layer_unset, ViewLayer *layer_new) ATTR_NONNULL(1, 2); struct WorkSpaceLayout *ED_workspace_layout_add( struct Main *bmain, struct WorkSpace *workspace, @@ -243,11 +234,6 @@ bool ED_workspace_layout_cycle( struct WorkSpace *workspace, const short direction, struct bContext *C) ATTR_NONNULL(); -void ED_workspace_object_mode_sync_from_object( - struct wmWindowManager *wm, WorkSpace *workspace, struct Object *obact); -void ED_workspace_object_mode_sync_from_scene( - struct wmWindowManager *wm, WorkSpace *workspace, struct Scene *scene); - void ED_workspace_status_text(struct bContext *C, const char *str); /* anim */ diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index c005f83b3fb..a8e8b347da2 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -114,8 +114,8 @@ bool calculateTransformCenter(struct bContext *C, int centerMode, float cent3d[3 struct TransInfo; struct Scene; struct Object; -struct wmManipulatorGroup; -struct wmManipulatorGroupType; +struct wmGizmoGroup; +struct wmGizmoGroupType; struct wmOperator; /* UNUSED */ @@ -159,15 +159,15 @@ int BIF_countTransformOrientation(const struct bContext *C); void Transform_Properties(struct wmOperatorType *ot, int flags); -/* transform manipulators */ +/* transform gizmos */ -void TRANSFORM_WGT_manipulator(struct wmManipulatorGroupType *wgt); -void VIEW3D_WGT_xform_cage(struct wmManipulatorGroupType *wgt); +void TRANSFORM_GGT_gizmo(struct wmGizmoGroupType *gzgt); +void VIEW3D_GGT_xform_cage(struct wmGizmoGroupType *gzgt); -bool ED_widgetgroup_manipulator2d_poll(const struct bContext *C, struct wmManipulatorGroupType *wgt); -void ED_widgetgroup_manipulator2d_setup(const struct bContext *C, struct wmManipulatorGroup *mgroup); -void ED_widgetgroup_manipulator2d_refresh(const struct bContext *C, struct wmManipulatorGroup *mgroup); -void ED_widgetgroup_manipulator2d_draw_prepare(const struct bContext *C, struct wmManipulatorGroup *mgroup); +bool ED_widgetgroup_gizmo2d_poll(const struct bContext *C, struct wmGizmoGroupType *gzgt); +void ED_widgetgroup_gizmo2d_setup(const struct bContext *C, struct wmGizmoGroup *gzgroup); +void ED_widgetgroup_gizmo2d_refresh(const struct bContext *C, struct wmGizmoGroup *gzgroup); +void ED_widgetgroup_gizmo2d_draw_prepare(const struct bContext *C, struct wmGizmoGroup *gzgroup); /* Snapping */ @@ -213,7 +213,7 @@ struct TransformCalcParams { /* Use 'Scene.orientation_type' when zero, otherwise subtract one and use. */ ushort orientation_type; }; -int ED_transform_calc_manipulator_stats( +int ED_transform_calc_gizmo_stats( const struct bContext *C, const struct TransformCalcParams *params, struct TransformBounds *tbounds); diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index efcf5978968..516b121031e 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -523,7 +523,7 @@ void ED_view3d_stop_render_preview(struct wmWindowManager *wm, struct ARegion *a void ED_view3d_shade_update(struct Main *bmain, struct View3D *v3d, struct ScrArea *sa); #define V3D_IS_ZBUF(v3d) \ - (((v3d)->flag & V3D_ZBUF_SELECT) && ((v3d)->drawtype > OB_WIRE)) + (((v3d)->flag & V3D_ZBUF_SELECT) && ((v3d)->shading.type > OB_WIRE)) void ED_view3d_id_remap(struct View3D *v3d, const struct ID *old_id, struct ID *new_id); diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index 4c67a306e75..ec4c7dddd4c 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -119,7 +119,7 @@ DEF_ICON(FULLSCREEN_EXIT) DEF_ICON(BLANK1) // Not actually blank - this is used all over the place /* BUTTONS */ -DEF_ICON(LAMP) +DEF_ICON(LIGHT) DEF_ICON(MATERIAL) DEF_ICON(TEXTURE) DEF_ICON(ANIM) @@ -216,7 +216,7 @@ DEF_ICON(MESH_DATA) DEF_ICON(CURVE_DATA) DEF_ICON(META_DATA) DEF_ICON(LATTICE_DATA) -DEF_ICON(LAMP_DATA) +DEF_ICON(LIGHT_DATA) DEF_ICON(MATERIAL_DATA) DEF_ICON(TEXTURE_DATA) DEF_ICON(ANIM_DATA) @@ -304,7 +304,7 @@ DEF_ICON(OUTLINER_OB_MESH) DEF_ICON(OUTLINER_OB_CURVE) DEF_ICON(OUTLINER_OB_LATTICE) DEF_ICON(OUTLINER_OB_META) -DEF_ICON(OUTLINER_OB_LAMP) +DEF_ICON(OUTLINER_OB_LIGHT) DEF_ICON(OUTLINER_OB_CAMERA) DEF_ICON(OUTLINER_OB_ARMATURE) DEF_ICON(OUTLINER_OB_FONT) @@ -336,7 +336,7 @@ DEF_ICON(OUTLINER_DATA_MESH) DEF_ICON(OUTLINER_DATA_CURVE) DEF_ICON(OUTLINER_DATA_LATTICE) DEF_ICON(OUTLINER_DATA_META) -DEF_ICON(OUTLINER_DATA_LAMP) +DEF_ICON(OUTLINER_DATA_LIGHT) DEF_ICON(OUTLINER_DATA_CAMERA) DEF_ICON(OUTLINER_DATA_ARMATURE) DEF_ICON(OUTLINER_DATA_FONT) @@ -377,11 +377,11 @@ DEF_ICON(MESH_CAPSULE) #ifndef DEF_ICON_BLANK_SKIP DEF_ICON(BLANK611) #endif -DEF_ICON(LAMP_POINT) -DEF_ICON(LAMP_SUN) -DEF_ICON(LAMP_SPOT) -DEF_ICON(LAMP_HEMI) -DEF_ICON(LAMP_AREA) +DEF_ICON(LIGHT_POINT) +DEF_ICON(LIGHT_SUN) +DEF_ICON(LIGHT_SPOT) +DEF_ICON(LIGHT_HEMI) +DEF_ICON(LIGHT_AREA) #ifndef DEF_ICON_BLANK_SKIP DEF_ICON(BLANK617) DEF_ICON(BLANK618) @@ -728,12 +728,10 @@ DEF_ICON(PASTEDOWN) DEF_ICON(COPYDOWN) DEF_ICON(PASTEFLIPUP) DEF_ICON(PASTEFLIPDOWN) -#ifndef DEF_ICON_BLANK_SKIP - DEF_ICON(BLANK227) - DEF_ICON(BLANK228) - DEF_ICON(BLANK229) - DEF_ICON(BLANK230) -#endif +DEF_ICON(VIS_SEL_11) +DEF_ICON(VIS_SEL_10) +DEF_ICON(VIS_SEL_01) +DEF_ICON(VIS_SEL_00) DEF_ICON(SNAP_SURFACE) DEF_ICON(AUTOMERGE_ON) DEF_ICON(AUTOMERGE_OFF) @@ -1032,3 +1030,55 @@ DEF_VICO(COLORSET_17_VEC) DEF_VICO(COLORSET_18_VEC) DEF_VICO(COLORSET_19_VEC) DEF_VICO(COLORSET_20_VEC) + +/* Events */ +DEF_ICON(EVENT_A) +DEF_ICON(EVENT_B) +DEF_ICON(EVENT_C) +DEF_ICON(EVENT_D) +DEF_ICON(EVENT_E) +DEF_ICON(EVENT_F) +DEF_ICON(EVENT_G) +DEF_ICON(EVENT_H) +DEF_ICON(EVENT_I) +DEF_ICON(EVENT_J) +DEF_ICON(EVENT_K) +DEF_ICON(EVENT_L) +DEF_ICON(EVENT_M) +DEF_ICON(EVENT_N) +DEF_ICON(EVENT_O) +DEF_ICON(EVENT_P) +DEF_ICON(EVENT_Q) +DEF_ICON(EVENT_R) +DEF_ICON(EVENT_S) +DEF_ICON(EVENT_T) +DEF_ICON(EVENT_U) +DEF_ICON(EVENT_V) +DEF_ICON(EVENT_W) +DEF_ICON(EVENT_X) +DEF_ICON(EVENT_Y) +DEF_ICON(EVENT_Z) +DEF_ICON(EVENT_SHIFT) +DEF_ICON(EVENT_CTRL) +DEF_ICON(EVENT_ALT) +DEF_ICON(EVENT_OS) +DEF_ICON(EVENT_F1) +DEF_ICON(EVENT_F2) +DEF_ICON(EVENT_F3) +DEF_ICON(EVENT_F4) +DEF_ICON(EVENT_F5) +DEF_ICON(EVENT_F6) +DEF_ICON(EVENT_F7) +DEF_ICON(EVENT_F8) +DEF_ICON(EVENT_F9) +DEF_ICON(EVENT_F10) +DEF_ICON(EVENT_F11) +DEF_ICON(EVENT_F12) +DEF_ICON(EVENT_ESC) +DEF_ICON(EVENT_TAB) +DEF_ICON(EVENT_PAGEUP) +DEF_ICON(EVENT_PAGEDOWN) +DEF_ICON(EVENT_HOME) +DEF_ICON(EVENT_END) +DEF_ICON(EVENT_RETURN) +/* add as needed. */ diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index e5218e287d4..087e0c4ab7b 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -73,9 +73,10 @@ struct bNodeSocket; struct wmDropBox; struct wmDrag; struct wmEvent; -struct wmManipulator; +struct wmGizmo; struct wmMsgBus; struct wmKeyMap; +struct wmKeyMapItem; typedef struct uiBut uiBut; typedef struct uiBlock uiBlock; @@ -233,6 +234,8 @@ enum { UI_BUT_ACTIVE_LEFT = (1 << 21), /* Active left part of number button */ UI_BUT_ACTIVE_RIGHT = (1 << 22), /* Active right part of number button */ + + UI_BUT_HAS_SHORTCUT = (1 << 23), /* Button has shortcut text */ }; /* scale fixed button widths by this to account for DPI */ @@ -441,10 +444,10 @@ void UI_popup_menu_but_set(uiPopupMenu *pup, struct ARegion *butregion, uiBut *b typedef struct uiPopover uiPopover; int UI_popover_panel_invoke( - struct bContext *C, int space_id, int region_id, const char *idname, + struct bContext *C, const char *idname, bool keep_open, struct ReportList *reports); -uiPopover *UI_popover_begin(struct bContext *C) ATTR_NONNULL(1); +uiPopover *UI_popover_begin(struct bContext *C, int menu_width) ATTR_NONNULL(1); void UI_popover_end(struct bContext *C, struct uiPopover *head, struct wmKeyMap *keymap); struct uiLayout *UI_popover_layout(uiPopover *head); void UI_popover_once_clear(uiPopover *pup); @@ -552,7 +555,7 @@ void UI_but_drag_set_path(uiBut *but, const char *path, const bool use_free); void UI_but_drag_set_name(uiBut *but, const char *name); void UI_but_drag_set_value(uiBut *but); void UI_but_drag_set_image( - uiBut *but, const char *path, int icon, struct ImBuf *ima, float scale, const bool use_free); + uiBut *but, const char *path, int icon, struct ImBuf *ima, float scale, const bool use_free); bool UI_but_active_drop_name(struct bContext *C); bool UI_but_active_drop_color(struct bContext *C); @@ -590,13 +593,14 @@ bool UI_but_online_manual_id_from_active( * - R: RNA * - O: operator */ -uiBut *uiDefBut(uiBlock *block, - int type, int retval, const char *str, - int x1, int y1, - short x2, short y2, - void *poin, - float min, float max, - float a1, float a2, const char *tip); +uiBut *uiDefBut( + uiBlock *block, + int type, int retval, const char *str, + int x1, int y1, + short x2, short y2, + void *poin, + float min, float max, + float a1, float a2, const char *tip); uiBut *uiDefButF(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, float *poin, float min, float max, float a1, float a2, const char *tip); uiBut *uiDefButBitF(uiBlock *block, int type, int bit, int retval, const char *str, int x, int y, short width, short height, float *poin, float min, float max, float a1, float a2, const char *tip); uiBut *uiDefButI(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, int *poin, float min, float max, float a1, float a2, const char *tip); @@ -610,13 +614,14 @@ uiBut *uiDefButR_prop(uiBlock *block, int type, int retval, const char *str, int uiBut *uiDefButO(uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x, int y, short width, short height, const char *tip); uiBut *uiDefButO_ptr(uiBlock *block, int type, struct wmOperatorType *ot, int opcontext, const char *str, int x, int y, short width, short height, const char *tip); -uiBut *uiDefIconBut(uiBlock *block, - int type, int retval, int icon, - int x1, int y1, - short x2, short y2, - void *poin, - float min, float max, - float a1, float a2, const char *tip); +uiBut *uiDefIconBut( + uiBlock *block, + int type, int retval, int icon, + int x1, int y1, + short x2, short y2, + void *poin, + float min, float max, + float a1, float a2, const char *tip); uiBut *uiDefIconButF(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, float *poin, float min, float max, float a1, float a2, const char *tip); uiBut *uiDefIconButBitF(uiBlock *block, int type, int bit, int retval, int icon, int x, int y, short width, short height, float *poin, float min, float max, float a1, float a2, const char *tip); uiBut *uiDefIconButI(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, int *poin, float min, float max, float a1, float a2, const char *tip); @@ -630,13 +635,14 @@ uiBut *uiDefIconButR_prop(uiBlock *block, int type, int retval, int icon, int x, uiBut *uiDefIconButO(uiBlock *block, int type, const char *opname, int opcontext, int icon, int x, int y, short width, short height, const char *tip); uiBut *uiDefIconButO_ptr(uiBlock *block, int type, struct wmOperatorType *ot, int opcontext, int icon, int x, int y, short width, short height, const char *tip); -uiBut *uiDefIconTextBut(uiBlock *block, - int type, int retval, int icon, const char *str, - int x1, int y1, - short x2, short y2, - void *poin, - float min, float max, - float a1, float a2, const char *tip); +uiBut *uiDefIconTextBut( + uiBlock *block, + int type, int retval, int icon, const char *str, + int x1, int y1, + short x2, short y2, + void *poin, + float min, float max, + float a1, float a2, const char *tip); uiBut *uiDefIconTextButF(uiBlock *block, int type, int retval, int icon, const char *str, int x, int y, short width, short height, float *poin, float min, float max, float a1, float a2, const char *tip); uiBut *uiDefIconTextButBitF(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x, int y, short width, short height, float *poin, float min, float max, float a1, float a2, const char *tip); uiBut *uiDefIconTextButI(uiBlock *block, int type, int retval, int icon, const char *str, int x, int y, short width, short height, int *poin, float min, float max, float a1, float a2, const char *tip); @@ -721,6 +727,9 @@ enum { int UI_icon_from_id(struct ID *id); int UI_icon_from_report_type(int type); +int UI_icon_from_event_type(short event_type, short event_value); +int UI_icon_from_keymap_item(const struct wmKeyMapItem *kmi, int r_icon_mod[4]); + uiBut *uiDefPulldownBut(uiBlock *block, uiBlockCreateFunc func, void *arg, const char *str, int x, int y, short width, short height, const char *tip); uiBut *uiDefMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, const char *str, int x, int y, short width, short height, const char *tip); uiBut *uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, const char *str, int x, int y, short width, short height, const char *tip); @@ -736,9 +745,10 @@ uiBut *uiDefKeyevtButS(uiBlock *block, int retval, const char *str, int x, int y uiBut *uiDefHotKeyevtButS(uiBlock *block, int retval, const char *str, int x, int y, short width, short height, short *keypoin, short *modkeypoin, const char *tip); 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 *uiDefSearchButO_ptr(uiBlock *block, struct wmOperatorType *ot, struct IDProperty *properties, - void *arg, int retval, int icon, int maxlen, int x, int y, - short width, short height, float a1, float a2, const char *tip); +uiBut *uiDefSearchButO_ptr( + uiBlock *block, struct wmOperatorType *ot, struct IDProperty *properties, + void *arg, int retval, int icon, int maxlen, int x, int y, + short width, short height, float a1, float a2, const char *tip); /* For uiDefAutoButsRNA */ @@ -799,8 +809,9 @@ void UI_but_func_tooltip_set(uiBut *but, uiButToolTipFunc func, void *argN); void UI_but_tooltip_refresh(struct bContext *C, uiBut *but); void UI_but_tooltip_timer_remove(struct bContext *C, uiBut *but); -bool UI_textbutton_activate_rna(const struct bContext *C, struct ARegion *ar, - const void *rna_poin_data, const char *rna_prop_id); +bool UI_textbutton_activate_rna( + const struct bContext *C, struct ARegion *ar, + const void *rna_poin_data, const char *rna_prop_id); bool UI_textbutton_activate_but(const struct bContext *C, uiBut *but); void UI_but_focus_on_enter_event(struct wmWindow *win, uiBut *but); @@ -834,9 +845,10 @@ void UI_panels_end(const struct bContext *C, struct ARegion *ar, int *x, int *y) void UI_panels_draw(const struct bContext *C, struct ARegion *ar); struct Panel *UI_panel_find_by_type(struct ListBase *lb, struct PanelType *pt); -struct Panel *UI_panel_begin(struct ScrArea *sa, struct ARegion *ar, struct ListBase *lb, - uiBlock *block, struct PanelType *pt, struct Panel *pa, - bool *r_open); +struct Panel *UI_panel_begin( + struct ScrArea *sa, struct ARegion *ar, struct ListBase *lb, + uiBlock *block, struct PanelType *pt, struct Panel *pa, + bool *r_open); void UI_panel_end(uiBlock *block, int width, int height); void UI_panels_scale(struct ARegion *ar, float new_width); void UI_panel_label_offset(struct uiBlock *block, int *x, int *y); @@ -996,8 +1008,9 @@ uiLayout *uiLayoutColumnFlow(uiLayout *layout, int number, bool align); uiLayout *uiLayoutGridFlow( uiLayout *layout, bool row_major, int columns_len, bool even_columns, bool even_rows, bool align); uiLayout *uiLayoutBox(uiLayout *layout); -uiLayout *uiLayoutListBox(uiLayout *layout, struct uiList *ui_list, struct PointerRNA *ptr, struct PropertyRNA *prop, - struct PointerRNA *actptr, struct PropertyRNA *actprop); +uiLayout *uiLayoutListBox( + uiLayout *layout, struct uiList *ui_list, struct PointerRNA *ptr, struct PropertyRNA *prop, + struct PointerRNA *actptr, struct PropertyRNA *actprop); uiLayout *uiLayoutAbsolute(uiLayout *layout, bool align); uiLayout *uiLayoutSplit(uiLayout *layout, float percentage, bool align); uiLayout *uiLayoutOverlap(uiLayout *layout); @@ -1020,8 +1033,9 @@ void uiTemplateIDTabs( PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, int filter); -void uiTemplateAnyID(uiLayout *layout, struct PointerRNA *ptr, const char *propname, - const char *proptypename, const char *text); +void uiTemplateAnyID( + uiLayout *layout, struct PointerRNA *ptr, const char *propname, + const char *proptypename, const char *text); void uiTemplateSearch( uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, @@ -1033,27 +1047,32 @@ void uiTemplateSearchPreview( struct PointerRNA *searchptr, const char *searchpropname, const char *newop, const char *unlinkop, const int rows, const int cols); -void uiTemplatePathBuilder(uiLayout *layout, struct PointerRNA *ptr, const char *propname, - struct PointerRNA *root_ptr, const char *text); +void uiTemplatePathBuilder( + uiLayout *layout, struct PointerRNA *ptr, const char *propname, + struct PointerRNA *root_ptr, const char *text); uiLayout *uiTemplateModifier(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr); void uiTemplateOperatorRedoProperties(uiLayout *layout, const struct bContext *C); uiLayout *uiTemplateConstraint(uiLayout *layout, struct PointerRNA *ptr); -void uiTemplatePreview(uiLayout *layout, struct bContext *C, struct ID *id, bool show_buttons, struct ID *parent, - struct MTex *slot, const char *preview_id); +void uiTemplatePreview( + uiLayout *layout, struct bContext *C, struct ID *id, bool show_buttons, struct ID *parent, + struct MTex *slot, const char *preview_id); void uiTemplateColorRamp(uiLayout *layout, struct PointerRNA *ptr, const char *propname, bool expand); void uiTemplateIcon(uiLayout *layout, int icon_value, float icon_scale); void uiTemplateIconView(uiLayout *layout, struct PointerRNA *ptr, const char *propname, bool show_labels, float icon_scale); void uiTemplateHistogram(uiLayout *layout, struct PointerRNA *ptr, const char *propname); void uiTemplateWaveform(uiLayout *layout, struct PointerRNA *ptr, const char *propname); void uiTemplateVectorscope(uiLayout *layout, struct PointerRNA *ptr, const char *propname); -void uiTemplateCurveMapping(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int type, - bool levels, bool brush, bool neg_slope); +void uiTemplateCurveMapping( + uiLayout *layout, struct PointerRNA *ptr, const char *propname, int type, + bool levels, bool brush, bool neg_slope); void uiTemplateColorPicker(uiLayout *layout, struct PointerRNA *ptr, const char *propname, bool value_slider, bool lock, bool lock_luminosity, bool cubic); void uiTemplatePalette(uiLayout *layout, struct PointerRNA *ptr, const char *propname, bool color); -void uiTemplateLayers(uiLayout *layout, struct PointerRNA *ptr, const char *propname, - PointerRNA *used_ptr, const char *used_propname, int active_layer); +void uiTemplateCryptoPicker(uiLayout *layout, struct PointerRNA *ptr, const char *propname); +void uiTemplateLayers( + uiLayout *layout, struct PointerRNA *ptr, const char *propname, + PointerRNA *used_ptr, const char *used_propname, int active_layer); void uiTemplateImage(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *userptr, bool compact, bool multiview); void uiTemplateImageSettings(uiLayout *layout, struct PointerRNA *imfptr, bool color_management); void uiTemplateImageStereo3d(uiLayout *layout, struct PointerRNA *stereo3d_format_ptr); @@ -1080,10 +1099,11 @@ void uiTemplateCacheFile(uiLayout *layout, struct bContext *C, struct PointerRNA /* Default UIList class name, keep in sync with its declaration in bl_ui/__init__.py */ #define UI_UL_DEFAULT_CLASS_NAME "UI_UL_list" -void uiTemplateList(uiLayout *layout, struct bContext *C, const char *listtype_name, const char *list_id, - struct PointerRNA *dataptr, const char *propname, struct PointerRNA *active_dataptr, - const char *active_propname, const char *item_dyntip_propname, - int rows, int maxrows, int layout_type, int columns); +void uiTemplateList( + uiLayout *layout, struct bContext *C, const char *listtype_name, const char *list_id, + struct PointerRNA *dataptr, const char *propname, struct PointerRNA *active_dataptr, + const char *active_propname, const char *item_dyntip_propname, + int rows, int maxrows, int layout_type, int columns); void uiTemplateNodeLink(uiLayout *layout, struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *input); void uiTemplateNodeView(uiLayout *layout, struct bContext *C, struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *input); void uiTemplateTextureUser(uiLayout *layout, struct bContext *C); @@ -1151,7 +1171,7 @@ void uiItemPopoverPanel_ptr( const char *name, int icon); void uiItemPopoverPanel( uiLayout *layout, struct bContext *C, - int space_id, int region_id, const char *panelname, + const char *panelname, const char *name, int icon); void uiItemPopoverPanelFromGroup( uiLayout *layout, struct bContext *C, @@ -1199,14 +1219,18 @@ uiBut *UI_region_active_but_get(struct ARegion *ar); /* Styled text draw */ void UI_fontstyle_set(const struct uiFontStyle *fs); -void UI_fontstyle_draw_ex(const struct uiFontStyle *fs, const struct rcti *rect, const char *str, - const unsigned char col[4], size_t len, float *r_xofs, float *r_yofs); -void UI_fontstyle_draw(const struct uiFontStyle *fs, const struct rcti *rect, const char *str, - const unsigned char col[4]); -void UI_fontstyle_draw_rotated(const struct uiFontStyle *fs, const struct rcti *rect, const char *str, - const unsigned char col[4]); -void UI_fontstyle_draw_simple(const struct uiFontStyle *fs, float x, float y, const char *str, - const unsigned char col[4]); +void UI_fontstyle_draw_ex( + const struct uiFontStyle *fs, const struct rcti *rect, const char *str, + const unsigned char col[4], size_t len, float *r_xofs, float *r_yofs); +void UI_fontstyle_draw( + const struct uiFontStyle *fs, const struct rcti *rect, const char *str, + const unsigned char col[4]); +void UI_fontstyle_draw_rotated( + const struct uiFontStyle *fs, const struct rcti *rect, const char *str, + const unsigned char col[4]); +void UI_fontstyle_draw_simple( + const struct uiFontStyle *fs, float x, float y, const char *str, + const unsigned char col[4]); void UI_fontstyle_draw_simple_backdrop( const struct uiFontStyle *fs, float x, float y, const char *str, const float col_fg[4], const float col_bg[4]); @@ -1242,7 +1266,7 @@ void UI_butstore_unregister(uiButStore *bs_handle, uiBut **but_p); /* ui_interface_region_tooltip.c */ struct ARegion *UI_tooltip_create_from_button(struct bContext *C, struct ARegion *butregion, uiBut *but); -struct ARegion *UI_tooltip_create_from_manipulator(struct bContext *C, struct wmManipulator *mpr); +struct ARegion *UI_tooltip_create_from_gizmo(struct bContext *C, struct wmGizmo *gz); void UI_tooltip_free(struct bContext *C, struct bScreen *sc, struct ARegion *ar); /* How long before a tool-tip shows. */ diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index cab0fa8645d..d2fbb881a0a 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -75,8 +75,6 @@ typedef enum ThemeColorID { TH_PANEL_HEADER, TH_PANEL_BACK, TH_PANEL_SUB_BACK, - TH_PANEL_SHOW_HEADER, - TH_PANEL_SHOW_BACK, TH_BUTBACK, TH_BUTBACK_TEXT, @@ -282,11 +280,11 @@ typedef enum ThemeColorID { TH_AXIS_Y, TH_AXIS_Z, - TH_MANIPULATOR_HI, - TH_MANIPULATOR_PRIMARY, - TH_MANIPULATOR_SECONDARY, - TH_MANIPULATOR_A, - TH_MANIPULATOR_B, + TH_GIZMO_HI, + TH_GIZMO_PRIMARY, + TH_GIZMO_SECONDARY, + TH_GIZMO_A, + TH_GIZMO_B, TH_LOW_GRAD, TH_HIGH_GRAD, diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h index d407878d063..4c4ee1e01c5 100644 --- a/source/blender/editors/include/UI_view2d.h +++ b/source/blender/editors/include/UI_view2d.h @@ -103,8 +103,6 @@ enum eView2D_Gridlines { /* ------ Defines for Scrollers ----- */ /* scroller area */ -#define V2D_SCROLL_HEIGHT_MIN (0.25f * U.widget_unit) -#define V2D_SCROLL_WIDTH_MIN (0.25f * U.widget_unit) #define V2D_SCROLL_HEIGHT (0.45f * U.widget_unit) #define V2D_SCROLL_WIDTH (0.45f * U.widget_unit) /* For scrollers with scale markings (text written onto them) */ |