windows bugfixes

metadata
Wenzel Jakob 2010-11-18 15:24:22 +01:00
parent 81ad511e02
commit 5001152a41
4 changed files with 13 additions and 11 deletions

View File

@ -169,7 +169,7 @@ class RENDERENGINE_mitsuba(bpy.types.RenderEngine, engine_base):
'-Ddepth=%i' % preview_depth,
'-o', output_file, scene_file],
env = env,
cwd = tempdir
cwd = mts_path
)
framebuffer_thread = MtsFilmDisplay({
'resolution': resolution(scene),
@ -252,16 +252,15 @@ class RENDERENGINE_mitsuba(bpy.types.RenderEngine, engine_base):
subprocess.Popen(
[mtsgui_binary, efutil.export_path],
env = env,
cwd = output_dir
cwd = mts_path
)
elif scene.mitsuba_engine.render_mode == 'cli':
output_file = efutil.export_path[:-4] + ".png"
mitsuba_process = subprocess.Popen(
[mitsuba_binary, '-r', '%d' % scene.mitsuba_engine.refresh_interval,
'-o', output_file, efutil.export_path],
env = env,
cwd = output_dir
cwd = mts_path
)
framebuffer_thread = MtsFilmDisplay({
'resolution': resolution(scene),

View File

@ -188,7 +188,7 @@ class EXPORT_OT_mitsuba(bpy.types.Operator):
[mtsimport_binary, '-r', '%dx%d' % (width, height),
'-l', 'pngfilm', mts_dae_file, mts_xml_file, mts_adj_file],
env = env,
cwd = self.properties.directory
cwd = mts_path
)
if process.wait() != 0:
self.report({'ERROR'}, "mtsimport returned with a nonzero status!")

View File

@ -75,8 +75,8 @@ class mitsuba_engine(declarative_property_group):
'type': 'int',
'attr': 'refresh_interval',
'name': 'Refresh interval',
'description': 'Period for updating rendering on screen (seconds)',
'default': 10,
'description': 'Period for updating rendering on screen (in seconds)',
'default': 5,
'min': 1,
'soft_min': 1,
'save_in_preset': True

View File

@ -16,7 +16,7 @@
#
# ##### END GPL LICENSE BLOCK #####
import bpy
import os, bpy
from properties_render import RenderButtonsPanel
from extensions_framework.ui import property_group_renderer
@ -61,10 +61,13 @@ class engine(render_described_context, bpy.types.Panel):
global cached_binary_path
binary_path = context.scene.mitsuba_engine.binary_path
if binary_path != "" and cached_binary_path != binary_path:
binary_path = efutil.filesystem_path(binary_path)
efutil.write_config_value('mitsuba', 'defaults', 'binary_path', binary_path)
context.scene.mitsuba_engine.binary_path = binary_path
binary_path = os.path.abspath(efutil.filesystem_path(binary_path))
actualChange = cached_binary_path != None
cached_binary_path = binary_path
context.scene.mitsuba_engine.binary_path = binary_path
if actualChange:
print('Updating binary_path to "%s"\n' % binary_path)
efutil.write_config_value('mitsuba', 'defaults', 'binary_path', binary_path)
super().draw(context)
class integrator(render_described_context, bpy.types.Panel):