Announcement

Collapse
No announcement yet.

share ui/scripts on network

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

  • share ui/scripts on network

    hello all

    I don't find an answer for this... maybe because I don't understand the system how it would work.

    we are 3 persons working here. the plugins are shared with new plugin.ini's in a network folder.
    does this also work for scripts? can you share and load script on each machine without having them on each workstation separately?

    what are the best ways to setup a flexible load/share system?
    how do renderfarms do that?

    thanks in advance

    best regards
    themaxxer
    Pixelschmiede GmbH
    www.pixelschmiede.ch

  • #2
    Look in Customize > Configure System Paths. All your paths relating to scripts should be in there. I can't see there being any problems if you redirect these to a shared folder on your network. AFAIK the only scripts needed for a renderfarm are scripted plugins, like materials which should be in ..scripts\startup.
    Dan Brew

    Comment


    • #3
      thanks for the pointer. but that doesn't work because it's loading (opening) every script at start up.

      what i should have are additional pathes to define. but that only works for plugins not for scripts...

      best regards
      themaxxer
      Pixelschmiede GmbH
      www.pixelschmiede.ch

      Comment


      • #4
        I have setup an autoupdating script for our studio.

        Here is the "AutoUpdating.ms" script put in each user's <3dsmax>/stdplugs/stdscripts folder (which makes them run on every boot up)
        Code:
        (
            try (
            local filesMcr = getFiles "\\\\Library\Software\maxscript\AutoUpdating\*.mcr"
            local filesMs = getFiles "\\\\Library\Software\maxscript\AutoUpdating\*.ms"
            local filesMse = getFiles "\\\\Library\Software\maxscript\AutoUpdating\*.mse"
            
            join filesMs filesMCR
            join filesMs filesMse
            
            for f in filesMs do (
                filein f
            )
            
            format "AutoUpdating Scripts Current(% scripts)\n" (filesMs.count as string)    
            ) catch ( Print "AutoUpdating Scripts problem, check network connection..." )
        )
        Then whatever scripts I drop into this network path "\\Library\Software\maxscript\AutoUpdating\" (note that double backslashes in Maxscript "//" means "/" and "\\" means "\") it will automatically update everyone to the same script version or if I add a script they get it too.

        Is this what you're looking for?

        -Colin
        Colin Senner

        Comment


        • #5
          thanks for this colin........neat script.....
          Originally posted by 3DMK
          do I want to be a rich business man or a poor artist?

          caddworkx

          Comment


          • #6
            wow, colin thanks so much!!
            does it work with mapped drives (M:/...) because I don't get it to work.

            I have used UNC paths now, but it doesn't work, well some scripts are working.

            not working are all soulburn scripts
            relink bitmaps (yours)
            hcgb
            ...and others

            I think it's only for relatively simple scripts that haven't stored any path in the code... isn't it?

            best regards
            themaxxer
            Last edited by themaxxer; 10-01-2011, 10:36 AM. Reason: updating text
            Pixelschmiede GmbH
            www.pixelschmiede.ch

            Comment


            • #7
              It does work with mapped drives (we use UNC so everyone doesn't have to have the same drive mapped to the same letter)

              In the script change the lines to read something like:

              "M://Scripts//Autoupdating//*.ms"
              "M://Scripts//Autoupdating//*.mse"
              "M://Scripts//Autoupdating//*.mcr"

              Drop the script in your "<root 3dmax>/stdplugs/stdscripts/" folder (I named mine AutoUpdating.ms, but it doesn't matter).

              Then anything you put in the folder called out in the script (M:\Scripts\Autoupdating\), you (and coworkers) 3dsmax will load them all at startup. (Note: if you have a script that isn't a macroscript, ie. it just runs when you run the .ms file, you probably don't want to put it in your autoupdating folder)

              That's why I always create macroscripts for installing instead of just running them.

              It's really great when I add a script to the folder and everyone has it immediately installed. Or when I release a fix for a problem with a script I've written everyone has it. (No more email spam and asking users to run the newest version).

              Making sure everyone has it in the stdplugs/stdscripts folder is the biggest hurdle .

              Hope this helps everyone,
              Colin
              Colin Senner

              Comment


              • #8
                hm, sorry for bothering you again, but it doesn't work for me...
                not a single script is loading although I have made all the things you wrote.
                all scripts are missing and I get this error:
                Click image for larger version

Name:	script_error.JPG
Views:	1
Size:	57.3 KB
ID:	843719Click image for larger version

Name:	script_error_2.JPG
Views:	1
Size:	12.5 KB
ID:	843720
                what are the scripts in the .../enu/ui/macroscripts/?
                are that copies of the scripts in /root3dsmax/ui/macroscripts?

                I don't get it.

                thanks for helping me.

                best regards
                themaxxer
                Pixelschmiede GmbH
                www.pixelschmiede.ch

                Comment


                • #9
                  Worth more than a look
                  http://forums.cgsociety.org/showthread.php?t=293684
                  This signature is only a temporary solution

                  Comment


                  • #10
                    Originally posted by Sushidelic View Post
                    thank you very much!
                    it looks interesting.

                    best regards
                    themaxxer
                    Pixelschmiede GmbH
                    www.pixelschmiede.ch

                    Comment


                    • #11
                      @MoonDoggie

                      is it right that the scripts may not be inside another folder?
                      could it be wildcarded to load subfolders?

                      maybe this is my mistake?
                      I have tested it with relinkbitmaps and when max starts the script opens with max. is that right?

                      best regards
                      themaxxer
                      Pixelschmiede GmbH
                      www.pixelschmiede.ch

                      Comment


                      • #12
                        That CGTalk forum thread looks neat, but too complex for my taste . Here's the full setup in detail.

                        In this directory (every file in this directory will be executed by max at startup):
                        C:\Program Files\Autodesk\3ds Max Design 2011\stdplugs\stdscripts

                        I have a file called "Autoupdating.ms"

                        which looks like this:
                        Code:
                        (
                            try (
                            local filesMcr = getFiles "\\\\Library\maxscript\AutoUpdating\*.mcr"
                            local filesMs = getFiles "\\\\Library\maxscript\AutoUpdating\*.ms"
                            local filesMse = getFiles "\\\\Library\maxscript\AutoUpdating\*.mse"
                            
                            join filesMs filesMCR
                            join filesMs filesMse
                            
                            for f in filesMs do (
                                filein f
                            )
                            
                            format "AutoUpdating Scripts Current(% scripts)\n" (filesMs.count as string)    
                            ) catch ( Print "AutoUpdating Scripts problem, check network connection..." )
                        )
                        Now, if you just do that, when you close and restart max and open the listener (MAXScript->Listener), you'll see this printed "AutoUpdating Scripts Current(0 scripts)". So we need to change the paths in the script to point to somewhere on our network.

                        \\\\Library\maxscript\AutoUpdating\*.mcr
                        \\\\Library\maxscript\AutoUpdating\*.ms
                        \\\\Library\maxscript\AutoUpdating\*.mse

                        Change these to a folder on your network

                        Drive letters can be used for instance, a directory on your W: drive called "Scripts"

                        W:\\Scripts\\AutoUpdate\\*.ms

                        a UNC path on your \\servername\Scripts\AutoUpdate

                        \\\\servername\\Scripts\\AutoUpdate\\*.ms

                        note: the double slashes mean single slashes to max because of reserved slashes for things like newline characters (\n)
                        note: the *.ms, *.mcr, *.mse - This is so when the script loads at runtime it gathers all of the ms, mcr, and mse files in the directory and runs them.

                        That's it. Hope that works!
                        -Colin
                        Colin Senner

                        Comment


                        • #13
                          thank you very much for the explanation colin.

                          it work if the script file is in the "AutoUpdate" folder and not in a subfolder...

                          - is it right that the scripts in the autoupdate folder opens if max starts? is there a way to load them without open it?
                          - can I add subfolders in the autoupdate folder or can it be made with wildcards?

                          thank you so much, also for your patience.

                          best regards
                          themaxxer
                          Pixelschmiede GmbH
                          www.pixelschmiede.ch

                          Comment


                          • #14
                            It can be expanded to work with wildcards, but does not currently work with wildcards OR subdirectories. There is not a way that I know of to make them load without opening on max start. The best way to do it would be to take the scripts that automatically load when you run them would be to turn them into macro scripts (the kind that install and let you drag the button onto your interface)

                            To convert a file that autoloads to a macroscript add this at the front

                            Code:
                            macroScript <UniqueName> category:"My Scripts" tooltip:"MY TOOLTIP" (
                            and add this at the end

                            Code:
                            )
                            Change <UniqueName> to anything you like, it must be one word, not multiple words. Change "My Scripts" to whatever you like, this is the category that your button will be draggable under the Customize User Interface screen.

                            -Colin
                            Colin Senner

                            Comment

                            Working...
                            X