The Area http://area.autodesk.com/forum/ The Area en Copyright 2012 2012-02-10T07:28:58+01:00 Arnold open source? http://area.autodesk.com/forum/autodesk-maya/sdk/arnold-open-source/page-last/ http://area.autodesk.com/forum/autodesk-maya/sdk/arnold-open-source/page-last/#When:22:27:24Z Hi everyone Anybody know where i can find the maya MtoA open source code... thx for answer alexander 2012-01-31T22:27:24+01:00 Mesh texturing? http://area.autodesk.com/forum/autodesk-maya/sdk/mesh-texturing/page-last/ http://area.autodesk.com/forum/autodesk-maya/sdk/mesh-texturing/page-last/#When:08:46:52Z Hello everybody, For a study project, I have to create a plugin which loads a mesh (OBJ), and change the texture image file (which is stored on the disk, PNG files) several times, in relation with the current time in the timeline. But my problem is, how to apply a texture to a mesh? I know I have to do several steps : - Create a blinn shader, - Get the "surfaceShader" attribute from my mesh, - Connect the Blinn "outColor" attribute to the Mesh "surfaceShader" attribute, - Create a file node, - Set the file node "fileTextureName" attribute to the image path, - And connect the file node "outColor" attribute to the Blinn "color" attribute. But I don't know how to do this with the API (C++ for my project). First problem : When I do the first connection (material outColor -> mesh surfaceShader), the MDGModifier::connect function returns MStatus::kSuccess, but when I call the MDGModifier::doIt (just after), it returns kFailure. And second problem: How to create a file node? Thanks a lot for your attention! Romuuu 2012-01-20T08:46:52+01:00 Hi all, Maya AEaddRampControl? http://area.autodesk.com/forum/autodesk-maya/sdk/hi-all-maya-aeaddrampcontrol/page-last/ http://area.autodesk.com/forum/autodesk-maya/sdk/hi-all-maya-aeaddrampcontrol/page-last/#When:02:11:07Z is there any way to add ramp control in dynamic compound attribute? also other attributes. in Attribute Template file, adding compound attributes. I would be appreciated. Good lucks. 2012-01-15T02:11:07+01:00 // Warning: Failed to call script creator function // http://area.autodesk.com/forum/autodesk-maya/sdk/-warning-failed-to-call-script-creator-function-/page-last/ http://area.autodesk.com/forum/autodesk-maya/sdk/-warning-failed-to-call-script-creator-function-/page-last/#When:03:52:21Z Hi guys, I'm pretty new to the whole Maya API Python Plugin development, but I'm eager to dive deeper into it. ;) When initializing my little plugin I'm always getting this error: [quote]// Error: AttributeError: type object 'MFnNumericAttribute' has no attribute 'kFloat' // // Warning: Failed to call script creator function // [/quote] The code is not fancy, so where is my problem? [code]import sys import maya.OpenMaya as OpenMaya import maya.OpenMayaMPx as OpenMayaMPx kPluginNodeTypeName = "myTestNode" kPluginNodeId = OpenMaya.MTypeId( 0x80000 ) # Node definition class myTestNode( OpenMayaMPx.MPxNode ) : # constructor def __init__( self ) : OpenMayaMPx.MPxNode.__init__( self ) def compute( self, plug, data ) : print "compute" return OpenMaya.MStatus.kSuccess # creator def nodeCreator(): return OpenMayaMPx.asMPxPtr(myTestNode()) # initializer def nodeInitialize(): #input nAttr = OpenMaya.MFnNumericAttribute() myTestNode.input = nAttr.create("input", "in", OpenMaya.MFnNumericAttribute.kFloat, 0.0) nAttr.setWritable(True) nAttr.setStorable(True) nAttr.setKeyable(True) #output Attr = OpenMaya.MFnNumericAttribute() myTestNode.input = nAttr.create("Output", "out", OpenMaya.MFnNumericAttribute.kFloat, 0.0) Attr.setWritable(True) Attr.setStorable(False) Attr.setWritable(False) # add attribute myTestNode.addAttribute(myTestNode.input) myTestNode.addAttribute(myTestNode.output) # dirty flag propergation myTestNode.attributeAffects(myTestNode.input,myTestNode.output) # initialize the script plug-in def initializePlugin( mobject ) : mplugin = OpenMayaMPx.MFnPlugin( mobject,'Me', '1.0','Any') try: mplugin.registerNode( kPluginNodeTypeName, kPluginNodeId, nodeCreator, nodeInitialize) except: sys.stderr.write( "Failed to register node: %sn" % kPluginNodeTypeName ) raise # uninitialize the script plug-in def uninitializePlugin( mobject ): mplugin = OpenMayaMPx.MFnPlugin( mobject ) try: mplugin.deregisterNode( kPluginNodeId ) except: sys.stderr.write( "Failed to unregister node: %sn" % kPluginNodeTypeName ) raise[/code] The compute function doesn't do anything for now. All I want is to create this simple node with two attributes(float/int) for the start. The numeric data type exists(Maya API Class Reference), so what's wrong here? If I'm deleting the whole content in [code]def nodeInitialize()[/code] the plugin loads without any errors and the node can be created. [code]createNode myTestNode; // Result: myTestNode1 //[/code] So something has to be wrong here. ;) Thanks for answers, Chris 2012-01-11T03:52:21+01:00 Maya fails to load module dependent on IEFrame.dll http://area.autodesk.com/forum/autodesk-maya/sdk/maya-fails-to-load-module-dependent-on-ieframedll/page-last/ http://area.autodesk.com/forum/autodesk-maya/sdk/maya-fails-to-load-module-dependent-on-ieframedll/page-last/#When:18:38:10Z I have written a .mll module that makes use of a device interface DLL which has a dependency on IEFrame.dll. In doing some background research I found that in versions of Internet Explorer 7 and later, IEFrame.dll has at least one unresolved imports. I used a product called Dependency Walker and it shows that it has three. Versions of my interface DLL have been in use for more than a decade with literally hundreds of products, so I know it is stable, even with the underlying dependency on IEFrame.dll. But it seems that Maya's method for validating modules before loading will not accept the unresolved imports. Has anyone else run into this and created a work-around or have an idea to help me resolve this? 2011-12-10T18:38:10+01:00 Strange behaviour of MFnMessageAttribute... http://area.autodesk.com/forum/autodesk-maya/sdk/strange-behaviour-of-mfnmessageattribute/page-last/ http://area.autodesk.com/forum/autodesk-maya/sdk/strange-behaviour-of-mfnmessageattribute/page-last/#When:07:28:43Z Solved. 2011-11-22T07:28:43+01:00 MFnFluid::getColors() for Use Shading Color http://area.autodesk.com/forum/autodesk-maya/sdk/mfnfluidgetcolors-for-use-shading-color/page-last/ http://area.autodesk.com/forum/autodesk-maya/sdk/mfnfluidgetcolors-for-use-shading-color/page-last/#When:13:08:56Z Hey all, just wondering if someone could please point me towards the correct method for extracting the shaded colors from MFnFluid objects when the Color Method is set to Use Shading Color. When the mode is set to static or dynamic grid the getColors method works but appears to return NULL on Use Shading Color. I've been looking at this example: http://download.autodesk.com/us/maya/2011help/API/fluid_info_cmd_8cpp-example.html but unfortunately it doesn't cover the shaded case, nor does the documentation really mention this http://download.autodesk.com/us/maya/2011help/API/class_m_fn_fluid.html Thanks in advance. 2011-11-17T13:08:56+01:00 Noob: Error: line 1: Unable to dynamically load : http://area.autodesk.com/forum/autodesk-maya/sdk/noob-error-line-1-unable-to-dynamically-load-/page-last/ http://area.autodesk.com/forum/autodesk-maya/sdk/noob-error-line-1-unable-to-dynamically-load-/page-last/#When:07:55:45Z hey, I got the code from someone else for a plugin that was made for Maya 2009. I am supposed to compile it for Maya 2011 and Maya 2012. I did so (linked to the separate Maya install directories), it is compiling nicely but the plugin itself only works in Maya 2011. When I try to load the 2012 version in Maya 2012 I get following error: [code] // Error: line 1: Unable to dynamically load : c:/program files/autodesk/maya2012/bin/plug-ins/fileTranslator.mll The specified procedure could not be found. [/code] So it probably has something to do with the linking and missing libraries, right? Well I tried the Dependency Walker while loading the plugin and I get the following output: [code]00:06:53.407: First chance exception 0xE06D7363 (Microsoft C++ Exception) occurred in "c:windowssystem32KERNELBASE.DLL" at address 0x000007FEFD67CACD by thread 1. 00:06:53.407: First chance exception 0xE06D7363 (Microsoft C++ Exception) occurred in "c:windowssystem32KERNELBASE.DLL" at address 0x000007FEFD67CACD by thread 1. 00:06:53.438: LoadLibraryA("c:/program files/autodesk/maya2012/bin/plug-ins/fileTranslator.mll") called from "c:program filesautodeskmaya2012binFOUNDATION.DLL" at address 0x00000000014321B2 by thread 1. 00:06:53.438: Loaded "c:program filesautodeskmaya2012binplug-insFILETRANSLATOR.MLL" at address 0x0000000011C70000 by thread 1. Successfully hooked module. 00:06:53.454: Loaded "c:program filesautodeskmaya2012binXERCES-C_2_5_0.DLL" at address 0x0000000012000000 by thread 1. Successfully hooked module. 00:06:53.454: First chance exception 0xC0000139 (DLL Not Found) occurred in "c:windowssystem32NTDLL.DLL" at address 0x000000007716D7D8 by thread 1. 00:06:53.454: Unloaded "c:program filesautodeskmaya2012binplug-insFILETRANSLATOR.MLL" at address 0x0000000011C70000 by thread 1. 00:06:53.454: Unloaded "c:program filesautodeskmaya2012binXERCES-C_2_5_0.DLL" at address 0x0000000012000000 by thread 1. 00:06:53.454: LoadLibraryA("c:/program files/autodesk/maya2012/bin/plug-ins/fileTranslator.mll") returned NULL by thread 1. Error: The specified procedure could not be found (127).[/code] Well, I don’t know how to read this… Could anyone teach me how to track this problem? What would be the next steps to find out what is going on? Did any libraries change between Maya 2011 and 2012? Thank you!! 2011-11-17T07:55:45+01:00 Custom node passes data to transform? http://area.autodesk.com/forum/autodesk-maya/sdk/custom-node-passes-data-to-transform/page-last/ http://area.autodesk.com/forum/autodesk-maya/sdk/custom-node-passes-data-to-transform/page-last/#When:18:24:04Z Hey, I am working on a simple custom node which outputs float values. I am not creating an MFnTransform node. I can connect the outputs from my custom node into the inputs of an object's transform node to drive the translation. This is working, however, I can't find a way to have the connected object's translation work in object space. I am very new to the Python API. Can someone please point me in the right direction for outputting values in object space? Since my node's output is connected to the transform node of an object, how can I set the connected object to translate in Object Space? Thanks, Wes 2011-11-14T18:24:04+01:00 [QT] Can't catch hotkey in my own widget with Maya and Qt http://area.autodesk.com/forum/autodesk-maya/sdk/qt-cant-catch-hotkey-in-my-own-widget-with-maya-and-qt/page-last/ http://area.autodesk.com/forum/autodesk-maya/sdk/qt-cant-catch-hotkey-in-my-own-widget-with-maya-and-qt/page-last/#When:23:27:13Z I wrote a mll plugin for maya and use qt in it (I use maya 2011 x64 on windows and Qt opensource 4.5.3, build with vs2008). There's a QMainFrame in my plugin and some actions with shortcut added to the widget. When I run it in maya, I can't use any hotkey to invoke the my actions. For example, I set the Ctrl+n to my own "new file" action, but after I pressed Ctrl+n in maya (I focused on my widget), it just made a new maya scene, not my "new file" action. Then I tried to change the hotkey which isn't existing in maya, like Ctrl+e, but failed also. But I start my widget in standalone QApplication, I can use all my hotkeys! So I can't catch the hotkey in maya any more. How to fix it? Thx 2011-11-12T23:27:13+01:00