from .datafile import Resource, Statement, Token
scene_res = Resource(scene.name+".scene", "scene")
- scene_res.statements.append(Statement("type", Token(scene.scene_type.lower())))
+ scene_res.statements.append(Statement("type", Token("simple")))
for i in scene.instances:
obj_res = resources[i.prototype+".object"]
def draw(self, context):
scene = context.scene
- self.layout.prop(scene, "scene_type")
self.layout.prop(scene, "export_disposition")
class MspGLMeshProperties(bpy.types.Panel):
for c in classes:
bpy.utils.register_class(c)
- bpy.types.Scene.scene_type = bpy.props.EnumProperty(name="Scene type", description="Type of scene to use for exporting", default="SIMPLE",
- items=(("SIMPLE", "Simple", "Objects are rendered in no specific order"),
- ("ORDERED", "Ordered", "Objects are rendered in order by their name"),
- ("ZSORTED", "Z-sorted", "Objects are rendered in order by their distance from the camera")))
bpy.types.Scene.export_disposition = bpy.props.EnumProperty(name="Export disposition", description="What to do with this scene during project export", default="IGNORE",
items=(("IGNORE", "Ignore", "The scene won't be exported"),
("CONTENTS", "Contents only", "Objects in the scene will be exported, but not the scene itself"),
class Scene:
def __init__(self, scene, obj_filter=None):
self.name = scene.name
- self.scene_type = scene.scene_type
self.export_disposition = scene.export_disposition
self.background_set = None
self.camera = scene.camera