diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-09-09 02:46:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-09-09 02:46:14 +0400 |
commit | e6965c46fc1305a37a2778fb1746216f3d482295 (patch) | |
tree | 10f694cbee33ebc5608592076ccd2a1cf4a38202 /release | |
parent | ee78c63beea4e68a4211f218c67357610003e488 (diff) |
patch from Maurice & Patsoko on blenderartist for win32 registry support,
moved "import winreg" inline, (so other OS's don't import it), untested but should be ok.
--- From the thread
It's the version of r23036 + winreg patch from Maurice.
About the registry keys:
- I have povray 3.6 and 3.7b34 installed on vista32.
- In the registry, I have 3 choices : ' CurrentVersion ', ' v3.6 ', and ' v3.7'.
- I've modified Maurice's patch by replacing CurrentVersion by v3.6. We have the benefit to have the keys for each version so I prefer use them rather than the 'floating-key-about-which-is-the current-version'. I found more secure like that.
Diffstat (limited to 'release')
-rw-r--r-- | release/io/engine_render_pov.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/release/io/engine_render_pov.py b/release/io/engine_render_pov.py index 02b8aab4c42..22cf1a36dbb 100644 --- a/release/io/engine_render_pov.py +++ b/release/io/engine_render_pov.py @@ -740,10 +740,13 @@ class PovrayRender(bpy.types.RenderEngine): pov_binary = "povray" if sys.platform=='win32': + import winreg + regKey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, 'Software\\POV-Ray\\v3.6\\Windows') + if bitness == 64: - pov_binary = "pvengine64" + pov_binary = winreg.QueryValueEx(regKey, 'Home')[0] + '\\bin\\pvengine64' else: - pov_binary = "pvengine" + pov_binary = winreg.QueryValueEx(regKey, 'Home')[0] + '\\bin\\pvengine' if 1: self.process = subprocess.Popen([pov_binary, self.temp_file_ini]) # stdout=subprocess.PIPE, stderr=subprocess.PIPE |