# Create SdfLayer/UsdScene from StringLiteral

**URL:** <https://forum.aousd.org/t/create-sdflayer-usdscene-from-stringliteral/2103>\
**Category:** USD\
**Tags:** python\
**Created:** [December 27, 2024, 6:27am UTC](https://forum.aousd.org/t/create-sdflayer-usdscene-from-stringliteral/2103 "2024-12-27T06:27:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![StanDou](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@StanDou](https://forum.aousd.org/u/StanDou)\
**Post date:** [December 27, 2024, 6:27am UTC](https://forum.aousd.org/t/create-sdflayer-usdscene-from-stringliteral/2103/1 "2024-12-27T06:27:50Z")

</div>

Hi there, is there any way for us to create a SdfLayer or Usd Scene simply from String or Bytestream? From what I have known so far, it seems we can only provide a file path to create a sdfLayer then opened as a scene. But I would like a way to create a scene from raw string(not in the File System), access it, modify the prim’s data, and write it back to a katana node, Any Idea?

---

<div class="post-metadata">

**Author:** ![James](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/james/32/168_2.png) [@James](https://forum.aousd.org/u/James)\
**Post date:** [January 3, 2025, 12:45pm UTC](https://forum.aousd.org/t/create-sdflayer-usdscene-from-stringliteral/2103/2 "2025-01-03T12:45:24Z")

</div>

Hey StanDou,

So this depends on what version of Katana you’re using; there may be other ways to achieve the results you’re looking for… However, to answer your initial question, to write a string (USDA formatted I’m presuming?) to a SdfLayer, you can use:  
`ImportFromString` on the SdfLayer itself.

I’d also suggest emailing the Katana Support team if you had further Katana specific questions, or asking in the community forums (you’ll likely get a more Katana specific response!).

[Universal Scene Description: SdfLayer Class Reference](https://openusd.org/dev/api/class_sdf_layer.html#a291d43b52355bd1b94554081ec8cbadf)

---

<div class="post-metadata">

**Author:** ![StanDou](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@StanDou](https://forum.aousd.org/u/StanDou)\
**Post date:** [January 20, 2025, 10:29am UTC](https://forum.aousd.org/t/create-sdflayer-usdscene-from-stringliteral/2103/4 "2025-01-20T10:29:16Z")

</div>

Thanks James! That’s very helpful to me!
