Control viewport LUT string with H-script

   2347   5   1
User Avatar
Member
319 posts
Joined:
Offline
Hello,

I'm making myself some simple shelf tools to control display options I frequently toggle from the display options dialog. I'm then tying the shelf tool to a hotkey, so for example now, instead of having to go through the menu's and switch viewport bg colour from dark to light 10 times a day, I can hit F12 and have it toggle from one to another.

The next one I frequently turn on and off is applying a LUT in the viewport, but I'm having a problem finding the hscript command that sets the LUT string (I'm calling h-script from python as I see in the help classes like hou.GeometryDisplayToggles() aren't implemented yet).

So my question is, does anyone know the h-script to change this LUT string? I see lots and lots of view commands in hscript, each with lots of options to control various things, but after searching I can't find which one controls this particular setting!
User Avatar
Staff
5157 posts
Joined: July 2005
Offline
It's

vieweffect -l <lutfile> <viewport>
User Avatar
Member
319 posts
Joined:
Offline
Brilliant! Thanks!

I did look at vieweffect by listing all the view* commands in the textport, but there seems to be no documentation with the command so I didn't know the switches!
User Avatar
Member
319 posts
Joined:
Offline
Unfortunately this doesn't seem to work for me. Here is what I am trying:-

vieweffect -l “/sww/proj/myproject/lib/color/luts/b24_co3.rec709g24.houdini.lut” Build.panetab1.world

After doing

viewls

to get the name of my viewport. The LUT field in the display options does not change and there is no visual difference in the viewport. I've also tried without the quotation marks around the LUT path.

Any further ideas?
User Avatar
Staff
5157 posts
Joined: July 2005
Offline
The name of the viewport is “Build.panetab1.world.persp1” (or top, front, etc). The name of the viewer is Build.panetab1.world. The LUT is set on the viewport, not the viewer.
User Avatar
Member
319 posts
Joined:
Offline
Aha, my fault, thank you again!

Now….is there anyway to query the current setting of the LUT parameter so I can make a toggle instead of two separate buttons/hotkeys for on and off?

  • Quick Links