3dmax一键简易窗户插件 Easy Windows

本文介绍3dmax的一款易用插件Easy Windows,通过该插件可以快速创建和编辑窗户模型。文章详细讲解了如何使用插件的导入、缩放、曲线调整等功能,帮助用户提升3dmax建模效率。
摘要由CSDN通过智能技术生成

global newwin_roll
global arr_bmp,pointtcpick
global unique

fn unique ori_sel=(
ins=#()
while ori_sel.count>0 do
(
for e in ori_sel do(
num=InstanceMgr.GetInstances e &instances
temp=instances
for o in temp do (
if finditem ori_sel o!=0 then (
append ins o
exit
)
)
– append ins temp[1]
for j in temp do(
num2=finditem ori_sel j
try deleteitem ori_sel num2 catch()
)
)
)
return ins
)
fn import_sp str= (
new_obj = splineShape name:(uniquename (getfilenamefile str))
ext_file=openFile str
try(
trans=readValue ext_file
new_obj.transform=trans
num_splines = readValue ext_file
spline_verts = #()
spline_closed= #()
for s = 1 to num_splines do
(
append spline_verts (readValue ext_file)
append spline_closed (readValue ext_file)
)
for s = 1 to num_splines do
(
addNewSpline new_obj
for v = 1 to spline_verts[s] do
(
readValue ext_file
addKnot new_obj s (readValue ext_file) #curve (readValue ext_file) (readValue ext_file) (readValue ext_file)
)
if spline_closed[s] then close new_obj s
)
updateShape new_obj
new_obj
)catch()
close ext_file
return new_obj
)
fn scale_sp curve sw sh=(
for n in 1 to curve.NumSplines do
(
num_verts = (numKnots curve n)
for i = 1 to num_verts do
(
local poi=in coordsys curve getKnotPoint curve n i
poi.x*=sw;poi.y*=sh
local get_in=in coordsys curve getInVec curve n i
get_in.x*=sw;get_in.y*=sh
local get_out=in coordsys curve getOutVec curve n i
get_out.x*=sw;get_out.y*=sh
in coordsys curve setKnotPoint curve n i poi
in coordsys curve setInVec curve n i get_in
in coordsys curve setOutVec curve n i get_out
)–end v loop
)–end c loop
updateshape curve
return curve
)—缩放曲线
fn w_to_c sys pos=( -----------------世界点转换为自定义坐标系统点------------
ve=(pos-sys.translationpart)
vec=normalize ve
x=(length ve)(dot vec sys[1])
y=(length ve)
(dot vec sys[2])
z=(length ve)(dot vec sys[3])
retu

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值