[Plugin] LSS Toolbar 2.0 Beta
-
Thank:kirill2008
Simple and convenient tool, I will continue to test!
-
Hi Kirill,
left a note on your blog, but thought I write here as well.
Webkit reported errors so I changed lss_common.js, just syntax
function apply_defaults(){ for (i=0; i<settings_arr.length; i++) { var img_btn=document.images[settings_arr[i][0]]; if (img_btn) { if (settings_arr[i][1]=="true") { img_btn.setAttribute("className", "btn_checked"); } else { img_btn.setAttribute("className", "btn_unchecked"); } } var input_ctrl=document.getElementById(settings_arr[i][0]); if (input_ctrl) { if (input_ctrl.type == 'text') { input_ctrl.value=settings_arr[i][1]; } if (input_ctrl.type == 'checkbox') { if (settings_arr[i][1]=='true'){ input_ctrl.checked=true; } else{ input_ctrl.checked=false; } } } } }
also
@index_path="file://#{@resource_dir}/lss_toolbar/instruct/index.html"
was needed to open help in Safari.Changed
show()
toshow_modal()
for mac use.Seems to be a couple of other minor glitches that I'm finding, but they may be me not being familiar with the process.
The other major problem is SU crashes on quit with this activated in 'Extensions' but not when it's not... No other plugins/extensions active when testing.
When it's activated, SU asks to 'Save Changes' on quit, whether I used it or not, then crashes as it closes it's windows.
If I first close a drawing, I get the save dialog, which I can close without saving. after that SU will quit without a crash report.
john
-
Kirill
Here is a method I use that allows me to use instructor content wihtout placing the files in the SU folder. It basically resolves a relative path from the instructor folder to the folder where the content actually is. This only works when the content is on the same drive as SU though.<span class="syntaxdefault"><br /> </span><span class="syntaxcomment"># Get Instructor Path<br /> #<br /> # +Tool.getInstructorContentDirectory+ expects a path relative to SketchUp's<br /> # +Resource/<locale>/helpcontent/+ folder, despite the documentations use an<br /> # absolute path.<br /> #<br /> # This method is a wrapper that generates a path to the actual help content<br /> # which SketchUp can use.<br /> #<br /> # The given path must be under the same drive as SketchUp's help content.<br /> #<br /> # This quick exist in all current SketchUp versions.<br /> #<br /> # Current SketchUp version; SketchUp 8 M1<br /> #<br /> # @param [String] path<br /> #<br /> # @return [String,Nil]<br /> # @since 1.0.0<br /> </span><span class="syntaxdefault">def self</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">get_instructor_path</span><span class="syntaxkeyword">( </span><span class="syntaxdefault">path </span><span class="syntaxkeyword">)<br /> </span><span class="syntaxdefault">path </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">File</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">expand_path</span><span class="syntaxkeyword">( </span><span class="syntaxdefault">path </span><span class="syntaxkeyword">)<br /> </span><span class="syntaxdefault">origin </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">Sketchup</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">get_resource_path</span><span class="syntaxkeyword">( </span><span class="syntaxstring">'helpcontent' </span><span class="syntaxkeyword">)<br /> </span><span class="syntaxcomment"># Check if drive matches<br /> </span><span class="syntaxdefault">origin_drive </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">origin</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">match</span><span class="syntaxkeyword">( /^(</span><span class="syntaxdefault">w</span><span class="syntaxkeyword">);/ )<br /> if </span><span class="syntaxdefault">origin_drive<br /> origin_drive </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">origin_drive</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">1</span><span class="syntaxkeyword">].</span><span class="syntaxdefault">downcase<br /> end<br /> path_drive </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">path</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">match</span><span class="syntaxkeyword">( /^(</span><span class="syntaxdefault">w</span><span class="syntaxkeyword">);/ )<br /> if </span><span class="syntaxdefault">path_drive<br /> path_drive </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">path_drive</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">1</span><span class="syntaxkeyword">].</span><span class="syntaxdefault">downcase<br /> path </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">path</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">2.</span><span class="syntaxkeyword">..</span><span class="syntaxdefault">path</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">size</span><span class="syntaxkeyword">] </span><span class="syntaxcomment"># Trim drive letter<br /> </span><span class="syntaxdefault">end<br /> </span><span class="syntaxkeyword">if </span><span class="syntaxdefault">path_drive </span><span class="syntaxkeyword">&& </span><span class="syntaxdefault">origin_drive<br /> </span><span class="syntaxkeyword">return </span><span class="syntaxdefault">nil unless origin_drive </span><span class="syntaxkeyword">== </span><span class="syntaxdefault">path_drive<br /> end<br /> </span><span class="syntaxcomment"># Build relative path<br /> </span><span class="syntaxdefault">parts </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">origin</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">split</span><span class="syntaxkeyword">( </span><span class="syntaxdefault">File</span><span class="syntaxkeyword">;;</span><span class="syntaxdefault">SEPARATOR </span><span class="syntaxkeyword">).</span><span class="syntaxdefault">size<br /> path_to_root </span><span class="syntaxkeyword">= </span><span class="syntaxstring">"..#{File;;SEPARATOR}" </span><span class="syntaxkeyword">* </span><span class="syntaxdefault">parts<br /> relative_path </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">File</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">join</span><span class="syntaxkeyword">( </span><span class="syntaxdefault">path_to_root</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">path </span><span class="syntaxkeyword">)<br /> return </span><span class="syntaxdefault">relative_path<br /> end<br /></span>
-
Thanks for great plug-in.
I have tested your LLS toolbar and have few questions and suggestions.
Sometimes when I partially configure a tool settings, then I abort it because I need to select group or to make group, then I select the group, and then I select the tool - and in this moment it suddenly starts performing actions (calculations), so I must wait some time... but I wanted to configure and then to apply. It would be good to prevent this, but I don't remember which tool it were, but it sometimes happens with different tools.
Voxelate tool - did not work to me. I did not succeed to change the object when I have selected group or defined voxel.
Make recursive tool– I do not understand sense too much of this tool. If I can create groups recursivly, what is it good for? I should have posibility to regroup all groups into one level or explode them all (don’t know if SU or any plug-in supports this).
LSS Matrix observer
This one did not work to me. I created group, created clones with recursive tool and then copied the group. Then I enabled observer and made changes to one group. But the changes did not appear on the instances... Probably I did something wrong...Chaining - idea
I did a test with a simple circle shape (3D circle). I had made a structure with recursive tool which looks like chain. And my idea is, this. I would delete the faces of the chain and now what I would like to see: to have a tool, which can find intersection points, and use these points as joins of chain. Move with the chain, like it is real chain, which you can drag in any direction, you can twist with it or turn around, and so on. Maybe just to define several ways what you want to do with the model/object and where you want to go in the space. With dragging control point or mouse cursor, the chain will follow mouse cursor like a snake. It will twist, and so on… So you could create interesting structures from objects, which are connected like chain. You could probably create more wide chains (multiple chains) and then to form them into “linen” or “iron coat”…
This is the structure what I mean:
http://farm3.static.flickr.com/2352/2253469472_883ed1e28f.jpg
http://farm6.staticflickr.com/5260/5451334833_a0b40f665e.jpg
Just one more thing this would need: the object must not create new intersections, because if it would join somewhere, you could not move it like before. Then if one will finish his object, he can coat it to any surface, so maybe he will create a snake from this shape, or some cloths, armour or some different things? If you would like to deform the linen maid from chains, than you would use wider circular shape to tell it where the part should be deformed.Other tools:
“Click to activate 2 faces + path”:
You could add here these features:- color gradient
- color gradient position
- color gradient type
- color gradient curve
(similar like in Photoshop you can define type of gradient, which is linear, radial, angle, reflected and diamond) - shape curve - this curve should define the transition, the way how the transition from one shape to another will apply on model. For example - you probably use linear “curve” now. But I am not sure, because when I tested the tool, so the result seemed unbalanced to me so this curve should keep a balance to transition. So one could make a curve which top (vertex?) should be in the middle. Then the transition would be most visible in the middle of transition.
Something like this:
http://www.civitas.org.uk/wordpress/wp-content/uploads/2011/03/Laffer-curve.JPG
There is a lot of different curves. So for example with this one:
http://etc.usf.edu/clipart/35200/35204/sine_curves_35204_lg.gif
you could reverse the object to different side, and then back.
Or like this curve:
http://www.weibull.com/hotwire/issue21/ht21_1.gif
So if you would have triangle on a start, and rectangle on end, when according this curve, there would be triangle on start, rectangle in middle and triangle on end.
This is the base idea, but I did not see all tools yet, so I will write here some other ideas later. Good luck.
Coating - idea
Or maybe you could make a tool (if that one is not in your toolbar yet), which could make some object get close to another object (as close as possible) but did not join with it. It would copy shape of the object. For example. If you have 3D person, and would you like to put real clothes on him/her, which you did, then you would like the font part of clothes to copy shape of the body. Similarly, if you would have some object like a jar and you would like to put some decoration to it, so you would create the doze, create the decoration separately on a flat surface, and then you would just send/project the decoration onto the surface of the jar. By the way, why not to make tools like this, which could deform surface with an object? But this idea is maybe more related to Control points... that you could use a jar to deform surface... and possibly to leave print in the surface. -
The last few weeks I was deeply involved in the implementation of alternative user interface for Sketchup tools so I did not answer to new posts...
@driven said:
Webkit reported errors so I changed lss_common.js, just syntax
Changed show()to show_modal() for mac use.So does it mean that there is light at the end of the tunnel for mac users? I mean I lost any hope that 'LSS Toolbar' can be adapted to run on mac.
@thomthom said:
Here is a method I use that allows me to use instructor content wihtout placing the files in the SU folder.
Thomas thanks a lot I think I'll use the same method too for next update if you don't mind
Little announcement:
I just want to inform that I'm going to suspend 'LSS Toolbar' development for a while, since now I need to raise a kind of library with custom UI graphic controls for all previously made plugins/extensions. It will be an alternative to standard UI class of Sketchup API and to WebDialog class. Here is a video where it is possible to take a look at how such custom control looks like (skip to 1:08 for preview)
http://youtu.be/QLfI1McLMa0
[flash=560,315:23rrabxa]http://www.youtube.com/v/QLfI1McLMa0?version=3&hl=ru_RU[/flash:23rrabxa]
I decided to get rid of WebDialog class so all issues caused by ruby-javascript communication will be immediately solved (for example non-decimal model units issue). But since I want to keep web-dialog flexibility then standard UI class is not an option, that's why I decided to make custom UI library.@rumcajs said:
I have tested your LLS toolbar and have few questions and suggestions.
Thanks for valuable feedback and new ideas. Chaining idea is cool
Speaking of 'Coating idea', you may try 'Stick Group' tool of 'LSS Toolbar' for this purpose (not sure about clothes modelling, but it is possible to apply some flat decoration on free formed surface not high poly though...) -
@kirill2008 said:
@thomthom said:
Here is a method I use that allows me to use instructor content wihtout placing the files in the SU folder.
Thomas thanks a lot I think I'll use the same method too for next update if you don't mind
@kirill2008 said:
It will be an alternative to standard UI class of Sketchup API and to WebDialog class.
Have you seen Aerilius' libary?
http://forums.sketchucation.com/viewtopic.php?f=180&t=47605@kirill2008 said:
(for example non-decimal model units issue).
You mean comma vs period?
I always keep all data as floats and lengths - Do not convert anything until it's being presented in the UI. What you want to watch out for if you send Length objects to WebDialogs is ensuring they are sent as floats.
http://www.thomthom.net/thoughts/2012/08/dealing-with-units-in-sketchup/Very cool video - looking forward to seeing the final product.
-
@thomthom said:
@kirill2008 said:
It will be an alternative to standard UI class of Sketchup API and to WebDialog class.
Have you seen Aerilius' libary?
http://forums.sketchucation.com/viewtopic.php?f=180&t=47605No I haven't seen, unfortunately... Looks like I don't need to raise my own library
@thomthom said:
@kirill2008 said:
(for example non-decimal model units issue).
You mean comma vs period?
I mean when distance string has quote and double quote sign and "/" sign at the same time (when model units are set to feet and inches). The point is that if I send raw distance value in SU internal units (decimal inches) to web-dialog, then I need to implement 'format_length' and 'parse_length' analogs on java-script side, so I send formatted length string to web-dialog. It's OK if model units are set to decimal (no matter metric or not), but if formatted string contains quote, double-quote and "/" sign (for fractional part), then it becomes non-obvious task to send such strings back and forth...
BTW I read your blog fairly often so I read your article about dealing with units a while ago and it really helped. But the point is I didn't find any hints in it how to let user edit formatted length string in a web-dialog, then send this information from web-dialog to ruby and this appears to be the most tricky part... -
@kirill2008 said:
I mean when distance string has quote and double quote sign and "/" sign at the same time (when model units are set to feet and inches). The point is that if I send raw distance value in SU internal units (decimal inches) to web-dialog, then I need to implement 'format_length' and 'parse_length' analogs on java-script side, so I send formatted length string to web-dialog. It's OK if model units are set to decimal (no matter metric or not), but if formatted string contains quote, double-quote and "/" sign (for fractional part), then it becomes non-obvious task to send such strings back and forth...
BTW I read your blog fairly often so I read your article about dealing with units a while ago and it really helped. But the point is I didn't find any hints in it how to let user edit formatted length string in a web-dialog, then send this information from web-dialog to ruby and this appears to be the most tricky part...Escape the string before you send it to the webdialog. You can quickly do this by using the
#inspect
method of a string.Say you have a string with " or ':
string = %{10.5"}
If you pass that directly to the webdialog you will get parse errors:
webdialog.execute_script( %|javascript_function("#{string}")| )
This will be evaluated in the webdialog's javascript engine as:
javascript_function("10.5"")
- un-escaped quotes.If you make use of
#inspect
:
string = %{10.5"}.inspect
This returns the string:10.5\"
This we can use:
string = %{10.5"} webdialog.execute_script( %|javascript_function("#{string.inspect}")| )
This will be evaluated in the webdialog's javascript engine as:
javascript_function("10.5\"")
- valid!I made a wrapper for this - so I can call javascript functions such as:
webdialog.call_script( 'javascript_function', %{10.5"} )
The first argument is the javascript function - the remaining arguments (as many as you like) becomes the javascript function's arguments properly formatted with any required escape quotes. It also convertsHash
objects intoJSON
. I've also extended it to convert Geom::Point3d and Geom::Vector3d into javascript structures which can be passed back.
Thewebdialog.call_script
also returns the value the javascript function return - converting ruby values <=> javascript values.Part of TT_Lib2:
window.rb
javascript.rb
json.rb
base.js -
Stick group - I want to
performing "preliminary sticking" action while I did not set any option yet is annoying. I have to confess that I don't have enough patience to wait so long every time when I click "Stick group" icon. So this is what I really mind on this plugin and will not use it until it will be fixed in future. I suggest disable any preliminary actions, add a button into the box, where user can click to preliminary draw and see how it would look. This would be voluntary, so user needs not to click it. Don't start any action until the conf. window is open and user will start do his own clicking actions. The test which I do today was with standard sphere with 24 segments. I even wonder what machines are you running guys! -
this beta looks very good promising.. congrats!
only 2 question:- does this tools support pseudo quads?
- does it actually have a conflict with tru-paint?
thank you
-
greetings scf,
LSS toolbar, verygood tools, thanks
-
Same compliments as everyone else
This seems like a small bug that isn't in the file indicated.
traupmann
-
@kirill2008 said:
Note
- current version runs under Windows only
- some certain tools conflict with SketchyPhysics plugin
Do you have plans to make this available for Mac? If so, any idea as to how soon?
Thanks!
-
great tools, thank you so much.
-
These are some pretty amazing tools!
I'm getting an error that I'm not sure is just me. Once I start the process of Voxelizing a model, if I don't choose the voxel size first, and then the group, I get locked into a pop-up dialog that won't go away. It simply warns me how many copies of the voxel there will be, and there is no way to exit aside from killing SketchUp in the task manager.
Any thoughts on what I'm doing wrong? Thanks!
Matt
-
Hi,
I am not sure if LSS tool bar does not work for mac plattaform or I am just missing some steps during the installation but it doesn't work properly. The tool bar is displayed and everything seems ok, but it doesn't let me pick neither the forms nor the path, If I selected the two forms and the path at the same time and then I pick the tool, it kind of works because the program displays the forms that are supposed to form the model, but I am not able to apply the transformation correctly because nothing happens... An none of the other tools work also. Am I missing something here? I follow the video tutorials but nothing. I have installed the beta version, the light version, and nothing... Someone knows what to do or what's happening?
Thanks.
Pablo
-
I'd like to know if this plugins works on Sketchup Pro 2013
-
great! thanks a lot.
-
Will there be still any updates on this plugins? This is actually one of the best plugins ever made for SU...
-
@pep75 said:
Will there be still any updates on this plugins? This is actually one of the best plugins ever made for SU...
true to that.
It rivals Fredo6s collection for the first place
Advertisement