Coder Social home page Coder Social logo

Comments (7)

jeinselen avatar jeinselen commented on May 18, 2024

@gitsamhub Happy to hear you like the add-on!

Background details

ASR relies on a saved project location for multiple purposes:

  1. Determining where to save image files (saving an absolute path in your default Blender template could be a workaround for this)
  2. Defining the project name variable (as you state, this isn't always needed)
  3. Defining the naming pattern when saving with auto-generated serial numbers (this can be a lot more important!)

After working back and forth on the problem a bit (and a particularly silly bug I introduced during the process that left me scratching my head for...a bit), there is now a branched version of the add-on you can use.

Limitations and requirements:

  • You must set an absolute path in the autosave output directory (if you don't want to set that every time, save it in your startup file)
  • It won't play nicely with custom strings with serial numbers (it would reset to your startup file value every time you open Blender, overwriting any previously rendered images as you render new ones)
  • It also has to use "Blender" as a stand-in for the missing project name (the "Project Name + Serial Number" preset, which is the only way to get non-overwriting serial numbers with this unsaved-project feature, will name all output files "Blender-####")
  • If you must use a custom string in the output, you'll need to use date and time variables to prevent overwriting

Alternative solution

You could set up a File Output node in the Compositing tab with an absolute path and date and time variables to ensure unique output file names. Saving this in your startup project would auto-save all renders by default, it wouldn't require saving the project first, and also wouldn't rely on merging future updates into this alternate branch.

Download link

But with that said, you can download the modified version here:
https://github.com/jeinselenVF/VF-BlenderAutoSaveRender/raw/Support_Unsaved_Projects/VF_autoSaveRender.py

Future development

Further integrating the unsaved-project feature (such as with safeguards against manual serial numbers overwriting previous files) takes the scripting in a messy direction I'd like to avoid, so I doubt this will find it's way back to the main branch. But I hope it helps as a one-off feature? Please let me know if it works for you!

from vf-blenderautosaverender.

gitsamhub avatar gitsamhub commented on May 18, 2024

Sorry for late response. I was away from my machine.

And thank you for taking time and explaining all the technical details. However, I am sort of new to Blender and have hard time understanding technical stuff.

Regarding your 'Alternative solution' I will search for setting up a File Output node in the Compositing tab with an absolute path and date and time variable. If possible could you explain how to do that?

My requirements remains the same of blender auto incrementing file names.(Not sure if that is possible)

from vf-blenderautosaverender.

jeinselen avatar jeinselen commented on May 18, 2024

@gitsamhub To implement the alternate solution you'll want to enable "Use Nodes" in the "Compositing" tab (it's a checkbox in the panel menu bar). This will give you "Render Layers" and "Composite" nodes, to which you'll want to add a "File Output" node and connect the render output to it. See attached image.

Screen-Shot-2022-08-24-at-7 07 42-PM

However; if you must have auto-incrementing serial numbers (as opposed to date and time) without saving your project file first...you'll have to use the custom version of the plugin I posted as a download link above. You'll need to uninstall the official plugin first, then install this alternate version. To enable rendering in un-saved scenes, you'll have to customise your default starting project.

  1. Make sure the custom version of the plugin is installed and enabled
  2. Open a fresh default scene in Blender
  3. Without changing anything else, enter an absolute path in the Auto Save Render output path in the render output properties panel (simply choose a folder on your system that you want to always render to)
  4. File > Defaults > Save Startup File to save this modification as your default starting project

Whenever you open Blender and render something (even the default cube), it should save a "Blender-####" file with auto-incrementing serial number in the selected folder.

from vf-blenderautosaverender.

gitsamhub avatar gitsamhub commented on May 18, 2024

I did exactly as you said about the 'custom version of the plugin' you posted above. For some reason it is not working or may be I am missing something.

I reset my Blender to all factory settings and tried several times with fresh installation of plugin. But whenever i press f12 for render, i don't see any image being saved in path i have given in auto save render path.

Just for the info in case there is any path issue:
I am on Windows 10.
Blender Version: 3.2.2
This is Blender zipped file version which i have copied to my C drive.

For the sake of clarity I would like to explain what is desired functionality I am looking for.
-I want to save render images of unsaved/saved files to the absolute path of choice without being overwritten.
-As a matter of fact It doesn't need to be auto-save all images.

-I would like to mention course of action as below:

  1. Open Blender
  2. Press f12 to render image
  3. If I like the output, I save the image with custom hotkey(this should automatically save image to the absolute folder path without being overwritten).

(Now here is the daunting task in Step 3. If i press Alt+S or custom hotkey for saving image, blender goes to default documents folder. Then I have to choose my desired output folder in another drive. Now If i save the image without any confirmation Blender overwrites the untitled image. I close the blender and open it for the next time. I render the image. Now imagine I have already saved dozens of images in that folder. So i have to scroll through all that stuff and again have to follow all the above steps just so that image does not get overwritten. )

For time being I am just leaving this. And I will wait for your next version of official release. My requirements may not exactly match with the purpose of this particular add-on. Regardless, your add-on is best and comes with other functionalities that might be suitable for other user workflows.

from vf-blenderautosaverender.

jeinselen avatar jeinselen commented on May 18, 2024

@gitsamhub It was working for me, but I don't have a Windows computer to test on (macOS Monterey 12.5.1, Blender 3.2.2). That said, I did discover the version posted here on GitHub was missing a key line that substituted "Blender" for the project name when unsaved. Though this doesn't explain why nothing was being saved on your machine; it should have stilled saved a "-0001.png" file. I've committed the correction, so if you re-download the file linked above you'll have an updated version with the latest features (1.8.5). It will also be labeled as "Support_Unsaved_Projects branch" in the Blender plugins list now, to better define which branch is installed. See the attached screenshot for the settings that tested successfully on my machine when saved in the default starting file.

Screen Shot 2022-08-25 at 11 19 35 AM

This plugin was definitely never designed for selective saving from the render window though, and it sounds like maybe that's what you're looking for.

from vf-blenderautosaverender.

gitsamhub avatar gitsamhub commented on May 18, 2024

Thank you for posting the screenshot, I could not have found the issue otherwise.

I noticed that variables section was missing in my add-on screen as shown in above screenshot. After couple of tries install and uninstall, I noticed that console was giving error of missing VF_autoSaveRender.py. The problem was regarding file name. So when i clicked on the custom add-on link provided above, it opened as raw plane text in new tab. I was saving that file again with the .py extension. I am sure it has to do something with the error. So after that i tried right click and save as file the above link. And guess what, It worked. :)

This is almost close to the functionality I was looking for and thank you for that. It will save every image without replacing them, only thing is I will have to check and select particular images and delete the other images every now and then. But I think this is much better than my earlier default workflow.

Only If is it possible to have the same functionality as above but for the selective renders, then that would be very helpful. But as of now i leave that to you, since i am not aware of the technical limitation regarding same.

Thank you for your time.

from vf-blenderautosaverender.

jeinselen avatar jeinselen commented on May 18, 2024

@gitsamhub Glad it's working for you now!

Selectively/manually saving renders isn't what this add-on is designed to address, but I'm sure someone could make it if they wanted to. The serialisation code (scanning a directory and generating the next appropriate number) was something I retained from the original Render Auto Save add-on by Florian Meyer.

from vf-blenderautosaverender.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.