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:
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/ED_anim_api.h20
-rw-r--r--source/blender/editors/include/ED_armature.h7
-rw-r--r--source/blender/editors/include/ED_mball.h1
-rw-r--r--source/blender/editors/include/ED_mesh.h22
-rw-r--r--source/blender/editors/include/ED_node.h3
-rw-r--r--source/blender/editors/include/ED_numinput.h7
-rw-r--r--source/blender/editors/include/ED_object.h3
-rw-r--r--source/blender/editors/include/ED_render.h1
-rw-r--r--source/blender/editors/include/ED_sculpt.h4
-rw-r--r--source/blender/editors/include/ED_transform.h4
-rw-r--r--source/blender/editors/include/ED_transverts.h70
-rw-r--r--source/blender/editors/include/ED_view3d.h6
-rw-r--r--source/blender/editors/include/UI_interface.h93
13 files changed, 166 insertions, 75 deletions
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index 61f9cec15d9..8b9bb0a4ab0 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -396,15 +396,15 @@ typedef struct bAnimChannelType {
/* get name (for channel lists) */
void (*name)(bAnimListElem *ale, char *name);
/* get RNA property+pointer for editing the name */
- short (*name_prop)(bAnimListElem *ale, struct PointerRNA *ptr, struct PropertyRNA **prop);
+ bool (*name_prop)(bAnimListElem *ale, struct PointerRNA *ptr, struct PropertyRNA **prop);
/* get icon (for channel lists) */
int (*icon)(bAnimListElem *ale);
/* settings */
/* check if the given setting is valid in the current context */
- short (*has_setting)(bAnimContext *ac, bAnimListElem *ale, int setting);
+ bool (*has_setting)(bAnimContext *ac, bAnimListElem *ale, int setting);
/* get the flag used for this setting */
- int (*setting_flag)(bAnimContext *ac, int setting, short *neg);
+ int (*setting_flag)(bAnimContext *ac, int setting, bool *neg);
/* get the pointer to int/short where data is stored,
* with type being sizeof(ptr_data) which should be fine for runtime use...
* - assume that setting has been checked to be valid for current context
@@ -559,13 +559,19 @@ typedef enum eAnimUnitConv_Flags {
/* only touch selected vertices */
ANIM_UNITCONV_SELVERTS = (1 << 3),
ANIM_UNITCONV_SKIPKNOTS = (1 << 4),
+ /* Scale FCurve i a way it fits to -1..1 space */
+ ANIM_UNITCONV_NORMALIZE = (1 << 5),
+ /* Only whennormalization is used: use scale factor from previous run,
+ * prevents curves from jumping all over the place when tweaking them.
+ */
+ ANIM_UNITCONV_NORMALIZE_FREEZE = (1 << 6),
} eAnimUnitConv_Flags;
-/* Get unit conversion factor for given ID + F-Curve */
-float ANIM_unit_mapping_get_factor(struct Scene *scene, struct ID *id, struct FCurve *fcu, short restore);
+/* Normalizatin flags from Space Graph passing to ANIM_unit_mapping_get_factor */
+short ANIM_get_normalization_flags(bAnimContext *ac);
-/* Apply/Unapply units conversions to keyframes */
-void ANIM_unit_mapping_apply_fcurve(struct Scene *scene, struct ID *id, struct FCurve *fcu, short flag);
+/* Get unit conversion factor for given ID + F-Curve */
+float ANIM_unit_mapping_get_factor(struct Scene *scene, struct ID *id, struct FCurve *fcu, short flag);
/* ------------- Utility macros ----------------------- */
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index 225d8a0e5a3..e9caf89d9da 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -106,7 +106,7 @@ typedef struct EditBone {
(((ebone)->flag & BONE_SELECTED) && !((ebone)->flag & BONE_EDITMODE_LOCKED)) \
)
-/* used in bone_select_hierachy() */
+/* used in armature_select_hierarchy_exec() */
#define BONE_SELECT_PARENT 0
#define BONE_SELECT_CHILD 1
@@ -128,7 +128,8 @@ bool mouse_armature(struct bContext *C, const int mval[2], bool extend, bool des
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);
-EditBone *ED_armature_bone_get_mirrored(struct ListBase *edbo, EditBone *ebo); // XXX this is needed for populating the context iterators
+EditBone *ED_armature_bone_find_name(const ListBase *edbo, const char *name);
+EditBone *ED_armature_bone_get_mirrored(const struct ListBase *edbo, EditBone *ebo);
void ED_armature_sync_selection(struct ListBase *edbo);
void ED_armature_validate_active(struct bArmature *arm);
@@ -137,6 +138,7 @@ struct EditBone *ED_armature_edit_bone_add(struct bArmature *arm, const char *na
void ED_armature_edit_bone_remove(struct bArmature *arm, EditBone *exBone);
bool ED_armature_ebone_is_child_recursive(EditBone *ebone_parent, EditBone *ebone_child);
+EditBone *ED_armature_bone_find_shared_parent(EditBone *ebone_child[], const unsigned int ebone_child_tot);
void ED_armature_ebone_to_mat3(EditBone *ebone, float mat[3][3]);
void ED_armature_ebone_to_mat4(EditBone *ebone, float mat[4][4]);
@@ -168,6 +170,7 @@ void ED_armature_ebone_selectflag_disable(EditBone *ebone, int flag);
void ED_armature_exit_posemode(struct bContext *C, struct Base *base);
void ED_armature_enter_posemode(struct bContext *C, struct Base *base);
void ED_pose_deselectall(struct Object *ob, int test);
+void ED_pose_bone_select(struct Object *ob, struct bPoseChannel *pchan, bool select);
void ED_pose_recalculate_paths(struct Scene *scene, struct Object *ob);
struct Object *ED_pose_object_from_context(struct bContext *C);
diff --git a/source/blender/editors/include/ED_mball.h b/source/blender/editors/include/ED_mball.h
index 1842b84a3f5..22aec69838b 100644
--- a/source/blender/editors/include/ED_mball.h
+++ b/source/blender/editors/include/ED_mball.h
@@ -37,6 +37,7 @@ struct Object;
struct wmKeyConfig;
void ED_operatortypes_metaball(void);
+void ED_operatormacros_metaball(void);
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);
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h
index 5d3d72d0e3d..9d3404aa29b 100644
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@ -97,16 +97,6 @@ void EDBM_mesh_free(struct BMEditMesh *em);
void EDBM_mesh_load(struct Object *ob);
struct DerivedMesh *EDBM_mesh_deform_dm_get(struct BMEditMesh *em);
-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
-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);
-struct BMFace *EDBM_face_at_index(struct BMEditMesh *em, int index);
-
/* flushes based on the current select mode. if in vertex select mode,
* verts select/deselect edges and faces, if in edge select mode,
* edges select/deselect faces and vertices, and in face select mode faces select/deselect
@@ -129,16 +119,16 @@ void EDBM_mesh_reveal(struct BMEditMesh *em);
void EDBM_update_generic(struct BMEditMesh *em, const bool do_tessface, const bool is_destructive);
-struct UvElementMap *EDBM_uv_element_map_create(struct BMEditMesh *em, const bool selected, const bool do_islands);
-void EDBM_uv_element_map_free(struct UvElementMap *vmap);
-struct UvElement *ED_uv_element_get(struct UvElementMap *map, struct BMFace *efa, struct BMLoop *l);
+struct UvElementMap *BM_uv_element_map_create(struct BMesh *em, const bool selected, const bool do_islands);
+void BM_uv_element_map_free(struct UvElementMap *vmap);
+struct UvElement *BM_uv_element_get(struct UvElementMap *map, struct BMFace *efa, struct BMLoop *l);
bool EDBM_mtexpoly_check(struct BMEditMesh *em);
struct MTexPoly *EDBM_mtexpoly_active_get(struct BMEditMesh *em, struct BMFace **r_act_efa, const bool sloppy, const bool selected);
-void EDBM_uv_vert_map_free(struct UvVertMap *vmap);
-struct UvMapVert *EDBM_uv_vert_map_at_index(struct UvVertMap *vmap, unsigned int v);
-struct UvVertMap *EDBM_uv_vert_map_create(struct BMEditMesh *em, bool use_select, const float limit[2]);
+void BM_uv_vert_map_free(struct UvVertMap *vmap);
+struct UvMapVert *BM_uv_vert_map_at_index(struct UvVertMap *vmap, unsigned int v);
+struct UvVertMap *BM_uv_vert_map_create(struct BMesh *bm, bool use_select, const float limit[2]);
void EDBM_flag_enable_all(struct BMEditMesh *em, const char hflag);
void EDBM_flag_disable_all(struct BMEditMesh *em, const char hflag);
diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h
index 2f16d84aed0..de83df9cc05 100644
--- a/source/blender/editors/include/ED_node.h
+++ b/source/blender/editors/include/ED_node.h
@@ -54,6 +54,8 @@ typedef enum {
NODE_RIGHT = 8
} NodeBorder;
+#define NODE_GRID_STEPS 5
+
/* space_node.c */
int ED_node_tree_path_length(struct SpaceNode *snode);
void ED_node_tree_path_get(struct SpaceNode *snode, char *value);
@@ -81,6 +83,7 @@ void ED_node_tree_update(const struct bContext *C);
void ED_node_tag_update_id(struct ID *id);
void ED_node_tag_update_nodetree(struct Main *bmain, struct bNodeTree *ntree);
void ED_node_sort(struct bNodeTree *ntree);
+float ED_node_grid_size(void);
/* node_relationships.c */
void ED_node_link_intersect_test(struct ScrArea *sa, int test);
diff --git a/source/blender/editors/include/ED_numinput.h b/source/blender/editors/include/ED_numinput.h
index e7d80d96f89..f46332c9a82 100644
--- a/source/blender/editors/include/ED_numinput.h
+++ b/source/blender/editors/include/ED_numinput.h
@@ -27,7 +27,6 @@
#ifndef __ED_NUMINPUT_H__
#define __ED_NUMINPUT_H__
-
/*
* The ctrl value has different meaning:
* 0 : No value has been typed
@@ -59,11 +58,11 @@ typedef struct NumInput {
void initNumInput(NumInput *n);
#define NUM_STR_REP_LEN 20 /* str must be NUM_STR_LEN * (idx_max + 1) length. */
void outputNumInput(NumInput *n, char *str);
-short hasNumInput(NumInput *n);
+bool hasNumInput(const NumInput *n);
void applyNumInput(NumInput *n, float *vec);
-char handleNumInput(NumInput *n, const struct wmEvent *event);
+bool handleNumInput(NumInput *n, const struct wmEvent *event);
#define NUM_MODAL_INCREMENT_UP 18
#define NUM_MODAL_INCREMENT_DOWN 19
-#endif
+#endif /* __ED_NUMINPUT_H__ */
diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h
index eae2141e527..4155dbb5565 100644
--- a/source/blender/editors/include/ED_object.h
+++ b/source/blender/editors/include/ED_object.h
@@ -51,6 +51,7 @@ struct Main;
struct Mesh;
struct MetaElem;
struct ModifierData;
+struct HookModifierData;
struct Nurb;
struct Object;
struct ReportList;
@@ -218,6 +219,8 @@ struct EnumPropertyItem *ED_object_vgroup_selection_itemf_helper(
int *free,
const unsigned int selection_mask);
+void ED_object_check_force_modifiers(struct Main *bmain, struct Scene *scene, struct Object *object);
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/editors/include/ED_render.h b/source/blender/editors/include/ED_render.h
index 518bee665ae..8f39502b2fe 100644
--- a/source/blender/editors/include/ED_render.h
+++ b/source/blender/editors/include/ED_render.h
@@ -55,6 +55,7 @@ void ED_render_scene_update(struct Main *bmain, struct Scene *scene, int updated
void ED_render_view3d_shade_update(struct Main *bmain, struct View3D *v3d, struct ScrArea *sa);
void ED_viewport_render_kill_jobs(const struct bContext *C, bool free_database);
+struct Scene *ED_render_job_get_scene(const struct bContext *C);
/* render_preview.c */
diff --git a/source/blender/editors/include/ED_sculpt.h b/source/blender/editors/include/ED_sculpt.h
index a50a8a50eaa..e85f11e5b78 100644
--- a/source/blender/editors/include/ED_sculpt.h
+++ b/source/blender/editors/include/ED_sculpt.h
@@ -37,6 +37,8 @@ struct Object;
struct RegionView3D;
struct wmKeyConfig;
struct wmWindowManager;
+struct ViewContext;
+struct rcti;
/* sculpt.c */
void ED_operatortypes_sculpt(void);
@@ -48,6 +50,8 @@ void ED_sculpt_get_average_stroke(struct Object *ob, float stroke[3]);
int ED_sculpt_minmax(struct bContext *C, float min[3], float max[3]);
int ED_sculpt_mask_layers_ensure(struct Object *ob,
struct MultiresModifierData *mmd);
+int do_sculpt_mask_box_select(struct ViewContext *vc, struct rcti *rect, bool select, bool extend);
+
enum {
ED_SCULPT_MASK_LAYER_CALC_VERT = (1 << 0),
ED_SCULPT_MASK_LAYER_CALC_LOOP = (1 << 1)
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h
index eff79b6a039..dde1aa30a26 100644
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@ -62,7 +62,7 @@ enum TfmMode {
TFM_SKIN_RESIZE,
TFM_TOSPHERE,
TFM_SHEAR,
- TFM_WARP,
+ TFM_BEND,
TFM_SHRINKFATTEN,
TFM_TILT,
TFM_TRACKBALL,
@@ -130,8 +130,6 @@ void ED_getTransformOrientationMatrix(const struct bContext *C, float orientatio
int BIF_countTransformOrientation(const struct bContext *C);
-void BIF_TransformSetUndo(const char *str);
-
/* to be able to add operator properties to other operators */
#define P_MIRROR (1 << 0)
diff --git a/source/blender/editors/include/ED_transverts.h b/source/blender/editors/include/ED_transverts.h
new file mode 100644
index 00000000000..a82e54e425b
--- /dev/null
+++ b/source/blender/editors/include/ED_transverts.h
@@ -0,0 +1,70 @@
+/*
+ * ***** 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.
+ *
+ * The Original Code is Copyright (C) 2008 Blender Foundation.
+ * All rights reserved.
+ *
+ *
+ * Contributor(s): Blender Foundation
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file ED_transverts.h
+ * \ingroup editors
+ */
+
+#ifndef __ED_TRANSVERTS_H__
+#define __ED_TRANSVERTS_H__
+
+struct Object;
+
+typedef struct TransVert {
+ float *loc;
+ float oldloc[3], maploc[3];
+ float *val, oldval;
+ int flag;
+} TransVert;
+
+typedef struct TransVertStore {
+ struct TransVert *transverts;
+ int transverts_tot;
+} TransVertStore;
+
+void ED_transverts_create_from_obedit(TransVertStore *tvs, struct Object *obedit, int mode);
+void ED_transverts_update_obedit(TransVertStore *tvs, struct Object *obedit);
+void ED_transverts_free(TransVertStore *tvs);
+bool ED_transverts_check_obedit(Object *obedit);
+
+/* currently only used for bmesh index values */
+enum {
+ TM_INDEX_ON = 1, /* tag to make trans verts */
+ TM_INDEX_OFF = 0, /* don't make verts */
+ TM_INDEX_SKIP = -1 /* dont make verts (when the index values point to trans-verts) */
+};
+
+/* mode flags: */
+enum {
+ TM_ALL_JOINTS = 1, /* all joints (for bones only) */
+ TM_SKIP_HANDLES = 2 /* skip handles when control point is selected (for curves only) */
+};
+
+
+ /* SELECT == (1 << 0) */
+#define TX_VERT_USE_MAPLOC (1 << 1)
+
+#endif /* __ED_TRANSVERTS_H__ */
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index 86abf29c308..0f3106794f5 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -82,8 +82,8 @@ typedef struct ViewDepths {
bool damaged;
} ViewDepths;
-float *give_cursor(struct Scene *scene, struct View3D *v3d);
-void ED_view3d_cursor3d_position(struct bContext *C, float fp[3], const int mval[2]);
+float *ED_view3d_cursor3d_get(struct Scene *scene, struct View3D *v3d);
+void ED_view3d_cursor3d_position(struct bContext *C, float fp[3], const int mval[2]);
void ED_view3d_to_m4(float mat[4][4], const float ofs[3], const float quat[4], const float dist);
void ED_view3d_from_m4(float mat[4][4], float ofs[3], float quat[4], float *dist);
@@ -328,6 +328,8 @@ float ED_view3d_offset_distance(float mat[4][4], const float ofs[3], const float
float ED_scene_grid_scale(struct Scene *scene, const char **grid_unit);
float ED_view3d_grid_scale(struct Scene *scene, struct View3D *v3d, const char **grid_unit);
+void ED_scene_draw_fps(struct Scene *scene, struct rcti *rect);
+
/* view matrix properties utilities */
/* unused */
#if 0
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 38aad640ee1..0c37d35a93b 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -93,7 +93,7 @@ typedef struct uiLayout uiLayout;
/* use for clamping popups within the screen */
#define UI_SCREEN_MARGIN 10
-/* uiBlock->dt */
+/* uiBlock->dt and uiBut->dt */
#define UI_EMBOSS 0 /* use widget style for drawing */
#define UI_EMBOSSN 1 /* Nothing, only icon and/or text */
#define UI_EMBOSSP 2 /* Pulldown menu style */
@@ -130,8 +130,7 @@ typedef struct uiLayout uiLayout;
#define UI_BLOCK_POPUP_MEMORY (1 << 12)
#define UI_BLOCK_CLIP_EVENTS (1 << 13) /* stop handling mouse events */
-/* XXX This comment is no more valid! Maybe it is now bits 14-17? */
-/* block->flag bits 12-15 are identical to but->flag bits */
+/* block->flag bits 14-17 are identical to but->drawflag bits */
#define UI_BLOCK_LIST_ITEM (1 << 19)
@@ -148,46 +147,55 @@ typedef struct uiLayout uiLayout;
#define UI_PNL_CLOSE (1 << 5)
#define UI_PNL_SCALE (1 << 9)
-/* warning the first 6 flags are internal */
-/* but->flag */
-#define UI_TEXT_LEFT (1 << 6)
-#define UI_ICON_LEFT (1 << 7)
-#define UI_ICON_SUBMENU (1 << 8)
-#define UI_ICON_PREVIEW (1 << 9)
-
-#define UI_TEXT_RIGHT (1 << 10)
-#define UI_BUT_NODE_LINK (1 << 11)
-#define UI_BUT_NODE_ACTIVE (1 << 12)
-#define UI_BUT_DRAG_LOCK (1 << 13)
-
-/* button align flag, for drawing groups together */
-#define UI_BUT_ALIGN (UI_BUT_ALIGN_TOP | UI_BUT_ALIGN_LEFT | UI_BUT_ALIGN_RIGHT | UI_BUT_ALIGN_DOWN)
-#define UI_BUT_ALIGN_TOP (1 << 14)
-#define UI_BUT_ALIGN_LEFT (1 << 15)
-#define UI_BUT_ALIGN_RIGHT (1 << 16)
-#define UI_BUT_ALIGN_DOWN (1 << 17)
-
-#define UI_BUT_DISABLED (1 << 18)
-#define UI_BUT_COLOR_LOCK (1 << 19)
-#define UI_BUT_ANIMATED (1 << 20)
-#define UI_BUT_ANIMATED_KEY (1 << 21)
-#define UI_BUT_DRIVEN (1 << 22)
-#define UI_BUT_REDALERT (1 << 23)
-#define UI_BUT_INACTIVE (1 << 24)
-#define UI_BUT_LAST_ACTIVE (1 << 25)
-#define UI_BUT_UNDO (1 << 26)
-#define UI_BUT_IMMEDIATE (1 << 27)
-#define UI_BUT_NO_TOOLTIP (1 << 28)
-#define UI_BUT_NO_UTF8 (1 << 29)
-
-#define UI_BUT_VEC_SIZE_LOCK (1 << 30) /* used to flag if color hsv-circle should keep luminance */
-#define UI_BUT_COLOR_CUBIC (1 << 31) /* cubic saturation for the color wheel */
+/* but->flag - general state flags. */
+enum {
+ /* warning, the first 6 flags are internal */
+ UI_ICON_SUBMENU = (1 << 6),
+ UI_ICON_PREVIEW = (1 << 7),
+
+ UI_BUT_NODE_LINK = (1 << 8),
+ UI_BUT_NODE_ACTIVE = (1 << 9),
+ UI_BUT_DRAG_LOCK = (1 << 10),
+ UI_BUT_DISABLED = (1 << 11),
+ UI_BUT_COLOR_LOCK = (1 << 12),
+ UI_BUT_ANIMATED = (1 << 13),
+ UI_BUT_ANIMATED_KEY = (1 << 14),
+ UI_BUT_DRIVEN = (1 << 15),
+ UI_BUT_REDALERT = (1 << 16),
+ UI_BUT_INACTIVE = (1 << 17),
+ UI_BUT_LAST_ACTIVE = (1 << 18),
+ UI_BUT_UNDO = (1 << 19),
+ UI_BUT_IMMEDIATE = (1 << 20),
+ UI_BUT_NO_UTF8 = (1 << 21),
+
+ UI_BUT_VEC_SIZE_LOCK = (1 << 22), /* used to flag if color hsv-circle should keep luminance */
+ UI_BUT_COLOR_CUBIC = (1 << 23), /* cubic saturation for the color wheel */
+ UI_BUT_LIST_ITEM = (1 << 24), /* This but is "inside" a list item (currently used to change theme colors). */
+};
#define UI_PANEL_WIDTH 340
#define UI_COMPACT_PANEL_WIDTH 160
-/* uiBut->drawflag */
-#define UI_BUT_DRAW_ENUM_ARROWS (1 << 0) /* draw enum-like up/down arrows for button */
+/* but->drawflag - these flags should only affect how the button is drawn. */
+/* Note: currently, these flags _are not passed_ to the widget's state() or draw() functions
+ * (except for the 'align' ones)!
+ */
+enum {
+ /* draw enum-like up/down arrows for button */
+ UI_BUT_DRAW_ENUM_ARROWS = (1 << 0),
+ /* Text and icon alignment (by default, they are centered). */
+ UI_BUT_TEXT_LEFT = (1 << 1),
+ UI_BUT_ICON_LEFT = (1 << 2),
+ UI_BUT_TEXT_RIGHT = (1 << 3),
+ /* Prevent the button to show any tooltip. */
+ UI_BUT_NO_TOOLTIP = (1 << 4),
+ /* button align flag, for drawing groups together (also used in uiBlock->flag!) */
+ UI_BUT_ALIGN_TOP = (1 << 14),
+ UI_BUT_ALIGN_LEFT = (1 << 15),
+ UI_BUT_ALIGN_RIGHT = (1 << 16),
+ UI_BUT_ALIGN_DOWN = (1 << 17),
+ UI_BUT_ALIGN = (UI_BUT_ALIGN_TOP | UI_BUT_ALIGN_LEFT | UI_BUT_ALIGN_RIGHT | UI_BUT_ALIGN_DOWN),
+};
/* scale fixed button widths by this to account for DPI */
@@ -259,7 +267,6 @@ typedef enum {
PROGRESSBAR = (51 << 9),
SEARCH_MENU_UNLINK = (52 << 9),
NODESOCKET = (53 << 9),
- LISTLABEL = (54 << 9),
} eButType;
#define BUTTYPE (63 << 9)
@@ -641,9 +648,13 @@ void uiButSetFocusOnEnter(struct wmWindow *win, uiBut *but);
typedef struct AutoComplete AutoComplete;
+#define AUTOCOMPLETE_NO_MATCH 0
+#define AUTOCOMPLETE_FULL_MATCH 1
+#define AUTOCOMPLETE_PARTIAL_MATCH 2
+
AutoComplete *autocomplete_begin(const char *startname, size_t maxlen);
void autocomplete_do_name(AutoComplete *autocpl, const char *name);
-bool autocomplete_end(AutoComplete *autocpl, char *autoname);
+int autocomplete_end(AutoComplete *autocpl, char *autoname);
/* Panels
*