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")
 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")
def getTextureWidth(self):
    n = getMaterialNodes(bpy.context)["Mapping"]
    return 1./n.scale.x
def setTextureHeight(self, value):
    n = getMaterialNodes(bpy.context)["Mapping"]
    n.scale.y = 1./value
def setTextureWidth(self, value):
    n = getMaterialNodes(bpy.context)["Mapping"]
    n.scale.x = 1./value
def getTextureWidth(self):
    n = getMaterialNodes(bpy.context)["Mapping"]
    return 1. / n.scale.x
def setTextureHeight(self, value):
    n = getMaterialNodes(bpy.context)["Mapping"]
    n.scale.y = 1. / value
def setTextureWidth(self, value):
    n = getMaterialNodes(bpy.context)["Mapping"]
    n.scale.x = 1. / value