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:
authorMartin Poirier <theeth@yahoo.com>2007-12-21 04:53:55 +0300
committerMartin Poirier <theeth@yahoo.com>2007-12-21 04:53:55 +0300
commit1a475f0dfc3c76021579c140c9840a61cc0bac11 (patch)
tree4d5ccb8210c8e8860400c4a715b5edab80c950ad /source/blender/src
parent6135f9710561d12640c8b5cb3b654237c80cf88f (diff)
== Transform feature test ==
Related to bug [#7792] ("Around Selection" user preference doesn't work for linked objects), this commit makes Linked objects be considered in Transform. This has a couple of effects: Linked objects are used to calculate the center of transformation and such but are skipped during the actual transformation. Linked objects can be used as orbiting targets (see previously mentionned bug). The offshot is that selecting a linked object and hitting G doesn't cancel immediately as it did before (this could eventually be worked around, but I don't think it's that much of a problem. Disagreeing people should express themselves).
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/transform_conversions.c21
-rw-r--r--source/blender/src/transform_generics.c5
2 files changed, 17 insertions, 9 deletions
diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c
index 405168f6654..ac13634532b 100644
--- a/source/blender/src/transform_conversions.c
+++ b/source/blender/src/transform_conversions.c
@@ -3368,19 +3368,21 @@ static void createTransObject(TransInfo *t)
/* count */
for(base= FIRSTBASE; base; base= base->next) {
- if TESTBASELIB(base) {
+ if TESTBASE(base) {
ob= base->object;
/* store ipo keys? */
- if(ob->ipo && ob->ipo->showkey && (ob->ipoflag & OB_DRAWKEY)) {
+ if (ob->id.lib == 0 && ob->ipo && ob->ipo->showkey && (ob->ipoflag & OB_DRAWKEY)) {
elems.first= elems.last= NULL;
make_ipokey_transform(ob, &elems, 1); /* '1' only selected keys */
pushdata(&elems, sizeof(ListBase));
- for(ik= elems.first; ik; ik= ik->next) t->total++;
+ for(ik= elems.first; ik; ik= ik->next)
+ t->total++;
- if(elems.first==NULL) t->total++;
+ if(elems.first==NULL)
+ t->total++;
}
else {
t->total++;
@@ -3398,15 +3400,20 @@ static void createTransObject(TransInfo *t)
tx = t->ext = MEM_callocN(t->total*sizeof(TransDataExtension), "TransObExtension");
for(base= FIRSTBASE; base; base= base->next) {
- if TESTBASELIB(base) {
+ if TESTBASE(base) {
ob= base->object;
- td->flag= TD_SELECTED;
+ td->flag = TD_SELECTED;
td->protectflag= ob->protectflag;
td->ext = tx;
+ /* select linked objects, but skip them later */
+ if (ob->id.lib != 0) {
+ td->flag |= TD_SKIP;
+ }
+
/* store ipo keys? */
- if(ob->ipo && ob->ipo->showkey && (ob->ipoflag & OB_DRAWKEY)) {
+ if(ob->id.lib == 0 && ob->ipo && ob->ipo->showkey && (ob->ipoflag & OB_DRAWKEY)) {
popfirst(&elems); // bring back pushed listbase
diff --git a/source/blender/src/transform_generics.c b/source/blender/src/transform_generics.c
index d0ca1f4cd74..b24f9bea48d 100644
--- a/source/blender/src/transform_generics.c
+++ b/source/blender/src/transform_generics.c
@@ -190,8 +190,9 @@ static void clipMirrorModifier(TransInfo *t, Object *ob)
break;
if (td->loc==NULL)
break;
- if (td->flag & TD_SKIP)
- continue;
+
+ if (td->flag & TD_SKIP)
+ continue;
VecCopyf(loc, td->loc);
VecCopyf(iloc, td->iloc);