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:
authorJoseph Eagar <joeedh@gmail.com>2011-05-09 03:43:18 +0400
committerJoseph Eagar <joeedh@gmail.com>2011-05-09 03:43:18 +0400
commit6ef77cf95accc3cb914e7efd964118ce6e9521cf (patch)
tree1d8dbf95355038c93f79f9053a0bf1d55b561ec3 /source/blender/editors/include
parent3462ddf17f38eb61fc3bb2751d55de15a47455c3 (diff)
parent770119d16f7dbee99a60d19540818892c970c4e2 (diff)
=bmesh= merge from trunk at r36529
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/ED_anim_api.h2
-rw-r--r--source/blender/editors/include/ED_armature.h2
-rw-r--r--source/blender/editors/include/ED_mball.h2
-rw-r--r--source/blender/editors/include/ED_mesh.h8
-rw-r--r--source/blender/editors/include/ED_object.h2
-rw-r--r--source/blender/editors/include/ED_particle.h4
-rw-r--r--source/blender/editors/include/ED_uvedit.h12
-rw-r--r--source/blender/editors/include/ED_view3d.h47
-rw-r--r--source/blender/editors/include/UI_interface.h5
9 files changed, 51 insertions, 33 deletions
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index 1ca33e73656..5ecbaeb1c87 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -251,7 +251,7 @@ typedef enum eAnimFilter_Flags {
/* Actions (also used for Dopesheet) */
/* Action Channel Group */
#define EDITABLE_AGRP(agrp) ((agrp->flag & AGRP_PROTECTED)==0)
-#define EXPANDED_AGRP(agrp) \
+#define EXPANDED_AGRP(ac, agrp) \
( ( ((ac)->spacetype == SPACE_IPO) && (agrp->flag & AGRP_EXPANDED_G) ) || \
( ((ac)->spacetype != SPACE_IPO) && (agrp->flag & AGRP_EXPANDED) ) )
#define SEL_AGRP(agrp) ((agrp->flag & AGRP_SELECTED) || (agrp->flag & AGRP_ACTIVE))
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index fcd56277b87..36923736068 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -117,7 +117,7 @@ void ED_armature_deselect_all_visible(struct Object *obedit);
int ED_do_pose_selectbuffer(struct Scene *scene, struct Base *base, unsigned int *buffer,
short hits, short extend);
-int mouse_armature(struct bContext *C, short mval[2], int extend);
+int mouse_armature(struct bContext *C, const short mval[2], int extend);
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);
diff --git a/source/blender/editors/include/ED_mball.h b/source/blender/editors/include/ED_mball.h
index 504cc4e2d52..a742be7337c 100644
--- a/source/blender/editors/include/ED_mball.h
+++ b/source/blender/editors/include/ED_mball.h
@@ -42,7 +42,7 @@ void ED_keymap_metaball(struct wmKeyConfig *keyconf);
struct MetaElem *add_metaball_primitive(struct bContext *C, float mat[4][4], int type, int newname);
-int mouse_mball(struct bContext *C, short mval[2], int extend);
+int mouse_mball(struct bContext *C, const short mval[2], int extend);
void free_editMball(struct Object *obedit);
void make_editMball(struct Object *obedit);
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h
index b55af8ec388..adbaa419684 100644
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@ -208,6 +208,10 @@ extern unsigned int bm_vertoffs, bm_solidoffs, bm_wireoffs;
intptr_t mesh_octree_table(struct Object *ob, struct BMEditMesh *em, float *co, char mode);
long mesh_mirrtopo_table(struct Object *ob, char mode);
+//BMESH_TODO void EM_cache_x_mirror_vert(struct Object *ob, struct BMEditMesh *em);
+
+int mouse_mesh(struct bContext *C, const short mval[2], short extend);
+
struct BMVert *editbmesh_get_x_mirror_vert(struct Object *ob, struct BMEditMesh *em, struct BMVert *eve, float *co, int index);
int mesh_get_x_mirror_vert(struct Object *ob, int index);
int *mesh_get_x_mirror_faces(struct Object *ob, struct BMEditMesh *em);
@@ -229,12 +233,10 @@ void ED_keymap_mesh(struct wmKeyConfig *keyconf);
/* bmesh_mods.c */
extern unsigned int bm_vertoffs, bm_solidoffs, bm_wireoffs;
-int mouse_mesh(struct bContext *C, short mval[2], short extend);
-
/* editface.c */
void paintface_flush_flags(struct Object *ob);
struct MTexPoly *EM_get_active_mtexpoly(struct BMEditMesh *em, struct BMFace **act_efa, struct MLoopCol **col, int sloppy);
-int paintface_mouse_select(struct bContext *C, struct Object *ob, short mval[2], int extend);
+int paintface_mouse_select(struct bContext *C, struct Object *ob, const short mval[2], int extend);
int do_paintface_box_select(struct ViewContext *vc, struct rcti *rect, int select, int extend);
void paintface_deselect_all_visible(struct Object *ob, int action, short flush_flags);
void paintface_select_linked(struct bContext *C, struct Object *ob, short mval[2], int mode);
diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h
index 8401616a1c4..9f42eaa0ac4 100644
--- a/source/blender/editors/include/ED_object.h
+++ b/source/blender/editors/include/ED_object.h
@@ -129,7 +129,7 @@ void ED_object_constraint_update(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);
+int mouse_lattice(struct bContext *C, const short mval[2], int extend);
void undo_push_lattice(struct bContext *C, const char *name);
/* object_lattice.c */
diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h
index 7b4a2e6fe16..f29284fe64d 100644
--- a/source/blender/editors/include/ED_particle.h
+++ b/source/blender/editors/include/ED_particle.h
@@ -60,9 +60,9 @@ void PE_hide_keys_time(struct Scene *scene, struct PTCacheEdit *edit, float cfra
void PE_update_object(struct Scene *scene, struct Object *ob, int useflag);
/* selection tools */
-int PE_mouse_particles(struct bContext *C, short *mval, int extend);
+int PE_mouse_particles(struct bContext *C, const short mval[2], int extend);
int PE_border_select(struct bContext *C, struct rcti *rect, int select, int extend);
-int PE_circle_select(struct bContext *C, int selecting, short *mval, float rad);
+int PE_circle_select(struct bContext *C, int selecting, const short mval[2], float rad);
int PE_lasso_select(struct bContext *C, short mcords[][2], short moves, short extend, short select);
void PE_deselect_all_visible(struct PTCacheEdit *edit);
diff --git a/source/blender/editors/include/ED_uvedit.h b/source/blender/editors/include/ED_uvedit.h
index 88ccd58f4a1..1fb227de2b8 100644
--- a/source/blender/editors/include/ED_uvedit.h
+++ b/source/blender/editors/include/ED_uvedit.h
@@ -32,12 +32,13 @@
#ifndef ED_UVEDIT_H
#define ED_UVEDIT_H
-struct bContext;
-struct Scene;
-struct Object;
-struct MTFace;
+struct ARegionType;
struct EditFace;
struct Image;
+struct MTFace;
+struct Object;
+struct Scene;
+struct bContext;
struct wmKeyConfig;
/* uvedit_ops.c */
@@ -76,5 +77,8 @@ void ED_unwrap_lscm(struct Scene *scene, struct Object *obedit, const short sel)
/* uvedit_draw.c */
void draw_uvedit_main(struct SpaceImage *sima, struct ARegion *ar, struct Scene *scene, struct Object *obedit);
+/* uvedit_buttons.c */
+void ED_uvedit_buttons_register(struct ARegionType *art);
+
#endif /* ED_UVEDIT_H */
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index 37c146a810c..0ea9fc1a3f9 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -83,9 +83,9 @@ typedef struct ViewDepths {
float *give_cursor(struct Scene *scene, struct View3D *v3d);
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 window_to_3d_vector(struct ARegion *ar, float *vec, short mx, short my);
+void window_to_3d(struct ARegion *ar, float out[3], short mx, short my);
+void window_to_3d_delta(struct ARegion *ar, float out[3], short mx, short my);
+void window_to_3d_vector(struct ARegion *ar, float out[3], short mx, short my);
void view3d_unproject(struct bglMats *mats, float out[3], const short x, const short y, const float z);
/* Depth buffer */
@@ -98,14 +98,14 @@ void request_depth_update(struct RegionView3D *rv3d);
void view3d_calculate_clipping(struct BoundBox *bb, float planes[4][4], struct bglMats *mats, struct rcti *rect);
-void project_short(struct ARegion *ar, float *vec, short *adr);
-void project_short_noclip(struct ARegion *ar, float *vec, short *adr);
+void project_short(struct ARegion *ar, const float vec[3], short adr[2]);
+void project_short_noclip(struct ARegion *ar, const float vec[3], short adr[2]);
-void project_int(struct ARegion *ar, float *vec, int *adr);
-void project_int_noclip(struct ARegion *ar, float *vec, int *adr);
+void project_int(struct ARegion *ar, const float vec[3], int adr[2]);
+void project_int_noclip(struct ARegion *ar, const float vec[3], int adr[2]);
-void project_float(struct ARegion *ar, float *vec, float *adr);
-void project_float_noclip(struct ARegion *ar, float *vec, float *adr);
+void project_float(struct ARegion *ar, const float vec[3], float adr[2]);
+void project_float_noclip(struct ARegion *ar, const float vec[3], float adr[2]);
void viewvector(struct RegionView3D *rv3d, float coord[3], float vec[3]);
@@ -116,8 +116,7 @@ int get_view3d_cliprange(struct View3D *v3d, struct RegionView3D *rv3d, float *c
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]);
-/* computes screen x/y in vec */
-void view3d_project_float(struct ARegion *a, float *vec, float *adr, float mat[4][4]);
+void view3d_project_float(struct ARegion *a, const float vec[3], float adr[2], float mat[4][4]);
void view3d_project_float_v3(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, short do_shift);
@@ -129,7 +128,7 @@ void nurbs_foreachScreenVert(struct ViewContext *vc, void (*func)(void *userData
void lattice_foreachScreenVert(struct ViewContext *vc, void (*func)(void *userData, struct BPoint *bp, int x, int y), void *userData);
void ED_view3d_local_clipping(struct RegionView3D *rv3d, float mat[][4]);
-int view3d_test_clipping(struct RegionView3D *rv3d, float *vec, int local);
+int view3d_test_clipping(struct RegionView3D *rv3d, const float vec[3], const int local);
void view3d_align_axis_to_vector(struct View3D *v3d, struct RegionView3D *rv3d, int axisidx, float vec[3]);
float view3d_pixel_size(struct RegionView3D *rv3d, const float co[3]);
@@ -138,18 +137,18 @@ void drawcircball(int mode, const float cent[3], float rad, float tmat[][4]);
/* backbuffer select and draw support */
void view3d_validate_backbuf(struct ViewContext *vc);
struct ImBuf *view3d_read_backbuf(struct ViewContext *vc, short xmin, short ymin, short xmax, short ymax);
-unsigned int view3d_sample_backbuf_rect(struct ViewContext *vc, short mval[2], int size, unsigned int min, unsigned int max, int *dist, short strict,
+unsigned int view3d_sample_backbuf_rect(struct ViewContext *vc, const short mval[2], int size, unsigned int min, unsigned int max, int *dist, short strict,
void *handle, unsigned int (*indextest)(void *handle, unsigned int index));
unsigned int view3d_sample_backbuf(struct ViewContext *vc, int x, int y);
/* draws and does a 4x4 sample */
-int view_autodist(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, short *mval, float mouse_worldloc[3]);
+int view_autodist(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, const short mval[2], float mouse_worldloc[3]);
/* only draw so view_autodist_simple can be called many times after */
int view_autodist_init(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, int mode);
-int view_autodist_simple(struct ARegion *ar, short mval[2], float mouse_worldloc[3], int margin, float *force_depth);
-int view_autodist_depth(struct ARegion *ar, short mval[2], int margin, float *depth);
-int view_autodist_depth_segment(struct ARegion *ar, short mval_sta[2], short mval_end[2], int margin, float *depth);
+int view_autodist_simple(struct ARegion *ar, const short mval[2], float mouse_worldloc[3], int margin, float *force_depth);
+int view_autodist_depth(struct ARegion *ar, const short mval[2], int margin, float *depth);
+int view_autodist_depth_segment(struct ARegion *ar, const short mval_sta[2], const short mval_end[2], int margin, float *depth);
/* select */
#define MAXPICKBUF 10000
@@ -158,7 +157,7 @@ short view3d_opengl_select(struct ViewContext *vc, unsigned int *buffer, unsigne
void view3d_set_viewcontext(struct bContext *C, struct ViewContext *vc);
void view3d_operator_needs_opengl(const struct bContext *C);
void view3d_region_operator_needs_opengl(struct wmWindow *win, struct ARegion *ar);
-void view3d_get_view_aligned_coordinate(struct ViewContext *vc, float *fp, short mval[2]);
+int view3d_get_view_aligned_coordinate(struct ViewContext *vc, float fp[3], const short mval[2], const short do_fallback);
void view3d_get_transformation(struct ARegion *ar, struct RegionView3D *rv3d, struct Object *ob, struct bglMats *mats);
/* XXX should move to BLI_math */
@@ -168,6 +167,8 @@ int lasso_inside_edge(short mcords[][2], short moves, int x0, int y0, int x1, in
/* get 3d region from context, also if mouse is in header or toolbar */
struct RegionView3D *ED_view3d_context_rv3d(struct bContext *C);
+struct ARegion *ED_view3d_context_region_unlock(struct bContext *C);
+int ED_operator_rv3d_unlock_poll(struct bContext *C);
void ED_view3d_init_mats_rv3d(struct Object *ob, struct RegionView3D *rv3d);
@@ -178,15 +179,21 @@ void ED_view3d_draw_offscreen(struct Scene *scene, struct View3D *v3d, struct 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, unsigned int flag, char err_out[256]);
-struct ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Scene *scene, int width, int height, unsigned int flag, int drawtype, char err_out[256]);
+struct ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Scene *scene, struct Object *camera, int width, int height, unsigned int flag, int drawtype, char err_out[256]);
-Base *ED_view3d_give_base_under_cursor(struct bContext *C, short *mval);
+Base *ED_view3d_give_base_under_cursor(struct bContext *C, const short mval[2]);
void ED_view3d_quadview_update(struct ScrArea *sa, struct ARegion *ar, short do_clip);
int ED_view3d_lock(struct RegionView3D *rv3d);
unsigned int ED_view3d_datamask(struct Scene *scene, struct View3D *v3d);
unsigned int ED_viewedit_datamask(struct bScreen *screen);
+
+/* assigning view matrix */
+void view3d_apply_mat4(float mat[][4], float *ofs, float *quat, float *dist);
+void view3d_apply_ob(struct Object *ob, float *ofs, float *quat, float *dist, float *lens);
+int view3d_is_ortho(struct View3D *v3d, struct RegionView3D *rv3d);
+
#endif /* ED_VIEW3D_H */
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index e0f34410673..d6988aa9618 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -160,6 +160,10 @@ typedef struct uiLayout uiLayout;
#define UI_PANEL_WIDTH 340
#define UI_COMPACT_PANEL_WIDTH 160
+/* scale fixed button widths by this to account for DPI
+ * 8.4852 == sqrtf(72.0f)) */
+#define UI_DPI_FAC (sqrtf((float)U.dpi) / 8.48528137423857f)
+
/* Button types, bits stored in 1 value... and a short even!
- bits 0-4: bitnr (0-31)
- bits 5-7: pointer type
@@ -712,6 +716,7 @@ void uiTemplateImageLayers(uiLayout *layout, struct bContext *C, struct Image *i
void uiTemplateRunningJobs(uiLayout *layout, struct bContext *C);
void uiTemplateOperatorSearch(uiLayout *layout);
void uiTemplateHeader3D(uiLayout *layout, struct bContext *C);
+void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C);
void uiTemplateTextureImage(uiLayout *layout, struct bContext *C, struct Tex *tex);
void uiTemplateReportsBanner(uiLayout *layout, struct bContext *C);