diff options
Diffstat (limited to 'source/blender/editors/include')
19 files changed, 94 insertions, 25 deletions
diff --git a/source/blender/editors/include/BIF_gl.h b/source/blender/editors/include/BIF_gl.h index 5f6c924f469..cd26bb22ada 100644 --- a/source/blender/editors/include/BIF_gl.h +++ b/source/blender/editors/include/BIF_gl.h @@ -58,8 +58,24 @@ * */ void cpack(unsigned int x); -#define glMultMatrixf(x) glMultMatrixf( (float *)(x)) -#define glLoadMatrixf(x) glLoadMatrixf( (float *)(x)) + +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) +# define glMultMatrixf(x) \ + glMultMatrixf(_Generic((x), \ + float *: (float *)(x), \ + float (*)[4]: (float *)(x), \ + const float *: (float *)(x), \ + const float (*)[4]: (float *)(x)) \ +) +# define glLoadMatrixf(x) \ + glLoadMatrixf(_Generic((x), \ + float *: (float *)(x), \ + float (*)[4]: (float *)(x)) \ +) +#else +# define glMultMatrixf(x) glMultMatrixf((float *)(x)) +# define glLoadMatrixf(x) glLoadMatrixf((float *)(x)) +#endif #define GLA_PIXEL_OFS 0.375f diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h index 7579f6cba65..6eac9f14bf6 100644 --- a/source/blender/editors/include/ED_armature.h +++ b/source/blender/editors/include/ED_armature.h @@ -133,8 +133,8 @@ EditBone *ED_armature_bone_get_mirrored(const struct ListBase *edbo, EditBone *e void ED_armature_sync_selection(struct ListBase *edbo); void ED_armature_validate_active(struct bArmature *arm); -void add_primitive_bone(struct Object *obedit_arm, bool view_aligned); -struct EditBone *ED_armature_edit_bone_add(struct bArmature *arm, const char *name); +EditBone *ED_armature_edit_bone_add_primitive(struct Object *obedit_arm, float length, bool view_aligned); +EditBone *ED_armature_edit_bone_add(struct bArmature *arm, const char *name); void ED_armature_edit_bone_remove(struct bArmature *arm, EditBone *exBone); bool ED_armature_ebone_is_child_recursive(EditBone *ebone_parent, EditBone *ebone_child); @@ -174,7 +174,7 @@ void ED_armature_ebone_selectflag_disable(EditBone *ebone, int flag); /* poseobject.c */ 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_de_selectall(struct Object *ob, int select_mode, const bool ignore_visibility); 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_curve.h b/source/blender/editors/include/ED_curve.h index 330147db077..58e64f30b05 100644 --- a/source/blender/editors/include/ED_curve.h +++ b/source/blender/editors/include/ED_curve.h @@ -51,7 +51,6 @@ void ED_operatormacros_curve(void); void ED_keymap_curve(struct wmKeyConfig *keyconf); /* editcurve.c */ -void ED_curve_transform(struct Curve *cu, float mat[4][4]); void ED_curve_deselect_all(struct EditNurb *editnurb); void ED_curve_select_all(struct EditNurb *editnurb); void ED_curve_select_swap(struct EditNurb *editnurb, bool hide_handles); diff --git a/source/blender/editors/include/ED_datafiles.h b/source/blender/editors/include/ED_datafiles.h index 9022a1481aa..661ab58b98c 100644 --- a/source/blender/editors/include/ED_datafiles.h +++ b/source/blender/editors/include/ED_datafiles.h @@ -150,6 +150,12 @@ extern char datatoc_subtract_png[]; extern int datatoc_texdraw_png_size; extern char datatoc_texdraw_png[]; +extern int datatoc_texfill_png_size; +extern char datatoc_texfill_png[]; + +extern int datatoc_texmask_png_size; +extern char datatoc_texmask_png[]; + extern int datatoc_thumb_png_size; extern char datatoc_thumb_png[]; diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index 63ffa1bef0c..05fb76b7aea 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -67,7 +67,7 @@ typedef struct tGPspoint { struct bGPdata **ED_gpencil_data_get_pointers(const struct bContext *C, struct PointerRNA *ptr); struct bGPdata *ED_gpencil_data_get_active(const struct bContext *C); -struct bGPdata *ED_gpencil_data_get_active_v3d(struct Scene *scene); /* for offscreen rendering */ +struct bGPdata *ED_gpencil_data_get_active_v3d(struct Scene *scene, struct View3D *v3d); /* ----------- Grease Pencil Operators ----------------- */ diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h index b15a83809f5..db13c628ade 100644 --- a/source/blender/editors/include/ED_image.h +++ b/source/blender/editors/include/ED_image.h @@ -69,8 +69,11 @@ void ED_image_point_pos__reverse(struct SpaceImage *sima, struct ARegion *ar, co bool ED_space_image_show_render(struct SpaceImage *sima); bool ED_space_image_show_paint(struct SpaceImage *sima); bool ED_space_image_show_uvedit(struct SpaceImage *sima, struct Object *obedit); +bool ED_space_image_show_texpaint(struct SpaceImage *sima, struct Object *ob); bool ED_space_image_show_uvshadow(struct SpaceImage *sima, struct Object *obedit); +bool ED_space_image_paint_curve(const struct bContext *C); + bool ED_space_image_check_show_maskedit(struct Scene *scene, struct SpaceImage *sima); int ED_space_image_maskedit_poll(struct bContext *C); int ED_space_image_maskedit_mask_poll(struct bContext *C); diff --git a/source/blender/editors/include/ED_lattice.h b/source/blender/editors/include/ED_lattice.h index 4d19b6d5548..6636319dc9b 100644 --- a/source/blender/editors/include/ED_lattice.h +++ b/source/blender/editors/include/ED_lattice.h @@ -37,6 +37,5 @@ struct Lattice; void free_editLatt(struct Object *ob); void make_editLatt(struct Object *obedit); void load_editLatt(struct Object *obedit); -void ED_lattice_transform(struct Lattice *lt, float mat[4][4]); #endif /* __ED_LATTICE_H__ */ diff --git a/source/blender/editors/include/ED_mball.h b/source/blender/editors/include/ED_mball.h index 680e9d79109..5e774c63841 100644 --- a/source/blender/editors/include/ED_mball.h +++ b/source/blender/editors/include/ED_mball.h @@ -50,6 +50,4 @@ void load_editMball(struct Object *obedit); void undo_push_mball(struct bContext *C, const char *name); -void ED_mball_transform(struct MetaBall *mb, float mat[4][4]); - #endif /* __ED_MBALL_H__ */ diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index ebc97c58e24..6a562da0a0e 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -119,7 +119,7 @@ void EDBM_mesh_reveal(struct BMEditMesh *em); void EDBM_update_generic(struct BMEditMesh *em, const bool do_tessface, const bool is_destructive); -struct UvElementMap *BM_uv_element_map_create(struct BMesh *em, const bool selected, const bool do_islands); +struct UvElementMap *BM_uv_element_map_create(struct BMesh *bm, 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); @@ -264,7 +264,6 @@ void ED_mesh_faces_remove(struct Mesh *mesh, struct ReportList *reports, int cou void ED_mesh_edges_remove(struct Mesh *mesh, struct ReportList *reports, int count); void ED_mesh_vertices_remove(struct Mesh *mesh, struct ReportList *reports, int count); -void ED_mesh_transform(struct Mesh *me, float mat[4][4]); void ED_mesh_calc_tessface(struct Mesh *mesh); void ED_mesh_update(struct Mesh *mesh, struct bContext *C, int calc_edges, int calc_tessface); diff --git a/source/blender/editors/include/ED_numinput.h b/source/blender/editors/include/ED_numinput.h index 4e96ed0c7e7..f9a22429fc2 100644 --- a/source/blender/editors/include/ED_numinput.h +++ b/source/blender/editors/include/ED_numinput.h @@ -64,6 +64,8 @@ enum { /* (1 << 9) and above are reserved for internal flags! */ }; +struct UnitSettings; + /*********************** NumInput ********************************/ /* There are important things to note here for code using numinput: @@ -76,7 +78,7 @@ enum { */ void initNumInput(NumInput *n); -void outputNumInput(NumInput *n, char *str, const float scale_length); +void outputNumInput(NumInput *n, char *str, struct UnitSettings *unit_settings); bool hasNumInput(const NumInput *n); bool applyNumInput(NumInput *n, float *vec); bool handleNumInput(struct bContext *C, NumInput *n, const struct wmEvent *event); diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 5504b7e0352..2328f7d5135 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -150,8 +150,9 @@ bool ED_object_add_generic_get_opts(struct bContext *C, struct wmOperator *op, c float loc[3], float rot[3], bool *enter_editmode, unsigned int *layer, bool *is_view_aligned); -struct Object *ED_object_add_type(struct bContext *C, int type, const float loc[3], const float rot[3], - bool enter_editmode, unsigned int layer); +struct Object *ED_object_add_type( + struct bContext *C, int type, const float loc[3], const float rot[3], + bool enter_editmode, unsigned int layer) ATTR_RETURNS_NONNULL; void ED_object_single_users(struct Main *bmain, struct Scene *scene, bool full, bool copy_groups); void ED_object_single_user(struct Main *bmain, struct Scene *scene, struct Object *ob); diff --git a/source/blender/editors/include/ED_paint.h b/source/blender/editors/include/ED_paint.h index d7e84d8f50d..decd79fcc7b 100644 --- a/source/blender/editors/include/ED_paint.h +++ b/source/blender/editors/include/ED_paint.h @@ -28,9 +28,11 @@ struct bContext; struct RegionView3D; struct wmKeyConfig; +struct wmOperator; /* paint_ops.c */ void ED_operatortypes_paint(void); +void ED_operatormacros_paint(void); void ED_keymap_paint(struct wmKeyConfig *keyconf); /* paint_undo.c */ @@ -41,6 +43,7 @@ enum { typedef void (*UndoRestoreCb)(struct bContext *C, struct ListBase *lb); typedef void (*UndoFreeCb)(struct ListBase *lb); +typedef bool (*UndoCleanupCb)(struct bContext *C, struct ListBase *lb); int ED_undo_paint_step(struct bContext *C, int type, int step, const char *name); void ED_undo_paint_step_num(struct bContext *C, int type, int num); @@ -48,7 +51,7 @@ const char *ED_undo_paint_get_name(struct bContext *C, int type, int nr, int *ac void ED_undo_paint_free(void); int ED_undo_paint_valid(int type, const char *name); bool ED_undo_paint_empty(int type); -void ED_undo_paint_push_begin(int type, const char *name, UndoRestoreCb restore, UndoFreeCb free); +void ED_undo_paint_push_begin(int type, const char *name, UndoRestoreCb restore, UndoFreeCb free, UndoCleanupCb cleanup); void ED_undo_paint_push_end(int type); /* paint_image.c */ @@ -57,5 +60,6 @@ void ED_image_undo_restore(struct bContext *C, struct ListBase *lb); void ED_image_undo_free(struct ListBase *lb); void ED_imapaint_clear_partial_redraw(void); void ED_imapaint_dirty_region(struct Image *ima, struct ImBuf *ibuf, int x, int y, int w, int h); +void ED_imapaint_bucket_fill(struct bContext *C, float color[3], struct wmOperator *op); #endif /* __ED_PAINT_H__ */ diff --git a/source/blender/editors/include/ED_space_api.h b/source/blender/editors/include/ED_space_api.h index 4fbe01a5fc7..d268c578cf2 100644 --- a/source/blender/editors/include/ED_space_api.h +++ b/source/blender/editors/include/ED_space_api.h @@ -35,6 +35,7 @@ struct ARegionType; struct bContext; void ED_spacetypes_init(void); +void ED_spacemacros_init(void); /* the pluginnable API for export to editors */ diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index 41ff9b88da9..daa6864b5aa 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -98,6 +98,7 @@ enum TfmMode { #define CTX_NDOF (1 << 5) #define CTX_MOVIECLIP (1 << 6) #define CTX_MASK (1 << 7) +#define CTX_PAINT_CURVE (1 << 8) /* Standalone call to get the transformation center corresponding to the current situation * returns 1 if successful, 0 otherwise (usually means there's no selection) diff --git a/source/blender/editors/include/ED_uvedit.h b/source/blender/editors/include/ED_uvedit.h index 04eb829979f..4b82fa40c6a 100644 --- a/source/blender/editors/include/ED_uvedit.h +++ b/source/blender/editors/include/ED_uvedit.h @@ -54,7 +54,7 @@ void ED_uvedit_assign_image(struct Main *bmain, struct Scene *scene, struct Obje bool ED_uvedit_minmax(struct Scene *scene, struct Image *ima, struct Object *obedit, float min[2], float max[2]); bool ED_object_get_active_image(struct Object *ob, int mat_nr, - struct Image **r_ima, struct ImageUser **r_iuser, struct bNode **r_node); + struct Image **r_ima, struct ImageUser **r_iuser, struct bNode **r_node, struct bNodeTree **r_ntree); void ED_object_assign_active_image(struct Main *bmain, struct Object *ob, int mat_nr, struct Image *ima); bool ED_uvedit_test(struct Object *obedit); diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 76839747076..bd4f37cfb1e 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -56,6 +56,7 @@ struct bContext; struct bPoseChannel; struct bScreen; struct bglMats; +struct rctf; struct rcti; struct wmOperator; struct wmOperatorType; @@ -84,6 +85,7 @@ typedef struct ViewDepths { 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_cursor3d_update(struct bContext *C, const int mval[2]); struct Camera *ED_view3d_camera_data_get(struct View3D *v3d, struct RegionView3D *rv3d); @@ -217,7 +219,8 @@ void ED_view3d_unproject(struct bglMats *mats, float out[3], const float x, cons /* end */ - +void ED_view3d_dist_range_get(struct View3D *v3d, + float r_dist_range[2]); bool ED_view3d_clip_range_get(struct View3D *v3d, struct RegionView3D *rv3d, float *r_clipsta, float *r_clipend, const bool use_ortho_factor); bool ED_view3d_viewplane_get(struct View3D *v3d, struct RegionView3D *rv3d, int winxi, int winyi, @@ -269,7 +272,7 @@ bool ED_view3d_autodist_depth_seg(struct ARegion *ar, const int mval_sta[2], con /* select */ #define MAXPICKBUF 10000 -short view3d_opengl_select(struct ViewContext *vc, unsigned int *buffer, unsigned int bufsize, const rcti *input); +short view3d_opengl_select(struct ViewContext *vc, unsigned int *buffer, unsigned int bufsize, const struct rcti *input, bool do_nearest); /* view3d_select.c */ float ED_view3d_select_dist_px(void); @@ -347,6 +350,7 @@ void ED_view3D_background_image_clear(struct View3D *v3d); #define VIEW3D_MARGIN 1.4f #define VIEW3D_DIST_FALLBACK 1.0f + float ED_view3d_offset_distance(float mat[4][4], const float ofs[3], const float dist_fallback); void ED_view3d_distance_set(struct RegionView3D *rv3d, const float dist); @@ -364,6 +368,6 @@ void ED_view3d_operator_properties_viewmat_get(struct wmOperator *op, int *winx, #endif /* render */ -void ED_view3d_shade_update(struct Main *bmain, struct View3D *v3d, struct ScrArea *sa); +void ED_view3d_shade_update(struct Main *bmain, struct Scene *scene, struct View3D *v3d, struct ScrArea *sa); #endif /* __ED_VIEW3D_H__ */ diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index c776026a811..1d79cf749f9 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -668,8 +668,8 @@ DEF_ICON(IPO_EASE_IN_OUT) DEF_ICON(VERTEXSEL) DEF_ICON(EDGESEL) DEF_ICON(FACESEL) +DEF_ICON(LOOPSEL) #ifndef DEF_ICON_BLANK_SKIP - DEF_ICON(BLANK209) DEF_ICON(BLANK210) #endif DEF_ICON(ROTATE) @@ -976,6 +976,8 @@ DEF_ICON(BRUSH_SNAKE_HOOK) DEF_ICON(BRUSH_SOFTEN) DEF_ICON(BRUSH_SUBTRACT) DEF_ICON(BRUSH_TEXDRAW) +DEF_ICON(BRUSH_TEXFILL) +DEF_ICON(BRUSH_TEXMASK) DEF_ICON(BRUSH_THUMB) DEF_ICON(BRUSH_ROTATE) DEF_ICON(BRUSH_VERTEXDRAW) diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 1565583b574..1e9756ff771 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -75,6 +75,9 @@ struct ImBuf; struct bNodeTree; struct bNode; struct bNodeSocket; +struct wmDropBox; +struct wmDrag; +struct wmEvent; typedef struct uiBut uiBut; typedef struct uiBlock uiBlock; @@ -99,6 +102,7 @@ typedef struct uiLayout uiLayout; #define UI_EMBOSSN 1 /* Nothing, only icon and/or text */ #define UI_EMBOSSP 2 /* Pulldown menu style */ #define UI_EMBOSST 3 /* Table */ +#define UI_EMBOSSR 4 /* Pie Menu */ /* uiBlock->direction */ #define UI_DIRECTION (UI_TOP | UI_DOWN | UI_LEFT | UI_RIGHT) @@ -134,6 +138,7 @@ typedef struct uiLayout uiLayout; /* block->flag bits 14-17 are identical to but->drawflag bits */ #define UI_BLOCK_LIST_ITEM (1 << 19) +#define UI_BLOCK_RADIAL (1 << 20) /* uiPopupBlockHandle->menuretval */ #define UI_RETURN_CANCEL (1 << 0) /* cancel all menus cascading */ @@ -175,6 +180,7 @@ enum { UI_BUT_DRAG_MULTI = (1 << 25), /* edit this button as well as the active button (not just dragging) */ UI_BUT_SCA_LINK_GREY = (1 << 26), /* used to flag if sca links shoud be grey out */ UI_BUT_HAS_SEP_CHAR = (1 << 27), /* but->str contains UI_SEP_CHAR, used for key shortcuts */ + UI_BUT_TIP_FORCE = (1 << 28), /* force show tooltips when holding option/alt if U's USER_TOOLTIPS is off */ }; #define UI_PANEL_WIDTH 340 @@ -288,6 +294,9 @@ typedef enum { #define UI_GRAD_V_ALT 9 #define UI_GRAD_L_ALT 10 +#define UI_PALETTE_COLOR 20 +#define UI_PALETTE_COLOR_ACTIVE 1 + /* Drawing * * Functions to draw various shapes, taking theme settings into account. @@ -353,6 +362,17 @@ struct uiLayout *uiPupMenuLayout(uiPopupMenu *head); void uiPupMenuReports(struct bContext *C, struct ReportList *reports) ATTR_NONNULL(); bool uiPupMenuInvoke(struct bContext *C, const char *idname, struct ReportList *reports) ATTR_NONNULL(1, 2); +/* Pie menus */ +typedef struct uiPieMenu uiPieMenu; + +void uiPieMenuInvoke(struct bContext *C, const char *idname, const struct wmEvent *event); +void uiPieOperatorEnumInvoke(struct bContext *C, const char *title, const char *opname, + const char *propname, const struct wmEvent *event); +void uiPieEnumInvoke(struct bContext *C, const char *title, const char *path, const struct wmEvent *event); + +struct uiPieMenu *uiPieMenuBegin(struct bContext *C, const char *title, int icon, const struct wmEvent *event) ATTR_NONNULL(); +void uiPieMenuEnd(struct bContext *C, uiPieMenu *pie); +struct uiLayout *uiPieMenuLayout(struct uiPieMenu *pie); /* Popup Blocks * * Functions used to create popup blocks. These are like popup menus @@ -410,7 +430,8 @@ typedef enum { UI_BLOCK_BOUNDS_TEXT, UI_BLOCK_BOUNDS_POPUP_MOUSE, UI_BLOCK_BOUNDS_POPUP_MENU, - UI_BLOCK_BOUNDS_POPUP_CENTER + UI_BLOCK_BOUNDS_POPUP_CENTER, + UI_BLOCK_BOUNDS_PIE_CENTER, } eBlockBoundsCalc; void uiBoundsBlock(struct uiBlock *block, int addval); @@ -437,6 +458,7 @@ void uiButSetDragValue(uiBut *but); void uiButSetDragImage(uiBut *but, const char *path, int icon, struct ImBuf *ima, float scale); bool UI_but_active_drop_name(struct bContext *C); +bool UI_but_active_drop_color(struct bContext *C); void uiButSetFlag(uiBut *but, int flag); void uiButClearFlag(uiBut *but, int flag); @@ -697,7 +719,7 @@ void UI_panel_category_draw_all(struct ARegion *ar, const * as screen/ if ED_KEYMAP_UI is set, or internally in popup functions. */ void UI_add_region_handlers(struct ListBase *handlers); -void UI_add_popup_handlers(struct bContext *C, struct ListBase *handlers, uiPopupBlockHandle *popup); +void UI_add_popup_handlers(struct bContext *C, struct ListBase *handlers, uiPopupBlockHandle *popup, const bool accept_dbl_click); void UI_remove_popup_handlers(struct ListBase *handlers, uiPopupBlockHandle *popup); void UI_remove_popup_handlers_all(struct bContext *C, struct ListBase *handlers); @@ -708,7 +730,6 @@ void UI_remove_popup_handlers_all(struct bContext *C, struct ListBase *handlers) void UI_init(void); void UI_init_userdef(void); -void UI_init_userdef_factory(void); void UI_reinit_font(void); void UI_exit(void); @@ -730,6 +751,7 @@ void UI_exit(void); #define UI_LAYOUT_HEADER 1 #define UI_LAYOUT_MENU 2 #define UI_LAYOUT_TOOLBAR 3 +#define UI_LAYOUT_PIEMENU 4 #define UI_UNIT_X ((void)0, U.widget_unit) #define UI_UNIT_Y ((void)0, U.widget_unit) @@ -820,8 +842,8 @@ uiLayout *uiLayoutListBox(uiLayout *layout, struct uiList *ui_list, struct Point uiLayout *uiLayoutAbsolute(uiLayout *layout, int align); uiLayout *uiLayoutSplit(uiLayout *layout, float percentage, int align); uiLayout *uiLayoutOverlap(uiLayout *layout); - uiBlock *uiLayoutAbsoluteBlock(uiLayout *layout); +uiLayout *uiLayoutRadial(uiLayout *layout); /* templates */ void uiTemplateHeader(uiLayout *layout, struct bContext *C); @@ -847,6 +869,7 @@ void uiTemplateVectorscope(uiLayout *layout, struct PointerRNA *ptr, const char void uiTemplateCurveMapping(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int type, int levels, int brush, int neg_slope); void uiTemplateColorPicker(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int value_slider, int lock, int lock_luminosity, int cubic); +void uiTemplatePalette(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int color); void uiTemplateLayers(uiLayout *layout, struct PointerRNA *ptr, const char *propname, PointerRNA *used_ptr, const char *used_propname, int active_layer); void uiTemplateGameStates(uiLayout *layout, struct PointerRNA *ptr, const char *propname, @@ -916,7 +939,14 @@ void uiItemMenuEnumO(uiLayout *layout, struct bContext *C, const char *opname, c void uiItemMenuEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, const char *name, int icon); /* UI Operators */ +typedef struct uiDragColorHandle { + float color[3]; + bool gamma_corrected; +} uiDragColorHandle; + void UI_buttons_operatortypes(void); +void UI_drop_color_copy(struct wmDrag *drag, struct wmDropBox *drop); +int UI_drop_color_poll(struct bContext *C, struct wmDrag *drag, const struct wmEvent *event); /* Helpers for Operators */ uiBut *uiContextActiveButton(const struct bContext *C); diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 2e78940a813..872bd32b75b 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -106,6 +106,7 @@ enum { TH_FACE_SELECT, TH_NORMAL, TH_VNORMAL, + TH_LNORMAL, TH_FACE_DOT, TH_FACEDOT_SIZE, TH_CFRAME, @@ -237,6 +238,9 @@ enum { TH_STITCH_PREVIEW_UNSTITCHABLE, TH_STITCH_PREVIEW_ACTIVE, + TH_PAINT_CURVE_HANDLE, + TH_PAINT_CURVE_PIVOT, + TH_UV_SHADOW, TH_UV_OTHERS, |