sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Importing Materials with Existing Name

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    5 Posts 3 Posters 371 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      j40
      last edited by j40

      When importing objects/components that have materials with the same name as in the SU file you importing to, by default SU will rename the imported material name.
      For example i have "Black" material, if i import object with material that has the same name, the name will be changed to "Black1" and I'll have 2 materials. πŸ˜•

      My question is: Is it possible to import material with existing name and remain it's original name ?

      Top3D Studio

      1 Reply Last reply Reply Quote 0
      • Chris FullmerC Offline
        Chris Fullmer
        last edited by

        Not by default, but that might be do-able through Ruby.

        When you import materials, where are you importing from?

        Chris

        Lately you've been tan, suspicious for the winter.
        All my Plugins I've written

        1 Reply Last reply Reply Quote 0
        • J Offline
          j40
          last edited by

          I'm importing from SU files. I often need objects/components from my older projects (SU files), so i import them.

          Top3D Studio

          1 Reply Last reply Reply Quote 0
          • TIGT Offline
            TIG Moderator
            last edited by

            You can't force existing Materials to be adopted on Import... However there are several scripts out there - like my GlobalMaterialChanger - that let you pick a Material and swap it with another. So in your example, Material_to_go = 'Black1', Material_to_add = 'Black'. After running it nothing will have Material 'Black1'. Then Purge Materials and Black1 will disappear...

            This way only works one Material-swap at a time... BUT you could rewrite it to find 'families' of Materials - e.g. Black, Black1, Black2, Black3 etc and make them all into the original 'Black' ?

            Using my additional method material.delete you could also purge each now_unused_material as you go...

            TIG

            1 Reply Last reply Reply Quote 0
            • J Offline
              j40
              last edited by

              Thank you very much TIG. Although it doesn't do 100% of what i wanted, It's a lot better than manually reapply materials.

              Regarding the rewriting the plugin, I wouldn't know a thing about it. I will very much appreciate if you could do it (I'm sure others will benefit from it as well)

              Best

              Top3D Studio

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Buy SketchPlus
              Buy SUbD
              Buy WrapR
              Buy eBook
              Buy Modelur
              Buy Vertex Tools
              Buy SketchCuisine
              Buy FormFonts

              Advertisement