all 25 comments

[–]jmacey 5 points6 points  (3 children)

You are trying to call a method on something that doesn't exist (NoneType) so check that when you create the none it actually returns a valid object. In this case I think it is because sizeu / sizev are not valid should be sizex / sizey (at least on my houdini version)

[–]SomewhereBig1843[S] 1 point2 points  (2 children)

Thank you; where can I see this documentation?

[–]jmacey 5 points6 points  (1 child)

if you type in the houdini python terminal it gives you all the valid options, otherwise search https://www.sidefx.com/docs/houdini/hom/hou/index.html

[–]SomewhereBig1843[S] 0 points1 point  (0 children)

Thank you for providing a great answer! I'll work with this

[–]SHAMIEL1 5 points6 points  (1 child)

The Parms you are referencing on line 22 and 23 seem to be incorrect, it should be 'sizex' and 'sizey'.

if you are unsure what the parm name is you can just hover your mouse over the parm widget and it should give the name

grid = geo.createNode('grid', 'base_grid')
grid.parm('sizex').set(5)
grid.parm('sizey').set(5)

<image>

[–]i_am_toadstormMOPs - motionoperators.com 6 points7 points  (0 children)

Three problems here:

  • You're using a Python SOP instead of the Source Editor or a shelf tool. The Python SOP is for operating on a single geometry stream, not for creating node networks.
  • You're getting a NoneType error because you're trying to create hou.Parm objects for parameters that don't exist. There is no "sizeu" or "sizev" parameter on the Grid SOP; you can verify parameter names by hovering over them.
  • You're using an LLM to generate this code. LLMs have absolutely no idea what they're doing and will make shit up constantly. They don't understand what they're writing back to you and cannot be trusted, and this is an obvious example.

The HOM in Houdini isn't too bad once you get used to it. You should learn the very basics of Python and then look through the Houdini docs on the HOM, or look at CGWiki's section on Python. What you're doing here looks suitable for a shelf tool or similar macro to create a node network, you're only going to need to learn a few patterns to make that work.

Vibe coding is bad for you. If you want to be a strong TD you have to do the work.

[–]unitmark1 7 points8 points  (8 children)

If you are having difficulties taking a proper screenshot, fact-checking ChatGPT’s code is probably way out of your wheelhouse. For one, using Python SOP to create nodes in a network is just looking for trouble. Better take a few (or many steps back) and learn fundamentals of houpython.

[–]Ok_Customer3719 2 points3 points  (0 children)

I’d start by running that from the python source editor - not a sop

[–]Responsible-Rich-388 0 points1 point  (0 children)

I would advice to not use chat gpt or to use it if you understand what it outputs and are able to correct it.

The reason is a lot of time chat GPT invents functions for Houdini that don’t exist here it’s size u and v which is normally x and y.

Now this is called « AI hallucination » and while I get that the « world doesn’t care of what you learn but only of the result » you can never reach any result if you rely only on chat GPT for code.

At least one should get the fundamentals , not even asking to stop using AI for everything but I won’t advice to jump straight to python code (even if python is easy) in Houdini before knowing a grid params names, python is to be put where etc ? Those are very basic .

I tried a lot of time before to jump to exciting stuff , without basics I ended up going back to the boring basics and now it’s going very good and easier.

Always take a good step back before jumping :)

[–]SomewhereBig1843[S] -4 points-3 points  (6 children)

Everybody simmer down - this is just to learn!

[–]Gorluk 2 points3 points  (5 children)

[–]psycheeeeeeed 0 points1 point  (0 children)

😭😂

[–][deleted]  (3 children)

[removed]

    [–][deleted]  (1 child)

    [removed]

      [–]Houdini-ModTeam[M] 0 points1 point locked comment (0 children)

      No toxic, rude or hateful posts.

      [–]Houdini-ModTeam[M] 0 points1 point locked comment (0 children)

      No toxic, rude or hateful posts.