diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-08-29 13:02:56 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-08-29 13:02:56 -0300 |
commit | 1fecba6b5bca276054a26562402cc329ce3dff5b (patch) | |
tree | c496fc33cbd5489feeabfd7b8ce8bd976893fa43 /tools | |
parent | 3a59747c6292265a2a7ac60720e7d8401b02d77d (diff) |
-added hints to sprite v/hframes, fixes truncation problem
-removed an error being printed often unnecesarly about missing child
Diffstat (limited to 'tools')
-rw-r--r-- | tools/editor/editor_data.cpp | 2 | ||||
-rw-r--r-- | tools/editor/property_editor.cpp | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tools/editor/editor_data.cpp b/tools/editor/editor_data.cpp index ac68fcb07b..3131bd895c 100644 --- a/tools/editor/editor_data.cpp +++ b/tools/editor/editor_data.cpp @@ -523,7 +523,7 @@ Ref<Script> EditorData::get_scene_root_script(int p_idx) const { if (!edited_scene[p_idx].root) return Ref<Script>(); Ref<Script> s=edited_scene[p_idx].root->get_script(); - if (!s.is_valid()) { + if (!s.is_valid() && edited_scene[p_idx].root->get_child_count()) { Node *n = edited_scene[p_idx].root->get_child(0); while(!s.is_valid() && n && n->get_filename()==String()) { s=n->get_script(); diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp index 7e367e17b8..b513e32c13 100644 --- a/tools/editor/property_editor.cpp +++ b/tools/editor/property_editor.cpp @@ -2403,8 +2403,10 @@ void PropertyEditor::update_tree() { item->set_cell_mode( 1, TreeItem::CELL_MODE_RANGE ); + if (p.hint==PROPERTY_HINT_SPRITE_FRAME) { + item->set_range_config(1,0,99999,1); - if (p.hint==PROPERTY_HINT_RANGE || p.hint==PROPERTY_HINT_EXP_RANGE) { + } else if (p.hint==PROPERTY_HINT_RANGE || p.hint==PROPERTY_HINT_EXP_RANGE) { int c = p.hint_string.get_slice_count(","); float min=0,max=100,step=1; |