Object Property Defaults

As a Roblox developer, it is currently impossible to set the default properties of objects that are inserted into Studio. All objects currently have their own preset defaults, but these are not always ideal for every person.

It would be very helpful to the development workflow if users could set the property presets per object type.

Example:
When I insert a ScreenGui, I always have to set ResetOnSpawn to false, and change ZIndexBehavior to Sibling. It would be awesome if I could right-click on a ScreenGui and click on something like ā€œSave properties as defaultā€.

Next time you insert the object, it will have the properties set how you had saved it.

41 Likes

Support! :+1:

Seems like a good idea.

Although, an even better way to do it would be to allow context menu entries by plugins for better right click functionality.

5 Likes

Why not just an organized personal prefab explorer then? Both is good too though lol.

2 Likes

It’d be nice to apply this same concept to the default baseplate file aswell. You could have a place already setup with pre-made scripts, FilteringEnabled already turned on so you don’t forget, etc.

2 Likes

All default property values are hardcoded in C++. There is no easy way to change everything to read those from some ā€˜default storage’ upon construction.

Assigning property values post-construction has the same problem as other bulk methods: the order of assignments matters, but is unspecified.

5 Likes

prefabs?

Perhaps providing a way to change properties after creation would be enough? I think that could actually be accomplished via a plugin that just listens for instances being added and then changes property values accordingly.

Sounds pretty ez to write.

So let’s get someone over the top to do it
like Quenty or cm32 or something lol

I would be down to write a plugin for this. There’s a lot of weird scenarios though that would have to be thought through. e.g. what if another plugin inserts an object? So gotta find a smart way to do it without interfering with anything else.

I don’t think there is a good solution to that. However, if you wanted to take this reeeealy far, you could design a PluginGui that acts as a replacement for ribbonbar. People could collapse the stock version and sticks yours on top instead. You’ll be able to add functionality easy.

If you wanted to keep it simple though you could make toolbar buttons called save and load or something. Probably not that necessary to be automatic.

Easiest thing I can think of is having a frame or two waiting period and only change properties to the defaults if the part is not modified after being created.

Still problematic. You can’t actually detect when an instance has been created, only when it has been parented to the DataModel. If my plugin generates something in nil and parents it to workspace when done, I’d only pick it up when it gets parented.

1 Like

That’s a good point and also the preferred way to set properties on an object. Hmm, I’m not quite sure if there is a method that would work better than a combination of my approach and checking if properties of the object match the object defaults exactly.

Then you would have to ignore circumstantial properties like positions and rotations and cframes. Placing a part in studio doesn’t place it at 0,0,0

Check every other property. If you are inserting parts on purpose that are just the default part or entity, tough luck with the plugin approach.