|
@@ -203,7 +203,7 @@ bool TileMapPattern::_get(const StringName &p_name, Variant &r_ret) const {
|
|
|
}
|
|
|
|
|
|
void TileMapPattern::_get_property_list(List<PropertyInfo> *p_list) const {
|
|
|
- p_list->push_back(PropertyInfo(Variant::OBJECT, "tile_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
|
|
|
+ p_list->push_back(PropertyInfo(Variant::OBJECT, "tile_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL));
|
|
|
}
|
|
|
|
|
|
void TileMapPattern::_bind_methods() {
|
|
@@ -3124,19 +3124,19 @@ void TileSet::_get_property_list(List<PropertyInfo> *p_list) const {
|
|
|
// Sources.
|
|
|
// Note: sources have to be listed in at the end as some TileData rely on the TileSet properties being initialized first.
|
|
|
for (const KeyValue<int, Ref<TileSetSource>> &E_source : sources) {
|
|
|
- p_list->push_back(PropertyInfo(Variant::INT, vformat("sources/%d", E_source.key), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
|
|
|
+ p_list->push_back(PropertyInfo(Variant::INT, vformat("sources/%d", E_source.key), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR));
|
|
|
}
|
|
|
|
|
|
// Tile Proxies.
|
|
|
// Note: proxies need to be set after sources are set.
|
|
|
p_list->push_back(PropertyInfo(Variant::NIL, "Tile Proxies", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_GROUP));
|
|
|
- p_list->push_back(PropertyInfo(Variant::ARRAY, "tile_proxies/source_level", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
|
|
|
- p_list->push_back(PropertyInfo(Variant::ARRAY, "tile_proxies/coords_level", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
|
|
|
- p_list->push_back(PropertyInfo(Variant::ARRAY, "tile_proxies/alternative_level", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
|
|
|
+ p_list->push_back(PropertyInfo(Variant::ARRAY, "tile_proxies/source_level", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR));
|
|
|
+ p_list->push_back(PropertyInfo(Variant::ARRAY, "tile_proxies/coords_level", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR));
|
|
|
+ p_list->push_back(PropertyInfo(Variant::ARRAY, "tile_proxies/alternative_level", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR));
|
|
|
|
|
|
// Patterns.
|
|
|
for (unsigned int pattern_index = 0; pattern_index < patterns.size(); pattern_index++) {
|
|
|
- p_list->push_back(PropertyInfo(Variant::OBJECT, vformat("pattern_%d", pattern_index), PROPERTY_HINT_RESOURCE_TYPE, "TileMapPattern", PROPERTY_USAGE_NOEDITOR));
|
|
|
+ p_list->push_back(PropertyInfo(Variant::OBJECT, vformat("pattern_%d", pattern_index), PROPERTY_HINT_RESOURCE_TYPE, "TileMapPattern", PROPERTY_USAGE_NO_EDITOR));
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -3737,35 +3737,35 @@ void TileSetAtlasSource::_get_property_list(List<PropertyInfo> *p_list) const {
|
|
|
List<PropertyInfo> tile_property_list;
|
|
|
|
|
|
// size_in_atlas
|
|
|
- property_info = PropertyInfo(Variant::VECTOR2I, "size_in_atlas", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR);
|
|
|
+ property_info = PropertyInfo(Variant::VECTOR2I, "size_in_atlas", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR);
|
|
|
if (E_tile.value.size_in_atlas == Vector2i(1, 1)) {
|
|
|
property_info.usage ^= PROPERTY_USAGE_STORAGE;
|
|
|
}
|
|
|
tile_property_list.push_back(property_info);
|
|
|
|
|
|
// next_alternative_id
|
|
|
- property_info = PropertyInfo(Variant::INT, "next_alternative_id", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR);
|
|
|
+ property_info = PropertyInfo(Variant::INT, "next_alternative_id", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR);
|
|
|
if (E_tile.value.next_alternative_id == 1) {
|
|
|
property_info.usage ^= PROPERTY_USAGE_STORAGE;
|
|
|
}
|
|
|
tile_property_list.push_back(property_info);
|
|
|
|
|
|
// animation_columns.
|
|
|
- property_info = PropertyInfo(Variant::INT, "animation_columns", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR);
|
|
|
+ property_info = PropertyInfo(Variant::INT, "animation_columns", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR);
|
|
|
if (E_tile.value.animation_columns == 0) {
|
|
|
property_info.usage ^= PROPERTY_USAGE_STORAGE;
|
|
|
}
|
|
|
tile_property_list.push_back(property_info);
|
|
|
|
|
|
// animation_separation.
|
|
|
- property_info = PropertyInfo(Variant::INT, "animation_separation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR);
|
|
|
+ property_info = PropertyInfo(Variant::INT, "animation_separation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR);
|
|
|
if (E_tile.value.animation_separation == Vector2i()) {
|
|
|
property_info.usage ^= PROPERTY_USAGE_STORAGE;
|
|
|
}
|
|
|
tile_property_list.push_back(property_info);
|
|
|
|
|
|
// animation_speed.
|
|
|
- property_info = PropertyInfo(Variant::FLOAT, "animation_speed", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR);
|
|
|
+ property_info = PropertyInfo(Variant::FLOAT, "animation_speed", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR);
|
|
|
if (E_tile.value.animation_speed == 1.0) {
|
|
|
property_info.usage ^= PROPERTY_USAGE_STORAGE;
|
|
|
}
|
|
@@ -3777,7 +3777,7 @@ void TileSetAtlasSource::_get_property_list(List<PropertyInfo> *p_list) const {
|
|
|
// animation_frame_*.
|
|
|
bool store_durations = tiles[E_tile.key].animation_frames_durations.size() >= 2;
|
|
|
for (int i = 0; i < (int)tiles[E_tile.key].animation_frames_durations.size(); i++) {
|
|
|
- property_info = PropertyInfo(Variant::FLOAT, vformat("animation_frame_%d/duration", i), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR);
|
|
|
+ property_info = PropertyInfo(Variant::FLOAT, vformat("animation_frame_%d/duration", i), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR);
|
|
|
if (!store_durations) {
|
|
|
property_info.usage ^= PROPERTY_USAGE_STORAGE;
|
|
|
}
|
|
@@ -3786,7 +3786,7 @@ void TileSetAtlasSource::_get_property_list(List<PropertyInfo> *p_list) const {
|
|
|
|
|
|
for (const KeyValue<int, TileData *> &E_alternative : E_tile.value.alternatives) {
|
|
|
// Add a dummy property to show the alternative exists.
|
|
|
- tile_property_list.push_back(PropertyInfo(Variant::INT, vformat("%d", E_alternative.key), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
|
|
|
+ tile_property_list.push_back(PropertyInfo(Variant::INT, vformat("%d", E_alternative.key), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR));
|
|
|
|
|
|
// Get the alternative tile's properties and append them to the list of properties.
|
|
|
List<PropertyInfo> alternative_property_list;
|
|
@@ -4205,10 +4205,10 @@ void TileSetAtlasSource::_bind_methods() {
|
|
|
ClassDB::bind_method(D_METHOD("set_texture_region_size", "texture_region_size"), &TileSetAtlasSource::set_texture_region_size);
|
|
|
ClassDB::bind_method(D_METHOD("get_texture_region_size"), &TileSetAtlasSource::get_texture_region_size);
|
|
|
|
|
|
- ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D", PROPERTY_USAGE_NOEDITOR), "set_texture", "get_texture");
|
|
|
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "margins", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_margins", "get_margins");
|
|
|
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "separation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_separation", "get_separation");
|
|
|
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "texture_region_size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_texture_region_size", "get_texture_region_size");
|
|
|
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D", PROPERTY_USAGE_NO_EDITOR), "set_texture", "get_texture");
|
|
|
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "margins", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "set_margins", "get_margins");
|
|
|
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "separation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "set_separation", "get_separation");
|
|
|
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "texture_region_size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "set_texture_region_size", "get_texture_region_size");
|
|
|
|
|
|
// Base tiles
|
|
|
ClassDB::bind_method(D_METHOD("create_tile", "atlas_coords", "size"), &TileSetAtlasSource::create_tile, DEFVAL(Vector2i(1, 1)));
|