Example #1
0
 def draw(self, context, layout):
     n = getMaterialNodes(context)
     split = layout.split(percentage=0.25)
     split.label("Texture:")
     split.template_ID(n["Image Texture"], "image", open="image.open")
     prk = context.scene.prk
     layout.prop(prk, "textureWidth")
     layout.prop(prk, "textureHeight")
Example #2
0
 def draw(self, context, layout):
     n = getMaterialNodes(context)
     split = layout.split(percentage=0.25)
     split.label("Texture:")
     split.template_ID(n["Image Texture"], "image", open="image.open")
     prk = context.scene.prk
     layout.prop(prk, "textureWidth")
     layout.prop(prk, "textureHeight")
Example #3
0
def getTextureWidth(self):
    n = getMaterialNodes(bpy.context)["Mapping"]
    return 1./n.scale.x
Example #4
0
def setTextureHeight(self, value):
    n = getMaterialNodes(bpy.context)["Mapping"]
    n.scale.y = 1./value
Example #5
0
def setTextureWidth(self, value):
    n = getMaterialNodes(bpy.context)["Mapping"]
    n.scale.x = 1./value
Example #6
0
def getTextureWidth(self):
    n = getMaterialNodes(bpy.context)["Mapping"]
    return 1. / n.scale.x
Example #7
0
def setTextureHeight(self, value):
    n = getMaterialNodes(bpy.context)["Mapping"]
    n.scale.y = 1. / value
Example #8
0
def setTextureWidth(self, value):
    n = getMaterialNodes(bpy.context)["Mapping"]
    n.scale.x = 1. / value