Changing mesh transforms in imported USD

I’m working with the USD file of an office that was somehow converted from a CAD model created on Revit. My issue is that my stage’s transforms don’t coincide with their respective objects’ mesh position in the stage but instead all have their origin in the (0,0,0) coordinate of my stage. Basically to move an object around I have to zoom out until I can see my stage’s origin point and that’s where I find the object’s transform that lets me change the object’s position, and this is the case for all meshes in my stage.

This is giving me all sorts of issues and I would like to know how can I redefine all the object’s transforms, possibly programmatically and not by hand, any help is appreciated.

1 Like

@salvo.dipp i’d like to clarify the issue a bit since there were no screenshots, is it that each mesh prim has their pivot outside of the area you are working in? If that’s the issue you are experiencing, that’s often how Revit/Rhino files are set up because the dataset was probably set to align with a site model or such. in short, it’s not uncommon that they are way off from the world origin.

i don’t think you’ll find my responses below are aimed directly to address your question as these are just some thoughts i have; so here goes. one of the options of what you could do is bring the USD in as a payload/reference into another stage and bind it to an xform prim programmatically or through GUI. this xform prim is going to store any offset you input/desire so they align to your stage’s placement. the upside: one, you don’t actually need to move individual pieces again should they decided to make design modifications; secondly, you only need to enter the offset value on one prim instead of however many pieces found in the Revit dataset.

another option, is to use the Pivot Tool to temporarily add a pivot translation attribute:

PivotTool

in the clip, i used two different methods of adding pivot translation. the default “add pivot” would move the custom pivot to prim’s center, but you can move the pivot wherever in relationship to the prim itself. at this point, you should be able to move each prim using custom pivot location rather how they came in/exported (in your case, at 0,0,0). don’t forget about the offset tool is at your disposal as well to move multiple prims at specific increments (if you know how far off in relationship to your scene they came in at).

unfortunately, i am not familiar with pivot tool’s code. if the devs/mods knows of another way to go about this programmatically besides copying the code from the command panel, i will be keen to know as well!

4 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.