diff options
Diffstat (limited to 'source/blender/editors/include')
21 files changed, 292 insertions, 61 deletions
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 23cb697b453..5fb7fa41752 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -102,8 +102,11 @@ typedef struct bAnimListElem { int flag; /* copy of elem's flags for quick access */ int index; /* for un-named data, the index of the data in it's collection */ - void *key_data; /* motion data - mostly F-Curves, but can be other types too */ + short elemFlag; /* flags for the list elem instance (not the data it represents) */ + short datatype; /* type of motion data to expect */ + void *key_data; /* motion data - mostly F-Curves, but can be other types too */ + struct ID *id; /* ID block that channel is attached to */ struct AnimData *adt; /* source of the animation data attached to ID block (for convenience) */ @@ -192,6 +195,7 @@ typedef enum eAnimFilter_Flags { ANIMFILTER_ANIMDATA = (1<<9), /* only return the underlying AnimData blocks (not the tracks, etc.) data comes from */ ANIMFILTER_NLATRACKS = (1<<10), /* only include NLA-tracks */ ANIMFILTER_SELEDIT = (1<<11), /* link editability with selected status */ + ANIMFILTER_NODUPLIS = (1<<12), /* duplicate entries for animation data attached to multi-user blocks must not occur */ /* all filters - the power inside the bracket must be the last power for left-shifts + 1 */ ANIMFILTER_ALLFILTERS = ((1<<12) - 1) diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h index 81ceaffaa5e..52db36e188d 100644 --- a/source/blender/editors/include/ED_armature.h +++ b/source/blender/editors/include/ED_armature.h @@ -102,7 +102,6 @@ void ED_keymap_armature(struct wmKeyConfig *keyconf); void ED_armature_from_edit(struct Object *obedit); void ED_armature_to_edit(struct Object *ob); void ED_armature_edit_free(struct Object *ob); -void ED_armature_edit_remake(struct Object *obedit); void ED_armature_deselectall(struct Object *obedit, int toggle, int doundo); int ED_do_pose_selectbuffer(struct Scene *scene, struct Base *base, unsigned int *buffer, @@ -121,7 +120,7 @@ void ED_armature_edit_bone_remove(struct bArmature *arm, EditBone *exBone); void transform_armature_mirror_update(struct Object *obedit); void clear_armature(struct Scene *scene, struct Object *ob, char mode); -void docenter_armature (struct Scene *scene, struct View3D *v3d, struct Object *ob, int centermode); +void docenter_armature (struct Scene *scene, struct Object *ob, float cursor[3], int centermode, int around); void ED_armature_apply_transform(struct Object *ob, float mat[4][4]); @@ -166,7 +165,7 @@ void BDR_drawSketch(const struct bContext *vc); int BDR_drawSketchNames(struct ViewContext *vc); /* meshlaplacian.c */ -void mesh_deform_bind(struct Scene *scene, struct DerivedMesh *dm, +void mesh_deform_bind(struct Scene *scene, struct MeshDeformModifierData *mmd, float *vertexcos, int totvert, float cagemat[][4]); diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h index 3710d4bc4cc..0ff98b504d0 100644 --- a/source/blender/editors/include/ED_curve.h +++ b/source/blender/editors/include/ED_curve.h @@ -37,6 +37,10 @@ struct Text; struct View3D; struct wmOperator; struct wmKeyConfig; +struct Curve; +struct EditNurb; +struct BezTriple; +struct BPoint; /* curve_ops.c */ void ED_operatortypes_curve(void); @@ -55,6 +59,8 @@ void load_editNurb (struct Object *obedit); void make_editNurb (struct Object *obedit); void free_editNurb (struct Object *obedit); +void free_curve_editNurb (struct Curve *cu); + int mouse_nurb (struct bContext *C, short mval[2], int extend); struct Nurb *add_nurbs_primitive(struct bContext *C, float mat[4][4], int type, int newname); @@ -71,5 +77,11 @@ void free_editText (struct Object *obedit); void ED_text_to_object(struct bContext *C, struct Text *text, int split_lines); +int CU_select_nth(struct Object *obedit, int nth); +ListBase *ED_curve_editnurbs(struct Curve *cu); + +void ED_curve_beztcpy(struct EditNurb *editnurb, struct BezTriple *dst, struct BezTriple *src, int count); +void ED_curve_bpcpy(struct EditNurb *editnurb, struct BPoint *dst, struct BPoint *src, int count); + #endif /* ED_CURVE_H */ diff --git a/source/blender/editors/include/ED_datafiles.h b/source/blender/editors/include/ED_datafiles.h index 136d46cdc91..2c352abcd00 100644 --- a/source/blender/editors/include/ED_datafiles.h +++ b/source/blender/editors/include/ED_datafiles.h @@ -31,8 +31,8 @@ /* Datafiles embedded in Blender */ -extern int datatoc_B_blend_size; -extern char datatoc_B_blend[]; +extern int datatoc_startup_blend_size; +extern char datatoc_startup_blend[]; extern int datatoc_blenderbuttons_size; extern char datatoc_blenderbuttons[]; @@ -52,5 +52,93 @@ extern char datatoc_bfont_ttf[]; extern int datatoc_bmonofont_ttf_size; extern char datatoc_bmonofont_ttf[]; +/* Brush icon datafiles */ +/* TODO: this could be simplified by putting all + the brush icons in one file */ +extern int datatoc_add_png_size; +extern char datatoc_add_png[]; + +extern int datatoc_blob_png_size; +extern char datatoc_blob_png[]; + +extern int datatoc_blur_png_size; +extern char datatoc_blur_png[]; + +extern int datatoc_clay_png_size; +extern char datatoc_clay_png[]; + +extern int datatoc_clone_png_size; +extern char datatoc_clone_png[]; + +extern int datatoc_crease_png_size; +extern char datatoc_crease_png[]; + +extern int datatoc_darken_png_size; +extern char datatoc_darken_png[]; + +extern int datatoc_draw_png_size; +extern char datatoc_draw_png[]; + +extern int datatoc_fill_png_size; +extern char datatoc_fill_png[]; + +extern int datatoc_flatten_png_size; +extern char datatoc_flatten_png[]; + +extern int datatoc_grab_png_size; +extern char datatoc_grab_png[]; + +extern int datatoc_inflate_png_size; +extern char datatoc_inflate_png[]; + +extern int datatoc_layer_png_size; +extern char datatoc_layer_png[]; + +extern int datatoc_lighten_png_size; +extern char datatoc_lighten_png[]; + +extern int datatoc_mix_png_size; +extern char datatoc_mix_png[]; + +extern int datatoc_multiply_png_size; +extern char datatoc_multiply_png[]; + +extern int datatoc_nudge_png_size; +extern char datatoc_nudge_png[]; + +extern int datatoc_pinch_png_size; +extern char datatoc_pinch_png[]; + +extern int datatoc_scrape_png_size; +extern char datatoc_scrape_png[]; + +extern int datatoc_smear_png_size; +extern char datatoc_smear_png[]; + +extern int datatoc_smooth_png_size; +extern char datatoc_smooth_png[]; + +extern int datatoc_snake_hook_png_size; +extern char datatoc_snake_hook_png[]; + +extern int datatoc_soften_png_size; +extern char datatoc_soften_png[]; + +extern int datatoc_subtract_png_size; +extern char datatoc_subtract_png[]; + +extern int datatoc_texdraw_png_size; +extern char datatoc_texdraw_png[]; + +extern int datatoc_thumb_png_size; +extern char datatoc_thumb_png[]; + +extern int datatoc_twist_png_size; +extern char datatoc_twist_png[]; + +extern int datatoc_vertexdraw_png_size; +extern char datatoc_vertexdraw_png[]; + + #endif /* ED_DATAFILES_H */ diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index 05534bd584c..6c5a0cc3bf3 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -70,9 +70,9 @@ void ED_operatortypes_gpencil(void); /* drawgpencil.c */ void draw_gpencil_2dimage(struct bContext *C, struct ImBuf *ibuf); -void draw_gpencil_2dview(struct bContext *C, short onlyv2d); -void draw_gpencil_3dview(struct bContext *C, short only3d); -void draw_gpencil_3dview_ext(struct Scene *scene, struct ARegion *ar, short only3d); +void draw_gpencil_view2d(struct bContext *C, short onlyv2d); +void draw_gpencil_view3d(struct bContext *C, short only3d); +void draw_gpencil_view3d_ext(struct Scene *scene, struct View3D *v3d, struct ARegion *ar, short only3d); void gpencil_panel_standard(const struct bContext *C, struct Panel *pa); diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index 86a1f5c4031..fc5e3a43a62 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -257,7 +257,7 @@ short fcurve_frame_has_keyframe(struct FCurve *fcu, float frame, short filter); * Checks whether a keyframe exists for the given ID-block one the given frame. * - It is recommended to call this method over the other keyframe-checkers directly, * in case some detail of the implementation changes... - * - frame: the value of this is quite often result of frame_to_float(CFRA) + * - frame: the value of this is quite often result of BKE_curframe() */ short id_frame_has_keyframe(struct ID *id, float frame, short filter); diff --git a/source/blender/editors/include/ED_lattice.h b/source/blender/editors/include/ED_lattice.h new file mode 100644 index 00000000000..bebd6c5f3ab --- /dev/null +++ b/source/blender/editors/include/ED_lattice.h @@ -0,0 +1,33 @@ +/** + * $Id$ + * + * ***** 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 ***** + */ + +struct Object; + +void free_editLatt(struct Object *ob); +void make_editLatt(struct Object *obedit); +void load_editLatt(struct Object *obedit); diff --git a/source/blender/editors/include/ED_logic.h b/source/blender/editors/include/ED_logic.h new file mode 100644 index 00000000000..96d10cf2c72 --- /dev/null +++ b/source/blender/editors/include/ED_logic.h @@ -0,0 +1,36 @@ +/** + * $Id$ + * + * ***** 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) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * Contributor(s): Blender Foundation + * + * ***** END GPL LICENSE BLOCK ***** + */ +#ifndef ED_LOGIC_H +#define ED_LOGIC_H + +/* logic_ops.c */ +void ED_operatortypes_logic(void); + +#endif /* ED_LOGIC_H */ + + + diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 43c11206bbe..564fe04ca4d 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -147,7 +147,7 @@ struct UvVertMap *EM_make_uv_vert_map(struct EditMesh *em, int selected, int do_ struct UvMapVert *EM_get_uv_map_vert(struct UvVertMap *vmap, unsigned int v); void EM_free_uv_vert_map(struct UvVertMap *vmap); -void EM_add_data_layer(struct EditMesh *em, struct CustomData *data, int type); +void EM_add_data_layer(struct EditMesh *em, struct CustomData *data, int type, const char *name); void EM_free_data_layer(struct EditMesh *em, struct CustomData *data, int type); void EM_make_hq_normals(struct EditMesh *em); @@ -209,16 +209,19 @@ int editface_containsEdge(struct EditFace *efa, struct EditEdge *eed); short sharesFace(struct EditMesh *em, struct EditEdge *e1, struct EditEdge *e2); /* mesh_data.c */ +// void ED_mesh_geometry_add(struct Mesh *mesh, struct ReportList *reports, int verts, int edges, int faces); +void ED_mesh_faces_add(struct Mesh *mesh, struct ReportList *reports, int count); +void ED_mesh_edges_add(struct Mesh *mesh, struct ReportList *reports, int count); +void ED_mesh_vertices_add(struct Mesh *mesh, struct ReportList *reports, int count); -void ED_mesh_geometry_add(struct Mesh *mesh, struct ReportList *reports, int verts, int edges, int faces); void ED_mesh_transform(struct Mesh *me, float *mat); void ED_mesh_calc_normals(struct Mesh *me); -void ED_mesh_material_add(struct Mesh *me, struct Material *ma); +void ED_mesh_material_link(struct Mesh *me, struct Material *ma); void ED_mesh_update(struct Mesh *mesh, struct bContext *C, int calc_edges); -int ED_mesh_uv_texture_add(struct bContext *C, struct Scene *scene, struct Object *ob, struct Mesh *me); +int ED_mesh_uv_texture_add(struct bContext *C, struct Scene *scene, struct Object *ob, struct Mesh *me, const char *name, int active_set); int ED_mesh_uv_texture_remove(struct bContext *C, struct Object *ob, struct Mesh *me); -int ED_mesh_color_add(struct bContext *C, struct Scene *scene, struct Object *ob, struct Mesh *me); +int ED_mesh_color_add(struct bContext *C, struct Scene *scene, struct Object *ob, struct Mesh *me, const char *name, int active_set); int ED_mesh_color_remove(struct bContext *C, struct Object *ob, struct Mesh *me); #endif /* ED_MESH_H */ diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 709e36bccb2..f243b4cc497 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -28,24 +28,25 @@ #ifndef ED_OBJECT_H #define ED_OBJECT_H -struct wmKeyConfig; -struct wmKeyMap; -struct Scene; -struct Object; -struct bContext; struct Base; -struct View3D; struct bConstraint; +struct bContext; struct bPoseChannel; +struct Curve; struct KeyBlock; struct Lattice; +struct Main; struct Mesh; -struct Curve; -struct ReportList; struct ModifierData; -struct wmOperatorType; -struct wmOperator; +struct Object; +struct ReportList; +struct Scene; +struct View3D; struct wmEvent; +struct wmKeyConfig; +struct wmKeyMap; +struct wmOperator; +struct wmOperatorType; /* object_edit.c */ struct Object *ED_object_active_context(struct bContext *C); @@ -55,7 +56,13 @@ void ED_operatortypes_object(void); void ED_operatormacros_object(void); void ED_keymap_object(struct wmKeyConfig *keyconf); -/* generic editmode keys like pet */ +/* generic editmode keys like pet + * do_pet + * 0: No + * 1: Object + * 2: Edit + * 3: Edit with connected + * */ void ED_object_generic_keymap(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap, int do_pet); /* send your own notifier for select! */ @@ -63,10 +70,10 @@ void ED_base_object_select(struct Base *base, short mode); /* includes notifier */ void ED_base_object_activate(struct bContext *C, struct Base *base); -void ED_base_object_free_and_unlink(struct Scene *scene, struct Base *base); +void ED_base_object_free_and_unlink(struct Main *bmain, struct Scene *scene, struct Base *base); /* single object duplicate, if dupflag==0, fully linked, else it uses the flags given */ -struct Base *ED_object_add_duplicate(struct Scene *scene, struct Base *base, int dupflag); +struct Base *ED_object_add_duplicate(struct Main *bmain, struct Scene *scene, struct Base *base, int dupflag); void ED_object_parent(struct Object *ob, struct Object *parent, int type, const char *substr); @@ -84,14 +91,14 @@ void ED_object_enter_editmode(struct bContext *C, int flag); void ED_object_location_from_view(struct bContext *C, float *loc); void ED_object_rotation_from_view(struct bContext *C, float *rot); void ED_object_base_init_transform(struct bContext *C, struct Base *base, float *loc, float *rot); -float ED_object_new_primitive_matrix(struct bContext *C, float *loc, float *rot, float primmat[][4]); +float ED_object_new_primitive_matrix(struct bContext *C, struct Object *editob, float *loc, float *rot, float primmat[][4]); void ED_object_add_generic_props(struct wmOperatorType *ot, int do_editmode); int ED_object_add_generic_invoke(struct bContext *C, struct wmOperator *op, struct wmEvent *event); -void ED_object_add_generic_get_opts(struct wmOperator *op, float *loc, float *rot, int *enter_editmode, unsigned int *layer); +int ED_object_add_generic_get_opts(struct bContext *C, struct wmOperator *op, float *loc, float *rot, int *enter_editmode, unsigned int *layer); struct Object *ED_object_add_type(struct bContext *C, int type, float *loc, float *rot, int enter_editmode, unsigned int layer); -void ED_object_single_users(struct Scene *scene, int full); +void ED_object_single_users(struct Main *bmain, struct Scene *scene, int full); /* cleanup */ int object_is_libdata(struct Object *ob); @@ -110,7 +117,7 @@ void object_test_constraints(struct Object *ob); void ED_object_constraint_set_active(struct Object *ob, struct bConstraint *con); void ED_object_constraint_update(struct Object *ob); -void ED_object_constraint_dependency_update(struct Scene *scene, struct Object *ob); +void ED_object_constraint_dependency_update(struct Main *bmain, struct Scene *scene, struct Object *ob); /* object_lattice.c */ int mouse_lattice(struct bContext *C, short mval[2], int extend); @@ -126,11 +133,11 @@ enum { MODIFIER_APPLY_SHAPE, } eModifier_Apply_Mode; -struct ModifierData *ED_object_modifier_add(struct ReportList *reports, struct Scene *scene, struct Object *ob, char *name, int type); -int ED_object_modifier_remove(struct ReportList *reports, struct Scene *scene, struct Object *ob, struct ModifierData *md); +struct ModifierData *ED_object_modifier_add(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob, char *name, int type); +int ED_object_modifier_remove(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob, struct ModifierData *md); int ED_object_modifier_move_down(struct ReportList *reports, struct Object *ob, struct ModifierData *md); int ED_object_modifier_move_up(struct ReportList *reports, struct Object *ob, struct ModifierData *md); -int ED_object_modifier_convert(struct ReportList *reports, struct Scene *scene, struct Object *ob, struct ModifierData *md); +int ED_object_modifier_convert(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob, struct ModifierData *md); int ED_object_modifier_apply(struct ReportList *reports, struct Scene *scene, struct Object *ob, struct ModifierData *md, int mode); int ED_object_modifier_copy(struct ReportList *reports, struct Object *ob, struct ModifierData *md); diff --git a/source/blender/editors/include/ED_physics.h b/source/blender/editors/include/ED_physics.h index 606740d3c61..51906bf41c1 100644 --- a/source/blender/editors/include/ED_physics.h +++ b/source/blender/editors/include/ED_physics.h @@ -35,7 +35,7 @@ struct wmKeyConfig; /* particle_edit.c */ int PE_poll(struct bContext *C); int PE_hair_poll(struct bContext *C); -int PE_poll_3dview(struct bContext *C); +int PE_poll_view3d(struct bContext *C); /* operators */ void ED_operatortypes_physics(void); diff --git a/source/blender/editors/include/ED_render.h b/source/blender/editors/include/ED_render.h index 6100ecd436f..f34670da471 100644 --- a/source/blender/editors/include/ED_render.h +++ b/source/blender/editors/include/ED_render.h @@ -78,6 +78,7 @@ void ED_preview_free_dbase(void); void ED_preview_shader_job(const struct bContext *C, void *owner, struct ID *id, struct ID *parent, struct MTex *slot, int sizex, int sizey, int method); void ED_preview_icon_job(const struct bContext *C, void *owner, struct ID *id, unsigned int *rect, int sizex, int sizey); +void ED_preview_kill_jobs(const struct bContext *C); void ED_preview_draw(const struct bContext *C, void *idp, void *parentp, void *slot, rcti *rect); diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 4a4c546ec92..3478447b058 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -55,6 +55,7 @@ void ED_region_set(const struct bContext *C, struct ARegion *ar); void ED_region_init(struct bContext *C, struct ARegion *ar); void ED_region_tag_redraw(struct ARegion *ar); void ED_region_tag_redraw_partial(struct ARegion *ar, struct rcti *rct); +void ED_region_tag_redraw_overlay(struct ARegion *ar); void ED_region_panels_init(struct wmWindowManager *wm, struct ARegion *ar); void ED_region_panels(const struct bContext *C, struct ARegion *ar, int vertical, char *context, int contextnr); void ED_region_header_init(struct ARegion *ar); @@ -97,8 +98,8 @@ void ED_screen_set_scene(struct bContext *C, struct Scene *scene); void ED_screen_delete_scene(struct bContext *C, struct Scene *scene); void ED_screen_set_subwinactive(struct wmWindow *win, struct wmEvent *event); void ED_screen_exit(struct bContext *C, struct wmWindow *window, struct bScreen *screen); -void ED_screen_animation_timer(struct bContext *C, int redraws, int sync, int enable); -void ED_screen_animation_timer_update(struct bScreen *screen, int redraws); +void ED_screen_animation_timer(struct bContext *C, int redraws, int refresh, int sync, int enable); +void ED_screen_animation_timer_update(struct bScreen *screen, int redraws, int refresh); int ED_screen_full_newspace(struct bContext *C, ScrArea *sa, int type); void ED_screen_full_prevspace(struct bContext *C, ScrArea *sa); void ED_screen_full_restore(struct bContext *C, ScrArea *sa); diff --git a/source/blender/editors/include/ED_screen_types.h b/source/blender/editors/include/ED_screen_types.h index 03ea9a8f976..c55dafa6f51 100644 --- a/source/blender/editors/include/ED_screen_types.h +++ b/source/blender/editors/include/ED_screen_types.h @@ -35,6 +35,7 @@ typedef struct ScreenAnimData { ARegion *ar; /* do not read from this, only for comparing if region exists */ short redraws; + short refresh; short flag; /* flags for playback */ int sfra; /* frame that playback was started from */ } ScreenAnimData; diff --git a/source/blender/editors/include/ED_sculpt.h b/source/blender/editors/include/ED_sculpt.h index db2013fb411..506813ce626 100644 --- a/source/blender/editors/include/ED_sculpt.h +++ b/source/blender/editors/include/ED_sculpt.h @@ -49,7 +49,7 @@ void ED_keymap_paint(struct wmKeyConfig *keyconf); #define UNDO_PAINT_IMAGE 0 #define UNDO_PAINT_MESH 1 -void ED_undo_paint_step(struct bContext *C, int type, int step); +int ED_undo_paint_step(struct bContext *C, int type, int step, const char *name); void ED_undo_paint_free(void); #endif diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index cc4f906ad37..7bf3ec88a4b 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -37,6 +37,7 @@ struct wmOperatorType; /* ed_util.c */ +void ED_editors_init (struct bContext *C); void ED_editors_exit (struct bContext *C); /* ************** Undo ************************ */ diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 7f90575acc0..f5a84aa4c19 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -51,7 +51,7 @@ struct ViewContext; /* for derivedmesh drawing callbacks, for view3d_select, .... */ typedef struct ViewContext { - Scene *scene; + struct Scene *scene; struct Object *obact; struct Object *obedit; struct ARegion *ar; @@ -72,7 +72,7 @@ typedef struct ViewDepths { float *give_cursor(struct Scene *scene, struct View3D *v3d); -void initgrabz(struct RegionView3D *rv3d, float x, float y, float z); +int initgrabz(struct RegionView3D *rv3d, float x, float y, float z); void window_to_3d(struct ARegion *ar, float *vec, short mx, short my); void window_to_3d_delta(struct ARegion *ar, float *vec, short mx, short my); void view3d_unproject(struct bglMats *mats, float out[3], const short x, const short y, const float z); @@ -101,10 +101,11 @@ void viewline(struct ARegion *ar, struct View3D *v3d, float mval[2], float ray_s void viewray(struct ARegion *ar, struct View3D *v3d, float mval[2], float ray_start[3], float ray_normal[3]); int get_view3d_cliprange(struct View3D *v3d, struct RegionView3D *rv3d, float *clipsta, float *clipend); -int get_view3d_viewplane(struct View3D *v3d, struct RegionView3D *rv3d, int winxi, int winyi, rctf *viewplane, float *clipsta, float *clipend, float *pixsize); +int get_view3d_viewplane(struct View3D *v3d, struct RegionView3D *rv3d, int winxi, int winyi, struct rctf *viewplane, float *clipsta, float *clipend, float *pixsize); int get_view3d_ortho(struct View3D *v3d, struct RegionView3D *rv3d); void view3d_get_object_project_mat(struct RegionView3D *v3d, struct Object *ob, float pmat[4][4]); void view3d_project_float(struct ARegion *a, float *vec, float *adr, float mat[4][4]); +void view3d_calc_camera_border(struct Scene *scene, struct ARegion *ar, struct RegionView3D *rv3d, struct View3D *v3d, struct rctf *viewborder_r); /* drawobject.c itterators */ void mesh_foreachScreenVert(struct ViewContext *vc, void (*func)(void *userData, struct EditVert *eve, int x, int y, int index), void *userData, int clipVerts); @@ -153,16 +154,14 @@ struct RegionView3D *ED_view3d_context_rv3d(struct bContext *C); void ED_view3d_init_mats_rv3d(struct Object *ob, struct RegionView3D *rv3d); -void ED_view3d_scene_layers_copy(struct View3D *v3d, struct Scene *scene); -void ED_view3d_scene_layers_update(struct Main *bmain, struct Scene *scene); -int ED_view3d_scene_layer_set(int lay, const int *values); +int ED_view3d_scene_layer_set(int lay, const int *values, int *active); int ED_view3d_context_activate(struct bContext *C); void ED_view3d_draw_offscreen(struct Scene *scene, struct View3D *v3d, struct ARegion *ar, int winx, int winy, float viewmat[][4], float winmat[][4]); -struct ImBuf *ED_view3d_draw_offscreen_imbuf(struct Scene *scene, struct View3D *v3d, struct ARegion *ar, int sizex, int sizey); -struct ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Scene *scene, int width, int height, int drawtype); +struct ImBuf *ED_view3d_draw_offscreen_imbuf(struct Scene *scene, struct View3D *v3d, struct ARegion *ar, int sizex, int sizey, unsigned int flag); +struct ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Scene *scene, int width, int height, unsigned int flag, int drawtype); void view3d_clipping_local(struct RegionView3D *rv3d, float mat[][4]); diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index 30560687702..6a139b124a6 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -27,8 +27,8 @@ */ /* Note: this is included twice with different #defines for DEF_ICON - once from UI_resources.h for the internal icon enum and once fro interface_api.c for - definition of the RNA enum for he icons */ + once from UI_resources.h for the internal icon enum and + once for interface_api.c for the definition of the RNA enum for the icons */ DEF_ICON(ICON_BLENDER) DEF_ICON(ICON_QUESTION) @@ -107,7 +107,7 @@ DEF_ICON(ICON_NEW) DEF_ICON(ICON_FILE_TICK) DEF_ICON(ICON_QUIT) DEF_ICON(ICON_URL) -DEF_ICON(ICON_BLANK037) +DEF_ICON(ICON_RECOVER_LAST) DEF_ICON(ICON_BLANK038) DEF_ICON(ICON_FULLSCREEN_ENTER) DEF_ICON(ICON_FULLSCREEN_EXIT) @@ -540,7 +540,7 @@ DEF_ICON(ICON_MOD_FLUIDSIM) DEF_ICON(ICON_MOD_MULTIRES) DEF_ICON(ICON_MOD_SMOKE) DEF_ICON(ICON_MOD_SOLIDIFY) -DEF_ICON(ICON_MOD_SCREW) // XXX, needs drawing +DEF_ICON(ICON_MOD_SCREW) DEF_ICON(ICON_BLANK160) DEF_ICON(ICON_BLANK161) DEF_ICON(ICON_BLANK162) @@ -571,7 +571,7 @@ DEF_ICON(ICON_PREV_KEYFRAME) DEF_ICON(ICON_NEXT_KEYFRAME) DEF_ICON(ICON_PLAY_AUDIO) DEF_ICON(ICON_PLAY_REVERSE) -DEF_ICON(ICON_BLANK179) +DEF_ICON(ICON_PREVIEW_RANGE) DEF_ICON(ICON_BLANK180) DEF_ICON(ICON_PMARKER_ACT) DEF_ICON(ICON_PMARKER_SEL) @@ -682,7 +682,7 @@ DEF_ICON(ICON_BLANK227) DEF_ICON(ICON_BLANK228) DEF_ICON(ICON_BLANK229) DEF_ICON(ICON_BLANK230) -DEF_ICON(ICON_BLANK231) +DEF_ICON(ICON_SNAP_SURFACE) DEF_ICON(ICON_BLANK232) DEF_ICON(ICON_BLANK233) DEF_ICON(ICON_RETOPO) @@ -847,7 +847,7 @@ DEF_ICON(ICON_SEQ_PREVIEW) DEF_ICON(ICON_SEQ_LUMA_WAVEFORM) DEF_ICON(ICON_SEQ_CHROMA_SCOPE) DEF_ICON(ICON_SEQ_HISTOGRAM) -DEF_ICON(ICON_BLANK330) +DEF_ICON(ICON_SEQ_SPLITVIEW) DEF_ICON(ICON_BLANK331) DEF_ICON(ICON_BLANK332) DEF_ICON(ICON_BLANK333) @@ -869,6 +869,37 @@ DEF_ICON(ICON_BLANK345) DEF_ICON(ICON_BLANK346) DEF_ICON(ICON_BLANK346b) + /* brush icons */ + +DEF_ICON(ICON_BRUSH_ADD) +DEF_ICON(ICON_BRUSH_BLOB) +DEF_ICON(ICON_BRUSH_BLUR) +DEF_ICON(ICON_BRUSH_CLAY) +DEF_ICON(ICON_BRUSH_CLONE) +DEF_ICON(ICON_BRUSH_CREASE) +DEF_ICON(ICON_BRUSH_DARKEN) +DEF_ICON(ICON_BRUSH_FILL) +DEF_ICON(ICON_BRUSH_FLATTEN) +DEF_ICON(ICON_BRUSH_GRAB) +DEF_ICON(ICON_BRUSH_INFLATE) +DEF_ICON(ICON_BRUSH_LAYER) +DEF_ICON(ICON_BRUSH_LIGHTEN) +DEF_ICON(ICON_BRUSH_MIX) +DEF_ICON(ICON_BRUSH_MULTIPLY) +DEF_ICON(ICON_BRUSH_NUDGE) +DEF_ICON(ICON_BRUSH_PINCH) +DEF_ICON(ICON_BRUSH_SCRAPE) +DEF_ICON(ICON_BRUSH_SCULPT_DRAW) +DEF_ICON(ICON_BRUSH_SMEAR) +DEF_ICON(ICON_BRUSH_SMOOTH) +DEF_ICON(ICON_BRUSH_SNAKE_HOOK) +DEF_ICON(ICON_BRUSH_SOFTEN) +DEF_ICON(ICON_BRUSH_SUBTRACT) +DEF_ICON(ICON_BRUSH_TEXDRAW) +DEF_ICON(ICON_BRUSH_THUMB) +DEF_ICON(ICON_BRUSH_ROTATE) +DEF_ICON(ICON_BRUSH_VERTEXDRAW) + /* vector icons */ DEF_ICON(VICO_VIEW3D_VEC) diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index dfc89ea16df..9601cdc3f21 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -142,7 +142,7 @@ typedef struct uiLayout uiLayout; #define UI_BUT_ALIGN_DOWN (1<<17) #define UI_BUT_DISABLED (1<<18) -#define UI_BUT_UNUSED (1<<19) +#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) @@ -152,6 +152,9 @@ typedef struct uiLayout uiLayout; #define UI_BUT_IMMEDIATE (1<<26) #define UI_BUT_NO_TOOLTIP (1<<27) +#define UI_BUT_VEC_SIZE_LOCK (1<<28) /* used to flag if color hsv-circle should keep luminance */ +#define UI_BUT_COLOR_CUBIC (1<<29) /* cubic saturation for the color wheel */ + #define UI_PANEL_WIDTH 340 #define UI_COMPACT_PANEL_WIDTH 160 @@ -218,6 +221,9 @@ typedef struct uiLayout uiLayout; #define HOTKEYEVT (45<<9) #define BUT_IMAGE (46<<9) #define HISTOGRAM (47<<9) +#define WAVEFORM (48<<9) +#define VECTORSCOPE (49<<9) +#define PROGRESSBAR (50<<9) #define BUTTYPE (63<<9) @@ -245,8 +251,9 @@ void uiDrawMenuBox(float minx, float miny, float maxx, float maxy, short flag, s void uiDrawBoxShadow(unsigned char alpha, float minx, float miny, float maxx, float maxy); /* state for scrolldrawing */ -#define UI_SCROLL_PRESSED 1 -#define UI_SCROLL_ARROWS 2 +#define UI_SCROLL_PRESSED 1 +#define UI_SCROLL_ARROWS 2 +#define UI_SCROLL_NO_OUTLINE 4 void uiWidgetScrollDraw(struct uiWidgetColors *wcol, struct rcti *rect, struct rcti *slider, int state); /* Menu Callbacks */ @@ -671,14 +678,15 @@ void uiTemplateAnyID(uiLayout *layout, struct bContext *C, struct PointerRNA *pt char *proptypename, char *text); void uiTemplatePathBuilder(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname, struct PointerRNA *root_ptr, char *text); -uiLayout *uiTemplateModifier(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, int compact); +uiLayout *uiTemplateModifier(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr); uiLayout *uiTemplateConstraint(uiLayout *layout, struct PointerRNA *ptr); void uiTemplatePreview(uiLayout *layout, struct ID *id, struct ID *parent, struct MTex *slot); void uiTemplateColorRamp(uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand); void uiTemplateHistogram(uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand); +void uiTemplateWaveform(uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand); +void uiTemplateVectorscope(uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand); void uiTemplateCurveMapping(uiLayout *layout, struct PointerRNA *ptr, char *propname, int type, int levels, int brush); -void uiTemplateColorWheel(uiLayout *layout, struct PointerRNA *ptr, char *propname, int value_slider, int lock); -void uiTemplateTriColorSet(uiLayout *layout, struct PointerRNA *ptr, char *propname); +void uiTemplateColorWheel(uiLayout *layout, struct PointerRNA *ptr, char *propname, int value_slider, int lock, int lock_luminosity, int cubic); void uiTemplateLayers(uiLayout *layout, struct PointerRNA *ptr, char *propname, PointerRNA *used_ptr, char *used_propname, int active_layer); void uiTemplateImage(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname, struct PointerRNA *userptr, int compact); @@ -687,7 +695,7 @@ void uiTemplateRunningJobs(uiLayout *layout, struct bContext *C); void uiTemplateOperatorSearch(uiLayout *layout); void uiTemplateHeader3D(uiLayout *layout, struct bContext *C); void uiTemplateTextureImage(uiLayout *layout, struct bContext *C, struct Tex *tex); -void uiTemplateReportsBanner(uiLayout *layout, struct bContext *C, struct wmOperator *op); +void uiTemplateReportsBanner(uiLayout *layout, struct bContext *C); void uiTemplateList(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname, struct PointerRNA *activeptr, char *activeprop, int rows, int maxrows, int type); diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 273071f94bf..af3f91f8ba8 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -180,6 +180,7 @@ enum { TH_HANDLE_SEL_ALIGN, TH_ACTIVE_SPLINE, + TH_LASTSEL_POINT, TH_SYNTAX_B, TH_SYNTAX_V, @@ -227,6 +228,8 @@ enum { TH_DOPESHEET_CHANNELSUBOB, TH_PREVIEW_BACK, + + TH_EDGE_CREASE, }; /* XXX WARNING: previous is saved in file, so do not change order! */ @@ -277,6 +280,9 @@ void UI_ColorPtrBlendShade3ubv(char *cp1, char *cp2, float fac, int offset); // get a 3 byte color, blended and shaded between two other char color pointers void UI_GetColorPtrBlendShade3ubv(char *cp1, char *cp2, char *col, float fac, int offset); +// clear the openGL ClearColor using the input colorid +void UI_ThemeClearColor(int colorid); + // internal (blender) usage only, for init and set active void UI_SetTheme(int spacetype, int regionid); diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h index 38c2780608f..bf4a3de9cc6 100644 --- a/source/blender/editors/include/UI_view2d.h +++ b/source/blender/editors/include/UI_view2d.h @@ -164,6 +164,7 @@ void UI_view2d_view_restore(const struct bContext *C); View2DGrid *UI_view2d_grid_calc(const struct bContext *C, struct View2D *v2d, short xunits, short xclamp, short yunits, short yclamp, int winx, int winy); void UI_view2d_grid_draw(const struct bContext *C, struct View2D *v2d, View2DGrid *grid, int flag); void UI_view2d_constant_grid_draw(const struct bContext *C, struct View2D *v2d); +void UI_view2d_grid_size(View2DGrid *grid, float *r_dx, float *r_dy); void UI_view2d_grid_free(View2DGrid *grid); /* scrollbar drawing */ |