Skip to content

Cameras within references #2008

Answered by ppt-adsk
gracekumagai asked this question in Q&A
Jan 20, 2022 · 4 comments · 4 replies
Discussion options

You must be logged in to vote

Hi Grace, hopefully when you try it out it'll suit your purpose. It's a bit of a blunt instrument, in that the CameraHandler isn't passed any context to decide whether or not to create the Ufe::Camera interface, but the idea is that relying on the argument Ufe::SceneItem is enough. It might look like this:

class PxrCameraHandler : public Ufe::CameraHandler {

PxrCameraHandler(const Ufe::CameraHandler::Ptr& nextHandler) : _nextHandler(nextHandler) {}

Camera::Ptr camera(const SceneItem::Ptr& item) const override {
    return dontWannaSee(item) ? nullptr : _nextHandler->camera(item);
}
};

Hope this helps. Cheers.

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@gracekumagai
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by gracekumagai
Comment options

You must be logged in to vote
3 replies
@kxl-adsk
Comment options

@gracekumagai
Comment options

@kxl-adsk
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants