More cleanups.

This commit is contained in:
Relintai 2022-02-23 08:33:23 +01:00
parent ef202ae590
commit 4b8edd9567
6 changed files with 0 additions and 83 deletions

View File

@ -41,19 +41,6 @@ void Prop2DData::set_id(const int value) {
_id = value;
}
bool Prop2DData::get_snap_to_mesh() const {
return _snap_to_mesh;
}
void Prop2DData::set_snap_to_mesh(const bool value) {
_snap_to_mesh = value;
}
Vector3 Prop2DData::get_snap_axis() const {
return _snap_axis;
}
void Prop2DData::set_snap_axis(const Vector3 &value) {
_snap_axis = value;
}
Ref<Prop2DDataEntry> Prop2DData::get_prop(const int index) const {
ERR_FAIL_INDEX_V(index, _props.size(), Ref<Prop2DDataEntry>());
@ -154,14 +141,6 @@ Prop2DData::~Prop2DData() {
}
void Prop2DData::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_snap_to_mesh"), &Prop2DData::get_snap_to_mesh);
ClassDB::bind_method(D_METHOD("set_snap_to_mesh", "value"), &Prop2DData::set_snap_to_mesh);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "snap_to_mesh"), "set_snap_to_mesh", "get_snap_to_mesh");
ClassDB::bind_method(D_METHOD("get_snap_axis"), &Prop2DData::get_snap_axis);
ClassDB::bind_method(D_METHOD("set_snap_axis", "value"), &Prop2DData::set_snap_axis);
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "snap_axis"), "set_snap_axis", "get_snap_axis");
ClassDB::bind_method(D_METHOD("get_prop", "index"), &Prop2DData::get_prop);
ClassDB::bind_method(D_METHOD("set_prop", "index", "spell"), &Prop2DData::set_prop);
ClassDB::bind_method(D_METHOD("add_prop", "prop"), &Prop2DData::add_prop);

View File

@ -57,12 +57,6 @@ public:
int get_id() const;
void set_id(const int value);
bool get_snap_to_mesh() const;
void set_snap_to_mesh(const bool value);
Vector3 get_snap_axis() const;
void set_snap_axis(const Vector3 &value);
Ref<Prop2DDataEntry> get_prop(const int index) const;
void set_prop(const int index, const Ref<Prop2DDataEntry> prop);
void add_prop(const Ref<Prop2DDataEntry> prop);

View File

@ -32,20 +32,6 @@ void Prop2DDataProp2D::set_prop(const Ref<Prop2DData> value) {
_prop = value;
}
bool Prop2DDataProp2D::get_snap_to_mesh() {
return _snap_to_mesh;
}
void Prop2DDataProp2D::set_snap_to_mesh(bool value) {
_snap_to_mesh = value;
}
Vector3 Prop2DDataProp2D::get_snap_axis() {
return _snap_axis;
}
void Prop2DDataProp2D::set_snap_axis(Vector3 value) {
_snap_axis = value;
}
#if TEXTURE_PACKER_PRESENT
void Prop2DDataProp2D::_add_textures_into(Ref<TexturePacker> texture_packer) {
if (get_prop().is_valid()) {
@ -95,14 +81,6 @@ void Prop2DDataProp2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_prop", "value"), &Prop2DDataProp2D::set_prop);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "prop", PROPERTY_HINT_RESOURCE_TYPE, "Prop2DData"), "set_prop", "get_prop");
ClassDB::bind_method(D_METHOD("get_snap_to_mesh"), &Prop2DDataProp2D::get_snap_to_mesh);
ClassDB::bind_method(D_METHOD("set_snap_to_mesh", "value"), &Prop2DDataProp2D::set_snap_to_mesh);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "snap_to_mesh"), "set_snap_to_mesh", "get_snap_to_mesh");
ClassDB::bind_method(D_METHOD("get_snap_axis"), &Prop2DDataProp2D::get_snap_axis);
ClassDB::bind_method(D_METHOD("set_snap_axis", "value"), &Prop2DDataProp2D::set_snap_axis);
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "snap_axis"), "set_snap_axis", "get_snap_axis");
#if TEXTURE_PACKER_PRESENT
ClassDB::bind_method(D_METHOD("_add_textures_into", "texture_packer"), &Prop2DDataProp2D::_add_textures_into);
#endif

View File

@ -40,12 +40,6 @@ public:
Ref<Prop2DData> get_prop() const;
void set_prop(const Ref<Prop2DData> value);
bool get_snap_to_mesh();
void set_snap_to_mesh(bool value);
Vector3 get_snap_axis();
void set_snap_axis(Vector3 value);
#if TEXTURE_PACKER_PRESENT
void _add_textures_into(Ref<TexturePacker> texture_packer);
#endif

View File

@ -32,20 +32,6 @@ void Prop2DDataScene::set_scene(const Ref<PackedScene> &value) {
_scene = value;
}
bool Prop2DDataScene::get_snap_to_mesh() {
return _snap_to_mesh;
}
void Prop2DDataScene::set_snap_to_mesh(bool value) {
_snap_to_mesh = value;
}
Vector3 Prop2DDataScene::get_snap_axis() {
return _snap_axis;
}
void Prop2DDataScene::set_snap_axis(Vector3 value) {
_snap_axis = value;
}
bool Prop2DDataScene::_processor_handles(Node *node) {
Prop2DSceneInstance *i = Object::cast_to<Prop2DSceneInstance>(node);
@ -86,12 +72,4 @@ void Prop2DDataScene::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_scene"), &Prop2DDataScene::get_scene);
ClassDB::bind_method(D_METHOD("set_scene", "value"), &Prop2DDataScene::set_scene);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "scene", PROPERTY_HINT_RESOURCE_TYPE, "PackedScene"), "set_scene", "get_scene");
ClassDB::bind_method(D_METHOD("get_snap_to_mesh"), &Prop2DDataScene::get_snap_to_mesh);
ClassDB::bind_method(D_METHOD("set_snap_to_mesh", "value"), &Prop2DDataScene::set_snap_to_mesh);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "snap_to_mesh"), "set_snap_to_mesh", "get_snap_to_mesh");
ClassDB::bind_method(D_METHOD("get_snap_axis"), &Prop2DDataScene::get_snap_axis);
ClassDB::bind_method(D_METHOD("set_snap_axis", "value"), &Prop2DDataScene::set_snap_axis);
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "snap_axis"), "set_snap_axis", "get_snap_axis");
}

View File

@ -35,12 +35,6 @@ public:
Ref<PackedScene> get_scene();
void set_scene(const Ref<PackedScene> &value);
bool get_snap_to_mesh();
void set_snap_to_mesh(bool value);
Vector3 get_snap_axis();
void set_snap_axis(Vector3 value);
bool _processor_handles(Node *node);
void _processor_process(Ref<Prop2DData> prop_data, Node *node, const Transform2D &transform);
Node *_processor_get_node_for(const Transform2D &transform);