summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/2d/canvas_item.cpp1
-rw-r--r--scene/2d/physics_body_2d.cpp2
-rw-r--r--scene/main/node.cpp2
-rw-r--r--scene/main/scene_main_loop.cpp4
-rw-r--r--scene/register_scene_types.cpp5
-rw-r--r--scene/resources/bit_mask.cpp54
-rw-r--r--scene/resources/bit_mask.h11
7 files changed, 9 insertions, 70 deletions
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index adb3574dd9..35b453d71d 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -548,6 +548,7 @@ void CanvasItem::_notification(int p_what) {
get_parent()->cast_to<CanvasItem>()->children_items.erase(C);
C=NULL;
}
+ global_invalid=true;
} break;
case NOTIFICATION_DRAW: {
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index dd8aa9e8b1..71a45024c4 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -1250,7 +1250,7 @@ void KinematicBody2D::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_collider_velocity"),&KinematicBody2D::get_collider_velocity);
ObjectTypeDB::bind_method(_MD("get_collider:Object"),&KinematicBody2D::_get_collider);
ObjectTypeDB::bind_method(_MD("get_collider_shape"),&KinematicBody2D::get_collider_shape);
- ObjectTypeDB::bind_method(_MD("get_collider_metadata"),&KinematicBody2D::get_collider_metadata);
+ ObjectTypeDB::bind_method(_MD("get_collider_metadata:Variant"),&KinematicBody2D::get_collider_metadata);
ObjectTypeDB::bind_method(_MD("set_collision_margin","pixels"),&KinematicBody2D::set_collision_margin);
ObjectTypeDB::bind_method(_MD("get_collision_margin","pixels"),&KinematicBody2D::get_collision_margin);
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 95b79cc940..0780a4bdaf 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -2067,6 +2067,8 @@ void Node::_bind_methods() {
BIND_CONSTANT( NOTIFICATION_UNPARENTED );
BIND_CONSTANT( NOTIFICATION_PAUSED );
BIND_CONSTANT( NOTIFICATION_UNPAUSED );
+ BIND_CONSTANT( NOTIFICATION_INSTANCED );
+
BIND_CONSTANT( PAUSE_MODE_INHERIT );
diff --git a/scene/main/scene_main_loop.cpp b/scene/main/scene_main_loop.cpp
index f8585b93cf..a18eb1249f 100644
--- a/scene/main/scene_main_loop.cpp
+++ b/scene/main/scene_main_loop.cpp
@@ -621,7 +621,11 @@ void SceneTree::set_editor_hint(bool p_enabled) {
}
bool SceneTree::is_node_being_edited(const Node* p_node) const {
+#ifdef TOOLS_ENABLED
return editor_hint && edited_scene_root && edited_scene_root->is_a_parent_of(p_node);
+#else
+ return false;
+#endif
}
bool SceneTree::is_editor_hint() const {
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index 84b65fc4d6..6c4fe1be79 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -221,7 +221,7 @@
static ResourceFormatLoaderImage *resource_loader_image=NULL;
static ResourceFormatLoaderWAV *resource_loader_wav=NULL;
-static ResourceFormatLoaderBitMap *resource_loader_bitmap=NULL;
+
#ifdef TOOLS_ENABLED
@@ -249,8 +249,6 @@ void register_scene_types() {
resource_loader_wav = memnew( ResourceFormatLoaderWAV );
ResourceLoader::add_resource_format_loader( resource_loader_wav );
- resource_loader_bitmap = memnew( ResourceFormatLoaderBitMap );
- ResourceLoader::add_resource_format_loader( resource_loader_bitmap );
#ifdef TOOLS_ENABLED
@@ -631,7 +629,6 @@ void unregister_scene_types() {
memdelete( resource_loader_image );
memdelete( resource_loader_wav );
- memdelete( resource_loader_bitmap );
#ifdef TOOLS_ENABLED
diff --git a/scene/resources/bit_mask.cpp b/scene/resources/bit_mask.cpp
index 7cbc145084..f5bfce3ef8 100644
--- a/scene/resources/bit_mask.cpp
+++ b/scene/resources/bit_mask.cpp
@@ -204,57 +204,3 @@ BitMap::BitMap() {
//////////////////////////////////////
-
-RES ResourceFormatLoaderBitMap::load(const String &p_path, const String& p_original_path, Error *r_error) {
-
- if (r_error)
- *r_error=ERR_FILE_CANT_OPEN;
-
- BitMap* ptr = memnew(BitMap);
- Ref<BitMap> bitmap( ptr );
-
-
- Image image;
-
- Error err = ImageLoader::load_image(p_path,&image);
-
- ERR_EXPLAIN("Failed loading image for BitMap: "+p_path);
- ERR_FAIL_COND_V(err, RES());
-
- bitmap->create_from_image_alpha(image);
- if (r_error)
- *r_error=OK;
-
- return bitmap;
-
-}
-
-bool ResourceFormatLoaderBitMap::handles_type(const String& p_type) const {
-
- return (p_type=="BitMap");
-}
-
-void ResourceFormatLoaderBitMap::get_recognized_extensions(List<String> *p_extensions) const {
-
- ImageLoader::get_recognized_extensions(p_extensions);
-}
-
-String ResourceFormatLoaderBitMap::get_resource_type(const String &p_path) const {
-
- List<String> extensions;
- ImageLoader::get_recognized_extensions(&extensions);
- String ext=p_path.extension().to_lower();
- for(List<String>::Element *E=extensions.front();E;E=E->next()) {
- if (E->get()==ext)
- return "BitMap";
- }
- return "";
-}
-
-
-ResourceFormatLoaderBitMap::ResourceFormatLoaderBitMap() {
-
-
-}
-
-
diff --git a/scene/resources/bit_mask.h b/scene/resources/bit_mask.h
index 66623f55c8..b245ea1542 100644
--- a/scene/resources/bit_mask.h
+++ b/scene/resources/bit_mask.h
@@ -62,16 +62,5 @@ public:
BitMap();
};
-class ResourceFormatLoaderBitMap : public ResourceFormatLoader {
-
-public:
-
- virtual RES load(const String &p_path,const String& p_original_path="",Error *r_error=NULL);
- virtual void get_recognized_extensions(List<String> *p_extensions) const;
- virtual bool handles_type(const String& p_type) const;
- virtual String get_resource_type(const String &p_path) const;
-
- ResourceFormatLoaderBitMap();
-};
#endif // BIT_MASK_H