X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=blender%2Fio_mspgl%2Fproperties.py;h=26e84b2530e59476976daf68800c16e7c80e2659;hp=0d5a6d46e044f4374c231761997753b3ea24e908;hb=74a5bc6159d2c753786a5ef6bf785263cd0538f1;hpb=86721a55699193e63c76e8a0a7b0ced0416c1cce diff --git a/blender/io_mspgl/properties.py b/blender/io_mspgl/properties.py index 0d5a6d46..26e84b25 100644 --- a/blender/io_mspgl/properties.py +++ b/blender/io_mspgl/properties.py @@ -1,5 +1,31 @@ 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 + + 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 +40,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() @@ -40,6 +66,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,9 +96,24 @@ 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