Skip to content

Commit

Permalink
fix cam.fov / refactor for references
Browse files Browse the repository at this point in the history
  • Loading branch information
80prozent committed May 21, 2014
1 parent eec2d7f commit 49e71a7
Show file tree
Hide file tree
Showing 27 changed files with 673 additions and 258 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,26 @@ macroScript AddAWDCameraModifier

if selection.count==0 then (
selected=#()
selectedObj=#()
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
appendIfUnique selected m
appendIfUnique selectedObj i
)
)
)
)
if selected.count>0 then(
if selected.count==1 then(
max modify mode
modPanel.setCurrentObject selected[1]
)
else if selected.count>1 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
)
select selectedObj
)
)
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.")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,31 @@ if meshes.count>=1 then (
)
else(
selected=#()
selectedObj=#()
testCnter=0
for i in objects do(
for m in i.modifiers do(
if classof m as string=="AWDAnimationSet" then(
appendIfUnique selected i
appendIfUnique selected m
appendIfUnique selectedObj i

)
)
)
answer=queryBox ("Nothing is selected.\n\n Found "+testCnter as string+" AnimationClips in the scene.\n\n Select the "+selected.count as string + " Objects that are holding the AnimationClips ?")
if answer==true then(
select selected
)
if selected.count==1 then(
max modify mode
modPanel.setCurrentObject selected[1]
)
else if selected.count>1 then(
answer=queryBox ("Nothing is selected.\n\n "+selected.count as string+" AWDAnimationSets modifiers found in the scene.\n\n Select the Objects that are holding the modifiers ?")
if answer==true then(
select selectedObj
)

)
else(
messagebox ("Nothing is selected.\n\n No AWDAnimationSets found in scene")
)

)
)
Original file line number Diff line number Diff line change
Expand Up @@ -45,32 +45,31 @@ macroScript AddAWDAnimator
else(
meshes = $*
selected=#()
selectedObj=#()
firstmod=undefined
if meshes!= undefined then (
for i in meshes do(
for oneMod in i.modifiers do(
if (classOf oneMod as string)=="AWDAnimator" then (
appendIfUnique selected i
appendIfUnique selected m
appendIfUnique selectedObj i
)
)
)
)
if selected.count>1 then(
answer=queryBox ("Nothing is selected.\n\nScene contains "+selected.count as string+" objects that have AWDAnimator-modifier applied.\n\nSelect the Objects ?")
if answer==true then(
select selected
)
)
else if selected.count==1 then(
answer=queryBox ("Nothing is selected.\n\n Scene contains "+selected.count as string+" object that has AWDAnimators-modifier applied.\n\nSelect the Object ?")
if selected.count==1 then(
max modify mode
modPanel.setCurrentObject selected[1]
)
else if selected.count>1 then(
answer=queryBox ("Nothing is selected.\n\n "+selected.count as string+" AWDAnimators modifiers found in the scene.\n\n Select the Objects that are holding the modifiers ?")
if answer==true then(
select selected
)
)
select selectedObj
)
)
else (
messagebox ("Nothing is selected.\n\n Scene contains no objects that have AWDAnimators-modifier applied.\n\n")

)
)
)

)
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,24 @@ macroScript AddAWDEffectModifier

if selection.count==0 then (
selected=#()
selectedObj=#()
for i in objects do(
for m in i.modifiers do(
if classof m as string=="AWDEffectMethod" then(
appendIfUnique selected i
appendIfUnique selected m
appendIfUnique selectedObj i
)
)
)
if selected.count>0 then(

if selected.count==1 then(
max modify mode
modPanel.setCurrentObject selected[1]
)
else if selected.count>1 then(
answer=queryBox ("Nothing is selected.\n\n "+selected.count as string+" AWDEffectMethod modifiers found in the scene.\n\n Select the Objects that are holding the modifiers ?")
if answer==true then(
select selected
select selectedObj
)
)
else messageBox ("No Object is selected.\n\n No AWDEffectMethod modifiers found in the scene.\n\n To create a AWDEffectMethod modifier, select one object.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,27 @@ macroScript AddAWDLightModifier

if selection.count==0 then (
selected=#()
selectedObj=#()
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
appendIfUnique selected m
appendIfUnique selectedObj i
)
)
)
)
if selected.count>0 then(

if selected.count==1 then(
max modify mode
modPanel.setCurrentObject selected[1]
)
else if selected.count>1 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
)
select selectedObj
)
)
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.")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ macroScript addAWDMaterialSettings
mtl=undefined
--if material mode is "Compact-Mode"
if MatEditor.mode ==#basic then (
mtl = meditMaterials[activeMeditSlot]
mtl = medit.GetCurMtl()
)
--if material mode is "Slate-Mode"
else if MatEditor.mode ==#advanced then (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,25 @@ else if meshes.count>1 then messagebox("AWDSkeleton Modifier can only be attache
--if nothing is selected we check if nodes are in the scene
else(
selected=#()
selectedObj=#()
for i in objects do(
for m in i.modifiers do(
if classof m as string=="AWDSkeleton" or classof m as string=="AWDSkeletonClone" then(
appendIfUnique selected i
appendIfUnique selected m
appendIfUnique selectedObj m
)
)
)
if selected.count>0 then(
answer=queryBox ("Nothing is selected.\n\n Found "+selected.count as string+" AWD Skeleton modifiers found in the scene.\n\n Select the Objects that are holding the modifiers ?")
if selected.count==1 then(
max modify mode
modPanel.setCurrentObject selected[1]
)
else if selected.count>1 then(
answer=queryBox ("Nothing is selected.\n\n "+selected.count as string+" AWD Skeleton modifiers found in the scene.\n\n Select the Objects that are holding the modifiers ?")
if answer==true then(
select selected
)
)
select selectedObj
)
)
else(
answer=messageBox ("No Object is selected.\n\n No AWD Skeleton modifiers found in the scene.\n\n To create a AWD skeleton modifier, select the root-bone of your rigg.")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ macroScript addAWDTextureSettings
thisTexMap=undefined
--if material mode is "Compact-Mode"
if MatEditor.mode ==#basic then (
thisTexMap = meditMaterials[activeMeditSlot]
thisTexMap = medit.GetCurMtl()
)
--if material mode is "Slate-Mode"
else if MatEditor.mode ==#advanced then (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,26 @@ macroScript AddAWDVertexAnimSource
else(
meshes = $*
selected=#()
selectedObj=#()
if meshes!= undefined then (
for i in meshes do(
for m in i.modifiers do(
if classof m as string=="AWDVertexAnimSource" or classof m as string=="AWDVertexAnimSourceClone" then(
appendIfUnique selected i
)
appendIfUnique selected m
appendIfUnique selectedObj i
)
)
)
if selected.count>0 then(
answer=queryBox ("Nothing is selected.\n\n "+selected.count as string+" AWDVertexAnimSource-modifier found in the scene.\n\n Select the Objects that are holding the modifiers ?")
if selected.count==1 then(
max modify mode
modPanel.setCurrentObject selected[1]
)
else if selected.count>1 then(
answer=queryBox ("Nothing is selected.\n\n "+selected.count as string+" AWDVertexAnimSource modifiers found in the scene.\n\n Select the Objects that are holding the modifiers ?")
if answer==true then(
select selected
)
select selectedObj
)
)
else(
answer=messageBox ("No Object is selected.\n\n No AWDVertexAnimSource modifiers found in the scene.\n\n To create a AWD AWDVertexAnimSource modifier, select the animated mesh.")
)
Expand Down
Binary file modified awayextensions3dsmax/AWDExporter/maxawdexporter_2011_32.dle
Binary file not shown.
Binary file modified awayextensions3dsmax/AWDExporter/maxawdexporter_2011_64.dle
Binary file not shown.
Binary file modified awayextensions3dsmax/AWDExporter/maxawdexporter_2012_32.dle
Binary file not shown.
Binary file modified awayextensions3dsmax/AWDExporter/maxawdexporter_2012_64.dle
Binary file not shown.
Binary file modified awayextensions3dsmax/AWDExporter/maxawdexporter_2013_64.dle
Binary file not shown.
Binary file modified awayextensions3dsmax/AWDExporter/maxawdexporter_2014_64.dle
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" ?>
<AWDMAXVERSION Major="0" Message="update docs / remove inlcude manifest file from release builds" Minor="9" Revision="88"/>
<AWDMAXVERSION Major="0" Message="several fixes / refactor for references / add AWDObjectSettings as Modifier" Minor="9" Revision="89"/>
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ fn addAWDMaterialSettings thisMat = (
btn_removeambientenvMap.enabled=true
)
on btn_chooseambientenvMap pressed do(
mtl=undefined
if MatEditor.mode ==#basic then mtl = meditMaterials[activeMeditSlot]
mtl=undefined
if MatEditor.mode ==#basic then mtl = medit.GetCurMtl()
else if MatEditor.mode ==#advanced then mtl=sme.GetMtlInParamEditor()
if mtl!=undefined then(
fileIn (getDir #maxRoot + "\\plugins\\AwayExtensions3dsMax\\AWDCustomSettings\\AWDMaterialSettings.ms")--reload this file here, so the function is available after restoring the 3dsmax-scene
Expand Down Expand Up @@ -332,7 +332,7 @@ fn addAWDMaterialSettings thisMat = (
dropdownlist ddl_lightMapblendMode "BlendMode" items:#("NORMAL", "LAYER", "MULTIPLY", "ADD" , "ALPHA" ) height:6 align:#left animatable:false
on ddl_lightMapbase selected selectedIdx do (
mtl=undefined
if MatEditor.mode ==#basic then mtl = meditMaterials[activeMeditSlot]
if MatEditor.mode ==#basic then mtl = medit.GetCurMtl()
else if MatEditor.mode ==#advanced then mtl=sme.GetMtlInParamEditor()
if mtl!=undefined then(
fileIn (getDir #maxRoot + "\\plugins\\AwayExtensions3dsMax\\AWDCustomSettings\\AWDMaterialSettings.ms")--reload this file here, so the function is available after restoring the 3dsmax-scene
Expand All @@ -356,7 +356,7 @@ fn addAWDMaterialSettings thisMat = (
dropDownList ddl_cellDiffusebase "Base Method" items:#("BasicDiffuse", "GradientDiffuse", "WarpDiffuse") animateable:false
on ddl_cellDiffusebase selected selectedIdx do (
mtl=undefined
if MatEditor.mode ==#basic then mtl = meditMaterials[activeMeditSlot]
if MatEditor.mode ==#basic then mtl = medit.GetCurMtl()
else if MatEditor.mode ==#advanced then mtl=sme.GetMtlInParamEditor()
if mtl!=undefined then(
fileIn (getDir #maxRoot + "\\plugins\\AwayExtensions3dsMax\\AWDCustomSettings\\AWDMaterialSettings.ms")--reload this file here, so the function is available after restoring the 3dsmax-scene
Expand Down Expand Up @@ -420,7 +420,7 @@ fn addAWDMaterialSettings thisMat = (

on ddl_ambient selected selectedIdx do (
mtl=undefined
if MatEditor.mode ==#basic then mtl = meditMaterials[activeMeditSlot]
if MatEditor.mode ==#basic then mtl = medit.GetCurMtl()
else if MatEditor.mode ==#advanced then mtl=sme.GetMtlInParamEditor()
if mtl!=undefined then(
fileIn (getDir #maxRoot + "\\plugins\\AwayExtensions3dsMax\\AWDCustomSettings\\AWDMaterialSettings.ms")--reload this file here, so the function is available after restoring the 3dsmax-scene
Expand All @@ -429,7 +429,7 @@ fn addAWDMaterialSettings thisMat = (
)
on ddl_diffuse selected selectedIdx do (
mtl=undefined
if MatEditor.mode ==#basic then mtl = meditMaterials[activeMeditSlot]
if MatEditor.mode ==#basic then mtl = medit.GetCurMtl()
else if MatEditor.mode ==#advanced then mtl=sme.GetMtlInParamEditor()
if mtl!=undefined then(
fileIn (getDir #maxRoot + "\\plugins\\AwayExtensions3dsMax\\AWDCustomSettings\\AWDMaterialSettings.ms")--reload this file here, so the function is available after restoring the 3dsmax-scene
Expand All @@ -438,7 +438,7 @@ fn addAWDMaterialSettings thisMat = (
)
on ddl_spec selected selectedIdx do (
mtl=undefined
if MatEditor.mode ==#basic then mtl = meditMaterials[activeMeditSlot]
if MatEditor.mode ==#basic then mtl = medit.GetCurMtl()
else if MatEditor.mode ==#advanced then mtl=sme.GetMtlInParamEditor()
if mtl!=undefined then(
fileIn (getDir #maxRoot + "\\plugins\\AwayExtensions3dsMax\\AWDCustomSettings\\AWDMaterialSettings.ms")--reload this file here, so the function is available after restoring the 3dsmax-scene
Expand All @@ -447,7 +447,7 @@ fn addAWDMaterialSettings thisMat = (
)
on ddl_normal selected selectedIdx do (
mtl=undefined
if MatEditor.mode ==#basic then mtl = meditMaterials[activeMeditSlot]
if MatEditor.mode ==#basic then mtl = medit.GetCurMtl()
else if MatEditor.mode ==#advanced then mtl=sme.GetMtlInParamEditor()
if mtl!=undefined then(
fileIn (getDir #maxRoot + "\\plugins\\AwayExtensions3dsMax\\AWDCustomSettings\\AWDMaterialSettings.ms")--reload this file here, so the function is available after restoring the 3dsmax-scene
Expand Down Expand Up @@ -498,7 +498,7 @@ fn addAWDMaterialSettings thisMat = (
)
on btn_add_effectMethod pressed do (
mtl=undefined
if MatEditor.mode ==#basic then mtl = meditMaterials[activeMeditSlot]
if MatEditor.mode ==#basic then mtl = medit.GetCurMtl()
else if MatEditor.mode ==#advanced then mtl=sme.GetMtlInParamEditor()
if mtl!=undefined then(
fileIn (getDir #maxRoot + "\\plugins\\AwayExtensions3dsMax\\AWDCustomSettings\\AWDMaterialSettings.ms")--reload this file here, so the function is available after restoring the 3dsmax-scene
Expand Down Expand Up @@ -639,7 +639,7 @@ fn addAWDMaterialSettings thisMat = (
if methodenabled then lbl_fxMethods.enabled=true
else lbl_fxMethods.enabled=false
mtl=undefined
if MatEditor.mode ==#basic then mtl = meditMaterials[activeMeditSlot]
if MatEditor.mode ==#basic then mtl = medit.GetCurMtl()
else if MatEditor.mode ==#advanced then mtl=sme.GetMtlInParamEditor()
if mtl!=undefined then(
fileIn (getDir #maxRoot + "\\plugins\\AwayExtensions3dsMax\\AWDCustomSettings\\AWDMaterialSettings.ms")--reload this file here, so the function is available after restoring the 3dsmax-scene
Expand All @@ -649,7 +649,7 @@ fn addAWDMaterialSettings thisMat = (

on btn_chooseshadowMod pressed do(
mtl=undefined
if MatEditor.mode ==#basic then mtl = meditMaterials[activeMeditSlot]
if MatEditor.mode ==#basic then mtl = medit.GetCurMtl()
else if MatEditor.mode ==#advanced then mtl=sme.GetMtlInParamEditor()
if mtl!=undefined then(
fileIn (getDir #maxRoot + "\\plugins\\AwayExtensions3dsMax\\AWDCustomSettings\\AWDMaterialSettings.ms")--reload this file here, so the function is available after restoring the 3dsmax-scene
Expand Down Expand Up @@ -726,7 +726,7 @@ fn addAWDMaterialSettings thisMat = (
lbl_shading.enabled=true

mtl=undefined
if MatEditor.mode ==#basic then mtl = meditMaterials[activeMeditSlot]
if MatEditor.mode ==#basic then mtl = medit.GetCurMtl()
else if MatEditor.mode ==#advanced then mtl=sme.GetMtlInParamEditor()
if mtl!=undefined then(
fileIn (getDir #maxRoot + "\\plugins\\AwayExtensions3dsMax\\AWDCustomSettings\\AWDMaterialSettings.ms")--reload this file here, so the function is available after restoring the 3dsmax-scene
Expand Down Expand Up @@ -774,7 +774,7 @@ fn addAWDMaterialSettings thisMat = (
lbl_shading.enabled=false

mtl=undefined
if MatEditor.mode ==#basic then mtl = meditMaterials[activeMeditSlot]
if MatEditor.mode ==#basic then mtl = medit.GetCurMtl()
else if MatEditor.mode ==#advanced then mtl=sme.GetMtlInParamEditor()
if mtl!=undefined then(
fileIn (getDir #maxRoot + "\\plugins\\AwayExtensions3dsMax\\AWDCustomSettings\\AWDMaterialSettings.ms")--reload this file here, so the function is available after restoring the 3dsmax-scene
Expand All @@ -789,7 +789,7 @@ fn addAWDMaterialSettings thisMat = (
lbl_shading.enabled=false
)
mtl=undefined
if MatEditor.mode ==#basic then mtl = meditMaterials[activeMeditSlot]
if MatEditor.mode ==#basic then mtl = medit.GetCurMtl()
else if MatEditor.mode ==#advanced then mtl=sme.GetMtlInParamEditor()
if mtl!=undefined then(
fileIn (getDir #maxRoot + "\\plugins\\AwayExtensions3dsMax\\AWDCustomSettings\\AWDMaterialSettings.ms")--reload this file here, so the function is available after restoring the 3dsmax-scene
Expand Down Expand Up @@ -913,7 +913,7 @@ fn addAWDMaterialSettings thisMat = (
else lbl_fxMethods.enabled=false

mtl=undefined
if MatEditor.mode ==#basic then mtl = meditMaterials[activeMeditSlot]
if MatEditor.mode ==#basic then mtl = medit.GetCurMtl()
else if MatEditor.mode ==#advanced then mtl=sme.GetMtlInParamEditor()
if mtl!=undefined then(
fileIn (getDir #maxRoot + "\\plugins\\AwayExtensions3dsMax\\AWDCustomSettings\\AWDMaterialSettings.ms")--reload this file here, so the function is available after restoring the 3dsmax-scene
Expand Down

0 comments on commit 49e71a7

Please sign in to comment.