Created
December 12, 2014 11:28
-
-
Save Hoikohroh/5cff641ce47560f63f89 to your computer and use it in GitHub Desktop.
Maxscript:ControllerTool_Path_Constraint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
ControllerTool_Path_Constraint | |
スクリプト概要 | |
選択オブジェクトにパスコンストレイントを割り当て、等間隔に配置 | |
使い方 | |
スクリプト起動後、オブジェクトを選択した状態で"Pick Path"をクリックし、パスを指定。 | |
更新履歴 | |
v20140418 | |
*/ | |
try destroyDialog Roll_Path catch() | |
Rollout Roll_Path "PathConstraint" | |
( | |
fn Path_filter obj = superclassof obj == Shape | |
pickbutton btn_pick "Pick Path" filter:Path_filter width:80 height:30 | |
on btn_pick picked object do ( | |
if selection.count > 0 do( | |
Temp = 100.0/(selection.count +1) | |
Round = 1 | |
for i in selection as array do( | |
i.position.controller = path_constraint path:btn_pick.object | |
deleteKeys i.position.controller.percent.controller | |
i.position.controller.percent = Round * Temp | |
Round = Round +1 | |
) | |
) | |
) | |
) | |
createDialog Roll_Path 130 45 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment