Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch the audio-params override to be disabled by default. #275

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions addons/io_hubs_addon/components/definitions/audio_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ class AudioParams(HubsComponent):
'display_name': 'Audio Params',
'node_type': NodeType.NODE,
'panel_type': [PanelType.OBJECT, PanelType.BONE],
'version': (1, 0, 0)
'version': (1, 0, 1)
}

overrideAudioSettings: BoolProperty(
name="Override Audio Settings",
description="Override Audio Settings",
default=True)
default=False)

audioType: EnumProperty(
name="Audio Type",
Expand Down Expand Up @@ -119,6 +119,11 @@ def migrate(self, migration_type, panel_type, instance_version, host, migration_
migration_report.append(
f"Warning: The Media Cone angles may not have migrated correctly for the Audio Params component on the {panel_type.value} {host_reference}")

if instance_version <= (1, 0, 0):
if self.get("overrideAudioSettings") is None:
migration_occurred = True
self.overrideAudioSettings = True

return migration_occurred

def draw(self, context, layout, panel):
Expand Down
4 changes: 4 additions & 0 deletions addons/io_hubs_addon/components/definitions/audio_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ class AudioTarget(HubsComponent):
description="Show debug visuals",
default=False)

@classmethod
def init(cls, obj):
obj.hubs_component_audio_params.overrideAudioSettings = True

def draw(self, context, layout, panel):
dep_name = AudioSource.get_name()

Expand Down
4 changes: 4 additions & 0 deletions addons/io_hubs_addon/components/definitions/audio_zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ def create_gizmo(cls, ob, gizmo_group):

return gizmo

@classmethod
def init(cls, obj):
obj.hubs_component_audio_params.overrideAudioSettings = True

def migrate(self, migration_type, panel_type, instance_version, host, migration_report, ob=None):
migration_occurred = False
if instance_version < (1, 0, 0):
Expand Down
Loading