Hello all, and thanks Manuel and Marcus.
The notion of "Script Node" is apparently very appropriate, with a "on software frame render" setting. Thank you Marcus. However, it raises two question we could not solve so far. First question : Is it possible to pass a Python variable to a Script Node ? My idea is : 1/ open my motion file BEFORE launching Maya's loop (parse the file header, check a series of things, etc) 2/ pass a File object to the script node, so that on each Maya frame the corresponding data are read in the file. However, I then need to let my scipt node access the File variable... More generally, I think there is probably a mean to let a script node access parameters (Python variables, etc). But which is it ? Second question : Apparently, a "script nodes" deletes itself when executed. Well... This sound a bit strange to me... Is there a mean to let a "on software frame render" script node be permanent, and be executed on each frame ? Thank you very much for your upcoming answers, best- Nicolas (& colleagues) On Friday, July 11, 2014 11:33:45 AM UTC+2, Marcus Ottosson wrote: > > Hi Nicolas, and welcome. > > Have a look at the script node. It’ll let you run Python on a per-frame > basis and you should be able to apply your data from there. > http://download.autodesk.com/global/docs/maya2013/en_us/Nodes/script.html > > It does however sound quite taxing from a performance perspective and for > that you might be better off writing a plug-in in either C++ or C# > > > > On 11 July 2014 10:25, Manuel Macha <[email protected] <javascript:>> > wrote: > >> It seems to me that what you describe as Maya's 'in-time' loop could be >> achieved using expressions. >> Have a look at Maya's-Online help for expressions and see if you can make >> sense of it. >> >> >> >> On Fri, Jul 11, 2014 at 6:33 PM, Nicolas Castagne <[email protected] >> <javascript:>> wrote: >> >>> Dear all, >>> >>> I am new to this group, and somewhat new to Maya, and I am looking for >>> directions to start a new Maya Python script. >>> >>> On the one side, I have large files encoding the sampled movement of a >>> large number of 3D points. >>> These movements can be parsed using Python - no problem here. >>> >>> My goal is to let these "moving 3D points" control various Maya objects >>> (points, locaters, clusters, nurbs's control points, polygons, etc). >>> >>> I know that, for each of the moving points, I could attach a keyframe to >>> a node, and pre-load all the movement as keyframes. >>> >>> However, since I am not interested in keyframes, I would like to set up >>> a system that, while runing the Maya animation, on each frame : >>> - reads the current points' positions in the file >>> - applies the new position to the Maya scene (eg move chosen "points", >>> eg locators, in the Maya scene) >>> - then, and only then, starts the frame's rendering pipeline >>> >>> Hence, to some extend, I would need to "hook" into Maya's in-time loop. >>> >>> Since I am very new to Maya-Python, I hardly figure out where to start. >>> >>> Would you have any advice, examples, or entries in the API ? >>> >>> >>> Thank you very much in advance, >>> Nicolas & team >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Python Programming for Autodesk Maya" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected] >>> <javascript:>. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/python_inside_maya/7bcc7658-e131-4477-9504-692c0b9c6aed%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/python_inside_maya/7bcc7658-e131-4477-9504-692c0b9c6aed%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Python Programming for Autodesk Maya" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/python_inside_maya/CAF3Jb2KNB%3D7aE7w32922u9w1t3M1Ev0%3D865UeJoTE1LH5VywvQ%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/python_inside_maya/CAF3Jb2KNB%3D7aE7w32922u9w1t3M1Ev0%3D865UeJoTE1LH5VywvQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > *Marcus Ottosson* > [email protected] <javascript:> > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/ed386175-8311-4684-a85e-6ce88dad01fa%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
