Jump to content

houdini python and mply


mohamaedkamal

Recommended Posts

  • 2 years later...

Hi Bunker,

thanks for the help.

Nope, I am afraid that didn't seem to work.

 

my evaluated end of the string looked like this when I replace $F4.

/geometry/moreframes/box.*.bgeo

 

Googling this I can't seem to find any info on this problem.

 

when picking files manually I noticed it had the frame range in () at the end of the string.

 

like (1-240)

 

but i tried this also adding to the end of the string. but it didnt work. unless it needs to be in a tuple or something.

 

cheers

 

Daniel

 

 

Link to comment
Share on other sites

Hi Again Bunker,

 

thanks so much for your help. im still clutching at straws here.

the function I'm building is basically being run off a right-click menu in a QT widget window. Don't know if that makes a difference.

this is the last part of my function for testing purposes.

filePath = filePath.replace("$F4", "*")

command = 'gplay ' + filePath

subprocess.Popen(command,shell=True)

this is the whats my command variable prints like

gplay C:\Users\Daniel\Documents\NodeShare\Geometry\moreframes\box.*.bgeo

and it's still throwing an error. and yeah I am importing subprocess its at the top of my function.

just get this error.

image.png.f7ce2cd7c203180c6d5c7182005f6b84.png

 

hou 18 - python 2.7

 

cheers

Daniel

Link to comment
Share on other sites

thanks for the heads up malexander. 

 

after a bit of tinkering, I did finally get it to work....

few things to look out for.

in your list of file paths

firstly you have to make sure each string for the file path has a space before.

then I ran into the problem where it would not open file paths that had a white space in the  whole path.

so after a bit of reading, I think because it's a shell operation? I have to have the string encapsulated in " " .

(please correct me if I am wrong on this)

 

so a simplified version below

import subprocess

fileSequenceList = [' "tmp/tmp/box.001.bgeo"', ' "tmp/tmp/box.002.bgeo"', ' "tmp/tmp/box.003.bgeo"']

subprocess.Popen(['gplay', fileSequenceList])

 

if I run into any other hurdles. il post them up.

 

cheers

 

Daniel

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...