[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12967] trunk/blender/source/blender/src: == Transform feature test ==
Martin Poirier
theeth at yahoo.com
Fri Dec 21 02:53:56 CET 2007
Revision: 12967
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12967
Author: theeth
Date: 2007-12-21 02:53:55 +0100 (Fri, 21 Dec 2007)
Log Message:
-----------
== 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).
Modified Paths:
--------------
trunk/blender/source/blender/src/transform_conversions.c
trunk/blender/source/blender/src/transform_generics.c
Modified: trunk/blender/source/blender/src/transform_conversions.c
===================================================================
--- trunk/blender/source/blender/src/transform_conversions.c 2007-12-21 01:24:09 UTC (rev 12966)
+++ trunk/blender/source/blender/src/transform_conversions.c 2007-12-21 01:53:55 UTC (rev 12967)
@@ -3368,19 +3368,21 @@
/* 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 @@
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
Modified: trunk/blender/source/blender/src/transform_generics.c
===================================================================
--- trunk/blender/source/blender/src/transform_generics.c 2007-12-21 01:24:09 UTC (rev 12966)
+++ trunk/blender/source/blender/src/transform_generics.c 2007-12-21 01:53:55 UTC (rev 12967)
@@ -190,8 +190,9 @@
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);
More information about the Bf-blender-cvs
mailing list