]> git.tdb.fi Git - libs/gl.git/commitdiff
Add a property to always export a blended step for a sequence
authorMikko Rasa <tdb@tdb.fi>
Sun, 9 Oct 2022 21:53:14 +0000 (00:53 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 9 Oct 2022 21:53:14 +0000 (00:53 +0300)
blender/io_mspgl/export_scene.py
blender/io_mspgl/properties.py
blender/io_mspgl/scene.py

index 4f98397761db7773e92205f88e04d6120984869a..dce52f0132345690b16002308b0e8453e5e751fe 100644 (file)
@@ -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"
index 6e1df6416b974ecb731d47d65c7fb7c53814a7b8..274aba52bddcf6ce06bd6f04535ceaa4fbac1168 100644 (file)
@@ -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)
 
index 3c98cbee1c776e340ea180e1128c60dc0a3e6565..c7a4295b8acb9b1c79a66d2e4a3490910af45e9c 100644 (file)
@@ -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