⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
  • Duplicate Faces?

    10
    0 評價
    10 貼文
    772 瀏覽
    J
    @thomthom said: @jasef said: Awesome gents, make_unique solved it. What about ComponentInstances? I hope you're not making them uniqe - as I doubt the user will be expecting that - or be happy to see that happening... No, just Groups.
  • Trying to hunt down elusive developers

    7
    0 評價
    7 貼文
    288 瀏覽
    thomthomT
  • Using the Cancel btn, to return to previous menu?

    22
    0 評價
    22 貼文
    971 瀏覽
    T
    Thanks TIG: I would never have been able to figure out the self.run routine on my own!
  • Learning Modern 3D Graphics Programming

    2
    0 評價
    2 貼文
    332 瀏覽
    A
  • [API] Edge.other_vertex unexpected return value

    4
    0 評價
    4 貼文
    97 瀏覽
    thomthomT
    Aye! If you are dealing with vertices, and you create a bug where you mix up your vertex references you might not notice it immediately as this method happily returns the first vertex in the edge which isn't the one pass in the argument. Garbage in - garbage out.
  • Help Understanding Classes and Class objects

    30
    0 評價
    30 貼文
    811 瀏覽
    P
    @dan rathbun said: Bookmark that page. Done, thanks for the link. I remember doing the tutorials when DC's first came out but have forgotton the majority of what I learned so I guess I will be spending some time there first.
  • Copy along a path plugin

    13
    0 評價
    13 貼文
    9k 瀏覽
    T
    thx a lot
  • Intersect this?

    8
    0 評價
    8 貼文
    328 瀏覽
    J
    It worked for me after I moved it all to another place in the space, randomly , not specifically to any place . I thought it could give you a clue . Thanks for answering .
  • Using default sketchup materials with Ruby API

    4
    0 評價
    4 貼文
    2k 瀏覽
    S
    This code works for me: model = Sketchup.active_model materials=model.materials Adds a material as an in model material m = materials.add "Test Color" begin Returns nil if not successful, path if successful path=Sketchup.find_support_file "1.jpg","\Plugins\" # m.texture = "1.jpg" m.texture = path m.texture.size = 666 rescue UI.messagebox $!.message end
  • [Code] Transforming in custom coordinate systems

    3
    0 評價
    3 貼文
    183 瀏覽
    thomthomT
    Glad it helped. I spend a loong time on that - I just couldn't warp my head around what was going on. The key was the quote from the Wiki article. Everything makes so much more sense now. Figured I'd post it here to remind myself.
  • Question about developing plugin to automate functions

    5
    0 評價
    5 貼文
    116 瀏覽
    Dan RathbunD
    It sounds more like you want to create a tool. See the UI::Tool class in the API. Then read through and understand the "linetool.rb" script in the "Plugins/Examples" directory. Keep in mind that scripting within a GUI application's process, is event-driven programming, not a linear sequential exercise. You write a class with callback methods, that the application calls, in response to UI input, mouse movements, key presses, etc., from the user.
  • [Js] Getting and verifying a class attribute setting

    10
    0 評價
    10 貼文
    149 瀏覽
    thomthomT
    @dan rathbun said: Can I use a selector path like in CSS? Exactly! @dan rathbun said: OK so what does it return if nothing found ?? null ? http://api.jquery.com/jQuery/ @unknownuser said: If no elements match the provided selector, the new jQuery object is "empty"; that is, it contains no elements and has .length property of 0. <span class="syntaxdefault"><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="syntaxkeyword">if&nbsp;(&nbsp;$(</span><span class="syntaxstring">'body#someid'</span><span class="syntaxkeyword">).</span><span class="syntaxdefault">length&nbsp;</span><span class="syntaxkeyword">>&nbsp;</span><span class="syntaxdefault">0&nbsp;</span><span class="syntaxkeyword">)&nbsp;{<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;</span><span class="syntaxdefault"></span>
  • [Js] How to specify multi-line String literals ??

    5
    0 評價
    5 貼文
    106 瀏覽
    Dan RathbunD
    I thot maybe a <![CDATA[ block, but the editor lexer does not indicate it will work.
  • Shadow Time Mismatch?

    12
    0 評價
    12 貼文
    505 瀏覽
    thomthomT
    <span class="syntaxdefault"><br />model </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> Sketchup</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">active_model<br /><br />modeltime </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> model</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">shadow_info</span><span class="syntaxkeyword">[</span><span class="syntaxstring">'ShadowTime'</span><span class="syntaxkeyword">]<br /></span><span class="syntaxdefault">unless modeltime</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">utc</span><span class="syntaxkeyword">?<br /></span><span class="syntaxdefault">  time </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> model</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">shadow_info</span><span class="syntaxkeyword">[</span><span class="syntaxstring">'ShadowTime'</span><span class="syntaxkeyword">].</span><span class="syntaxdefault">getutc<br />  tz_offset </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> model</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">shadow_info</span><span class="syntaxkeyword">[</span><span class="syntaxstring">'TZOffset'</span><span class="syntaxkeyword">]</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">*</span><span class="syntaxdefault"> 60 </span><span class="syntaxkeyword">*</span><span class="syntaxdefault"> 60&nbsp;</span><span class="syntaxkeyword">/&nbsp;-</span><span class="syntaxdefault">1<br />  modeltime </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> Time</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">at</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> time</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">to_i </span><span class="syntaxkeyword">+</span><span class="syntaxdefault"> tz_offset </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">end<br /></span>
  • SCF Forum Syntax Highlighter (v 1.5)

    21
    0 評價
    21 貼文
    4k 瀏覽
    Dan RathbunD
    @driven said: @Jim, how about changing the topic title to just SFC_Forum_SyntaxHighlighter and include other browser versions in your top post. A one-stop shop ?
  • Plugin installation recomendations

    8
    0 評價
    8 貼文
    257 瀏覽
    K
    Thanks I will make use of that. Keith
  • Get Name of Image

    2
    0 評價
    2 貼文
    97 瀏覽
    A
    Have you tried https://developers.google.com/sketchup/docs/ourdoc/image#path ?
  • [Help] Create &quot;Check for Update&quot; event

    2
    0 評價
    2 貼文
    112 瀏覽
    Dan RathbunD
    Everyone wants this functionality. Some work has been done. ExtendSketchUp has this goal. Fredo6 created a web-based update checking feature. (Do a search.) Others have done it with a UI::WebDialog You will likely need to use the functionality in the SketchupExtension class for installed versioning. Unfortunately.. the community has not yet agreed upon a file manifest format to track installed file locations. (So an uninstaller can remove them.)
  • [Code] !autoload.rb loads &quot;!_autoload&quot; folders - v3.0.0

    7
    0 評價
    7 貼文
    2k 瀏覽
    Dan RathbunD
    @unknownuser said: Is the “.rb” extension really necessary when using for example “require (“sketchup.rb”)? The answer is not very simple. You should read the method dictionary for Kernel.require(), Kernel.load(), Sketchup.require() and Sketchup.load(). These methods act differently: depending on the arguments (absolute or relative paths) depending upon the Ruby version depending whether a file extension is given The require() methods push successful paths into the $LOADED_FEATURES array, but may not add the actual extension of the file that was loaded. (This could cause confusion later.) The overridden methods in the Sketchup module do not act exactly the same as the global Kernel methods. (return values and filenames in Exception messages.) We almost need a complicated decision tree with all the permutations... to decide when to use a extension and when not to. It is recommended NOT to use a file extension with the Sketchup module overrides. (This also helps in development, as the same loader script can load both rb and rbs files, after scrambling.) Also be aware that the SketchupExtension class uses these overides. This is really an issue for it own topic thread (and perhaps there already is one?)
  • Info about add_note method

    18
    0 評價
    18 貼文
    755 瀏覽
    Dan RathbunD
    The native MoveTool can move the note.

Advertisement