Community
VRED Forum
Welcome to Autodesk’s VRED Forums. Share your knowledge, ask questions, and explore popular VRED topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reset Variant Set with python

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
lbs_markus_s
1046 Views, 7 Replies

Reset Variant Set with python

Hi,

i have a variant set with some Clips in the animation tab. Ist a sequential Animation. With a touchsensor you can play one Clip after another.

 

So how can i reset the variant set if i'm in the middle of all Clips and want it to start with the first one again

 

Thx

7 REPLIES 7
Message 2 of 8
dlincol1
in reply to: lbs_markus_s

Hi,

 

Create another Variant Set to reset the clips.

e.g. resetAnim('Clip1'); resetAnim('Clip2')... in Script tab

Regards,
Dan
Message 3 of 8
lbs_markus_s
in reply to: dlincol1

Hi Dan,

i know about that but this is not really working for me.

 

for example if you have a variant set with 2 Clips ..open and closing a door

 

 

variant set open/Close

clip1 = open

clip2 = Close

 

sequential Animation

 

 

 

so if someone is clicking trough the animations with a touchsensor and the door is left open .. you want to reset the whole Scene and all doors are closed before a second person starts with this Scene

 

so you can use a second variant set to Close all doors, but in our first variant set open/Close the next clip will be Close the door. So if the door is already Closed and you click the touchsensor again it Plays the closing Animation again. 

Message 4 of 8
dlincol1
in reply to: lbs_markus_s

Ok, I see what you mean.

There needs to be a way to reset the VSet sequence.

I'm not sure how to access that.

 

Regards,
Dan
Message 5 of 8
Anonymous
in reply to: dlincol1

You also can keep track of your variant execution yourself.

Something like that:

door_open variant script: door = True

door_close variant script: door = False

door_toggle variant script: if door: selectVariantSet('door_close') else: selectVariantSet('door_open')

reset variant script: selectVariantSet('door_close')

 

Cheers,

Janosch

Message 6 of 8
seiferp
in reply to: lbs_markus_s

Hi Markus,

 

the attached example is also using python in the VSets and checks the "if" state before playing the close door animation. Hope this helps.

 

Cheers

Pascal

Message 7 of 8
lbs_markus_s
in reply to: seiferp

Hi Pascal,

thank you very much. It is definitely a way to solve the Problem.

 

Thx

Markus

Message 8 of 8
seiferp
in reply to: lbs_markus_s

Smiley Happy Awesome

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report