sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Asigning colours to elements

    Scheduled Pinned Locked Moved Developers' Forum
    5 Posts 2 Posters 257 Views 2 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.
    • artmusicstudioA Offline
      artmusicstudio
      last edited by

      hi,
      after a long search i have to ask:

      is it possible to asign a colour to ALL faces within 1 group or 1 component?
      every colour shall become its own values and names and shall be written in model's colour table.
      what ever i try with the api-syntax, i fail....

      thanx stan

      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        You assign the group's material, and leave all it's faces material set to nil.

        Same for a component.

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • artmusicstudioA Offline
          artmusicstudio
          last edited by

          hi dan, thanx, i know, it is like working in skp itself,
          but when i have to transfer it to vis-software, i sometimes need all surfaces defined, since the importers do not transfer the group's color to the elements inside sometimes. but i will try once more, just not to be wrong on this.

          for that i would like to paint every surface, sometimes also the back-side directly.....

          besides that, i would like to understand the syntax of the coor asignment, somehow i cannot get it from the api guide.
          thanx stan

          1 Reply Last reply Reply Quote 0
          • Dan RathbunD Offline
            Dan Rathbun
            last edited by

            Oh OK.

            grp.entities.grep(Sketchup;;Face).each{|f| f.material=grp.material }
            

            I'm not here much anymore.

            1 Reply Last reply Reply Quote 0
            • artmusicstudioA Offline
              artmusicstudio
              last edited by

              hi dan, thanx,
              next step is done!
              this one works:

              
              @c_step = Sketchup;;Color.new(30,125,180)
              group.entities.grep(Sketchup;;Face).each{|f| f.material=@c_step}
              
              

              stan

              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