VRED Reset to default interactions

VRED Reset to default interactions

LeviathanLevi
Contributor Contributor
458 Views
1 Reply
Message 1 of 2

VRED Reset to default interactions

LeviathanLevi
Contributor
Contributor

I was messing with custom interactions and at some point deleted/removed the defaults running the code below. How do I reset it all back to the defaults? I don't see any option to just restore all of the default interactions/actions groups to the connected devices.

 

print(vrDeviceService.getActiveInteractionGroup())  
print("Changing active interaction group")
resetInteraction = vrDeviceService.createInteraction("resetInteraction")
resetInteraction.setSupportedInteractionGroups(["resetGroup"])
vrDeviceService.setActiveInteractionGroup("resetGroup")

for interaction in vrDeviceService.getInteractions():
    print("deactivating interaction: " + interaction.getName())
    vrDeviceService.deactivateInteraction(interaction.getName())
    
    #Remove any actions
    for action in interaction.getControllerActions():
        print(action.getName())
        interaction.removeControllerAction(action)
        print("removed.")
        
    #Remove any action groups
    for actionGroup in interaction.getSupportedInteractionGroups():
        interaction.removeSupportedInteractionGroup(actionGroup)
    
    #Remove interaction
    vrDeviceService.removeInteraction(interaction)

 

What's the easiest way to reset my controllers to their default interactions after deleting them?

 

Thanks! 

 

0 Likes
459 Views
1 Reply
Reply (1)
Message 2 of 2

quirin.friedl
Enthusiast
Enthusiast

Did you manage to handle the default/custom interactions at some point? I'm also getting into this and I think I have simular problems. When I create a CustomInteraction and a CustomGroup like in the examples, the default interactions don't work any more, even so this is supposed to prevent this (I guess...). 


When I assign all existing Interactions to the same group, everything seems to work, but the VR Menu is broken. Any one who can explain this a bit better because the behaviour is not very self explaining?!

0 Likes