Stage Context callbacks not work

   688   1   0
User Avatar
Member
12 posts
Joined: April 2017
Offline
Hello,

I'm trying to run a script on nodes created in the stage context but doesn't work as it should. Works fine in the out context. For example changing a merge node colour with this setup works fine for out but not for stage:

└── scripts
    ├── 123.py
    ├── 456.py
    ├── __init__.py
    ├── obj
    │   ├── geo_OnCreated.py
    │   └── __init__.py
    ├── out
    │   ├── __init__.py
    │   └── merge_OnCreated.py
    └── stage
        ├── __init__.py
        └── merge_OnCreated.py


import hou
merge_node = kwargs['node']
merge_node.setColor(hou.Color((1, 0, 0)))

Is there something I'm missing thats different for stage?

Many thanks

Steve
Edited by steve_zeelo - Aug. 8, 2024 12:53:15
User Avatar
Member
12 posts
Joined: April 2017
Offline
Solved it. It need to be "lop" instead of "stage"

└── scripts
    ├── 123.py
    ├── 456.py
    ├── __init__.py
    ├── obj
    │   ├── geo_OnCreated.py
    │   └── __init__.py
    ├── out
    │   ├── __init__.py
    │   └── merge_OnCreated.py
    └── lop
        ├── __init__.py
        └── merge_OnCreated.py
  • Quick Links