Added the 3 base classes to the build.

This commit is contained in:
Relintai 2022-06-12 14:45:01 +02:00
parent 21ca852196
commit 7923375f8e
5 changed files with 21 additions and 2 deletions

View File

@ -15,6 +15,10 @@ sources = [
"nodes/mm_node_universal_property.cpp",
"nodes/mm_node.cpp",
"nodes/bases/curve_base.cpp",
"nodes/bases/gradient_base.cpp",
"nodes/bases/polygon_base.cpp",
#"editor/mat_maker_gd_editor.cpp",
#"editor/mm_create_name_popup.cpp",
#"editor/mm_graph_node.cpp",

View File

@ -12,6 +12,9 @@ def get_doc_classes():
return [
"MMAlgos",
"MMNode",
"CurveBase ",
"GradientBase",
"PolygonBase ",
"MMNodeUniversalProperty",
"MMMaterial",
"MMGraphNode",

View File

@ -196,8 +196,8 @@ void CurveBase::_bind_methods() {
//ClassDB::bind_method(D_METHOD("set_point", "i", "v"), &CurveBase::set_point);
//ClassDB::bind_method(D_METHOD("get_point", "i"), &CurveBase::get_point);
ClassDB::bind_method(D_METHOD("get_points"), &CurveBase::get_points);
ClassDB::bind_method(D_METHOD("set_points", "arr", "notify"), &CurveBase::set_points, true);
//ClassDB::bind_method(D_METHOD("get_points"), &CurveBase::get_points);
//ClassDB::bind_method(D_METHOD("set_points", "arr", "notify"), &CurveBase::set_points, true);
BIND_VMETHOD(MethodInfo("_curve_changed"));
ClassDB::bind_method(D_METHOD("curve_changed"), &CurveBase::curve_changed);

View File

@ -71,6 +71,10 @@ void PolygonBase::set_point(const int i, const Vector2 &v) {
_polygon_changed();
}
PoolVector2Array PolygonBase::get_points() {
return points;
}
void PolygonBase::set_points(const PoolVector2Array &v) {
points = v;
_polygon_changed();

View File

@ -31,6 +31,10 @@ SOFTWARE.
#include "nodes/mm_node.h"
#include "nodes/mm_node_universal_property.h"
#include "nodes/bases/curve_base.h"
#include "nodes/bases/gradient_base.h"
#include "nodes/bases/polygon_base.h"
//#include "editor/mat_maker_gd_editor.h"
//#include "editor/mm_graph_node.h"
@ -43,6 +47,10 @@ void register_material_maker_types() {
ClassDB::register_class<MMMaterial>();
ClassDB::register_class<MMNode>();
ClassDB::register_class<CurveBase>();
ClassDB::register_class<GradientBase>();
ClassDB::register_class<PolygonBase>();
//ClassDB::register_class<MMGraphNode>();
//ClassDB::register_class<MatMakerGDEditor>();