Skip to content

Commit

Permalink
Hide unsupported/buggy functions for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Naxela committed Sep 4, 2019
1 parent d821718 commit ce38d14
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 32 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -89,7 +89,7 @@ Blender, Lightmapping and Armory

[![Watch the video](img/prev.jpg)](https://www.youtube.com/watch?v=RaWNQrSaymo )

# Armory HTML5 example using Baked GI w. HDR Lightmaps:
# Armory HTML5 examples using Baked GI w. HDR Lightmaps:

Naxela's Laboratory (No quality scaling, requires decent specs):

Expand Down
64 changes: 33 additions & 31 deletions __init__.py
Expand Up @@ -79,8 +79,8 @@ def draw(self, context):
row.operator("hdrlm.build_lighting")
row = layout.row()
row.operator("hdrlm.build_lighting_selected")
row = layout.row()
row.operator("hdrlm.build_ao")
#row = layout.row()
#row.operator("hdrlm.build_ao")
row = layout.row()
row.operator("hdrlm.enable_lighting")
row = layout.row()
Expand Down Expand Up @@ -121,8 +121,8 @@ def draw(self, context):
row.prop(obj, "hdrlm_mesh_lightmap_unwrap_mode")
row = layout.row()
row.prop(obj, "hdrlm_mesh_unwrap_margin")
row = layout.row()
row.prop(obj, "hdrlm_mesh_bake_ao")
#row = layout.row()
#row.prop(obj, "hdrlm_mesh_bake_ao")

class HDRLM_PT_LightMenu(bpy.types.Panel):
bl_label = "HDR Lightmapper"
Expand Down Expand Up @@ -175,8 +175,8 @@ def draw(self, context):
row.prop(scene, 'hdrlm_lightmap_scale', expand=True)
row = layout.row(align=True)
row.prop(scene, 'hdrlm_lightmap_savedir')
row = layout.row(align=True)
row.prop(scene, "hdrlm_caching_mode")
#row = layout.row(align=True)
#row.prop(scene, "hdrlm_caching_mode")
row = layout.row(align=True)
row.prop(scene, 'hdrlm_dilation_margin')
row = layout.row(align=True)
Expand Down Expand Up @@ -209,21 +209,21 @@ def draw(self, context):
layout.active = scene.hdrlm_denoise_use

row = layout.row(align=True)
row.prop(scene, "hdrlm_denoiser", expand=True)
if scene.hdrlm_denoiser == "OIDN":
row = layout.row(align=True)
row.prop(scene, "hdrlm_oidn_path")
row = layout.row(align=True)
row.prop(scene, "hdrlm_oidn_verbose")
row = layout.row(align=True)
row.prop(scene, "hdrlm_oidn_threads")
row = layout.row(align=True)
row.prop(scene, "hdrlm_oidn_maxmem")
row = layout.row(align=True)
row.prop(scene, "hdrlm_oidn_affinity")
if scene.hdrlm_denoiser == "Optix":
row = layout.row(align=True)
row.prop(scene, "hdrlm_optix_path")
#row.prop(scene, "hdrlm_denoiser", expand=True)
#if scene.hdrlm_denoiser == "OIDN":
row = layout.row(align=True)
row.prop(scene, "hdrlm_oidn_path")
row = layout.row(align=True)
row.prop(scene, "hdrlm_oidn_verbose")
row = layout.row(align=True)
row.prop(scene, "hdrlm_oidn_threads")
row = layout.row(align=True)
row.prop(scene, "hdrlm_oidn_maxmem")
row = layout.row(align=True)
row.prop(scene, "hdrlm_oidn_affinity")
#if scene.hdrlm_denoiser == "Optix":
# row = layout.row(align=True)
# row.prop(scene, "hdrlm_optix_path")
#row = layout.row(align=True)
#row.prop(scene, "hdrlm_oidn_use_albedo")
#row = layout.row(align=True)
Expand Down Expand Up @@ -312,10 +312,10 @@ def draw(self, context):
if scene.hdrlm_encoding_mode == "RGBM" or scene.hdrlm_encoding_mode == "RGBD":
row = layout.row(align=True)
row.prop(scene, "hdrlm_encoding_range")
row = layout.row(align=True)
row.prop(scene, "hdrlm_encoding_armory_setup")
row = layout.row(align=True)
row.prop(scene, "hdrlm_encoding_colorspace")
#row = layout.row(align=True)
#row.prop(scene, "hdrlm_encoding_armory_setup")
#row = layout.row(align=True)
#row.prop(scene, "hdrlm_encoding_colorspace")

class HDRLM_PT_Compression(bpy.types.Panel):
bl_label = "Compression"
Expand Down Expand Up @@ -358,7 +358,7 @@ def draw(self, context):

if module_armory:
row = layout.row(align=True)
layout.label(text="Armory found! Hooray!")
#layout.label(text="Armory found! Hooray!")
row.operator("hdrlm.create_world_volume")
else:
layout.label(text="Armory not detected.")
Expand Down Expand Up @@ -542,7 +542,9 @@ def execute(self, context):
filepath = bpy.data.filepath
dirpath = os.path.join(os.path.dirname(bpy.data.filepath), scene.hdrlm_lightmap_savedir)
if os.path.isdir(dirpath):
shutil.rmtree(dirpath)
pass
#CHECK IF PROCESS USES DIRECTORY
#shutil.rmtree(dirpath)

# for obj in bpy.data.objects:

Expand Down Expand Up @@ -1810,8 +1812,8 @@ def HDRLM_Build(self, context):

for slot in obj.material_slots:

if(scene.hdrlm_encoding_armory_setup):
print("Setup Armory")
#if(scene.hdrlm_encoding_armory_setup):
# print("Setup Armory")

nodetree = bpy.data.materials[slot.name].node_tree

Expand Down Expand Up @@ -1918,7 +1920,7 @@ def register():
bpy.utils.register_class(HDRLM_PT_Filtering)
bpy.utils.register_class(HDRLM_PT_Encoding)
bpy.utils.register_class(HDRLM_PT_Compression)
bpy.utils.register_class(HDRLM_PT_Additional)
#bpy.utils.register_class(HDRLM_PT_Additional)
bpy.utils.register_class(HDRLM_CreateWorldVolume)
#bpy.utils.register_class(HDRLM_PT_LightmapList)
bpy.utils.register_class(HDRLM_PT_MeshMenu)
Expand Down Expand Up @@ -2057,7 +2059,7 @@ def unregister():
bpy.utils.unregister_class(HDRLM_PT_Filtering)
bpy.utils.unregister_class(HDRLM_PT_Encoding)
bpy.utils.unregister_class(HDRLM_PT_Compression)
bpy.utils.unregister_class(HDRLM_PT_Additional)
#bpy.utils.unregister_class(HDRLM_PT_Additional)
bpy.utils.unregister_class(HDRLM_CreateWorldVolume)
#bpy.utils.unregister_class(HDRLM_PT_LightmapList)
bpy.utils.unregister_class(HDRLM_PT_MeshMenu)
Expand Down

0 comments on commit ce38d14

Please sign in to comment.