How do you prevent changes during .off export?

I have recently finished creating a multi-part model using Blender. I want to export each object of the model to .OFF format (as described here), so that I can load it into other software. However, when I export to .OFF using the exporter built into Blender 2.34, a number of properties of the object are not preserved. The vertex locations are calculated relative to the object center rather than the scene origin, which is good - but the scaling and orientation of the object is changed, which is bad. How can I prevent or work around this? I searched for an answer in the Blender documetation, the Knowledge Base, and these forums, but found none.

Thanks much for your help.

-SpittingTrashcan

those are issues to point out to the author of the script

but I would consider them normal, it takes a fair amount of effort to get the global location of all verticies in a mesh object

well anway, if you want to make the local position the global position, do this to each of the objects

control+a [apply deformation, applies rotation and scaling to a mesh]
[then position the 3d cursor at the orgin by clicking there in the top and side view, and doing shift+s cursor to grid]
center cursor [edit buttons]

if you have linked-duplicates you will have to make them not share the mesh data by clicking in the edit buttons on the number right of the name of the mesh the object uses. [the number is the number of users of the mesh, clicking it will copy the mesh and give the active object its own copy]

I would like nothing better than to pass these issues on to the script author - but the script has been integrated into Blender core, and I don’t know how to access the individual script or find the script author. Does this mean I should file a bug report for Blender itself?

Fortunately, the OFF export script automatically places the object center at the origin, and calculates the locations of the other vertices accordingly. Unfortunately, it also rotates the entire object 90 degrees clockwise about positive x, and scales the object by a factor of slightly less than five, for no apparent reason. I can’t even figure out what the exact scaling factor is, or I’d write a little converter program to undo the changes.

Question summary:

  • Does this happen to anyone else?
  • What is the scaling factor, or how can I find it?
  • Does this deserve a bug report to Blender?

Thanks much.

  • SpittingTrashcan

I just remembered something that might be relevant. Just before I tried to export the objects, I applied a scaling factor of about 1/5 to the entire model in object mode. Could it be that the exporter script does not take model-level transformations into account? If so, is it possible to “force down” the scaling factor to the individual object level?

The odd exports are a result of transformations on the object level that are not visible at the mesh level. The way to apply object transformations at the mesh level is with the Object->Clear/Apply->Apply Size/Rotation command. However, selecting all objects and applying leads to strange results. I think it is because the objects are arranged in parent/child relationships, and the nested transformations go wonky. I will see if clearing these relationships helps.

… And it does. First I selected all objects, then selected Object->Parent->Clear Parent, and elected to Keep Transformations. Then I selected Object->Clear/Apply->Apply Size/Rotation, and the transformations were pushed to mesh level with no change in the overall structure. Now all I need to do is rebuild the parent/child relationships.

Should I add this to the Knowledge Base?