Notifications
Clear all

[Closed] MAXScript: Control Mix Curve points in Falloff map

Hi all!

I am looking for a way to control points (add, remove, change) in the falloff map on the Mix Curve, but my searches have been unsuccessful. The only thing I found was some sample code to control the Mono_Color curve in the output map here:

How can I change the code shown here for the Mix Curve in the falloff map?
Thank for any help!

2 Replies
1 Reply
(@serejah)
Joined: 11 months ago

Posts: 0

there was another thread where it was discussed before
here’s what you can do with c# sdk

delete objects
gc()

t = Teapot()
f = falloff()
t.material = Standardmaterial diffusemap:f

g = (dotNetClass "Autodesk.Max.GlobalInterface").Instance
cc = g.animatable.getanimbyhandle ( dotNetObject "System.UIntPtr" (getHandleByAnim f.mixCurve))	
c = cc.GetControlCurve 0

new_curve_pt = g.curvepoint.create()
new_curve_pt.P = g.point2.create 0.75 0.5	
c.Insert 1 new_curve_pt

new_curve_pt = g.curvepoint.create()
new_curve_pt.P = g.point2.create 0.85 0.75	
c.Insert 2 new_curve_pt
	
-- c.delete 2 -- remove pt from curve

use showProperties and showMethods on c and cc variables to see what else you can do
or better read SDK reference about ICurve and ICurveCtl classes

Thank you!
This method is more elegant and works great!