Re: [Maya-Python] Re: Small Arrays and OpenMaya API

2020-03-27 Thread Nicolas Chaverou
= om.MFnTransform(node) > print(joint.scale()) > > And why I created cmdx <https://github.com/mottosso/cmdx>... > > import cmdx > joint = cmdx.encode("joint1") > joint["scale"] = [1, 2, 3] > > > On Wed, 25 Mar 2020 at 14:39, Nicolas Chaverou

[Maya-Python] Re: Small Arrays and OpenMaya API

2020-03-25 Thread Nicolas Chaverou
ble from Python. * Cumbersome is the right word indeed. Will probably hide this with some binding functions in my module N. On Wed, Mar 25, 2020 at 3:19 PM Nicolas Chaverou < nicolas.chave...@golaem.com> wrote: > Hey guys, > > That's probably a silly question but I've been

[Maya-Python] Small Arrays and OpenMaya API

2020-03-25 Thread Nicolas Chaverou
Hey guys, That's probably a silly question but I've been wondering this for a while and always figured something else, but now i'm kinda stucked. Using Maya 2018 / Windows How do get/set small arrays within the Python API ? For example, MfnTransform has the following function prototype: MStatus <

Re: [Maya-Python] Calling user function from module

2018-05-28 Thread Nicolas Chaverou
Totally valid. Thanks for the suggestion, it's way easier and pythonic :) --- [image: Nicolas Chaverou - Golaem Crowd Product Manager - Golaem SA] +33 (0)2 99 27 21 44 http://www.golaem.com On Mon, May 28, 2018 at 1:00 PM, Justin Israel wrote: > I definitely second the suggest

[Maya-Python] Calling user function from module

2018-05-28 Thread Nicolas Chaverou
sometimes declared in their own modules (not known from our side) or in the Maya Script Editor Problem is those functions are not available from our glm.utils module. Someone has an idea about how I could solve this ? Thanks --- [image: Nicolas Chaverou - Golaem Crowd Product Manager - Gol

Re: [Maya-Python] Re: .MFileIO.getReferenceFileByNode - // Error: (kInvalidParameter): Invalid parameter

2018-02-19 Thread Nicolas Chaverou
Hey Sivanny, You're correct indeed... So no way, on the API side to easily fetch the reference file of a referenced node... Dammit... I'll have to figure something else, it's annoying indeed. Best, --- [image: Nicolas Chaverou - Golaem Crowd Product Manager - Golaem SA] +33 (

Re: [Maya-Python] Re: .MFileIO.getReferenceFileByNode - // Error: (kInvalidParameter): Invalid parameter

2018-02-16 Thread Nicolas Chaverou
ify a reference node or referenced file to unload. // --- [image: Nicolas Chaverou - Golaem Crowd Product Manager - Golaem SA] +33 (0)2 99 27 21 44 http://www.golaem.com On Fri, Feb 16, 2018 at 3:33 PM, Nicolas Chaverou < nicolas.chave...@golaem.com> wrote: > Hey Marcus, > > Which

Re: [Maya-Python] Re: .MFileIO.getReferenceFileByNode - // Error: (kInvalidParameter): Invalid parameter

2018-02-16 Thread Nicolas Chaverou
code (change the namespace if required) --- [image: Nicolas Chaverou - Golaem Crowd Product Manager - Golaem SA] +33 (0)2 99 27 21 44 http://www.golaem.com On Fri, Feb 16, 2018 at 11:12 AM, Marcus Ottosson wrote: > I get that error when, unsurprisingly, the object does not exist. > >

Re: [Maya-Python] Re: .MFileIO.getReferenceFileByNode - // Error: (kInvalidParameter): Invalid parameter

2018-02-16 Thread Nicolas Chaverou
ng at it anyway --- [image: Nicolas Chaverou - Golaem Crowd Product Manager - Golaem SA] +33 (0)2 99 27 21 44 http://www.golaem.com On Thu, Feb 15, 2018 at 10:03 PM, Justin Israel wrote: > > > On Thu, Feb 15, 2018 at 11:36 PM Nicolas Chaverou < > nicolas.chave...@golaem.com> wrot

[Maya-Python] Re: .MFileIO.getReferenceFileByNode - // Error: (kInvalidParameter): Invalid parameter

2018-02-15 Thread Nicolas Chaverou
Oops sorry, the error I'm getting is: // Error: (kInvalidParameter): Invalid parameter --- [image: Nicolas Chaverou - Golaem Crowd Product Manager - Golaem SA] +33 (0)2 99 27 21 44 http://www.golaem.com On Thu, Feb 15, 2018 at 11:33 AM, Nicolas Chaverou < nicolas.chave...@golaem.co

[Maya-Python] .MFileIO.getReferenceFileByNode - // Error: (kInvalidParameter): Invalid parameter

2018-02-15 Thread Nicolas Chaverou
onList.add( 'types_ToReference:pSphere1' ) node = maya.OpenMaya.MObject() selectionList.getDependNode( 0, node ) file = maya.OpenMaya.MFileIO.getReferenceFileByNode( node ) # RuntimeError: (kInvalidParameter): Object does not exist // Anything I missed? --- [image: Nicolas Chaverou -

Re: [Maya-Python] Use AbcExport plugin externally to convert obj to abc

2017-05-09 Thread Nicolas Chaverou
Alembic also has a Python interface. Pretty sure you can do it without requiring any Maya license --- [image: Nicolas Chaverou - Golaem Crowd Product Manager - Golaem SA] +33 (0)2 99 27 21 44 http://www.golaem.com On Sat, May 6, 2017 at 3:52 AM, Paul Molodowitch wrote: > you can just

Re: [Maya-Python] Changing defaults of a node type

2017-03-30 Thread Nicolas Chaverou
Hey, We're having the same mechanism here. But that means you need to educate all your users to use that override function instead of the default Maya createNode --- [image: Nicolas Chaverou - Golaem Crowd Product Manager - Golaem SA] +33 (0)2 99 27 21 44 http://www.golaem.com On Thu, M

Re: [Maya-Python] PySide2/PyQt5 troubles and advice needed

2017-01-26 Thread Nicolas Chaverou
On Thu, Jan 26, 2017 at 3:27 PM, Benjam901 wrote: > Can anyone tell me if it is possible to get PyQt5 for windows python 2.7 > and any other advice for making this switch would be gratefully recieved. > > This could be a good start: https://fredrikaverpil.github.io/2016/07/25/dealing-with-maya-20

Re: [Maya-Python] adding the difference between two meshes onto a third with api

2016-12-14 Thread Nicolas Chaverou
Hey On Wed, Dec 14, 2016 at 9:57 PM, wrote: > hello, > > i got this concept working fine with python cmds. I am trying to see if i > can get it working with api. So far with the thanks to Justin Israel, i got > my code to this stage: > > http://pastebin.ubuntu.com/23630582/ > > basically imagine

Re: [Maya-Python] changing default render resolution

2016-12-08 Thread Nicolas Chaverou
Hey, Use scriptJob for event called when a New scene is created (or whatsoever) http://download.autodesk.com/us/maya/2010help/CommandsPython/scriptJob.html Best, --- [image: Nicolas Chaverou - Golaem Crowd Product Manager - Golaem SA] +33 (0)2 99 27 21 44 http://www.golaem.com On Thu, Dec 8

Re: [Maya-Python] finding the difference between two coordinates

2016-12-07 Thread Nicolas Chaverou
Need to go the other way: vector from a to b is (b-a) {-3, 2, 4} Best, --- [image: Nicolas Chaverou - Golaem Crowd Product Manager - Golaem SA] +33 (0)2 99 27 21 44 http://www.golaem.com On Wed, Dec 7, 2016 at 9:58 AM, wrote: > Hi, > > this maya be a dumb question. I basically

Re: [Maya-Python] Custom Node executing 'compute' method twice for each frame during playback

2016-11-14 Thread Nicolas Chaverou
Hey Dylan, What's the type of the plug beeing keyframed (compound) ? Any chance there're some attributeAffects relationship declared in the init ? Best, --- [image: Nicolas Chaverou - Golaem Crowd Product Manager - Golaem SA] +33 (0)2 99 27 21 44 http://www.golaem.com On Mon, Nov 1

Re: [Maya-Python] How to get all paths inside maya file?

2016-10-11 Thread Nicolas Chaverou
nodes using Fred approach maybe Here's the command: filePathEditor -query -listRegisteredTypes Best, --- [image: Nicolas Chaverou - Golaem Crowd Product Manager - Golaem SA] +33 (0)2 99 27 21 44 http://www.golaem.com On Sun, Oct 9, 2016 at 8:11 AM, Fredrik Averpil wrote: > Lik

Re: [Maya-Python] Callback for Set Project?

2016-10-05 Thread Nicolas Chaverou
quot;, workspaceChangedCallback] ) > from maya import cmds > cmds.scriptJob(conditionTrue=["workspaceChanged", > "cmds.warning('changed')"])# RuntimeError: Could not find condition or event > named "workspaceChanged" # > > ​ > > On 5 Octo

Re: [Maya-Python] Callback for Set Project?

2016-10-05 Thread Nicolas Chaverou
overriding proc sp_workAfterOpeningProject(string $projectLocation). But that's a bit dirty and dependant on your Maya version... My 2cts --- [image: Nicolas Chaverou - Golaem Crowd Product Manager - Golaem SA] +33 (0)2 99 27 21 44 http://www.golaem.com On Wed, Oct 5, 2016 at 10:43 AM, Mahmoo

[Maya-Python] Undo Delete Callback

2016-08-29 Thread Nicolas Chaverou
not look correct to me (even in the undo queue, userNode() on the deleted node returns something valid) Anyone has an idea about how this could be solved ? Cheers, --- [image: Nicolas Chaverou - Golaem Crowd Product Manager - Golaem SA] +33 (0)2 99 27 21 44 http://www.golaem.com -- You received

Re: [Maya-Python] cross product of two vectors

2016-03-21 Thread Nicolas Chaverou
class. Something like: import maya.api.OpenMaya as om v1, v2 = om.MVector(vec1), om.MVector(vec2) print v1 ^ v2 Hope that helps, N. --- [image: Nicolas Chaverou - Golaem Crowd Product Manager - Golaem SA] +33 (0)2 99 27 21 44 http://www.golaem.com On Mon, Mar 21, 2016 at 12:34 PM, wrote: &g

Re: [Maya-Python] A new plugin for crowd simulation/crowd generation in Maya at a reasonable cost!

2016-03-05 Thread Nicolas Chaverou
This having been said I completely understand your point but there's a good reason why there are so few crowd softwares out there. It takes a lot of time, skills, lines of code (hundreds of thousands) to achieve a competitive product. Hope it shone some lights. Will be happy to answer any questions :

Re: [Maya-Python] mayapy playblast

2016-02-26 Thread Nicolas Chaverou
I'd have bet on the graphics drivers / opengl. Else if your Maya viewport is active, you may try to dump the frame buffer to images and run a post process to assemble them as a video: http://nathanhorne.com/python-api-grab-frame-buffer-to-image/ --- [image: Nicolas Chaverou - Golaem