hi there, how do i get the variable to drop teh .hip part when i`m using $HIPNAME so that it returns
scene_01 instead of scene_01.hip
for example.
cheers,
Mark
stripping the .hip extension in $HIPNAME
8736 3 2- MWainwright
- Member
- 119 posts
- Joined: 7月 2005
- Offline
- symek
- Member
- 1390 posts
- Joined: 7月 2005
- Offline
in hscript for example:
`strreplace($HIPNAME, “.hip”, “”)`
or longer:
`substr($HIPNAME, 0, strlen($HIPNAME)-4)`
in python:
hou.hipFile.name()
(in case of noncommercial last two would fail since we have 6 signs: .hipnc)
or (python version of hscript trick):
hou.hipFile.name().replace('.hip', '')
maybe the most certain way:
import os.path
os.path.splitext(hou.hipFile.name())
cheers,
sy.
`strreplace($HIPNAME, “.hip”, “”)`
or longer:
`substr($HIPNAME, 0, strlen($HIPNAME)-4)`
in python:
hou.hipFile.name()
(in case of noncommercial last two would fail since we have 6 signs: .hipnc)
or (python version of hscript trick):
hou.hipFile.name().replace('.hip', '')
maybe the most certain way:
import os.path
os.path.splitext(hou.hipFile.name())
cheers,
sy.
- kikou
- Member
- 25 posts
- Joined: 12月 2005
- Offline
The simplest in HScript seems to be:
$HIPNAME:r
$HIPNAME:r
Frederic Servant / Solid Angle / London
www.solidangle.com
www.solidangle.com
- symek
- Member
- 1390 posts
- Joined: 7月 2005
- Offline
-
- Quick Links