From: Mikko Rasa Date: Sun, 9 Oct 2022 21:53:14 +0000 (+0300) Subject: Add a property to always export a blended step for a sequence X-Git-Url: https://git.tdb.fi/?a=commitdiff_plain;h=1853885211c542d662ee0e0b703c57309b7814d5;p=libs%2Fgl.git Add a property to always export a blended step for a sequence --- diff --git a/blender/io_mspgl/export_scene.py b/blender/io_mspgl/export_scene.py index 4f983977..dce52f01 100644 --- a/blender/io_mspgl/export_scene.py +++ b/blender/io_mspgl/export_scene.py @@ -184,7 +184,7 @@ class SceneExporter: main_tags = [] if any_opaque: main_tags.append("") - if any_blended: + if any_blended or scene.always_blend: main_tags.append("blended") content = "content" diff --git a/blender/io_mspgl/properties.py b/blender/io_mspgl/properties.py index 6e1df641..274aba52 100644 --- a/blender/io_mspgl/properties.py +++ b/blender/io_mspgl/properties.py @@ -11,6 +11,8 @@ class MspGLSceneProperties(bpy.types.Panel): scene = context.scene self.layout.prop(scene, "export_disposition") + if scene.export_disposition=='SEQUENCE': + self.layout.prop(scene, "always_blend") class MspGLWorldProperties(bpy.types.Panel): bl_idname = "WORLD_PT_mspgl_properties" @@ -235,6 +237,7 @@ def register_properties(): ("CONTENTS", "Contents only", "Objects in the scene will be exported, but not the scene itself"), ("SCENE", "Scene", "The scene will be exported"), ("SEQUENCE", "Sequence", "The scene will be exported along with a rendering sequence"))) + bpy.types.Scene.always_blend = bpy.props.BoolProperty(name="Always create blended step", description="Create a blended step in the sequence even if no objects require it", default=False) bpy.types.Scene.use_hdr = bpy.props.BoolProperty(name="High dynamic range", description="Use a range render target with a floating point format", default=False) bpy.types.Scene.ao_samples = bpy.props.IntProperty(name="Ambient occlusion samples", description="Number of samples to use for ambient occlusion", min=8, max=128, default=32) diff --git a/blender/io_mspgl/scene.py b/blender/io_mspgl/scene.py index 3c98cbee..c7a4295b 100644 --- a/blender/io_mspgl/scene.py +++ b/blender/io_mspgl/scene.py @@ -38,6 +38,7 @@ class Scene: self.prototypes = [] self.instances = [] self.blended_instances = [] + self.always_blend = scene.always_blend self.lights = [] self.realtime_sky = False self.sun_light = None