Experimental feature, especially for the animation department:

THE OBJECT PROXY

Or simple said; local control of referenced data from libraries.
Having library files with references is a very common studio setup, and
Blender did do quite well in that area. Were it not that for character
setups it was impossible to use still.

This commit will enable a full rig+character to remain in the library,
and still have - under strict control - local access for animation edits.

Full log:
http://www.blender3d.org/cms/Proxy_Objects.824.0.html
This commit is contained in:
2006-11-11 16:45:17 +00:00
parent 97f892b86b
commit feb210f08e
23 changed files with 342 additions and 47 deletions

View File

@@ -1239,6 +1239,44 @@ void make_vertex_parent(void)
/* BIF_undo_push(str); not, conflicts with editmode undo... */
}
/* adds empty object to become local replacement data of a library-linked object */
void make_proxy(void)
{
Object *ob= OBACT;
if(G.scene->id.lib) return;
if(ob==NULL) return;
if(ob->id.lib==NULL) {
error("Can not make proxy for non-linked object");
}
else if(okee("Make Proxy Object")) {
Object *newob;
Base *newbase, *oldbase= BASACT;
char name[32];
newob= add_object(OB_EMPTY);
strcpy(name, ob->id.name+2);
strcat(name, "_proxy");
rename_id(&newob->id, name);
/* set layers OK */
newbase= BASACT; /* add_object sets active... */
newbase->lay= oldbase->lay;
newob->lay= newbase->lay;
/* remove base, leave user count of object, it gets linked in object_make_proxy */
BLI_remlink(&G.scene->base, oldbase);
MEM_freeN(oldbase);
object_make_proxy(newob, ob);
DAG_scene_sort(G.scene);
allqueue(REDRAWALL, 0);
BIF_undo_push("Make Proxy Object");
}
}
int test_parent_loop(Object *par, Object *ob)
{
/* test if 'ob' is a parent somewhere in par's parents */