Mohan Pugaz

Mohanpugaz

About Me

EXPERTISE
VFX Artist
INDUSTRY
Film/TV

Connect

LOCATION
Bangalore, India

Houdini Skills

ADVANCED
Procedural Modeling  | Environments  | Digital Assets  | Motion Editing  | Mantra  | Pyro FX  | Fluids  | Destruction FX
INTERMEDIATE
Hair & Fur  | Cloth  | Crowds  | Solaris  | Lighting  | VEX  | Python
BEGINNER
Animation  | Karma  | Realtime FX  | PDG

Availability

I am currently employed at Bangalore

Recent Forum Posts

How to run a python script node? May 31, 2024, 6:34 a.m.

I know this is pretty old post, still posting my method here so it may help people in future.

Python has this function called exec(string) which executes given string as a python code.

So you can simply do these steps

  1. create any node
  2. gear icon > edit parameter interface > create a multine string parm > optionally set it to python language for syntax highlight
  3. create a button > add a this in callback
    exec(hou.pwd().parm("your_string_parameter").eval())
    

It will get the string from multiline string parameter and runs it as python code.
obviously you can point this to parm from any node and run from that node.
this could be very handy when you want to store python codes in hip file itself. very much portable!

Sweep Rotation Direction May 13, 2024, 8:54 a.m.

you can use an attribute (lets say `@twist_mask`) to control the twist, this attribute is a multiplier, so you can manipulate it as much you want such as re-mapping that using curveu attribute and use that mask to drive the twist.

Modifing Parm with Python May 2, 2024, 8:08 a.m.

Hi all, Ive read multiple forums regarding this but still not able to make it work.

Im trying to modify a custom `multiline string parm`
I want to change the language of it through python, say i have a dropdown to choose formatting whether python or vex.

here is what i did so far, I found the way to do this is using the .setTag() function to set {"editorlang : "python"}
i can see the tags are modified by printing my parmTemplateGroup but i couldnt see the change in the node.

Im not sure what im doing wrong, can someone help please?


import hou

n = hou.node('/obj/htip2')
g = n.parmTemplateGroup()

old_lang = g.find("code")
new_lang = old_lang
new_lang.setTags({"editorlang":"python"})

g.replace("code", new_lang)
n.setParmTemplateGroup(g)

print(new_lang.tags())