How to declare python variable for Vector<float,3>

How to declare python variable for Vector<float,3>

dan.husted
Enthusiast Enthusiast
1,076 Views
2 Replies
Message 1 of 3

How to declare python variable for Vector<float,3>

dan.husted
Enthusiast
Enthusiast

I am trying to call the function addRotationControlPoint but can't figure out exactly what it wants for the rotation vector variable.  The response I get when I pass an array on 3 floats is :

 Boost.Python.ArgumentError: Python argument types in
vrAnimWidgets.addRotationControlPoint(vrNodePtr, float, array.array)
did not match C++ signature:
addRotationControlPoint(class osg::NodePtr node, float time, class osg::Vector<float,3> rot)

 

With other functions I am able to pass it a list, but that doesn't seem to work with this one.

 

A little help?

 

0 Likes
Accepted solutions (1)
1,077 Views
2 Replies
Replies (2)
Message 2 of 3

michael_nikelsky
Autodesk
Autodesk
Accepted solution

It should work by just using Vec3f(1.0, 2.0,3.0) for a vector with 3 floats.

 

Kind regards

Michael



Michael Nikelsky
Sr. Principal Engineer
0 Likes
Message 3 of 3

dan.husted
Enthusiast
Enthusiast

Well that was easy.  Thanks for your swift response.

0 Likes