www.BinaryAlchemy.de :: View topic - Python Scripts as PostDone Script
 SearchSearch   RegisterRegister  ProfileProfile   UsergroupsUsergroups   Log inLog in 
If you create a new post, please use a topic that describes your problem
Documento sin título
 
Python Scripts as PostDone Script

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.BinaryAlchemy.de Forum Index -> old - RR Plugins/Extensions/SDK/configs - v6.x
View previous topic :: View next topic  
Author Message

jaden



Joined: 06 Mar 2013
Posts: 14

PostPosted: Wed Mar 06, 2013 5:00 pm    Post subject: Python Scripts as PostDone Script Reply with quote

Hello there,

I am new to RR and dont know if this is possible, but I would like to upload a rendered file to my webserver after the file is done rendering. Is this possible with a postDone script? And if so, can I use python to do it? Or what alternatives do I have?

I'd be thankful for any pointers,

cheers! jaden
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3785

PostPosted: Wed Mar 06, 2013 5:13 pm    Post subject: Reply with quote

Hi
You can start any commandline in a post-script.
So you can run for example
python.exe myscript.py <ImageDir>

And with the python script you can upload your files.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

jaden



Joined: 06 Mar 2013
Posts: 14

PostPosted: Wed Mar 06, 2013 6:00 pm    Post subject: Reply with quote

Thanks for your quick reply, although I could need some more help here Smile

This is what my .cfg file looks right now.

PrePostType=post

PrePostChecked= 1
PrePostShowParamA= 0
PrePostShowParamB= 0
PrePostParamA= 100
PrePostParamB= 100
AllowedForSingleOutput = 1

CommandLine_Win=
"<rrBin>python.exe" "<path_to_script>" "<path_to_file>"


_____

Is the syntax correct? Where can I look up the required syntax?

Can I get the path to the file from RR? how can I ask for the path from inside my python script?

sorry for the many questions and thank you for your help/time.

jaden
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3785

PostPosted: Wed Mar 06, 2013 6:10 pm    Post subject: Reply with quote

Hi

<rrBin> is the RR\bin\win\ folder for the rr Executables.
You have to use the full path to your python exe instead.

The possible variables are shown in rrHelp section customization, render config.

You can also take a look at the SequenceCheck post-script to check how that program gets the image directory and name.

I do not know how you can get commandline parameters in python, but that information should not be hard to get.
Example search:
http://www.tutorialspoint.com/python/python_command_line_arguments.htm
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

jaden



Joined: 06 Mar 2013
Posts: 14

PostPosted: Wed Mar 06, 2013 6:18 pm    Post subject: Reply with quote

Thank you for your help again.

I am going to check it out.


jaden
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.BinaryAlchemy.de Forum Index -> old - RR Plugins/Extensions/SDK/configs - v6.x All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
 
Documento sin título
 



Powered by phpBB © 2001, 2002 phpBB Group



Number of shameful bots caught by Anti-Spam ACP: 1667