Skip to content
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

Implement Scenes & References #19

Open
KevinHuyskens opened this issue Aug 31, 2018 · 11 comments
Open

Implement Scenes & References #19

KevinHuyskens opened this issue Aug 31, 2018 · 11 comments
Assignees

Comments

@KevinHuyskens
Copy link

SketchUp makes use of scenes to hide and show a specified set of layers. It would be nice if there was a reference to these scenes.

@moethu moethu changed the title No reference to scenes Implement Scenes & References Sep 6, 2018
@moethu moethu self-assigned this Sep 6, 2018
@promontis
Copy link

@KevinHuyskens @moethu Is it correct to conclude that this library doesn't support saving or loading of skp scenes?

AFAIK the c library does have this implementation right?
https://extensions.sketchup.com/developers/sketchup_c_api/sketchup/struct_s_u_scene_ref.html

@moethu
Copy link
Owner

moethu commented Aug 23, 2020

Hi @promontis yes the library doesn't include scenes at the moment. It looks like it would be easy to add them. Do you need them for a specific use-case?

@promontis
Copy link

@moethu yeah, I will need to read and write scenes. I'm creating a 3d configurator, and the different configurations are expressed as scenes.

@moethu
Copy link
Owner

moethu commented Aug 24, 2020

what parts of a scene would be necessary for you to achieve this? rendering options? layer settings? element visibility?

@promontis
Copy link

@moethu element visibility... "hidden objects" in the SketchUp UI

moethu pushed a commit that referenced this issue Aug 29, 2020
@moethu
Copy link
Owner

moethu commented Aug 29, 2020

@promontis I started implementing a reading scenes with hidden elements feature first.
How would you like to access hidden elements? My first shot was adding a list of IDs of hidden elements - but then you'd need a central container for entities in the data model.

moethu pushed a commit that referenced this issue Aug 29, 2020
@promontis
Copy link

What options do we have? Elements are now split up in different cases, right? Like components, curves, groups, instances, etc. What about adding a list of ID with the type of element? Does that work?

@moethu
Copy link
Owner

moethu commented Aug 29, 2020

In order to keep compatibility I wouldn't remove the existing lists by types. I added a new dictionary (int ID, entity) so you have both options in the end. objects are only referenced so this doesn't require much additional memory. Each Scene object has a list of hiddenElements containing references to the actual elements. Would this work for you?
So what about writing hidden elements, just allow adding elements to the list of hidden elements?

@promontis
Copy link

promontis commented Aug 29, 2020

Yeah, both suggestions work for me!

moethu pushed a commit that referenced this issue Aug 29, 2020
moethu pushed a commit that referenced this issue Aug 30, 2020
@moethu
Copy link
Owner

moethu commented Aug 30, 2020

@promontis can you give this branch a try? it works for me. writing scenes however will require some more changes in the library.

@moethu
Copy link
Owner

moethu commented Jan 18, 2022

@promontis I never got your feedback on this one, does it work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants