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

    Get Default Material

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 3 Posters 242 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.
    • D Offline
      dvonhausen
      last edited by

      How do I get the default material for a model for the front and back of faces that don't have materials assigned?

      1 Reply Last reply Reply Quote 0
      • D Offline
        dedmin
        last edited by

        http://rhin.crai.archi.fr/rubylibrarydepot/plugin_details.php?id=329

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

          The default material is 'nil'.
          So face.material=nil makes face have no material
          and face.back_material=nil makes face have no back material
          You can get the color used for the two types of default face material from
          model.rendering_options["FaceFrontColor"]
          and
          model.rendering_options["FaceBackColor"]
          which both return a Color object, you can then get its RGB values in the normal way etc...
          You can also set these vales to a new color with []=
          πŸ€“

          TIG

          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