Skip to content

Commit

Permalink
Better way to disable asset library
Browse files Browse the repository at this point in the history
  • Loading branch information
reduz committed Jun 10, 2016
1 parent c5a2aff commit 00bfdc8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions tools/editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
#include "io/zip_io.h"
#include "io/config_file.h"
#include "animation_editor.h"

#include "io/stream_peer_ssl.h"
// plugins
#include "plugins/sprite_frames_editor_plugin.h"
#include "plugins/texture_region_editor_plugin.h"
Expand Down Expand Up @@ -6381,12 +6381,12 @@ EditorNode::EditorNode() {
add_editor_plugin( memnew( CanvasItemEditorPlugin(this) ) );
add_editor_plugin( memnew( SpatialEditorPlugin(this) ) );
add_editor_plugin( memnew( ScriptEditorPlugin(this) ) );
#ifdef OPENSSL_ENABLED
add_editor_plugin( memnew( AssetLibraryEditorPlugin(this) ) );
#else
#warning Asset Library will not compile without SSL
#endif

if (StreamPeerSSL::is_available()) {
add_editor_plugin( memnew( AssetLibraryEditorPlugin(this) ) );
} else {
WARN_PRINT("Asset Library not available, as it requires SSL to work.");
}
//more visually meaningful to have this later
raise_bottom_panel_item(AnimationPlayerEditor::singleton);

Expand Down
16 changes: 8 additions & 8 deletions tools/editor/project_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "scene/gui/line_edit.h"
#include "scene/gui/panel_container.h"
#include "scene/gui/center_container.h"

#include "io/stream_peer_ssl.h"

#include "scene/gui/texture_frame.h"
#include "scene/gui/margin_container.h"
Expand Down Expand Up @@ -986,15 +986,15 @@ ProjectManager::ProjectManager() {
tree_vb->add_spacer();


#ifdef OPENSSL_ENABLED
if (StreamPeerSSL::is_available()) {

asset_library = memnew( EditorAssetLibrary(true) );
asset_library->set_name("Templates");
tabs->add_child(asset_library);
asset_library = memnew( EditorAssetLibrary(true) );
asset_library->set_name("Templates");
tabs->add_child(asset_library);
} else {
WARN_PRINT("Asset Library not available, as it requires SSL to work.");
}

#else
#warning Asset Library will not compile without SSL
#endif

CenterContainer *cc = memnew( CenterContainer );
Button * cancel = memnew( Button );
Expand Down

0 comments on commit 00bfdc8

Please sign in to comment.