+ if mat.render_mode!='EXTERNAL':
+ self.layout.prop(mat, "material_atlas")
+ if mat.render_mode=='CUSTOM':
+ self.layout.separator()
+ self.layout.label(text="Uniform values")
+ self.layout.template_list("MATERIAL_UL_mspgl_uniforms", "", mat, "uniforms", mat, "active_uniform_index")
+ row = self.layout.row()
+ row.operator("material.add_uniform")
+ row.operator("material.remove_uniform")
+
+ if mat.active_uniform_index<len(mat.uniforms):
+ uniform = mat.uniforms[mat.active_uniform_index]
+ self.layout.prop(uniform, "name")
+ self.layout.prop(uniform, "size")
+ row = self.layout.row(align=True)
+ row.label(text="Values")
+ for i in range(uniform.size):
+ row.prop(uniform, "values", text="", index=i)
+
+class MspGLTextureNodeProperties(bpy.types.Panel):
+ bl_idname = "NODE_PT_mspgl_properties"
+ bl_label = "MspGL properties"
+ bl_space_type = "NODE_EDITOR"
+ bl_region_type = "UI"
+ bl_category = "Item"
+
+ @classmethod
+ def poll(cls, context):
+ node = context.active_node
+ return node and node.type=='TEX_IMAGE'
+
+ def draw(self, context):
+ node = context.active_node
+ if not node:
+ return