diff --git a/README.md b/README.md index a9e0cf1..00abb85 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/awayextensions3dsmax/AWDCommands/AWDCommands-AWDCheckForUpdate.mcr b/awayextensions3dsmax/AWDCommands/AWDCommands-AWDCheckForUpdate.mcr deleted file mode 100644 index 2f9163f..0000000 --- a/awayextensions3dsmax/AWDCommands/AWDCommands-AWDCheckForUpdate.mcr +++ /dev/null @@ -1,6 +0,0 @@ -macroScript AWDCheckForUpdate - category:"AWDCommands" - toolTip:"" -( - messageBox("'CheckForUpdate' function is not in a working state yet.") -) diff --git a/awayextensions3dsmax/AWDCommands/AWDCommands-ExportAWD.mcr b/awayextensions3dsmax/AWDCommands/AWDCommands-ExportAWD.mcr deleted file mode 100644 index ffdbf4f..0000000 --- a/awayextensions3dsmax/AWDCommands/AWDCommands-ExportAWD.mcr +++ /dev/null @@ -1,13 +0,0 @@ -macroScript ExportAWD - category:"AWDCommands" - toolTip:"" -( - onlyFileName=filterString maxFileName "." - if onlyFileName.Count==0 then onlyFileName=#("NewAWDFile") - - newAWDFileName=maxFilePath + onlyFileName[1] + ".awd" - newFileName=getSaveFileName caption:"Save as AWD-File" fileName:newAWDFileName - if newFileName!=undefined then( - exportFile newFileName -- [ #noPrompt ] [ selectedOnly: ] [ using: ] - ) -) diff --git a/awayextensions3dsmax/AWDCommands/AWDCommands-GotoAway3dForum.mcr b/awayextensions3dsmax/AWDCommands/AWDCommands-GotoAway3dForum.mcr deleted file mode 100644 index 2938b46..0000000 --- a/awayextensions3dsmax/AWDCommands/AWDCommands-GotoAway3dForum.mcr +++ /dev/null @@ -1,6 +0,0 @@ -macroScript GotoAway3dForum - category:"AWDCommands" - toolTip:"" -( - shellLaunch "http://www.away3d.com" "" -) diff --git a/awayextensions3dsmax/AWDCommands/AWDCommands-ImportAWD.mcr b/awayextensions3dsmax/AWDCommands/AWDCommands-ImportAWD.mcr deleted file mode 100644 index af85935..0000000 --- a/awayextensions3dsmax/AWDCommands/AWDCommands-ImportAWD.mcr +++ /dev/null @@ -1,6 +0,0 @@ -macroScript ImportAWD - category:"AWDCommands" - toolTip:"" -( - messageBox("AWD-Importer is not in a working state yet.") -) diff --git a/awayextensions3dsmax/AWDCommands/AWDCommands-OpenAWDHelperMenu.mcr b/awayextensions3dsmax/AWDCommands/AWDCommands-OpenAWDHelperMenu.mcr deleted file mode 100644 index d2e1da8..0000000 --- a/awayextensions3dsmax/AWDCommands/AWDCommands-OpenAWDHelperMenu.mcr +++ /dev/null @@ -1,49 +0,0 @@ -macroScript OpenAWDHelperMenu - category:"AWDCommands" - toolTip:"" -( - rollout awdHelperMenuRollOut "AWD Helper Menu" --define a rollout - ( - 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_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] - - on btn_forum pressed do macros.run "AWDCommands" "GotoAway3dForum" - on btn_update pressed do messageBox("Not implemented yet") - on btn_about pressed do messageBox("Not implemented yet") - 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_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_addAnimSet pressed do macros.run "AWDCommands" "AddAWDAnimationSet" - ) - 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. - - on execute do ( - try destroyDialog awdHelperMenuRollOut catch (print ("couldfind it")) - 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 -) \ No newline at end of file diff --git a/awayextensions3dsmax/AWDCommands/AWDCommands-AWDToolBarCommands.mcr b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AWDToolBarCommands.mcr similarity index 51% rename from awayextensions3dsmax/AWDCommands/AWDCommands-AWDToolBarCommands.mcr rename to awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AWDToolBarCommands.mcr index d204815..65596e4 100644 --- a/awayextensions3dsmax/AWDCommands/AWDCommands-AWDToolBarCommands.mcr +++ b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AWDToolBarCommands.mcr @@ -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" @@ -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: ] [ using: ] + exportFile newFileName --#noPrompt -- [ selectedOnly: ] [ using: ] ) ) macroScript ImportAWD @@ -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 ( @@ -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) @@ -66,7 +124,7 @@ macroScript AWDCheckForUpdate ) ) else( - messageBox("Error reading the version-file ().") + messageBox("Error downloading the version-file.") ) ) else( @@ -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. @@ -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 + ) ) \ No newline at end of file diff --git a/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWCameraModifier.mcr b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWCameraModifier.mcr new file mode 100644 index 0000000..0cd122d --- /dev/null +++ b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWCameraModifier.mcr @@ -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 + ) + +) \ No newline at end of file diff --git a/awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDAnimationSet.mcr b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDAnimationSet.mcr similarity index 100% rename from awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDAnimationSet.mcr rename to awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDAnimationSet.mcr diff --git a/awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDAnimator.mcr b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDAnimator.mcr similarity index 85% rename from awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDAnimator.mcr rename to awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDAnimator.mcr index c96d1f6..3f11ff0 100644 --- a/awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDAnimator.mcr +++ b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDAnimator.mcr @@ -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 ) ) diff --git a/awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDCubeTexture.mcr b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDCubeTexture.mcr similarity index 83% rename from awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDCubeTexture.mcr rename to awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDCubeTexture.mcr index 2118eac..cb60993 100644 --- a/awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDCubeTexture.mcr +++ b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDCubeTexture.mcr @@ -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 diff --git a/awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDEffectModifier.mcr b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDEffectModifier.mcr similarity index 98% rename from awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDEffectModifier.mcr rename to awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDEffectModifier.mcr index 39e5fc5..2ee4b15 100644 --- a/awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDEffectModifier.mcr +++ b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDEffectModifier.mcr @@ -1,5 +1,5 @@ macroScript AddAWDEffectModifier - category:"AWDCommands" + category:"AWDCommands" toolTip:"" ( diff --git a/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDLightModifier.mcr b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDLightModifier.mcr new file mode 100644 index 0000000..a161435 --- /dev/null +++ b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDLightModifier.mcr @@ -0,0 +1,62 @@ +macroScript AddAWDLightModifier + category:"AWDCommands" + toolTip:"" + ( + + if selection.count==0 then ( + selected=#() + for i in objects do( + if superclassof i==light then( + for m in i.modifiers do( + if classof m as string=="AWDShadowMethod" then( + appendIfUnique selected i + ) + ) + ) + ) + if selected.count>0 then( + answer=queryBox ("Nothing is selected.\n\n "+selected.count as string+" AWDShadowMethod 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 AWDShadowMethod modifiers found in the scene.\n\n To create a AWDShadowMethod modifier, select one light.") + + ) + else if selection.count>=1 then ( + createdAny=false + lightSelected=false + for i in selection do( + if superclassof i==light then( + lightSelected=true + print (superclassof i) + hasModifier=false + for m in i.modifiers do( + if classof m as string=="AWDShadowMethod" then( + hasModifier=true + ) + ) + if not hasModifier then ( + theObj = dotNetObject "MaxCustomControls.RenameInstanceDialog" ("AWDShadowMethod") + theobj.text ="Add name for new AWDShadowMethod" + DialogResult = theObj.Showmodal() + createdAny=true + dotnet.compareenums TheObj.DialogResult ((dotnetclass "System.Windows.Forms.DialogResult").OK) + result = theobj.InstanceName + newShadowMethod=AWDShadowMethod() + newShadowMethod.name=result + addModifier selection[1] newShadowMethod + ) + ) + ) + if lightSelected then ( + if not createdAny then( + messageBox ("No AWDShadowMethod-modifer created, because all selected lights allready have one applied.") + ) + ) + else messageBox ("To create AWDShadowMethods, you need to select a light-object.") + + max modify mode + ) + +) \ No newline at end of file diff --git a/awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDMaterialSettings.mcr b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDMaterialSettings.mcr similarity index 92% rename from awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDMaterialSettings.mcr rename to awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDMaterialSettings.mcr index 675ce65..224ba9e 100644 --- a/awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDMaterialSettings.mcr +++ b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDMaterialSettings.mcr @@ -80,6 +80,9 @@ macroScript addAWDMaterialSettings if classof oneMat == Standardmaterial then ( createdSettings = addAWDMaterialSettings oneMat if not createdSettings then failedToCreate+=1 + --showShadingrollups oneMat + fileIn (getDir #maxRoot + "\\plugins\\AwayExtensions3dsMax\\AWDHelperScripts\\AWDGeneralHelpers.ms")--reload this file here, so the function is available after restoring the 3dsmax-scene + oneMat.thisAWDID=getAWDID() ) else failedToCreate+=1 ) diff --git a/awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDObjectSettings.mcr b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDObjectSettings.mcr similarity index 100% rename from awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDObjectSettings.mcr rename to awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDObjectSettings.mcr diff --git a/awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDSkeleton.mcr b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDSkeleton.mcr similarity index 92% rename from awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDSkeleton.mcr rename to awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDSkeleton.mcr index 9fb97dd..6ae0951 100644 --- a/awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDSkeleton.mcr +++ b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDSkeleton.mcr @@ -17,7 +17,8 @@ if meshes.count==1 then ( theObj = dotNetObject "MaxCustomControls.RenameInstanceDialog" ("AWDSkeleton") theobj.text ="Add name for new AWDSkeleton" 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 newSkeletonMod=AWDSkeleton() newSkeletonMod.name = result diff --git a/awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDSkyBox.mcr b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDSkyBox.mcr similarity index 62% rename from awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDSkyBox.mcr rename to awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDSkyBox.mcr index a624cae..253ddd2 100644 --- a/awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDSkyBox.mcr +++ b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDSkyBox.mcr @@ -18,13 +18,18 @@ macroScript AddAWDSkyBox theObj = dotNetObject "MaxCustomControls.RenameInstanceDialog" ("AWDSkyBox") theobj.text ="Add name for new AWDSkyBox" 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 - thisSkyBox=AWDSkyBox() - thisSkyBox.size=100 - thisSkyBox.name = result - select thisSkyBox - max modify mode + print "dsfds"+(check as string) + print result + if result!="" then( + thisSkyBox=AWDSkyBox() + thisSkyBox.size=100 + thisSkyBox.name = result + select thisSkyBox + max modify mode + ) ) diff --git a/awayextensions3dsmax/AWDCommands/AWDCommands-addAWDTextureSettings.mcr b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDTextureSettings.mcr similarity index 100% rename from awayextensions3dsmax/AWDCommands/AWDCommands-addAWDTextureSettings.mcr rename to awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDTextureSettings.mcr diff --git a/awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDVertexAnimSource.mcr b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDVertexAnimSource.mcr similarity index 93% rename from awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDVertexAnimSource.mcr rename to awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDVertexAnimSource.mcr index 23fd6b8..9d59d9b 100644 --- a/awayextensions3dsmax/AWDCommands/AWDCommands-AddAWDVertexAnimSource.mcr +++ b/awayextensions3dsmax/AWDCommands/AWDCommands/AWDCommands-AddAWDVertexAnimSource.mcr @@ -24,7 +24,8 @@ macroScript AddAWDVertexAnimSource theObj = dotNetObject "MaxCustomControls.RenameInstanceDialog" ("AWDVertexAnimSource") theobj.text ="Add name for new AWDVertexAnimSource" 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 thisVertexAnimSource=AWDVertexAnimSource() thisVertexAnimSource.name = result diff --git a/awayextensions3dsmax/AWDDocs.odt b/awayextensions3dsmax/AWDDocs.odt new file mode 100644 index 0000000..97a86d0 Binary files /dev/null and b/awayextensions3dsmax/AWDDocs.odt differ diff --git a/awayextensions3dsmax/AWDExporter/maxawdexporter_2011_32.dle b/awayextensions3dsmax/AWDExporter/maxawdexporter_2011_32.dle new file mode 100644 index 0000000..cb3cdde Binary files /dev/null and b/awayextensions3dsmax/AWDExporter/maxawdexporter_2011_32.dle differ diff --git a/awayextensions3dsmax/AWDExporter/maxawdexporter_2011_64.dle b/awayextensions3dsmax/AWDExporter/maxawdexporter_2011_64.dle new file mode 100644 index 0000000..91713ed Binary files /dev/null and b/awayextensions3dsmax/AWDExporter/maxawdexporter_2011_64.dle differ diff --git a/awayextensions3dsmax/AWDExporter/maxawdexporter_2012_32.dle b/awayextensions3dsmax/AWDExporter/maxawdexporter_2012_32.dle new file mode 100644 index 0000000..ba8594d Binary files /dev/null and b/awayextensions3dsmax/AWDExporter/maxawdexporter_2012_32.dle differ diff --git a/awayextensions3dsmax/AWDExporter/maxawdexporter_2012_64.dle b/awayextensions3dsmax/AWDExporter/maxawdexporter_2012_64.dle new file mode 100644 index 0000000..4cbd31b Binary files /dev/null and b/awayextensions3dsmax/AWDExporter/maxawdexporter_2012_64.dle differ diff --git a/awayextensions3dsmax/AWDExporter/maxawdexporter_2013_32.dle b/awayextensions3dsmax/AWDExporter/maxawdexporter_2013_32.dle new file mode 100644 index 0000000..9c76852 Binary files /dev/null and b/awayextensions3dsmax/AWDExporter/maxawdexporter_2013_32.dle differ diff --git a/awayextensions3dsmax/AWDExporter/maxawdexporter_2013_64.dle b/awayextensions3dsmax/AWDExporter/maxawdexporter_2013_64.dle new file mode 100644 index 0000000..ac3517f Binary files /dev/null and b/awayextensions3dsmax/AWDExporter/maxawdexporter_2013_64.dle differ diff --git a/awayextensions3dsmax/AWDExporter/maxawdexporter_2014_64.dle b/awayextensions3dsmax/AWDExporter/maxawdexporter_2014_64.dle new file mode 100644 index 0000000..9b6ddf9 Binary files /dev/null and b/awayextensions3dsmax/AWDExporter/maxawdexporter_2014_64.dle differ diff --git a/awayextensions3dsmax/setup.bmp b/awayextensions3dsmax/AWDIcons/AWDAbout.bmp similarity index 58% rename from awayextensions3dsmax/setup.bmp rename to awayextensions3dsmax/AWDIcons/AWDAbout.bmp index 3a23ae3..19c4cfe 100644 Binary files a/awayextensions3dsmax/setup.bmp and b/awayextensions3dsmax/AWDIcons/AWDAbout.bmp differ diff --git a/awayextensions3dsmax/AWDIcons/AwayExtensionIcons_16a.bmp b/awayextensions3dsmax/AWDIcons/AwayExtensionIcons_16a.bmp new file mode 100644 index 0000000..414b536 Binary files /dev/null and b/awayextensions3dsmax/AWDIcons/AwayExtensionIcons_16a.bmp differ diff --git a/awayextensions3dsmax/AWDIcons/AwayExtensionIcons_16i.bmp b/awayextensions3dsmax/AWDIcons/AwayExtensionIcons_16i.bmp new file mode 100644 index 0000000..7487cb6 Binary files /dev/null and b/awayextensions3dsmax/AWDIcons/AwayExtensionIcons_16i.bmp differ diff --git a/awayextensions3dsmax/AWDIcons/AwayExtensionIcons_24a.bmp b/awayextensions3dsmax/AWDIcons/AwayExtensionIcons_24a.bmp new file mode 100644 index 0000000..81ee8b2 Binary files /dev/null and b/awayextensions3dsmax/AWDIcons/AwayExtensionIcons_24a.bmp differ diff --git a/awayextensions3dsmax/AWDIcons/AwayExtensionIcons_24i.bmp b/awayextensions3dsmax/AWDIcons/AwayExtensionIcons_24i.bmp new file mode 100644 index 0000000..b95ea1f Binary files /dev/null and b/awayextensions3dsmax/AWDIcons/AwayExtensionIcons_24i.bmp differ diff --git a/awayextensions3dsmax/AWDToolBar_2011_2012.CUI b/awayextensions3dsmax/AWDToolbars/AWDToolBar_2011_2012.CUI similarity index 90% rename from awayextensions3dsmax/AWDToolBar_2011_2012.CUI rename to awayextensions3dsmax/AWDToolbars/AWDToolBar_2011_2012.CUI index dc5f592..472ef15 100644 --- a/awayextensions3dsmax/AWDToolBar_2011_2012.CUI +++ b/awayextensions3dsmax/AWDToolbars/AWDToolBar_2011_2012.CUI @@ -357,23 +357,27 @@ CurPos=1 0 92 525 131 CType=1 ToolbarRows=2 ToolbarType=3 -ItemCount=16 +ItemCount=20 Item0=2|0|0|31|4|647394|GotoAway3dForum`AWDCommands|0|0|"GotoAway3dForum"||0|AwayExtensionIcons Item1=2|0|0|31|4|647394|AWDCheckForUpdate`AWDCommands|0|0|"AWDCheckForUpdate"||1|AwayExtensionIcons -Item2=2|0|0|31|4|647394|ImportAWD`AWDCommands|0|0|"ImportAWD"||18|AwayExtensionIcons -Item3=2|0|0|31|4|647394|ExportAWD`AWDCommands|0|0|"ExportAWD"||19|AwayExtensionIcons -Item4=2|0|0|31|4|647394|OpenAWDHelperMenu`AWDCommands|0|0|"OpenAWDHelperMenu"||17|AwayExtensionIcons -Item5=2|0|0|31|4|647394|IncludeSelectedObjects`AWDCommands|0|0|"IncludeSelectedObjects"||2|AwayExtensionIcons -Item6=2|0|0|31|4|647394|ExcludeSelectedObjects`AWDCommands|0|0|"ExcludeSelectedObjects"||3|AwayExtensionIcons -Item7=2|0|0|31|4|647394|AddAWDMaterialSettings`AWDCommands|0|0|"AddAWDMaterialSettings"||5|AwayExtensionIcons -Item8=2|0|0|31|4|647394|addAWDTextureSettings`AWDCommands|0|0|"AddAWDTextureSettings"||6|AwayExtensionIcons -Item9=2|0|0|31|4|647394|AddAWDEffectModifier`AWDCommands|0|0|"AddAWDEffectModifier"||8|AwayExtensionIcons -Item10=2|0|0|31|4|647394|AddAWDSkyBox`AWDCommands|0|0|"AddAWDSkyBox"||9|AwayExtensionIcons +Item2=2|0|0|31|4|647394|OpenAWDHelpFile`AWDCommands|0|0|"OpenAWDHelpFile"||16|AwayExtensionIcons +Item3=2|0|0|31|4|647394|OpenAWDAboutDialog`AWDCommands|0|0|"OpenAWDAboutDialog"||4|AwayExtensionIcons +Item4=2|0|0|31|4|647394|ImportAWD`AWDCommands|0|0|"ImportAWD"||18|AwayExtensionIcons +Item5=2|0|0|31|4|647394|ExportAWD`AWDCommands|0|0|"ExportAWD"||19|AwayExtensionIcons +Item6=2|0|0|31|4|647394|OpenAWDHelperMenu`AWDCommands|0|0|"OpenAWDHelperMenu"||22|AwayExtensionIcons +Item7=2|0|0|31|4|647394|IncludeSelectedObjects`AWDCommands|0|0|"IncludeSelectedObjects"||2|AwayExtensionIcons +Item8=2|0|0|31|4|647394|ExcludeSelectedObjects`AWDCommands|0|0|"ExcludeSelectedObjects"||3|AwayExtensionIcons +Item9=2|0|0|31|4|647394|AddAWDMaterialSettings`AWDCommands|0|0|"AddAWDMaterialSettings"||5|AwayExtensionIcons +Item10=2|0|0|31|4|647394|addAWDTextureSettings`AWDCommands|0|0|"AddAWDTextureSettings"||6|AwayExtensionIcons Item11=2|0|0|31|4|647394|AddAWDCubeTexture`AWDCommands|0|0|"AddAWDCubeTexture"||7|AwayExtensionIcons -Item12=2|0|0|31|4|647394|AddAWDSkeleton`AWDCommands|0|0|"AddAWDSkeleton"||12|AwayExtensionIcons -Item13=2|0|0|31|4|647394|AddAWDVertexAnimSource`AWDCommands|0|0|"AddAWDVertexAnimSource"||11|AwayExtensionIcons -Item14=2|0|0|31|4|647394|AddAWDAnimationSet`AWDCommands|0|0|"AddAWDAnimationSet"||14|AwayExtensionIcons -Item15=2|0|0|31|4|647394|AddAWDAnimator`AWDCommands|0|0|"AddAWDAnimator"||13|AwayExtensionIcons +Item12=2|0|0|31|4|647394|AddAWDEffectModifier`AWDCommands|0|0|"AddAWDEffectModifier"||8|AwayExtensionIcons +Item13=2|0|0|31|4|647394|AddAWDSkyBox`AWDCommands|0|0|"AddAWDSkyBox"||9|AwayExtensionIcons +Item14=2|0|0|31|4|647394|AddAWDVertexAnimSource`AWDCommands|0|0|"AddAWDVertexAnimSource"||11|AwayExtensionIcons +Item15=2|0|0|31|4|647394|AddAWDSkeleton`AWDCommands|0|0|"AddAWDSkeleton"||12|AwayExtensionIcons +Item16=2|0|0|31|4|647394|AddAWDAnimationSet`AWDCommands|0|0|"AddAWDAnimationSet"||14|AwayExtensionIcons +Item17=2|0|0|31|4|647394|AddAWDAnimator`AWDCommands|0|0|"AddAWDAnimator"||13|AwayExtensionIcons +Item18=2|0|0|31|4|647394|AddAWDLightModifier`AWDCommands|0|0|"AddAWDLightModifier"||10|AwayExtensionIcons +Item19=2|0|0|31|4|647394|AddAWDCameraModifier`AWDCommands|0|0|"AddAWDCameraModifier"||23|AwayExtensionIcons [QATItems] QATItemCount=6 Item0=0|40004 diff --git a/awayextensions3dsmax/AWDToolBar_2013_2014.cuix b/awayextensions3dsmax/AWDToolbars/AWDToolBar_2013_2014.cuix similarity index 97% rename from awayextensions3dsmax/AWDToolBar_2013_2014.cuix rename to awayextensions3dsmax/AWDToolbars/AWDToolBar_2013_2014.cuix index 6425307..bb343f5 100644 --- a/awayextensions3dsmax/AWDToolBar_2013_2014.cuix +++ b/awayextensions3dsmax/AWDToolbars/AWDToolBar_2013_2014.cuix @@ -9,9 +9,11 @@ + + - + @@ -23,6 +25,8 @@ + +