Jump to content

Recommended Posts

Ciao a tutti,

Subburb ha realizzato due semplici script con i quali è possibile creare una toolbar specificatamente studiata per VRay.

Vray_QuickCreate2.jpg

macroScript VRayToolbar category:"VRay" tooltip:"VRayToolbar" 

(


	global rlt_VRayToolbar  -- sets the variable for the rollout


	try (destroyDialog rlt_VRayToolbar) catch ()  -- This attempts to close the VRayToolbar if it's already opened


	rollout rlt_VRayToolbar "VRay Toolbar" width:92 height:420

	(

		button btn_CreateVRayLightPlane "Plane" pos:[8,24] width:76 height:20

		button btn_CreateVRayLightDome "Dome" pos:[8,44] width:76 height:20

		button btn_CreateVRayLightSphere "Sphere" pos:[8,64] width:76 height:20

		button btn_CreateVRayLightMesh "Mesh" pos:[8,84] width:76 height:20

		button btn_CreateVRaySunSky "Sun + Sky" pos:[8,108] width:76 height:20

		button btn_CreateVRayGeomPlane "Vray Plane" pos:[8,216] width:76 height:20

		button btn_CreateVRayGeomSphere "Vray Sphere" pos:[8,236] width:76 height:20

		button btn_CreateVRayGeomProxy "Vray Proxy" pos:[8,256] width:76 height:20

		button btn_CreateVRayGeomFur "Vray Fur" pos:[8,276] width:76 height:20

		button btn_CreateVRayCamDome "Dome Cam" pos:[8,152] width:76 height:20

		button btn_CreateVRayCamPhysCam "Phys. Cam" pos:[8,172] width:76 height:20

		button btn_CreateVRayModifDisplace "Displace Mod" pos:[8,320] width:76 height:20

		button btn_Meditor "Materials..." pos:[8,368] width:76 height:20

		button btn_ShowLast "Last Render" pos:[8,392] width:76 height:20

		GroupBox grp1 "Vray Lights" pos:[4,8] width:84 height:124

		GroupBox grp2 "Vray Geom." pos:[4,200] width:84 height:100

		GroupBox grp3 "Vray Cameras" pos:[4,136] width:84 height:60

		GroupBox grp4 "Modifiers" pos:[4,304] width:84 height:40

		groupBox grp11 "Other" pos:[4,352] width:84 height:64


		local thetype

		local sourcenode 


		fn setType obj = 

		(

			obj.type = thetype

		)


		fn setfur obj =

		(

			obj.sourceNode = $

		)


		on btn_CreateVRayLightPlane pressed do

		(

			thetype = 0

			startObjectCreation VrayLight newNodeCallback:setType

		)

		on btn_CreateVRayLightDome pressed do

		(

			thetype = 1

			startObjectCreation VrayLight newNodeCallback:setType

		)

		on btn_CreateVRayLightSphere pressed do

		(

			   thetype = 2

				startObjectCreation VrayLight newNodeCallback:setType

		)

		on btn_CreateVRayLightMesh pressed do

		(

			thetype = 3

			startObjectCreation VrayLight newNodeCallback:setType

		)

		on btn_CreateVRaySunSky pressed do

			startObjectCreation VraySun

		on btn_CreateVRayGeomPlane pressed do

			startObjectCreation Vrayplane

		on btn_CreateVRayGeomSphere pressed do

			startObjectCreation VraySphere

		on btn_CreateVRayGeomProxy pressed do

			startObjectCreation Vrayproxy

		on btn_CreateVRayGeomFur pressed do

		(

			if superclassof $ == GeometryClass then 

			(

				startObjectCreation Vrayfur newNodeCallback:setfur 

			)

			else messagebox("Please choose a valid object first...")

		)

		on btn_CreateVRayCamDome pressed do

			startObjectCreation Vraydomecamera

		on btn_CreateVRayCamPhysCam pressed do

			startObjectCreation Vrayphysicalcamera

		on btn_CreateVRayModifDisplace pressed do

		(

			if $ != undefined then modPanel.addModToSelection (VRayDisplacementMod ()) ui:on

			else messagebox("You need to select something...")

		)

		on btn_Meditor pressed do

		(

			if MatEditor.isOpen() then MatEditor.Close() else MatEditor.open()

		)

		on btn_ShowLast pressed do

		(

			try(

			if Renderers.current.output_on then Renderers.current.showLastVFB()

			else	max show last img

			)

			catch(messagebox ("You need to use Vray as default renderer..."))

		)

	)

	createdialog rlt_VRayToolbar 90 420

)


Edited by cecofuli

Share this post


Link to post
Share on other sites

Inoltre qui le singole macro, così possiamo creare la nostra toolbar :)

macroScript Plane_Light category:"VrayQuickSet" tooltip:"Create Plane VRayLight"

(

	on execute do

	(

		fn setType Thelight = 

		(

			Thelight.type = 0

		)

		startObjectCreation VrayLight newNodeCallback:setType   

	)

)


macroScript Dome_Light category:"VrayQuickSet" tooltip:"Create Dome VRayLight"

(

	on execute do

	(

		fn setType Thelight = 

		(

			Thelight.type = 1

		)

		startObjectCreation VrayLight newNodeCallback:setType   

	)

)


macroScript Sphere_Light category:"VrayQuickSet" tooltip:"Create Sphere VRayLight"

(

	on execute do

	(

		fn setType Thelight = 

		(

			Thelight.type = 2

		)

		startObjectCreation VrayLight newNodeCallback:setType   

	)

)


macroScript Mesh_Light category:"VrayQuickSet" tooltip:"Create Mesh VRayLight"

(

	on execute do

	(

		fn setType Thelight = 

		(

			Thelight.type = 3

		)

		startObjectCreation VrayLight newNodeCallback:setType   

	)

)


macroScript VRay_IES category:"VrayQuickSet" tooltip:"Create Vray IES light"

(

	on execute do startObjectCreation VrayIES

)


macroScript Sun_Sky category:"VrayQuickSet" tooltip:"Create Vray Sun + Sky"

(

	on execute do startObjectCreation VraySun

)


macroScript VRay_Plane category:"VrayQuickSet" tooltip:"Create Vray Plane"

(

	on execute do startObjectCreation Vrayplane

)


macroScript VRay_Sphere category:"VrayQuickSet" tooltip:"Create Vray Sphere"

(

	on execute do startObjectCreation VraySphere

)



macroScript VRay_proxy category:"VrayQuickSet" tooltip:"Create Vray Proxy"

(

	on execute do startObjectCreation Vrayproxy

)


macroScript VRay_Fur category:"VrayQuickSet" tooltip:"Apply VrayFur on Selected object"

(

	if superclassof $ == GeometryClass then 

	(

		fn setfurobject obj = 

		(

			obj.sourceNode = $

		)		

		startObjectCreation Vrayfur newNodeCallback:setfurobject

	)

	else messagebox("Please choose a valid object first...")

)


macroScript Dome_Cam category:"VrayQuickSet" tooltip:"Create Vray Dome Camera"

(

	startObjectCreation Vraydomecamera

)


macroScript Phys_Cam category:"VrayQuickSet" tooltip:"Create Vray Physical Camera"

(

	startObjectCreation Vrayphysicalcamera

)


macroScript Disp_Mod category:"VrayQuickSet" tooltip:"Apply VrayDisplaceMod on Selected object"

(

	if $ != undefined then modPanel.addModToSelection (VRayDisplacementMod ()) ui:on

	else messagebox("You need to select something...")

)


macroScript Mat_Edit category:"VrayQuickSet" tooltip:"Switch on/off Material Editor"

(

	if MatEditor.isOpen() then MatEditor.Close() else MatEditor.open()

)


macroScript Show_Last category:"VrayQuickSet" tooltip:"Show Last Render"

(

	try

	(

		if Renderers.current.output_on then Renderers.current.showLastVFB()

		else	max show last img

	)

	catch

	(

		messagebox ("You need to use Vray as default renderer...")

	)

)

Share this post


Link to post
Share on other sites

simpatica toolbar, ma non eri tu a criticare max 2010 perchè le toolbar duplicavano gli stessi comandi... questa fa la stessa cosa mi pare :D :D

Share this post


Link to post
Share on other sites
simpatica toolbar, ma non eri tu a criticare max 2010 perchè le toolbar duplicavano gli stessi comandi... questa fa la stessa cosa mi pare :D :D

qui le hai tutte assieme, non devi saltare da pannello a pannello, può tornare utile ^_^ .

Share this post


Link to post
Share on other sites

Son riuscito, ma non so se sia la procedura corretta, ho aperto menù MaxScript -> New Script. Copia/incolla del codice, salva, e l'ho messo sul desktop, creata nova toolbar dove ho messo il pulsante per attivarla.

Funzia, ma adesso è sempre caricata anche se ho cancellato il file sul desktop. Dove l'ha messa per sapere che è sempre attiva che io ho cnacellato il file salvato? C'è una procedura più corretta per farlo?

Share this post


Link to post
Share on other sites

MaxScript -> New Script. Copia/incolla -> Tools -> Evaluate all

Ora vai nella categoria

category:"VrayQuickSet"

oppure

category:"VRay" tooltip:"VRayToolbar"

e troverai le macro per crearti shortcut o toolbar.

Ciao :)

Share this post


Link to post
Share on other sites
MaxScript -> New Script. Copia/incolla -> Tools -> Evaluate all

Ora vai nella categoria

category:"VrayQuickSet"

oppure

category:"VRay" tooltip:"VRayToolbar"

e troverai le macro per crearti shortcut o toolbar.

Ciao :)

Dove sta questo Category?? :huh:

Share this post


Link to post
Share on other sites

ciao a tutti, premetto si essere poco esperta, ho provato a creare questa toolbar ma proprio nn ci riesco.

Tutto questo perche pensavo di risolvere un problema ovvero quando provo a creare una luce o una telecamera vray:

--Runtime error: startObjectCreation() requires a scene object class parameter, got : undefined

e automaticamente si apre lo script con scritto:

macroScript VRayPhysicalCamera

category:"VRay"

buttonText:"V-Ray Physical Camera"

toolTip: "Create V-Ray Physical Camera"

(

on execute do StartObjectCreation VRayPhysicalCamera

)

in piu ho notato ke se provo a creare qualunque altro tipo di telecamera o di luce(non vray) nn me la visualizza in nessuno dei 4 quadranti ma le luci sono su light lister

potete aiutarmi nn so davvero piu come fare è la terza versione di vray che installo e devo laureare

(3dsmax2011 cn vray1.5)

grazie grazie :hello:

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...