MoI discussion forum
MoI discussion forum

Full Version: Freeze with custom screenshot

From: moujiik
24 Sep 2018   [#1]
Hi, moi freeze with custom screenshot:

script: /* Custom screenshot */ var prev_background = moi.view.viewportBackgroundColor; moi.view.viewportBackgroundColor = 0xFFFFFF; moi.view.lineWidth = 1; moi.grid.display = false; moi.grid.showXYAxes = false; moi.view.showAxisIcon = false; moi.view.meshAngle = 3; moi.ui.getActiveViewport().renderToClipboard( 4000, 2500 ); moi.view.lineWidth = 1; moi.grid.display = true; moi.grid.showXYAxes = true; moi.view.showAxisIcon = true; moi.view.meshAngle = 8; moi.view.viewportBackgroundColor = prev_background;

It's a simple model, and as soon as i take the screenshot, the ram drops very quickly to the maximum (16 gb). It happened recently on the august beta. I tried to reduce resolution to 1200/1200, same result. So i export now to pdf, without any problems. Some ideas?
Moujiik
From: Michael Gibson
24 Sep 2018   [#2] In reply to [#1]
Hi Moujiik, sorry about that - it's a bug in the new display engine that caches information on the video card. The bug is triggered by changing moi.view.meshAngle . If you comment out those calls then it should work ok, like this:

script: /* Custom screenshot */ var prev_background = moi.view.viewportBackgroundColor; moi.view.viewportBackgroundColor = 0xFFFFFF; moi.view.lineWidth = 1; moi.grid.display = false; moi.grid.showXYAxes = false; moi.view.showAxisIcon = false; /*moi.view.meshAngle = 3;*/ moi.ui.getActiveViewport().renderToClipboard( 4000, 2500 ); moi.view.lineWidth = 1; moi.grid.display = true; moi.grid.showXYAxes = true; moi.view.showAxisIcon = true; /*moi.view.meshAngle = 8;*/ moi.view.viewportBackgroundColor = prev_background;

I'm going to try and release a new beta this week which will have it fixed, thanks for reporting it.

- Michael
From: moujiik
24 Sep 2018   [#3] In reply to [#2]
Hi Michael. It's working now. Thank you, that was fast!
Have a nice day.
Moujiik