Open Fredosixx opened 1 year ago
A longstanding challenge. I described it in detail as the use case "elaboration" requested by @thomthom in https://github.com/SketchUp/api-issue-tracker/issues/876#issuecomment-1471151303, for why a "quick iterator" that temporarily switches off scene transitions is needed.
Would fixing this make #876 obsolete?
Would fixing this make #876 obsolete?
Not, in my opinion. (More discussed in #876.)
But being able to set page properties without going through the clunky page.update
from the active view (and it's rendering options) certainly will help avoid situations that cause buggy code.
For example, in the workaround described, any ViewObserver
or FramechangeObserver
will fire (perhaps twice each, maybe more.) This could cause other unneeded side-effects.
Logged as: SKEXT-3662
The
Sketchup::Page
class seems to be missing crucial methods.For instance, I did not find a direct way to set a camera for scene via the API. There is no method like
page.camera=
.So, you have to
page.update
to store the camera (ideally, we should just unset alluse_
flags to make sure we just update the camera and then restore them after.The same happens for rendering_options, shadows, etc....