Dmitriy Zub
AnimGraphLab
About Me
Generalist.
EXPERTISE
Generalist
Connect
LOCATION
Kiev,
Ukraine
WEBSITE
Houdini Skills
INTERMEDIATE
Procedural Modeling | Environments | Digital Assets | Solaris | Karma | Lighting | PDG | Python
BEGINNER
Character Rigging | Motion Editing | Animation | Hair & Fur | Cloth | Crowds | Muscles | Pyro FX | Fluids | Destruction FX | Realtime FX | VEX
Availability
Not Specified
My Gallery
My Tutorials
Recent Forum Posts
Update existing node menu items with Python 'OnCreaded' May 6, 2024, 2:40 a.m.
Goal: add an item to the Karma LOP -> Image Output -> Filters -> Tonemap menu item and save the updated parameter interface with Python.
Issue: menu item is updated with a new item but parameter interface (
It doesn't show in UI but via
Context:
Code I use to add an additional menu item to already existing ones:
I belive something is with
I've tried to create the exact same menu via StringParmTemplate [www.sidefx.com] because
What am I doing wrong?
Thank you.
Issue: menu item is updated with a new item but parameter interface (
parmTemplateGroup()
) doesn't save it. It doesn't show in UI but via
print()
it shows.Context:
- Karma LOP.
- Created script name:
karmarenderproperties_OnCreated.py
- Created script location:
C:\Program Files\Side Effects Software\Houdini 20.0.653\houdini\scripts\lop
Code I use to add an additional menu item to already existing ones:
# get Karma LOP node node = kwargs['node'] # get all parameters from Karma LOP parm_group = node.parmTemplateGroup() # get 'tonemap' parameter tone_map_param = node.parm('tonemap') # get parameters from 'tonemap' tone_map_template = tone_map_param.parmTemplate() # Update the menu item template with the new item template tone_map_template.setMenuItems(tone_map_template.menuItems() + ('AnimGraphLab',)) tone_map_template.setMenuLabels(tone_map_template.menuLabels() + ('AnimGraphLab',)) print(parm_group.find('tonemap').menuLabels()) # ('No Tonemapping', 'Reinhard', 'Ward', 'Unreal', 'Aces', 'Hable', 'Hable2') # Replace the existing menu template with the updated one parm_group.replace('tonemap', tone_map_template) print(parm_group.find('tonemap').menuLabels()) # ('No Tonemapping', 'Reinhard', 'Ward', 'Unreal', 'Aces', 'Hable', 'Hable2', 'AnimGraphLab') # save Karma LOP parameters layout with new updates node.setParmTemplateGroup(parm_group)
I belive something is with
node.setParmTemplateGroup(parm_group)
since parm_group.replace()
adds a new item.I've tried to create the exact same menu via StringParmTemplate [www.sidefx.com] because
node.parm('tonemap')
type is a String [www.sidefx.com], and it was updated (image below):# get Karma LOP node node = kwargs['node'] # get all parameters from Karma LOP parm_group = node.parmTemplateGroup() menu_template = hou.StringParmTemplate(name='tone_map', label='Tonemap', num_components=1, menu_items=('off', 'ward', 'unreal', 'aces', 'eminem'), menu_labels=('no tonemap', 'ward', 'unreal', 'aces', 'Eminem'), ) # insert menu items as a very first paramter param_to_insert_before = parm_group.find("quicksetup") parm_group.insertBefore(param_to_insert_before, menu_template) desired_label = "AnimGraphLab" existing_labels = menu_template.menuLabels() if desired_label not in existing_labels: new_menu_items = menu_template.menuItems() + (desired_label,) new_menu_labels = existing_labels + (desired_label,) # Update the menu template menu_template.setMenuItems(new_menu_items) menu_template.setMenuLabels(new_menu_labels) # Update the parameter template group with the modified menu parm_group.replace('tone_map', menu_template) # save Karma LOP parameters layout with new updates node.setParmTemplateGroup(parm_group)
What am I doing wrong?
Thank you.
Comparing embedded images in an HDA help card? May 1, 2024, 3:54 a.m.
kodra
Man having to put the images into a .zip manually is UX horror. They really should've made it work with embedded images and external URLs.
Possibly there's another, proper way that somehow does all those mentioned steps automatically But yeah, using
[Image:opdef.?<IMAGE>]
would be much more intuitive and expected P.S. - I've submitted enhancement request.
Comparing embedded images in an HDA help card? April 30, 2024, 1:54 p.m.
After some digging...
Houdini markup page example images are stored at this path:
Using the absolute path to images also doesn't work:
Solution:
1. SideFX team, please, update Compare Images Markup documentation [www.sidefx.com] 💛
2. Copy-paste your images inside
2.1. (optional) In ZIP file, create a subfolder like
3. Use your image without
4. Important: close and open Houdini. I believe that this is to compile all files from
5. Open your help page.
Result:
Houdini markup page example images are stored at this path:
C:\Program Files\Side Effects Software\Houdini 20.0.653\houdini\help
(ZIP file) so they're not embedded.Using the absolute path to images also doesn't work:
Qt Error: Not allowed to load local resource
even though using absolute paths in HDA is inappropriate.Solution:
1. SideFX team, please, update Compare Images Markup documentation [www.sidefx.com] 💛
2. Copy-paste your images inside
C:\Program Files\Side Effects Software\Houdini 20.0.653\houdini\help\images.zip
ZIP file. 2.1. (optional) In ZIP file, create a subfolder like
my-mega-custom-folder
to store custom images for HDAs.3. Use your image without
opdef.?
. Use this: /images/spiderman2.jpg
. If using a custom folder: /images/my-mega-custom-folder/spiderman2.jpg4. Important: close and open Houdini. I believe that this is to compile all files from
\houdini
and other folders.5. Open your help page.
Result: