Toggle an object's colour?

I’m looking for a better way to toggle or cycle through a selection of colours for an object. I can do it with scenes and layers but I have to create a copy of the object for every colour. Is there a better way?
(I’m using Make 2016)

The method you’ve devised is probably the best solution in terms of using SketchUp Make.

Using SketchUp Pro, you could build a Dynamic Component.
The DC could provide color choices in the Components Options dialog.
Or, it could have onClick behavior that changes color when the user clicks it with the Interact tool.

1 Like

… or set “Color by Layer” to ON, and just have one object, but change it’s layer association via the Entity Info panel.

Sammy the last option, is to do a bit of Ruby scripting, and create a submenu or a toolbar that sets the selected object(s) material.

I posted an example:
[code] Set Layer Colors menu command example

It actually changes the layer colors according to their names. But it could be tweaked to change only one specific named layer color.

Or it could be tweaked to change all the selection set’s object’s colors.

Sketchup.active_model.selection.each {|o| o.material='Red' }

etc.

Thanks for the suggestions Dan and Geo.
The “Color by Layer” method works great. I select the object and and move it to a different layer via the Layers Toolbar.

This is fine as long as the object is a group or component instance.

All primitives must remain associated with “Layer0”.