Script TypeError

JarelJarel Posts: 18

Hi. Could some tell me what I'm doing wrong here please?


var matrix = DzMatrix4(1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1);
Renderer.riTransform(matrix);


I get the error message "TypeError: cannot call riTransform(): argument 1 has unknown type `DzMatrix4&' (register the type with qScriptRegisterMetaType()) ()@:82".

Edit: Should probably have added I'm messing about with one of the render scripts.

Post edited by Jarel on

Comments

  • rbtwhizrbtwhiz Posts: 2,250
    edited December 1969

    You are missing the new operator.

    var matrix = new DzMatrix4(1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1);

    -Rob

  • JarelJarel Posts: 18
    edited December 1969

    Thanks. I've just tried that and no change I'm afraid, same error message.

  • JarelJarel Posts: 18
    edited December 1969

    I'm back to this and still stuck. Accessing member functions of the matrix like preScale() seems to work ok but using it as a parameter to Renderer.riTransform or Renderer.riConcatTransform gives the unknown type error.

    I'd appreciate it if someone could tell me if I'm doing something (else) wrong please.

Sign In or Register to comment.