X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=blender%2Fio_mspgl%2Fproperties.py;h=0d5a6d46e044f4374c231761997753b3ea24e908;hp=129b02e64829b125cd5ffe76e2a4f93b112d0f1d;hb=86721a55699193e63c76e8a0a7b0ced0416c1cce;hpb=bc2fe1bd3e167fd8eed05f9ffeda3c255f445f70 diff --git a/blender/io_mspgl/properties.py b/blender/io_mspgl/properties.py index 129b02e6..0d5a6d46 100644 --- a/blender/io_mspgl/properties.py +++ b/blender/io_mspgl/properties.py @@ -15,6 +15,23 @@ class MspGLMeshProperties(bpy.types.Panel): mesh = context.active_object.data self.layout.prop(mesh, "winding_test") + self.layout.prop(mesh, "smoothing") + + self.layout.separator() + + col = self.layout.column() + col.label(text="Data selection") + col.prop(mesh, "use_lines") + col.prop(mesh, "vertex_groups") + col.prop(mesh, "max_groups_per_vertex") + + self.layout.separator() + + col = self.layout.column() + col.label(text="Texturing") + col.prop(mesh, "use_uv") + col.prop(mesh, "tangent_vecs") + col.prop(mesh, "tangent_uvtex") class MspGLObjectProperties(bpy.types.Panel): bl_idname = "OBJECT_PT_mspgl_properties" @@ -26,20 +43,133 @@ class MspGLObjectProperties(bpy.types.Panel): def draw(self, context): obj = context.active_object - self.layout.prop(obj, "technique"); - self.layout.prop(obj, "inherit_tech"); - if obj.inherit_tech: - self.layout.prop(obj, "override_material"); - self.layout.prop(obj, "compound"); + self.layout.prop(obj, "compound") self.layout.prop(obj, "lod_for_parent") if obj.lod_for_parent: self.layout.prop(obj, "lod_index") +class MspGLMaterialProperties(bpy.types.Panel): + bl_idname = "MATERIAL_PT_mspgl_properties" + bl_label = "MspGL properties" + bl_space_type = "PROPERTIES" + bl_region_type = "WINDOW" + bl_context = "material" + + @classmethod + def poll(cls, context): + return context.active_object.active_material is not None + + def draw(self, context): + mat = context.active_object.active_material + if not mat: + return + + self.layout.prop(mat, "render_mode") + if mat.render_mode=='CUSTOM': + self.layout.prop(mat, "shader") + elif mat.render_mode=='EXTERNAL': + self.layout.prop(mat, "technique") + self.layout.prop(mat, "array_atlas") + if mat.array_atlas: + self.layout.prop(mat, "array_layer") + 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