Jump to content
xisto Community
Sign in to follow this  
unimatrix

Xgrid With Php Creating a script to post a blender file to Xgrid using PHP

Recommended Posts

I am doing pre planning for the blenderxgrid.com script. I was originally going to do this with PERL, but elected against it. Eventually I'll be moving the site off Xisto and replacing it with a website hosted on the same machine as the xgrid controller. I am setting up a test version on my latop using OSX's apache server, MySQL, and PHP on a localhost config. Here is my step list for the script:-------------------------------------Form: (within Xoops CMS, so user will have to be logged in)UsernamePassword[file upload] (where they can upload the .blend file)Start Frame: first frame of animationEnd Frame: last frame of animation-------------------------------------------Step 1: Check username & password against xoops databaseStep 2: ensure file is a .blend else die ("Sorry, not a blender file")Step 3: Upload file to /gridjobs/ & report successStep 4: $filePath = "/gridjobs/" . "$fileName";$blenderPath = "/blender/blender.app/Contents/MacOS/blender -b" . $filePath . "-s " . $startFrame . "-e " .$endFrame . "-a";system ('xgrid -h localhost -p password -job submit $blenderPath', $results);print $results;?>That's what I got so far. Any other ideas or corrects welcome. It's been a couple years since I last programed anything from scratch.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.