{"id":537,"date":"2021-04-21T18:53:49","date_gmt":"2021-04-22T01:53:49","guid":{"rendered":"http:\/\/fx-td.com\/houdiniandchill\/?p=537"},"modified":"2021-04-21T19:00:04","modified_gmt":"2021-04-22T02:00:04","slug":"archived-post-by-remi-pierre-3","status":"publish","type":"post","link":"http:\/\/fx-td.com\/houdiniandchill\/2021\/04\/21\/archived-post-by-remi-pierre-3\/","title":{"rendered":"Archived post by Remi Pierre"},"content":{"rendered":"<p class=\"\">Thought that could be valuable to someone at some point. node.cook(force_cook=True) doesn&#8217;t work in manual mode, so here&#8217;s a shitty workaround for it \ud83d\ude42 &#8220;` import tempfile def get_sop_node_geometry(node):         &#8220;&#8221;&#8221;         Force cook a node even in manual mode<br \/>\n        Args:             node (hou.SopNode): a Sop node to compute<br \/>\n        Returns:             hou.Geometry: The frozen geometry<br \/>\n        &#8220;&#8221;&#8221;         rop_geo = hou.node(&#8216;\/out&#8217;).createNode(&#8216;geometry&#8217;)         rop_geo.parm(&#8216;soppath&#8217;).set(node.path())         tmp_file = tempfile.NamedTemporaryFile(suffix=&#8217;.bgeosc&#8217;)         try:             rop_geo.render(output_file=tmp_file.name)         except hou.Error:             rop_geo.destroy()             return hou.Geometry()              rop_geo.destroy()         geometry = hou.Geometry()         geometry.loadFromFile(tmp_file.name)         return geometry &#8220;`<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Thought that could be valuable to someone at some point. node.cook(force_cook=True) doesn&#8217;t work in manual mode, so here&#8217;s a shitty workaround for it \ud83d\ude42 &#8220;` import tempfile def get_sop_node_geometry(node): &#8220;&#8221;&#8221; Force cook a node even in manual mode Args: node (hou.SopNode): a Sop node to compute Returns: hou.Geometry: The frozen geometry &#8220;&#8221;&#8221; rop_geo = hou.node(&#8216;\/out&#8217;).createNode(&#8216;geometry&#8217;) &hellip; <a href=\"http:\/\/fx-td.com\/houdiniandchill\/2021\/04\/21\/archived-post-by-remi-pierre-3\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Archived post by Remi Pierre<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[],"_links":{"self":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/posts\/537"}],"collection":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/comments?post=537"}],"version-history":[{"count":0,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/posts\/537\/revisions"}],"wp:attachment":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/media?parent=537"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/categories?post=537"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/tags?post=537"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}