Can't channel ref in a python partitioner?

   2119   4   1
User Avatar
Member
150 posts
Joined: Feb. 2009
Offline
I'm trying to simply eval an int from a channel in a python partitioner, but seeing as I cant do this on a python partitioner…

import hou
node = hou.pwd()
parm = node.parent('some_int').eval()

Then I'm not sure how to eval any parm/int on the parent hda. in this case pwd will just return ‘/’.

Hacky way is to set the int as an attribute, and pull it that way- but then I'm finding I have to make the partitioner dynamic in order to reliably read that attribute which is not desirable.

Thanks if anyone has a pointer for this.
https://openfirehawk.com/ [openfirehawk.com]
Support Open Firehawk - An open source cloud rendering project for Houdini on Patreon.
This project's goal is to provide an open source framework for cloud computing for heavy FX based workflows and allows end users to pay the lowest possible price for cloud resources.
User Avatar
Member
150 posts
Joined: Feb. 2009
Offline
Thanks to jens for this one. The solution is

self['some_int'].evaluateInt()
Edited by Andrew Graham - Aug. 6, 2019 03:57:37
https://openfirehawk.com/ [openfirehawk.com]
Support Open Firehawk - An open source cloud rendering project for Houdini on Patreon.
This project's goal is to provide an open source framework for cloud computing for heavy FX based workflows and allows end users to pay the lowest possible price for cloud resources.
User Avatar
Member
35 posts
Joined: Oct. 2017
Offline
Thanks, was just struggling with that this morning!
User Avatar
Staff
586 posts
Joined: May 2014
Offline
This has been addressed in tomorrow's daily build of 17.5. hou.pwd(), hou.parm(“../../some_relative_path”), etc should all be working as expected now. If you want to evaluate a parameter with respect to a particular PDG work item, you'll still need to go through PDG's API as mentioned above. For example:

for upstream_item in upstream_items:
    val = self['some_int'].evaluateInt(upstream_item)
User Avatar
Member
150 posts
Joined: Feb. 2009
Offline
Thanks for getting the hou.parm functionality working for us.
https://openfirehawk.com/ [openfirehawk.com]
Support Open Firehawk - An open source cloud rendering project for Houdini on Patreon.
This project's goal is to provide an open source framework for cloud computing for heavy FX based workflows and allows end users to pay the lowest possible price for cloud resources.
  • Quick Links