You are now editing multiple components
-
Has anyone else with a bit more ruby experience than me had a chance to tinker with the sketchyphysics model I linked to (above) and worked out how it modifies the watermark in real time depending on user's inputs? Is it something to do with the sketchyphysics runtime (requires sketchyphysics running?) or could it be applied to our current problem?
-
Perhaps it directly manipulates an external watermark image file ?
-
I don't know how this works but as far as I can tell this is the line that controls it:
logLine "mode;" + @@hokou.to_s
Have poked around the documentation but I'm not really sure what logLine does
-
it looks like a method call
-
Any use for the problem we have here?
-
I do not have the SketchyPhysics code downloaded, so I cannot look at it.
-
@dan rathbun said:
Perhaps it directly manipulates an external watermark image file ?
Interesting - just stumbled over this thread as I was wanting to do something similar - a constant tally of faces in the corner, as I'm working on some models where minimal poly count is critical.
I did a text search through the SketchyPhysics .rb files to see how they did it, and found an 'addWatermarkText' method.
Seems it's not a watermark at all, but a 'face-me' text component, loaded from a support folder, and placed using 'pickray' to find it a consistent location on screen.
Presumably this means that it has its position transformed whenever the view is orbited etc., though I didn't have the patience to go looking through all of the files for the method calls. -
Awesome sleuthing!
-
@trogluddite said:
I did a text search through the SketchyPhysics .rb files to see how they did it, and found an 'addWatermarkText' method.
Seems it's not a watermark at all, but a 'face-me' text component, ...
This is how I am currently doing it (in (WIP) Edit Mode Warning Flag v1.1.0,) using:
model.add_note(@note,@x,@y)
This above method creates a special viewport-based "face camera"Sketchup::Text
object.@trogluddite said:
..., and placed using 'pickray' to find it a consistent location on screen.
Presumably this means that it has its position transformed whenever the view is orbited etc., ...The view-based Text object does this automatically, but the x and y are percentages, so it can handle viewport resizing better.
But the main drawback is that using a Drawingelement always modifies any model file opened.
I CAN make a transparent window or WebDialog on PC. John (Driven) already has done work on this for the Mac.
-
Do we have any more options with the advent of SU 2013?
What can I do to help move this forward as I'm struggling with some of the documentation again - is there a way I can use pickray to position the note in the current version more accurately?
Dan, what is involved in getting the transparent window or WebDialog working?
-
I'm trying to modify Dan's script to make this a little more lightweight and to see if I can make a UI.messagebox appear whenever I'm editing multiple components as I seem to not notice the current notification in its current form.
First thing, can't we chop out anything referring to groups as groups won't modify other groups that are derived from them? Like this:
if inst.is_a?(Sketchup;;Group) parent = inst.entities.parent num = parent.count_instances text = "Editing #{num} group instances" puts(text) if debug
That would also save the editpath query thingamajig from having a second "if" function in it (I think)
Also, in order to get the UI.messagebox I'm trying to add in something like this:
parent = inst.definition num = parent.count_instances puts {UI.messagebox("Editing #{num} component instances")} if debug
But that keeps breaking the script....
I feel like this should be really simple and it probably is - can someone point out how I'm misusing UI.messagebox?
-
messageboxes are modal (and it will suck to have to manually click a button each time you are editing multiple components.
-
@ashscott said:
Do we have any more options with the advent of SU 2013?
NO.. they did not update the API much at all.
-
@ashscott said:
Dan, what is involved in getting the transparent window or WebDialog working?
I would do the WebDialog first (as the transparent window would be only MSWIN.)
BUT... per new policy... I am no longer doing ANY free development.
Sorry guys.. but I got sick and NEED income.
-
Hi all,
We got this plugin up and running in a really functional way.
It has improved my workflow in SU immensely as I can now work with multiple component instances (using components to their full potential) without the fear of editing a bunch of components accidentally.
Would love your feedback and any bug reports on this.
Big shoutout to Dan Rathburn - He coded this and I highly recommend his work.
-
Ash please start a proper thread for this plugin in the "Plugins" forum, and we can then add a link from this "beta" topic to IT.
-
The final product and discussion is now available over here: http://sketchucation.com/forums/viewtopic.php?f=323&t=54082
Advertisement