Plugin not displaying output until I press OK or CANCEL button.

swapnil

New member
I am working on creating a lscript plugin where I am adding objects as well as a background image. The scripts run fine but the objects and background are not shown until I close the requester either pressing OK or CANCEL button. I wanted the objects to show in real time with the plugin open. Any help would be appreciated. Thank you!
 
I'm assuming this is in Layout.

You will need to add a Refresh(); or RefreshNow(); somewhere after you've loaded your object or image.

Otherwise, the viewport won't update until after the script runs.

Also keep in mind that you may want to work on getting your script ported over to Python. If LW is still being developed, LScript will no longer be supported, and things will start breaking in scripts that won't be fixed.
 
I already had Refresh(); in my script but it was not working. I tried RefreshNow(); and it seems to do the trick. Thank you!
Also thank you for the suggestion will look into python port.
 
Back
Top