You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A locked template property can't be changed on the instance level. This is mostly useful for restricting what can be done with a template, to simplify their use and avoid invalid scenarios for the game.
Supporting this feature will be a little complicated, since it will affect existing code in various places:
The "Select Objects" tool will need to take into account locked Rotation and Size, to avoid showing rotation or resize handles for such objects, and to avoid changing rotation or size of such objects when they are part of a group of selected objects.
The Properties view will need to disable the locked properties. That's probably the easiest bit. However, if the property was already changed before it was locked at the template level, it should probably still be possible to reset the property (issue Allow resetting overridden properties individually for template instances #1725). At least I don't think locking a property should automatically unset it on all instances.
The process of locking a property can probably be done by adding a small lock icon next to each relevant property in the Properties view, when a template is selected. The same icon could be shown in a read-only way when instances are selected, to make it extra clear why some property can't be changed.
Problematic are properties without representation in the Properties view:
For polygon and polyline objects, we may want to lock their geometry. Maybe we should add a dummy property for this where we could feature the lock button. This would of course affect the "Edit Polygons" tool.
For tile objects, we may want to lock their tile. Again we probably would need to show a property for this. This lock would affect the "Replace Tile" action in the context menu.
The text was updated successfully, but these errors were encountered:
Your description is pretty good. I've started working on this feature but it turned out to be more complicated than what I expected.
I finished a good amount of the property browser related stuff, and allowed saving the locked properties with the templates. But I didn't get around to modify graphical editing of the locked properties like rotation or the properties not represented in the dock that you mentioned above.
I plan to open a new pull request soon to show the current work.
A locked template property can't be changed on the instance level. This is mostly useful for restricting what can be done with a template, to simplify their use and avoid invalid scenarios for the game.
Supporting this feature will be a little complicated, since it will affect existing code in various places:
The "Select Objects" tool will need to take into account locked Rotation and Size, to avoid showing rotation or resize handles for such objects, and to avoid changing rotation or size of such objects when they are part of a group of selected objects.
The Properties view will need to disable the locked properties. That's probably the easiest bit. However, if the property was already changed before it was locked at the template level, it should probably still be possible to reset the property (issue Allow resetting overridden properties individually for template instances #1725). At least I don't think locking a property should automatically unset it on all instances.
The process of locking a property can probably be done by adding a small lock icon next to each relevant property in the Properties view, when a template is selected. The same icon could be shown in a read-only way when instances are selected, to make it extra clear why some property can't be changed.
Problematic are properties without representation in the Properties view:
For polygon and polyline objects, we may want to lock their geometry. Maybe we should add a dummy property for this where we could feature the lock button. This would of course affect the "Edit Polygons" tool.
For tile objects, we may want to lock their tile. Again we probably would need to show a property for this. This lock would affect the "Replace Tile" action in the context menu.
The text was updated successfully, but these errors were encountered: