Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey@blender.org>2020-11-12 11:26:20 +0300
committerSergey Sharybin <sergey@blender.org>2020-11-12 11:26:20 +0300
commitde6cee4fc1913982b0b2bd786bfd813c935bbe73 (patch)
treea726c0c63bbd1d6c47c90c32119ce14c8048cddc /source/blender/editors/include
parente4d432500a0e2f978fe019da43deb843da405032 (diff)
parent88bb29dea668df8cc46aa7f55895f229748bdbb4 (diff)
Merge branch 'master' into codesign_error_tracker
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/ED_anim_api.h14
-rw-r--r--source/blender/editors/include/ED_armature.h127
-rw-r--r--source/blender/editors/include/ED_buttons.h10
-rw-r--r--source/blender/editors/include/ED_curve.h2
-rw-r--r--source/blender/editors/include/ED_fileselect.h5
-rw-r--r--source/blender/editors/include/ED_gizmo_library.h6
-rw-r--r--source/blender/editors/include/ED_image.h3
-rw-r--r--source/blender/editors/include/ED_keyframing.h2
-rw-r--r--source/blender/editors/include/ED_numinput.h1
-rw-r--r--source/blender/editors/include/ED_object.h25
-rw-r--r--source/blender/editors/include/ED_paint.h5
-rw-r--r--source/blender/editors/include/ED_screen.h10
-rw-r--r--source/blender/editors/include/ED_transform.h6
-rw-r--r--source/blender/editors/include/ED_undo.h3
-rw-r--r--source/blender/editors/include/ED_uvedit.h6
-rw-r--r--source/blender/editors/include/ED_view3d.h4
-rw-r--r--source/blender/editors/include/UI_icons.h17
-rw-r--r--source/blender/editors/include/UI_interface.h50
-rw-r--r--source/blender/editors/include/UI_interface_icons.h16
-rw-r--r--source/blender/editors/include/UI_resources.h47
-rw-r--r--source/blender/editors/include/UI_view2d.h3
21 files changed, 188 insertions, 174 deletions
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index 36990414e6d..9cf67816df2 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -332,7 +332,7 @@ typedef enum eAnimFilter_Flags {
} eAnimFilter_Flags;
/* ---------- Flag Checking Macros ------------ */
-// xxx check on all of these flags again...
+/* XXX check on all of these flags again. */
/* Dopesheet only */
/* 'Scene' channels */
@@ -507,7 +507,7 @@ typedef enum eAnimChannels_SetFlag {
ACHANNEL_SETFLAG_ADD = 1,
/** on->off, off->on */
ACHANNEL_SETFLAG_INVERT = 2,
- /** some on -> all off // all on */
+ /** some on -> all off / all on */
ACHANNEL_SETFLAG_TOGGLE = 3,
} eAnimChannels_SetFlag;
@@ -620,9 +620,11 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac,
eAnimChannel_Settings setting,
eAnimChannels_SetFlag mode);
-/* Deselect all animation channels */
-void ANIM_deselect_anim_channels(
- bAnimContext *ac, void *data, eAnimCont_Types datatype, bool test, eAnimChannels_SetFlag sel);
+/* Select or deselect animation channels */
+void ANIM_anim_channels_select_set(bAnimContext *ac, eAnimChannels_SetFlag sel);
+
+/* Toggle selection of animation channels */
+void ANIM_anim_channels_select_toggle(bAnimContext *ac);
/* Set the 'active' channel of type channel_type, in the given action */
void ANIM_set_active_channel(bAnimContext *ac,
@@ -730,7 +732,7 @@ void ANIM_nla_mapping_apply_fcurve(struct AnimData *adt,
/* ..... */
/* Perform auto-blending/extend refreshes after some operations */
-// NOTE: defined in space_nla/nla_edit.c, not in animation/
+/* NOTE: defined in space_nla/nla_edit.c, not in animation/ */
void ED_nla_postop_refresh(bAnimContext *ac);
/* ------------- Unit Conversion Mappings ------------- */
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index 47633033b6c..3501acd4fdf 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -30,6 +30,7 @@ extern "C" {
struct Base;
struct Bone;
struct Depsgraph;
+struct EditBone;
struct IDProperty;
struct ListBase;
struct Main;
@@ -47,77 +48,6 @@ struct bPoseChannel;
struct wmKeyConfig;
struct wmOperator;
-typedef struct EditBone {
- struct EditBone *next, *prev;
- /** User-Defined Properties on this Bone */
- struct IDProperty *prop;
- /** Editbones have a one-way link (i.e. children refer
- * to parents. This is converted to a two-way link for
- * normal bones when leaving editmode. */
- struct EditBone *parent;
- /** (64 == MAXBONENAME) */
- char name[64];
- /** Roll along axis. We'll ultimately use the axis/angle method
- * for determining the transformation matrix of the bone. The axis
- * is tail-head while roll provides the angle. Refer to Graphics
- * Gems 1 p. 466 (section IX.6) if it's not already in here somewhere*/
- float roll;
-
- /** Orientation and length is implicit during editing */
- float head[3];
- float tail[3];
- /** All joints are considered to have zero rotation with respect to
- * their parents. Therefore any rotations specified during the
- * animation are automatically relative to the bones' rest positions*/
- int flag;
- int layer;
- char inherit_scale_mode;
-
- /* Envelope distance & weight */
- float dist, weight;
- /** put them in order! transform uses this as scale */
- float xwidth, length, zwidth;
- float rad_head, rad_tail;
-
- /* Bendy-Bone parameters */
- short segments;
- float roll1, roll2;
- float curve_in_x, curve_in_y;
- float curve_out_x, curve_out_y;
- float ease1, ease2;
- float scale_in_x, scale_in_y;
- float scale_out_x, scale_out_y;
-
- /** for envelope scaling */
- float oldlength;
-
- /** Type of next/prev bone handles */
- char bbone_prev_type;
- char bbone_next_type;
- /** Next/prev bones to use as handle references when calculating bbones (optional) */
- struct EditBone *bbone_prev;
- struct EditBone *bbone_next;
-
- /* Used for display */
- /** in Armature space, rest pos matrix */
- float disp_mat[4][4];
- /** in Armature space, rest pos matrix */
- float disp_tail_mat[4][4];
- /** in Armature space, rest pos matrix (32 == MAX_BBONE_SUBDIV) */
- float disp_bbone_mat[32][4][4];
-
- /** connected child temporary during drawing */
- struct EditBone *bbone_child;
-
- /* Used to store temporary data */
- union {
- struct EditBone *ebone;
- struct Bone *bone;
- void *p;
- int i;
- } temp;
-} EditBone;
-
#define BONESEL_ROOT (1u << 29)
#define BONESEL_TIP (1u << 30)
#define BONESEL_BONE (1u << 31)
@@ -141,13 +71,13 @@ typedef struct EditBone {
#define BONE_SELECT_CHILD 1
/* armature_add.c */
-EditBone *ED_armature_ebone_add(struct bArmature *arm, const char *name);
-EditBone *ED_armature_ebone_add_primitive(struct Object *obedit_arm,
- float length,
- bool view_aligned);
+struct EditBone *ED_armature_ebone_add(struct bArmature *arm, const char *name);
+struct EditBone *ED_armature_ebone_add_primitive(struct Object *obedit_arm,
+ float length,
+ bool view_aligned);
/* armature_edit.c */
-float ED_armature_ebone_roll_to_vector(const EditBone *bone,
+float ED_armature_ebone_roll_to_vector(const struct EditBone *bone,
const float align_axis[3],
const bool axis_only);
void ED_armature_origin_set(
@@ -156,7 +86,7 @@ void ED_armature_edit_transform(struct bArmature *arm, const float mat[4][4], co
void ED_armature_transform(struct bArmature *arm, const float mat[4][4], const bool do_props);
/* armature_naming.c */
-void ED_armature_ebone_unique_name(struct ListBase *ebones, char *name, EditBone *bone);
+void ED_armature_ebone_unique_name(struct ListBase *ebones, char *name, struct EditBone *bone);
void ED_armature_bone_rename(struct Main *bmain,
struct bArmature *arm,
const char *oldnamep,
@@ -219,34 +149,39 @@ void ED_armature_undosys_type(struct UndoType *ut);
void ED_armature_edit_sync_selection(struct ListBase *edbo);
void ED_armature_edit_validate_active(struct bArmature *arm);
void ED_armature_edit_refresh_layer_used(struct bArmature *arm);
-void ED_armature_ebone_remove_ex(struct bArmature *arm, EditBone *exBone, bool clear_connected);
-void ED_armature_ebone_remove(struct bArmature *arm, EditBone *exBone);
-bool ED_armature_ebone_is_child_recursive(EditBone *ebone_parent, EditBone *ebone_child);
-EditBone *ED_armature_ebone_find_shared_parent(EditBone *ebone_child[],
- const unsigned int ebone_child_tot);
-void ED_armature_ebone_to_mat3(EditBone *ebone, float r_mat[3][3]);
-void ED_armature_ebone_to_mat4(EditBone *ebone, float r_mat[4][4]);
-void ED_armature_ebone_from_mat3(EditBone *ebone, const float mat[3][3]);
-void ED_armature_ebone_from_mat4(EditBone *ebone, const float mat[4][4]);
-EditBone *ED_armature_ebone_find_name(const struct ListBase *edbo, const char *name);
-EditBone *ED_armature_ebone_get_mirrored(const struct ListBase *edbo, EditBone *ebo);
+void ED_armature_ebone_remove_ex(struct bArmature *arm,
+ struct EditBone *exBone,
+ bool clear_connected);
+void ED_armature_ebone_remove(struct bArmature *arm, struct EditBone *exBone);
+bool ED_armature_ebone_is_child_recursive(struct EditBone *ebone_parent,
+ struct EditBone *ebone_child);
+struct EditBone *ED_armature_ebone_find_shared_parent(struct EditBone *ebone_child[],
+ const unsigned int ebone_child_tot);
+void ED_armature_ebone_to_mat3(struct EditBone *ebone, float r_mat[3][3]);
+void ED_armature_ebone_to_mat4(struct EditBone *ebone, float r_mat[4][4]);
+void ED_armature_ebone_from_mat3(struct EditBone *ebone, const float mat[3][3]);
+void ED_armature_ebone_from_mat4(struct EditBone *ebone, const float mat[4][4]);
+struct EditBone *ED_armature_ebone_find_name(const struct ListBase *edbo, const char *name);
+struct EditBone *ED_armature_ebone_get_mirrored(const struct ListBase *edbo, struct EditBone *ebo);
void ED_armature_ebone_transform_mirror_update(struct bArmature *arm,
- EditBone *ebo,
+ struct EditBone *ebo,
bool check_select);
void ED_armature_edit_transform_mirror_update(struct Object *obedit);
void ED_armature_from_edit(struct Main *bmain, struct bArmature *arm);
void ED_armature_to_edit(struct bArmature *arm);
void ED_armature_edit_free(struct bArmature *arm);
void ED_armature_ebone_listbase_temp_clear(struct ListBase *lb);
-void ED_armature_ebone_listbase_free(struct ListBase *lb);
-void ED_armature_ebone_listbase_copy(struct ListBase *lb_dst, struct ListBase *lb_src);
+void ED_armature_ebone_listbase_free(struct ListBase *lb, const bool do_id_user);
+void ED_armature_ebone_listbase_copy(struct ListBase *lb_dst,
+ struct ListBase *lb_src,
+ const bool do_id_user);
/* low level selection functions which handle */
-int ED_armature_ebone_selectflag_get(const EditBone *ebone);
-void ED_armature_ebone_selectflag_set(EditBone *ebone, int flag);
-void ED_armature_ebone_select_set(EditBone *ebone, bool select);
-void ED_armature_ebone_selectflag_enable(EditBone *ebone, int flag);
-void ED_armature_ebone_selectflag_disable(EditBone *ebone, int flag);
+int ED_armature_ebone_selectflag_get(const struct EditBone *ebone);
+void ED_armature_ebone_selectflag_set(struct EditBone *ebone, int flag);
+void ED_armature_ebone_select_set(struct EditBone *ebone, bool select);
+void ED_armature_ebone_selectflag_enable(struct EditBone *ebone, int flag);
+void ED_armature_ebone_selectflag_disable(struct EditBone *ebone, int flag);
/* pose_edit.c */
struct Object *ED_pose_object_from_context(struct bContext *C);
diff --git a/source/blender/editors/include/ED_buttons.h b/source/blender/editors/include/ED_buttons.h
index ccef62eb8d2..1ff160b2ca8 100644
--- a/source/blender/editors/include/ED_buttons.h
+++ b/source/blender/editors/include/ED_buttons.h
@@ -27,8 +27,16 @@ extern "C" {
#endif
struct SpaceProperties;
+struct bContext;
-int ED_buttons_tabs_list(struct SpaceProperties *sbuts, int *context_tabs_array);
+int ED_buttons_tabs_list(struct SpaceProperties *sbuts, short *context_tabs_array);
+bool ED_buttons_tab_has_search_result(struct SpaceProperties *sbuts, const int index);
+
+void ED_buttons_search_string_set(struct SpaceProperties *sbuts, const char *value);
+int ED_buttons_search_string_length(struct SpaceProperties *sbuts);
+const char *ED_buttons_search_string_get(struct SpaceProperties *sbuts);
+
+void ED_buttons_set_context(const struct bContext *C, PointerRNA *ptr, const int context);
#ifdef __cplusplus
}
diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h
index f9b1d9cdc64..8015a665970 100644
--- a/source/blender/editors/include/ED_curve.h
+++ b/source/blender/editors/include/ED_curve.h
@@ -84,7 +84,7 @@ void ED_curve_editfont_load(struct Object *obedit);
void ED_curve_editfont_make(struct Object *obedit);
void ED_curve_editfont_free(struct Object *obedit);
-void ED_text_to_object(struct bContext *C, struct Text *text, const bool split_lines);
+void ED_text_to_object(struct bContext *C, const struct Text *text, const bool split_lines);
void ED_curve_beztcpy(struct EditNurb *editnurb,
struct BezTriple *dst,
diff --git a/source/blender/editors/include/ED_fileselect.h b/source/blender/editors/include/ED_fileselect.h
index 47b8eb543f4..84808416074 100644
--- a/source/blender/editors/include/ED_fileselect.h
+++ b/source/blender/editors/include/ED_fileselect.h
@@ -35,6 +35,7 @@ struct SpaceFile;
struct bContext;
struct bScreen;
struct uiBlock;
+struct wmOperator;
struct wmWindow;
struct wmWindowManager;
@@ -145,11 +146,15 @@ void ED_fileselect_window_params_get(const struct wmWindow *win,
int win_size[2],
bool *is_maximized);
+struct ScrArea *ED_fileselect_handler_area_find(const struct wmWindow *win,
+ const struct wmOperator *file_operator);
+
int ED_path_extension_type(const char *path);
int ED_file_extension_icon(const char *path);
void ED_file_read_bookmarks(void);
+void ED_file_change_dir_ex(struct bContext *C, struct bScreen *screen, struct ScrArea *area);
void ED_file_change_dir(struct bContext *C);
void ED_file_path_button(struct bScreen *screen,
diff --git a/source/blender/editors/include/ED_gizmo_library.h b/source/blender/editors/include/ED_gizmo_library.h
index 0ee3b00e426..434ab743d18 100644
--- a/source/blender/editors/include/ED_gizmo_library.h
+++ b/source/blender/editors/include/ED_gizmo_library.h
@@ -19,7 +19,7 @@
*
* \name Generic Gizmos.
*
- * This is exposes pre-defined gizmos for re-use.
+ * This is exposes predefined gizmos for re-use.
*/
#pragma once
@@ -42,13 +42,13 @@ void ED_gizmotypes_blank_3d(void);
void ED_gizmotypes_snap_3d(void);
struct ARegion;
-struct bContext;
struct Depsgraph;
struct Object;
struct SnapObjectContext;
-struct wmWindowManager;
struct View3D;
+struct bContext;
struct wmGizmo;
+struct wmWindowManager;
/* -------------------------------------------------------------------- */
/* Shape Presets
diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h
index 01040949a0a..4835d2118d9 100644
--- a/source/blender/editors/include/ED_image.h
+++ b/source/blender/editors/include/ED_image.h
@@ -58,7 +58,8 @@ void ED_space_image_set_mask(struct bContext *C, struct SpaceImage *sima, struct
bool ED_space_image_color_sample(struct SpaceImage *sima,
struct ARegion *region,
int mval[2],
- float r_col[3]);
+ float r_col[3],
+ bool *r_is_data);
struct ImBuf *ED_space_image_acquire_buffer(struct SpaceImage *sima, void **r_lock, int tile);
int ED_space_image_get_display_channel_mask(struct ImBuf *ibuf);
void ED_space_image_release_buffer(struct SpaceImage *sima, struct ImBuf *ibuf, void *lock);
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h
index 869be81ca43..12d6f1fce54 100644
--- a/source/blender/editors/include/ED_keyframing.h
+++ b/source/blender/editors/include/ED_keyframing.h
@@ -226,7 +226,7 @@ typedef enum eModifyKey_Returns {
MODIFYKEY_MISSING_TYPEINFO = -2,
} eModifyKey_Returns;
-/* poll the current KeyingSet, updating it's set of paths
+/* poll the current KeyingSet, updating its set of paths
* (if "builtin"/"relative") for context changes */
eModifyKey_Returns ANIM_validate_keyingset(struct bContext *C,
ListBase *dsources,
diff --git a/source/blender/editors/include/ED_numinput.h b/source/blender/editors/include/ED_numinput.h
index 6c5aacafc7a..50f1ce1efe2 100644
--- a/source/blender/editors/include/ED_numinput.h
+++ b/source/blender/editors/include/ED_numinput.h
@@ -99,6 +99,7 @@ bool hasNumInput(const NumInput *n);
bool applyNumInput(NumInput *n, float *vec);
bool handleNumInput(struct bContext *C, NumInput *n, const struct wmEvent *event);
+/** Share with `TFM_MODAL_CANCEL` in `transform.h`. */
#define NUM_MODAL_INCREMENT_UP 18
#define NUM_MODAL_INCREMENT_DOWN 19
diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h
index b0ef22575ee..2e9b711c99a 100644
--- a/source/blender/editors/include/ED_object.h
+++ b/source/blender/editors/include/ED_object.h
@@ -160,6 +160,7 @@ extern struct EnumPropertyItem prop_clear_parent_types[];
extern struct EnumPropertyItem prop_make_parent_types[];
#endif
+/* Set the object's parent, return true iff successful. */
bool ED_object_parent_set(struct ReportList *reports,
const struct bContext *C,
struct Scene *scene,
@@ -343,6 +344,21 @@ void ED_object_constraint_dependency_tag_update(struct Main *bmain,
struct Object *ob,
struct bConstraint *con);
+bool ED_object_constraint_move_to_index(struct Object *ob,
+ struct bConstraint *con,
+ const int index);
+void ED_object_constraint_link(struct Main *bmain,
+ struct Object *ob_dst,
+ struct ListBase *dst,
+ struct ListBase *src);
+void ED_object_constraint_copy_for_object(struct Main *bmain,
+ struct Object *ob_dst,
+ struct bConstraint *con);
+void ED_object_constraint_copy_for_pose(struct Main *bmain,
+ struct Object *ob_dst,
+ struct bPoseChannel *pchan,
+ struct bConstraint *con);
+
/* object_modes.c */
bool ED_object_mode_compat_test(const struct Object *ob, eObjectMode mode);
bool ED_object_mode_compat_set(struct bContext *C,
@@ -414,6 +430,11 @@ int ED_object_modifier_copy(struct ReportList *reports,
struct Scene *scene,
struct Object *ob,
struct ModifierData *md);
+void ED_object_modifier_link(struct bContext *C, struct Object *ob_dst, struct Object *ob_src);
+void ED_object_modifier_copy_to_object(struct bContext *C,
+ struct Object *ob_dst,
+ struct Object *ob_src,
+ struct ModifierData *md);
bool ED_object_iter_other(struct Main *bmain,
struct Object *orig_ob,
@@ -454,6 +475,8 @@ int ED_object_gpencil_modifier_apply(struct Main *bmain,
int ED_object_gpencil_modifier_copy(struct ReportList *reports,
struct Object *ob,
struct GpencilModifierData *md);
+void ED_object_gpencil_modifier_copy_to_object(struct Object *ob_dst,
+ struct GpencilModifierData *md);
/* object_shader_fx.c */
struct ShaderFxData *ED_object_shaderfx_add(struct ReportList *reports,
@@ -477,6 +500,8 @@ bool ED_object_shaderfx_move_to_index(struct ReportList *reports,
struct Object *ob,
struct ShaderFxData *fx,
const int index);
+void ED_object_shaderfx_link(struct Object *dst, struct Object *src);
+void ED_object_shaderfx_copy(struct Object *dst, struct ShaderFxData *fx);
/* object_select.c */
void ED_object_select_linked_by_id(struct bContext *C, struct ID *id);
diff --git a/source/blender/editors/include/ED_paint.h b/source/blender/editors/include/ED_paint.h
index 39c5e3521d6..dec1f6844b2 100644
--- a/source/blender/editors/include/ED_paint.h
+++ b/source/blender/editors/include/ED_paint.h
@@ -53,6 +53,11 @@ void ED_imapaint_bucket_fill(struct bContext *C,
struct wmOperator *op,
const int mouse[2]);
+/* paint_image_proj.c */
+void ED_paint_data_warning(struct ReportList *reports, bool uvs, bool mat, bool tex, bool stencil);
+bool ED_paint_proj_mesh_data_check(
+ struct Scene *scene, struct Object *ob, bool *uvs, bool *mat, bool *tex, bool *stencil);
+
/* image_undo.c */
void ED_image_undo_push_begin(const char *name, int paint_mode);
void ED_image_undo_push_begin_with_image(const char *name,
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h
index d9c7128c2ee..dc1c43c0337 100644
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@ -80,6 +80,10 @@ void ED_region_tag_redraw_no_rebuild(struct ARegion *region);
void ED_region_tag_refresh_ui(struct ARegion *region);
void ED_region_tag_redraw_editor_overlays(struct ARegion *region);
+void ED_region_search_filter_update(const struct ScrArea *area, struct ARegion *region);
+const char *ED_area_region_search_filter_get(const struct ScrArea *area,
+ const struct ARegion *region);
+
void ED_region_panels_init(struct wmWindowManager *wm, struct ARegion *region);
void ED_region_panels_ex(const struct bContext *C, struct ARegion *region, const char *contexts[]);
void ED_region_panels(const struct bContext *C, struct ARegion *region);
@@ -88,6 +92,11 @@ void ED_region_panels_layout_ex(const struct bContext *C,
struct ListBase *paneltypes,
const char *contexts[],
const char *category_override);
+bool ED_region_property_search(const struct bContext *C,
+ struct ARegion *region,
+ struct ListBase *paneltypes,
+ const char *contexts[],
+ const char *category_override);
void ED_region_panels_layout(const struct bContext *C, struct ARegion *region);
void ED_region_panels_draw(const struct bContext *C, struct ARegion *region);
@@ -190,6 +199,7 @@ int ED_region_global_size_y(void);
void ED_area_update_region_sizes(struct wmWindowManager *wm,
struct wmWindow *win,
struct ScrArea *area);
+bool ED_area_has_shared_border(struct ScrArea *a, struct ScrArea *b);
ScrArea *ED_screen_areas_iter_first(const struct wmWindow *win, const bScreen *screen);
ScrArea *ED_screen_areas_iter_next(const bScreen *screen, const ScrArea *area);
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h
index b53740a531f..0ea86e006e0 100644
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@ -130,8 +130,10 @@ bool BIF_createTransformOrientation(struct bContext *C,
void BIF_selectTransformOrientation(struct bContext *C, struct TransformOrientation *target);
void ED_getTransformOrientationMatrix(const struct bContext *C,
- float orientation_mat[3][3],
- const short around);
+ struct Object *ob,
+ struct Object *obedit,
+ const short around,
+ float r_orientation_mat[3][3]);
int BIF_countTransformOrientation(const struct bContext *C);
diff --git a/source/blender/editors/include/ED_undo.h b/source/blender/editors/include/ED_undo.h
index dbd374415b0..989854872f3 100644
--- a/source/blender/editors/include/ED_undo.h
+++ b/source/blender/editors/include/ED_undo.h
@@ -36,6 +36,9 @@ struct wmOperator;
struct wmOperatorType;
/* undo.c */
+bool ED_undo_is_state_valid(struct bContext *C);
+void ED_undo_group_begin(struct bContext *C);
+void ED_undo_group_end(struct bContext *C);
void ED_undo_push(struct bContext *C, const char *str);
void ED_undo_push_op(struct bContext *C, struct wmOperator *op);
void ED_undo_grouped_push(struct bContext *C, const char *str);
diff --git a/source/blender/editors/include/ED_uvedit.h b/source/blender/editors/include/ED_uvedit.h
index 53fb79bb012..629e77bd4f2 100644
--- a/source/blender/editors/include/ED_uvedit.h
+++ b/source/blender/editors/include/ED_uvedit.h
@@ -229,12 +229,6 @@ void ED_uvedit_add_simple_uvs(struct Main *bmain, const struct Scene *scene, str
/* uvedit_draw.c */
void ED_image_draw_cursor(struct ARegion *region, const float cursor[2]);
-void ED_uvedit_draw_main(struct SpaceImage *sima,
- const struct Scene *scene,
- struct ViewLayer *view_layer,
- struct Object *obedit,
- struct Object *obact,
- struct Depsgraph *depsgraph);
/* uvedit_buttons.c */
void ED_uvedit_buttons_register(struct ARegionType *art);
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index d3eb6c00f57..a0246174970 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -459,6 +459,8 @@ void ED_view3d_clipping_calc(struct BoundBox *bb,
const struct ARegion *region,
const struct Object *ob,
const struct rcti *rect);
+bool ED_view3d_clipping_clamp_minmax(const struct RegionView3D *rv3d, float min[3], float max[3]);
+
void ED_view3d_clipping_local(struct RegionView3D *rv3d, const float mat[4][4]);
bool ED_view3d_clipping_test(const struct RegionView3D *rv3d,
const float co[3],
@@ -693,7 +695,7 @@ void ED_view3d_grid_steps(const struct Scene *scene,
float *r_grid_steps);
float ED_view3d_grid_view_scale(struct Scene *scene,
struct View3D *v3d,
- struct RegionView3D *rv3d,
+ struct ARegion *region,
const char **r_grid_unit);
void ED_scene_draw_fps(const struct Scene *scene, int xoffset, int *yoffset);
diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h
index 452a1fca111..d99ecf2fd56 100644
--- a/source/blender/editors/include/UI_icons.h
+++ b/source/blender/editors/include/UI_icons.h
@@ -160,7 +160,7 @@ DEF_ICON_BLANK(157)
DEF_ICON_BLANK(158)
DEF_ICON_BLANK(159)
DEF_ICON_BLANK(160)
-DEF_ICON(BLANK1) // Not actually blank - this is used all over the place
+DEF_ICON(BLANK1) /* Not actually blank - this is used all over the place */
DEF_ICON(FAKE_USER_OFF)
DEF_ICON(FAKE_USER_ON)
/* EDITORS */
@@ -192,7 +192,7 @@ DEF_ICON(UV)
DEF_ICON_BLANK(190)
/* MODES */
-DEF_ICON(OBJECT_DATAMODE) // XXX fix this up
+DEF_ICON(OBJECT_DATAMODE) /* XXX fix this up */
DEF_ICON(EDITMODE_HLT)
DEF_ICON(UV_DATA)
DEF_ICON(VPAINT_HLT)
@@ -320,7 +320,7 @@ DEF_ICON_OBJECT(OUTLINER_OB_GROUP_INSTANCE)
DEF_ICON_OBJECT(OUTLINER_OB_GREASEPENCIL)
DEF_ICON_OBJECT(OUTLINER_OB_LIGHTPROBE)
DEF_ICON_OBJECT(OUTLINER_OB_IMAGE)
-DEF_ICON_BLANK(321)
+DEF_ICON_COLLECTION(OUTLINER_COLLECTION)
DEF_ICON(RESTRICT_COLOR_OFF)
DEF_ICON(RESTRICT_COLOR_ON)
DEF_ICON(HIDE_ON)
@@ -873,7 +873,7 @@ DEF_ICON(SEQ_SPLITVIEW)
DEF_ICON(SEQ_STRIP_META)
DEF_ICON(SEQ_STRIP_DUPLICATE)
DEF_ICON_BLANK(872)
-DEF_ICON(IMAGE_RGB) // XXX CHANGE TO STRAIGHT ALPHA, Z ETC
+DEF_ICON(IMAGE_RGB) /* XXX CHANGE TO STRAIGHT ALPHA, Z ETC */
DEF_ICON(IMAGE_RGB_ALPHA)
DEF_ICON(IMAGE_ALPHA)
DEF_ICON(IMAGE_ZDEPTH)
@@ -980,6 +980,15 @@ DEF_ICON_VECTOR(COLORSET_18_VEC)
DEF_ICON_VECTOR(COLORSET_19_VEC)
DEF_ICON_VECTOR(COLORSET_20_VEC)
+DEF_ICON_VECTOR(COLLECTION_COLOR_01)
+DEF_ICON_VECTOR(COLLECTION_COLOR_02)
+DEF_ICON_VECTOR(COLLECTION_COLOR_03)
+DEF_ICON_VECTOR(COLLECTION_COLOR_04)
+DEF_ICON_VECTOR(COLLECTION_COLOR_05)
+DEF_ICON_VECTOR(COLLECTION_COLOR_06)
+DEF_ICON_VECTOR(COLLECTION_COLOR_07)
+DEF_ICON_VECTOR(COLLECTION_COLOR_08)
+
/* Events */
DEF_ICON_COLOR(EVENT_A)
DEF_ICON_COLOR(EVENT_B)
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index d5d489b1742..f9dc23502c7 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -155,8 +155,11 @@ enum {
UI_BLOCK_RADIAL = 1 << 20,
UI_BLOCK_POPOVER = 1 << 21,
UI_BLOCK_POPOVER_ONCE = 1 << 22,
- /** Always show keymaps, even for non-menus. */
+ /** Always show key-maps, even for non-menus. */
UI_BLOCK_SHOW_SHORTCUT_ALWAYS = 1 << 23,
+ /** The block is only used during the search process and will not be drawn.
+ * Currently just for the case of a closed panel's sub-panel (and its sub-panels). */
+ UI_BLOCK_SEARCH_ONLY = 1 << 25,
};
/** #uiPopupBlockHandle.menuretval */
@@ -223,6 +226,12 @@ enum {
UI_BUT_OVERRIDEN = 1u << 31u,
};
+/* Default font size for normal text. */
+#define UI_DEFAULT_TEXT_POINTS 11
+
+/* Larger size used for title text. */
+#define UI_DEFAULT_TITLE_POINTS 12
+
#define UI_PANEL_WIDTH 340
#define UI_COMPACT_PANEL_WIDTH 160
#define UI_SIDEBAR_PANEL_WIDTH 220
@@ -317,7 +326,7 @@ typedef enum {
UI_BTYPE_BUT = 1 << 9,
UI_BTYPE_ROW = 2 << 9,
UI_BTYPE_TEXT = 3 << 9,
- /** dropdown list */
+ /** Drop-down list. */
UI_BTYPE_MENU = 4 << 9,
UI_BTYPE_BUT_MENU = 5 << 9,
/** number button */
@@ -671,6 +680,8 @@ enum {
void UI_block_theme_style_set(uiBlock *block, char theme_style);
char UI_block_emboss_get(uiBlock *block);
void UI_block_emboss_set(uiBlock *block, char emboss);
+bool UI_block_is_search_only(const uiBlock *block);
+void UI_block_set_search_only(uiBlock *block, bool search_only);
void UI_block_free(const struct bContext *C, uiBlock *block);
void UI_blocklist_free(const struct bContext *C, struct ListBase *lb);
@@ -1671,38 +1682,35 @@ void UI_panels_begin(const struct bContext *C, struct ARegion *region);
void UI_panels_end(const struct bContext *C, struct ARegion *region, int *r_x, int *r_y);
void UI_panels_draw(const struct bContext *C, struct ARegion *region);
-struct Panel *UI_panel_find_by_type(struct ListBase *lb, struct PanelType *pt);
+struct Panel *UI_panel_find_by_type(struct ListBase *lb, const struct PanelType *pt);
struct Panel *UI_panel_begin(struct ARegion *region,
struct ListBase *lb,
uiBlock *block,
struct PanelType *pt,
struct Panel *panel,
bool *r_open);
-void UI_panel_end(const struct ARegion *region, uiBlock *block, int width, int height, bool open);
+void UI_panel_header_buttons_begin(struct Panel *panel);
+void UI_panel_header_buttons_end(struct Panel *panel);
+void UI_panel_end(struct Panel *panel, int width, int height);
-void UI_panels_scale(struct ARegion *region, float new_width);
-void UI_panel_label_offset(struct uiBlock *block, int *r_x, int *r_y);
+bool UI_panel_is_closed(const struct Panel *panel);
+bool UI_panel_is_active(const struct Panel *panel);
+void UI_panel_label_offset(const struct uiBlock *block, int *r_x, int *r_y);
int UI_panel_size_y(const struct Panel *panel);
bool UI_panel_is_dragging(const struct Panel *panel);
+bool UI_panel_matches_search_filter(const struct Panel *panel);
bool UI_panel_category_is_visible(const struct ARegion *region);
void UI_panel_category_add(struct ARegion *region, const char *name);
-struct PanelCategoryDyn *UI_panel_category_find(struct ARegion *region, const char *idname);
+struct PanelCategoryDyn *UI_panel_category_find(const struct ARegion *region, const char *idname);
struct PanelCategoryStack *UI_panel_category_active_find(struct ARegion *region,
const char *idname);
const char *UI_panel_category_active_get(struct ARegion *region, bool set_fallback);
void UI_panel_category_active_set(struct ARegion *region, const char *idname);
void UI_panel_category_active_set_default(struct ARegion *region, const char *idname);
-struct PanelCategoryDyn *UI_panel_category_find_mouse_over_ex(struct ARegion *region,
- const int x,
- const int y);
-struct PanelCategoryDyn *UI_panel_category_find_mouse_over(struct ARegion *region,
- const struct wmEvent *event);
void UI_panel_category_clear_all(struct ARegion *region);
void UI_panel_category_draw_all(struct ARegion *region, const char *category_id_active);
-struct PanelType *UI_paneltype_find(int space_id, int region_id, const char *idname);
-
/* Panel custom data. */
struct PointerRNA *UI_panel_custom_data_get(const struct Panel *panel);
struct PointerRNA *UI_region_panel_custom_data_under_cursor(const struct bContext *C,
@@ -1710,17 +1718,16 @@ struct PointerRNA *UI_region_panel_custom_data_under_cursor(const struct bContex
void UI_panel_custom_data_set(struct Panel *panel, struct PointerRNA *custom_data);
/* Polyinstantiated panels for representing a list of data. */
-struct Panel *UI_panel_add_instanced(struct ARegion *region,
+struct Panel *UI_panel_add_instanced(const struct bContext *C,
+ struct ARegion *region,
struct ListBase *panels,
- char *panel_idname,
+ const char *panel_idname,
struct PointerRNA *custom_data);
void UI_panels_free_instanced(const struct bContext *C, struct ARegion *region);
#define INSTANCED_PANEL_UNIQUE_STR_LEN 4
void UI_list_panel_unique_str(struct Panel *panel, char *r_name);
-void UI_panel_set_expand_from_list_data(const struct bContext *C, struct Panel *panel);
-
typedef void (*uiListPanelIDFromDataFunc)(void *data_link, char *r_idname);
bool UI_panel_list_matches_data(struct ARegion *region,
struct ListBase *data,
@@ -1746,7 +1753,7 @@ void UI_popup_handlers_remove_all(struct bContext *C, struct ListBase *handlers)
* be used to reinitialize some internal state if user preferences change. */
void UI_init(void);
-void UI_init_userdef(struct Main *bmain);
+void UI_init_userdef(void);
void UI_reinit_font(void);
void UI_exit(void);
@@ -1861,6 +1868,9 @@ uiLayout *UI_block_layout(uiBlock *block,
const struct uiStyle *style);
void UI_block_layout_set_current(uiBlock *block, uiLayout *layout);
void UI_block_layout_resolve(uiBlock *block, int *r_x, int *r_y);
+void UI_block_layout_free(uiBlock *block);
+
+bool UI_block_apply_search_filter(uiBlock *block, const char *search_filter);
void UI_region_message_subscribe(struct ARegion *region, struct wmMsgBus *mbus);
@@ -2414,6 +2424,8 @@ void uiItemTabsEnumR_prop(uiLayout *layout,
struct bContext *C,
struct PointerRNA *ptr,
PropertyRNA *prop,
+ struct PointerRNA *ptr_highlight,
+ PropertyRNA *prop_highlight,
bool icon_only);
/* Only for testing, inspecting layouts. */
diff --git a/source/blender/editors/include/UI_interface_icons.h b/source/blender/editors/include/UI_interface_icons.h
index bbe66f7fd73..78fcd6e7dfa 100644
--- a/source/blender/editors/include/UI_interface_icons.h
+++ b/source/blender/editors/include/UI_interface_icons.h
@@ -27,6 +27,7 @@
extern "C" {
#endif
+struct Collection;
struct ID;
struct PointerRNA;
struct PreviewImage;
@@ -60,7 +61,7 @@ typedef enum eAlertIcon {
ALERT_ICON_MAX,
} eAlertIcon;
-struct ImBuf *UI_alert_image(eAlertIcon icon);
+struct ImBuf *UI_icon_alert_imbuf_get(eAlertIcon icon);
/*
* Resizable Icons for Blender
@@ -72,12 +73,12 @@ int UI_icon_get_width(int icon_id);
int UI_icon_get_height(int icon_id);
bool UI_icon_get_theme_color(int icon_id, unsigned char color[4]);
-void UI_id_icon_render(const struct bContext *C,
+void UI_icon_render_id(const struct bContext *C,
struct Scene *scene,
struct ID *id,
const bool big,
const bool use_job);
-int UI_preview_render_size(enum eIconSizes size);
+int UI_icon_preview_to_render_size(enum eIconSizes size);
void UI_icon_draw(float x, float y, int icon_id);
void UI_icon_draw_alpha(float x, float y, int icon_id, float alpha);
@@ -103,10 +104,11 @@ int UI_iconfile_get_index(const char *filename);
struct PreviewImage *UI_icon_to_preview(int icon_id);
-int UI_rnaptr_icon_get(struct bContext *C, struct PointerRNA *ptr, int rnaicon, const bool big);
-int UI_idcode_icon_get(const int idcode);
-int UI_library_icon_get(const struct ID *id);
-int UI_mode_icon_get(const int mode);
+int UI_icon_from_rnaptr(struct bContext *C, struct PointerRNA *ptr, int rnaicon, const bool big);
+int UI_icon_from_idcode(const int idcode);
+int UI_icon_from_library(const struct ID *id);
+int UI_icon_from_object_mode(const int mode);
+int UI_icon_color_from_collection(const struct Collection *collection);
#ifdef __cplusplus
}
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h
index 31cb62117c5..f597bb307db 100644
--- a/source/blender/editors/include/UI_resources.h
+++ b/source/blender/editors/include/UI_resources.h
@@ -50,7 +50,7 @@ typedef enum ThemeColorID {
TH_REDALERT,
TH_THEMEUI,
- // common colors among spaces
+ /* Common colors among spaces. */
TH_BACK,
/** Use when 'TH_SHOW_BACK_GRAD' is set (the lower, darker color). */
@@ -92,6 +92,7 @@ typedef enum ThemeColorID {
TH_TRANSFORM,
TH_VERTEX,
TH_VERTEX_SELECT,
+ TH_VERTEX_ACTIVE,
TH_VERTEX_UNREFERENCED,
TH_VERTEX_SIZE,
TH_OUTLINE_WIDTH,
@@ -357,92 +358,92 @@ struct bThemeState {
int spacetype, regionid;
};
-// THE CODERS API FOR THEMES:
+/* THE CODERS API FOR THEMES: */
-// returns one value, not scaled
+/* returns one value, not scaled */
float UI_GetThemeValuef(int colorid);
int UI_GetThemeValue(int colorid);
float UI_GetThemeValueTypef(int colorid, int spacetype);
int UI_GetThemeValueType(int colorid, int spacetype);
-// get three color values, scaled to 0.0-1.0 range
+/* get three color values, scaled to 0.0-1.0 range */
void UI_GetThemeColor3fv(int colorid, float col[3]);
void UI_GetThemeColorBlend3ubv(int colorid1, int colorid2, float fac, unsigned char col[3]);
void UI_GetThemeColorBlend3f(int colorid1, int colorid2, float fac, float r_col[3]);
void UI_GetThemeColorBlend4f(int colorid1, int colorid2, float fac, float r_col[4]);
-// get the color, range 0.0-1.0, complete with shading offset
+/* get the color, range 0.0-1.0, complete with shading offset */
void UI_GetThemeColorShade3fv(int colorid, int offset, float col[3]);
void UI_GetThemeColorShade3ubv(int colorid, int offset, unsigned char col[3]);
void UI_GetThemeColorShade4ubv(int colorid, int offset, unsigned char col[4]);
-// get three color values, range 0-255,
-// complete with shading offset for the RGB components and blending.
+/* get three color values, range 0-255,
+ * complete with shading offset for the RGB components and blending. */
void UI_GetThemeColorBlendShade3ubv(
int colorid1, int colorid2, float fac, int offset, unsigned char col[3]);
-// get four color values, scaled to 0.0-1.0 range
+/* get four color values, scaled to 0.0-1.0 range */
void UI_GetThemeColor4fv(int colorid, float col[4]);
/* get four color values from specified space type, scaled to 0.0-1.0 range */
void UI_GetThemeColorType4fv(int colorid, int spacetype, float col[4]);
-// get four color values, range 0.0-1.0, complete with shading offset for the RGB components
+/* get four color values, range 0.0-1.0, complete with shading offset for the RGB components */
void UI_GetThemeColorShade4fv(int colorid, int offset, float col[4]);
void UI_GetThemeColorShadeAlpha4fv(int colorid, int coloffset, int alphaoffset, float col[4]);
-// get four color values ranged between 0 and 255; includes the alpha channel
+/* get four color values ranged between 0 and 255; includes the alpha channel */
void UI_GetThemeColorShadeAlpha4ubv(int colorid,
int coloffset,
int alphaoffset,
unsigned char col[4]);
-// get four color values, range 0.0-1.0,
-// complete with shading offset for the RGB components and blending.
+/* get four color values, range 0.0-1.0,
+ * complete with shading offset for the RGB components and blending. */
void UI_GetThemeColorBlendShade3fv(
int colorid1, int colorid2, float fac, int offset, float col[3]);
void UI_GetThemeColorBlendShade4fv(
int colorid1, int colorid2, float fac, int offset, float col[4]);
-// get the 3 or 4 byte values
+/* get the 3 or 4 byte values */
void UI_GetThemeColor3ubv(int colorid, unsigned char col[3]);
void UI_GetThemeColor4ubv(int colorid, unsigned char col[4]);
-// get a theme color from specified space type
+/* get a theme color from specified space type */
void UI_GetThemeColorType3fv(int colorid, int spacetype, float col[3]);
void UI_GetThemeColorType3ubv(int colorid, int spacetype, unsigned char col[3]);
void UI_GetThemeColorType4ubv(int colorid, int spacetype, unsigned char col[4]);
-// get theme color for coloring monochrome icons
+/* get theme color for coloring monochrome icons */
bool UI_GetIconThemeColor4ubv(int colorid, unsigned char col[4]);
-// shade a 3 byte color (same as UI_GetColorPtrBlendShade3ubv with 0.0 factor)
+/* shade a 3 byte color (same as UI_GetColorPtrBlendShade3ubv with 0.0 factor) */
void UI_GetColorPtrShade3ubv(const unsigned char cp1[3], unsigned char col[3], int offset);
-// get a 3 byte color, blended and shaded between two other char color pointers
+/* get a 3 byte color, blended and shaded between two other char color pointers */
void UI_GetColorPtrBlendShade3ubv(const unsigned char cp1[3],
const unsigned char cp2[3],
unsigned char col[3],
float fac,
int offset);
-// sets the font color
-// (for anything fancy use UI_GetThemeColor[Fancy] then BLF_color)
+/* sets the font color
+ * (for anything fancy use UI_GetThemeColor[Fancy] then BLF_color) */
void UI_FontThemeColor(int fontid, int colorid);
-// clear the framebuffer using the input colorid
+/* clear the framebuffer using the input colorid */
void UI_ThemeClearColor(int colorid);
-// internal (blender) usage only, for init and set active
+/* internal (blender) usage only, for init and set active */
void UI_SetTheme(int spacetype, int regionid);
-// get current theme
+/* get current theme */
struct bTheme *UI_GetTheme(void);
void UI_Theme_Store(struct bThemeState *theme_state);
void UI_Theme_Restore(struct bThemeState *theme_state);
-// return shadow width outside menus and popups */
+/* return shadow width outside menus and popups */
int UI_ThemeMenuShadowWidth(void);
/* only for buttons in theme editor! */
diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h
index d14731b81b7..8df29e5b520 100644
--- a/source/blender/editors/include/UI_view2d.h
+++ b/source/blender/editors/include/UI_view2d.h
@@ -131,9 +131,6 @@ void UI_view2d_totRect_set_resize(struct View2D *v2d, int width, int height, boo
void UI_view2d_mask_from_win(const struct View2D *v2d, struct rcti *r_mask);
-/* per tab offsets, returns 1 if tab changed */
-bool UI_view2d_tab_set(struct View2D *v2d, int tab);
-
void UI_view2d_zoom_cache_reset(void);
/* view matrix operations */