JsPainter file to override the [Matrixctrl] ?

Buma's icon

Does anybody have a Jspainter file to override the UI of the [Matrixctrl] object please ? Many example objects were provided by Joshua in an old thread but not this object unfortunately. Thanks .

Buma's icon

The goal is to draw rectangles instead of circles and adjust the padding (I don't want to use images)

Nikolas K's icon

Hi elberstein,

I hope this will get you started
It does what you wanted (square cells) but, it could be better, so have fun with it!

Nick

EDIT: Attached the js, instead of posting the code

matrixCtrlJs.js
js
Buma's icon

Thank you Nick !
I'm going to study this. At the moment, for some reason, it displays an empty box, I'll try to find out why and learn at the same time :)

Nikolas K's icon

Does it generate any errors on the Max console?
The truth is I didnt tested it that much... sorry about that!

Buma's icon

I did not notice before, but yes it shows an error on line 29

Screen-Shot-2016-06-20-at-12.18.02.png
png
Nikolas K's icon

This should be fine!
I mixed the x, y coords of the cells and the i, j.. pff...
Sorry for the confusion

(I really hope this works OK!)

EDIT: attached the correct JS

matrixCtrlJs-fixed.js
js
Buma's icon

It seems there's an other error : myPost is not defined on line 31

Screen-Shot-2016-06-20-at-12.41.20.png
png
Nikolas K's icon

Yeah, the "myPost" is a custom function I use, you could just delete it, or download the JS again.
I re-uploaded it with the function deleted...

Buma's icon

Oh OK, I was wondering what was this myPost . Now, it works fine, it's perfect !
Thanks a lot !

Nikolas K's icon

I'm glad I could (eventually) help!