Jump to content

[SOLVED] Node save in double precision build does not work


photo

Recommended Posts

I've identified a bug in your editor code as a result of attempting to save a node. This exists in the Nov 2012 SDK for double precision builds and is easily reproducable.

1) Load a world

2) Select a node in the editor

3) Click on "Export selected node with all children into the file" button and choose a file and select OK

 

At this point, the node is not saved and a dvec3 to vec3 conversion error occurs.

On closer inspection line 1841 and 1842 of editor_nodes.h incorrectly use "vec3" instead of "Vec3" in the function Nodes::save_clicked()

 

vec3 local_position = node.getPosition();

node.setPosition(vec3_zero);

 

By modifying that type in these lines of code, the problem is rectified.

Link to comment

This is 3-4 bug report on "vec3 should be Vec3 for double precision builds" issue. Wouldn't it make sense to solve this pitfall once and finally by a complete code review of editor code (assuming a simple text replace of vec3 by Vec3 would be too brute-force) ?

Link to comment
×
×
  • Create New...