I'll handle it simply for now.
fn fix_env_map_dr = (
cr = renderers.current
has_map = false
if cr.bg_overrideDirect and cr.bg_texmapUseDirect and cr.bg_texmapDirect != undefined do(
has_map = true
)
if cr.bg_overrideReflect and cr.bg_texmapUseReflect and cr.bg_texmapReflect != undefined do(
has_map = true
)
if cr.bg_overrideRefract and cr.bg_texmapUseRefract and cr.bg_texmapRefract != undefined do(
has_map = true
)
if not has_map do(
return false
)
if cr.bg_overrideDirect and cr.bg_texmapDirect == undefined do(
cr.bg_overrideDirect = false
)
if cr.bg_overrideReflect and cr.bg_texmapReflect == undefined do(
cr.bg_overrideReflect = false
)
if cr.bg_overrideRefract and cr.bg_texmapRefract == undefined do(
cr.bg_overrideRefract = false
)
)