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

Handle invalid camera errors better #371

Closed
bentoogood opened this issue Jun 11, 2013 · 1 comment
Closed

Handle invalid camera errors better #371

bentoogood opened this issue Jun 11, 2013 · 1 comment
Labels
scene Issues with GafferScene

Comments

@bentoogood
Copy link
Contributor

Some obfuscated errors can slip through to the user if an invalid camera path is specified. Better handling of these errors would be great.
For example:

Traceback (most recent call last):
  File "/software/apps/gaffer/0.65.0/cent6.x86_64/cortex/8/gaffer/python/Gaffer/WeakMethod.py", line 57, in __call__
    return m( *args, **kwArgs )                                                                                    
  File "/software/apps/gaffer/0.65.0/cent6.x86_64/cortex/8/gaffer/python/GafferUI/Button.py", line 131, in __clicked
    self.clickedSignal()( self )                                                                                   
  File "/software/apps/gaffer/0.65.0/cent6.x86_64/cortex/8/gaffer/python/Gaffer/WeakMethod.py", line 57, in __call__
    return m( *args, **kwArgs )                                                                                    
  File "/software/apps/gaffer/0.65.0/cent6.x86_64/cortex/8/gaffer/python/GafferUI/ExecuteUI.py", line 56, in __clicked
    _execute( [ self.__node ] )                                                                                      
  File "/software/apps/gaffer/0.65.0/cent6.x86_64/cortex/8/gaffer/python/GafferUI/ExecuteUI.py", line 89, in _execute
    node.execute( [ script.context() ] )                                                                             
RuntimeError: Exception : Unable to find mapping for output path   
@johnhaddon
Copy link
Member

In this specific case I think we need to do the following :

  • Improve the "Unable to find mapping" error message (which comes from the Group node) to include the path in question.
  • Possibly catch and rethrow errors in the render node, to make it clearer at what point the error is occurring (while outputting the camera).

johnhaddon added a commit to johnhaddon/gaffer that referenced this issue May 6, 2014
The Cortex camera specification is very RenderMan centric, and the camera defines the resolution and the screen window for the render. If the aspect ratios of these are different, then we get squashing or stretching of the viewed image - and when we're using the camera in the viewport we currently must set the resolution to match the resolution of the viewport. The GafferScene.Camera node deliberately doesn't specify screen window to avoid squash/stretch in this situation, but cameras from other sources may not. As a short-term solution we just remove the screen window.

Longer term (but pretty soon I imagine) we may need to revise the Cortex/Gaffer camera representation so that we can deal with cameras in more physical terms, only performing the mapping to a screenwindow/resolution pair for the renderer. Tickets we could bundle into this chunk of work include GafferHQ#277 (main ticket requesting physical cameras), and GafferHQ#371, GafferHQ#276, GafferHQ#58 as related smaller tickets. We may want to consider adopting something like the Alembic camera representation because a great deal of discussion has gone into it, and it aims to balance the complexity of a million physical parameters with the fairly simple requirements of a renderer (a frustum).

Fixes GafferHQ#826.
@johnhaddon johnhaddon mentioned this issue Jul 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scene Issues with GafferScene
Projects
None yet
Development

No branches or pull requests

2 participants