For each unique shop_materialpath primitive attribute a material gets created. A Renderer selection gets shown on start and will create the renderer specific material. This is very useful when bringing in other meshes from other apps. Very important, that at the time of the import (ie via a file node), shop_materialpath is just a string to a name. There is no information about textures or colors, therefore, a random material color is used.)
This function can also be called via python.
from OD import shelftools
shelftools.matsFromShopMaterialPath(nodes = None, attribName = "shop_materialpath", ctxPath = None, renderer=None)
# Any parameters not defined will bring up a requester upon launch
# nodes is an array of nodes
# attribName is the primitive attribute name to be parsed for the material creation
# ctxPath is the context path in which to create the Material Network
# renderer defines which renderer to use:
# 0: Mantra
# 1: Octane
# 2: Redshift
# 3: Renderman
# 4: Arnold
# 5: 3Delight
# 6: VRay