Skip to content

Create new style or duplicate style (to create scenes with distinct rendering) #1026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Fredosixx opened this issue Dec 30, 2024 · 1 comment
Labels

Comments

@Fredosixx
Copy link

Fredosixx commented Dec 30, 2024

I found no way to duplicate a loaded style, or to create a new one from scratch.

The use case is to be able to create scenes with different rendering options, noting that some rendering options, like ModelTransparency, are stored in styles.

Let's consider a new model with 2 scenes. It has one style (SimpleStyle). If you wish to make Scene 2 with XRay, while Scene 1 is kept not XRayed, then

In the Sketchup GUI, as soon as you switch to Xray and right-click to update the scene, you will get the prompt:

image

  1. If you select Update the select style, then too bad, Scene 1 will also become XRayed, because it uses this style too.

  2. If you select 'Save as a new Style, then a new style is created from the current style (so SimpleStyle1`, which is what is wanted.

My question (or request) is that there seems to be no API equivalent to this last option 2). Furthermore, even if I was able to find the style source file (although there is no style#path method), I won't be able to load it, because it will either not load or override the existing style.

Basically, this means that the API cannot be used to create a scene with Xray and another scene without XRay.

Note: the workaround is to have my own styles, predefined with XRay and not XRay and load them. But this is not aht I was looking for.

@thomthom thomthom added C API SketchUp parity Missing functional parity with client enhancement labels Jan 6, 2025
@sketchup
Copy link

sketchup bot commented Jan 13, 2025

Logged as: SKEXT-4474

@sketchup sketchup bot added the logged label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants