[Plugin] Material_Maintenance v2.2 - 2013-01-13
-
broken again
value = 0.0 !!!=> fromUIHandler: parameter string = 73-0__vzrefreshMaterialstruefalsefalse Error: #<NoMethodError: private method
puts' called for "73-0":String>`john
-
@driven said:
broken again
value = 0.0 !!!=> fromUIHandler: parameter string = 73-0__vzrefreshMaterialstruefalsefalse Error: #<NoMethodError: private method
puts' called for "73-0":String>`john
Hi John, I suspect you have installed an older version. I have just rechecked the Material_Maintenance_thumbnail_dbg_01.rbz file (you can unzip it) and the above two puts have been commented out. You can check by looking at lines 106 and 111 in the Material_Maintenance/Material_Maintenance.rb file within the .rbz archive.
-
@myhand said:
Hi John, I suspect you have installed an older version.
I used the SU installer to overwrite the old, but probably hit 'don't trust' in the setup dialog....
fresh instal
String Time = 6.0e-06 Total Entities = 0 null/Material2_150652410.png?1 String Time = 0.012297 Total Entities = 1063 null/Material2_150652410.png?2 String Time = 0.00685
I can help debug the images if you stop the width of you generated content autoresizing. or just PM instructions of where it's set so I can get a hook in for Web Inspector to check the paths.
BTW: I and Sketchup use
./tmp/*
for temp file on mac, it's so simple....
john -
@driven said:
@myhand said:
Hi John, I suspect you have installed an older version.
I used the SU installer to overwrite the old, but probably hit 'don't trust' in the setup dialog....
fresh instal
String Time = 6.0e-06 Total Entities = 0 null/Material2_150652410.png?1 String Time = 0.012297 Total Entities = 1063 null/Material2_150652410.png?2 String Time = 0.00685
Very interesting. I will add some more trace tonight. All the way through the call stack this time.
@driven said:
@myhand said:
I can help debug the images if you stop the width of you generated content autoresizing. or just PM instructions of where it's set so I can get a hook in for Web Inspector to check the paths.
I use a JS library called qooxdoo. So I cannot just change the HTML as all the html is generated and the "container" locks it down. So I need to figure out how do it through library. I tried a few minutes to manipulate the HTML directly which did not work. Will take another look tonight.
@driven said:
@myhand said:
BTW: I and Sketchup use
./tmp/*
for temp file on mac, it's so simple....
johnIs there a reliable way to determine OS in Ruby then I can change temp directory to the above when run on a MAC?
-
my personal favourite [from SU's WebTextures]
# PC Load paths will have a ':' after the drive letter. @is_mac = ($LOAD_PATH[0][1..1] != ":")
-
@archtrot said:
Great plugin...I've needed something like this for a long time.
The labels on the UI are getting reduced, regardless of window size.
See attached image. Any idea why this is?
I'm SU8 on Windows 7.I tried to reproduce this on one of my Windows 7 machines but the labels look fine. Which version of IE are you on?
Has anyone else seen this problem?
-
@driven said:
my personal favourite [from SU's WebTextures]
# PC Load paths will have a ':' after the drive letter. @is_mac = ($LOAD_PATH[0][1..1] != ":")
Ok thanks, I will try this next but would still like to see where the current version goes wrong. Do you mind testing the attached and sending me all the output again please?
-
seems to work, but I don't really use materials much, things like 'components that use this' are coming in blank, but that may be my test models fault. want to post a good working sample skp...
tempPath = /var/folders/rp/b9k42l5x7xngx_8tckgs0zdr0000gn/T @tempDir = /var/folders/rp/b9k42l5x7xngx_8tckgs0zdr0000gn/T/material_maintenance /var/folders/rp/b9k42l5x7xngx_8tckgs0zdr0000gn/T/material_maintenance exists!!! String Time = 0.040138 Total Entities = 3291 UI => null/[Translucent_Glass_Blue] copy_147939200.png?1 String Time = 0.053043 Total Entities = 3291 UI => null/[Translucent_Glass_Blue] copy_148426790.png?4
I also did a test and the images show in SU using set html and that path, there very small though...
> dlg2 = UI;;WebDialog.new("it works again2", true,"img", 250, 250, 400, 150, true); dlg2.set_html(%q(<img src="file;////private/var/folders/rp/b9k42l5x7xngx_8tckgs0zdr0000gn/T/material_maintenance/Cladding_Siding_White_148435700.png" alt="test image" title="my test2" >)) dlg2.show_modal true
also I should be promoting the Boolean darwin version check
# this is mac only! if( !( RUBY_PLATFORM =~ /darwin/i) ) UI.messagebox("This code is for Mac only!")
but which ever you choose add
.show_modal
as one off you mac conditionals... -
@myhand said:
Ok thanks, I will try this next but would still like to see where the current version goes wrong. Do you mind testing the attached and sending me all the output again please?
Myhand,
Here is the ruby console output on launch of your latest MM_debug ruby:
tempPath = /var/folders/jt/x_n2z5n109n9v_qfj562bsc87bn_mb/T
@tempDir = /var/folders/jt/x_n2z5n109n9v_qfj562bsc87bn_mb/T/material_maintenance
/var/folders/jt/x_n2z5n109n9v_qfj562bsc87bn_mb/T/material_maintenance exists!!!
String Time = 4.0e-06
Total Entities = 0
UI => null/jean blue_173796570.png?1Here is the output after Component option=checked + RE-LOAD Materials section
String Time = 0.006283
Total Entities = 485
UI => null/jean blue_173786390.png?2Here is the output after a material from list is selected and List Components Containing Selected Materials is activated
UI => Temp dir = null
I hope this helpsCMD
-
@driven said:
but which ever you choose add
.show_modal
as one off you mac conditionals...Are you sugesting I make the WebDialog modal? I have not set it as modal as I keep it open while working in the model. I flip between the model and the dialog often while cleaning up a model.
-
@myhand said:
Are you sugesting I make the WebDialog modal?
modal is different on a mac. lots of reference available via search
but you'll want a conditional for mac
if mac dlg.show_modal else show end
then it doesn't vanish on us...
john -
@driven said:
@myhand said:
Are you sugesting I make the WebDialog modal?
modal is different on a mac. lots of reference available via search
but you'll want a conditional for mac
if mac dlg.show_modal else show end
then it doesn't vanish on us...
johnOK thanks John. Will add it to the next bugfix release. Hopefully soon, if we can get the thumb problem sorted!
-
Clear | Hide 008398 Trying to load the following thumbnail files; 008398 null/$Irr Cache_147979500.png?2 008399 null/$Light Sprite_147980200.png?2 008400 null/¶CorrogateShiny¶_147979050.png?2 008401 null/¶DarkGreen¶_147977630.png?2 008402 null/¶DarkOrange¶_147977780.png?2 008403 null/¶White¶_147979200.png?2 008404 null/Material1_147979350.png?2 008404 null/Material2_147978860.png?2 008405 null/Material3_147978680.png?2 008406 null/Material4_147978530.png?2 008407 null/Material5_147978380.png?2 008408 null/Textile_Wheat_147978230.png?2 008408 null/Vegetation_Bark_Walnut_147977440.png?2 008409 null/Wood_Cherry_147978080.png?2 008409 null/Wood_Deck_147977930.png?2 008453 qx.ui.basic.Image[889-0]; Image could not be loaded; null/Vegetation_Bark_Walnut_147977440.png?2 008453 qx.ui.basic.Image[889-0]; Image could not be loaded; null/Vegetation_Bark_Walnut_147977440.png?2 008453 qx.ui.basic.Image[1029-0]; Image could not be loaded; null/Vegetation_Bark_Walnut_147977440.png?2 008453 qx.ui.basic.Image[1029-0]; Image could not be loaded; null/Vegetation_Bark_Walnut_147977440.png?2 008453 qx.ui.basic.Image[899-0]; Image could not be loaded; null/Wood_Deck_147977930.png?2 008453 qx.ui.basic.Image[899-0]; Image could not be loaded; null/Wood_Deck_147977930.png?2 008454 qx.ui.basic.Image[1049-0]; Image could not be loaded; null/Wood_Deck_147977930.png?2 008454 qx.ui.basic.Image[1049-0]; Image could not be loaded; null/Wood_Deck_147977930.png?2 008454 qx.ui.basic.Image[909-0]; Image could not be loaded; null/$Irr Cache_147979500.png?2 008454 qx.ui.basic.Image[909-0]; Image could not be loaded; null/$Irr Cache_147979500.png?2 008454 qx.ui.basic.Image[919-0]; Image could not be loaded; null/$Light Sprite_147980200.png?2 008454 qx.ui.basic.Image[919-0]; Image could not be loaded; null/$Light Sprite_147980200.png?2 008455 qx.ui.basic.Image[929-0]; Image could not be loaded; null/¶CorrogateShiny¶_147979050.png?2 008455 qx.ui.basic.Image[929-0]; Image could not be loaded; null/¶CorrogateShiny¶_147979050.png?2 008455 qx.ui.basic.Image[939-0]; Image could not be loaded; null/¶DarkGreen¶_147977630.png?2 008455 qx.ui.basic.Image[939-0]; Image could not be loaded; null/¶DarkGreen¶_147977630.png?2 008455 qx.ui.basic.Image[949-0]; Image could not be loaded; null/¶DarkOrange¶_147977780.png?2 008455 qx.ui.basic.Image[949-0]; Image could not be loaded; null/¶DarkOrange¶_147977780.png?2 008455 qx.ui.basic.Image[959-0]; Image could not be loaded; null/¶White¶_147979200.png?2 008455 qx.ui.basic.Image[959-0]; Image could not be loaded; null/¶White¶_147979200.png?2 008455 qx.ui.basic.Image[969-0]; Image could not be loaded; null/Material1_147979350.png?2 008455 qx.ui.basic.Image[969-0]; Image could not be loaded; null/Material1_147979350.png?2 008455 qx.ui.basic.Image[979-0]; Image could not be loaded; null/Material2_147978860.png?2 008455 qx.ui.basic.Image[979-0]; Image could not be loaded; null/Material2_147978860.png?2 008455 qx.ui.basic.Image[989-0]; Image could not be loaded; null/Material3_147978680.png?2 008455 qx.ui.basic.Image[989-0]; Image could not be loaded; null/Material3_147978680.png?2 008455 qx.ui.basic.Image[999-0]; Image could not be loaded; null/Material4_147978530.png?2 008455 qx.ui.basic.Image[999-0]; Image could not be loaded; null/Material4_147978530.png?2 008455 qx.ui.basic.Image[1009-0]; Image could not be loaded; null/Material5_147978380.png?2 008455 qx.ui.basic.Image[1009-0]; Image could not be loaded; null/Material5_147978380.png?2 008456 qx.ui.basic.Image[1019-0]; Image could not be loaded; null/Textile_Wheat_147978230.png?2 008456 qx.ui.basic.Image[1019-0]; Image could not be loaded; null/Textile_Wheat_147978230.png?2 008456 qx.ui.basic.Image[1039-0]; Image could not be loaded; null/Wood_Cherry_147978080.png?2 008456 qx.ui.basic.Image[1039-0]; Image could not be loaded; null/Wood_Cherry_147978080.png?2
tempPath = /var/folders/rp/b9k42l5x7xngx_8tckgs0zdr0000gn/T @tempDir = /var/folders/rp/b9k42l5x7xngx_8tckgs0zdr0000gn/T/material_maintenance /var/folders/rp/b9k42l5x7xngx_8tckgs0zdr0000gn/T/material_maintenance exists!!! String Time = 6.0e-06 Total Entities = 0 String Time = 0.00061 Total Entities = 37
-
this does show the image even with you odd ending...
dlg2 = UI;;WebDialog.new("it works again2", true,"img", 250, 250, 400, 150, true); dlg2.set_html(%q(<img src="file;////private/var/folders/rp/b9k42l5x7xngx_8tckgs0zdr0000gn/T/material_maintenance/Vegetation_Bark_Walnut_147977440.png" alt="test image" title="my test2" >)) dlg2.show_modal
-
@driven said:
this does show the image even with you odd ending...
dlg2 = UI;;WebDialog.new("it works again2", true,"img", 250, 250, 400, 150, true); > dlg2.set_html(%q(<img src="file;////private/var/folders/rp/b9k42l5x7xngx_8tckgs0zdr0000gn/T/material_maintenance/Vegetation_Bark_Walnut_147977440.png" alt="test image" title="my test2" >)) > dlg2.show_modal
yea I am pretty sure it is not the encoding, though I will fix that once we have the path sorted. Basically the temp path is not passed to JS. This path is passed as part of the startup sequence, which does not appear to run.
-
@driven said:
tempPath = /var/folders/rp/b9k42l5x7xngx_8tckgs0zdr0000gn/T @tempDir = /var/folders/rp/b9k42l5x7xngx_8tckgs0zdr0000gn/T/material_maintenance /var/folders/rp/b9k42l5x7xngx_8tckgs0zdr0000gn/T/material_maintenance exists!!! Total Entities = 0
Somehow the getSystemParameters method does not make it to Ruby... I have sent you a PM with another version to test if you don't mind. Probably better to take the debuging off-thread.
-
might be a good idea to remove the spare rb files, I'll delete some posts as well, john
-
@cmd said:
tempPath = /var/folders/jt/x_n2z5n109n9v_qfj562bsc87bn_mb/T
@tempDir = /var/folders/jt/x_n2z5n109n9v_qfj562bsc87bn_mb/T/material_maintenance
/var/folders/jt/x_n2z5n109n9v_qfj562bsc87bn_mb/T/material_maintenance exists!!!
String Time = 4.0e-06
Total Entities = 0
UI => null/jean blue_173796570.png?1Here is the output after a material from list is selected and List Components Containing CMD
I was expecting more trace statements so I have a hunch that this might have to do with my lazy loading the tempdir. This means that I have a situation where I am calling from JS to Ruby, to JS, back to Ruby and then back into JS all in one call. This works in Windows, but there might be a threading/race condition issue on the MAC.
I have now re-written this part of the code and also enabled tracing directly in the JavaScript side.
Can you please test again and send me the output (it might even just work now).
This time though you need to do an extra step to capture the trace in the WebDialog. Once the dialog is open and has focus, press the F7 key, this will bring up a console window which will contain client side trace. See screenshot.
Please send me both the JS and Ruby console output.
-
You are using
.set_html()
This is known to be broken on recent MAC versions [Safari]...
http://sketchucation.com/forums/viewtopic.php?f=180&t=49338&p=443684#p443684
So it's time to recode that part so it becomes MAC friendly... -
@tig said:
You are using
.set_html()
This is known to be broken on recent MAC versions [Safari]...
...@Tig,
I'm the one using.set_html
on my mac, to test his image paths, because it does work on recent MAC versions, btw... Safari is only an indicator of 'next' the 'WebKit' version to be used by WebDialogs, it's always different and a step ahead.
I can only find one release of 'WebKit' where.set_html()
fails, a 'WebKit' version sniffer would be more appropriate for a single release.
john
Advertisement