This is an example of how to implement custom mouseDoubleClickEvent() method just like it is implemented for media player, how to implement the functionality of playing video in full screen mode.
0 Comments
Run this code given below, this will create scene node, scanline Render node, camera node and a constant node connect them together and connect the final output from the scanline Render, node to default viewer. You can add the below function to the init.py file or create a your own py file into which you place this code and then you import that file into init.py so as it can be called when a menu button is clicked from the interface. 1: def setupThreedNodes(): 2: mainCam = nuke.nodes.Camera(name="mainCamera",xpos=100,ypos=20) 3: scnlnRndr = nuke.nodes.ScanlineRender(name="ScanLineRender",xpos=250,ypos=35) 4: scNode = nuke.nodes.Scene(name = 'Scene',xpos=250,ypos=-100) 5: constNode = nuke.nodes.Constant(name="Temp_Constant",xpos=400,ypos = 10) 6: scnlnRndr.setInput(2, mainCam) 7: scnlnRndr.setInput(1,scNode) 8: scnlnRndr.setInput(0, constNode) 9: defViewer = nuke.toNode("Viewer1") 10: defViewer.setInput(0,scnlnRndr) Add it as nuke button by adding the code below to the init.py file located in the .nuke directory. menu = nuke.menu('Nodes') menu.addCommand('3D/Setup 3D Nodes', 'setupThreedNodes()', 'alt + t') So by the year end 2012, I am done with my new reel for the post of technical artist job profile. The showreel showcases my skills in python and pyqt4. In this video I choose to showcase 3 tools that I made recently in python. 1.Pose It: Pose Manager for Autodesk Maya can run as docked or as floating window made can display thumbnail of stored poses. 2. Mini Me: Maya Project manager that lets the maya artist access files and folder from within maya without having to switch to Explorer or finder set favorite projects, fix file texture paths, email scene or selected file or upload to ftp and even perform incremental save. (both 1. Pose manager & Project manager has multi platform compatibility i.e on mac, linux and Windows) 3. Batch Renderer for Autodesk Maya and Foundry Nuke performs batch render, what unique you might find it reads the ma, mb or nk file for the setting set by the artist for rendering and this reduces the chance of a mistake of entering wrong values manually. you can also choose the render camera in case of may from dropdown similarly choose write node in case of Nuke while doing render setup. I have written plenty of other tools that can be viewed on Creative crash website here: goo.gl/xCljF Yesterday it was torrible, in these days I am wrapping up my work to a reel I can show, but my work is so much dependent on computer. I do not have a good laptop I could have finished work on it and the when the my desktop is certainly the answer, power goes off and I am not able to finish it quickly, however every time the power goes off I pick up my Unix book to utilize the time but that still doesn't really help me to finish what I am doing fast. Everyday power goes off and it again happened today as well. And another thing thats very annoying is I recorded the screen capture with CamStudio but it ended up at 200fps so when I import to AE and re-render the final to take out the un-necassary pauses or to add descriptive text. the video render ends up into jiggy type however it worked with one of my render (from 200 fps to 30fps direct in AE)of first one(which is here) but it is not working with the Batch render screen capture I re-did after doing some up-gradation in the app look. Although I tried to convert 200FPS video to 30FPS from Quicktime pro, and it seems like work but the result will show up once the render is complete. Meantime I watched this video on Youtube about programming workout by Michael Taszycki , its pretty good one and tells about exercises that we can do to get better at programming and also to what I want to be good at. I came up with a working logic to parse the createImageFormats.mel file to fill it in the QComboBox lists for my current project, this may not be the best solution however it works perfectly. 1: def readImageFormats(self): 2: phile = "scripts/others/createImageFormats.mel" 3: imageFormatIndex={} 4: try: 5: read_phile=open(phile,"r") 6: text =str(read_phile.read()) 7: except Exception as e: 8: print e 9: finally: 10: read_phile.close() 11: 12: lst = text.split("$i =") 13: for each in lst: 14: if each.split()[0].split(";")[0].isdigit() : 15: if (each.split()[-1].split(";")[0].replace('"',"")).isalnum(): 16: imageFormatIndex[each.split()[0].split(";")[0]]=each.split()[-1].split(";")[0].replace('"',"").upper() 17: 18: imageFormatIndex.update({'12':'YUV'}) 19: imageFormatIndex.update({'13':'SGI16'}) 20: imageFormatIndex.update({'4':'TIF16'}) 21: imageFormatIndex.update({'10':'MAYA16 IFF'}) 22: imageFormatIndex.update({'7':'MAYA IFF'}) 23: return imageFormatIndex Basically it looks for a pattern like "$i = " and creates a list and then I split the list based on the index and retrieve the text from the selected indexes. I would guess it it would take less lines in regex but i do not have much experience with regex. |
Custom Search
Other Blogs & PagesGit Commands Animation & VFX SitesA MUST READ for Ani/VFX Artistsawakened by thoughts,
|