diff --git a/houdini/python2.7libs/vft_hou.py b/houdini/python2.7libs/vft_hou.py index 505df80..e1bf0e0 100644 --- a/houdini/python2.7libs/vft_hou.py +++ b/houdini/python2.7libs/vft_hou.py @@ -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 @@ -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 @@ -362,4 +374,4 @@ class FpsCam(object): """ Set of functions helping with FPS/Flying camera orientation in scenes. """ - pass \ No newline at end of file + pass diff --git a/houdini/scenes/windows_install_readme.txt b/houdini/scenes/windows_install_readme.txt new file mode 100644 index 0000000..e1ae050 --- /dev/null +++ b/houdini/scenes/windows_install_readme.txt @@ -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.