2.5: code consistency
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 8 Jul 2009 16:17:47 +0000 (16:17 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 8 Jul 2009 16:17:47 +0000 (16:17 +0000)
* Rename BIF_transform/retopo.h to ED_transform/retopo.h
  for consistency.
* Move MESH_OT_duplicate_add to editmesh_add.c.
* Remove some code from BIF_gl.h which is not needed there
  anymore.

40 files changed:
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/editarmature_sketch.c
source/blender/editors/armature/poseobject.c
source/blender/editors/curve/curve_ops.c
source/blender/editors/curve/editcurve.c
source/blender/editors/include/BIF_gl.h
source/blender/editors/include/BIF_glutil.h
source/blender/editors/include/BIF_transform.h [deleted file]
source/blender/editors/include/ED_retopo.h [moved from source/blender/editors/include/BIF_retopo.h with 98% similarity]
source/blender/editors/include/ED_transform.h
source/blender/editors/mesh/editmesh.c
source/blender/editors/mesh/editmesh_add.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/mesh_intern.h
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/object/object_edit.c
source/blender/editors/space_action/action_edit.c
source/blender/editors/space_action/action_ops.c
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/space_graph/graph_ops.c
source/blender/editors/space_image/image_header.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_ops.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_sequencer/sequencer_ops.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/space_view3d/view3d_ops.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_toolbar.c
source/blender/editors/transform/transform.h
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_manipulator.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/uvedit/uvedit_ops.c

index 15969fc9ab91b810b26735afb4f743a861e46018..6e95fe7ebc7b19a356226c2243ace6da471b5d39 100644 (file)
@@ -60,6 +60,7 @@
 #include "BLI_edgehash.h"
 
 #include "BIF_gl.h"
+#include "BIF_glutil.h"
 
 #include "GPU_draw.h"
 #include "GPU_extensions.h"
index 97bf3492f7c93c2b47fb5c0b83609d4f6a0116e9..d7e3f84f0d68a755dcc6c445fe1ffa2de9534033 100644 (file)
@@ -72,7 +72,6 @@
 #include "PIL_time.h"
 
 #include "BIF_gl.h"
-#include "BIF_transform.h"
 #include "BIF_generate.h"
 
 #include "RNA_access.h"
@@ -85,6 +84,7 @@
 #include "ED_mesh.h"
 #include "ED_object.h"
 #include "ED_screen.h"
+#include "ED_transform.h"
 #include "ED_util.h"
 #include "ED_view3d.h"
 
index fb030b91ce14576025c1069f183ae66f387fd5ac..816df0f81c9b1d7d81158f354b944d19c06cef3e 100644 (file)
@@ -65,7 +65,7 @@
 #include "BIF_generate.h"
 //#include "BIF_interface.h"
 
-#include "BIF_transform.h"
+#include "ED_transform.h"
 
 #include "WM_api.h"
 #include "WM_types.h"
index 4a7056274c651b36f637c57f915e95552c01b383..2913d1d13d9b344e2bdade489b577a97d1294b86 100644 (file)
@@ -64,7 +64,6 @@
 #include "BKE_object.h"
 #include "BKE_utildefines.h"
 
-#include "BIF_transform.h" /* for autokey TFM_TRANSLATION, etc */
 #include "BIF_gl.h"
 
 #include "RNA_access.h"
@@ -79,6 +78,7 @@
 #include "ED_object.h"
 #include "ED_mesh.h"
 #include "ED_screen.h"
+#include "ED_transform.h" /* for autokey TFM_TRANSLATION, etc */
 #include "ED_view3d.h"
 
 #include "armature_intern.h"
index 66cde772f3e3f6f6946e327cea211af69090028f..ed53f8e01946497ecb92d08644b68a07901112d2 100644 (file)
 #include "WM_api.h"
 #include "WM_types.h"
 
-#include "ED_screen.h"
 #include "ED_object.h"
-
-#include "BIF_transform.h"
+#include "ED_screen.h"
+#include "ED_transform.h"
 
 #include "UI_interface.h"
 
index 64303c149a855e54d3f80d6a8c84764909e0bf68..6ae791094459114051c5699ee70ef4608dd6fbd0 100644 (file)
 #include "ED_keyframes_edit.h"
 #include "ED_object.h"
 #include "ED_screen.h"
+#include "ED_transform.h"
 #include "ED_types.h"
 #include "ED_util.h"
 #include "ED_view3d.h"
 
 #include "UI_interface.h"
 
-#include "BIF_transform.h"
-
 #include "RNA_access.h"
 #include "RNA_define.h"
 
index c1b3b056d62f664547f18ace9a1e1088c09aedbb..3318d869378f2e6b2159c4ec975946e9a5365c9c 100644 (file)
 #ifndef BIF_GL_H
 #define BIF_GL_H
 
-       /* Although not really a great idea to copy these defines
-        * from Windows' winnt.h, this lets us use GL without including
-        * windows.h everywhere (or BLI_winstuff.h) which is a good thing.
-        */
-#ifdef WIN32
-#ifndef APIENTRY
-#define APIENTRY       __stdcall
-#endif
-
-#ifndef CALLBACK
-#define CALLBACK       __stdcall
-#endif
-
-#ifndef WINGDIAPI
-#define WINGDIAPI      __declspec(dllimport)
-#endif
-#endif
-
 #include "GL/glew.h"
 
        /*
         * these should be phased out. cpack should be replaced in
-        * code with calls to glColor3ub, lrectwrite probably should
-        * change to a function. - zr
+        * code with calls to glColor3ub. - zr
         */
 /* 
  *
 #define glMultMatrixf(x)               glMultMatrixf( (float *)(x))
 #define glLoadMatrixf(x)               glLoadMatrixf( (float *)(x))
 
-#define lrectwrite(a, b, c, d, rect)   {glRasterPos2i(a,  b);glDrawPixels((c)-(a)+1, (d)-(b)+1, GL_RGBA, GL_UNSIGNED_BYTE,  rect);}
-
-/* glStippleDefines, defined in glutil.c */
-extern GLubyte stipple_halftone[128];
-extern GLubyte stipple_quarttone[128];
-
 #endif /* #ifdef BIF_GL_H */
 
index 5c611365a7ecef646fee1d45933d86fcc14edbdf..f5769610f50d69c835719db88afeb24e30655241 100644 (file)
@@ -45,6 +45,9 @@ void sdrawXORline4(int nr, int x0, int y0, int x1, int y1);
 void fdrawXORellipse(float xofs, float yofs, float hw, float hh);
 void fdrawXORcirc(float xofs, float yofs, float rad);
 
+/* glStipple defines */
+extern unsigned char stipple_halftone[128];
+extern unsigned char stipple_quarttone[128];
 
        /**
         * Draw a lined (non-looping) arc with the given
@@ -202,7 +205,6 @@ int is_a_really_crappy_intel_card(void);
 void set_inverted_drawing(int enable);
 void setlinestyle(int nr);
 
-
 /* own working polygon offset */
 void bglPolygonOffset(float viewdist, float dist);
 
diff --git a/source/blender/editors/include/BIF_transform.h b/source/blender/editors/include/BIF_transform.h
deleted file mode 100644 (file)
index f65648e..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-/**
- * $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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef BIF_TRANSFORM_H
-#define BIF_TRANSFORM_H
-
-/* ******************* Registration Function ********************** */
-
-struct wmWindowManager;
-struct ListBase;
-struct wmEvent;
-struct bContext;
-struct Object;
-struct uiLayout;
-
-void transform_keymap_for_space(struct wmWindowManager *wm, struct ListBase *keymap, int spaceid);
-void transform_operatortypes(void);
-
-/* ******************** Macros & Prototypes *********************** */
-
-/* MODE AND NUMINPUT FLAGS */
-enum {
-       TFM_INIT = -1,
-       TFM_DUMMY,
-       TFM_TRANSLATION,
-       TFM_ROTATION,
-       TFM_RESIZE,
-       TFM_TOSPHERE,
-       TFM_SHEAR,
-       TFM_WARP,
-       TFM_SHRINKFATTEN,
-       TFM_TILT,
-       TFM_TRACKBALL,
-       TFM_PUSHPULL,
-       TFM_CREASE,
-       TFM_MIRROR,
-       TFM_BONESIZE,
-       TFM_BONE_ENVELOPE,
-       TFM_CURVE_SHRINKFATTEN,
-       TFM_BONE_ROLL,
-       TFM_TIME_TRANSLATE,
-       TFM_TIME_SLIDE,
-       TFM_TIME_SCALE,
-       TFM_TIME_EXTEND,
-       TFM_BAKE_TIME,
-       TFM_BEVEL,
-       TFM_BWEIGHT,
-       TFM_ALIGN
-} TfmMode;
-
-/* TRANSFORM CONTEXTS */
-#define CTX_NONE                       0
-#define CTX_TEXTURE                    1
-#define CTX_EDGE                       2
-#define CTX_NO_PET                     4
-#define CTX_TWEAK                      8
-#define CTX_NO_MIRROR          16
-#define CTX_AUTOCONFIRM                32
-#define CTX_BMESH                      64
-#define CTX_NDOF                       128
-
-/* Standalone call to get the transformation center corresponding to the current situation
- * returns 1 if successful, 0 otherwise (usually means there's no selection)
- * (if 0 is returns, *vec is unmodified) 
- * */
-int calculateTransformCenter(struct bContext *C, struct wmEvent *event, int centerMode, float *vec);
-
-struct TransInfo;
-struct ScrArea;
-struct Base;
-struct Scene;
-struct Object;
-
-void BIF_setSingleAxisConstraint(float vec[3], char *text);
-void BIF_setDualAxisConstraint(float vec1[3], float vec2[3], char *text);
-void BIF_setLocalAxisConstraint(char axis, char *text);
-void BIF_setLocalLockConstraint(char axis, char *text);
-
-int BIF_snappingSupported(struct Object *obedit);
-
-struct TransformOrientation;
-struct bContext;
-
-void BIF_clearTransformOrientation(struct bContext *C);
-void BIF_removeTransformOrientation(struct bContext *C, struct TransformOrientation *ts);
-void BIF_manageTransformOrientation(struct bContext *C, int confirm, int set);
-int BIF_menuselectTransformOrientation(void);
-void BIF_selectTransformOrientation(struct bContext *C, struct TransformOrientation *ts);
-void BIF_selectTransformOrientationValue(struct bContext *C, int orientation);
-
-void BIF_menuTransformOrientation(struct bContext *C, struct uiLayout *layout, void *arg);
-char * BIF_menustringTransformOrientation(const struct bContext *C, char *title); /* the returned value was allocated and needs to be freed after use */
-int BIF_countTransformOrientation(const struct bContext *C);
-
-void BIF_getPropCenter(float *center);
-
-void BIF_TransformSetUndo(char *str);
-
-void BIF_selectOrientation(void);
-
-/* view3d manipulators */
-void initManipulator(int mode);
-void ManipulatorTransform();
-
-int BIF_do_manipulator(struct bContext *C, short mval[2]);
-void BIF_draw_manipulator(const struct bContext *C);
-
-/* Snapping */
-
-
-typedef struct DepthPeel
-{
-       struct DepthPeel *next, *prev;
-       
-       float depth;
-       float p[3];
-       float no[3];
-       struct Object *ob;
-       int flag;
-} DepthPeel;
-
-struct ListBase;
-
-typedef enum SnapMode
-{
-       SNAP_ALL = 0,
-       SNAP_NOT_SELECTED = 1,
-       SNAP_NOT_OBEDIT = 2
-} SnapMode;
-
-#define SNAP_MIN_DISTANCE 30
-
-int peelObjectsTransForm(struct TransInfo *t, struct ListBase *depth_peels, short mval[2]);
-int peelObjectsContext(struct bContext *C, struct ListBase *depth_peels, short mval[2]);
-int snapObjectsTransform(struct TransInfo *t, short mval[2], int *dist, float *loc, float *no, SnapMode mode);
-int snapObjectsContext(struct bContext *C, short mval[2], int *dist, float *loc, float *no, SnapMode mode);
-
-#endif
-
similarity index 98%
rename from source/blender/editors/include/BIF_retopo.h
rename to source/blender/editors/include/ED_retopo.h
index cc2fda56b07127b70b6d79a26b1d936c2282c03d..3d0b5f57661d5193aa89268ec8cb2622bd9e02fd 100644 (file)
@@ -27,8 +27,8 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifndef BIF_RETOPO_H
-#define BIF_RETOPO_H
+#ifndef ED_RETOPO_H
+#define ED_RETOPO_H
 
 #include "DNA_vec_types.h"
 
@@ -108,3 +108,4 @@ void retopo_matrix_update(struct View3D *v3d);
 void retopo_free_view_data(struct View3D *v3d);
 
 #endif
+
index 1d47d8ad190067b4b152ed058aa1477267fb3e2c..9327301336f91a594c521aa0efee13a17eb2f69a 100644 (file)
@@ -1,12 +1,12 @@
 /**
- * $Id:
+ * $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. 
+ * 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
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * The Original Code is Copyright (C) 2008 Blender Foundation.
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
  * All rights reserved.
  *
- * 
- * Contributor(s): Blender Foundation
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
  *
  * ***** END GPL LICENSE BLOCK *****
  */
+
 #ifndef ED_TRANSFORM_H
 #define ED_TRANSFORM_H
 
+/* ******************* Registration Function ********************** */
+
+struct wmWindowManager;
+struct ListBase;
+struct wmEvent;
+struct bContext;
+struct Object;
+struct uiLayout;
+
+void transform_keymap_for_space(struct wmWindowManager *wm, struct ListBase *keymap, int spaceid);
+void transform_operatortypes(void);
+
+/* ******************** Macros & Prototypes *********************** */
+
+/* MODE AND NUMINPUT FLAGS */
+enum {
+       TFM_INIT = -1,
+       TFM_DUMMY,
+       TFM_TRANSLATION,
+       TFM_ROTATION,
+       TFM_RESIZE,
+       TFM_TOSPHERE,
+       TFM_SHEAR,
+       TFM_WARP,
+       TFM_SHRINKFATTEN,
+       TFM_TILT,
+       TFM_TRACKBALL,
+       TFM_PUSHPULL,
+       TFM_CREASE,
+       TFM_MIRROR,
+       TFM_BONESIZE,
+       TFM_BONE_ENVELOPE,
+       TFM_CURVE_SHRINKFATTEN,
+       TFM_BONE_ROLL,
+       TFM_TIME_TRANSLATE,
+       TFM_TIME_SLIDE,
+       TFM_TIME_SCALE,
+       TFM_TIME_EXTEND,
+       TFM_BAKE_TIME,
+       TFM_BEVEL,
+       TFM_BWEIGHT,
+       TFM_ALIGN
+} TfmMode;
+
+/* TRANSFORM CONTEXTS */
+#define CTX_NONE                       0
+#define CTX_TEXTURE                    1
+#define CTX_EDGE                       2
+#define CTX_NO_PET                     4
+#define CTX_TWEAK                      8
+#define CTX_NO_MIRROR          16
+#define CTX_AUTOCONFIRM                32
+#define CTX_BMESH                      64
+#define CTX_NDOF                       128
+
+/* Standalone call to get the transformation center corresponding to the current situation
+ * returns 1 if successful, 0 otherwise (usually means there's no selection)
+ * (if 0 is returns, *vec is unmodified) 
+ * */
+int calculateTransformCenter(struct bContext *C, struct wmEvent *event, int centerMode, float *vec);
+
+struct TransInfo;
+struct ScrArea;
+struct Base;
+struct Scene;
+struct Object;
+
+void BIF_setSingleAxisConstraint(float vec[3], char *text);
+void BIF_setDualAxisConstraint(float vec1[3], float vec2[3], char *text);
+void BIF_setLocalAxisConstraint(char axis, char *text);
+void BIF_setLocalLockConstraint(char axis, char *text);
+
+int BIF_snappingSupported(struct Object *obedit);
+
+struct TransformOrientation;
+struct bContext;
+
+void BIF_clearTransformOrientation(struct bContext *C);
+void BIF_removeTransformOrientation(struct bContext *C, struct TransformOrientation *ts);
+void BIF_manageTransformOrientation(struct bContext *C, int confirm, int set);
+int BIF_menuselectTransformOrientation(void);
+void BIF_selectTransformOrientation(struct bContext *C, struct TransformOrientation *ts);
+void BIF_selectTransformOrientationValue(struct bContext *C, int orientation);
+
+void BIF_menuTransformOrientation(struct bContext *C, struct uiLayout *layout, void *arg);
+char * BIF_menustringTransformOrientation(const struct bContext *C, char *title); /* the returned value was allocated and needs to be freed after use */
+int BIF_countTransformOrientation(const struct bContext *C);
+
+void BIF_getPropCenter(float *center);
+
+void BIF_TransformSetUndo(char *str);
+
+void BIF_selectOrientation(void);
+
+/* view3d manipulators */
+void initManipulator(int mode);
+void ManipulatorTransform();
+
+int BIF_do_manipulator(struct bContext *C, short mval[2]);
+void BIF_draw_manipulator(const struct bContext *C);
+
+/* Snapping */
+
+
+typedef struct DepthPeel
+{
+       struct DepthPeel *next, *prev;
+       
+       float depth;
+       float p[3];
+       float no[3];
+       struct Object *ob;
+       int flag;
+} DepthPeel;
+
+struct ListBase;
+
+typedef enum SnapMode
+{
+       SNAP_ALL = 0,
+       SNAP_NOT_SELECTED = 1,
+       SNAP_NOT_OBEDIT = 2
+} SnapMode;
+
+#define SNAP_MIN_DISTANCE 30
+
+int peelObjectsTransForm(struct TransInfo *t, struct ListBase *depth_peels, short mval[2]);
+int peelObjectsContext(struct bContext *C, struct ListBase *depth_peels, short mval[2]);
+int snapObjectsTransform(struct TransInfo *t, short mval[2], int *dist, float *loc, float *no, SnapMode mode);
+int snapObjectsContext(struct bContext *C, short mval[2], int *dist, float *loc, float *no, SnapMode mode);
 
-#endif /* ED_TRANSFORM_H */
+#endif
 
index 3ac6a1778db2efb36fc902d6ae61cfdd78c8d580..e2ccd0976d214c537fd6a87a2ce93ca0c5d7d03d 100644 (file)
 
 #include "LBM_fluidsim.h"
 
-#include "BIF_retopo.h"
 
 #include "ED_mesh.h"
 #include "ED_object.h"
-#include "ED_util.h"
+#include "ED_retopo.h"
 #include "ED_screen.h"
+#include "ED_util.h"
 #include "ED_view3d.h"
 
 #include "RNA_access.h"
index abbbb5aea3dc22ea597ef5dd42f25b13cd395d95..942ad6579924b5f0dfe7ff2854e8e553be4c80d0 100644 (file)
 #include "BKE_utildefines.h"
 #include "BKE_report.h"
 
-#include "BIF_retopo.h"
-
 #include "WM_api.h"
 #include "WM_types.h"
 
 #include "ED_mesh.h"
+#include "ED_retopo.h"
+#include "ED_screen.h"
+#include "ED_transform.h"
 #include "ED_util.h"
 #include "ED_view3d.h"
-#include "ED_screen.h"
 
 #include "mesh_intern.h"
 
@@ -1659,3 +1659,50 @@ void MESH_OT_primitive_ico_sphere_add(wmOperatorType *ot)
        RNA_def_float(ot->srna, "size", 1.0f, 0.0f, FLT_MAX, "Size", "", 0.001f, 100.00);
 }
 
+/****************** add duplicate operator ***************/
+
+static int mesh_add_duplicate_exec(bContext *C, wmOperator *op)
+{
+       Scene *scene= CTX_data_scene(C);
+       Object *ob= CTX_data_edit_object(C);
+       EditMesh *em= BKE_mesh_get_editmesh(ob->data);
+
+       adduplicateflag(em, SELECT);
+
+       BKE_mesh_end_editmesh(ob->data, em);
+
+       DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+       WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
+       
+       return OPERATOR_FINISHED;
+}
+
+static int mesh_add_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+       WM_cursor_wait(1);
+       mesh_add_duplicate_exec(C, op);
+       WM_cursor_wait(0);
+       
+       RNA_int_set(op->ptr, "mode", TFM_TRANSLATION);
+       WM_operator_name_call(C, "TFM_OT_transform", WM_OP_INVOKE_REGION_WIN, op->ptr);
+       
+       return OPERATOR_FINISHED;
+}
+
+void MESH_OT_duplicate_add(wmOperatorType *ot)
+{
+       
+       /* identifiers */
+       ot->name= "Add Duplicate";
+       ot->idname= "MESH_OT_duplicate_add";
+       
+       /* api callbacks */
+       ot->invoke= mesh_add_duplicate_invoke;
+       ot->exec= mesh_add_duplicate_exec;
+       
+       ot->poll= ED_operator_editmesh;
+       
+       /* to give to transform */
+       RNA_def_int(ot->srna, "mode", TFM_TRANSLATION, 0, INT_MAX, "Mode", "", 0, INT_MAX);
+}
+
index 2c3007d00adf29a3d284ab34b92e18b4ce62496d..00cd187a23c5a33c5fc806cb7b2231544eb0de47 100644 (file)
@@ -83,10 +83,10 @@ editmesh_tool.c: UI called tools for editmesh, geometry changes here, otherwise
 #include "WM_types.h"
 
 #include "ED_mesh.h"
-#include "ED_view3d.h"
-#include "ED_util.h"
 #include "ED_screen.h"
-#include "BIF_transform.h"
+#include "ED_transform.h"
+#include "ED_util.h"
+#include "ED_view3d.h"
 
 #include "UI_interface.h"
 
index ff07d03313bb6dd91c80291e6a7a78e4bb1d7d42..4d71ddbd647ebdb3e1f035f3af59918271f6f833 100644 (file)
@@ -82,8 +82,10 @@ void MESH_OT_primitive_grid_add(struct wmOperatorType *ot);
 void MESH_OT_primitive_monkey_add(struct wmOperatorType *ot);
 void MESH_OT_primitive_uv_sphere_add(struct wmOperatorType *ot);
 void MESH_OT_primitive_ico_sphere_add(struct wmOperatorType *ot);
-void MESH_OT_dupli_extrude_cursor(struct wmOperatorType *ot);
+
 void MESH_OT_edge_face_add(struct wmOperatorType *ot);
+void MESH_OT_dupli_extrude_cursor(struct wmOperatorType *ot);
+void MESH_OT_duplicate_add(struct wmOperatorType *ot);
 
 void MESH_OT_fgon_make(struct wmOperatorType *ot);
 void MESH_OT_fgon_clear(struct wmOperatorType *ot);
index 7e59cd684bac0d00ccb48f5ccf246ba320ca30f1..64fcfb681ed669f9049b363766b71ebf11d82443 100644 (file)
 #include "WM_api.h"
 #include "WM_types.h"
 
-#include "ED_screen.h"
 #include "ED_mesh.h"
+#include "ED_screen.h"
+#include "ED_transform.h"
 #include "ED_view3d.h"
 
-#include "BIF_transform.h"
-
 #include "mesh_intern.h"
 
 
-static int mesh_add_duplicate_exec(bContext *C, wmOperator *op)
-{
-       Object *ob= CTX_data_edit_object(C);
-       EditMesh *em= BKE_mesh_get_editmesh(ob->data);
-
-       adduplicateflag(em, SELECT);
-       
-       BKE_mesh_end_editmesh(ob->data, em);
-       return OPERATOR_FINISHED;
-}
-
-static int mesh_add_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *event)
-{
-       WM_cursor_wait(1);
-       mesh_add_duplicate_exec(C, op);
-       WM_cursor_wait(0);
-       
-       RNA_int_set(op->ptr, "mode", TFM_TRANSLATION);
-       WM_operator_name_call(C, "TFM_OT_transform", WM_OP_INVOKE_REGION_WIN, op->ptr);
-       
-       return OPERATOR_FINISHED;
-}
-
-static void MESH_OT_duplicate_add(wmOperatorType *ot)
-{
-       
-       /* identifiers */
-       ot->name= "Add Duplicate";
-       ot->idname= "MESH_OT_duplicate_add";
-       
-       /* api callbacks */
-       ot->invoke= mesh_add_duplicate_invoke;
-       ot->exec= mesh_add_duplicate_exec;
-       
-       ot->poll= ED_operator_editmesh;
-       
-       /* to give to transform */
-       RNA_def_int(ot->srna, "mode", TFM_TRANSLATION, 0, INT_MAX, "Mode", "", 0, INT_MAX);
-}
-
 
 /* ************************** registration **********************************/
 
index 90f6250cf8c8e0dab93d7df92dfd3b54d4c02008..b2040d328f2e7e5758330eacd206268cbab0f68c 100644 (file)
 #include "ED_mesh.h"
 #include "ED_object.h"
 #include "ED_screen.h"
+#include "ED_transform.h"
 #include "ED_types.h"
 #include "ED_util.h"
 #include "ED_view3d.h"
 
-#include "BIF_transform.h"
-
 #include "UI_interface.h"
 
 #include "RNA_access.h"
index 5d262cb03c5f85ba56f3275a2503b12955c7e46e..148021a6fa3230faeb99d6374ae75929ccf84163 100644 (file)
 
 #include "UI_view2d.h"
 
-#include "BIF_transform.h"
-
 #include "ED_anim_api.h"
 #include "ED_keyframing.h"
 #include "ED_keyframes_draw.h"
 #include "ED_keyframes_edit.h"
 #include "ED_screen.h"
 #include "ED_space_api.h"
+#include "ED_transform.h"
 
 #include "WM_api.h"
 #include "WM_types.h"
index 49a0befdbe2ca08222f3a14541e047daa122e652..8ca2bf40979f19881a3aa77f476b7ebff9dcb4ce 100644 (file)
@@ -46,7 +46,7 @@
 #include "UI_interface.h"
 #include "UI_view2d.h"
 
-#include "BIF_transform.h"
+#include "ED_transform.h"
 
 #include "action_intern.h"
 
index 23e8a00927467457062d778a448078ccf9a4bf3b..71f2eb2a8dee20743b9c1078747c1f1691baf540 100644 (file)
 
 #include "UI_view2d.h"
 
-#include "BIF_transform.h"
-
 #include "ED_anim_api.h"
 #include "ED_keyframing.h"
 #include "ED_keyframes_draw.h"
 #include "ED_keyframes_edit.h"
 #include "ED_screen.h"
 #include "ED_space_api.h"
+#include "ED_transform.h"
 
 #include "WM_api.h"
 #include "WM_types.h"
index a23f0081c0458d8f29ae1b35c21dca479804c328..d1a678f91d41bf6c04369f65c01da8fe179100f8 100644 (file)
@@ -47,8 +47,7 @@
 #include "UI_view2d.h"
 
 #include "ED_screen.h"
-
-#include "BIF_transform.h"
+#include "ED_transform.h"
 
 #include "graph_intern.h"
 
index 9550c4c3a2969f9a5f3a58fb3885ec4f5139eac0..a902ec27a8727f7b37bfd654bff71ef6a7684798 100644 (file)
@@ -55,6 +55,7 @@
 #include "ED_image.h"
 #include "ED_mesh.h"
 #include "ED_screen.h"
+#include "ED_transform.h"
 #include "ED_types.h"
 #include "ED_util.h"
 
@@ -63,7 +64,6 @@
 
 #include "BIF_gl.h"
 #include "BIF_glutil.h"
-#include "BIF_transform.h"
 
 #include "UI_interface.h"
 #include "UI_resources.h"
index a1217f84380dc27cef35556b644cb20b1f68f46c..ef472d462c24ccecd90503f74d80aa8e99394035 100644 (file)
@@ -369,7 +369,6 @@ static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar, Scene *sce
        ar->v2d.mask.ymax= winy;
 
        /* which part of the image space do we see? */
-       /* same calculation as in lrectwrite: area left and down*/
        x1= ar->winrct.xmin+(winx-sima->zoom*w)/2;
        y1= ar->winrct.ymin+(winy-sima->zoom*h)/2;
 
index 0d6fc20c24861aec0262f6a418e4b64eb41e1525..1ba14bbd10e4d1318b833c0769608cd4f5b59d8e 100644 (file)
@@ -63,7 +63,6 @@
 #include "ED_previewrender.h"
 
 #include "BIF_gl.h"
-#include "BIF_transform.h"
 
 #include "BLI_arithb.h"
 #include "BLI_blenlib.h"
@@ -75,6 +74,7 @@
 
 #include "ED_space_api.h"
 #include "ED_screen.h"
+#include "ED_transform.h"
 #include "ED_types.h"
 
 #include "RNA_access.h"
index 732b45f1f304a36031472aef39ef22fd55863cac..6df5dbd71d01a45cc371fef71e53e84c5caf742f 100644 (file)
@@ -37,8 +37,7 @@
 
 #include "ED_space_api.h"
 #include "ED_screen.h"
-
-#include "BIF_transform.h"
+#include "ED_transform.h"
 
 #include "RNA_access.h"
 #include "RNA_define.h"
index 7cd81faede12f07ad2ec606c362e654bfbcf3971..933c50ad20c7b510d067e7c9008147ddfa6be63c 100644 (file)
@@ -66,8 +66,6 @@
 #include "BKE_utildefines.h"
 #include "BKE_report.h"
 
-#include "BIF_transform.h"
-
 #include "WM_api.h"
 #include "WM_types.h"
 
@@ -82,6 +80,7 @@
 #include "ED_space_api.h"
 #include "ED_types.h"
 #include "ED_screen.h"
+#include "ED_transform.h"
 #include "ED_util.h"
 
 #include "UI_interface.h"
index c6e5fbe39a4cf0cb7bd82f6823eb83a40138dcaa..d1a2307ca3a26f3b929e011898001131577d56e3 100644 (file)
@@ -41,8 +41,6 @@
 #include "BLI_arithb.h"
 #include "BLI_blenlib.h"
 
-#include "BIF_transform.h" /* transform keymap */
-
 #include "BKE_context.h"
 #include "BKE_global.h"
 #include "BKE_utildefines.h"
@@ -54,6 +52,7 @@
 #include "WM_types.h"
 
 #include "ED_screen.h"
+#include "ED_transform.h" /* transform keymap */
 
 #include "sequencer_intern.h"
 
index 915652355918201d7ec12d179d3e2889e16cb4dd..cf197f1d40525c55cc2e54752a3bb2a90253b735 100644 (file)
@@ -71,7 +71,6 @@
 #include "BKE_utildefines.h"
 
 #include "BIF_gl.h"
-#include "BIF_transform.h"
 
 #include "WM_api.h"
 #include "WM_types.h"
@@ -87,6 +86,7 @@
 #include "ED_object.h"
 #include "ED_particle.h"
 #include "ED_screen.h"
+#include "ED_transform.h"
 #include "ED_types.h"
 #include "ED_util.h"
 
index ec292b6871bb4a9b6ddc204398522f672f40eda5..dd4e67e612c6e08abf97f478afd289a1cae6337a 100644 (file)
@@ -70,7 +70,6 @@
 
 #include "BIF_gl.h"
 #include "BIF_glutil.h"
-#include "BIF_transform.h"
 
 #include "WM_api.h"
 #include "BLF_api.h"
@@ -81,6 +80,7 @@
 #include "ED_screen.h"
 #include "ED_space_api.h"
 #include "ED_util.h"
+#include "ED_transform.h"
 #include "ED_types.h"
 
 #include "UI_interface.h"
index 1b9f3285f3da0287b12ad8febaca7e4e1b55a857..1206bf72b72d77fec0183c76cb2c793e7fcffa2a 100644 (file)
@@ -62,8 +62,6 @@
 #include "RE_pipeline.h"       // make_stars
 
 #include "BIF_gl.h"
-#include "BIF_retopo.h"
-#include "BIF_transform.h"
 
 #include "WM_api.h"
 #include "WM_types.h"
 #include "RNA_define.h"
 
 #include "ED_particle.h"
+#include "ED_retopo.h"
 #include "ED_space_api.h"
 #include "ED_screen.h"
+#include "ED_transform.h"
 #include "ED_types.h"
 
 #include "UI_interface.h"
index 5b378f39cd02bba6c21db370f03f0bcd8986ca9c..daa872defff82fa3a53bebcb183e306a5816f81a 100644 (file)
@@ -71,6 +71,7 @@
 #include "ED_mesh.h"
 #include "ED_util.h"
 #include "ED_screen.h"
+#include "ED_transform.h"
 #include "ED_types.h"
 
 #include "WM_api.h"
@@ -81,7 +82,6 @@
 
 #include "BIF_gl.h"
 #include "BIF_glutil.h"
-#include "BIF_transform.h"
 
 #include "BLI_arithb.h"
 #include "BLI_blenlib.h"
index 32a66254ff402705277cb4aaa572053f13e2234b..25405909d0b564012a5d53ae8036a0398c546c5f 100644 (file)
@@ -46,8 +46,6 @@
 #include "BKE_global.h"
 #include "BKE_utildefines.h"
 
-#include "BIF_transform.h"
-
 #include "RNA_access.h"
 #include "RNA_define.h"
 
@@ -55,6 +53,7 @@
 #include "WM_types.h"
 
 #include "ED_screen.h"
+#include "ED_transform.h"
 
 #include "view3d_intern.h"
 
index 74063e0ad566f2ad3b236c2f2f3a6e8675b6c4df..fedf3a3018197b53fab6c9ba0eaf98261d764f4e 100644 (file)
@@ -66,7 +66,6 @@
 #include "RE_pipeline.h"       // make_stars
 
 #include "BIF_gl.h"
-#include "BIF_retopo.h"
 
 #include "WM_api.h"
 #include "WM_types.h"
@@ -79,6 +78,7 @@
 #include "ED_particle.h"
 #include "ED_mesh.h"
 #include "ED_object.h"
+#include "ED_retopo.h"
 #include "ED_screen.h"
 #include "ED_types.h"
 #include "ED_util.h"
index 8aba8e11d43f314db043b0a235a7a50ea469c97c..89a6d659d6712d46000b6b2abcbcc5a74a5b4ffc 100644 (file)
@@ -71,7 +71,6 @@
 #include "BKE_utildefines.h"
 
 #include "BIF_gl.h"
-#include "BIF_transform.h"
 
 #include "WM_api.h"
 #include "WM_types.h"
@@ -87,6 +86,7 @@
 #include "ED_object.h"
 #include "ED_particle.h"
 #include "ED_screen.h"
+#include "ED_transform.h"
 #include "ED_types.h"
 #include "ED_util.h"
 
index c270a5d20ea85918498b1d894267d474d81a622c..98719e714ba2d76b30a69dd7a0aa05f4559ec915 100644 (file)
@@ -30,7 +30,7 @@
 #ifndef TRANSFORM_H
 #define TRANSFORM_H
 
-#include "BIF_transform.h"
+#include "ED_transform.h"
 
 /* ************************** Types ***************************** */
 
index 5926b95854c096c0ebe97d5b4e84b39f54281beb..6d2337bbc8c4ecc6403d745298f7935f69f802d1 100644 (file)
 //#include "BIF_meshtools.h"
 //#include "BIF_mywindow.h"
 //#include "BIF_resources.h"
-#include "BIF_retopo.h"
 //#include "BIF_screen.h"
 //#include "BIF_space.h"
 //#include "BIF_toolbox.h"
 #include "ED_keyframes_edit.h"
 #include "ED_object.h"
 #include "ED_mesh.h"
+#include "ED_retopo.h"
 #include "ED_types.h"
 #include "ED_uvedit.h"
 #include "ED_view3d.h"
index c9d5456f59b1c7dc5755b5ab7ef343b61a18e057..5bb1a2e13291912cd8320a85bb7d4c511710f725 100644 (file)
@@ -65,7 +65,6 @@
 //#include "BIF_editsima.h"
 //#include "BIF_editparticle.h"
 //#include "BIF_meshtools.h"
-#include "BIF_retopo.h"
 
 #include "BKE_action.h"
 #include "BKE_anim.h"
@@ -91,6 +90,7 @@
 #include "ED_image.h"
 #include "ED_keyframing.h"
 #include "ED_mesh.h"
+#include "ED_retopo.h"
 #include "ED_space_api.h"
 #include "ED_uvedit.h"
 #include "ED_view3d.h"
index aecd01dd4f0434d5279b92478c870ca53117f96d..3868ac9204b8033fc66ec9ef04d2eb81cc37a211 100644 (file)
@@ -66,7 +66,6 @@
 #include "BLI_editVert.h"
 
 #include "BIF_gl.h"
-#include "BIF_transform.h"
 
 #include "WM_api.h"
 #include "WM_types.h"
@@ -75,6 +74,7 @@
 #include "ED_mesh.h"
 #include "ED_particle.h"
 #include "ED_space_api.h"
+#include "ED_transform.h"
 #include "ED_view3d.h"
 
 #include "UI_resources.h"
index 0b9a176dbdf42e18efd09403538ff6a74b37ff0c..9438581409b51da763de4c3dc190399c74de0a56 100644 (file)
@@ -63,8 +63,6 @@
 //#include "BIF_drawimage.h"
 //#include "BIF_editmesh.h"
 
-#include "BIF_transform.h"
-
 #include "BKE_global.h"
 #include "BKE_utildefines.h"
 #include "BKE_DerivedMesh.h"
@@ -75,6 +73,7 @@
 #include "ED_armature.h"
 #include "ED_image.h"
 #include "ED_mesh.h"
+#include "ED_transform.h"
 #include "ED_uvedit.h"
 #include "ED_view3d.h"
 
index 7582145c63bafb74ef0b896ff801f299c0598dba..4c855315bb317ff919712a10909572d16d291546 100644 (file)
 #include "BKE_report.h"
 #include "BKE_utildefines.h"
 
-#include "BIF_transform.h"
-
 #include "ED_image.h"
 #include "ED_mesh.h"
 #include "ED_screen.h"
+#include "ED_transform.h"
 
 #include "RNA_access.h"
 #include "RNA_define.h"