mirror of
https://github.com/Relintai/terraman.git
synced 2025-04-25 21:45:00 +02:00
Renamed the new class to TerraMesherJobStep, as it can be used in every mesher.
This commit is contained in:
parent
6e1cff8d5a
commit
c63fe5238a
2
SCsub
2
SCsub
@ -64,7 +64,7 @@ sources = [
|
||||
|
||||
"world/jobs/terra_job.cpp",
|
||||
"world/jobs/terra_terrarin_job.cpp",
|
||||
"world/jobs/terra_terrarin_job_step.cpp",
|
||||
"world/jobs/terra_mesher_job_step.cpp",
|
||||
"world/jobs/terra_light_job.cpp",
|
||||
"world/jobs/terra_prop_job.cpp",
|
||||
]
|
||||
|
@ -65,7 +65,7 @@ SOFTWARE.
|
||||
#include "world/jobs/terra_light_job.h"
|
||||
#include "world/jobs/terra_prop_job.h"
|
||||
#include "world/jobs/terra_terrarin_job.h"
|
||||
#include "world/jobs/terra_terrarin_job_step.h"
|
||||
#include "world/jobs/terra_mesher_job_step.h"
|
||||
|
||||
void register_terraman_types() {
|
||||
ClassDB::register_class<TerraMesher>();
|
||||
@ -106,7 +106,7 @@ void register_terraman_types() {
|
||||
|
||||
ClassDB::register_class<TerraJob>();
|
||||
ClassDB::register_class<TerraTerrarinJob>();
|
||||
ClassDB::register_class<TerraTerrarinJobStep>();
|
||||
ClassDB::register_class<TerraMesherJobStep>();
|
||||
ClassDB::register_class<TerraLightJob>();
|
||||
ClassDB::register_class<TerraPropJob>();
|
||||
|
||||
|
@ -20,39 +20,39 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "terra_terrarin_job_step.h"
|
||||
#include "terra_mesher_job_step.h"
|
||||
|
||||
const String TerraTerrarinJobStep::BINDING_STRING_TERRA_TERRARIN_JOB_STEP_TYPE = "Normal,Drop UV2,Merge Verts,Bake Texture";
|
||||
const String TerraMesherJobStep::BINDING_STRING_TERRA_TERRARIN_JOB_STEP_TYPE = "Normal,Drop UV2,Merge Verts,Bake Texture";
|
||||
|
||||
TerraTerrarinJobStep::TerraTerrarinJobStepType TerraTerrarinJobStep::get_job_type() const {
|
||||
TerraMesherJobStep::TerraMesherJobStepType TerraMesherJobStep::get_job_type() const {
|
||||
return _job_type;
|
||||
}
|
||||
void TerraTerrarinJobStep::set_job_type(const TerraTerrarinJobStep::TerraTerrarinJobStepType value) {
|
||||
void TerraMesherJobStep::set_job_type(const TerraMesherJobStep::TerraMesherJobStepType value) {
|
||||
_job_type = value;
|
||||
}
|
||||
|
||||
int TerraTerrarinJobStep::get_lod_index() const {
|
||||
int TerraMesherJobStep::get_lod_index() const {
|
||||
return _lod_index;
|
||||
}
|
||||
void TerraTerrarinJobStep::set_lod_index(const int value) {
|
||||
void TerraMesherJobStep::set_lod_index(const int value) {
|
||||
_lod_index = value;
|
||||
}
|
||||
|
||||
TerraTerrarinJobStep::TerraTerrarinJobStep() {
|
||||
TerraMesherJobStep::TerraMesherJobStep() {
|
||||
_job_type = TYPE_NORMAL;
|
||||
_lod_index = 0;
|
||||
}
|
||||
|
||||
TerraTerrarinJobStep::~TerraTerrarinJobStep() {
|
||||
TerraMesherJobStep::~TerraMesherJobStep() {
|
||||
}
|
||||
|
||||
void TerraTerrarinJobStep::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_job_type"), &TerraTerrarinJobStep::get_job_type);
|
||||
ClassDB::bind_method(D_METHOD("set_job_type", "value"), &TerraTerrarinJobStep::set_job_type);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "job_type", PROPERTY_HINT_ENUM, TerraTerrarinJobStep::BINDING_STRING_TERRA_TERRARIN_JOB_STEP_TYPE), "set_job_type", "get_job_type");
|
||||
void TerraMesherJobStep::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_job_type"), &TerraMesherJobStep::get_job_type);
|
||||
ClassDB::bind_method(D_METHOD("set_job_type", "value"), &TerraMesherJobStep::set_job_type);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "job_type", PROPERTY_HINT_ENUM, TerraMesherJobStep::BINDING_STRING_TERRA_TERRARIN_JOB_STEP_TYPE), "set_job_type", "get_job_type");
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_lod_index"), &TerraTerrarinJobStep::get_lod_index);
|
||||
ClassDB::bind_method(D_METHOD("set_lod_index", "value"), &TerraTerrarinJobStep::set_lod_index);
|
||||
ClassDB::bind_method(D_METHOD("get_lod_index"), &TerraMesherJobStep::get_lod_index);
|
||||
ClassDB::bind_method(D_METHOD("set_lod_index", "value"), &TerraMesherJobStep::set_lod_index);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "lod_index"), "set_lod_index", "get_lod_index");
|
||||
|
||||
BIND_ENUM_CONSTANT(TYPE_NORMAL);
|
@ -31,11 +31,11 @@ SOFTWARE.
|
||||
#include "core/reference.h"
|
||||
#endif
|
||||
|
||||
class TerraTerrarinJobStep : public Reference {
|
||||
GDCLASS(TerraTerrarinJobStep, Reference);
|
||||
class TerraMesherJobStep : public Reference {
|
||||
GDCLASS(TerraMesherJobStep, Reference);
|
||||
|
||||
public:
|
||||
enum TerraTerrarinJobStepType {
|
||||
enum TerraMesherJobStepType {
|
||||
TYPE_NORMAL = 0,
|
||||
TYPE_DROP_UV2,
|
||||
TYPE_MERGE_VERTS,
|
||||
@ -44,22 +44,22 @@ public:
|
||||
|
||||
static const String BINDING_STRING_TERRA_TERRARIN_JOB_STEP_TYPE;
|
||||
|
||||
TerraTerrarinJobStepType get_job_type() const;
|
||||
void set_job_type(const TerraTerrarinJobStepType value);
|
||||
TerraMesherJobStepType get_job_type() const;
|
||||
void set_job_type(const TerraMesherJobStepType value);
|
||||
|
||||
int get_lod_index() const;
|
||||
void set_lod_index(const int value);
|
||||
|
||||
TerraTerrarinJobStep();
|
||||
~TerraTerrarinJobStep();
|
||||
TerraMesherJobStep();
|
||||
~TerraMesherJobStep();
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
||||
TerraTerrarinJobStepType _job_type;
|
||||
TerraMesherJobStepType _job_type;
|
||||
int _lod_index;
|
||||
};
|
||||
|
||||
VARIANT_ENUM_CAST(TerraTerrarinJobStep::TerraTerrarinJobStepType);
|
||||
VARIANT_ENUM_CAST(TerraMesherJobStep::TerraMesherJobStepType);
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user