MoI discussion forum
MoI discussion forum

Full Version: Export nurbs curve details

Show messages: All  1-4  5-6

From: miquik
13 Sep 2021   [#5] In reply to [#4]
Thanks Michael,
I would like to implement SVG export anyway now. I almost done, just one thing is missing: can I obtain viewport width/height? I need to create the projection matrix but these properties seem hidden.

Thanks
From: Michael Gibson
13 Sep 2021   [#6] In reply to [#5]
Hi miquik,

re:
> I would like to implement SVG export anyway now. I almost done, just one thing is missing: can
> I obtain viewport width/height? I need to create the projection matrix but these properties seem hidden.

There are .pixelWidth and .pixelHeight properties on a viewport object, so something like:
var width = moi.ui.mainWindow.viewpanel.getViewport('3D').pixelWidth;

- Michael

Show messages: All  1-4  5-6