77 lines
1.4 KiB
Plaintext
77 lines
1.4 KiB
Plaintext
/*fn shape001=
|
|
(
|
|
ss=SplineShape()
|
|
addNewSpline ss
|
|
addKnot ss 1 #corner #curve [0,0,0]
|
|
addKnot ss 1 #corner #curve [100,0,0]
|
|
|
|
addNewSpline ss
|
|
addKnot ss 2 #corner #curve [0,10,0]
|
|
addKnot ss 2 #corner #curve [100,10,0]
|
|
|
|
|
|
addNewSpline ss
|
|
addKnot ss 3 #corner #curve [0,20,0]
|
|
addKnot ss 3 #corner #curve [100,20,0]
|
|
|
|
updateShape ss
|
|
|
|
|
|
|
|
addKnot ss 2 #corner #curve [200,10,0]
|
|
updateShape ss
|
|
ss.pos=[0,0,100]
|
|
|
|
|
|
a=Rectangle()
|
|
convertToSplineShape a
|
|
b=Circle()
|
|
convertToSplineShape b
|
|
|
|
|
|
addAndWeld a ss 0
|
|
|
|
addAndWeld a b 0
|
|
|
|
updateShape a
|
|
|
|
return a
|
|
)
|
|
|
|
b=shape001()
|
|
print "***************"
|
|
print b*/
|
|
|
|
|
|
|
|
|
|
/*for shapes in selection do
|
|
(
|
|
if not isShapeObject shapes do continue
|
|
print "123"
|
|
)*/
|
|
--isShapeObject shapes--判断曲线
|
|
--numSplines shapes --曲线对象包含几根
|
|
--numKnots shapes i --第i条曲线节点数量
|
|
--getKnotPoint shapes i j--第i条曲线第j个顶点位置
|
|
--$.transform
|
|
--inverse $.transform
|
|
|
|
/*getPointController $ 1 2*/
|
|
--if keyboard.escPressed then exit
|
|
--setKnotPoint shapes i j transvertTM.position
|
|
/*setKnotPoint $ 1 1 [100,0,0]
|
|
setKnotPoint $ 1 2 [200,0,0]
|
|
setKnotPoint $ 1 3 [300,0,0]
|
|
updateShape $*/
|
|
|
|
--DisableSceneRedraw()--关闭视口场景绘制
|
|
--completeRedraw()--视口刷新
|
|
--ForceCompleteRedraw()--所有视口强制刷新
|
|
--redrawViews()--仅刷新已经更改的部分
|
|
|
|
|
|
|
|
--makedir "C:\\Users\\ab\\Desktop\\yewenbin\\" --建立文件夹
|
|
--setINISetting "$scripts\\DTools\jiaoben_weizhi.ini" "splineAnime" "splineAnime_weizhi" (splineAnime_weizhi as string )
|
|
|