External links, groups, transparency, and their limits on making a library

Hi, blenderartists. I’m a long-time Blender user and reader of the forums, but this is the first time I’ve resorted to a post. I did a bunch of searches before I posted, so please go easy on me if you point at some info that I should have found.

I’ve got a fairly precise model of a bunch of avionics hardware. The model includes a lot of copies of components (tiny LCD displays, switches, etc). I’ve been wanting to put some of these in a library file and link to them, instead of making lots of duplicates within my current file.

Transparency doesn’t work when a group with transparency is linked from another file. (This is a documented limitation in a note on one page of the Blender wiki.) But some of my component models have transparency.

It is possible to link objects with transparency, instead of linking groups. But that method prevents the objects from being modified (no changes to location/rotation/scale/etc).

So I’m stumped. I need 23 copies of something that is either stuck in one place in my scene or is opaque instead of transparent.

My current approach is to make one of the 23 ‘real’, and make the rest with Duplicate Linked. That means if I tweak the one real one, all the rest follow suit. But if I ever make changes to the original in another file and want that reflected in this file, I have a pretty painful copying process:

  1. copy objects (not group) into file
  2. duplicate linked
  3. snap to location of first old copy
  4. use ‘align to transform orientation’ to align with first old copy
  5. move into same layer as first old copy
  6. delete first old copy
  7. repeat 22 times

Am I missing something? Is there any way to use transparency when it comes from a linked external model? If not, is there some more streamlined way to make these updates? I can envision a script that performs batch updates to duplicates within a file, but it’s been more than a decade since I wrote any python, and the aggravation alone would kill me :slight_smile: I can even envision some way to point all the linked duplicates to a new original, but I’m not sure that is possible.

Thanks in advance for any advice.

Hi samiamiamsam!

I don’t know if this is exactly what you’re looking for but if you link an object to a scene you can make the Object local without making the data local. (press L and pick “Selected Objects”)
That way you’ll be able to move the object and if you change material, geometry in the original file it will update in the scene. Hope that helps.

It helps quite a bit! I had tried to use ‘L’, but wasn’t getting the results I expected. Your note caused me to go back and try again.

I was linking in object ‘a’ and its child ‘b’, then doing various changes to the source file’s objects (materials, geometry), to see if the changes were reflected in the destination file. What I didn’t realize in my early testing was that for my scale testing, I was changing the scale of the child object in object mode. This is only reflected in the destination file before the link is made. I forgot that after the link is made, geometry changes have to be done (to parent and child) in edit mode. The child relationship is what through me off. If it was a snake…

There was an additional behavior that confused me. If an object is linked in, then deleted, than linked in again, the resulting object can not be edited, and it has no visible materials. I suspect someone has reported that already, but I didn’t find it (perhaps because I looked under “linking” and didn’t find a bug report there).

In my reply, I meant to ask if you know of a way to edit the link for an internal duplicate-linked object. I don’t see any item in the datablocks that might be an editable pointer from the duplicate-linked object back to the object to which it is linked. But maybe datablocks are the wrong place to look, or maybe it isn’t possible to change it, or maybe it isn’t possible to change the object from a duplicate-linked internally to a duplicate linked to an object in an external .blend.

Now that I see how to successfully link to an external library of objects, I’d like to change my one internal object (linked 22 times to other internal objects), rather than change all 23 objects.

Sorry but that last post went over my head. What are you trying to do exactly?

Sorry - I was a bit verbose and obtuse.

My current work file has one set of objects (parent and children) that I use as a “master” for another 22 copies of them. The other 22 were made using Duplicate-Linked.

Rather than having the master inside the file, I would prefer to save the master objects to a separate file and bring them in to my current work file as an external link (combined with making them local with “L”, as you suggest).

And ideally, I would somehow replace the pointers of all the current objects, either by changing the single “master” (with the 22 copies pointing to this new master), or at least by changing all 23 (master and copies) without going through the tedious process of making each link and translating and rotating each one to their final resting place.

No need to apologize it’s cool. Hard to talk about these things in text form anyway.

I think I see what you’re getting at.
You want something that is local to be replaced by linked objects from an exterior file instead without having to do it all again from scratch?

If you have linked the files you want in to the scene you can for example under mesh data select to use a different one.
So let’s say you have a cube that is local is rotated, moved, scaled etc. and you’d like to keep those modifications. Then you link in a cube that you would like to use instead of it and you’d just change the meshdata to use the linked version instead and it would still have all the modifications you’ve made on an object level.

There might be easier ways to do that but you might need some scripting for it though.

Your assessment of my challenge is correct. But I’m at a loss for how to access mesh data, much less how to change it. I looked under “Datablocks” in the Outliner, and I see some Mesh data, but I don’t see a way to change a Mesh to a link to a Mesh… I must be missing something. Can you point me in the right direction?

Thanks!

There might be other ways to do this but this is how I’d do it.
You can access the meshdata under the object data tab and click the meshdata icon to change which meshdata is linked to the object.

http://dl.dropbox.com/u/2344342/meshdata.png

Thanks again. I didn’t realize I could change the mesh data that easily (I was trying to do it at the object level).

Unfortunately, the “Duplicate->Linked” function will copy any existing link to an external mesh, rather than creating a link to an internal object’s mesh that is, in turn, linked to an external mesh. (It copies the pointer, rather than creating a pointer to the pointer.)

In other words, if object A is linked to an external object B, changing the mesh links of object A to external object C doesn’t change the mesh links of objects that have been duplicated from object A using “Duplicate->Linked”. Without a script, there are hundreds of meshes that have to be redirected; so I’m probably better off using “snap to cursor” and “align to transform” to create new copies at the object level. Ugh.

Thanks muchly for giving more insight.

Ah yes, I suppose there isn’t an easy way around that. It wouldn’t be too hard to write a little script to do it for you though. Maybe you could ask for help in the Python Support subforum.

I’ll think about it. The last time I created anything big in Python, Python was brand new. And my brain is too old fashioned to harmonize with true object orientation.

Thanks again for the wonderful help!