Announcement

Collapse
No announcement yet.

Script help please

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Script help please

    Hi Guys

    I need a little help.... i want to right a script for the vray proxy mesh ... so that i have a button to do the export function....

    can anyone help me ...

    this is what ive done but i cant get it to work ????
    where am i going wrong ??






    rollout vray mesh "vray mesh" width:108 height:60
    (
    button vray mesh "Vray mesh" pos:[10,10] width:88 height:40 enabled:true toolTip:"vray mesh"
    on vray mesh open do
    (

    )
    on vray mesh close do
    (

    )
    on vray mesh okToClose do
    (

    )
    on vray mesh pressed do
    doVRayMeshExport()
    )
    Natty
    http://www.rendertime.co.uk

  • #2
    No Maxcript experience whatsoever, but looking at the script I think you should check your ( and )

    I think at least you need another ) at the end of the script ?
    And no space between vray and mesh ?
    You can contact StudioGijs for 3D visualization and 3D modeling related services and on-site training.

    Comment


    • #3
      Just highlight doVRayMeshExport() and drag it to a tool bar, it will make a button there automaticaly.
      Eric Boer
      Dev

      Comment


      • #4
        Or if you want to assign it to a hotkey, quiad, whatever and have it sorted together with the other VRay scripts



        ---------


        macroscript VrayProxyExporter
        category:"VRay"
        (
        dovraymeshexport()
        )


        ---------


        thats all

        Greetings,
        Michael
        This signature is only a temporary solution

        Comment


        • #5
          this is a little overkill, but it was a pain to get working as a newb.. so thought I'd share

          You can just edit the things in the ---------------------------------'s to do whatever..

          Generic Toggleable floater dialog, (Origionally made because the display floater is a bit too bulky..) saves where you leave it too in the 3dsmax.ini file (You can remove that if you want just by commenting or deleting the on vsaiDemoRoll moved and the on vsaiDemoRoll open functions.



          Code:
          --------------------------------------------------------------------------------------
          -- Generic Starting place for a Floater script..
          -- Dave Buchhofer -- [email]dbuchhofer@gmail.com[/email]
          --------------------------------------------------------------------------------------
          
          macroScript DemoFloater category:"DVBTools" 
          (
          --------------------------------------------------------------------------------------
          -- Rollout definitions..
          --------------------------------------------------------------------------------------
          rollout vsaiDemoRoll "ToggleAble Floater"
          (
          ---- Buttons and whatnot definition..
          
          	label lab01 "A Toggle-able Floater!" 
          	label lab02 "With Position Save." 	
          	button but01 "Ok!"
          	checkbox cb01 "CheckBox!"
          
          
          ---- Events from buttons..
          
          	on but01 pressed do (
          		--Put what you want to do here..
          		destroydialog vsaiDemoRoll 
          	)
          
          	on cb01 changed theState do ( 
          		--Put what you want to do here..
          		destroydialog vsaiDemoRoll 
          	)
          ----
          
          
          --------------------------------------------------------------------------------------
          -- Position Saves and Reloads..
          --------------------------------------------------------------------------------------
          	on vsaiDemoRoll moved loc do 
          	( 
          		vsaifloaterpos = [ loc.x , loc.y ]
          		setIniSetting "C:3dsmax63dsmax.ini" "vsaiFloater" "vsaiDisplayFloaterPosX" (vsaifloaterpos.x as string)
          		setIniSetting "C:3dsmax63dsmax.ini" "vsaiFloater" "vsaiDisplayFloaterPosY" (vsaifloaterpos.y as string)
          			
          	)
          	on vsaiDemoRoll open do 
          	(
          		if (((getinisetting "C:3dsmax63dsmax.ini" "vsaiFloater" "vsaiDisplayFloaterPosX") as float) != "") then
          		(
          		setdialogpos vsaiDemoRoll [ 	((getinisetting "C:3dsmax63dsmax.ini" "vsaiFloater" "vsaiDisplayFloaterPosX") as float), 
          											((getinisetting "C:3dsmax63dsmax.ini" "vsaiFloater" "vsaiDisplayFloaterPosY") as float)]
          		)
          	
          	)
          --------------------------------------------------------------------------------------
          
          ) -- end rollout
          
          --------------------------------------------------------------------------------------
          -- Generate and Destroy dialog funcs..
          --------------------------------------------------------------------------------------
          fn generateVsaiDialog =
          ( 
          createdialog vsaiDemoRoll width:116 pos:[	((getinisetting "C:3dsmax63dsmax.ini" "vsaiFloater" "vsaiDisplayFloaterPosX") as float), 
          												((getinisetting "C:3dsmax63dsmax.ini" "vsaiFloater" "vsaiDisplayFloaterPosY") as float)]								
          )
          
          fn killVsaiDialog =
          (
          destroydialog vsaiDemoRoll
          --Works better in a function for some reason.
          )
          
          if vsaiDemoRoll.indialog == true then killVsaiDialog() else generateVsaiDialog()
          
          )-- end macroscript
          Dave Buchhofer. // Vsaiwrk

          Comment


          • #6
            thanks guy's
            thanks Rerender, i didnt think it would be that easy
            Natty
            http://www.rendertime.co.uk

            Comment

            Working...
            X