JumpViewpoint not working - script python

JumpViewpoint not working - script python

Bob.Bon2000
Collaborator Collaborator
713 Views
2 Replies
Message 1 of 3

JumpViewpoint not working - script python

Bob.Bon2000
Collaborator
Collaborator

Hey

 

I run a cmd startup vred with script attached to it. Script goes in something like

 

 

I e "\\Autodesk\Vred\something.exe" -prePython = "scriptPath.py", can't remember exact line tbh. I actually tried 2 executions. 1 from the one on left, and 1 when after program start I send socket request to render it but it has the same issue. 

 

for scene in sceneList:
     jumpViewpoint(scene.viewpoint)
     for light in scene.sceneLights:
             adjustLight(light)
             renderImage(scene.renderData,light)

I have 10 cameras, each of which have multiple viewpoints, Each viewpoint has unique name. 

 

For some reason when this script runs it will not set proper viewpoint. It works fine if I just have 1-2 camera. But not more. 

 

Any help?

I guess I need to somehow force refresh of viewport?

0 Likes
714 Views
2 Replies
Replies (2)
Message 2 of 3

sinje_thiedemann
Autodesk
Autodesk

Hi,

with which version do you have the issue?

There was a bug fix in VRED 2018 Update 1 regarding viewpoint activation when using multiple cameras. When activating a viewpoint of an inactive camera, the viewpoint was not correctly activated under certain conditions. It affected both UI and scripting.

conditions: viewpoint activation is not animated, camera has "Evaluate Navigation Mode" option OFF.

Does it work with 2018 Update 1?

For older versions the workaround would be to enable "Evaluate Navigation Mode".

 

Best regards

Sinje

0 Likes
Message 3 of 3

Bob.Bon2000
Collaborator
Collaborator

Hey

 

I think I'm either on the ver1 or the hotfix. Thanks for info ! I'll update to lastest version ! 

 

Will let you know if it works :- )

 

Thanks veru much again!

0 Likes