Announcement

Collapse
No announcement yet.

material conversion script.

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

  • material conversion script.

    hi guys, i need to do one of two things... hoping somebody has a trick.



    EITHER : change wirecolor of all objects to match diffuse swatch color in assigned material - i have "wirecolor toolbox" script, which does this, but it does not work with autodesk physical material, and the models i have are using those.

    i have contacted the author of the script, but ive not heard back, and its super urgent.



    OR: convert all physical materials in scene to architectural or standard materials, keeping diffuse colour the same. -this would allow me to use the above script.


    any suggestions? ideally i need a solution today!


  • #2
    could probably be made simpler and add error checking, but this should do the job assuming all geometry has physcial materials applied:
    Code:
    (
    obj = for o in geometry collect o
    for i = 1 to obj.count do obj[i].wirecolor = obj[i].material.base_color
    )

    if you mean the generic autodesk material, then try this one instead:
    Code:
    (
    obj = for o in geometry collect o
    for i = 1 to obj.count do obj[i].wirecolor = obj[i].material.Generic_Color
    )
    you'll get errors if there's other types of materials in scene (somebody else can chime in with error checking or making it simpler)
    Last edited by Morne; 10-05-2022, 05:01 AM.
    Kind Regards,
    Morne

    Comment


    • #3
      thanks Morne that worked a treat. i really need to learn some simple scripting.. been saying it for years.

      Comment

      Working...
      X