sketchucation logo sketchucation
    • Login
    1. Home
    2. dezmo
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    D
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 5
    • Posts 69
    • Groups 2

    dezmo

    @dezmo

    10
    Reputation
    5
    Profile views
    69
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    dezmo Unfollow Follow
    Extension Creator registered-users

    Latest posts made by dezmo

    • RE: [REQ] remove backface materials (selected)

      @pbacot said:

      Does anyone know of a plugin that can remove backface materials from a selection... I just need to work on a specific selection.

      Dezmo_remove_back_materials.rbz
      Here are a quick one...This will remove Back Face Material from selection recursively. You can undo it.
      Start by toolbar icon or context menu after selection.

      The result will be printed out to Ruby Console e.g.:
      "Back Face Material removed from 11 faces."
      or
      "Back Face Material removed from 0 face."

      Quickly tested only on Windows. No responsibility... but should be okay on MAC too.
      (Sorry about the ugly icon 😳 )


      rbfm1.gif


      
      #main.rb
      module Dezmo
        module Remove_Back_Mat
          @@loaded = false unless defined?(@@loaded)
          extend self
      
          def remove_back_materials
            model=Sketchup.active_model
            model.start_operation('Remove Back Face Materials', true)
            @count = 0
            remove_back_materials_recursively
            plural = @count > 1 ? "s" ; ""
            p "Back Face Material removed from #{@count} face#{plural}."
            model.commit_operation
          end
      
          def remove_back_materials_recursively(ents = Sketchup.active_model.selection)
            ents.each { |e|
              case e
              when Sketchup;;Face
                if e.respond_to?( ;back_material ) && e.back_material
                  e.back_material = nil
                  @count += 1
                end
              when Sketchup;;ComponentInstance, Sketchup;;Group
                remove_back_materials_recursively(e.definition.entities)
              end
            }
          end
          
          unless @@loaded
            cmd1 = UI;;Command.new("Remove Back Face Materials") {remove_back_materials}
            cmd1.small_icon = File.join(File.dirname(__FILE__), "/rbm.png")
            cmd1.large_icon = File.join(File.dirname(__FILE__), "/rbm.png")
            cmd1.tooltip = "Remove Back Face Materials"
            cmd1.status_bar_text = "Remove Back Face Materials (Selection required)"
            cmd1.set_validation_proc {
              if Sketchup.active_model.selection.empty?
                MF_GRAYED | MF_DISABLED
              else
                MF_ENABLED
              end
            }
      
            UI.add_context_menu_handler do |context_menu|
              context_menu.add_item(cmd1) unless Sketchup.active_model.selection.empty?
            end
            toolbar1 = UI;;Toolbar.new("Remove Back Face Materials")
            toolbar1.add_item(cmd1)
            toolbar1.restore
            @@loaded = true
          end
        end
      end
      
      
      posted in Plugins
      D
      dezmo
    • RE: Vertex Tools won't accept receive license key

      Perhaps you can ask directly here:
      https://evilsoftwareempire.com/vertex-tools/help

      posted in Plugins
      D
      dezmo
    • RE: [Plugin] MAJ Door-Window Cutter

      Others are publishing the plugins in the plugins topic... πŸ˜‰
      https://sketchucation.com/forums/viewforum.php?f=323

      posted in Developers' Forum
      D
      dezmo
    • RE: Plugin that matches file name and definition name of comp?

      Unlike Model#save or Model#save_copy, unfortunately the Ruby API does not allow me to give a second parameter - version - for Definition.#save_as.
      And UI.savepanel have it's limitation too...

      ...Therefore I got stuck here for now with "versionig". I need more time to figure out workaround, if any.

      posted in Plugins
      D
      dezmo
    • RE: Any extension to automatically place dimensions on a layer?

      If you have already a dimension in the model:

      Open Window>>Model Info>Dimensions. Click on: "Select all dimensions". Then in the entity info you can assign the desired layer to all at once. (Layer is renamed to Tag in newer SU but the function are same...)


      set_dim_layer.png

      posted in SketchUp Discussions
      D
      dezmo
    • RE: Plugin that matches file name and definition name of comp?

      It is not 100% clear if you want to use the component definition name or the name from the dynamic component attribute...
      Therefore I made both πŸ˜„

      This is a quick and dirty plugin: USE YOUR OWN RISK!

      After installing the extension you will get 2 new context menu item (right click on the component):

      • "Save as: DC name"

      • "Save as: Def name"
        Will be grayed out if not applicable.

      I hope this is what you want and it will works for you!
      Note: Scroll down for new release in a later post of mine!


      Dezmo_save_as_name.rbz

      posted in Plugins
      D
      dezmo
    • RE: Plugin that matches file name and definition name of comp?

      Despite that I did not receive any feedback from the original requester yet, there is a refined version:
      Dezmo_save_as_name_Beta_2020_0824_1405.rbz
      After installation You need to restart SU if the previous version was there.

      History:
      #Beta_2020_0819_1526: Initial version of Dezmo Save as name (see in above post)
      This version:
      #Beta_2020_0824_1405:

      • Added instance name possibility
      • The context menu will contain up to 3 sub-menus (including the current names)
      • The context menu will disappear if not relevant (instead of graying out)
        ? Known issue: -You can not select the SU file version to save to (You can't save to older version)
        ! Known benefit: + You can even save a group now.
        dezmo_save_as_name_b2.png
        I intend to put it in the PluginStore later ... after some feedback and if I have more time to do so.
      posted in Plugins
      D
      dezmo
    • RE: Delete and update add_note don't work

      @mr_creator said:

      When i use:

      
      > @note.set_text "This is another note"
      > Sketchup.active_model.active_view.invalidate
      > 
      

      You didn't say what you didbefore.
      I guess you actually did something like this:

      @note = Sketchup.active_model.add_note 'Note', 0.8, 0.9
      @note = Sketchup.active_model.add_note 'Note', 0.8, 0.9
      @note.set_text "This is another note"
      Sketchup.active_model.active_view.invalidate
      

      If you can tell me what your goal is at all, I might be better able to suggest something... πŸ˜‰

      posted in Developers' Forum
      D
      dezmo
    • RE: Delete and update add_note don't work
      @note = Sketchup.active_model.add_note 'Note', 0.8, 0.9
      

      You may realised that is creating Sketchup::Text https://ruby.sketchup.com/Sketchup/Text.html
      To change:

      @note.set_text "This is another note"
      

      Most probably to see changes, the view need to redraw.

      Sketchup.active_model.active_view.invalidate
      

      do delete:

      @note.erase!
      
      posted in Developers' Forum
      D
      dezmo
    • RE: Plugin that matches file name and definition name of comp?

      @dav_id said:

      It's ok for me with SU17 Make and SU2020 Pro

      That's great. Thanks for the feedback! πŸ˜„

      posted in Plugins
      D
      dezmo