Olivier Colchen

Wolrajh

About Me

専門知識
Not Specified
Location
Not Specified
ウェブサイト

Connect

Recent Forum Posts

HDA, Button Strip, menu script : can't retrieve the tokens ? 2023年1月9日13:19

graham
Since your menu is being dynamically generated, you need to query the menu items directly from the hou.Parm object and not it's parmTemplate.

Oh god. Sometimes it's just here, right under your nose. Just parm.menuItems(), of course... ughh !

Thanks Graham. Just needed a tap on the head apparently

HDA, Button Strip, menu script : can't retrieve the tokens ? 2023年1月9日12:25

Hey,

I'm creating a custom dynamic button strip menu on my HDA, no issues : I get one button per dynamic entry as instructed.
The issue I have is that I can't then, using a callback, retrieve the list of tokens, as noted by the doc, as such :

def strip_to_tokens(parm):
    # Takes a reference to a button/icon strip parameter
    # instance and returns a list of tokens corresponding
    # to the buttons that are on

    bitfield = parm.eval()
    tokens = parm.parmTemplate().menuItems()
    return [token for n, token in enumerate(tokens) if bitfield & (1 << n)]

This will return an empty list.
The thing is that when setting up a fixed menu using the 'menu items' tab instead of 'menu script', this little bit of code will correctly return the tokens. It seems the dynamic nature of my button strip parameter is the culprit, and both parmTemplate().menuItems() and parmTemplate().menuLabels() are returning empty strings.

Is there something I'm missing ?
It looks like I'll have to also rebuild the source list in the callback.

Normal maps rendering wrong in Karma CPU 2022年11月25日7:17

hey folks
I've been pulling my hairs trying to understand what's happening here, and while I'm leaning toward a Karma bug, I thought I'd share the issue.

Basically in CPU mode, light seems to bleed through the surface when using a normal map, either with a principled shaders or using a materialX standard surface. This pic here is a simple materialX tree with a redish light under a grid :


However, XPU works fine :



Can't think of an explanation and for a lot of reasons I don't want to render in XPU mode on a CPU farm :p

For now my workaround would be to grab the bump map instead and add it to the displacement, but I'm not super satisfied with such a solution...
Any ideas?