⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
  • How to properly handle escape characters?

    4
    0 Votes
    4 Posts
    395 Views
    tt_suT
    @anton_s said: Actually a hidden input does not allow multi lines. I used textarea with display:none; style instead. From my current observations the technique works amazing! Oh! ... ooh... I might have to revisit SKUI and check this.
  • Create text in the viewport

    7
    0 Votes
    7 Posts
    481 Views
    tt_suT
    Yea, it's a known - annoying - limitation with draw_text. Both color and size would be good to have.
  • [Sketchup C API]Howto merge models oftwo .skp files into one

    5
    0 Votes
    5 Posts
    737 Views
    tt_suT
    I'll check with the rest of the team on the unit issue.
  • How do I get Mathn.rb to work?

    15
    0 Votes
    15 Posts
    1k Views
    tt_suT
    @ellipser said: I'd like to learn how to interface C++ with Sketchup, so I can speed things up. Basically my problem is that I need a road-map of sorts to get there. First thing is, what C++ compiler should I use? Visual Studio? I don't want to pay Bill Gates $500 for just hobbyist work that I'm doing. I used DevC++ before. I'm not at all familiar with Xcode, so I guess I'll Google that after I'm done writing this post. https://github.com/SketchUp/ruby-c-extension-examples That git repo includes Visual Studio and Xcode project examples for an Hello World extension - including the Ruby libs and headers we use. @ellipser said: I've seen the SDK code on the Trimble site, but, what next? Step 1 would be of course to download a C++ compiler. Then what? Where do I put all the header files? Could you recommend a tutorial if there is one? The C SDK is for reading and writing SKP files -not for acting on the live model. @ellipser said: Ultimately, I'm going to interface Sketchup with my 3D printer, which is in the final stages of being made. (It already does plotting when provided G-code). Next step is mounting the extrusion head and generating G-code from a Sketchup file. Also, with just using the Dremel mount I have, I can do milling. I want to do some Celtic designs created in Sketchup and then milled into wood. Nice! Got a project blog?
  • Width problems with select option in WebDialog

    23
    0 Votes
    23 Posts
    908 Views
    tt_suT
    @maricanis said: Frankly, no experience and knowledge about document modes, I've just used the default ones till now. Any suggested readings on this? Especially related to embedded vs. browser mode? I always make sure I use strict mode (full standard mode) and that mode renders best across different browsers and is the way forward. Everything else, quicks mode, is just legacy war damage from the ancient browser battles .
  • [Talk] Ruby Debugger for SketchUp 14+

    45
    0 Votes
    45 Posts
    7k Views
    T
    @avariant said: When displaying data about a variable, does it volunteer variable names or does it just respond with a value? I would be very disappointed to find out it did The debugger is exposing nothing new here, the same thing could be done anyway through any of the SU consoles by any savvy Rubyist - using nothing but standard Kernel method calls. Setting trace functions and using the returned bindings to read local and instance variables, get the current method and its call signature, read the call stack etc... can all be done from even the most basic install of Ruby. You can't actually read the code lines unless they are in a 'plain text' source file (the scrambler presumably 'evals' the unscrambled code, which precludes seeing the source) - but there's not much that can be done to secure the other information without losing the consoles - which would make life very difficult for the amateur developers that we all rely on for our toys!
  • Scene (Page) animation of Section Cuts

    10
    0 Votes
    10 Posts
    630 Views
    TIGT
    You can 'get' & 'set' [with = ] page.name BUT you can only 'get' the page.label By default the page.name==page.label and so it's in the animated set... Sorry, but the API is lacking page.label= or similar... Of course, the Animation class can be used filtering out () labels, BUT you can't change a page.label in code
  • Translations for plugins?

    14
    0 Votes
    14 Posts
    633 Views
    Dan RathbunD
    @aerilius said: Each plugin would be translated individually, with based on .strings files as you already have, but hosted online (like you can host code in git/mercurial/bazar). I'm out. I do not use .strings files, nor LanguageHandler specifically because it's fixes are not backported. (And they never will be, because backporting is against the SketchUp Dev Team's religion.)
  • Git for SketchUcation?

    23
    0 Votes
    23 Posts
    918 Views
    Rich O BrienR
    The bug reporting is being worked on. We just need to figure out some of the details before testing. It will be a process through which you (the dev) will see the bug submissions on the dashboard and the members can flag posts as bugs on the forums. Unflagging will also be possible. Users can also flag a bug through the plugin and submit some text. We need some method where the dev doesn't need to read 3 pages of posts just to find that one post that has a bug. @andreas the ratings system was an experiment on our side. we needed to see how proactive users were with microtransactions. there's a very good chance we will retire it to the site only for v3.0 of the pluginstore. @all we are definitely listening to all the suggestions here. if there's things you want to happen let us know as we entering into knuckle down time soon. if you want to play an active roll in v3.0 let us know.
  • Versioning

    7
    0 Votes
    7 Posts
    424 Views
    tt_suT
    It's still unclear what release they are scheduled for. Sometimes these things end up in new releases only - some times they backport the fixes.
  • Examples of unit tests in ruby for sketchup plugins

    3
    0 Votes
    3 Posts
    580 Views
    tt_suT
    @nits4 said: Hello, Are there any examples of unit tests in ruby for sketchup plugins? Thanks. There is TestUp with a framework. But it doesn't work with Ruby 2.0 in SU2014. It used some old and custom frameworks that aren't supported any more. https://github.com/SketchUp/sketchup-developer-tools Internally we've begun on a new framework, but it's not something that's even remotely ready for distribution.
  • Sync sketchup with vtk tool

    3
    0 Votes
    3 Posts
    362 Views
    C
    Hi, thanks for the Tip. I looked their and synced the position with the position, the target with the focal point and view up with view up. That seems to work pretty good in the first attempt, but I am not allowed to zoom in or out, since then both view are not the same anymore (basically the vtk window does not "rescale". vtk has the zoom or setdistance function, but I expected them to be given indirectly be the distance between position and focal point. what information have i missed?
  • Followme with distance

    8
    0 Votes
    8 Posts
    362 Views
    N
    Thanks to all who tried to help me. I'm just new to ruby and Sketchup API, but digging some deeper into it I solved this problem by myself now.
  • Reverse operation of view.screen_coords

    30
    0 Votes
    30 Posts
    1k Views
    Dan RathbunD
    Do the same thing but do not change the target ?
  • How to read .skp files in ruby?

    6
    0 Votes
    6 Posts
    779 Views
    P
    When you import a model, the entities (edges, faces, groups,... ) don't go directly in model.entities. They are encapsulated in a new component....
  • Secure http request from SketchUp ruby

    4
    0 Votes
    4 Posts
    954 Views
    Dan RathbunD
    Now hold on. IF this certificate will be used across all versions of SketchUp, then yes you CAN have your own application folder in the user %AppData% path. "C:/Users/Joe/AppData/Roaming/YourCompany/ThisPlugin" (Windows) If it is for any user on a workstation, then it could go in the %ProgramData% path. That complicates thing though. If it does not matter if there are multiple copies of the file, then it is easiest to include it within the RBZ archive.
  • Rename texture image file inside *.skp

    7
    0 Votes
    7 Posts
    2k Views
    N
    So there is a ruby plugin I've done (based on TIG's post). It renames all texture files in model with a template. module VNV def VNV.rename_textures UI.messagebox("All texture file names will be changed with a template - mat000") model = Sketchup.active_model model.start_operation('Rename texture files', true) tw = Sketchup.create_texture_writer temp_path = File.expand_path( ENV['TMPDIR'] || ENV['TMP'] || ENV['TEMP'] ) temp_folder = File.join( temp_path, 'Sketchup_tmp_mtl' ) unless File.exist?( temp_folder ) Dir.mkdir( temp_folder ) end group = model.active_entities.add_group() Sketchup.active_model.materials.each_with_index{ |m,i| if m.texture then group.material = m tw.load(group) path_to_png = File.join(temp_folder, "mat#{'%03d' % i}"+".png") tw.write(group, path_to_png) w = m.texture.width h = m.texture.height m.texture = path_to_png m.texture.size = [w, h] File.delete(path_to_png) end } group.erase! model.commit_operation end # def end # module if (!file_loaded?(__FILE__)) menu = UI.menu("Plugins") menu.add_item("Rename texture files") { VNV;;rename_textures } # Let Ruby know we have loaded this file file_loaded(__FILE__) end RenameTextures.rb
  • [Code] Layers Panel API

    9
    0 Votes
    9 Posts
    2k Views
    Dan RathbunD
    @jiminy-billy-bob said: A module. Why? Just checking. Keepin' ya honest. (Only Ruby, and in rare instances the API or library gems, should define classes at the toplevel.)
  • Hide at a distance from the camera - works but slooooowwww

    4
    0 Votes
    4 Posts
    271 Views
    tt_suT
    Fog generally tends to slow down the framerate.
  • Reading and drawing textures

    22
    0 Votes
    22 Posts
    1k Views
    Dan RathbunD
    @dan rathbun said: The HTML5 Canvas element will not work well on PC yet because SketchUp uses the MSIE WebBrowser control for WebDialogs. Microsoft is lagging behind in their IE support of the specification. You can test by loading the HTML5 Bejeweled game into a WebDialog. It most likely will not run under XP. But runs fine under Win7 with MSIE v11 installed. Bejeweled.rb

Advertisement