Browse Source

Allow user to opt-out of vertex shading

pull/11/head
Adam Johnson 10 years ago
parent
commit
fe685f57f1
  1. 5
      korman/operators/op_export.py
  2. 6
      korman/operators/op_lightmap.py

5
korman/operators/op_export.py

@ -41,6 +41,10 @@ class ExportOperator(bpy.types.Operator):
"description": "(Re-)Bake all lightmaps on export",
"default": True}),
"regenerate_shading": (BoolProperty, {"name": "Regenerate Vertex Shading",
"description": "(Re-)Bake all vertex shading on export",
"default": True}),
"version": (EnumProperty, {"name": "Version",
"description": "Version of the Plasma Engine to target",
"default": "pvPots", # This should be changed when moul is easier to target!
@ -57,6 +61,7 @@ class ExportOperator(bpy.types.Operator):
# The crazy mess we're doing with props on the fly means we have to explicitly draw them :(
layout.prop(age, "version")
layout.prop(age, "regenerate_lightmaps")
layout.prop(age, "regenerate_shading")
layout.prop(age, "profile_export")
def __getattr__(self, attr):

6
korman/operators/op_lightmap.py

@ -242,7 +242,11 @@ class VertexColorLightingOperator(_LightingOperator, bpy.types.Operator):
# old copy of the autocolor layer on the mesh. Nuke it.
autocolor = vcols.get("autocolor")
if autocolor is not None:
vcols.remove(autocolor)
if context.scene.world.plasma_age.regenerate_shading:
vcols.remove(autocolor)
else:
# we have autocolor already, don't regenerate it because they don't want it
return {"CANCELLED"}
autocolor = vcols.new("autocolor")
toggle.track(vcols, "active", autocolor)

Loading…
Cancel
Save