diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-04-25 04:19:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-04-25 04:19:10 +0400 |
commit | 2cec60e2ebd243e3bf3216c70f465a717b9de29a (patch) | |
tree | 8e52b671b39cdd2dd961330879f5b6bdcaddd4c4 /source/blender | |
parent | d0328d670241851cadc38a4d075fcda135a50ddf (diff) |
fix for a library linking problem where a proxy object linked into a blend would cause the proxy, driver's ID to be directly linked as well.
eg. character.blend -> anim.blend -> comp.blend
... Would link the character.blend directly into comp.blend because on driver ID's.
In this case id_lib_extern doenst need to be called because the object its linked from is a library.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 14 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_ID.h | 4 |
2 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 6206696e109..ce064a78cff 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1469,10 +1469,16 @@ void object_copy_proxy_drivers(Object *ob, Object *target) /* all drivers */ DRIVER_TARGETS_LOOPER(dvar) { - if ((Object *)dtar->id == target) - dtar->id= (ID *)ob; - else - id_lib_extern((ID *)dtar->id); + if(dtar->id) { + if ((Object *)dtar->id == target) + dtar->id= (ID *)ob; + else { + /* only on local objects because this causes indirect links a -> b -> c,blend to point directly to a.blend + * when a.blend has a proxy thats linked into c.blend */ + if(ob->id.lib==NULL) + id_lib_extern((ID *)dtar->id); + } + } } DRIVER_TARGETS_LOOPER_END } diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 1eddbb26168..55b8374656a 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -205,8 +205,8 @@ typedef struct PreviewImage { #define LIB_EXTERN 1 #define LIB_INDIRECT 2 #define LIB_TEST 8 -#define LIB_TESTEXT 9 -#define LIB_TESTIND 10 +#define LIB_TESTEXT (LIB_TEST | LIB_EXTERN) +#define LIB_TESTIND (LIB_TEST | LIB_INDIRECT) #define LIB_READ 16 #define LIB_NEEDLINK 32 |