mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Create an undo/redo action when pinning a SoftBody3D point in the editor
Previously, if you pinned a point by clicking on one of the soft body vertex handles, the scene was not marked as modified, and the action could not be undone by hitting Ctrl + Z. Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
This commit is contained in:
committed by
Hugo Locurcio
parent
17fb6e3bd0
commit
edfe631c7c
@@ -704,10 +704,6 @@ void SoftBody3D::apply_central_force(const Vector3 &p_force) {
|
||||
PhysicsServer3D::get_singleton()->soft_body_apply_central_force(physics_rid, p_force);
|
||||
}
|
||||
|
||||
void SoftBody3D::pin_point_toggle(int p_point_index) {
|
||||
pin_point(p_point_index, !(-1 != _has_pinned_point(p_point_index)));
|
||||
}
|
||||
|
||||
void SoftBody3D::pin_point(int p_point_index, bool pin, const NodePath &p_spatial_attachment_path, int p_insert_at) {
|
||||
ERR_FAIL_COND_MSG(p_insert_at < -1 || p_insert_at >= pinned_points.size(), "Invalid index for pin point insertion position.");
|
||||
_pin_point_on_physics_server(p_point_index, pin);
|
||||
|
||||
@@ -182,7 +182,6 @@ public:
|
||||
|
||||
Vector3 get_point_transform(int p_point_index);
|
||||
|
||||
void pin_point_toggle(int p_point_index);
|
||||
void pin_point(int p_point_index, bool pin, const NodePath &p_spatial_attachment_path = NodePath(), int p_insert_at = -1);
|
||||
bool is_point_pinned(int p_point_index) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user