[Plugin] VisMap - Layer/Scene Visibility Map

[Plugin] VisMap - Layer/Scene Visibility Map

Postby MartinRinehart » Tue Sep 08, 2009 12:56 pm

SketchUp 7, PC (edit: now Mac, too). This one may be at version 1.0. That's my goal. The proof is in your feedback.

Documentation and download at http://www.martinrinehart.com/models/ru ... apdoc.html

What's a VisMap?



What are those outside checkboxes?

They turn a row or column all on with a click; all off with another click.

How big can a VisMap be?

I've tested 38 scenes by 30 layers on my 1920x1200 monitor. Bigger than that I'd need to be reducing the font size to fit more. (Scrollbars appear as needed, but are not terribly convenient.) At that size some patience is required while the map is built.

How does VisMap compare to AddHiddenLayer?

AddHiddenLayer is the tool to choose if that is exactly what you want to do: add a hidden layer. VisMap is the right tool if you want to, "Let's see. I'll add a layer and make it mostly hidden, but show it in a few scenes. Maybe make another layer visible in a couple more scenes. Maybe..." It was created by a guy who wanted to fuss with an animation until it was just right.
0
Last edited by MartinRinehart on Fri Oct 02, 2009 1:12 pm, edited 1 time in total.
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

MartinRinehart 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby EarthMover » Tue Sep 08, 2009 1:46 pm

Quite an impressive resume you have Martin....it's really nice to have you taking up the cause to better Sketchup. Pretty cool plugin you've written, should make life easier, just by seeing what layers are assigned to what scene. Great idea and great Web Dialog!
0
3D Artist at Clearstory 3D Imaging
Guide Tool at Winning With Sketchup
Content Creator at Skapeup
User avatar
EarthMover 
Premium Member
Premium Member
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby markozeta » Tue Sep 08, 2009 5:38 pm

Wonderfully simple script, but I have a request - put the layers in alphabetical order! Since this is an organizer script, it helps when you've got 30-40 layers if they're in alphabetical order. The scenes, you can rearrange but for some reason I cannot organize my layers internally.

Thanks!! :D :D
1
BSME - Cal Poly Pomona
Sketchup Pipe Maniac

markozeta 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby MartinRinehart » Tue Sep 08, 2009 5:55 pm

markozeta wrote:Wonderfully simple script, but ... put the layers in alphabetical order!


Let the voting begin.
1
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

MartinRinehart 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby Edson » Tue Sep 08, 2009 8:16 pm

this looks great. thanks, martin. i am looking forward to the mac version.
0
edson mahfuz, architect | porto alegre • brasil
http://www.mahfuz.arq.br
User avatar
Edson 
Global Moderator
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby MartinRinehart » Tue Sep 08, 2009 11:11 pm

Edson wrote:i am looking forward to the mac version.

Try the PC version. I avoided PC-specific code. It may already be a Mac version. Let me know.

Martin
0
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

MartinRinehart 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby MartinRinehart » Wed Sep 09, 2009 5:11 pm

Add to feature list:

Model integrity checker.

Tried to VisMap a broken model. Got a blank dialog box.

On digging in, found a "nil" in the list of scenes. If a model gets broken such that there is stuff other than layers and scenes in the lists of layers and scenes ...

Time, I guess, to add some bullet proofing.
0
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

MartinRinehart 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby takesh h » Wed Sep 09, 2009 5:57 pm

Hi Martin,
A tour de force. :thumb:
I tried it on OSX/SU7 and it worked beautifully. Didn't work on SU6 though (got a blank window).
The problem I saw was that it doesn't stay in front if you go to another program and come back to SU.
It just hides itself in the back of SU, for SU window is usually bigger than vizmap window.
Other than that, it worked flawlessly as if it's designed for OSX!

EDIT: I even included a couple of layers/scenes with Japanese names and it seems to have no problem displaying them.
On OSX/SU7, vismap window appears to be blank right after it's opened, resizing it or clicking on the window doesn't make the situation any better. I just had to go to another program once and come back to see it is actually working properly.
I thought it was just taking a long time to display what it should be displaying, but it doesn't seem to be the case.
1
User avatar
takesh h 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby MALAISE » Wed Sep 09, 2009 6:29 pm

Hi Martin

Very useful overview to decide which layers have to be displayed on which scenes .
I just got a strange message several times on one model ( I may upload it if needed)
Choosing OUi or NON is without effect.The vizmap leaves blank.
I hope it can help .

MALAISE :thumb:
Vismap_error.png


some translations : "Attendu" means waited
" Voulez-vous continuer à executer les scripts sur cette page : Continue to run the scripts of this page ?
" Une erreur est survenue sur le script de cette page " an error occured when running the script ...
0
La Connaissance n'a de valeur que partagée
User avatar
MALAISE 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby Edson » Wed Sep 09, 2009 6:42 pm

i tried it on OSX/SU 7 but thw vismap window appears blank no matter what i do. i opened several files but the problem remained.
0
edson mahfuz, architect | porto alegre • brasil
http://www.mahfuz.arq.br
User avatar
Edson 
Global Moderator
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby markozeta » Wed Sep 09, 2009 11:21 pm

Naming your scenes BM6.2 or MS4.8 (Which is the official name) ... will kill the program.

*Sighs*

Also another request for those with complex models is the ability to use freeze panes on the scene list and layer list.

Thanks for the work though, your script will help us put everything into layout correctly.
0
BSME - Cal Poly Pomona
Sketchup Pipe Maniac

markozeta 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby MartinRinehart » Thu Sep 10, 2009 5:09 pm

takesh h wrote:I tried it on OSX/SU7 and it worked beautifully. ... it worked flawlessly as if it's designed for OSX!


Edson wrote:i tried it on OSX/SU 7 but thw vismap window appears blank no matter what i do. i opened several files but the problem remained.


Help!

Edson, I'm adding some bullet-proofing that will, in some cases, tell you where it's failing. This may be constructive.

markozeta wrote:Naming your scenes BM6.2 or MS4.8 (Which is the official name) ... will kill the program.


Ahhhh! The sort of problem that might be solvable. Thanks.

markozeta wrote:Also another request for those with complex models is the ability to use freeze panes on the scene list and layer list.


Freeze panes? What is a freeze pane?

Martin
0
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

MartinRinehart 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby MartinRinehart » Thu Sep 10, 2009 5:13 pm

MALAISE wrote: I just got a strange message several times on one model ( I may upload it if needed) ... The vizmap leaves blank.


Yes, the model (ideally the subset that causes the problem) would be key to tracking this down.
0
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

MartinRinehart 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby MartinRinehart » Thu Sep 10, 2009 5:20 pm

takesh h wrote:vismap window appears to be blank right after it's opened, resizing it or clicking on the window doesn't make the situation any better


Working on it. Be patient. The U.S. Open is in week two, which really cuts into my free time.

Very, very odd: your screenshot shows buttons on top, icon and title on bottom, other things reversed. As a guess your appendChild() JavaScript method is appending to the front of the list while my PC appendChild() appends to the end of the list. Hmmmm.
0
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

MartinRinehart 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby Edson » Thu Sep 10, 2009 6:08 pm

please let us know when you post a modified version.
0
edson mahfuz, architect | porto alegre • brasil
http://www.mahfuz.arq.br
User avatar
Edson 
Global Moderator
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby markozeta » Thu Sep 10, 2009 7:33 pm

MartinRinehart wrote:
markozeta wrote:Also another request for those with complex models is the ability to use freeze panes on the scene list and layer list.


Freeze panes? What is a freeze pane?

Martin


Since your a Linux man, I'll quote you the OpenOffice version instead of the excel version:

http://inpics.net/tutorials/calc2/vis5.html

;)

It would help a ton, but most code that you could drop into your javascript routine would try to freeze the top and side, when you want the two sides to be frozen.
0
BSME - Cal Poly Pomona
Sketchup Pipe Maniac

markozeta 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby MartinRinehart » Thu Sep 10, 2009 7:42 pm

Edson wrote:please let us know when you post a modified version.


There is a new version now fixing a Mac issue. The strange "backwards UI" thing should now be gone.

Does this have any effect on Edson's "no UI" issue? I doubt it, but you never know.
0
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

MartinRinehart 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby Edson » Thu Sep 10, 2009 7:51 pm

MartinRinehart wrote:Does this have any effect on Edson's "no UI" issue? I doubt it, but you never know.

i am afraid there has been no change: still no UI.
0
edson mahfuz, architect | porto alegre • brasil
http://www.mahfuz.arq.br
User avatar
Edson 
Global Moderator
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby MartinRinehart » Thu Sep 10, 2009 7:58 pm

markozeta wrote:Naming your scenes BM6.2 or MS4.8 (Which is the official name) ... will kill the program.


I changed "ground_floor" and "second_floor" to "ground.floor" and "second.floor" without problem. Can you post a file? Thx.
0
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

MartinRinehart 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby markozeta » Thu Sep 10, 2009 8:47 pm

Martin,

The issue seems to be size. I could give you the model, but it's too large for these forums to post! However, as I was trying to reduce the size of the model in order to post it, when it got under 3.4 MB or so, the script worked!

The bug seems to be not in getting data, but in sending it back to the model. When I do that, I get a prompt asking me if I want to continue running scripts.

This prompt states "Error at Line 78, Char 4" of the script, and the error given was "The data area passed to a system call is too small."

Could this be an overflow error of some type?

Edit: I have 50 layers and 43 scenes, if that helps. That's a total of 2,150 check points. When deleting to fit to size, I also "purged unused", and then it worked.

Mark
0
BSME - Cal Poly Pomona
Sketchup Pipe Maniac

markozeta 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby MartinRinehart » Fri Sep 11, 2009 3:38 pm

markozeta wrote:Martin,

"Error at Line 78, Char 4" of the script, and the error given was "The data area passed to a system call is too small."

Could this be an overflow error of some type?

Edit: I have 50 layers and 43 scenes, if that helps. That's a total of 2,150 check points.


Thanks for your help!

Line 78, char 4 is the middle of a variable name. MSIE's error reporting is very near to totally worthless. It has to be SketchUp passing data to a system call, so this is a SketchUp bug. (Remember that numbers like 50, 43 and 2150 are very small numbers - though the VisMap you get probably looks huge.)

Today I am going to try to get good with one or the other of Ruby's alternative exception handlers and see if I can get enough information to pass back to the JavaScript so you get an error message that might be helpful.
0
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

MartinRinehart 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby MartinRinehart » Fri Sep 11, 2009 4:08 pm

markozeta wrote:[Freeze panes] would help a ton, but most code that you could drop into your javascript routine would try to freeze the top and side, when you want the two sides to be frozen.


OK. I'm up to speed on freeze panes. What exactly is your design?
0
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

MartinRinehart 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby MartinRinehart » Fri Sep 11, 2009 5:54 pm

I just ULd new Ruby and JavaScript.

The Ruby now traps errors in the bit of the code where I think they might happen, passes the error message on to the JavaScript. In turn, the JS uses the error message to create an error report where you were expecting the VisMap UI.

If my guess is right about the source of the trouble, there should be no more blank UIs.
0
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

MartinRinehart 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby Edson » Fri Sep 11, 2009 6:53 pm

martin,
there has been some improvement: the UI is no longer blank, as you can see, but it does not get any data from the model. i have 24 scenes and about 40 layers in this model. i am on mac (10.5.8/SU 7)
0
edson mahfuz, architect | porto alegre • brasil
http://www.mahfuz.arq.br
User avatar
Edson 
Global Moderator
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby MartinRinehart » Fri Sep 11, 2009 8:19 pm

Edson wrote:there has been some improvement: the UI is no longer blank


Beautiful!

First, I see that your scene list is on the wrong side. I can fix that. (Edit: done.) Second, it appears that there was an issue with your scene list, as it appears to have broken before/during the scene name collection process. I'll cast a wider net for breaks and see if I can get you a genuine error message. (Edit 2: also done.)

(It's rained all day. The U.S. Open is closed.)
0
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

MartinRinehart 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby Edson » Fri Sep 11, 2009 8:47 pm

martin,

i downloaded the plugin again but not only there was no improvement as we are back to the blank UI. keep trying.
0
edson mahfuz, architect | porto alegre • brasil
http://www.mahfuz.arq.br
User avatar
Edson 
Global Moderator
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby markozeta » Fri Sep 11, 2009 9:32 pm

Aha! It is a bug with overflow.

http://www.boutell.com/newfaq/misc/urllength.html states that IE can only have a URL of length 2,083 chars.

Line 78 to 82 of vismap.js states...

Code: Select all
function rubyCalled( callback_name, message ) {
   if ( (typeof message) == 'undefined' ) message = '';
   url = 'skp:' + callback_name + '@' + message;
     window.location.href = url;
}


With my example, this would request a url from internet explorer that would contain a 2,150 character string attached to an 11 character header to form a 2,161 character url - which exceeds IE's ( :puke: ) limits.

I guess the only way I could suggest fixing this is with a conversion of binary (1 for V, 0 for I), converted to ASCII, and then back on the ruby side. Ruby will be able to unpack it though, using str.unpack in ruby, but still, this will be difficult to overcome.

>.>

Not much help, sorry. :oops:
0
BSME - Cal Poly Pomona
Sketchup Pipe Maniac

markozeta 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby MartinRinehart » Fri Sep 11, 2009 11:01 pm

markozeta wrote:this would request a url from internet explorer that would contain a 2,150 character string attached to an 11 character header to form a 2,161 character url - which exceeds IE's ( :puke: ) limits.


Thanks!

I've done a lot with bit maps, so packing 16k bits into a 2k string is not a problem. But is 16k going to handle really large animations? Or should I find (they're there) a more capacious solution?

Edit: "The data area passed to a system call is too small." Remember? That's the 2k data area that IE is trying to fit 2k+ bytes into.
0
Last edited by MartinRinehart on Fri Sep 11, 2009 11:08 pm, edited 1 time in total.
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

MartinRinehart 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby MartinRinehart » Fri Sep 11, 2009 11:06 pm

Edson wrote:not only there was no improvement as we are back to the blank UI. keep trying.


This is not good. I wish I were in front of your computer. Hmmmm.

Right now I believe the smart thing is to sleep on it.

Do you know anything about Ruby or JavaScript?
0
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

MartinRinehart 
 

Re: [Plugin] VisMap - Layer/Scene Visibility Map

Postby Edson » Sat Sep 12, 2009 1:13 pm

MartinRinehart wrote:Do you know anything about Ruby or JavaScript?

very little. however, i have been able to run tests for other coders when there was any problem about running scripts on mac. but i would have to be guided for that to work.
0
edson mahfuz, architect | porto alegre • brasil
http://www.mahfuz.arq.br
User avatar
Edson 
Global Moderator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

Who is online

Users browsing this forum: No registered users and 27 guests

Visit our sponsors: