Forum Groups
  All forums
    Help & Feedback
      Questions
      Work in progress
      Finished Art
      Non-Max related
    Community
      Offtopic
      News
    Hardware
    Photography



Maxunderground news unavailable

Smooth Knot Points -
show user profile  ccampbell
Hi All -

When i generate a spline using the border of some geometry and then convert the knots into smooth tangents the quad menu shows the change but the spline does not then inherit the changes.

I can however select the spline, go into spline sub object and select the spline then convert from "line" to "Curve" in the quad menu and then convert knots to smooth.

I have to perform this operation via script but i can not find anything in the maxscript reference to do this

Any Ideas?

Any help would be great. i have posted the few lines of code i'm using to do this below.

--EXTRACT BORDER EDGES FROM GEOMETRY
--
$.EditablePoly.SetSelection #Edge ((polyOp.getOpenEdges $) as bitarray)
polyop.createshape $ #selection name:"Borders"
--
--LOOP TO CONVERT POINTS TO SMOOTH
for i = 1 to numknots $ do
(
setknottype $ 1 i #smooth
setknotselection $ 1 #(i) keep:true
)
-- REMOVE EVERY OTHER POINT FOR 3 ITR'S
for k = 1 to 3 do
(
numknot = numknots $
numloops = (numknot/2.0) as integer
knotArray=#()
for i = 1 to numloops do
(
x=(i+i)-1
append knotArray x
)
print knotArray
for i2 = 1 to knotArray.count do
(
deleteknot $ 1 i2
)--end i2 loop
updateshape $
)--end k loop






$Entrepreneur = if((Designer + Engineer)*Programmer){Problem Solver};



read 380 times
9/22/2011 1:50:55 AM (last edit: 9/22/2011 1:51:49 AM)
show user profile  ccampbell
I figured it out... Duh!

for i = 1 to (numsegments $ 1) do
(
setsegmenttype $ 1 i #curve
)

Sorry for the lame post!

Best Regards,

Chris




$Entrepreneur = if((Designer + Engineer)*Programmer){Problem Solver};



read 362 times
9/22/2011 3:07:25 AM (last edit: 9/22/2011 3:07:25 AM)
#Maxforums IRC
Open chat window


Support Maxforums.org