MADRIX Forum • Madrix script - GetMatrixWidth() and mapping
Page 1 of 1

Madrix script - GetMatrixWidth() and mapping

Posted: Thu May 31, 2018 10:11 am
by qniens
Hi,

GetMatrixWidth() should 'Returns the horizontal pixel count of the matrix.'

Instead it returns the horizontal pixel count in the active mapping.
If you change the 'Size X' in the mapping the GetMatrixWidth() changes.

Expected result: The width of the matrix defined in Patch Editor.
Returns: The width of the active mapping

You can get the mapping width with void MapDlgGetMapPixel(int map[]).

I want to write a script that 'overscans' the active layer. By scaling it 10% and then center it again.

Re: Madrix script - GetMatrixWidth() and mapping

Posted: Mon Aug 20, 2018 8:46 am
by qniens
Dear ionage,

Could you please take at my bug report from 31 may?

The bug is (still) present in the latest build (5.0d).
For an upcoming project it is very useful if the void GetMatrixWidth() returns the actual matrix size, not the mapping size.

Please see the screenshot:
https://imgur.com/a/Xmz0pbm

Best regards,
Quinten

Re: Madrix script - GetMatrixWidth() and mapping

Posted: Tue Aug 21, 2018 10:49 am
by Guertler
Hello qniens,

Sorry for the delay in answering your post.

It is not a bug in MADRIX. It is a wanted behavor of this function in MADRIX. The function returns the render size of the desired matrix.If the layer is mapped, the render size of the effect is new mapped size and this value you will get back.

In your explaned case you can remap the layer by using the function "MapDlgSetMapVector". Now you can always resize by 10% and reposition the desired effect to the center.

Re: Madrix script - GetMatrixWidth() and mapping

Posted: Tue Aug 21, 2018 11:16 am
by qniens
Dear Guertler,

The methode MapDlgSetMapVector does indeed do the job.

Thanks for your reply.

Best regards,
Quinten