[Maya-Python] Re: See which faces are affected by polyChipOff?

2017-12-25 Thread fruityfrank
Alternately, and especially since speed seems to be a concern, what you can do is to re-write your own extract/duplicate command with python api. This is what I use instead of maya commands, it takes about 50lines to can get all the infos you need to create a new polygon. And, surprisingly,

[Maya-Python] Re: Tagging MB files with metadata

2018-02-11 Thread fruityfrank
I'd be curious to find something as well ! I had a quick look at it ages ago, and couldn't find anything robust. If you're on Unix, you can attach infos against a file (including a .mb), but that doesn't seem to exist on windows. And I'd like to find something cross-platform You can also write

[Maya-Python] writing compound attributes

2018-02-21 Thread fruityfrank
hi ! I'm writing a node with compound attributes, and, as always, I'm struggling with syntax ! I want my attributes to have this hierarchy : element |__element[0] |__ element[0].position |__element[0].positionX |__element[0].positionY |__element[0].positionZ

[Maya-Python] Re: writing compound attributes

2018-02-23 Thread fruityfrank
quick update in case someone else has the problem.. I just realized I was missing MArrayDataBuilder.addArrayElement() with the api2.0 not because it's been replaced by something else, but just because it's not implemented yet in 2017. Supposed to be available in 2018 (according to the

[Maya-Python] Re: Scale font in viewer.drawText() api call

2017-12-22 Thread fruityfrank
I remember having the same issue a few years ago (drawText() is REALLY small ^^), and I couldn't find any solution. I ended up writing my text using openGL instead of maya. something like void yourLoc::vBitmapOutput(int x, int y, char *string, void *font){ int len; glRasterPos2f(x,y) //

[Maya-Python] Re: See which faces are affected by polyChipOff?

2017-12-22 Thread fruityfrank
I'm not sure I understand what you want to achieve, but can't you use the python version instead of the mel one ? a = cmds.polyChipOff(dup=False) b = cmds.polySeparate(your_mesh) this way, you get a proper return value in a and b that you can work with. What do you need to do exactly ? -- You

[Maya-Python] Querying rgb values inside a MPxLocatorNode for drawingOverride / overrideColor implementation

2017-12-21 Thread fruityfrank
Hi guys, while working on a new MPxLocatorNode, I was wondering something : how could I implement the drawingOverride (and more specifically the overrideColor) to my openGL drawing ? Since drawingOverride is inherited by the MPxLocatorNode class, we might have some handles inside the node, no

[Maya-Python] Re: Create customised shader with Python - maya

2018-06-22 Thread fruityfrank
def createShader(shaderType='aiStandard', name='CHROME'): name = pm.shadingNode(shaderType, asShader=True, name=name or shaderType) sg = pm.sets(renderable=True, noSurfaceShader=True, empty=True, name='%sSG' %(name)) pm.setAttr('%s.weight' %(name),0.25) --

Re: [Maya-Python] Unload/reload plugin not refreshing correctly

2018-08-23 Thread fruityfrank
Le mercredi 22 août 2018 18:30:22 UTC-4, Michał Frątczak a écrit : > I didn't find solution, sadly > > > czw., 23 sie 2018, 00:27 użytkownik napisał: > So no working solution, really (based on your thread) ? How did you figure > this out ? > > > > > > > > Le mercredi 22 août 2018

[Maya-Python] Unload/reload plugin not refreshing correctly

2018-08-22 Thread fruityfrank
Hi, I'm compiling a plugin in a different environment from usually, and I'm experiencing some weird behaviors : What I usually do when I modify my plugin is (in a scene where the plugin is loaded already) : - delete any node from the plugin - flush undo - unload the plugin - reload the

Re: [Maya-Python] Unload/reload plugin not refreshing correctly

2018-08-22 Thread fruityfrank
So no working solution, really (based on your thread) ? How did you figure this out ? Le mercredi 22 août 2018 18:16:34 UTC-4, vince touache a écrit : > hahaha I just found your thread via google, like 2 seconds ago ! Will have a > look at it, thanks > > Le mercredi 22 août 2018 18:15:30

[Maya-Python] drawing openGl in a deformer / VP2.0

2018-07-19 Thread fruityfrank
hi there, I'm prototyping a deformer in python / maya2017, and while I usually draw a lot of openGL for debugging purpose (draw points, curves, vectors, etc...), I'm facing an issue with m2017/vp2. The drawing is working differently in the new viewport, and I can't find a way of drawing,

[Maya-Python] [PySide] Parenting a QWidget to a QTreeWidgetItem crashes

2018-03-15 Thread fruityfrank
hi, I'm trying to add an icon to a QTreeWidget, and maya doesn't seem to like the way I do it.. I've got two versions below, the first one is working fine(ish), the second makes maya crash, and I'd like to understand why ! from PySide.QtGui import * # working version tree = QTreeWidget()

Re: [Maya-Python] Re: Symbol not found (on Maya2017 / MacOS)

2018-04-17 Thread fruityfrank
hahahaha ! You want the awful truth ? this "someone" will probably be me... it happened to me a couple of times -___-' No judgment please =p (And this is how I became my self-hero ^^) Le mardi 17 avril 2018 18:59:50 UTC-4, Marcus Ottosson a écrit : > Haha, your messages are hilarious. Best

[Maya-Python] Re: [Pyside2] Transparent Widget

2018-04-17 Thread fruityfrank
Le mardi 17 avril 2018 08:02:54 UTC-4, Rémi Deletrain a écrit : > I found solution. > > > With PySide QWidget transparancy have bug with QGraphicWidget. If > QGraphicWidget have parent widget with transparent background mouseClickEvent > doens't work. > With PySide2 this bug is fixed.  > > >

[Maya-Python] Re: Symbol not found (on Maya2017 / MacOS)

2018-04-17 Thread fruityfrank
djsus, how is it possible to be so stupid -___-' One more time, I found my solution a few minutes after I create the post... I just forgot to edit my cmakeList file and update the maya version number... smart... Sorry about that ! Le mardi 17 avril 2018 17:24:34 UTC-4, vince touache

[Maya-Python] Symbol not found (on Maya2017 / MacOS)

2018-04-17 Thread fruityfrank
Hello, I'm trying to compile some of my plugins for maya 2017, and am facing an error I don't understand. While everything seems to work fine on 2015, when I try to load my plugin in 2017, I got this error : Symbol not found: __ZN15MPxDeformerNode10outputGeomE I have no idea what that means,

[Maya-Python] Re: [PySide] Parenting a QWidget to a QTreeWidgetItem crashes

2018-03-16 Thread fruityfrank
there is something really magic with this forum... I try not to post unless I'm really stuck, and running out of ideas. But somehow, everytime I post here, I find a solution to my problem within the day(s) So again, a few hours after I created this topic, I found the solution ^^ If someone else

[Maya-Python] [maya] nurbsCurve node modifying its input curveDatas

2018-11-03 Thread fruityfrank
hi folks, I noticed something I never saw before, so I'd like to know if I'm missing something : in a nutshell, I got different results when I connect the outCurve datas from a node to a motionPath, and when I pass the same connection through a nurbsCurve before connecting it to a

[Maya-Python] Re: [maya] nurbsCurve node modifying its input curveDatas

2018-11-05 Thread fruityfrank
Le lundi 5 novembre 2018 13:28:25 UTC-5, Neil Roche a écrit : > Hi, > > > Because of a weird bug in Maya when you set parametric length on a motion > path you need to set the opposite;  > > > cmds.setAttr(mp + '.fractionMode', True)   > > > actually turns parametric off. > > > So you need

[Maya-Python] Re: [maya] nurbsCurve node modifying its input curveDatas

2018-11-06 Thread fruityfrank
Le mardi 6 novembre 2018 09:57:50 UTC-5, Neil Roche a écrit : > I would guess that the curveFromSurfaceIso node will work like a parametric > curve irrespective of whether parametric is set on or off as you have the min > and max U values at 0 and 1 and it has no concept of where to draw any cvs

Re: [Maya-Python] Re: [NurbsCurve] Alogrithm create curve from joints

2018-11-30 Thread fruityfrank
Same approach as Michael, maybe you should go for a curve that does have the specificity of passing through every point (e.g. Catmull-Rom, kind of a simplified version of hermite, both light and super easy to implement - the wiki page has everything you need ). From there, you can try to

[Maya-Python] [maya]controller nodes and how to disable them

2018-11-27 Thread fruityfrank
Hi folks, I start looking at the "controller" nodes (new 2017 feature, if I'm correct), used to tag objects as controllers and (finally !) override maya pickwalks. It works great, but I'm looking for a clean way to disable them : in a nutshell, while I'm still working on the rig, I want to

Re: [Maya-Python] getting all objects affected by a given object

2019-04-13 Thread fruityfrank
hi Marcus, I initially started with listHistory, which works fine in 99.99% of the situations, but in some complex situations I don't get accurate results (just like sometimes maya fail in setting correctly the purple wireframe), no matter which flags I use. I just wanted to make sure I

[Maya-Python] getting all objects affected by a given object

2019-04-12 Thread fruityfrank
Hi, I was wondering if there is a way to get maya objects affected by a given object ? When you select something in the viewport, everything affected by your selection will be displayed in wireframe purple. Is there a command to get this result ? (something like obj1.isAffectedBy(obj2)

[Maya-Python] Re: ExportSelected

2019-05-06 Thread fruityfrank
Le jeudi 2 mai 2019 03:25:42 UTC-4, Rémi Deletrain a écrit : > Hi Marcus, > > > > > Any two nodes with a connection will have their connection maintained on > export. > > > This is a problem. In process I disconnect output of pairBlend and after I > export selected nodes. > But at this

[Maya-Python] Re: Trying to deform any mesh into a sphere. How to translate the vertex position to lie on a sphere?

2019-04-23 Thread fruityfrank
hi , not sure I understood what you want to achieve. Ultimately, you want your mesh to look like a sphere ? If yes, I'd suggest you take the longest centroid->vertex to define a sphere radius, then you do a line/sphere intersection between each vector centroid->vertex (normalized) and your

Re: [Maya-Python] read c++ MVectorArray by python

2019-04-10 Thread fruityfrank
Le lundi 18 mars 2019 17:27:16 UTC-4, Justin Israel a écrit : > MVectorArray in python is a SWIG object wrapping the C++ type. I am not sure > of a way to pass a pointer to the C++ MVectorArray and 'wrap' it in Python. > But that would be the lowest overhead if it were possible since you