Skip to content

Commit

Permalink
Merge pull request #5028 from nortikin/fix_5027_Evaluate_Surface_Expl…
Browse files Browse the repository at this point in the history
…icit_mode_glitch

fix #5027. Fix Evaluate Surface Explicit mode glitch.
  • Loading branch information
satabol authored Oct 29, 2023
2 parents 8e19ef8 + c506f91 commit 11b0272
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nodes/surface/evaluate_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,15 @@ def process(self):
new_edges, new_faces = self.make_edges_and_faces(samples_u, samples_v, self.outputs['Edges'].is_linked, self.outputs['Faces'].is_linked)
else:
if self.input_mode == 'VERTICES':
target_us, target_vs = self.parse_input(target_verts)
target_us, target_vs = self.parse_input(target_verts) # this mode take aligned target_us, target_vs
else:
target_us, target_vs = np.array(target_us), np.array(target_vs)
# Align target_us, target_vs
if target_us.size<target_vs.size:
target_us = np.append( target_us, np.repeat(target_us[-1], target_vs.size-target_us.size ))
elif target_vs.size<target_us.size:
target_vs = np.append( target_vs, np.repeat(target_vs[-1], target_us.size-target_vs.size ))

if self.clamp_mode == 'CLAMP':
target_us, target_vs = self._clamp(surface, target_us, target_vs)
elif self.clamp_mode == 'WRAP':
Expand Down

0 comments on commit 11b0272

Please sign in to comment.