Jump to content

Font-Sop Python


resonanz

Recommended Posts

I am sure it is a simple problem but I cannot find the solution, so here is the question:

I put some code into the text field of a Font-Sop and I want to return the values. My problem is that it allways returns the whole code and not just the value. In Hscript I can use the backsticks and put the expression inbetween but how do I do this in Python?

Thanks in advance!

Link to comment
Share on other sites

I am sure it is a simple problem but I cannot find the solution, so here is the question:

I put some code into the text field of a Font-Sop and I want to return the values. My problem is that it allways returns the whole code and not just the value. In Hscript I can use the backsticks and put the expression inbetween but how do I do this in Python?

Thanks in advance!

Im not infront of houdini now but if I remember correct you need to keyframe a string parameter when using python in it.

Edited by mawi
Link to comment
Share on other sites

  • 1 month later...

1. Go to frame 1

2. Right-click on the Font SOP's "Text" parameter. Choose Channels and Keyframes > Set Keyframe

3. Right-click on the Font SOP's "Text" parameter. Choose Expression > Change Language to Python

4. Right-click on the Font SOP's "Text" parameter. Choose Expression > Toggle Expression

5. Right-click on the Font SOP's "Text" parameter. Choose Expression > Edit Expression. Put in your python code. eg. hou.pwd() <and click Apply>

  • Like 2
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...