Page 1 of 1

PyLuxCore DefineMesh transform

Posted: Sun May 27, 2018 12:48 am
by mick
The transform parameter does not have an effect in my tests. Would you please confirm that it is working and provide a work code snippet.

Re: PyLuxCore DefineMesh transform

Posted: Sun May 27, 2018 7:50 am
by B.Y.O.B.
It works, in BlendLuxCore and in the demo script:

Code: Select all

    # You could pass a transformation matrix here
    transform = [0.7322617173194885, -0.01488767471164465, 0.6808605790138245, 0.0, 
                 -0.1858304738998413, 0.9574531316757202, 0.22079527378082275, 0.0, 
                 -0.6551792025566101, -0.2882045805454254, 0.6983397006988525, 0.0, 
                 -0.18057727813720703, -0.6443891525268555, -1.2408249378204346, 1.0]
    # You could pass UV coordinates, vertex colors and other stuff here, additionally
    scene.DefineMesh(mesh_name, vertices, faces, None, None, None, None, transform)
The matrix must be in column-major format: viewtopic.php?f=3&t=352&p=4012&hilit=column+major#p4012

Can you post your code?

Re: PyLuxCore DefineMesh transform

Posted: Sun May 27, 2018 9:03 am
by mick
Thanks, it works now.

Column-major is really worth noting in the SDLM.