From the course: SketchUp Pro: Dynamic Components

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Cycle materials by clicking on a component

Cycle materials by clicking on a component - SketchUp Tutorial

From the course: SketchUp Pro: Dynamic Components

Start my 1-month free trial

Cycle materials by clicking on a component

- [Instructor] Now that we have the swatches as part of our dynamic component, it's time to add a pair of attributes that will allow us to cycle through the materials using the interact tool. And we'll add them here. I'll begin by adding the material behavior. And I'm going to specify the material that's assigned to this component as equal to, quote, Wood Cherry Original. And there it is. And so we're able to type in the name of the material, and it will just appear on the component. Now, I would like to swap that material without having to type in its name every time. So we can do that by adding an additional attribute that is called ONCLICK. And that's also classified as a behavior. So ONCLICK is going to have a function, and functions don't have assignments with equals. Instead, you can see a list of functions up here on this tab if you like, and there's a long list of them up here. The function I'm interested in is called SET, and it's somewhere in this list. Right here. The…

Contents