X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=blender%2Fio_mspgl%2Fproperties.py;h=a5a24274dc648b0bc28a951a23361627098d1c93;hb=f2d504006ec97c7d84e8059c48f5a37e005ece5f;hp=df18d444be9819e7d89c3c5446cfc00401fa1a18;hpb=5bf3c7175c359ad8509702a4e0790609b39e6aec;p=libs%2Fgl.git diff --git a/blender/io_mspgl/properties.py b/blender/io_mspgl/properties.py index df18d444..a5a24274 100644 --- a/blender/io_mspgl/properties.py +++ b/blender/io_mspgl/properties.py @@ -1,5 +1,33 @@ import bpy +class MspGLSceneProperties(bpy.types.Panel): + bl_idname = "SCENE_PT_mspgl_properties" + bl_label = "MspGL properties" + bl_space_type = "PROPERTIES" + bl_region_type = "WINDOW" + bl_context = "scene" + + def draw(self, context): + scene = context.scene + + self.layout.prop(scene, "export_disposition") + +class MspGLWorldProperties(bpy.types.Panel): + bl_idname = "WORLD_PT_mspgl_properties" + bl_label = "MspGL properties" + bl_space_type = "PROPERTIES" + bl_region_type = "WINDOW" + bl_context = "world" + + def draw(self, context): + world = context.scene.world + if not world: + return + + self.layout.prop(world, "use_sky") + if world.use_sky: + self.layout.prop(world, "sun_light") + class MspGLMeshProperties(bpy.types.Panel): bl_idname = "MESH_PT_mspgl_properties" bl_label = "MspGL properties" @@ -14,8 +42,8 @@ class MspGLMeshProperties(bpy.types.Panel): def draw(self, context): mesh = context.active_object.data - self.layout.prop(mesh, "winding_test") self.layout.prop(mesh, "smoothing") + self.layout.prop(mesh, "use_strips") self.layout.separator() @@ -30,8 +58,8 @@ class MspGLMeshProperties(bpy.types.Panel): col = self.layout.column() col.label(text="Texturing") col.prop(mesh, "use_uv") - col.prop(mesh, "tbn_vecs") - col.prop(mesh, "tbn_uvtex") + col.prop(mesh, "tangent_vecs") + col.prop(mesh, "tangent_uvtex") class MspGLObjectProperties(bpy.types.Panel): bl_idname = "OBJECT_PT_mspgl_properties" @@ -40,6 +68,10 @@ class MspGLObjectProperties(bpy.types.Panel): bl_region_type = "WINDOW" bl_context = "object" + @classmethod + def poll(cls, context): + return context.active_object.type=="MESH" + def draw(self, context): obj = context.active_object @@ -66,14 +98,43 @@ class MspGLMaterialProperties(bpy.types.Panel): self.layout.prop(mat, "render_mode") if mat.render_mode=='CUSTOM': - self.layout.prop(mat, "shader") + self.layout.label(text="Render methods") + self.layout.template_list("MATERIAL_UL_mspgl_render_methods", "", mat, "render_methods", mat, "active_render_method_index") + row = self.layout.row() + row.operator("material.add_render_method") + row.operator("material.remove_render_method") + + if mat.active_render_method_index