mirror of
https://github.com/H-uru/korman.git
synced 2025-07-15 10:54:18 +00:00
Add render layer selection to lightmap modifier
This commit is contained in:
@ -163,9 +163,7 @@ class LightBaker:
|
||||
|
||||
mods = i.plasma_modifiers
|
||||
if mods.lightmap.enabled:
|
||||
## TODO: customizable render layers
|
||||
#key = ("lightmap",) + mods.lightmap.render_layers
|
||||
key = ("lightmap",) + ((True,) * 20)
|
||||
key = ("lightmap",) + tuple(mods.lightmap.render_layers)
|
||||
if key in bake:
|
||||
bake[key].append(i)
|
||||
else:
|
||||
|
@ -19,6 +19,7 @@ from bpy.props import *
|
||||
from PyHSPlasma import *
|
||||
|
||||
from .base import PlasmaModifierProperties
|
||||
from ...exporter.etlight import _NUM_RENDER_LAYERS
|
||||
from ...exporter import utils
|
||||
from ...exporter.explosions import ExportError
|
||||
|
||||
@ -93,6 +94,13 @@ class PlasmaLightMapGen(PlasmaModifierProperties):
|
||||
("1024", "1024px", "1024x1024 pixels"),
|
||||
])
|
||||
|
||||
render_layers = BoolVectorProperty(name="Layers",
|
||||
description="Render layers to use for baking",
|
||||
options=set(),
|
||||
subtype="LAYER",
|
||||
size=_NUM_RENDER_LAYERS,
|
||||
default=((True,) * _NUM_RENDER_LAYERS))
|
||||
|
||||
light_group = StringProperty(name="Light Group",
|
||||
description="Group that defines the collection of lights to bake")
|
||||
|
||||
|
@ -23,6 +23,7 @@ def followmod(modifier, layout, context):
|
||||
|
||||
def lightmap(modifier, layout, context):
|
||||
layout.row(align=True).prop(modifier, "quality", expand=True)
|
||||
layout.prop(modifier, "render_layers", text="Active Render Layers")
|
||||
layout.prop_search(modifier, "light_group", bpy.data, "groups", icon="GROUP")
|
||||
layout.prop_search(modifier, "uv_map", context.active_object.data, "uv_textures")
|
||||
|
||||
|
Reference in New Issue
Block a user