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

Delete a material that's being used (using Ruby)

Scheduled Pinned Locked Moved Developers' Forum
7 Posts 5 Posters 352 Views 5 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.
  • F Offline
    fizgig
    last edited by 11 Dec 2009, 16:30

    Any way to do this?

    1 Reply Last reply Reply Quote 0
    • T Offline
      thomthom
      last edited by 11 Dec 2009, 16:54

      there isn't any mathods to delete materials. the workaround is to create temprary geoemtry and apply all others materials to it, then purge materials. But you must also make sure that the material you want to purge isn't the current one.

      Thomas Thomassen β€” SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • M Offline
        MartinRinehart
        last edited by 11 Dec 2009, 16:55

        No. (I say that with no confidence. Never say never.)

        If you paint a face with a color that's not in Materials, it's still not in Materials and you are not far from Bug Splat. I've not traced this to some particular combination, but it's regular, if not repeatable.

        Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

        1 Reply Last reply Reply Quote 0
        • T Offline
          TIG Moderator
          last edited by 13 Dec 2009, 23:00

          I have written a material.delete additional method... ThomThom helped - memory loss ?

          http://forums.sketchucation.com/viewtopic.php?p=166978#p166978

          It will erase a material - if it's current it 'defaults' objects with that material...

          TIG

          1 Reply Last reply Reply Quote 0
          • T Offline
            tridem
            last edited by 13 Dec 2009, 23:15

            @thomthom said:

            there isn't any mathods to delete materials. the workaround is to create temprary geoemtry and apply all others materials to it, then purge materials. But you must also make sure that the material you want to purge isn't the current one.

            πŸ˜• maybe i'm misunderstanding, but although I don't have any dedicated ruby-script, by right click on the material I can delete and replace with the default one

            1 Reply Last reply Reply Quote 0
            • T Offline
              TIG Moderator
              last edited by 13 Dec 2009, 23:24

              @tridem said:

              @thomthom said:

              there isn't any mathods to delete materials. the workaround is to create temprary geoemtry and apply all others materials to it, then purge materials. But you must also make sure that the material you want to purge isn't the current one.

              πŸ˜• maybe i'm misunderstanding, but although I don't have any dedicated ruby-script, by right click on the material I can delete and replace with the default one

              You CAN easily do it manually - but to do it within a script is not available in the current API - hence my additional method material.delete which mimics that manual operation...

              TIG

              1 Reply Last reply Reply Quote 0
              • T Offline
                tridem
                last edited by 13 Dec 2009, 23:51

                @tig said:

                .. but to do it within a script ..

                doh! .. actualy for me it's time to go to sleep πŸ˜†

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

                Advertisement