Madrix script - GetMatrixWidth() and mapping

Post Reply
qniens
Posts: 25
Joined: Wed May 31, 2017 5:34 pm

Madrix script - GetMatrixWidth() and mapping

Post 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.
qniens
Posts: 25
Joined: Wed May 31, 2017 5:34 pm

Re: Madrix script - GetMatrixWidth() and mapping

Post 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
Guertler
Support
Support
Posts: 908
Joined: Tue Feb 04, 2014 10:47 am

Re: Madrix script - GetMatrixWidth() and mapping

Post 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.
qniens
Posts: 25
Joined: Wed May 31, 2017 5:34 pm

Re: Madrix script - GetMatrixWidth() and mapping

Post by qniens »

Dear Guertler,

The methode MapDlgSetMapVector does indeed do the job.

Thanks for your reply.

Best regards,
Quinten
Post Reply