HDK: PRM generated choice list - persistence question

   1782   1   1
User Avatar
Member
301 posts
Joined: July 2005
Offline
Hi,

I am writing a SOP which is building a choice list base on information it obtains from it's input geometry.

When I create the SOP from a blank scene, it allows me to select a choice from the dynamically built menu list.

However, after saving the file and reloading it in a subsequent Houdini session, the menu item turned green and I can't seems to select other visible options in the menu list. Are there additional step I need to take in the SOP for Houdini to know that certain parameters need to be save to the HIP file ?

https://github.com/nyue/HDKQuestions/blob/main/PRM/ChoiceGenFunc/SOP_ChoiceGenFunc.cpp [github.com]



Cheers

Attachments:
HDK_choice_persistence.png (851.1 KB)

Nicholas Yue
User Avatar
Staff
795 posts
Joined: Oct. 2012
Online
I'd probably suggest using a PRM_STRING parameter rather than PRM_ORD - since your menu values are generated while cooking your SOP, there's no guarantee that the existing parameter value is still a valid menu token. For example, the menu may be requested while loading the .hip file but before your SOP has cooked, but there are also other cases like having cooking disabled, or if the input geometry has changed.
  • Quick Links