Set up job steps in PropInstanceMerger.

This commit is contained in:
Relintai 2021-08-10 10:13:16 +02:00
parent 33cc53c881
commit 0d4d55278f

View File

@ -48,6 +48,7 @@ typedef class RenderingServer VS;
#include "./props/prop_data_light.h"
#include "./props/prop_data_prop.h"
#include "./props/prop_data_scene.h"
#include "jobs/prop_mesher_job_step.h"
#include "material_cache/prop_material_cache.h"
#if TEXTURE_PACKER_PRESENT
@ -401,8 +402,23 @@ void PropInstanceMerger::_build() {
}
if (!_job.is_valid()) {
//todo this should probably be in a virtual method, lik ein Terraman or Voxelman
_job = Ref<PropInstanceJob>(memnew(PropInstancePropJob()));
_job->set_prop_instace(this);
Ref<PropMesherJobStep> js;
js.instance();
js->set_job_type(PropMesherJobStep::TYPE_NORMAL);
_job->add_jobs_step(js);
js.instance();
js->set_job_type(PropMesherJobStep::TYPE_MERGE_VERTS);
_job->add_jobs_step(js);
js.instance();
js->set_job_type(PropMesherJobStep::TYPE_BAKE_TEXTURE);
_job->add_jobs_step(js);
}
if (!is_inside_tree()) {