Results 1 to 5 of 5
  1. #1

    Should I have done this in Python instead of C++? (Blender Render Manager App)

    Hello guys,
    I'm working on this little app that will manage a queue of render jobs and easily use background rendering for reducing render times in half! I love using Qt5 and C++ but I'm beginning to wonder if I should have used Python instead. I have no idea if it's irrelevant when you make a standalone application. I'm wondering if I can access the Blender API externally or if it needs to be an add on. I really don't want to make an add-on. I know there's pyQt if I want to use python instead with the Qt framework but as I mentioned, it would still be an external application. Below is a video of my work in progress. There's some stuff I wish I could do but I'm pretty certain I can't with C++ such as tracking the progress of a render, being able to pause blender, etc.

    Last edited by LetWritersWrite; 19-May-17 at 11:22.



  2. #2
    I think you might have more options and some things might be easier to implement if you used Python, but that's just my opinion. But on the other hand if you love C++, I'd go with what works best for me, I guess.
    "Yeah, well, some people meditate, some people get massages. I blend." -Will Smith in Enemy of the State
    AddOn:Store Cameras AddOn:MakeRope AddonOn:Background Image Settings to Frame



  3. #3
    I tried going into the #blendercoders IRC and haven't had much luck. One of the developers said I should make it an add-on but I don't see how this could be possible. Can you use an add on to queue multiple blender jobs? Seems like it needs to be a separate app. Am I missing something?



  4. #4
    You should be able to convert this into an addon, but it would not be a pleasant experience. The issue is Blender's current Python API is extremely limited in terms of GUI elements/widgets and was mostly intended as a way to add simple elements into Blender's existing header bars and side panel's. You might be able to expand your options by re-implementing Tkinter, but that would make for a considerable amount of trial and error.

    Not sure about queuing render jobs. Only thing I can think of would be to look into how other render addons like Blender to Backburner or Kostex's Quick Render Slot Selection work.
    Last edited by nBurn; 22-May-17 at 14:12.



  5. #5
    Member kilon's Avatar
    Join Date
    Sep 2007
    Location
    Greece , Athens
    Posts
    1,703
    It's not true that the API is limited I am making an addon with completely custom GUI. This is possible because blender gives access to its OpenGL context via bgl module and you can do some insane stuff with this ability.

    Should you have done this in Python ? Not necessarily however Python has two very large advantages

    1) it has access to Blender Python API which is the only official blender API. C++ has no API for blender ,you can only modify the blender source but Python can do also the same. But source has barely any documentation compared to the blender Python API
    2) Python is light years ahead when it comes to ease of use and efficiency of debugging compared to C++

    so yes python must must be your number one choice unless you do something that need to execute fast in that case you should use C++ and Python or C++ alone depending on what you doing.

    Blender addons are extremely powerful and blender Python devs barely scratch the surface of what is possible with them because blender imposes no limitation on Python and Python is both a more powerful and more popular language than both C and C++. It rare for a C++ library not to have wrappers for Python but not vice versa.
    http://kilon.blogspot.com/ <--- This my blog, you will find things i make here like music, 3d and 2d graphics and python programming.




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •