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

Question about Toolhead and info text #17

Open
ameennihad opened this issue Feb 4, 2018 · 4 comments
Open

Question about Toolhead and info text #17

ameennihad opened this issue Feb 4, 2018 · 4 comments

Comments

@ameennihad
Copy link

Is it possible for a widget to tell 3dviewer widget to hide/show Toolhead and info text?

I tried changing the visible property of some item from this.obj3d.parent.children with no success. Where this.obj3d.parent is the scene object.

@chilipeppr
Copy link
Owner

Yeah, that should work with doing obj3d.parent.children. You may have to call a refresh method though. I don't remember. You could also just fully take the object out of the tree structure, but then you gotta make sure that doesn't introduce weird behavior. You could look at the code in the 3D viewer to renders the toolhead or extents text to see if there's any refresh code you could borrow.

@chilipeppr
Copy link
Owner

Did you do a wakeAnimate afterwards to see the refresh?

@chilipeppr
Copy link
Owner

If you need some new pubsub exposed out of the 3D viewer, I could get a pull request processed quickly for you. Maybe just expose 2 new pubsubs for toolhead and extents text that let you toggle hide/show.

@ameennihad
Copy link
Author

I don't believe this.obj3d.parent.children is a good approach, because; if I'm not wrong; toolhead and extents text are added to the scene after the other widget creates its 3d objects.
A better approach is to create new pubsub for that, it might take some time before I make a PR for that, at the moment I just disable those object from my fork of 3dviewer widget.

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

2 participants