Render Button & Camera Manager For Blender 3+ [QUICK FIX 07/04/2022] - v0.3.9

[QUICK FIX 07/04/2022] : Render Button & Camera manager for Blender 3+ - v0.3.9

Hi !

A quick fix for the variable type error that occurs in blender v3+ when adding a camera or using the “Save Custom Resolution” feature.

render_button.py (V 0.39 - 170.0 KB)

related to:

An update come, later, this year … or in 2023 at the latest… stay tuned :slight_smile:

happy blending !

] QUICK FIX 07/04/2022




[UPDATE 07/01/2020] : Render Button & Camera manager for Blender 2.81 - v0.3.7

Ok ! After a lonnnnnng week :slight_smile:

WHAT’S NEW:

Two bug fixing for this first new year release

Bug fixed:

In the previous version (v036) In selection menu, if you choose “invert” when all the cameras are selected you get an “IndexError” error.

036_b01

Bug fixed:

related to this post

In the previous version (v036) If you render an image whith autosave and output format set to a video format ( AVI, FFMPEG …) you get a “RuntimeError”

Download link:
render_button.py (170.0 KB) - v0.3.7 -[UPDATE 07/01/2020]

All the best for new year !

Happy Blending !




Hi all blender maniacs

If you’re nostalgic like me and want a render button in blender 2.80, take a look :

The RENDER BUTTON in PROPERTIES >Render section (Frame or Animation mode)

The RENDER BUTTON tab in 3d view (Frame or Animation mode) and CAMERA MANAGER
12/06/2019



with this add-on you have:

  • Render Frame & Render Animation in all in one button.
    You simply have to toggle the property button next to the Render button to switch from one type of rendering to another

  • A panel in 3d view with:

    • RENDER BUTTON like in RENDER PROPERTIES, with output resolution options
    • Viewport RENDER BUTTONS (opengl render) in RENDER BUTTON panel header
    • A CAMERA MANGER with some tools

https://www.youtube.com/watch?v=lTo2qHffA5s

BATCH RENDERING
https://youtu.be/ewINGyye6IA

https://youtu.be/k3cuIBzzmbI

ALARM & POWER OFF
https://www.youtube.com/watch?v=ofTXFaqJZdg&feature=youtu.be

Download link:
render_button.py (183.2 KB) - v0.3.6 -[UPDATE 05/12/2019]


UPDATE HISTORY
UPDATE 05/12/2019 : Render Button & Camera manager for Blender 2.81 - v0.3.6

[UPDATE 05/12/2019] : Render Button & Camera manager for Blender 2.81 - v0.3.6

WHAT’S NEW:

After a few small changes and a long wait… Full compatibylity with Blender 2.81 !
Nothing more for now ( isn’t too bad ! )

Disclamer

During tests, I encountered some unexpected and undocumented crash during batch rendering, only with some files (exactly 5 out of 40).

I still dont know why, but for each of these files, the problem has been solved by saving the file with v2.81 and reopening it before rendering.

Maybe these files has been created with one of the 2.80 beta . I dont know

so if you have a similar problem with one of your files think about it …

Download link:
render_button.py (183.2 KB) - v0.3.6 -[UPDATE 05/12/2019]

Happy Blending !


UPDATE 15/08/2019 : Render Button & Camera manager v0.3.5

WHAT’S NEW:

IMPROVEMENTS IN CAMERA MANAGER:

- Camera Selection In Camera Manager

  • You can now select cameras in “Camera Manager” directly or with a set of specific filters in the new menu for camera selection.

    • Directly: Click on Preview icon to select and shift + click to add camera in selection.

    • In menu: with standard filters (All,None…) or specific (with Track to, Marker, Animation datas or custom resolution)

Mbb035_006

  • In connection with the new selection mode, you can perform a series of actions specific to camera management with the new menu grouping camera tools (Copy tools and Clear tools)

    • Copy Tools: to copy Location, Rotation, Constraint Track To, Animation datas, Custom Résolution, and Lens settings between active and selected cameras

    • Clear Tools: to clear or reset, Constraint Track To, Animation datas, Custom Résolution, and timeline marker for multiple cameras.

Mbb035_005


  • Now you can also perform batch rendering directly with the selected cameras in addition to the previous camera list system.

- Other changes In Camera Manager

  • Now Camera with Animation datas and/or empty Animation datas are displayed with a specific marker .

  • The new camera selection system also introduces changes in the layout of the user interface.

    • In multi-selection mode, only tools that you can use on multiple cameras at the same time are displayed.
    • An option to highlight the selection .

  • New section in Camera Manager Quick Settings for Manager Options.

    • Tools Toggles options to choose which tools to display in the camera manager.
    • Highlighted selection options.

Mbb035_008


UPDATE 28/07/2019 - v0.3.1

[UPDATE 28/07/2019] : Render Button & Camera manager v0.3.1

WHAT’S NEW:

Some Changes in UI Layout:

  • Now Render Button & Camera Manager panel have a new icon in header for global Settings relative to each panels.
    31_01

    • Render panel Settings for Output & Alarm / Power off
      31_03
    • Camera Manager Settings, for set the default lens settings, for new camera (Perspective & Orthographic Camera)
      31_02
  • Camera Manager improvement:

    • Now cameras added in orthographic view are automatically set to orthographic mode.

    • Now you can remove all Timeline Markers at the same time with Shift + Click on Remove marker button.
      31_04

    • Now, the Camera Preview button is a toggle button to switch between the camera view and the perspective view.
      31_05

Download link:
render_button.py (116.3 KB) - v0.3.1 -[UPDATE 28/07/2019]

UPDATE 19/07/2019 - v0.3.0

[UPDATE 19/07/2019] : Render Button & Camera manager v0.3.0

WHAT’S NEW:

Issues:

  • Fixed “None Type” error when remove camera with “Track To” constraint if target was removed before.

  • Fixed error resulting in an endless addition of render slots, when use batch rendering with “Select camera” mode and “Store in render slots” option.

New Features:

  • Now you can remove all cameras in one time with Shift + Click on Delete button of any camera in the Camera Manager.
    Screenshot_20190719_013118

  • Now you can define a square rendering dimension, with Shift + Click on “Toggle orintation” button.

Screenshot_20190719_013038

  • Now “Add Camera To View” can be achive with “alt C” shortcut.

Screenshot_20190719_013106

Download link:
render_button.py (106.1 KB) - v0.3.0 -[UPDATE 19/07/2019]


UPDATE 16/07/2019 - v0.2.8 & v0.2.9 ( MacOS)

Power Off tested on MacOS High Sierra v10.13 (thanks ELIANA) and seems to work properly so…

Download link for testing purpose on MacOS :
render_button.py (104.1 KB) - v0.2.9 -[UPDATE bis 16/07/2019] with MacOS Power Off unlocked

V 0.2.8 and v0.2.9 are same. Only Power off fonction is unlocked for MacOS in v0.2.9 so anyone can use it.

[UPDATE 16/07/2019] : Render Button & Camera manager v0.2.8

  • New ability to play sound alarm when render is done with option to play loop or repeat x time the sound.

  • New ability to power off when render is done with option for timeout delay in seconde. if necessary, before power off, a copy of current blend file is saved, alongside the current file, with suffix “_PowerOff”

  • a visual alarm for each event in 3d VIEW panel, in PROPERTIES windows (all area) and in IMAGE EDITOR tab tool

  • New layout for autosave render

https://www.youtube.com/watch?v=ofTXFaqJZdg&feature=youtu.be

https://www.youtube.com/watch?v=ofTXFaqJZdg&feature=youtu.be

CAUTIONS:

Power off after rendering is an option that must be used with care, please test first with simple scene or copy of your work.

Tested it on Ubuntu 18.10 and derivatives (mint 19.1 and PopOs) and Windows 7 (yes SEVEN) so I think it should work on windows 10

I can’t test on MacOS so only the timeout is running ( i think) , the power off option is disabled. I coded a function but I do not know if it works. if a macos user wants to test…


QUICK FIX 02/07/2019 : Render Button & Camera manager v0.2.6

CAMERA MANAGER:

  • in the previous version (v025), adding a standard timeline marker without a linked camera or opening a blender file with this type of marker, removes the Cameras Manager UI due to a “None Type” error.

render_button.py (77.4 KB) - v0.2.6 - [QUICK FIX 02/07/2019]


UPDATE 29/06/2019 : Render Button & Camera manager v0.2.5

CAMERA MANAGER:

Camera Indicator

  • In previous versions, the camera indicator works INDEPENDENTLY of the context in multiple views. Now, the camera indicator works ACCORDING to the context in multiple views

Batch Rendering

  • For the time being, if render display option is set to fullscreen when you use batch render, you lose the layout of the current workspace.

    So in previous versions, to avoid this problem, the render display option was always set to “image editor”, regardless of your choice in the Display menu.

    From now, only the option “rendered in full screen” is overridden by “image editor”. All other options are usable.

  • New section for Output options

    • To choice the render output path
    • To store each camera output in a render slot

UPDATE 24/06/2019 : Render Button & Camera manager v0.2.4

WHAT’S NEW:

CAMERA MANAGER:

  • New batch rendering option for render a selection of cameras

https://youtu.be/ewINGyye6IA

https://www.youtube.com/watch?v=ewINGyye6IA

BUG AND INCONSISTENCIES FIXES

  • No more “None type” error when remove Track to “empty” after using align camera to view, in perspective view.

  • Pre-existing or added camera markers without the Marker button (in the timeline or with another extension) are now correctly displayed by the marker button.

  • Panels header with additional buttons or infos (Render button and Quick settings) use now panel title standard text style

  • More compact ui layout in render button panel


UPDATE 16/06/2019 : Render Button & Camera manager v0.2.2

BUG AND INCONSISTENT BEHAVIOR FIXES

  • Click on remove camera:

  • removes Timeline Marker if exist.

  • removes Track to Target if is type is an empty.

  • Render Tab (render button & Camera manager) only active in OBJECT mode

  • Click on “Render Frame” button:

  • when an object is selected, selects the scene camera as the active camera and not the object .

  • when there is no camera configured to be the scene camera, set the first camera as the active camera.

  • when there is nothing active or selected (‘NoneType’ error), select the scene camera as active camera, otherwise, set the first camera as active camera

  • when there is no camera show message.


UPDATE 12/06/2019 : Render Button & Camera manager v0.2.1

CAMERA MANAGER

  • Ability to define custom resolution per camera
  • Option to render all Camera in same time (with and without timeline marker in same time)
  • Option to only render cameras with a Timeline Marker
  • Ability to add and remove “Track To” Constraint with same button
  • Ability to add and Remove Timeline Marker with same button
  • Some changes in ui layout

RENDER BUTTON TAB:

  • New preset menu in Dimensions panel header
  • Opengl rendering buttons, moved in the header of the render button tab
  • Some changes in ui layout

CAUTIONS:

  • Make sure the cameras are not in a hidden, deactivated or not selectable collection

  • Make sure the cameras are not hidden, deactivated or not selectable

  • Render all cameras & Render markers use Output Settings in PROPERTIES > Output to store the rendered images.

  • “RENDER IMAGE” button, in 3D VIEW TAB & PROPERTIES panel, override built in function, to allow render with custom resolution and render cameras with and without Time line Marker, in same time

  • “RENDER IMAGE” in the render menu and the F12 shortcut are not changed, they use the built-in function, so they ignore the custom resolution and the ability to mixe cameras, with and without Timeline Marker, in same scene.


UPDATE 27/05/2019 : Render Button v0.2.0

NOW RENDER BUTTON AND RENDER BUTTON TAB MERGE IN ALL IN ONE ADDON: render_button.py
WHATS NEW IN THIS UPDATE:

Now in camera selector “Align Camera to Active View” , “Align Camera to Selected Object” and “Track to Selected Object” buttons have two different context related actions :

  • “Align Camera to Active View” button: Align to Active view OR to Cursor
  • “Align Camera to Selected Object” button: Align to Objects OR View All
  • “Track to Selected Object” button: Track to Object Selected OR Track to New Empty
  • Tooltips updated with more infos
  • Reorganized and cleaned code (a little)
  • Some bugs fixes

UPDATE 23/05/2019 : Render Button tab v0.1.2
  • New Render region option in “Dimensions” settings.
  • New “Active & Preview” button in camera selector, for better visibility. Now the icon changes appearance depending on the active camera. (on/off state)
  • New “Quick Settings Box” relative to active Camera, in Camera Selector. Only visible when a camera selected. (click on header or radio button to open/close).
  • Some bugs fixes

UPDATE 19/05/2019 : Render Button tab v0.0.7/ Render button v0.0.2
  • New layout for Render button and property to switch between Render animation / Render frame
  • New section in render button tab for output resolution with property to switch between Landscape / Portrait render
  • New layout for “Use local camera” and “lock camera to view” properties in render button tab, section camera selector & tools.
  • Some bugs fixes

UPDATE 13/05/2019 : Render Button tab v0.0.6
  • Some changes in the layout of the options in render button > camera selector
  • Adding new camera options in camera selector


Bibliography

https://docs.blender.org/api/blender2.8/bpy.types.RegionView3D.html

https://docs.blender.org/api/blender2.8/bpy.app.handlers.html

https://docs.blender.org/api/blender2.8/bpy.types.UILayout.html

https://docs.blender.org/api/blender2.8/aud.html

https://docs.blender.org/api/blender_python_api_current/bpy.path.html#bpy.path.relpath


https://blender.stackexchange.com/questions/7590/is-there-a-way-to-make-an-operator-know-if-the-context-viewport-is-in-ortho-or-p

https://blender.stackexchange.com/questions/30643/how-to-toggle-to-camera-view-via-python

https://blender.stackexchange.com/questions/43764/bind-camera-to-marker-via-python

https://blender.stackexchange.com/questions/6512/how-to-call-invoke-popup

https://blender.stackexchange.com/questions/109711/how-to-popup-simple-message-box-from-python-console

https://blender.stackexchange.com/questions/6842/how-to-get-the-directory-of-open-blend-file-from-python

https://blender.stackexchange.com/questions/7686/how-to-set-cameras-type-to-orthographic-with-python-scripting

https://blender.stackexchange.com/questions/19416/what-do-operator-methods-do-poll-invoke-execute-draw-modal/19431#19431

https://blender.stackexchange.com/questions/71454/is-it-possible-to-make-a-sequence-of-renders-and-give-the-user-the-option-to-can/71830#71830

https://blender.stackexchange.com/questions/41387/how-to-deactivate-a-ui-element-in-an-add-on

https://blender.stackexchange.com/questions/132125/how-do-i-make-a-pop-up-dialog-that-goes-away-when-pressed-ok

https://blender.stackexchange.com/questions/58711/python-check-if-file-was-saved

https://blender.stackexchange.com/questions/26224/force-each-new-render-into-sequential-render-slot

https://blender.stackexchange.com/questions/73286/how-to-call-a-confirmation-dialog-box/73548#73548

https://stackoverflow.com/questions/8384737/extract-file-name-from-path-no-matter-what-the-os-path-format

https://stackoverflow.com/questions/28438247/computer-shut-off-python-3-4

https://stackoverflow.com/questions/23013274/shutting-down-computer-linux-using-python

https://blender.stackexchange.com/questions/53947/how-to-filter-multiple-file-extensions-to-limit-which-files-display-in-an-operat

https://docs.python.org/3/library/os.path.html

https://blender.stackexchange.com/questions/99016/how-to-remove-all-only-rotation-keyframes-from-current-action-with-python


I am not a coder but i want it so i make it !

would really appreciate any feedback!

happy blending !

54 Likes

It’s great!

I still can’t get WHY THEY REMOVED THIS BUTTON from official build. GREAT WORK @Hokuss !!!

yeaaaaah we are not the only ones on this little blue planet to whom these simple buttons are missing…:wink:

thank’s for your comment and happy blending!

Done some blending and yours render tab is briliant! Real time saver

1 Like

thank you. Your job is very good

Very useful addon! Thanks a lot!
1 thing that I found is in render_button_tab.py doesn’t appear buttons for veiwport render in corner of 3d veiwport.

@ViAdvena Woooow ! We are connected in one way or another, Awesome, Mystical, Ssscaryyyyyy … that’s a corrected thing in the new update available soon.

@everybody thanks. Glad that it can be useful

1 Like

[UPDATE 27/05/2019] : Render Button v0.2.0

NOW RENDER BUTTON AND RENDER BUTTON TAB MERGE IN ALL IN ONE ADDON: render_button.py

Please to install this update REMOVE totally all previous render button addons.
Restart Blender THEN install this update.

WHATS NEW IN THIS UPDATE:

  • Now in camera selector “Align Camera to Active View” , “Align Camera to Selected Object” and “Track to Selected Object” buttons have two different context related actions :

    • “Align Camera to Active View” button: Align to Active view OR to Cursor

    • “Align Camera to Selected Object” button: Align to Objects OR View All

    • “Track to Selected Object” button: Track to Object Selected OR Track to New Empty

mbb020_001a

  • Tooltips updated with more infos

  • Reorganized and cleaned code (a little)

  • Some bugs fixes

screenshots and download links updated see first post

happy blending!

@Hokuss Hey, thanks for this really useful addon, especially the switch render dimension button, its really helpful.

I don’t know if anyone experiencing this issue, but whenever i switched to another application templates, the render button on the render tab and viewport got duplicated, so if i switched to another application template again, then it will be duplicated again.

do you have any idea why it’s happening?

image

hi sandyadriadi

Yeaaaaah “This isn’t really a bug, but an undocumented feature.” …

So. I know the problem. For the render buttons in PROPERTIES WINDOW and 3D VIEW Header i use the appending / prepending method to extend existing panel. But with this method, each time the script is reloaded, the elements are added over and over again,
to solve the problem to remove duplicates you have to restart blender. That’s how this method works

I don’t use application templates feature, but i think when you use this, script are reloaded, so…

I don’t know yet if I can avoid this problem, with this method, if there is a specific way to do it

But I am aware and I work on a workaround. An update come this week …

thanks and happy blending!

thanks for the follow up, i know maybe not everyone use application template features yet, in fact, i just did it recently, it’s quite useful when u want to starts editing in blender with specific task in mind (e.g. sculpting only, or animation nodes editing only) and choose only a bunch of addons activated so that the toolbar/tool tab manageable, cause i find the workspace filter addons feature quite slow to tweak as it defaults to all addons being turned off as starting points.

And i think restarting blender not really solved the problem, because when Blender is opened, it defaults to the general template before i could jump to another template. the only way to avoid this would be turn off the addons at the startup, and turned it on after i switch to another template.

thanks again and happy blending too!

[UPDATE 12/06/2019] : Render Button & Camera manager v0.2.1

WHAT’S NEW:

CAMERA MANAGER:

  • Ability to define custom resolution per camera
  • Option to render all Camera in same time (with and without timeline marker in same time)
  • Option to only render cameras with a Timeline Marker
  • Ability to add and remove “Track To” Constraint with same button
  • Ability to add and Remove Timeline Marker with same button
  • Some changes in ui layout

RENDER BUTTON TAB:

  • New preset menu in Dimensions panel header
  • Opengl rendering buttons, moved in the header of the render button tab
  • Some changes in ui layout

CAUTIONS:

  • Make sure the cameras are not in a hidden, deactivated or not selectable collection
  • Make sure the cameras are not hidden, deactivated or not selectable
  • Render all cameras & Render markers use Output Settings in PROPERTIES > Output to store the rendered images.
  • “RENDER IMAGE” button, in 3D VIEW TAB & PROPERTIES panel, override built in function, to allow render with custom resolution and render cameras with and without Time line Marker, in same time
  • “RENDER IMAGE” in the render menu and the F12 shortcut are not changed, they use the built-in function, so they ignore the custom resolution and the ability to mixe cameras, with and without Timeline Marker, in same scene.

screenshots and download links updated see first post

happy blending!

The addon seems broken (on macOS)

To reproduce:

  1. create a new default scene
  2. open the tools panel - Render tab with the “n” key
  3. hit the “Render frame” button.

The view seems to twist away, the rendered image is gray.

Upon hitting “Render frame”:

  • the active object is set to be the active camera in the scene (check the scene properties)
  • in the tools panel, the active camera selection in the tools panel is undone (no camera is selected as active)

This happens regardless of the number of cameras in the scene. The settings in the tool panel are ignored/undone, the active object is always set to be the active camera.

I expect to never have the active object to automatically become the active camera, this should always be the activated camera in the tools panel.

Yeaaaaah one more ! I didn’t see that one

a little update was planned for this weekend

Thanks r.vanwees

1 Like

Thanks @Hokuss, looking forward to it!

As other people have also said, this will save me so much headache :grinning:

When I saw your addon, it immediately struck me as it is very similar to what I have tried to do some months ago, but didn’t have the time nor the skills to achieve.

But yours is definitely at another level. I love how you arranged the rows for every camera, and renaming the cameras from there is also very neat. The overall appearance of your addon is even very good looking. Congrats! I’m starting to use yours now. ^^

A few suggestions if you don’t mind, if you could make the following:

  • “Active & Preview Camera” button to be a toggle (click once, it goes into camera view, click again, it reverts back to viewport view and sets the icon to ‘RESTRICT_VIEW_OFF’ again).
  • Make the option to sort cameras either “Alphabetically” and “By Collections”, this is how I did it back then:
    Sorting%20by%20collections

[UPDATE 16/06/2019] : Render Button & Camera manager v0.2.2

BUG AND INCONSISTENT BEHAVIOR FIXES

  • Click on remove camera:

    • removes Timeline Marker if exist.
    • removes Track to Target if is type is an empty.
  • Render Tab (render button & Camera manager) only active in OBJECT mode

  • Click on “Render Frame” button:

    • when an object is selected, selects the scene camera as the active camera and not the object .
    • when there is no camera configured to be the scene camera, set the first camera as the active camera.
    • when there is nothing active or selected (‘NoneType’ error), select the scene camera as active camera, otherwise, set the first camera as active camera
    • when there is no camera show message.
Outdated

render_button.py (68.2 KB) - v0.2.2 - [UPDATE 16/06/2019]

happy blending!

2 Likes

Thanks @Hokuss!

Just a small UI question/suggestion about the panel title, i found that the label “Render Button Tab” is using widget text style, but the “Camera Manager” label is using panel title text style?
image

it’s not a big issue but maybe it could be tweaked in next update for consistency with other panels and/or for the theme that using different type size.