renderfan Posted October 11, 2012 Share Posted October 11, 2012 Hello all! I have Python Sop and inside node I have function to split some polygons. But because splitting takes long time I want to do it only if geometry of input does change. I tried to use hou.Node.addEventCallback but it does not work for me. What I have so far is code below: event_types = (hou.nodeEventType.InputDataChanged, hou.nodeEventType.InputRewired)def split_polygons(geo):"do some splitting"return polygonsdef onchange(**kwargs):node_in = kwargs["node"]geo_in = node_in.geometry()split_polygons(geo_in)node.addEventCallback(event_types, onchange)polygons = split_polygons(geo)"do something with polygons"[/CODE]This does not work because I do not know how I can get the polygons which are returned by function only if input change.Thank you in advance!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.