lightingmili.blogg.se

Convert yfi to usd
Convert yfi to usd






We need to get an Xform instance of our prim # above we have a Usd.Prim, if we want to access all the Xform's types natively, Prim = stage_ref.DefinePrim( '/XformPrim', 'Xform') To define a new prim with a type use stage_ref.DefinePrim(path, type_name) or you can use your Type's SomeType.Define(stage_ref, path) method: from pxr import Usd, UsdGeom Print(prim.GetName()) # prints "UnTypedPrim" Prim = stage_ref.DefinePrim( '/UnTypedPrim') To define a new prim use stage_ref.DefinePrim(path): from pxr import Usd Print(prim.GetName()) # prints "Prim" print(prim.GetPrimPath()) # prints "/Prim" To get a reference to a prim at a path use stage_ref.GetPrimAtPath(path): from pxr import Usd is a special prim known as the root prim in a stage. Prims are referenced by their path in the stage, which is a string in the form of /Prim/ChildPrim. Working with Prims is a more complicated since Prims are extremely powerful objects in USD. This function allows you to transition between serialization formats ( usda or usdc) as well, based on the file extension provided.

convert yfi to usd

To export a stage to a new file, you can use (). To save a loaded Stage use (path) from pxr import Usd To create a new Stage use (path): from pxr import Usd To load a USD file as a USD Stage you use (path): from pxr import Usd Working with USD Stages is pretty straight forward, as most times everything is one function call away. Prims, Attributes, and Metadata Tutorial.The tutorials are organized by topic rather than sequential updates to a single goal, so they do not need to be read in any specific order.

convert yfi to usd

If you have never encountered USD before, a good starting resource to get your hands dirty are the USD Tutorials from Pixar's USD site. Also, some experience with USD is beneficial but not required. These tutorials are not meant to provide an introduction to 3D scene graphs and runtimes in general.

Convert yfi to usd how to#

These tutorials will help Python developers new to USD learn how to perform common tasks on the scene graph, as well as learn how to be more proficient in the USD documentation. USD (Universal Scene Description) is both an open source interchange format for arbitrary 3D scenes, as well as a runtime which provides a rich toolset for reading, writing, editing scenes.






Convert yfi to usd