diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-09-17 22:22:06 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-09-17 22:22:06 +0400 |
commit | 0c7c57685ec20717f4d5860bc774b52913742e8d (patch) | |
tree | b3f351da8aecc111d019137605d7aee972f46b15 /source/blender/include/BIF_editsima.h | |
parent | d1e5c86b76501cef3ad5d5ae70825fc6398d642f (diff) |
New feature for UV/Editmode - 'Sync Mesh Selection' a button in the UV header this mode is disabled by default.
This is implimented by defining macro's that take the mode into account when get/set/checking the selection and that a face can be drawn.
When this is enabled, things work a bit differently
* all faces are drawn in the UV view (except hidden faces).
* selecting faces/verts in the UV window selects them on the mesh also and vice vercer.
* when EditMode (Face only) is enabled, selecting faces in the UV view is not sticky.
* hiding/(de)select all and invert selection simle call the editmesh functions.
* there is no way to select 1 uv corner of 1 face (because a mesh cannot have this as a valid selection) either all UV's that use a vert (sticky), or the whole face.
Diffstat (limited to 'source/blender/include/BIF_editsima.h')
-rw-r--r-- | source/blender/include/BIF_editsima.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/include/BIF_editsima.h b/source/blender/include/BIF_editsima.h index ca8345559aa..0bbe91500da 100644 --- a/source/blender/include/BIF_editsima.h +++ b/source/blender/include/BIF_editsima.h @@ -32,9 +32,28 @@ struct Mesh; struct EditMesh; + +/* id can be from 0 to 3 */ #define TF_PIN_MASK(id) (TF_PIN1 << id) #define TF_SEL_MASK(id) (TF_SEL1 << id) + +#define SIMA_FACEDRAW_CHECK(efa) \ + ((G.sima->flag & SI_SYNC_UVSEL) ? (efa->h==0) : (efa->h==0 && efa->f & SELECT)) +#define SIMA_FACESEL_CHECK(efa, tf) \ + ((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->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->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->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->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->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); @@ -88,3 +107,5 @@ void pack_image_sima(void); /* checks images for forced updates on frame change */ void BIF_image_update_frame(void); + + |