|
I’m looking for a way to directly Detach a material or shader from an object, without deleting stuff or other workarounds.
I can append ..
charactersToAppendMattes = FBComponentList()
FBFindObjectsByNamespace( “Characters”, charactersToAppendMattes)
matteShaderToAppend = FBComponentList()
FBFindObjectsByNamespace( “matte”, matteShaderToAppend)
charactersToAppendMattes[0].Materials.append(matteShaderToAppend[0])
However there’s no similar method for Detach. Workaround currently is using ReplaceAll Function in FBShader. However that requires reconstructing other shaders that might already exist on the model.
-Kristian
|
|
|
|
Since the shaders are stored as a list type,
found that I can use pop (remove from list) to detach shaders from an object
charactersToAppendMattes[0].Shaders.pop()
|
|
|