MAC SketchUp Materials browser does not delete materials list from Materials Folder: List -> Remove does not work

photo_textures

#1

Using SketchUp Pro 2018 release 18.1.1180 on a MAC running High Sierra, release 10.13.6.
I didn’t see this from a search of topics.

Summary:
The feature List -> Remove in the MAC materials window does not function. To remove a material collection, User must go outside SketchUp, using Finder. Using List->Remove only temporarily removes the selection from the scroll list of materials collections. The actual material folder of the collection is not deleted in the SketchUp material folder location.

Test Case:

  1. Open the materials window
  2. Select In Model , the list name is Colors in Model
  3. If this is a new SketchUp file, create some materials to be in the model by placing onto faces of a cube as an example.
  4. Create a new collection by selecting the dropdown List->Duplicate. Accept the default collection name Colors in Model Copy by clicking OK.
  5. Click the house icon to go back to Colors in Model. Scroll thru the materials list to verify Colors in Model Copy is on the list. Choose the selection Colors in Model Copy again.
  6. From the dropdown select List->Remove. When the pop up appears asking if you want to remove Colors in Model Copy from the list of collections, click Remove.
  7. Scroll thru the materials list again to verify Colors in Model Copy is no longer on the list.
  8. Save the file, quit SketchUp application.
  9. View the materials folder :
    /Users/username/Library/Application Support/SketchUp 2018/SketchUp/Materials/Colors In Model copy

Note that Colors in Model Copy is still in the Materials folder even though inside the SketchUp application it appeared removed from the material collections list of the materials window.

  1. Open SketchUp again, open the material window, scroll the list: Colors in Model Copy appears on the material collection list again.

Zaz1


#2

isn’t a folder full of skm’s, it is a List of the ‘actual’ colours in your model…

try a different name to see that it works…

john


#3

John,
Not sure what you mean by
isn’t a folder of skms.?
(see below screenshot part of my test case)
The List>Remove should remove the material list folder which contains a material collection. The folder contains the saved list of skm files (aka a material collection). I just used the simple example with a model and a six sided cube each with one color per face. The test case I described will yield the same results if I try to remove any named materials list (collection) using List -> Remove. These are user created material lists. I am not trying to remove one of the native SketchUp material collections.
I can use any name when the material list is created but using the List -> Remove only removes the name of the list temporarily for that SU session. The folder of that named list is not removed from the location:
/Users/username/Library/Application Support/SketchUp 2018/SketchUp/Materials/
Since the folder wasn’t actually removed when List -> Remove was performed, the same material list (collection) will appear again when SU is reopened.
The user has to manually manage the removal outside of SketchUp.

Screen Shot 2018-11-25 at 9.01.13 AM.png

This is the feature description of List -> Remove
https://help.sketchup.com/cs/sketchup/adding-colors-and-textures-materials

Screen Shot 2018-11-25 at 9.47.11 AM.png


#4

This is intended behavior. When you create a specific materials set and save it, it created a folder in your user library as you’ve shown. This is useful for when you reference the same set of materials over and over from model to model over the course of time. It allows one to load a set of materials into any model.

If you’re working on a model and you delete the materials, they are deleted from the model and can save space. But they aren’t deleted from the user folder outside sketchup because then they wouldn’t be available ever again.

Therefore, if you don’t want to use those materials in your model, delete them and go on your way. You’re safe knowing they’re waiting as a collection for another time. If instead you want them removed forever, yes you have to manually delete the folder. Or you can overwrite it.


#5

YES: sorry your right and I didn’t read your text closely enough…

it’s an old bug that I thought had been fixed…

I remove them with ruby code so haven’t noticed it wasn’t…

@monospaced, even if useful [once you know], it is still a bug if the behaviour differs from the windoze version…

john


#6

Thanks for both your responses.
@monospaced, very good description. So its by design as a safety feature so one doesn’t permanently loose a material collection.

Maybe, but I interpreted the List>Remove as material collection management tool provided within the application. I want to remove a created collection within SketchUp using the material window, regardless of wether any of the materials in that collection are currently used in the model.

Inside SketchUp it provides a pop up warning when you do List > Remove . Usually thats an indication something permanent is about to happen. Also, as I noted, if you remove a collection in one SU session, you wouldn’t expect it to appear when you open a new one.

Just trying to work through my understanding of the MAC materials window which for me is the achilles heal of SketchUp. For now I will workaround this beahvior and permanently remove the collection in Finder. As John noted, maybe this works differently on a Windows machine, and if it does, then it would be a bug not a feature.
43%20AM Screen Shot 2018-11-25 at 11.13.43 AM.png

Zaz1


#7

Interesting. If you really do find yourself doing this often on a Mac, perhaps you might not need to create the lists in the first place. You might just create and apply materials normally in each model if you don’t need that particular set in the future. Just an idea. :slight_smile:


#8

I’ve been noticing some other strange behavior in SketchUp 18 Pro with respect to Materials on the Mac. If I create a new List and add a new Material, it creates the folder and the skm file. If I try to remove the list (as described by the OP) or the material, they disappear from the UI, but they are not removed from finder and they come back on the next startup. If “New Texture” CREATES the file/folder, then “Remove” should DELETE the file/folder. I also find that it is not renaming existing materials in a custom list. I can edit the material and change the name in the panel, but the filename doesn’t change, and the material with the same name appears on the next startup IN ADDITION TO the old name. All of these behaviors sound like something is failing while trying to delete a file and or a folder.


#9

I’m also finding that when I colorize a material, it takes affect for the current session and I can use it in the model, but on the next startup, the new material appears, but the color has been reset to the original. Oddly, opening the skm file (a zip file) I see the xml colorizing with the right RGB values and colorize set to 1.


#10

@dvhart The above is exactly what I tried to describe. I believe the List>Remove should allow the user to delete any user created material collection from the list. It is perfectly valid to keep users from deleting the SketchUp supplied (native) material collections but the user created ones should be able to be removed within SU.

You can invoke the Apple Color Picker (aka Color Window) outside of SketchUp. If you are inside Apple Mail, just type shift CMD C. The SU Materials Window is based on this and looks similar except for the brick icon.

Using the Apple Color Picker, you can create a custom color list (a color collection). When you want to remove it, a warning is displayed and the list is removed from the Home / Library / Colors folder, as .clr files. This works correctly and there is no need to manually delete files. If I try to remove one of the Apple built in color lists, like the Apple list, the remove item is gray on the drop down list so the user can’t remove it. For consistency, that is how I would expect SU to operate when user tries to List>Remove built in and user created material collections.

Notice any user created color collection lists made in Apple Color Picker also appear when the SketchUp Material Window is opened inside SketchUp. You can open and apply the colors from these collections inside SU, but you can’t remove them. That can only be done when the Apple Color Picker is opened (outside SU).

I have also seen the above, sometimes, with the additional file added to the old name on the list.
The name inside SU looks changed when mouse is hovered over it.
I close SU and look at the folder of my custom material collection in Finder and I see the old named file plus the one with new name. I don’t see it every time. Sometimes I don’t see any new file added.
However, when SU is reopened, I always see only the old name on the list.

Based on the behavior above, if I need to change the name of the material, best to do this and edit it while Colors in Model is selected, then using the color wells, move it to the custom
collection and delete the old named material from the list.

Yes I see this when I do the following:

  1. While Colors in Model is selected, I edit the material and change the name and the color.
  2. Select that material as active and move the Swatch into a color well.
  3. Open the custom collection that had the original material (before the name and color changes)
  4. Drag the changed material from the color well into the custom collection.
  5. Select and Remove the original material.
  6. Now the collection only has the newly named and colored version of this material.
  7. Close the Material Window, Save and close SU.
  8. Look at the custom material collection in Finder: The original material skm is still there and the edited version is also there with the new name and the new color (I just viewed the color by looking at the preview thumbnail- when that is working).
  9. Open SU again, and open the previously saved file.
  1. Open the Materials Window. Scroll to the custom collection under test.
  2. I observe the original material and a new version with the name changed but not the color changed.

How is one supposed to make a color change to an existing material in a custom color collection ?
Does this have to be done outside SketchUp using a photo editor. ?


#11

This part at least did used to work. I have existing custom color lists with several colorized materials (lap siding with various client color options for example). So at one point in the past I was able to make the colorization stick.

I’m running OS X Mojave (10.14.1) with SKetchUp Pro 2018 (18.0.16976), but I also just tested with SketchUp Make 2017 (17.3.116) and observe the same behavior on all points in this thread. How does this compare to your setup @zaz1?

I also attempted this with all extensions disabled with no change in behavior. I’ll attempt this on another Mac this evening to see if it possibly has something to do with this specific machine.


#12

There was a maintenance release of SketchUp Pro 2018 to account for some issues from Mojave. If you download a fresh installer from Trimble you will get this version. I don’t know whether it will fix the specific problems you are seeing, but it’s worth a try anyway.


#13

@dvhart,
I’m running SU Pro2018 Version 18.1.1180 . Thats the latest release with a couple of changes to support Mojave. With Mojave, they removed the Coverflow view in Finder which I find very useful. So I’m still running High Sierra, v10.13.6.
May be best for you to upgrade to SU Pro2018 Version 18.1.1180.

After I wrote my last reply, I am seeing something else very odd with materials window. With SU closed, if I use Finder to change the name of some existing material files in one of my custom material collection folders and then re-open SU, open materials window, scroll to the same collection, I don’t see the material name changes. Thats bizzaro.
How does SketchUp still see the old names and not the new names applied to the files in my custom materials collection folder ?
Can you possible try this ? Maybe make a backup of your folder before changing names so you can revert to your original names.


#14

A SketchUp material file (.skm) is actually a zipped archive containing several files. The document.xml file contains the name of the material as displayed by SketchUp (among other things). By default, it is the same as the file name, but this is not required and editing the file name won’t change this internal material name.


#15

@slbaumgartner,
OK so I understand its a zipped archive not a file.
So when I have in my custom material folder collection, BRICKS, an item named bk1.skm. Using Finder, I edit the the name to brick1.skm. I then open SketchUp materials window, it shows the material name is still named bk1 , because inside SketchUp it is actually seeing bk1.xml which is embedded in the zipped archive which I renamed as brick1.skm.

So I try a workaround to rename. I use the material window, open my BRICKs collection which has ten materials: bk1, bk2, bk3…bk10. I edit each one enter the new name, hit return, close the edit. One at a time I change the names to brick1, brick2…brick10. I hover the mouse over the material thumbnail and see each one changed to brick1 to brick10. Looks good.

Now I exit SketchUp and look at the BRICKS folder in Finder. It now contains 20 items:
bk1.skm thru bk10.skm and brick1.skm thru brick10.skm.
(If I reopen SketchUp at this point I am going to see all 20 materials in the BRICKS collection)
So in Finder, I delete bk1.skm thru bk10.skm leaving just the new named brick1.skm thru brick10.skm.

I reopen SketchUp and look at the material collection, BRICKs, and see only the renamed materials brick1 to brick10.

Is there any easier way to do this ?

Zaz1


#16

depends on if you ever use Ruby Console…

the name SU uses isn’t filename, but the name stored in the doc.xml…

with a ruby script you can either rewrite the xml to match the filename or simply extract the image and let SU make a new sim with whatever name you want…

I have posted a number of scripts for ‘fixing’ sky’s over the years…

this is only one of the ways they can seem to be be broken…

IMHO: the format was flawed from the start and imposed on us so rendering extensions that wanted to add hidden info in materials could…

john


#17

@john_drivenupthewall,

Yes, no sooner did I send my reply with what I thought was a workaround, the workaround no longer works. If I try the same methods, I can’t rename the brick1…brick10 again using the materials window.
Dealing with the issues in the mac material browser are frustrating and time consuming. All I want to do is reliably change the name of a material.

john, can you provide one of your scripts or point me to a previous post on fixing SKMs ?
While I don’t understand Ruby, I am fine with pasting a script into the Ruby Console.
Is there a way to use terminal window and vi editor to edit the xml file (assuming one can locate the xml file) ?

Zaz1


#18

if you unzip the .skm, I use ‘The Unarchiver.app’ with .skm set as an always open with type,

you can edit the .xml files with Text Editin plain text mode [ although I use BBEdit ] …

I’m trying to work out what’s failing , before I’ll post any new code…

it seems the internal names are not being updated correctly, but neither is the ref image…

the Thumbnail does get updated, so it’s not a permissions issue…

I’m wondering if the change from braces to underscores [which happens if you don’t completely change the name] is breaking the save…

or something else, this time…

john


#19

@john_drivenupthewall,
Thanks for the update. I unzipped one of the items brick1.skm with the Unarchiver.app.
Then I opened the folder brick1 and, using TextWrangler, I edited the file document.xml to change the name brick1 to newest_brick1 and saved the file.
Do I need to rearchive the brick1 folder back into an skm format and name it newest_brick1.skm ?
How do I do that ?

Zaz1


#20

Compress and rename in Finder, may work…

I have used unzip from Terminal but I changed most my snippets to ruby for cross platform use …

I’ll see if I can find some old code…

john