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 - SketchUp Tutorial
From the course: SketchUp Pro: Dynamic Components
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Add position and size attributes7m 34s
-
(Locked)
Add a user interface for custom shelf attributes3m 46s
-
(Locked)
Implement logic to copy shelves5m 20s
-
(Locked)
Create and nest a swatch component5m 25s
-
(Locked)
Cycle materials by clicking on a component4m
-
(Locked)
Correct texture coordinates in components5m 21s
-
(Locked)
-
-
-
-
-