Skip to content

RenderingOptionsChange

A single rendering options change event — the full snapshot plus the keys that actually changed.

You receive this in the model.observeRenderingOptions() callback when the user adjusts display settings. Use changed to react only to the settings that matter to your extension, and options when you need the full current state.

let model = await SketchUpApi.getActiveModel();
let handle = model.observeRenderingOptions(
data => {
if (data.type === 'change') {
const { change } = data;
// Only the keys that changed
console.log(Object.keys(change.changed));
// Full snapshot after the change
console.log(
change.options.BackgroundColor.toHex()
);
}
}
);
// Stop observing when done
handle.stop();

SDK 2.24.0 Protocol 1.21.0

readonly changed: Partial<RenderingOptionsData>

Only the properties that changed in this event. Use this to avoid re-processing settings that haven’t moved.


readonly options: RenderingOptions

The full RenderingOptions snapshot after the change was applied.