From 519516f9a0accd81bcbda41dfd755e23bfdbe15d Mon Sep 17 00:00:00 2001 From: Patrick Dulebohn Date: Fri, 26 Mar 2021 11:16:29 -0400 Subject: [PATCH 1/2] Toggle EnvMap Avatar Render Adds a Bool property in the EnvMap properties to toggle avatar rending on and off (fixes some waveset problems) --- korman/exporter/material.py | 2 +- korman/properties/prop_texture.py | 4 ++++ korman/ui/ui_texture.py | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/korman/exporter/material.py b/korman/exporter/material.py index 95bb2a5..14f838a 100644 --- a/korman/exporter/material.py +++ b/korman/exporter/material.py @@ -666,7 +666,7 @@ class MaterialConverter: pl_env.hither = bl_env.clip_start pl_env.yon = bl_env.clip_end pl_env.refreshRate = 0.01 if bl_env.source == "ANIMATED" else 0.0 - pl_env.incCharacters = True + pl_env.incCharacters = True if texture.plasma_layer.envmap_addavatar else False # Perhaps the DEM/DCM fog should be separately configurable at some point? pl_fog = bpy.context.scene.world.plasma_fni diff --git a/korman/properties/prop_texture.py b/korman/properties/prop_texture.py index 8cf3c26..aaa22a3 100644 --- a/korman/properties/prop_texture.py +++ b/korman/properties/prop_texture.py @@ -48,6 +48,10 @@ class PlasmaLayer(bpy.types.PropertyGroup): default=(1.0, 1.0, 1.0), subtype="COLOR") + envmap_addavatar = BoolProperty(name="Render Avatars", + description="Toggle the rendering of avatars in the environment map", + default=True) + vis_regions = CollectionProperty(name="Visibility Regions", type=EnvMapVisRegion) active_region_index = IntProperty(options={"HIDDEN"}) diff --git a/korman/ui/ui_texture.py b/korman/ui/ui_texture.py index 8c911cb..8955e73 100644 --- a/korman/ui/ui_texture.py +++ b/korman/ui/ui_texture.py @@ -43,6 +43,7 @@ class PlasmaEnvMapPanel(TextureButtonsPanel, bpy.types.Panel): if envmap.source in {"ANIMATED", "STATIC"}: layout.prop(layer_props, "envmap_color") + layout.prop(layer_props, "envmap_addavatar") layout.separator() layout.label("Visibility Sets:") From 4d356ef2c638a457354b6167190043c434615359 Mon Sep 17 00:00:00 2001 From: Patrick Dulebohn <40325124+DoobesURU@users.noreply.github.com> Date: Fri, 26 Mar 2021 11:21:46 -0400 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Adam Johnson --- korman/exporter/material.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/korman/exporter/material.py b/korman/exporter/material.py index 14f838a..5a2ca11 100644 --- a/korman/exporter/material.py +++ b/korman/exporter/material.py @@ -666,7 +666,7 @@ class MaterialConverter: pl_env.hither = bl_env.clip_start pl_env.yon = bl_env.clip_end pl_env.refreshRate = 0.01 if bl_env.source == "ANIMATED" else 0.0 - pl_env.incCharacters = True if texture.plasma_layer.envmap_addavatar else False + pl_env.incCharacters = texture.plasma_layer.envmap_addavatar # Perhaps the DEM/DCM fog should be separately configurable at some point? pl_fog = bpy.context.scene.world.plasma_fni