Code that handles no camera in scene.
I noticed that it would spit out a fat error if you try and create an asset preview without a camera in your scene, so I added a couple lines of code to add a camera to the scene if there isn't one.
Temporarily hide objects from asset preview render.
Made it so that any objects that are hidden in the viewport are also temporarily hidden in renders for the asset preview render, which makes hiding objects from the asset preview renders a bit quicker and easier.
UI panel.
Added a simple UI panel with some buttons to call the preview rendering functions and a prop for the preview resolution
Code that handles no camera in scene. I noticed that it would spit out a fat error if you try and create an asset preview without a camera in your scene, so I added a couple lines of code to add a camera to the scene if there isn't one.
Temporarily hide objects from asset preview render. Made it so that any objects that are hidden in the viewport are also temporarily hidden in renders for the asset preview render, which makes hiding objects from the asset preview renders a bit quicker and easier.
UI panel. Added a simple UI panel with some buttons to call the preview rendering functions and a prop for the preview resolution