the menuItems consist of a list of strings, for example:
["cluster1","cluster1","cluster2","cluster1"]
import hou pos = 1 menuItems = kwargs['node'].node("VALUES").geometry().attribValue("clusterList" + str(pos)) kwargs['parmtuple'].set((menuItems))
["cluster1","cluster1","cluster2","cluster1"]
import hou pos = 1 menuItems = kwargs['node'].node("VALUES").geometry().attribValue("clusterList" + str(pos)) kwargs['parmtuple'].set((menuItems))
Soothsayer
There are docs but I'm afraid it's not necessarily easier:
https://openusd.org/release/api/class_usd_stage.html#a6ceb556070804b712c01a7968f925735 [openusd.org]
Somebody correct me if I'm wrong but as far as I can work out it's a c++ api and the python bindings are generated from this, meaning that you can adapt them 'in a simple and straightforward way'.
Now, you could try this in python to see what's in the pxr usd module and then dig around in the docs for it.from pxr import Usd print(dir(Usd))
or if you are feeling more adventerous:node = hou.pwd() stage = node.editableStage() def list_module_contents(module, prefix="", visited=None): contents = [] # Initialize the visited set if it's not provided if visited is None: visited = set() # Prevent infinite recursion by checking if the module was already visited if id(module) in visited: return contents visited.add(id(module)) for name in dir(module): # Check if the attribute is readable if not hasattr(module, name): continue attr = getattr(module, name) full_name = f"{prefix}{name}" if isinstance(attr, type): # If the attribute is a class, recursively list its contents contents.extend(list_module_contents(attr, f"{full_name}.", visited)) else: contents.append(full_name) return contents from pxr import Usd # List everything in the Usd module recursively contents = [i for i in list_module_contents(Usd) if '__' not in i] print(contents)
There are also examples here: https://openusd.org/release/tut_traversing_stage.html [openusd.org]
SoothsayerHi!
In a Python Lop, does this get you what you want?node = hou.pwd() stage = node.editableStage() # Add code to modify the stage. # Use drop down menu to select examples. yournode = hou.node('/stage/null5').stage().GetPrimAtPath('/arcsmoke') def count_prims(node): count = 0 for child in node.GetChildren(): count += 1 count += count_prims(child) return count prim_count = count_prims(yournode) print("The node has", prim_count, "prims.")
Siavash TehraniWow, thanks! Houdini spitted me some errors but finally worked...
The default collision geometry produced by the Edit LOP is a convex hull. You can generate your own collision geo with the Simulation Proxy LOP. Setting it to Convex Hull with Decompose Each Connected Piece worked for me.
Traceback (most recent call last): File "E:\Program Files/Side Effects Software/Houdini 19.5.493/houdini/python3.9libs\edit\base.py", line 377, in wrapper_recordEvent return func(*args, **kwargs) File "E:\Program Files/Side Effects Software/Houdini 19.5.493/houdini/python3.9libs\edit\base.py", line 1348, in onNodeSelectionChanged self.handleDescriptorDNE(simgeo, selpath) File "E:\Program Files/Side Effects Software/Houdini 19.5.493/houdini/python3.9libs\edit\lop\base.py", line 521, in handleDescriptorDNE proxyowner = self.getAncestorSimProxyOwner(prim) File "E:\Program Files/Side Effects Software/Houdini 19.5.493/houdini/python3.9libs\edit\lop\base.py", line 234, in getAncestorSimProxyOwner parent = prim.GetParent() RuntimeError: Accessed invalid null prim
chrism
Sorry about that e-mail blast folks - we were doing a dry run and it went out a lot farther and wider than was intended.
BrianHanke
Since SideFX has been pretty hush-hush about this release I imagine they're planning some really big stuff. He are my predictions for Karma:
1. Ultra fast scene previews, including hair and volumes, using a new real-time GPU renderer, Karmee.
2. Karma will have 1:1 parity with every obscure Mantra feature, plus lots of new artist-friendly wrappers for common tasks.
3. New specialized shaders, including glass, volumes, skin, and hair.
4. 10x speed increases across the board for final frame rendering.
5. Simplified render settings ala Arnold and 3Delight. Everything you need will be on one ROP tab.
6. In-depth render progress reporting, including percent complete, time remaining, samples complete, CPU usage, etc.
How many of these features will we have in H19? Place your bets now!
BerkErdagMe too! I want to test it.
Can't wait for the new Karma render with GPU support!
tamteThanks you very much! I knew loops but never though of using this way, you are the best helping everyone here in the forum! Thanks you!
you can read them in a for loop
if for example your multiplarm folder is called columns and also I'd advise set first instance index to 0 instead of default 1int ncol = chi("columns"); float alturas[]; for(int i=0; i<ncol; i++){ string si = itoa(i); float altura = chf("altura" + si); append(alturas, altura); } if (ncol>0){ f@altura_avg = avg(alturas); f@altura_min = min(alturas); f@altura_max = max(alturas); }