top of page

Set SoundCue Volume to 1.0 on selected assets.

There's an annoying feature of new soundCue assets that their added WAVs have a 0.75 Volume Multiplier default value, so you hear everything lower than the level it was mastered at. This would be super annoying to change on hundreds of assets.


Luckily, we can use the in-built Python command-line to process any number of selected soundCue assets at once and adjust this in a moment. Note : In the example, the script changes only Volume Multiplier values that are less than 1.0 to be 1.0. It doesn't adjust values that are greater than 1.0 (because this would suggest they've already been set by a user).

Python to paste:

import unreal


# Get the currently selected assets in the Content Browser

selected_assets = unreal.EditorUtilityLibrary.get_selected_assets()


# Define the property name to check and the desired value

property_name = 'VolumeMultiplier'

desired_value = 1.0


# Iterate through selected assets and update the property if needed

for asset in selected_assets:

if isinstance(asset, unreal.SoundCue):

# Get the Volume Multiplier property

volume_multiplier = unreal.SoundCue.get_editor_property(asset, property_name)

# Check if the value is less than 1.0

if volume_multiplier < desired_value:

# Set the property to 1.0

unreal.SoundCue.set_editor_property(asset, property_name, desired_value)

unreal.log("Updated '{}' property of '{}' to {}".format(property_name, asset.get_name(), desired_value))

In the editor UI, look for the Cmd command-line and change it to Python in the roll-up option. Then just paste the script in the textfield, and press Enter. That's all that's needed. Check the change has been batched over the assets! Don't forget to Save All, as the python script doesn't save the updated assets.

Possibly there's a config file somewhere that sets the default value of the WAV node's Volume Multiplier?

Comments


Featured Posts
Recent Posts
Search By Tags
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page