Announcement

Collapse
No announcement yet.

max script help!

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

  • max script help!

    I've been trying to get a section of a script which can do a clone & align without a dialog box popping up and i'm having some trouble.

    I was trying to use this as a base - http://www.scriptspot.com/3ds-max/sc...opy-align-link
    but i cant figure out whats essential for the script and whats for the dialog box because i'm awful at this.

    Like the 'local SourceOBJ' - is this it telling it what to do, or a temporary name for the object which I could edit mine into? I want it to pick a source object called 'ctv_src' and clone/align it over all objects called 'ctv_dest' but none of this is making any sense and i cant even follow the names and references properly.

    ...Does anyone have any recommendation of a book to read too? It bothers me that I cant do this


  • #2
    Originally posted by cubiclegangster View Post
    Like the 'local SourceOBJ' - is this it telling it what to do, or a temporary name for the object which I could edit mine into? I want it to pick a source object called 'ctv_src' and clone/align it over all objects called 'ctv_dest' but none of this is making any sense and i cant even follow the names and references properly.
    Adapting that script with the above would be

    Code:
    SourceOBJ = $ctv_src
    TargetOBJ = $ctv_dest*
    
    	for i in TargetOBJ do
    
                   (	
    		Temp_SourceCopy = Copy SourceOBJ
    		Temp_SourceCopy.transform = i.transform
    		Temp_SourceCopy.parent = i
    		Temp_SourceCopy.name = (SourceOBJ.name)+"_"+(i.name as string)
    		)
    You can change 'Copy' to 'Instance' if you want instances

    There's no error checking in there and it could be more effecient but that should do the trick.

    As for learning this stuff, I strongly recommend Bobo's CG Academy dvd's (although I think I'm right in remembering that he's had problems with them paying him or something similar...?) and a couple of talented bods have started blogs with some maxscript stuff on them which should be helpful

    http://davewortley.wordpress.com/
    http://www.simonreeves.com/2012/06/2...ript-snippets/

    Last edited by AJ Jefferies; 04-07-2012, 08:08 AM.
    MDI Digital
    moonjam

    Comment


    • #3
      You're the best!

      That works perfectly, thanks!

      i'll get onto all of that tonight.

      Comment


      • #4
        Originally posted by cubiclegangster View Post
        ...Does anyone have any recommendation of a book to read too? It bothers me that I cant do this
        The maxscript help is very good for learning, there are examples to get you started and for almost all methods and interfaces.

        I think the best way to learn is do what you're doing now, start with a simple idea and develop it. You might be surprised how quickly it starts to make sense. And if you get stuck ask for help.
        Dan Brew

        Comment


        • #5
          Yup u guys are amazing and epic !
          CGI - Freelancer - Available for work

          www.dariuszmakowski.com - come and look

          Comment

          Working...
          X