summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/SCsub3
-rw-r--r--editor/collada/SCsub2
-rw-r--r--editor/doc/SCsub2
-rw-r--r--editor/editor_properties.cpp13
-rw-r--r--editor/editor_properties.h2
-rw-r--r--editor/editor_properties_array_dict.cpp4
-rw-r--r--editor/fileserver/SCsub2
-rw-r--r--editor/icons/SCsub4
-rw-r--r--editor/import/SCsub2
-rw-r--r--editor/plugins/SCsub2
10 files changed, 17 insertions, 19 deletions
diff --git a/editor/SCsub b/editor/SCsub
index 82b982eef2..d5ac8c7008 100644
--- a/editor/SCsub
+++ b/editor/SCsub
@@ -1,6 +1,7 @@
#!/usr/bin/env python
Import('env')
+
env.editor_sources = []
import os
@@ -89,5 +90,3 @@ if env['tools']:
lib = env.add_library("editor", env.editor_sources)
env.Prepend(LIBS=[lib])
-
- Export('env')
diff --git a/editor/collada/SCsub b/editor/collada/SCsub
index 04c9a827ef..2b1e889fb0 100644
--- a/editor/collada/SCsub
+++ b/editor/collada/SCsub
@@ -3,5 +3,3 @@
Import('env')
env.add_source_files(env.editor_sources, "*.cpp")
-
-Export('env')
diff --git a/editor/doc/SCsub b/editor/doc/SCsub
index 04c9a827ef..2b1e889fb0 100644
--- a/editor/doc/SCsub
+++ b/editor/doc/SCsub
@@ -3,5 +3,3 @@
Import('env')
env.add_source_files(env.editor_sources, "*.cpp")
-
-Export('env')
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 8df49b4516..f6937386c9 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -819,10 +819,10 @@ void EditorPropertyInteger::_bind_methods() {
ClassDB::bind_method(D_METHOD("_value_changed"), &EditorPropertyInteger::_value_changed);
}
-void EditorPropertyInteger::setup(int p_min, int p_max, bool p_allow_greater, bool p_allow_lesser) {
+void EditorPropertyInteger::setup(int p_min, int p_max, int p_step, bool p_allow_greater, bool p_allow_lesser) {
spin->set_min(p_min);
spin->set_max(p_max);
- spin->set_step(1);
+ spin->set_step(p_step);
spin->set_allow_greater(p_allow_greater);
spin->set_allow_lesser(p_allow_lesser);
}
@@ -2665,7 +2665,7 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
} else {
EditorPropertyInteger *editor = memnew(EditorPropertyInteger);
- int min = 0, max = 65535;
+ int min = 0, max = 65535, step = 1;
bool greater = true, lesser = true;
if (p_hint == PROPERTY_HINT_RANGE && p_hint_text.get_slice_count(",") >= 2) {
@@ -2673,6 +2673,11 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
lesser = false;
min = p_hint_text.get_slice(",", 0).to_int();
max = p_hint_text.get_slice(",", 1).to_int();
+
+ if (p_hint_text.get_slice_count(",") >= 3) {
+ step = p_hint_text.get_slice(",", 2).to_int();
+ }
+
for (int i = 2; i < p_hint_text.get_slice_count(","); i++) {
String slice = p_hint_text.get_slice(",", i).strip_edges();
if (slice == "or_greater") {
@@ -2684,7 +2689,7 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
}
}
- editor->setup(min, max, greater, lesser);
+ editor->setup(min, max, step, greater, lesser);
add_property_editor(p_path, editor);
}
diff --git a/editor/editor_properties.h b/editor/editor_properties.h
index cfc433b880..18e70345aa 100644
--- a/editor/editor_properties.h
+++ b/editor/editor_properties.h
@@ -265,7 +265,7 @@ protected:
public:
virtual void update_property();
- void setup(int p_min, int p_max, bool p_allow_greater, bool p_allow_lesser);
+ void setup(int p_min, int p_max, int p_step, bool p_allow_greater, bool p_allow_lesser);
EditorPropertyInteger();
};
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp
index 20c34e9092..4e638cb4ac 100644
--- a/editor/editor_properties_array_dict.cpp
+++ b/editor/editor_properties_array_dict.cpp
@@ -337,7 +337,7 @@ void EditorPropertyArray::update_property() {
} break;
case Variant::INT: {
EditorPropertyInteger *editor = memnew(EditorPropertyInteger);
- editor->setup(-100000, 100000, true, true);
+ editor->setup(-100000, 100000, 1, true, true);
prop = editor;
} break;
@@ -800,7 +800,7 @@ void EditorPropertyDictionary::update_property() {
} break;
case Variant::INT: {
EditorPropertyInteger *editor = memnew(EditorPropertyInteger);
- editor->setup(-100000, 100000, true, true);
+ editor->setup(-100000, 100000, 1, true, true);
prop = editor;
} break;
diff --git a/editor/fileserver/SCsub b/editor/fileserver/SCsub
index f1fa50148f..2b1e889fb0 100644
--- a/editor/fileserver/SCsub
+++ b/editor/fileserver/SCsub
@@ -1,5 +1,5 @@
#!/usr/bin/env python
Import('env')
-Export('env')
+
env.add_source_files(env.editor_sources, "*.cpp")
diff --git a/editor/icons/SCsub b/editor/icons/SCsub
index 31bf8f116a..109e1aa83b 100644
--- a/editor/icons/SCsub
+++ b/editor/icons/SCsub
@@ -1,15 +1,13 @@
#!/usr/bin/env python
Import('env')
+
from platform_methods import run_in_subprocess
import editor_icons_builders
-
make_editor_icons_builder = Builder(action=run_in_subprocess(editor_icons_builders.make_editor_icons_action),
suffix='.h',
src_suffix='.svg')
env['BUILDERS']['MakeEditorIconsBuilder'] = make_editor_icons_builder
env.Alias('editor_icons', [env.MakeEditorIconsBuilder('#editor/editor_icons.gen.h', Glob("*.svg"))])
-
-Export('env')
diff --git a/editor/import/SCsub b/editor/import/SCsub
index f1fa50148f..2b1e889fb0 100644
--- a/editor/import/SCsub
+++ b/editor/import/SCsub
@@ -1,5 +1,5 @@
#!/usr/bin/env python
Import('env')
-Export('env')
+
env.add_source_files(env.editor_sources, "*.cpp")
diff --git a/editor/plugins/SCsub b/editor/plugins/SCsub
index f1fa50148f..2b1e889fb0 100644
--- a/editor/plugins/SCsub
+++ b/editor/plugins/SCsub
@@ -1,5 +1,5 @@
#!/usr/bin/env python
Import('env')
-Export('env')
+
env.add_source_files(env.editor_sources, "*.cpp")