Announcement

Collapse
No announcement yet.

quick and dirty python script to change/add vray Object id's

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

  • quick and dirty python script to change/add vray Object id's

    Hi guys,

    I've written a small python script to manage vray object ID attrs..
    I'm not a good programmer so it's probably full of things that can be improved, so feel free to edit as you wish.. I will improve it when I have time or feel the need but I cannot give (alot) support.. but don't hesitate to post suggestions or wishes, can't promise anything though, hope you'll understand..
    I only have maya 2011 so don't know if it works in other versions..

    NOTE:

    - don't change your selection and edit a number, because it will loop through the current selection, so if you change selection rerun the script.


    planned todo's:

    - button or field to assign same id to selected objects at once.
    - ability to give attr to procedure so you can use this for other Attr's too.
    - automatically make needed multi matte render elements..
    hope it's useful for someone!
    Attached Files
    Last edited by tinuz; 21-10-2010, 05:48 AM. Reason: added NOTE: updated attachment
    showreel: http://vimeo.com/27236919

  • #2
    Cool, thanks for sharing

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment


    • #3
      I keep getting a global name 'cmds' is not defined. I tried importing maya as cmds, and maya.cmds as cmds. I haven't fiddled much with python, so I may be doing something wrong. I'm also on 2010, so perhaps it is a pymel version thing.

      Looking at the script tho, it looks like they are all mel commands wrapped in a cmds.XXX Why not just release it as mel?

      Comment


      • #4
        btw, this sounds great. Would love to get it working. thanks for the effort!

        Comment


        • #5
          Originally posted by aweidenhammer View Post
          I keep getting a global name 'cmds' is not defined. I tried importing maya as cmds, and maya.cmds as cmds. I haven't fiddled much with python, so I may be doing something wrong. I'm also on 2010, so perhaps it is a pymel version thing.

          Looking at the script tho, it looks like they are all mel commands wrapped in a cmds.XXX Why not just release it as mel?
          so sorry.. I have these procedures in a larger python file so I forgot to include these lines for you, just put them above the first def at the beginning of the line:

          import maya.cmds as cmds
          import maya.mel


          def changeVrayAttr():


          well I'm trying to stay off the mel, I like python much better, and as you can see I can us mel in python too ;P
          showreel: http://vimeo.com/27236919

          Comment


          • #6
            thanks for the update. I'll give it a try today.

            Andrew

            Comment

            Working...
            X