Attributes and Scenes synchronization


Is there a way to set a scene with some active attibute set on and other scene with that same attibute set off?

Example: Scene 1 with the door opened and Scene 2 with the same the door closed.


Proper Animation Plugin for SketchUp

I was planning to ask the same question too.


there are a few threads on animating Dynamic Components on Scene change…

you do need a plugin and there’s an ongoing discussion on updating the old example script…



This is not a simple change of attribute. This is a change in object orientation (aka transformation.)

To do this now, you need two copies of the component. Each on it’s own layer. It is easiest to name the layer, the same as the scene name. On one of scene layers, the door is closed, on the other the copy is open.
For each scene the “opposite” scene’s layer is off.

So, on the “Door Open” scene, the “Door Open” layer is ON, and the “Door Closed” layer is OFF. It is opposite for the “Door Closed” scene.

Re, scene change aware components, there are issues with the current native animation loop, and loops exported to video files. I’ll need to program custom loop code, and Ruby-ize a video file access library.
Still working on plans for this.


@DanRathbun, do you mean it’s actually possible to achieve such animation? I did everything as you said but when I swap scenes, the doors just plainly change from open to closed. Is this normal behaviour for what you said or have I missed something?


Yes, that is how it must be done now (with static components.)

Or if it is a Dynamic Component, and has a “onClick” behavior you can manually click on it with the InteractTool (from the DynamicComponents toolbar.)

In order to actually animate the door swinging open slowly, requires a custom coded animation loop, or a complex animation extension engine. Do a search in ExtensionWarehouse, or SketchUcation plugin store for professional animation extensions.


Oh ok. I do have an OnClick behaviour set on the door. I thought what you said, would synchronize the scene transition and the animation. Seems, we’ll have to use plugins for now. But thanks anyway! :thumbsup:


Not the native feature as it is currently implemented. But I am planning to write a custom animation loop that will honor some behavior changes like Material, etc. I have not yet thought too deep into folding in the OnClick animate behaviors.


LightUp has the ability to trigger ‘on Click’ behaviours and I thought @AdamB had posted a snippet somewhere?

but maybe not…



It’s OK I’ve long ago figured out how to do it on my own, and have the code somewhere. Just never felt that it should be published because the DC extension is proprietary.


I was looking for an adivice like a trick or something like that, something simple!

The layers’ adivice doesn’t seems to be the best thing to do because the file will have twice the number of items (doors/shelves/windons/…)

But anyway, thank you!!


I know. It will bloat the model with copies. This is why I have been working on the prototypes for Scene Aware Components for at least a year now (on and off.) This is the first burst of constructive feedback I have gotten, since I started.

So,… in the latest version of my extension, changes can occur at the end of scene transition. Such as change of material, or change of visibility (make one sub-component hidden and another visible.) I also suppose you could have a door position change based upon the scene_number, scene_name or scene_label. Anything that can change based upon a re-calculation caused by a DC redraw.

Do you guys want to have a scene_animate attribute, that plays from the 1st transition frame to the end of transition ? (Basically it would have the same rules as the OnClick behavior attribute, but would play during the scene transition.)
So, imagine one scene in a room, facing a closed door. The next scene is at the threshold of the door. As the animation transitions to the second scene, the door component is animated to open, and then the next scene is within the next room, so the animation “walks” through the now open door.


If you can make something like that, it would be a great contribution to SketchUp, wouldn’t it? I’d like to give it a try! I’m not familiar with coding and similar stuff like that but I thought about it for a while and as I understand, the Transition time of the scenes and the door opening/closing animation time should be equal, in order for it to work, right?


First, keep in mind that the native SketchUp animation is basically a preview for the video export feature, and does not honor behavior changes, by design. (Except there is a “variance” at this time that it does show “hidden” DC behaviors but not export them. I expect this to be fixed so that display animation matches file video export.)

So, … the native settings for transition time and scene delay, do not, or will not apply to the extension.

The extension MUST have it’s own animation loop, it’s own video file exporter, and therefore will have it’s own settings.

It will not NEED to be subject to the same limitations as the native animator, nor exporter. For example, the API scene page class actually has individual transition time and delay time properties. The global time settings are just for the quick and dirty native “preview” animation.

That would be one easy way to set up a door opening transition. The camera does not even need to actually move during the transition. (But of course I’d still need to write out frames while the door is swinging.) It should be up to the modeler if the camera shifts during the transition.

I also need to be sure (somehow) that only DCs in view, that need to be animating, animate. Also, the DC attributes need to tell the extension on which scene(s) to start animation, and which to end, and possible which animation to run (opening or closing.) Or, maybe the animate functions are just numbered, ie “scene_animate_task_3”= “4,5,scene_animation_1”, with the actual animate function in attribute “scene_animation_1” (which can be reused for other tasks later in the animation loop.)
So if “scene_animation_1” is the door opening, the extension would run the animation between scene number 4 and 5. Inserting scenes can get the numbers out of whack, so those first two parameters should also accept scene name.



Here is a simple example using Dynamic Components animating in LightUp.

A cool feature of LightUp is that when you export your lit model to Android and iOS players, you get the Dynamic Components too.


Oh wow! Can you export a video with opening/closing doors? Like, when the camera approaches the door it automatically opens. That video reminded me of this one:
It’s a bit off topic, as it’s not SketchUp but Unreal Engine. Still, great animation example.



An animation extension with these capabilities (especially the DC ‘onClick’ behaviours) would be fantastic.

The individual scene transition / delay properties would also be really useful, especially if they preloaded the global settings by default — without having to manually input timing properties into each and every scene — then you could just tune those specific scenes that need longer / shorter times.

Looking forward to seeing how this develops.


Sure. You’ll need to enable Camera Collision and then it will auto-trigger doors as you approach them.


Apologies for being so late to the party, but I build cabinets, and for live presentations I use dynamic components to great effect to open and close doors and drawers. But when I get to the drawing stage (Layout) and want to show the same view with doors open and closed, dynamic components don’t help. I sometimes use the two-layer solution but it’s a bit cumbersome, so I usually end up just showing the cabinets with and without doors. (ie door layer turned on in one scene, off in the other). Kind of exciting to think there might be a way to use the same DCs to generate both views!


Another workaround would be to have a second copy of the furniture but with the doors open. Then use that version in LayOut.