Add object identity fields with on-canvas info display#20
Merged
Conversation
Objects placed in Object mode now get four identity fields — GlobalID,
TypeID, CustomID and Name. GlobalID runs 0,1,2… across the apparatus;
TypeID runs 0,1,2… within each object type. CustomID and Name default
to "{GlobalID}_{TypeID}" and "{TypeName}_{GlobalID}_{TypeID}". All four
are editable from the object inspector and uniqueness is not enforced.
Default counters derive from the highest existing numeric value, so
they survive save/load and undo without extra state. Project files
saved before this change get sequential defaults backfilled on load.
A "Show item info" toggle in the Object-types panel draws each object's
four fields beside its icon. Each line is green normally and red when
its value overlaps another object; TypeID overlap is scoped per type.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GlobalIDruns 0,1,2… across the apparatus;TypeIDruns 0,1,2… within each object type.CustomIDdefaults to{GlobalID}_{TypeID};Namedefaults to{TypeName}_{GlobalID}_{TypeID}.TypeIDoverlap is scoped per type, the rest globally.Dependency
Requires OpenApparatus/core#5 (adds the fields to
RoomObjectand the serialization layer). Merge that first.Test plan