Yogi Mishi Maharishi

Guru Yogibear

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

why don't primitives in hOudini have normals Nov. 28, 2014, 9:48 p.m.

I am wondering as to why primitives and points don't have normals by default and that ,from what i understand, you have to apply a pointSop with attribute add normals to get a NX,NY ,NZ then perform attrib promote to get the normal of a primitive.

Is this a correct approach if i need the normal of a primitive?

compare to know if i am dealing with ObjNode or SopNode Nov. 28, 2014, 5:25 a.m.

Thank you for your reply,
Unfortunately i am in fact looking for a way to make comparison of the types of nodes and get true false answers from an if statement.
if (nodetype==sopnode):

compare to know if i am dealing with ObjNode or SopNode Nov. 27, 2014, 3:50 a.m.

hello esteemed members of houdini,
i am trying to make a comparison to know if a node input is of type ObjNode or SopNode.

Here is my shell test code:


>>> a=hou.node('/obj/box_object1')
>>> b=hou.node('/obj/box_object1/box1')
>>> a.type()
<hou.NodeType for Object geo>
>>> b.type()
<hou.SopNodeType for Sop box>

here is my function code:




def modify_my_geometry(inputnode):
if (inputnode.type()==hou.SopNodeType):
print(“I can now access the inputnode.geometry() to modify it”)
else
print(“there is no geometry object here for me to modify”)


As you can see, i am trying to figure out if a geometry is present for me to add primitives ,points etc to it or modify existing.
Can you help me ?