Skip to content

Commit

Permalink
Merge pull request #253 from Exairnous/experimental/viewer-followup
Browse files Browse the repository at this point in the history
Scene Debugger followup PR
  • Loading branch information
keianhzo authored Dec 13, 2023
2 parents f172034 + 4a4d630 commit d69f5c5
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion addons/io_hubs_addon/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ def export_scene(context):
'use_active_collection': export_prefs.use_active_collection,
'export_apply': export_prefs.export_apply,
'export_force_sampling': False,
'use_active_scene': True
}
if bpy.app.version >= (3, 2, 0):
args['use_active_scene'] = True

bpy.ops.export_scene.gltf(**args)


Expand Down Expand Up @@ -470,6 +472,11 @@ def draw(self, context: Context):
"use_renderable")
col.prop(context.scene.hubs_scene_debugger_room_export_prefs,
"use_active_collection")
if bpy.app.version >= (3, 2, 0):
col_row = col.row()
col_row.enabled = False
col_row.prop(context.scene.hubs_scene_debugger_room_export_prefs,
"use_active_scene")
row = box.row()
col = row.column(heading="Data:")
col.use_property_split = True
Expand All @@ -483,6 +490,13 @@ def draw(self, context: Context):
col.prop(context.scene.hubs_scene_debugger_room_export_prefs,
"export_apply")
row = box.row()
col = row.column(heading="Animation:")
col.use_property_split = True
col_row = col.row()
col_row.enabled = False
col_row.prop(context.scene.hubs_scene_debugger_room_export_prefs,
"export_force_sampling")
row = box.row()

update_mode = "Update Scene" if context.scene.hubs_scene_debugger_room_create_prefs.debugLocalScene else "Spawn as object"
if isWebdriverAlive():
Expand Down Expand Up @@ -783,6 +797,14 @@ class HubsSceneDebuggerRoomExportPrefs(bpy.types.PropertyGroup):
default=False,
options=set()
)
use_active_scene: bpy.props.BoolProperty(
name='Active Scene',
description='Export objects in the active scene only. This has been forced ON because Hubs can only use one scene anyway',
default=True, options=set())
export_force_sampling: bpy.props.BoolProperty(
name='Sampling Animations',
description='Apply sampling to all animations. This has been forced OFF because it can break animations in Hubs',
default=False, options=set())


@persistent
Expand Down

0 comments on commit d69f5c5

Please sign in to comment.