X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=blender%2Fio_mspgl%2Fproperties.py;h=032bf8ed5dbced582ecda1f4262da88080f94008;hp=62d8a948ec5a14fe22cf6d3042659e454c40704b;hb=HEAD;hpb=0c59e9ddb9e4030b72bf271f4a88985932b02ef5 diff --git a/blender/io_mspgl/properties.py b/blender/io_mspgl/properties.py index 62d8a948..6e1df641 100644 --- a/blender/io_mspgl/properties.py +++ b/blender/io_mspgl/properties.py @@ -10,9 +10,24 @@ class MspGLSceneProperties(bpy.types.Panel): def draw(self, context): scene = context.scene - self.layout.prop(scene, "scene_type") 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" @@ -27,15 +42,17 @@ 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.prop(mesh, "use_patches") + if not mesh.use_patches: + self.layout.prop(mesh, "use_strips") self.layout.separator() col = self.layout.column() col.label(text="Data selection") - col.prop(mesh, "use_lines") + if not mesh.use_patches: + col.prop(mesh, "use_lines") col.prop(mesh, "vertex_groups") col.prop(mesh, "max_groups_per_vertex") @@ -84,19 +101,28 @@ class MspGLMaterialProperties(bpy.types.Panel): self.layout.prop(mat, "render_mode") if mat.render_mode=='CUSTOM': - self.layout.prop(mat, "shader") - if mat.shadow_method!='NONE': - self.layout.prop(mat, "shadow_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