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

    Topics

    • OricAtmosO

      [SU2014] character encodings and the Ruby console

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      10
      0 Votes
      10 Posts
      292 Views
      OricAtmosO
      Thanks, that might come in handy!
    • OricAtmosO

      Resolution of pre-distorted textures

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      215 Views
      OricAtmosO
      Thanks for the suggestions! You're right, there's no single "tiling factor" in a distorted texture. I think I'll ignore this problem for now and solve more important issues first. By the way, is there perhaps some kind of exporter plugin template that does all the complicated stuff of getting the needed model information out of SketchUp? Something that's only missing the actual writing of the target file format.
    • OricAtmosO

      Material names changed by SketchUp

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      510 Views
      TIGT
      Recent versions of the API allow you to change a material's name in code. If you have a tool that's using a file of data that is material-name specific then clearly you need to know which of the possible materials with similar names it is to be applied to. There are several possibilities. You manually add a material from a library with the name 'Stonewall', there is NO preexisting material with that name, and therefore the new material gets called 'Stonewall'. You have a material already in the model named 'Stonewall' and you manually add a material from a library with the same name, and therefore the new material gets called 'Stonewall1'. You have a material already in the model named 'Stonewall' and you manually add a material from a library with the same name, and therefore because there's also a material in the model named 'Stonewall1' the new material gets called 'Stonewall2' [this will go on until 'Stonewall999' and beyond!]. You have a material already in the model named 'Stonewall1' and you manually add one from a library with the name 'Stonewall', and because there's NO material in the model named exactly 'Stonewall' so the new material gets called 'Stonewall'. So how do you decide which is the real 'Stonewall' material you want? It's likely that the model.materials collection is in the order they are created [at least in a session]. Therefore to find the 'true' 'Stonewall' material try this: name='Stonewall' ### or any other material name to be found... mat=Sketchup.active_model.materials.to_a.find_all{|m|m.name=~/^#{name}/}[-1] Thus the last match in the matches list is the material last added, so logically is the one you want? To get that material's name use mat.name...
    • OricAtmosO

      Is there a model exporter plugin that writes C++ files?

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      15
      0 Votes
      15 Posts
      547 Views
      J
      @oricatmos said: Open Asset Import Library Thanks, I was not aware of this library, but it looks like a nice thing.
    • OricAtmosO

      Tracking changes of component definitions with observers

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      9
      0 Votes
      9 Posts
      381 Views
      Dan RathbunD
      @adamb said: you may want this as a singleton that is shared amongst all instances (as you've almost written by mistake). Like so: # class definition inside module AC3D_Raven_Exporter class DefinitionsObserver < Sketchup;;DefinitionsObserver @@entities_observer = nil # ref to the singleton instance attr_reader( ;entities_observer ) def initialize() if @@entities_observer.nil? # ref'ing the class ref @@entities_observer = AC3D_Raven_Exporter;;EntitiesObserver.new() # otherwise the instance to the observer is valid and just reuse it. end @entities_observer = @@entities_observer end def onComponentAdded(definitions, definition) definition.entities.add_observer(@entities_observer) end end ADD: and you can do the same thing 1 level up (in your custom AppOserver,) by creating a singleton instance of the DefinitionsObserver, and attaching it to all the component definitions that you wish to "watch". I usually also write a detach_from() method, that uses an array or hash of "watched" items, in order to detach observers when I no longer need to watch them.
    • OricAtmosO

      Want to avoid &quot;Endpoint Outside Active&quot; when moving vertex

      Watching Ignoring Scheduled Pinned Locked Moved Newbie Forum sketchup
      7
      0 Votes
      7 Posts
      572 Views
      OricAtmosO
      @gaieus said: What we meant here is this setting in the Model info dialog: Thanks for clearing that up! I've set up the same shortcuts for me now, too. @gaieus said: One uncomfortable thing however; even when the rest of the model (and all similar components) are hidden this way, the Orbit tool still behaves as if they were there (i.e. "weighing" the orbit tool when you do not use it exactly on the geometry you are editing). Using the orbit tool can get really aggravating anyway. I'm lucky I have a SpaceNavigator at work so I don't need the orbit tool.
    • OricAtmosO

      Camera independent flat shading (solved)

      Watching Ignoring Scheduled Pinned Locked Moved Newbie Forum sketchup
      8
      0 Votes
      8 Posts
      1k Views
      OricAtmosO
      Oh, sorry. I was logged in with an old account (that I didn't remember I had) on my home computer.
    • 1 / 1