3
$\begingroup$

I am working on a project setup and trying to understand how it will all work behind the scenes. It involves several layers of linking, material groups, and drivers.

Can I have a value in one file drive a driver on an object linked in from another file? For example: If a material on an asset within it's own file has a driver based on some custom value of a scene, how can I have it take that value from the scene it is linked into rather than the scene within it's own file?

Or, inversely, if I setup a driver in the main file, how can I have it drive the appropriate parameter of objects that I link in?

An example of this would be if each of my materials or material groups had an input for wetness. Different materials are effected differently, and will need to be setup within their own file. These assets are then linked into whatever scene file I'm composing a scene in. A rainy scene will have a wetness of 1, and a dry 0. That needs to properly connect to each material's wetness input and drive it.

EDIT: This question was originally too complex and involved several questions, I have simplified it.

$\endgroup$
2
  • $\begingroup$ It's an interesting scenario, but too broad for one question on here. Most of what you're asking about should work, but you may have some issues with some of the driver setups. I would recommend building out a test project, which would then allow you to post more specific questions that would be more straightforward for us to answer. $\endgroup$ Commented Dec 9, 2016 at 20:39
  • $\begingroup$ @ToddMcIntosh I've simplified it. $\endgroup$
    – Ascalon
    Commented Dec 10, 2016 at 0:26

1 Answer 1

2
+50
$\begingroup$

The limitations of Blender's linking system make this a little awkward, but you can make it work with the proxy system. Proxies are Blender's funky solution to editing linked properties. You can "make a proxy" of a certain object from a linked group. This makes a local copy of that object which will then push any changes into the linked object it was copied from. Here's generally how it's meant to work in practice.

Your asset has an armature in its source file. This armature object is set up to control all other objects and materials in the asset via drivers, constraints, parenting, modifiers, or whatever. You pack everything into a group, then link that group. With the group selected, you hit Object > Make Proxy in the 3D view, and select your control rig from the object list in the prompt. You now have a control proxy that you can move and manipulate to control your linked asset.

It doesn't necessarily need to be an armature, you might just use an empty in this case. But essentially what you need to do is connect your material's wetness in the source file to some property of this empty/armature via a driver. A custom property on the object datablock is probably easiest:

the custom properties interface with a 'wet' property added

Once you make a proxy of your control object, you will then be able to adjust this "wet" property from the main scene. Word of warning though: it will affect ALL instances of this group in the scene, not just the one you had selected when you hit 'make proxy'. Best way to get around that is to add a symlink to your source file, then link the group again by select the symlink. Blender organizes links by filepath, so it will believe this is a different asset even though it's reading the same one. You can then make the new linked copy its own proxy and control them separately.

$\endgroup$
3
  • $\begingroup$ Thanks, that is great info! Can you explain what a symlink is? $\endgroup$
    – Ascalon
    Commented Dec 10, 2016 at 1:07
  • 1
    $\begingroup$ Symlink is short for symbolic link. Often called a "shortcut" in Windows parlance. It's a filesystem level shortcut to another file. It appears to oblivious apps to be another file entirely, which is handy. Exactly how you create them will vary by operating system. Google "symlink <OS name>" for some info on how they work in your system of choice. $\endgroup$
    – JtheNinja
    Commented Dec 10, 2016 at 3:27
  • $\begingroup$ @Drudge I have given an example of creating symlinks on Linux at blender.stackexchange.com/a/1154/228 (a comment to my answer also gives an example for windows) $\endgroup$
    – satishgoda
    Commented Jun 10, 2017 at 7:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .