generated from stilobique/BlenderTemplate
Setup thumbnail param
Update export to find export path without the operator
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import bpy
|
||||
|
||||
from ..utils import get_export_path, get_asset_name
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
@@ -11,6 +12,10 @@ class ConfigRendering(bpy.types.Operator):
|
||||
def __init__(self):
|
||||
self.scene = bpy.data.scenes['Scene']
|
||||
|
||||
self.path_export = get_export_path()
|
||||
self.asset_name = get_asset_name()
|
||||
self.filename_export = Path(self.path_export, self.asset_name, f'TX_Icon{self.asset_name}.tga')
|
||||
|
||||
def execute(self, context):
|
||||
self.set_camera_used()
|
||||
self.set_rendering_panel()
|
||||
@@ -27,7 +32,8 @@ class ConfigRendering(bpy.types.Operator):
|
||||
|
||||
def set_output_file(self):
|
||||
self.scene.render.resolution_x = self.scene.render.resolution_y = 512
|
||||
self.scene.render.filepath = Path()
|
||||
self.scene.render.image_settings.file_format = 'TARGA'
|
||||
self.scene.render.filepath = self.filename_export.as_posix()
|
||||
|
||||
def set_camera_used(self):
|
||||
"""Find the best camera position"""
|
||||
|
||||
Reference in New Issue
Block a user