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:
authorCampbell Barton <ideasman42@gmail.com>2012-10-10 07:13:02 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-10 07:13:02 +0400
commit22bf1e13db56589debe2f9e41001e8474956e58e (patch)
tree2bbb41e98f4d943c1e508bfb0e3cef3d76dbec02 /source/blender/editors/include/ED_object.h
parentb3bf6b527bcdeb682b595e1baf3abdeafa68ac36 (diff)
code cleanup: split `foreach` object data iterator functions out of drawobject.c (since they are used for selection too), into their own file: object_iterators.c
Diffstat (limited to 'source/blender/editors/include/ED_object.h')
-rw-r--r--source/blender/editors/include/ED_object.h68
1 files changed, 64 insertions, 4 deletions
diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h
index 9836d690e53..aa145dfd906 100644
--- a/source/blender/editors/include/ED_object.h
+++ b/source/blender/editors/include/ED_object.h
@@ -35,22 +35,31 @@
extern "C" {
#endif
+struct BMEdge;
+struct BMFace;
+struct BMVert;
+struct BPoint;
struct Base;
-struct bConstraint;
-struct bContext;
-struct bPoseChannel;
+struct BezTriple;
struct Curve;
+struct EditBone;
struct EnumPropertyItem;
struct ID;
struct KeyBlock;
struct Lattice;
struct Main;
struct Mesh;
+struct MetaElem;
struct ModifierData;
+struct Nurb;
struct Object;
struct ReportList;
struct Scene;
struct View3D;
+struct ViewContext;
+struct bConstraint;
+struct bContext;
+struct bPoseChannel;
struct wmEvent;
struct wmKeyConfig;
struct wmKeyMap;
@@ -82,8 +91,10 @@ typedef enum eParentType {
PAR_TRIA
} eParentType;
+#ifdef __RNA_TYPES_H__
extern struct EnumPropertyItem prop_clear_parent_types[];
extern struct EnumPropertyItem prop_make_parent_types[];
+#endif
int ED_object_parent_set(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob,
struct Object *par, int partype, int xmirror, int keep_transform);
@@ -183,9 +194,58 @@ int ED_object_iter_other(struct Main *bmain, struct Object *orig_ob, int include
int ED_object_multires_update_totlevels_cb(struct Object *ob, void *totlevel_v);
-/* ibject_select.c */
+/* object_select.c */
void ED_object_select_linked_by_id(struct bContext *C, struct ID *id);
+
+/* object_iterators.c */
+
+/* enum for passing to foreach functions to test RV3D_CLIPPING */
+typedef enum eV3DClipTest {
+ V3D_CLIP_TEST_OFF = 0, /* clipping is off */
+ V3D_CLIP_TEST_RV3D_CLIPPING = 1, /* clip single points */
+ V3D_CLIP_TEST_REGION = 2 /* use for edges to check if both verts are in the view, but not RV3D_CLIPPING */
+} eV3DClipTest;
+
+/* foreach iterators */
+void mesh_foreachScreenVert(
+ struct ViewContext *vc,
+ void (*func)(void *userData, struct BMVert *eve, const float screen_co[2], int index),
+ void *userData, eV3DClipTest clipVerts);
+void mesh_foreachScreenEdge(
+ struct ViewContext *vc,
+ void (*func)(void *userData, struct BMEdge *eed, const float screen_co_a[2], const float screen_co_b[2],
+ int index),
+ void *userData, eV3DClipTest clipVerts);
+void mesh_foreachScreenFace(
+ struct ViewContext *vc,
+ void (*func)(void *userData, struct BMFace *efa, const float screen_co[2], int index),
+ void *userData);
+void nurbs_foreachScreenVert(
+ struct ViewContext *vc,
+ void (*func)(void *userData, struct Nurb *nu, struct BPoint *bp, struct BezTriple *bezt,
+ int beztindex, const float screen_co[2]),
+ void *userData);
+void mball_foreachScreenElem(
+ struct ViewContext *vc,
+ void (*func)(void *userData, struct MetaElem *ml, const float screen_co[2]),
+ void *userData);
+void lattice_foreachScreenVert(
+ struct ViewContext *vc,
+ void (*func)(void *userData, struct BPoint *bp,
+ const float screen_co[2]),
+ void *userData);
+void armature_foreachScreenBone(
+ struct ViewContext *vc,
+ void (*func)(void *userData, struct EditBone *ebone,
+ const float screen_co_a[2], const float screen_co_b[2]),
+ void *userData);
+void pose_foreachScreenBone(
+ struct ViewContext *vc,
+ void (*func)(void *userData, struct bPoseChannel *pchan,
+ const float screen_co_a[2], const float screen_co_b[2]),
+ void *userData);
+
#ifdef __cplusplus
}
#endif