Skip to content

Commit

Permalink
remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
satabol committed Aug 20, 2023
1 parent 7b1ad51 commit 23b8093
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions nodes/curve/ellipse_curve_mk2.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,16 @@ class SvEllipseCurveNodeMK2(SverchCustomTreeNode, bpy.types.Node):

def update_sockets(self, context):
all_sockets_name = ["Minor Radius", "Eccentricity", "Focal Length", ]
#self.inputs["Minor Radius"].hide = True
#self.inputs["Eccentricity"].hide = True
#self.inputs["Focal Length"].hide = True

list_links_remove = None
if self.mode == "AB":
list_links_remove = ["Eccentricity", "Focal Length",]
#self.inputs["Minor Radius"].hide = False
#socket2 = self.inputs[1]
#socket2.replace_socket("SvStringsSocket", "Minor Radius").prop_name = "minor_radius"
elif self.mode == "AE":
list_links_remove = ["Minor Radius", "Focal Length",]
#self.inputs["Eccentricity"].hide = False
#socket2 = self.inputs[1]
#socket2.replace_socket("SvStringsSocket", "Eccentricity").prop_name = "eccentricity"
else: # AC
list_links_remove = ["Minor Radius", "Eccentricity",]
#self.inputs["Focal Length"].hide = False
#socket2 = self.inputs[1]
#socket2.replace_socket("SvStringsSocket", "Focal Length").prop_name = "focal_length"

# remove existing link if sockets are switched:
for socket_name in list_links_remove:
all_sockets_name.remove(socket_name)
for l in self.inputs[socket_name].links:
Expand Down Expand Up @@ -139,8 +128,6 @@ def process(self):
minor_radius = input2
elif self.mode == 'AE':
e = input2
# if e<0 or 1<e:
# raise Exception(f"Eccentricity {e} has to be in range [0;1].")
minor_radius = major_radius * sqrt(1 - e*e)
else: # AC
c = input2
Expand Down

0 comments on commit 23b8093

Please sign in to comment.