Sketchucation Tools 5.0.7 | Licensing improvements and bug fixes Learn More

Alkategóriák

  • No decscription available

    20 Témakörök
    462 Hozzászólások
    HornOxxH
    @pilou said: More appetizing in chocolate! Eggs are good as well - but only very fragile when falling down in SketchyPhysics
  • Frontface&subsmooth on Mac ( solved )

    17
    0 Szavazatok
    17 Hozzászólások
    2k Megtekintések
    ton baetenT
    Edson, Well, maybe that is correct, but my SU6 folder is about 16MB (138 files), includes almost all big ones (alvailable for mac) and many, many smaller ones. My SU7 folder is still rather empty, only a few rubies, since I have decided to check them all, get rid of duplicates, the once a hardly ever use and to get back any overview, before moving them to SU7. I will see whatever happens to my user/etc....folders, no big deal for me. I will keep you informed if I encounter a ruby making an extra unexpected ruby-folder.
  • Specify Font Size of Leader Text or Screen Text?

    3
    0 Szavazatok
    3 Hozzászólások
    432 Megtekintések
    daikuD
    Thanks, Todd. I'll add it to Scott's wish list.
  • Run windows .exe and wait for completion

    3
    0 Szavazatok
    3 Hozzászólások
    688 Megtekintések
    Al HartA
    I was finally able to do this using Win32API and a function I call "call_and_wait". def self;;call_and_wait(scommand_line) cp_params = 'LPLLLLLLPP' create_process = Win32API.new('kernel32','CreateProcess', cp_params, 'I') startinfo = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].pack('LLLLLLLLLLLLSSLLLL') # place holder for results procinfo = [0,0,0,0].pack('LLLL') trace("scommand_line; %s", scommand_line) cp = create_process.call(0, scommand_line, 0, 0, 0, 0, 0, 0, startinfo, procinfo) trace("create_process returned; %s", cp) if (cp == 0) return end#if # get process if of process we created hProcess = procinfo.unpack("LLLL")[0] trace("hProcess; %s waiting...", hProcess) if (hProcess == 0) return end#if waitForSingleObject = Win32API.new("kernel32","WaitForSingleObject",['L','L'],'L') a = waitForSingleObject.Call( hProcess, 0xFFFFFFFF ) # wait forever trace("waitForSingleObject returned; %s", a) end#def The WaitForSingleObject waits for the task to complete without using up resources. The ruby command system(command_line) runs the commands and waits for it, but uses up 1/2 of the resources of the machine in a tight loop checking to see if the command is done yet.
  • Activate toolbars automaticly

    5
    0 Szavazatok
    5 Hozzászólások
    638 Megtekintések
    dazzaD
    @sepo said: I don't know if making new template will solve your problem but I have managed to sort out toolbars randomly moving with making new template. This was on PC though. I agree with Sepo, arrange your toolbars as needed and then save as a template. Worked like a charm!!!
  • Something like SubdivideAndSmooth

    3
    0 Szavazatok
    3 Hozzászólások
    1k Megtekintések
    R
    Here you go: http://www.smustard.com/script/Subdivide Like i said before, its pretty buggy. If you want to do any real work with subd stuff youd be a lot better of buying whaats script.
  • Calling all plug-in developers!

    6
    0 Szavazatok
    6 Hozzászólások
    639 Megtekintések
    GaieusG
    Yes, it was but due to some privacy policy demands,this is not possible any longer. You can see all that is displayed there (with one exception) here, on the right anyway.
  • MaterialsObserver

    3
    0 Szavazatok
    3 Hozzászólások
    502 Megtekintések
    A
    So I checked the instance methods, to see if the exposed methods correspond to the API. I'm not sure if it should or not, my ruby knowledge is thin here for sure (extending classes where methods may get called but are / aren't defined in the base class). However, I checked the instance methods of every single observer class and they match the API exactly (some have additional methods, but all have at least what the API says. Except MaterialsObserver. Sketchup;;MaterialsObserver.instance_methods ["MaterialUndoRedo", "onMaterialRemoveAll", "MaterialSetCurrent", "MaterialChange", "onMaterialAdd", "MaterialRefChange", "MaterialRemove"] Sorry, but this is a serious "what the hell?!" moment. Most of the methods completely lack the "on" part. Yet, onMaterialChange does get called rarely, so the method is being used, even if the base material observer doesn't define it. Attempting to override "MaterialChange" instead of "onMaterialChange" never gets called. Am I off base or is this a Google Fubar? None of the other observers have any methods that don't start with "on", or differ at all from the API.
  • Regex selection filter?

    3
    0 Szavazatok
    3 Hozzászólások
    412 Megtekintések
    thomthomT
    Yea, it'd be a simple loop. Just wasn't sure if there was a plugin out there already. If not I'll add one to my selection plugin. Found the use for it today when I imported a revit model using the DWG format. There's no material applied so I have to add that manually. But I noticed that similar element had the same name prefix followed by a number. So I figured I could greatly speed up the process of adding materials by doing a regex selection.
  • Raytest

    8
    0 Szavazatok
    8 Hozzászólások
    1k Megtekintések
    chrisglasierC
    @unknownuser said: Silly me... I thought you wanted to learn how to use raytest! You want to know how to do collision detection in 3D. If I knew, I'd tell. I presume raytest would be a piece of that somewhere. Todd I am sorry Todd if you think I misled you. Yes, I do want to learn how to use raytest and I believe what I am thinking about is simple clash detection in the XY plane. If you have time any snippets you feel may be appropriate would be well received. Thanks Chris
  • Texture.size= ??

    3
    0 Szavazatok
    3 Hozzászólások
    430 Megtekintések
    A
    I have. It didn't have any effect. A previous post here implied that invalidate only works somehow in the context of a tool. Even if it did work outside of a tool, I don't think it would help here; you can use the mouse to move the 3D view around as much as you want (which assumably refreshes and invalidates the view repeatedly) and it doesn't fix it. So it's not an issue with updating the display, but more somehow updating the material, visually. As soon as you modify the geometry or make changes in the material dialog, the texture updates correctly, but not until then.
  • Question - A way to allow user to change ruby menu location?

    2
    0 Szavazatok
    2 Hozzászólások
    340 Megtekintések
    A
    Difficult. You can't change it while Sketchup is running -> restart. But you can try to override the Sketchup methods for adding (sub) menus and menu items keeping the old methods with alias names. Your methods "hook" into the old methods, before they perform their action - short IRB session explaining what I'm talking about: irb(main);001;0> class A irb(main);002;1> def a irb(main);003;2> puts "a" irb(main);004;2> end irb(main);005;1> end => nil irb(main);006;0> class A irb(main);007;1> alias ;old_a ;a irb(main);008;1> def a irb(main);009;2> puts "b" irb(main);010;2> old_a irb(main);011;2> end irb(main);012;1> end => nil irb(main);013;0> A.new.a b a => nil Your method could read the correct menu structure i.e. from a text file. But you have to make sure, that your script is eval'ed by Sketchup before another script adds menus or menu items. azuby
  • Drop.rb doesn't work

    3
    0 Szavazatok
    3 Hozzászólások
    453 Megtekintések
    W
    AHA !!! thank you
  • CALLING ALL MATRIX GURUS, HELP! , please :)

    11
    0 Szavazatok
    11 Hozzászólások
    1k Megtekintések
    J
    jzer7, Thanks so much, but no luck. I going to post a section of the script i am parsing this data from, maybe it will help... import Blender from Blender import Camera, Object, Scene, NMesh from Blender import Mathutils from Blender.Mathutils import * cur = Scene.getCurrent() #Camera Parameters c0001 = Camera.New('persp') c0001.lens = 49.739047 o0001 = Object.New('Camera') o0001.name = "voodoo_cam1" o0001.setMatrix(Mathutils.Matrix([0.999938,0.001129,-0.011103,0.000000], [0.001072,-0.999986,-0.005202,0.000000], [-0.011108,0.005189,-0.999925,0.000000], [1.054297,1.571880,-8.966838,1.000000])) o0001.link(c0001) cur.link(o0001) c0002 = Camera.New('persp') c0002.lens = 49.739047 o0002 = Object.New('Camera') o0002.name = "voodoo_cam2" o0002.setMatrix(Mathutils.Matrix([0.999943,0.001132,-0.010635,0.000000], [0.001076,-0.999985,-0.005294,0.000000], [-0.010641,0.005282,-0.999929,0.000000], [1.071295,1.559580,-8.822482,1.000000])) o0002.link(c0002) cur.link(o0002) ################################################## # [snip] # many, many more cams are created and then comes # some IPO curve data ################################################# #Render camera animated with IpoCurves crender = Camera.New('persp') crender.lens = 35.0 crender.setDrawSize(1.0) orender = Object.New('Camera') orender.name = "voodoo_render_cam" orender.link(crender) cur.link(orender) cur.setCurrentCamera(orender) ipo = Blender.Ipo.New('Object','render_cam_objipo') orender.setIpo(ipo) locx = ipo.addCurve('LocX') locx.setInterpolation('Linear') locy = ipo.addCurve('LocY') locy.setInterpolation('Linear') locz = ipo.addCurve('LocZ') locz.setInterpolation('Linear') rotx = ipo.addCurve('RotX') rotx.setInterpolation('Linear') roty = ipo.addCurve('RotY') roty.setInterpolation('Linear') rotz = ipo.addCurve('RotZ') rotz.setInterpolation('Linear') camipo = Blender.Ipo.New('Camera','render_cam_camipo') crender.setIpo(camipo) lenscurve = camipo.addCurve('Lens') lenscurve.setInterpolation('Linear') locx.addBezier((1,o0001.LocX)) locy.addBezier((1,o0001.LocY)) locz.addBezier((1,o0001.LocZ)) rotx.addBezier((1,o0001.RotX*18/3.141593)) roty.addBezier((1,o0001.RotY*18/3.141593)) rotz.addBezier((1,o0001.RotZ*18/3.141593)) lenscurve.addBezier((1,c0001.lens)) locx.addBezier((2,o0002.LocX)) locy.addBezier((2,o0002.LocY)) locz.addBezier((2,o0002.LocZ)) rotx.addBezier((2,o0002.RotX*18/3.141593)) roty.addBezier((2,o0002.RotY*18/3.141593)) rotz.addBezier((2,o0002.RotZ*18/3.141593)) lenscurve.addBezier((2,c0002.lens)) ############################################ # [snip] # many more lines of IPO # the only thing left is "point cloud" data # which i am leaving out. # The last thing in the script is this... ########################################### # Scene Helper Object scene_dummy= Object.New('Empty','voodoo_scene') scene_dummy.setLocation(0.0,0.0,0.0) cur.link(scene_dummy) scene_dummy.makeParent([orender,ob]) scene_dummy.setEuler((-3.141593/2, 0.0, 0.0)) scene_dummy.SizeX=0.2 scene_dummy.SizeY=0.2 scene_dummy.SizeZ=0.2 Maybe this helps, maybe not ?? the lines don't wrap correctly in the code tags so it mucks up the code a bit
  • Get current OS information

    3
    0 Szavazatok
    3 Hozzászólások
    318 Megtekintések
    F
    Tks, worked fine. Fernando.
  • Must Have Plugin

    10
    0 Szavazatok
    10 Hozzászólások
    3k Megtekintések
    K
    Fantastic Thread! We can all learn from this. By the way, I think we need to say a big 'Thank You' to Didier Bur , as Sketchup wouldn't be the same without the Crai.fr ruby resource website. Next to 3D warehouse, it is one of the best features of Sketchup. Really! It is strange that Google themselves never set up their own ruby resource site, or did I miss that?
  • Screen won't update

    4
    0 Szavazatok
    4 Hozzászólások
    403 Megtekintések
    T
    Yes, view.invalidate is designed to work with Tools.
  • Odd Ruby Error

    6
    0 Szavazatok
    6 Hozzászólások
    563 Megtekintések
    T
    Since you are getting it when right clicking on a axis, then the failing code is most assuredly a proc for displaying a right click context menu for a script. You can narrow your search down to any scripts you have that generate context menu selections.
  • Double rotations

    3
    0 Szavazatok
    3 Hozzászólások
    613 Megtekintések
    chrisglasierC
    Fixed [flash=425,344:3qp1491i]http://www.youtube.com/v/TL8q17qSKrk[/flash:3qp1491i]
  • SU script / Ruby book for beginners

    8
    0 Szavazatok
    8 Hozzászólások
    931 Megtekintések
    A
    @remus said: I had a quick look at the website, and the rd edition deals with ruby 1.9, perhaps SU uses 1.8? Exactly. Sketchup uses a real old Ruby (1.8.0). Most of the Ruby programmers use 1.8.6 (or 1.8.7) at the moment. Betwenn 1.8.6 and 1.8.7 they made some changes influenced by the development of 1.9.0 (and 1.9.1). But alos betwenn 1.8.7 and 1.9.0 (1.9.1) there are a lot changes. azuby
  • Coming Soon:Profile Builder

    97
    0 Szavazatok
    97 Hozzászólások
    19k Megtekintések
    P
    It's released. http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=15538&p=120193#p120193

Advertisement