Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve editing of min/max particle properties #81260

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions doc/classes/ParticleProcessMaterial.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
<tutorials>
</tutorials>
<methods>
<method name="get_param" qualifiers="const">
<return type="Vector2" />
<param index="0" name="param" type="int" enum="ParticleProcessMaterial.Parameter" />
<description>
Returns the minimum and maximum values of the given [param param] as a vector.
The [code]x[/code] component of the returned vector corresponds to minimum and the [code]y[/code] component corresponds to maximum.
</description>
</method>
<method name="get_param_max" qualifiers="const">
<return type="float" />
<param index="0" name="param" type="int" enum="ParticleProcessMaterial.Parameter" />
Expand Down Expand Up @@ -37,6 +45,15 @@
Returns [code]true[/code] if the specified particle flag is enabled. See [enum ParticleFlags] for options.
</description>
</method>
<method name="set_param">
<return type="void" />
<param index="0" name="param" type="int" enum="ParticleProcessMaterial.Parameter" />
<param index="1" name="value" type="Vector2" />
<description>
Sets the minimum and maximum values of the given [param param].
The [code]x[/code] component of the argument vector corresponds to minimum and the [code]y[/code] component corresponds to maximum.
</description>
</method>
<method name="set_param_max">
<return type="void" />
<param index="0" name="param" type="int" enum="ParticleProcessMaterial.Parameter" />
Expand Down
3 changes: 3 additions & 0 deletions editor/editor_inspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ void EditorProperty::_notification(int p_what) {
if (c->is_set_as_top_level()) {
continue;
}
if (!c->is_visible()) {
continue;
}
if (c == bottom_editor) {
continue;
}
Expand Down
5 changes: 5 additions & 0 deletions editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
#include "editor/plugins/mesh_library_editor_plugin.h"
#include "editor/plugins/node_3d_editor_plugin.h"
#include "editor/plugins/packed_scene_translation_parser_plugin.h"
#include "editor/plugins/particle_process_material_editor_plugin.h"
#include "editor/plugins/root_motion_editor_plugin.h"
#include "editor/plugins/script_text_editor.h"
#include "editor/plugins/text_editor.h"
Expand Down Expand Up @@ -6974,6 +6975,10 @@ EditorNode::EditorNode() {
Ref<EditorInspectorVisualShaderModePlugin> smp;
smp.instantiate();
EditorInspector::add_inspector_plugin(smp);

Ref<EditorInspectorParticleProcessMaterialPlugin> ppm;
ppm.instantiate();
EditorInspector::add_inspector_plugin(ppm);
}

editor_selection = memnew(EditorSelection);
Expand Down
1 change: 1 addition & 0 deletions editor/icons/RangeSliderLeft.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions editor/icons/RangeSliderRight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading