[Plugin][Code]SKMtools,Material/ImageTools
-
Please read this post about JAR files...
https://sketchucation.com/forums/viewtopic.php?p=642919#p642919
Once you are sure you have your compression tools and Java set up correctly, please retry it...If the issue continues... It might be because files are copied and written to a Temp folder, and it could be that you have not installed SketchUp properly, and thereby the Temp folder / files have incorrect permissions for reading/writing etc...
To try an resolve this, you can do the following...
Whilst logged into Windows as your usual Windows user, ensure SketchUp is closed.
Find the SketchUp installer's exe file - it's usually in your Downloads folder.
Select the exe file's icon.
Right-click > context-menu > "Run as administrator"
When prompted choose "Repair"
When it completes retry SketchUp and see if it works...If it still fails, then it might be some latent permissions issues...
Try the following...
Close SketchUp.
Find the folder:C:\Users\YOUR_USER_NAME\AppData\Local\Temp\SKMtools
This is where the needed JAR files get created.
Delete that folder.Note that folders in the AppData path are hidden by default.
If you enter the path to the Temp folder in a Windows Explorer window it should open directly...
Alternatively, copy/paste this code into the SketchUp Ruby Console and press <enter>, the Temp folder should open for you.
UI.openURL("file:///#{Sketchup.temp_dir}")
When SketchUp restarts and the tool is used, then it will remake that folder and also copy in new JAR files, which should now have proper permissions.
-
Hi TIG, the ImageTrimmer lets Sketchup crash . in both Versions SKPV17 Make and V19pro.
what am I doing wrong?
Java is installed and not linked with WinRAR etc.Thank you
-
When you say 'crash' what happens - in detail...
If you run it with the Ruby Console open - errors ?
Are there any other errors ?
Have you got a simple PNG to share to test ... -
-
Why not upload the files directly into your post ?
I'll look at them anyway...PS: the error msg only shows the end - the start is usually the most informative !
-
some forums dont provide this.
https://drive.google.com/file/d/1qW5hqkZ4SWRYDgX_Cb-E3lBvFdtl6hV_/view?usp=sharing
Error: #<TypeError: reference to deleted ComponentDefinition>
C:/Users/Dean/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins/Estimator/observers.rb:427:inentities' C:/Users/Dean/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins/Estimator/observers.rb:427:in
onComponentAdded'
C:/Users/Dean/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins/SKMtools/image_class.rb:314:inexplode' C:/Users/Dean/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins/SKMtools/image_class.rb:314:in
use_as_material'
C:/Users/Dean/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins/SKMtools/image_class.rb:599:insave_imagefile' C:/Users/Dean/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:191:in
process_image'
C:/Users/Dean/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:170:ininitialize' C:/Users/Dean/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:834:in
new'
C:/Users/Dean/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:834:in `block in <top (required)>' -
I thought I've got your PNG to trim OK.
But SketchUp crashes silently after processing all of the pixels !
I'll re-look at your PNG...It works with other PNG !
Just did this one...
-
If I flatten your PNG it works fine !
See attached...
So it must be some weird interaction of pixels ?
-
I thought it's because you have several pixels within the main image [eyes/glasses] that are transparent...
I filled them, flattened the PNG, then made the blue background the alpha-channel and it still crashes !I'm still investigating...
-
-
TIG if you want you can try this here. I have only safe the svg to the PNG in different resolutions.
-
It is something to do with some semi-transparent pixels around the eyes/glasses which mess up the outline of the form when the main transparent areas are discounted...
Try flattening the image then deleting only the main 'blue' areas around the body to add back in the transparent alpha-channel...
-
ok Thank you TIG.
and stay healthy. -
Stumped:
Deleted root level plugin folder and rb file
Downloaded fresh from Sketchucation
re-installed from extension manager
Uninstalled ALL compresssion apps
Ensured all jar files default to java
Ran 2021 installer as admin, repair
deleted SKMTools temp folderStill getting creating edges, then no dialogue box for simplify, standup, etc, like plugin used to do, processing ends, image remains png.
File is 100% alpha on image and 0% on background, confirmed in PS
TrimmedImages folder with png from SU file is generated in root folder that SU file lives in.
-
What version of SketchUp are you using? SketchUp 7 as indicated in your profile?
-
Run it with the Ruby Console open and see if there are any error messages.
Also you PNG image has not been 'optimized' there are large areas of 'blank-space' around the tree...
Ensure that only the background pixels have transparency and that the image is cropped to minimize those, to speed up processing...
What files in in the temp folder after processing ? -
Dave R, no sorry been a while since I've updated my profile, LOL. I'll update shortly
SU V20.0.391 Win 64
Machine is a gen 10 I7 desktop with RTX 3070 64GB RAM
TIG - I'll try cropping the image harder, but this is happening with images that I have had success with in the past as well. In the temp folder that comes up in model location, the only file inside is a copy of the PNG.Edit not the temp folder you were asking about... Going to run with console on then check the temp folder and get back.
-
-Ruby console-
Error: #<Errno::ENOENT: No such file or directory @ rb_sysopen - C:\Users\2atay\Desktop\TrimmedImages\Etsy_Oaxacan_rug_zapotec[Edges].dat>
C:/Users/2atay/AppData/Roaming/SketchUp/SketchUp 2021/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:277:inreadlines' C:/Users/2atay/AppData/Roaming/SketchUp/SketchUp 2021/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:277:in
make_edges'
C:/Users/2atay/AppData/Roaming/SketchUp/SketchUp 2021/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:201:inprocess_image' C:/Users/2atay/AppData/Roaming/SketchUp/SketchUp 2021/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:170:in
initialize'
C:/Users/2atay/AppData/Roaming/SketchUp/SketchUp 2021/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:834:innew' C:/Users/2atay/AppData/Roaming/SketchUp/SketchUp 2021/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:834:in
block in <top (required)>'-Temp Folder-
EdgeDetector.jar
from.ini
to.ini
the ini files are pointing to the trimmed images folder, which for this test happens to be on my desktop -
The error relating to the creation of the ..\TrimmedImages\Etsy_Oaxacan_rug_zapotec[Edges].dat file suggest several possible issues...
A possibility...
- Could you post the PNG you are using...
If that image has all of its pixels with even some transparency, then they will get ignore because they'll be regarded as 'background', so you might end up with nothing to form 'edges' - and no .dat file...
A known cause...
2. Are your .JAR file-types set to be executed [opened] in Java ?
Some compression applications can hijack that file-type, and so they try to open the file instead of letting it run as a the small Java applet [aka JAR] - vital to parse the image's pixel-data.
Check any compression app's setting for file-types and do NOT include .JAR... - Could you post the PNG you are using...
-
Hello TIG,
Your extension offers a lot of promise, and I would like to know your recommendations for trimming and using this image as stampers for an F-14D Tomcat. Thank you!
F-14D:
https://3dwarehouse.sketchup.com/model/72e1cdcb882b6993c1006ed55bc1a3fc/Grumman-F-14D-Super-TomcatStampers:
https://3dwarehouse.sketchup.com/model/691a25cbb1e7c3b420ca70e6f850f66e/Stampers-Tutoral
https://3dwarehouse.sketchup.com/model/eaa7f7401f84d2ef67939c61bbcfb315/LOGO-Star-of-LifeDecals:
https://3dwarehouse.sketchup.com/model/0804427b-632e-436b-a445-768fd47e8ab2/German-DecalsCheers Mate!
Advertisement