Wave function collapse sample painting tool

   2226   5   2
User Avatar
Member
141 posts
Joined: Dec. 2015
Offline
Hi

For some reasons the tool is unable to fill in the names of the samples I'd like to use.
User Avatar
Member
141 posts
Joined: Dec. 2015
Offline
Traceback (most recent call last):
File "labs::Sop/wfc_sample_paint/btnAddInputsToDict", line 1, in <module>
File "labs::Sop/wfc_sample_paint, PythonModule", line 11, in SetDictparm
TypeError: 'set' object is not subscriptable

This is the error. Ot creates the entries but doesn't fill with the names
User Avatar
Member
28 posts
Joined: March 2014
Offline
Have you checked for the condition of the cat?
User Avatar
Member
2 posts
Joined: April 2020
Offline
I found the same bug, and a way to fix it.

The message:

labs::Sop/wfc_sample_paint, PythonModule", line 11, in SetDictparm

points to an error in the node's python module.

To access the python file, you'll need to edit the .hda
1. Select the wfc_sample_paint node
2. Go to Assets/Edit asset properties/Labs wfc samplepaint
3. In the new windows select the scripts tab
4. Select from the scripts list "PythonModule"
5. Go to line 6:
attribvals = {x.attribValue("name") for x in geo.points()}
6. Change the curly brackets for square brackets
attribvals = [x.attribValue("name") for x in geo.points()]
7. Hit the apply button
8. Hit Initialize value mapping with input button in the node parameters
9. Done!

If you don't have write access to the current location of the sidefx labs package, you will have to manually download Labs, and redirect Houdini to use a location that has write access for the current user.
You can follow the instructions on how to do this here [github.com]
User Avatar
Member
44 posts
Joined:
Offline
Sorry to hijack the topic but I am getting same error on line 21 of following script (torn out of Component Output LOP)
I am clueless...

from husd import assetutils
from pxr import Usd, Gf

node = hou.pwd()
stage = node.editableStage()

# Add code to modify the stage.
# Use drop down menu to select examples.
spin = 0
pitch = 0
dist =  0
rotatex=25+pitch
rotatey=-35+spin


_prim_path = node.evalParm('asset')
if not _prim_path.startswith('/'):
    _prim_path = '/' + _prim_path
prim = stage.GetPrimAtPath(node.evalParm('asset'))
extents_hint = prim.GetAttribute('extentsHint').Get(Usd.TimeCode.EarliestTime())
bounds = Gf.Range3d(Gf.Vec3d(extents_hint[0]),Gf.Vec3d(extents_hint[1]))
assetutils.createFramedCameraToBounds(stage, bounds, rotatex=rotatex, rotatey=rotatey, offsetdistance=dist)
Edited by kumpa - Nov. 7, 2022 01:01:46
User Avatar
Member
1 posts
Joined: Feb. 2021
Offline
JuanFlorez's post fixed this issue for me.

Tip: I did encounter write permission errors when saving the .dha, solved by just restarting Houdini as an admin (Run as Administrator)
-- heath carlisle
  • Quick Links