Jump to content

julienmargelin

Members
  • Content count

    2
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

1 Neutral

About julienmargelin

  • Rank
    Peon

Contact Methods

  • Website URL
    www.julienmargelin.com/demo

Personal Information

  • Name
    Yarg
  • Location
    paris

Recent Profile Visitors

254 profile views
  1. [SOLVED]Random Orient All 3-Axis?

    you can try this too // translate rotate scale pivot matrix myTransform= maketransform(0,0,chv("t"),chv("r"),chv("s"),chv("p")); @orient = quaternion(matrix3(myTransform));
  2. NetworkImage

    Hello everyone, I'm trying to make a screenShot script with python that load my image in the network view Well everything goes well until the end of the script: editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) image = hou.NetworkImage() image.setPath('$HFS/houdini/pic/Mandril.pic') image.setRect(hou.BoundingRect(0, 0, 5, 5)) editor.setBackgroundImages([image]) I found this piece of code in the houdini documentation. The problem is when navigate from /obj/geo to /obj and go back to /obj/geo the image is gone. is anybody has an idea ? Thanks ! here is my full script: def screenShot(): """take a screen shot of the current viewport at the current frame""" help(screenShot) import hou import toolutils import os #selected node nodeSelect = hou.selectedNodes() path = hou.expandString("$HIP") frame = hou.expandString("$F") frame = int(frame) black=hou.Color((0,0,0)) #name check there is a node selected if len(nodeSelect)<1: print ("!!! error: select a node !!!") else: for node in nodeSelect: name = node.name() node.setColor(black) #Get the current Desktop desktop = hou.ui.curDesktop() # Get the scene viewer scene= toolutils.sceneViewer() flipbook_options = scene.flipbookSettings().stash() # set frame range flipbook_options.frameRange((frame,frame)) #set output path root ="{1}/{2}/{0}/".format(name,path,"screenShot") if os.path.exists(root): listPath = os.listdir(root) inc = len(listPath) inc = int(inc) outputPath = "{}{}.{:04d}.jpg".format(root,name,inc) else: os.makedirs(root) inc = 0 outputPath = "{}{}.{:04d}.jpg".format(root,name,inc) #set flipbook current path flipbook_options.output(outputPath) #run flipbook scene.flipbook(scene.curViewport(),flipbook_options) # reload image print (outputPath) editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) image = hou.NetworkImage() image.setPath(outputPath) image.setRect(hou.BoundingRect(0, 0, 5, 5)) image.setRelativeToPath(node.path()) editor.setBackgroundImages([image])
×