Python for "Run Script" and/or "Reload Script"

Python for "Run Script" and/or "Reload Script"

Anonymous
Not applicable
661 Views
3 Replies
Message 1 of 4

Python for "Run Script" and/or "Reload Script"

Anonymous
Not applicable

What is the python for running a script that exists in the Script Editor?  

0 Likes
662 Views
3 Replies
Replies (3)
Message 2 of 4

Christian_Garimberti
Advisor
Advisor
Hi,
I think you have to define a function that you can run from the command line.
Or you can define a function and then associate it to a key to run it pressing the corrispondent key.

Chris

Christian Garimberti
Technical Manager and Visualization Enthusiast
Qs Informatica S.r.l. | Qs Infor S.r.l. | My Website
Facebook | Instagram | Youtube | LinkedIn

EESignature

0 Likes
Message 3 of 4

marc.winter2
Advocate
Advocate

Hi,

Still no python way to "get" and "set" the script in vredScriptEditor?


a not so nice "set" found here
https://help.autodesk.com/view/VREDPRODUCTS/2026/ENU/?caas=caas/sfdcarticles/sfdcarticles/How-to-cha...


Best regards,
Marc

0 Likes
Message 4 of 4

marc.winter2
Advocate
Advocate

ok the same trick for get and set

  • to get the sceneScript
    1. export rootnode as py with vrFileIOService.exportNodes
    2. read the fileContent from disk
  • to set the sceneScript
    1. write the script to disk as py
    2. clearScript
    3. import py with vrFileIOService.importFiles