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:
authorTon Roosendaal <ton@blender.org>2006-03-08 14:07:49 +0300
committerTon Roosendaal <ton@blender.org>2006-03-08 14:07:49 +0300
commit2db9b8fe7f423d4662af557f6144452610a8073d (patch)
treef20331f6521c48a993336dea0f69e0ded2497859 /source/blender/src/transform.c
parentd51a6020c898a1ceeaf1ad7e4b71026fba045602 (diff)
Quick feature: "Around Individual Centers" now works in editmode mesh, but
only in Face-Select mode. It then uses for rotate and scaling the face center itself as reference. Code uses a loop-in-loop to find the face that belongs to the vertex... means it will be slow with operations on 10k or more faces. Acceptable for now, will make it nicer later. :)
Diffstat (limited to 'source/blender/src/transform.c')
-rwxr-xr-xsource/blender/src/transform.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c
index cd9a837d63c..202f5e8f6b2 100755
--- a/source/blender/src/transform.c
+++ b/source/blender/src/transform.c
@@ -1407,10 +1407,19 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) {
/* local constraint shouldn't alter center */
if (t->around == V3D_LOCAL) {
if (t->flag & T_OBJECT) {
- VECCOPY(center, td->center); // not supported in editmode yet
+ VECCOPY(center, td->center);
+ }
+ else if (t->flag & T_EDIT) {
+
+ if(G.vd->around==V3D_LOCAL && (G.scene->selectmode & SCE_SELECT_FACE)) {
+ VECCOPY(center, td->center);
+ }
+ else {
+ VECCOPY(center, t->center);
+ }
}
else {
- VECCOPY(center, t->center); // Editmode needs to define center too...
+ VECCOPY(center, t->center);
}
}
else {
@@ -1789,8 +1798,14 @@ static void applyRotation(TransInfo *t, float angle, float axis[3])
/* local constraint shouldn't alter center */
if (t->around == V3D_LOCAL) {
- if (t->flag & (T_OBJECT|T_POSE))
- VECCOPY(t->center, td->center); // not supported in editmode yet
+ if (t->flag & (T_OBJECT|T_POSE)) {
+ VECCOPY(t->center, td->center);
+ }
+ else {
+ if(G.vd->around==V3D_LOCAL && (G.scene->selectmode & SCE_SELECT_FACE)) {
+ VECCOPY(t->center, td->center);
+ }
+ }
}
if (t->con.applyRot) {