1. #1

    Default I am looking for material cycling script

    Hi
    I need a script that cycles materials via shortcut. I searched the forum but have not seen such thing. Does anyone know any script or way to cycle-toggle materials?

    thanks

  2. #2

    Default batch material load

    Wouldn't it be possible to sequentially load a sequence of materials to apply, and then have them advance through time or another means?

  3. #3

    Default

    I am not a zscripter but that should be possible. In the end probably the user would not want to cycle all the materials, rather a select list of materials would be great. Also a nice interface can be neat as well which would streamline this.

  4. #4
    Senior Member Follow User Gallery
    Join Date
    Jan 2003
    Location
    NYC
    Posts
    1,626

    Default

    What is a material cycling script? Can you describe what it would do or how it would function?

  5. #5

    Default

    Well, basically it will change the active object`s material squentially. So instead of clicking material menu and clicking on materials to try materials one by one, this way user will just press the same key to cycle through predefined set of materials

  6. #6
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    That's not too difficult to do if you use the ZFileUtils [see the sticky thread at the top of this forum] to get the files in a folder. Here's a basic script, though you may want to adapt for your needs.

    Note that the dll should be in its own data folder.

    EDIT: I added in a default settings so it will reload the last used list.

    EDIT2: Plugin operation - buttons in the Material palette. Code included.
    Attached Files Attached Files

  7. #7

    Default

    God ,YES!!!!
    You did it!
    This is so helpful,I'm always baking zbrush shaders in my texture works
    and I'm not always sure which shader is better ,so not being forced to
    click on each of them is awesome
    (especially when you got hundreds of them) .


    I think you should post it in the zscript utilities forum,it's
    something that I'm sure a lot of people baking shaders would find useful.
    Thanx again !

  8. #8
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    Hello Christian,

    I updated the script to save the last used folder, so download again.

    Perhaps I'll make into a plugin if it would be useful.


    EDIT: if you change the 'fileMax' value (to say 300 instead of 100 so as to cycle thru more mats) you will need to delete the 'settings.zvr' file in the LoadMatsData folder or you'll get an error.

    Thanks,

  9. #9
    Senior Member Follow User Gallery
    Join Date
    Jan 2003
    Location
    NYC
    Posts
    1,626

    Default

    Nice. A button pair similar to these might be useful added to the ZMats library plugin too. Maybe I'll try an update after 3.5 arrives and we see what else Pixolator has in store.

    Sven

  10. #10

    Default

    hmm, I am getting an error. It says its skipping loadmats due to error.

  11. #11

    Default

    Btw, how do you use this tool? I think I have managed to load the script fine(through zscript menu this time), but I do not see any button anywhere?

  12. #12
    Senior Member Follow User Gallery
    Join Date
    Jan 2003
    Location
    NYC
    Posts
    1,626

    Default

    With a model in edit mode, click on the handle at the bottom of the screen (opens the tutorial window) and the two buttons become visible. First click Getfolder and select the materials directory and choose a material, then click Cyclemats to loop through the other materials.

  13. #13

    Default

    That is exactly what I am talking about!! Amazing, life is easier now.

  14. #14

    Default

    Marcus
    when you have time, one more addition would be helpful actually. It would be nice to have another button for calling the original shader. So the user would not deal with material window again )


    Svengali, thanks for the help. It was nto very obvious for me for some reason

    ok here is a better wish list for next possible update if you will


    -Previous-next material buttong (so that one can go back and forth hopefully)
    -Folder profiles. I guess you would put one button per folder. I would think that 5-6 profiles should be sufficient
    -Button for calling the original shader

    This is great Marcus, seriously this was bothering me for a while. I hate the material window I mean It is nice, it has nice preview but it was not working well with a shortcut. Thanks again
    Last edited by kursadk; 09-27-08 at 01:28 PM.

  15. #15
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    kursadk,

    I'm glad you found the script useful. I intended it as an example of what might be done rather than a solution. I may develop something similar at some stage but I'm too busy to take this further at the moment. Should you or anyone else like to try then you are free to do so.

Page 1 of 5 1234 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •