How to control a turntable animation in VRED

Autodesk Support

Oct 8, 2023


Products and versions covered


Issue:

Is it possible to add controls to a turntable animation in VRED? Such as play, pause, reset.

Solution:

It is possible to implement a Python script into the VariantSets to provide this functionality. 
  1. Create a Node in Scene Graph and name it Turntable.
  2. Select the Node and press RMB > Edit > Animation > Create Turntable Animation.
  3. Specify the turntable options like Duration and Behavior on your needs.
image.png 
  1. Open the Clip Maker.
  2. Create a Clip.
  3. Rename the Clip to "Turntable_01" (this name is later used in the Python script).
  4. Open the Curve Editor, drag the Block named "Plane_Turntable" into the "Clip Turntable_01".
  5. Create a group in VariantSets and name it for example, Turntable_Animation.
  6. Create 3 new Sets and name them Play, Pause, Reset. 
  7. Copy the following Python script into the script tap of the VariantSet Play: 
if play ==0:

   pauseCAnimation("Turntable_01",false)
   play = 2

elif play == 1:

   playCAnimation("Turntable_01")
   play = 1

elif play == 2:

   pass

Make sure you use the following formatting: 

image.png

  1. Copy the following python script into the script tap of the VariantSet Pause:
pauseCAnimation("Turntable_01",True)
play = 0
  1. Copy the following python script into the script tap of the VariantSet Reset:
play = 1
resetCAnimation("Turntable_01")
  1. In the Scene Graph move the objects into the Node Turntable, which you want to be used for the rotation. 

See Also:


 

Products:

VRED Professional;


Was this information helpful?


Need help? Ask the Autodesk Assistant!

The Assistant can help you find answers or contact an agent.


What level of support do you have?

Different subscription plans provide distinct categories of support. Find out the level of support for your plan.

View levels of support