Announcement

Collapse
No announcement yet.

Script wanted to fix the material connection bug

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

  • Script wanted to fix the material connection bug

    Hi,

    it's a problem since a while that from time to time materials lost the connection to the objects, only the material name is shown at the material properties. The Rhino command _selmaterialname allow to select the objects and reassign the materials. But it can be a lot of work to find the missing connections and to fix them. I hope some one could write a script that doe's the job. (a new VfR build will not automatic fix the problem, if the scene is corrupted)
    www.simulacrum.de ... visualization for designer and architects

  • #2
    So does every piece of geometry lose the material or just some? Are you looking for something to systematically go through all the materials in the material editor, select all the objects with a given material name, and then reapply the material? If so, that can't be done at the moment as far as I know, rhino script doesn't see vray materials unless they were created in that session, and the vray subroutine has issues/doesn't seem to work right.

    I had the same problem at the end of this thread:
    http://forums.chaosgroup.com/showthr...aterials/page2

    unless this got fixed in the nightlies, but I don't have access.

    If you had a different behavior in mind, describe it...
    Last edited by fooprobe; 08-12-2013, 10:40 PM.
    emil mertzel
    vray4rhinoWiki

    Lookinglass Architecture and Design

    Comment


    • #3
      I lost the connection of some materials some times only. Best would be if only this materials could be selected by a script and than selmaterialname ... and assign Vray material with the same name would be done.
      I suppose so the first part isn't possible, so the repair function would be needed for all materials/objects.
      www.simulacrum.de ... visualization for designer and architects

      Comment


      • #4
        How would the script know if a material is broken? Is there some way to detect the problem? Or maybe you're saying there is no way to know, so the script had to reassign all materials...

        yeah, it would be nice if this was fixed.
        emil mertzel
        vray4rhinoWiki

        Lookinglass Architecture and Design

        Comment


        • #5
          Maybe a script could detect all materials where no VfR material is assigned and there it would recall the material name and reassign the VfR materials with the same name. The problem looks like at the screenshot.
          Attached Files
          www.simulacrum.de ... visualization for designer and architects

          Comment


          • #6
            Try todays build, and rerun visCleanMaterialTable on the files in question. I made a small change that might be able to fix these problem files.
            Best regards,
            Matt Newberg
            Software Developer

            Chaos Group

            Comment


            • #7
              Hi Micha
              I try this on today's build and seem it is working fine.

              Best

              Comment


              • #8
                Hi Fernando, doe's the new build repair the missing links at exist files too?
                www.simulacrum.de ... visualization for designer and architects

                Comment


                • #9
                  Yes. The new build will bring back the link with the material editor.

                  Comment


                  • #10
                    Thank you.
                    www.simulacrum.de ... visualization for designer and architects

                    Comment


                    • #11
                      You are very welcome!

                      Comment


                      • #12
                        Hi,

                        since I need to jump back to old version because the random crash problem I need help for this problem again. Here an example file where I lost the connection between material and object, only the name exist so that the command _SelMaterialName still works.

                        I'm looking for a script that reassign the vray materials. A problem could be that in this example the problem is more worst than in the past. I can't direct manual reassign the material, but it helps to assign "none" and than the old material again.

                        There is no hope to get the random crashes fixed and a lot of projects need to be done in the next time, so I hope to work with the old VfR version and some workarounds.

                        Ciao,
                        Micha
                        Attached Files
                        www.simulacrum.de ... visualization for designer and architects

                        Comment

                        Working...
                        X