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>2007-11-25 16:43:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-11-25 16:43:14 +0300
commita32287ebfbb36b1a3e1bb02563cb096179041f28 (patch)
tree26f9ecb6374e60a77a57affa60fe7cdf57205931 /source/blender/include
parent13e73af13e4d61206459ee61585c09e967b557f8 (diff)
replace macro's with functions for UV editmode checks, this wasn't nice code and broke building on solaris
Diffstat (limited to 'source/blender/include')
-rw-r--r--source/blender/include/BIF_editsima.h38
1 files changed, 13 insertions, 25 deletions
diff --git a/source/blender/include/BIF_editsima.h b/source/blender/include/BIF_editsima.h
index a8a5c16df1a..c0e28d7b1f1 100644
--- a/source/blender/include/BIF_editsima.h
+++ b/source/blender/include/BIF_editsima.h
@@ -40,31 +40,6 @@ struct MTFace;
#define TF_PIN_MASK(id) (TF_PIN1 << id)
#define TF_SEL_MASK(id) (TF_SEL1 << id)
-
-/* this checks weather a face is drarn without the local image check
- * - warning - no check for G.sima->flag, use SIMA_FACEDRAW_CHECK
- */
-#define SIMA_FACEDRAW_CHECK_NOLOCAL(efa) \
- ((G.sima->flag & SI_SYNC_UVSEL) ? (efa->h==0) : (efa->h==0 && efa->f & SELECT))
-
-/* this check includes the local image check - (does the faces image match the space image?) */
-#define SIMA_FACEDRAW_CHECK(efa, tf) \
- ((G.sima && G.sima->flag & SI_LOCAL_UV) ? ((tf->tpage==G.sima->image) ? SIMA_FACEDRAW_CHECK_NOLOCAL(efa):0) : (SIMA_FACEDRAW_CHECK_NOLOCAL(efa)))
-
-#define SIMA_FACESEL_CHECK(efa, tf) \
- ((G.sima && G.sima->flag & SI_SYNC_UVSEL) ? (efa->f & SELECT) : (!(~tf->flag & (TF_SEL1|TF_SEL2|TF_SEL3)) &&(!efa->v4 || tf->flag & TF_SEL4)))
-#define SIMA_FACESEL_SET(efa, tf) \
- ((G.sima && G.sima->flag & SI_SYNC_UVSEL) ? (EM_select_face(efa, 1)) : (tf->flag |= (TF_SEL1|TF_SEL2|TF_SEL3|TF_SEL4)))
-#define SIMA_FACESEL_UNSET(efa, tf) \
- ((G.sima && G.sima->flag & SI_SYNC_UVSEL) ? (EM_select_face(efa, 0)) : (tf->flag &= ~(TF_SEL1|TF_SEL2|TF_SEL3|TF_SEL4)))
-
-#define SIMA_UVSEL_CHECK(efa, tf, i) ((G.sima && G.sima->flag & SI_SYNC_UVSEL) ? \
- (G.scene->selectmode == SCE_SELECT_FACE ? efa->f & SELECT : ((*(&efa->v1 + i))->f & SELECT) ) : (tf->flag & TF_SEL_MASK(i) ))
-#define SIMA_UVSEL_SET(efa, tf, i) ((G.sima && G.sima->flag & SI_SYNC_UVSEL) ? \
- (G.scene->selectmode == SCE_SELECT_FACE ? EM_select_face(efa, 1) : ((*(&efa->v1 + i))->f |= SELECT) ) : (tf->flag |= TF_SEL_MASK(i) ))
-#define SIMA_UVSEL_UNSET(efa, tf, i) ((G.sima && G.sima->flag & SI_SYNC_UVSEL) ? \
- (G.scene->selectmode == SCE_SELECT_FACE ? EM_select_face(efa, 0) : ((*(&efa->v1 + i))->f &= ~SELECT) ) : (tf->flag &= ~TF_SEL_MASK(i) ))
-
struct Object;
void object_uvs_changed(struct Object *ob);
@@ -122,3 +97,16 @@ void pack_image_sima(void);
void BIF_image_update_frame(void);
void find_nearest_uv(struct MTFace **nearesttf, struct EditFace **nearestefa, unsigned int *nearestv, int *nearestuv);
+
+/* face selection check functions */
+
+int simaFaceDraw_Check_nolocal( struct EditFace *efa );
+int simaFaceDraw_Check( struct EditFace *efa, struct MTFace *tf );
+
+int simaFaceSel_Check( struct EditFace *efa, struct MTFace *tf );
+void simaFaceSel_Set( struct EditFace *efa, struct MTFace *tf );
+void simaFaceSel_UnSet( struct EditFace *efa, struct MTFace *tf );
+
+int simaUVSel_Check( struct EditFace *efa, struct MTFace *tf, int i);
+void simaUVSel_Set( struct EditFace *efa, struct MTFace *tf, int i);
+void simaUVSel_UnSet( struct EditFace *efa, struct MTFace *tf, int i);