parent
2ca19f9116
commit
5d9e56ecec
|
@ -243,7 +243,7 @@ bool CPUParticles2D::get_fractional_delta() const {
|
|||
}
|
||||
|
||||
TypedArray<String> CPUParticles2D::get_configuration_warnings() const {
|
||||
TypedArray<String> warnings = Node::get_configuration_warnings();
|
||||
TypedArray<String> warnings = Node2D::get_configuration_warnings();
|
||||
|
||||
CanvasItemMaterial *mat = Object::cast_to<CanvasItemMaterial>(get_material().ptr());
|
||||
|
||||
|
@ -314,6 +314,8 @@ void CPUParticles2D::set_param_max(Parameter p_param, real_t p_value) {
|
|||
if (parameters_min[p_param] > parameters_max[p_param]) {
|
||||
set_param_min(p_param, p_value);
|
||||
}
|
||||
|
||||
update_configuration_warnings();
|
||||
}
|
||||
|
||||
real_t CPUParticles2D::get_param_max(Parameter p_param) const {
|
||||
|
@ -374,6 +376,8 @@ void CPUParticles2D::set_param_curve(Parameter p_param, const Ref<Curve> &p_curv
|
|||
default: {
|
||||
}
|
||||
}
|
||||
|
||||
update_configuration_warnings();
|
||||
}
|
||||
|
||||
Ref<Curve> CPUParticles2D::get_param_curve(Parameter p_param) const {
|
||||
|
|
|
@ -141,7 +141,6 @@ void GPUParticles2D::set_process_material(const Ref<Material> &p_material) {
|
|||
void GPUParticles2D::set_trail_enabled(bool p_enabled) {
|
||||
trail_enabled = p_enabled;
|
||||
RS::get_singleton()->particles_set_trails(particles, trail_enabled, trail_length);
|
||||
update_configuration_warnings();
|
||||
update();
|
||||
|
||||
RS::get_singleton()->particles_set_transform_align(particles, p_enabled ? RS::PARTICLES_TRANSFORM_ALIGN_Y_TO_VELOCITY : RS::PARTICLES_TRANSFORM_ALIGN_DISABLED);
|
||||
|
@ -297,7 +296,7 @@ bool GPUParticles2D::get_interpolate() const {
|
|||
}
|
||||
|
||||
TypedArray<String> GPUParticles2D::get_configuration_warnings() const {
|
||||
TypedArray<String> warnings = Node::get_configuration_warnings();
|
||||
TypedArray<String> warnings = Node2D::get_configuration_warnings();
|
||||
|
||||
if (RenderingServer::get_singleton()->is_low_end()) {
|
||||
warnings.push_back(RTR("GPU-based particles are not supported by the OpenGL video driver.\nUse the CPUParticles2D node instead. You can use the \"Convert to CPUParticles2D\" option for this purpose."));
|
||||
|
|
|
@ -164,6 +164,8 @@ void CPUParticles3D::set_mesh(const Ref<Mesh> &p_mesh) {
|
|||
} else {
|
||||
RS::get_singleton()->multimesh_set_mesh(multimesh, RID());
|
||||
}
|
||||
|
||||
update_configuration_warnings();
|
||||
}
|
||||
|
||||
Ref<Mesh> CPUParticles3D::get_mesh() const {
|
||||
|
@ -187,7 +189,7 @@ bool CPUParticles3D::get_fractional_delta() const {
|
|||
}
|
||||
|
||||
TypedArray<String> CPUParticles3D::get_configuration_warnings() const {
|
||||
TypedArray<String> warnings = Node::get_configuration_warnings();
|
||||
TypedArray<String> warnings = GeometryInstance3D::get_configuration_warnings();
|
||||
|
||||
bool mesh_found = false;
|
||||
bool anim_material_found = false;
|
||||
|
@ -266,6 +268,8 @@ void CPUParticles3D::set_param_min(Parameter p_param, real_t p_value) {
|
|||
if (parameters_min[p_param] > parameters_max[p_param]) {
|
||||
set_param_max(p_param, p_value);
|
||||
}
|
||||
|
||||
update_configuration_warnings();
|
||||
}
|
||||
|
||||
real_t CPUParticles3D::get_param_min(Parameter p_param) const {
|
||||
|
@ -276,10 +280,13 @@ real_t CPUParticles3D::get_param_min(Parameter p_param) const {
|
|||
|
||||
void CPUParticles3D::set_param_max(Parameter p_param, real_t p_value) {
|
||||
ERR_FAIL_INDEX(p_param, PARAM_MAX);
|
||||
|
||||
parameters_max[p_param] = p_value;
|
||||
if (parameters_min[p_param] > parameters_max[p_param]) {
|
||||
set_param_min(p_param, p_value);
|
||||
}
|
||||
|
||||
update_configuration_warnings();
|
||||
}
|
||||
|
||||
real_t CPUParticles3D::get_param_max(Parameter p_param) const {
|
||||
|
@ -340,6 +347,8 @@ void CPUParticles3D::set_param_curve(Parameter p_param, const Ref<Curve> &p_curv
|
|||
default: {
|
||||
}
|
||||
}
|
||||
|
||||
update_configuration_warnings();
|
||||
}
|
||||
|
||||
Ref<Curve> CPUParticles3D::get_param_curve(Parameter p_param) const {
|
||||
|
|
|
@ -270,7 +270,7 @@ bool GPUParticles3D::get_interpolate() const {
|
|||
}
|
||||
|
||||
TypedArray<String> GPUParticles3D::get_configuration_warnings() const {
|
||||
TypedArray<String> warnings = Node::get_configuration_warnings();
|
||||
TypedArray<String> warnings = GeometryInstance3D::get_configuration_warnings();
|
||||
|
||||
if (RenderingServer::get_singleton()->is_low_end()) {
|
||||
warnings.push_back(RTR("GPU-based particles are not supported by the OpenGL video driver.\nUse the CPUParticles3D node instead. You can use the \"Convert to CPUParticles3D\" option for this purpose."));
|
||||
|
|
Loading…
Reference in New Issue