-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
GLTFExporter: Added onlyVisible option #12028
Conversation
|
||
children.push( processNode( child ) ); | ||
if ( !options.onlyVisible || child.visible ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is easier to read?
if ( child.visible || options.onlyVisible === false ) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
Actually. What's the use case for exporting invisible objects? |
@mrdoob sometimes you would like to export all the meshes on the scene even if they're hidden, for example you could have an editor where you hide the background to focus on few objects and you don't want to toggle visibility of everything just to export, similar to how 3dsmax or similar works. |
but I agree that won't be the most common use case, that's why |
Wouldn't it be cleaner to use |
Or even another scene. In https://threejs.org/editor/ I use another scene for the helpers. |
I see I see 👌 |
Thanks! |
thanks! ;) |
I forgot to include this changes in a previous PR 👼