mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Fix issues with CPUParticles and related conversion from Particles. Closes #20126
This commit is contained in:
parent
0e8f2c81cc
commit
ec85fd554b
6 changed files with 29 additions and 4 deletions
|
|
@ -40,7 +40,6 @@ bool ParticlesEditorBase::_generate(PoolVector<Vector3> &points, PoolVector<Vect
|
|||
|
||||
float area_accum = 0;
|
||||
Map<float, int> triangle_area_map;
|
||||
print_line("geometry size: " + itos(geometry.size()));
|
||||
|
||||
for (int i = 0; i < geometry.size(); i++) {
|
||||
|
||||
|
|
@ -300,6 +299,10 @@ void ParticlesEditor::_menu_option(int p_option) {
|
|||
|
||||
CPUParticles *cpu_particles = memnew(CPUParticles);
|
||||
cpu_particles->convert_from_particles(node);
|
||||
cpu_particles->set_name(node->get_name());
|
||||
cpu_particles->set_transform(node->get_transform());
|
||||
cpu_particles->set_visible(node->is_visible());
|
||||
cpu_particles->set_pause_mode(node->get_pause_mode());
|
||||
|
||||
undo_redo->create_action("Replace Particles by CPUParticles");
|
||||
undo_redo->add_do_method(node, "replace_by", cpu_particles);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue