Merge pull request #64566 from Mickeon/rename-particle-material
Rename ParticlesMaterial to ParticleProcessMaterial
This commit is contained in:
commit
cd661d400e
30 changed files with 291 additions and 289 deletions
|
|
@ -7294,7 +7294,7 @@ EditorNode::EditorNode() {
|
|||
canvas_item_mat_convert.instantiate();
|
||||
resource_conversion_plugins.push_back(canvas_item_mat_convert);
|
||||
|
||||
Ref<ParticlesMaterialConversionPlugin> particles_mat_convert;
|
||||
Ref<ParticleProcessMaterialConversionPlugin> particles_mat_convert;
|
||||
particles_mat_convert.instantiate();
|
||||
resource_conversion_plugins.push_back(particles_mat_convert);
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 883 B After Width: | Height: | Size: 883 B |
|
|
@ -37,7 +37,7 @@
|
|||
#include "editor/editor_undo_redo_manager.h"
|
||||
#include "scene/2d/cpu_particles_2d.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/resources/particles_material.h"
|
||||
#include "scene/resources/particle_process_material.h"
|
||||
|
||||
void CPUParticles2DEditorPlugin::edit(Object *p_object) {
|
||||
particles = Object::cast_to<CPUParticles2D>(p_object);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#include "editor/scene_tree_dock.h"
|
||||
#include "scene/2d/cpu_particles_2d.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/resources/particles_material.h"
|
||||
#include "scene/resources/particle_process_material.h"
|
||||
|
||||
void GPUParticles2DEditorPlugin::edit(Object *p_object) {
|
||||
particles = Object::cast_to<GPUParticles2D>(p_object);
|
||||
|
|
@ -167,9 +167,9 @@ void GPUParticles2DEditorPlugin::_generate_visibility_rect() {
|
|||
}
|
||||
|
||||
void GPUParticles2DEditorPlugin::_generate_emission_mask() {
|
||||
Ref<ParticlesMaterial> pm = particles->get_process_material();
|
||||
Ref<ParticleProcessMaterial> pm = particles->get_process_material();
|
||||
if (!pm.is_valid()) {
|
||||
EditorNode::get_singleton()->show_warning(TTR("Can only set point into a ParticlesMaterial process material"));
|
||||
EditorNode::get_singleton()->show_warning(TTR("Can only set point into a ParticleProcessMaterial process material"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -320,7 +320,7 @@ void GPUParticles2DEditorPlugin::_generate_emission_mask() {
|
|||
}
|
||||
|
||||
if (valid_normals.size()) {
|
||||
pm->set_emission_shape(ParticlesMaterial::EMISSION_SHAPE_DIRECTED_POINTS);
|
||||
pm->set_emission_shape(ParticleProcessMaterial::EMISSION_SHAPE_DIRECTED_POINTS);
|
||||
|
||||
Vector<uint8_t> normdata;
|
||||
normdata.resize(w * h * 2 * sizeof(float)); //use RG texture
|
||||
|
|
@ -339,7 +339,7 @@ void GPUParticles2DEditorPlugin::_generate_emission_mask() {
|
|||
pm->set_emission_normal_texture(ImageTexture::create_from_image(img));
|
||||
|
||||
} else {
|
||||
pm->set_emission_shape(ParticlesMaterial::EMISSION_SHAPE_POINTS);
|
||||
pm->set_emission_shape(ParticleProcessMaterial::EMISSION_SHAPE_POINTS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
#include "editor/plugins/node_3d_editor_plugin.h"
|
||||
#include "editor/scene_tree_dock.h"
|
||||
#include "scene/3d/cpu_particles_3d.h"
|
||||
#include "scene/resources/particles_material.h"
|
||||
#include "scene/resources/particle_process_material.h"
|
||||
|
||||
bool GPUParticles3DEditorBase::_generate(Vector<Vector3> &points, Vector<Vector3> &normals) {
|
||||
bool use_normals = emission_fill->get_selected() == 1;
|
||||
|
|
@ -255,9 +255,9 @@ void GPUParticles3DEditor::_menu_option(int p_option) {
|
|||
}
|
||||
} break;
|
||||
case MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE: {
|
||||
Ref<ParticlesMaterial> material = node->get_process_material();
|
||||
Ref<ParticleProcessMaterial> material = node->get_process_material();
|
||||
if (material.is_null()) {
|
||||
EditorNode::get_singleton()->show_warning(TTR("A processor material of type 'ParticlesMaterial' is required."));
|
||||
EditorNode::get_singleton()->show_warning(TTR("A processor material of type 'ParticleProcessMaterial' is required."));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -366,11 +366,11 @@ void GPUParticles3DEditor::_generate_emission_points() {
|
|||
Ref<Image> image = memnew(Image(w, h, false, Image::FORMAT_RGBF, point_img));
|
||||
Ref<ImageTexture> tex = ImageTexture::create_from_image(image);
|
||||
|
||||
Ref<ParticlesMaterial> material = node->get_process_material();
|
||||
Ref<ParticleProcessMaterial> material = node->get_process_material();
|
||||
ERR_FAIL_COND(material.is_null());
|
||||
|
||||
if (normals.size() > 0) {
|
||||
material->set_emission_shape(ParticlesMaterial::EMISSION_SHAPE_DIRECTED_POINTS);
|
||||
material->set_emission_shape(ParticleProcessMaterial::EMISSION_SHAPE_DIRECTED_POINTS);
|
||||
material->set_emission_point_count(point_count);
|
||||
material->set_emission_point_texture(tex);
|
||||
|
||||
|
|
@ -392,7 +392,7 @@ void GPUParticles3DEditor::_generate_emission_points() {
|
|||
Ref<Image> image2 = memnew(Image(w, h, false, Image::FORMAT_RGBF, point_img2));
|
||||
material->set_emission_normal_texture(ImageTexture::create_from_image(image2));
|
||||
} else {
|
||||
material->set_emission_shape(ParticlesMaterial::EMISSION_SHAPE_POINTS);
|
||||
material->set_emission_shape(ParticleProcessMaterial::EMISSION_SHAPE_POINTS);
|
||||
material->set_emission_point_count(point_count);
|
||||
material->set_emission_point_texture(tex);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
#include "editor/editor_undo_redo_manager.h"
|
||||
#include "scene/gui/subviewport_container.h"
|
||||
#include "scene/resources/fog_material.h"
|
||||
#include "scene/resources/particles_material.h"
|
||||
#include "scene/resources/particle_process_material.h"
|
||||
#include "scene/resources/sky_material.h"
|
||||
|
||||
void MaterialEditor::_notification(int p_what) {
|
||||
|
|
@ -405,17 +405,17 @@ Ref<Resource> ORMMaterial3DConversionPlugin::convert(const Ref<Resource> &p_reso
|
|||
return smat;
|
||||
}
|
||||
|
||||
String ParticlesMaterialConversionPlugin::converts_to() const {
|
||||
String ParticleProcessMaterialConversionPlugin::converts_to() const {
|
||||
return "ShaderMaterial";
|
||||
}
|
||||
|
||||
bool ParticlesMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const {
|
||||
Ref<ParticlesMaterial> mat = p_resource;
|
||||
bool ParticleProcessMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const {
|
||||
Ref<ParticleProcessMaterial> mat = p_resource;
|
||||
return mat.is_valid();
|
||||
}
|
||||
|
||||
Ref<Resource> ParticlesMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const {
|
||||
Ref<ParticlesMaterial> mat = p_resource;
|
||||
Ref<Resource> ParticleProcessMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const {
|
||||
Ref<ParticleProcessMaterial> mat = p_resource;
|
||||
ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>());
|
||||
|
||||
Ref<ShaderMaterial> smat;
|
||||
|
|
|
|||
|
|
@ -122,8 +122,8 @@ public:
|
|||
virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const override;
|
||||
};
|
||||
|
||||
class ParticlesMaterialConversionPlugin : public EditorResourceConversionPlugin {
|
||||
GDCLASS(ParticlesMaterialConversionPlugin, EditorResourceConversionPlugin);
|
||||
class ParticleProcessMaterialConversionPlugin : public EditorResourceConversionPlugin {
|
||||
GDCLASS(ParticleProcessMaterialConversionPlugin, EditorResourceConversionPlugin);
|
||||
|
||||
public:
|
||||
virtual String converts_to() const override;
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ static const char *gdscript_function_renames[][2] = {
|
|||
// { "set_color", "surface_set_color"}, // ImmediateMesh broke Light2D, Theme, SurfaceTool
|
||||
// { "set_event", "set_shortcut" }, // BaseButton - Cyclic Rename
|
||||
// { "set_extents", "set_size"}, // BoxShape, RectangleShape broke ReflectionProbe
|
||||
// { "set_flag", "set_particle_flag"}, // ParticlesMaterial broke Window, HingeJoint3D
|
||||
// { "set_flag", "set_particle_flag"}, // ParticleProcessMaterial broke Window, HingeJoint3D
|
||||
// { "set_h_offset", "set_drag_horizontal_offset" }, // Camera2D broke Camera3D, PathFollow3D, PathFollow2D
|
||||
// { "set_margin", "set_offset" }, // Control broke Shape3D, AtlasTexture
|
||||
// { "set_mode", "set_mode_file_mode" }, // FileDialog broke Panel, Shader, CSGPolygon, Tilemap
|
||||
|
|
@ -610,7 +610,7 @@ static const char *csharp_function_renames[][2] = {
|
|||
// { "SetColor", "SurfaceSetColor"}, // ImmediateMesh broke Light2D, Theme, SurfaceTool
|
||||
// { "SetEvent", "SetShortcut" }, // BaseButton - Cyclic Rename
|
||||
// { "SetExtents", "SetSize"}, // BoxShape, RectangleShape broke ReflectionProbe
|
||||
// { "SetFlag", "SetParticleFlag"}, // ParticlesMaterial broke Window, HingeJoint3D
|
||||
// { "SetFlag", "SetParticleFlag"}, // ParticleProcessMaterial broke Window, HingeJoint3D
|
||||
// { "SetHOffset", "SetDragHorizontalOffset" }, // Camera2D broke Camera3D, PathFollow3D, PathFollow2D
|
||||
// { "SetMargin", "SetOffset" }, // Control broke Shape3D, AtlasTexture
|
||||
// { "SetMode", "SetModeFileMode" }, // FileDialog broke Panel, Shader, CSGPolygon, Tilemap
|
||||
|
|
@ -1357,6 +1357,7 @@ static const char *class_renames[][2] = {
|
|||
{ "PanoramaSky", "Sky" },
|
||||
{ "Particles", "GPUParticles3D" }, // Be careful, this will be used everywhere
|
||||
{ "Particles2D", "GPUParticles2D" },
|
||||
{ "ParticlesMaterial", "ParticleProcessMaterial" },
|
||||
{ "Path", "Path3D" }, // Be careful, this will be used everywhere
|
||||
{ "PathFollow", "PathFollow3D" },
|
||||
{ "PhysicalBone", "PhysicalBone3D" },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue