Skip to content

Commit

Permalink
hide only some items
Browse files Browse the repository at this point in the history
  • Loading branch information
Ughuuu committed Nov 13, 2023
1 parent 29dbd61 commit 9777e5c
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 99 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [v1.6.2](https://github.com/Ughuuu/godot-4-softbody2d/releases/tag/v1.6.2)

- Hide some items so speed is better in editor(skeleton and remote transform)

## [v1.6](https://github.com/Ughuuu/godot-4-softbody2d/releases/tag/v1.6)

- Update to support angular limits (Godot 4.2)
Expand Down
4 changes: 4 additions & 0 deletions addons/softbody2d/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [v1.6.2](https://github.com/Ughuuu/godot-4-softbody2d/releases/tag/v1.6.2)

- Hide some items so speed is better in editor(skeleton and remote transform)

## [v1.6](https://github.com/Ughuuu/godot-4-softbody2d/releases/tag/v1.6)

- Update to support angular limits (Godot 4.2)
Expand Down
7 changes: 2 additions & 5 deletions addons/softbody2d/softbody2d.gd
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,6 @@ func _create_rigid_body(skeleton: Skeleton2D, bone: Bone2D, mass, is_center: boo
rigid_body = RigidBody2D.new()
rigid_body.name = bone.name
var collision_shape = CollisionShape2D.new()
collision_shape.set_meta("_edit_lock_", true)
collision_shape.shape = shape
collision_shape.name = shape_type + "Shape2D"
rigid_body.mass = mass
Expand All @@ -827,7 +826,7 @@ func _create_rigid_body(skeleton: Skeleton2D, bone: Bone2D, mass, is_center: boo
rigid_body.collision_layer = collision_layer
rigid_body.collision_mask = collision_mask
var remote_transform = RemoteTransform2D.new()
remote_transform.set_meta("_edit_lock_", true)
remote_transform.visible = false;
remote_transform.name = "RemoteTransform2D"
rigid_body.add_child(remote_transform)
remote_transform.remote_path = "../../" + skeleton.name + "/" + bone.name
Expand Down Expand Up @@ -868,7 +867,6 @@ func _generate_joints(rigid_bodies: Array[RigidBody2D]):
connected_nodes[idx_a].append(node_b)
if joint_type == "pin":
var joint = PinJoint2D.new()
joint.set_meta("_edit_lock_", true)
joint.name = "Joint2D-"+node_a.name+"-"+node_b.name
joint.node_a = ".."
joint.node_b = "../../" + node_b.name
Expand All @@ -888,7 +886,6 @@ func _generate_joints(rigid_bodies: Array[RigidBody2D]):
else:
var joint = DampedSpringJoint2D.new()
joint.name = "Joint2D-"+node_a.name+"-"+node_b.name
joint.set_meta("_edit_lock_", true)
joint.node_a = ".."
joint.node_b = "../../" + node_b.name
joint.stiffness = stiffness
Expand All @@ -906,7 +903,7 @@ func _generate_joints(rigid_bodies: Array[RigidBody2D]):
if Engine.is_editor_hint():
joint.set_owner(get_tree().get_edited_scene_root())
var skeleton_node: Skeleton2D = get_node_or_null(skeleton)
skeleton_node.set_meta("_edit_lock_", true)
skeleton_node.visible = false;
var skeleton_modification_stack:=SkeletonModificationStack2D.new()
for i in bones.size():
var skeleton_modification :=SkeletonModification2DLookAt.new()
Expand Down
16 changes: 16 additions & 0 deletions addons/softbody2d/softbody2d.svg.import
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://bxx5v7b42j4kf"
path="res://.godot/imported/softbody2d.svg-10ab834be780722c00cf50ffddb981c8.ctex"
metadata={
"has_editor_variant": true,
"vram_texture": false
}

[deps]

source_file="res://addons/softbody2d/softbody2d.svg"
dest_files=["res://.godot/imported/softbody2d.svg-10ab834be780722c00cf50ffddb981c8.ctex"]

[params]

compress/mode=0
Expand Down
Loading

0 comments on commit 9777e5c

Please sign in to comment.