summaryrefslogtreecommitdiff
path: root/tools/editor/editor_node.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-08-06 19:00:54 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-08-06 19:00:54 -0300
commit9890c1d2ca76dc936e23f5263a4fd296bfc68996 (patch)
treebe0d304ab3f3b19e3460eee5e0bbdf68d0028f12 /tools/editor/editor_node.cpp
parent259418f8275371fc2f0bab6892caa4ef66b84240 (diff)
Likely with bugs and with some features are missing, as well as profiler support, but VisualScript should be more or less done!
Diffstat (limited to 'tools/editor/editor_node.cpp')
-rw-r--r--tools/editor/editor_node.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 6f70eedcb3..85c560bf9d 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -5220,6 +5220,17 @@ void EditorNode::reload_scene(const String& p_path) {
_scene_tab_changed(current_tab);
}
+int EditorNode::plugin_init_callback_count=0;
+
+void EditorNode::add_plugin_init_callback(EditorPluginInitializeCallback p_callback) {
+
+ ERR_FAIL_COND(plugin_init_callback_count==MAX_INIT_CALLBACKS);
+
+ plugin_init_callbacks[plugin_init_callback_count++]=p_callback;
+}
+
+EditorPluginInitializeCallback EditorNode::plugin_init_callbacks[EditorNode::MAX_INIT_CALLBACKS];
+
void EditorNode::_bind_methods() {
@@ -6499,6 +6510,9 @@ EditorNode::EditorNode() {
for(int i=0;i<EditorPlugins::get_plugin_count();i++)
add_editor_plugin( EditorPlugins::create(i,this) );
+ for(int i=0;i<plugin_init_callback_count;i++) {
+ plugin_init_callbacks[i]();
+ }
resource_preview->add_preview_generator( Ref<EditorTexturePreviewPlugin>( memnew(EditorTexturePreviewPlugin )));
resource_preview->add_preview_generator( Ref<EditorPackedScenePreviewPlugin>( memnew(EditorPackedScenePreviewPlugin )));
@@ -6508,6 +6522,8 @@ EditorNode::EditorNode() {
resource_preview->add_preview_generator( Ref<EditorMeshPreviewPlugin>( memnew(EditorMeshPreviewPlugin )));
resource_preview->add_preview_generator( Ref<EditorBitmapPreviewPlugin>( memnew(EditorBitmapPreviewPlugin )));
+
+
circle_step_msec=OS::get_singleton()->get_ticks_msec();
circle_step_frame=OS::get_singleton()->get_frames_drawn();
circle_step=0;