hscript in apprenctice

   7623   8   2
User Avatar
Member
577 posts
Joined: 11月 2005
Offline
I tried to use the opadd command but it doesn't know any operators.
When I use the helpfile example (“opadd geo arms legs”) it gives me this:

“Unable to create node type geo”

if I type opadd it gives me no operator list as it should

is this functionality locked in the apprentice?

martin
User Avatar
Member
7899 posts
Joined: 7月 2005
Offline
Try doing “opcf /obj/model” first. You need to be inside an Object before you can create a SOP.
User Avatar
Member
141 posts
Joined: 7月 2005
Offline
I think for future versions of houdini, hscript should be updated to allow you to opadd specifying the fulll path rather than being inside the object.

I would rather:

opadd /obj/geo1 sphere funkySphere



No?
/Rick
User Avatar
Member
577 posts
Joined: 11月 2005
Offline
Arghh, ops:

thanks a lot

martin
User Avatar
Member
509 posts
Joined: 7月 2005
Offline
I second Rick on this… i did a python script which add few Sop and Vops… and i had many “opcd” to get this done… which is quiet useless if you can opadd from the “root”…
JcN
VisualCortexLab Ltd :: www.visualcortexlab.com
User Avatar
スタッフ
1283 posts
Joined: 7月 2005
Offline
RickW
I think for future versions of houdini, hscript should be updated to allow you to opadd specifying the fulll path rather than being inside the object.
No?

Hi Rick,
I submitted this as an RFE to R&D.

Thanks,
Rob V.
User Avatar
Member
141 posts
Joined: 7月 2005
Offline
Thanks!
/Rick
User Avatar
Member
166 posts
Joined: 2月 2006
Offline
I think for future versions of houdini, hscript should be updated to allow you to opadd specifying the fulll path rather than being inside the object.
No?

If I remember correctly it was submitted in the past.. but some Houdini architecture prevails to do so..
Time to get out of this messy world.
User Avatar
Member
10 posts
Joined: 7月 2005
Offline
in the meantime you could use a script like this.
it's written on the fly, so excuse me if it's not that elegant.


# opaddglobal.cmd
if ($argc > 2) then
shift
set newDir = $arg0
set dirExist = `opexist($newDir)`
if ($dirExist == 1) then
shift
set oldDir = `run(“pwd”)`
cd $newDir
set op = $arg0
shift
while ($arg0 != “”)
opadd $op $arg0
shift
end
cd $oldDir
else echo Dir does not exist
endif
else
echo usage oppaddglobal.cmd
endif
  • Quick Links