You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
made visual shader ports expandable by default if there is only one output port and it's of any vector type
Co-authored-by: QbieShay <cislaghi.ilaria@gmail.com>
This commit is contained in:
@@ -40,9 +40,9 @@ int VisualShaderNodeParticleEmitter::get_output_port_count() const {
|
||||
|
||||
VisualShaderNodeParticleEmitter::PortType VisualShaderNodeParticleEmitter::get_output_port_type(int p_port) const {
|
||||
if (mode_2d) {
|
||||
return PORT_TYPE_VECTOR_2D;
|
||||
return p_port == 0 ? PORT_TYPE_VECTOR_2D : PORT_TYPE_SCALAR;
|
||||
}
|
||||
return PORT_TYPE_VECTOR_3D;
|
||||
return p_port == 0 ? PORT_TYPE_VECTOR_3D : PORT_TYPE_SCALAR;
|
||||
}
|
||||
|
||||
String VisualShaderNodeParticleEmitter::get_output_port_name(int p_port) const {
|
||||
@@ -785,7 +785,7 @@ int VisualShaderNodeParticleMultiplyByAxisAngle::get_output_port_count() const {
|
||||
}
|
||||
|
||||
VisualShaderNodeParticleMultiplyByAxisAngle::PortType VisualShaderNodeParticleMultiplyByAxisAngle::get_output_port_type(int p_port) const {
|
||||
return PORT_TYPE_VECTOR_3D;
|
||||
return p_port == 0 ? PORT_TYPE_VECTOR_3D : PORT_TYPE_SCALAR;
|
||||
}
|
||||
|
||||
String VisualShaderNodeParticleMultiplyByAxisAngle::get_output_port_name(int p_port) const {
|
||||
@@ -859,7 +859,7 @@ int VisualShaderNodeParticleConeVelocity::get_output_port_count() const {
|
||||
}
|
||||
|
||||
VisualShaderNodeParticleConeVelocity::PortType VisualShaderNodeParticleConeVelocity::get_output_port_type(int p_port) const {
|
||||
return PORT_TYPE_VECTOR_3D;
|
||||
return p_port == 0 ? PORT_TYPE_VECTOR_3D : PORT_TYPE_SCALAR;
|
||||
}
|
||||
|
||||
String VisualShaderNodeParticleConeVelocity::get_output_port_name(int p_port) const {
|
||||
@@ -929,11 +929,11 @@ int VisualShaderNodeParticleRandomness::get_output_port_count() const {
|
||||
VisualShaderNodeParticleRandomness::PortType VisualShaderNodeParticleRandomness::get_output_port_type(int p_port) const {
|
||||
switch (op_type) {
|
||||
case OP_TYPE_VECTOR_2D:
|
||||
return PORT_TYPE_VECTOR_2D;
|
||||
return p_port == 0 ? PORT_TYPE_VECTOR_2D : PORT_TYPE_SCALAR;
|
||||
case OP_TYPE_VECTOR_3D:
|
||||
return PORT_TYPE_VECTOR_3D;
|
||||
return p_port == 0 ? PORT_TYPE_VECTOR_3D : PORT_TYPE_SCALAR;
|
||||
case OP_TYPE_VECTOR_4D:
|
||||
return PORT_TYPE_VECTOR_4D;
|
||||
return p_port == 0 ? PORT_TYPE_VECTOR_4D : PORT_TYPE_SCALAR;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1079,7 +1079,7 @@ int VisualShaderNodeParticleAccelerator::get_output_port_count() const {
|
||||
}
|
||||
|
||||
VisualShaderNodeParticleAccelerator::PortType VisualShaderNodeParticleAccelerator::get_output_port_type(int p_port) const {
|
||||
return PORT_TYPE_VECTOR_3D;
|
||||
return p_port == 0 ? PORT_TYPE_VECTOR_3D : PORT_TYPE_SCALAR;
|
||||
}
|
||||
|
||||
String VisualShaderNodeParticleAccelerator::get_output_port_name(int p_port) const {
|
||||
|
||||
Reference in New Issue
Block a user