Hi!
I'm using a Detail Wrangle to generate a Mel script to be used in Maya. There's one line that Houdini hates. It's this:
$createSetResult = `sets -name "column"`; (the Mel script I'm trying to create)
I had three problems:
- quotes(")
- dollar symbol($)
- backticks(`)
For the quotes("), I can simply use a chs("quote_symbol") so I cant place a quote in that channel instead of writting it directly in the script. For the dollar symbol($), same thing but I change the Expression Language to Python instead of Hscript (icon top right).
The backtick(`) is my biggest probleme. I can't use it directly in the script and I cant use it in a chs() (python or Hscript). What option do I have?
-Olivier
String Errors: "Unable to evaluate" because of backticks {[SOLVED]}
696 4 0- olivierth
- Member
- 1007 posts
- Joined: April 2017
- Offline
- Enivob
- Member
- 2537 posts
- Joined: June 2008
- Offline
- alexwheezy
- Member
- 201 posts
- Joined: Jan. 2013
- Offline
- olivierth
- Member
- 1007 posts
- Joined: April 2017
- Offline
- Enivob
- Member
- 2537 posts
- Joined: June 2008
- Offline
That's cool, Alex. I knew about raw strings in python. I didn't realize you could leverage them inside VEX as well.
I believe sprintf() is an implementation of the printf() function found in the C language. There are a lot of additional modifiers you can add to format number and letters inside a string.
https://www.geeksforgeeks.org/printf-in-c/ [www.geeksforgeeks.org]
I believe sprintf() is an implementation of the printf() function found in the C language. There are a lot of additional modifiers you can add to format number and letters inside a string.
https://www.geeksforgeeks.org/printf-in-c/ [www.geeksforgeeks.org]
Edited by Enivob - Nov. 24, 2023 16:12:36
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
-
- Quick Links