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

DeleteObject node and Viewer look-through visibility fix #2694

Merged
merged 5 commits into from
Jul 24, 2018

Conversation

johnhaddon
Copy link
Member

As discussed on the developer list, the Viewer hides the current look-through camera, so that it's visualisation isn't drawn over the scene, conflicting with the resolution gate that we're drawing separately. Until now, we hid the camera by using a StandardAttributes node to turn its visibility off. But this had the unwanted side effect of also hiding anything parented underneath the camera. This PR introduces a new DeleteObject node, and uses that to hide the camera while leaving the children intact.

@danieldresser-ie
Copy link
Contributor

LGTM

My only question is just a general question for my own reference:
In the hash, you do this:
return outPlug()->objectPlug()->defaultValue();

The last time I tried to return a constant value from a hash to indicate that the compute was going to always return the same constant, you told me that it was wrong to not include the node's typeId? Under what circumstances is it OK to just return the hash the actual value the compute is going to return?

Oh, also, those test hangs seem to be a bit frequent, though probably not related to this PR?

@johnhaddon
Copy link
Member Author

The last time I tried to return a constant value from a hash to indicate that the compute was going to always return the same constant, you told me that it was wrong to not include the node's typeId?

The hashes for ComputeNode and IECore::Object each start with a typeid, so they are separated from each other. So it's kosher to return the hash of an object if you're going to return that same object from compute().

Oh, also, those test hangs seem to be a bit frequent, though probably not related to this PR?

Yeah, I need to find time to look into those. Definitely unrelated though...

@johnhaddon johnhaddon merged commit 020b1d7 into GafferHQ:master Jul 24, 2018
@johnhaddon johnhaddon deleted the deleteObjectAndLookThroughFix branch July 24, 2018 08:27
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

Successfully merging this pull request may close these issues.

2 participants