How to link and then modify .blend ?

Hello all,

I created a character in a .blend file, and with a python script I create a scene (in another blend file). Into this scene, I would like to link my character and to modify it (scale, color, …), but I encounter some issues :frowning:

This is the code I used to link the object:


obToModify = []
Library.Open('ressources\\human.blend')
type = 'Object'

if type in Library.LinkableGroups():
	for obname in Library.Datablocks(type):
		Library.Load(obname, type, 0)
	
	obToModify.append(obname)
	Library.Update()

Library.Close()

So here I am linking my object to the scene and all is right when I launch my script. At the same moment, I add my object in a list (obToModify) to retrieve it later.


scn = bpy.data.scenes.active

myObject = Object.New('Mesh', 'object')
myObject.link(obToModify[0])
scn.link(myObject)

And here I’ve a problem with the link method: the argument type is not supported !!

But I don’t know how to modify the script to make right it !?

Thanks !!