Created
December 12, 2014 10:58
-
-
Save Hoikohroh/8a804c698a9a1da20aa8 to your computer and use it in GitHub Desktop.
Maxscript:MrAreaLightGuid
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
/* | |
MrAreaLightGuid_v20131117 | |
スクリプト概要 | |
・MrAreaLightのライトエリアを表示するシェイプを作成 | |
*/ | |
( | |
Fn Fn_Expression obj Name Target = ( | |
obj.controller = Float_Expression() | |
obj.controller.AddScalarTarget Name Target | |
obj.controller.SetExpression Name | |
) | |
Temp = selection as array | |
if Temp.count == 1 and classof Temp[1] == miAreaLight then | |
( | |
Mr_Light = Temp[1] | |
case Mr_Light.Area_Type of | |
( | |
1:( | |
Mr_Area = (Rectangle name:"miAreaPlane"steps:0) | |
Mr_Area.transform = Mr_Light.transform | |
Mr_Area.parent = Mr_Light | |
Fn_Expression Mr_Area.baseobject[#length] "length" Mr_Light.baseobject[#Rectangle_Height] | |
Fn_Expression Mr_Area.baseobject[#width] "width" Mr_Light.baseobject[#Rectangle_Width] | |
) | |
2:( | |
Mr_Area = (circle name:"miAreaCircle" steps:3) | |
Mr_Area.transform = Mr_Light.transform | |
Mr_Area.parent = Mr_Light | |
Fn_Expression Mr_Area.baseobject[#radius] "Radius" Mr_Light.baseobject[#disc_Radius] | |
) | |
) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment