[Maya-Python] Re: PySide and channelBox customize

2015-03-16 Thread Rémi Deletrain
Thank you for your reply, I also find that changing the Maya interface is a big fuss. It often start after each release. I wanted to try to do that to keep the functionality of the channelBox. Drag and drop in the view port with the middle click for example, and other functionality. I also

[Maya-Python] Re: PySide and channelBox customize

2015-03-17 Thread Rémi Deletrain
+1, Rémi Deletrain a écrit : De ce que j'ai pu voir la channel Box se trouve dans le premier widget. avec ce code on peu voir que tout est dans le premier Widget. --- from PySide

[Maya-Python] Re: PySide and channelBox customize

2015-03-17 Thread Rémi Deletrain
De ce que j'ai pu voir la channel Box se trouve dans le premier widget. avec ce code on peu voir que tout est dans le premier Widget. --- from PySide import QtGui, QtCore from shiboken

[Maya-Python] PySide and channelBox customize

2015-03-13 Thread Rémi Deletrain
Hello everyone, I am trying to change the maya channelBox. Until now addin PySide window easily. that is my code:

[Maya-Python] Re: new to python classes

2015-06-01 Thread Rémi Deletrain
try this class test(object): def __init__(self,x,y): self.x=x self.y=y def info(self): print %s,%s%(self, self.x, self.y) ok=test(pSphere1,pSphere2) test().info http://test.info/() if you want call info with no instance add a decorator '@classmethod'

[Maya-Python] Re: DeformerSet - Hide from outliner

2015-06-30 Thread Rémi Deletrain
fug Outliner... I try this command but don't change my outliner Thank you Markus Le mardi 30 juin 2015 11:33:49 UTC+2, Rémi Deletrain a écrit : Hi everyone, I create little tool with maya cluster. I create a node 'deformer Set' and i want this node do not visible in the outliner

Re: [Maya-Python] Re: command repeatLast

2015-05-25 Thread Rémi Deletrain
Yes of course! I past the cleaned script that works for me. If you have problems with the one made me know. If I find problems with and I corrected them I'll post an update. It's just a version corrected and with a vocabulary adapted to my scripts. Otherwise it is the same as the link

Re: [Maya-Python] Re: command repeatLast

2015-05-25 Thread Rémi Deletrain
The script works in the latest comments! I applied some little changes to match with my tech but otherwise it work fine! Thank you very much Justin -- You received this message because you are subscribed to the Google Groups Python Programming for Autodesk Maya group. To unsubscribe from

Re: [Maya-Python] Re: command repeatLast

2015-05-25 Thread Rémi Deletrain
I deliberately remove the possibility of catche an exception to see the various error. The problem of try / except it is difficult to debug with that. If I understand what you say. The problem in my code is to combine repeat and callback into a single function. So if I repeated my command I

Re: [Maya-Python] Re: command repeatLast

2015-05-26 Thread Rémi Deletrain
Hi Justin, Okay, I understand what you mean. It is true that it is more logical. I think with other tools does having the command and a single callback function could cause problems. I had to get lucky the first time I tried this because the decorator does not restarted. But after further

[Maya-Python] Re: Context Face selection (MEL)

2015-05-26 Thread Rémi Deletrain
You have this solution: http://tech-artists.org/forum/showthread.php?419-popUpMenu-mel-notes-quot-dagObjectHit-quot -- 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

[Maya-Python] Re: Context Face selection (MEL)

2015-05-26 Thread Rémi Deletrain
I don't really like this solution. It's not very clean For my animator team I developped a marking menu depending on the selecton, type of object and custom attribute of objects. I can thus separate different type of action with the keys. :+clic selection action (symetrize selection, select

[Maya-Python] Re: Context Face selection (MEL)

2015-05-26 Thread Rémi Deletrain
I think you'll find everything you need on this website http://ewertb.soundlinker.com/mel/mel.077.php -- 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

[Maya-Python] Re: Context Face selection (MEL)

2015-05-26 Thread Rémi Deletrain
I work in Python but it's same way in mel. -- 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

Re: [Maya-Python] Re: command repeatLast

2015-05-23 Thread Rémi Deletrain
Hi Justin, Than you for tour reply! I saw this blog but I have not seen th elast post Y try Monday, -- 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

[Maya-Python] command repeatLast

2015-05-22 Thread Rémi Deletrain
hi everyone, I try to make a decorator to add a command in the repeatlast python maya command. Only every time it returns me an error : // Error: Line 2.91: Invalid use of Maya object False. // So I would try to do the same command but mel and it works. But! the decorator needs a language

Re: [Maya-Python] command repeatLast

2015-05-22 Thread Rémi Deletrain
For works in mel add this script in start : import maya.mel as mel import pymel.core as pmc from pymel.all import mel as pm mel.eval( global proc callLastCommand(string $function) { repeatLast -ac $function -acl blah-blah; } ) and with mel proedure: def repeat_command(function):

[Maya-Python] Re: command repeatLast

2015-05-22 Thread Rémi Deletrain
with a command format in mel I have a problem. The first time you run the script the decorator working properly because we past a python command. Only when you press G key you past a mel command in the decorator and it's don't work So the command is excecuted properly because it was well

[Maya-Python] DeformerSet - Hide from outliner

2015-06-30 Thread Rémi Deletrain
Hi everyone, I create little tool with maya cluster. I create a node 'deformer Set' and i want this node do not visible in the outliner like all deformers. But I don't find this command. someone an idea? -- You received this message because you are subscribed to the Google Groups Python

[Maya-Python] Re: Scripts and Management

2015-10-19 Thread Rémi Deletrain
Hi, If ever it can help you. https://github.com/RDelet/Maya_Tools/blob/master/Divers_Tools/plugin_manager.py I got orders to load my scripts at boot, has put in the userSetup.py It also allows the reloader scipts without closing Mayan and without using the reload. As the saying everyone if no

Re: [Maya-Python] Re: Scripts and Management

2015-10-19 Thread Rémi Deletrain
It allows reloader scripts by destroying the modules and reloading them. Shortly be with this solution you can fix your problem -- 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

[Maya-Python] Re: Scripts and Management

2015-10-19 Thread Rémi Deletrain
Hi, If ever it can help you. It's not a cleaned script but it works https://github.com/RDelet/Maya_Tools/blob/master/Divers_Tools/plugin_manager.py I create this tool for laod all my scripts when maya loading. It's possible to reload all your scripts for exemple with your tool in

[Maya-Python] Mathematical problem

2015-10-13 Thread Rémi Deletrain
Hello everyone, I try to move a vertex based on its local matrix. For that I took the normal, position, tangent and binormals (I make an average of them). So I was creating my matrix like this Matrix = [tangent, normal, binormal, position] to move the vertex based on a distance I do this.

Re: [Maya-Python] Mathematical problem

2015-10-13 Thread Rémi Deletrain
This is a test for an animated tool. I took the vertex position of two identical mesh but with one deformed. So they will have the same local matrix it's transform node Finally I would like to move my point according to the normal but with an offset position which corresponds to the end point.

Re: [Maya-Python] Mathematical problem

2015-10-13 Thread Rémi Deletrain
I will try to draw a picture this afternoon, I also think it will be easier -- 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

Re: [Maya-Python] Mathematical problem

2015-10-13 Thread Rémi Deletrain
http://www.noelshack.com/2015-42-1444749454-draw.jpg The objective is to obtain a position offset between two vertex based on the matrix (or normal) of the initial vertex. This will provide a desired deformation after any deform. for exemple: With Maya blendshape, if you apply a shape with the

Re: [Maya-Python] Mathematical problem

2015-10-13 Thread Rémi Deletrain
with my picture I show you what I want as a result. Always with the Maya blendshape if I apply the shape after deformation point move only in Y axes and don't follows deformation -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk

[Maya-Python] MFnNurbsSurface Crash

2015-09-09 Thread Rémi Deletrain
Hello everyone, I am trying to retrieve a position of a uv nurbssurface from a point in space. For this I use the Maya API. I tried with a mesh and it works very well. The problem I have with the nurbssurface is that when I run my script Maya plant ... Is someone already had this problem?

[Maya-Python] Re: MFnNurbsSurface Crash

2015-09-09 Thread Rémi Deletrain
and I give him a Vector3 or Vector4 it's the same ... Le mercredi 9 septembre 2015 10:24:37 UTC+2, Rémi Deletrain a écrit : > > Hello everyone, > > I am trying to retrieve a position of a uv nurbssurface from a point in > space. > For this I use the Maya API. > > I tried with

[Maya-Python] Re: MFnNurbsSurface Crash

2015-09-09 Thread Rémi Deletrain
This is actually due to the tolerance ... Thank you very much again !!! Le mercredi 9 septembre 2015 10:24:37 UTC+2, Rémi Deletrain a écrit : > > Hello everyone, > > I am trying to retrieve a position of a uv nurbssurface from a point in > space. > For this I use the May

[Maya-Python] Re: Search and Replace with Python

2015-09-21 Thread Rémi Deletrain
Hi, You can do this with Python: toto = 'L_Arm' toto.replace('L_', 'R_') -- 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

[Maya-Python] custom blendshape

2015-09-25 Thread Rémi Deletrain
Hello everyone, I am trying to change the deform blendshape. I will be starting from zero with the example of Chad Vernon to a single input. http://www.chadvernon.com/blog/resources/maya-api-programming/deformers/ Everything works as I want. The calculation is made good and distort what I

[Maya-Python] Re: custom blendshape

2015-09-25 Thread Rémi Deletrain
It's me again! I changed the method to arrive what I wanted. I have updated the files on the link below. https://github.com/RDelet/Maya_Tools/tree/master/Custom_Node/BlendShapePlus I can finish my tool by adding my duties. Thank you to those who have read and tried to solve my problem. --

[Maya-Python] c++ Custom Node

2015-09-18 Thread Rémi Deletrain
Hi everybody, I try to was creating a custom node in c ++. It is functional yet. My problem is to try to optimize this node. I have an input inSurface attribute. I retrieves the connection with MHandleData and I converted in MObject // MDataHandle

[Maya-Python] Re: custom blendshape

2015-09-25 Thread Rémi Deletrain
for better visibility https://github.com/RDelet/Maya_Tools/tree/master/BlendShapePlus Le vendredi 25 septembre 2015 13:01:31 UTC+2, Rémi Deletrain a écrit : > > Hello everyone, > > I am trying to change the deform blendshape. I will be starting from zero > with the example

[Maya-Python] Python decode/encode

2015-11-26 Thread Rémi Deletrain
Hi everybody, I try to encode a string utf-8 myString = "" === Pr \ u00e9sentation of ... === "" with "\ u00e9", which is the letter "é" but I happens by no means has transform my string properly. I decode with "cp1252" and again with "latin1" with variable myString I have no problem, but on

Re: [Maya-Python] Python decode/encode

2015-11-26 Thread Rémi Deletrain
Hi Mark, My file is xml. I use ElementTree for get data. And for get text data I just have myText = myElement.text I don't know other wy for xml file... -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe

[Maya-Python] maya bend deformer algorithm

2015-11-26 Thread Rémi Deletrain
You try linearBend deformer before ? -- 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 python_inside_maya+unsubscr...@googlegroups.com.

Re: [Maya-Python] Python decode/encode

2015-12-01 Thread Rémi Deletrain
I tried this way but it does not work properly... I have always problem with encode format -- 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

Re: [Maya-Python] Python decode/encode

2015-12-01 Thread Rémi Deletrain
thank you marcus I'll watch it whenever I can! -- 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

[Maya-Python] Re: Find vertex index from uv value

2016-06-07 Thread Rémi Deletrain
This command convert element index to another element index. Not found symetric index of an element. And this command is very slow. I think it's possible to recreate this command for convert uv index to vertex index in api. Today i try to convert this code to cpp and the result is very

[Maya-Python] Re: Find vertex index from uv value

2016-06-06 Thread Rémi Deletrain
Hello everyone, I found a solution to optimize a little time calcul. I split UVs to reduce the search field. I share with you the python script. https://github.com/RDelet/Maya_Tools/blob/master/Divers_Tools/sym_map.py It's possible you have small problem when you launch script, I have split

[Maya-Python] Re: Find vertex index from uv value

2016-06-02 Thread Rémi Deletrain
I have a solution but it is very long in python. Easy to reproduce in cpp but I would like as much as possible try to make a quick trick in python ... --- #

[Maya-Python] Find vertex index from uv value

2016-06-01 Thread Rémi Deletrain
Hello everyone, I have a question just being stupid. Is it possible to retrieve the index of a vertex with u and v values. Or find the index of a uv with u and v values to then find the index of the vertex. The objectif is to make a symmetry with the points by uv. -- You received this

[Maya-Python] Maya Plug

2016-01-11 Thread Rémi Deletrain
Hello everyone. I have a problem with Mplug. I try to create inputs in MFnNumericsAttribute array in connectionMade function of my MPxNode. -- # Function when connection made in node def

[Maya-Python] Re: Maya Plug

2016-02-22 Thread Rémi Deletrain
THX Daniel. Indeed I try with arrayBuilder and it works Le lundi 11 janvier 2016 17:23:52 UTC+1, Rémi Deletrain a écrit : > > Hello everyone. > > I have a problem with Mplug. > > I try to create inputs in MFnNumericsAttribute array > in connectionMade f

[Maya-Python] API and Offset BlendShape

2016-02-25 Thread Rémi Deletrain
Hi everyone, I try to get offset points of blendshape with maya API. whis pymel is very simple with this line: --

Re: [Maya-Python] MPxLocatorNode and boundingBox

2016-03-31 Thread Rémi Deletrain
I not have error... maya just crash. Yes i'm shure. When I comment boundingbox method my node works -- 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

[Maya-Python] Re: Mathematical problem

2016-03-23 Thread Rémi Deletrain
a little update of this script --- #Import modules import operator #Math utils def dotProduct(v1, v2): return

[Maya-Python] Re: Mathematical problem

2016-03-03 Thread Rémi Deletrain
I have solution. obj_1 --> base mesh obj_2 --> target mesh obj_3 --> mesh reveiver

[Maya-Python] Re: API and Offset BlendShape

2016-03-03 Thread Rémi Deletrain
I found the solution ! -- #For get MFnBlendShape selectionList = OpenMaya.MSelectionList() selectionList.add(blendShapeName) bsObject =

Re: [Maya-Python] MPxLocatorNode and boundingBox

2016-03-30 Thread Rémi Deletrain
Hello Daniel, Thank you for your answer. I tried your solution but doesn't work either... -- 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

Re: [Maya-Python] MPxLocatorNode and boundingBox

2016-03-29 Thread Rémi Deletrain
I use maya 2014 on Windows 7 The path of my node https://github.com/RDelet/Maya_Tools/blob/master/Custom_Node/QDManip.py -- 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

[Maya-Python] MFnAnimCurve

2016-03-29 Thread Rémi Deletrain
Hello everyone, I try to set MFnAnimCurve of type UU. But addKeys or addKeyframe doesn' work on it. I tried with another type of curve and it works very well. Someone already had this problem? -- You received this message because you are subscribed to the Google Groups "Python Programming

[Maya-Python] Re: check if selected object is a poly mesh

2016-05-09 Thread Rémi Deletrain
With PyMel you have this solution: maya_node = pmc.selected()[0] or maya_node = pmc.PyNode("YourNode") # Check if given node is pymel node if isinstance(maya_node , pmc.PyNode): # Do somthing or # Check if given node is pymel mesh node if isinstance(maya_node , pmc.nodetype.Mesh): # Do

[Maya-Python] DraggerContext disable outliner refresh...

2017-02-24 Thread Rémi Deletrain
Hi everybody, I've problem with the DraggerContext and Maya 2014. I create a picker that allows you to position an object in position and rotate on a mesh. This part works very well. My problem is that the outliner does not update when I do my picking or when I leave the tool. I am forced to

Re: [Maya-Python] Re: DraggerContext disable outliner refresh...

2017-02-27 Thread Rémi Deletrain
This is my script. This is not the final version it is still in dev so it's normal if some thing looks odd. I had to overwrite all the dependencies so that it works in one file. I just noticed one thing. The I add a sphere in script on this code. But the object I add in the scene is normally a

Re: [Maya-Python] Re: DraggerContext disable outliner refresh...

2017-02-27 Thread Rémi Deletrain
Thanks Marcus, I try this this afternoon. For this moment I think the problem is when I loading my reference with the DraggerContext... -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and

Re: [Maya-Python] Re: DraggerContext disable outliner refresh...

2017-02-27 Thread Rémi Deletrain
Even with a code reduced to the maximum I have the same problem when I load a reference with the DraggerContext. If I create an object in script I do not have this problem. -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya"

Re: [Maya-Python] Re: DraggerContext disable outliner refresh...

2017-02-27 Thread Rémi Deletrain
This is a script reduced... For the reference just create file with sphere and set path in script. -- 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

Re: [Maya-Python] Re: DraggerContext disable outliner refresh...

2017-02-28 Thread Rémi Deletrain
Je n'ai rien trouvé jusqu'à présent pour faire un refresh de l'outliner. J'ai essayé de forcer les sélections dans le code pour remettre à jour (car après avoir quitter le DraggerContext il n'y a que ça qui fait le refresh) mais ça ne change rien non plus..

[Maya-Python] Re: DraggerContext disable outliner refresh...

2017-02-27 Thread Rémi Deletrain
Oui je parle français. Je re explique en français du coup... J'ai fait un picker qui permet de positionner un objet sur un mesh et de l'orienter par rapport à la normal. Cette partie de l'outil fonctionne très bien. J'utilise pour ça le draggerContext. Le problème c'est que dès que je lance le

[Maya-Python] BlendShape paint weight tool

2016-09-12 Thread Rémi Deletrain
Hello everyone, I try to run the "BlendShapePaintWeightTools". The command is simple: - cmds.ArtPaintBlendShapeWeightsToolOptions but I can not find the solution to set the default index of weight I want to paint. It is with the same command? -- You received this message because you are

[Maya-Python] Re: BlendShape paint weight tool

2016-09-14 Thread Rémi Deletrain
No set value of weight. When you are in blendshapePaintWeightTool it's possible to choose to paint enveloppe or target enveloppe. I want to select a specific target enveloppe when I launch this tool. I have tool for edit, extract, substract, etc blendshape and it's really good feature for my

[Maya-Python] Re: Issues with getting the root node of the hierarchy based on selection

2016-09-21 Thread Rémi Deletrain
it's possible to use pymel for get root. pm.selected()[0].root(). I use to function for get parent by type. The first it's for get all parent of my node. The second it's for check type of parent and break when i found my type. It's possible to transform this function for works with particular

[Maya-Python] Maya API MEvent

2016-09-20 Thread Rémi Deletrain
Hi everyone, It's possible to get MEvent of panel ? I try to get mouse clic out of MpxContext / draggerContext / Qt. Maya have this MEvent for move, rotate camera, select, etc etc But it's impossible to get this event ?! ... -- You received this message because you are subscribed to the

[Maya-Python] Re: Driving an object along mesh using geometry constraint and motion paths (Performance issues)

2016-09-22 Thread Rémi Deletrain
It's possible to work with projection --> https://vimeo.com/59896276. I prefere to make node for that but it's possible to build in nodal. with point on mesh/surface you have your plane projection oriented from normal. with all intersection it's possible to calculate the reel pivot of your

[Maya-Python] Way for use OpenGL glVertexPointer with python ?

2016-11-17 Thread Rémi Deletrain
Hello everyone, I create script utils for use OpenGl in the viewport without node. This script Add, edit or remove shape with easy way. But for this moment I use old shcool method for add shape in OpenGl and is heavy for complex shape. I know this method in C++ glVertexPointer(3, GL_FLOAT, 0,

[Maya-Python] MPxManipContainer OpenGL scale problem

2016-11-02 Thread Rémi Deletrain
Hello everybody, I have a little problem that I can not explain the MPxManipContainer. I added a simple manipultor addFreePointTriadManip. If I set an offset to 0 with setTranslate of my handler I have no problem. However if I set an offset of this manipulator it is scale in the viewport when

[Maya-Python] Maya 2017 evaluation

2017-03-30 Thread Rémi Deletrain
Hi everybody, Is any of you already tried the 2017 version of Maya. If so, did you feel a real difference in the performance of node evaluation in animation? For my part I have not seen that much difference. A few frames per second but I had to remove the half of the scene if not Maya plant ...

[Maya-Python] Re: Maya 2017 evaluation

2017-03-30 Thread Rémi Deletrain
Thank you for your answers, It's not very encouraging. On our side we have a lot of node custom, so they are not compatible with the 2017 version. The test I did is on a stage only with mesh, seal and skin . I removed all the shaders, expression and that kind of thing. We are currently working

[Maya-Python] Re: Maya 2017 evaluation

2017-03-31 Thread Rémi Deletrain
Certainly they can not paralyze everything. There is not even interest for some nodes. Enjoying parallelism for internal nodes necessarily involves a rewrite. It's all logical to rework and also use the new function of the API. I found the other nodes on this page.

[Maya-Python] Re: Maya 2017 evaluation

2017-03-31 Thread Rémi Deletrain
In some of our nodes we use multithreading. But we are in Maya 2014 at the moment. I just wanted to do a test on a simple scene and see the gain of image per second between Maya 2014 and Maya 2017. And I have almost seen nothing ... The test on custom nodes will be done later on. We should

[Maya-Python] Re: Maya 2017 evaluation

2017-03-31 Thread Rémi Deletrain
Yes I saw that depending on the viewport this applied or not. But I also tried in 2.0 and it's the same. -- 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,

[Maya-Python] Re: PySide and QSlider problem

2017-03-20 Thread Rémi Deletrain
I'm so stupid... I have read the API, I have modified and given the correct variable but I forgot to change the name of the function ... Lose as much time besause i'm stupid ... It is by reading your post justin that I realized it. Because actually the name of the function does not match what I

[Maya-Python] PySide and QSlider problem

2017-03-17 Thread Rémi Deletrain
Hello everyone, I have a little problem with the PySide QSlider. I'm trying to draw text on the ticks of my QSlider. I saw that we could use "sliderValueFromPosition" to find the position but impossible to make it work correctly ... It always returns 0. I'll show you my code. def

[Maya-Python] Re: Maya 2017 evaluation

2017-03-31 Thread Rémi Deletrain
Okay. I got a misconception. I thought that parrallelisation would save much more time but it was only in my head ... I will see with my team what can be done on this version of Maya and discuss it with Autodesk if they are greedy of user tests. All our nodes are in cpp. We have the same node in

[Maya-Python] Re: Calculate Vector

2017-04-05 Thread Rémi Deletrain
I make this code for create matrix from mesh face def get_matrix_from_face(mfn_mesh, point, face_id): """ !@Brief Get matrix from point position and face id. Take normal, tangent, binormal of all face vertex and average it. @type mfn_mesh: OpenMaya.MFnMesh @param

Re: [Maya-Python] copy a mesh with transforms baked in

2017-04-05 Thread Rémi Deletrain
If I am not mistaken the copy of the MFnMesh only copies in ObjectSpace. It is therefore necessary either to move the transform or to multiply all the points by the WorldMatrix of your transform -- You received this message because you are subscribed to the Google Groups "Python Programming

[Maya-Python] [PySide] CustomButton alpha image

2017-07-12 Thread Rémi Deletrain
Hy everybody, I try to make a customButton with alpha image. The objectif is to change color of icon from alpha. I have a code works but I have two probleme... - My picture does not have antialiazing, but my painter have flage. - It's impossible to scale image. The code : def

[Maya-Python] AABB intersect

2017-05-17 Thread Rémi Deletrain
Hello everybody, I try to make a code find an intersection between a ray and a box. I read a lot of thing on the internet and one of the best code I could find is this one. def box_aabb_intersect(bbox_min, bbox_max, ray, direction): t1 = (bbox_min.x - ray.x) * direction.x t2 =

Re: [Maya-Python] QT picture crowd display

2017-06-21 Thread Rémi Deletrain
So in fact, I tried the QListWidget vs. QListView / QStandardItemModel. I win a good performance. Easily two to three times faster ... At logic level I try to use a maximum of C ++ logic. Eventually, if I have time one day, it will be done in C ++ I did not have time to try with the

Re: [Maya-Python] QT picture crowd display

2017-06-20 Thread Rémi Deletrain
Thanks for your reply Justin, I use PySide of Maya 2014. So it seems to me that it is more or less the version QT4. I am wrong ? I made a class with a parent class QListView and I manage the model inside. It may change a bit to also play with the QT proxy for the filters. I tried the function

[Maya-Python] QT picture crowd display

2017-06-19 Thread Rémi Deletrain
Hello everybody, I try a new exercise with QT, a PoseManager. We already have it, but it's getting old now and I have to update it for the next production. So I made a list with icons like the StudioLibrary: http://www.studiolibrary.com. Why not use StudioLybrarie directly? Simply because the

Re: [Maya-Python] AABB intersect

2017-05-19 Thread Rémi Deletrain
Thank you for your answer Alok, After much rereading and viewing other script on the internet I saw my error ... you have to replace the * by / for each "edge" ... I have only one condition that tells me whether I have an intersection or not. In this case I return None. The script that will

Re: [Maya-Python] Re: AABB intersect

2017-05-23 Thread Rémi Deletrain
It's not that complicated. It's masked api. Once you know the API it's very simple to convert the pymel. Indeed the number of people who read the mel is more and more reduced. I can translate or write the mel but I do not like to use it so much :) With the nodal I find the expressions less and

Re: [Maya-Python] AABB intersect

2017-05-19 Thread Rémi Deletrain
Thank you for your comment, This function is in a class. There are private variables and that are called with: - self.origin() - self.set_origin() - self.direction - etc. That seems correct to you ? I got into the habit of doing that but I may be wrong... -- You received this

[Maya-Python] [QUATERNION] Slerp

2017-09-15 Thread Rémi Deletrain
Hello everyone, I try to make a slerp between two quaternions. I have a formula that works, but I encounter a problem with maya ... This is my slerp function: def slerp_quaternion(m_quaternion_1, m_quaternion_2, f_weight): m_quaternion_1 = m_quaternion_1.normal() m_quaternion_2 =

Re: [Maya-Python] Re: [QUATERNION] Slerp

2017-09-19 Thread Rémi Deletrain
I tried the Maya slerp but the problem is that I do not have access to it ... That's why I tried to do the slerp. type object 'MQuaternion' has no attribute 'slerp'. I tried to make the slerp from the eulers. I get the rotation of my transform and I transform it into quaternion. I do not have

Re: [Maya-Python] Re: [QUATERNION] Slerp

2017-09-19 Thread Rémi Deletrain
I do not know why I do not have access ... :( I try with Maya 2014, et 2018... I'll try to prepare a scene and script that goes with it in the day. thank you very much for your help ! -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk

[Maya-Python] Re: [QUATERNION] Slerp

2017-09-18 Thread Rémi Deletrain
Ho I'm sorry ... I just see that the code I sent was not the right one ... I did some testing and suddenly the code had become anything ... def slerp_quaternion(m_quaternion_1, m_quaternion_2, f_weight): """ !@Brief Apply Spherical interpolation between two quaternions. @type

Re: [Maya-Python] Re: [QUATERNION] Slerp

2017-09-20 Thread Rémi Deletrain
I did not risk using it in this case the ... :) The api 2.0 is really better. I have seen post with people who had a lot of problems with that. That's why we stayed on the 1.0. I have not yet had time to make a test scene. I have bee overworked since the begenning of the week. I do this as soon

[Maya-Python] MFnSkinCluster and setWeigths

2017-10-16 Thread Rémi Deletrain
I everyone, A few years ago I rubbed a skinCluster export to python. I did some research on the internet and everyone says, even now, that this function is very slow. I tried to use it and in fact it is much faster than the solution found on the net with setAttr. So suddenly I ask myself a

[Maya-Python] Re: [QUATERNION] Slerp

2017-09-28 Thread Rémi Deletrain
Oh it's so simple :( Thank you very mush ! But effectively after 360° I have a flip again... I Try to get difference between last rotation and new rotation for add rotation. With that I think do not have a problem -- You received this message because you are subscribed to the Google Groups

[Maya-Python] Re: MFnSkinCluster and setWeigths

2017-10-18 Thread Rémi Deletrain
@Justin Thanks for you comment :). Yes but I didn't reply I prefere c... My english is not really good. Sorry if I don't use a correct word all time... @Michaek So it's not just an idea on my part or a bad code with the setAttr. The setWeights of the API is much faster. -- You received this

[Maya-Python] Re: [MSyntax] addFlag does not work

2017-11-03 Thread Rémi Deletrain
Sorry for my late answer... I think i found the problem but it's mean weird. I inversed longFlagName and shotFlagName in command "addFlag". I do not know why he would crash on it. In any case I have my arguments and the command that works. -- You received this message because you are

[Maya-Python] Re: [MSyntax] addFlag does not work

2017-10-26 Thread Rémi Deletrain
This code it's a copy/past of maya exemple. It's the last test I do but doesn't work too. I break on my code with this test: status = syntax.addFlag(kShortShapeName, kLongShapeName, MSyntax::kString); if (status != MStatus::kSucces){ MGlobal::displayError("ERROR: ..."); } With this test I

[Maya-Python] [MSyntax] addFlag does not work

2017-10-25 Thread Rémi Deletrain
Hi everyone, I try to create au plugin with MPxCommand. I have classic code found on MSyntax api class exemple. My code: MSyntax SSDRCommands::newSyntax() { MStatus status; MSyntax syntax; syntax.addFlag(kShortShapeName, kLongShapeName, MSyntax::kString); CHECK_MSTATUS_AND_RETURN(status,

[Maya-Python] Re: Need to create some kind of dynamic constraint ?

2018-05-23 Thread Rémi Deletrain
Hi, For make this I don't use geometrie constraint. I tryed to make it with this constraint but isn't a good solution. Géometry constraint don't keep distance between all object if the ground isn't plane. So, in first, i make a basic node for use *mesh

[Maya-Python] Re: Need to create some kind of dynamic constraint ?

2018-05-24 Thread Rémi Deletrain
It's not possible to give you my node because is a property of QuanticDream. But it's possible to give you an exemple. :) -- 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

  1   2   >