Smart Vray Proxy

Go down

Smart Vray Proxy

Post by Chokobim on Sun Jun 05, 2011 7:12 pm

Magandang araw po sa lahat.Share ko lang tong Script Below to make a Vray Proxy fast.
Just copy and paste to notepad and saveas to SmartVrayConverter.mcr

1. Run the script
2. Open the 3ds Max and go to Customize
3. Pick Customize User Interface
4. Pick Toolbars
5. Pick New on left to make new toolbars and named it
6. Pick Category
7. Look for Cooper Script and then Pick
8. Then drag the VrmeshConverter to the new toolbar
9. Finished

Thanks To Cooper....Sana po makatulong...




macroScript SmartVrmeshConverter
category:"Cooper"

(
disablesceneredraw()
max create mode

projectPath = maxFilePath
scenepath = projectPath
vrmeshPath = (scenepath + "Vrmesh")
makeDir vrmeshPath

origObjArray = #()
convertedObjArray = #()
InstArray = #()
uniqueObjects = #()

selectedObjects = selection as array

for i in selectedObjects where superclassof i == geometryclass do
(
if finditem InstArray i == 0 then
(
InstanceMgr.GetInstances i &Instances
InstArray = InstArray + Instances
append uniqueObjects i
)
)

for g in uniqueObjects do if isgrouphead g do setGroupOpen g true

ObjCount = uniqueObjects.count
max select none

progressStart ("Converting " + ObjCount as string + " objects")
iter = 0
for i in uniqueObjects do
(
undo off
(
iter = iter + 1
-- i = selection[1]
origObj = i
if classof origObj != Vrayproxy then
(
if getUserProp origObj "VrmeshPath" == undefined then
(
vrmeshName = vrmeshPath + "\" + origObj.name + ".vrmesh"
originalName = vrmeshPath + "\" + origObj.name + ".max"
saveNodes origObj (vrmeshPath + "\" + origObj.name + ".max")
InstanceMgr.GetInstances origObj &TempInst
for g in TempInst do setUserProp g "VrmeshPath" vrmeshName
for g in TempInst do setUserProp g "OriginalPath" originalName
select origObj
vraymeshexport meshFile: vrmeshName display:0
convertedObj = VRayProxy filename: vrmeshName
)
else
(
vrmeshName = getUserProp origObj "VrmeshPath"
convertedObj = VRayProxy filename: vrmeshName
)
append origObjArray origObj
append convertedObjArray convertedObj
)

else
(
revertname = getFilenameFile i.filename
mergemaxfile (vrmeshPath + "\" + revertname + ".max") #(revertname) #select #noRedraw #mergeDups #useSceneMtlDups #neverReparent
append origObjArray origObj
append convertedObjArray selection[1]
)
)
progressUpdate (100 * iter / (ObjCount + 1) )
)

for q = 1 to origObjArray.count do instancereplace origObjArray[q] convertedObjArray[q]
for f in convertedObjArray do delete f
for g in uniqueObjects do if isgrouphead g do setGroupOpen g false

select selectedObjects
progressEnd()

enablesceneredraw()
completeredraw()
gc()
)
avatar
Chokobim
CGP Newbie
CGP Newbie

Number of posts : 86
Age : 53
Location : Laguna/Tokyo
Registration date : 13/11/2009

View user profile

Back to top Go down

Re: Smart Vray Proxy

Post by mez on Sun Jun 05, 2011 7:29 pm

thanks for sharing sir! thumbsup
avatar
mez
CGP Expert
CGP Expert

Number of posts : 2692
Location : dxb
Registration date : 24/07/2010

View user profile

Back to top Go down

Re: Smart Vray Proxy

Post by lukdoberder on Sun Jun 05, 2011 9:10 pm

anong ginagawa nito sir chokobim?
avatar
lukdoberder
CGP Newbie
CGP Newbie

Number of posts : 117
Age : 79
Location : Cainta, Rizal
Registration date : 14/01/2010

View user profile

Back to top Go down

Re: Smart Vray Proxy

Post by Chokobim on Sun Jun 05, 2011 9:27 pm

lukdoberder wrote:anong ginagawa nito sir chokobim?

It is the shortcut for makng a Vray Proxy..
avatar
Chokobim
CGP Newbie
CGP Newbie

Number of posts : 86
Age : 53
Location : Laguna/Tokyo
Registration date : 13/11/2009

View user profile

Back to top Go down

Re: Smart Vray Proxy

Post by lukdoberder on Sun Jun 05, 2011 9:28 pm

tfs!
avatar
lukdoberder
CGP Newbie
CGP Newbie

Number of posts : 117
Age : 79
Location : Cainta, Rizal
Registration date : 14/01/2010

View user profile

Back to top Go down

Re: Smart Vray Proxy

Post by JMO on Fri Mar 29, 2013 12:32 am

thank you sir!
avatar
JMO
CGP Newbie
CGP Newbie

Number of posts : 41
Age : 37
Location : DasmariƱas Ctiy, Cavite
Registration date : 01/04/2011

View user profile

Back to top Go down

Re: Smart Vray Proxy

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum