sketchucation logo sketchucation
    • Login
    ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

    [REQUEST] fog control

    Scheduled Pinned Locked Moved Plugins
    4 Posts 2 Posters 705 Views
    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.
    • G Offline
      georglorenz
      last edited by

      Hi. I am trying to write a small plugin that would provide some numerical control to the fog settings (FogDensity, FogEnd, FogStart and FogType (what is FogType btw?)), via a simple dialog box. Unfortunately I failed in the very early stages. Trying to read the current values resulted in nothing more than an empty messagebox.

      Why is that? Or does such a plugin exist already?

      Thank you. G

      below is the code that gave me the empty messagebox

      model = Sketchup.active_model
      renderingoptions = model.rendering_options
      value = renderingoptions["FogStart"]
      UI.messagebox value
      
      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        Wouldn't that do the same as the native Fog controls?

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

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          Btw, the API docs are lying:

          Sketchup.active_model.rendering_options.each_pair do |k,v|; puts "#{k}=#{v}"; end

          BackgroundColor=Color(204, 204, 201, 255) BandColor=Color( 0, 0, 0, 127) ConstructionColor=Color( 0, 0, 0, 255) DepthQueWidth=4 DisplayColorByLayer=false DisplayDims=true DisplayFog=false DisplayInstanceAxes=false DisplaySketchAxes=true DisplayText=true DisplayWatermarks=true DrawDepthQue=false DrawGround=false DrawHidden=false DrawHorizon=true DrawLineEnds=true DrawProfilesOnly=false DrawSilhouettes=true DrawUnderground=true EdgeColorMode=1 EdgeDisplayMode=1 EdgeType=0 ExtendLines=true FaceBackColor=Color(164, 178, 187, 255) FaceColorMode=0 FaceFrontColor=Color(255, 255, 255, 255) FogColor=Color(204, 204, 201, 255) FogEndDist=-1.0 FogStartDist=-1.0 FogUseBkColor=true ForegroundColor=Color( 0, 0, 0, 255) GroundColor=Color(210, 208, 185, 255) GroundTransparency=50 HideConstructionGeometry=false HighlightColor=Color( 0, 1, 255, 255) HorizonColor=Color( 0, 0, 0, 0) InactiveFade=0.25 InactiveHidden=false InstanceFade=0.5 InstanceHidden=false JitterEdges=false LineEndWidth=7 LineExtension=2 LockedColor=Color(255, 0, 0, 255) MaterialTransparency=true ModelTransparency=false RenderMode=2 SectionActiveColor=Color(255, 135, 0, 255) SectionCutWidth=3 SectionDefaultCutColor=Color( 0, 0, 0, 255) SectionInactiveColor=Color(112, 105, 97, 255) ShowViewName=true SilhouetteWidth=2 SkyColor=Color(198, 205, 208, 255) Texture=true TransparencySort=0

          The ones you are looking for:
          FogColor=Color(204, 204, 201, 255) FogEndDist=-1.0 FogStartDist=-1.0 FogUseBkColor=true

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

          1 Reply Last reply Reply Quote 0
          • G Offline
            georglorenz
            last edited by

            @thomthom said:

            Btw, the API docs are lying:

            I knew it. I knew it! No of course I didn't. Thank you much.

            You are right it will do the same thing as the slider, but I am hoping for more fine-control inserting the values. The slider is really akward to control especially when you are doing elevation drawings and want to fade out the background.

            Thanks again. You are the man thomthom.

            G

            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