rojo-rbx / rojo

Rojo enables Roblox developers to use professional-grade software engineering tools
https://rojo.space
Mozilla Public License 2.0
947 stars 179 forks source link

Sync rbxmx/rbxlx files into Studio from filesystem #7

Closed LPGhatguy closed 5 years ago

LPGhatguy commented 6 years ago

Not sure how difficult this one will actually be without doing more investigation.

Like #6, this only covers reading from the filesystem and loading into Roblox. The other side is covered by Roblox's save-to-model feature until Rojo implements it.

There may be some server work involved here -- notably, parsing XML is not something that sounds like fun to do in Lua, but with the server trending towards being just a file API, it might be best placed there.

LPGhatguy commented 6 years ago

With the protocol rewrite, I think this became a bit easier.

LPGhatguy commented 6 years ago

I'd like to use minidom for Roblox object parsing I think.

https://docs.rs/minidom/0.8.0/minidom/

blobbyblob commented 6 years ago

Keep in mind you're gonna have a bad time when it comes to CSG -- roblox doesn't provide any APIs to read/write the data. The only way to get it in the game will be to drag an rbxmx file in.

LPGhatguy commented 5 years ago

This has gotten much easier with the introduction of the rojo build command and Rojo's support for reading and writing model formats.

While CSG, meshes, and terrain are impossible or just slow to write via Lua, Rojo can generate the initial place file with the correct data regardless of API restrictions, bypassing those issues!

I'll also be putting feature requests into the pipeline to make more instance properties readable and writable by at least plugin-level scripts to enable more properties to be live-synced.

LPGhatguy commented 5 years ago

This is implemented for binary model files. XML model files will be supported once an rbx_xml PR merges that can deserialize a handful of property types.

From here, it's just a matter of expanding the rbx_tree family of crates to expand what kinds of properties Rojo can handle.