godot/scene/resources/packed_scene.cpp

/**************************************************************************/
/*  packed_scene.cpp                                                      */
/**************************************************************************/
/*                         This file is part of:                          */
/*                             GODOT ENGINE                               */
/*                        https://godotengine.org                         */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
/*                                                                        */
/* Permission is hereby granted, free of charge, to any person obtaining  */
/* a copy of this software and associated documentation files (the        */
/* "Software"), to deal in the Software without restriction, including    */
/* without limitation the rights to use, copy, modify, merge, publish,    */
/* distribute, sublicense, and/or sell copies of the Software, and to     */
/* permit persons to whom the Software is furnished to do so, subject to  */
/* the following conditions:                                              */
/*                                                                        */
/* The above copyright notice and this permission notice shall be         */
/* included in all copies or substantial portions of the Software.        */
/*                                                                        */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
/**************************************************************************/

#include "packed_scene.h"

#include "core/config/engine.h"
#include "core/config/project_settings.h"
#include "core/io/missing_resource.h"
#include "core/io/resource_loader.h"
#include "core/templates/local_vector.h"
#include "scene/2d/node_2d.h"
#ifndef _3D_DISABLED
#include "scene/3d/node_3d.h"
#endif // _3D_DISABLED
#include "scene/gui/control.h"
#include "scene/main/instance_placeholder.h"
#include "scene/main/missing_node.h"
#include "scene/property_utils.h"

#define PACKED_SCENE_VERSION

#ifdef TOOLS_ENABLED
SceneState::InstantiationWarningNotify SceneState::instantiation_warn_notify =;
#endif

bool SceneState::can_instantiate() const {}

static Array _sanitize_node_pinned_properties(Node *p_node) {}

Ref<Resource> SceneState::get_remap_resource(const Ref<Resource> &p_resource, HashMap<Ref<Resource>, Ref<Resource>> &remap_cache, const Ref<Resource> &p_fallback, Node *p_for_scene) {}

Node *SceneState::instantiate(GenEditState p_edit_state) const {}

Variant SceneState::make_local_resource(Variant &p_value, const SceneState::NodeData &p_node_data, HashMap<Ref<Resource>, Ref<Resource>> &p_resources_local_to_sub_scene, Node *p_node, const StringName p_sname, HashMap<Ref<Resource>, Ref<Resource>> &p_resources_local_to_scene, int p_i, Node **p_ret_nodes, SceneState::GenEditState p_edit_state) const {}

Array SceneState::setup_resources_in_array(Array &p_array_to_scan, const SceneState::NodeData &p_n, HashMap<Ref<Resource>, Ref<Resource>> &p_resources_local_to_sub_scene, Node *p_node, const StringName p_sname, HashMap<Ref<Resource>, Ref<Resource>> &p_resources_local_to_scene, int p_i, Node **p_ret_nodes, SceneState::GenEditState p_edit_state) const {}

Dictionary SceneState::setup_resources_in_dictionary(Dictionary &p_dictionary_to_scan, const SceneState::NodeData &p_n, HashMap<Ref<Resource>, Ref<Resource>> &p_resources_local_to_sub_scene, Node *p_node, const StringName p_sname, HashMap<Ref<Resource>, Ref<Resource>> &p_resources_local_to_scene, int p_i, Node **p_ret_nodes, SceneState::GenEditState p_edit_state) const {}

bool SceneState::has_local_resource(const Array &p_array) const {}

static int _nm_get_string(const String &p_string, HashMap<StringName, int> &name_map) {}

static int _vm_get_variant(const Variant &p_variant, HashMap<Variant, int, VariantHasher, VariantComparator> &variant_map) {}

Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, HashMap<StringName, int> &name_map, HashMap<Variant, int, VariantHasher, VariantComparator> &variant_map, HashMap<Node *, int> &node_map, HashMap<Node *, int> &nodepath_map) {}

Error SceneState::_parse_connections(Node *p_owner, Node *p_node, HashMap<StringName, int> &name_map, HashMap<Variant, int, VariantHasher, VariantComparator> &variant_map, HashMap<Node *, int> &node_map, HashMap<Node *, int> &nodepath_map) {}

Error SceneState::pack(Node *p_scene) {}

void SceneState::set_path(const String &p_path) {}

String SceneState::get_path() const {}

void SceneState::clear() {}

Error SceneState::copy_from(const Ref<SceneState> &p_scene_state) {}

Ref<SceneState> SceneState::get_base_scene_state() const {}

int SceneState::find_node_by_path(const NodePath &p_node) const {}

int SceneState::_find_base_scene_node_remap_key(int p_idx) const {}

Variant SceneState::get_property_value(int p_node, const StringName &p_property, bool &r_found, bool &r_node_deferred) const {}

bool SceneState::is_node_in_group(int p_node, const StringName &p_group) const {}

bool SceneState::disable_placeholders =;

void SceneState::set_disable_placeholders(bool p_disable) {}

bool SceneState::is_connection(int p_node, const StringName &p_signal, int p_to_node, const StringName &p_to_method) const {}

void SceneState::set_bundled_scene(const Dictionary &p_dictionary) {}

Dictionary SceneState::get_bundled_scene() const {}

int SceneState::get_node_count() const {}

StringName SceneState::get_node_type(int p_idx) const {}

StringName SceneState::get_node_name(int p_idx) const {}

int SceneState::get_node_index(int p_idx) const {}

bool SceneState::is_node_instance_placeholder(int p_idx) const {}

Ref<PackedScene> SceneState::get_node_instance(int p_idx) const {}

String SceneState::get_node_instance_placeholder(int p_idx) const {}

Vector<StringName> SceneState::get_node_groups(int p_idx) const {}

NodePath SceneState::get_node_path(int p_idx, bool p_for_parent) const {}

int SceneState::get_node_property_count(int p_idx) const {}

StringName SceneState::get_node_property_name(int p_idx, int p_prop) const {}

Vector<String> SceneState::get_node_deferred_nodepath_properties(int p_idx) const {}

Variant SceneState::get_node_property_value(int p_idx, int p_prop) const {}

NodePath SceneState::get_node_owner_path(int p_idx) const {}

int SceneState::get_connection_count() const {}

NodePath SceneState::get_connection_source(int p_idx) const {}

StringName SceneState::get_connection_signal(int p_idx) const {}

NodePath SceneState::get_connection_target(int p_idx) const {}

StringName SceneState::get_connection_method(int p_idx) const {}

int SceneState::get_connection_flags(int p_idx) const {}

int SceneState::get_connection_unbinds(int p_idx) const {}

Array SceneState::get_connection_binds(int p_idx) const {}

bool SceneState::has_connection(const NodePath &p_node_from, const StringName &p_signal, const NodePath &p_node_to, const StringName &p_method, bool p_no_inheritance) {}

Vector<NodePath> SceneState::get_editable_instances() const {}

Ref<Resource> SceneState::get_sub_resource(const String &p_path) {}

//add

int SceneState::add_name(const StringName &p_name) {}

int SceneState::add_value(const Variant &p_value) {}

int SceneState::add_node_path(const NodePath &p_path) {}

int SceneState::add_node(int p_parent, int p_owner, int p_type, int p_name, int p_instance, int p_index) {}

void SceneState::add_node_property(int p_node, int p_name, int p_value, bool p_deferred_node_path) {}

void SceneState::add_node_group(int p_node, int p_group) {}

void SceneState::set_base_scene(int p_idx) {}

void SceneState::add_connection(int p_from, int p_to, int p_signal, int p_method, int p_flags, int p_unbinds, const Vector<int> &p_binds) {}

void SceneState::add_editable_instance(const NodePath &p_path) {}

bool SceneState::remove_group_references(const StringName &p_name) {}

bool SceneState::rename_group_references(const StringName &p_old_name, const StringName &p_new_name) {}

HashSet<StringName> SceneState::get_all_groups() {}

Vector<String> SceneState::_get_node_groups(int p_idx) const {}

void SceneState::_bind_methods() {}

SceneState::SceneState() {}

////////////////

void PackedScene::_set_bundled_scene(const Dictionary &p_scene) {}

Dictionary PackedScene::_get_bundled_scene() const {}

Error PackedScene::pack(Node *p_scene) {}

void PackedScene::clear() {}

void PackedScene::reload_from_file() {}

bool PackedScene::can_instantiate() const {}

Node *PackedScene::instantiate(GenEditState p_edit_state) const {}

void PackedScene::replace_state(Ref<SceneState> p_by) {}

void PackedScene::recreate_state() {}

#ifdef TOOLS_ENABLED
HashSet<StringName> PackedScene::get_scene_groups(const String &p_path) {}
#endif

Ref<SceneState> PackedScene::get_state() const {}

void PackedScene::set_path(const String &p_path, bool p_take_over) {}

void PackedScene::set_path_cache(const String &p_path) {}

void PackedScene::reset_state() {}
void PackedScene::_bind_methods() {}

PackedScene::PackedScene() {}