Re: [Maya-Python] PyQt DIP
I actually would love to hear a case study from someone who did actually use DIP. So far, I have never seen anyone mention this framework once in any context. I tried to look into it once before but I still don't fully get its use case. I see that its meant to be a toolkit agnostic interface for mixing models, views, and controller components. My assumption is that you design these components around dip, which then exposes a common interface for it to translate between toolkits. Though, as much as I read the docs... I still don't get how it solves *my* problems yet. if its any good, you would think someone would have a blog post about it out there. On Fri, Jun 8, 2012 at 9:41 AM, Judah Baron judah.ba...@gmail.com wrote: Has anyone used DIP? I've been looking at it as a possibility for the future, but I'm not finding much chatter, or feedback. If anyone has any experience, direct or anecdotal I would be grateful to hear it. Thanks, -Judah -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
Re: [Maya-Python] PyQt DIP
Yeah, a case study would be nice. It doesn't help that DIP is a very common search term, so there's a lot of time spent sifting through garbage results. I'm interested in it for a number of reasons. As you mention, Justin, it's a framework designed to facilitate large scale python applications implementing the MVC design pattern. Onc of the big features that I'm interested in is type safety. Python is a terrific language, in part, due to its ability to handle types so fluidly. But this can cause some problems: duplicate type checking code everywhere cluttering your source files, lack of type checking and the resulting bugs, inflexible function calls vs way too flexible functions with too many args, etc. I've been considering doing this on our own, but quite frankly, the thought of it is daunting when considering the actual work I have to get done. I'll continue to look at it and will re-post when I have something useful. -Judah On Fri, Jun 8, 2012 at 10:46 AM, Justin Israel justinisr...@gmail.comwrote: I actually would love to hear a case study from someone who did actually use DIP. So far, I have never seen anyone mention this framework once in any context. I tried to look into it once before but I still don't fully get its use case. I see that its meant to be a toolkit agnostic interface for mixing models, views, and controller components. My assumption is that you design these components around dip, which then exposes a common interface for it to translate between toolkits. Though, as much as I read the docs... I still don't get how it solves *my* problems yet. if its any good, you would think someone would have a blog post about it out there. On Fri, Jun 8, 2012 at 9:41 AM, Judah Baron judah.ba...@gmail.com wrote: Has anyone used DIP? I've been looking at it as a possibility for the future, but I'm not finding much chatter, or feedback. If anyone has any experience, direct or anecdotal I would be grateful to hear it. Thanks, -Judah -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
Re: [Maya-Python] MPxLocatorNode and compute troubleshooting (with example code)
first In your plugin declaration with the kDoubleArray output I would rather correct those lines( things can be done in a lot of different ways, this is how i do it ): def initializePlugin(mobject): fnPlugin = omMPx.MFnPlugin(mobject) fnPlugin.registerNode(nodeType, nodeId, nodeCreator, nodeInitializer) by kPluginNodeName = spaceSwitch #-- replace by your plugin name kPluginNodeId = OpenMaya.MTypeId(your_Custom_ID_number here) def initializePlugin(mobject): mplugin = OpenMayaMPx.MFnPlugin(mobject, AuthorName, VersionNum, Any) mplugin.registerNode( kPluginNodeName, kPluginNodeId, nodeCreator, nodeInitializer, OpenMayaMPx.MPxNode.kDependNode)# -- As you can see I use the type of the node here a dependency node then In your compute method there is no code to write some value on your output and also no setClean call. Your node must also be connected to another node. just few question bellow, Are your example the complete code for your nodes? Do you have an ascii maya file that can be used as an example? Do you have any prior experience with the API? Have you a basic understanding of the concept of hierarchy , connections , attributes and plug ?( DAG versus dependency nodes ) Le vendredi 8 juin 2012 19:51:19 UTC+2, WhileRomeBurns a écrit : Thanks for the quick replies! So he basically tricks Maya into dirtying his plug in the draw method? Nice. So in my example, I would query the value of a third dummy attribute- something lighter weight than an array like a float or int and use that to force the eval? Can do! * how about writing a node to compute your pointList and plug it to your locator that will only draw from * Absolutely the way to go, but I thought I would save time and test the idea in one node. But then nothing worked :) Additionally, I'm now fighting python just to call compute with * MFnTypedAttributes*. Two examples, slightly modified versions of Farsheed's skeleton code. The first one has MFnNumericAttribute as the output attribute and it calls the compute method as expected. The second one is bunk though and I cannot figure out why. Hmm. Take a look: nodeNumeric.py: http://pastebin.ubuntu.com/1030758/ Works a charm, compute gets called. nodeTyped.py http://pastebin.ubuntu.com/1030764/ Compute never gets called. Silently fails? Only changed the attr type to TypedAttr and kDoubleArray. Nada. Zilch. Zippo! Did I miss something obvious? Thanks. -shawn -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe