Skip to content
This repository has been archived by the owner on Jul 7, 2022. It is now read-only.

Windows Support #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions houdini/python2.7libs/vft_hou.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class that will generate fractal generation CL code that Houdini will read from
"""
def __init__(self):
self.vft_root_path = self.getVftRootFromPath( hou.getenv("HOUDINI_PATH") )
self.vft_kernels_path = os.path.join(self.vft_root_path, "ocl/vft_kernels.cl")
self.vft_kernels_path = os.path.join(self.vft_root_path, "ocl", "vft_kernels.cl")

self.vft_kernels = None
self.vft_kernels_parsed = None
Expand All @@ -136,17 +136,29 @@ def getVftRootFromPath(self, path):
this might not work on Windows
extracts path to VFT from os-style paths string
"""
paths = path.replace(";",":").split(":")

paths = None
# This is only for windows
if os.name == 'nt':
paths = path.split(";")
# It's worth noting here that even if the paths in the houdini.env file have \ on Windows, they will get converted to / when using hou.getenv("HOUDINI_PATH"). Let's force convert them to \
paths = [path.replace('/', '\\') for path in paths]

else: # This is for non-windows OS
paths = path.replace(";",":").split(":")

# this will need to be changed if git repository name changes
pattern = os.sep + "raymarching" + os.sep + "houdini"
patterns = []
patterns.append(os.sep + "vft-master" + os.sep + "houdini")
patterns.append(os.sep + "vft" + os.sep + "houdini")

# find pattern in list of paths
vft_root = ""
for path in paths:
if pattern in path:
vft_root = path
break
for pattern in patterns:
if pattern in path:
vft_root = path
break

return vft_root

Expand Down Expand Up @@ -362,4 +374,4 @@ class FpsCam(object):
"""
Set of functions helping with FPS/Flying camera orientation in scenes.
"""
pass
pass
11 changes: 11 additions & 0 deletions houdini/scenes/windows_install_readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
This is a work in progress guide to get this awesome project working on Windows.

1. Make sure the root folder of the project is named "vft-master" or "vft".

2. Find your "houdini.env" file. An Example location of the file is "C:\Users\Matt\Documents\houdini17.5\houdini.env"
In that file, add the project's houdini path there. Example:
HOUDINI_PATH = $HOUDINI_PATH;C:\Users\Matt\Desktop\vft-master\houdini

Now most examples in the scene vft-master\houdini\scenes\testing_scene_mantra_only.hipnc should work. When you get an error on the HDAs, click "reload" on them.

This guide doesn't cover htoa or OSL yet.