Chris Angelius

chrisangelius

About Me

My name is Chris Angelius and I am an award winning Canadian born, Sydney based freelance motion designer and art director. In 2005 I graduated from the Southern Alberta Institute of Technology (SAIT) with a degree in New Media Production and Design, and in 2010 I graduated from the University of...  more
EXPERTISE
Freelancer
INDUSTRY
Advertising / Motion Graphics

Connect

LOCATION
Australia

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Autosave 456.py Jan. 21, 2019, 5:38 p.m.

It's been pointed out that the above snippet is actually hscript and not python but even changing the script to a .cmd file which should allow hscript to be run at launch doesn't actually work.

I'm now using
import hou
hou.appendSessionModuleSource('''hou.hscript("autosave on")''')

which defaults autosave to on but would prefer to have the option of enabling it via a popup dialogue at the start of each session.

If anyone has any idea how to code that it would be appreciated.

Autosave 456.py Jan. 20, 2019, 8:16 p.m.

Hi guys,

Trying to get this python script I came across to work in H17.

# Ask about turning on Autosave
# but only if running interactive Houdini session!

set fullver = `run(“version -n”)`
set app = `arg($fullver,0)`

if(`strcmp($app,“hscript”)` < 0 && `strcmp($app,“rscript”)` < 0 && `strcmp($app,“hbatch”)` < 0)
set turnOn = `run(“message -b Yes,No -d 0 Turn on Autosave?”)`

if($turnOn == 0)
autosave on
endif
endif


Console is giving me a syntax error on startup.
Error running Python code:
SyntaxError: ('invalid syntax', ('DUsers/Chris Angelius/Documents/houdini17.0/scripts/456.py', 4, 11, ‘set fullver = `run(\x93version -n\x94)`\n’))