Search code examples
c#pythonazureblenderazure-batch

Existing code on github, principal functions never called


I am trying to work on an addon developed by Microsoft Azure for his old Cloud Service. The aim is to render Blender scenes using the Azure environment.

Here it is : https://github.com/Azure/azure-batch-apps-blender

As Microsoft doesn't support this addon anymore, and as it was originally created to work with the old Azure, I want to update it and make it work with the new Azure. Basically, here is what I understood :

  • The python part is the Blender part, it defines the Blender UI, authentify the user and register the assets (Blender models ?) into Azure. Then it should start the process.
  • The C# part is the Azure part, aims to be executed on Azure and has a reference to an executable of Blender. It has a class to split the calculus and an other class to process the calculus.

I'm using Visual Studio 2015 and Blender 2.77a.

What I don't understand is that the code seems to be short, especially the C# one. I don't understand how the split part is done (there is no logic around the blender model) and I don't understand why the principal functions of the principal classes (like Split in JobSplitter.cs) are never called ? Did I miss some code ?

I spent some days on various general documentation around Azure, but it didn't helped me that much with this specific application. I also asked Microsoft but this product isn't supported anymore.


Solution

  • Thanks for your interest in the Blender plugin! The "missing code" that you mention here is actually part of the old Batch Apps C# SDK, which exposed an interface, allowing us to override select functions with Blender specific functionality. While I'm afraid I can't find any old documentation for it, this project should no longer be necessary, as using the Batch API, the tasks can be constructed in Python from the Blender plugin.

    I've actually started porting this plugin to support the Batch API. You can find my code in the dev branch of my fork here: https://github.com/annatisch/azure-batch-apps-blender/tree/dev

    There's still a lot of things that I have yet to clean up, including the dependency checking - but I've put some instructions in the issue filed here: https://github.com/Azure/azure-batch-apps-blender/issues/7

    I'm hoping to make some progress on this project in August after Siggraph. Though I would be happy to accept any PRs!

    Regarding the cloud-side code, as I mentioned above, this is now no longer necessary (though I may re-introduce something similar later for richer feature support) - as the entire cloud-side task is constructed within the plugin. The downside to this is that at present I haven't implemented the persisting of rendered frames to Azure Storage, but you can download them using the Azure Portal before the VM pool is deleted. This plugin currently runs only Linux nodes for rendering (Ubuntu) and installs Blender dynamically with apt-get.

    Please post to the Github issues board if you have any trouble using the updated plugin and I'll be happy to help. :)

    Cheers