Jump to content

Setting World Display Options in Python


Recommended Posts

Hey everyone,

I'm down to the very last bit of a camera OTL I'm making and I want to set the:

DisplayOptions>Background>ImageSource>COP>COP -- using python.

Really all I want is to be able to add an image sequence to the camera node and view it with the "DisplayBackground" button without having to jump into the display options and add it a second time (don't understand why it's like that really). If there's a different way then do tell ;)

I've got a COP_NET in my camera OTL that picks up the image file and I want to reference that in DisplayOptions.

Thanks for any help, I'm a bit stuck on this one.


Link to comment
Share on other sites

Take a look at the last couple functions of this module. It's not possible using purely Python but you can wrap the hscript pretty simply and get the desired result.


Edit: My bad. There seems to be an issue with the function signatures. For the last two functions, it looks like it is expecting an instance of hou.SceneViewer but then underneath it wants a kwargs dictionary. If you have a specific viewer then you can create a dictionary out of it and pass it along {'pane': viewer} or pass an empty dict and it will look for the primary displayed one. I'll upload a new version in a little bit.

Edited by graham
Link to comment
Share on other sites

Thanks for pointing me too that, it looks interesting!

I found a similar post around here that I didn't see in previous searches. It did what I wanted! OTL COMPLETE>


hou.hscript('opproperty /obj/cam1 viewport viewport_roto')

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...