Announcement

Collapse
No announcement yet.

vray_ in materials name - remove - script?

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

  • vray_ in materials name - remove - script?

    I have searched the forum, but haven't found anything... but maybe I have searched with the wrong search phrase... so don't judge me.

    is there a way to delete the vray_ addition in the material names?
    I have to export many fbx files for importing in cinema and if you convert the model in cinema to corona, then you have funny names in materials... "crn_vray_material_02"
    if I could batch delete the vray_ addition in max it would be great, in cinema there's no way to do that...

    thanks coder for a solution.

    themaxxer
    Pixelschmiede GmbH
    www.pixelschmiede.ch

  • #2
    Try this:
    Code:
    for m in scenematerials where matchPattern m.name pattern:"*vray_*" == true do (
    newName = replace m.name 4 5 ""
    m.name = newName
    )​
    This will remove 5 letters starting from the 4th on materials that contain the "vray_" pattern. If the "vray_" part is located elsewhere in the material name, you should change the "4" (starting index) and "5" (length) values.

    EDIT: Uploading a little script, which can mass edit materials.
    Attached Files
    Last edited by hermit.crab; 30-08-2023, 01:55 AM.
    Aleksandar Hadzhiev | chaos.com
    Chaos Support Representative | contact us

    Comment


    • #3
      With this you can rename everything. Don’t know if it still works with latest Max-versions.
      :pen: Renaming script for 3ds Max. Contribute to cb109/interactive-universal-renamer development by creating an account on GitHub.

      Comment

      Working...
      X