rojo icon indicating copy to clipboard operation
rojo copied to clipboard

Support for specifying attributes inside project and model files

Open Kampfkarren opened this issue 5 years ago • 8 comments

Once attributes come out, it would be awesome for Rojo to support them.

I'm interested in contributing this, if there's no more major refactors the codebase is going under.

Kampfkarren avatar Nov 04 '19 02:11 Kampfkarren

The codebase is pretty stable now!

It might be easier to try adding support for tags first, which are available now. We'll want to reason through whether Rojo should merge or replace tag lists (merging might make us unable to remove tags?) and some other edge cases we haven't hit before.

LPGhatguy avatar Nov 04 '19 21:11 LPGhatguy

@LPGhatguy Would that require letting rbx_dom_weak reason about tags? No Rust code in that codebase references Tags at all, wasn't sure if that's an intentional decision or if it's just something no one got around to.

Kampfkarren avatar Nov 04 '19 22:11 Kampfkarren

I don't think rbx_dom_weak should reason about types beyond how it does right now unless we have compelling reasons since that's a deep rabbit hole (terrain, meshes, collision data...)

We can implement this just by supporting the attribute format in Rojo, or even making a crate for it?

LPGhatguy avatar Nov 05 '19 03:11 LPGhatguy

Making a crate for this kind of stuff (attributes and tags?) sounds fine to me, especially since it means that other developers could do things like reading attributes/tags in programs not related to Rojo.

Kampfkarren avatar Nov 05 '19 03:11 Kampfkarren

Hello from the future 👋

Attributes have been available for a few months now (DevHub, Feb 23rd Announcement). Are there any plans to update Rojo to support this fantastic new feature?

Ozzypig avatar Jun 01 '21 19:06 Ozzypig

Yes, though it's waiting on this PR:

https://github.com/rojo-rbx/rbx-dom/pull/166

Kampfkarren avatar Jun 01 '21 21:06 Kampfkarren

Yes, though it's waiting on this PR:

rojo-rbx/rbx-dom#166

Someone should definitely work on this now that the PR has been merged into rbx-dom. Would love to finally get to make use of attributes outside of my lua files. :smile:

(I would make a PR myself if I was comfortable with Rust but I'm not confident I wouldn't just make a buggy mess)

Hexcede avatar Nov 12 '21 02:11 Hexcede

Boy how time flies - any updates on Attribute support in Rojo?

If I were good at Rust I'd try my hand at this myself, but alas there's so many hours in a day 😞

Ozzypig avatar Mar 08 '22 23:03 Ozzypig

I will try my hand, I guess. Can't be that hard, right? (Famous last words)

PoolloverNathan avatar Dec 17 '22 18:12 PoolloverNathan

My plan is to have a $attributes/Attributes property, which can either be a simple type or an explicit cast. Edit: Never mind, this commit looks like there's already support.

PoolloverNathan avatar Dec 17 '22 18:12 PoolloverNathan