mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-26 02:49:18 +01:00
Cleaned up 3 more sdf3d nodes.
This commit is contained in:
parent
3bbaaa3af0
commit
5c67416ad5
@ -70,6 +70,10 @@ sources = [
|
|||||||
"nodes/simple/curve.cpp",
|
"nodes/simple/curve.cpp",
|
||||||
|
|
||||||
"nodes/sdf3d/sdf3d_tf_translate.cpp",
|
"nodes/sdf3d/sdf3d_tf_translate.cpp",
|
||||||
|
"nodes/sdf3d/sdf3d_tf_scale.cpp",
|
||||||
|
"nodes/sdf3d/sdf3d_tf_rotate.cpp",
|
||||||
|
|
||||||
|
"nodes/sdf3d/sdf3d_shape_torus.cpp",
|
||||||
]
|
]
|
||||||
|
|
||||||
if env["tools"]:
|
if env["tools"]:
|
||||||
|
@ -40,6 +40,10 @@ def get_doc_classes():
|
|||||||
"MMCurve",
|
"MMCurve",
|
||||||
|
|
||||||
"MMSdf3dTfTranslate",
|
"MMSdf3dTfTranslate",
|
||||||
|
"MMSdf3dTfScale",
|
||||||
|
"MMSdf3dTfRotate",
|
||||||
|
|
||||||
|
"MMSdf3dShapeTorus",
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_doc_path():
|
def get_doc_path():
|
||||||
|
@ -1,179 +1,112 @@
|
|||||||
|
|
||||||
#include "sdf3d_shape_torus.h"
|
#include "sdf3d_shape_torus.h"
|
||||||
|
|
||||||
|
#include "../../algos/mm_algos.h"
|
||||||
|
#include "../../editor/mm_graph_node.h"
|
||||||
|
#include "../mm_material.h"
|
||||||
|
|
||||||
Ref<Resource> Sdf3dShapeTorus::get_output() {
|
Ref<MMNodeUniversalProperty> MMSdf3dShapeTorus::get_output() {
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sdf3dShapeTorus::set_output(const Ref<Resource> &val) {
|
void MMSdf3dShapeTorus::set_output(const Ref<MMNodeUniversalProperty> &val) {
|
||||||
output = val;
|
output = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int MMSdf3dShapeTorus::get_axis() const {
|
||||||
int Sdf3dShapeTorus::get_axis() const {
|
return axis;
|
||||||
return axis;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sdf3dShapeTorus::set_axis(const int val) {
|
void MMSdf3dShapeTorus::set_axis(const int val) {
|
||||||
axis = val;
|
axis = val;
|
||||||
|
emit_changed();
|
||||||
|
output->do_emit_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float MMSdf3dShapeTorus::get_major_radius() const {
|
||||||
float Sdf3dShapeTorus::get_major_radius() const {
|
return major_radius;
|
||||||
return major_radius;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sdf3dShapeTorus::set_major_radius(const float val) {
|
void MMSdf3dShapeTorus::set_major_radius(const float val) {
|
||||||
major_radius = val;
|
major_radius = val;
|
||||||
|
emit_changed();
|
||||||
|
output->do_emit_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float MMSdf3dShapeTorus::get_minor_radius() const {
|
||||||
float Sdf3dShapeTorus::get_minor_radius() const {
|
return minor_radius;
|
||||||
return minor_radius;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sdf3dShapeTorus::set_minor_radius(const float val) {
|
void MMSdf3dShapeTorus::set_minor_radius(const float val) {
|
||||||
minor_radius = val;
|
minor_radius = val;
|
||||||
|
emit_changed();
|
||||||
|
output->do_emit_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MMSdf3dShapeTorus::_init_properties() {
|
||||||
|
if (!output.is_valid()) {
|
||||||
|
output.instance();
|
||||||
|
output->set_default_type(MMNodeUniversalProperty::DEFAULT_TYPE_VECTOR2);
|
||||||
|
}
|
||||||
|
|
||||||
|
output->set_output_slot_type(MMNodeUniversalProperty::SLOT_TYPE_FLOAT);
|
||||||
//tool;
|
output->set_slot_name(">>> Output >>>");
|
||||||
//export(Resource) ;
|
output->set_get_value_from_owner(true);
|
||||||
Ref<Resource> output;
|
register_output_property(output);
|
||||||
//export(int, "X,Y,Z") ;
|
|
||||||
int axis = 2;
|
|
||||||
//export(float) ;
|
|
||||||
float major_radius = 0.3;
|
|
||||||
//export(float) ;
|
|
||||||
float minor_radius = 0.15;
|
|
||||||
|
|
||||||
void Sdf3dShapeTorus::_init_properties() {
|
|
||||||
|
|
||||||
if (!output) {
|
|
||||||
output = MMNodeUniversalProperty.new();
|
|
||||||
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT;
|
void MMSdf3dShapeTorus::_register_methods(MMGraphNode *mm_graph_node) {
|
||||||
output.slot_name = ">>> Output >>>";
|
mm_graph_node->add_slot_label_universal(output);
|
||||||
output.get_value_from_owner = true;
|
|
||||||
register_output_property(output);
|
Array arr;
|
||||||
|
arr.push_back("X");
|
||||||
|
arr.push_back("Y");
|
||||||
|
arr.push_back("Z");
|
||||||
|
|
||||||
|
mm_graph_node->add_slot_enum("get_axis", "set_axis", "Axis", arr);
|
||||||
|
mm_graph_node->add_slot_float("get_major_radius", "set_major_radius", "Major_radius", 0.01);
|
||||||
|
mm_graph_node->add_slot_float("get_minor_radius", "set_minor_radius", "Minor_radius", 0.01);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Vector2 MMSdf3dShapeTorus::_get_property_value_sdf3d(const Vector3 &uv3) {
|
||||||
|
if (axis == 0) {
|
||||||
|
return MMAlgos::sdf3d_torus_x(uv3, major_radius, minor_radius);
|
||||||
|
}
|
||||||
|
|
||||||
void Sdf3dShapeTorus::_register_methods(const Variant &mm_graph_node) {
|
else if (axis == 1) {
|
||||||
mm_graph_node.add_slot_label_universal(output);
|
return MMAlgos::sdf3d_torus_y(uv3, major_radius, minor_radius);
|
||||||
mm_graph_node.add_slot_enum("get_axis", "set_axis", "Axis", [ "X", "Y", "Z" ]);
|
}
|
||||||
mm_graph_node.add_slot_float("get_major_radius", "set_major_radius", "Major_radius", 0.01);
|
|
||||||
mm_graph_node.add_slot_float("get_minor_radius", "set_minor_radius", "Minor_radius", 0.01);
|
else if (axis == 2) {
|
||||||
|
return MMAlgos::sdf3d_torus_z(uv3, major_radius, minor_radius);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Vector2();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MMSdf3dShapeTorus::MMSdf3dShapeTorus() {
|
||||||
Vector2 Sdf3dShapeTorus::_get_property_value_sdf3d(const Vector3 &uv3) {
|
axis = 2;
|
||||||
|
major_radius = 0.3;
|
||||||
if (axis == 0) {
|
minor_radius = 0.15;
|
||||||
return MMAlgos.sdf3d_torus_x(uv3, major_radius, minor_radius);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MMSdf3dShapeTorus::~MMSdf3dShapeTorus() {
|
||||||
else if (axis == 1) {
|
|
||||||
return MMAlgos.sdf3d_torus_y(uv3, major_radius, minor_radius);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MMSdf3dShapeTorus::_bind_methods() {
|
||||||
|
ClassDB::bind_method(D_METHOD("get_output"), &MMSdf3dShapeTorus::get_output);
|
||||||
|
ClassDB::bind_method(D_METHOD("set_output", "value"), &MMSdf3dShapeTorus::set_output);
|
||||||
|
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "output", PROPERTY_HINT_RESOURCE_TYPE, "MMNodeUniversalProperty"), "set_output", "get_output");
|
||||||
|
|
||||||
else if (axis == 2) {
|
ClassDB::bind_method(D_METHOD("get_axis"), &MMSdf3dShapeTorus::get_axis);
|
||||||
return MMAlgos.sdf3d_torus_z(uv3, major_radius, minor_radius);
|
ClassDB::bind_method(D_METHOD("set_axis", "value"), &MMSdf3dShapeTorus::set_axis);
|
||||||
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "axis"), "set_axis", "get_axis");
|
||||||
|
|
||||||
|
ClassDB::bind_method(D_METHOD("get_major_radius"), &MMSdf3dShapeTorus::get_major_radius);
|
||||||
|
ClassDB::bind_method(D_METHOD("set_major_radius", "value"), &MMSdf3dShapeTorus::set_major_radius);
|
||||||
|
ADD_PROPERTY(PropertyInfo(Variant::REAL, "major_radius"), "set_major_radius", "get_major_radius");
|
||||||
|
|
||||||
|
ClassDB::bind_method(D_METHOD("get_minor_radius"), &MMSdf3dShapeTorus::get_minor_radius);
|
||||||
|
ClassDB::bind_method(D_METHOD("set_minor_radius", "value"), &MMSdf3dShapeTorus::set_minor_radius);
|
||||||
|
ADD_PROPERTY(PropertyInfo(Variant::REAL, "minor_radius"), "set_minor_radius", "get_minor_radius");
|
||||||
}
|
}
|
||||||
|
|
||||||
return Vector2();
|
|
||||||
}
|
|
||||||
|
|
||||||
//axis;
|
|
||||||
|
|
||||||
int Sdf3dShapeTorus::get_axis() {
|
|
||||||
return axis;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Sdf3dShapeTorus::set_axis(const int val) {
|
|
||||||
axis = val;
|
|
||||||
emit_changed();
|
|
||||||
output.emit_changed();
|
|
||||||
}
|
|
||||||
|
|
||||||
//major_radius;
|
|
||||||
|
|
||||||
float Sdf3dShapeTorus::get_major_radius() {
|
|
||||||
return major_radius;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Sdf3dShapeTorus::set_major_radius(const float val) {
|
|
||||||
major_radius = val;
|
|
||||||
emit_changed();
|
|
||||||
output.emit_changed();
|
|
||||||
}
|
|
||||||
|
|
||||||
//minor_radius;
|
|
||||||
|
|
||||||
float Sdf3dShapeTorus::get_minor_radius() {
|
|
||||||
return minor_radius;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Sdf3dShapeTorus::set_minor_radius(const float val) {
|
|
||||||
minor_radius = val;
|
|
||||||
emit_changed();
|
|
||||||
output.emit_changed();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Sdf3dShapeTorus::Sdf3dShapeTorus() {
|
|
||||||
output;
|
|
||||||
axis = 2;
|
|
||||||
major_radius = 0.3;
|
|
||||||
minor_radius = 0.15;
|
|
||||||
}
|
|
||||||
|
|
||||||
Sdf3dShapeTorus::~Sdf3dShapeTorus() {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void Sdf3dShapeTorus::_bind_methods() {
|
|
||||||
ClassDB::bind_method(D_METHOD("get_output"), &Sdf3dShapeTorus::get_output);
|
|
||||||
ClassDB::bind_method(D_METHOD("set_output", "value"), &Sdf3dShapeTorus::set_output);
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "output", PROPERTY_HINT_RESOURCE_TYPE, "Ref<Resource>"), "set_output", "get_output");
|
|
||||||
|
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_axis"), &Sdf3dShapeTorus::get_axis);
|
|
||||||
ClassDB::bind_method(D_METHOD("set_axis", "value"), &Sdf3dShapeTorus::set_axis);
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "axis"), "set_axis", "get_axis");
|
|
||||||
|
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_major_radius"), &Sdf3dShapeTorus::get_major_radius);
|
|
||||||
ClassDB::bind_method(D_METHOD("set_major_radius", "value"), &Sdf3dShapeTorus::set_major_radius);
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::REAL, "major_radius"), "set_major_radius", "get_major_radius");
|
|
||||||
|
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_minor_radius"), &Sdf3dShapeTorus::get_minor_radius);
|
|
||||||
ClassDB::bind_method(D_METHOD("set_minor_radius", "value"), &Sdf3dShapeTorus::set_minor_radius);
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::REAL, "minor_radius"), "set_minor_radius", "get_minor_radius");
|
|
||||||
|
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("_init_properties"), &Sdf3dShapeTorus::_init_properties);
|
|
||||||
ClassDB::bind_method(D_METHOD("_register_methods", "mm_graph_node"), &Sdf3dShapeTorus::_register_methods);
|
|
||||||
ClassDB::bind_method(D_METHOD("_get_property_value_sdf3d", "uv3"), &Sdf3dShapeTorus::_get_property_value_sdf3d);
|
|
||||||
ClassDB::bind_method(D_METHOD("get_axis"), &Sdf3dShapeTorus::get_axis);
|
|
||||||
ClassDB::bind_method(D_METHOD("set_axis", "val"), &Sdf3dShapeTorus::set_axis);
|
|
||||||
ClassDB::bind_method(D_METHOD("get_major_radius"), &Sdf3dShapeTorus::get_major_radius);
|
|
||||||
ClassDB::bind_method(D_METHOD("set_major_radius", "val"), &Sdf3dShapeTorus::set_major_radius);
|
|
||||||
ClassDB::bind_method(D_METHOD("get_minor_radius"), &Sdf3dShapeTorus::get_minor_radius);
|
|
||||||
ClassDB::bind_method(D_METHOD("set_minor_radius", "val"), &Sdf3dShapeTorus::set_minor_radius);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,53 +1,40 @@
|
|||||||
#ifndef SDF3D_SHAPE_TORUS_H
|
#ifndef MM_SDF3D_SHAPE_TORUS_H
|
||||||
#define SDF3D_SHAPE_TORUS_H
|
#define MM_SDF3D_SHAPE_TORUS_H
|
||||||
|
|
||||||
|
#include "../mm_node.h"
|
||||||
|
#include "../mm_node_universal_property.h"
|
||||||
|
|
||||||
class Sdf3dShapeTorus : public MMNode {
|
class MMSdf3dShapeTorus : public MMNode {
|
||||||
GDCLASS(Sdf3dShapeTorus, MMNode);
|
GDCLASS(MMSdf3dShapeTorus, MMNode);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Ref<MMNodeUniversalProperty> get_output();
|
||||||
|
void set_output(const Ref<MMNodeUniversalProperty> &val);
|
||||||
|
|
||||||
Ref<Resource> get_output();
|
int get_axis() const;
|
||||||
void set_output(const Ref<Resource> &val);
|
void set_axis(const int val);
|
||||||
|
|
||||||
int get_axis() const;
|
float get_major_radius() const;
|
||||||
void set_axis(const int val);
|
void set_major_radius(const float val);
|
||||||
|
|
||||||
float get_major_radius() const;
|
float get_minor_radius() const;
|
||||||
void set_major_radius(const float val);
|
void set_minor_radius(const float val);
|
||||||
|
|
||||||
float get_minor_radius() const;
|
void _init_properties();
|
||||||
void set_minor_radius(const float val);
|
void _register_methods(MMGraphNode *mm_graph_node);
|
||||||
|
Vector2 _get_property_value_sdf3d(const Vector3 &uv3);
|
||||||
|
|
||||||
void _init_properties();
|
MMSdf3dShapeTorus();
|
||||||
void _register_methods(const Variant &mm_graph_node);
|
~MMSdf3dShapeTorus();
|
||||||
Vector2 _get_property_value_sdf3d(const Vector3 &uv3);
|
|
||||||
int get_axis();
|
|
||||||
void set_axis(const int val);
|
|
||||||
float get_major_radius();
|
|
||||||
void set_major_radius(const float val);
|
|
||||||
float get_minor_radius();
|
|
||||||
void set_minor_radius(const float val);
|
|
||||||
|
|
||||||
Sdf3dShapeTorus();
|
protected:
|
||||||
~Sdf3dShapeTorus();
|
static void _bind_methods();
|
||||||
|
|
||||||
protected:
|
Ref<MMNodeUniversalProperty> output;
|
||||||
static void _bind_methods();
|
//export(int, "X,Y,Z")
|
||||||
|
int axis;
|
||||||
//tool
|
float major_radius;
|
||||||
//export(Resource)
|
float minor_radius;
|
||||||
Ref<Resource> output;
|
|
||||||
//export(int, "X,Y,Z")
|
|
||||||
int axis = 2;
|
|
||||||
//export(float)
|
|
||||||
float major_radius = 0.3;
|
|
||||||
//export(float)
|
|
||||||
float minor_radius = 0.15;
|
|
||||||
//axis
|
|
||||||
//major_radius
|
|
||||||
//minor_radius
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,139 +1,97 @@
|
|||||||
|
|
||||||
#include "sdf3d_tf_rotate.h"
|
#include "sdf3d_tf_rotate.h"
|
||||||
|
|
||||||
|
#include "../../algos/mm_algos.h"
|
||||||
|
#include "../../editor/mm_graph_node.h"
|
||||||
|
#include "../mm_material.h"
|
||||||
|
|
||||||
Ref<Resource> Sdf3dTfRotate::get_input() {
|
Ref<MMNodeUniversalProperty> MMSdf3dTfRotate::get_input() {
|
||||||
return input;
|
return input;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sdf3dTfRotate::set_input(const Ref<Resource> &val) {
|
void MMSdf3dTfRotate::set_input(const Ref<MMNodeUniversalProperty> &val) {
|
||||||
input = val;
|
input = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Ref<MMNodeUniversalProperty> MMSdf3dTfRotate::get_output() {
|
||||||
Ref<Resource> Sdf3dTfRotate::get_output() {
|
return output;
|
||||||
return output;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sdf3dTfRotate::set_output(const Ref<Resource> &val) {
|
void MMSdf3dTfRotate::set_output(const Ref<MMNodeUniversalProperty> &val) {
|
||||||
output = val;
|
output = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Vector3 MMSdf3dTfRotate::get_rotation() {
|
||||||
Vector3 Sdf3dTfRotate::get_rotation() {
|
return rotation;
|
||||||
return rotation;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sdf3dTfRotate::set_rotation(const Vector3 &val) {
|
void MMSdf3dTfRotate::set_rotation(const Vector3 &val) {
|
||||||
rotation = val;
|
rotation = val;
|
||||||
|
emit_changed();
|
||||||
|
output->do_emit_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MMSdf3dTfRotate::_init_properties() {
|
||||||
|
if (!input.is_valid()) {
|
||||||
|
input.instance();
|
||||||
|
input->set_default_type(MMNodeUniversalProperty::DEFAULT_TYPE_VECTOR2);
|
||||||
|
}
|
||||||
|
|
||||||
|
input->set_input_slot_type(MMNodeUniversalProperty::SLOT_TYPE_UNIVERSAL);
|
||||||
|
// input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_VECTOR2;
|
||||||
|
input->set_slot_name(">>> Input ");
|
||||||
|
|
||||||
//tool;
|
if (!input->is_connected("changed", this, "on_input_changed")) {
|
||||||
//export(Resource) ;
|
input->connect("changed", this, "on_input_changed");
|
||||||
Ref<Resource> input;
|
}
|
||||||
//export(Resource) ;
|
|
||||||
Ref<Resource> output;
|
|
||||||
//export(Vector3) ;
|
|
||||||
Vector3 rotation = Vector3();
|
|
||||||
|
|
||||||
void Sdf3dTfRotate::_init_properties() {
|
if (!output.is_valid()) {
|
||||||
|
output.instance();
|
||||||
|
output->set_default_type(MMNodeUniversalProperty::DEFAULT_TYPE_VECTOR2);
|
||||||
|
}
|
||||||
|
|
||||||
if (!input) {
|
output->set_output_slot_type(MMNodeUniversalProperty::SLOT_TYPE_FLOAT);
|
||||||
input = MMNodeUniversalProperty.new();
|
output->set_slot_name(">>> Output >>>");
|
||||||
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2;
|
output->set_get_value_from_owner(true);
|
||||||
|
|
||||||
|
register_input_property(input);
|
||||||
|
register_output_property(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL;
|
void MMSdf3dTfRotate::_register_methods(MMGraphNode *mm_graph_node) {
|
||||||
// input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_VECTOR2;
|
mm_graph_node->add_slot_label_universal(input);
|
||||||
input.slot_name = ">>> Input ";
|
mm_graph_node->add_slot_label_universal(output);
|
||||||
|
mm_graph_node->add_slot_vector3("get_rotation", "set_rotation", "Rotation", 0.01);
|
||||||
if (!input.is_connected("changed", self, "on_input_changed")) {
|
|
||||||
input.connect("changed", self, "on_input_changed");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Vector2 MMSdf3dTfRotate::_get_property_value_sdf3d(const Vector3 &uv3) {
|
||||||
if (!output) {
|
//$in(rotate3d($uv, -vec3($ax, $ay, $az)*0.01745329251));
|
||||||
output = MMNodeUniversalProperty.new();
|
return input->get_value_sdf3d(MMAlgos::rotate3d(uv3, -rotation * 0.01745329251));
|
||||||
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT;
|
void MMSdf3dTfRotate::on_input_changed() {
|
||||||
output.slot_name = ">>> Output >>>";
|
emit_changed();
|
||||||
output.get_value_from_owner = true;
|
output->do_emit_changed();
|
||||||
register_input_property(input);
|
|
||||||
register_output_property(output);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MMSdf3dTfRotate::MMSdf3dTfRotate() {
|
||||||
void Sdf3dTfRotate::_register_methods(const Variant &mm_graph_node) {
|
|
||||||
mm_graph_node.add_slot_label_universal(input);
|
|
||||||
mm_graph_node.add_slot_label_universal(output);
|
|
||||||
mm_graph_node.add_slot_vector3("get_rotation", "set_rotation", "Rotation", 0.01);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MMSdf3dTfRotate::~MMSdf3dTfRotate() {
|
||||||
Vector2 Sdf3dTfRotate::_get_property_value_sdf3d(const Vector3 &uv3) {
|
|
||||||
//$in(rotate3d($uv, -vec3($ax, $ay, $az)*0.01745329251));
|
|
||||||
return input.get_value_sdf3d(MMAlgos.rotate3d(uv3, -rotation * 0.01745329251));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//rotation;
|
void MMSdf3dTfRotate::_bind_methods() {
|
||||||
|
ClassDB::bind_method(D_METHOD("get_input"), &MMSdf3dTfRotate::get_input);
|
||||||
|
ClassDB::bind_method(D_METHOD("set_input", "value"), &MMSdf3dTfRotate::set_input);
|
||||||
|
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "input", PROPERTY_HINT_RESOURCE_TYPE, "MMNodeUniversalProperty"), "set_input", "get_input");
|
||||||
|
|
||||||
Vector3 Sdf3dTfRotate::get_rotation() {
|
ClassDB::bind_method(D_METHOD("get_output"), &MMSdf3dTfRotate::get_output);
|
||||||
return rotation;
|
ClassDB::bind_method(D_METHOD("set_output", "value"), &MMSdf3dTfRotate::set_output);
|
||||||
|
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "output", PROPERTY_HINT_RESOURCE_TYPE, "MMNodeUniversalProperty"), "set_output", "get_output");
|
||||||
|
|
||||||
|
ClassDB::bind_method(D_METHOD("get_rotation"), &MMSdf3dTfRotate::get_rotation);
|
||||||
|
ClassDB::bind_method(D_METHOD("set_rotation", "value"), &MMSdf3dTfRotate::set_rotation);
|
||||||
|
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "rotation"), "set_rotation", "get_rotation");
|
||||||
|
|
||||||
|
ClassDB::bind_method(D_METHOD("on_input_changed"), &MMSdf3dTfRotate::on_input_changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Sdf3dTfRotate::set_rotation(const Vector3 &val) {
|
|
||||||
rotation = val;
|
|
||||||
emit_changed();
|
|
||||||
output.emit_changed();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Sdf3dTfRotate::on_input_changed() {
|
|
||||||
emit_changed();
|
|
||||||
output.emit_changed();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Sdf3dTfRotate::Sdf3dTfRotate() {
|
|
||||||
input;
|
|
||||||
output;
|
|
||||||
rotation = Vector3();
|
|
||||||
}
|
|
||||||
|
|
||||||
Sdf3dTfRotate::~Sdf3dTfRotate() {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void Sdf3dTfRotate::_bind_methods() {
|
|
||||||
ClassDB::bind_method(D_METHOD("get_input"), &Sdf3dTfRotate::get_input);
|
|
||||||
ClassDB::bind_method(D_METHOD("set_input", "value"), &Sdf3dTfRotate::set_input);
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "input", PROPERTY_HINT_RESOURCE_TYPE, "Ref<Resource>"), "set_input", "get_input");
|
|
||||||
|
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_output"), &Sdf3dTfRotate::get_output);
|
|
||||||
ClassDB::bind_method(D_METHOD("set_output", "value"), &Sdf3dTfRotate::set_output);
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "output", PROPERTY_HINT_RESOURCE_TYPE, "Ref<Resource>"), "set_output", "get_output");
|
|
||||||
|
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_rotation"), &Sdf3dTfRotate::get_rotation);
|
|
||||||
ClassDB::bind_method(D_METHOD("set_rotation", "value"), &Sdf3dTfRotate::set_rotation);
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "rotation"), "set_rotation", "get_rotation");
|
|
||||||
|
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("_init_properties"), &Sdf3dTfRotate::_init_properties);
|
|
||||||
ClassDB::bind_method(D_METHOD("_register_methods", "mm_graph_node"), &Sdf3dTfRotate::_register_methods);
|
|
||||||
ClassDB::bind_method(D_METHOD("_get_property_value_sdf3d", "uv3"), &Sdf3dTfRotate::_get_property_value_sdf3d);
|
|
||||||
ClassDB::bind_method(D_METHOD("get_rotation"), &Sdf3dTfRotate::get_rotation);
|
|
||||||
ClassDB::bind_method(D_METHOD("set_rotation", "val"), &Sdf3dTfRotate::set_rotation);
|
|
||||||
ClassDB::bind_method(D_METHOD("on_input_changed"), &Sdf3dTfRotate::on_input_changed);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,43 +1,37 @@
|
|||||||
#ifndef SDF3D_TF_ROTATE_H
|
#ifndef MM_SDF3D_TF_ROTATE_H
|
||||||
#define SDF3D_TF_ROTATE_H
|
#define MM_SDF3D_TF_ROTATE_H
|
||||||
|
|
||||||
|
#include "../mm_node.h"
|
||||||
|
#include "../mm_node_universal_property.h"
|
||||||
|
|
||||||
class Sdf3dTfRotate : public MMNode {
|
class MMSdf3dTfRotate : public MMNode {
|
||||||
GDCLASS(Sdf3dTfRotate, MMNode);
|
GDCLASS(MMSdf3dTfRotate, MMNode);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Ref<MMNodeUniversalProperty> get_input();
|
||||||
|
void set_input(const Ref<MMNodeUniversalProperty> &val);
|
||||||
|
|
||||||
Ref<Resource> get_input();
|
Ref<MMNodeUniversalProperty> get_output();
|
||||||
void set_input(const Ref<Resource> &val);
|
void set_output(const Ref<MMNodeUniversalProperty> &val);
|
||||||
|
|
||||||
Ref<Resource> get_output();
|
Vector3 get_rotation();
|
||||||
void set_output(const Ref<Resource> &val);
|
void set_rotation(const Vector3 &val);
|
||||||
|
|
||||||
Vector3 get_rotation();
|
void _init_properties();
|
||||||
void set_rotation(const Vector3 &val);
|
void _register_methods(MMGraphNode *mm_graph_node);
|
||||||
|
Vector2 _get_property_value_sdf3d(const Vector3 &uv3);
|
||||||
|
|
||||||
void _init_properties();
|
void on_input_changed();
|
||||||
void _register_methods(const Variant &mm_graph_node);
|
|
||||||
Vector2 _get_property_value_sdf3d(const Vector3 &uv3);
|
|
||||||
Vector3 get_rotation();
|
|
||||||
void set_rotation(const Vector3 &val);
|
|
||||||
void on_input_changed();
|
|
||||||
|
|
||||||
Sdf3dTfRotate();
|
MMSdf3dTfRotate();
|
||||||
~Sdf3dTfRotate();
|
~MMSdf3dTfRotate();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
|
||||||
//tool
|
Ref<MMNodeUniversalProperty> input;
|
||||||
//export(Resource)
|
Ref<MMNodeUniversalProperty> output;
|
||||||
Ref<Resource> input;
|
Vector3 rotation;
|
||||||
//export(Resource)
|
|
||||||
Ref<Resource> output;
|
|
||||||
//export(Vector3)
|
|
||||||
Vector3 rotation = Vector3();
|
|
||||||
//rotation
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,139 +1,98 @@
|
|||||||
|
|
||||||
#include "sdf3d_tf_scale.h"
|
#include "sdf3d_tf_scale.h"
|
||||||
|
|
||||||
|
#include "../../algos/mm_algos.h"
|
||||||
|
#include "../../editor/mm_graph_node.h"
|
||||||
|
#include "../mm_material.h"
|
||||||
|
|
||||||
Ref<Resource> Sdf3dTfScale::get_input() {
|
Ref<MMNodeUniversalProperty> MMSdf3dTfScale::get_input() {
|
||||||
return input;
|
return input;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sdf3dTfScale::set_input(const Ref<Resource> &val) {
|
void MMSdf3dTfScale::set_input(const Ref<MMNodeUniversalProperty> &val) {
|
||||||
input = val;
|
input = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Ref<MMNodeUniversalProperty> MMSdf3dTfScale::get_output() {
|
||||||
Ref<Resource> Sdf3dTfScale::get_output() {
|
return output;
|
||||||
return output;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sdf3dTfScale::set_output(const Ref<Resource> &val) {
|
void MMSdf3dTfScale::set_output(const Ref<MMNodeUniversalProperty> &val) {
|
||||||
output = val;
|
output = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float MMSdf3dTfScale::get_scale() const {
|
||||||
float Sdf3dTfScale::get_scale() const {
|
return scale;
|
||||||
return scale;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sdf3dTfScale::set_scale(const float val) {
|
void MMSdf3dTfScale::set_scale(const float val) {
|
||||||
scale = val;
|
scale = val;
|
||||||
|
emit_changed();
|
||||||
|
output->do_emit_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MMSdf3dTfScale::_init_properties() {
|
||||||
|
if (!input.is_valid()) {
|
||||||
|
input.instance();
|
||||||
|
input->set_default_type(MMNodeUniversalProperty::DEFAULT_TYPE_VECTOR2);
|
||||||
|
}
|
||||||
|
|
||||||
|
input->set_input_slot_type(MMNodeUniversalProperty::SLOT_TYPE_UNIVERSAL);
|
||||||
|
// input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_VECTOR2;
|
||||||
|
input->set_slot_name(">>> Input ");
|
||||||
|
|
||||||
//tool;
|
if (!input->is_connected("changed", this, "on_input_changed")) {
|
||||||
//export(Resource) ;
|
input->connect("changed", this, "on_input_changed");
|
||||||
Ref<Resource> input;
|
}
|
||||||
//export(Resource) ;
|
|
||||||
Ref<Resource> output;
|
|
||||||
//export(float) ;
|
|
||||||
float scale = 1;
|
|
||||||
|
|
||||||
void Sdf3dTfScale::_init_properties() {
|
if (!output.is_valid()) {
|
||||||
|
output.instance();
|
||||||
|
output->set_default_type(MMNodeUniversalProperty::DEFAULT_TYPE_VECTOR2);
|
||||||
|
}
|
||||||
|
|
||||||
if (!input) {
|
output->set_output_slot_type(MMNodeUniversalProperty::SLOT_TYPE_FLOAT);
|
||||||
input = MMNodeUniversalProperty.new();
|
output->set_slot_name(">>> Output >>>");
|
||||||
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2;
|
output->set_get_value_from_owner(true);
|
||||||
|
|
||||||
|
register_input_property(input);
|
||||||
|
register_output_property(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL;
|
void MMSdf3dTfScale::_register_methods(MMGraphNode *mm_graph_node) {
|
||||||
// input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_VECTOR2;
|
mm_graph_node->add_slot_label_universal(input);
|
||||||
input.slot_name = ">>> Input ";
|
mm_graph_node->add_slot_label_universal(output);
|
||||||
|
mm_graph_node->add_slot_float("get_scale", "set_scale", "Scale", 0.01);
|
||||||
if (!input.is_connected("changed", self, "on_input_changed")) {
|
|
||||||
input.connect("changed", self, "on_input_changed");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Vector2 MMSdf3dTfScale::_get_property_value_sdf3d(const Vector3 &uv3) {
|
||||||
if (!output) {
|
//vec2 $(name_uv)_in = $in(($uv)/$s);
|
||||||
output = MMNodeUniversalProperty.new();
|
return input->get_value_sdf3d(uv3 / scale);
|
||||||
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT;
|
void MMSdf3dTfScale::on_input_changed() {
|
||||||
output.slot_name = ">>> Output >>>";
|
emit_changed();
|
||||||
output.get_value_from_owner = true;
|
output->do_emit_changed();
|
||||||
register_input_property(input);
|
|
||||||
register_output_property(output);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MMSdf3dTfScale::MMSdf3dTfScale() {
|
||||||
void Sdf3dTfScale::_register_methods(const Variant &mm_graph_node) {
|
scale = 1;
|
||||||
mm_graph_node.add_slot_label_universal(input);
|
|
||||||
mm_graph_node.add_slot_label_universal(output);
|
|
||||||
mm_graph_node.add_slot_float("get_scale", "set_scale", "Scale", 0.01);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MMSdf3dTfScale::~MMSdf3dTfScale() {
|
||||||
Vector2 Sdf3dTfScale::_get_property_value_sdf3d(const Vector3 &uv3) {
|
|
||||||
//vec2 $(name_uv)_in = $in(($uv)/$s);
|
|
||||||
return input.get_value_sdf3d(uv3 / scale);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//scale;
|
void MMSdf3dTfScale::_bind_methods() {
|
||||||
|
ClassDB::bind_method(D_METHOD("get_input"), &MMSdf3dTfScale::get_input);
|
||||||
|
ClassDB::bind_method(D_METHOD("set_input", "value"), &MMSdf3dTfScale::set_input);
|
||||||
|
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "input", PROPERTY_HINT_RESOURCE_TYPE, "MMNodeUniversalProperty"), "set_input", "get_input");
|
||||||
|
|
||||||
float Sdf3dTfScale::get_scale() {
|
ClassDB::bind_method(D_METHOD("get_output"), &MMSdf3dTfScale::get_output);
|
||||||
return scale;
|
ClassDB::bind_method(D_METHOD("set_output", "value"), &MMSdf3dTfScale::set_output);
|
||||||
|
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "output", PROPERTY_HINT_RESOURCE_TYPE, "MMNodeUniversalProperty"), "set_output", "get_output");
|
||||||
|
|
||||||
|
ClassDB::bind_method(D_METHOD("get_scale"), &MMSdf3dTfScale::get_scale);
|
||||||
|
ClassDB::bind_method(D_METHOD("set_scale", "value"), &MMSdf3dTfScale::set_scale);
|
||||||
|
ADD_PROPERTY(PropertyInfo(Variant::REAL, "scale"), "set_scale", "get_scale");
|
||||||
|
|
||||||
|
ClassDB::bind_method(D_METHOD("on_input_changed"), &MMSdf3dTfScale::on_input_changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Sdf3dTfScale::set_scale(const float val) {
|
|
||||||
scale = val;
|
|
||||||
emit_changed();
|
|
||||||
output.emit_changed();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Sdf3dTfScale::on_input_changed() {
|
|
||||||
emit_changed();
|
|
||||||
output.emit_changed();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Sdf3dTfScale::Sdf3dTfScale() {
|
|
||||||
input;
|
|
||||||
output;
|
|
||||||
scale = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
Sdf3dTfScale::~Sdf3dTfScale() {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void Sdf3dTfScale::_bind_methods() {
|
|
||||||
ClassDB::bind_method(D_METHOD("get_input"), &Sdf3dTfScale::get_input);
|
|
||||||
ClassDB::bind_method(D_METHOD("set_input", "value"), &Sdf3dTfScale::set_input);
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "input", PROPERTY_HINT_RESOURCE_TYPE, "Ref<Resource>"), "set_input", "get_input");
|
|
||||||
|
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_output"), &Sdf3dTfScale::get_output);
|
|
||||||
ClassDB::bind_method(D_METHOD("set_output", "value"), &Sdf3dTfScale::set_output);
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "output", PROPERTY_HINT_RESOURCE_TYPE, "Ref<Resource>"), "set_output", "get_output");
|
|
||||||
|
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_scale"), &Sdf3dTfScale::get_scale);
|
|
||||||
ClassDB::bind_method(D_METHOD("set_scale", "value"), &Sdf3dTfScale::set_scale);
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::REAL, "scale"), "set_scale", "get_scale");
|
|
||||||
|
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("_init_properties"), &Sdf3dTfScale::_init_properties);
|
|
||||||
ClassDB::bind_method(D_METHOD("_register_methods", "mm_graph_node"), &Sdf3dTfScale::_register_methods);
|
|
||||||
ClassDB::bind_method(D_METHOD("_get_property_value_sdf3d", "uv3"), &Sdf3dTfScale::_get_property_value_sdf3d);
|
|
||||||
ClassDB::bind_method(D_METHOD("get_scale"), &Sdf3dTfScale::get_scale);
|
|
||||||
ClassDB::bind_method(D_METHOD("set_scale", "val"), &Sdf3dTfScale::set_scale);
|
|
||||||
ClassDB::bind_method(D_METHOD("on_input_changed"), &Sdf3dTfScale::on_input_changed);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,43 +1,37 @@
|
|||||||
#ifndef SDF3D_TF_SCALE_H
|
#ifndef MM_SDF3D_TF_SCALE_H
|
||||||
#define SDF3D_TF_SCALE_H
|
#define MM_SDF3D_TF_SCALE_H
|
||||||
|
|
||||||
|
#include "../mm_node.h"
|
||||||
|
#include "../mm_node_universal_property.h"
|
||||||
|
|
||||||
class Sdf3dTfScale : public MMNode {
|
class MMSdf3dTfScale : public MMNode {
|
||||||
GDCLASS(Sdf3dTfScale, MMNode);
|
GDCLASS(MMSdf3dTfScale, MMNode);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Ref<MMNodeUniversalProperty> get_input();
|
||||||
|
void set_input(const Ref<MMNodeUniversalProperty> &val);
|
||||||
|
|
||||||
Ref<Resource> get_input();
|
Ref<MMNodeUniversalProperty> get_output();
|
||||||
void set_input(const Ref<Resource> &val);
|
void set_output(const Ref<MMNodeUniversalProperty> &val);
|
||||||
|
|
||||||
Ref<Resource> get_output();
|
float get_scale() const;
|
||||||
void set_output(const Ref<Resource> &val);
|
void set_scale(const float val);
|
||||||
|
|
||||||
float get_scale() const;
|
void _init_properties();
|
||||||
void set_scale(const float val);
|
void _register_methods(MMGraphNode *mm_graph_node);
|
||||||
|
Vector2 _get_property_value_sdf3d(const Vector3 &uv3);
|
||||||
|
|
||||||
void _init_properties();
|
void on_input_changed();
|
||||||
void _register_methods(const Variant &mm_graph_node);
|
|
||||||
Vector2 _get_property_value_sdf3d(const Vector3 &uv3);
|
|
||||||
float get_scale();
|
|
||||||
void set_scale(const float val);
|
|
||||||
void on_input_changed();
|
|
||||||
|
|
||||||
Sdf3dTfScale();
|
MMSdf3dTfScale();
|
||||||
~Sdf3dTfScale();
|
~MMSdf3dTfScale();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
|
||||||
//tool
|
Ref<MMNodeUniversalProperty> input;
|
||||||
//export(Resource)
|
Ref<MMNodeUniversalProperty> output;
|
||||||
Ref<Resource> input;
|
float scale;
|
||||||
//export(Resource)
|
|
||||||
Ref<Resource> output;
|
|
||||||
//export(float)
|
|
||||||
float scale = 1;
|
|
||||||
//scale
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -61,8 +61,12 @@ SOFTWARE.
|
|||||||
#include "nodes/simple/image.h"
|
#include "nodes/simple/image.h"
|
||||||
#include "nodes/simple/shape.h"
|
#include "nodes/simple/shape.h"
|
||||||
|
|
||||||
|
#include "nodes/sdf3d/sdf3d_tf_rotate.h"
|
||||||
|
#include "nodes/sdf3d/sdf3d_tf_scale.h"
|
||||||
#include "nodes/sdf3d/sdf3d_tf_translate.h"
|
#include "nodes/sdf3d/sdf3d_tf_translate.h"
|
||||||
|
|
||||||
|
#include "nodes/sdf3d/sdf3d_shape_torus.h"
|
||||||
|
|
||||||
static _MMAlgos *_mm_algos_singleton = nullptr;
|
static _MMAlgos *_mm_algos_singleton = nullptr;
|
||||||
|
|
||||||
void register_material_maker_types() {
|
void register_material_maker_types() {
|
||||||
@ -115,7 +119,14 @@ void register_material_maker_types() {
|
|||||||
MMAlgos::register_node_class("Simple", "MMCurve");
|
MMAlgos::register_node_class("Simple", "MMCurve");
|
||||||
|
|
||||||
ClassDB::register_class<MMSdf3dTfTranslate>();
|
ClassDB::register_class<MMSdf3dTfTranslate>();
|
||||||
MMAlgos::register_node_class("SDF3D", "MMSdf3dTfTranslate");
|
MMAlgos::register_node_class("SDF3D - TF", "MMSdf3dTfTranslate");
|
||||||
|
ClassDB::register_class<MMSdf3dTfScale>();
|
||||||
|
MMAlgos::register_node_class("SDF3D - TF", "MMSdf3dTfScale");
|
||||||
|
ClassDB::register_class<MMSdf3dTfRotate>();
|
||||||
|
MMAlgos::register_node_class("SDF3D - TF", "MMSdf3dTfRotate");
|
||||||
|
|
||||||
|
ClassDB::register_class<MMSdf3dShapeTorus>();
|
||||||
|
MMAlgos::register_node_class("SDF3D - Shape", "MMSdf3dShapeTorus");
|
||||||
|
|
||||||
_mm_algos_singleton = memnew(_MMAlgos);
|
_mm_algos_singleton = memnew(_MMAlgos);
|
||||||
Engine::get_singleton()->add_singleton(Engine::Singleton("MMAlgos", _MMAlgos::get_singleton()));
|
Engine::get_singleton()->add_singleton(Engine::Singleton("MMAlgos", _MMAlgos::get_singleton()));
|
||||||
|
Loading…
Reference in New Issue
Block a user