Q: Operator Type Properties Python Script Syntax

   3797   2   0
User Avatar
Member
665 posts
Joined: July 2005
Offline
I'm trying to comment out some code in my Operator Type Properties Script, but am having trouble with indents.



if incomingType != “my_node”:
#hou.ui.displayMessage(“Must be conntected to a Super Node”)
#node.setInput(0,None,0)

The code above gives me
File “Object/fs_wisperImages_v1 OnInputChanged section”, line 16
#node.setInput(0,None,0)

^
IndentationError: expected an indented block


I'm using the tab key, but unfortunately, there don't seem to be a lot of options up front for sorting this syntax stuff out.

Any ideas?

cheers,
-j
User Avatar
Member
1926 posts
Joined: Nov. 2006
Offline
Is there any other code in that If block? If you've commented out all the statements in that block, it will give you that error since it is expecting something to be there. You can try putting in ‘pass’ to tell it to continue on and do nothing.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
665 posts
Joined: July 2005
Offline
That would be it.

Thanks for the quick catch Graham!

cheers,
-j
  • Quick Links