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

Improved SceneInspector shader display and shader handles #786

Merged
merged 2 commits into from
Mar 14, 2014

Conversation

johnhaddon
Copy link
Member

This improves the display of shaders in the SceneInspector as requested for #335, and also improves the usability of the shader handles generated when creating shader networks - they are now repeatable for a given network and include the name of the node which generated the shader.

I suspect that sooner or later someone will ask for the full path to the node rather than just the name to help identify nodes in Boxes, and I do think this would be preferable, but we don't have the necessary signalling machinery to keep this easily updated at the moment. I think we could add a GraphComponent::fullNameChangedSignal(), but I don't want to do that until we're only constructing signals for the GraphComponent classes in a lazy fashion - signal construction is already showing up as a decent overhead following our recent optimisations (about 5% of total script load time), and also takes a fair chunk of memory and has overhead even when emitting signals without slots attached. This would be exacerbated by a fullNameChangedSignal(), particularly as the naive implementation would traverse the whole hierarchy down when a name changed somewhere. If we had a lazy implementation that only signalled when the signal had been accessed (and lazily constructed) I think this overhead would be much more acceptable, particularly as we have few other use cases for it at present...

We now show the name of the node which generated the shader if it is available.

Fixes GafferHQ#335.
Handles are now generated in a repeatable fashion, and include the name of the node from which the shader was generated.
davidsminor added a commit that referenced this pull request Mar 14, 2014
Improved SceneInspector shader display and shader handles
@davidsminor davidsminor merged commit 091c151 into GafferHQ:master Mar 14, 2014
@johnhaddon johnhaddon deleted the shaderHandles branch April 2, 2014 16:05
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