You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Portals - lift roomlist restrictions and fix link bug
Allows users to have the RoomManager as the roomlist. Fixes a couple of bugs dealing with situations where users attempt to link Portals to Rooms outside the roomlist. Adds a PortalEditorPlugin allowing you to flip individual portals.
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "scene/3d/portal.h"
|
||||
#include "scene/3d/room.h"
|
||||
#include "scene/3d/room_manager.h"
|
||||
#include "scene/resources/material.h"
|
||||
@@ -89,4 +90,29 @@ public:
|
||||
~RoomEditorPlugin();
|
||||
};
|
||||
|
||||
///////////////////////
|
||||
|
||||
class PortalEditorPlugin : public EditorPlugin {
|
||||
GDCLASS(PortalEditorPlugin, EditorPlugin);
|
||||
|
||||
Portal *_portal;
|
||||
ToolButton *button_flip;
|
||||
EditorNode *editor;
|
||||
|
||||
void _flip_portal();
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
virtual String get_name() const { return "Portal"; }
|
||||
bool has_main_screen() const { return false; }
|
||||
virtual void edit(Object *p_object);
|
||||
virtual bool handles(Object *p_object) const;
|
||||
virtual void make_visible(bool p_visible);
|
||||
|
||||
PortalEditorPlugin(EditorNode *p_node);
|
||||
~PortalEditorPlugin();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user