Moved PropMesherJobStep to the jobs folder.

This commit is contained in:
Relintai 2021-08-09 11:23:40 +02:00
parent 0eee4dba90
commit 3c20bd4ec6
4 changed files with 10 additions and 11 deletions

2
SCsub
View File

@ -50,7 +50,7 @@ sources = [
"jobs/prop_texture_job.cpp", "jobs/prop_texture_job.cpp",
"prop_mesher_job_step.cpp", "jobs/prop_mesher_job_step.cpp",
] ]
if ARGUMENTS.get('custom_modules_shared', 'no') == 'yes': if ARGUMENTS.get('custom_modules_shared', 'no') == 'yes':

View File

@ -22,7 +22,7 @@ SOFTWARE.
#include "prop_mesher_job_step.h" #include "prop_mesher_job_step.h"
const String PropMesherJobStep::BINDING_STRING_TERRA_TERRARIN_JOB_STEP_TYPE = "Normal,Normal LOD,Drop UV2,Merge Verts,Bake Texture,Simplify Mesh"; const String PropMesherJobStep::BINDING_STRING_PROP_MESHER_JOB_STEP_TYPE = "Normal,Normal LOD,Drop UV2,Merge Verts,Bake Texture,Simplify Mesh";
PropMesherJobStep::PropMesherJobStepType PropMesherJobStep::get_job_type() const { PropMesherJobStep::PropMesherJobStepType PropMesherJobStep::get_job_type() const {
return _job_type; return _job_type;
@ -89,7 +89,7 @@ PropMesherJobStep::~PropMesherJobStep() {
void PropMesherJobStep::_bind_methods() { void PropMesherJobStep::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_job_type"), &PropMesherJobStep::get_job_type); ClassDB::bind_method(D_METHOD("get_job_type"), &PropMesherJobStep::get_job_type);
ClassDB::bind_method(D_METHOD("set_job_type", "value"), &PropMesherJobStep::set_job_type); ClassDB::bind_method(D_METHOD("set_job_type", "value"), &PropMesherJobStep::set_job_type);
ADD_PROPERTY(PropertyInfo(Variant::INT, "job_type", PROPERTY_HINT_ENUM, PropMesherJobStep::BINDING_STRING_TERRA_TERRARIN_JOB_STEP_TYPE), "set_job_type", "get_job_type"); ADD_PROPERTY(PropertyInfo(Variant::INT, "job_type", PROPERTY_HINT_ENUM, PropMesherJobStep::BINDING_STRING_PROP_MESHER_JOB_STEP_TYPE), "set_job_type", "get_job_type");
ClassDB::bind_method(D_METHOD("get_lod_index"), &PropMesherJobStep::get_lod_index); ClassDB::bind_method(D_METHOD("get_lod_index"), &PropMesherJobStep::get_lod_index);
ClassDB::bind_method(D_METHOD("set_lod_index", "value"), &PropMesherJobStep::set_lod_index); ClassDB::bind_method(D_METHOD("set_lod_index", "value"), &PropMesherJobStep::set_lod_index);
@ -119,7 +119,5 @@ void PropMesherJobStep::_bind_methods() {
BIND_ENUM_CONSTANT(TYPE_MERGE_VERTS); BIND_ENUM_CONSTANT(TYPE_MERGE_VERTS);
BIND_ENUM_CONSTANT(TYPE_BAKE_TEXTURE); BIND_ENUM_CONSTANT(TYPE_BAKE_TEXTURE);
BIND_ENUM_CONSTANT(TYPE_SIMPLIFY_MESH); BIND_ENUM_CONSTANT(TYPE_SIMPLIFY_MESH);
BIND_ENUM_CONSTANT(TYPE_BAKE_VERTEX_COLOR_AO);
BIND_ENUM_CONSTANT(TYPE_BAKE_VERTEX_COLOR_RAO);
BIND_ENUM_CONSTANT(TYPE_OTHER); BIND_ENUM_CONSTANT(TYPE_OTHER);
} }

View File

@ -32,13 +32,17 @@ SOFTWARE.
#endif #endif
#ifdef MESH_UTILS_PRESENT #ifdef MESH_UTILS_PRESENT
#include "../mesh_utils/fast_quadratic_mesh_simplifier.h" #include "../../mesh_utils/fast_quadratic_mesh_simplifier.h"
#endif #endif
class PropMesherJobStep : public Reference { class PropMesherJobStep : public Reference {
GDCLASS(PropMesherJobStep, Reference); GDCLASS(PropMesherJobStep, Reference);
public: public:
//todo add:
//type generate lighting,
//type skip (this would leave the mesh empty)
//type previous mesh (this would set the previous mesh's rid to the current lod level)
enum PropMesherJobStepType { enum PropMesherJobStepType {
TYPE_NORMAL = 0, TYPE_NORMAL = 0,
TYPE_NORMAL_LOD, TYPE_NORMAL_LOD,
@ -46,12 +50,10 @@ public:
TYPE_MERGE_VERTS, TYPE_MERGE_VERTS,
TYPE_BAKE_TEXTURE, TYPE_BAKE_TEXTURE,
TYPE_SIMPLIFY_MESH, TYPE_SIMPLIFY_MESH,
TYPE_BAKE_VERTEX_COLOR_AO,
TYPE_BAKE_VERTEX_COLOR_RAO,
TYPE_OTHER, TYPE_OTHER,
}; };
static const String BINDING_STRING_TERRA_TERRARIN_JOB_STEP_TYPE; static const String BINDING_STRING_PROP_MESHER_JOB_STEP_TYPE;
PropMesherJobStepType get_job_type() const; PropMesherJobStepType get_job_type() const;
void set_job_type(const PropMesherJobStepType value); void set_job_type(const PropMesherJobStepType value);

View File

@ -47,11 +47,10 @@ SOFTWARE.
#include "prop_instance_prop_job.h" #include "prop_instance_prop_job.h"
#include "jobs/prop_texture_job.h" #include "jobs/prop_texture_job.h"
#include "jobs/prop_mesher_job_step.h"
#include "prop_scene_instance.h" #include "prop_scene_instance.h"
#include "prop_mesher_job_step.h"
#include "singleton/prop_texture_cache.h" #include "singleton/prop_texture_cache.h"
#include "singleton/prop_utils.h" #include "singleton/prop_utils.h"