Skip to content

Commit

Permalink
Create a preview directory for procedural textures to avoid creating …
Browse files Browse the repository at this point in the history
…it by hand on fresh installs.
  • Loading branch information
Maurice Raybaud committed Jul 28, 2014
1 parent a3d8d01 commit c275bd3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions render_povray/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
from bpy.types import(Operator)#all added for render preview
##############################SF###########################
##############find image texture


def imageFormat(imgF):
ext = {
'JPG': "jpeg",
Expand Down Expand Up @@ -3310,8 +3308,13 @@ class RenderPovTexturePreview(Operator):
def execute(self, context):
tex=bpy.context.object.active_material.active_texture #context.texture
texPrevName=string_strip_hyphen(bpy.path.clean_name(tex.name))+"_prev"
workDir=os.path.dirname(__file__)
workDir=os.path.dirname(__file__)
previewDir=os.path.join(workDir, "preview")

## Make sure Preview directory exists and is empty
if not os.path.isdir(previewDir):
os.mkdir(previewDir)

iniPrevFile=os.path.join(previewDir, "Preview.ini")
inputPrevFile=os.path.join(previewDir, "Preview.pov")
outputPrevFile=os.path.join(previewDir, texPrevName)
Expand Down

0 comments on commit c275bd3

Please sign in to comment.