Skip to content

Simple object type property library #367

Closed
Bartvds opened this Issue Feb 19, 2013 · 6 comments

3 participants

@Bartvds
Bartvds commented Feb 19, 2013

I have a proposal for a library panel where we can manage object types.

The modification works with the current object types and the new panel allows us to manage the properties of each type.

The library value could/would be exported separately from the instances so we can look-up/ the values (maybe externalize file data etc). I don't think it should write the library values to each instance, that'll give ugly name collision issues.

As bonus: for tileobject library types we should edit the registration point of the graphic so we can make arrows etc.

I think this could be a relatively simple way for a library expansion: almost all the basic parts are there, we just need the panel and import/export.

@bjorn
Owner
bjorn commented Feb 19, 2013

Did you notice issues #24, #70 and #365? Sure, Tiled definitely needs something like this.

@Bartvds
Bartvds commented Feb 19, 2013

Yes, and I did but they seemed more involved and I didn't want to press on your time. A simple solution would already be good.

@bjorn
Owner
bjorn commented Feb 19, 2013

There's no need to worry about pressing on my time. There's not much to press on, really. :/

Basically, even if this solution sounds simple, it involves new UI and data models and that's never a quick job. I think issue #365 has a good chance of going through since that solution requires no new UI to be written. It will at first just rely on an external XML file in which you define your object types and their properties. The other reason is that somebody actually seems to have time to work on it.

@ChristianIvicevic

@Bartvds I will definitely have to implement this feature and then I can have a look at writing a good solution for the normal version of Tiled. Once I work through @bjorn 's code and get something up I could suggest a pull request. So far you can have a look at my own issue #365 and see what I did so far. Please just keep in mind that this is still experimental and both a bad style of writing code and not robust. Yet it is a beginning 😄

@ChristianIvicevic

@Bartvds I have been successful implementing what we are looking for. Please refer to the newest comments in #365. I will be working these days on providing this feature to the master branch.

@Bartvds
Bartvds commented Feb 20, 2013

Nice! The XML solution is fine, solves the main issue of managing recurring data. Any fancy options are ice but not the core problem.

Good to see you and Bjorn work together and try to add it to master! :)

@bjorn bjorn added a commit that closed this issue Feb 14, 2016
@bjorn Added Object Types editor
This new editor allows not only defining your object types and the color
of objects of that type, but also specifying the default properties for
each type and their default value. This makes setting values for these
properties more efficient and makes it clear what properties an object
of a certain type can take.

Previously specified property types and their colors are preserved and
saved to the new location when changing them.

This change also contains some related fixes:

* Fixed updating of properties view when the object type is changed.
* Fixed updating of properties view when changing the predefined
  properties for the currently selected object.
* Disallowed removing or renaming of predefined properties when in the
  object properties view.

Closes #367
1d00438
@bjorn bjorn closed this in 1d00438 Feb 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.