Python API
---------- Add access to MTex objects from Lamps and Worlds (first pass). Since the MTex structure is slightly difference between materials, lamps, and worlds, a field is added to the BPy MTex object to distinquish which type it wraps. Attempting to access attributes which are unique to materials for lamp or world MTex objects throw an exception. The next pass will implement MTex attributes which are specific to Lamps and Worlds. A new attribute (textures) is added to each module. It is compatible with the previous Material.getTextures(), which returns a tuple of either MTex objects or None. Surprised we never added an attribute for this before in all the changes and refactoring.
This commit is contained in:
@@ -338,7 +338,9 @@ class Material:
|
||||
ch.append(4)
|
||||
mat.enabledTextures = ch
|
||||
print mat.enabledTextures # will print: [0, 4, 6]
|
||||
|
||||
|
||||
@type textures: a tuple of Blender MTex objects.
|
||||
@ivar textures: the Material's Texture list. Empty texture channels contains None.
|
||||
@ivar enableSSS: If True, subsurface scattering will be rendered on this material.
|
||||
@type enableSSS: bool
|
||||
@ivar sssScale: If True, subsurface scattering will be rendered on this material.
|
||||
|
||||
Reference in New Issue
Block a user