Skip to content

Commit

Permalink
multiple fixes + changes
Browse files Browse the repository at this point in the history
  • Loading branch information
80prozent committed May 15, 2014
1 parent 11de266 commit f6c0d28
Show file tree
Hide file tree
Showing 121 changed files with 12,569 additions and 7,886 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ The current installer provides support for this versions:

## How to install Away Extensions 3dsmax ?

* Open 3dsmax
* Drag and drop the installer (*.mzp) into the 3dsmax-view.
* A dialog should appear, providing further instructions.
* After installation is complete, you should restart 3dsmax.
* For each supported 3dsmax version, a sepperate Setup-file is provided. Just run this file, and follow the instructions.

In 3dsmax, you should see following
* the MaxAWDExporter-plugin should be listet in the plugin manager.
Expand Down

This file was deleted.

13 changes: 0 additions & 13 deletions awayextensions3dsmax/AWDCommands/AWDCommands-ExportAWD.mcr

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions awayextensions3dsmax/AWDCommands/AWDCommands-ImportAWD.mcr

This file was deleted.

49 changes: 0 additions & 49 deletions awayextensions3dsmax/AWDCommands/AWDCommands-OpenAWDHelperMenu.mcr

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,50 @@
macroScript GotoAway3dForum
category:"AWDCommands"
toolTip:"Open the Away3d forum in the browser"
(
shellLaunch "http://www.away3d.com/forum" ""
)
macroScript OpenAWDAboutDialog
category:"AWDCommands"
toolTip:""
(
shellLaunch "http://www.away3d.com" ""

targetLocalFile=(getdir #maxroot) + "\\plugins\\AwayExtensions3dsMax\\3dsmaxversionLocal.xml"
xmldoc = dotnetobject "System.XML.XMLDocument"
isloaded=xmldoc.load targetLocalFile
itemIter = (xmldoc.selectnodes "//AWDMAXVERSION").GetEnumerator()
global versionCompleteLocal ="AWDExtensions3dsmax_v"
while itemIter.MoveNext() do
(
attrIter = itemIter.Current.Attributes.GetEnumerator()
major=itemIter.Current.getAttribute("Major")
minor=itemIter.Current.getAttribute("Minor")
revision=itemIter.Current.getAttribute("Revision")
append versionCompleteLocal (major as string +"."+minor as string+"."+revision as string)
message=itemIter.Current.getAttribute("Message")
)
if versionCompleteLocal=="AWDExtensions3dsmax_v" then (
messageBox("Could not read the local version-file.")
return()
)

rollout rl_install "About AWDExtensions3dsmax" width:306 height:300
(

bitmap bmp1 "Bitmap" pos:[3,3] width:300 height:300 fileName:"AWDAbout.bmp"
label txt_stats versionCompleteLocal pos:[63,260] width:180 height:16 textAlign:#right

)


CreateDialog rl_install 306 300 modal:true
)
macroScript OpenAWDHelpFile
category:"AWDCommands"
toolTip:""
(
targetFile=(getdir #maxroot) + "\\plugins\\AwayExtensions3dsMax\\AWDExtensions3dsmax_docs.pdf"
shellLaunch targetFile ""
)
macroScript ExportAWD
category:"AWDCommands"
Expand All @@ -12,9 +54,9 @@ macroScript ExportAWD
if onlyFileName.Count==0 then onlyFileName=#("NewAWDFile")

newAWDFileName=maxFilePath + onlyFileName[1] + ".awd"
newFileName=getSaveFileName caption:"Save as AWD-File" fileName:newAWDFileName
newFileName=getSaveFileName caption:"Save as AWD-File" types:"Away3d(*.awd)|*.awd" fileName:newAWDFileName
if newFileName!=undefined then(
exportFile newFileName -- [ #noPrompt ] [ selectedOnly:<boolean> ] [ using:<maxclass> ]
exportFile newFileName --#noPrompt -- [ selectedOnly:<boolean> ] [ using:<maxclass> ]
)
)
macroScript ImportAWD
Expand All @@ -28,16 +70,32 @@ macroScript AWDCheckForUpdate
toolTip:""
(

test = internet.CheckConnection url:"http://www.awaytools.com/awayextensions/awayextensions3dsmax/awayextensions3dsmaxversion.xml" force:true
if test then (
targetLocalFile=(getdir #maxroot) + "\\plugins\\AwayExtensions3dsMax\\3dsmaxversionLocal.xml"
xmldoc = dotnetobject "System.XML.XMLDocument"
isloaded=xmldoc.load targetLocalFile
itemIter = (xmldoc.selectnodes "//AWDMAXVERSION").GetEnumerator()
versionCompleteLocal =""
while itemIter.MoveNext() do
(
attrIter = itemIter.Current.Attributes.GetEnumerator()
major=itemIter.Current.getAttribute("Major")
minor=itemIter.Current.getAttribute("Minor")
revision=itemIter.Current.getAttribute("Revision")
versionCompleteLocal=major+"."+minor+"."+revision
message=itemIter.Current.getAttribute("Message")
)
if versionCompleteLocal=="" then (
messageBox("Could not read the local version-file.")
return()
)
hasConnection = internet.CheckConnection url:"http://www.awaytools.com/awayextensions/awayextensions3dsmax/awayextensions3dsmaxversion.xml" force:true
if hasConnection then (
targetFile=(getdir #maxroot) + "\\plugins\\AwayExtensions3dsMax\\3dsmaxversion.xml"
dragAndDrop.DownloadUrlToDisk "http://awaytools.com/awayextensions/awayextensions3dsmax/awayextensions3dsmaxversion.xml" targetFile 1
if (getfiles targetFile).count != 0 then(
downloadSuccess=dragAndDrop.DownloadUrlToDisk "http://awaytools.com/awayextensions/awayextensions3dsmax/awayextensions3dsmaxversion.xml" targetFile 1
if downloadSuccess then(
xmldoc = dotnetobject "System.XML.XMLDocument"
isloaded=xmldoc.load targetFile
print isLoaded
itemIter = (xmldoc.selectnodes "//AWDMAXVERSION").GetEnumerator()
thisVersion = "0.9.7"
versionComplete =""
while itemIter.MoveNext() do
(
Expand All @@ -52,12 +110,12 @@ macroScript AWDCheckForUpdate
messageBox("Could not read the version-file from the internet.")
)
else(
if versionComplete==thisVersion then (
if versionComplete==versionCompleteLocal then (
messageBox("Your AwayExtensions3dsmax is up to date.")
)
else (
messageStr="Your AwayExtensions3dsmax is outdated.\n\n"
messageStr+="Your version: "+ thisVersion+"\n"
messageStr+="Your version: "+ versionCompleteLocal+"\n"
messageStr+="Latest version: "+ versionComplete+"\n\n"
messageStr+="Release-message: "+ message+"\n"
messageBox(messageStr)
Expand All @@ -66,7 +124,7 @@ macroScript AWDCheckForUpdate
)
)
else(
messageBox("Error reading the version-file ().")
messageBox("Error downloading the version-file.")
)
)
else(
Expand All @@ -82,36 +140,42 @@ macroScript OpenAWDHelperMenu
(
button btn_forum "www.away3d.com" width:190 pos:[10,10]
button btn_update "Check for Update" width:190 pos:[10,35]
button btn_about "About/Help" width:190 pos:[10,60]
button btn_import "Import AWD-File" width:190 pos:[10,85]
button btn_export "Export AWD-File" width:190 pos:[10,110]
button btn_include "Include selected Nodes" width:190 pos:[10,150]
button btn_exclude "Exclude selected Nodes" width:190 pos:[10,175]
button btn_matSettings "Create Material Settings" width:190 pos:[10,210]
button btn_TextureSettings "Create Texture Settings" width:190 pos:[10,235]
button btn_SkyBox "Create SkyBox" width:190 pos:[10,270]
button btn_Cubetex "Create CubeTexture" width:190 pos:[10,295]
button btn_about "About" width:190 pos:[10,60]
button btn_help "Help" width:190 pos:[10,85]

button btn_addSkeleton "Create SkeletonModifier" width:190 pos:[10,330]
button btn_addVertex "Create Vertex-Anim-Source-Modifier" width:190 pos:[10,355]
button btn_addAnimator "Create Animator-Modifier" width:190 pos:[10,380]
button btn_addAnimSet "Create AnimationSet-Modifier" width:190 pos:[10,405]
button btn_import "Import AWD-File" width:190 pos:[10,125]
button btn_export "Export AWD-File" width:190 pos:[10,150]
button btn_include "Include selected Nodes" width:190 pos:[10,190]
button btn_exclude "Exclude selected Nodes" width:190 pos:[10,215]
button btn_matSettings "Create Material Settings" width:190 pos:[10,255]
button btn_TextureSettings "Create Texture Settings" width:190 pos:[10,280]
button btn_Cubetex "Create CubeTexture" width:190 pos:[10,305]
button btn_effectMethod "Create Effect-Method-Modifier" width:190 pos:[10,330]
button btn_SkyBox "Create SkyBox" width:190 pos:[10,355]

button btn_addVertex "Create Vertex-Anim-Source-Modifier" width:190 pos:[10,395]
button btn_addSkeleton "Create SkeletonModifier" width:190 pos:[10,420]
button btn_addAnimSet "Create AnimationSet-Modifier" width:190 pos:[10,470]
button btn_addAnimator "Create Animator-Modifier" width:190 pos:[10,445]

on btn_forum pressed do macros.run "AWDCommands" "GotoAway3dForum"
on btn_update pressed do macros.run "AWDCommands" "GotoAway3dForum"
on btn_about pressed do macros.run "AWDCommands" "GotoAway3dForum"
on btn_update pressed do macros.run "AWDCommands" "AWDCheckForUpdate"
on btn_about pressed do macros.run "AWDCommands" "OpenAWDAboutDialog"
on btn_help pressed do macros.run "AWDCommands" "OpenAWDHelpFile"

on btn_import pressed do macros.run "AWDCommands" "ImportAWD"
on btn_export pressed do macros.run "AWDCommands" "ExportAWD"
on btn_include pressed do macros.run "AWDCommands" "IncludeSelectedObjects"
on btn_exclude pressed do macros.run "AWDCommands" "ExcludeSelectedObjects"
on btn_matSettings pressed do macros.run "AWDCommands" "AddAWDMaterialSettings"
on btn_TextureSettings pressed do macros.run "AWDCommands" "AddAWDTextureSettings"
on btn_effectMethod pressed do macros.run "AWDCommands" "AddAWDEffectModifier"
on btn_SkyBox pressed do macros.run "AWDCommands" "AddAWDSkyBox"
on btn_Cubetex pressed do macros.run "AWDCommands" "AddAWDCubeTexture"
on btn_addSkeleton pressed do macros.run "AWDCommands" "AddAWDSkeleton"
on btn_addVertex pressed do macros.run "AWDCommands" "AddAWDVertexAnimSource"
on btn_addAnimator pressed do macros.run "AWDCommands" "AddAWDAnimator"
on btn_addSkeleton pressed do macros.run "AWDCommands" "AddAWDSkeleton"
on btn_addAnimSet pressed do macros.run "AWDCommands" "AddAWDAnimationSet"
on btn_addAnimator pressed do macros.run "AWDCommands" "AddAWDAnimator"
)
on isChecked do awdHelperMenuRollOut.open --return true if rollout is open --if isChecked returns false (the rollout is not open in a dialog), --the on execute handler will be called and will create the dialog.

Expand All @@ -120,6 +184,8 @@ macroScript OpenAWDHelperMenu
createDialog awdHelperMenuRollOut width:210
)
--If isChecked returns true and the user pressed the button again, --instead of calling the on execute handler, the macroScript will call --the on closeDialogs handler and destroy the dialog.

on closeDialogs do destroyDialog awdHelperMenuRollOut

on closeDialogs do (
destroyDialog awdHelperMenuRollOut
)
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
macroScript AddAWDCameraModifier
category:"AWDCommands"
toolTip:""
(

if selection.count==0 then (
selected=#()
for i in objects do(
if superclassof i==camera then(
for m in i.modifiers do(
if classof m as string=="AWDCamera" then(
appendIfUnique selected i
)
)
)
)
if selected.count>0 then(
answer=queryBox ("Nothing is selected.\n\n "+selected.count as string+" AWDCamera modifiers found in the scene.\n\n Select the Objects that are holding the modifiers ?")
if answer==true then(
select selected
)
)
else messageBox ("No Object is selected.\n\n No AWDCamera modifiers found in the scene.\n\n To create a AWDCamera modifier, select one camera.")

)
else if selection.count>=1 then (
createdAny=false
lightSelected=false
for i in selection do(
if superclassof i==camera then(
lightSelected=true
print (superclassof i)
hasModifier=false
for m in i.modifiers do(
if classof m as string=="AWDCamera" then(
hasModifier=true
)
)
if not hasModifier then (
theObj = dotNetObject "MaxCustomControls.RenameInstanceDialog" ("AWDCamera")
theobj.text ="Add name for new AWDCamera"
DialogResult = theObj.Showmodal()
createdAny=true
dotnet.compareenums TheObj.DialogResult ((dotnetclass "System.Windows.Forms.DialogResult").OK)
result = theobj.InstanceName
newShadowMethod=AWDCamera()
newShadowMethod.name=result
addModifier selection[1] newShadowMethod
)
)
)
if lightSelected then (
if not createdAny then(
messageBox ("No AWDCamera-modifer created, because all selected camera allready have one applied.")
)
)
else messageBox ("To create a AWDCamera-modifier, you need to select a camera-object.")

max modify mode
)

)
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,15 @@ macroScript AddAWDAnimator
messagebox ("Selected Object allready contains a AWDAnimator-modifier.\n\nEach object should only hold one AWDAnimator-modifier.")
)
else(

theObj = dotNetObject "MaxCustomControls.RenameInstanceDialog" ("AWDAnimator")
theobj.text ="Add name for new AWDAnimator"
DialogResult = theObj.Showmodal()
check=dotnet.compareenums TheObj.DialogResult ((dotnetclass "System.Windows.Forms.DialogResult").OK)
if not check then return()
result = theobj.InstanceName
MyNewModifier = AWDAnimator()
MyNewModifier.name = "AWD Animator"
MyNewModifier.name = result
addmodifier thismesh MyNewModifier
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ macroScript AddAWDCubeTexture
toolTip:"Create a AWDCubeTexture"
(

theObj = dotNetObject "MaxCustomControls.RenameInstanceDialog" ("AWDEffectMethod")
theobj.text ="Add name for new AWDEffectMethod"
theObj = dotNetObject "MaxCustomControls.RenameInstanceDialog" ("AWDCubeTexture")
theobj.text ="Add name for new AWDCubeTexture"
DialogResult = theObj.Showmodal()
dotnet.compareenums TheObj.DialogResult ((dotnetclass "System.Windows.Forms.DialogResult").OK)
check=dotnet.compareenums TheObj.DialogResult ((dotnetclass "System.Windows.Forms.DialogResult").OK)
if not check then return()
result = theobj.InstanceName
newCubeMat=AWDCubeMaterial()
newCubeMat.name=result
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
macroScript AddAWDEffectModifier
category:"AWDCommands"
category:"AWDCommands"
toolTip:""
(

Expand Down
Loading

0 comments on commit f6c0d28

Please sign in to comment.